From 60f5b4599ef2ba17baaddd859324f0b7138054e4 Mon Sep 17 00:00:00 2001 From: Kewei Curtis Xu <106777056+kcx648@users.noreply.github.com> Date: Fri, 24 May 2024 22:11:12 -0600 Subject: [PATCH] 0524Deploy --- assets/index-365138c3.js | 639 ++++++++++++++++++++++++++++++++++++++ assets/index-7386ba2e.css | 1 + index.html | 4 +- 3 files changed, 642 insertions(+), 2 deletions(-) create mode 100644 assets/index-365138c3.js create mode 100644 assets/index-7386ba2e.css diff --git a/assets/index-365138c3.js b/assets/index-365138c3.js new file mode 100644 index 00000000..2c29a416 --- /dev/null +++ b/assets/index-365138c3.js @@ -0,0 +1,639 @@ +function qP(e,t){for(var n=0;na[p]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))a(p);new MutationObserver(p=>{for(const f of p)if(f.type==="childList")for(const o of f.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(p){const f={};return p.integrity&&(f.integrity=p.integrity),p.referrerPolicy&&(f.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?f.credentials="include":p.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(p){if(p.ep)return;p.ep=!0;const f=n(p);fetch(p.href,f)}})();var za=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function RS(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var p=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,p.get?p:{enumerable:!0,get:function(){return e[a]}})}),n}var DS={exports:{}},vy={},BS={exports:{}},Tr={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sf=Symbol.for("react.element"),WP=Symbol.for("react.portal"),GP=Symbol.for("react.fragment"),HP=Symbol.for("react.strict_mode"),ZP=Symbol.for("react.profiler"),KP=Symbol.for("react.provider"),XP=Symbol.for("react.context"),QP=Symbol.for("react.forward_ref"),YP=Symbol.for("react.suspense"),JP=Symbol.for("react.memo"),eM=Symbol.for("react.lazy"),Bw=Symbol.iterator;function tM(e){return e===null||typeof e!="object"?null:(e=Bw&&e[Bw]||e["@@iterator"],typeof e=="function"?e:null)}var OS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},NS=Object.assign,FS={};function Hp(e,t,n){this.props=e,this.context=t,this.refs=FS,this.updater=n||OS}Hp.prototype.isReactComponent={};Hp.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Hp.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jS(){}jS.prototype=Hp.prototype;function Px(e,t,n){this.props=e,this.context=t,this.refs=FS,this.updater=n||OS}var Mx=Px.prototype=new jS;Mx.constructor=Px;NS(Mx,Hp.prototype);Mx.isPureReactComponent=!0;var Ow=Array.isArray,US=Object.prototype.hasOwnProperty,zx={current:null},VS={key:!0,ref:!0,__self:!0,__source:!0};function $S(e,t,n){var a,p={},f=null,o=null;if(t!=null)for(a in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(f=""+t.key),t)US.call(t,a)&&!VS.hasOwnProperty(a)&&(p[a]=t[a]);var v=arguments.length-2;if(v===1)p.children=n;else if(1>>1,nt=ze[qe];if(0>>1;qep(vt,rt))$tp(Je,vt)?(ze[qe]=Je,ze[$t]=rt,qe=$t):(ze[qe]=vt,ze[Le]=rt,qe=Le);else if($tp(Je,rt))ze[qe]=Je,ze[$t]=rt,qe=$t;else break e}}return He}function p(ze,He){var rt=ze.sortIndex-He.sortIndex;return rt!==0?rt:ze.id-He.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;e.unstable_now=function(){return f.now()}}else{var o=Date,v=o.now();e.unstable_now=function(){return o.now()-v}}var x=[],S=[],k=1,P=null,I=3,q=!1,V=!1,H=!1,oe=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(ze){for(var He=n(S);He!==null;){if(He.callback===null)a(S);else if(He.startTime<=ze)a(S),He.sortIndex=He.expirationTime,t(x,He);else break;He=n(S)}}function O(ze){if(H=!1,L(ze),!V)if(n(x)!==null)V=!0,Se(Y);else{var He=n(S);He!==null&&Te(O,He.startTime-ze)}}function Y(ze,He){V=!1,H&&(H=!1,$(fe),fe=-1),q=!0;var rt=I;try{for(L(He),P=n(x);P!==null&&(!(P.expirationTime>He)||ze&&!we());){var qe=P.callback;if(typeof qe=="function"){P.callback=null,I=P.priorityLevel;var nt=qe(P.expirationTime<=He);He=e.unstable_now(),typeof nt=="function"?P.callback=nt:P===n(x)&&a(x),L(He)}else a(x);P=n(x)}if(P!==null)var ct=!0;else{var Le=n(S);Le!==null&&Te(O,Le.startTime-He),ct=!1}return ct}finally{P=null,I=rt,q=!1}}var ne=!1,ue=null,fe=-1,Ce=5,he=-1;function we(){return!(e.unstable_now()-heze||125qe?(ze.sortIndex=rt,t(S,ze),n(x)===null&&ze===n(S)&&(H?($(fe),fe=-1):H=!0,Te(O,rt-qe))):(ze.sortIndex=nt,t(x,ze),V||q||(V=!0,Se(Y))),ze},e.unstable_shouldYield=we,e.unstable_wrapCallback=function(ze){var He=I;return function(){var rt=I;I=He;try{return ze.apply(this,arguments)}finally{I=rt}}}})(HS);GS.exports=HS;var dM=GS.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ZS=te,Ho=dM;function ut(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v_=Object.prototype.hasOwnProperty,hM=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fw={},jw={};function fM(e){return v_.call(jw,e)?!0:v_.call(Fw,e)?!1:hM.test(e)?jw[e]=!0:(Fw[e]=!0,!1)}function mM(e,t,n,a){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gM(e,t,n,a){if(t===null||typeof t>"u"||mM(e,t,n,a))return!0;if(a)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fo(e,t,n,a,p,f,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=p,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=o}var Vi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vi[e]=new fo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vi[t]=new fo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vi[e]=new fo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vi[e]=new fo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vi[e]=new fo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vi[e]=new fo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vi[e]=new fo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vi[e]=new fo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vi[e]=new fo(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rx=/[\-:]([a-z])/g;function Dx(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rx,Dx);Vi[t]=new fo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rx,Dx);Vi[t]=new fo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rx,Dx);Vi[t]=new fo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vi[e]=new fo(e,1,!1,e.toLowerCase(),null,!1,!1)});Vi.xlinkHref=new fo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vi[e]=new fo(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bx(e,t,n,a){var p=Vi.hasOwnProperty(t)?Vi[t]:null;(p!==null?p.type!==0:a||!(2v||p[o]!==f[v]){var x=` +`+p[o].replace(" at new "," at ");return e.displayName&&x.includes("")&&(x=x.replace("",e.displayName)),x}while(1<=o&&0<=v);break}}}finally{A0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?dh(e):""}function yM(e){switch(e.tag){case 5:return dh(e.type);case 16:return dh("Lazy");case 13:return dh("Suspense");case 19:return dh("SuspenseList");case 0:case 2:case 15:return e=S0(e.type,!1),e;case 11:return e=S0(e.type.render,!1),e;case 1:return e=S0(e.type,!0),e;default:return""}}function w_(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case cp:return"Fragment";case up:return"Portal";case __:return"Profiler";case Ox:return"StrictMode";case x_:return"Suspense";case b_:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case QS:return(e.displayName||"Context")+".Consumer";case XS:return(e._context.displayName||"Context")+".Provider";case Nx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fx:return t=e.displayName||null,t!==null?t:w_(e.type)||"Memo";case Pl:t=e._payload,e=e._init;try{return w_(e(t))}catch{}}return null}function vM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w_(t);case 8:return t===Ox?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function JS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _M(e){var t=JS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var p=n.get,f=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return p.call(this)},set:function(o){a=""+o,f.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mm(e){e._valueTracker||(e._valueTracker=_M(e))}function eE(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=JS(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Eg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function A_(e,t){var n=t.checked;return Un({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vw(e,t){var n=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;n=Wl(t.value!=null?t.value:n),e._wrapperState={initialChecked:a,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tE(e,t){t=t.checked,t!=null&&Bx(e,"checked",t,!1)}function S_(e,t){tE(e,t);var n=Wl(t.value),a=t.type;if(n!=null)a==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?E_(e,t.type,n):t.hasOwnProperty("defaultValue")&&E_(e,t.type,Wl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $w(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function E_(e,t,n){(t!=="number"||Eg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hh=Array.isArray;function wp(e,t,n,a){if(e=e.options,t){t={};for(var p=0;p"+t.valueOf().toString()+"",t=zm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oh(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xM=["Webkit","ms","Moz","O"];Object.keys(bh).forEach(function(e){xM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bh[t]=bh[e]})});function oE(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bh.hasOwnProperty(e)&&bh[e]?(""+t).trim():t+"px"}function aE(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var a=n.indexOf("--")===0,p=oE(n,t[n],a);n==="float"&&(n="cssFloat"),a?e.setProperty(n,p):e[n]=p}}var bM=Un({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function I_(e,t){if(t){if(bM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ut(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ut(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ut(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ut(62))}}function T_(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var P_=null;function jx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var M_=null,Ap=null,Sp=null;function Gw(e){if(e=cf(e)){if(typeof M_!="function")throw Error(ut(280));var t=e.stateNode;t&&(t=Ay(t),M_(e.stateNode,e.type,t))}}function sE(e){Ap?Sp?Sp.push(e):Sp=[e]:Ap=e}function lE(){if(Ap){var e=Ap,t=Sp;if(Sp=Ap=null,Gw(e),t)for(e=0;e>>=0,e===0?32:31-(zM(e)/LM|0)|0}var Lm=64,Rm=4194304;function fh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Tg(e,t){var n=e.pendingLanes;if(n===0)return 0;var a=0,p=e.suspendedLanes,f=e.pingedLanes,o=n&268435455;if(o!==0){var v=o&~p;v!==0?a=fh(v):(f&=o,f!==0&&(a=fh(f)))}else o=n&~p,o!==0?a=fh(o):f!==0&&(a=fh(f));if(a===0)return 0;if(t!==0&&t!==a&&!(t&p)&&(p=a&-a,f=t&-t,p>=f||p===16&&(f&4194240)!==0))return t;if(a&4&&(a|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0n;n++)t.push(e);return t}function lf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ra(t),e[t]=n}function OM(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0=Ah),t2=String.fromCharCode(32),r2=!1;function IE(e,t){switch(e){case"keyup":return pz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TE(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pp=!1;function hz(e,t){switch(e){case"compositionend":return TE(t);case"keypress":return t.which!==32?null:(r2=!0,t2);case"textInput":return e=t.data,e===t2&&r2?null:e;default:return null}}function fz(e,t){if(pp)return e==="compositionend"||!Zx&&IE(e,t)?(e=CE(),sg=Wx=Rl=null,pp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=a2(n)}}function LE(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?LE(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function RE(){for(var e=window,t=Eg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Eg(e.document)}return t}function Kx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Az(e){var t=RE(),n=e.focusedElem,a=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&LE(n.ownerDocument.documentElement,n)){if(a!==null&&Kx(n)){if(t=a.start,e=a.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var p=n.textContent.length,f=Math.min(a.start,p);a=a.end===void 0?f:Math.min(a.end,p),!e.extend&&f>a&&(p=a,a=f,f=p),p=s2(n,f);var o=s2(n,a);p&&o&&(e.rangeCount!==1||e.anchorNode!==p.node||e.anchorOffset!==p.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(p.node,p.offset),e.removeAllRanges(),f>a?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,dp=null,O_=null,Eh=null,N_=!1;function l2(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;N_||dp==null||dp!==Eg(a)||(a=dp,"selectionStart"in a&&Kx(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Eh&&$h(Eh,a)||(Eh=a,a=zg(O_,"onSelect"),0mp||(e.current=q_[mp],q_[mp]=null,mp--)}function vn(e,t){mp++,q_[mp]=e.current,e.current=t}var Gl={},ro=Yl(Gl),Io=Yl(!1),Hu=Gl;function Rp(e,t){var n=e.type.contextTypes;if(!n)return Gl;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var p={},f;for(f in n)p[f]=t[f];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=p),p}function To(e){return e=e.childContextTypes,e!=null}function Rg(){kn(Io),kn(ro)}function m2(e,t,n){if(ro.current!==Gl)throw Error(ut(168));vn(ro,t),vn(Io,n)}function $E(e,t,n){var a=e.stateNode;if(t=t.childContextTypes,typeof a.getChildContext!="function")return n;a=a.getChildContext();for(var p in a)if(!(p in t))throw Error(ut(108,vM(e)||"Unknown",p));return Un({},n,a)}function Dg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gl,Hu=ro.current,vn(ro,e),vn(Io,Io.current),!0}function g2(e,t,n){var a=e.stateNode;if(!a)throw Error(ut(169));n?(e=$E(e,t,Hu),a.__reactInternalMemoizedMergedChildContext=e,kn(Io),kn(ro),vn(ro,e)):kn(Io),vn(Io,n)}var Xs=null,Sy=!1,N0=!1;function qE(e){Xs===null?Xs=[e]:Xs.push(e)}function Dz(e){Sy=!0,qE(e)}function Jl(){if(!N0&&Xs!==null){N0=!0;var e=0,t=nn;try{var n=Xs;for(nn=1;e>=o,p-=o,Ys=1<<32-Ra(t)+p|n<fe?(Ce=ue,ue=null):Ce=ue.sibling;var he=I($,ue,L[fe],O);if(he===null){ue===null&&(ue=Ce);break}e&&ue&&he.alternate===null&&t($,ue),F=f(he,F,fe),ne===null?Y=he:ne.sibling=he,ne=he,ue=Ce}if(fe===L.length)return n($,ue),Rn&&Ru($,fe),Y;if(ue===null){for(;fefe?(Ce=ue,ue=null):Ce=ue.sibling;var we=I($,ue,he.value,O);if(we===null){ue===null&&(ue=Ce);break}e&&ue&&we.alternate===null&&t($,ue),F=f(we,F,fe),ne===null?Y=we:ne.sibling=we,ne=we,ue=Ce}if(he.done)return n($,ue),Rn&&Ru($,fe),Y;if(ue===null){for(;!he.done;fe++,he=L.next())he=P($,he.value,O),he!==null&&(F=f(he,F,fe),ne===null?Y=he:ne.sibling=he,ne=he);return Rn&&Ru($,fe),Y}for(ue=a($,ue);!he.done;fe++,he=L.next())he=q(ue,$,fe,he.value,O),he!==null&&(e&&he.alternate!==null&&ue.delete(he.key===null?fe:he.key),F=f(he,F,fe),ne===null?Y=he:ne.sibling=he,ne=he);return e&&ue.forEach(function(ie){return t($,ie)}),Rn&&Ru($,fe),Y}function oe($,F,L,O){if(typeof L=="object"&&L!==null&&L.type===cp&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case Pm:e:{for(var Y=L.key,ne=F;ne!==null;){if(ne.key===Y){if(Y=L.type,Y===cp){if(ne.tag===7){n($,ne.sibling),F=p(ne,L.props.children),F.return=$,$=F;break e}}else if(ne.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Pl&&A2(Y)===ne.type){n($,ne.sibling),F=p(ne,L.props),F.ref=rh($,ne,L),F.return=$,$=F;break e}n($,ne);break}else t($,ne);ne=ne.sibling}L.type===cp?(F=Wu(L.props.children,$.mode,O,L.key),F.return=$,$=F):(O=mg(L.type,L.key,L.props,null,$.mode,O),O.ref=rh($,F,L),O.return=$,$=O)}return o($);case up:e:{for(ne=L.key;F!==null;){if(F.key===ne)if(F.tag===4&&F.stateNode.containerInfo===L.containerInfo&&F.stateNode.implementation===L.implementation){n($,F.sibling),F=p(F,L.children||[]),F.return=$,$=F;break e}else{n($,F);break}else t($,F);F=F.sibling}F=G0(L,$.mode,O),F.return=$,$=F}return o($);case Pl:return ne=L._init,oe($,F,ne(L._payload),O)}if(hh(L))return V($,F,L,O);if(Qd(L))return H($,F,L,O);Um($,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,F!==null&&F.tag===6?(n($,F.sibling),F=p(F,L),F.return=$,$=F):(n($,F),F=W0(L,$.mode,O),F.return=$,$=F),o($)):n($,F)}return oe}var Bp=YE(!0),JE=YE(!1),pf={},ms=Yl(pf),Hh=Yl(pf),Zh=Yl(pf);function Uu(e){if(e===pf)throw Error(ut(174));return e}function i1(e,t){switch(vn(Zh,t),vn(Hh,e),vn(ms,pf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:k_(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=k_(t,e)}kn(ms),vn(ms,t)}function Op(){kn(ms),kn(Hh),kn(Zh)}function eC(e){Uu(Zh.current);var t=Uu(ms.current),n=k_(t,e.type);t!==n&&(vn(Hh,e),vn(ms,n))}function o1(e){Hh.current===e&&(kn(ms),kn(Hh))}var Fn=Yl(0);function Ug(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var F0=[];function a1(){for(var e=0;en?n:4,e(!0);var a=j0.transition;j0.transition={};try{e(!1),t()}finally{nn=n,j0.transition=a}}function gC(){return fa().memoizedState}function Fz(e,t,n){var a=Vl(e);if(n={lane:a,action:n,hasEagerState:!1,eagerState:null,next:null},yC(e))vC(t,n);else if(n=ZE(e,t,n,a),n!==null){var p=co();Da(n,e,a,p),_C(n,t,a)}}function jz(e,t,n){var a=Vl(e),p={lane:a,action:n,hasEagerState:!1,eagerState:null,next:null};if(yC(e))vC(t,p);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var o=t.lastRenderedState,v=f(o,n);if(p.hasEagerState=!0,p.eagerState=v,Ba(v,o)){var x=t.interleaved;x===null?(p.next=p,r1(t)):(p.next=x.next,x.next=p),t.interleaved=p;return}}catch{}finally{}n=ZE(e,t,p,a),n!==null&&(p=co(),Da(n,e,a,p),_C(n,t,a))}}function yC(e){var t=e.alternate;return e===jn||t!==null&&t===jn}function vC(e,t){Ch=Vg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _C(e,t,n){if(n&4194240){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Vx(e,n)}}var $g={readContext:ha,useCallback:Yi,useContext:Yi,useEffect:Yi,useImperativeHandle:Yi,useInsertionEffect:Yi,useLayoutEffect:Yi,useMemo:Yi,useReducer:Yi,useRef:Yi,useState:Yi,useDebugValue:Yi,useDeferredValue:Yi,useTransition:Yi,useMutableSource:Yi,useSyncExternalStore:Yi,useId:Yi,unstable_isNewReconciler:!1},Uz={readContext:ha,useCallback:function(e,t){return ls().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:E2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,pg(4194308,4,pC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pg(4194308,4,e,t)},useInsertionEffect:function(e,t){return pg(4,2,e,t)},useMemo:function(e,t){var n=ls();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var a=ls();return t=n!==void 0?n(t):t,a.memoizedState=a.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},a.queue=e,e=e.dispatch=Fz.bind(null,jn,e),[a.memoizedState,e]},useRef:function(e){var t=ls();return e={current:e},t.memoizedState=e},useState:S2,useDebugValue:p1,useDeferredValue:function(e){return ls().memoizedState=e},useTransition:function(){var e=S2(!1),t=e[0];return e=Nz.bind(null,e[1]),ls().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var a=jn,p=ls();if(Rn){if(n===void 0)throw Error(ut(407));n=n()}else{if(n=t(),Pi===null)throw Error(ut(349));Ku&30||nC(a,t,n)}p.memoizedState=n;var f={value:n,getSnapshot:t};return p.queue=f,E2(oC.bind(null,a,f,e),[e]),a.flags|=2048,Qh(9,iC.bind(null,a,f,n,t),void 0,null),n},useId:function(){var e=ls(),t=Pi.identifierPrefix;if(Rn){var n=Js,a=Ys;n=(a&~(1<<32-Ra(a)-1)).toString(32)+n,t=":"+t+"R"+n,n=Kh++,0<\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=o.createElement(n,{is:a.is}):(e=o.createElement(n),n==="select"&&(o=e,a.multiple?o.multiple=!0:a.size&&(o.size=a.size))):e=o.createElementNS(e,n),e[ps]=t,e[Gh]=a,IC(e,t,!1,!1),t.stateNode=e;e:{switch(o=T_(n,a),n){case"dialog":Cn("cancel",e),Cn("close",e),p=a;break;case"iframe":case"object":case"embed":Cn("load",e),p=a;break;case"video":case"audio":for(p=0;pFp&&(t.flags|=128,a=!0,nh(f,!1),t.lanes=4194304)}else{if(!a)if(e=Ug(o),e!==null){if(t.flags|=128,a=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nh(f,!0),f.tail===null&&f.tailMode==="hidden"&&!o.alternate&&!Rn)return Ji(t),null}else 2*ni()-f.renderingStartTime>Fp&&n!==1073741824&&(t.flags|=128,a=!0,nh(f,!1),t.lanes=4194304);f.isBackwards?(o.sibling=t.child,t.child=o):(n=f.last,n!==null?n.sibling=o:t.child=o,f.last=o)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=ni(),t.sibling=null,n=Fn.current,vn(Fn,a?n&1|2:n&1),t):(Ji(t),null);case 22:case 23:return y1(),a=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(t.flags|=8192),a&&t.mode&1?Vo&1073741824&&(Ji(t),t.subtreeFlags&6&&(t.flags|=8192)):Ji(t),null;case 24:return null;case 25:return null}throw Error(ut(156,t.tag))}function Kz(e,t){switch(Qx(t),t.tag){case 1:return To(t.type)&&Rg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Op(),kn(Io),kn(ro),a1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return o1(t),null;case 13:if(kn(Fn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ut(340));Dp()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kn(Fn),null;case 4:return Op(),null;case 10:return t1(t.type._context),null;case 22:case 23:return y1(),null;case 24:return null;default:return null}}var $m=!1,to=!1,Xz=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function _p(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(a){Zn(e,t,a)}else n.current=null}function rx(e,t,n){try{n()}catch(a){Zn(e,t,a)}}var R2=!1;function Qz(e,t){if(F_=Pg,e=RE(),Kx(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var p=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{n.nodeType,f.nodeType}catch{n=null;break e}var o=0,v=-1,x=-1,S=0,k=0,P=e,I=null;t:for(;;){for(var q;P!==n||p!==0&&P.nodeType!==3||(v=o+p),P!==f||a!==0&&P.nodeType!==3||(x=o+a),P.nodeType===3&&(o+=P.nodeValue.length),(q=P.firstChild)!==null;)I=P,P=q;for(;;){if(P===e)break t;if(I===n&&++S===p&&(v=o),I===f&&++k===a&&(x=o),(q=P.nextSibling)!==null)break;P=I,I=P.parentNode}P=q}n=v===-1||x===-1?null:{start:v,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(j_={focusedElem:e,selectionRange:n},Pg=!1,Pt=t;Pt!==null;)if(t=Pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Pt=e;else for(;Pt!==null;){t=Pt;try{var V=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(V!==null){var H=V.memoizedProps,oe=V.memoizedState,$=t.stateNode,F=$.getSnapshotBeforeUpdate(t.elementType===t.type?H:ka(t.type,H),oe);$.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ut(163))}}catch(O){Zn(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,Pt=e;break}Pt=t.return}return V=R2,R2=!1,V}function kh(e,t,n){var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var p=a=a.next;do{if((p.tag&e)===e){var f=p.destroy;p.destroy=void 0,f!==void 0&&rx(t,n,f)}p=p.next}while(p!==a)}}function ky(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var a=n.create;n.destroy=a()}n=n.next}while(n!==t)}}function nx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function MC(e){var t=e.alternate;t!==null&&(e.alternate=null,MC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ps],delete t[Gh],delete t[$_],delete t[Lz],delete t[Rz])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zC(e){return e.tag===5||e.tag===3||e.tag===4}function D2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zC(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ix(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lg));else if(a!==4&&(e=e.child,e!==null))for(ix(e,t,n),e=e.sibling;e!==null;)ix(e,t,n),e=e.sibling}function ox(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(ox(e,t,n),e=e.sibling;e!==null;)ox(e,t,n),e=e.sibling}var Fi=null,Ia=!1;function kl(e,t,n){for(n=n.child;n!==null;)LC(e,t,n),n=n.sibling}function LC(e,t,n){if(fs&&typeof fs.onCommitFiberUnmount=="function")try{fs.onCommitFiberUnmount(_y,n)}catch{}switch(n.tag){case 5:to||_p(n,t);case 6:var a=Fi,p=Ia;Fi=null,kl(e,t,n),Fi=a,Ia=p,Fi!==null&&(Ia?(e=Fi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fi.removeChild(n.stateNode));break;case 18:Fi!==null&&(Ia?(e=Fi,n=n.stateNode,e.nodeType===8?O0(e.parentNode,n):e.nodeType===1&&O0(e,n),Uh(e)):O0(Fi,n.stateNode));break;case 4:a=Fi,p=Ia,Fi=n.stateNode.containerInfo,Ia=!0,kl(e,t,n),Fi=a,Ia=p;break;case 0:case 11:case 14:case 15:if(!to&&(a=n.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){p=a=a.next;do{var f=p,o=f.destroy;f=f.tag,o!==void 0&&(f&2||f&4)&&rx(n,t,o),p=p.next}while(p!==a)}kl(e,t,n);break;case 1:if(!to&&(_p(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=n.memoizedProps,a.state=n.memoizedState,a.componentWillUnmount()}catch(v){Zn(n,t,v)}kl(e,t,n);break;case 21:kl(e,t,n);break;case 22:n.mode&1?(to=(a=to)||n.memoizedState!==null,kl(e,t,n),to=a):kl(e,t,n);break;default:kl(e,t,n)}}function B2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Xz),t.forEach(function(a){var p=a3.bind(null,e,a);n.has(a)||(n.add(a),a.then(p,p))})}}function Ca(e,t){var n=t.deletions;if(n!==null)for(var a=0;ap&&(p=o),a&=~f}if(a=p,a=ni()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Jz(a/1960))-a,10e?16:e,Dl===null)var a=!1;else{if(e=Dl,Dl=null,Gg=0,$r&6)throw Error(ut(331));var p=$r;for($r|=4,Pt=e.current;Pt!==null;){var f=Pt,o=f.child;if(Pt.flags&16){var v=f.deletions;if(v!==null){for(var x=0;xni()-m1?qu(e,0):f1|=n),Po(e,t)}function UC(e,t){t===0&&(e.mode&1?(t=Rm,Rm<<=1,!(Rm&130023424)&&(Rm=4194304)):t=1);var n=co();e=nl(e,t),e!==null&&(lf(e,t,n),Po(e,n))}function o3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),UC(e,n)}function a3(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,p=e.memoizedState;p!==null&&(n=p.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(ut(314))}a!==null&&a.delete(t),UC(e,n)}var VC;VC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Io.current)Co=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Co=!1,Hz(e,t,n);Co=!!(e.flags&131072)}else Co=!1,Rn&&t.flags&1048576&&WE(t,Og,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;dg(e,t),e=t.pendingProps;var p=Rp(t,ro.current);Cp(t,n),p=l1(null,t,a,e,p,n);var f=u1();return t.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,To(a)?(f=!0,Dg(t)):f=!1,t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,n1(t),p.updater=Ey,t.stateNode=p,p._reactInternals=t,K_(t,a,e,n),t=Y_(null,t,a,!0,f,n)):(t.tag=0,Rn&&f&&Xx(t),uo(null,t,p,n),t=t.child),t;case 16:a=t.elementType;e:{switch(dg(e,t),e=t.pendingProps,p=a._init,a=p(a._payload),t.type=a,p=t.tag=l3(a),e=ka(a,e),p){case 0:t=Q_(null,t,a,e,n);break e;case 1:t=M2(null,t,a,e,n);break e;case 11:t=T2(null,t,a,e,n);break e;case 14:t=P2(null,t,a,ka(a.type,e),n);break e}throw Error(ut(306,a,""))}return t;case 0:return a=t.type,p=t.pendingProps,p=t.elementType===a?p:ka(a,p),Q_(e,t,a,p,n);case 1:return a=t.type,p=t.pendingProps,p=t.elementType===a?p:ka(a,p),M2(e,t,a,p,n);case 3:e:{if(EC(t),e===null)throw Error(ut(387));a=t.pendingProps,f=t.memoizedState,p=f.element,KE(e,t),jg(t,a,null,n);var o=t.memoizedState;if(a=o.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){p=Np(Error(ut(423)),t),t=z2(e,t,a,n,p);break e}else if(a!==p){p=Np(Error(ut(424)),t),t=z2(e,t,a,n,p);break e}else for(qo=Fl(t.stateNode.containerInfo.firstChild),Wo=t,Rn=!0,Ta=null,n=JE(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Dp(),a===p){t=il(e,t,n);break e}uo(e,t,a,n)}t=t.child}return t;case 5:return eC(t),e===null&&G_(t),a=t.type,p=t.pendingProps,f=e!==null?e.memoizedProps:null,o=p.children,U_(a,p)?o=null:f!==null&&U_(a,f)&&(t.flags|=32),SC(e,t),uo(e,t,o,n),t.child;case 6:return e===null&&G_(t),null;case 13:return CC(e,t,n);case 4:return i1(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Bp(t,null,a,n):uo(e,t,a,n),t.child;case 11:return a=t.type,p=t.pendingProps,p=t.elementType===a?p:ka(a,p),T2(e,t,a,p,n);case 7:return uo(e,t,t.pendingProps,n),t.child;case 8:return uo(e,t,t.pendingProps.children,n),t.child;case 12:return uo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(a=t.type._context,p=t.pendingProps,f=t.memoizedProps,o=p.value,vn(Ng,a._currentValue),a._currentValue=o,f!==null)if(Ba(f.value,o)){if(f.children===p.children&&!Io.current){t=il(e,t,n);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var v=f.dependencies;if(v!==null){o=f.child;for(var x=v.firstContext;x!==null;){if(x.context===a){if(f.tag===1){x=el(-1,n&-n),x.tag=2;var S=f.updateQueue;if(S!==null){S=S.shared;var k=S.pending;k===null?x.next=x:(x.next=k.next,k.next=x),S.pending=x}}f.lanes|=n,x=f.alternate,x!==null&&(x.lanes|=n),H_(f.return,n,t),v.lanes|=n;break}x=x.next}}else if(f.tag===10)o=f.type===t.type?null:f.child;else if(f.tag===18){if(o=f.return,o===null)throw Error(ut(341));o.lanes|=n,v=o.alternate,v!==null&&(v.lanes|=n),H_(o,n,t),o=f.sibling}else o=f.child;if(o!==null)o.return=f;else for(o=f;o!==null;){if(o===t){o=null;break}if(f=o.sibling,f!==null){f.return=o.return,o=f;break}o=o.return}f=o}uo(e,t,p.children,n),t=t.child}return t;case 9:return p=t.type,a=t.pendingProps.children,Cp(t,n),p=ha(p),a=a(p),t.flags|=1,uo(e,t,a,n),t.child;case 14:return a=t.type,p=ka(a,t.pendingProps),p=ka(a.type,p),P2(e,t,a,p,n);case 15:return wC(e,t,t.type,t.pendingProps,n);case 17:return a=t.type,p=t.pendingProps,p=t.elementType===a?p:ka(a,p),dg(e,t),t.tag=1,To(a)?(e=!0,Dg(t)):e=!1,Cp(t,n),QE(t,a,p),K_(t,a,p,n),Y_(null,t,a,!0,e,n);case 19:return kC(e,t,n);case 22:return AC(e,t,n)}throw Error(ut(156,t.tag))};function $C(e,t){return mE(e,t)}function s3(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pa(e,t,n,a){return new s3(e,t,n,a)}function _1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l3(e){if(typeof e=="function")return _1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nx)return 11;if(e===Fx)return 14}return 2}function $l(e,t){var n=e.alternate;return n===null?(n=pa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function mg(e,t,n,a,p,f){var o=2;if(a=e,typeof e=="function")_1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case cp:return Wu(n.children,p,f,t);case Ox:o=8,p|=8;break;case __:return e=pa(12,n,t,p|2),e.elementType=__,e.lanes=f,e;case x_:return e=pa(13,n,t,p),e.elementType=x_,e.lanes=f,e;case b_:return e=pa(19,n,t,p),e.elementType=b_,e.lanes=f,e;case YS:return Ty(n,p,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case XS:o=10;break e;case QS:o=9;break e;case Nx:o=11;break e;case Fx:o=14;break e;case Pl:o=16,a=null;break e}throw Error(ut(130,e==null?e:typeof e,""))}return t=pa(o,n,t,p),t.elementType=e,t.type=a,t.lanes=f,t}function Wu(e,t,n,a){return e=pa(7,e,a,t),e.lanes=n,e}function Ty(e,t,n,a){return e=pa(22,e,a,t),e.elementType=YS,e.lanes=n,e.stateNode={isHidden:!1},e}function W0(e,t,n){return e=pa(6,e,null,t),e.lanes=n,e}function G0(e,t,n){return t=pa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function u3(e,t,n,a,p){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=C0(0),this.expirationTimes=C0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=C0(0),this.identifierPrefix=a,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function x1(e,t,n,a,p,f,o,v,x){return e=new u3(e,t,n,v,x),t===1?(t=1,f===!0&&(t|=8)):t=0,f=pa(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:a,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},n1(f),e}function c3(e,t,n){var a=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HC)}catch(e){console.error(e)}}HC(),WS.exports=Ko;var S1=WS.exports;const gh=yy(S1);var ZC={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(za,function(){var n,a,p;function f(o,v){if(!n)n=v;else if(!a)a=v;else{var x="var sharedChunk = {}; ("+n+")(sharedChunk); ("+a+")(sharedChunk);",S={};n(S),p=v(S),typeof window<"u"&&(p.workerUrl=window.URL.createObjectURL(new Blob([x],{type:"text/javascript"})))}}return f(["exports"],function(o){function v(r,i){return r(i={exports:{}},i.exports),i.exports}var x=S;function S(r,i,s,d){this.cx=3*r,this.bx=3*(s-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(d-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=d,this.p2x=s,this.p2y=d}S.prototype.sampleCurveX=function(r){return((this.ax*r+this.bx)*r+this.cx)*r},S.prototype.sampleCurveY=function(r){return((this.ay*r+this.by)*r+this.cy)*r},S.prototype.sampleCurveDerivativeX=function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},S.prototype.solveCurveX=function(r,i){var s,d,m,g,_;for(i===void 0&&(i=1e-6),m=r,_=0;_<8;_++){if(g=this.sampleCurveX(m)-r,Math.abs(g)(d=1))return d;for(;sg?s=m:d=m,m=.5*(d-s)+s}return m},S.prototype.solve=function(r,i){return this.sampleCurveY(this.solveCurveX(r,i))};var k=P;function P(r,i){this.x=r,this.y=i}P.prototype={clone:function(){return new P(this.x,this.y)},add:function(r){return this.clone()._add(r)},sub:function(r){return this.clone()._sub(r)},multByPoint:function(r){return this.clone()._multByPoint(r)},divByPoint:function(r){return this.clone()._divByPoint(r)},mult:function(r){return this.clone()._mult(r)},div:function(r){return this.clone()._div(r)},rotate:function(r){return this.clone()._rotate(r)},rotateAround:function(r,i){return this.clone()._rotateAround(r,i)},matMult:function(r){return this.clone()._matMult(r)},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(r){return this.x===r.x&&this.y===r.y},dist:function(r){return Math.sqrt(this.distSqr(r))},distSqr:function(r){var i=r.x-this.x,s=r.y-this.y;return i*i+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith:function(r){return this.angleWithSep(r.x,r.y)},angleWithSep:function(r,i){return Math.atan2(this.x*i-this.y*r,this.x*r+this.y*i)},_matMult:function(r){var i=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=i,this},_add:function(r){return this.x+=r.x,this.y+=r.y,this},_sub:function(r){return this.x-=r.x,this.y-=r.y,this},_mult:function(r){return this.x*=r,this.y*=r,this},_div:function(r){return this.x/=r,this.y/=r,this},_multByPoint:function(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint:function(r){return this.x/=r.x,this.y/=r.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var r=this.y;return this.y=this.x,this.x=-r,this},_rotate:function(r){var i=Math.cos(r),s=Math.sin(r),d=s*this.x+i*this.y;return this.x=i*this.x-s*this.y,this.y=d,this},_rotateAround:function(r,i){var s=Math.cos(r),d=Math.sin(r),m=i.y+d*(this.x-i.x)+s*(this.y-i.y);return this.x=i.x+s*(this.x-i.x)-d*(this.y-i.y),this.y=m,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},P.convert=function(r){return r instanceof P?r:Array.isArray(r)?new P(r[0],r[1]):r};var I=typeof self<"u"?self:{},q=Math.pow(2,53)-1;function V(r,i,s,d){var m=new x(r,i,s,d);return function(g){return m.solve(g)}}var H=V(.25,.1,.25,1);function oe(r,i,s){return Math.min(s,Math.max(i,r))}function $(r,i,s){var d=s-i,m=((r-i)%d+d)%d+i;return m===i?s:m}function F(r){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];for(var d=0,m=i;d>i/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,r)}()}function ne(r){return!!r&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(r)}function ue(r,i){r.forEach(function(s){i[s]&&(i[s]=i[s].bind(i))})}function fe(r,i){return r.indexOf(i,r.length-i.length)!==-1}function Ce(r,i,s){var d={};for(var m in r)d[m]=i.call(s||this,r[m],m,r);return d}function he(r,i,s){var d={};for(var m in r)i.call(s||this,r[m],m,r)&&(d[m]=r[m]);return d}function we(r){return Array.isArray(r)?r.map(we):typeof r=="object"&&r?Ce(r,we):r}var ie={};function me(r){ie[r]||(typeof console<"u"&&console.warn(r),ie[r]=!0)}function Ne(r,i,s){return(s.y-r.y)*(i.x-r.x)>(i.y-r.y)*(s.x-r.x)}function $e(r){for(var i=0,s=0,d=r.length,m=d-1,g=void 0,_=void 0;s@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(d,m,g,_){var A=g||_;return i[m]=!A||A.toLowerCase(),""}),i["max-age"]){var s=parseInt(i["max-age"],10);isNaN(s)?delete i["max-age"]:i["max-age"]=s}return i}var ze=null;function He(r){if(ze==null){var i=r.navigator?r.navigator.userAgent:null;ze=!!r.safari||!(!i||!(/\b(iPad|iPhone|iPod)\b/.test(i)||i.match("Safari")&&!i.match("Chrome")))}return ze}function rt(r){try{var i=I[r];return i.setItem("_mapbox_test_",1),i.removeItem("_mapbox_test_"),!0}catch{return!1}}var qe,nt,ct,Le,vt=I.performance&&I.performance.now?I.performance.now.bind(I.performance):Date.now.bind(Date),$t=I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame,Je=I.cancelAnimationFrame||I.mozCancelAnimationFrame||I.webkitCancelAnimationFrame||I.msCancelAnimationFrame,xr={now:vt,frame:function(r){var i=$t(r);return{cancel:function(){return Je(i)}}},getImageData:function(r,i){i===void 0&&(i=0);var s=I.document.createElement("canvas"),d=s.getContext("2d");if(!d)throw new Error("failed to create canvas 2d context");return s.width=r.width,s.height=r.height,d.drawImage(r,0,0,r.width,r.height),d.getImageData(-i,-i,r.width+2*i,r.height+2*i)},resolveURL:function(r){return qe||(qe=I.document.createElement("a")),qe.href=r,qe.href},hardwareConcurrency:I.navigator&&I.navigator.hardwareConcurrency||4,get devicePixelRatio(){return I.devicePixelRatio},get prefersReducedMotion(){return!!I.matchMedia&&(nt==null&&(nt=I.matchMedia("(prefers-reduced-motion: reduce)")),nt.matches)}},Ct={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},Ht={supported:!1,testSupport:function(r){!er&&Le&&(qt?lt(r):ct=r)}},er=!1,qt=!1;function lt(r){var i=r.createTexture();r.bindTexture(r.TEXTURE_2D,i);try{if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,Le),r.isContextLost())return;Ht.supported=!0}catch{}r.deleteTexture(i),er=!0}I.document&&((Le=I.document.createElement("img")).onload=function(){ct&<(ct),ct=null,qt=!0},Le.onerror=function(){er=!0,ct=null},Le.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Ot="01",tr=function(r,i){this._transformRequestFn=r,this._customAccessToken=i,this._createSkuToken()};function yr(r){return r.indexOf("mapbox:")===0}tr.prototype._createSkuToken=function(){var r=function(){for(var i="",s=0;s<10;s++)i+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Ot,i].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=r.token,this._skuTokenExpiresAt=r.tokenExpiresAt},tr.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},tr.prototype.transformRequest=function(r,i){return this._transformRequestFn&&this._transformRequestFn(r,i)||{url:r}},tr.prototype.normalizeStyleURL=function(r,i){if(!yr(r))return r;var s=sr(r);return s.path="/styles/v1"+s.path,this._makeAPIURL(s,this._customAccessToken||i)},tr.prototype.normalizeGlyphsURL=function(r,i){if(!yr(r))return r;var s=sr(r);return s.path="/fonts/v1"+s.path,this._makeAPIURL(s,this._customAccessToken||i)},tr.prototype.normalizeSourceURL=function(r,i){if(!yr(r))return r;var s=sr(r);return s.path="/v4/"+s.authority+".json",s.params.push("secure"),this._makeAPIURL(s,this._customAccessToken||i)},tr.prototype.normalizeSpriteURL=function(r,i,s,d){var m=sr(r);return yr(r)?(m.path="/styles/v1"+m.path+"/sprite"+i+s,this._makeAPIURL(m,this._customAccessToken||d)):(m.path+=""+i+s,pr(m))},tr.prototype.normalizeTileURL=function(r,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),r&&!yr(r))return r;var s=sr(r);s.path=s.path.replace(/(\.(png|jpg)\d*)(?=$)/,(xr.devicePixelRatio>=2||i===512?"@2x":"")+(Ht.supported?".webp":"$1")),s.path=s.path.replace(/^.+\/v4\//,"/"),s.path="/v4"+s.path;var d=this._customAccessToken||function(m){for(var g=0,_=m;g<_.length;g+=1){var A=_[g].match(/^access_token=(.*)$/);if(A)return A[1]}return null}(s.params)||Ct.ACCESS_TOKEN;return Ct.REQUIRE_ACCESS_TOKEN&&d&&this._skuToken&&s.params.push("sku="+this._skuToken),this._makeAPIURL(s,d)},tr.prototype.canonicalizeTileURL=function(r,i){var s=sr(r);if(!s.path.match(/(^\/v4\/)/)||!s.path.match(/\.[\w]+$/))return r;var d="mapbox://tiles/";d+=s.path.replace("/v4/","");var m=s.params;return i&&(m=m.filter(function(g){return!g.match(/^access_token=/)})),m.length&&(d+="?"+m.join("&")),d},tr.prototype.canonicalizeTileset=function(r,i){for(var s=!!i&&yr(i),d=[],m=0,g=r.tiles||[];m=0&&r.params.splice(m,1)}if(d.path!=="/"&&(r.path=""+d.path+r.path),!Ct.REQUIRE_ACCESS_TOKEN)return pr(r);if(!(i=i||Ct.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+s);if(i[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+s);return r.params=r.params.filter(function(g){return g.indexOf("access_token")===-1}),r.params.push("access_token="+i),pr(r)};var Pr=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Qt(r){return Pr.test(r)}var Rr=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function sr(r){var i=r.match(Rr);if(!i)throw new Error("Unable to parse URL object");return{protocol:i[1],authority:i[2],path:i[3]||"/",params:i[4]?i[4].split("&"):[]}}function pr(r){var i=r.params.length?"?"+r.params.join("&"):"";return r.protocol+"://"+r.authority+r.path+i}function In(r){if(!r)return null;var i=r.split(".");if(!i||i.length!==3)return null;try{return JSON.parse(decodeURIComponent(I.atob(i[1]).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var Dr=function(r){this.type=r,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Dr.prototype.getStorageKey=function(r){var i,s=In(Ct.ACCESS_TOKEN);return i=s&&s.u?I.btoa(encodeURIComponent(s.u).replace(/%([0-9A-F]{2})/g,function(d,m){return String.fromCharCode(+("0x"+m))})):Ct.ACCESS_TOKEN||"",r?"mapbox.eventData."+r+":"+i:"mapbox.eventData:"+i},Dr.prototype.fetchEventData=function(){var r=rt("localStorage"),i=this.getStorageKey(),s=this.getStorageKey("uuid");if(r)try{var d=I.localStorage.getItem(i);d&&(this.eventData=JSON.parse(d));var m=I.localStorage.getItem(s);m&&(this.anonId=m)}catch{me("Unable to read from LocalStorage")}},Dr.prototype.saveEventData=function(){var r=rt("localStorage"),i=this.getStorageKey(),s=this.getStorageKey("uuid");if(r)try{I.localStorage.setItem(s,this.anonId),Object.keys(this.eventData).length>=1&&I.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{me("Unable to write to LocalStorage")}},Dr.prototype.processRequests=function(r){},Dr.prototype.postEvent=function(r,i,s,d){var m=this;if(Ct.EVENTS_URL){var g=sr(Ct.EVENTS_URL);g.params.push("access_token="+(d||Ct.ACCESS_TOKEN||""));var _={event:this.type,created:new Date(r).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:Ot,userId:this.anonId},A=i?F(_,i):_,C={url:pr(g),headers:{"Content-Type":"text/plain"},body:JSON.stringify([A])};this.pendingRequest=dn(C,function(T){m.pendingRequest=null,s(T),m.saveEventData(),m.processRequests(d)})}},Dr.prototype.queueRequest=function(r,i){this.queue.push(r),this.processRequests(i)};var Yt,un,Xr=function(r){function i(){r.call(this,"map.load"),this.success={},this.skuToken=""}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.postMapLoadEvent=function(s,d,m,g){this.skuToken=m;var _=!(!g&&!Ct.ACCESS_TOKEN),A=Array.isArray(s)&&s.some(function(C){return yr(C)||Qt(C)});Ct.EVENTS_URL&&_&&A&&this.queueRequest({id:d,timestamp:Date.now()},g)},i.prototype.processRequests=function(s){var d=this;if(!this.pendingRequest&&this.queue.length!==0){var m=this.queue.shift(),g=m.id,_=m.timestamp;g&&this.success[g]||(this.anonId||this.fetchEventData(),ne(this.anonId)||(this.anonId=Y()),this.postEvent(_,{skuToken:this.skuToken},function(A){A||g&&(d.success[g]=!0)},s))}},i}(Dr),cn=new(function(r){function i(s){r.call(this,"appUserTurnstile"),this._customAccessToken=s}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.postTurnstileEvent=function(s,d){Ct.EVENTS_URL&&Ct.ACCESS_TOKEN&&Array.isArray(s)&&s.some(function(m){return yr(m)||Qt(m)})&&this.queueRequest(Date.now(),d)},i.prototype.processRequests=function(s){var d=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var m=In(Ct.ACCESS_TOKEN),g=m?m.u:Ct.ACCESS_TOKEN,_=g!==this.eventData.tokenU;ne(this.anonId)||(this.anonId=Y(),_=!0);var A=this.queue.shift();if(this.eventData.lastSuccess){var C=new Date(this.eventData.lastSuccess),T=new Date(A),z=(A-this.eventData.lastSuccess)/864e5;_=_||z>=1||z<-1||C.getDate()!==T.getDate()}else _=!0;if(!_)return this.processRequests();this.postEvent(A,{"enabled.telemetry":!1},function(D){D||(d.eventData.lastSuccess=A,d.eventData.tokenU=g)},s)}},i}(Dr)),Cr=cn.postTurnstileEvent.bind(cn),Lt=new Xr,an=Lt.postMapLoadEvent.bind(Lt),Kn=500,$i=50;function Mt(){I.caches&&!Yt&&(Yt=I.caches.open("mapbox-tiles"))}function br(r){var i=r.indexOf("?");return i<0?r:r.slice(0,i)}var pt,Tt=1/0;function lr(){return pt==null&&(pt=I.OffscreenCanvas&&new I.OffscreenCanvas(1,1).getContext("2d")&&typeof I.createImageBitmap=="function"),pt}var fr={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(fr);var Qr=function(r){function i(s,d,m){d===401&&Qt(m)&&(s+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),r.call(this,s),this.status=d,this.url=m,this.name=this.constructor.name,this.message=s}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},i}(Error),pn=Se()?function(){return self.worker&&self.worker.referrer}:function(){return(I.location.protocol==="blob:"?I.parent:I).location.href},Tn,ai,fi=function(r,i){if(!(/^file:/.test(s=r.url)||/^file:/.test(pn())&&!/^\w+:/.test(s))){if(I.fetch&&I.Request&&I.AbortController&&I.Request.prototype.hasOwnProperty("signal"))return function(d,m){var g,_=new I.AbortController,A=new I.Request(d.url,{method:d.method||"GET",body:d.body,credentials:d.credentials,headers:d.headers,referrer:pn(),signal:_.signal}),C=!1,T=!1,z=(g=A.url).indexOf("sku=")>0&&Qt(g);d.type==="json"&&A.headers.set("Accept","application/json");var D=function(Z,se,ce){if(!T){if(Z&&Z.message!=="SecurityError"&&me(Z),se&&ce)return U(se);var be=Date.now();I.fetch(A).then(function(ye){if(ye.ok){var ke=z?ye.clone():null;return U(ye,ke,be)}return m(new Qr(ye.statusText,ye.status,d.url))}).catch(function(ye){ye.code!==20&&m(new Error(ye.message))})}},U=function(Z,se,ce){(d.type==="arrayBuffer"?Z.arrayBuffer():d.type==="json"?Z.json():Z.text()).then(function(be){T||(se&&ce&&function(ye,ke,Pe){if(Mt(),Yt){var Re={status:ke.status,statusText:ke.statusText,headers:new I.Headers};ke.headers.forEach(function(We,Ye){return Re.headers.set(Ye,We)});var Oe=Te(ke.headers.get("Cache-Control")||"");Oe["no-store"]||(Oe["max-age"]&&Re.headers.set("Expires",new Date(Pe+1e3*Oe["max-age"]).toUTCString()),new Date(Re.headers.get("Expires")).getTime()-Pe<42e4||function(We,Ye){if(un===void 0)try{new Response(new ReadableStream),un=!0}catch{un=!1}un?Ye(We.body):We.blob().then(Ye)}(ke,function(We){var Ye=new I.Response(We,Re);Mt(),Yt&&Yt.then(function(at){return at.put(br(ye.url),Ye)}).catch(function(at){return me(at.message)})}))}}(A,se,ce),C=!0,m(null,be,Z.headers.get("Cache-Control"),Z.headers.get("Expires")))}).catch(function(be){T||m(new Error(be.message))})};return z?function(Z,se){if(Mt(),!Yt)return se(null);var ce=br(Z.url);Yt.then(function(be){be.match(ce).then(function(ye){var ke=function(Pe){if(!Pe)return!1;var Re=new Date(Pe.headers.get("Expires")||0),Oe=Te(Pe.headers.get("Cache-Control")||"");return Re>Date.now()&&!Oe["no-cache"]}(ye);be.delete(ce),ke&&be.put(ce,ye.clone()),se(null,ye,ke)}).catch(se)}).catch(se)}(A,D):D(null,null),{cancel:function(){T=!0,C||_.abort()}}}(r,i);if(Se()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",r,i,void 0,!0)}var s;return function(d,m){var g=new I.XMLHttpRequest;for(var _ in g.open(d.method||"GET",d.url,!0),d.type==="arrayBuffer"&&(g.responseType="arraybuffer"),d.headers)g.setRequestHeader(_,d.headers[_]);return d.type==="json"&&(g.responseType="text",g.setRequestHeader("Accept","application/json")),g.withCredentials=d.credentials==="include",g.onerror=function(){m(new Error(g.statusText))},g.onload=function(){if((g.status>=200&&g.status<300||g.status===0)&&g.response!==null){var A=g.response;if(d.type==="json")try{A=JSON.parse(g.response)}catch(C){return m(C)}m(null,A,g.getResponseHeader("Cache-Control"),g.getResponseHeader("Expires"))}else m(new Qr(g.statusText,g.status,d.url))},g.send(d.body),{cancel:function(){return g.abort()}}}(r,i)},Jo=function(r,i){return fi(F(r,{type:"arrayBuffer"}),i)},dn=function(r,i){return fi(F(r,{method:"POST"}),i)},B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Tn=[],ai=0;var j=function(r,i){if(Ht.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),ai>=Ct.MAX_PARALLEL_IMAGE_REQUESTS){var s={requestParameters:r,callback:i,cancelled:!1,cancel:function(){this.cancelled=!0}};return Tn.push(s),s}ai++;var d=!1,m=function(){if(!d)for(d=!0,ai--;Tn.length&&ai0||this._oneTimeListeners&&this._oneTimeListeners[r]&&this._oneTimeListeners[r].length>0||this._eventedParent&&this._eventedParent.listens(r)},ge.prototype.setEventedParent=function(r,i){return this._eventedParent=r,this._eventedParentData=i,this};var W={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{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"}},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"],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"}},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":{},within:{}}},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}},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"}}},re=function(r,i,s,d){this.message=(r?r+": ":"")+s,d&&(this.identifier=d),i!=null&&i.__line__&&(this.line=i.__line__)};function Ee(r){var i=r.value;return i?[new re(r.key,i,"constants have been deprecated as of v8")]:[]}function Ue(r){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];for(var d=0,m=i;d":r.itemType.kind==="value"?"array":"array<"+i+">"}return r.kind}var xi=[Qe,Be,Ke,Ze,ot,jr,Wt,wr(ht),nr];function kr(r,i){if(i.kind==="error")return null;if(r.kind==="array"){if(i.kind==="array"&&(i.N===0&&i.itemType.kind==="value"||!kr(r.itemType,i.itemType))&&(typeof r.N!="number"||r.N===i.N))return null}else{if(r.kind===i.kind)return null;if(r.kind==="value"){for(var s=0,d=xi;s255?255:A}function m(A){return d(A[A.length-1]==="%"?parseFloat(A)/100*255:parseInt(A))}function g(A){return(C=A[A.length-1]==="%"?parseFloat(A)/100:parseFloat(A))<0?0:C>1?1:C;var C}function _(A,C,T){return T<0?T+=1:T>1&&(T-=1),6*T<1?A+(C-A)*T*6:2*T<1?C:3*T<2?A+(C-A)*(2/3-T)*6:A}try{i.parseCSSColor=function(A){var C,T=A.replace(/ /g,"").toLowerCase();if(T in s)return s[T].slice();if(T[0]==="#")return T.length===4?(C=parseInt(T.substr(1),16))>=0&&C<=4095?[(3840&C)>>4|(3840&C)>>8,240&C|(240&C)>>4,15&C|(15&C)<<4,1]:null:T.length===7&&(C=parseInt(T.substr(1),16))>=0&&C<=16777215?[(16711680&C)>>16,(65280&C)>>8,255&C,1]:null;var z=T.indexOf("("),D=T.indexOf(")");if(z!==-1&&D+1===T.length){var U=T.substr(0,z),Z=T.substr(z+1,D-(z+1)).split(","),se=1;switch(U){case"rgba":if(Z.length!==4)return null;se=g(Z.pop());case"rgb":return Z.length!==3?null:[m(Z[0]),m(Z[1]),m(Z[2]),se];case"hsla":if(Z.length!==4)return null;se=g(Z.pop());case"hsl":if(Z.length!==3)return null;var ce=(parseFloat(Z[0])%360+360)%360/360,be=g(Z[1]),ye=g(Z[2]),ke=ye<=.5?ye*(be+1):ye+be-ye*be,Pe=2*ye-ke;return[d(255*_(Pe,ke,ce+1/3)),d(255*_(Pe,ke,ce)),d(255*_(Pe,ke,ce-1/3)),se];default:return null}}return null}}catch{}}).parseCSSColor,Ar=function(r,i,s,d){d===void 0&&(d=1),this.r=r,this.g=i,this.b=s,this.a=d};Ar.parse=function(r){if(r){if(r instanceof Ar)return r;if(typeof r=="string"){var i=ar(r);if(i)return new Ar(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3])}}},Ar.prototype.toString=function(){var r=this.toArray(),i=r[1],s=r[2],d=r[3];return"rgba("+Math.round(r[0])+","+Math.round(i)+","+Math.round(s)+","+d+")"},Ar.prototype.toArray=function(){var r=this.a;return r===0?[0,0,0,0]:[255*this.r/r,255*this.g/r,255*this.b/r,r]},Ar.black=new Ar(0,0,0,1),Ar.white=new Ar(1,1,1,1),Ar.transparent=new Ar(0,0,0,0),Ar.red=new Ar(1,0,0,1);var Li=function(r,i,s){this.sensitivity=r?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Li.prototype.compare=function(r,i){return this.collator.compare(r,i)},Li.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var eu=function(r,i,s,d,m){this.text=r,this.image=i,this.scale=s,this.fontStack=d,this.textColor=m},Xn=function(r){this.sections=r};Xn.fromString=function(r){return new Xn([new eu(r,null,null,null,null)])},Xn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(r){return r.text.length!==0||r.image&&r.image.name.length!==0})},Xn.factory=function(r){return r instanceof Xn?r:Xn.fromString(r)},Xn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(r){return r.text}).join("")},Xn.prototype.serialize=function(){for(var r=["format"],i=0,s=this.sections;i=0&&r<=255&&typeof i=="number"&&i>=0&&i<=255&&typeof s=="number"&&s>=0&&s<=255?d===void 0||typeof d=="number"&&d>=0&&d<=1?null:"Invalid rgba value ["+[r,i,s,d].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof d=="number"?[r,i,s,d]:[r,i,s]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function tu(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof Ar||r instanceof Li||r instanceof Xn||r instanceof Ri)return!0;if(Array.isArray(r)){for(var i=0,s=r;i2){var A=r[1];if(typeof A!="string"||!(A in mo)||A==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);g=mo[A],d++}else g=ht;if(r.length>3){if(r[2]!==null&&(typeof r[2]!="number"||r[2]<0||r[2]!==Math.floor(r[2])))return i.error('The length argument to "array" must be a positive integer literal',2);_=r[2],d++}s=wr(g,_)}else s=mo[m];for(var C=[];d1)&&i.push(d)}}return i.concat(this.args.map(function(m){return m.serialize()}))};var Ro=function(r){this.type=jr,this.sections=r};Ro.parse=function(r,i){if(r.length<2)return i.error("Expected at least one argument.");var s=r[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");for(var d=[],m=!1,g=1;g<=r.length-1;++g){var _=r[g];if(m&&typeof _=="object"&&!Array.isArray(_)){m=!1;var A=null;if(_["font-scale"]&&!(A=i.parse(_["font-scale"],1,Be)))return null;var C=null;if(_["text-font"]&&!(C=i.parse(_["text-font"],1,wr(Ke))))return null;var T=null;if(_["text-color"]&&!(T=i.parse(_["text-color"],1,ot)))return null;var z=d[d.length-1];z.scale=A,z.font=C,z.textColor=T}else{var D=i.parse(r[g],1,ht);if(!D)return null;var U=D.type.kind;if(U!=="string"&&U!=="value"&&U!=="null"&&U!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");m=!0,d.push({content:D,scale:null,font:null,textColor:null})}}return new Ro(d)},Ro.prototype.evaluate=function(r){return new Xn(this.sections.map(function(i){var s=i.content.evaluate(r);return bn(s)===nr?new eu("",s,null,null,null):new eu(ru(s),null,i.scale?i.scale.evaluate(r):null,i.font?i.font.evaluate(r).join(","):null,i.textColor?i.textColor.evaluate(r):null)}))},Ro.prototype.eachChild=function(r){for(var i=0,s=this.sections;i-1),s},io.prototype.eachChild=function(r){r(this.input)},io.prototype.outputDefined=function(){return!1},io.prototype.serialize=function(){return["image",this.input.serialize()]};var _f={"to-boolean":Ze,"to-color":ot,"to-number":Be,"to-string":Ke},go=function(r,i){this.type=r,this.args=i};go.parse=function(r,i){if(r.length<2)return i.error("Expected at least one argument.");var s=r[0];if((s==="to-boolean"||s==="to-string")&&r.length!==2)return i.error("Expected one argument.");for(var d=_f[s],m=[],g=1;g4?"Invalid rbga value "+JSON.stringify(i)+": expected an array containing either three or four numeric values.":td(i[0],i[1],i[2],i[3])))return new Ar(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Qn(s||"Could not parse color from value '"+(typeof i=="string"?i:String(JSON.stringify(i)))+"'")}if(this.type.kind==="number"){for(var _=null,A=0,C=this.args;A=i[2]||r[1]<=i[1]||r[3]>=i[3])}function Pv(r,i){var s=(180+r[0])/360,d=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,m=Math.pow(2,i.z);return[Math.round(s*m*8192),Math.round(d*m*8192)]}function Mv(r,i,s){return i[1]>r[1]!=s[1]>r[1]&&r[0]<(s[0]-i[0])*(r[1]-i[1])/(s[1]-i[1])+i[0]}function rd(r,i){for(var s,d,m,g,_,A,C,T=!1,z=0,D=i.length;z0&&A<0||_<0&&A>0}function Lv(r,i,s){for(var d=0,m=s;ds[2]){var m=.5*d,g=r[0]-s[0]>m?-d:s[0]-r[0]>m?d:0;g===0&&(g=r[0]-s[2]>m?-d:s[2]-r[0]>m?d:0),r[0]+=g}wi(i,r)}function Af(r,i,s,d){for(var m=8192*Math.pow(2,d.z),g=[8192*d.x,8192*d.y],_=[],A=0,C=r;A=0)return!1;var s=!0;return r.eachChild(function(d){s&&!As(d,i)&&(s=!1)}),s}yo.parse=function(r,i){if(r.length!==2)return i.error("'within' expression requires exactly one argument, but found "+(r.length-1)+" instead.");if(tu(r[1])){var s=r[1];if(s.type==="FeatureCollection")for(var d=0;di))throw new Qn("Input is not a number.");g=_-1}return 0}Ua.prototype.parse=function(r,i,s,d,m){return m===void 0&&(m={}),i?this.concat(i,s,d)._parse(r,m):this._parse(r,m)},Ua.prototype._parse=function(r,i){function s(T,z,D){return D==="assert"?new Yr(z,[T]):D==="coerce"?new go(z,[T]):T}if(r!==null&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"||(r=["literal",r]),Array.isArray(r)){if(r.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var d=r[0];if(typeof d!="string")return this.error("Expression name must be a string, but found "+typeof d+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var m=this.registry[d];if(m){var g=m.parse(r,this);if(!g)return null;if(this.expectedType){var _=this.expectedType,A=g.type;if(_.kind!=="string"&&_.kind!=="number"&&_.kind!=="boolean"&&_.kind!=="object"&&_.kind!=="array"||A.kind!=="value")if(_.kind!=="color"&&_.kind!=="formatted"&&_.kind!=="resolvedImage"||A.kind!=="value"&&A.kind!=="string"){if(this.checkSubtype(_,A))return null}else g=s(g,_,i.typeAnnotation||"coerce");else g=s(g,_,i.typeAnnotation||"assert")}if(!(g instanceof bi)&&g.type.kind!=="resolvedImage"&&function T(z){if(z instanceof ja)return T(z.boundExpression);if(z instanceof si&&z.name==="error"||z instanceof ea||z instanceof yo)return!1;var D=z instanceof go||z instanceof Yr,U=!0;return z.eachChild(function(Z){U=D?U&&T(Z):U&&Z instanceof bi}),!!U&&Na(z)&&As(z,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(g)){var C=new va;try{g=new bi(g.type,g.evaluate(C))}catch(T){return this.error(T.message),null}}return g}return this.error('Unknown expression "'+d+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(r===void 0?"'undefined' value invalid. Use null instead.":typeof r=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof r+" instead.")},Ua.prototype.concat=function(r,i,s){var d=typeof r=="number"?this.path.concat(r):this.path,m=s?this.scope.concat(s):this.scope;return new Ua(this.registry,d,i||null,m,this.errors)},Ua.prototype.error=function(r){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];var d=""+this.key+i.map(function(m){return"["+m+"]"}).join("");this.errors.push(new Ve(d,r))},Ua.prototype.checkSubtype=function(r,i){var s=kr(r,i);return s&&this.error(s),s};var qi=function(r,i,s){this.type=r,this.input=i,this.labels=[],this.outputs=[];for(var d=0,m=s;d=_)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',C);var z=i.parse(A,T,m);if(!z)return null;m=m||z.type,d.push([_,z])}return new qi(m,s,d)},qi.prototype.evaluate=function(r){var i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(r);var d=this.input.evaluate(r);if(d<=i[0])return s[0].evaluate(r);var m=i.length;return d>=i[m-1]?s[m-1].evaluate(r):s[oc(i,d)].evaluate(r)},qi.prototype.eachChild=function(r){r(this.input);for(var i=0,s=this.outputs;i0&&r.push(this.labels[i]),r.push(this.outputs[i].serialize());return r};var cl=Object.freeze({__proto__:null,number:Pn,color:function(r,i,s){return new Ar(Pn(r.r,i.r,s),Pn(r.g,i.g,s),Pn(r.b,i.b,s),Pn(r.a,i.a,s))},array:function(r,i,s){return r.map(function(d,m){return Pn(d,i[m],s)})}}),Sf=6/29*3*(6/29),Rv=Math.PI/180,Dv=180/Math.PI;function id(r){return r>.008856451679035631?Math.pow(r,1/3):r/Sf+4/29}function od(r){return r>6/29?r*r*r:Sf*(r-4/29)}function ad(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function sd(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Ef(r){var i=sd(r.r),s=sd(r.g),d=sd(r.b),m=id((.4124564*i+.3575761*s+.1804375*d)/.95047),g=id((.2126729*i+.7151522*s+.072175*d)/1);return{l:116*g-16,a:500*(m-g),b:200*(g-id((.0193339*i+.119192*s+.9503041*d)/1.08883)),alpha:r.a}}function Cf(r){var i=(r.l+16)/116,s=isNaN(r.a)?i:i+r.a/500,d=isNaN(r.b)?i:i-r.b/200;return i=1*od(i),s=.95047*od(s),d=1.08883*od(d),new Ar(ad(3.2404542*s-1.5371385*i-.4985314*d),ad(-.969266*s+1.8760108*i+.041556*d),ad(.0556434*s-.2040259*i+1.0572252*d),r.alpha)}function Bv(r,i,s){var d=i-r;return r+s*(d>180||d<-180?d-360*Math.round(d/360):d)}var iu={forward:Ef,reverse:Cf,interpolate:function(r,i,s){return{l:Pn(r.l,i.l,s),a:Pn(r.a,i.a,s),b:Pn(r.b,i.b,s),alpha:Pn(r.alpha,i.alpha,s)}}},ou={forward:function(r){var i=Ef(r),s=i.l,d=i.a,m=i.b,g=Math.atan2(m,d)*Dv;return{h:g<0?g+360:g,c:Math.sqrt(d*d+m*m),l:s,alpha:r.a}},reverse:function(r){var i=r.h*Rv,s=r.c;return Cf({l:r.l,a:Math.cos(i)*s,b:Math.sin(i)*s,alpha:r.alpha})},interpolate:function(r,i,s){return{h:Bv(r.h,i.h,s),c:Pn(r.c,i.c,s),l:Pn(r.l,i.l,s),alpha:Pn(r.alpha,i.alpha,s)}}},kf=Object.freeze({__proto__:null,lab:iu,hcl:ou}),li=function(r,i,s,d,m){this.type=r,this.operator=i,this.interpolation=s,this.input=d,this.labels=[],this.outputs=[];for(var g=0,_=m;g<_.length;g+=1){var A=_[g],C=A[1];this.labels.push(A[0]),this.outputs.push(C)}};function ld(r,i,s,d){var m=d-s,g=r-s;return m===0?0:i===1?g/m:(Math.pow(i,g)-1)/(Math.pow(i,m)-1)}li.interpolationFactor=function(r,i,s,d){var m=0;if(r.name==="exponential")m=ld(i,r.base,s,d);else if(r.name==="linear")m=ld(i,1,s,d);else if(r.name==="cubic-bezier"){var g=r.controlPoints;m=new x(g[0],g[1],g[2],g[3]).solve(ld(i,1,s,d))}return m},li.parse=function(r,i){var s=r[0],d=r[1],m=r[2],g=r.slice(3);if(!Array.isArray(d)||d.length===0)return i.error("Expected an interpolation type expression.",1);if(d[0]==="linear")d={name:"linear"};else if(d[0]==="exponential"){var _=d[1];if(typeof _!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);d={name:"exponential",base:_}}else{if(d[0]!=="cubic-bezier")return i.error("Unknown interpolation type "+String(d[0]),1,0);var A=d.slice(1);if(A.length!==4||A.some(function(be){return typeof be!="number"||be<0||be>1}))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);d={name:"cubic-bezier",controlPoints:A}}if(r.length-1<4)return i.error("Expected at least 4 arguments, but found only "+(r.length-1)+".");if((r.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(!(m=i.parse(m,2,Be)))return null;var C=[],T=null;s==="interpolate-hcl"||s==="interpolate-lab"?T=ot:i.expectedType&&i.expectedType.kind!=="value"&&(T=i.expectedType);for(var z=0;z=D)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Z);var ce=i.parse(U,se,T);if(!ce)return null;T=T||ce.type,C.push([D,ce])}return T.kind==="number"||T.kind==="color"||T.kind==="array"&&T.itemType.kind==="number"&&typeof T.N=="number"?new li(T,s,d,m,C):i.error("Type "+dr(T)+" is not interpolatable.")},li.prototype.evaluate=function(r){var i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(r);var d=this.input.evaluate(r);if(d<=i[0])return s[0].evaluate(r);var m=i.length;if(d>=i[m-1])return s[m-1].evaluate(r);var g=oc(i,d),_=li.interpolationFactor(this.interpolation,d,i[g],i[g+1]),A=s[g].evaluate(r),C=s[g+1].evaluate(r);return this.operator==="interpolate"?cl[this.type.kind.toLowerCase()](A,C,_):this.operator==="interpolate-hcl"?ou.reverse(ou.interpolate(ou.forward(A),ou.forward(C),_)):iu.reverse(iu.interpolate(iu.forward(A),iu.forward(C),_))},li.prototype.eachChild=function(r){r(this.input);for(var i=0,s=this.outputs;i=s.length)throw new Qn("Array index out of bounds: "+i+" > "+(s.length-1)+".");if(i!==Math.floor(i))throw new Qn("Array index must be an integer, but found "+i+" instead.");return s[i]},Ss.prototype.eachChild=function(r){r(this.index),r(this.input)},Ss.prototype.outputDefined=function(){return!1},Ss.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Es=function(r,i){this.type=Ze,this.needle=r,this.haystack=i};Es.parse=function(r,i){if(r.length!==3)return i.error("Expected 2 arguments, but found "+(r.length-1)+" instead.");var s=i.parse(r[1],1,ht),d=i.parse(r[2],2,ht);return s&&d?xn(s.type,[Ze,Ke,Be,Qe,ht])?new Es(s,d):i.error("Expected first argument to be of type boolean, string, number or null, but found "+dr(s.type)+" instead"):null},Es.prototype.evaluate=function(r){var i=this.needle.evaluate(r),s=this.haystack.evaluate(r);if(!s)return!1;if(!Br(i,["boolean","string","number","null"]))throw new Qn("Expected first argument to be of type boolean, string, number or null, but found "+dr(bn(i))+" instead.");if(!Br(s,["string","array"]))throw new Qn("Expected second argument to be of type array or string, but found "+dr(bn(s))+" instead.");return s.indexOf(i)>=0},Es.prototype.eachChild=function(r){r(this.needle),r(this.haystack)},Es.prototype.outputDefined=function(){return!0},Es.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var qa=function(r,i,s){this.type=Be,this.needle=r,this.haystack=i,this.fromIndex=s};qa.parse=function(r,i){if(r.length<=2||r.length>=5)return i.error("Expected 3 or 4 arguments, but found "+(r.length-1)+" instead.");var s=i.parse(r[1],1,ht),d=i.parse(r[2],2,ht);if(!s||!d)return null;if(!xn(s.type,[Ze,Ke,Be,Qe,ht]))return i.error("Expected first argument to be of type boolean, string, number or null, but found "+dr(s.type)+" instead");if(r.length===4){var m=i.parse(r[3],3,Be);return m?new qa(s,d,m):null}return new qa(s,d)},qa.prototype.evaluate=function(r){var i=this.needle.evaluate(r),s=this.haystack.evaluate(r);if(!Br(i,["boolean","string","number","null"]))throw new Qn("Expected first argument to be of type boolean, string, number or null, but found "+dr(bn(i))+" instead.");if(!Br(s,["string","array"]))throw new Qn("Expected second argument to be of type array or string, but found "+dr(bn(s))+" instead.");if(this.fromIndex){var d=this.fromIndex.evaluate(r);return s.indexOf(i,d)}return s.indexOf(i)},qa.prototype.eachChild=function(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)},qa.prototype.outputDefined=function(){return!1},qa.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var r=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),r]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Cs=function(r,i,s,d,m,g){this.inputType=r,this.type=i,this.input=s,this.cases=d,this.outputs=m,this.otherwise=g};Cs.parse=function(r,i){if(r.length<5)return i.error("Expected at least 4 arguments, but found only "+(r.length-1)+".");if(r.length%2!=1)return i.error("Expected an even number of arguments.");var s,d;i.expectedType&&i.expectedType.kind!=="value"&&(d=i.expectedType);for(var m={},g=[],_=2;_Number.MAX_SAFE_INTEGER)return T.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof U=="number"&&Math.floor(U)!==U)return T.error("Numeric branch labels must be integer values.");if(s){if(T.checkSubtype(s,bn(U)))return null}else s=bn(U);if(m[String(U)]!==void 0)return T.error("Branch labels must be unique.");m[String(U)]=g.length}var Z=i.parse(C,_,d);if(!Z)return null;d=d||Z.type,g.push(Z)}var se=i.parse(r[1],1,ht);if(!se)return null;var ce=i.parse(r[r.length-1],r.length-1,d);return ce?se.type.kind!=="value"&&i.concat(1).checkSubtype(s,se.type)?null:new Cs(s,d,se,m,g,ce):null},Cs.prototype.evaluate=function(r){var i=this.input.evaluate(r);return(bn(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(r)},Cs.prototype.eachChild=function(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)},Cs.prototype.outputDefined=function(){return this.outputs.every(function(r){return r.outputDefined()})&&this.otherwise.outputDefined()},Cs.prototype.serialize=function(){for(var r=this,i=["match",this.input.serialize()],s=[],d={},m=0,g=Object.keys(this.cases).sort();m=5)return i.error("Expected 3 or 4 arguments, but found "+(r.length-1)+" instead.");var s=i.parse(r[1],1,ht),d=i.parse(r[2],2,Be);if(!s||!d)return null;if(!xn(s.type,[wr(ht),Ke,ht]))return i.error("Expected first argument to be of type array or string, but found "+dr(s.type)+" instead");if(r.length===4){var m=i.parse(r[3],3,Be);return m?new Wa(s.type,s,d,m):null}return new Wa(s.type,s,d)},Wa.prototype.evaluate=function(r){var i=this.input.evaluate(r),s=this.beginIndex.evaluate(r);if(!Br(i,["string","array"]))throw new Qn("Expected first argument to be of type array or string, but found "+dr(bn(i))+" instead.");if(this.endIndex){var d=this.endIndex.evaluate(r);return i.slice(s,d)}return i.slice(s)},Wa.prototype.eachChild=function(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)},Wa.prototype.outputDefined=function(){return!1},Wa.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var r=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),r]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ov=Ur("==",function(r,i,s){return i===s},Tf),ac=Ur("!=",function(r,i,s){return i!==s},function(r,i,s,d){return!Tf(0,i,s,d)}),Pf=Ur("<",function(r,i,s){return i",function(r,i,s){return i>s},function(r,i,s,d){return d.compare(i,s)>0}),zf=Ur("<=",function(r,i,s){return i<=s},function(r,i,s,d){return d.compare(i,s)<=0}),Lf=Ur(">=",function(r,i,s){return i>=s},function(r,i,s,d){return d.compare(i,s)>=0}),Is=function(r,i,s,d,m){this.type=Ke,this.number=r,this.locale=i,this.currency=s,this.minFractionDigits=d,this.maxFractionDigits=m};Is.parse=function(r,i){if(r.length!==3)return i.error("Expected two arguments.");var s=i.parse(r[1],1,Be);if(!s)return null;var d=r[2];if(typeof d!="object"||Array.isArray(d))return i.error("NumberFormat options argument must be an object.");var m=null;if(d.locale&&!(m=i.parse(d.locale,1,Ke)))return null;var g=null;if(d.currency&&!(g=i.parse(d.currency,1,Ke)))return null;var _=null;if(d["min-fraction-digits"]&&!(_=i.parse(d["min-fraction-digits"],1,Be)))return null;var A=null;return d["max-fraction-digits"]&&!(A=i.parse(d["max-fraction-digits"],1,Be))?null:new Is(s,m,g,_,A)},Is.prototype.evaluate=function(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))},Is.prototype.eachChild=function(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)},Is.prototype.outputDefined=function(){return!1},Is.prototype.serialize=function(){var r={};return this.locale&&(r.locale=this.locale.serialize()),this.currency&&(r.currency=this.currency.serialize()),this.minFractionDigits&&(r["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(r["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),r]};var Ga=function(r){this.type=Be,this.input=r};Ga.parse=function(r,i){if(r.length!==2)return i.error("Expected 1 argument, but found "+(r.length-1)+" instead.");var s=i.parse(r[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error("Expected argument of type string or array, but found "+dr(s.type)+" instead."):new Ga(s):null},Ga.prototype.evaluate=function(r){var i=this.input.evaluate(r);if(typeof i=="string"||Array.isArray(i))return i.length;throw new Qn("Expected value to be of type string or array, but found "+dr(bn(i))+" instead.")},Ga.prototype.eachChild=function(r){r(this.input)},Ga.prototype.outputDefined=function(){return!1},Ga.prototype.serialize=function(){var r=["length"];return this.eachChild(function(i){r.push(i.serialize())}),r};var Ts={"==":Ov,"!=":ac,">":Mf,"<":Pf,">=":Lf,"<=":zf,array:Yr,at:Ss,boolean:Yr,case:ks,coalesce:Va,collator:ea,format:Ro,image:io,in:Es,"index-of":qa,interpolate:li,"interpolate-hcl":li,"interpolate-lab":li,length:Ga,let:$a,literal:bi,match:Cs,number:Yr,"number-format":Is,object:Yr,slice:Wa,step:qi,string:Yr,"to-boolean":go,"to-color":go,"to-number":go,"to-string":go,var:ja,within:yo};function Rf(r,i){var s=i[0],d=i[1],m=i[2],g=i[3];s=s.evaluate(r),d=d.evaluate(r),m=m.evaluate(r);var _=g?g.evaluate(r):1,A=td(s,d,m,_);if(A)throw new Qn(A);return new Ar(s/255*_,d/255*_,m/255*_,_)}function Df(r,i){return r in i}function ud(r,i){var s=i[r];return s===void 0?null:s}function Ps(r){return{type:r}}function Bf(r){return{result:"success",value:r}}function Ms(r){return{result:"error",value:r}}function zs(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function Of(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function au(r){return!!r.expression&&r.expression.interpolated}function qr(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function sc(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Nv(r){return r}function pl(r,i,s){return r!==void 0?r:i!==void 0?i:s!==void 0?s:void 0}function Nf(r,i,s,d,m){return pl(typeof s===m?d[s]:void 0,r.default,i.default)}function Fv(r,i,s){if(qr(s)!=="number")return pl(r.default,i.default);var d=r.stops.length;if(d===1||s<=r.stops[0][0])return r.stops[0][1];if(s>=r.stops[d-1][0])return r.stops[d-1][1];var m=oc(r.stops.map(function(g){return g[0]}),s);return r.stops[m][1]}function Ff(r,i,s){var d=r.base!==void 0?r.base:1;if(qr(s)!=="number")return pl(r.default,i.default);var m=r.stops.length;if(m===1||s<=r.stops[0][0])return r.stops[0][1];if(s>=r.stops[m-1][0])return r.stops[m-1][1];var g=oc(r.stops.map(function(D){return D[0]}),s),_=function(D,U,Z,se){var ce=se-Z,be=D-Z;return ce===0?0:U===1?be/ce:(Math.pow(U,be)-1)/(Math.pow(U,ce)-1)}(s,d,r.stops[g][0],r.stops[g+1][0]),A=r.stops[g][1],C=r.stops[g+1][1],T=cl[i.type]||Nv;if(r.colorSpace&&r.colorSpace!=="rgb"){var z=kf[r.colorSpace];T=function(D,U){return z.reverse(z.interpolate(z.forward(D),z.forward(U),_))}}return typeof A.evaluate=="function"?{evaluate:function(){for(var D=[],U=arguments.length;U--;)D[U]=arguments[U];var Z=A.evaluate.apply(void 0,D),se=C.evaluate.apply(void 0,D);if(Z!==void 0&&se!==void 0)return T(Z,se,_)}}:T(A,C,_)}function lc(r,i,s){return i.type==="color"?s=Ar.parse(s):i.type==="formatted"?s=Xn.fromString(s.toString()):i.type==="resolvedImage"?s=Ri.fromString(s.toString()):qr(s)===i.type||i.type==="enum"&&i.values[s]||(s=void 0),pl(s,r.default,i.default)}si.register(Ts,{error:[{kind:"error"},[Ke],function(r,i){throw new Qn(i[0].evaluate(r))}],typeof:[Ke,[ht],function(r,i){return dr(bn(i[0].evaluate(r)))}],"to-rgba":[wr(Be,4),[ot],function(r,i){return i[0].evaluate(r).toArray()}],rgb:[ot,[Be,Be,Be],Rf],rgba:[ot,[Be,Be,Be,Be],Rf],has:{type:Ze,overloads:[[[Ke],function(r,i){return Df(i[0].evaluate(r),r.properties())}],[[Ke,Wt],function(r,i){var s=i[1];return Df(i[0].evaluate(r),s.evaluate(r))}]]},get:{type:ht,overloads:[[[Ke],function(r,i){return ud(i[0].evaluate(r),r.properties())}],[[Ke,Wt],function(r,i){var s=i[1];return ud(i[0].evaluate(r),s.evaluate(r))}]]},"feature-state":[ht,[Ke],function(r,i){return ud(i[0].evaluate(r),r.featureState||{})}],properties:[Wt,[],function(r){return r.properties()}],"geometry-type":[Ke,[],function(r){return r.geometryType()}],id:[ht,[],function(r){return r.id()}],zoom:[Be,[],function(r){return r.globals.zoom}],"heatmap-density":[Be,[],function(r){return r.globals.heatmapDensity||0}],"line-progress":[Be,[],function(r){return r.globals.lineProgress||0}],accumulated:[ht,[],function(r){return r.globals.accumulated===void 0?null:r.globals.accumulated}],"+":[Be,Ps(Be),function(r,i){for(var s=0,d=0,m=i;d":[Ze,[Ke,ht],function(r,i){var s=i[0],d=i[1],m=r.properties()[s.value],g=d.value;return typeof m==typeof g&&m>g}],"filter-id->":[Ze,[ht],function(r,i){var s=i[0],d=r.id(),m=s.value;return typeof d==typeof m&&d>m}],"filter-<=":[Ze,[Ke,ht],function(r,i){var s=i[0],d=i[1],m=r.properties()[s.value],g=d.value;return typeof m==typeof g&&m<=g}],"filter-id-<=":[Ze,[ht],function(r,i){var s=i[0],d=r.id(),m=s.value;return typeof d==typeof m&&d<=m}],"filter->=":[Ze,[Ke,ht],function(r,i){var s=i[0],d=i[1],m=r.properties()[s.value],g=d.value;return typeof m==typeof g&&m>=g}],"filter-id->=":[Ze,[ht],function(r,i){var s=i[0],d=r.id(),m=s.value;return typeof d==typeof m&&d>=m}],"filter-has":[Ze,[ht],function(r,i){return i[0].value in r.properties()}],"filter-has-id":[Ze,[],function(r){return r.id()!==null&&r.id()!==void 0}],"filter-type-in":[Ze,[wr(Ke)],function(r,i){return i[0].value.indexOf(r.geometryType())>=0}],"filter-id-in":[Ze,[wr(ht)],function(r,i){return i[0].value.indexOf(r.id())>=0}],"filter-in-small":[Ze,[Ke,wr(ht)],function(r,i){var s=i[0];return i[1].value.indexOf(r.properties()[s.value])>=0}],"filter-in-large":[Ze,[Ke,wr(ht)],function(r,i){var s=i[0],d=i[1];return function(m,g,_,A){for(;_<=A;){var C=_+A>>1;if(g[C]===m)return!0;g[C]>m?A=C-1:_=C+1}return!1}(r.properties()[s.value],d.value,0,d.value.length-1)}],all:{type:Ze,overloads:[[[Ze,Ze],function(r,i){var s=i[1];return i[0].evaluate(r)&&s.evaluate(r)}],[Ps(Ze),function(r,i){for(var s=0,d=i;s0&&typeof r[0]=="string"&&r[0]in Ts}function uc(r,i){var s=new Ua(Ts,[],i?function(m){var g={color:ot,string:Ke,number:Be,enum:Ke,boolean:Ze,formatted:jr,resolvedImage:nr};return m.type==="array"?wr(g[m.value]||ht,m.length):g[m.type]}(i):void 0),d=s.parse(r,void 0,void 0,void 0,i&&i.type==="string"?{typeAnnotation:"coerce"}:void 0);return d?Bf(new dl(d,i)):Ms(s.errors)}dl.prototype.evaluateWithoutErrorHandling=function(r,i,s,d,m,g){return this._evaluator.globals=r,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=d,this._evaluator.availableImages=m||null,this._evaluator.formattedSection=g,this.expression.evaluate(this._evaluator)},dl.prototype.evaluate=function(r,i,s,d,m,g){this._evaluator.globals=r,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=d,this._evaluator.availableImages=m||null,this._evaluator.formattedSection=g||null;try{var _=this.expression.evaluate(this._evaluator);if(_==null||typeof _=="number"&&_!=_)return this._defaultValue;if(this._enumValues&&!(_ in this._enumValues))throw new Qn("Expected value to be one of "+Object.keys(this._enumValues).map(function(A){return JSON.stringify(A)}).join(", ")+", but found "+JSON.stringify(_)+" instead.");return _}catch(A){return this._warningHistory[A.message]||(this._warningHistory[A.message]=!0,typeof console<"u"&&console.warn(A.message)),this._defaultValue}};var lu=function(r,i){this.kind=r,this._styleExpression=i,this.isStateDependent=r!=="constant"&&!Fa(i.expression)};lu.prototype.evaluateWithoutErrorHandling=function(r,i,s,d,m,g){return this._styleExpression.evaluateWithoutErrorHandling(r,i,s,d,m,g)},lu.prototype.evaluate=function(r,i,s,d,m,g){return this._styleExpression.evaluate(r,i,s,d,m,g)};var hl=function(r,i,s,d){this.kind=r,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=r!=="camera"&&!Fa(i.expression),this.interpolationType=d};function jf(r,i){if((r=uc(r,i)).result==="error")return r;var s=r.value.expression,d=Na(s);if(!d&&!zs(i))return Ms([new Ve("","data expressions not supported")]);var m=As(s,["zoom"]);if(!m&&!Of(i))return Ms([new Ve("","zoom expressions not supported")]);var g=function _(A){var C=null;if(A instanceof $a)C=_(A.result);else if(A instanceof Va)for(var T=0,z=A.args;Td.maximum?[new re(i,s,s+" is greater than the maximum value "+d.maximum)]:[]}function $f(r){var i,s,d,m=r.valueSpec,g=Ge(r.value.type),_={},A=g!=="categorical"&&r.value.property===void 0,C=!A,T=qr(r.value.stops)==="array"&&qr(r.value.stops[0])==="array"&&qr(r.value.stops[0][0])==="object",z=Do({key:r.key,value:r.value,valueSpec:r.styleSpec.function,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:function(Z){if(g==="identity")return[new re(Z.key,Z.value,'identity function may not have a "stops" property')];var se=[],ce=Z.value;return se=se.concat(Uf({key:Z.key,value:ce,valueSpec:Z.valueSpec,style:Z.style,styleSpec:Z.styleSpec,arrayElementValidator:D})),qr(ce)==="array"&&ce.length===0&&se.push(new re(Z.key,ce,"array must have at least one stop")),se},default:function(Z){return cr({key:Z.key,value:Z.value,valueSpec:m,style:Z.style,styleSpec:Z.styleSpec})}}});return g==="identity"&&A&&z.push(new re(r.key,r.value,'missing required property "property"')),g==="identity"||r.value.stops||z.push(new re(r.key,r.value,'missing required property "stops"')),g==="exponential"&&r.valueSpec.expression&&!au(r.valueSpec)&&z.push(new re(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(C&&!zs(r.valueSpec)?z.push(new re(r.key,r.value,"property functions not supported")):A&&!Of(r.valueSpec)&&z.push(new re(r.key,r.value,"zoom functions not supported"))),g!=="categorical"&&!T||r.value.property!==void 0||z.push(new re(r.key,r.value,'"property" property is required')),z;function D(Z){var se=[],ce=Z.value,be=Z.key;if(qr(ce)!=="array")return[new re(be,ce,"array expected, "+qr(ce)+" found")];if(ce.length!==2)return[new re(be,ce,"array length 2 expected, length "+ce.length+" found")];if(T){if(qr(ce[0])!=="object")return[new re(be,ce,"object expected, "+qr(ce[0])+" found")];if(ce[0].zoom===void 0)return[new re(be,ce,"object stop key must have zoom")];if(ce[0].value===void 0)return[new re(be,ce,"object stop key must have value")];if(d&&d>Ge(ce[0].zoom))return[new re(be,ce[0].zoom,"stop zoom values must appear in ascending order")];Ge(ce[0].zoom)!==d&&(d=Ge(ce[0].zoom),s=void 0,_={}),se=se.concat(Do({key:be+"[0]",value:ce[0],valueSpec:{zoom:{}},style:Z.style,styleSpec:Z.styleSpec,objectElementValidators:{zoom:Vf,value:U}}))}else se=se.concat(U({key:be+"[0]",value:ce[0],valueSpec:{},style:Z.style,styleSpec:Z.styleSpec},ce));return su(Me(ce[1]))?se.concat([new re(be+"[1]",ce[1],"expressions are not allowed in function stops.")]):se.concat(cr({key:be+"[1]",value:ce[1],valueSpec:m,style:Z.style,styleSpec:Z.styleSpec}))}function U(Z,se){var ce=qr(Z.value),be=Ge(Z.value),ye=Z.value!==null?Z.value:se;if(i){if(ce!==i)return[new re(Z.key,ye,ce+" stop domain type must match previous stop domain type "+i)]}else i=ce;if(ce!=="number"&&ce!=="string"&&ce!=="boolean")return[new re(Z.key,ye,"stop domain value must be a number, string, or boolean")];if(ce!=="number"&&g!=="categorical"){var ke="number expected, "+ce+" found";return zs(m)&&g===void 0&&(ke+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new re(Z.key,ye,ke)]}return g!=="categorical"||ce!=="number"||isFinite(be)&&Math.floor(be)===be?g!=="categorical"&&ce==="number"&&s!==void 0&&be=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(var i=0,s=r.slice(1);ii?1:0}function dc(r){if(!r)return!0;var i,s=r[0];return r.length<=1?s!=="any":s==="=="?pd(r[1],r[2],"=="):s==="!="?hc(pd(r[1],r[2],"==")):s==="<"||s===">"||s==="<="||s===">="?pd(r[1],r[2],s):s==="any"?(i=r.slice(1),["any"].concat(i.map(dc))):s==="all"?["all"].concat(r.slice(1).map(dc)):s==="none"?["all"].concat(r.slice(1).map(dc).map(hc)):s==="in"?qf(r[1],r.slice(2)):s==="!in"?hc(qf(r[1],r.slice(2))):s==="has"?Wf(r[1]):s==="!has"?hc(Wf(r[1])):s!=="within"||r}function pd(r,i,s){switch(r){case"$type":return["filter-type-"+s,i];case"$id":return["filter-id-"+s,i];default:return["filter-"+s,r,i]}}function qf(r,i){if(i.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",i]];case"$id":return["filter-id-in",["literal",i]];default:return i.length>200&&!i.some(function(s){return typeof s!=typeof i[0]})?["filter-in-large",r,["literal",i.sort(jv)]]:["filter-in-small",r,["literal",i]]}}function Wf(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function hc(r){return["!",r]}function dd(r){return cc(Me(r.value))?Ls(Ue({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function i(s){var d=s.value,m=s.key;if(qr(d)!=="array")return[new re(m,d,"array expected, "+qr(d)+" found")];var g,_=s.styleSpec,A=[];if(d.length<1)return[new re(m,d,"filter array must have at least 1 element")];switch(A=A.concat(uu({key:m+"[0]",value:d[0],valueSpec:_.filter_operator,style:s.style,styleSpec:s.styleSpec})),Ge(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&Ge(d[1])==="$type"&&A.push(new re(m,d,'"$type" cannot be use with operator "'+d[0]+'"'));case"==":case"!=":d.length!==3&&A.push(new re(m,d,'filter array for operator "'+d[0]+'" must have 3 elements'));case"in":case"!in":d.length>=2&&(g=qr(d[1]))!=="string"&&A.push(new re(m+"[1]",d[1],"string expected, "+g+" found"));for(var C=2;C=z[Z+0]&&d>=z[Z+1])?(_[U]=!0,g.push(T[U])):_[U]=!1}}},Dn.prototype._forEachCell=function(r,i,s,d,m,g,_,A){for(var C=this._convertToCellCoord(r),T=this._convertToCellCoord(i),z=this._convertToCellCoord(s),D=this._convertToCellCoord(d),U=C;U<=z;U++)for(var Z=T;Z<=D;Z++){var se=this.d*Z+U;if((!A||A(this._convertFromCellCoord(U),this._convertFromCellCoord(Z),this._convertFromCellCoord(U+1),this._convertFromCellCoord(Z+1)))&&m.call(this,r,i,s,d,se,g,_,A))return}},Dn.prototype._convertFromCellCoord=function(r){return(r-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var r=this.cells,i=3+this.cells.length+1+1,s=0,d=0;d=0)){var z=r[T];C[T]=Mn[A].shallow.indexOf(T)>=0?z:Bo(z,i)}r instanceof Error&&(C.message=r.message)}if(C.$name)throw new Error("$name property is reserved for worker serialization logic.");return A!=="Object"&&(C.$name=A),C}throw new Error("can't serialize object of type "+typeof r)}function Gi(r){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||mc(r)||gl(r)||ArrayBuffer.isView(r)||r instanceof mu)return r;if(Array.isArray(r))return r.map(Gi);if(typeof r=="object"){var i=r.$name||"Object",s=Mn[i].klass;if(!s)throw new Error("can't deserialize unregistered class "+i);if(s.deserialize)return s.deserialize(r);for(var d=Object.create(s.prototype),m=0,g=Object.keys(r);m=0?A:Gi(A)}}return d}throw new Error("can't deserialize object of type "+typeof r)}var md=function(){this.first=!0};md.prototype.update=function(r,i){var s=Math.floor(r);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=r,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=i):this.lastFloorZoom=128&&r<=255},Arabic:function(r){return r>=1536&&r<=1791},"Arabic Supplement":function(r){return r>=1872&&r<=1919},"Arabic Extended-A":function(r){return r>=2208&&r<=2303},"Hangul Jamo":function(r){return r>=4352&&r<=4607},"Unified Canadian Aboriginal Syllabics":function(r){return r>=5120&&r<=5759},Khmer:function(r){return r>=6016&&r<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(r){return r>=6320&&r<=6399},"General Punctuation":function(r){return r>=8192&&r<=8303},"Letterlike Symbols":function(r){return r>=8448&&r<=8527},"Number Forms":function(r){return r>=8528&&r<=8591},"Miscellaneous Technical":function(r){return r>=8960&&r<=9215},"Control Pictures":function(r){return r>=9216&&r<=9279},"Optical Character Recognition":function(r){return r>=9280&&r<=9311},"Enclosed Alphanumerics":function(r){return r>=9312&&r<=9471},"Geometric Shapes":function(r){return r>=9632&&r<=9727},"Miscellaneous Symbols":function(r){return r>=9728&&r<=9983},"Miscellaneous Symbols and Arrows":function(r){return r>=11008&&r<=11263},"CJK Radicals Supplement":function(r){return r>=11904&&r<=12031},"Kangxi Radicals":function(r){return r>=12032&&r<=12255},"Ideographic Description Characters":function(r){return r>=12272&&r<=12287},"CJK Symbols and Punctuation":function(r){return r>=12288&&r<=12351},Hiragana:function(r){return r>=12352&&r<=12447},Katakana:function(r){return r>=12448&&r<=12543},Bopomofo:function(r){return r>=12544&&r<=12591},"Hangul Compatibility Jamo":function(r){return r>=12592&&r<=12687},Kanbun:function(r){return r>=12688&&r<=12703},"Bopomofo Extended":function(r){return r>=12704&&r<=12735},"CJK Strokes":function(r){return r>=12736&&r<=12783},"Katakana Phonetic Extensions":function(r){return r>=12784&&r<=12799},"Enclosed CJK Letters and Months":function(r){return r>=12800&&r<=13055},"CJK Compatibility":function(r){return r>=13056&&r<=13311},"CJK Unified Ideographs Extension A":function(r){return r>=13312&&r<=19903},"Yijing Hexagram Symbols":function(r){return r>=19904&&r<=19967},"CJK Unified Ideographs":function(r){return r>=19968&&r<=40959},"Yi Syllables":function(r){return r>=40960&&r<=42127},"Yi Radicals":function(r){return r>=42128&&r<=42191},"Hangul Jamo Extended-A":function(r){return r>=43360&&r<=43391},"Hangul Syllables":function(r){return r>=44032&&r<=55215},"Hangul Jamo Extended-B":function(r){return r>=55216&&r<=55295},"Private Use Area":function(r){return r>=57344&&r<=63743},"CJK Compatibility Ideographs":function(r){return r>=63744&&r<=64255},"Arabic Presentation Forms-A":function(r){return r>=64336&&r<=65023},"Vertical Forms":function(r){return r>=65040&&r<=65055},"CJK Compatibility Forms":function(r){return r>=65072&&r<=65103},"Small Form Variants":function(r){return r>=65104&&r<=65135},"Arabic Presentation Forms-B":function(r){return r>=65136&&r<=65279},"Halfwidth and Fullwidth Forms":function(r){return r>=65280&&r<=65519}};function gd(r){for(var i=0,s=r;i=65097&&r<=65103)||st["CJK Compatibility Ideographs"](r)||st["CJK Compatibility"](r)||st["CJK Radicals Supplement"](r)||st["CJK Strokes"](r)||!(!st["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||st["CJK Unified Ideographs Extension A"](r)||st["CJK Unified Ideographs"](r)||st["Enclosed CJK Letters and Months"](r)||st["Hangul Compatibility Jamo"](r)||st["Hangul Jamo Extended-A"](r)||st["Hangul Jamo Extended-B"](r)||st["Hangul Jamo"](r)||st["Hangul Syllables"](r)||st.Hiragana(r)||st["Ideographic Description Characters"](r)||st.Kanbun(r)||st["Kangxi Radicals"](r)||st["Katakana Phonetic Extensions"](r)||st.Katakana(r)&&r!==12540||!(!st["Halfwidth and Fullwidth Forms"](r)||r===65288||r===65289||r===65293||r>=65306&&r<=65310||r===65339||r===65341||r===65343||r>=65371&&r<=65503||r===65507||r>=65512&&r<=65519)||!(!st["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||st["Unified Canadian Aboriginal Syllabics"](r)||st["Unified Canadian Aboriginal Syllabics Extended"](r)||st["Vertical Forms"](r)||st["Yijing Hexagram Symbols"](r)||st["Yi Syllables"](r)||st["Yi Radicals"](r))))}function yd(r){return!(gc(r)||function(i){return!!(st["Latin-1 Supplement"](i)&&(i===167||i===169||i===174||i===177||i===188||i===189||i===190||i===215||i===247)||st["General Punctuation"](i)&&(i===8214||i===8224||i===8225||i===8240||i===8241||i===8251||i===8252||i===8258||i===8263||i===8264||i===8265||i===8273)||st["Letterlike Symbols"](i)||st["Number Forms"](i)||st["Miscellaneous Technical"](i)&&(i>=8960&&i<=8967||i>=8972&&i<=8991||i>=8996&&i<=9e3||i===9003||i>=9085&&i<=9114||i>=9150&&i<=9165||i===9167||i>=9169&&i<=9179||i>=9186&&i<=9215)||st["Control Pictures"](i)&&i!==9251||st["Optical Character Recognition"](i)||st["Enclosed Alphanumerics"](i)||st["Geometric Shapes"](i)||st["Miscellaneous Symbols"](i)&&!(i>=9754&&i<=9759)||st["Miscellaneous Symbols and Arrows"](i)&&(i>=11026&&i<=11055||i>=11088&&i<=11097||i>=11192&&i<=11243)||st["CJK Symbols and Punctuation"](i)||st.Katakana(i)||st["Private Use Area"](i)||st["CJK Compatibility Forms"](i)||st["Small Form Variants"](i)||st["Halfwidth and Fullwidth Forms"](i)||i===8734||i===8756||i===8757||i>=9984&&i<=10087||i>=10102&&i<=10131||i===65532||i===65533)}(r))}function vo(r){return r>=1424&&r<=2303||st["Arabic Presentation Forms-A"](r)||st["Arabic Presentation Forms-B"](r)}function Hi(r,i){return!(!i&&vo(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||st.Khmer(r))}function yc(r){for(var i=0,s=r;i-1&&(Zi="error"),vc&&vc(r)};function gu(){vd.fire(new K("pluginStateChange",{pluginStatus:Zi,pluginURL:xa}))}var vd=new ge,_d=function(){return Zi},Oo=function(){if(Zi!=="deferred"||!xa)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Zi="loading",gu(),xa&&Jo({url:xa},function(r){r?Zf(r):(Zi="loaded",gu())})},ao={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Zi==="loaded"||ao.applyArabicShaping!=null},isLoading:function(){return Zi==="loading"},setState:function(r){Zi=r.pluginStatus,xa=r.pluginURL},isParsed:function(){return ao.applyArabicShaping!=null&&ao.processBidirectionalText!=null&&ao.processStyledBidirectionalText!=null},getPluginURL:function(){return xa}},ir=function(r,i){this.zoom=r,i?(this.now=i.now,this.fadeDuration=i.fadeDuration,this.zoomHistory=i.zoomHistory,this.transition=i.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new md,this.transition={})};ir.prototype.isSupportedScript=function(r){return function(i,s){for(var d=0,m=i;dthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:i+(1-i)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*i}};var ta=function(r,i){this.property=r,this.value=i,this.expression=function(s,d){if(sc(s))return new fl(s,d);if(su(s)){var m=jf(s,d);if(m.result==="error")throw new Error(m.value.map(function(_){return _.key+": "+_.message}).join(", "));return m.value}var g=s;return typeof s=="string"&&d.type==="color"&&(g=Ar.parse(s)),{kind:"constant",evaluate:function(){return g}}}(i===void 0?r.specification.default:i,r.specification)};ta.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ta.prototype.possiblyEvaluate=function(r,i,s){return this.property.possiblyEvaluate(this,r,i,s)};var _o=function(r){this.property=r,this.value=new ta(r,void 0)};_o.prototype.transitioned=function(r,i){return new Bs(this.property,this.value,i,F({},r.transition,this.transition),r.now)},_o.prototype.untransitioned=function(){return new Bs(this.property,this.value,null,{},0)};var ui=function(r){this._properties=r,this._values=Object.create(r.defaultTransitionablePropertyValues)};ui.prototype.getValue=function(r){return we(this._values[r].value.value)},ui.prototype.setValue=function(r,i){this._values.hasOwnProperty(r)||(this._values[r]=new _o(this._values[r].property)),this._values[r].value=new ta(this._values[r].property,i===null?void 0:we(i))},ui.prototype.getTransition=function(r){return we(this._values[r].transition)},ui.prototype.setTransition=function(r,i){this._values.hasOwnProperty(r)||(this._values[r]=new _o(this._values[r].property)),this._values[r].transition=we(i)||void 0},ui.prototype.serialize=function(){for(var r={},i=0,s=Object.keys(this._values);ithis.end)return this.prior=null,m;if(this.value.isDataDriven())return this.prior=null,m;if(d=1)return 1;var C=A*A,T=C*A;return 4*(A<.5?T:3*(A-C)+T-.75)}(_))}return m};var Za=function(r){this._properties=r,this._values=Object.create(r.defaultTransitioningPropertyValues)};Za.prototype.possiblyEvaluate=function(r,i,s){for(var d=new yu(this._properties),m=0,g=Object.keys(this._values);mg.zoomHistory.lastIntegerZoom?{from:s,to:d}:{from:m,to:d}},i.prototype.interpolate=function(s){return s},i}(_t),Si=function(r){this.specification=r};Si.prototype.possiblyEvaluate=function(r,i,s,d){if(r.value!==void 0){if(r.expression.kind==="constant"){var m=r.expression.evaluate(i,null,{},s,d);return this._calculate(m,m,m,i)}return this._calculate(r.expression.evaluate(new ir(Math.floor(i.zoom-1),i)),r.expression.evaluate(new ir(Math.floor(i.zoom),i)),r.expression.evaluate(new ir(Math.floor(i.zoom+1),i)),i)}},Si.prototype._calculate=function(r,i,s,d){return d.zoom>d.zoomHistory.lastIntegerZoom?{from:r,to:i}:{from:s,to:i}},Si.prototype.interpolate=function(r){return r};var Fo=function(r){this.specification=r};Fo.prototype.possiblyEvaluate=function(r,i,s,d){return!!r.expression.evaluate(i,null,{},s,d)},Fo.prototype.interpolate=function(){return!1};var ci=function(r){for(var i in this.properties=r,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],r){var s=r[i];s.specification.overridable&&this.overridableProperties.push(i);var d=this.defaultPropertyValues[i]=new ta(s,void 0),m=this.defaultTransitionablePropertyValues[i]=new _o(s);this.defaultTransitioningPropertyValues[i]=m.untransitioned(),this.defaultPossiblyEvaluatedValues[i]=d.possiblyEvaluate({})}};yt("DataDrivenProperty",_t),yt("DataConstantProperty",wt),yt("CrossFadedDataDrivenProperty",_c),yt("CrossFadedProperty",Si),yt("ColorRampProperty",Fo);var ra=function(r){function i(s,d){if(r.call(this),this.id=s.id,this.type=s.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},s.type!=="custom"&&(this.metadata=(s=s).metadata,this.minzoom=s.minzoom,this.maxzoom=s.maxzoom,s.type!=="background"&&(this.source=s.source,this.sourceLayer=s["source-layer"],this.filter=s.filter),d.layout&&(this._unevaluatedLayout=new No(d.layout)),d.paint)){for(var m in this._transitionablePaint=new ui(d.paint),s.paint)this.setPaintProperty(m,s.paint[m],{validate:!1});for(var g in s.layout)this.setLayoutProperty(g,s.layout[g],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yu(d.paint)}}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},i.prototype.getLayoutProperty=function(s){return s==="visibility"?this.visibility:this._unevaluatedLayout.getValue(s)},i.prototype.setLayoutProperty=function(s,d,m){m===void 0&&(m={}),d!=null&&this._validate(hu,"layers."+this.id+".layout."+s,s,d,m)||(s!=="visibility"?this._unevaluatedLayout.setValue(s,d):this.visibility=d)},i.prototype.getPaintProperty=function(s){return fe(s,"-transition")?this._transitionablePaint.getTransition(s.slice(0,-11)):this._transitionablePaint.getValue(s)},i.prototype.setPaintProperty=function(s,d,m){if(m===void 0&&(m={}),d!=null&&this._validate(Vv,"layers."+this.id+".paint."+s,s,d,m))return!1;if(fe(s,"-transition"))return this._transitionablePaint.setTransition(s.slice(0,-11),d||void 0),!1;var g=this._transitionablePaint._values[s],_=g.property.specification["property-type"]==="cross-faded-data-driven",A=g.value.isDataDriven(),C=g.value;this._transitionablePaint.setValue(s,d),this._handleSpecialPaintPropertyUpdate(s);var T=this._transitionablePaint._values[s].value;return T.isDataDriven()||A||_||this._handleOverridablePaintPropertyUpdate(s,C,T)},i.prototype._handleSpecialPaintPropertyUpdate=function(s){},i.prototype._handleOverridablePaintPropertyUpdate=function(s,d,m){return!1},i.prototype.isHidden=function(s){return!!(this.minzoom&&s=this.maxzoom)||this.visibility==="none"},i.prototype.updateTransitions=function(s){this._transitioningPaint=this._transitionablePaint.transitioned(s,this._transitioningPaint)},i.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},i.prototype.recalculate=function(s,d){s.getCrossfadeParameters&&(this._crossfadeParameters=s.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(s,void 0,d)),this.paint=this._transitioningPaint.possiblyEvaluate(s,void 0,d)},i.prototype.serialize=function(){var s={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&&(s.layout=s.layout||{},s.layout.visibility=this.visibility),he(s,function(d,m){return!(d===void 0||m==="layout"&&!Object.keys(d).length||m==="paint"&&!Object.keys(d).length)})},i.prototype._validate=function(s,d,m,g,_){return _===void 0&&(_={}),(!_||_.validate!==!1)&&fu(this,s.call(du,{key:d,layerType:this.type,objectKey:m,value:g,styleSpec:W,style:{glyphs:!0,sprite:!0}}))},i.prototype.is3D=function(){return!1},i.prototype.isTileClipped=function(){return!1},i.prototype.hasOffscreenPass=function(){return!1},i.prototype.resize=function(){},i.prototype.isStateDependent=function(){for(var s in this.paint._values){var d=this.paint.get(s);if(d instanceof Ai&&zs(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1},i}(ge),xd={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},xc=function(r,i){this._structArray=r,this._pos1=i*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ir=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Yn(r,i){i===void 0&&(i=1);var s=0,d=0;return{members:r.map(function(m){var g=xd[m.type].BYTES_PER_ELEMENT,_=s=Kf(s,Math.max(i,g)),A=m.components||1;return d=Math.max(d,g),s+=g*A,{name:m.name,type:m.type,components:A,offset:_}}),size:Kf(s,Math.max(d,i)),alignment:i}}function Kf(r,i){return Math.ceil(r/i)*i}Ir.serialize=function(r,i){return r._trim(),i&&(r.isTransferred=!0,i.push(r.arrayBuffer)),{length:r.length,arrayBuffer:r.arrayBuffer}},Ir.deserialize=function(r){var i=Object.create(this.prototype);return i.arrayBuffer=r.arrayBuffer,i.length=r.length,i.capacity=r.arrayBuffer.byteLength/i.bytesPerElement,i._refreshViews(),i},Ir.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ir.prototype.clear=function(){this.length=0},Ir.prototype.resize=function(r){this.reserve(r),this.length=r},Ir.prototype.reserve=function(r){if(r>this.capacity){this.capacity=Math.max(r,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var i=this.uint8;this._refreshViews(),i&&this.uint8.set(i)}},Ir.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Os=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d){var m=this.length;return this.resize(m+1),this.emplace(m,s,d)},i.prototype.emplace=function(s,d,m){var g=2*s;return this.int16[g+0]=d,this.int16[g+1]=m,s},i}(Ir);Os.prototype.bytesPerElement=4,yt("StructArrayLayout2i4",Os);var bd=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g){var _=this.length;return this.resize(_+1),this.emplace(_,s,d,m,g)},i.prototype.emplace=function(s,d,m,g,_){var A=4*s;return this.int16[A+0]=d,this.int16[A+1]=m,this.int16[A+2]=g,this.int16[A+3]=_,s},i}(Ir);bd.prototype.bytesPerElement=8,yt("StructArrayLayout4i8",bd);var ba=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g,_,A){var C=this.length;return this.resize(C+1),this.emplace(C,s,d,m,g,_,A)},i.prototype.emplace=function(s,d,m,g,_,A,C){var T=6*s;return this.int16[T+0]=d,this.int16[T+1]=m,this.int16[T+2]=g,this.int16[T+3]=_,this.int16[T+4]=A,this.int16[T+5]=C,s},i}(Ir);ba.prototype.bytesPerElement=12,yt("StructArrayLayout2i4i12",ba);var Ki=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g,_,A){var C=this.length;return this.resize(C+1),this.emplace(C,s,d,m,g,_,A)},i.prototype.emplace=function(s,d,m,g,_,A,C){var T=4*s,z=8*s;return this.int16[T+0]=d,this.int16[T+1]=m,this.uint8[z+4]=g,this.uint8[z+5]=_,this.uint8[z+6]=A,this.uint8[z+7]=C,s},i}(Ir);Ki.prototype.bytesPerElement=8,yt("StructArrayLayout2i4ub8",Ki);var yl=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d){var m=this.length;return this.resize(m+1),this.emplace(m,s,d)},i.prototype.emplace=function(s,d,m){var g=2*s;return this.float32[g+0]=d,this.float32[g+1]=m,s},i}(Ir);yl.prototype.bytesPerElement=8,yt("StructArrayLayout2f8",yl);var na=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g,_,A,C,T,z,D){var U=this.length;return this.resize(U+1),this.emplace(U,s,d,m,g,_,A,C,T,z,D)},i.prototype.emplace=function(s,d,m,g,_,A,C,T,z,D,U){var Z=10*s;return this.uint16[Z+0]=d,this.uint16[Z+1]=m,this.uint16[Z+2]=g,this.uint16[Z+3]=_,this.uint16[Z+4]=A,this.uint16[Z+5]=C,this.uint16[Z+6]=T,this.uint16[Z+7]=z,this.uint16[Z+8]=D,this.uint16[Z+9]=U,s},i}(Ir);na.prototype.bytesPerElement=20,yt("StructArrayLayout10ui20",na);var bc=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g,_,A,C,T,z,D,U,Z){var se=this.length;return this.resize(se+1),this.emplace(se,s,d,m,g,_,A,C,T,z,D,U,Z)},i.prototype.emplace=function(s,d,m,g,_,A,C,T,z,D,U,Z,se){var ce=12*s;return this.int16[ce+0]=d,this.int16[ce+1]=m,this.int16[ce+2]=g,this.int16[ce+3]=_,this.uint16[ce+4]=A,this.uint16[ce+5]=C,this.uint16[ce+6]=T,this.uint16[ce+7]=z,this.int16[ce+8]=D,this.int16[ce+9]=U,this.int16[ce+10]=Z,this.int16[ce+11]=se,s},i}(Ir);bc.prototype.bytesPerElement=24,yt("StructArrayLayout4i4ui4i24",bc);var vl=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m){var g=this.length;return this.resize(g+1),this.emplace(g,s,d,m)},i.prototype.emplace=function(s,d,m,g){var _=3*s;return this.float32[_+0]=d,this.float32[_+1]=m,this.float32[_+2]=g,s},i}(Ir);vl.prototype.bytesPerElement=12,yt("StructArrayLayout3f12",vl);var vu=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s){var d=this.length;return this.resize(d+1),this.emplace(d,s)},i.prototype.emplace=function(s,d){return this.uint32[1*s+0]=d,s},i}(Ir);vu.prototype.bytesPerElement=4,yt("StructArrayLayout1ul4",vu);var wd=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.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)},i.prototype.emplaceBack=function(s,d,m,g,_,A,C,T,z){var D=this.length;return this.resize(D+1),this.emplace(D,s,d,m,g,_,A,C,T,z)},i.prototype.emplace=function(s,d,m,g,_,A,C,T,z,D){var U=10*s,Z=5*s;return this.int16[U+0]=d,this.int16[U+1]=m,this.int16[U+2]=g,this.int16[U+3]=_,this.int16[U+4]=A,this.int16[U+5]=C,this.uint32[Z+3]=T,this.uint16[U+8]=z,this.uint16[U+9]=D,s},i}(Ir);wd.prototype.bytesPerElement=20,yt("StructArrayLayout6i1ul2ui20",wd);var _l=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g,_,A){var C=this.length;return this.resize(C+1),this.emplace(C,s,d,m,g,_,A)},i.prototype.emplace=function(s,d,m,g,_,A,C){var T=6*s;return this.int16[T+0]=d,this.int16[T+1]=m,this.int16[T+2]=g,this.int16[T+3]=_,this.int16[T+4]=A,this.int16[T+5]=C,s},i}(Ir);_l.prototype.bytesPerElement=12,yt("StructArrayLayout2i2i2i12",_l);var Ns=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g,_){var A=this.length;return this.resize(A+1),this.emplace(A,s,d,m,g,_)},i.prototype.emplace=function(s,d,m,g,_,A){var C=4*s,T=8*s;return this.float32[C+0]=d,this.float32[C+1]=m,this.float32[C+2]=g,this.int16[T+6]=_,this.int16[T+7]=A,s},i}(Ir);Ns.prototype.bytesPerElement=16,yt("StructArrayLayout2f1f2i16",Ns);var Ad=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g){var _=this.length;return this.resize(_+1),this.emplace(_,s,d,m,g)},i.prototype.emplace=function(s,d,m,g,_){var A=12*s,C=3*s;return this.uint8[A+0]=d,this.uint8[A+1]=m,this.float32[C+1]=g,this.float32[C+2]=_,s},i}(Ir);Ad.prototype.bytesPerElement=12,yt("StructArrayLayout2ub2f12",Ad);var Ka=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m){var g=this.length;return this.resize(g+1),this.emplace(g,s,d,m)},i.prototype.emplace=function(s,d,m,g){var _=3*s;return this.uint16[_+0]=d,this.uint16[_+1]=m,this.uint16[_+2]=g,s},i}(Ir);Ka.prototype.bytesPerElement=6,yt("StructArrayLayout3ui6",Ka);var Xa=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.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)},i.prototype.emplaceBack=function(s,d,m,g,_,A,C,T,z,D,U,Z,se,ce,be,ye,ke){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,s,d,m,g,_,A,C,T,z,D,U,Z,se,ce,be,ye,ke)},i.prototype.emplace=function(s,d,m,g,_,A,C,T,z,D,U,Z,se,ce,be,ye,ke,Pe){var Re=24*s,Oe=12*s,We=48*s;return this.int16[Re+0]=d,this.int16[Re+1]=m,this.uint16[Re+2]=g,this.uint16[Re+3]=_,this.uint32[Oe+2]=A,this.uint32[Oe+3]=C,this.uint32[Oe+4]=T,this.uint16[Re+10]=z,this.uint16[Re+11]=D,this.uint16[Re+12]=U,this.float32[Oe+7]=Z,this.float32[Oe+8]=se,this.uint8[We+36]=ce,this.uint8[We+37]=be,this.uint8[We+38]=ye,this.uint32[Oe+10]=ke,this.int16[Re+22]=Pe,s},i}(Ir);Xa.prototype.bytesPerElement=48,yt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Xa);var wc=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.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)},i.prototype.emplaceBack=function(s,d,m,g,_,A,C,T,z,D,U,Z,se,ce,be,ye,ke,Pe,Re,Oe,We,Ye,at,bt,dt,St,ft,Xt){var Dt=this.length;return this.resize(Dt+1),this.emplace(Dt,s,d,m,g,_,A,C,T,z,D,U,Z,se,ce,be,ye,ke,Pe,Re,Oe,We,Ye,at,bt,dt,St,ft,Xt)},i.prototype.emplace=function(s,d,m,g,_,A,C,T,z,D,U,Z,se,ce,be,ye,ke,Pe,Re,Oe,We,Ye,at,bt,dt,St,ft,Xt,Dt){var xt=34*s,rr=17*s;return this.int16[xt+0]=d,this.int16[xt+1]=m,this.int16[xt+2]=g,this.int16[xt+3]=_,this.int16[xt+4]=A,this.int16[xt+5]=C,this.int16[xt+6]=T,this.int16[xt+7]=z,this.uint16[xt+8]=D,this.uint16[xt+9]=U,this.uint16[xt+10]=Z,this.uint16[xt+11]=se,this.uint16[xt+12]=ce,this.uint16[xt+13]=be,this.uint16[xt+14]=ye,this.uint16[xt+15]=ke,this.uint16[xt+16]=Pe,this.uint16[xt+17]=Re,this.uint16[xt+18]=Oe,this.uint16[xt+19]=We,this.uint16[xt+20]=Ye,this.uint16[xt+21]=at,this.uint16[xt+22]=bt,this.uint32[rr+12]=dt,this.float32[rr+13]=St,this.float32[rr+14]=ft,this.float32[rr+15]=Xt,this.float32[rr+16]=Dt,s},i}(Ir);wc.prototype.bytesPerElement=68,yt("StructArrayLayout8i15ui1ul4f68",wc);var Qa=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s){var d=this.length;return this.resize(d+1),this.emplace(d,s)},i.prototype.emplace=function(s,d){return this.float32[1*s+0]=d,s},i}(Ir);Qa.prototype.bytesPerElement=4,yt("StructArrayLayout1f4",Qa);var xo=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m){var g=this.length;return this.resize(g+1),this.emplace(g,s,d,m)},i.prototype.emplace=function(s,d,m,g){var _=3*s;return this.int16[_+0]=d,this.int16[_+1]=m,this.int16[_+2]=g,s},i}(Ir);xo.prototype.bytesPerElement=6,yt("StructArrayLayout3i6",xo);var Sd=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m){var g=this.length;return this.resize(g+1),this.emplace(g,s,d,m)},i.prototype.emplace=function(s,d,m,g){var _=4*s;return this.uint32[2*s+0]=d,this.uint16[_+2]=m,this.uint16[_+3]=g,s},i}(Ir);Sd.prototype.bytesPerElement=8,yt("StructArrayLayout1ul2ui8",Sd);var _u=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d){var m=this.length;return this.resize(m+1),this.emplace(m,s,d)},i.prototype.emplace=function(s,d,m){var g=2*s;return this.uint16[g+0]=d,this.uint16[g+1]=m,s},i}(Ir);_u.prototype.bytesPerElement=4,yt("StructArrayLayout2ui4",_u);var Ed=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s){var d=this.length;return this.resize(d+1),this.emplace(d,s)},i.prototype.emplace=function(s,d){return this.uint16[1*s+0]=d,s},i}(Ir);Ed.prototype.bytesPerElement=2,yt("StructArrayLayout1ui2",Ed);var Ac=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},i.prototype.emplaceBack=function(s,d,m,g){var _=this.length;return this.resize(_+1),this.emplace(_,s,d,m,g)},i.prototype.emplace=function(s,d,m,g,_){var A=4*s;return this.float32[A+0]=d,this.float32[A+1]=m,this.float32[A+2]=g,this.float32[A+3]=_,s},i}(Ir);Ac.prototype.bytesPerElement=16,yt("StructArrayLayout4f16",Ac);var l=function(r){function i(){r.apply(this,arguments)}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var s={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 s.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},s.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},s.x1.get=function(){return this._structArray.int16[this._pos2+2]},s.y1.get=function(){return this._structArray.int16[this._pos2+3]},s.x2.get=function(){return this._structArray.int16[this._pos2+4]},s.y2.get=function(){return this._structArray.int16[this._pos2+5]},s.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},s.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},s.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},s.anchorPoint.get=function(){return new k(this.anchorPointX,this.anchorPointY)},Object.defineProperties(i.prototype,s),i}(xc);l.prototype.size=20;var c=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.get=function(s){return new l(this,s)},i}(wd);yt("CollisionBoxArray",c);var u=function(r){function i(){r.apply(this,arguments)}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var s={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 s.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},s.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},s.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},s.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},s.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},s.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},s.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},s.segment.get=function(){return this._structArray.uint16[this._pos2+10]},s.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},s.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},s.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},s.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},s.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},s.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},s.placedOrientation.set=function(d){this._structArray.uint8[this._pos1+37]=d},s.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},s.hidden.set=function(d){this._structArray.uint8[this._pos1+38]=d},s.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},s.crossTileID.set=function(d){this._structArray.uint32[this._pos4+10]=d},s.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(i.prototype,s),i}(xc);u.prototype.size=48;var h=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.get=function(s){return new u(this,s)},i}(Xa);yt("PlacedSymbolArray",h);var y=function(r){function i(){r.apply(this,arguments)}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var s={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 s.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},s.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},s.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},s.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},s.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},s.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},s.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},s.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},s.key.get=function(){return this._structArray.uint16[this._pos2+8]},s.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},s.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},s.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},s.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},s.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},s.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},s.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},s.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},s.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},s.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},s.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},s.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},s.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},s.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},s.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},s.crossTileID.set=function(d){this._structArray.uint32[this._pos4+12]=d},s.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},s.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},s.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},s.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(i.prototype,s),i}(xc);y.prototype.size=68;var b=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.get=function(s){return new y(this,s)},i}(wc);yt("SymbolInstanceArray",b);var w=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.getoffsetX=function(s){return this.float32[1*s+0]},i}(Qa);yt("GlyphOffsetArray",w);var E=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.getx=function(s){return this.int16[3*s+0]},i.prototype.gety=function(s){return this.int16[3*s+1]},i.prototype.gettileUnitDistanceFromAnchor=function(s){return this.int16[3*s+2]},i}(xo);yt("SymbolLineVertexArray",E);var M=function(r){function i(){r.apply(this,arguments)}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var s={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return s.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},s.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},s.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(i.prototype,s),i}(xc);M.prototype.size=8;var N=function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.get=function(s){return new M(this,s)},i}(Sd);yt("FeatureIndexArray",N);var X=Yn([{name:"a_pos",components:2,type:"Int16"}],4).members,Q=function(r){r===void 0&&(r=[]),this.segments=r};function J(r,i){return 256*(r=oe(Math.floor(r),0,255))+oe(Math.floor(i),0,255)}Q.prototype.prepareSegment=function(r,i,s,d){var m=this.segments[this.segments.length-1];return r>Q.MAX_VERTEX_ARRAY_LENGTH&&me("Max vertices per segment is "+Q.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+r),(!m||m.vertexLength+r>Q.MAX_VERTEX_ARRAY_LENGTH||m.sortKey!==d)&&(m={vertexOffset:i.length,primitiveOffset:s.length,vertexLength:0,primitiveLength:0},d!==void 0&&(m.sortKey=d),this.segments.push(m)),m},Q.prototype.get=function(){return this.segments},Q.prototype.destroy=function(){for(var r=0,i=this.segments;r>>16)*A&65535)<<16)&4294967295)<<15|T>>>17))*C+(((T>>>16)*C&65535)<<16)&4294967295)<<13|g>>>19))+((5*(g>>>16)&65535)<<16)&4294967295))+((58964+(_>>>16)&65535)<<16);switch(T=0,d){case 3:T^=(255&i.charCodeAt(z+2))<<16;case 2:T^=(255&i.charCodeAt(z+1))<<8;case 1:g^=T=(65535&(T=(T=(65535&(T^=255&i.charCodeAt(z)))*A+(((T>>>16)*A&65535)<<16)&4294967295)<<15|T>>>17))*C+(((T>>>16)*C&65535)<<16)&4294967295}return g^=i.length,g=2246822507*(65535&(g^=g>>>16))+((2246822507*(g>>>16)&65535)<<16)&4294967295,g=3266489909*(65535&(g^=g>>>13))+((3266489909*(g>>>16)&65535)<<16)&4294967295,(g^=g>>>16)>>>0}}),xe=v(function(r){r.exports=function(i,s){for(var d,m=i.length,g=s^m,_=0;m>=4;)d=1540483477*(65535&(d=255&i.charCodeAt(_)|(255&i.charCodeAt(++_))<<8|(255&i.charCodeAt(++_))<<16|(255&i.charCodeAt(++_))<<24))+((1540483477*(d>>>16)&65535)<<16),g=1540483477*(65535&g)+((1540483477*(g>>>16)&65535)<<16)^(d=1540483477*(65535&(d^=d>>>24))+((1540483477*(d>>>16)&65535)<<16)),m-=4,++_;switch(m){case 3:g^=(255&i.charCodeAt(_+2))<<16;case 2:g^=(255&i.charCodeAt(_+1))<<8;case 1:g=1540483477*(65535&(g^=255&i.charCodeAt(_)))+((1540483477*(g>>>16)&65535)<<16)}return g=1540483477*(65535&(g^=g>>>13))+((1540483477*(g>>>16)&65535)<<16),(g^=g>>>15)>>>0}}),ae=pe,_e=xe;ae.murmur3=pe,ae.murmur2=_e;var Ae=function(){this.ids=[],this.positions=[],this.indexed=!1};Ae.prototype.add=function(r,i,s,d){this.ids.push(Fe(r)),this.positions.push(i,s,d)},Ae.prototype.getPositions=function(r){for(var i=Fe(r),s=0,d=this.ids.length-1;s>1;this.ids[m]>=i?d=m:s=m+1}for(var g=[];this.ids[s]===i;)g.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return g},Ae.serialize=function(r,i){var s=new Float64Array(r.ids),d=new Uint32Array(r.positions);return function m(g,_,A,C){for(;A>1],z=A-1,D=C+1;;){do z++;while(g[z]T);if(z>=D)break;De(g,z,D),De(_,3*z,3*D),De(_,3*z+1,3*D+1),De(_,3*z+2,3*D+2)}D-A_.x+1||C<_.y||C>_.y+1)&&me("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return s}function wn(r,i){return{type:r.type,id:r.id,properties:r.properties,geometry:i?hn(r):[]}}function Xi(r,i,s,d,m){r.emplaceBack(2*i+(d+1)/2,2*s+(m+1)/2)}var Ei=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(function(i){return i.id}),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new Os,this.indexArray=new Ka,this.segments=new Q,this.programConfigurations=new Rt(r.layers,r.zoom),this.stateDependentLayerIds=this.layers.filter(function(i){return i.isStateDependent()}).map(function(i){return i.id})};function Ya(r,i){for(var s=0;s1){if(xu(r,i))return!0;for(var d=0;d1?s:s.sub(i)._mult(m)._add(i))}function bu(r,i){for(var s,d,m,g=!1,_=0;_i.y!=(m=s[C]).y>i.y&&i.x<(m.x-d.x)*(i.y-d.y)/(m.y-d.y)+d.x&&(g=!g);return g}function ia(r,i){for(var s=!1,d=0,m=r.length-1;di.y!=_.y>i.y&&i.x<(_.x-g.x)*(i.y-g.y)/(_.y-g.y)+g.x&&(s=!s)}return s}function wu(r,i,s){var d=s[0],m=s[2];if(r.xm.x&&i.x>m.x||r.ym.y&&i.y>m.y)return!1;var g=Ne(r,i,s[0]);return g!==Ne(r,i,s[1])||g!==Ne(r,i,s[2])||g!==Ne(r,i,s[3])}function oa(r,i,s){var d=i.paint.get(r).value;return d.kind==="constant"?d.value:s.programConfigurations.get(i.id).getMaxValue(r)}function $n(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function wa(r,i,s,d,m){if(!i[0]&&!i[1])return r;var g=k.convert(i)._mult(m);s==="viewport"&&g._rotate(-d);for(var _=[],A=0;A=8192||z<0||z>=8192)){var D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,r.sortKey),U=D.vertexLength;Xi(this.layoutVertexArray,T,z,-1,-1),Xi(this.layoutVertexArray,T,z,1,-1),Xi(this.layoutVertexArray,T,z,1,1),Xi(this.layoutVertexArray,T,z,-1,1),this.indexArray.emplaceBack(U,U+1,U+2),this.indexArray.emplaceBack(U,U+3,U+2),D.vertexLength+=4,D.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,s,{},d)},yt("CircleBucket",Ei,{omit:["layers"]});var es=new ci({"circle-sort-key":new _t(W.layout_circle["circle-sort-key"])}),Fs={paint:new ci({"circle-radius":new _t(W.paint_circle["circle-radius"]),"circle-color":new _t(W.paint_circle["circle-color"]),"circle-blur":new _t(W.paint_circle["circle-blur"]),"circle-opacity":new _t(W.paint_circle["circle-opacity"]),"circle-translate":new wt(W.paint_circle["circle-translate"]),"circle-translate-anchor":new wt(W.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new wt(W.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new wt(W.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _t(W.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _t(W.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _t(W.paint_circle["circle-stroke-opacity"])}),layout:es},Sr=typeof Float32Array<"u"?Float32Array:Array;function so(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}function Bi(r,i,s){var d=i[0],m=i[1],g=i[2],_=i[3],A=i[4],C=i[5],T=i[6],z=i[7],D=i[8],U=i[9],Z=i[10],se=i[11],ce=i[12],be=i[13],ye=i[14],ke=i[15],Pe=s[0],Re=s[1],Oe=s[2],We=s[3];return r[0]=Pe*d+Re*A+Oe*D+We*ce,r[1]=Pe*m+Re*C+Oe*U+We*be,r[2]=Pe*g+Re*T+Oe*Z+We*ye,r[3]=Pe*_+Re*z+Oe*se+We*ke,r[4]=(Pe=s[4])*d+(Re=s[5])*A+(Oe=s[6])*D+(We=s[7])*ce,r[5]=Pe*m+Re*C+Oe*U+We*be,r[6]=Pe*g+Re*T+Oe*Z+We*ye,r[7]=Pe*_+Re*z+Oe*se+We*ke,r[8]=(Pe=s[8])*d+(Re=s[9])*A+(Oe=s[10])*D+(We=s[11])*ce,r[9]=Pe*m+Re*C+Oe*U+We*be,r[10]=Pe*g+Re*T+Oe*Z+We*ye,r[11]=Pe*_+Re*z+Oe*se+We*ke,r[12]=(Pe=s[12])*d+(Re=s[13])*A+(Oe=s[14])*D+(We=s[15])*ce,r[13]=Pe*m+Re*C+Oe*U+We*be,r[14]=Pe*g+Re*T+Oe*Z+We*ye,r[15]=Pe*_+Re*z+Oe*se+We*ke,r}Math.hypot||(Math.hypot=function(){for(var r=arguments,i=0,s=arguments.length;s--;)i+=r[s]*r[s];return Math.sqrt(i)});var js,$v=Bi;function Sc(r,i,s){var d=i[0],m=i[1],g=i[2],_=i[3];return r[0]=s[0]*d+s[4]*m+s[8]*g+s[12]*_,r[1]=s[1]*d+s[5]*m+s[9]*g+s[13]*_,r[2]=s[2]*d+s[6]*m+s[10]*g+s[14]*_,r[3]=s[3]*d+s[7]*m+s[11]*g+s[15]*_,r}js=new Sr(3),Sr!=Float32Array&&(js[0]=0,js[1]=0,js[2]=0),function(){var r=new Sr(4);Sr!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0)}();var qv=(function(){var r=new Sr(2);Sr!=Float32Array&&(r[0]=0,r[1]=0)}(),function(r){function i(s){r.call(this,s,Fs)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.createBucket=function(s){return new Ei(s)},i.prototype.queryRadius=function(s){var d=s;return oa("circle-radius",this,d)+oa("circle-stroke-width",this,d)+$n(this.paint.get("circle-translate"))},i.prototype.queryIntersectsFeature=function(s,d,m,g,_,A,C,T){for(var z=wa(s,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),A.angle,C),D=this.paint.get("circle-radius").evaluate(d,m)+this.paint.get("circle-stroke-width").evaluate(d,m),U=this.paint.get("circle-pitch-alignment")==="map",Z=U?z:function(Ye,at){return Ye.map(function(bt){return Au(bt,at)})}(z,T),se=U?D*C:D,ce=0,be=g;cer.width||m.height>r.height||s.x>r.width-m.width||s.y>r.height-m.height)throw new RangeError("out of range source coordinates for image copy");if(m.width>i.width||m.height>i.height||d.x>i.width-m.width||d.y>i.height-m.height)throw new RangeError("out of range destination coordinates for image copy");for(var _=r.data,A=i.data,C=0;C80*s){d=g=r[0],m=_=r[1];for(var se=s;seg&&(g=A),C>_&&(_=C);T=(T=Math.max(g-d,_-m))!==0?1/T:0}return Cd(U,Z,s,d,m,T),Z}function yb(r,i,s,d,m){var g,_;if(m===Kv(r,i,s,d)>0)for(g=i;g=i;g-=d)_=xb(g,r[g],r[g+1],_);return _&&Yf(_,_.next)&&(Id(_),_=_.next),_}function Al(r,i){if(!r)return r;i||(i=r);var s,d=r;do if(s=!1,d.steiner||!Yf(d,d.next)&&Bn(d.prev,d,d.next)!==0)d=d.next;else{if(Id(d),(d=i=d.prev)===d.next)break;s=!0}while(s||d!==i);return i}function Cd(r,i,s,d,m,g,_){if(r){!_&&g&&function(z,D,U,Z){var se=z;do se.z===null&&(se.z=Hv(se.x,se.y,D,U,Z)),se.prevZ=se.prev,se.nextZ=se.next,se=se.next;while(se!==z);se.prevZ.nextZ=null,se.prevZ=null,function(ce){var be,ye,ke,Pe,Re,Oe,We,Ye,at=1;do{for(ye=ce,ce=null,Re=null,Oe=0;ye;){for(Oe++,ke=ye,We=0,be=0;be0||Ye>0&&ke;)We!==0&&(Ye===0||!ke||ye.z<=ke.z)?(Pe=ye,ye=ye.nextZ,We--):(Pe=ke,ke=ke.nextZ,Ye--),Re?Re.nextZ=Pe:ce=Pe,Pe.prevZ=Re,Re=Pe;ye=ke}Re.nextZ=null,at*=2}while(Oe>1)}(se)}(r,d,m,g);for(var A,C,T=r;r.prev!==r.next;)if(A=r.prev,C=r.next,g?_T(r,d,m,g):vT(r))i.push(A.i/s),i.push(r.i/s),i.push(C.i/s),Id(r),r=C.next,T=C.next;else if((r=C)===T){_?_===1?Cd(r=xT(Al(r),i,s),i,s,d,m,g,2):_===2&&bT(r,i,s,d,m,g):Cd(Al(r),i,s,d,m,g,1);break}}}function vT(r){var i=r.prev,s=r,d=r.next;if(Bn(i,s,d)>=0)return!1;for(var m=r.next.next;m!==r.prev;){if(Cc(i.x,i.y,s.x,s.y,d.x,d.y,m.x,m.y)&&Bn(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function _T(r,i,s,d){var m=r.prev,g=r,_=r.next;if(Bn(m,g,_)>=0)return!1;for(var A=m.x>g.x?m.x>_.x?m.x:_.x:g.x>_.x?g.x:_.x,C=m.y>g.y?m.y>_.y?m.y:_.y:g.y>_.y?g.y:_.y,T=Hv(m.x=T&&U&&U.z<=z;){if(D!==r.prev&&D!==r.next&&Cc(m.x,m.y,g.x,g.y,_.x,_.y,D.x,D.y)&&Bn(D.prev,D,D.next)>=0||(D=D.prevZ,U!==r.prev&&U!==r.next&&Cc(m.x,m.y,g.x,g.y,_.x,_.y,U.x,U.y)&&Bn(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;D&&D.z>=T;){if(D!==r.prev&&D!==r.next&&Cc(m.x,m.y,g.x,g.y,_.x,_.y,D.x,D.y)&&Bn(D.prev,D,D.next)>=0)return!1;D=D.prevZ}for(;U&&U.z<=z;){if(U!==r.prev&&U!==r.next&&Cc(m.x,m.y,g.x,g.y,_.x,_.y,U.x,U.y)&&Bn(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function xT(r,i,s){var d=r;do{var m=d.prev,g=d.next.next;!Yf(m,g)&&vb(m,d,d.next,g)&&kd(m,g)&&kd(g,m)&&(i.push(m.i/s),i.push(d.i/s),i.push(g.i/s),Id(d),Id(d.next),d=r=g),d=d.next}while(d!==r);return Al(d)}function bT(r,i,s,d,m,g){var _=r;do{for(var A=_.next.next;A!==_.prev;){if(_.i!==A.i&&CT(_,A)){var C=_b(_,A);return _=Al(_,_.next),C=Al(C,C.next),Cd(_,i,s,d,m,g),void Cd(C,i,s,d,m,g)}A=A.next}_=_.next}while(_!==r)}function wT(r,i){return r.x-i.x}function AT(r,i){if(i=function(d,m){var g,_=m,A=d.x,C=d.y,T=-1/0;do{if(C<=_.y&&C>=_.next.y&&_.next.y!==_.y){var z=_.x+(C-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(z<=A&&z>T){if(T=z,z===A){if(C===_.y)return _;if(C===_.next.y)return _.next}g=_.x<_.next.x?_:_.next}}_=_.next}while(_!==m);if(!g)return null;if(A===T)return g;var D,U=g,Z=g.x,se=g.y,ce=1/0;_=g;do A>=_.x&&_.x>=Z&&A!==_.x&&Cc(Cg.x||_.x===g.x&&ST(g,_)))&&(g=_,ce=D)),_=_.next;while(_!==U);return g}(r,i)){var s=_b(i,r);Al(i,i.next),Al(s,s.next)}}function ST(r,i){return Bn(r.prev,r,i.prev)<0&&Bn(i.next,r,r.next)<0}function Hv(r,i,s,d,m){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-s)*m)|r<<8))|r<<4))|r<<2))|r<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=32767*(i-d)*m)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function ET(r){var i=r,s=r;do(i.x=0&&(r-_)*(d-A)-(s-_)*(i-A)>=0&&(s-_)*(g-A)-(m-_)*(d-A)>=0}function CT(r,i){return r.next.i!==i.i&&r.prev.i!==i.i&&!function(s,d){var m=s;do{if(m.i!==s.i&&m.next.i!==s.i&&m.i!==d.i&&m.next.i!==d.i&&vb(m,m.next,s,d))return!0;m=m.next}while(m!==s);return!1}(r,i)&&(kd(r,i)&&kd(i,r)&&function(s,d){var m=s,g=!1,_=(s.x+d.x)/2,A=(s.y+d.y)/2;do m.y>A!=m.next.y>A&&m.next.y!==m.y&&_<(m.next.x-m.x)*(A-m.y)/(m.next.y-m.y)+m.x&&(g=!g),m=m.next;while(m!==s);return g}(r,i)&&(Bn(r.prev,r,i.prev)||Bn(r,i.prev,i))||Yf(r,i)&&Bn(r.prev,r,r.next)>0&&Bn(i.prev,i,i.next)>0)}function Bn(r,i,s){return(i.y-r.y)*(s.x-i.x)-(i.x-r.x)*(s.y-i.y)}function Yf(r,i){return r.x===i.x&&r.y===i.y}function vb(r,i,s,d){var m=em(Bn(r,i,s)),g=em(Bn(r,i,d)),_=em(Bn(s,d,r)),A=em(Bn(s,d,i));return m!==g&&_!==A||!(m!==0||!Jf(r,s,i))||!(g!==0||!Jf(r,d,i))||!(_!==0||!Jf(s,r,d))||!(A!==0||!Jf(s,i,d))}function Jf(r,i,s){return i.x<=Math.max(r.x,s.x)&&i.x>=Math.min(r.x,s.x)&&i.y<=Math.max(r.y,s.y)&&i.y>=Math.min(r.y,s.y)}function em(r){return r>0?1:r<0?-1:0}function kd(r,i){return Bn(r.prev,r,r.next)<0?Bn(r,i,r.next)>=0&&Bn(r,r.prev,i)>=0:Bn(r,i,r.prev)<0||Bn(r,r.next,i)<0}function _b(r,i){var s=new Zv(r.i,r.x,r.y),d=new Zv(i.i,i.x,i.y),m=r.next,g=i.prev;return r.next=i,i.prev=r,s.next=m,m.prev=s,d.next=s,s.prev=d,g.next=d,d.prev=g,d}function xb(r,i,s,d){var m=new Zv(r,i,s);return d?(m.next=d.next,m.prev=d,d.next.prev=m,d.next=m):(m.prev=m,m.next=m),m}function Id(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Zv(r,i,s){this.i=r,this.x=i,this.y=s,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Kv(r,i,s,d){for(var m=0,g=i,_=s-d;gC;){if(T-C>600){var D=T-C+1,U=A-C+1,Z=Math.log(D),se=.5*Math.exp(2*Z/3),ce=.5*Math.sqrt(Z*se*(D-se)/D)*(U-D/2<0?-1:1);g(_,A,Math.max(C,Math.floor(A-U*se/D+ce)),Math.min(T,Math.floor(A+(D-U)*se/D+ce)),z)}var be=_[A],ye=C,ke=T;for(Td(_,C,A),z(_[T],be)>0&&Td(_,C,T);ye0;)ke--}z(_[C],be)===0?Td(_,C,ke):Td(_,++ke,T),ke<=A&&(C=ke+1),A<=ke&&(T=ke-1)}})(r,i,s||0,d||r.length-1,m||IT)}function Td(r,i,s){var d=r[i];r[i]=r[s],r[s]=d}function IT(r,i){return ri?1:0}function Xv(r,i){var s=r.length;if(s<=1)return[r];for(var d,m,g=[],_=0;_1)for(var C=0;C0&&s.holes.push(d+=r[m-1].length)}return s},Gv.default=yT;var Aa=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(function(i){return i.id}),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Os,this.indexArray=new Ka,this.indexArray2=new _u,this.programConfigurations=new Rt(r.layers,r.zoom),this.segments=new Q,this.segments2=new Q,this.stateDependentLayerIds=this.layers.filter(function(i){return i.isStateDependent()}).map(function(i){return i.id})};Aa.prototype.populate=function(r,i,s){this.hasPattern=Qv("fill",this.layers,i);for(var d=this.layers[0].layout.get("fill-sort-key"),m=[],g=0,_=r;g<_.length;g+=1){var A=_[g],C=A.feature,T=A.id,z=A.index,D=A.sourceLayerIndex,U=this.layers[0]._featureFilter.needGeometry,Z=wn(C,U);if(this.layers[0]._featureFilter.filter(new ir(this.zoom),Z,s)){var se=d?d.evaluate(Z,{},s,i.availableImages):void 0,ce={id:T,properties:C.properties,type:C.type,sourceLayerIndex:D,index:z,geometry:U?Z.geometry:hn(C),patterns:{},sortKey:se};m.push(ce)}}d&&m.sort(function(Ye,at){return Ye.sortKey-at.sortKey});for(var be=0,ye=m;be>3}if(m--,d===1||d===2)g+=r.readSVarint(),_+=r.readSVarint(),d===1&&(i&&A.push(i),i=[]),i.push(new k(g,_));else{if(d!==7)throw new Error("unknown command "+d);i&&i.push(i[0].clone())}}return i&&A.push(i),A},kc.prototype.bbox=function(){var r=this._pbf;r.pos=this._geometry;for(var i=r.readVarint()+r.pos,s=1,d=0,m=0,g=0,_=1/0,A=-1/0,C=1/0,T=-1/0;r.pos>3}if(d--,s===1||s===2)(m+=r.readSVarint())<_&&(_=m),m>A&&(A=m),(g+=r.readSVarint())T&&(T=g);else if(s!==7)throw new Error("unknown command "+s)}return[_,C,A,T]},kc.prototype.toGeoJSON=function(r,i,s){var d,m,g=this.extent*Math.pow(2,s),_=this.extent*r,A=this.extent*i,C=this.loadGeometry(),T=kc.types[this.type];function z(Z){for(var se=0;se>3;m=_===1?d.readString():_===2?d.readFloat():_===3?d.readDouble():_===4?d.readVarint64():_===5?d.readVarint():_===6?d.readSVarint():_===7?d.readBoolean():null}return m}(s))}function OT(r,i,s){if(r===3){var d=new wb(s,s.readVarint()+s.pos);d.length&&(i[d.name]=d)}}Ab.prototype.feature=function(r){if(r<0||r>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[r];var i=this._pbf.readVarint()+this._pbf.pos;return new bb(this._pbf,i,this.extent,this._keys,this._values)};var Ic={VectorTile:function(r,i){this.layers=r.readFields(OT,{},i)},VectorTileFeature:bb,VectorTileLayer:wb},NT=Ic.VectorTileFeature.types,Jv=Math.pow(2,13);function Pd(r,i,s,d,m,g,_,A){r.emplaceBack(i,s,2*Math.floor(d*Jv)+_,m*Jv*2,g*Jv*2,Math.round(A))}var Sa=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(function(i){return i.id}),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new ba,this.indexArray=new Ka,this.programConfigurations=new Rt(r.layers,r.zoom),this.segments=new Q,this.stateDependentLayerIds=this.layers.filter(function(i){return i.isStateDependent()}).map(function(i){return i.id})};function FT(r,i){return r.x===i.x&&(r.x<0||r.x>8192)||r.y===i.y&&(r.y<0||r.y>8192)}Sa.prototype.populate=function(r,i,s){this.features=[],this.hasPattern=Qv("fill-extrusion",this.layers,i);for(var d=0,m=r;d8192})||rr.every(function(Gt){return Gt.y<0})||rr.every(function(Gt){return Gt.y>8192})))for(var ce=0,be=0;be=1){var ke=se[be-1];if(!FT(ye,ke)){D.vertexLength+4>Q.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Pe=ye.sub(ke)._perp()._unit(),Re=ke.dist(ye);ce+Re>32768&&(ce=0),Pd(this.layoutVertexArray,ye.x,ye.y,Pe.x,Pe.y,0,0,ce),Pd(this.layoutVertexArray,ye.x,ye.y,Pe.x,Pe.y,0,1,ce),Pd(this.layoutVertexArray,ke.x,ke.y,Pe.x,Pe.y,0,0,ce+=Re),Pd(this.layoutVertexArray,ke.x,ke.y,Pe.x,Pe.y,0,1,ce);var Oe=D.vertexLength;this.indexArray.emplaceBack(Oe,Oe+2,Oe+1),this.indexArray.emplaceBack(Oe+1,Oe+2,Oe+3),D.vertexLength+=4,D.primitiveLength+=2}}}}if(D.vertexLength+C>Q.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(C,this.layoutVertexArray,this.indexArray)),NT[r.type]==="Polygon"){for(var We=[],Ye=[],at=D.vertexLength,bt=0,dt=A;bt=2&&r[C-1].equals(r[C-2]);)C--;for(var T=0;T0;if(Ye&&ye>T){var bt=z.dist(Z);if(bt>2*D){var dt=z.sub(z.sub(Z)._mult(D/bt)._round());this.updateDistance(Z,dt),this.addCurrentVertex(dt,ce,0,0,U),Z=dt}}var St=Z&&se,ft=St?s:A?"butt":d;if(St&&ft==="round"&&(Oem&&(ft="bevel"),ft==="bevel"&&(Oe>2&&(ft="flipbevel"),Oe100)ke=be.mult(-1);else{var Xt=Oe*ce.add(be).mag()/ce.sub(be).mag();ke._perp()._mult(Xt*(at?-1:1))}this.addCurrentVertex(z,ke,0,0,U),this.addCurrentVertex(z,ke.mult(-1),0,0,U)}else if(ft==="bevel"||ft==="fakeround"){var Dt=-Math.sqrt(Oe*Oe-1),xt=at?Dt:0,rr=at?0:Dt;if(Z&&this.addCurrentVertex(z,ce,xt,rr,U),ft==="fakeround")for(var Gt=Math.round(180*We/Math.PI/20),hr=1;hr2*D){var rn=z.add(se.sub(z)._mult(D/fn)._round());this.updateDistance(z,rn),this.addCurrentVertex(rn,be,0,0,U),z=rn}}}}},Oi.prototype.addCurrentVertex=function(r,i,s,d,m,g){g===void 0&&(g=!1);var _=i.y*d-i.x,A=-i.y-i.x*d;this.addHalfVertex(r,i.x+i.y*s,i.y-i.x*s,g,!1,s,m),this.addHalfVertex(r,_,A,g,!0,-d,m),this.distance>Eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(r,i,s,d,m,g))},Oi.prototype.addHalfVertex=function(r,i,s,d,m,g,_){var A=.5*(this.lineClips?this.scaledDistance*(Eb-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((r.x<<1)+(d?1:0),(r.y<<1)+(m?1:0),Math.round(63*i)+128,Math.round(63*s)+128,1+(g===0?0:g<0?-1:1)|(63&A)<<2,A>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var C=_.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,C),_.primitiveLength++),m?this.e2=C:this.e1=C},Oi.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Oi.prototype.updateDistance=function(r,i){this.distance+=r.dist(i),this.updateScaledDistance()},yt("LineBucket",Oi,{omit:["layers","patternFeatures"]});var GT=new ci({"line-cap":new wt(W.layout_line["line-cap"]),"line-join":new _t(W.layout_line["line-join"]),"line-miter-limit":new wt(W.layout_line["line-miter-limit"]),"line-round-limit":new wt(W.layout_line["line-round-limit"]),"line-sort-key":new _t(W.layout_line["line-sort-key"])}),Cb={paint:new ci({"line-opacity":new _t(W.paint_line["line-opacity"]),"line-color":new _t(W.paint_line["line-color"]),"line-translate":new wt(W.paint_line["line-translate"]),"line-translate-anchor":new wt(W.paint_line["line-translate-anchor"]),"line-width":new _t(W.paint_line["line-width"]),"line-gap-width":new _t(W.paint_line["line-gap-width"]),"line-offset":new _t(W.paint_line["line-offset"]),"line-blur":new _t(W.paint_line["line-blur"]),"line-dasharray":new Si(W.paint_line["line-dasharray"]),"line-pattern":new _c(W.paint_line["line-pattern"]),"line-gradient":new Fo(W.paint_line["line-gradient"])}),layout:GT},kb=new(function(r){function i(){r.apply(this,arguments)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.possiblyEvaluate=function(s,d){return d=new ir(Math.floor(d.zoom),{now:d.now,fadeDuration:d.fadeDuration,zoomHistory:d.zoomHistory,transition:d.transition}),r.prototype.possiblyEvaluate.call(this,s,d)},i.prototype.evaluate=function(s,d,m,g){return d=F({},d,{zoom:Math.floor(d.zoom)}),r.prototype.evaluate.call(this,s,d,m,g)},i}(_t))(Cb.paint.properties["line-width"].specification);kb.useIntegerZoom=!0;var HT=function(r){function i(s){r.call(this,s,Cb),this.gradientVersion=0}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype._handleSpecialPaintPropertyUpdate=function(s){s==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof qi,this.gradientVersion=(this.gradientVersion+1)%q)},i.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},i.prototype.recalculate=function(s,d){r.prototype.recalculate.call(this,s,d),this.paint._values["line-floorwidth"]=kb.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,s)},i.prototype.createBucket=function(s){return new Oi(s)},i.prototype.queryRadius=function(s){var d=s,m=Ib(oa("line-width",this,d),oa("line-gap-width",this,d)),g=oa("line-offset",this,d);return m/2+Math.abs(g)+$n(this.paint.get("line-translate"))},i.prototype.queryIntersectsFeature=function(s,d,m,g,_,A,C){var T=wa(s,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),A.angle,C),z=C/2*Ib(this.paint.get("line-width").evaluate(d,m),this.paint.get("line-gap-width").evaluate(d,m)),D=this.paint.get("line-offset").evaluate(d,m);return D&&(g=function(U,Z){for(var se=[],ce=new k(0,0),be=0;be=3){for(var ye=0;ye0?i+2*r:r}var ZT=Yn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),KT=Yn([{name:"a_projected_pos",components:3,type:"Float32"}],4),XT=(Yn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Yn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Tb=(Yn([{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"}]),Yn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),QT=Yn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function YT(r,i,s){return r.sections.forEach(function(d){d.text=function(m,g,_){var A=g.layout.get("text-transform").evaluate(_,{});return A==="uppercase"?m=m.toLocaleUpperCase():A==="lowercase"&&(m=m.toLocaleLowerCase()),ao.applyArabicShaping&&(m=ao.applyArabicShaping(m)),m}(d.text,i,s)}),r}Yn([{name:"triangle",components:3,type:"Uint16"}]),Yn([{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"}]),Yn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Yn([{type:"Float32",name:"offsetX"}]),Yn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var zd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Pb=function(r,i,s,d,m){var g,_,A=8*m-d-1,C=(1<>1,z=-7,D=s?m-1:0,U=s?-1:1,Z=r[i+D];for(D+=U,g=Z&(1<<-z)-1,Z>>=-z,z+=A;z>0;g=256*g+r[i+D],D+=U,z-=8);for(_=g&(1<<-z)-1,g>>=-z,z+=d;z>0;_=256*_+r[i+D],D+=U,z-=8);if(g===0)g=1-T;else{if(g===C)return _?NaN:1/0*(Z?-1:1);_+=Math.pow(2,d),g-=T}return(Z?-1:1)*_*Math.pow(2,g-d)},Mb=function(r,i,s,d,m,g){var _,A,C,T=8*g-m-1,z=(1<>1,U=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,Z=d?0:g-1,se=d?1:-1,ce=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(A=isNaN(i)?1:0,_=z):(_=Math.floor(Math.log(i)/Math.LN2),i*(C=Math.pow(2,-_))<1&&(_--,C*=2),(i+=_+D>=1?U/C:U*Math.pow(2,1-D))*C>=2&&(_++,C/=2),_+D>=z?(A=0,_=z):_+D>=1?(A=(i*C-1)*Math.pow(2,m),_+=D):(A=i*Math.pow(2,D-1)*Math.pow(2,m),_=0));m>=8;r[s+Z]=255&A,Z+=se,A/=256,m-=8);for(_=_<0;r[s+Z]=255&_,Z+=se,_/=256,T-=8);r[s+Z-se]|=128*ce},tm=Gr;function Gr(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}Gr.Varint=0,Gr.Fixed64=1,Gr.Bytes=2,Gr.Fixed32=5;var zb=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Us(r){return r.type===Gr.Bytes?r.readVarint()+r.pos:r.pos+1}function Tc(r,i,s){return s?4294967296*i+(r>>>0):4294967296*(i>>>0)+(r>>>0)}function Lb(r,i,s){var d=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));s.realloc(d);for(var m=s.pos-1;m>=r;m--)s.buf[m+d]=s.buf[m]}function JT(r,i){for(var s=0;s>>8,r[s+2]=i>>>16,r[s+3]=i>>>24}function Rb(r,i){return(r[i]|r[i+1]<<8|r[i+2]<<16)+(r[i+3]<<24)}function lP(r,i,s){r===1&&s.readMessage(uP,i)}function uP(r,i,s){if(r===3){var d=s.readMessage(cP,{}),m=d.width,g=d.height,_=d.left,A=d.top,C=d.advance;i.push({id:d.id,bitmap:new Su({width:m+6,height:g+6},d.bitmap),metrics:{width:m,height:g,left:_,top:A,advance:C}})}}function cP(r,i,s){r===1?i.id=s.readVarint():r===2?i.bitmap=s.readBytes():r===3?i.width=s.readVarint():r===4?i.height=s.readVarint():r===5?i.left=s.readSVarint():r===6?i.top=s.readSVarint():r===7&&(i.advance=s.readVarint())}function Db(r){for(var i=0,s=0,d=0,m=r;d=0;U--){var Z=_[U];if(!(D.w>Z.w||D.h>Z.h)){if(D.x=Z.x,D.y=Z.y,C=Math.max(C,D.y+D.h),A=Math.max(A,D.x+D.w),D.w===Z.w&&D.h===Z.h){var se=_.pop();U<_.length&&(_[U]=se)}else D.h===Z.h?(Z.x+=D.w,Z.w-=D.w):D.w===Z.w?(Z.y+=D.h,Z.h-=D.h):(_.push({x:Z.x+D.w,y:Z.y,w:Z.w-D.w,h:D.h}),Z.y+=D.h,Z.h-=D.h);break}}return{w:A,h:C,fill:i/(A*C)||0}}Gr.prototype={destroy:function(){this.buf=null},readFields:function(r,i,s){for(s=s||this.length;this.pos>3,g=this.pos;this.type=7&d,r(m,i,this),this.pos===g&&this.skip(d)}return i},readMessage:function(r,i){return this.readFields(r,i,this.readVarint()+this.pos)},readFixed32:function(){var r=rm(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=Rb(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=rm(this.buf,this.pos)+4294967296*rm(this.buf,this.pos+4);return this.pos+=8,r},readSFixed64:function(){var r=rm(this.buf,this.pos)+4294967296*Rb(this.buf,this.pos+4);return this.pos+=8,r},readFloat:function(){var r=Pb(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=Pb(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var i,s,d=this.buf;return i=127&(s=d[this.pos++]),s<128?i:(i|=(127&(s=d[this.pos++]))<<7,s<128?i:(i|=(127&(s=d[this.pos++]))<<14,s<128?i:(i|=(127&(s=d[this.pos++]))<<21,s<128?i:function(m,g,_){var A,C,T=_.buf;if(A=(112&(C=T[_.pos++]))>>4,C<128||(A|=(127&(C=T[_.pos++]))<<3,C<128)||(A|=(127&(C=T[_.pos++]))<<10,C<128)||(A|=(127&(C=T[_.pos++]))<<17,C<128)||(A|=(127&(C=T[_.pos++]))<<24,C<128)||(A|=(1&(C=T[_.pos++]))<<31,C<128))return Tc(m,A,g);throw new Error("Expected varint not more than 10 bytes")}(i|=(15&(s=d[this.pos]))<<28,r,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2==1?(r+1)/-2:r/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var r=this.readVarint()+this.pos,i=this.pos;return this.pos=r,r-i>=12&&zb?function(s,d,m){return zb.decode(s.subarray(d,m))}(this.buf,i,r):function(s,d,m){for(var g="",_=d;_239?4:z>223?3:z>191?2:1;if(_+U>m)break;U===1?z<128&&(D=z):U===2?(192&(A=s[_+1]))==128&&(D=(31&z)<<6|63&A)<=127&&(D=null):U===3?(C=s[_+2],(192&(A=s[_+1]))==128&&(192&C)==128&&((D=(15&z)<<12|(63&A)<<6|63&C)<=2047||D>=55296&&D<=57343)&&(D=null)):U===4&&(C=s[_+2],T=s[_+3],(192&(A=s[_+1]))==128&&(192&C)==128&&(192&T)==128&&((D=(15&z)<<18|(63&A)<<12|(63&C)<<6|63&T)<=65535||D>=1114112)&&(D=null)),D===null?(D=65533,U=1):D>65535&&(D-=65536,g+=String.fromCharCode(D>>>10&1023|55296),D=56320|1023&D),g+=String.fromCharCode(D),_+=U}return g}(this.buf,i,r)},readBytes:function(){var r=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,r);return this.pos=r,i},readPackedVarint:function(r,i){if(this.type!==Gr.Bytes)return r.push(this.readVarint(i));var s=Us(this);for(r=r||[];this.pos127;);else if(i===Gr.Bytes)this.pos=this.readVarint()+this.pos;else if(i===Gr.Fixed32)this.pos+=4;else{if(i!==Gr.Fixed64)throw new Error("Unimplemented type: "+i);this.pos+=8}},writeTag:function(r,i){this.writeVarint(r<<3|i)},realloc:function(r){for(var i=this.length||16;i268435455||r<0?function(i,s){var d,m;if(i>=0?(d=i%4294967296|0,m=i/4294967296|0):(m=~(-i/4294967296),4294967295^(d=~(-i%4294967296))?d=d+1|0:(d=0,m=m+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");s.realloc(10),function(g,_,A){A.buf[A.pos++]=127&g|128,g>>>=7,A.buf[A.pos++]=127&g|128,g>>>=7,A.buf[A.pos++]=127&g|128,g>>>=7,A.buf[A.pos++]=127&g|128,A.buf[A.pos]=127&(g>>>=7)}(d,0,s),function(g,_){var A=(7&g)<<4;_.buf[_.pos++]|=A|((g>>>=3)?128:0),g&&(_.buf[_.pos++]=127&g|((g>>>=7)?128:0),g&&(_.buf[_.pos++]=127&g|((g>>>=7)?128:0),g&&(_.buf[_.pos++]=127&g|((g>>>=7)?128:0),g&&(_.buf[_.pos++]=127&g|((g>>>=7)?128:0),g&&(_.buf[_.pos++]=127&g)))))}(m,s)}(r,this):(this.realloc(4),this.buf[this.pos++]=127&r|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=r>>>7&127))))},writeSVarint:function(r){this.writeVarint(r<0?2*-r-1:2*r)},writeBoolean:function(r){this.writeVarint(!!r)},writeString:function(r){r=String(r),this.realloc(4*r.length),this.pos++;var i=this.pos;this.pos=function(d,m,g){for(var _,A,C=0;C55295&&_<57344){if(!A){_>56319||C+1===m.length?(d[g++]=239,d[g++]=191,d[g++]=189):A=_;continue}if(_<56320){d[g++]=239,d[g++]=191,d[g++]=189,A=_;continue}_=A-55296<<10|_-56320|65536,A=null}else A&&(d[g++]=239,d[g++]=191,d[g++]=189,A=null);_<128?d[g++]=_:(_<2048?d[g++]=_>>6|192:(_<65536?d[g++]=_>>12|224:(d[g++]=_>>18|240,d[g++]=_>>12&63|128),d[g++]=_>>6&63|128),d[g++]=63&_|128)}return g}(this.buf,r,this.pos);var s=this.pos-i;s>=128&&Lb(i,s,this),this.pos=i-1,this.writeVarint(s),this.pos+=s},writeFloat:function(r){this.realloc(4),Mb(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),Mb(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var i=r.length;this.writeVarint(i),this.realloc(i);for(var s=0;s=128&&Lb(s,d,this),this.pos=s-1,this.writeVarint(d),this.pos+=d},writeMessage:function(r,i,s){this.writeTag(r,Gr.Bytes),this.writeRawMessage(i,s)},writePackedVarint:function(r,i){i.length&&this.writeMessage(r,JT,i)},writePackedSVarint:function(r,i){i.length&&this.writeMessage(r,eP,i)},writePackedBoolean:function(r,i){i.length&&this.writeMessage(r,nP,i)},writePackedFloat:function(r,i){i.length&&this.writeMessage(r,tP,i)},writePackedDouble:function(r,i){i.length&&this.writeMessage(r,rP,i)},writePackedFixed32:function(r,i){i.length&&this.writeMessage(r,iP,i)},writePackedSFixed32:function(r,i){i.length&&this.writeMessage(r,oP,i)},writePackedFixed64:function(r,i){i.length&&this.writeMessage(r,aP,i)},writePackedSFixed64:function(r,i){i.length&&this.writeMessage(r,sP,i)},writeBytesField:function(r,i){this.writeTag(r,Gr.Bytes),this.writeBytes(i)},writeFixed32Field:function(r,i){this.writeTag(r,Gr.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(r,i){this.writeTag(r,Gr.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(r,i){this.writeTag(r,Gr.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(r,i){this.writeTag(r,Gr.Fixed64),this.writeSFixed64(i)},writeVarintField:function(r,i){this.writeTag(r,Gr.Varint),this.writeVarint(i)},writeSVarintField:function(r,i){this.writeTag(r,Gr.Varint),this.writeSVarint(i)},writeStringField:function(r,i){this.writeTag(r,Gr.Bytes),this.writeString(i)},writeFloatField:function(r,i){this.writeTag(r,Gr.Fixed32),this.writeFloat(i)},writeDoubleField:function(r,i){this.writeTag(r,Gr.Fixed64),this.writeDouble(i)},writeBooleanField:function(r,i){this.writeVarintField(r,!!i)}};var nm=function(r,i){var s=i.pixelRatio,d=i.version,m=i.stretchX,g=i.stretchY,_=i.content;this.paddedRect=r,this.pixelRatio=s,this.stretchX=m,this.stretchY=g,this.content=_,this.version=d},Ld={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Ld.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Ld.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Ld.tlbr.get=function(){return this.tl.concat(this.br)},Ld.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(nm.prototype,Ld);var Rd=function(r,i){var s={},d={};this.haveRenderCallbacks=[];var m=[];this.addImages(r,s,m),this.addImages(i,d,m);var g=Db(m),_=new Qi({width:g.w||1,height:g.h||1});for(var A in r){var C=r[A],T=s[A].paddedRect;Qi.copy(C.data,_,{x:0,y:0},{x:T.x+1,y:T.y+1},C.data)}for(var z in i){var D=i[z],U=d[z].paddedRect,Z=U.x+1,se=U.y+1,ce=D.data.width,be=D.data.height;Qi.copy(D.data,_,{x:0,y:0},{x:Z,y:se},D.data),Qi.copy(D.data,_,{x:0,y:be-1},{x:Z,y:se-1},{width:ce,height:1}),Qi.copy(D.data,_,{x:0,y:0},{x:Z,y:se+be},{width:ce,height:1}),Qi.copy(D.data,_,{x:ce-1,y:0},{x:Z-1,y:se},{width:1,height:be}),Qi.copy(D.data,_,{x:0,y:0},{x:Z+ce,y:se},{width:1,height:be})}this.image=_,this.iconPositions=s,this.patternPositions=d};Rd.prototype.addImages=function(r,i,s){for(var d in r){var m=r[d],g={x:0,y:0,w:m.data.width+2,h:m.data.height+2};s.push(g),i[d]=new nm(g,m),m.hasRenderCallback&&this.haveRenderCallbacks.push(d)}},Rd.prototype.patchUpdatedImages=function(r,i){for(var s in r.dispatchRenderCallbacks(this.haveRenderCallbacks),r.updatedImages)this.patchUpdatedImage(this.iconPositions[s],r.getImage(s),i),this.patchUpdatedImage(this.patternPositions[s],r.getImage(s),i)},Rd.prototype.patchUpdatedImage=function(r,i,s){if(r&&i&&r.version!==i.version){r.version=i.version;var d=r.tl;s.update(i.data,void 0,{x:d[0],y:d[1]})}},yt("ImagePosition",nm),yt("ImageAtlas",Rd);var wo={horizontal:1,vertical:2,horizontalOnly:3},Mc=function(){this.scale=1,this.fontStack="",this.imageName=null};Mc.forText=function(r,i){var s=new Mc;return s.scale=r||1,s.fontStack=i,s},Mc.forImage=function(r){var i=new Mc;return i.imageName=r,i};var Ci=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function im(r,i,s,d,m,g,_,A,C,T,z,D,U,Z,se,ce){var be,ye=Ci.fromFeature(r,m);D===wo.vertical&&ye.verticalizePunctuation();var ke=ao.processBidirectionalText,Pe=ao.processStyledBidirectionalText;if(ke&&ye.sections.length===1){be=[];for(var Re=0,Oe=ke(ye.toString(),e0(ye,T,g,i,d,Z,se));Re0&&Uc>zn&&(zn=Uc)}else{var fm=Gt[_r.fontStack],Vc=fm&&fm[Ao];if(Vc&&Vc.rect)ns=Vc.rect,Sn=Vc.metrics;else{var Od=rr[_r.fontStack],mm=Od&&Od[Ao];if(!mm)continue;Sn=mm.metrics}rs=24*(gr-_r.scale)}Iu?(xt.verticalizable=!0,Kr.push({glyph:Ao,imageName:aa,x:Wn,y:ki+rs,vertical:Iu,scale:_r.scale,fontStack:_r.fontStack,sectionIndex:ts,metrics:Sn,rect:ns}),Wn+=Fc*_r.scale+rn):(Kr.push({glyph:Ao,imageName:aa,x:Wn,y:ki+rs,vertical:Iu,scale:_r.scale,fontStack:_r.fontStack,sectionIndex:ts,metrics:Sn,rect:ns}),Wn+=Sn.advance*_r.scale+rn)}Kr.length!==0&&(ti=Math.max(Wn-rn,ti),dP(Kr,0,Kr.length-1,An,zn)),Wn=0;var gm=vr*gr+zn;gi.lineOffset=Math.max(zn,Ni),ki+=gm,Ii=Math.max(gm,Ii),++ri}else ki+=vr,++ri}var Ws,Nd=ki- -17,$c=t0(tn),El=$c.horizontalAlign,qc=$c.verticalAlign;(function(ym,vm,Fd,jd,_m,Ud,Vd,$d,xm){var Wc,bm=(vm-Fd)*_m;Wc=Ud!==Vd?-$d*jd- -17:(-jd*xm+.5)*Vd;for(var Gc=0,qd=ym;Gc=0&&d>=r&&om[this.text.charCodeAt(d)];d--)s--;this.text=this.text.substring(r,s),this.sectionIndex=this.sectionIndex.slice(r,s)},Ci.prototype.substring=function(r,i){var s=new Ci;return s.text=this.text.substring(r,i),s.sectionIndex=this.sectionIndex.slice(r,i),s.sections=this.sections,s},Ci.prototype.toString=function(){return this.text},Ci.prototype.getMaxScale=function(){var r=this;return this.sectionIndex.reduce(function(i,s){return Math.max(i,r.sections[s].scale)},0)},Ci.prototype.addTextSection=function(r,i){this.text+=r.text,this.sections.push(Mc.forText(r.scale,r.fontStack||i));for(var s=this.sections.length-1,d=0;d=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var om={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},lo={};function Bb(r,i,s,d,m,g){if(i.imageName){var _=d[i.imageName];return _?_.displaySize[0]*i.scale*24/g+m:0}var A=s[i.fontStack],C=A&&A[r];return C?C.metrics.advance*i.scale+m:0}function Ob(r,i,s,d){var m=Math.pow(r-i,2);return d?r=0,D=0,U=0;U-s/2;){if(--_<0)return!1;A-=r[_].dist(g),g=r[_]}A+=r[_].dist(r[_+1]),_++;for(var C=[],T=0;Ad;)T-=C.shift().angleDelta;if(T>m)return!1;_++,A+=z.dist(D)}return!0}function $b(r){for(var i=0,s=0;sT){var se=(T-C)/Z,ce=Pn(D.x,U.x,se),be=Pn(D.y,U.y,se),ye=new zc(ce,be,U.angleTo(D),z);return ye._round(),!_||Vb(r,ye,A,_,i)?ye:void 0}C+=Z}}function mP(r,i,s,d,m,g,_,A,C){var T=qb(d,g,_),z=Wb(d,m),D=z*_,U=r[0].x===0||r[0].x===C||r[0].y===0||r[0].y===C;return i-D=0&&hr=0&&Et=0&&dt+Ye<=at){var vr=new zc(hr,Et,rr,ft);vr._round(),ye&&!Vb(se,vr,Pe,ye,ke)||St.push(vr)}}bt+=xt}return Oe||St.length||Re||(St=Z(se,bt/2,be,ye,ke,Pe,Re,!0,We)),St}(r,U?i/2*A%i:(z/2+2*g)*_*A%i,i,T,s,D,U,!1,C)}function Gb(r,i,s,d,m){for(var g=[],_=0;_=d&&D.x>=d||(z.x>=d?z=new k(d,z.y+(d-z.x)/(D.x-z.x)*(D.y-z.y))._round():D.x>=d&&(D=new k(d,z.y+(d-z.x)/(D.x-z.x)*(D.y-z.y))._round()),z.y>=m&&D.y>=m||(z.y>=m?z=new k(z.x+(m-z.y)/(D.y-z.y)*(D.x-z.x),m)._round():D.y>=m&&(D=new k(z.x+(m-z.y)/(D.y-z.y)*(D.x-z.x),m)._round()),C&&z.equals(C[C.length-1])||g.push(C=[z]),C.push(D)))))}return g}function Hb(r,i,s,d){var m=[],g=r.image,_=g.pixelRatio,A=g.paddedRect.w-2,C=g.paddedRect.h-2,T=r.right-r.left,z=r.bottom-r.top,D=g.stretchX||[[0,A]],U=g.stretchY||[[0,C]],Z=function(hr,Et){return hr+Et[1]-Et[0]},se=D.reduce(Z,0),ce=U.reduce(Z,0),be=A-se,ye=C-ce,ke=0,Pe=se,Re=0,Oe=ce,We=0,Ye=be,at=0,bt=ye;if(g.content&&d){var dt=g.content;ke=am(D,0,dt[0]),Re=am(U,0,dt[1]),Pe=am(D,dt[0],dt[2]),Oe=am(U,dt[1],dt[3]),We=dt[0]-ke,at=dt[1]-Re,Ye=dt[2]-dt[0]-Pe,bt=dt[3]-dt[1]-Oe}var St=function(hr,Et,vr,tn){var gn=sm(hr.stretch-ke,Pe,T,r.left),fn=lm(hr.fixed-We,Ye,hr.stretch,se),rn=sm(Et.stretch-Re,Oe,z,r.top),yn=lm(Et.fixed-at,bt,Et.stretch,ce),qn=sm(vr.stretch-ke,Pe,T,r.left),Wn=lm(vr.fixed-We,Ye,vr.stretch,se),ki=sm(tn.stretch-Re,Oe,z,r.top),ti=lm(tn.fixed-at,bt,tn.stretch,ce),Ii=new k(gn,rn),An=new k(qn,rn),ri=new k(qn,ki),or=new k(gn,ki),Vr=new k(fn/_,yn/_),Mr=new k(Wn/_,ti/_),gr=i*Math.PI/180;if(gr){var Ni=Math.sin(gr),gi=Math.cos(gr),Kr=[gi,-Ni,Ni,gi];Ii._matMult(Kr),An._matMult(Kr),or._matMult(Kr),ri._matMult(Kr)}var zn=hr.stretch+hr.fixed,yi=Et.stretch+Et.fixed;return{tl:Ii,tr:An,bl:or,br:ri,tex:{x:g.paddedRect.x+1+zn,y:g.paddedRect.y+1+yi,w:vr.stretch+vr.fixed-zn,h:tn.stretch+tn.fixed-yi},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Vr,pixelOffsetBR:Mr,minFontScaleX:Ye/_/T,minFontScaleY:bt/_/z,isSDF:s}};if(d&&(g.stretchX||g.stretchY))for(var ft=Zb(D,be,se),Xt=Zb(U,ye,ce),Dt=0;Dt0&&(Z=Math.max(10,Z),this.circleDiameter=Z)}else{var se=g.top*_-A,ce=g.bottom*_+A,be=g.left*_-A,ye=g.right*_+A,ke=g.collisionPadding;if(ke&&(be-=ke[0]*_,se-=ke[1]*_,ye+=ke[2]*_,ce+=ke[3]*_),T){var Pe=new k(be,se),Re=new k(ye,se),Oe=new k(be,ce),We=new k(ye,ce),Ye=T*Math.PI/180;Pe._rotate(Ye),Re._rotate(Ye),Oe._rotate(Ye),We._rotate(Ye),be=Math.min(Pe.x,Re.x,Oe.x,We.x),ye=Math.max(Pe.x,Re.x,Oe.x,We.x),se=Math.min(Pe.y,Re.y,Oe.y,We.y),ce=Math.max(Pe.y,Re.y,Oe.y,We.y)}r.emplaceBack(i.x,i.y,be,se,ye,ce,s,d,m)}this.boxEndIndex=r.length},Lc=function(r,i){if(r===void 0&&(r=[]),i===void 0&&(i=gP),this.data=r,this.length=this.data.length,this.compare=i,this.length>0)for(var s=(this.length>>1)-1;s>=0;s--)this._down(s)};function gP(r,i){return ri?1:0}function yP(r,i,s){i===void 0&&(i=1),s===void 0&&(s=!1);for(var d=1/0,m=1/0,g=-1/0,_=-1/0,A=r[0],C=0;Cg)&&(g=T.x),(!C||T.y>_)&&(_=T.y)}var z=Math.min(g-d,_-m),D=z/2,U=new Lc([],vP);if(z===0)return new k(d,m);for(var Z=d;Zce.d||!ce.d)&&(ce=ye,s&&console.log("found best %d after %d probes",Math.round(1e4*ye.d)/1e4,be)),ye.max-ce.d<=i||(U.push(new Rc(ye.p.x-(D=ye.h/2),ye.p.y-D,D,r)),U.push(new Rc(ye.p.x+D,ye.p.y-D,D,r)),U.push(new Rc(ye.p.x-D,ye.p.y+D,D,r)),U.push(new Rc(ye.p.x+D,ye.p.y+D,D,r)),be+=4)}return s&&(console.log("num probes: "+be),console.log("best distance: "+ce.d)),ce.p}function vP(r,i){return i.max-r.max}function Rc(r,i,s,d){this.p=new k(r,i),this.h=s,this.d=function(m,g){for(var _=!1,A=1/0,C=0;Cm.y!=se.y>m.y&&m.x<(se.x-Z.x)*(m.y-Z.y)/(se.y-Z.y)+Z.x&&(_=!_),A=Math.min(A,bl(m,Z,se))}return(_?1:-1)*Math.sqrt(A)}(this.p,d),this.max=this.d+this.h*Math.SQRT2}Lc.prototype.push=function(r){this.data.push(r),this.length++,this._up(this.length-1)},Lc.prototype.pop=function(){if(this.length!==0){var r=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),r}},Lc.prototype.peek=function(){return this.data[0]},Lc.prototype._up=function(r){for(var i=this.data,s=this.compare,d=i[r];r>0;){var m=r-1>>1,g=i[m];if(s(d,g)>=0)break;i[r]=g,r=m}i[r]=d},Lc.prototype._down=function(r){for(var i=this.data,s=this.compare,d=this.length>>1,m=i[r];r=0)break;i[r]=_,r=g}i[r]=m};var n0=Number.POSITIVE_INFINITY;function Kb(r,i){return i[1]!==n0?function(s,d,m){var g=0,_=0;switch(d=Math.abs(d),m=Math.abs(m),s){case"top-right":case"top-left":case"top":_=m-7;break;case"bottom-right":case"bottom-left":case"bottom":_=7-m}switch(s){case"top-right":case"bottom-right":case"right":g=-d;break;case"top-left":case"bottom-left":case"left":g=d}return[g,_]}(r,i[0],i[1]):function(s,d){var m=0,g=0;d<0&&(d=0);var _=d/Math.sqrt(2);switch(s){case"top-right":case"top-left":g=_-7;break;case"bottom-right":case"bottom-left":g=7-_;break;case"bottom":g=7-d;break;case"top":g=d-7}switch(s){case"top-right":case"bottom-right":m=-_;break;case"top-left":case"bottom-left":m=_;break;case"left":m=d;break;case"right":m=-d}return[m,g]}(r,i[0])}function i0(r){switch(r){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Xb(r,i,s,d,m,g,_,A,C,T,z,D,U,Z,se){var ce=function(Re,Oe,We,Ye,at,bt,dt,St){for(var ft=Ye.layout.get("text-rotate").evaluate(bt,{})*Math.PI/180,Xt=[],Dt=0,xt=Oe.positionedLines;Dt32640&&me(r.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):be.kind==="composite"&&((ye=[128*Z.compositeTextSizes[0].evaluate(_,{},se),128*Z.compositeTextSizes[1].evaluate(_,{},se)])[0]>32640||ye[1]>32640)&&me(r.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),r.addSymbols(r.text,ce,ye,A,g,_,T,i,C.lineStartIndex,C.lineLength,U,se);for(var ke=0,Pe=z;ke=0;_--)if(d.dist(g[_])0)&&(g.value.kind!=="constant"||g.value.value.length>0),T=A.value.kind!=="constant"||!!A.value.value||Object.keys(A.parameters).length>0,z=m.get("symbol-sort-key");if(this.features=[],C||T){for(var D=i.iconDependencies,U=i.glyphDependencies,Z=i.availableImages,se=new ir(this.zoom),ce=0,be=r;ce=0;for(var rr=0,Gt=at.sections;rr=0;A--)g[A]={x:i[A].x,y:i[A].y,tileUnitDistanceFromAnchor:m},A>0&&(m+=i[A-1].dist(i[A]));for(var C=0;C0},Or.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Or.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Or.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Or.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Or.prototype.addIndicesForPlacedSymbol=function(r,i){for(var s=r.placedSymbolArray.get(i),d=s.vertexStartIndex+4*s.numGlyphs,m=s.vertexStartIndex;m1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(r),this.sortedAngle=r,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var s=0,d=this.symbolInstanceIndexes;s=0&&A.indexOf(g)===_&&i.addIndicesForPlacedSymbol(i.text,g)}),m.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,m.verticalPlacedTextSymbolIndex),m.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,m.placedIconSymbolIndex),m.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,m.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},yt("SymbolBucket",Or,{omit:["layers","collisionBoxArray","features","compareText"]}),Or.MAX_GLYPHS=65535,Or.addDynamicAttributes=o0;var AP=new ci({"symbol-placement":new wt(W.layout_symbol["symbol-placement"]),"symbol-spacing":new wt(W.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wt(W.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _t(W.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wt(W.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wt(W.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new wt(W.layout_symbol["icon-ignore-placement"]),"icon-optional":new wt(W.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wt(W.layout_symbol["icon-rotation-alignment"]),"icon-size":new _t(W.layout_symbol["icon-size"]),"icon-text-fit":new wt(W.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wt(W.layout_symbol["icon-text-fit-padding"]),"icon-image":new _t(W.layout_symbol["icon-image"]),"icon-rotate":new _t(W.layout_symbol["icon-rotate"]),"icon-padding":new wt(W.layout_symbol["icon-padding"]),"icon-keep-upright":new wt(W.layout_symbol["icon-keep-upright"]),"icon-offset":new _t(W.layout_symbol["icon-offset"]),"icon-anchor":new _t(W.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wt(W.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wt(W.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wt(W.layout_symbol["text-rotation-alignment"]),"text-field":new _t(W.layout_symbol["text-field"]),"text-font":new _t(W.layout_symbol["text-font"]),"text-size":new _t(W.layout_symbol["text-size"]),"text-max-width":new _t(W.layout_symbol["text-max-width"]),"text-line-height":new wt(W.layout_symbol["text-line-height"]),"text-letter-spacing":new _t(W.layout_symbol["text-letter-spacing"]),"text-justify":new _t(W.layout_symbol["text-justify"]),"text-radial-offset":new _t(W.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wt(W.layout_symbol["text-variable-anchor"]),"text-anchor":new _t(W.layout_symbol["text-anchor"]),"text-max-angle":new wt(W.layout_symbol["text-max-angle"]),"text-writing-mode":new wt(W.layout_symbol["text-writing-mode"]),"text-rotate":new _t(W.layout_symbol["text-rotate"]),"text-padding":new wt(W.layout_symbol["text-padding"]),"text-keep-upright":new wt(W.layout_symbol["text-keep-upright"]),"text-transform":new _t(W.layout_symbol["text-transform"]),"text-offset":new _t(W.layout_symbol["text-offset"]),"text-allow-overlap":new wt(W.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new wt(W.layout_symbol["text-ignore-placement"]),"text-optional":new wt(W.layout_symbol["text-optional"])}),a0={paint:new ci({"icon-opacity":new _t(W.paint_symbol["icon-opacity"]),"icon-color":new _t(W.paint_symbol["icon-color"]),"icon-halo-color":new _t(W.paint_symbol["icon-halo-color"]),"icon-halo-width":new _t(W.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _t(W.paint_symbol["icon-halo-blur"]),"icon-translate":new wt(W.paint_symbol["icon-translate"]),"icon-translate-anchor":new wt(W.paint_symbol["icon-translate-anchor"]),"text-opacity":new _t(W.paint_symbol["text-opacity"]),"text-color":new _t(W.paint_symbol["text-color"],{runtimeType:ot,getOverride:function(r){return r.textColor},hasOverride:function(r){return!!r.textColor}}),"text-halo-color":new _t(W.paint_symbol["text-halo-color"]),"text-halo-width":new _t(W.paint_symbol["text-halo-width"]),"text-halo-blur":new _t(W.paint_symbol["text-halo-blur"]),"text-translate":new wt(W.paint_symbol["text-translate"]),"text-translate-anchor":new wt(W.paint_symbol["text-translate-anchor"])}),layout:AP},Bc=function(r){this.type=r.property.overrides?r.property.overrides.runtimeType:Qe,this.defaultValue=r};Bc.prototype.evaluate=function(r){if(r.formattedSection){var i=this.defaultValue.property.overrides;if(i&&i.hasOverride(r.formattedSection))return i.getOverride(r.formattedSection)}return r.feature&&r.featureState?this.defaultValue.evaluate(r.feature,r.featureState):this.defaultValue.property.specification.default},Bc.prototype.eachChild=function(r){this.defaultValue.isConstant()||r(this.defaultValue.value._styleExpression.expression)},Bc.prototype.outputDefined=function(){return!1},Bc.prototype.serialize=function(){return null},yt("FormatSectionOverride",Bc,{omit:["defaultValue"]});var SP=function(r){function i(s){r.call(this,s,a0)}return r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i,i.prototype.recalculate=function(s,d){if(r.prototype.recalculate.call(this,s,d),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")),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 m=this.layout.get("text-writing-mode");if(m){for(var g=[],_=0,A=m;_",targetMapId:d,sourceMapId:g.mapId})}}},Oc.prototype.receive=function(r){var i=r.data,s=i.id;if(s&&(!i.targetMapId||this.mapId===i.targetMapId))if(i.type===""){delete this.tasks[s];var d=this.cancelCallbacks[s];delete this.cancelCallbacks[s],d&&d()}else Se()||i.mustQueue?(this.tasks[s]=i,this.taskQueue.push(s),this.invoker.trigger()):this.processTask(s,i)},Oc.prototype.process=function(){if(this.taskQueue.length){var r=this.taskQueue.shift(),i=this.tasks[r];delete this.tasks[r],this.taskQueue.length&&this.invoker.trigger(),i&&this.processTask(r,i)}},Oc.prototype.processTask=function(r,i){var s=this;if(i.type===""){var d=this.callbacks[r];delete this.callbacks[r],d&&(i.error?d(Gi(i.error)):d(null,Gi(i.data)))}else{var m=!1,g=He(this.globalScope)?void 0:[],_=i.hasCallback?function(z,D){m=!0,delete s.cancelCallbacks[r],s.target.postMessage({id:r,type:"",sourceMapId:s.mapId,error:z?Bo(z):null,data:Bo(D,g)},g)}:function(z){m=!0},A=null,C=Gi(i.data);if(this.parent[i.type])A=this.parent[i.type](i.sourceMapId,C,_);else if(this.parent.getWorkerSource){var T=i.type.split(".");A=this.parent.getWorkerSource(i.sourceMapId,T[0],C.source)[T[1]](C,_)}else _(new Error("Could not find function "+i.type));!m&&A&&A.cancel&&(this.cancelCallbacks[r]=A.cancel)}},Oc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var On=function(r,i){r&&(i?this.setSouthWest(r).setNorthEast(i):r.length===4?this.setSouthWest([r[0],r[1]]).setNorthEast([r[2],r[3]]):this.setSouthWest(r[0]).setNorthEast(r[1]))};On.prototype.setNorthEast=function(r){return this._ne=r instanceof en?new en(r.lng,r.lat):en.convert(r),this},On.prototype.setSouthWest=function(r){return this._sw=r instanceof en?new en(r.lng,r.lat):en.convert(r),this},On.prototype.extend=function(r){var i,s,d=this._sw,m=this._ne;if(r instanceof en)i=r,s=r;else{if(!(r instanceof On))return Array.isArray(r)?r.length===4||r.every(Array.isArray)?this.extend(On.convert(r)):this.extend(en.convert(r)):this;if(s=r._ne,!(i=r._sw)||!s)return this}return d||m?(d.lng=Math.min(i.lng,d.lng),d.lat=Math.min(i.lat,d.lat),m.lng=Math.max(s.lng,m.lng),m.lat=Math.max(s.lat,m.lat)):(this._sw=new en(i.lng,i.lat),this._ne=new en(s.lng,s.lat)),this},On.prototype.getCenter=function(){return new en((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},On.prototype.getSouthWest=function(){return this._sw},On.prototype.getNorthEast=function(){return this._ne},On.prototype.getNorthWest=function(){return new en(this.getWest(),this.getNorth())},On.prototype.getSouthEast=function(){return new en(this.getEast(),this.getSouth())},On.prototype.getWest=function(){return this._sw.lng},On.prototype.getSouth=function(){return this._sw.lat},On.prototype.getEast=function(){return this._ne.lng},On.prototype.getNorth=function(){return this._ne.lat},On.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},On.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},On.prototype.isEmpty=function(){return!(this._sw&&this._ne)},On.prototype.contains=function(r){var i=en.convert(r),s=i.lng,d=i.lat,m=this._sw.lng<=s&&s<=this._ne.lng;return this._sw.lng>this._ne.lng&&(m=this._sw.lng>=s&&s>=this._ne.lng),this._sw.lat<=d&&d<=this._ne.lat&&m},On.convert=function(r){return!r||r instanceof On?r:new On(r)};var en=function(r,i){if(isNaN(r)||isNaN(i))throw new Error("Invalid LngLat object: ("+r+", "+i+")");if(this.lng=+r,this.lat=+i,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};en.prototype.wrap=function(){return new en($(this.lng,-180,180),this.lat)},en.prototype.toArray=function(){return[this.lng,this.lat]},en.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},en.prototype.distanceTo=function(r){var i=Math.PI/180,s=this.lat*i,d=r.lat*i,m=Math.sin(s)*Math.sin(d)+Math.cos(s)*Math.cos(d)*Math.cos((r.lng-this.lng)*i);return 63710088e-1*Math.acos(Math.min(m,1))},en.prototype.toBounds=function(r){r===void 0&&(r=0);var i=360*r/40075017,s=i/Math.cos(Math.PI/180*this.lat);return new On(new en(this.lng-s,this.lat-i),new en(this.lng+s,this.lat+i))},en.convert=function(r){if(r instanceof en)return r;if(Array.isArray(r)&&(r.length===2||r.length===3))return new en(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&typeof r=="object"&&r!==null)return new en(Number("lng"in r?r.lng:r.lon),Number(r.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 nw=2*Math.PI*63710088e-1;function iw(r){return nw*Math.cos(r*Math.PI/180)}function ow(r){return(180+r)/360}function aw(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function sw(r,i){return r/iw(i)}function l0(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}var Cu=function(r,i,s){s===void 0&&(s=0),this.x=+r,this.y=+i,this.z=+s};Cu.fromLngLat=function(r,i){i===void 0&&(i=0);var s=en.convert(r);return new Cu(ow(s.lng),aw(s.lat),sw(i,s.lat))},Cu.prototype.toLngLat=function(){return new en(360*this.x-180,l0(this.y))},Cu.prototype.toAltitude=function(){return this.z*iw(l0(this.y))},Cu.prototype.meterInMercatorCoordinateUnits=function(){return 1/nw*(r=l0(this.y),1/Math.cos(r*Math.PI/180));var r};var ku=function(r,i,s){this.z=r,this.x=i,this.y=s,this.key=Bd(0,r,r,i,s)};ku.prototype.equals=function(r){return this.z===r.z&&this.x===r.x&&this.y===r.y},ku.prototype.url=function(r,i){var s,d,m,g,_,A=(d=this.y,m=this.z,g=rw(256*(s=this.x),256*(d=Math.pow(2,m)-d-1),m),_=rw(256*(s+1),256*(d+1),m),g[0]+","+g[1]+","+_[0]+","+_[1]),C=function(T,z,D){for(var U,Z="",se=T;se>0;se--)Z+=(z&(U=1<this.canonical.z?new Nn(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Nn(r,this.wrap,r,this.canonical.x>>i,this.canonical.y>>i)},Nn.prototype.calculateScaledKey=function(r,i){var s=this.canonical.z-r;return r>this.canonical.z?Bd(this.wrap*+i,r,this.canonical.z,this.canonical.x,this.canonical.y):Bd(this.wrap*+i,r,r,this.canonical.x>>s,this.canonical.y>>s)},Nn.prototype.isChildOf=function(r){if(r.wrap!==this.wrap)return!1;var i=this.canonical.z-r.canonical.z;return r.overscaledZ===0||r.overscaledZ>i&&r.canonical.y===this.canonical.y>>i},Nn.prototype.children=function(r){if(this.overscaledZ>=r)return[new Nn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var i=this.canonical.z+1,s=2*this.canonical.x,d=2*this.canonical.y;return[new Nn(i,this.wrap,i,s,d),new Nn(i,this.wrap,i,s+1,d),new Nn(i,this.wrap,i,s,d+1),new Nn(i,this.wrap,i,s+1,d+1)]},Nn.prototype.isLessThan=function(r){return this.wrapr.wrap)&&(this.overscaledZr.overscaledZ)&&(this.canonical.xr.canonical.x)&&this.canonical.y=this.dim+1||i<-1||i>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(i+1)*this.stride+(r+1)},Vs.prototype._unpackMapbox=function(r,i,s){return(256*r*256+256*i+s)/10-1e4},Vs.prototype._unpackTerrarium=function(r,i,s){return 256*r+i+s/256-32768},Vs.prototype.getPixels=function(){return new Qi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Vs.prototype.backfillBorder=function(r,i,s){if(this.dim!==r.dim)throw new Error("dem dimension mismatch");var d=i*this.dim,m=i*this.dim+this.dim,g=s*this.dim,_=s*this.dim+this.dim;switch(i){case-1:d=m-1;break;case 1:m=d+1}switch(s){case-1:g=_-1;break;case 1:_=g+1}for(var A=-i*this.dim,C=-s*this.dim,T=g;T<_;T++)for(var z=d;z=0&&z[3]>=0&&A.insert(_,z[0],z[1],z[2],z[3])}},$s.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ic.VectorTile(new tm(this.rawTileData)).layers,this.sourceLayerCoder=new dm(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},$s.prototype.query=function(r,i,s,d){var m=this;this.loadVTLayers();for(var g=r.params||{},_=8192/r.tileSize/r.scale,A=pc(g.filter),C=r.queryGeometry,T=r.queryPadding*_,z=cw(C),D=this.grid.query(z.minX-T,z.minY-T,z.maxX+T,z.maxY+T),U=cw(r.cameraQueryGeometry),Z=this.grid3D.query(U.minX-T,U.minY-T,U.maxX+T,U.maxY+T,function(Re,Oe,We,Ye){return function(at,bt,dt,St,ft){for(var Xt=0,Dt=at;Xt=xt.x&&ft>=xt.y)return!0}var rr=[new k(bt,dt),new k(bt,ft),new k(St,ft),new k(St,dt)];if(at.length>2){for(var Gt=0,hr=rr;Gt=0)return!0;return!1}(g,D)){var U=this.sourceLayerCoder.decode(s),Z=this.vtLayers[U].feature(d);if(m.needGeometry){var se=wn(Z,!0);if(!m.filter(new ir(this.tileID.overscaledZ),se,this.tileID.canonical))return}else if(!m.filter(new ir(this.tileID.overscaledZ),Z))return;for(var ce=this.getId(Z,U),be=0;bed)m=!1;else if(i)if(this.expirationTime$i&&(r.getActor().send("enforceCacheSizeLimit",Kn),Tt=0)},o.clamp=oe,o.clearTileCache=function(r){var i=I.caches.delete("mapbox-tiles");r&&i.catch(r).then(function(){return r()})},o.clipLine=Gb,o.clone=function(r){var i=new Sr(16);return i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3],i[4]=r[4],i[5]=r[5],i[6]=r[6],i[7]=r[7],i[8]=r[8],i[9]=r[9],i[10]=r[10],i[11]=r[11],i[12]=r[12],i[13]=r[13],i[14]=r[14],i[15]=r[15],i},o.clone$1=we,o.clone$2=function(r){var i=new Sr(3);return i[0]=r[0],i[1]=r[1],i[2]=r[2],i},o.collisionCircleLayout=QT,o.config=Ct,o.create=function(){var r=new Sr(16);return Sr!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r},o.create$1=function(){var r=new Sr(9);return Sr!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r},o.create$2=function(){var r=new Sr(4);return Sr!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r},o.createCommonjsModule=v,o.createExpression=uc,o.createLayout=Yn,o.createStyleLayer=function(r){return r.type==="custom"?new TP(r):new PP[r.type](r)},o.cross=function(r,i,s){var d=i[0],m=i[1],g=i[2],_=s[0],A=s[1],C=s[2];return r[0]=m*C-g*A,r[1]=g*_-d*C,r[2]=d*A-m*_,r},o.deepEqual=function r(i,s){if(Array.isArray(i)){if(!Array.isArray(s)||i.length!==s.length)return!1;for(var d=0;d0&&(g=1/Math.sqrt(g)),r[0]=i[0]*g,r[1]=i[1]*g,r[2]=i[2]*g,r},o.number=Pn,o.offscreenCanvasSupported=lr,o.ortho=function(r,i,s,d,m,g,_){var A=1/(i-s),C=1/(d-m),T=1/(g-_);return r[0]=-2*A,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*C,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*T,r[11]=0,r[12]=(i+s)*A,r[13]=(m+d)*C,r[14]=(_+g)*T,r[15]=1,r},o.parseGlyphPBF=function(r){return new tm(r).readFields(lP,[])},o.pbf=tm,o.performSymbolLayout=function(r,i,s,d,m,g,_){r.createArrays(),r.tilePixelRatio=8192/(512*r.overscaling),r.compareText={},r.iconsNeedLinear=!1;var A=r.layers[0].layout,C=r.layers[0]._unevaluatedLayout._values,T={};if(r.textSizeData.kind==="composite"){var z=r.textSizeData,D=z.maxZoom;T.compositeTextSizes=[C["text-size"].possiblyEvaluate(new ir(z.minZoom),_),C["text-size"].possiblyEvaluate(new ir(D),_)]}if(r.iconSizeData.kind==="composite"){var U=r.iconSizeData,Z=U.maxZoom;T.compositeIconSizes=[C["icon-size"].possiblyEvaluate(new ir(U.minZoom),_),C["icon-size"].possiblyEvaluate(new ir(Z),_)]}T.layoutTextSize=C["text-size"].possiblyEvaluate(new ir(r.zoom+1),_),T.layoutIconSize=C["icon-size"].possiblyEvaluate(new ir(r.zoom+1),_),T.textMaxSize=C["text-size"].possiblyEvaluate(new ir(18));for(var se=24*A.get("text-line-height"),ce=A.get("text-rotation-alignment")==="map"&&A.get("symbol-placement")!=="point",be=A.get("text-keep-upright"),ye=A.get("text-size"),ke=function(){var Oe=Re[Pe],We=A.get("text-font").evaluate(Oe,{},_).join(","),Ye=ye.evaluate(Oe,{},_),at=T.layoutTextSize.evaluate(Oe,{},_),bt=T.layoutIconSize.evaluate(Oe,{},_),dt={horizontal:{},vertical:void 0},St=Oe.text,ft=[0,0];if(St){var Xt=St.toString(),Dt=24*A.get("text-letter-spacing").evaluate(Oe,{},_),xt=function(or){for(var Vr=0,Mr=or;Vr=8192||Gd.y<0||Gd.y>=8192||function(En,Ea,LP,Cl,h0,fw,wm,is,Am,Hd,Sm,Em,f0,mw,Zd,gw,yw,vw,_w,xw,So,Cm,bw,os,RP){var ww,Pu,Zc,Kc,Xc,Qc=En.addToLineVertexArray(Ea,LP),Aw=0,Sw=0,Ew=0,Cw=0,m0=-1,g0=-1,Gs={},kw=ae(""),y0=0,v0=0;if(is._unevaluatedLayout.getValue("text-radial-offset")===void 0?(y0=(ww=is.layout.get("text-offset").evaluate(So,{},os).map(function(Xd){return 24*Xd}))[0],v0=ww[1]):(y0=24*is.layout.get("text-radial-offset").evaluate(So,{},os),v0=n0),En.allowVerticalPlacement&&Cl.vertical){var Iw=is.layout.get("text-rotate").evaluate(So,{},os)+90;Kc=new um(Am,Ea,Hd,Sm,Em,Cl.vertical,f0,mw,Zd,Iw),wm&&(Xc=new um(Am,Ea,Hd,Sm,Em,wm,yw,vw,Zd,Iw))}if(h0){var _0=is.layout.get("icon-rotate").evaluate(So,{}),Tw=is.layout.get("icon-text-fit")!=="none",Pw=Hb(h0,_0,bw,Tw),x0=wm?Hb(wm,_0,bw,Tw):void 0;Zc=new um(Am,Ea,Hd,Sm,Em,h0,yw,vw,!1,_0),Aw=4*Pw.length;var Mw=En.iconSizeData,Kd=null;Mw.kind==="source"?(Kd=[128*is.layout.get("icon-size").evaluate(So,{})])[0]>32640&&me(En.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Mw.kind==="composite"&&((Kd=[128*Cm.compositeIconSizes[0].evaluate(So,{},os),128*Cm.compositeIconSizes[1].evaluate(So,{},os)])[0]>32640||Kd[1]>32640)&&me(En.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),En.addSymbols(En.icon,Pw,Kd,xw,_w,So,!1,Ea,Qc.lineStartIndex,Qc.lineLength,-1,os),m0=En.icon.placedSymbolArray.length-1,x0&&(Sw=4*x0.length,En.addSymbols(En.icon,x0,Kd,xw,_w,So,wo.vertical,Ea,Qc.lineStartIndex,Qc.lineLength,-1,os),g0=En.icon.placedSymbolArray.length-1)}for(var zw in Cl.horizontal){var km=Cl.horizontal[zw];if(!Pu){kw=ae(km.text);var DP=is.layout.get("text-rotate").evaluate(So,{},os);Pu=new um(Am,Ea,Hd,Sm,Em,km,f0,mw,Zd,DP)}var Lw=km.positionedLines.length===1;if(Ew+=Xb(En,Ea,km,fw,is,Zd,So,gw,Qc,Cl.vertical?wo.horizontal:wo.horizontalOnly,Lw?Object.keys(Cl.horizontal):[zw],Gs,m0,Cm,os),Lw)break}Cl.vertical&&(Cw+=Xb(En,Ea,Cl.vertical,fw,is,Zd,So,gw,Qc,wo.vertical,["vertical"],Gs,g0,Cm,os));var BP=Pu?Pu.boxStartIndex:En.collisionBoxArray.length,OP=Pu?Pu.boxEndIndex:En.collisionBoxArray.length,NP=Kc?Kc.boxStartIndex:En.collisionBoxArray.length,FP=Kc?Kc.boxEndIndex:En.collisionBoxArray.length,jP=Zc?Zc.boxStartIndex:En.collisionBoxArray.length,UP=Zc?Zc.boxEndIndex:En.collisionBoxArray.length,VP=Xc?Xc.boxStartIndex:En.collisionBoxArray.length,$P=Xc?Xc.boxEndIndex:En.collisionBoxArray.length,as=-1,Im=function(Xd,Dw){return Xd&&Xd.circleDiameter?Math.max(Xd.circleDiameter,Dw):Dw};as=Im(Pu,as),as=Im(Kc,as),as=Im(Zc,as);var Rw=(as=Im(Xc,as))>-1?1:0;Rw&&(as*=RP/24),En.glyphOffsetArray.length>=Or.MAX_GLYPHS&&me("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),So.sortKey!==void 0&&En.addToSortKeyRanges(En.symbolInstances.length,So.sortKey),En.symbolInstances.emplaceBack(Ea.x,Ea.y,Gs.right>=0?Gs.right:-1,Gs.center>=0?Gs.center:-1,Gs.left>=0?Gs.left:-1,Gs.vertical||-1,m0,g0,kw,BP,OP,NP,FP,jP,UP,VP,$P,Hd,Ew,Cw,Aw,Sw,Rw,0,f0,y0,v0,as)}(or,Gd,zP,Mr,gr,Ni,rs,or.layers[0],or.collisionBoxArray,Vr.index,Vr.sourceLayerIndex,or.index,Iu,fm,mm,yi,qs,Vc,gm,ns,Vr,gi,_r,ts,Kr)};if(Ws==="line")for(var qc=0,ym=Gb(Vr.geometry,0,0,8192,8192);qc1){var xm=fP($d,Od,Mr.vertical||aa,gr,24,jc);xm&&El($d,xm)}}else if(Vr.type==="Polygon")for(var Wc=0,bm=Xv(Vr.geometry,0);Wc=wr.maxzoom||wr.visibility!=="none"&&(I(nr,this.zoom,G),(Me[wr.id]=wr.createBucket({index:W.bucketLayerIDs.length,layers:nr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ke,sourceID:this.source})).populate(Ze,Ve,this.tileID.canonical),W.bucketLayerIDs.push(nr.map(function(Br){return Br.id})))}}}var dr=o.mapObject(Ve.glyphDependencies,function(Br){return Object.keys(Br).map(Number)});Object.keys(dr).length?R.send("getGlyphs",{uid:this.uid,stacks:dr},function(Br,ar){re||(re=Br,Ee=ar,xn.call(le))}):Ee={};var xi=Object.keys(Ve.iconDependencies);xi.length?R.send("getImages",{icons:xi,source:this.source,tileID:this.tileID,type:"icons"},function(Br,ar){re||(re=Br,Ue=ar,xn.call(le))}):Ue={};var kr=Object.keys(Ve.patternDependencies);function xn(){if(re)return K(re);if(Ee&&Ue&&Ge){var Br=new k(Ee),ar=new o.ImageAtlas(Ue,Ge);for(var Ar in Me){var Li=Me[Ar];Li instanceof o.SymbolBucket?(I(Li.layers,this.zoom,G),o.performSymbolLayout(Li,Ee,Br.positions,Ue,ar.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Li.hasPattern&&(Li instanceof o.LineBucket||Li instanceof o.FillBucket||Li instanceof o.FillExtrusionBucket)&&(I(Li.layers,this.zoom,G),Li.addFeatures(Ve,this.tileID.canonical,ar.patternPositions))}this.status="done",K(null,{buckets:o.values(Me).filter(function(eu){return!eu.isEmpty()}),featureIndex:W,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Br.image,imageAtlas:ar,glyphMap:this.returnDependencies?Ee:null,iconMap:this.returnDependencies?Ue:null,glyphPositions:this.returnDependencies?Br.positions:null})}}kr.length?R.send("getImages",{icons:kr,source:this.source,tileID:this.tileID,type:"patterns"},function(Br,ar){re||(re=Br,Ge=ar,xn.call(le))}):Ge={},xn.call(this)};var V=function(B,j,G,R){this.actor=B,this.layerIndex=j,this.availableImages=G,this.loadVectorData=R||q,this.loading={},this.loaded={}};V.prototype.loadTile=function(B,j){var G=this,R=B.uid;this.loading||(this.loading={});var K=!!(B&&B.request&&B.request.collectResourceTiming)&&new o.RequestPerformance(B.request),le=this.loading[R]=new P(B);le.abort=this.loadVectorData(B,function(ge,W){if(delete G.loading[R],ge||!W)return le.status="done",G.loaded[R]=le,j(ge);var re=W.rawData,Ee={};W.expires&&(Ee.expires=W.expires),W.cacheControl&&(Ee.cacheControl=W.cacheControl);var Ue={};if(K){var Ge=K.finish();Ge&&(Ue.resourceTiming=JSON.parse(JSON.stringify(Ge)))}le.vectorTile=W.vectorTile,le.parse(W.vectorTile,G.layerIndex,G.availableImages,G.actor,function(Me,Ve){if(Me||!Ve)return j(Me);j(null,o.extend({rawTileData:re.slice(0)},Ve,Ee,Ue))}),G.loaded=G.loaded||{},G.loaded[R]=le})},V.prototype.reloadTile=function(B,j){var G=this,R=this.loaded,K=B.uid,le=this;if(R&&R[K]){var ge=R[K];ge.showCollisionBoxes=B.showCollisionBoxes;var W=function(re,Ee){var Ue=ge.reloadCallback;Ue&&(delete ge.reloadCallback,ge.parse(ge.vectorTile,le.layerIndex,G.availableImages,le.actor,Ue)),j(re,Ee)};ge.status==="parsing"?ge.reloadCallback=W:ge.status==="done"&&(ge.vectorTile?ge.parse(ge.vectorTile,this.layerIndex,this.availableImages,this.actor,W):W())}},V.prototype.abortTile=function(B,j){var G=this.loading,R=B.uid;G&&G[R]&&G[R].abort&&(G[R].abort(),delete G[R]),j()},V.prototype.removeTile=function(B,j){var G=this.loaded,R=B.uid;G&&G[R]&&delete G[R],j()};var H=o.window.ImageBitmap,oe=function(){this.loaded={}};function $(B,j){if(B.length!==0){F(B[0],j);for(var G=1;G=Math.abs(W)?G-re+W:W-re+G,G=re}G+R>=0!=!!j&&B.reverse()}oe.prototype.loadTile=function(B,j){var G=B.uid,R=B.encoding,K=B.rawImageData,le=H&&K instanceof H?this.getImageData(K):K,ge=new o.DEMData(G,le,R);this.loaded=this.loaded||{},this.loaded[G]=ge,j(null,ge)},oe.prototype.getImageData=function(B){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(B.width,B.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=B.width,this.offscreenCanvas.height=B.height,this.offscreenCanvasContext.drawImage(B,0,0,B.width,B.height);var j=this.offscreenCanvasContext.getImageData(-1,-1,B.width+2,B.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new o.RGBAImage({width:j.width,height:j.height},j.data)},oe.prototype.removeTile=function(B){var j=this.loaded,G=B.uid;j&&j[G]&&delete j[G]};var L=o.vectorTile.VectorTileFeature.prototype.toGeoJSON,O=function(B){this._feature=B,this.extent=o.EXTENT,this.type=B.type,this.properties=B.tags,"id"in B&&!isNaN(B.id)&&(this.id=parseInt(B.id,10))};O.prototype.loadGeometry=function(){if(this._feature.type===1){for(var B=[],j=0,G=this._feature.geometry;j>31}function ze(B,j){for(var G=B.loadGeometry(),R=B.type,K=0,le=0,ge=G.length,W=0;W>1;(function Ke(Ze,ot,Wt,ht,ur,jr){for(;ur>ht;){if(ur-ht>600){var nr=ur-ht+1,wr=Wt-ht+1,dr=Math.log(nr),xi=.5*Math.exp(2*dr/3),kr=.5*Math.sqrt(dr*xi*(nr-xi)/nr)*(wr-nr/2<0?-1:1);Ke(Ze,ot,Wt,Math.max(ht,Math.floor(Wt-wr*xi/nr+kr)),Math.min(ur,Math.floor(Wt+(nr-wr)*xi/nr+kr)),jr)}var xn=ot[2*Wt+jr],Br=ht,ar=ur;for(rt(Ze,ot,ht,Wt),ot[2*ur+jr]>xn&&rt(Ze,ot,ht,ur);Brxn;)ar--}ot[2*ht+jr]===xn?rt(Ze,ot,ht,ar):rt(Ze,ot,++ar,ur),ar<=Wt&&(ht=ar+1),Wt<=ar&&(ur=ar-1)}})(Ue,Ge,Be,Ve,it,Qe%2),Ee(Ue,Ge,Me,Ve,Be-1,Qe+1),Ee(Ue,Ge,Me,Be+1,it,Qe+1)}})(ge,W,R,0,ge.length-1,0)};vt.prototype.range=function(B,j,G,R){return function(K,le,ge,W,re,Ee,Ue){for(var Ge,Me,Ve=[0,K.length-1,0],it=[];Ve.length;){var Qe=Ve.pop(),Be=Ve.pop(),Ke=Ve.pop();if(Be-Ke<=Ue)for(var Ze=Ke;Ze<=Be;Ze++)Me=le[2*Ze+1],(Ge=le[2*Ze])>=ge&&Ge<=re&&Me>=W&&Me<=Ee&&it.push(K[Ze]);else{var ot=Math.floor((Ke+Be)/2);Me=le[2*ot+1],(Ge=le[2*ot])>=ge&&Ge<=re&&Me>=W&&Me<=Ee&&it.push(K[ot]);var Wt=(Qe+1)%2;(Qe===0?ge<=Ge:W<=Me)&&(Ve.push(Ke),Ve.push(ot-1),Ve.push(Wt)),(Qe===0?re>=Ge:Ee>=Me)&&(Ve.push(ot+1),Ve.push(Be),Ve.push(Wt))}}return it}(this.ids,this.coords,B,j,G,R,this.nodeSize)},vt.prototype.within=function(B,j,G){return function(R,K,le,ge,W,re){for(var Ee=[0,R.length-1,0],Ue=[],Ge=W*W;Ee.length;){var Me=Ee.pop(),Ve=Ee.pop(),it=Ee.pop();if(Ve-it<=re)for(var Qe=it;Qe<=Ve;Qe++)nt(K[2*Qe],K[2*Qe+1],le,ge)<=Ge&&Ue.push(R[Qe]);else{var Be=Math.floor((it+Ve)/2),Ke=K[2*Be],Ze=K[2*Be+1];nt(Ke,Ze,le,ge)<=Ge&&Ue.push(R[Be]);var ot=(Me+1)%2;(Me===0?le-W<=Ke:ge-W<=Ze)&&(Ee.push(it),Ee.push(Be-1),Ee.push(ot)),(Me===0?le+W>=Ke:ge+W>=Ze)&&(Ee.push(Be+1),Ee.push(Ve),Ee.push(ot))}}return Ue}(this.ids,this.coords,B,j,G,this.nodeSize)};var $t={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(B){return B}},Je=function(B){this.options=Ot(Object.create($t),B),this.trees=new Array(this.options.maxZoom+1)};function xr(B,j,G,R,K){return{x:B,y:j,zoom:1/0,id:G,parentId:-1,numPoints:R,properties:K}}function Ct(B,j){var G=B.geometry.coordinates,R=G[1];return{x:qt(G[0]),y:lt(R),zoom:1/0,index:j,parentId:-1}}function Ht(B){return{type:"Feature",id:B.id,properties:er(B),geometry:{type:"Point",coordinates:[(R=B.x,360*(R-.5)),(j=B.y,G=(180-360*j)*Math.PI/180,360*Math.atan(Math.exp(G))/Math.PI-90)]}};var j,G,R}function er(B){var j=B.numPoints,G=j>=1e4?Math.round(j/1e3)+"k":j>=1e3?Math.round(j/100)/10+"k":j;return Ot(Ot({},B.properties),{cluster:!0,cluster_id:B.id,point_count:j,point_count_abbreviated:G})}function qt(B){return B/360+.5}function lt(B){var j=Math.sin(B*Math.PI/180),G=.5-.25*Math.log((1+j)/(1-j))/Math.PI;return G<0?0:G>1?1:G}function Ot(B,j){for(var G in j)B[G]=j[G];return B}function tr(B){return B.x}function yr(B){return B.y}function Pr(B,j,G,R,K,le){var ge=K-G,W=le-R;if(ge!==0||W!==0){var re=((B-G)*ge+(j-R)*W)/(ge*ge+W*W);re>1?(G=K,R=le):re>0&&(G+=ge*re,R+=W*re)}return(ge=B-G)*ge+(W=j-R)*W}function Qt(B,j,G,R){var K={id:B===void 0?null:B,type:j,geometry:G,tags:R,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(le){var ge=le.geometry,W=le.type;if(W==="Point"||W==="MultiPoint"||W==="LineString")Rr(le,ge);else if(W==="Polygon"||W==="MultiLineString")for(var re=0;re0&&(ge+=R?(K*Ee-re*le)/2:Math.sqrt(Math.pow(re-K,2)+Math.pow(Ee-le,2))),K=re,le=Ee}var Ue=j.length-3;j[2]=1,function Ge(Me,Ve,it,Qe){for(var Be,Ke=Qe,Ze=it-Ve>>1,ot=it-Ve,Wt=Me[Ve],ht=Me[Ve+1],ur=Me[it],jr=Me[it+1],nr=Ve+3;nrKe)Be=nr,Ke=wr;else if(wr===Ke){var dr=Math.abs(nr-Ze);drQe&&(Be-Ve>3&&Ge(Me,Ve,Be,Qe),Me[Be+2]=Ke,it-Be>3&&Ge(Me,Be,it,Qe))}(j,0,Ue,G),j[Ue+2]=1,j.size=Math.abs(ge),j.start=0,j.end=j.size}function Dr(B,j,G,R){for(var K=0;K1?1:G}function Xr(B,j,G,R,K,le,ge,W){if(R/=j,le>=(G/=j)&&ge=R)return null;for(var re=[],Ee=0;Ee=G&&it=R)){var Qe=[];if(Me==="Point"||Me==="MultiPoint")cn(Ge,Qe,G,R,K);else if(Me==="LineString")Cr(Ge,Qe,G,R,K,!1,W.lineMetrics);else if(Me==="MultiLineString")an(Ge,Qe,G,R,K,!1);else if(Me==="Polygon")an(Ge,Qe,G,R,K,!0);else if(Me==="MultiPolygon")for(var Be=0;Be=G&&ge<=R&&(j.push(B[le]),j.push(B[le+1]),j.push(B[le+2]))}}function Cr(B,j,G,R,K,le,ge){for(var W,re,Ee=Lt(B),Ue=K===0?$i:Mt,Ge=B.start,Me=0;MeG&&(re=Ue(Ee,Ve,it,Be,Ke,G),ge&&(Ee.start=Ge+W*re)):Ze>R?ot=G&&(re=Ue(Ee,Ve,it,Be,Ke,G),Wt=!0),ot>R&&Ze<=R&&(re=Ue(Ee,Ve,it,Be,Ke,R),Wt=!0),!le&&Wt&&(ge&&(Ee.end=Ge+W*re),j.push(Ee),Ee=Lt(B)),ge&&(Ge+=W)}var ht=B.length-3;Ve=B[ht],it=B[ht+1],Qe=B[ht+2],(Ze=K===0?Ve:it)>=G&&Ze<=R&&Kn(Ee,Ve,it,Qe),ht=Ee.length-3,le&&ht>=3&&(Ee[ht]!==Ee[0]||Ee[ht+1]!==Ee[1])&&Kn(Ee,Ee[0],Ee[1],Ee[2]),Ee.length&&j.push(Ee)}function Lt(B){var j=[];return j.size=B.size,j.start=B.start,j.end=B.end,j}function an(B,j,G,R,K,le){for(var ge=0;gege.maxX&&(ge.maxX=Ue),Ge>ge.maxY&&(ge.maxY=Ge)}return ge}function Qr(B,j,G,R){var K=j.geometry,le=j.type,ge=[];if(le==="Point"||le==="MultiPoint")for(var W=0;W0&&j.size<(K?ge:R))G.numPoints+=j.length/3;else{for(var W=[],re=0;rege)&&(G.numSimplified++,W.push(j[re]),W.push(j[re+1])),G.numPoints++;K&&function(Ee,Ue){for(var Ge=0,Me=0,Ve=Ee.length,it=Ve-2;Me0===Ue)for(Me=0,Ve=Ee.length;Me24)throw new Error("maxZoom should be in the 0-24 range");if(j.promoteId&&j.generateId)throw new Error("promoteId and generateId cannot be used together.");var R=function(K,le){var ge=[];if(K.type==="FeatureCollection")for(var W=0;W=R;Ee--){var Ue=+Date.now();W=this._cluster(W,Ee),this.trees[Ee]=new vt(W,tr,yr,le,Float32Array),G&&console.log("z%d: %d clusters in %dms",Ee,W.length,+Date.now()-Ue)}return G&&console.timeEnd("total time"),this},Je.prototype.getClusters=function(B,j){var G=((B[0]+180)%360+360)%360-180,R=Math.max(-90,Math.min(90,B[1])),K=B[2]===180?180:((B[2]+180)%360+360)%360-180,le=Math.max(-90,Math.min(90,B[3]));if(B[2]-B[0]>=360)G=-180,K=180;else if(G>K){var ge=this.getClusters([G,R,180,le],j),W=this.getClusters([-180,R,K,le],j);return ge.concat(W)}for(var re=this.trees[this._limitZoom(j)],Ee=[],Ue=0,Ge=re.range(qt(G),lt(le),qt(K),lt(R));Uej&&(Me+=Qe.numPoints||1)}if(Me>=le){for(var Be=re.x*Ge,Ke=re.y*Ge,Ze=K&&Ge>1?this._map(re,!0):null,ot=(W<<5)+(j+1)+this.points.length,Wt=0,ht=Ue;Wt1)for(var nr=0,wr=Ue;nr>5},Je.prototype._getOriginZoom=function(B){return(B-this.points.length)%32},Je.prototype._map=function(B,j){if(B.numPoints)return j?Ot({},B.properties):B.properties;var G=this.points[B.index].properties,R=this.options.map(G);return j&&R===G?Ot({},R):R},Tn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Tn.prototype.splitTile=function(B,j,G,R,K,le,ge){for(var W=[B,j,G,R],re=this.options,Ee=re.debug;W.length;){R=W.pop(),G=W.pop(),j=W.pop(),B=W.pop();var Ue=1<1&&console.time("creation"),Me=this.tiles[Ge]=fr(B,j,G,R,re),this.tileCoords.push({z:j,x:G,y:R}),Ee)){Ee>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",j,G,R,Me.numFeatures,Me.numPoints,Me.numSimplified),console.timeEnd("creation"));var Ve="z"+j;this.stats[Ve]=(this.stats[Ve]||0)+1,this.total++}if(Me.source=B,K){if(j===re.maxZoom||j===K)continue;var it=1<1&&console.time("clipping");var Qe,Be,Ke,Ze,ot,Wt,ht=.5*re.buffer/re.extent,ur=.5-ht,jr=.5+ht,nr=1+ht;Qe=Be=Ke=Ze=null,ot=Xr(B,Ue,G-ht,G+jr,0,Me.minX,Me.maxX,re),Wt=Xr(B,Ue,G+ur,G+nr,0,Me.minX,Me.maxX,re),B=null,ot&&(Qe=Xr(ot,Ue,R-ht,R+jr,1,Me.minY,Me.maxY,re),Be=Xr(ot,Ue,R+ur,R+nr,1,Me.minY,Me.maxY,re),ot=null),Wt&&(Ke=Xr(Wt,Ue,R-ht,R+jr,1,Me.minY,Me.maxY,re),Ze=Xr(Wt,Ue,R+ur,R+nr,1,Me.minY,Me.maxY,re),Wt=null),Ee>1&&console.timeEnd("clipping"),W.push(Qe||[],j+1,2*G,2*R),W.push(Be||[],j+1,2*G,2*R+1),W.push(Ke||[],j+1,2*G+1,2*R),W.push(Ze||[],j+1,2*G+1,2*R+1)}}},Tn.prototype.getTile=function(B,j,G){var R=this.options,K=R.extent,le=R.debug;if(B<0||B>24)return null;var ge=1<1&&console.log("drilling down to z%d-%d-%d",B,j,G);for(var re,Ee=B,Ue=j,Ge=G;!re&&Ee>0;)Ee--,Ue=Math.floor(Ue/2),Ge=Math.floor(Ge/2),re=this.tiles[ai(Ee,Ue,Ge)];return re&&re.source?(le>1&&console.log("found parent tile z%d-%d-%d",Ee,Ue,Ge),le>1&&console.time("drilling down"),this.splitTile(re.source,Ee,Ue,Ge,B,j,G),le>1&&console.timeEnd("drilling down"),this.tiles[W]?Tt(this.tiles[W],K):null):null};var Jo=function(B){function j(G,R,K,le){B.call(this,G,R,K,fi),le&&(this.loadGeoJSON=le)}return B&&(j.__proto__=B),(j.prototype=Object.create(B&&B.prototype)).constructor=j,j.prototype.loadData=function(G,R){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=R,this._pendingLoadDataParams=G,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},j.prototype._loadData=function(){var G=this;if(this._pendingCallback&&this._pendingLoadDataParams){var R=this._pendingCallback,K=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var le=!!(K&&K.request&&K.request.collectResourceTiming)&&new o.RequestPerformance(K.request);this.loadGeoJSON(K,function(ge,W){if(ge||!W)return R(ge);if(typeof W!="object")return R(new Error("Input data given to '"+K.source+"' is not a valid GeoJSON object."));(function Me(Ve,it){var Qe,Be=Ve&&Ve.type;if(Be==="FeatureCollection")for(Qe=0;Qe"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var w,E,M=new Blob([""],{type:"text/javascript"}),N=URL.createObjectURL(M);try{E=new Worker(N),w=!0}catch{w=!1}return E&&E.terminate(),URL.revokeObjectURL(N),w}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var w=document.createElement("canvas");w.width=w.height=1;var E=w.getContext("2d");if(!E)return!1;var M=E.getImageData(0,0,1,1);return M&&M.width===w.width}()?(h[b=y&&y.failIfMajorPerformanceCaveat]===void 0&&(h[b]=function(w){var E=function(N){var X=document.createElement("canvas"),Q=Object.create(c.webGLContextAttributes);return Q.failIfMajorPerformanceCaveat=N,X.probablySupportsContext?X.probablySupportsContext("webgl",Q)||X.probablySupportsContext("experimental-webgl",Q):X.supportsContext?X.supportsContext("webgl",Q)||X.supportsContext("experimental-webgl",Q):X.getContext("webgl",Q)||X.getContext("experimental-webgl",Q)}(w);if(!E)return!1;var M=E.createShader(E.VERTEX_SHADER);return!(!M||E.isContextLost())&&(E.shaderSource(M,"void main() {}"),E.compileShader(M),E.getShaderParameter(M,E.COMPILE_STATUS)===!0)}(b)),h[b]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var b}l.exports?l.exports=c:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=c,window.mapboxgl.notSupportedReason=u);var h={};c.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),x={create:function(l,c,u){var h=o.window.document.createElement(l);return c!==void 0&&(h.className=c),u&&u.appendChild(h),h},createNS:function(l,c){return o.window.document.createElementNS(l,c)}},S=o.window.document&&o.window.document.documentElement.style;function k(l){if(!S)return l[0];for(var c=0;c=0?0:l.button},x.remove=function(l){l.parentNode&&l.parentNode.removeChild(l)};var F=function(l){function c(){l.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.RGBAImage({width:1,height:1}),this.dirty=!0}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c.prototype.isLoaded=function(){return this.loaded},c.prototype.setLoaded=function(u){if(this.loaded!==u&&(this.loaded=u,u)){for(var h=0,y=this.requestors;h=0?1.2:1))}function ue(l,c,u,h,y,b,w){for(var E=0;E65535)M(new Error("glyphs > 65535 not supported"));else if(Q.ranges[de])M(null,{stack:N,id:X,glyph:J});else{var pe=Q.requests[de];pe||(pe=Q.requests[de]=[],Ce.loadGlyphRange(N,de,u.url,u.requestManager,function(xe,ae){if(ae){for(var _e in ae)u._doesCharSupportLocalGlyph(+_e)||(Q.glyphs[+_e]=ae[+_e]);Q.ranges[de]=!0}for(var Ae=0,Ie=pe;Ae1&&(E=l[++w]);var N=Math.abs(M-E.left),X=Math.abs(M-E.right),Q=Math.min(N,X),J=void 0,de=y/u*(h+1);if(E.isDash){var pe=h-Math.abs(de);J=Math.sqrt(Q*Q+pe*pe)}else J=h-Math.sqrt(Q*Q+de*de);this.data[b+M]=Math.max(0,Math.min(255,J+128))}},me.prototype.addRegularDash=function(l){for(var c=l.length-1;c>=0;--c){var u=l[c],h=l[c+1];u.zeroLength?l.splice(c,1):h&&h.isDash===u.isDash&&(h.left=u.left,l.splice(c,1))}var y=l[0],b=l[l.length-1];y.isDash===b.isDash&&(y.left=b.left-this.width,b.right=y.right+this.width);for(var w=this.width*this.nextRow,E=0,M=l[E],N=0;N1&&(M=l[++E]);var X=Math.abs(N-M.left),Q=Math.abs(N-M.right),J=Math.min(X,Q);this.data[w+N]=Math.max(0,Math.min(255,(M.isDash?J:-J)+128))}},me.prototype.addDash=function(l,c){var u=c?7:0,h=2*u+1;if(this.nextRow+h>this.height)return o.warnOnce("LineAtlas out of space"),null;for(var y=0,b=0;b=u&&l.x=h&&l.y0&&(N[new o.OverscaledTileID(u.overscaledZ,w,h.z,b,h.y-1).key]={backfilled:!1},N[new o.OverscaledTileID(u.overscaledZ,u.wrap,h.z,h.x,h.y-1).key]={backfilled:!1},N[new o.OverscaledTileID(u.overscaledZ,M,h.z,E,h.y-1).key]={backfilled:!1}),h.y+10&&(y.resourceTiming=u._resourceTiming,u._resourceTiming=[]),u.fire(new o.Event("data",y))}})},c.prototype.onAdd=function(u){this.map=u,this.load()},c.prototype.setData=function(u){var h=this;return this._data=u,this.fire(new o.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(y){if(y)h.fire(new o.ErrorEvent(y));else{var b={dataType:"source",sourceDataType:"content"};h._collectResourceTiming&&h._resourceTiming&&h._resourceTiming.length>0&&(b.resourceTiming=h._resourceTiming,h._resourceTiming=[]),h.fire(new o.Event("data",b))}}),this},c.prototype.getClusterExpansionZoom=function(u,h){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:u,source:this.id},h),this},c.prototype.getClusterChildren=function(u,h){return this.actor.send("geojson.getClusterChildren",{clusterId:u,source:this.id},h),this},c.prototype.getClusterLeaves=function(u,h,y,b){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:u,limit:h,offset:y},b),this},c.prototype._updateWorkerData=function(u){var h=this;this._loaded=!1;var y=o.extend({},this.workerOptions),b=this._data;typeof b=="string"?(y.request=this.map._requestManager.transformRequest(o.browser.resolveURL(b),o.ResourceType.Source),y.request.collectResourceTiming=this._collectResourceTiming):y.data=JSON.stringify(b),this.actor.send(this.type+".loadData",y,function(w,E){h._removed||E&&E.abandoned||(h._loaded=!0,E&&E.resourceTiming&&E.resourceTiming[h.id]&&(h._resourceTiming=E.resourceTiming[h.id].slice(0)),h.actor.send(h.type+".coalesce",{source:y.source},null),u(w))})},c.prototype.loaded=function(){return this._loaded},c.prototype.loadTile=function(u,h){var y=this,b=u.actor?"reloadTile":"loadTile";u.actor=this.actor,u.request=this.actor.send(b,{type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:o.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(w,E){return delete u.request,u.unloadVectorData(),u.aborted?h(null):w?h(w):(u.loadVectorData(E,y.map.painter,b==="reloadTile"),h(null))})},c.prototype.abortTile=function(u){u.request&&(u.request.cancel(),delete u.request),u.aborted=!0},c.prototype.unloadTile=function(u){u.unloadVectorData(),this.actor.send("removeTile",{uid:u.uid,type:this.type,source:this.id})},c.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},c.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},c.prototype.hasTransition=function(){return!1},c}(o.Evented),qe=o.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),nt=function(l){function c(u,h,y,b){l.call(this),this.id=u,this.dispatcher=y,this.coordinates=h.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(b),this.options=h}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c.prototype.load=function(u,h){var y=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this.url=this.options.url,o.getImage(this.map._requestManager.transformRequest(this.url,o.ResourceType.Image),function(b,w){y._loaded=!0,b?y.fire(new o.ErrorEvent(b)):w&&(y.image=w,u&&(y.coordinates=u),h&&h(),y._finishLoading())})},c.prototype.loaded=function(){return this._loaded},c.prototype.updateImage=function(u){var h=this;return this.image&&u.url?(this.options.url=u.url,this.load(u.coordinates,function(){h.texture=null}),this):this},c.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))},c.prototype.onAdd=function(u){this.map=u,this.load()},c.prototype.setCoordinates=function(u){var h=this;this.coordinates=u;var y=u.map(o.MercatorCoordinate.fromLngLat);this.tileID=function(w){for(var E=1/0,M=1/0,N=-1/0,X=-1/0,Q=0,J=w;Qh.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+h.start(0)+" and "+h.end(0)+"-second mark."))):this.video.currentTime=u}},c.prototype.getVideo=function(){return this.video},c.prototype.onAdd=function(u){this.map||(this.map=u,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},c.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var u=this.map.painter.context,h=u.gl;for(var y in this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,qe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.texSubImage2D(h.TEXTURE_2D,0,0,0,h.RGBA,h.UNSIGNED_BYTE,this.video)):(this.texture=new o.Texture(u,this.video,h.RGBA),this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE)),this.tiles){var b=this.tiles[y];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture)}}},c.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},c.prototype.hasTransition=function(){return this.video&&!this.video.paused},c}(nt),Le=function(l){function c(u,h,y,b){l.call(this,u,h,y,b),h.coordinates?Array.isArray(h.coordinates)&&h.coordinates.length===4&&!h.coordinates.some(function(w){return!Array.isArray(w)||w.length!==2||w.some(function(E){return typeof E!="number"})})||this.fire(new o.ErrorEvent(new o.ValidationError("sources."+u,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError("sources."+u,null,'missing required property "coordinates"'))),h.animate&&typeof h.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+u,null,'optional "animate" property must be a boolean value'))),h.canvas?typeof h.canvas=="string"||h.canvas instanceof o.window.HTMLCanvasElement||this.fire(new o.ErrorEvent(new o.ValidationError("sources."+u,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 o.ErrorEvent(new o.ValidationError("sources."+u,null,'missing required property "canvas"'))),this.options=h,this.animate=h.animate===void 0||h.animate}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof o.window.HTMLCanvasElement?this.options.canvas:o.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new o.ErrorEvent(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())},c.prototype.getCanvas=function(){return this.canvas},c.prototype.onAdd=function(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()},c.prototype.onRemove=function(){this.pause()},c.prototype.prepare=function(){var u=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,u=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,u=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var h=this.map.painter.context,y=h.gl;for(var b in this.boundsBuffer||(this.boundsBuffer=h.createVertexBuffer(this._boundsArray,qe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new o.Texture(h,this.canvas,y.RGBA,{premultiply:!0}),this.tiles){var w=this.tiles[b];w.state!=="loaded"&&(w.state="loaded",w.texture=this.texture)}}},c.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},c.prototype.hasTransition=function(){return this._playing},c.prototype._hasInvalidDimensions=function(){for(var u=0,h=[this.canvas.width,this.canvas.height];uthis.max){var w=this._getAndRemoveByKey(this.order[0]);w&&this.onRemove(w)}return this},Ct.prototype.has=function(l){return l.wrapped().key in this.data},Ct.prototype.getAndRemove=function(l){return this.has(l)?this._getAndRemoveByKey(l.wrapped().key):null},Ct.prototype._getAndRemoveByKey=function(l){var c=this.data[l].shift();return c.timeout&&clearTimeout(c.timeout),this.data[l].length===0&&delete this.data[l],this.order.splice(this.order.indexOf(l),1),c.value},Ct.prototype.getByKey=function(l){var c=this.data[l];return c?c[0].value:null},Ct.prototype.get=function(l){return this.has(l)?this.data[l.wrapped().key][0].value:null},Ct.prototype.remove=function(l,c){if(!this.has(l))return this;var u=l.wrapped().key,h=c===void 0?0:this.data[u].indexOf(c),y=this.data[u][h];return this.data[u].splice(h,1),y.timeout&&clearTimeout(y.timeout),this.data[u].length===0&&delete this.data[u],this.onRemove(y.value),this.order.splice(this.order.indexOf(u),1),this},Ct.prototype.setMaxSize=function(l){for(this.max=l;this.order.length>this.max;){var c=this._getAndRemoveByKey(this.order[0]);c&&this.onRemove(c)}return this},Ct.prototype.filter=function(l){var c=[];for(var u in this.data)for(var h=0,y=this.data[u];h1||(Math.abs(X)>1&&(Math.abs(X+J)===1?X+=J:Math.abs(X-J)===1&&(X-=J)),N.dem&&M.dem&&(M.dem.backfillBorder(N.dem,X,Q),M.neighboringTiles&&M.neighboringTiles[de]&&(M.neighboringTiles[de].backfilled=!0)))}},c.prototype.getTile=function(u){return this.getTileByID(u.key)},c.prototype.getTileByID=function(u){return this._tiles[u]},c.prototype._retainLoadedChildren=function(u,h,y,b){for(var w in this._tiles){var E=this._tiles[w];if(!(b[w]||!E.hasData()||E.tileID.overscaledZ<=h||E.tileID.overscaledZ>y)){for(var M=E.tileID;E&&E.tileID.overscaledZ>h+1;){var N=E.tileID.scaledTo(E.tileID.overscaledZ-1);(E=this._tiles[N.key])&&E.hasData()&&(M=N)}for(var X=M;X.overscaledZ>h;)if(u[(X=X.scaledTo(X.overscaledZ-1)).key]){b[M.key]=M;break}}}},c.prototype.findLoadedParent=function(u,h){if(u.key in this._loadedParentTiles){var y=this._loadedParentTiles[u.key];return y&&y.tileID.overscaledZ>=h?y:null}for(var b=u.overscaledZ-1;b>=h;b--){var w=u.scaledTo(b),E=this._getLoadedTile(w);if(E)return E}},c.prototype._getLoadedTile=function(u){var h=this._tiles[u.key];return h&&h.hasData()?h:this._cache.getByKey(u.wrapped().key)},c.prototype.updateCacheSize=function(u){var h=Math.ceil(u.width/this._source.tileSize)+1,y=Math.ceil(u.height/this._source.tileSize)+1,b=Math.floor(h*y*5),w=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,b):b;this._cache.setMaxSize(w)},c.prototype.handleWrapJump=function(u){var h=Math.round((u-(this._prevLng===void 0?u:this._prevLng))/360);if(this._prevLng=u,h){var y={};for(var b in this._tiles){var w=this._tiles[b];w.tileID=w.tileID.unwrapTo(w.tileID.wrap+h),y[w.tileID.key]=w}for(var E in this._tiles=y,this._timers)clearTimeout(this._timers[E]),delete this._timers[E];for(var M in this._tiles)this._setTileReloadTimer(M,this._tiles[M])}},c.prototype.update=function(u){var h=this;if(this.transform=u,this._sourceLoaded&&!this._paused){var y;this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?y=u.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Xe){return new o.OverscaledTileID(Xe.canonical.z,Xe.wrap,Xe.canonical.z,Xe.canonical.x,Xe.canonical.y)}):(y=u.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(y=y.filter(function(Xe){return h._source.hasTile(Xe)}))):y=[];var b=u.coveringZoomLevel(this._source),w=Math.max(b-c.maxOverzooming,this._source.minzoom),E=Math.max(b+c.maxUnderzooming,this._source.minzoom),M=this._updateRetainedTiles(y,b);if(Ue(this._source.type)){for(var N={},X={},Q=0,J=Object.keys(M);Qthis._source.maxzoom){var _e=xe.children(this._source.maxzoom)[0],Ae=this.getTile(_e);if(Ae&&Ae.hasData()){y[_e.key]=_e;continue}}else{var Ie=xe.children(this._source.maxzoom);if(y[Ie[0].key]&&y[Ie[1].key]&&y[Ie[2].key]&&y[Ie[3].key])continue}for(var Fe=ae.wasRequested(),De=xe.overscaledZ-1;De>=w;--De){var je=xe.scaledTo(De);if(b[je.key]||(b[je.key]=!0,!(ae=this.getTile(je))&&Fe&&(ae=this._addTile(je)),ae&&(y[je.key]=je,Fe=ae.wasRequested(),ae.hasData())))break}}}return y},c.prototype._updateLoadedParentTileCache=function(){for(var u in this._loadedParentTiles={},this._tiles){for(var h=[],y=void 0,b=this._tiles[u].tileID;b.overscaledZ>0;){if(b.key in this._loadedParentTiles){y=this._loadedParentTiles[b.key];break}h.push(b.key);var w=b.scaledTo(b.overscaledZ-1);if(y=this._getLoadedTile(w))break;b=w}for(var E=0,M=h;E0||(h.hasData()&&h.state!=="reloading"?this._cache.add(h.tileID,h,h.getExpiryTimeout()):(h.aborted=!0,this._abortTile(h),this._unloadTile(h))))},c.prototype.clearTiles=function(){for(var u in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(u);this._cache.reset()},c.prototype.tilesIn=function(u,h,y){var b=this,w=[],E=this.transform;if(!E)return w;for(var M=y?E.getCameraQueryGeometry(u):u,N=u.map(function(De){return E.pointCoordinate(De)}),X=M.map(function(De){return E.pointCoordinate(De)}),Q=this.getIds(),J=1/0,de=1/0,pe=-1/0,xe=-1/0,ae=0,_e=X;ae<_e.length;ae+=1){var Ae=_e[ae];J=Math.min(J,Ae.x),de=Math.min(de,Ae.y),pe=Math.max(pe,Ae.x),xe=Math.max(xe,Ae.y)}for(var Ie=function(De){var je=b._tiles[Q[De]];if(!je.holdingForFade()){var Xe=je.tileID,tt=Math.pow(2,E.zoom-je.tileID.overscaledZ),et=h*je.queryPadding*o.EXTENT/je.tileSize/tt,mt=[Xe.getTilePoint(new o.MercatorCoordinate(J,de)),Xe.getTilePoint(new o.MercatorCoordinate(pe,xe))];if(mt[0].x-et=0&&mt[1].y+et>=0){var At=N.map(function(kt){return Xe.getTilePoint(kt)}),It=X.map(function(kt){return Xe.getTilePoint(kt)});w.push({tile:je,tileID:Xe,queryGeometry:At,cameraQueryGeometry:It,scale:tt})}}},Fe=0;Fe=o.browser.now())return!0}return!1},c.prototype.setFeatureState=function(u,h,y){this._state.updateState(u=u||"_geojsonTileLayer",h,y)},c.prototype.removeFeatureState=function(u,h,y){this._state.removeFeatureState(u=u||"_geojsonTileLayer",h,y)},c.prototype.getFeatureState=function(u,h){return this._state.getState(u=u||"_geojsonTileLayer",h)},c.prototype.setDependencies=function(u,h,y){var b=this._tiles[u];b&&b.setDependencies(h,y)},c.prototype.reloadTilesForDependencies=function(u,h){for(var y in this._tiles)this._tiles[y].hasDependency(u,h)&&this._reloadTile(y,"reloading");this._cache.filter(function(b){return!b.hasDependency(u,h)})},c}(o.Evented);function Ee(l,c){var u=Math.abs(2*l.wrap)-+(l.wrap<0),h=Math.abs(2*c.wrap)-+(c.wrap<0);return l.overscaledZ-c.overscaledZ||h-u||c.canonical.y-l.canonical.y||c.canonical.x-l.canonical.x}function Ue(l){return l==="raster"||l==="image"||l==="video"}function Ge(){return new o.window.Worker(Ac.workerUrl)}re.maxOverzooming=10,re.maxUnderzooming=3;var Me="mapboxgl_preloaded_worker_pool",Ve=function(){this.active={}};Ve.prototype.acquire=function(l){if(!this.workers)for(this.workers=[];this.workers.length0?(h-b)/w:0;return this.points[y].mult(1-E).add(this.points[c].mult(E))};var kr=function(l,c,u){var h=this.boxCells=[],y=this.circleCells=[];this.xCellCount=Math.ceil(l/u),this.yCellCount=Math.ceil(c/u);for(var b=0;b=-c[0]&&u<=c[0]&&h>=-c[1]&&h<=c[1]}function eu(l,c,u,h,y,b,w,E){var M=h?l.textSizeData:l.iconSizeData,N=o.evaluateSizeForZoom(M,u.transform.zoom),X=[256/u.width*2+1,256/u.height*2+1],Q=h?l.text.dynamicLayoutVertexArray:l.icon.dynamicLayoutVertexArray;Q.clear();for(var J=l.lineVertexArray,de=h?l.text.placedSymbolArray:l.icon.placedSymbolArray,pe=u.transform.width/u.transform.height,xe=!1,ae=0;aeMath.abs(u.x-c.x)*h?{useVertical:!0}:(l===o.WritingMode.vertical?c.yu.x)?{needsFlipping:!0}:null}function td(l,c,u,h,y,b,w,E,M,N,X,Q,J,de){var pe,xe=c/24,ae=l.lineOffsetX*xe,_e=l.lineOffsetY*xe;if(l.numGlyphs>1){var Ae=l.glyphStartIndex+l.numGlyphs,Ie=l.lineStartIndex,Fe=l.lineStartIndex+l.lineLength,De=Xn(xe,E,ae,_e,u,X,Q,l,M,b,J);if(!De)return{notEnoughRoom:!0};var je=ar(De.first.point,w).point,Xe=ar(De.last.point,w).point;if(h&&!u){var tt=Ri(l.writingMode,je,Xe,de);if(tt)return tt}pe=[De.first];for(var et=l.glyphStartIndex+1;et0?kt.point:tu(Q,It,mt,1,y),gt=Ri(l.writingMode,mt,mr,de);if(gt)return gt}var Vt=bn(xe*E.getoffsetX(l.glyphStartIndex),ae,_e,u,X,Q,l.segment,l.lineStartIndex,l.lineStartIndex+l.lineLength,M,b,J);if(!Vt)return{notEnoughRoom:!0};pe=[Vt]}for(var Kt=0,jt=pe;Kt0?1:-1,pe=0;h&&(de*=-1,pe=Math.PI),de<0&&(pe+=Math.PI);for(var xe=de>0?E+w:E+w+1,ae=y,_e=y,Ae=0,Ie=0,Fe=Math.abs(J),De=[];Ae+Ie<=Fe;){if((xe+=de)=M)return null;if(_e=ae,De.push(ae),(ae=Q[xe])===void 0){var je=new o.Point(N.getx(xe),N.gety(xe)),Xe=ar(je,X);if(Xe.signedDistanceFromCamera>0)ae=Q[xe]=Xe.point;else{var tt=xe-de;ae=tu(Ae===0?b:new o.Point(N.getx(tt),N.gety(tt)),je,_e,Fe-Ae+1,X)}}Ae+=Ie,Ie=_e.dist(ae)}var et=(Fe-Ae)/Ie,mt=ae.sub(_e),At=mt.mult(et)._add(_e);At._add(mt._unit()._perp()._mult(u*de));var It=pe+Math.atan2(ae.y-_e.y,ae.x-_e.x);return De.push(At),{point:At,angle:It,path:De}}kr.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},kr.prototype.insert=function(l,c,u,h,y){this._forEachCell(c,u,h,y,this._insertBoxCell,this.boxUid++),this.boxKeys.push(l),this.bboxes.push(c),this.bboxes.push(u),this.bboxes.push(h),this.bboxes.push(y)},kr.prototype.insertCircle=function(l,c,u,h){this._forEachCell(c-h,u-h,c+h,u+h,this._insertCircleCell,this.circleUid++),this.circleKeys.push(l),this.circles.push(c),this.circles.push(u),this.circles.push(h)},kr.prototype._insertBoxCell=function(l,c,u,h,y,b){this.boxCells[y].push(b)},kr.prototype._insertCircleCell=function(l,c,u,h,y,b){this.circleCells[y].push(b)},kr.prototype._query=function(l,c,u,h,y,b){if(u<0||l>this.width||h<0||c>this.height)return!y&&[];var w=[];if(l<=0&&c<=0&&this.width<=u&&this.height<=h){if(y)return!0;for(var E=0;E0:w},kr.prototype._queryCircle=function(l,c,u,h,y){var b=l-u,w=l+u,E=c-u,M=c+u;if(w<0||b>this.width||M<0||E>this.height)return!h&&[];var N=[];return this._forEachCell(b,E,w,M,this._queryCellCircle,N,{hitTest:h,circle:{x:l,y:c,radius:u},seenUids:{box:{},circle:{}}},y),h?N.length>0:N},kr.prototype.query=function(l,c,u,h,y){return this._query(l,c,u,h,!1,y)},kr.prototype.hitTest=function(l,c,u,h,y){return this._query(l,c,u,h,!0,y)},kr.prototype.hitTestCircle=function(l,c,u,h){return this._queryCircle(l,c,u,!0,h)},kr.prototype._queryCell=function(l,c,u,h,y,b,w,E){var M=w.seenUids,N=this.boxCells[y];if(N!==null)for(var X=this.bboxes,Q=0,J=N;Q=X[pe+0]&&h>=X[pe+1]&&(!E||E(this.boxKeys[de]))){if(w.hitTest)return b.push(!0),!0;b.push({key:this.boxKeys[de],x1:X[pe],y1:X[pe+1],x2:X[pe+2],y2:X[pe+3]})}}}var xe=this.circleCells[y];if(xe!==null)for(var ae=this.circles,_e=0,Ae=xe;_ew*w+E*E},kr.prototype._circleAndRectCollide=function(l,c,u,h,y,b,w){var E=(b-h)/2,M=Math.abs(l-(h+E));if(M>E+u)return!1;var N=(w-y)/2,X=Math.abs(c-(y+N));if(X>N+u)return!1;if(M<=E||X<=N)return!0;var Q=M-E,J=X-N;return Q*Q+J*J<=u*u};var ru=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function bi(l,c){for(var u=0;u=1;mr--)kt.push(At.path[mr]);for(var gt=1;gt0){for(var Nt=kt[0].clone(),Zt=kt[0].clone(),Bt=1;Bt=tt.x&&Zt.x<=et.x&&Nt.y>=tt.y&&Zt.y<=et.y?[kt]:Zt.xet.x||Zt.yet.y?[]:o.clipLine([kt],tt.x,tt.y,et.x,et.y)}for(var Rt=0,Vn=jt;Rt=this.screenRightBoundary||h<100||c>this.screenBottomBoundary},mo.prototype.isInsideGrid=function(l,c,u,h){return u>=0&&l=0&&c0?(this.prevPlacement&&this.prevPlacement.variableOffsets[Q.crossTileID]&&this.prevPlacement.placements[Q.crossTileID]&&this.prevPlacement.placements[Q.crossTileID].text&&(xe=this.prevPlacement.variableOffsets[Q.crossTileID].anchor),this.variableOffsets[Q.crossTileID]={textOffset:ae,width:u,height:h,anchor:l,textBoxScale:y,prevAnchor:xe},this.markUsedJustification(J,l,Q,de),J.allowVerticalPlacement&&(this.markUsedOrientation(J,de,Q),this.placedOrientations[Q.crossTileID]=de),{shift:_e,placedGlyphBoxes:Ae}):void 0},wi.prototype.placeLayerBucketPart=function(l,c,u){var h=this,y=l.parameters,b=y.bucket,w=y.layout,E=y.posMatrix,M=y.textLabelPlaneMatrix,N=y.labelToScreenMatrix,X=y.textPixelRatio,Q=y.holdingForFade,J=y.collisionBoxArray,de=y.partiallyEvaluatedTextSize,pe=y.collisionGroup,xe=w.get("text-optional"),ae=w.get("icon-optional"),_e=w.get("text-allow-overlap"),Ae=w.get("icon-allow-overlap"),Ie=w.get("text-rotation-alignment")==="map",Fe=w.get("text-pitch-alignment")==="map",De=w.get("icon-text-fit")!=="none",je=w.get("symbol-z-order")==="viewport-y",Xe=_e&&(Ae||!b.hasIconData()||ae),tt=Ae&&(_e||!b.hasTextData()||xe);!b.collisionArrays&&J&&b.deserializeCollisionBoxes(J);var et=function(gt,Vt){if(!c[gt.crossTileID])if(Q)h.placements[gt.crossTileID]=new _f(!1,!1,!1);else{var Kt,jt=!1,Nt=!1,Zt=!0,Bt=null,Rt={box:null,offscreen:null},Vn={box:null,offscreen:null},mn=null,mi=null,Jn=0,hn=0,wn=0;Vt.textFeatureIndex?Jn=Vt.textFeatureIndex:gt.useRuntimeCollisionCircles&&(Jn=gt.featureIndex),Vt.verticalTextFeatureIndex&&(hn=Vt.verticalTextFeatureIndex);var Xi=Vt.textBox;if(Xi){var Ei=function(Sr){var so=o.WritingMode.horizontal;if(b.allowVerticalPlacement&&!Sr&&h.prevPlacement){var Bi=h.prevPlacement.placedOrientations[gt.crossTileID];Bi&&(h.placedOrientations[gt.crossTileID]=Bi,h.markUsedOrientation(b,so=Bi,gt))}return so},Ya=function(Sr,so){if(b.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&Vt.verticalTextBox)for(var Bi=0,js=b.writingModes;Bi0&&(Di=Di.filter(function(Sr){return Sr!==jo.anchor})).unshift(jo.anchor)}var bo=function(Sr,so,Bi){for(var js=Sr.x2-Sr.x1,$v=Sr.y2-Sr.y1,Sc=gt.textBoxScale,qv=De&&!Ae?so:null,Au={box:[],offscreen:!1},Xf=_e?2*Di.length:Di.length,wl=0;wl=Di.length,gt,b,Bi,qv);if(Ec&&(Au=Ec.placedGlyphBoxes)&&Au.box&&Au.box.length){jt=!0,Bt=Ec.shift;break}}return Au};Ya(function(){return bo(Xi,Vt.iconBox,o.WritingMode.horizontal)},function(){var Sr=Vt.verticalTextBox;return b.allowVerticalPlacement&&!(Rt&&Rt.box&&Rt.box.length)&>.numVerticalGlyphVertices>0&&Sr?bo(Sr,Vt.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}}),Rt&&(jt=Rt.box,Zt=Rt.offscreen);var xu=Ei(Rt&&Rt.box);if(!jt&&h.prevPlacement){var xl=h.prevPlacement.variableOffsets[gt.crossTileID];xl&&(h.variableOffsets[gt.crossTileID]=xl,h.markUsedJustification(b,xl.anchor,gt,xu))}}else{var Ja=function(Sr,so){var Bi=h.collisionIndex.placeCollisionBox(Sr,_e,X,E,pe.predicate);return Bi&&Bi.box&&Bi.box.length&&(h.markUsedOrientation(b,so,gt),h.placedOrientations[gt.crossTileID]=so),Bi};Ya(function(){return Ja(Xi,o.WritingMode.horizontal)},function(){var Sr=Vt.verticalTextBox;return b.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&Sr?Ja(Sr,o.WritingMode.vertical):{box:null,offscreen:null}}),Ei(Rt&&Rt.box&&Rt.box.length)}}if(jt=(Kt=Rt)&&Kt.box&&Kt.box.length>0,Zt=Kt&&Kt.offscreen,gt.useRuntimeCollisionCircles){var bl=b.text.placedSymbolArray.get(gt.centerJustifiedTextSymbolIndex),bu=o.evaluateSizeForFeature(b.textSizeData,de,bl),ia=w.get("text-padding");mn=h.collisionIndex.placeCollisionCircles(_e,bl,b.lineVertexArray,b.glyphOffsetArray,bu,E,M,N,u,Fe,pe.predicate,gt.collisionCircleDiameter,ia),jt=_e||mn.circles.length>0&&!mn.collisionDetected,Zt=Zt&&mn.offscreen}if(Vt.iconFeatureIndex&&(wn=Vt.iconFeatureIndex),Vt.iconBox){var wu=function(Sr){var so=De&&Bt?ea(Sr,Bt.x,Bt.y,Ie,Fe,h.transform.angle):Sr;return h.collisionIndex.placeCollisionBox(so,Ae,X,E,pe.predicate)};Nt=Vn&&Vn.box&&Vn.box.length&&Vt.verticalIconBox?(mi=wu(Vt.verticalIconBox)).box.length>0:(mi=wu(Vt.iconBox)).box.length>0,Zt=Zt&&mi.offscreen}var oa=xe||gt.numHorizontalGlyphVertices===0&>.numVerticalGlyphVertices===0,$n=ae||gt.numIconVertices===0;if(oa||$n?$n?oa||(Nt=Nt&&jt):jt=Nt&&jt:Nt=jt=Nt&&jt,jt&&Kt&&Kt.box&&h.collisionIndex.insertCollisionBox(Kt.box,w.get("text-ignore-placement"),b.bucketInstanceId,Vn&&Vn.box&&hn?hn:Jn,pe.ID),Nt&&mi&&h.collisionIndex.insertCollisionBox(mi.box,w.get("icon-ignore-placement"),b.bucketInstanceId,wn,pe.ID),mn&&(jt&&h.collisionIndex.insertCollisionCircles(mn.circles,w.get("text-ignore-placement"),b.bucketInstanceId,Jn,pe.ID),u)){var wa=b.bucketInstanceId,es=h.collisionCircleArrays[wa];es===void 0&&(es=h.collisionCircleArrays[wa]=new go);for(var Fs=0;Fs=0;--At){var It=mt[At];et(b.symbolInstances.get(It),b.collisionArrays[It])}else for(var kt=l.symbolInstanceStart;kt=0&&(l.text.placedSymbolArray.get(E).crossTileID=y>=0&&E!==y?0:u.crossTileID)}},wi.prototype.markUsedOrientation=function(l,c,u){for(var h=c===o.WritingMode.horizontal||c===o.WritingMode.horizontalOnly?c:0,y=c===o.WritingMode.vertical?c:0,b=0,w=[u.leftJustifiedTextSymbolIndex,u.centerJustifiedTextSymbolIndex,u.rightJustifiedTextSymbolIndex];b0,tt=h.placedOrientations[Ae.crossTileID],et=tt===o.WritingMode.vertical,mt=tt===o.WritingMode.horizontal||tt===o.WritingMode.horizontalOnly;if(Ie>0||Fe>0){var At=wf(je.text);de(l.text,Ie,et?ul:At),de(l.text,Fe,mt?ul:At);var It=je.text.isHidden();[Ae.rightJustifiedTextSymbolIndex,Ae.centerJustifiedTextSymbolIndex,Ae.leftJustifiedTextSymbolIndex].forEach(function(Rt){Rt>=0&&(l.text.placedSymbolArray.get(Rt).hidden=It||et?1:0)}),Ae.verticalPlacedTextSymbolIndex>=0&&(l.text.placedSymbolArray.get(Ae.verticalPlacedTextSymbolIndex).hidden=It||mt?1:0);var kt=h.variableOffsets[Ae.crossTileID];kt&&h.markUsedJustification(l,kt.anchor,Ae,tt);var mr=h.placedOrientations[Ae.crossTileID];mr&&(h.markUsedJustification(l,"left",Ae,mr),h.markUsedOrientation(l,mr,Ae))}if(Xe){var gt=wf(je.icon),Vt=!(Q&&Ae.verticalPlacedIconSymbolIndex&&et);Ae.placedIconSymbolIndex>=0&&(de(l.icon,Ae.numIconVertices,Vt?gt:ul),l.icon.placedSymbolArray.get(Ae.placedIconSymbolIndex).hidden=je.icon.isHidden()),Ae.verticalPlacedIconSymbolIndex>=0&&(de(l.icon,Ae.numVerticalIconVertices,Vt?ul:gt),l.icon.placedSymbolArray.get(Ae.verticalPlacedIconSymbolIndex).hidden=je.icon.isHidden())}if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){var Kt=l.collisionArrays[_e];if(Kt){var jt=new o.Point(0,0);if(Kt.textBox||Kt.verticalTextBox){var Nt=!0;if(M){var Zt=h.variableOffsets[De];Zt?(jt=si(Zt.anchor,Zt.width,Zt.height,Zt.textOffset,Zt.textBoxScale),N&&jt._rotate(X?h.transform.angle:-h.transform.angle)):Nt=!1}Kt.textBox&&ws(l.textCollisionBox.collisionVertexArray,je.text.placed,!Nt||et,jt.x,jt.y),Kt.verticalTextBox&&ws(l.textCollisionBox.collisionVertexArray,je.text.placed,!Nt||mt,jt.x,jt.y)}var Bt=!!(!mt&&Kt.verticalIconBox);Kt.iconBox&&ws(l.iconCollisionBox.collisionVertexArray,je.icon.placed,Bt,Q?jt.x:0,Q?jt.y:0),Kt.verticalIconBox&&ws(l.iconCollisionBox.collisionVertexArray,je.icon.placed,!Bt,Q?jt.x:0,Q?jt.y:0)}}},xe=0;xel},wi.prototype.setStale=function(){this.stale=!0};var Pv=Math.pow(2,25),Mv=Math.pow(2,24),rd=Math.pow(2,17),zv=Math.pow(2,16),xf=Math.pow(2,9),Lv=Math.pow(2,8),bf=Math.pow(2,1);function wf(l){if(l.opacity===0&&!l.placed)return 0;if(l.opacity===1&&l.placed)return 4294967295;var c=l.placed?1:0,u=Math.floor(127*l.opacity);return u*Pv+c*Mv+u*rd+c*zv+u*xf+c*Lv+u*bf+c}var ul=0,nd=function(l){this._sortAcrossTiles=l.layout.get("symbol-z-order")!=="viewport-y"&&l.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};nd.prototype.continuePlacement=function(l,c,u,h,y){for(var b=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var w=c[l[this._currentPlacementIndex]],E=this.placement.collisionIndex.transform.zoom;if(w.type==="symbol"&&(!w.minzoom||w.minzoom<=E)&&(!w.maxzoom||w.maxzoom>E)){if(this._inProgressLayer||(this._inProgressLayer=new nd(w)),this._inProgressLayer.continuePlacement(u[w.source],this.placement,this._showCollisionBoxes,w,b))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},nu.prototype.commit=function(l){return this.placement.commit(l),this.placement};var Af=512/o.EXTENT/2,ic=function(l,c,u){this.tileID=l,this.indexedSymbolInstances={},this.bucketInstanceId=u;for(var h=0;hl.overscaledZ)for(var E in w){var M=w[E];M.tileID.isChildOf(l)&&M.findMatches(c.symbolInstances,l,y)}else{var N=w[l.scaledTo(Number(b)).key];N&&N.findMatches(c.symbolInstances,l,y)}}for(var X=0;X1?"@2x":"",Q=o.getJSON(b.transformRequest(b.normalizeSpriteURL(y,X,".json"),o.ResourceType.SpriteJSON),function(pe,xe){Q=null,N||(N=pe,E=xe,de())}),J=o.getImage(b.transformRequest(b.normalizeSpriteURL(y,X,".png"),o.ResourceType.SpriteImage),function(pe,xe){J=null,N||(N=pe,M=xe,de())});function de(){if(N)w(N);else if(E&&M){var pe=o.browser.getImageData(M),xe={};for(var ae in E){var _e=E[ae],Ae=_e.width,Ie=_e.height,Fe=_e.x,De=_e.y,je=_e.sdf,Xe=_e.pixelRatio,tt=_e.stretchX,et=_e.stretchY,mt=_e.content,At=new o.RGBAImage({width:Ae,height:Ie});o.RGBAImage.copy(pe,At,{x:Fe,y:De},{x:0,y:0},{width:Ae,height:Ie}),xe[ae]={data:At,pixelRatio:Xe,sdf:je,stretchX:tt,stretchY:et,content:mt}}w(null,xe)}}return{cancel:function(){Q&&(Q.cancel(),Q=null),J&&(J.cancel(),J=null)}}}(u,this.map._requestManager,function(y,b){if(h._spriteRequest=null,y)h.fire(new o.ErrorEvent(y));else if(b)for(var w in b)h.imageManager.addImage(w,b[w]);h.imageManager.setLoaded(!0),h._availableImages=h.imageManager.listImages(),h.dispatcher.broadcast("setImages",h._availableImages),h.fire(new o.Event("data",{dataType:"style"}))})},c.prototype._validateLayer=function(u){var h=this.sourceCaches[u.source];if(h){var y=u.sourceLayer;if(y){var b=h.getSource();(b.type==="geojson"||b.vectorLayerIds&&b.vectorLayerIds.indexOf(y)===-1)&&this.fire(new o.ErrorEvent(new Error('Source layer "'+y+'" does not exist on source "'+b.id+'" as specified by style layer "'+u.id+'"')))}}},c.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()},c.prototype._serializeLayers=function(u){for(var h=[],y=0,b=u;y0)throw new Error("Unimplemented: "+b.map(function(w){return w.command}).join(", ")+".");return y.forEach(function(w){w.command!=="setTransition"&&h[w.command].apply(h,w.args)}),this.stylesheet=u,!0},c.prototype.addImage=function(u,h){if(this.getImage(u))return this.fire(new o.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(u,h),this._afterImageUpdated(u)},c.prototype.updateImage=function(u,h){this.imageManager.updateImage(u,h)},c.prototype.getImage=function(u){return this.imageManager.getImage(u)},c.prototype.removeImage=function(u){if(!this.getImage(u))return this.fire(new o.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(u),this._afterImageUpdated(u)},c.prototype._afterImageUpdated=function(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))},c.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},c.prototype.addSource=function(u,h,y){var b=this;if(y===void 0&&(y={}),this._checkLoaded(),this.sourceCaches[u]!==void 0)throw new Error("There is already a source with this ID");if(!h.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(h).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(h.type)>=0&&this._validate(o.validateStyle.source,"sources."+u,h,null,y))){this.map&&this.map._collectResourceTiming&&(h.collectResourceTiming=!0);var w=this.sourceCaches[u]=new re(u,h,this.dispatcher);w.style=this,w.setEventedParent(this,function(){return{isSourceLoaded:b.loaded(),source:w.serialize(),sourceId:u}}),w.onAdd(this.map),this._changed=!0}},c.prototype.removeSource=function(u){if(this._checkLoaded(),this.sourceCaches[u]===void 0)throw new Error("There is no source with this ID");for(var h in this._layers)if(this._layers[h].source===u)return this.fire(new o.ErrorEvent(new Error('Source "'+u+'" cannot be removed while layer "'+h+'" is using it.')));var y=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],y.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),y.setEventedParent(null),y.clearTiles(),y.onRemove&&y.onRemove(this.map),this._changed=!0},c.prototype.setGeoJSONSourceData=function(u,h){this._checkLoaded(),this.sourceCaches[u].getSource().setData(h),this._changed=!0},c.prototype.getSource=function(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()},c.prototype.addLayer=function(u,h,y){y===void 0&&(y={}),this._checkLoaded();var b=u.id;if(this.getLayer(b))this.fire(new o.ErrorEvent(new Error('Layer with id "'+b+'" already exists on this map')));else{var w;if(u.type==="custom"){if(As(this,o.validateCustomStyleLayer(u)))return;w=o.createStyleLayer(u)}else{if(typeof u.source=="object"&&(this.addSource(b,u.source),u=o.clone$1(u),u=o.extend(u,{source:b})),this._validate(o.validateStyle.layer,"layers."+b,u,{arrayIndex:-1},y))return;w=o.createStyleLayer(u),this._validateLayer(w),w.setEventedParent(this,{layer:{id:b}}),this._serializedLayers[w.id]=w.serialize()}var E=h?this._order.indexOf(h):this._order.length;if(h&&E===-1)this.fire(new o.ErrorEvent(new Error('Layer with id "'+h+'" does not exist on this map.')));else{if(this._order.splice(E,0,b),this._layerOrderChanged=!0,this._layers[b]=w,this._removedLayers[b]&&w.source&&w.type!=="custom"){var M=this._removedLayers[b];delete this._removedLayers[b],M.type!==w.type?this._updatedSources[w.source]="clear":(this._updatedSources[w.source]="reload",this.sourceCaches[w.source].pause())}this._updateLayer(w),w.onAdd&&w.onAdd(this.map)}}},c.prototype.moveLayer=function(u,h){if(this._checkLoaded(),this._changed=!0,this._layers[u]){if(u!==h){var y=this._order.indexOf(u);this._order.splice(y,1);var b=h?this._order.indexOf(h):this._order.length;h&&b===-1?this.fire(new o.ErrorEvent(new Error('Layer with id "'+h+'" does not exist on this map.'))):(this._order.splice(b,0,u),this._layerOrderChanged=!0)}}else this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style and cannot be moved.")))},c.prototype.removeLayer=function(u){this._checkLoaded();var h=this._layers[u];if(h){h.setEventedParent(null);var y=this._order.indexOf(u);this._order.splice(y,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=h,delete this._layers[u],delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],h.onRemove&&h.onRemove(this.map)}else this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style and cannot be removed.")))},c.prototype.getLayer=function(u){return this._layers[u]},c.prototype.hasLayer=function(u){return u in this._layers},c.prototype.setLayerZoomRange=function(u,h,y){this._checkLoaded();var b=this.getLayer(u);b?b.minzoom===h&&b.maxzoom===y||(h!=null&&(b.minzoom=h),y!=null&&(b.maxzoom=y),this._updateLayer(b)):this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style and cannot have zoom extent.")))},c.prototype.setFilter=function(u,h,y){y===void 0&&(y={}),this._checkLoaded();var b=this.getLayer(u);if(b){if(!o.deepEqual(b.filter,h))return h==null?(b.filter=void 0,void this._updateLayer(b)):void(this._validate(o.validateStyle.filter,"layers."+b.id+".filter",h,null,y)||(b.filter=o.clone$1(h),this._updateLayer(b)))}else this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style and cannot be filtered.")))},c.prototype.getFilter=function(u){return o.clone$1(this.getLayer(u).filter)},c.prototype.setLayoutProperty=function(u,h,y,b){b===void 0&&(b={}),this._checkLoaded();var w=this.getLayer(u);w?o.deepEqual(w.getLayoutProperty(h),y)||(w.setLayoutProperty(h,y,b),this._updateLayer(w)):this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style and cannot be styled.")))},c.prototype.getLayoutProperty=function(u,h){var y=this.getLayer(u);if(y)return y.getLayoutProperty(h);this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style.")))},c.prototype.setPaintProperty=function(u,h,y,b){b===void 0&&(b={}),this._checkLoaded();var w=this.getLayer(u);w?o.deepEqual(w.getPaintProperty(h),y)||(w.setPaintProperty(h,y,b)&&this._updateLayer(w),this._changed=!0,this._updatedPaintProps[u]=!0):this.fire(new o.ErrorEvent(new Error("The layer '"+u+"' does not exist in the map's style and cannot be styled.")))},c.prototype.getPaintProperty=function(u,h){return this.getLayer(u).getPaintProperty(h)},c.prototype.setFeatureState=function(u,h){this._checkLoaded();var y=u.source,b=u.sourceLayer,w=this.sourceCaches[y];if(w!==void 0){var E=w.getSource().type;E==="geojson"&&b?this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):E!=="vector"||b?(u.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),w.setFeatureState(b,u.id,h)):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new o.ErrorEvent(new Error("The source '"+y+"' does not exist in the map's style.")))},c.prototype.removeFeatureState=function(u,h){this._checkLoaded();var y=u.source,b=this.sourceCaches[y];if(b!==void 0){var w=b.getSource().type,E=w==="vector"?u.sourceLayer:void 0;w!=="vector"||E?h&&typeof u.id!="string"&&typeof u.id!="number"?this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):b.removeFeatureState(E,u.id,h):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new o.ErrorEvent(new Error("The source '"+y+"' does not exist in the map's style.")))},c.prototype.getFeatureState=function(u){this._checkLoaded();var h=u.source,y=u.sourceLayer,b=this.sourceCaches[h];if(b!==void 0){if(b.getSource().type!=="vector"||y)return u.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),b.getFeatureState(y,u.id);this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new o.ErrorEvent(new Error("The source '"+h+"' does not exist in the map's style.")))},c.prototype.getTransition=function(){return o.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},c.prototype.serialize=function(){return o.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:o.mapObject(this.sourceCaches,function(u){return u.serialize()}),layers:this._serializeLayers(this._order)},function(u){return u!==void 0})},c.prototype._updateLayer=function(u){this._updatedLayers[u.id]=!0,u.source&&!this._updatedSources[u.source]&&this.sourceCaches[u.source].getSource().type!=="raster"&&(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause()),this._changed=!0},c.prototype._flattenAndSortRenderedFeatures=function(u){for(var h=this,y=function(tt){return h._layers[tt].type==="fill-extrusion"},b={},w=[],E=this._order.length-1;E>=0;E--){var M=this._order[E];if(y(M)){b[M]=E;for(var N=0,X=u;N=0;xe--){var ae=this._order[xe];if(y(ae))for(var _e=w.length-1;_e>=0;_e--){var Ae=w[_e].feature;if(b[Ae.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Ef=Ur("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Cf=Ur("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),Bv=Ur(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),iu=Ur(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),ou=Ur(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),kf=Ur(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),li=Ur(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),ld=Ur(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),Va=Ur(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),$a=Ur(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Ss=Ur(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;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);}`),Es=Ur(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;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);}`),qa=Ur(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),Cs=Ur(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),ks=Ur(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),Wa=Ur(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),If=Ur(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),Tf=Ur(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function Ur(l,c){var u=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,h=c.match(/attribute ([\w]+) ([\w]+)/g),y=l.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),b=c.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),w=b?b.concat(y):y,E={};return{fragmentSource:l=l.replace(u,function(M,N,X,Q,J){return E[J]=!0,N==="define"?` +#ifndef HAS_UNIFORM_u_`+J+` +varying `+X+" "+Q+" "+J+`; +#else +uniform `+X+" "+Q+" u_"+J+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+J+` + `+X+" "+Q+" "+J+" = u_"+J+`; +#endif +`}),vertexSource:c=c.replace(u,function(M,N,X,Q,J){var de=Q==="float"?"vec2":"vec4",pe=J.match(/color/)?"color":de;return E[J]?N==="define"?` +#ifndef HAS_UNIFORM_u_`+J+` +uniform lowp float u_`+J+`_t; +attribute `+X+" "+de+" a_"+J+`; +varying `+X+" "+Q+" "+J+`; +#else +uniform `+X+" "+Q+" u_"+J+`; +#endif +`:pe==="vec4"?` +#ifndef HAS_UNIFORM_u_`+J+` + `+J+" = a_"+J+`; +#else + `+X+" "+Q+" "+J+" = u_"+J+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+J+` + `+J+" = unpack_mix_"+pe+"(a_"+J+", u_"+J+`_t); +#else + `+X+" "+Q+" "+J+" = u_"+J+`; +#endif +`:N==="define"?` +#ifndef HAS_UNIFORM_u_`+J+` +uniform lowp float u_`+J+`_t; +attribute `+X+" "+de+" a_"+J+`; +#else +uniform `+X+" "+Q+" u_"+J+`; +#endif +`:pe==="vec4"?` +#ifndef HAS_UNIFORM_u_`+J+` + `+X+" "+Q+" "+J+" = a_"+J+`; +#else + `+X+" "+Q+" "+J+" = u_"+J+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+J+` + `+X+" "+Q+" "+J+" = unpack_mix_"+pe+"(a_"+J+", u_"+J+`_t); +#else + `+X+" "+Q+" "+J+" = u_"+J+`; +#endif +`}),staticAttributes:h,staticUniforms:w}}var Ov=Object.freeze({__proto__:null,prelude:cl,background:Sf,backgroundPattern:Rv,circle:Dv,clippingMask:id,heatmap:od,heatmapTexture:ad,collisionBox:sd,collisionCircle:Ef,debug:Cf,fill:Bv,fillOutline:iu,fillOutlinePattern:ou,fillPattern:kf,fillExtrusion:li,fillExtrusionPattern:ld,hillshadePrepare:Va,hillshade:$a,line:Ss,lineGradient:Es,linePattern:qa,lineSDF:Cs,raster:ks,symbolIcon:Wa,symbolSDF:If,symbolTextAndIcon:Tf}),ac=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Pf(l){for(var c=[],u=0;u>16,E>>16],u_pixel_coord_lower:[65535&w,65535&E]}}Mf.prototype.draw=function(l,c,u,h,y,b,w,E,M,N,X,Q,J,de,pe,xe){var ae,_e=l.gl;if(!this.failedToCreate){for(var Ae in l.program.set(this.program),l.setDepthMode(u),l.setStencilMode(h),l.setColorMode(y),l.setCullFace(b),this.fixedUniforms)this.fixedUniforms[Ae].set(w[Ae]);de&&de.setUniforms(l,this.binderUniforms,Q,{zoom:J});for(var Ie=(ae={},ae[_e.LINES]=2,ae[_e.TRIANGLES]=3,ae[_e.LINE_STRIP]=1,ae)[c],Fe=0,De=X.get();Fe0?1-1/(1.001-w):-w),u_contrast_factor:(b=y.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:Ff(y.paint.get("raster-hue-rotate"))};var b,w};function Ff(l){l*=Math.PI/180;var c=Math.sin(l),u=Math.cos(l);return[(2*u+1)/3,(-Math.sqrt(3)*c-u+1)/3,(Math.sqrt(3)*c-u+1)/3]}var lc,dl=function(l,c,u,h,y,b,w,E,M,N){var X=y.transform;return{u_is_size_zoom_constant:+(l==="constant"||l==="source"),u_is_size_feature_constant:+(l==="constant"||l==="camera"),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:X.cameraToCenterDistance,u_pitch:X.pitch/360*2*Math.PI,u_rotate_symbol:+u,u_aspect_ratio:X.width/X.height,u_fade_change:y.options.fadeDuration?y.symbolFadeChange:1,u_matrix:b,u_label_plane_matrix:w,u_coord_matrix:E,u_is_text:+M,u_pitch_with_map:+h,u_texsize:N,u_texture:0}},su=function(l,c,u,h,y,b,w,E,M,N,X){var Q=y.transform;return o.extend(dl(l,c,u,h,y,b,w,E,M,N),{u_gamma_scale:h?Math.cos(Q._pitch)*Q.cameraToCenterDistance:1,u_device_pixel_ratio:o.browser.devicePixelRatio,u_is_halo:+X})},uc=function(l,c,u,h,y,b,w,E,M,N){return o.extend(su(l,c,u,h,y,b,w,E,!0,M,!0),{u_texsize_icon:N,u_texture_icon:1})},lu=function(l,c,u){return{u_matrix:l,u_opacity:c,u_color:u}},hl=function(l,c,u,h,y,b){return o.extend(function(w,E,M,N){var X=M.imageManager.getPattern(w.from.toString()),Q=M.imageManager.getPattern(w.to.toString()),J=M.imageManager.getPixelSize(),de=J.width,pe=J.height,xe=Math.pow(2,N.tileID.overscaledZ),ae=N.tileSize*Math.pow(2,M.transform.tileZoom)/xe,_e=ae*(N.tileID.canonical.x+N.tileID.wrap*xe),Ae=ae*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:X.tl,u_pattern_br_a:X.br,u_pattern_tl_b:Q.tl,u_pattern_br_b:Q.br,u_texsize:[de,pe],u_mix:E.t,u_pattern_size_a:X.displaySize,u_pattern_size_b:Q.displaySize,u_scale_a:E.fromScale,u_scale_b:E.toScale,u_tile_units_to_pixels:1/Yr(N,1,M.transform.tileZoom),u_pixel_coord_upper:[_e>>16,Ae>>16],u_pixel_coord_lower:[65535&_e,65535&Ae]}}(h,b,u,y),{u_matrix:l,u_opacity:c})},jf={fillExtrusion:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_lightpos:new o.Uniform3f(l,c.u_lightpos),u_lightintensity:new o.Uniform1f(l,c.u_lightintensity),u_lightcolor:new o.Uniform3f(l,c.u_lightcolor),u_vertical_gradient:new o.Uniform1f(l,c.u_vertical_gradient),u_opacity:new o.Uniform1f(l,c.u_opacity)}},fillExtrusionPattern:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_lightpos:new o.Uniform3f(l,c.u_lightpos),u_lightintensity:new o.Uniform1f(l,c.u_lightintensity),u_lightcolor:new o.Uniform3f(l,c.u_lightcolor),u_vertical_gradient:new o.Uniform1f(l,c.u_vertical_gradient),u_height_factor:new o.Uniform1f(l,c.u_height_factor),u_image:new o.Uniform1i(l,c.u_image),u_texsize:new o.Uniform2f(l,c.u_texsize),u_pixel_coord_upper:new o.Uniform2f(l,c.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(l,c.u_pixel_coord_lower),u_scale:new o.Uniform3f(l,c.u_scale),u_fade:new o.Uniform1f(l,c.u_fade),u_opacity:new o.Uniform1f(l,c.u_opacity)}},fill:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix)}},fillPattern:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_image:new o.Uniform1i(l,c.u_image),u_texsize:new o.Uniform2f(l,c.u_texsize),u_pixel_coord_upper:new o.Uniform2f(l,c.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(l,c.u_pixel_coord_lower),u_scale:new o.Uniform3f(l,c.u_scale),u_fade:new o.Uniform1f(l,c.u_fade)}},fillOutline:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_world:new o.Uniform2f(l,c.u_world)}},fillOutlinePattern:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_world:new o.Uniform2f(l,c.u_world),u_image:new o.Uniform1i(l,c.u_image),u_texsize:new o.Uniform2f(l,c.u_texsize),u_pixel_coord_upper:new o.Uniform2f(l,c.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(l,c.u_pixel_coord_lower),u_scale:new o.Uniform3f(l,c.u_scale),u_fade:new o.Uniform1f(l,c.u_fade)}},circle:function(l,c){return{u_camera_to_center_distance:new o.Uniform1f(l,c.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(l,c.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(l,c.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(l,c.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(l,c.u_matrix)}},collisionBox:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_camera_to_center_distance:new o.Uniform1f(l,c.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(l,c.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(l,c.u_extrude_scale),u_overscale_factor:new o.Uniform1f(l,c.u_overscale_factor)}},collisionCircle:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_inv_matrix:new o.UniformMatrix4f(l,c.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(l,c.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(l,c.u_viewport_size)}},debug:function(l,c){return{u_color:new o.UniformColor(l,c.u_color),u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_overlay:new o.Uniform1i(l,c.u_overlay),u_overlay_scale:new o.Uniform1f(l,c.u_overlay_scale)}},clippingMask:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix)}},heatmap:function(l,c){return{u_extrude_scale:new o.Uniform1f(l,c.u_extrude_scale),u_intensity:new o.Uniform1f(l,c.u_intensity),u_matrix:new o.UniformMatrix4f(l,c.u_matrix)}},heatmapTexture:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_world:new o.Uniform2f(l,c.u_world),u_image:new o.Uniform1i(l,c.u_image),u_color_ramp:new o.Uniform1i(l,c.u_color_ramp),u_opacity:new o.Uniform1f(l,c.u_opacity)}},hillshade:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_image:new o.Uniform1i(l,c.u_image),u_latrange:new o.Uniform2f(l,c.u_latrange),u_light:new o.Uniform2f(l,c.u_light),u_shadow:new o.UniformColor(l,c.u_shadow),u_highlight:new o.UniformColor(l,c.u_highlight),u_accent:new o.UniformColor(l,c.u_accent)}},hillshadePrepare:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_image:new o.Uniform1i(l,c.u_image),u_dimension:new o.Uniform2f(l,c.u_dimension),u_zoom:new o.Uniform1f(l,c.u_zoom),u_unpack:new o.Uniform4f(l,c.u_unpack)}},line:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_ratio:new o.Uniform1f(l,c.u_ratio),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(l,c.u_units_to_pixels)}},lineGradient:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_ratio:new o.Uniform1f(l,c.u_ratio),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(l,c.u_units_to_pixels),u_image:new o.Uniform1i(l,c.u_image),u_image_height:new o.Uniform1f(l,c.u_image_height)}},linePattern:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_texsize:new o.Uniform2f(l,c.u_texsize),u_ratio:new o.Uniform1f(l,c.u_ratio),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_image:new o.Uniform1i(l,c.u_image),u_units_to_pixels:new o.Uniform2f(l,c.u_units_to_pixels),u_scale:new o.Uniform3f(l,c.u_scale),u_fade:new o.Uniform1f(l,c.u_fade)}},lineSDF:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_ratio:new o.Uniform1f(l,c.u_ratio),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(l,c.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(l,c.u_patternscale_a),u_patternscale_b:new o.Uniform2f(l,c.u_patternscale_b),u_sdfgamma:new o.Uniform1f(l,c.u_sdfgamma),u_image:new o.Uniform1i(l,c.u_image),u_tex_y_a:new o.Uniform1f(l,c.u_tex_y_a),u_tex_y_b:new o.Uniform1f(l,c.u_tex_y_b),u_mix:new o.Uniform1f(l,c.u_mix)}},raster:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_tl_parent:new o.Uniform2f(l,c.u_tl_parent),u_scale_parent:new o.Uniform1f(l,c.u_scale_parent),u_buffer_scale:new o.Uniform1f(l,c.u_buffer_scale),u_fade_t:new o.Uniform1f(l,c.u_fade_t),u_opacity:new o.Uniform1f(l,c.u_opacity),u_image0:new o.Uniform1i(l,c.u_image0),u_image1:new o.Uniform1i(l,c.u_image1),u_brightness_low:new o.Uniform1f(l,c.u_brightness_low),u_brightness_high:new o.Uniform1f(l,c.u_brightness_high),u_saturation_factor:new o.Uniform1f(l,c.u_saturation_factor),u_contrast_factor:new o.Uniform1f(l,c.u_contrast_factor),u_spin_weights:new o.Uniform3f(l,c.u_spin_weights)}},symbolIcon:function(l,c){return{u_is_size_zoom_constant:new o.Uniform1i(l,c.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(l,c.u_is_size_feature_constant),u_size_t:new o.Uniform1f(l,c.u_size_t),u_size:new o.Uniform1f(l,c.u_size),u_camera_to_center_distance:new o.Uniform1f(l,c.u_camera_to_center_distance),u_pitch:new o.Uniform1f(l,c.u_pitch),u_rotate_symbol:new o.Uniform1i(l,c.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(l,c.u_aspect_ratio),u_fade_change:new o.Uniform1f(l,c.u_fade_change),u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(l,c.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(l,c.u_coord_matrix),u_is_text:new o.Uniform1i(l,c.u_is_text),u_pitch_with_map:new o.Uniform1i(l,c.u_pitch_with_map),u_texsize:new o.Uniform2f(l,c.u_texsize),u_texture:new o.Uniform1i(l,c.u_texture)}},symbolSDF:function(l,c){return{u_is_size_zoom_constant:new o.Uniform1i(l,c.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(l,c.u_is_size_feature_constant),u_size_t:new o.Uniform1f(l,c.u_size_t),u_size:new o.Uniform1f(l,c.u_size),u_camera_to_center_distance:new o.Uniform1f(l,c.u_camera_to_center_distance),u_pitch:new o.Uniform1f(l,c.u_pitch),u_rotate_symbol:new o.Uniform1i(l,c.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(l,c.u_aspect_ratio),u_fade_change:new o.Uniform1f(l,c.u_fade_change),u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(l,c.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(l,c.u_coord_matrix),u_is_text:new o.Uniform1i(l,c.u_is_text),u_pitch_with_map:new o.Uniform1i(l,c.u_pitch_with_map),u_texsize:new o.Uniform2f(l,c.u_texsize),u_texture:new o.Uniform1i(l,c.u_texture),u_gamma_scale:new o.Uniform1f(l,c.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(l,c.u_is_halo)}},symbolTextAndIcon:function(l,c){return{u_is_size_zoom_constant:new o.Uniform1i(l,c.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(l,c.u_is_size_feature_constant),u_size_t:new o.Uniform1f(l,c.u_size_t),u_size:new o.Uniform1f(l,c.u_size),u_camera_to_center_distance:new o.Uniform1f(l,c.u_camera_to_center_distance),u_pitch:new o.Uniform1f(l,c.u_pitch),u_rotate_symbol:new o.Uniform1i(l,c.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(l,c.u_aspect_ratio),u_fade_change:new o.Uniform1f(l,c.u_fade_change),u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(l,c.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(l,c.u_coord_matrix),u_is_text:new o.Uniform1i(l,c.u_is_text),u_pitch_with_map:new o.Uniform1i(l,c.u_pitch_with_map),u_texsize:new o.Uniform2f(l,c.u_texsize),u_texsize_icon:new o.Uniform2f(l,c.u_texsize_icon),u_texture:new o.Uniform1i(l,c.u_texture),u_texture_icon:new o.Uniform1i(l,c.u_texture_icon),u_gamma_scale:new o.Uniform1f(l,c.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(l,c.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(l,c.u_is_halo)}},background:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_opacity:new o.Uniform1f(l,c.u_opacity),u_color:new o.UniformColor(l,c.u_color)}},backgroundPattern:function(l,c){return{u_matrix:new o.UniformMatrix4f(l,c.u_matrix),u_opacity:new o.Uniform1f(l,c.u_opacity),u_image:new o.Uniform1i(l,c.u_image),u_pattern_tl_a:new o.Uniform2f(l,c.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(l,c.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(l,c.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(l,c.u_pattern_br_b),u_texsize:new o.Uniform2f(l,c.u_texsize),u_mix:new o.Uniform1f(l,c.u_mix),u_pattern_size_a:new o.Uniform2f(l,c.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(l,c.u_pattern_size_b),u_scale_a:new o.Uniform1f(l,c.u_scale_a),u_scale_b:new o.Uniform1f(l,c.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(l,c.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(l,c.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(l,c.u_tile_units_to_pixels)}}};function fl(l,c,u,h,y,b,w){for(var E=l.context,M=E.gl,N=l.useProgram("collisionBox"),X=[],Q=0,J=0,de=0;de0){var Fe=o.create(),De=_e;o.mul(Fe,ae.placementInvProjMatrix,l.transform.glCoordMatrix),o.mul(Fe,Fe,ae.placementViewportMatrix),X.push({circleArray:Ie,circleOffset:J,transform:De,invTransform:Fe}),J=Q+=Ie.length/4}Ae&&N.draw(E,M.LINES,R.disabled,K.disabled,l.colorModeForRenderPass(),ge.disabled,Ps(_e,l.transform,xe),u.id,Ae.layoutVertexBuffer,Ae.indexBuffer,Ae.segments,null,l.transform.zoom,null,null,Ae.collisionVertexBuffer)}}if(w&&X.length){var je=l.useProgram("collisionCircle"),Xe=new o.StructArrayLayout2f1f2i16;Xe.resize(4*Q),Xe._trim();for(var tt=0,et=0,mt=X;et=0&&(pe[ae.associatedIconIndex]={shiftedAnchor:Xe,angle:tt})}else bi(ae.numGlyphs,J)}if(X){de.clear();for(var mt=l.icon.placedSymbolArray,At=0;At0){var w=o.browser.now(),E=(w-l.timeAdded)/b,M=c?(w-c.timeAdded)/b:-1,N=u.getSource(),X=y.coveringZoomLevel({tileSize:N.tileSize,roundZoom:N.roundZoom}),Q=!c||Math.abs(c.tileID.overscaledZ-X)>Math.abs(l.tileID.overscaledZ-X),J=Q&&l.refreshedUponExpiration?1:o.clamp(Q?E:1-M,0,1);return l.refreshedUponExpiration&&E>=1&&(l.refreshedUponExpiration=!1),c?{opacity:1,mix:1-J}:{opacity:J,mix:0}}return{opacity:1,mix:0}}var pd=new o.Color(1,0,0,1),qf=new o.Color(0,1,0,1),Wf=new o.Color(0,0,1,1),hc=new o.Color(1,0,1,1),dd=new o.Color(0,1,1,1);function hd(l,c,u,h){cu(l,0,c+u/2,l.transform.width,u,h)}function fd(l,c,u,h){cu(l,c-u/2,0,u,l.transform.height,h)}function cu(l,c,u,h,y,b){var w=l.context,E=w.gl;E.enable(E.SCISSOR_TEST),E.scissor(c*o.browser.devicePixelRatio,u*o.browser.devicePixelRatio,h*o.browser.devicePixelRatio,y*o.browser.devicePixelRatio),w.clear({color:b}),E.disable(E.SCISSOR_TEST)}function Gf(l,c,u){var h=l.context,y=h.gl,b=u.posMatrix,w=l.useProgram("debug"),E=R.disabled,M=K.disabled,N=l.colorModeForRenderPass();h.activeTexture.set(y.TEXTURE0),l.emptyTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),w.draw(h,y.LINE_STRIP,E,M,N,ge.disabled,Ms(b,o.Color.red),"$debug",l.debugBuffer,l.tileBorderIndexBuffer,l.debugSegments);var X=c.getTileByID(u.key).latestRawTileData,Q=Math.floor((X&&X.byteLength||0)/1024),J=c.getTile(u).tileSize,de=512/Math.min(J,512)*(u.overscaledZ/l.transform.zoom)*.5,pe=u.canonical.toString();u.overscaledZ!==u.canonical.z&&(pe+=" => "+u.overscaledZ),function(xe,ae){xe.initDebugOverlayCanvas();var _e=xe.debugOverlayCanvas,Ae=xe.context.gl,Ie=xe.debugOverlayCanvas.getContext("2d");Ie.clearRect(0,0,_e.width,_e.height),Ie.shadowColor="white",Ie.shadowBlur=2,Ie.lineWidth=1.5,Ie.strokeStyle="white",Ie.textBaseline="top",Ie.font="bold 36px Open Sans, sans-serif",Ie.fillText(ae,5,5),Ie.strokeText(ae,5,5),xe.debugOverlayTexture.update(_e),xe.debugOverlayTexture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE)}(l,pe+" "+Q+"kb"),w.draw(h,y.TRIANGLES,E,M,le.alphaBlended,ge.disabled,Ms(b,o.Color.transparent,de),"$debug",l.debugBuffer,l.quadTriangleIndexBuffer,l.debugSegments)}var Rs={symbol:function(l,c,u,h,y){if(l.renderPass==="translucent"){var b=K.disabled,w=l.colorModeForRenderPass();u.layout.get("text-variable-anchor")&&function(E,M,N,X,Q,J,de){for(var pe=M.transform,xe=Q==="map",ae=J==="map",_e=0,Ae=E;_e256&&this.clearStencil(),u.setColorMode(le.disabled),u.setDepthMode(R.disabled);var y=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var b=0,w=c;b256&&this.clearStencil();var l=this.nextStencilID++,c=this.context.gl;return new K({func:c.NOTEQUAL,mask:255},l,255,c.KEEP,c.KEEP,c.REPLACE)},Jr.prototype.stencilModeForClipping=function(l){var c=this.context.gl;return new K({func:c.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,c.KEEP,c.KEEP,c.REPLACE)},Jr.prototype.stencilConfigForOverlap=function(l){var c,u=this.context.gl,h=l.sort(function(M,N){return N.overscaledZ-M.overscaledZ}),y=h[h.length-1].overscaledZ,b=h[0].overscaledZ-y+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();for(var w={},E=0;E=0;this.currentLayer--){var Ie=this.style._layers[h[this.currentLayer]],Fe=y[Ie.source],De=N[Ie.source];this._renderTileClippingMasks(Ie,De),this.renderLayer(this,Fe,Ie,De)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?c.pop():null},Jr.prototype.isPatternMissing=function(l){if(!l)return!1;if(!l.from||!l.to)return!0;var c=this.imageManager.getPattern(l.from.toString()),u=this.imageManager.getPattern(l.to.toString());return!c||!u},Jr.prototype.useProgram=function(l,c){this.cache=this.cache||{};var u=""+l+(c?c.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[u]||(this.cache[u]=new Mf(this.context,l,Ov[l],c,jf[l],this._showOverdrawInspector)),this.cache[u]},Jr.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()},Jr.prototype.setBaseState=function(){var l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)},Jr.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=o.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new o.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},Jr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var fc=function(l,c){this.points=l,this.planes=c};fc.fromInvProjectionMatrix=function(l,c,u){var h=Math.pow(2,u),y=[[-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(function(w){return o.transformMat4([],w,l)}).map(function(w){return o.scale$1([],w,1/w[3]/c*h)}),b=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(w){var E=o.sub([],y[w[0]],y[w[1]]),M=o.sub([],y[w[2]],y[w[1]]),N=o.normalize([],o.cross([],E,M)),X=-o.dot(N,y[w[1]]);return N.concat(X)});return new fc(y,b)};var Ds=function(l,c){this.min=l,this.max=c,this.center=o.scale$2([],o.add([],this.min,this.max),.5)};Ds.prototype.quadrant=function(l){for(var c=[l%2==0,l<2],u=o.clone$2(this.min),h=o.clone$2(this.max),y=0;y=0;if(b===0)return 0;b!==c.length&&(u=!1)}if(u)return 2;for(var E=0;E<3;E++){for(var M=Number.MAX_VALUE,N=-Number.MAX_VALUE,X=0;Xthis.max[E]-this.min[E])return 0}return 1};var Ha=function(l,c,u,h){if(l===void 0&&(l=0),c===void 0&&(c=0),u===void 0&&(u=0),h===void 0&&(h=0),isNaN(l)||l<0||isNaN(c)||c<0||isNaN(u)||u<0||isNaN(h)||h<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=c,this.left=u,this.right=h};Ha.prototype.interpolate=function(l,c,u){return c.top!=null&&l.top!=null&&(this.top=o.number(l.top,c.top,u)),c.bottom!=null&&l.bottom!=null&&(this.bottom=o.number(l.bottom,c.bottom,u)),c.left!=null&&l.left!=null&&(this.left=o.number(l.left,c.left,u)),c.right!=null&&l.right!=null&&(this.right=o.number(l.right,c.right,u)),this},Ha.prototype.getCenter=function(l,c){var u=o.clamp((this.left+l-this.right)/2,0,l),h=o.clamp((this.top+c-this.bottom)/2,0,c);return new o.Point(u,h)},Ha.prototype.equals=function(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right},Ha.prototype.clone=function(){return new Ha(this.top,this.bottom,this.left,this.right)},Ha.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var cr=function(l,c,u,h,y){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=y===void 0||y,this._minZoom=l||0,this._maxZoom=c||22,this._minPitch=u??0,this._maxPitch=h??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new o.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ha,this._posMatrixCache={},this._alignedPosMatrixCache={}},Wr={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}};cr.prototype.clone=function(){var l=new cr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return l.tileSize=this.tileSize,l.latRange=this.latRange,l.width=this.width,l.height=this.height,l._center=this._center,l.zoom=this.zoom,l.angle=this.angle,l._fov=this._fov,l._pitch=this._pitch,l._unmodified=this._unmodified,l._edgeInsets=this._edgeInsets.clone(),l._calcMatrices(),l},Wr.minZoom.get=function(){return this._minZoom},Wr.minZoom.set=function(l){this._minZoom!==l&&(this._minZoom=l,this.zoom=Math.max(this.zoom,l))},Wr.maxZoom.get=function(){return this._maxZoom},Wr.maxZoom.set=function(l){this._maxZoom!==l&&(this._maxZoom=l,this.zoom=Math.min(this.zoom,l))},Wr.minPitch.get=function(){return this._minPitch},Wr.minPitch.set=function(l){this._minPitch!==l&&(this._minPitch=l,this.pitch=Math.max(this.pitch,l))},Wr.maxPitch.get=function(){return this._maxPitch},Wr.maxPitch.set=function(l){this._maxPitch!==l&&(this._maxPitch=l,this.pitch=Math.min(this.pitch,l))},Wr.renderWorldCopies.get=function(){return this._renderWorldCopies},Wr.renderWorldCopies.set=function(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l},Wr.worldSize.get=function(){return this.tileSize*this.scale},Wr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Wr.size.get=function(){return new o.Point(this.width,this.height)},Wr.bearing.get=function(){return-this.angle/Math.PI*180},Wr.bearing.set=function(l){var c=-o.wrap(l,-180,180)*Math.PI/180;this.angle!==c&&(this._unmodified=!1,this.angle=c,this._calcMatrices(),this.rotationMatrix=o.create$2(),o.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Wr.pitch.get=function(){return this._pitch/Math.PI*180},Wr.pitch.set=function(l){var c=o.clamp(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==c&&(this._unmodified=!1,this._pitch=c,this._calcMatrices())},Wr.fov.get=function(){return this._fov/Math.PI*180},Wr.fov.set=function(l){l=Math.max(.01,Math.min(60,l)),this._fov!==l&&(this._unmodified=!1,this._fov=l/180*Math.PI,this._calcMatrices())},Wr.zoom.get=function(){return this._zoom},Wr.zoom.set=function(l){var c=Math.min(Math.max(l,this.minZoom),this.maxZoom);this._zoom!==c&&(this._unmodified=!1,this._zoom=c,this.scale=this.zoomScale(c),this.tileZoom=Math.floor(c),this.zoomFraction=c-this.tileZoom,this._constrain(),this._calcMatrices())},Wr.center.get=function(){return this._center},Wr.center.set=function(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())},Wr.padding.get=function(){return this._edgeInsets.toJSON()},Wr.padding.set=function(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,1),this._calcMatrices())},Wr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},cr.prototype.isPaddingEqual=function(l){return this._edgeInsets.equals(l)},cr.prototype.interpolatePadding=function(l,c,u){this._unmodified=!1,this._edgeInsets.interpolate(l,c,u),this._constrain(),this._calcMatrices()},cr.prototype.coveringZoomLevel=function(l){var c=(l.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/l.tileSize));return Math.max(0,c)},cr.prototype.getVisibleUnwrappedCoordinates=function(l){var c=[new o.UnwrappedTileID(0,l)];if(this._renderWorldCopies)for(var u=this.pointCoordinate(new o.Point(0,0)),h=this.pointCoordinate(new o.Point(this.width,0)),y=this.pointCoordinate(new o.Point(this.width,this.height)),b=this.pointCoordinate(new o.Point(0,this.height)),w=Math.floor(Math.min(u.x,h.x,y.x,b.x)),E=Math.floor(Math.max(u.x,h.x,y.x,b.x)),M=w-1;M<=E+1;M++)M!==0&&c.push(new o.UnwrappedTileID(M,l));return c},cr.prototype.coveringTiles=function(l){var c=this.coveringZoomLevel(l),u=c;if(l.minzoom!==void 0&&cl.maxzoom&&(c=l.maxzoom);var h=o.MercatorCoordinate.fromLngLat(this.center),y=Math.pow(2,c),b=[y*h.x,y*h.y,0],w=fc.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,c),E=l.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(E=c);var M=function(et){return{aabb:new Ds([et*y,0,0],[(et+1)*y,y,0]),zoom:0,x:0,y:0,wrap:et,fullyVisible:!1}},N=[],X=[],Q=c,J=l.reparseOverscaled?u:c;if(this._renderWorldCopies)for(var de=1;de<=3;de++)N.push(M(-de)),N.push(M(de));for(N.push(M(0));N.length>0;){var pe=N.pop(),xe=pe.x,ae=pe.y,_e=pe.fullyVisible;if(!_e){var Ae=pe.aabb.intersects(w);if(Ae===0)continue;_e=Ae===2}var Ie=pe.aabb.distanceX(b),Fe=pe.aabb.distanceY(b),De=Math.max(Math.abs(Ie),Math.abs(Fe));if(pe.zoom===Q||De>3+(1<=E)X.push({tileID:new o.OverscaledTileID(pe.zoom===Q?J:pe.zoom,pe.wrap,pe.zoom,xe,ae),distanceSq:o.sqrLen([b[0]-.5-xe,b[1]-.5-ae])});else for(var je=0;je<4;je++){var Xe=(xe<<1)+je%2,tt=(ae<<1)+(je>>1);N.push({aabb:pe.aabb.quadrant(je),zoom:pe.zoom+1,x:Xe,y:tt,wrap:pe.wrap,fullyVisible:_e})}}return X.sort(function(et,mt){return et.distanceSq-mt.distanceSq}).map(function(et){return et.tileID})},cr.prototype.resize=function(l,c){this.width=l,this.height=c,this.pixelsToGLUnits=[2/l,-2/c],this._constrain(),this._calcMatrices()},Wr.unmodified.get=function(){return this._unmodified},cr.prototype.zoomScale=function(l){return Math.pow(2,l)},cr.prototype.scaleZoom=function(l){return Math.log(l)/Math.LN2},cr.prototype.project=function(l){var c=o.clamp(l.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.Point(o.mercatorXfromLng(l.lng)*this.worldSize,o.mercatorYfromLat(c)*this.worldSize)},cr.prototype.unproject=function(l){return new o.MercatorCoordinate(l.x/this.worldSize,l.y/this.worldSize).toLngLat()},Wr.point.get=function(){return this.project(this.center)},cr.prototype.setLocationAtPoint=function(l,c){var u=this.pointCoordinate(c),h=this.pointCoordinate(this.centerPoint),y=this.locationCoordinate(l),b=new o.MercatorCoordinate(y.x-(u.x-h.x),y.y-(u.y-h.y));this.center=this.coordinateLocation(b),this._renderWorldCopies&&(this.center=this.center.wrap())},cr.prototype.locationPoint=function(l){return this.coordinatePoint(this.locationCoordinate(l))},cr.prototype.pointLocation=function(l){return this.coordinateLocation(this.pointCoordinate(l))},cr.prototype.locationCoordinate=function(l){return o.MercatorCoordinate.fromLngLat(l)},cr.prototype.coordinateLocation=function(l){return l.toLngLat()},cr.prototype.pointCoordinate=function(l){var c=[l.x,l.y,0,1],u=[l.x,l.y,1,1];o.transformMat4(c,c,this.pixelMatrixInverse),o.transformMat4(u,u,this.pixelMatrixInverse);var h=c[3],y=u[3],b=c[1]/h,w=u[1]/y,E=c[2]/h,M=u[2]/y,N=E===M?0:(0-E)/(M-E);return new o.MercatorCoordinate(o.number(c[0]/h,u[0]/y,N)/this.worldSize,o.number(b,w,N)/this.worldSize)},cr.prototype.coordinatePoint=function(l){var c=[l.x*this.worldSize,l.y*this.worldSize,0,1];return o.transformMat4(c,c,this.pixelMatrix),new o.Point(c[0]/c[3],c[1]/c[3])},cr.prototype.getBounds=function(){return new o.LngLatBounds().extend(this.pointLocation(new o.Point(0,0))).extend(this.pointLocation(new o.Point(this.width,0))).extend(this.pointLocation(new o.Point(this.width,this.height))).extend(this.pointLocation(new o.Point(0,this.height)))},cr.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new o.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},cr.prototype.setMaxBounds=function(l){l?(this.lngRange=[l.getWest(),l.getEast()],this.latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},cr.prototype.calculatePosMatrix=function(l,c){c===void 0&&(c=!1);var u=l.key,h=c?this._alignedPosMatrixCache:this._posMatrixCache;if(h[u])return h[u];var y=l.canonical,b=this.worldSize/this.zoomScale(y.z),w=y.x+Math.pow(2,y.z)*l.wrap,E=o.identity(new Float64Array(16));return o.translate(E,E,[w*b,y.y*b,0]),o.scale(E,E,[b/o.EXTENT,b/o.EXTENT,1]),o.multiply(E,c?this.alignedProjMatrix:this.projMatrix,E),h[u]=new Float32Array(E),h[u]},cr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},cr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var l,c,u,h,y=-90,b=90,w=-180,E=180,M=this.size,N=this._unmodified;if(this.latRange){var X=this.latRange;y=o.mercatorYfromLat(X[1])*this.worldSize,l=(b=o.mercatorYfromLat(X[0])*this.worldSize)-yb&&(h=b-xe)}if(this.lngRange){var ae=J.x,_e=M.x/2;ae-_eE&&(u=E-_e)}u===void 0&&h===void 0||(this.center=this.unproject(new o.Point(u!==void 0?u:J.x,h!==void 0?h:J.y))),this._unmodified=N,this._constraining=!1}},cr.prototype._calcMatrices=function(){if(this.height){var l=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var c=Math.PI/2+this._pitch,u=this._fov*(.5+l.y/this.height),h=Math.sin(u)*this.cameraToCenterDistance/Math.sin(o.clamp(Math.PI-c-u,.01,Math.PI-.01)),y=this.point,b=y.x,w=y.y,E=1.01*(Math.cos(Math.PI/2-this._pitch)*h+this.cameraToCenterDistance),M=this.height/50,N=new Float64Array(16);o.perspective(N,this._fov,this.width/this.height,M,E),N[8]=2*-l.x/this.width,N[9]=2*l.y/this.height,o.scale(N,N,[1,-1,1]),o.translate(N,N,[0,0,-this.cameraToCenterDistance]),o.rotateX(N,N,this._pitch),o.rotateZ(N,N,this.angle),o.translate(N,N,[-b,-w,0]),this.mercatorMatrix=o.scale([],N,[this.worldSize,this.worldSize,this.worldSize]),o.scale(N,N,[1,1,o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=N,this.invProjMatrix=o.invert([],this.projMatrix);var X=this.width%2/2,Q=this.height%2/2,J=Math.cos(this.angle),de=Math.sin(this.angle),pe=b-Math.round(b)+J*X+de*Q,xe=w-Math.round(w)+J*Q+de*X,ae=new Float64Array(N);if(o.translate(ae,ae,[pe>.5?pe-1:pe,xe>.5?xe-1:xe,0]),this.alignedProjMatrix=ae,N=o.create(),o.scale(N,N,[this.width/2,-this.height/2,1]),o.translate(N,N,[1,-1,0]),this.labelPlaneMatrix=N,N=o.create(),o.scale(N,N,[1,-1,1]),o.translate(N,N,[-1,-1,0]),o.scale(N,N,[2/this.width,2/this.height,1]),this.glCoordMatrix=N,this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(N=o.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=N,this._posMatrixCache={},this._alignedPosMatrixCache={}}},cr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var l=this.pointCoordinate(new o.Point(0,0)),c=[l.x*this.worldSize,l.y*this.worldSize,0,1];return o.transformMat4(c,c,this.pixelMatrix)[3]/this.cameraToCenterDistance},cr.prototype.getCameraPoint=function(){var l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.Point(0,l))},cr.prototype.getCameraQueryGeometry=function(l){var c=this.getCameraPoint();if(l.length===1)return[l[0],c];for(var u=c.x,h=c.y,y=c.x,b=c.y,w=0,E=l;w=3&&!l.some(function(u){return isNaN(u)})){var c=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(l[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+l[2],+l[1]],zoom:+l[0],bearing:c,pitch:+(l[4]||0)}),!0}return!1},oo.prototype._updateHashUnthrottled=function(){var l=o.window.location.href.replace(/(#.+)?$/,this.getHashString());try{o.window.history.replaceState(o.window.history.state,null,l)}catch{}};var pu={linearity:.3,easing:o.bezier(0,0,.3,1)},ml=o.extend({deceleration:2500,maxSpeed:1400},pu),du=o.extend({deceleration:20,maxSpeed:1400},pu),Uv=o.extend({deceleration:1e3,maxSpeed:360},pu),Vv=o.extend({deceleration:1e3,maxSpeed:90},pu),hu=function(l){this._map=l,this.clear()};function fu(l,c){(!l.duration||l.duration0&&c-l[0].time>160;)l.shift()},hu.prototype._onMoveEnd=function(l){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var c={zoom:0,bearing:0,pitch:0,pan:new o.Point(0,0),pinchAround:void 0,around:void 0},u=0,h=this._inertiaBuffer;u=this._clickTolerance||this._map.fire(new Dn(l.type,this._map,l))},Mn.prototype.dblclick=function(l){return this._firePreventable(new Dn(l.type,this._map,l))},Mn.prototype.mouseover=function(l){this._map.fire(new Dn(l.type,this._map,l))},Mn.prototype.mouseout=function(l){this._map.fire(new Dn(l.type,this._map,l))},Mn.prototype.touchstart=function(l){return this._firePreventable(new mu(l.type,this._map,l))},Mn.prototype.touchmove=function(l){this._map.fire(new mu(l.type,this._map,l))},Mn.prototype.touchend=function(l){this._map.fire(new mu(l.type,this._map,l))},Mn.prototype.touchcancel=function(l){this._map.fire(new mu(l.type,this._map,l))},Mn.prototype._firePreventable=function(l){if(this._map.fire(l),l.defaultPrevented)return{}},Mn.prototype.isEnabled=function(){return!0},Mn.prototype.isActive=function(){return!1},Mn.prototype.enable=function(){},Mn.prototype.disable=function(){};var yt=function(l){this._map=l};yt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},yt.prototype.mousemove=function(l){this._map.fire(new Dn(l.type,this._map,l))},yt.prototype.mousedown=function(){this._delayContextMenu=!0},yt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Dn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},yt.prototype.contextmenu=function(l){this._delayContextMenu?this._contextMenuEvent=l:this._map.fire(new Dn(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Wi=function(l,c){this._map=l,this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=c.clickTolerance||1};function mc(l,c){for(var u={},h=0;hthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),u.length===this.numTouches&&(this.centroid=function(h){for(var y=new o.Point(0,0),b=0,w=h;b30)&&(this.aborted=!0)}}},gl.prototype.touchend=function(l,c,u){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),u.length===0){var h=!this.aborted&&this.centroid;if(this.reset(),h)return h}};var Bo=function(l){this.singleTap=new gl(l),this.numTaps=l.numTaps,this.reset()};Bo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Bo.prototype.touchstart=function(l,c,u){this.singleTap.touchstart(l,c,u)},Bo.prototype.touchmove=function(l,c,u){this.singleTap.touchmove(l,c,u)},Bo.prototype.touchend=function(l,c,u){var h=this.singleTap.touchend(l,c,u);if(h){var y=l.timeStamp-this.lastTime<500,b=!this.lastTap||this.lastTap.dist(h)<30;if(y&&b||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=h,this.count===this.numTaps)return this.reset(),h}};var Gi=function(){this._zoomIn=new Bo({numTouches:1,numTaps:2}),this._zoomOut=new Bo({numTouches:2,numTaps:1}),this.reset()};Gi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gi.prototype.touchstart=function(l,c,u){this._zoomIn.touchstart(l,c,u),this._zoomOut.touchstart(l,c,u)},Gi.prototype.touchmove=function(l,c,u){this._zoomIn.touchmove(l,c,u),this._zoomOut.touchmove(l,c,u)},Gi.prototype.touchend=function(l,c,u){var h=this,y=this._zoomIn.touchend(l,c,u),b=this._zoomOut.touchend(l,c,u);return y?(this._active=!0,l.preventDefault(),setTimeout(function(){return h.reset()},0),{cameraAnimation:function(w){return w.easeTo({duration:300,zoom:w.getZoom()+1,around:w.unproject(y)},{originalEvent:l})}}):b?(this._active=!0,l.preventDefault(),setTimeout(function(){return h.reset()},0),{cameraAnimation:function(w){return w.easeTo({duration:300,zoom:w.getZoom()-1,around:w.unproject(b)},{originalEvent:l})}}):void 0},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 md={0:1,2:2},st=function(l){this.reset(),this._clickTolerance=l.clickTolerance||1};st.prototype.blur=function(){this.reset()},st.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},st.prototype._correctButton=function(l,c){return!1},st.prototype._move=function(l,c){return{}},st.prototype.mousedown=function(l,c){if(!this._lastPoint){var u=x.mouseButton(l);this._correctButton(l,u)&&(this._lastPoint=c,this._eventButton=u)}},st.prototype.mousemoveWindow=function(l,c){var u=this._lastPoint;if(u){if(l.preventDefault(),function(h,y){var b=md[y];return h.buttons===void 0||(h.buttons&b)!==b}(l,this._eventButton))this.reset();else if(this._moved||!(c.dist(u)0&&(this._active=!0);var h=mc(u,c),y=new o.Point(0,0),b=new o.Point(0,0),w=0;for(var E in h){var M=h[E],N=this._touches[E];N&&(y._add(M),b._add(M.sub(N)),w++,h[E]=M)}if(this._touches=h,!(wMath.abs(l.x)}var vd=function(l){function c(){l.apply(this,arguments)}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c.prototype.reset=function(){l.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},c.prototype._start=function(u){this._lastPoints=u,gu(u[0].sub(u[1]))&&(this._valid=!1)},c.prototype._move=function(u,h,y){var b=u[0].sub(this._lastPoints[0]),w=u[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(b,w,y.timeStamp),this._valid)return this._lastPoints=u,this._active=!0,{pitchDelta:(b.y+w.y)/2*-.5}},c.prototype.gestureBeginsVertically=function(u,h,y){if(this._valid!==void 0)return this._valid;var b=u.mag()>=2,w=h.mag()>=2;if(b||w){if(!b||!w)return this._firstMove===void 0&&(this._firstMove=y),y-this._firstMove<100&&void 0;var E=u.y>0==h.y>0;return gu(u)&&gu(h)&&E}},c}(Hi),_d={panStep:100,bearingStep:15,pitchStep:10},Oo=function(){var l=_d;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1};function ao(l){return l*(2-l)}Oo.prototype.blur=function(){this.reset()},Oo.prototype.reset=function(){this._active=!1},Oo.prototype.keydown=function(l){var c=this;if(!(l.altKey||l.ctrlKey||l.metaKey)){var u=0,h=0,y=0,b=0,w=0;switch(l.keyCode){case 61:case 107:case 171:case 187:u=1;break;case 189:case 109:case 173:u=-1;break;case 37:l.shiftKey?h=-1:(l.preventDefault(),b=-1);break;case 39:l.shiftKey?h=1:(l.preventDefault(),b=1);break;case 38:l.shiftKey?y=1:(l.preventDefault(),w=-1);break;case 40:l.shiftKey?y=-1:(l.preventDefault(),w=1);break;default:return}return this._rotationDisabled&&(h=0,y=0),{cameraAnimation:function(E){var M=E.getZoom();E.easeTo({duration:300,easeId:"keyboardHandler",easing:ao,zoom:u?Math.round(M)+u*(l.shiftKey?2:1):M,bearing:E.getBearing()+h*c._bearingStep,pitch:E.getPitch()+y*c._pitchStep,offset:[-b*c._panStep,-w*c._panStep],center:E.getCenter()},{originalEvent:l})}}}},Oo.prototype.enable=function(){this._enabled=!0},Oo.prototype.disable=function(){this._enabled=!1,this.reset()},Oo.prototype.isEnabled=function(){return this._enabled},Oo.prototype.isActive=function(){return this._active},Oo.prototype.disableRotation=function(){this._rotationDisabled=!0},Oo.prototype.enableRotation=function(){this._rotationDisabled=!1};var ir=function(l,c){this._map=l,this._el=l.getCanvasContainer(),this._handler=c,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,o.bindAll(["_onTimeout"],this)};ir.prototype.setZoomRate=function(l){this._defaultZoomRate=l},ir.prototype.setWheelZoomRate=function(l){this._wheelZoomRate=l},ir.prototype.isEnabled=function(){return!!this._enabled},ir.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},ir.prototype.isZooming=function(){return!!this._zooming},ir.prototype.enable=function(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=l&&l.around==="center")},ir.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ir.prototype.wheel=function(l){if(this.isEnabled()){var c=l.deltaMode===o.window.WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY,u=o.browser.now(),h=u-(this._lastWheelEventTime||0);this._lastWheelEventTime=u,c!==0&&c%4.000244140625==0?this._type="wheel":c!==0&&Math.abs(c)<4?this._type="trackpad":h>400?(this._type=null,this._lastValue=c,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(h*c)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,c+=this._lastValue)),l.shiftKey&&c&&(c/=4),this._type&&(this._lastWheelEvent=l,this._delta-=c,this._active||this._start(l)),l.preventDefault()}},ir.prototype._onTimeout=function(l){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)},ir.prototype._start=function(l){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 c=x.mousePos(this._el,l);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(c)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},ir.prototype.renderFrame=function(){var l=this;if(this._frameId&&(this._frameId=null,this.isActive())){var c=this._map.transform;if(this._delta!==0){var u=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,h=2/(1+Math.exp(-Math.abs(this._delta*u)));this._delta<0&&h!==0&&(h=1/h);var y=typeof this._targetZoom=="number"?c.zoomScale(this._targetZoom):c.scale;this._targetZoom=Math.min(c.maxZoom,Math.max(c.minZoom,c.scaleZoom(y*h))),this._type==="wheel"&&(this._startZoom=c.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var b,w=typeof this._targetZoom=="number"?this._targetZoom:c.zoom,E=this._startZoom,M=this._easing,N=!1;if(this._type==="wheel"&&E&&M){var X=Math.min((o.browser.now()-this._lastWheelEventTime)/200,1),Q=M(X);b=o.number(E,w,Q),X<1?this._frameId||(this._frameId=!0):N=!0}else b=w,N=!0;return this._active=!0,N&&(this._active=!1,this._finishTimeout=setTimeout(function(){l._zooming=!1,l._handler._triggerRenderFrame(),delete l._targetZoom,delete l._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!N,zoomDelta:b-c.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ir.prototype._smoothOutEasing=function(l){var c=o.ease;if(this._prevEase){var u=this._prevEase,h=(o.browser.now()-u.start)/u.duration,y=u.easing(h+.01)-u.easing(h),b=.27/Math.sqrt(y*y+1e-4)*.01,w=Math.sqrt(.0729-b*b);c=o.bezier(b,w,.25,1)}return this._prevEase={start:o.browser.now(),duration:l,easing:c},c},ir.prototype.blur=function(){this.reset()},ir.prototype.reset=function(){this._active=!1};var ta=function(l,c){this._clickZoom=l,this._tapZoom=c};ta.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ta.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ta.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ta.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var _o=function(){this.reset()};_o.prototype.reset=function(){this._active=!1},_o.prototype.blur=function(){this.reset()},_o.prototype.dblclick=function(l,c){return l.preventDefault(),{cameraAnimation:function(u){u.easeTo({duration:300,zoom:u.getZoom()+(l.shiftKey?-1:1),around:u.unproject(c)},{originalEvent:l})}}},_o.prototype.enable=function(){this._enabled=!0},_o.prototype.disable=function(){this._enabled=!1,this.reset()},_o.prototype.isEnabled=function(){return this._enabled},_o.prototype.isActive=function(){return this._active};var ui=function(){this._tap=new Bo({numTouches:1,numTaps:1}),this.reset()};ui.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ui.prototype.touchstart=function(l,c,u){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?u.length>0&&(this._swipePoint=c[0],this._swipeTouch=u[0].identifier):this._tap.touchstart(l,c,u))},ui.prototype.touchmove=function(l,c,u){if(this._tapTime){if(this._swipePoint){if(u[0].identifier!==this._swipeTouch)return;var h=c[0],y=h.y-this._swipePoint.y;return this._swipePoint=h,l.preventDefault(),this._active=!0,{zoomDelta:y/128}}}else this._tap.touchmove(l,c,u)},ui.prototype.touchend=function(l,c,u){this._tapTime?this._swipePoint&&u.length===0&&this.reset():this._tap.touchend(l,c,u)&&(this._tapTime=l.timeStamp)},ui.prototype.touchcancel=function(){this.reset()},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var Bs=function(l,c,u){this._el=l,this._mousePan=c,this._touchPan=u};Bs.prototype.enable=function(l){this._inertiaOptions=l||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Bs.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Bs.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Bs.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Za=function(l,c,u){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=c,this._mousePitch=u};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 No=function(l,c,u,h){this._el=l,this._touchZoom=c,this._touchRotate=u,this._tapDragZoom=h,this._rotationDisabled=!1,this._enabled=!0};No.prototype.enable=function(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},No.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},No.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},No.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},No.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},No.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ai=function(l){return l.zoom||l.drag||l.pitch||l.rotate},yu=function(l){function c(){l.apply(this,arguments)}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c}(o.Event);function wt(l){return l.panDelta&&l.panDelta.mag()||l.zoomDelta||l.bearingDelta||l.pitchDelta}var _t=function(l,c){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new hu(l),this._bearingSnap=c.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(c),o.bindAll(["handleEvent","handleWindowEvent"],this);var u=this._el;this._listeners=[[u,"touchstart",{passive:!0}],[u,"touchmove",{passive:!1}],[u,"touchend",void 0],[u,"touchcancel",void 0],[u,"mousedown",void 0],[u,"mousemove",void 0],[u,"mouseup",void 0],[o.window.document,"mousemove",{capture:!0}],[o.window.document,"mouseup",void 0],[u,"mouseover",void 0],[u,"mouseout",void 0],[u,"dblclick",void 0],[u,"click",void 0],[u,"keydown",{capture:!1}],[u,"keyup",void 0],[u,"wheel",{passive:!1}],[u,"contextmenu",void 0],[o.window,"blur",void 0]];for(var h=0,y=this._listeners;hw?Math.min(2,je):Math.max(.5,je),At=Math.pow(mt,1-tt),It=b.unproject(Fe.add(De.mult(tt*At)).mult(et));b.setLocationAtPoint(b.renderWorldCopies?It.wrap():It,xe)}y._fireMoveEvents(h)},function(tt){y._afterEase(h,tt)},u),this},c.prototype._prepareEase=function(u,h,y){y===void 0&&(y={}),this._moving=!0,h||y.moving||this.fire(new o.Event("movestart",u)),this._zooming&&!y.zooming&&this.fire(new o.Event("zoomstart",u)),this._rotating&&!y.rotating&&this.fire(new o.Event("rotatestart",u)),this._pitching&&!y.pitching&&this.fire(new o.Event("pitchstart",u))},c.prototype._fireMoveEvents=function(u){this.fire(new o.Event("move",u)),this._zooming&&this.fire(new o.Event("zoom",u)),this._rotating&&this.fire(new o.Event("rotate",u)),this._pitching&&this.fire(new o.Event("pitch",u))},c.prototype._afterEase=function(u,h){if(!this._easeId||!h||this._easeId!==h){delete this._easeId;var y=this._zooming,b=this._rotating,w=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,y&&this.fire(new o.Event("zoomend",u)),b&&this.fire(new o.Event("rotateend",u)),w&&this.fire(new o.Event("pitchend",u)),this.fire(new o.Event("moveend",u))}},c.prototype.flyTo=function(u,h){var y=this;if(!u.essential&&o.browser.prefersReducedMotion){var b=o.pick(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(b,h)}this.stop(),u=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},u);var w=this.transform,E=this.getZoom(),M=this.getBearing(),N=this.getPitch(),X=this.getPadding(),Q="zoom"in u?o.clamp(+u.zoom,w.minZoom,w.maxZoom):E,J="bearing"in u?this._normalizeBearing(u.bearing,M):M,de="pitch"in u?+u.pitch:N,pe="padding"in u?u.padding:w.padding,xe=w.zoomScale(Q-E),ae=o.Point.convert(u.offset),_e=w.centerPoint.add(ae),Ae=w.pointLocation(_e),Ie=o.LngLat.convert(u.center||Ae);this._normalizeCenter(Ie);var Fe=w.project(Ae),De=w.project(Ie).sub(Fe),je=u.curve,Xe=Math.max(w.width,w.height),tt=Xe/xe,et=De.mag();if("minZoom"in u){var mt=o.clamp(Math.min(u.minZoom,E,Q),w.minZoom,w.maxZoom),At=Xe/w.zoomScale(mt-E);je=Math.sqrt(At/et*2)}var It=je*je;function kt(Bt){var Rt=(tt*tt-Xe*Xe+(Bt?-1:1)*It*It*et*et)/(2*(Bt?tt:Xe)*It*et);return Math.log(Math.sqrt(Rt*Rt+1)-Rt)}function mr(Bt){return(Math.exp(Bt)-Math.exp(-Bt))/2}function gt(Bt){return(Math.exp(Bt)+Math.exp(-Bt))/2}var Vt=kt(0),Kt=function(Bt){return gt(Vt)/gt(Vt+je*Bt)},jt=function(Bt){return Xe*((gt(Vt)*(mr(Rt=Vt+je*Bt)/gt(Rt))-mr(Vt))/It)/et;var Rt},Nt=(kt(1)-Vt)/je;if(Math.abs(et)<1e-6||!isFinite(Nt)){if(Math.abs(Xe-tt)<1e-6)return this.easeTo(u,h);var Zt=ttu.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=M!==J,this._pitching=de!==N,this._padding=!w.isPaddingEqual(pe),this._prepareEase(h,!1),this._ease(function(Bt){var Rt=Bt*Nt,Vn=1/Kt(Rt);w.zoom=Bt===1?Q:E+w.scaleZoom(Vn),y._rotating&&(w.bearing=o.number(M,J,Bt)),y._pitching&&(w.pitch=o.number(N,de,Bt)),y._padding&&(w.interpolatePadding(X,pe,Bt),_e=w.centerPoint.add(ae));var mn=Bt===1?Ie:w.unproject(Fe.add(De.mult(jt(Rt))).mult(Vn));w.setLocationAtPoint(w.renderWorldCopies?mn.wrap():mn,_e),y._fireMoveEvents(h)},function(){return y._afterEase(h)},u),this},c.prototype.isEasing=function(){return!!this._easeFrameId},c.prototype.stop=function(){return this._stop()},c.prototype._stop=function(u,h){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var y=this._onEaseEnd;delete this._onEaseEnd,y.call(this,h)}if(!u){var b=this.handlers;b&&b.stop(!1)}return this},c.prototype._ease=function(u,h,y){y.animate===!1||y.duration===0?(u(1),h()):(this._easeStart=o.browser.now(),this._easeOptions=y,this._onEaseFrame=u,this._onEaseEnd=h,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},c.prototype._renderFrameCallback=function(){var u=Math.min((o.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},c.prototype._normalizeBearing=function(u,h){u=o.wrap(u,-180,180);var y=Math.abs(u-h);return Math.abs(u-360-h)180?-360:y<-180?360:0}},c}(o.Evented),Si=function(l){l===void 0&&(l={}),this.options=l,o.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Si.prototype.getDefaultPosition=function(){return"bottom-right"},Si.prototype.onAdd=function(l){var c=this.options&&this.options.compact;return this._map=l,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=x.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),c&&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),c===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Si.prototype.onRemove=function(){x.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(l,c){var u=this._map._getUIString("AttributionControl."+c);l.title=u,l.setAttribute("aria-label",u)},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 l=this._editLink;l||(l=this._editLink=this._container.querySelector(".mapbox-improve-map"));var c=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||o.config.ACCESS_TOKEN}];if(l){var u=c.reduce(function(h,y,b){return y.value&&(h+=y.key+"="+y.value+(b=0)return!1;return!0})).join(" | ");w!==this._attribHTML&&(this._attribHTML=w,l.length?(this._innerContainer.innerHTML=w,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 Fo=function(){o.bindAll(["_updateLogo"],this),o.bindAll(["_updateCompact"],this)};Fo.prototype.onAdd=function(l){this._map=l,this._container=x.create("div","mapboxgl-ctrl");var c=x.create("a","mapboxgl-ctrl-logo");return c.target="_blank",c.rel="noopener nofollow",c.href="https://www.mapbox.com/",c.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),c.setAttribute("rel","noopener nofollow"),this._container.appendChild(c),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Fo.prototype.onRemove=function(){x.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Fo.prototype.getDefaultPosition=function(){return"bottom-left"},Fo.prototype._updateLogo=function(l){l&&l.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},Fo.prototype._logoRequired=function(){if(this._map.style){var l=this._map.style.sourceCaches;for(var c in l)if(l[c].getSource().mapbox_logo)return!0;return!1}},Fo.prototype._updateCompact=function(){var l=this._container.children;if(l.length){var c=l[0];this._map.getCanvasContainer().offsetWidth<250?c.classList.add("mapboxgl-compact"):c.classList.remove("mapboxgl-compact")}};var ci=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};ci.prototype.add=function(l){var c=++this._id;return this._queue.push({callback:l,id:c,cancelled:!1}),c},ci.prototype.remove=function(l){for(var c=this._currentlyRunning,u=0,h=c?this._queue.concat(c):this._queue;uh.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(h.minPitch!=null&&h.maxPitch!=null&&h.minPitch>h.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(h.minPitch!=null&&h.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(h.maxPitch!=null&&h.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var b=new cr(h.minZoom,h.maxZoom,h.minPitch,h.maxPitch,h.renderWorldCopies);if(l.call(this,b,h),this._interactive=h.interactive,this._maxTileCacheSize=h.maxTileCacheSize,this._failIfMajorPerformanceCaveat=h.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=h.preserveDrawingBuffer,this._antialias=h.antialias,this._trackResize=h.trackResize,this._bearingSnap=h.bearingSnap,this._refreshExpiredTiles=h.refreshExpiredTiles,this._fadeDuration=h.fadeDuration,this._crossSourceCollisions=h.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=h.collectResourceTiming,this._renderTaskQueue=new ci,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},ra,h.locale),this._clickTolerance=h.clickTolerance,this._requestManager=new o.RequestManager(h.transformRequest,h.accessToken),typeof h.container=="string"){if(this._container=o.window.document.getElementById(h.container),!this._container)throw new Error("Container '"+h.container+"' not found.")}else{if(!(h.container instanceof xc))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=h.container}if(h.maxBounds&&this.setMaxBounds(h.maxBounds),o.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 y._update(!1)}),this.on("moveend",function(){return y._update(!1)}),this.on("zoom",function(){return y._update(!0)}),o.window!==void 0&&(o.window.addEventListener("online",this._onWindowOnline,!1),o.window.addEventListener("resize",this._onWindowResize,!1),o.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new _t(this,h),this._hash=h.hash&&new oo(typeof h.hash=="string"&&h.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:h.center,zoom:h.zoom,bearing:h.bearing,pitch:h.pitch}),h.bounds&&(this.resize(),this.fitBounds(h.bounds,o.extend({},h.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=h.localIdeographFontFamily,h.style&&this.setStyle(h.style,{localIdeographFontFamily:h.localIdeographFontFamily}),h.attributionControl&&this.addControl(new Si({customAttribution:h.customAttribution})),this.addControl(new Fo,h.logoPosition),this.on("style.load",function(){y.transform.unmodified&&y.jumpTo(y.style.stylesheet)}),this.on("data",function(w){y._update(w.dataType==="style"),y.fire(new o.Event(w.dataType+"data",w))}),this.on("dataloading",function(w){y.fire(new o.Event(w.dataType+"dataloading",w))})}l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c;var u={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return c.prototype._getMapId=function(){return this._mapId},c.prototype.addControl=function(h,y){if(y===void 0&&(y=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var b=h.onAdd(this);this._controls.push(h);var w=this._controlPositions[y];return y.indexOf("bottom")!==-1?w.insertBefore(b,w.firstChild):w.appendChild(b),this},c.prototype.removeControl=function(h){if(!h||!h.onRemove)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var y=this._controls.indexOf(h);return y>-1&&this._controls.splice(y,1),h.onRemove(this),this},c.prototype.hasControl=function(h){return this._controls.indexOf(h)>-1},c.prototype.resize=function(h){var y=this._containerDimensions(),b=y[0],w=y[1];if(b===this.transform.width&&w===this.transform.height)return this;this._resizeCanvas(b,w),this.transform.resize(b,w),this.painter.resize(b,w);var E=!this._moving;return E&&this.fire(new o.Event("movestart",h)).fire(new o.Event("move",h)),this.fire(new o.Event("resize",h)),E&&this.fire(new o.Event("moveend",h)),this},c.prototype.getBounds=function(){return this.transform.getBounds()},c.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},c.prototype.setMaxBounds=function(h){return this.transform.setMaxBounds(o.LngLatBounds.convert(h)),this._update()},c.prototype.setMinZoom=function(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.minZoom=h,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=h,this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")},c.prototype.getMaxZoom=function(){return this.transform.maxZoom},c.prototype.setMinPitch=function(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.minPitch=h,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(h>=this.transform.minPitch)return this.transform.maxPitch=h,this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")},c.prototype.getMaxPitch=function(){return this.transform.maxPitch},c.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},c.prototype.setRenderWorldCopies=function(h){return this.transform.renderWorldCopies=h,this._update()},c.prototype.project=function(h){return this.transform.locationPoint(o.LngLat.convert(h))},c.prototype.unproject=function(h){return this.transform.pointLocation(o.Point.convert(h))},c.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},c.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},c.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},c.prototype._createDelegatedListener=function(h,y,b){var w,E=this;if(h==="mouseenter"||h==="mouseover"){var M=!1;return{layer:y,listener:b,delegates:{mousemove:function(X){var Q=E.getLayer(y)?E.queryRenderedFeatures(X.point,{layers:[y]}):[];Q.length?M||(M=!0,b.call(E,new Dn(h,E,X.originalEvent,{features:Q}))):M=!1},mouseout:function(){M=!1}}}}if(h==="mouseleave"||h==="mouseout"){var N=!1;return{layer:y,listener:b,delegates:{mousemove:function(X){(E.getLayer(y)?E.queryRenderedFeatures(X.point,{layers:[y]}):[]).length?N=!0:N&&(N=!1,b.call(E,new Dn(h,E,X.originalEvent)))},mouseout:function(X){N&&(N=!1,b.call(E,new Dn(h,E,X.originalEvent)))}}}}return{layer:y,listener:b,delegates:(w={},w[h]=function(X){var Q=E.getLayer(y)?E.queryRenderedFeatures(X.point,{layers:[y]}):[];Q.length&&(X.features=Q,b.call(E,X),delete X.features)},w)}},c.prototype.on=function(h,y,b){if(b===void 0)return l.prototype.on.call(this,h,y);var w=this._createDelegatedListener(h,y,b);for(var E in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(w),w.delegates)this.on(E,w.delegates[E]);return this},c.prototype.once=function(h,y,b){if(b===void 0)return l.prototype.once.call(this,h,y);var w=this._createDelegatedListener(h,y,b);for(var E in w.delegates)this.once(E,w.delegates[E]);return this},c.prototype.off=function(h,y,b){var w=this;return b===void 0?l.prototype.off.call(this,h,y):(this._delegatedListeners&&this._delegatedListeners[h]&&function(E){for(var M=E[h],N=0;N180;){var w=u.locationPoint(l);if(w.x>=0&&w.y>=0&&w.x<=u.width&&w.y<=u.height)break;l.lng>u.center.lng?l.lng-=360:l.lng+=360}return l}Ki.prototype.down=function(l,c){this.mouseRotate.mousedown(l,c),this.mousePitch&&this.mousePitch.mousedown(l,c),x.disableDrag()},Ki.prototype.move=function(l,c){var u=this.map,h=this.mouseRotate.mousemoveWindow(l,c);if(h&&h.bearingDelta&&u.setBearing(u.getBearing()+h.bearingDelta),this.mousePitch){var y=this.mousePitch.mousemoveWindow(l,c);y&&y.pitchDelta&&u.setPitch(u.getPitch()+y.pitchDelta)}},Ki.prototype.off=function(){var l=this.element;x.removeEventListener(l,"mousedown",this.mousedown),x.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),x.removeEventListener(l,"touchmove",this.touchmove),x.removeEventListener(l,"touchend",this.touchend),x.removeEventListener(l,"touchcancel",this.reset),this.offTemp()},Ki.prototype.offTemp=function(){x.enableDrag(),x.removeEventListener(o.window,"mousemove",this.mousemove),x.removeEventListener(o.window,"mouseup",this.mouseup)},Ki.prototype.mousedown=function(l){this.down(o.extend({},l,{ctrlKey:!0,preventDefault:function(){return l.preventDefault()}}),x.mousePos(this.element,l)),x.addEventListener(o.window,"mousemove",this.mousemove),x.addEventListener(o.window,"mouseup",this.mouseup)},Ki.prototype.mousemove=function(l){this.move(l,x.mousePos(this.element,l))},Ki.prototype.mouseup=function(l){this.mouseRotate.mouseupWindow(l),this.mousePitch&&this.mousePitch.mouseupWindow(l),this.offTemp()},Ki.prototype.touchstart=function(l){l.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,l.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return l.preventDefault()}},this._startPos))},Ki.prototype.touchmove=function(l){l.targetTouches.length!==1?this.reset():(this._lastPos=x.touchPos(this.element,l.targetTouches)[0],this.move({preventDefault:function(){return l.preventDefault()}},this._lastPos))},Ki.prototype.touchend=function(l){l.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=h}this._isDragging&&(this._pos=u.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 o.Event("dragstart"))),this.fire(new o.Event("drag")))},c.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 o.Event("dragend")),this._state="inactive"},c.prototype._addDragHandler=function(u){this._element.contains(u.originalEvent.target)&&(u.preventDefault(),this._positionDelta=u.point.sub(this._pos).add(this._offset),this._pointerdownPos=u.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))},c.prototype.setDraggable=function(u){return this._draggable=!!u,this._map&&(u?(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},c.prototype.isDraggable=function(){return this._draggable},c.prototype.setRotation=function(u){return this._rotation=u||0,this._update(),this},c.prototype.getRotation=function(){return this._rotation},c.prototype.setRotationAlignment=function(u){return this._rotationAlignment=u||"auto",this._update(),this},c.prototype.getRotationAlignment=function(){return this._rotationAlignment},c.prototype.setPitchAlignment=function(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this},c.prototype.getPitchAlignment=function(){return this._pitchAlignment},c}(o.Evented),wd={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_l=0,Ns=!1,Ad=function(l){function c(u){l.call(this),this.options=o.extend({},wd,u),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c.prototype.onAdd=function(u){var h;return this._map=u,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),h=this._setupUI,vl!==void 0?h(vl):o.window.navigator.permissions!==void 0?o.window.navigator.permissions.query({name:"geolocation"}).then(function(y){h(vl=y.state!=="denied")}):h(vl=!!o.window.navigator.geolocation),this._container},c.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(o.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(),x.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_l=0,Ns=!1},c.prototype._isOutOfMapMaxBounds=function(u){var h=this._map.getMaxBounds(),y=u.coords;return h&&(y.longitudeh.getEast()||y.latitudeh.getNorth())},c.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")}},c.prototype._onSuccess=function(u){if(this._map){if(this._isOutOfMapMaxBounds(u))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",u)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=u,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")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(u),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(u),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",u)),this._finish()}},c.prototype._updateCamera=function(u){var h=new o.LngLat(u.coords.longitude,u.coords.latitude),y=u.coords.accuracy,b=this._map.getBearing(),w=o.extend({bearing:b},this.options.fitBoundsOptions);this._map.fitBounds(h.toBounds(y),w,{geolocateSource:!0})},c.prototype._updateMarker=function(u){if(u){var h=new o.LngLat(u.coords.longitude,u.coords.latitude);this._accuracyCircleMarker.setLngLat(h).addTo(this._map),this._userLocationDotMarker.setLngLat(h).addTo(this._map),this._accuracy=u.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},c.prototype._updateCircleRadius=function(){var u=this._map._container.clientHeight/2,h=this._map.unproject([0,u]),y=this._map.unproject([1,u]),b=h.distanceTo(y),w=Math.ceil(2*this._accuracy/b);this._circleElement.style.width=w+"px",this._circleElement.style.height=w+"px"},c.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},c.prototype._onError=function(u){if(this._map){if(this.options.trackUserLocation)if(u.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 h=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=h,this._geolocateButton.setAttribute("aria-label",h),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(u.code===3&&Ns)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",u)),this._finish()}},c.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},c.prototype._setupUI=function(u){var h=this;if(this._container.addEventListener("contextmenu",function(w){return w.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",u===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var y=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=y,this._geolocateButton.setAttribute("aria-label",y)}else{var b=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=b,this._geolocateButton.setAttribute("aria-label",b)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new vu(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new vu({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(w){w.geolocateSource||h._watchState!=="ACTIVE_LOCK"||w.originalEvent&&w.originalEvent.type==="resize"||(h._watchState="BACKGROUND",h._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),h._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),h.fire(new o.Event("trackuserlocationend")))})},c.prototype.trigger=function(){if(!this._setup)return o.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 o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":_l--,Ns=!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 o.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 o.Event("trackuserlocationstart"))}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")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var u;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++_l>1?(u={maximumAge:6e5,timeout:0},Ns=!0):(u=this.options.positionOptions,Ns=!1),this._geolocationWatchID=o.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else o.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},c.prototype._clearWatch=function(){o.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)},c}(o.Evented),Ka={maxWidth:100,unit:"metric"},Xa=function(l){this.options=o.extend({},Ka,l),o.bindAll(["_onMove","setUnit"],this)};function wc(l,c,u){var h=u&&u.maxWidth||100,y=l._container.clientHeight/2,b=l.unproject([0,y]),w=l.unproject([h,y]),E=b.distanceTo(w);if(u&&u.unit==="imperial"){var M=3.2808*E;M>5280?Qa(c,h,M/5280,l._getUIString("ScaleControl.Miles")):Qa(c,h,M,l._getUIString("ScaleControl.Feet"))}else u&&u.unit==="nautical"?Qa(c,h,E/1852,l._getUIString("ScaleControl.NauticalMiles")):E>=1e3?Qa(c,h,E/1e3,l._getUIString("ScaleControl.Kilometers")):Qa(c,h,E,l._getUIString("ScaleControl.Meters"))}function Qa(l,c,u,h){var y,b,w,E=(y=u,(b=Math.pow(10,(""+Math.floor(y)).length-1))*(w=(w=y/b)>=10?10:w>=5?5:w>=3?3:w>=2?2:w>=1?1:function(M){var N=Math.pow(10,Math.ceil(-Math.log(M)/Math.LN10));return Math.round(M*N)/N}(w)));l.style.width=c*(E/u)+"px",l.innerHTML=E+" "+h}Xa.prototype.getDefaultPosition=function(){return"bottom-left"},Xa.prototype._onMove=function(){wc(this._map,this._container,this.options)},Xa.prototype.onAdd=function(l){return this._map=l,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",l.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xa.prototype.onRemove=function(){x.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xa.prototype.setUnit=function(l){this.options.unit=l,wc(this._map,this._container,this.options)};var xo=function(l){this._fullscreen=!1,l&&l.container&&(l.container instanceof o.window.HTMLElement?this._container=l.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.window.document&&(this._fullscreenchange="MSFullscreenChange")};xo.prototype.onAdd=function(l){return this._map=l,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},xo.prototype.onRemove=function(){x.remove(this._controlContainer),this._map=null,o.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},xo.prototype._checkFullscreenSupport=function(){return!!(o.window.document.fullscreenEnabled||o.window.document.mozFullScreenEnabled||o.window.document.msFullscreenEnabled||o.window.document.webkitFullscreenEnabled)},xo.prototype._setupUI=function(){var l=this._fullscreenButton=x.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);x.create("span","mapboxgl-ctrl-icon",l).setAttribute("aria-hidden",!0),l.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},xo.prototype._updateTitle=function(){var l=this._getTitle();this._fullscreenButton.setAttribute("aria-label",l),this._fullscreenButton.title=l},xo.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},xo.prototype._isFullscreen=function(){return this._fullscreen},xo.prototype._changeIcon=function(){(o.window.document.fullscreenElement||o.window.document.mozFullScreenElement||o.window.document.webkitFullscreenElement||o.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())},xo.prototype._onClickFullscreen=function(){this._isFullscreen()?o.window.document.exitFullscreen?o.window.document.exitFullscreen():o.window.document.mozCancelFullScreen?o.window.document.mozCancelFullScreen():o.window.document.msExitFullscreen?o.window.document.msExitFullscreen():o.window.document.webkitCancelFullScreen&&o.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 Sd={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},_u=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Ed=function(l){function c(u){l.call(this),this.options=o.extend(Object.create(Sd),u),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return l&&(c.__proto__=l),(c.prototype=Object.create(l&&l.prototype)).constructor=c,c.prototype.addTo=function(u){return this._map&&this.remove(),this._map=u,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 o.Event("open")),this},c.prototype.isOpen=function(){return!!this._map},c.prototype.remove=function(){return this._content&&x.remove(this._content),this._container&&(x.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 o.Event("close")),this},c.prototype.getLngLat=function(){return this._lngLat},c.prototype.setLngLat=function(u){return this._lngLat=o.LngLat.convert(u),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},c.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},c.prototype.getElement=function(){return this._container},c.prototype.setText=function(u){return this.setDOMContent(o.window.document.createTextNode(u))},c.prototype.setHTML=function(u){var h,y=o.window.document.createDocumentFragment(),b=o.window.document.createElement("body");for(b.innerHTML=u;h=b.firstChild;)y.appendChild(h);return this.setDOMContent(y)},c.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},c.prototype.setMaxWidth=function(u){return this.options.maxWidth=u,this._update(),this},c.prototype.setDOMContent=function(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this},c.prototype.addClassName=function(u){this._container&&this._container.classList.add(u)},c.prototype.removeClassName=function(u){this._container&&this._container.classList.remove(u)},c.prototype.setOffset=function(u){return this.options.offset=u,this._update(),this},c.prototype.toggleClassName=function(u){if(this._container)return this._container.classList.toggle(u)},c.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=x.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))},c.prototype._onMouseUp=function(u){this._update(u.point)},c.prototype._onMouseMove=function(u){this._update(u.point)},c.prototype._onDrag=function(u){this._update(u.point)},c.prototype._update=function(u){var h=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=x.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=x.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Q){return h._container.classList.add(Q)}),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=yl(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||u)){var y=this._pos=this._trackPointer&&u?u:this._map.project(this._lngLat),b=this.options.anchor,w=function Q(J){if(J){if(typeof J=="number"){var de=Math.round(Math.sqrt(.5*Math.pow(J,2)));return{center:new o.Point(0,0),top:new o.Point(0,J),"top-left":new o.Point(de,de),"top-right":new o.Point(-de,de),bottom:new o.Point(0,-J),"bottom-left":new o.Point(de,-de),"bottom-right":new o.Point(-de,-de),left:new o.Point(J,0),right:new o.Point(-J,0)}}if(J instanceof o.Point||Array.isArray(J)){var pe=o.Point.convert(J);return{center:pe,top:pe,"top-left":pe,"top-right":pe,bottom:pe,"bottom-left":pe,"bottom-right":pe,left:pe,right:pe}}return{center:o.Point.convert(J.center||[0,0]),top:o.Point.convert(J.top||[0,0]),"top-left":o.Point.convert(J["top-left"]||[0,0]),"top-right":o.Point.convert(J["top-right"]||[0,0]),bottom:o.Point.convert(J.bottom||[0,0]),"bottom-left":o.Point.convert(J["bottom-left"]||[0,0]),"bottom-right":o.Point.convert(J["bottom-right"]||[0,0]),left:o.Point.convert(J.left||[0,0]),right:o.Point.convert(J.right||[0,0])}}return Q(new o.Point(0,0))}(this.options.offset);if(!b){var E,M=this._container.offsetWidth,N=this._container.offsetHeight;E=y.y+w.bottom.ythis._map.transform.height-N?["bottom"]:[],y.xthis._map.transform.width-M/2&&E.push("right"),b=E.length===0?"bottom":E.join("-")}var X=y.add(w[b]).round();x.setTransform(this._container,na[b]+" translate("+X.x+"px,"+X.y+"px)"),bc(this._container,b,"popup")}},c.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var u=this._container.querySelector(_u);u&&u.focus()}},c.prototype._onClose=function(){this.remove()},c}(o.Evented),Ac={version:o.version,supported:v,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:Kf,NavigationControl:ba,GeolocateControl:Ad,AttributionControl:Si,ScaleControl:Xa,FullscreenControl:xo,Popup:Ed,Marker:vu,Style:qi,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.Point,MercatorCoordinate:o.MercatorCoordinate,Evented:o.Evented,config:o.config,prewarm:function(){Be().acquire(Me)},clearPrewarmedResources:function(){var l=it;l&&(l.isPreloaded()&&l.numActive()===1?(l.release(Me),it=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()"))},get accessToken(){return o.config.ACCESS_TOKEN},set accessToken(l){o.config.ACCESS_TOKEN=l},get baseApiUrl(){return o.config.API_URL},set baseApiUrl(l){o.config.API_URL=l},get workerCount(){return Ve.workerCount},set workerCount(l){Ve.workerCount=l},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(l){o.config.MAX_PARALLEL_IMAGE_REQUESTS=l},clearStorage:function(l){o.clearTileCache(l)},workerUrl:""};return Ac}),p})})(ZC);var g3=ZC.exports;const Zs=yy(g3);var Xp=v3,y3=Object.prototype.hasOwnProperty;function v3(){for(var e={},t=0;t-1};no.prototype.value=function(e){if(this.selected=e,this.el.value=this.getItemValue(e),document.createEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.el.dispatchEvent(t)}else this.el.fireEvent("onchange")};no.prototype.getCandidates=function(e){var t={pre:"",post:"",extract:(function(a){return this.getItemValue(a)}).bind(this)},n;this.options.filter?(n=w3.filter(this.query,this.data,t),n=n.map((function(a){return{original:a.original,string:this.render(a.original,a.string)}}).bind(this))):n=this.data.map((function(a){var p=this.render(a);return{original:a,string:p}}).bind(this)),e(n)};no.prototype.getItemValue=function(e){return e};no.prototype.render=function(e,t){if(t)return t;for(var n=e.original?this.getItemValue(e.original):this.getItemValue(e),a=this.normalize(n),p=a.lastIndexOf(this.query);p>-1;){var f=p+this.query.length;n=n.slice(0,p)+""+n.slice(p,f)+""+n.slice(f),p=a.slice(0,p).lastIndexOf(this.query)}return n};no.prototype.renderError=function(e){this.list.drawError(e)};var S3=no,XC=S3,E3=XC;typeof window<"u"&&(window.Suggestions=XC);var C3="Expected a function",q2=0/0,k3="[object Symbol]",I3=/^\s+|\s+$/g,T3=/^[-+]0x[0-9a-f]+$/i,P3=/^0b[01]+$/i,M3=/^0o[0-7]+$/i,z3=parseInt,L3=typeof za=="object"&&za&&za.Object===Object&&za,R3=typeof self=="object"&&self&&self.Object===Object&&self,D3=L3||R3||Function("return this")(),B3=Object.prototype,O3=B3.toString,N3=Math.max,F3=Math.min,H0=function(){return D3.Date.now()};function j3(e,t,n){var a,p,f,o,v,x,S=0,k=!1,P=!1,I=!0;if(typeof e!="function")throw new TypeError(C3);t=W2(t)||0,cx(n)&&(k=!!n.leading,P="maxWait"in n,f=P?N3(W2(n.maxWait)||0,t):f,I="trailing"in n?!!n.trailing:I);function q(ne){var ue=a,fe=p;return a=p=void 0,S=ne,o=e.apply(fe,ue),o}function V(ne){return S=ne,v=setTimeout($,t),k?q(ne):o}function H(ne){var ue=ne-x,fe=ne-S,Ce=t-ue;return P?F3(Ce,f-fe):Ce}function oe(ne){var ue=ne-x,fe=ne-S;return x===void 0||ue>=t||ue<0||P&&fe>=f}function $(){var ne=H0();if(oe(ne))return F(ne);v=setTimeout($,H(ne))}function F(ne){return v=void 0,I&&a?q(ne):(a=p=void 0,o)}function L(){v!==void 0&&clearTimeout(v),S=0,a=x=p=v=void 0}function O(){return v===void 0?o:F(H0())}function Y(){var ne=H0(),ue=oe(ne);if(a=arguments,p=this,x=ne,ue){if(v===void 0)return V(x);if(P)return v=setTimeout($,t),q(x)}return v===void 0&&(v=setTimeout($,t)),o}return Y.cancel=L,Y.flush=O,Y}function cx(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function U3(e){return!!e&&typeof e=="object"}function V3(e){return typeof e=="symbol"||U3(e)&&O3.call(e)==k3}function W2(e){if(typeof e=="number")return e;if(V3(e))return q2;if(cx(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cx(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(I3,"");var n=P3.test(e);return n||M3.test(e)?z3(e.slice(2),n?2:8):T3.test(e)?q2:+e}var $3=j3,E1={exports:{}},Ip=typeof Reflect=="object"?Reflect:null,G2=Ip&&typeof Ip.apply=="function"?Ip.apply:function(t,n,a){return Function.prototype.apply.call(t,n,a)},gg;Ip&&typeof Ip.ownKeys=="function"?gg=Ip.ownKeys:Object.getOwnPropertySymbols?gg=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:gg=function(t){return Object.getOwnPropertyNames(t)};function q3(e){console&&console.warn&&console.warn(e)}var QC=Number.isNaN||function(t){return t!==t};function sn(){sn.init.call(this)}E1.exports=sn;E1.exports.once=Z3;sn.EventEmitter=sn;sn.prototype._events=void 0;sn.prototype._eventsCount=0;sn.prototype._maxListeners=void 0;var H2=10;function Ry(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(sn,"defaultMaxListeners",{enumerable:!0,get:function(){return H2},set:function(e){if(typeof e!="number"||e<0||QC(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");H2=e}});sn.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};sn.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||QC(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function YC(e){return e._maxListeners===void 0?sn.defaultMaxListeners:e._maxListeners}sn.prototype.getMaxListeners=function(){return YC(this)};sn.prototype.emit=function(t){for(var n=[],a=1;a0&&(o=n[0]),o instanceof Error)throw o;var v=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw v.context=o,v}var x=f[t];if(x===void 0)return!1;if(typeof x=="function")G2(x,this,n);else for(var S=x.length,k=nk(x,S),a=0;a0&&o.length>p&&!o.warned){o.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=e,v.type=t,v.count=o.length,q3(v)}return e}sn.prototype.addListener=function(t,n){return JC(this,t,n,!1)};sn.prototype.on=sn.prototype.addListener;sn.prototype.prependListener=function(t,n){return JC(this,t,n,!0)};function W3(){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 ek(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},p=W3.bind(a);return p.listener=n,a.wrapFn=p,p}sn.prototype.once=function(t,n){return Ry(n),this.on(t,ek(this,t,n)),this};sn.prototype.prependOnceListener=function(t,n){return Ry(n),this.prependListener(t,ek(this,t,n)),this};sn.prototype.removeListener=function(t,n){var a,p,f,o,v;if(Ry(n),p=this._events,p===void 0)return this;if(a=p[t],a===void 0)return this;if(a===n||a.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete p[t],p.removeListener&&this.emit("removeListener",t,a.listener||n));else if(typeof a!="function"){for(f=-1,o=a.length-1;o>=0;o--)if(a[o]===n||a[o].listener===n){v=a[o].listener,f=o;break}if(f<0)return this;f===0?a.shift():G3(a,f),a.length===1&&(p[t]=a[0]),p.removeListener!==void 0&&this.emit("removeListener",t,v||n)}return this};sn.prototype.off=sn.prototype.removeListener;sn.prototype.removeAllListeners=function(t){var n,a,p;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[t]),this;if(arguments.length===0){var f=Object.keys(a),o;for(p=0;p=0;p--)this.removeListener(t,n[p]);return this};function tk(e,t,n){var a=e._events;if(a===void 0)return[];var p=a[t];return p===void 0?[]:typeof p=="function"?n?[p.listener||p]:[p]:n?H3(p):nk(p,p.length)}sn.prototype.listeners=function(t){return tk(this,t,!0)};sn.prototype.rawListeners=function(t){return tk(this,t,!1)};sn.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):rk.call(e,t)};sn.prototype.listenerCount=rk;function rk(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}sn.prototype.eventNames=function(){return this._eventsCount>0?gg(this._events):[]};function nk(e,t){for(var n=new Array(t),a=0;a]*)>(.*)/);if(!t)return null;var n=t[1],a=t[2].split(";"),p=null,f=a.reduce(function(o,v){var x=Y3(v);return x?x.key==="rel"?(p||(p=x.value),o):(o[x.key]=x.value,o):o},{});return p?{url:n,rel:p,params:f}:null}function e5(e){return e?e.split(/,\s*=400){var o=new K2({request:e,body:t.response,statusCode:t.status});a(o);return}n(t)};var f=e.body;typeof f=="string"?t.send(f):f?t.send(JSON.stringify(f)):p?t.send(p):t.send(),Kg[e.id]=t}).then(function(n){return d5(e,n)})}function ak(e,t){var n=e.url(t),a=new window.XMLHttpRequest;return a.open(e.method,n),Object.keys(e.headers).forEach(function(p){a.setRequestHeader(p,e.headers[p])}),a}function h5(e){return Promise.resolve().then(function(){var t=ak(e,e.client.accessToken);return ok(e,t)})}var f5={browserAbort:p5,sendRequestXhr:ok,browserSend:h5,createRequestXhr:ak},Xg={exports:{}};/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */Xg.exports;(function(e,t){(function(n){var a=t,p=e&&e.exports==a&&e,f=typeof za=="object"&&za;(f.global===f||f.window===f)&&(n=f);var o=function(V){this.message=V};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var v=function(V){throw new o(V)},x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=/[\t\n\f\r ]/g,k=function(V){V=String(V).replace(S,"");var H=V.length;H%4==0&&(V=V.replace(/==?$/,""),H=V.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(V))&&v("Invalid character: the string to be decoded is not correctly encoded.");for(var oe=0,$,F,L="",O=-1;++O>(-2*oe&6)));return L},P=function(V){V=String(V),/[^\0-\xFF]/.test(V)&&v("The string to be encoded contains characters outside of the Latin1 range.");for(var H=V.length%3,oe="",$=-1,F,L,O,Y,ne=V.length-H;++$>18&63)+x.charAt(Y>>12&63)+x.charAt(Y>>6&63)+x.charAt(Y&63);return H==2?(F=V.charCodeAt($)<<8,L=V.charCodeAt(++$),Y=F+L,oe+=x.charAt(Y>>10)+x.charAt(Y>>4&63)+x.charAt(Y<<2&63)+"="):H==1&&(Y=V.charCodeAt($),oe+=x.charAt(Y>>2)+x.charAt(Y<<4&63)+"=="),oe},I={encode:P,decode:k,version:"0.1.0"};if(a&&!a.nodeType)if(p)p.exports=I;else for(var q in I)I.hasOwnProperty(q)&&(a[q]=I[q]);else n.base64=I})(za)})(Xg,Xg.exports);var m5=Xg.exports,g5=m5,K0={};function y5(e){if(K0[e])return K0[e];var t=e.split("."),n=t[0],a=t[1];if(!a)throw new Error("Invalid token");var p=v5(a),f={usage:n,user:p.u};return Mu(p,"a")&&(f.authorization=p.a),Mu(p,"exp")&&(f.expires=p.exp*1e3),Mu(p,"iat")&&(f.created=p.iat*1e3),Mu(p,"scopes")&&(f.scopes=p.scopes),Mu(p,"client")&&(f.client=p.client),Mu(p,"ll")&&(f.lastLogin=p.ll),Mu(p,"iu")&&(f.impersonator=p.iu),K0[e]=f,f}function v5(e){try{return JSON.parse(g5.decode(e))}catch{throw new Error("Invalid token")}}function Mu(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var sk=y5,lk={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function p(x,S,k){this.fn=x,this.context=S,this.once=k||!1}function f(x,S,k,P,I){if(typeof k!="function")throw new TypeError("The listener must be a function");var q=new p(k,P||x,I),V=n?n+S:S;return x._events[V]?x._events[V].fn?x._events[V]=[x._events[V],q]:x._events[V].push(q):(x._events[V]=q,x._eventsCount++),x}function o(x,S){--x._eventsCount===0?x._events=new a:delete x._events[S]}function v(){this._events=new a,this._eventsCount=0}v.prototype.eventNames=function(){var S=[],k,P;if(this._eventsCount===0)return S;for(P in k=this._events)t.call(k,P)&&S.push(n?P.slice(1):P);return Object.getOwnPropertySymbols?S.concat(Object.getOwnPropertySymbols(k)):S},v.prototype.listeners=function(S){var k=n?n+S:S,P=this._events[k];if(!P)return[];if(P.fn)return[P.fn];for(var I=0,q=P.length,V=new Array(q);If.length?o:f})}};_n.equal=function(t){return function(a){if(a!==t)return JSON.stringify(t)}};_n.oneOf=function(){var t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),n=t.map(function(a){return _n.equal(a)});return _n.oneOfType.apply(this,n)};_n.range=function(t){var n=t[0],a=t[1];return function(f){var o=Zl(_n.number,f);if(o||fa)return"number between "+n+" & "+a+" (inclusive)"}};_n.any=function(){};_n.boolean=function(t){if(typeof t!="boolean")return"boolean"};_n.number=function(t){if(typeof t!="number")return"number"};_n.plainArray=function(t){if(!Array.isArray(t))return"array"};_n.plainObject=function(t){if(!O5(t))return"object"};_n.string=function(t){if(typeof t!="string")return"string"};_n.func=function(t){if(typeof t!="function")return"function"};function Zl(e,t){if(!(t==null&&!e.hasOwnProperty("__required"))){var n=e(t);if(n)return Array.isArray(n)?n:[n]}}function I1(e,t){var n=e.length,a=e[n-1],p=e.slice(0,n-1);return p.length===0&&(p=[gk]),t=N5(t,{path:p}),typeof a=="function"?a(t):vk(t,j5(a))}function F5(e){return e.length<2?e[0]:e.length===2?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e.slice(-1)}function j5(e){return"must be "+U5(e)+"."}function U5(e){return/^an? /.test(e)?e:/^[aeiou]/i.test(e)?"an "+e:/^[a-z]/i.test(e)?"a "+e:e}function vk(e,t){var n=_k(e.path),a=e.path.join(".")+" "+t,p=n?"Item at position ":"";return p+a}function _k(e){return typeof e[e.length-1]=="number"||typeof e[0]=="number"}function V5(e){return Object.keys(e||{}).map(function(t){return{key:t,value:e[t]}})}_n.validate=Zl;_n.processMessage=I1;var $5=_n,q5=Xp,Tp=$5;function W5(e){if(typeof window<"u")return e instanceof za.Blob||e instanceof za.ArrayBuffer?void 0:"Blob or ArrayBuffer";if(!(typeof e=="string"||e.pipe!==void 0))return"Filename or Readable stream"}function G5(e,t){return Tp.assert(Tp.strictShape(e),t)}function H5(e){var t="date";if(typeof e=="boolean")return t;try{var n=new Date(e);if(n.getTime&&isNaN(n.getTime()))return t}catch{return t}}function Z5(e){return Tp.tuple(Tp.number,Tp.number)(e)}var K5=q5(Tp,{file:W5,date:H5,coordinates:Z5,assertShape:G5});function X5(e,t){var n=function(a,p){return t.indexOf(a)!==-1&&p!==void 0};return typeof t=="function"&&(n=t),Object.keys(e).filter(function(a){return n(a,e[a])}).reduce(function(a,p){return a[p]=e[p],a},{})}var Q5=X5;function Y5(e,t){return Object.keys(e).reduce(function(n,a){return n[a]=t(a,e[a]),n},{})}var J5=Y5,eL=J5;function tL(e){return eL(e,function(t,n){return typeof n=="boolean"?JSON.stringify(n):n})}var rL=tL,nL=dk,iL=mk;function oL(e){return function(t){var n;nL.prototype.isPrototypeOf(t)?n=t:n=iL(t);var a=Object.create(e);return a.client=n,a}}var aL=oL,xk=Xp,zr=K5,Qg=Q5,bk=rL,sL=aL,T1={},wk=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];T1.forwardGeocode=function(e){zr.assertShape({query:zr.required(zr.string),mode:zr.oneOf("mapbox.places","mapbox.places-permanent"),countries:zr.arrayOf(zr.string),proximity:zr.oneOf(zr.coordinates,"ip"),types:zr.arrayOf(zr.oneOf(wk)),autocomplete:zr.boolean,bbox:zr.arrayOf(zr.number),limit:zr.number,language:zr.arrayOf(zr.string),routing:zr.boolean,fuzzyMatch:zr.boolean,worldview:zr.string})(e),e.mode=e.mode||"mapbox.places";var t=bk(xk({country:e.countries},Qg(e,["proximity","types","autocomplete","bbox","limit","language","routing","fuzzyMatch","worldview"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:Qg(e,["mode","query"]),query:t})};T1.reverseGeocode=function(e){zr.assertShape({query:zr.required(zr.coordinates),mode:zr.oneOf("mapbox.places","mapbox.places-permanent"),countries:zr.arrayOf(zr.string),types:zr.arrayOf(zr.oneOf(wk)),bbox:zr.arrayOf(zr.number),limit:zr.number,language:zr.arrayOf(zr.string),reverseMode:zr.oneOf("distance","score"),routing:zr.boolean,worldview:zr.string})(e),e.mode=e.mode||"mapbox.places";var t=bk(xk({country:e.countries},Qg(e,["country","types","bbox","limit","language","reverseMode","routing","worldview"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:Qg(e,["mode","query"]),query:t})};var lL=sL(T1);let uL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ak=e=>crypto.getRandomValues(new Uint8Array(e)),Sk=(e,t,n)=>{let a=(2<{let o="";for(;;){let v=n(p),x=p;for(;x--;)if(o+=e[v[x]&a]||"",o.length===f)return o}}},cL=(e,t=21)=>Sk(e,t,Ak),pL=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const dL=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:cL,customRandom:Sk,nanoid:pL,random:Ak,urlAlphabet:uL},Symbol.toStringTag,{value:"Module"})),hL=RS(dL);var fL=hL.nanoid;function Ek(e){this.origin=e.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=e.accessToken,this.version="0.2.0",this.sessionID=this.generateSessionID(),this.userAgent=this.getUserAgent(),this.options=e,this.send=this.send.bind(this),this.countries=e.countries?e.countries.split(","):null,this.types=e.types?e.types.split(","):null,this.bbox=e.bbox?e.bbox:null,this.language=e.language?e.language.split(","):null,this.limit=e.limit?+e.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(e),this.eventQueue=new Array,this.flushInterval=e.flushInterval||1e3,this.maxQueueSize=e.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}Ek.prototype={select:function(e,t){var n=this.getSelectedIndex(e,t),a=this.getEventPayload("search.select",t);if(a.resultIndex=n,a.resultPlaceName=e.place_name,a.resultId=e.id,!(n===this.lastSentIndex&&a.queryString===this.lastSentInput||n==-1)&&(this.lastSentIndex=n,this.lastSentInput=a.queryString,!!a.queryString))return this.push(a)},start:function(e){var t=this.getEventPayload("search.start",e);if(t.queryString)return this.push(t)},keyevent:function(e,t){if(e.key&&!(e.metaKey||[9,27,37,39,13,38,40].indexOf(e.keyCode)!==-1)){var n=this.getEventPayload("search.keystroke",t);if(n.lastAction=e.key,!!n.queryString)return this.push(n)}},send:function(e,t){if(!this.enableEventLogging)return t?t():void 0;var n=this.getRequestOptions(e);this.request(n,(function(a){if(a)return this.handleError(a,t);if(t)return t()}).bind(this))},getRequestOptions:function(e){Array.isArray(e)||(e=[e]);var t={method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(e)};return t},getEventPayload:function(e,t){var n;t.options.proximity?typeof t.options.proximity=="object"?n=[t.options.proximity.longitude,t.options.proximity.latitude]:t.options.proximity==="ip"?n=[999,999]:n=t.options.proximity:n=null;var a=t._map?t._map.getZoom():void 0,p={event:e,created:+new Date,sessionIdentifier:this.sessionID,country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",autocomplete:t.options.autocomplete,fuzzyMatch:t.options.fuzzyMatch,proximity:n,limit:t.options.limit,routing:t.options.routing,worldview:t.options.worldview,mapZoom:a,keyboardLocale:this.locale};return e==="search.select"?p.queryString=t.inputString:e!="search.select"&&t._inputEl?p.queryString=t._inputEl.value:p.queryString=t.inputString,p},request:function(e,t){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(this.readyState==4)return this.status==204?t(null):t(this.statusText)},n.open(e.method,e.host+"/"+e.path,!0);for(var a in e.headers){var p=e.headers[a];n.setRequestHeader(a,p)}n.send(e.body)},handleError:function(e,t){if(t)return t(e)},generateSessionID:function(){return fL()},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(e,t){if(t._typeahead){var n=t._typeahead.data,a=e.id,p=n.map(function(o){return o.id}),f=p.indexOf(a);return f}},shouldEnableLogging:function(e){return!(e.enableEventLogging===!1||e.origin&&e.origin!=="https://api.mapbox.com"||e.localGeocoder||e.filter)},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(e,t){this.eventQueue.push(e),(this.eventQueue.length>=this.maxQueueSize||t)&&this.flush()},remove:function(){this.flush()}};var mL=Ek,gL={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},yL={placeholder:gL},Ck={exports:{}};(function(e){(function(t,n,a){e.exports?e.exports=a():t[n]=a()})(za,"subtag",function(){var t="",n=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function a(x){return x.match(n)||[]}function p(x){return a(x).filter(function(S,k){return S&&k})}function f(x){return x=a(x),{language:x[1]||t,extlang:x[2]||t,script:x[3]||t,region:x[4]||t}}function o(x,S,k){Object.defineProperty(x,S,{value:k,enumerable:!0})}function v(x,S,k){function P(I){return a(I)[x]||t}o(P,"pattern",S),o(f,k,P)}return v(1,/^[a-zA-Z]{2,3}$/,"language"),v(2,/^[a-zA-Z]{3}$/,"extlang"),v(3,/^[a-zA-Z]{4}$/,"script"),v(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),o(f,"split",p),f})})(Ck);var vL=Ck.exports;function kk(){}kk.prototype={isSupport:function(){return!!window.navigator.geolocation},getCurrentPosition:function(){const e={enableHighAccuracy:!0};return new Promise(function(t,n){window.navigator.geolocation.getCurrentPosition(t,n,e)})}};var _L=kk;function xL(e,t){const n=Ik(e),a=["address","street","place","country"];var p;if(typeof t=="function")return t(n);const f=a.indexOf(t);return f===-1?p=a:p=a.slice(f),p.reduce(function(o,v){return n[v]?(o!==""&&(o=o+", "),o+n[v]):o},"")}function Ik(e){const t=e.address||"",n=e.text||"",a=e.place_name||"",f={address:a.split(",")[0],houseNumber:t,street:n,placeName:a};return e.context.forEach(function(o){const v=o.id.split(".")[0];f[v]=o.text}),f}const bL=/^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)[ ]*$/;var wL={transformFeatureToGeolocationText:xL,getAddressInfo:Ik,REVERSE_GEOCODE_COORD_RGX:bL},AL=E3,SL=$3,Bu=Xp,EL=X3.EventEmitter,Y2=Q3,Q0=R5,Y0=lL,CL=mL,kL=yL,IL=vL,TL=_L,J2=wL;const Il={FORWARD:0,LOCAL:1,REVERSE:2};function PL(){var e=document.createElement("div");return e.className="mapboxgl-ctrl-geocoder--powered-by",e.innerHTML='Powered by Mapbox',e}function Tk(e){this._eventEmitter=new EL,this.options=Bu({},this.options,e),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geolocation=new TL}Tk.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,flipCoordinates:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,enableGeolocation:!1,addressAccuracy:"street",getItemValue:function(e){return e.place_name},render:function(e){var t=e.place_name.split(",");return'
'+t[0]+'
'+t.splice(1,t.length).join(",")+"
"}},addTo:function(e){function t(n,a){if(!document.body.contains(a))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const p=n.onAdd();a.appendChild(p)}if(e._controlContainer)e.addControl(this);else if(e instanceof HTMLElement)t(this,e);else if(typeof e=="string"){const n=document.querySelectorAll(e);if(n.length===0)throw new Error("Element ",e,"not found.");if(n.length>1)throw new Error("Geocoder can only be added to a single html element");t(this,n[0])}else throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(e){if(e&&typeof e!="string"&&(this._map=e),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=Y0(Q0({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new CL(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this),this._geolocateUser=this._geolocateUser.bind(this);var t=this.container=document.createElement("div");t.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var n=this.createIcon("search",'');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",SL(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",(function(S){this.eventManager.keyevent(S,this)}).bind(this));var a=document.createElement("div");a.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var p=this.createIcon("close",'');if(this._clearEl.appendChild(p),this._loadingEl=this.createIcon("loading",''),a.appendChild(this._clearEl),a.appendChild(this._loadingEl),t.appendChild(n),t.appendChild(this._inputEl),t.appendChild(a),this.options.enableGeolocation&&this.geolocation.isSupport()){this._geolocateEl=document.createElement("button"),this._geolocateEl.setAttribute("aria-label","Geolocate"),this._geolocateEl.addEventListener("click",this._geolocateUser),this._geolocateEl.className="mapboxgl-ctrl-geocoder--button";var f=this.createIcon("geolocate",'');this._geolocateEl.appendChild(f),a.appendChild(this._geolocateEl),this._showGeolocateButton()}var o=this._typeahead=new AL(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit});this.setRenderFunction(this.options.render),o.getItemValue=this.options.getItemValue;var v=o.list.draw,x=this._footerNode=PL();return o.list.draw=function(){v.call(this),x.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),x.addEventListener("mouseup",(function(){this.selectingListItem=!1}).bind(this)),this.element.appendChild(x)},this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),t},_geolocateUser:function(){this._hideGeolocateButton(),this._showLoadingIcon(),this.geolocation.getCurrentPosition().then((function(e){this._hideLoadingIcon();const t={geometry:{type:"Point",coordinates:[e.coords.longitude,e.coords.latitude]}};this._handleMarker(t),this._fly(t),this._typeahead.clear(),this._typeahead.selected=!0,this.lastSelected=JSON.stringify(t),this._showClearButton(),this.fresh=!1;const n={limit:1,language:[this.options.language],query:t.geometry.coordinates,types:["address"]};if(this.options.localGeocoderOnly){const a=t.geometry.coordinates[0]+","+t.geometry.coordinates[1];this._setInputValue(a),this._eventEmitter.emit("result",{result:t})}else this.geocoderService.reverseGeocode(n).send().then((function(a){const p=a.body.features[0];if(p){const f=J2.transformFeatureToGeolocationText(p,this.options.addressAccuracy);this._setInputValue(f),p.user_coordinates=t.geometry.coordinates,this._eventEmitter.emit("result",{result:p})}else this._eventEmitter.emit("result",{result:{user_coordinates:t.geometry.coordinates}})}).bind(this))}).bind(this)).catch((function(e){e.code===1?this._renderUserDeniedGeolocationError():this._renderLocationError(),this._hideLoadingIcon(),this._showGeolocateButton(),this._hideAttribution()}).bind(this))},createIcon:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+e),n.setAttribute("viewBox","0 0 18 18"),n.setAttribute("xml:space","preserve"),n.setAttribute("width",18),n.setAttribute("height",18),n.innerHTML=t,n},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_setInputValue:function(e){this._inputEl.value=e,setTimeout((function(){this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0)}).bind(this),1)},_onPaste:function(e){var t=(e.clipboardData||window.clipboardData).getData("text");t.length>=this.options.minLength&&this._geocode(t)},_onKeyDown:function(e){var t=27,n=9;if(e.keyCode===t&&this.options.clearAndBlurOnEsc)return this._clear(e),this._inputEl.blur();var a=e.target&&e.target.shadowRoot?e.target.shadowRoot.activeElement:e.target,p=a?a.value:"";if(!p)return this.fresh=!0,e.keyCode!==n&&this.clear(e),this._showGeolocateButton(),this._hideClearButton();this._hideGeolocateButton(),!(e.metaKey||[n,t,37,39,13,38,40].indexOf(e.keyCode)!==-1)&&a.value.length>=this.options.minLength&&this._geocode(a.value)},_showButton:function(){this._typeahead.selected&&this._showClearButton()},_hideButton:function(){this._typeahead.selected&&this._hideClearButton()},_showClearButton:function(){this._clearEl.style.display="block"},_hideClearButton:function(){this._clearEl.style.display="none"},_showGeolocateButton:function(){this._geolocateEl&&this.geolocation.isSupport()&&(this._geolocateEl.style.display="block")},_hideGeolocateButton:function(){this._geolocateEl&&(this._geolocateEl.style.display="none")},_showLoadingIcon:function(){this._loadingEl.style.display="block"},_hideLoadingIcon:function(){this._loadingEl.style.display="none"},_showAttribution:function(){this._footerNode.style.display="block"},_hideAttribution:function(){this._footerNode.style.display="none"},_onBlur:function(e){this.options.clearOnBlur&&this._clearOnBlur(e),this.options.collapsed&&this._collapse()},_onChange:function(){var e=this._typeahead.selected;e&&JSON.stringify(e)!==this.lastSelected&&(this._hideClearButton(),this.options.flyTo&&this._fly(e),this.options.marker&&this._mapboxgl&&this._handleMarker(e),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(e),this._eventEmitter.emit("result",{result:e}),this.eventManager.select(e,this))},_fly:function(e){var t;if(e.properties&&Y2[e.properties.short_code])t=Bu({},this.options.flyTo),this._map&&this._map.fitBounds(Y2[e.properties.short_code].bbox,t);else if(e.bbox){var n=e.bbox;t=Bu({},this.options.flyTo),this._map&&this._map.fitBounds([[n[0],n[1]],[n[2],n[3]]],t)}else{var a={zoom:this.options.zoom};t=Bu({},a,this.options.flyTo),e.center?t.center=e.center:e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(t.center=e.geometry.coordinates),this._map&&this._map.flyTo(t)}},_requestType:function(e,t){var n;return e.localGeocoderOnly?n=Il.LOCAL:e.reverseGeocode&&J2.REVERSE_GEOCODE_COORD_RGX.test(t)?n=Il.REVERSE:n=Il.FORWARD,n},_setupConfig:function(e,t){const n=["bbox","limit","proximity","countries","types","language","reverseMode","mode","autocomplete","fuzzyMatch","routing","worldview"],a=/[\s,]+/;var p=this,f=n.reduce(function(v,x){if(p.options[x]===void 0||p.options[x]===null)return v;["countries","types","language"].indexOf(x)>-1?v[x]=p.options[x].split(a):v[x]=p.options[x];const S=typeof p.options[x].longitude=="number"&&typeof p.options[x].latitude=="number";if(x==="proximity"&&S){const k=p.options[x].longitude,P=p.options[x].latitude;v[x]=[k,P]}return v},{});switch(e){case Il.REVERSE:{var o=t.split(a).map(function(v){return parseFloat(v,10)});p.options.flipCoordinates||o.reverse(),f.types&&f.types[0],f=Bu(f,{query:o,limit:1}),["proximity","autocomplete","fuzzyMatch","bbox"].forEach(function(v){v in f&&delete f[v]})}break;case Il.FORWARD:{const v=t.trim();/^(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?$/.test(v)&&(t=t.replace(/,/g," ")),f=Bu(f,{query:t})}break}return f},_geocode:function(e){this.inputString=e,this._showLoadingIcon(),this._eventEmitter.emit("loading",{query:e});const t=this._requestType(this.options,e),n=this._setupConfig(t,e);var a;switch(t){case Il.LOCAL:a=Promise.resolve();break;case Il.FORWARD:a=this.geocoderService.forwardGeocode(n).send();break;case Il.REVERSE:a=this.geocoderService.reverseGeocode(n).send();break}var p=this.options.localGeocoder?this.options.localGeocoder(e)||[]:[],f=[],o=null;return a.catch((function(v){o=v}).bind(this)).then((function(v){this._hideLoadingIcon();var x={};return v?v.statusCode=="200"&&(x=v.body,x.request=v.request,x.headers=v.headers):x={type:"FeatureCollection",features:[]},x.config=n,this.fresh&&(this.eventManager.start(this),this.fresh=!1),x.features=x.features?p.concat(x.features):p,this.options.externalGeocoder?(f=this.options.externalGeocoder(e,x.features)||Promise.resolve([]),f.then(function(S){return x.features=x.features?S.concat(x.features):S,x},function(){return x})):x}).bind(this)).then((function(v){if(o)throw o;this.options.filter&&v.features.length&&(v.features=v.features.filter(this.options.filter)),v.features.length?(this._showClearButton(),this._hideGeolocateButton(),this._showAttribution(),this._eventEmitter.emit("results",v),this._typeahead.update(v.features)):(this._hideClearButton(),this._hideAttribution(),this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",v))}).bind(this)).catch((function(v){this._hideLoadingIcon(),this._hideAttribution(),p.length&&this.options.localGeocoder||f.length&&this.options.externalGeocoder?(this._showClearButton(),this._hideGeolocateButton(),this._typeahead.update(p)):(this._hideClearButton(),this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:p}),this._eventEmitter.emit("error",{error:v})}).bind(this)),a},_clear:function(e){e&&e.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._hideClearButton(),this._showGeolocateButton(),this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(e){this._clear(e),this._inputEl.focus()},_clearOnBlur:function(e){var t=this;e.relatedTarget&&t._clear(e)},_onQueryResult:function(e){var t=e.body;if(t.features.length){var n=t.features[0];this._typeahead.selected=n,this._inputEl.value=n.place_name,this._onChange()}},_updateProximity:function(){if(!(!this._map||!this.options.trackProximity))if(this._map.getZoom()>9){var e=this._map.getCenter().wrap();this.setProximity({longitude:e.lng,latitude:e.lat},!1)}else this.setProximity(null,!1)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(e){return this._geocode(e).then(this._onQueryResult),this},_renderError:function(){var e="
There was an error reaching the server
";this._renderMessage(e)},_renderLocationError:function(){var e="
A location error has occurred
";this._renderMessage(e)},_renderNoResults:function(){var e="
No results found
";this._renderMessage(e)},_renderUserDeniedGeolocationError:function(){var e="
Geolocation permission denied
";this._renderMessage(e)},_renderMessage:function(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var e=this.options.language.split(",")[0],t=IL.language(e),n=kL.placeholder[t];if(n)return n}return"Search"},setInput:function(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this._geocode(e),this},setProximity:function(e,t=!0){return this.options.proximity=e,t&&(this.options.trackProximity=!1),this},getProximity:function(){return this.options.proximity},setRenderFunction:function(e){return e&&typeof e=="function"&&(this._typeahead.render=e),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(e){var t=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=e||this.options.language||t,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(e){return this.options.zoom=e,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(e){return this.options.flyTo=e,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(e){return this.placeholder=e||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(e){return this.options.bbox=e,this},getCountries:function(){return this.options.countries},setCountries:function(e){return this.options.countries=e,this},getTypes:function(){return this.options.types},setTypes:function(e){return this.options.types=e,this},getMinLength:function(){return this.options.minLength},setMinLength:function(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this},getLimit:function(){return this.options.limit},setLimit:function(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this},getFilter:function(){return this.options.filter},setFilter:function(e){return this.options.filter=e,this},setOrigin:function(e){return this.options.origin=e,this.geocoderService=Y0(Q0({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},setAccessToken:function(e){return this.options.accessToken=e,this.geocoderService=Y0(Q0({accessToken:this.options.accessToken,origin:this.options.origin})),this},setAutocomplete:function(e){return this.options.autocomplete=e,this},getAutocomplete:function(){return this.options.autocomplete},setFuzzyMatch:function(e){return this.options.fuzzyMatch=e,this},getFuzzyMatch:function(){return this.options.fuzzyMatch},setRouting:function(e){return this.options.routing=e,this},getRouting:function(){return this.options.routing},setWorldview:function(e){return this.options.worldview=e,this},getWorldview:function(){return this.options.worldview},_handleMarker:function(e){if(this._map){this._removeMarker();var t={color:"#4668F2"},n=Bu({},t,this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(n),e.center?this.mapMarker.setLngLat(e.center).addTo(this._map):e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(e,t){return this._eventEmitter.on(e,t),this},off:function(e,t){return this._eventEmitter.removeListener(e,t),this.eventManager.remove(),this}};var ML=Tk;const zL=yy(ML);function yg(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function LL(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Pk(e){let t,n,a;e.length!==2?(t=yg,n=(v,x)=>yg(e(v),x),a=(v,x)=>e(v)-x):(t=e===yg||e===LL?e:RL,n=e,a=e);function p(v,x,S=0,k=v.length){if(S>>1;n(v[P],x)<0?S=P+1:k=P}while(S>>1;n(v[P],x)<=0?S=P+1:k=P}while(SS&&a(v[P-1],x)>-a(v[P],x)?P-1:P}return{left:p,center:o,right:f}}function RL(){return 0}function DL(e){return e===null?NaN:+e}const BL=Pk(yg),OL=BL.right;Pk(DL).center;const NL=OL;class eA extends Map{constructor(t,n=UL){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[a,p]of t)this.set(a,p)}get(t){return super.get(tA(this,t))}has(t){return super.has(tA(this,t))}set(t,n){return super.set(FL(this,t),n)}delete(t){return super.delete(jL(this,t))}}function tA({_intern:e,_key:t},n){const a=t(n);return e.has(a)?e.get(a):n}function FL({_intern:e,_key:t},n){const a=t(n);return e.has(a)?e.get(a):(e.set(a,n),n)}function jL({_intern:e,_key:t},n){const a=t(n);return e.has(a)&&(n=e.get(a),e.delete(a)),n}function UL(e){return e!==null&&typeof e=="object"?e.valueOf():e}const VL=Math.sqrt(50),$L=Math.sqrt(10),qL=Math.sqrt(2);function Yg(e,t,n){const a=(t-e)/Math.max(0,n),p=Math.floor(Math.log10(a)),f=a/Math.pow(10,p),o=f>=VL?10:f>=$L?5:f>=qL?2:1;let v,x,S;return p<0?(S=Math.pow(10,-p)/o,v=Math.round(e*S),x=Math.round(t*S),v/St&&--x,S=-S):(S=Math.pow(10,p)*o,v=Math.round(e/S),x=Math.round(t/S),v*St&&--x),x0))return[];if(e===t)return[e];const a=t=p))return[];const v=f-p+1,x=new Array(v);if(a)if(o<0)for(let S=0;S{}};function Mk(){for(var e=0,t=arguments.length,n={},a;e=0&&(a=n.slice(p+1),n=n.slice(0,p)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}vg.prototype=Mk.prototype={constructor:vg,on:function(e,t){var n=this._,a=ZL(e+"",n),p,f=-1,o=a.length;if(arguments.length<2){for(;++f0)for(var n=new Array(p),a=0,p,f;a=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nA.hasOwnProperty(t)?{space:nA[t],local:e}:e}function XL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===dx&&t.documentElement.namespaceURI===dx?t.createElement(e):t.createElementNS(n,e)}}function QL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zk(e){var t=By(e);return(t.local?QL:XL)(t)}function YL(){}function P1(e){return e==null?YL:function(){return this.querySelector(e)}}function JL(e){typeof e!="function"&&(e=P1(e));for(var t=this._groups,n=t.length,a=new Array(n),p=0;p=L&&(L=F+1);!(Y=oe[L])&&++L=0;)(o=a[p])&&(f&&o.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(o,f),f=o);return this}function SR(e){e||(e=ER);function t(P,I){return P&&I?e(P.__data__,I.__data__):!P-!I}for(var n=this._groups,a=n.length,p=new Array(a),f=0;ft?1:e>=t?0:NaN}function CR(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kR(){return Array.from(this)}function IR(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?FR:typeof t=="function"?UR:jR)(e,t,n??"")):Up(this.node(),e)}function Up(e,t){return e.style.getPropertyValue(t)||Ok(e).getComputedStyle(e,null).getPropertyValue(t)}function $R(e){return function(){delete this[e]}}function qR(e,t){return function(){this[e]=t}}function WR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function GR(e,t){return arguments.length>1?this.each((t==null?$R:typeof t=="function"?WR:qR)(e,t)):this.node()[e]}function Nk(e){return e.trim().split(/^|\s+/)}function M1(e){return e.classList||new Fk(e)}function Fk(e){this._node=e,this._names=Nk(e.getAttribute("class")||"")}Fk.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jk(e,t){for(var n=M1(e),a=-1,p=t.length;++a=0&&(n=t.slice(a+1),t=t.slice(0,a)),{type:t,name:n}})}function x4(e){return function(){var t=this.__on;if(t){for(var n=0,a=-1,p=t.length,f;n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Hm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Hm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=T4.exec(e))?new ko(t[1],t[2],t[3],1):(t=P4.exec(e))?new ko(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=M4.exec(e))?Hm(t[1],t[2],t[3],t[4]):(t=z4.exec(e))?Hm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=L4.exec(e))?cA(t[1],t[2]/100,t[3]/100,1):(t=R4.exec(e))?cA(t[1],t[2]/100,t[3]/100,t[4]):iA.hasOwnProperty(e)?sA(iA[e]):e==="transparent"?new ko(NaN,NaN,NaN,0):null}function sA(e){return new ko(e>>16&255,e>>8&255,e&255,1)}function Hm(e,t,n,a){return a<=0&&(e=t=n=NaN),new ko(e,t,n,a)}function O4(e){return e instanceof hf||(e=Yu(e)),e?(e=e.rgb(),new ko(e.r,e.g,e.b,e.opacity)):new ko}function hx(e,t,n,a){return arguments.length===1?O4(e):new ko(e,t,n,a??1)}function ko(e,t,n,a){this.r=+e,this.g=+t,this.b=+n,this.opacity=+a}z1(ko,hx,qk(hf,{brighter(e){return e=e==null?ey:Math.pow(ey,e),new ko(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Jh:Math.pow(Jh,e),new ko(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ko(Gu(this.r),Gu(this.g),Gu(this.b),ty(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:lA,formatHex:lA,formatHex8:N4,formatRgb:uA,toString:uA}));function lA(){return`#${Vu(this.r)}${Vu(this.g)}${Vu(this.b)}`}function N4(){return`#${Vu(this.r)}${Vu(this.g)}${Vu(this.b)}${Vu((isNaN(this.opacity)?1:this.opacity)*255)}`}function uA(){const e=ty(this.opacity);return`${e===1?"rgb(":"rgba("}${Gu(this.r)}, ${Gu(this.g)}, ${Gu(this.b)}${e===1?")":`, ${e})`}`}function ty(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vu(e){return e=Gu(e),(e<16?"0":"")+e.toString(16)}function cA(e,t,n,a){return a<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ma(e,t,n,a)}function Wk(e){if(e instanceof Ma)return new Ma(e.h,e.s,e.l,e.opacity);if(e instanceof hf||(e=Yu(e)),!e)return new Ma;if(e instanceof Ma)return e;e=e.rgb();var t=e.r/255,n=e.g/255,a=e.b/255,p=Math.min(t,n,a),f=Math.max(t,n,a),o=NaN,v=f-p,x=(f+p)/2;return v?(t===f?o=(n-a)/v+(n0&&x<1?0:o,new Ma(o,v,x,e.opacity)}function F4(e,t,n,a){return arguments.length===1?Wk(e):new Ma(e,t,n,a??1)}function Ma(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}z1(Ma,F4,qk(hf,{brighter(e){return e=e==null?ey:Math.pow(ey,e),new Ma(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Jh:Math.pow(Jh,e),new Ma(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*t,p=2*n-a;return new ko(J0(e>=240?e-240:e+120,p,a),J0(e,p,a),J0(e<120?e+240:e-120,p,a),this.opacity)},clamp(){return new Ma(pA(this.h),Zm(this.s),Zm(this.l),ty(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(){const e=ty(this.opacity);return`${e===1?"hsl(":"hsla("}${pA(this.h)}, ${Zm(this.s)*100}%, ${Zm(this.l)*100}%${e===1?")":`, ${e})`}`}}));function pA(e){return e=(e||0)%360,e<0?e+360:e}function Zm(e){return Math.max(0,Math.min(1,e||0))}function J0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const L1=e=>()=>e;function j4(e,t){return function(n){return e+n*t}}function U4(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(a){return Math.pow(e+a*t,n)}}function V4(e){return(e=+e)==1?Gk:function(t,n){return n-t?U4(t,n,e):L1(isNaN(t)?n:t)}}function Gk(e,t){var n=t-e;return n?j4(e,n):L1(isNaN(e)?t:e)}const ry=function e(t){var n=V4(t);function a(p,f){var o=n((p=hx(p)).r,(f=hx(f)).r),v=n(p.g,f.g),x=n(p.b,f.b),S=Gk(p.opacity,f.opacity);return function(k){return p.r=o(k),p.g=v(k),p.b=x(k),p.opacity=S(k),p+""}}return a.gamma=e,a}(1);function $4(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,a=t.slice(),p;return function(f){for(p=0;pn&&(f=t.slice(n,f),v[o]?v[o]+=f:v[++o]=f),(a=a[0])===(p=p[0])?v[o]?v[o]+=p:v[++o]=p:(v[++o]=null,x.push({i:o,x:Pa(a,p)})),n=e_.lastIndex;return n180?k+=360:k-S>180&&(S+=360),I.push({i:P.push(p(P)+"rotate(",null,a)-2,x:Pa(S,k)})):k&&P.push(p(P)+"rotate("+k+a)}function v(S,k,P,I){S!==k?I.push({i:P.push(p(P)+"skewX(",null,a)-2,x:Pa(S,k)}):k&&P.push(p(P)+"skewX("+k+a)}function x(S,k,P,I,q,V){if(S!==P||k!==I){var H=q.push(p(q)+"scale(",null,",",null,")");V.push({i:H-4,x:Pa(S,P)},{i:H-2,x:Pa(k,I)})}else(P!==1||I!==1)&&q.push(p(q)+"scale("+P+","+I+")")}return function(S,k){var P=[],I=[];return S=e(S),k=e(k),f(S.translateX,S.translateY,k.translateX,k.translateY,P,I),o(S.rotate,k.rotate,P,I),v(S.skewX,k.skewX,P,I),x(S.scaleX,S.scaleY,k.scaleX,k.scaleY,P,I),S=k=null,function(q){for(var V=-1,H=I.length,oe;++V=0&&e._call.call(void 0,t),e=e._next;--Vp}function hA(){Ju=(iy=tf.now())+Oy,Vp=yh=0;try{rD()}finally{Vp=0,iD(),Ju=0}}function nD(){var e=tf.now(),t=e-iy;t>Xk&&(Oy-=t,iy=e)}function iD(){for(var e,t=ny,n,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ny=n);vh=e,gx(a)}function gx(e){if(!Vp){yh&&(yh=clearTimeout(yh));var t=e-Ju;t>24?(e<1/0&&(yh=setTimeout(hA,e-tf.now()-Oy)),oh&&(oh=clearInterval(oh))):(oh||(iy=tf.now(),oh=setInterval(nD,Xk)),Vp=1,Qk(hA))}}function fA(e,t,n){var a=new oy;return t=t==null?0:+t,a.restart(p=>{a.stop(),e(p+t)},t,n),a}var oD=Mk("start","end","cancel","interrupt"),aD=[],Jk=0,mA=1,yx=2,_g=3,gA=4,vx=5,xg=6;function Ny(e,t,n,a,p,f){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;sD(e,n,{name:t,index:a,group:p,on:oD,tween:aD,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:Jk})}function B1(e,t){var n=Oa(e,t);if(n.state>Jk)throw new Error("too late; already scheduled");return n}function bs(e,t){var n=Oa(e,t);if(n.state>_g)throw new Error("too late; already running");return n}function Oa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function sD(e,t,n){var a=e.__transition,p;a[t]=n,n.timer=Yk(f,0,n.time);function f(S){n.state=mA,n.timer.restart(o,n.delay,n.time),n.delay<=S&&o(S-n.delay)}function o(S){var k,P,I,q;if(n.state!==mA)return x();for(k in a)if(q=a[k],q.name===n.name){if(q.state===_g)return fA(o);q.state===gA?(q.state=xg,q.timer.stop(),q.on.call("interrupt",e,e.__data__,q.index,q.group),delete a[k]):+kyx&&a.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function ND(e,t,n){var a,p,f=OD(t)?B1:bs;return function(){var o=f(this,e),v=o.on;v!==a&&(p=(a=v).copy()).on(t,n),o.on=p}}function FD(e,t){var n=this._id;return arguments.length<2?Oa(this.node(),n).on.on(e):this.each(ND(n,e,t))}function jD(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function UD(){return this.on("end.remove",jD(this._id))}function VD(e){var t=this._name,n=this._id;typeof e!="function"&&(e=P1(e));for(var a=this._groups,p=a.length,f=new Array(p),o=0;o=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ay(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]}function $p(e){return e=ay(Math.abs(e)),e?e[1]:NaN}function fB(e,t){return function(n,a){for(var p=n.length,f=[],o=0,v=e[0],x=0;p>0&&v>0&&(x+v+1>a&&(v=Math.max(1,a-x)),f.push(n.substring(p-=v,p+v)),!((x+=v+1)>a));)v=e[o=(o+1)%e.length];return f.reverse().join(t)}}function mB(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var gB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sy(e){if(!(t=gB.exec(e)))throw new Error("invalid format: "+e);var t;return new N1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}sy.prototype=N1.prototype;function N1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}N1.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 yB(e){e:for(var t=e.length,n=1,a=-1,p;n0&&(a=0);break}return a>0?e.slice(0,a)+e.slice(p+1):e}var nI;function vB(e,t){var n=ay(e,t);if(!n)return e+"";var a=n[0],p=n[1],f=p-(nI=Math.max(-8,Math.min(8,Math.floor(p/3)))*3)+1,o=a.length;return f===o?a:f>o?a+new Array(f-o+1).join("0"):f>0?a.slice(0,f)+"."+a.slice(f):"0."+new Array(1-f).join("0")+ay(e,Math.max(0,t+f-1))[0]}function yA(e,t){var n=ay(e,t);if(!n)return e+"";var a=n[0],p=n[1];return p<0?"0."+new Array(-p).join("0")+a:a.length>p+1?a.slice(0,p+1)+"."+a.slice(p+1):a+new Array(p-a.length+2).join("0")}const vA={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:hB,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>yA(e*100,t),r:yA,s:vB,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _A(e){return e}var xA=Array.prototype.map,bA=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _B(e){var t=e.grouping===void 0||e.thousands===void 0?_A:fB(xA.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",a=e.currency===void 0?"":e.currency[1]+"",p=e.decimal===void 0?".":e.decimal+"",f=e.numerals===void 0?_A:mB(xA.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",v=e.minus===void 0?"−":e.minus+"",x=e.nan===void 0?"NaN":e.nan+"";function S(P){P=sy(P);var I=P.fill,q=P.align,V=P.sign,H=P.symbol,oe=P.zero,$=P.width,F=P.comma,L=P.precision,O=P.trim,Y=P.type;Y==="n"?(F=!0,Y="g"):vA[Y]||(L===void 0&&(L=12),O=!0,Y="g"),(oe||I==="0"&&q==="=")&&(oe=!0,I="0",q="=");var ne=H==="$"?n:H==="#"&&/[boxX]/.test(Y)?"0"+Y.toLowerCase():"",ue=H==="$"?a:/[%p]/.test(Y)?o:"",fe=vA[Y],Ce=/[defgprs%]/.test(Y);L=L===void 0?6:/[gprs]/.test(Y)?Math.max(1,Math.min(21,L)):Math.max(0,Math.min(20,L));function he(we){var ie=ne,me=ue,Ne,$e,Se;if(Y==="c")me=fe(we)+me,we="";else{we=+we;var Te=we<0||1/we<0;if(we=isNaN(we)?x:fe(Math.abs(we),L),O&&(we=yB(we)),Te&&+we==0&&V!=="+"&&(Te=!1),ie=(Te?V==="("?V:v:V==="-"||V==="("?"":V)+ie,me=(Y==="s"?bA[8+nI/3]:"")+me+(Te&&V==="("?")":""),Ce){for(Ne=-1,$e=we.length;++Ne<$e;)if(Se=we.charCodeAt(Ne),48>Se||Se>57){me=(Se===46?p+we.slice(Ne+1):we.slice(Ne))+me,we=we.slice(0,Ne);break}}}F&&!oe&&(we=t(we,1/0));var ze=ie.length+we.length+me.length,He=ze<$?new Array($-ze+1).join(I):"";switch(F&&oe&&(we=t(He+we,He.length?$-me.length:1/0),He=""),q){case"<":we=ie+we+me+He;break;case"=":we=ie+He+we+me;break;case"^":we=He.slice(0,ze=He.length>>1)+ie+we+me+He.slice(ze);break;default:we=He+ie+we+me;break}return f(we)}return he.toString=function(){return P+""},he}function k(P,I){var q=S((P=sy(P),P.type="f",P)),V=Math.max(-8,Math.min(8,Math.floor($p(I)/3)))*3,H=Math.pow(10,-V),oe=bA[8+V/3];return function($){return q(H*$)+oe}}return{format:S,formatPrefix:k}}var Xm,iI,oI;xB({thousands:",",grouping:[3],currency:["$",""]});function xB(e){return Xm=_B(e),iI=Xm.format,oI=Xm.formatPrefix,Xm}function bB(e){return Math.max(0,-$p(Math.abs(e)))}function wB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($p(t)/3)))*3-$p(Math.abs(e)))}function AB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$p(t)-$p(e))+1}function aI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const wA=Symbol("implicit");function F1(){var e=new eA,t=[],n=[],a=wA;function p(f){let o=e.get(f);if(o===void 0){if(a!==wA)return a;e.set(f,o=t.push(f)-1)}return n[o%n.length]}return p.domain=function(f){if(!arguments.length)return t.slice();t=[],e=new eA;for(const o of f)e.has(o)||e.set(o,t.push(o)-1);return p},p.range=function(f){return arguments.length?(n=Array.from(f),p):n.slice()},p.unknown=function(f){return arguments.length?(a=f,p):a},p.copy=function(){return F1(t,n).unknown(a)},aI.apply(p,arguments),p}function SB(e){return function(){return e}}function EB(e){return+e}var AA=[0,1];function bp(e){return e}function _x(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:SB(isNaN(t)?NaN:.5)}function CB(e,t){var n;return e>t&&(n=e,e=t,t=n),function(a){return Math.max(e,Math.min(t,a))}}function kB(e,t,n){var a=e[0],p=e[1],f=t[0],o=t[1];return p2?IB:kB,x=S=null,P}function P(I){return I==null||isNaN(I=+I)?f:(x||(x=v(e.map(a),t,n)))(a(o(I)))}return P.invert=function(I){return o(p((S||(S=v(t,e.map(a),Pa)))(I)))},P.domain=function(I){return arguments.length?(e=Array.from(I,EB),k()):e.slice()},P.range=function(I){return arguments.length?(t=Array.from(I),k()):t.slice()},P.rangeRound=function(I){return t=Array.from(I),n=X4,k()},P.clamp=function(I){return arguments.length?(o=I?!0:bp,k()):o!==bp},P.interpolate=function(I){return arguments.length?(n=I,k()):n},P.unknown=function(I){return arguments.length?(f=I,P):f},function(I,q){return a=I,p=q,k()}}function MB(){return PB()(bp,bp)}function zB(e,t,n,a){var p=GL(e,t,n),f;switch(a=sy(a??",f"),a.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return a.precision==null&&!isNaN(f=wB(p,o))&&(a.precision=f),oI(a,o)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(f=AB(p,Math.max(Math.abs(e),Math.abs(t))))&&(a.precision=f-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(f=bB(p))&&(a.precision=f-(a.type==="%")*2);break}}return iI(a)}function LB(e){var t=e.domain;return e.ticks=function(n){var a=t();return WL(a[0],a[a.length-1],n??10)},e.tickFormat=function(n,a){var p=t();return zB(p[0],p[p.length-1],n??10,a)},e.nice=function(n){n==null&&(n=10);var a=t(),p=0,f=a.length-1,o=a[p],v=a[f],x,S,k=10;for(v0;){if(S=px(o,v,n),S===x)return a[p]=o,a[f]=v,t(a);if(S>0)o=Math.floor(o/S)*S,v=Math.ceil(v/S)*S;else if(S<0)o=Math.ceil(o*S)/S,v=Math.floor(v*S)/S;else break;x=S}return e},e}function j1(){var e=MB();return e.copy=function(){return TB(e,j1())},aI.apply(e,arguments),LB(e)}function _h(e,t,n){this.k=e,this.x=t,this.y=n}_h.prototype={constructor:_h,scale:function(e){return e===1?this:new _h(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new _h(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};_h.prototype;const Uo=(e,t)=>{(t===null||isNaN(t)||t<9)&&(t=9);const n=10,a=t/n,p=["interpolate",["linear"],["to-number",["get",e]],0,"rgba(65, 182, 196, 0.85)"],f=[];for(let o=1;o<=n;o++){if(o===1){const v=o*a;f.push({stop:v,color:"rgba(127, 205, 187, .99)"})}if(o===2){const v=o*a;f.push({stop:v,color:"rgba(199, 233, 180, .99)"})}if(o===3){const v=o*a;f.push({stop:v,color:"rgba(220, 230, 177, 0.99)"})}if(o===4){const v=o*a;f.push({stop:v,color:"rgba(247, 237, 195,0.99)"})}if(o===5){const v=o*a;f.push({stop:v,color:"rgba(250, 240, 160, 0.99)"})}if(o===6){const v=o*a;f.push({stop:v,color:"rgba(255, 200, 118, 0.99)"})}if(o===7){const v=o*a;f.push({stop:v,color:"rgba(254, 178, 76, .99)"})}if(o===8){const v=o*a;f.push({stop:v,color:"rgba(253, 141, 60, .99)"})}if(o===9){const v=o*a;f.push({stop:v,color:"rgba(252, 78, 42, .99)"})}if(o===10){const v=o*a;f.push({stop:v,color:"rgba(227, 26, 28, .99)"})}}for(const o of f){const v=o.stop,x=o.color;p.push(v,x)}return p},RB=e=>e>11e3?Math.round(e/1e3)*1e3:e>1e3?Math.round(e/100)*100:e>100?Math.round(e/10)*10:e>10?Math.round(e/5)*5:e.toFixed(0),Qm=(e,t)=>{t.current=new Set;const n=e.current;n&&["mobility-Street-Detailed-highlighted","mobility-Block-Detailed-highlighted","mobility-Street-Detailed-other","energy-Building-highlighted","energy-Feeder-highlighted"].forEach(p=>{n.setFilter(p,["in","object_id",""]),n.setFilter(p,["in","ID_ESL",""])})},t_=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-mobility-summary");a.html("");const p=[];n.queryRenderedFeatures({layers:["mobility-Street-Detailed","mobility-Block-Detailed"]}).forEach(L=>{const O=L.properties.object_id;e.current.has(O)&&p.push({type:"Feature",geometry:L.geometry,properties:L.properties})});let o=[{timePeriod:"Morning",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Breakfast",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Lunch",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Afternoon",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Dinner",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Night",walk:0,bike:0,car:0,publicTransit:0}],v=[{timePeriod:"Morning",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Breakfast",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Lunch",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Afternoon",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Dinner",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Night",walk:0,bike:0,car:0,publicTransit:0}];const x=[{timePeriod:"Early Morning",walk:225.31,bike:44.53,car:1766.11,publicTransit:1508.7},{timePeriod:"Morning",walk:3207.24,bike:378.92,car:20038.77,publicTransit:6659.61},{timePeriod:"Lunch",walk:2306.27,bike:316.9,car:13787.66,publicTransit:7026.34},{timePeriod:"Afternoon",walk:1359.1,bike:186.25,car:9242.15,publicTransit:6118.57},{timePeriod:"Evening",walk:1685.12,bike:331.32,car:12511.29,publicTransit:10306.86},{timePeriod:"Night",walk:263.57,bike:51.43,car:2276.55,publicTransit:2076.8}];e.current.size===0&&(o=[...x]),p.length>0&&p.forEach(L=>{Object.keys(L.properties).forEach(O=>{const[Y,ne,ue,fe,Ce,he]=O.split("_");ue==="0"&&ne==="1"&&Ce==="-1"&&he==="-1"?fe==="-1"?o[0].walk+=Number(L.properties[O]):fe==="1"?o[1].walk+=Number(L.properties[O]):fe==="2"?o[2].walk+=Number(L.properties[O]):fe==="3"?o[3].walk+=Number(L.properties[O]):fe==="4"?o[4].walk+=Number(L.properties[O]):fe==="5"&&(o[5].walk+=Number(L.properties[O])):ue==="1"&&ne==="1"&&Ce==="-1"&&he==="-1"?fe==="0"?o[0].bike+=Number(L.properties[O]):fe==="1"?o[1].bike+=Number(L.properties[O]):fe==="2"?o[2].bike+=Number(L.properties[O]):fe==="3"?o[3].bike+=Number(L.properties[O]):fe==="4"?o[4].bike+=Number(L.properties[O]):fe==="5"&&(o[5].bike+=Number(L.properties[O])):ue==="2"&&ne==="1"&&Ce==="-1"&&he==="-1"?fe==="0"?o[0].car+=Number(L.properties[O]):fe==="1"?o[1].car+=Number(L.properties[O]):fe==="2"?o[2].car+=Number(L.properties[O]):fe==="3"?o[3].car+=Number(L.properties[O]):fe==="4"?o[4].car+=Number(L.properties[O]):fe==="5"&&(o[5].car+=Number(L.properties[O])):ue==="3"&&ne==="1"&&Ce==="-1"&&he==="-1"&&(fe==="0"?o[0].publicTransit+=Number(L.properties[O]):fe==="1"?o[1].publicTransit+=Number(L.properties[O]):fe==="2"?o[2].publicTransit+=Number(L.properties[O]):fe==="3"?o[3].publicTransit+=Number(L.properties[O]):fe==="4"?o[4].publicTransit+=Number(L.properties[O]):fe==="5"&&(o[5].publicTransit+=Number(L.properties[O])))})}),p.length>0&&p.forEach(L=>{Object.keys(L.properties).forEach(O=>{const[Y,ne,ue,fe,Ce,he]=O.split("_");ue==="0"&&ne==="0"&&Ce==="-1"&&he==="-1"?fe==="-1"?v[0].walk+=Number(L.properties[O]):fe==="1"?v[1].walk+=Number(L.properties[O]):fe==="2"?v[2].walk+=Number(L.properties[O]):fe==="3"?v[3].walk+=Number(L.properties[O]):fe==="4"?v[4].walk+=Number(L.properties[O]):fe==="5"&&(v[5].walk+=Number(L.properties[O])):ue==="1"&&ne==="0"&&Ce==="-1"&&he==="-1"?fe==="0"?v[0].bike+=Number(L.properties[O]):fe==="1"?v[1].bike+=Number(L.properties[O]):fe==="2"?v[2].bike+=Number(L.properties[O]):fe==="3"?v[3].bike+=Number(L.properties[O]):fe==="4"?v[4].bike+=Number(L.properties[O]):fe==="5"&&(v[5].bike+=Number(L.properties[O])):ue==="2"&&ne==="0"&&Ce==="-1"&&he==="-1"?fe==="0"?v[0].car+=Number(L.properties[O]):fe==="1"?v[1].car+=Number(L.properties[O]):fe==="2"?v[2].car+=Number(L.properties[O]):fe==="3"?v[3].car+=Number(L.properties[O]):fe==="4"?v[4].car+=Number(L.properties[O]):fe==="5"&&(v[5].car+=Number(L.properties[O])):ue==="3"&&ne==="0"&&Ce==="-1"&&he==="-1"&&(fe==="0"?v[0].publicTransit+=Number(L.properties[O]):fe==="1"?v[1].publicTransit+=Number(L.properties[O]):fe==="2"?v[2].publicTransit+=Number(L.properties[O]):fe==="3"?v[3].publicTransit+=Number(L.properties[O]):fe==="4"?v[4].publicTransit+=Number(L.properties[O]):fe==="5"&&(v[5].publicTransit+=Number(L.properties[O])))})});const S=parseInt(o.reduce((L,O)=>L+O.walk,0))+parseInt(v.reduce((L,O)=>L+O.walk,0)),k=parseInt(o.reduce((L,O)=>L+O.bike,0))+parseInt(v.reduce((L,O)=>L+O.bike,0)),P=parseInt(o.reduce((L,O)=>L+O.car,0))+parseInt(v.reduce((L,O)=>L+O.car,0)),I=parseInt(o.reduce((L,O)=>L+O.publicTransit,0))+parseInt(v.reduce((L,O)=>L+O.publicTransit,0)),q=["walk","bike","car","publicTransit"];d3.stack().keys(q)(o);const H=340,oe=70,$={top:130,right:40,bottom:40,left:80},F=a.append("svg").attr("width",H).attr("height",oe);F.append("rect").attr("x",H/10).attr("y",$.top-90).attr("width",55).attr("height",25).attr("fill","#f24726").attr("rx",5).attr("ry",5),F.append("text").attr("x",H/10+26).attr("y",$.top-73).attr("text-anchor","middle").attr("font-size","12px").attr("fill","white").text(`${S.toLocaleString()}`),F.append("rect").attr("x",H/10+80).attr("y",$.top-90).attr("width",55).attr("height",25).attr("fill","#fac710").attr("rx",5).attr("ry",5),F.append("text").attr("x",H/10+106).attr("y",$.top-73).attr("text-anchor","middle").attr("font-size","12px").attr("fill","white").text(`${k.toLocaleString()}`),F.append("rect").attr("x",H/10+160).attr("y",$.top-90).attr("width",55).attr("height",25).attr("fill","#2d9bf0").attr("rx",5).attr("ry",5),F.append("text").attr("x",H/10+186).attr("y",$.top-73).attr("text-anchor","middle").attr("font-size","12px").attr("fill","white").text(`${P.toLocaleString()}`),F.append("rect").attr("x",H/10+240).attr("y",$.top-90).attr("width",55).attr("height",25).attr("fill","#0263b9").attr("rx",5).attr("ry",5),F.append("text").attr("x",H/10+266).attr("y",$.top-73).attr("text-anchor","middle").attr("font-size","12px").attr("fill","white").text(`${I.toLocaleString()}`)},r_=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-mobility-senario");if(!a.node()){console.error("Container element not found.");return}a.html("");const p=[];n.queryRenderedFeatures({layers:["mobility-Street-Detailed","mobility-Block-Detailed"]}).forEach(Y=>{const ne=Y.properties.object_id;e.current.has(ne)&&p.push({type:"Feature",geometry:Y.geometry,properties:Y.properties})});let o=[{timePeriod:"Base Case",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Senario 1",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Senario 2",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Senario 3",walk:0,bike:0,car:0,publicTransit:0}];const v=[{timePeriod:"Base Case",walk:196.42,bike:44.66,car:1591.73,publicTransit:1473.78},{timePeriod:"Senario 1",walk:3069.64,bike:394.12,car:20284.15,publicTransit:6109.5},{timePeriod:"Senario 2",walk:3000.93,bike:416.66,car:13787.66,publicTransit:9402.27},{timePeriod:"Senario 3",walk:1331.69,bike:196.68,car:19540.22,publicTransit:6137.72}];e.current.size===0&&(o=[...v]),p.length>0&&p.forEach(Y=>{Object.keys(Y.properties).forEach(ne=>{const[ue,fe,Ce,he,we,ie]=ne.split("_");Ce==="0"&&fe==="0"&&we==="-1"&&ie==="-1"?he==="-1"?o[0].walk+=Number(Y.properties[ne]):he==="1"?o[1].walk+=Number(Y.properties[ne]):he==="2"?o[2].walk+=Number(Y.properties[ne]):he==="3"&&(o[3].walk+=Number(Y.properties[ne])):Ce==="1"&&fe==="0"&&we==="-1"&&ie==="-1"?he==="0"?o[0].bike+=Number(Y.properties[ne]):he==="1"?o[1].bike+=Number(Y.properties[ne]):he==="2"?o[2].bike+=Number(Y.properties[ne]):he==="3"&&(o[3].bike+=Number(Y.properties[ne])):Ce==="2"&&fe==="0"&&we==="-1"&&ie==="-1"?he==="0"?o[0].car+=Number(Y.properties[ne]):he==="1"?o[1].car+=Number(Y.properties[ne]):he==="2"?o[2].car+=Number(Y.properties[ne]):he==="3"&&(o[3].car+=Number(Y.properties[ne])):Ce==="3"&&fe==="0"&&we==="-1"&&ie==="-1"&&(he==="0"?o[0].publicTransit+=Number(Y.properties[ne]):he==="1"?o[1].publicTransit+=Number(Y.properties[ne]):he==="2"?o[2].publicTransit+=Number(Y.properties[ne]):he==="3"&&(o[3].publicTransit+=Number(Y.properties[ne])))})});const x=["walk","bike","car","publicTransit"],k=d3.stack().keys(x)(o),P={top:10,right:40,bottom:40,left:70},I=240,q=100,V=180,H=a.append("svg").attr("width",I+P.left+P.right).attr("height",q+P.top+P.bottom).append("g").attr("transform",`translate(${P.left},${P.top})`),oe=d3.scaleBand().domain(o.map(Y=>Y.timePeriod)).range([0,I]).padding(.1),$=d3.scaleLinear().domain([0,d3.max(k[k.length-1],Y=>Y[1])]).nice().range([q,0]),F=d3.scaleOrdinal().domain(x).range(["#f24726","#fac710","#2d9bf0","#0263b9"]);H.append("g").selectAll("g").data(k).join("g").attr("fill",Y=>F(Y.key)).selectAll("rect").data(Y=>Y).join("rect").attr("x",(Y,ne)=>oe(o[ne].timePeriod)).attr("y",Y=>$(Y[1])).attr("height",Y=>$(Y[0])-$(Y[1])).attr("width",oe.bandwidth()),H.append("g").attr("transform",`translate(0,${q})`).call(d3.axisBottom(oe)),H.append("g").call(d3.axisLeft($).ticks(null,"s"));const O=H.append("g").attr("class","legend").attr("transform",`translate(${P.left}, ${V-P.bottom+30})`).selectAll(".legend-item").data(x).enter().append("g").attr("class","legend-item").attr("transform",(Y,ne)=>`translate(${ne*60}, 0)`).attr("stroke","none");O.append("rect").attr("x",-80).attr("y",-20).attr("width",10).attr("height",10).style("fill",Y=>F(Y)),O.append("text").attr("x",-65).attr("y",-10).text(Y=>Y).attr("font-size","10px")},n_=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-weekday");a.html("");const p=[];n.queryRenderedFeatures({layers:["mobility-Street-Detailed","mobility-Block-Detailed"]}).forEach(ie=>{const me=ie.properties.object_id;e.current.has(me)&&p.push({type:"Feature",geometry:ie.geometry,properties:ie.properties})});let o=[{timePeriod:"Morning",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Breakfast",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Lunch",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Afternoon",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Dinner",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Night",walk:0,bike:0,car:0,publicTransit:0}],v=[{timePeriod:"Morning",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Breakfast",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Lunch",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Afternoon",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Dinner",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Night",walk:0,bike:0,car:0,publicTransit:0}];const x=[{timePeriod:"Early Morning",walk:225.31,bike:44.53,car:1766.11,publicTransit:1508.7},{timePeriod:"Morning",walk:3207.24,bike:378.92,car:20038.77,publicTransit:6659.61},{timePeriod:"Lunch",walk:2306.27,bike:316.9,car:13787.66,publicTransit:7026.34},{timePeriod:"Afternoon",walk:1359.1,bike:186.25,car:9242.15,publicTransit:6118.57},{timePeriod:"Evening",walk:1685.12,bike:331.32,car:12511.29,publicTransit:10306.86},{timePeriod:"Night",walk:263.57,bike:51.43,car:2276.55,publicTransit:2076.8}];e.current.size===0&&(o=[...x]),p.length>0&&p.forEach(ie=>{Object.keys(ie.properties).forEach(me=>{const[Ne,$e,Se,Te,ze,He]=me.split("_");Se==="0"&&$e==="1"&&ze==="-1"&&He==="-1"?Te==="-1"?o[0].walk+=Number(ie.properties[me]):Te==="1"?o[1].walk+=Number(ie.properties[me]):Te==="2"?o[2].walk+=Number(ie.properties[me]):Te==="3"?o[3].walk+=Number(ie.properties[me]):Te==="4"?o[4].walk+=Number(ie.properties[me]):Te==="5"&&(o[5].walk+=Number(ie.properties[me])):Se==="1"&&$e==="1"&&ze==="-1"&&He==="-1"?Te==="0"?o[0].bike+=Number(ie.properties[me]):Te==="1"?o[1].bike+=Number(ie.properties[me]):Te==="2"?o[2].bike+=Number(ie.properties[me]):Te==="3"?o[3].bike+=Number(ie.properties[me]):Te==="4"?o[4].bike+=Number(ie.properties[me]):Te==="5"&&(o[5].bike+=Number(ie.properties[me])):Se==="2"&&$e==="1"&&ze==="-1"&&He==="-1"?Te==="0"?o[0].car+=Number(ie.properties[me]):Te==="1"?o[1].car+=Number(ie.properties[me]):Te==="2"?o[2].car+=Number(ie.properties[me]):Te==="3"?o[3].car+=Number(ie.properties[me]):Te==="4"?o[4].car+=Number(ie.properties[me]):Te==="5"&&(o[5].car+=Number(ie.properties[me])):Se==="3"&&$e==="1"&&ze==="-1"&&He==="-1"&&(Te==="0"?o[0].publicTransit+=Number(ie.properties[me]):Te==="1"?o[1].publicTransit+=Number(ie.properties[me]):Te==="2"?o[2].publicTransit+=Number(ie.properties[me]):Te==="3"?o[3].publicTransit+=Number(ie.properties[me]):Te==="4"?o[4].publicTransit+=Number(ie.properties[me]):Te==="5"&&(o[5].publicTransit+=Number(ie.properties[me])))})}),p.length>0&&p.forEach(ie=>{Object.keys(ie.properties).forEach(me=>{const[Ne,$e,Se,Te,ze,He]=me.split("_");Se==="0"&&$e==="0"&&ze==="-1"&&He==="-1"?Te==="-1"?v[0].walk+=Number(ie.properties[me]):Te==="1"?v[1].walk+=Number(ie.properties[me]):Te==="2"?v[2].walk+=Number(ie.properties[me]):Te==="3"?v[3].walk+=Number(ie.properties[me]):Te==="4"?v[4].walk+=Number(ie.properties[me]):Te==="5"&&(v[5].walk+=Number(ie.properties[me])):Se==="1"&&$e==="0"&&ze==="-1"&&He==="-1"?Te==="0"?v[0].bike+=Number(ie.properties[me]):Te==="1"?v[1].bike+=Number(ie.properties[me]):Te==="2"?v[2].bike+=Number(ie.properties[me]):Te==="3"?v[3].bike+=Number(ie.properties[me]):Te==="4"?v[4].bike+=Number(ie.properties[me]):Te==="5"&&(v[5].bike+=Number(ie.properties[me])):Se==="2"&&$e==="0"&&ze==="-1"&&He==="-1"?Te==="0"?v[0].car+=Number(ie.properties[me]):Te==="1"?v[1].car+=Number(ie.properties[me]):Te==="2"?v[2].car+=Number(ie.properties[me]):Te==="3"?v[3].car+=Number(ie.properties[me]):Te==="4"?v[4].car+=Number(ie.properties[me]):Te==="5"&&(v[5].car+=Number(ie.properties[me])):Se==="3"&&$e==="0"&&ze==="-1"&&He==="-1"&&(Te==="0"?v[0].publicTransit+=Number(ie.properties[me]):Te==="1"?v[1].publicTransit+=Number(ie.properties[me]):Te==="2"?v[2].publicTransit+=Number(ie.properties[me]):Te==="3"?v[3].publicTransit+=Number(ie.properties[me]):Te==="4"?v[4].publicTransit+=Number(ie.properties[me]):Te==="5"&&(v[5].publicTransit+=Number(ie.properties[me])))})}),parseInt(o.reduce((ie,me)=>ie+me.walk,0))+parseInt(v.reduce((ie,me)=>ie+me.walk,0)),parseInt(o.reduce((ie,me)=>ie+me.bike,0))+parseInt(v.reduce((ie,me)=>ie+me.bike,0)),parseInt(o.reduce((ie,me)=>ie+me.car,0))+parseInt(v.reduce((ie,me)=>ie+me.car,0)),parseInt(o.reduce((ie,me)=>ie+me.publicTransit,0))+parseInt(v.reduce((ie,me)=>ie+me.publicTransit,0));const S=["walk","bike","car","publicTransit"],P=d3.stack().keys(S)(o),I=340,q=225,V={top:40,right:40,bottom:50,left:70},H=I-V.left-V.right,oe=q-V.top-V.bottom,$=a.append("svg").attr("width",I).attr("height",q);$.append("text").attr("class","graph-title").attr("x",I/2).attr("y",V.top-25).attr("font-size","14px").attr("text-anchor","middle").text("Weekday Trip Volume and Mode Split"),$.append("text").attr("class","graph-title").attr("x",30).attr("y",V.top,0).attr("font-size","9px").attr("text-anchor","middle").text("Time Periods"),$.append("text").attr("class","graph-title").attr("x",H+90).attr("y",oe+70).attr("font-size","9px").attr("text-anchor","middle").text("Number of Trips");const F=$.append("g").attr("transform",`translate(${V.left}, ${V.top})`),L=d3.scaleLinear().domain([0,d3.max(P,ie=>d3.max(ie,me=>me[1]))]).range([0,H]),O=d3.scaleBand().domain(o.map(ie=>ie.timePeriod)).range([0,oe]).padding(.3),Y=d3.scaleOrdinal().domain(S).range(["#f24726","#fac710","#2d9bf0","#0263b9"]);F.selectAll("g").data(P).enter().append("g").attr("fill",ie=>Y(ie.key)).selectAll("rect").data(ie=>ie).enter().append("rect").attr("y",ie=>O(ie.data.timePeriod)).attr("x",ie=>L(ie[0])).attr("height",O.bandwidth()).attr("width",ie=>L(ie[1])-L(ie[0]));const ue=d3.axisLeft(O);F.append("g").call(ue);const fe=5,Ce=d3.axisBottom(L).ticks(fe);F.append("g").attr("transform",`translate(0, ${oe})`).call(Ce),$.append("text").attr("x",I/2).attr("y",q).attr("text-anchor","middle"),$.append("text").attr("transform","rotate(-90)").attr("x",-(q/2)).attr("y",10).attr("text-anchor","middle");const we=$.append("g").attr("class","legend").attr("transform",`translate(${V.left}, ${q-V.bottom+30})`).selectAll(".legend-item").data(S).enter().append("g").attr("class","legend-item").attr("transform",(ie,me)=>`translate(${me*60}, 0)`).attr("stroke","none");we.append("rect").attr("x",0).attr("y",10).attr("width",10).attr("height",10).style("fill",ie=>Y(ie)),we.append("text").attr("x",15).attr("y",20).text(ie=>ie).attr("font-size","10px")},i_=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-weekend");a.html("");const p=[];n.queryRenderedFeatures({layers:["mobility-Street-Detailed","mobility-Block-Detailed"]}).forEach(we=>{const ie=we.properties.object_id;e.current.has(ie)&&p.push({type:"Feature",geometry:we.geometry,properties:we.properties})});let o=[{timePeriod:"Morning",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Breakfast",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Lunch",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Afternoon",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Dinner",walk:0,bike:0,car:0,publicTransit:0},{timePeriod:"Night",walk:0,bike:0,car:0,publicTransit:0}];const v=[{timePeriod:"Early Morning",walk:196.42,bike:44.66,car:1591.73,publicTransit:1473.78},{timePeriod:"Morning",walk:3069.64,bike:394.12,car:20284.15,publicTransit:6109.5},{timePeriod:"Lunch",walk:3000.93,bike:416.66,car:13787.66,publicTransit:9402.27},{timePeriod:"Afternoon",walk:1331.69,bike:196.68,car:19540.22,publicTransit:6137.72},{timePeriod:"Evening",walk:1916.97,bike:373.59,car:15200.76,publicTransit:11944.84},{timePeriod:"Night",walk:498.61,bike:109.18,car:4576.76,publicTransit:3883.33}];e.current.size===0&&(o=[...v]),p.length>0&&p.forEach(we=>{Object.keys(we.properties).forEach(ie=>{const[me,Ne,$e,Se,Te,ze]=ie.split("_");$e==="0"&&Ne==="0"&&Te==="-1"&&ze==="-1"?Se==="-1"?o[0].walk+=Number(we.properties[ie]):Se==="1"?o[1].walk+=Number(we.properties[ie]):Se==="2"?o[2].walk+=Number(we.properties[ie]):Se==="3"?o[3].walk+=Number(we.properties[ie]):Se==="4"?o[4].walk+=Number(we.properties[ie]):Se==="5"&&(o[5].walk+=Number(we.properties[ie])):$e==="1"&&Ne==="0"&&Te==="-1"&&ze==="-1"?Se==="0"?o[0].bike+=Number(we.properties[ie]):Se==="1"?o[1].bike+=Number(we.properties[ie]):Se==="2"?o[2].bike+=Number(we.properties[ie]):Se==="3"?o[3].bike+=Number(we.properties[ie]):Se==="4"?o[4].bike+=Number(we.properties[ie]):Se==="5"&&(o[5].bike+=Number(we.properties[ie])):$e==="2"&&Ne==="0"&&Te==="-1"&&ze==="-1"?Se==="0"?o[0].car+=Number(we.properties[ie]):Se==="1"?o[1].car+=Number(we.properties[ie]):Se==="2"?o[2].car+=Number(we.properties[ie]):Se==="3"?o[3].car+=Number(we.properties[ie]):Se==="4"?o[4].car+=Number(we.properties[ie]):Se==="5"&&(o[5].car+=Number(we.properties[ie])):$e==="3"&&Ne==="0"&&Te==="-1"&&ze==="-1"&&(Se==="0"?o[0].publicTransit+=Number(we.properties[ie]):Se==="1"?o[1].publicTransit+=Number(we.properties[ie]):Se==="2"?o[2].publicTransit+=Number(we.properties[ie]):Se==="3"?o[3].publicTransit+=Number(we.properties[ie]):Se==="4"?o[4].publicTransit+=Number(we.properties[ie]):Se==="5"&&(o[5].publicTransit+=Number(we.properties[ie])))})});const x=["walk","bike","car","publicTransit"],k=d3.stack().keys(x)(o),P=340,I=225,q={top:40,right:40,bottom:50,left:70},V=P-q.left-q.right,H=I-q.top-q.bottom,oe=a.append("svg").attr("width",P).attr("height",I);oe.append("text").attr("class","graph-title").attr("x",P/2).attr("y",q.top-22).attr("font-size","14px").attr("text-anchor","middle").text("Weekend Trip Volume and Mode Split"),oe.append("text").attr("class","graph-title").attr("x",30).attr("y",q.top,10).attr("font-size","9px").attr("text-anchor","middle").text("Time Periods"),oe.append("text").attr("class","graph-title").attr("x",V+90).attr("y",H+70).attr("font-size","9px").attr("text-anchor","middle").text("Number of Trips");const $=oe.append("g").attr("transform",`translate(${q.left}, ${q.top})`),F=d3.scaleLinear().domain([0,d3.max(k,we=>d3.max(we,ie=>ie[1]))]).range([0,V]),L=d3.scaleBand().domain(o.map(we=>we.timePeriod)).range([0,H]).padding(.3),O=d3.scaleOrdinal().domain(x).range(["#f24726","#fac710","#2d9bf0","#0263b9"]);$.selectAll("g").data(k).enter().append("g").attr("fill",we=>O(we.key)).selectAll("rect").data(we=>we).enter().append("rect").attr("y",we=>L(we.data.timePeriod)).attr("x",we=>F(we[0])).attr("height",L.bandwidth()).attr("width",we=>F(we[1])-F(we[0]));const ne=d3.axisLeft(L);$.append("g").call(ne);const ue=5,fe=d3.axisBottom(F).ticks(ue);$.append("g").attr("class","x-axis").attr("transform",`translate(0, ${H})`).call(fe),oe.append("text").attr("x",P/2).attr("y",I).attr("text-anchor","middle"),oe.append("text").attr("transform","rotate(-90)").attr("x",-(I/2)).attr("y",20).attr("text-anchor","middle");const he=oe.append("g").attr("class","legend").attr("transform",`translate(${q.left}, ${I-q.bottom+30})`).selectAll(".legend-item").data(x).enter().append("g").attr("class","legend-item").attr("transform",(we,ie)=>`translate(${ie*60}, 0)`).attr("stroke","none");he.append("rect").attr("x",0).attr("y",10).attr("width",10).attr("height",10).style("fill",we=>O(we)),he.append("text").attr("x",15).attr("y",20).text(we=>we).attr("font-size","10px")},DB=(e,t,n)=>{const a=t.current;a&&d3.json(n).then(p=>{const f=d3.select("#graph-container-energysummaryuse");f.html("");let o=0,v=0,x=0,S=Array.from({length:12},(Le,vt)=>({Month:vt+1,equipment:0,lighting:0,hotWater:0,pv:0,heating:0,cooling:0}));const k=p.features[0].properties["Gas[kWh][Mth]"];p.features[0].properties["Electricity[kWh][Mth]"];const P=p.features[0].properties["Heating[KWh][Mth]"],I=p.features[0].properties["Cooling[KWh][Mth]"],q=p.features[0].properties["Equipment[KWh][Mth]"],V=p.features[0].properties["PV[KWh][Mth]"],H=p.features[0].properties["Lighting[KWh][Mth]"],oe=p.features[0].properties["HotWater[KWh][Mth]"],$=k.map((Le,vt)=>({Month:vt+1,heating:P[vt],cooling:I[vt],equipment:q[vt],lighting:H[vt],hotWater:oe[vt],pv:V[vt]})),F=$.reduce((Le,vt)=>({heating:Le.heating+vt.heating,cooling:Le.cooling+vt.cooling,equipment:Le.equipment+vt.equipment,lighting:Le.lighting+vt.lighting,hotWater:Le.hotWater+vt.hotWater,pv:Le.pv+vt.pv}),{heating:0,cooling:0,equipment:0,lighting:0,hotWater:0,pv:0}),L=Object.values(F).reduce((Le,vt)=>Le+vt,0);if(e.current.size===0)x=parseInt(p.features[0].properties.Area_SQM_ESL),v=parseInt(p.features[0].properties["Cost[$][Yr]"]),o=parseInt(p.features[0].properties["CO2[kg][Yr]"]),S=[...$];else{const Le=Array.from(e.current),vt=[];a.queryRenderedFeatures({layers:["energy-Building"]}).forEach(Je=>{const xr=Je.properties.ID_ESL;Le.includes(xr)&&vt.push({type:"Feature",geometry:Je.geometry,properties:Je.properties})}),vt.forEach(Je=>{const xr=JSON.parse(Je.properties["Heating[KWh][Mth]"]),Ct=JSON.parse(Je.properties["Cooling[KWh][Mth]"]),Ht=JSON.parse(Je.properties["Equipment[KWh][Mth]"]),er=JSON.parse(Je.properties["Lighting[KWh][Mth]"]),qt=JSON.parse(Je.properties["HotWater[KWh][Mth]"]),lt=JSON.parse(Je.properties["PV[KWh][Mth]"]),Ot=JSON.parse(Je.properties["CO2[kg][Yr]"]),tr=JSON.parse(Je.properties["Cost[$][Yr]"]),yr=JSON.parse(Je.properties.Area_SQM_ESL);console.log("co2Data:",Ot),xr.forEach((Pr,Qt)=>{const Rr=Qt;S[Rr].heating+=parseFloat(Pr),S[Rr].cooling+=parseFloat(Ct[Qt]),S[Rr].equipment+=parseFloat(Ht[Qt]),S[Rr].lighting+=parseFloat(er[Qt]),S[Rr].hotWater+=parseFloat(qt[Qt]),S[Rr].pv+=parseFloat(lt[Qt])}),o+=parseInt(Ot),v+=parseInt(tr),x+=yr,console.log("totalCo2:",o)})}const O=S.reduce((Le,vt)=>({heating:Le.heating+vt.heating,cooling:Le.cooling+vt.cooling,equipment:Le.equipment+vt.equipment,lighting:Le.lighting+vt.lighting,hotWater:Le.hotWater+vt.hotWater,pv:Le.pv+vt.pv}),{heating:0,cooling:0,equipment:0,lighting:0,hotWater:0,pv:0}),Y=Object.values(O).reduce((Le,vt)=>Le+vt,0);d3.stack().keys(["equipment","lighting","hotWater","PV","cooling","heating"]).order(d3.stackOrderNone).offset(d3.stackOffsetNone)(S);const ue=380,fe=200,Ce={top:170,right:50,bottom:100,left:10},he=ue-Ce.left-Ce.right,ie=f.append("svg").attr("width",ue).attr("height",fe).append("g").attr("transform",`translate(${Ce.left}, ${Ce.top})`);var me=Ce.top-300,Ne=100,$e=30,Se=5,Te=5,ze=[{x:0,y:me,width:Ne,height:$e,fill:"#89c8a6",rx:Se,ry:Te,value:v.toLocaleString(),title:"Cost",unit:"[$/Yr]"},{x:110,y:me,width:Ne,height:$e,fill:"#d0df5a",rx:Se,ry:Te,value:Y.toLocaleString(),title:"Total Energy",unit:"[kWh/Yr]"},{x:220,y:me,width:Ne,height:$e,fill:"#f2e75c",rx:Se,ry:Te,value:o.toLocaleString(),title:"CO2",unit:"[kg/Yr]"}],He=[{x:0,y:me+$e+50,width:Ne,height:$e,fill:"#D8E0BB",rx:Se,ry:Te,value:x.toLocaleString(),title:"Area",unit:"[SQM]"},{x:110,y:me+$e+50,width:Ne,height:$e,fill:"#B6CEC7",rx:Se,ry:Te,value:parseInt(Y/x).toLocaleString(),title:"Normalized Energy",unit:"[kWh/SQM/Yr]"},{x:220,y:me+$e+50,width:Ne,height:$e,fill:"#86A3C3",rx:Se,ry:Te,value:(Y/L).toFixed(4),title:"Percentage",unit:"[%]"}],rt=ie.selectAll(".rectangle").data(ze),qe=ie.selectAll(".rectangle").data(He),nt=rt.enter().append("g").attr("class","rectangle"),ct=qe.enter().append("g").attr("class","rectangle");nt.append("text").attr("class","graph-title").attr("x",he/2).attr("y",Ce.top/2-240).attr("font-size","14px").attr("text-anchor","middle").text("Energy Use Summary"),nt.append("rect").attr("x",Le=>Le.x).attr("y",Le=>Le.y).attr("width",Le=>Le.width).attr("height",Le=>Le.height).attr("fill",Le=>Le.fill).attr("rx",Le=>Le.rx).attr("ry",Le=>Le.ry),nt.append("text").attr("x",Le=>Le.x+Le.width/2).attr("y",Le=>Le.y+Le.height/2).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("font-size","12px").style("font-weight","bold").text(Le=>Le.value),nt.append("text").attr("x",Le=>Le.x).attr("y",Le=>Le.y+Le.height+12).attr("text-anchor","left").attr("dominant-baseline","middle").attr("font-size","11px").style("font-weight","normal").text(Le=>Le.title),nt.append("text").attr("x",Le=>Le.x).attr("y",Le=>Le.y+Le.height+24).attr("text-anchor","left").attr("dominant-baseline","middle").attr("font-size","8px").style("font-weight","light").attr("fill","gray").text(Le=>Le.unit),ct.append("rect").attr("x",Le=>Le.x).attr("y",Le=>Le.y).attr("width",Le=>Le.width).attr("height",Le=>Le.height).attr("fill",Le=>Le.fill).attr("rx",Le=>Le.rx).attr("ry",Le=>Le.ry),ct.append("text").attr("x",Le=>Le.x+Le.width/2).attr("y",Le=>Le.y+Le.height/2).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("font-size","12px").style("font-weight","bold").text(Le=>Le.value),ct.append("text").attr("x",Le=>Le.x).attr("y",Le=>Le.y+Le.height+12).attr("text-anchor","left").attr("dominant-baseline","middle").attr("font-size","11px").style("font-weight","normal").text(Le=>Le.title),ct.append("text").attr("x",Le=>Le.x).attr("y",Le=>Le.y+Le.height+24).attr("text-anchor","left").attr("dominant-baseline","middle").attr("font-size","8px").style("font-weight","light").attr("fill","gray").text(Le=>Le.unit)})},SA=(e,t,n)=>{const a=t.current;a&&d3.json(n).then(p=>{const f=d3.select("#graph-container-energyenduse");f.html("");let o=0,v=Array.from({length:12},(qe,nt)=>({Month:nt+1,equipment:0,lighting:0,hotWater:0,pv:0,heating:0,cooling:0}));const x=p.features[0].properties["Gas[kWh][Mth]"];p.features[0].properties["Electricity[kWh][Mth]"];const S=p.features[0].properties["Heating[KWh][Mth]"],k=p.features[0].properties["Cooling[KWh][Mth]"],P=p.features[0].properties["Equipment[KWh][Mth]"],I=p.features[0].properties["PV[KWh][Mth]"],q=p.features[0].properties["Lighting[KWh][Mth]"],V=p.features[0].properties["HotWater[KWh][Mth]"],H=x.map((qe,nt)=>({Month:nt+1,heating:S[nt],cooling:k[nt],equipment:P[nt],lighting:q[nt],hotWater:V[nt],pv:I[nt]})),oe=H.reduce((qe,nt)=>({heating:qe.heating+nt.heating,cooling:qe.cooling+nt.cooling,equipment:qe.equipment+nt.equipment,lighting:qe.lighting+nt.lighting,hotWater:qe.hotWater+nt.hotWater,pv:qe.pv+nt.pv}),{heating:0,cooling:0,equipment:0,lighting:0,hotWater:0,pv:0});if(Object.values(oe).reduce((qe,nt)=>qe+nt,0),e.current.size===0)parseInt(p.features[0].properties.Area_SQM_ESL),parseInt(p.features[0].properties["Cost[$][Yr]"]),o=parseInt(p.features[0].properties["CO2[kg][Yr]"]),v=[...H];else{const qe=Array.from(e.current),nt=[];a.queryRenderedFeatures({layers:["energy-Building"]}).forEach(Le=>{const vt=Le.properties.ID_ESL;qe.includes(vt)&&nt.push({type:"Feature",geometry:Le.geometry,properties:Le.properties})}),nt.forEach(Le=>{const vt=JSON.parse(Le.properties["Heating[KWh][Mth]"]),$t=JSON.parse(Le.properties["Cooling[KWh][Mth]"]),Je=JSON.parse(Le.properties["Equipment[KWh][Mth]"]),xr=JSON.parse(Le.properties["Lighting[KWh][Mth]"]),Ct=JSON.parse(Le.properties["HotWater[KWh][Mth]"]),Ht=JSON.parse(Le.properties["PV[KWh][Mth]"]),er=JSON.parse(Le.properties["CO2[kg][Yr]"]);JSON.parse(Le.properties["Cost[$][Yr]"]),JSON.parse(Le.properties.Area_SQM_ESL),console.log("co2Data:",er),vt.forEach((qt,lt)=>{const Ot=lt;v[Ot].heating+=parseFloat(qt),v[Ot].cooling+=parseFloat($t[lt]),v[Ot].equipment+=parseFloat(Je[lt]),v[Ot].lighting+=parseFloat(xr[lt]),v[Ot].hotWater+=parseFloat(Ct[lt]),v[Ot].pv+=parseFloat(Ht[lt])}),o+=parseInt(er),console.log("totalCo2:",o)})}const $=v.reduce((qe,nt)=>({heating:qe.heating+nt.heating,cooling:qe.cooling+nt.cooling,equipment:qe.equipment+nt.equipment,lighting:qe.lighting+nt.lighting,hotWater:qe.hotWater+nt.hotWater,pv:qe.pv+nt.pv}),{heating:0,cooling:0,equipment:0,lighting:0,hotWater:0,pv:0});Object.values($).reduce((qe,nt)=>qe+nt,0);const L=d3.stack().keys(["equipment","lighting","hotWater","PV","cooling","heating"]).order(d3.stackOrderNone).offset(d3.stackOffsetNone)(v),O=340,Y=200,ne={top:30,right:20,bottom:70,left:40},ue=O-ne.left-ne.right,fe=Y-ne.top-ne.bottom,Ce=f.append("svg").attr("width",O).attr("height",Y),he=Ce.append("g").attr("transform",`translate(${ne.left}, ${ne.top})`);he.append("text").attr("class","graph-title").attr("x",ue/2).attr("y",ne.top/2-30).attr("font-size","14px").attr("text-anchor","middle").text("Energy Use by End Use"),he.append("text").attr("class","graph-title").attr("x",ue+1).attr("y",fe+30).attr("font-size","10px").attr("text-anchor","middle").text("Month"),he.append("text").attr("class","graph-title").attr("x",-15).attr("y",ne.top-40).attr("font-size","10px").attr("text-anchor","middle").text("kWh");const we=d3.max(v,qe=>d3.sum(Object.values(qe).slice(1))),ie=d3.scaleLinear().domain([1,12]).range([0,ue]),me=d3.scaleLinear().domain([0,we]).range([fe,0]),Ne=d3.scaleOrdinal().domain(["equipment","lighting","hotWater","PV","cooling","heating"]).range(["#959595","#f2e75c","#eec176","#9C27B0","#6faadd","#cf5867"]);he.append("g").attr("class","y-axis").call(d3.axisLeft(me).ticks(8).tickFormat(qe=>{let nt=1,ct="";return qe>=1e9?(nt=1e9,ct="G"):qe>=1e6?(nt=1e6,ct="M"):qe>=1e3&&(nt=1e3,ct="K"),qe/nt+ct})),he.selectAll(".stack").data(L).enter().append("g").attr("class","stack").attr("fill",qe=>Ne(qe.key)).selectAll("rect").data(qe=>qe).enter().append("rect").attr("x",qe=>ie(qe.data.Month)).attr("y",qe=>me(qe[1])).attr("height",qe=>me(qe[0])-me(qe[1])).attr("width",ie(1)-ie(0)-5),he.append("g").attr("class","x-axis").attr("transform",`translate(0, ${fe})`).call(d3.axisBottom(ie).ticks(12).tickFormat(d3.format("d")));const Se=he.append("g").attr("class","reference-lines");he.selectAll(".y-axis .tick").data().map(qe=>+qe).forEach(qe=>{Se.append("line").attr("x1",0).attr("x2",ue+25).attr("y1",me(qe)).attr("y2",me(qe)).attr("class","reference-line").style("stroke","grey").attr("stroke-width",.3).style("stroke-dasharray","4 4")});const He=Ce.append("g").attr("class","legend").attr("transform",`translate(${ne.left}, ${Y-ne.bottom+20})`),rt=100;Ne.domain().forEach((qe,nt)=>{const ct=He.append("g").attr("transform",`translate(${nt%3*rt}, ${Math.floor(nt/3)*20})`);ct.append("rect").attr("x",0).attr("y",20).attr("width",10).attr("height",10).attr("fill",Ne(qe)),ct.append("text").attr("x",15).attr("y",25).attr("dy","0.35em").style("font-size","10px").text(qe)})})},EA=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-energyfueluse");a.html("");let p=[{month:1,gas:0,electricity:0},{month:2,gas:0,electricity:0},{month:3,gas:0,electricity:0},{month:4,gas:0,electricity:0},{month:5,gas:0,electricity:0},{month:6,gas:0,electricity:0},{month:7,gas:0,electricity:0},{month:8,gas:0,electricity:0},{month:9,gas:0,electricity:0},{month:10,gas:0,electricity:0},{month:11,gas:0,electricity:0},{month:12,gas:0,electricity:0}];const f=[{month:1,gas:292456832,electricity:37756},{month:2,gas:243212032,electricity:33694},{month:3,gas:214523040,electricity:36607},{month:4,gas:113816456,electricity:32627},{month:5,gas:40872760,electricity:36890},{month:6,gas:13437732,electricity:38806},{month:7,gas:5359225,electricity:43566},{month:8,gas:9691384,electricity:42551},{month:9,gas:28674048,electricity:35716},{month:10,gas:80831360,electricity:34014},{month:11,gas:158096176,electricity:34262},{month:12,gas:238814736,electricity:35995}];if(e.current.size===0)p=[...f];else{const he=[];n.queryRenderedFeatures({layers:["energy-Building"]}).forEach(ie=>{const me=ie.properties.ID_ESL;e.current.has(me)&&he.push({type:"Feature",geometry:ie.geometry,properties:ie.properties})}),p=he.reduce((ie,me)=>{const Ne=JSON.parse(me.properties["Gas[kWh][Mth]"]),$e=JSON.parse(me.properties["Electricity[kWh][Mth]"]);return Ne.forEach((Se,Te)=>{ie[Te]||(ie[Te]={month:Te+1,gas:0,electricity:0}),ie[Te].gas+=Math.round(parseFloat(Se)),ie[Te].electricity+=Math.round(parseFloat($e[Te]))}),ie},[])}const o=340,v=200,x={top:30,right:20,bottom:40,left:40},S=o-x.left-x.right,k=v-x.top-x.bottom,P=a.append("svg").attr("width",o).attr("height",v),I=P.append("g").attr("transform",`translate(${x.left}, ${x.top})`),q=d3.max(p,he=>he.gas),V=d3.max(p,he=>he.electricity),H=Math.max(q,V),oe=d3.scaleLinear().domain([1,12]).range([0,S]),$=d3.scaleLinear().domain([0,H]).range([k,0]),F=d3.line().x(he=>oe(he.month)).y(he=>$(he.gas)),L=d3.line().x(he=>oe(he.month)).y(he=>$(he.electricity));I.append("g").attr("transform",`translate(0, ${k})`).call(d3.axisBottom(oe)),I.append("g").attr("class","y-axis").call(d3.axisLeft($).ticks(8).tickFormat(he=>{let we=1,ie="";return he>=1e9?(we=1e9,ie="G"):he>=1e6?(we=1e6,ie="M"):he>=1e3&&(we=1e3,ie="K"),he/we+ie})),I.append("text").attr("class","graph-title").attr("x",S/2).attr("y",x.top-40).attr("font-size","14px").attr("text-anchor","middle").text("Energy Use by Fuel Use"),I.append("text").attr("class","graph-title").attr("x",S+1).attr("y",k+30).attr("font-size","10px").attr("text-anchor","middle").text("Month"),I.append("text").attr("class","graph-title").attr("x",-20).attr("y",x.top-40).attr("font-size","10px").attr("text-anchor","middle").text("kWh"),I.append("path").datum(p).attr("fill","none").attr("stroke","#FFB100").attr("stroke-width",2).attr("d",F),I.append("path").datum(p).attr("fill","none").attr("stroke","#1569C7").attr("stroke-width",2).attr("d",L);const O=I.append("g").attr("class","reference-lines");I.selectAll(".y-axis .tick").data().map(he=>+he).forEach(he=>{O.append("line").attr("x1",0).attr("x2",S).attr("y1",$(he)).attr("y2",$(he)).attr("class","reference-line").style("stroke","grey").attr("stroke-width",.3).style("stroke-dasharray","4 4")});const ue=P.append("g").attr("class","legend").attr("transform",`translate(${x.left}, ${v-x.bottom})`),fe=100,Ce=35;ue.append("line").attr("x1",0).attr("y1",Ce).attr("x2",30).attr("y2",Ce).attr("stroke","#FFB100").attr("stroke-width",2),ue.append("text").attr("x",35).attr("y",Ce).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Gas"),ue.append("line").attr("x1",fe).attr("y1",Ce).attr("x2",fe+30).attr("y2",Ce).attr("stroke","#1569C7").attr("stroke-width",2),ue.append("text").attr("x",fe+35).attr("y",Ce).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Electricity")},CA=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-energyone");a.html("");const p=[];n.queryRenderedFeatures({layers:["energy-Feeder"]}).forEach(Se=>{const Te=Se.properties.ID_ESL;e.current.has(Te)&&p.push({type:"Feature",geometry:Se.geometry,properties:Se.properties})});const o=p.reduce((Se,Te)=>{const ze=JSON.parse(Te.properties.GasDemand_KWh),He=JSON.parse(Te.properties.ElectricityDemand_KWh);return ze.forEach((rt,qe)=>{Se[qe]||(Se[qe]={hour:qe+1,gas:0,electricity:0}),Se[qe].gas+=Math.round(rt),Se[qe].electricity+=Math.round(He[qe])}),Se},[]),v=1,x=168,S=o.filter((Se,Te)=>Te>=v&&Te<=x),k=340,P=170,I={top:30,right:20,bottom:37,left:55},q=k-I.left-I.right,V=P-I.top-I.bottom,H=a.append("svg").attr("width",k).attr("height",P),oe=H.append("g").attr("transform",`translate(${I.left}, ${I.top})`),$=d3.max(S,Se=>Se.gas),F=d3.max(S,Se=>Se.electricity),L=Math.max($,F),O=d3.scaleLinear().domain([1,168]).range([0,q]),Y=d3.scaleLinear().domain([0,L]).range([V,0]),ne=d3.line().x(Se=>O(Se.hour)).y(Se=>Y(Se.gas)),ue=d3.line().x(Se=>O(Se.hour)).y(Se=>Y(Se.electricity)),fe=[24,48,72,96,120,144],Ce=d3.axisBottom(O).tickValues(fe);oe.append("g").attr("class","x-axis").attr("transform","translate(0,"+V+")").call(Ce),oe.append("g").attr("class","y-axis").call(d3.axisLeft(Y)),oe.append("text").attr("class","graph-title").attr("x",q/2).attr("y",I.top-50).attr("font-size","13px").attr("text-anchor","middle").text("Energy Load of Winter Week").append("tspan").attr("font-size","10px").text(" (1.1-1.7)"),oe.append("text").attr("class","graph-title").attr("x",-20).attr("y",I.top-45).attr("font-size","10px").attr("text-anchor","middle").text("kWh"),oe.append("text").attr("class","graph-title").attr("x",q+8).attr("y",V+15).attr("font-size","10px").attr("text-anchor","middle").text("Hr");const he=[24,48,72,96,120,144,168];oe.selectAll(".vertical-line").data(he).enter().append("line").attr("class","vertical-line").attr("x1",Se=>O(Se)).attr("x2",Se=>O(Se)).attr("y1",0).attr("y2",V).attr("stroke-width",1).style("stroke","black").style("stroke-dasharray","2");const we=oe.append("g").attr("class","reference-lines");oe.selectAll(".y-axis .tick").data().map(Se=>+Se).forEach(Se=>{we.append("line").attr("x1",0).attr("x2",q).attr("y1",Y(Se)).attr("y2",Y(Se)).attr("class","reference-line").style("stroke","grey").attr("stroke-width",.3).style("stroke-dasharray","4 4")}),oe.append("path").datum(S).attr("fill","none").attr("stroke","#FFB100").attr("stroke-width",2).attr("d",ne),oe.append("path").datum(S).attr("fill","none").attr("stroke","#1569C7").attr("stroke-width",2).attr("d",ue);const Ne=H.append("g").attr("class","legend").attr("transform",`translate(${I.left}, ${P-I.bottom})`),$e=100;Ne.append("line").attr("x1",0).attr("y1",30).attr("x2",30).attr("y2",30).attr("stroke","#FFBF00").attr("stroke-width",2),Ne.append("text").attr("x",35).attr("y",30).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Gas"),Ne.append("line").attr("x1",$e).attr("y1",30).attr("x2",$e+30).attr("y2",30).attr("stroke","#1569C7").attr("stroke-width",2),Ne.append("text").attr("x",$e+35).attr("y",30).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Electricity")},kA=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-energytwo");a.html("");const p=[];n.queryRenderedFeatures({layers:["energy-Feeder"]}).forEach(Se=>{const Te=Se.properties.ID_ESL;e.current.has(Te)&&p.push({type:"Feature",geometry:Se.geometry,properties:Se.properties})});const o=p.reduce((Se,Te)=>{const ze=JSON.parse(Te.properties.GasDemand_KWh),He=JSON.parse(Te.properties.ElectricityDemand_KWh);return ze.forEach((rt,qe)=>{Se[qe]||(Se[qe]={hour:qe+1,gas:0,electricity:0}),Se[qe].gas+=Math.round(rt),Se[qe].electricity+=Math.round(He[qe])}),Se},[]),v=5285,x=5453,S=o.filter((Se,Te)=>Te>=v&&Te<=x),k=340,P=170,I={top:30,right:20,bottom:37,left:55},q=k-I.left-I.right,V=P-I.top-I.bottom,H=a.append("svg").attr("width",k).attr("height",P),oe=H.append("g").attr("transform",`translate(${I.left}, ${I.top})`),$=d3.max(S,Se=>Se.gas),F=d3.max(S,Se=>Se.electricity),L=Math.max($,F),O=d3.scaleLinear().domain([5285,5453]).range([0,q]),Y=d3.scaleLinear().domain([0,L]).range([V,0]),ne=d3.line().x(Se=>O(Se.hour)).y(Se=>Y(Se.gas)),ue=d3.line().x(Se=>O(Se.hour)).y(Se=>Y(Se.electricity)),fe=[5309,5333,5357,5381,5405,5429],Ce=d3.axisBottom(O).tickValues(fe);oe.append("g").attr("class","x-axis").attr("transform","translate(0,"+V+")").call(Ce),oe.append("g").attr("class","y-axis").call(d3.axisLeft(Y)),oe.append("text").attr("class","graph-title").attr("x",q/2).attr("y",I.top-50).attr("font-size","13px").attr("text-anchor","middle").text("Energy Load of Summer Week").append("tspan").attr("font-size","10px").text(" (7.1-7.7)"),oe.append("text").attr("class","graph-title").attr("x",-20).attr("y",I.top-45).attr("font-size","10px").attr("text-anchor","middle").text("kWh"),oe.append("text").attr("class","graph-title").attr("x",q+8).attr("y",V+15).attr("font-size","10px").attr("text-anchor","middle").text("Hr");const he=[5309,5333,5357,5381,5405,5429,5453];oe.selectAll(".vertical-line").data(he).enter().append("line").attr("class","vertical-line").attr("x1",Se=>O(Se)).attr("x2",Se=>O(Se)).attr("y1",0).attr("y2",V).attr("stroke-width",1).style("stroke","black").style("stroke-dasharray","2"),oe.append("path").datum(S).attr("fill","none").attr("stroke","#FFB100").attr("stroke-width",2).attr("d",ne),oe.append("path").datum(S).attr("fill","none").attr("stroke","#1569C7").attr("stroke-width",2).attr("d",ue);const we=oe.append("g").attr("class","reference-lines");oe.selectAll(".y-axis .tick").data().map(Se=>+Se).forEach(Se=>{we.append("line").attr("x1",0).attr("x2",q).attr("y1",Y(Se)).attr("y2",Y(Se)).attr("class","reference-line").style("stroke","grey").attr("stroke-width",.3).style("stroke-dasharray","4 4")});const Ne=H.append("g").attr("class","legend").attr("transform",`translate(${I.left}, ${P-I.bottom})`),$e=100;Ne.append("line").attr("x1",0).attr("y1",30).attr("x2",30).attr("y2",30).attr("stroke","#FFB100").attr("stroke-width",2),Ne.append("text").attr("x",35).attr("y",30).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Gas"),Ne.append("line").attr("x1",$e).attr("y1",30).attr("x2",$e+30).attr("y2",30).attr("stroke","#1569C7").attr("stroke-width",2),Ne.append("text").attr("x",$e+35).attr("y",30).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Electricity")},IA=(e,t)=>{const n=t.current;if(!n)return;const a=d3.select("#graph-container-energythree");a.html("");const p=[];n.queryRenderedFeatures({layers:["energy-Feeder"]}).forEach(ie=>{const me=ie.properties.ID_ESL;e.current.has(me)&&p.push({type:"Feature",geometry:ie.geometry,properties:ie.properties})});const o=p.reduce((ie,me)=>{const Ne=JSON.parse(me.properties.GasDemand_KWh),$e=JSON.parse(me.properties.ElectricityDemand_KWh);return Ne.forEach((Se,Te)=>{ie[Te]||(ie[Te]={hour:Te+1,gas:0,electricity:0}),ie[Te].gas+=Math.round(Se),ie[Te].electricity+=Math.round($e[Te])}),ie},[]),v=o.map(ie=>({hour:ie.hour,gas:ie.gas,electricity:0})),x=o.map(ie=>({hour:ie.hour,gas:0,electricity:ie.electricity}));v.sort((ie,me)=>me.gas-ie.gas),x.sort((ie,me)=>me.electricity-ie.electricity),o.forEach((ie,me)=>{ie.gas=v[me].gas,ie.electricity=x[me].electricity});const S=340,k=170,P={top:30,right:20,bottom:37,left:55},I=S-P.left-P.right,q=k-P.top-P.bottom,V=a.append("svg").attr("width",S).attr("height",k),H=V.append("g").attr("transform",`translate(${P.left}, ${P.top})`),oe=d3.max(o,ie=>ie.gas),$=d3.max(o,ie=>ie.electricity),F=Math.max(oe,$),L=d3.scaleLinear().domain([1,8765]).range([0,I]),O=d3.scaleLinear().domain([0,F]).range([q,0]),Y=d3.line().x(ie=>L(ie.hour)).y(ie=>O(ie.gas)),ne=d3.line().x(ie=>L(ie.hour)).y(ie=>O(ie.electricity));H.append("g").attr("transform",`translate(0, ${q})`).call(d3.axisBottom(L)),H.append("g").attr("class","y-axis").call(d3.axisLeft(O)),H.append("text").attr("class","graph-title").attr("x",I/2).attr("y",P.top-45).attr("font-size","14px").attr("text-anchor","middle").text("Load Duration Curve"),H.append("text").attr("class","graph-title").attr("x",-20).attr("y",P.top-50).attr("font-size","10px").attr("text-anchor","middle").text("kWh"),H.append("text").attr("class","graph-title").attr("x",I+8).attr("y",q+15).attr("font-size","10px").attr("text-anchor","middle").text("Hr"),H.append("path").datum(o).attr("fill","none").attr("stroke","#FFB100").attr("stroke-width",2).attr("d",Y),H.append("path").datum(o).attr("fill","none").attr("stroke","#1569C7").attr("stroke-width",2).attr("d",ne);const ue=H.append("g").attr("class","reference-lines");H.selectAll(".y-axis .tick").data().map(ie=>+ie).forEach(ie=>{ue.append("line").attr("x1",0).attr("x2",I).attr("y1",O(ie)).attr("y2",O(ie)).attr("class","reference-line").style("stroke","grey").attr("stroke-width",.3).style("stroke-dasharray","4 4")});const he=V.append("g").attr("class","legend").attr("transform",`translate(${P.left}, ${k-P.bottom})`),we=100;he.append("line").attr("x1",0).attr("y1",30).attr("x2",30).attr("y2",30).attr("stroke","#FFB100").attr("stroke-width",2),he.append("text").attr("x",35).attr("y",30).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Gas"),he.append("line").attr("x1",we).attr("y1",30).attr("x2",we+30).attr("y2",30).attr("stroke","#1569C7").attr("stroke-width",2),he.append("text").attr("x",we+35).attr("y",30).attr("dy","0.35em").style("font-size","10px").style("fill","black").text("Electricity")},Ym=[{id:"energy-Building",label:"Building Energy"},{id:"energy-Feeder",label:"Grid Energy"},{id:"mobility-Street-Detailed",label:"Street Mobility"},{id:"mobility-Block-Detailed",label:"Block Mobility"}],o_=e=>e?`${e}-highlighted`:null,a_=e=>e?`${e}-other`:null,TA=({handleDigitalTwinClick:e})=>ee.jsxs("div",{className:"home-page",children:[ee.jsx("p",{className:"second-title",children:"Digital Twin APIs"}),ee.jsx("img",{className:"general-image",src:"../Image/digitalTwin_withIcon.png",onClick:e}),ee.jsx("img",{className:"general-image",src:"../Image/digitalTwinAdd.png"}),ee.jsx("img",{className:"general-image",src:"../Image/digitalTwinBlank.png"}),ee.jsx("img",{className:"general-image",src:"../Image/digitalTwinBlank.png"}),ee.jsx("img",{className:"general-image",src:"../Image/digitalTwinBlank.png"}),ee.jsx("p",{className:"second-title",children:"Our Partners"}),ee.jsx("img",{className:"general-image",src:"../Image/partners.png"}),ee.jsx("p",{className:"second-title",children:"Disclaimer"}),ee.jsx("p",{className:"main-text",children:'The data and the associated metadata are provided "as-is," without express or implied warranty of completeness, accuracy, or fitness for a particular purpose.'})]}),BB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAA3NCSVQICAjb4U/gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAANmElEQVR4Xu3dvaudVRrG4WRALOLIDNMMijiNNmKlhTba2Ng4lZUwndNZWKiJoEm0SND/wdJ+LLQTtFEQ7KxEEERBdBxhiIhfmefx3YKEdSY5yTn7XXvf1wU3+7U7kLNWfmbv5Jw8wa66vfZY7cHNc++2Wvui9vnm9f3aG7XPagDX4o5a3y8P1PpeGd0vvfdqfb/0M3CMbqk9V/ug9kvt8iH2Ye352q01gCv13dB3RN8VozvkoPVd1HdS3019RwFH6KbaU7Uva6MDeJh9XXu6dnMNoO+CvhP6bhjdGYdZ31F9V/WdBdyg+2qf1EaH7Ub2aa3/eA/I1XdA3wWjO+JG1ndW313AdXq89l1tdMCOYt/XnqgBefrs9x0wuhuOYn139R0GHFK/F3fY9/mvd+drQI4+86O74KjXd1jfZcA1erI2OkzHuX7fDth/fdZHd8Bxru804Coeqv1QGx2i49xPtUdqwP7qM95nfXQHHOf6Tuu7DThA/z3br2qjA7SNfVO7swbsnz7bfcZHZ38b67vtt39LALjCa7XRwdnmXq8B+6fP9ujMb3N9xwFXuLf2c210aLa5/tDO/TVgf/SZ3taHiv/f+o7ruw74nTdrowOzxt6uAfujz/TorK+xvuuAjX5vbnRQ1tzdNWD39VkenfE157NGE/jD5pV19Q/dmM3fN6/AbpvxLM9458URAHOY8YAKANgP7heG/Djg9Z2q/ac22w/P6A8M/aX27a//BeyiP9X+XZvtf/Z+rP25dunX/2IV/gRgff1zt2f8yVn9vfG35RHYUX2GZ7zn+87ru48VCYD13b55ndHMXxtwde4XDiQA1ueAAsfF/cKBfAZgfc/UXlkep/Ni7eXlkUk8XHt0eZzOW7V3lkcm8ULtpeVxOs/WXl0eIdPp2ujvyc6wczXmMvP3S39tzKXP8OjXaob5flmZtwAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACDQyc0r6zldu7A8Tud87dzyyCRO1f64PE7nv7VLyyOT6PN7dnmczpnaxeURMnUAXJ50fvOH3dZneHS2Z1jffazIWwAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABDq5eWU9p2sXlsfpnK+dWx6ZxF21e5bH6XxU+3h5ZBJ9fs8uj9M5U7u4PEKmDoDLk85v/vOZ+fulvzbm0md49Gs1w3y/rMxbAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEEgAAEAgAQAAgQQAAAQSAAAQSAAAQCABAACBBAAABBIAABBIAABAIAEAAIEEAAAEEgAAEOjk5pX1nK5dWB6nc752bnlkEnfV7lkep/NR7ePlkUn0+T27PE7nTO3i8giZOgAuTzq/+cNu6zM8OtszrO8+VuQtAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQDYLadqf510/bUBcI1O1y5PunM15jLz90t/bcylz/Do12qG+X5ZmT8BAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQAIAAAIJAAAIJAAAIJAAAIBAAgAAAgkAAAgkAAAgkAAAgEACAAACCQAACCQAACCQAACAQCc3r6znmdory+N0Xqy9vDwyiYdrjy6P03mr9s7yyCReqL20PE7n2dqryyNk+kft8qT7Zw3YXX2GR2d7hvXdx4q8BbC+zzevM5r5awOuzv3CgQTA+hxQ4Li4XziQAFjfZ7Ufl8ep/FL7dHkEdlSf4T7Ls+k7r+8+ViQA1nep9u7yOJX3at8uj8CO6jPcZ3k2fef13ceKBMAc/rV5ncmMXxNweO4XmNidtdGnZNfc3TVg9/VZHp3xNdd3HrDxZm10UNbY2zVgf/SZHp31NdZ3HfA799Z+ro0OzDbXHxi6vwbsjz7TfbZHZ36b6zuu7zrgCq/VRodmm3u9BuyfPtujM7/N9R0HDNxW+6o2Ojjb2Dc1783Bfuqz3Wd8dPa3sb7b+o4DDvBQ7Yfa6AAd536qPVID9lef8T7rozvgONd3Wt9twFU8WRsdouPcUzVg//VZH90Bx7m+04Br9HxtWx/aOV8DcvSZH90FR72+w/ouAw7p8dp3tdHBOop9X3uiBuTps993wOhuOIr13dV3GHCd7qt9UhsdsBtZ/xvhD9SAXH0H9F0wuiNuZH1n9d0F3KCbav2+3Ze10WE7zL6uPV27uQbQd0HfCX03jO6Mw6zvqL6r+s4CjtAttedqH9QO+/mAD2v9XtytNYAr9d3Qd0TfFaM75KD1XdR3Ut9NfUexI05uXtk9t9ceqz24ee799ndsv6j1z9ru1/drb9T86E3gWt1R6/ul3yLoe2V0v/T6Jw32/eJn+++cEyf+B7lj6Bznie3VAAAAAElFTkSuQmCC",OB="/assets/house-b167ac88.png",NB="/assets/building-48039102.png",FB="/assets/lightning-24aa984d.png",PA=({toggleableLayers:e,displayingLayers:t,handleLayerToggle:n})=>{const a={"mobility-Street-Detailed":BB,"mobility-Block-Detailed":OB,"energy-Building":NB,"energy-Feeder":FB};return ee.jsxs("div",{className:"dashboard-selector",children:[ee.jsxs("div",{className:"hr-container",children:[ee.jsx("span",{class:"third-title",children:"Map Dashboard Selector"}),ee.jsx("hr",{class:"sidebar-divider"})]}),ee.jsx("div",{className:"dashboard-button-menu",children:e.map(p=>ee.jsxs("button",{className:`dashboard-button ${t.includes(p.id)?"active":""}`,onClick:()=>n(p.id),children:[ee.jsx("img",{src:a[p.id],alt:"Icon",className:"icon-image",style:{verticalAlign:"middle"}}),ee.jsx("span",{className:`dashboard-${t.includes(p.id)?"label-selected":"label-unselected"}`,children:p.label})]},p.id))})]})},jB=({buildingLayerCode:e,setBuildingLayerCode:t})=>ee.jsxs("select",{className:"energy-dropdown",value:e,onChange:n=>t(n.target.value),children:[ee.jsx("option",{value:"Gas[kWh_m2][Yr]",children:"Gas Demand"}),ee.jsx("option",{value:"Electricity[kWh_m2][Yr]",children:"Electricity Demand"}),ee.jsx("option",{value:"Heating[KWh_m2][Yr]",children:"Heating Demand"}),ee.jsx("option",{value:"Cooling[KWh_m2][Yr]",children:"Cooling Demand"}),ee.jsx("option",{value:"Equipment[KWh_m2][Yr]",children:"Equipment Demand"}),ee.jsx("option",{value:"Lighting[KWh_m2][Yr]",children:"Lighting Demand"}),ee.jsx("option",{value:"HotWater[KWh_m2][Yr]",children:"Hotwater Demand"}),ee.jsx("option",{value:"PV[KWh_m2][Yr]",children:"Electricity Produced"})]}),UB={black:"#000",white:"#fff"},rf=UB,VB={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Jc=VB,$B={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ep=$B,qB={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},tp=qB,WB={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},rp=WB,GB={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},np=GB,HB={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ah=HB,ZB={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},KB=ZB;function Xl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)&&(n[p]=e[p]);return n}function sI(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var XB=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QB=sI(function(e){return XB.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function YB(e){if(e.sheet)return e.sheet;for(var t=0;t0?ji(Qp,--zo):0,qp--,pi===10&&(qp=1,jy--),pi}function Go(){return pi=zo2||of(pi)>3?"":" "}function pO(e,t){for(;--t&&Go()&&!(pi<48||pi>102||pi>57&&pi<65||pi>70&&pi<97););return mf(e,bg()+(t<6&&ys()==32&&Go()==32))}function bx(e){for(;Go();)switch(pi){case e:return zo;case 34:case 39:e!==34&&e!==39&&bx(pi);break;case 40:e===41&&bx(e);break;case 92:Go();break}return zo}function dO(e,t){for(;Go()&&e+pi!==47+10;)if(e+pi===42+42&&ys()===47)break;return"/*"+mf(t,zo-1)+"*"+Fy(e===47?e:Go())}function hO(e){for(;!of(ys());)Go();return mf(e,zo)}function fO(e){return hI(Ag("",null,null,null,[""],e=dI(e),0,[0],e))}function Ag(e,t,n,a,p,f,o,v,x){for(var S=0,k=0,P=o,I=0,q=0,V=0,H=1,oe=1,$=1,F=0,L="",O=p,Y=f,ne=a,ue=L;oe;)switch(V=F,F=Go()){case 40:if(V!=108&&ji(ue,P-1)==58){xx(ue+=Zr(wg(F),"&","&\f"),"&\f")!=-1&&($=-1);break}case 34:case 39:case 91:ue+=wg(F);break;case 9:case 10:case 13:case 32:ue+=cO(V);break;case 92:ue+=pO(bg()-1,7);continue;case 47:switch(ys()){case 42:case 47:Jm(mO(dO(Go(),bg()),t,n),x);break;default:ue+="/"}break;case 123*H:v[S++]=us(ue)*$;case 125*H:case 59:case 0:switch(F){case 0:case 125:oe=0;case 59+k:$==-1&&(ue=Zr(ue,/\f/g,"")),q>0&&us(ue)-P&&Jm(q>32?zA(ue+";",a,n,P-1):zA(Zr(ue," ","")+";",a,n,P-2),x);break;case 59:ue+=";";default:if(Jm(ne=MA(ue,t,n,S,k,p,v,L,O=[],Y=[],P),f),F===123)if(k===0)Ag(ue,t,ne,ne,O,f,P,v,Y);else switch(I===99&&ji(ue,3)===110?100:I){case 100:case 108:case 109:case 115:Ag(e,ne,ne,a&&Jm(MA(e,ne,ne,0,0,p,v,L,p,O=[],P),Y),p,Y,P,v,a?O:Y);break;default:Ag(ue,ne,ne,ne,[""],Y,0,v,Y)}}S=k=q=0,H=$=1,L=ue="",P=o;break;case 58:P=1+us(ue),q=V;default:if(H<1){if(F==123)--H;else if(F==125&&H++==0&&uO()==125)continue}switch(ue+=Fy(F),F*H){case 38:$=k>0?1:(ue+="\f",-1);break;case 44:v[S++]=(us(ue)-1)*$,$=1;break;case 64:ys()===45&&(ue+=wg(Go())),I=ys(),k=P=us(L=ue+=hO(bg())),F++;break;case 45:V===45&&us(ue)==2&&(H=0)}}return f}function MA(e,t,n,a,p,f,o,v,x,S,k){for(var P=p-1,I=p===0?f:[""],q=$1(I),V=0,H=0,oe=0;V0?I[$]+" "+F:Zr(F,/&\f/g,I[$])))&&(x[oe++]=L);return Uy(e,t,n,p===0?U1:v,x,S,k)}function mO(e,t,n){return Uy(e,t,n,lI,Fy(lO()),nf(e,2,-2),0)}function zA(e,t,n,a){return Uy(e,t,n,V1,nf(e,0,a),nf(e,a+1,-1),a)}function Mp(e,t){for(var n="",a=$1(e),p=0;p6)switch(ji(e,t+1)){case 109:if(ji(e,t+4)!==45)break;case 102:return Zr(e,/(.+:)(.+)-([^]+)/,"$1"+Hr+"$2-$3$1"+ly+(ji(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xx(e,"stretch")?fI(Zr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ji(e,t+1)!==115)break;case 6444:switch(ji(e,us(e)-3-(~xx(e,"!important")&&10))){case 107:return Zr(e,":",":"+Hr)+e;case 101:return Zr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Hr+(ji(e,14)===45?"inline-":"")+"box$3$1"+Hr+"$2$3$1"+eo+"$2box$3")+e}break;case 5936:switch(ji(e,t+11)){case 114:return Hr+e+eo+Zr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Hr+e+eo+Zr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Hr+e+eo+Zr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Hr+e+eo+e+e}return e}var SO=function(t,n,a,p){if(t.length>-1&&!t.return)switch(t.type){case V1:t.return=fI(t.value,t.length);break;case uI:return Mp([sh(t,{value:Zr(t.value,"@","@"+Hr)})],p);case U1:if(t.length)return sO(t.props,function(f){switch(aO(f,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mp([sh(t,{props:[Zr(f,/:(read-\w+)/,":"+ly+"$1")]})],p);case"::placeholder":return Mp([sh(t,{props:[Zr(f,/:(plac\w+)/,":"+Hr+"input-$1")]}),sh(t,{props:[Zr(f,/:(plac\w+)/,":"+ly+"$1")]}),sh(t,{props:[Zr(f,/:(plac\w+)/,eo+"input-$1")]})],p)}return""})}},EO=[SO],CO=function(t){var n=t.key;if(n==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(H){var oe=H.getAttribute("data-emotion");oe.indexOf(" ")!==-1&&(document.head.appendChild(H),H.setAttribute("data-s",""))})}var p=t.stylisPlugins||EO,f={},o,v=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(H){for(var oe=H.getAttribute("data-emotion").split(" "),$=1;$=4;++a,p-=4)n=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(p){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var NO={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},FO=/[A-Z]|^ms/g,jO=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bI=function(t){return t.charCodeAt(1)===45},RA=function(t){return t!=null&&typeof t!="boolean"},s_=sI(function(e){return bI(e)?e:e.replace(FO,"-$&").toLowerCase()}),DA=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jO,function(a,p,f){return cs={name:p,styles:f,next:cs},p})}return NO[t]!==1&&!bI(t)&&typeof n=="number"&&n!==0?n+"px":n};function af(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return cs={name:n.name,styles:n.styles,next:cs},n.name;if(n.styles!==void 0){var a=n.next;if(a!==void 0)for(;a!==void 0;)cs={name:a.name,styles:a.styles,next:cs},a=a.next;var p=n.styles+";";return p}return UO(e,t,n)}case"function":{if(e!==void 0){var f=cs,o=n(e);return cs=f,af(e,t,o)}break}}if(t==null)return n;var v=t[n];return v!==void 0?v:n}function UO(e,t,n){var a="";if(Array.isArray(n))for(var p=0;p96?GO:HO},FA=function(t,n,a){var p;if(n){var f=n.shouldForwardProp;p=t.__emotion_forwardProp&&f?function(o){return t.__emotion_forwardProp(o)&&f(o)}:f}return typeof p!="function"&&a&&(p=t.__emotion_forwardProp),p},ZO=function(t){var n=t.cache,a=t.serialized,p=t.isStringTag;return _I(n,a,p),$O(function(){return xI(n,a,p)}),null},KO=function e(t,n){var a=t.__emotion_real===t,p=a&&t.__emotion_base||t,f,o;n!==void 0&&(f=n.label,o=n.target);var v=FA(t,n,a),x=v||NA(p),S=!x("as");return function(){var k=arguments,P=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(f!==void 0&&P.push("label:"+f+";"),k[0]==null||k[0].raw===void 0)P.push.apply(P,k);else{P.push(k[0][0]);for(var I=k.length,q=1;qt(QO(p)?n:p):t;return ee.jsx(qO,{styles:a})}/** + * @mui/styled-engine v5.15.7 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function EI(e,t){return wx(e,t)}const JO=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Qs(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function CI(e){if(!Qs(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=CI(e[n])}),t}function Mo(e,t,n={clone:!0}){const a=n.clone?ve({},e):e;return Qs(e)&&Qs(t)&&Object.keys(t).forEach(p=>{p!=="__proto__"&&(Qs(t[p])&&p in e&&Qs(e[p])?a[p]=Mo(e[p],t[p],n):n.clone?a[p]=Qs(t[p])?CI(t[p]):t[p]:a[p]=t[p])}),a}function Jt(e){if(typeof e!="string")throw new Error(Xl(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ax(...e){return e.reduce((t,n)=>n==null?t:function(...p){t.apply(this,p),n.apply(this,p)},()=>{})}function gf(e,t=166){let n;function a(...p){const f=()=>{e.apply(this,p)};clearTimeout(n),n=setTimeout(f,t)}return a.clear=()=>{clearTimeout(n)},a}function e6(e,t){return()=>null}function Ph(e,t){var n,a;return te.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(a=e.type)==null||(a=a._payload)==null||(a=a.value)==null?void 0:a.muiName)!==-1}function po(e){return e&&e.ownerDocument||document}function _s(e){return po(e).defaultView||window}function t6(e,t){return()=>null}function uy(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const r6=typeof window<"u"?te.useLayoutEffect:te.useEffect,ma=r6;let jA=0;function n6(e){const[t,n]=te.useState(e),a=e||t;return te.useEffect(()=>{t==null&&(jA+=1,n(`mui-${jA}`))},[t]),a}const UA=y_["useId".toString()];function Yy(e){if(UA!==void 0){const t=UA();return e??t}return n6(e)}function i6(e,t,n,a,p){return null}function Sx({controlled:e,default:t,name:n,state:a="value"}){const{current:p}=te.useRef(e!==void 0),[f,o]=te.useState(t),v=p?e:f,x=te.useCallback(S=>{p||o(S)},[]);return[v,x]}function hs(e){const t=te.useRef(e);return ma(()=>{t.current=e}),te.useRef((...n)=>(0,t.current)(...n)).current}function Mi(...e){return te.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{uy(n,t)})},e)}const VA={};function o6(e,t){const n=te.useRef(VA);return n.current===VA&&(n.current=e(t)),n}const a6=[];function s6(e){te.useEffect(e,a6)}class Jy{constructor(){this.currentId=0,this.clear=()=>{this.currentId!==0&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new Jy}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,n()},t)}}function kI(){const e=o6(Jy.create).current;return s6(e.disposeEffect),e}let ev=!0,Ex=!1;const l6=new Jy,u6={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c6(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&u6[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function p6(e){e.metaKey||e.altKey||e.ctrlKey||(ev=!0)}function l_(){ev=!1}function d6(){this.visibilityState==="hidden"&&Ex&&(ev=!0)}function h6(e){e.addEventListener("keydown",p6,!0),e.addEventListener("mousedown",l_,!0),e.addEventListener("pointerdown",l_,!0),e.addEventListener("touchstart",l_,!0),e.addEventListener("visibilitychange",d6,!0)}function f6(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return ev||c6(t)}function II(){const e=te.useCallback(p=>{p!=null&&h6(p.ownerDocument)},[]),t=te.useRef(!1);function n(){return t.current?(Ex=!0,l6.start(100,()=>{Ex=!1}),t.current=!1,!0):!1}function a(p){return f6(p)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:a,onBlur:n,ref:e}}function TI(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let ip;function PI(){if(ip)return ip;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),ip="reverse",e.scrollLeft>0?ip="default":(e.scrollLeft=1,e.scrollLeft===0&&(ip="negative")),document.body.removeChild(e),ip}function m6(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(PI()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function X1(e,t){const n=ve({},t);return Object.keys(e).forEach(a=>{if(a.toString().match(/^(components|slots)$/))n[a]=ve({},e[a],n[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){const p=e[a]||{},f=t[a];n[a]={},!f||!Object.keys(f)?n[a]=p:!p||!Object.keys(p)?n[a]=f:(n[a]=ve({},f),Object.keys(p).forEach(o=>{n[a][o]=X1(p[o],f[o])}))}else n[a]===void 0&&(n[a]=e[a])}),n}function Nr(e,t,n=void 0){const a={};return Object.keys(e).forEach(p=>{a[p]=e[p].reduce((f,o)=>{if(o){const v=t(o);v!==""&&f.push(v),n&&n[o]&&f.push(n[o])}return f},[]).join(" ")}),a}const $A=e=>e,g6=()=>{let e=$A;return{configure(t){e=t},generate(t){return e(t)},reset(){e=$A}}},y6=g6(),Q1=y6,v6={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Lr(e,t,n="Mui"){const a=v6[t];return a?`${n}-${a}`:`${Q1.generate(e)}-${t}`}function Er(e,t,n="Mui"){const a={};return t.forEach(p=>{a[p]=Lr(e,p,n)}),a}function _6(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const x6=["values","unit","step"],b6=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,a)=>n.val-a.val),t.reduce((n,a)=>ve({},n,{[a.key]:a.val}),{})};function w6(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,p=Ft(e,x6),f=b6(t),o=Object.keys(f);function v(I){return`@media (min-width:${typeof t[I]=="number"?t[I]:I}${n})`}function x(I){return`@media (max-width:${(typeof t[I]=="number"?t[I]:I)-a/100}${n})`}function S(I,q){const V=o.indexOf(q);return`@media (min-width:${typeof t[I]=="number"?t[I]:I}${n}) and (max-width:${(V!==-1&&typeof t[o[V]]=="number"?t[o[V]]:q)-a/100}${n})`}function k(I){return o.indexOf(I)+1`@media (min-width:${Y1[e]}px)`};function al(e,t,n){const a=e.theme||{};if(Array.isArray(t)){const f=a.breakpoints||qA;return t.reduce((o,v,x)=>(o[f.up(f.keys[x])]=n(t[x]),o),{})}if(typeof t=="object"){const f=a.breakpoints||qA;return Object.keys(t).reduce((o,v)=>{if(Object.keys(f.values||Y1).indexOf(v)!==-1){const x=f.up(v);o[x]=n(t[v],v)}else{const x=v;o[x]=t[x]}return o},{})}return n(t)}function E6(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((a,p)=>{const f=e.up(p);return a[f]={},a},{}))||{}}function C6(e,t){return e.reduce((n,a)=>{const p=n[a];return(!p||Object.keys(p).length===0)&&delete n[a],n},t)}function tv(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const a=`vars.${t}`.split(".").reduce((p,f)=>p&&p[f]?p[f]:null,e);if(a!=null)return a}return t.split(".").reduce((a,p)=>a&&a[p]!=null?a[p]:null,e)}function cy(e,t,n,a=n){let p;return typeof e=="function"?p=e(n):Array.isArray(e)?p=e[n]||a:p=tv(e,n)||a,t&&(p=t(p,a,e)),p}function oi(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:p}=e,f=o=>{if(o[t]==null)return null;const v=o[t],x=o.theme,S=tv(x,a)||{};return al(o,v,P=>{let I=cy(S,p,P);return P===I&&typeof P=="string"&&(I=cy(S,p,`${t}${P==="default"?"":Jt(P)}`,P)),n===!1?I:{[n]:I}})};return f.propTypes={},f.filterProps=[t],f}function k6(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const I6={m:"margin",p:"padding"},T6={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},WA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},P6=k6(e=>{if(e.length>2)if(WA[e])e=WA[e];else return[e];const[t,n]=e.split(""),a=I6[t],p=T6[n]||"";return Array.isArray(p)?p.map(f=>a+f):[a+p]}),J1=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],eb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...J1,...eb];function yf(e,t,n,a){var p;const f=(p=tv(e,t,!1))!=null?p:n;return typeof f=="number"?o=>typeof o=="string"?o:f*o:Array.isArray(f)?o=>typeof o=="string"?o:f[o]:typeof f=="function"?f:()=>{}}function MI(e){return yf(e,"spacing",8)}function vf(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),a=e(n);return t>=0?a:typeof a=="number"?-a:`-${a}`}function M6(e,t){return n=>e.reduce((a,p)=>(a[p]=vf(t,n),a),{})}function z6(e,t,n,a){if(t.indexOf(n)===-1)return null;const p=P6(n),f=M6(p,a),o=e[n];return al(e,o,f)}function zI(e,t){const n=MI(e.theme);return Object.keys(e).map(a=>z6(e,t,a,n)).reduce(Mh,{})}function Gn(e){return zI(e,J1)}Gn.propTypes={};Gn.filterProps=J1;function Hn(e){return zI(e,eb)}Hn.propTypes={};Hn.filterProps=eb;function L6(e=8){if(e.mui)return e;const t=MI({spacing:e}),n=(...a)=>(a.length===0?[1]:a).map(f=>{const o=t(f);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function rv(...e){const t=e.reduce((a,p)=>(p.filterProps.forEach(f=>{a[f]=p}),a),{}),n=a=>Object.keys(a).reduce((p,f)=>t[f]?Mh(p,t[f](a)):p,{});return n.propTypes={},n.filterProps=e.reduce((a,p)=>a.concat(p.filterProps),[]),n}function ca(e){return typeof e!="number"?e:`${e}px solid`}function ga(e,t){return oi({prop:e,themeKey:"borders",transform:t})}const R6=ga("border",ca),D6=ga("borderTop",ca),B6=ga("borderRight",ca),O6=ga("borderBottom",ca),N6=ga("borderLeft",ca),F6=ga("borderColor"),j6=ga("borderTopColor"),U6=ga("borderRightColor"),V6=ga("borderBottomColor"),$6=ga("borderLeftColor"),q6=ga("outline",ca),W6=ga("outlineColor"),nv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yf(e.theme,"shape.borderRadius",4),n=a=>({borderRadius:vf(t,a)});return al(e,e.borderRadius,n)}return null};nv.propTypes={};nv.filterProps=["borderRadius"];rv(R6,D6,B6,O6,N6,F6,j6,U6,V6,$6,nv,q6,W6);const iv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yf(e.theme,"spacing",8),n=a=>({gap:vf(t,a)});return al(e,e.gap,n)}return null};iv.propTypes={};iv.filterProps=["gap"];const ov=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yf(e.theme,"spacing",8),n=a=>({columnGap:vf(t,a)});return al(e,e.columnGap,n)}return null};ov.propTypes={};ov.filterProps=["columnGap"];const av=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yf(e.theme,"spacing",8),n=a=>({rowGap:vf(t,a)});return al(e,e.rowGap,n)}return null};av.propTypes={};av.filterProps=["rowGap"];const G6=oi({prop:"gridColumn"}),H6=oi({prop:"gridRow"}),Z6=oi({prop:"gridAutoFlow"}),K6=oi({prop:"gridAutoColumns"}),X6=oi({prop:"gridAutoRows"}),Q6=oi({prop:"gridTemplateColumns"}),Y6=oi({prop:"gridTemplateRows"}),J6=oi({prop:"gridTemplateAreas"}),eN=oi({prop:"gridArea"});rv(iv,ov,av,G6,H6,Z6,K6,X6,Q6,Y6,J6,eN);function zp(e,t){return t==="grey"?t:e}const tN=oi({prop:"color",themeKey:"palette",transform:zp}),rN=oi({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zp}),nN=oi({prop:"backgroundColor",themeKey:"palette",transform:zp});rv(tN,rN,nN);function $o(e){return e<=1&&e!==0?`${e*100}%`:e}const iN=oi({prop:"width",transform:$o}),tb=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var a,p;const f=((a=e.theme)==null||(a=a.breakpoints)==null||(a=a.values)==null?void 0:a[n])||Y1[n];return f?((p=e.theme)==null||(p=p.breakpoints)==null?void 0:p.unit)!=="px"?{maxWidth:`${f}${e.theme.breakpoints.unit}`}:{maxWidth:f}:{maxWidth:$o(n)}};return al(e,e.maxWidth,t)}return null};tb.filterProps=["maxWidth"];const oN=oi({prop:"minWidth",transform:$o}),aN=oi({prop:"height",transform:$o}),sN=oi({prop:"maxHeight",transform:$o}),lN=oi({prop:"minHeight",transform:$o});oi({prop:"size",cssProperty:"width",transform:$o});oi({prop:"size",cssProperty:"height",transform:$o});const uN=oi({prop:"boxSizing"});rv(iN,tb,oN,aN,sN,lN,uN);const cN={border:{themeKey:"borders",transform:ca},borderTop:{themeKey:"borders",transform:ca},borderRight:{themeKey:"borders",transform:ca},borderBottom:{themeKey:"borders",transform:ca},borderLeft:{themeKey:"borders",transform:ca},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ca},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:nv},color:{themeKey:"palette",transform:zp},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:zp},backgroundColor:{themeKey:"palette",transform:zp},p:{style:Hn},pt:{style:Hn},pr:{style:Hn},pb:{style:Hn},pl:{style:Hn},px:{style:Hn},py:{style:Hn},padding:{style:Hn},paddingTop:{style:Hn},paddingRight:{style:Hn},paddingBottom:{style:Hn},paddingLeft:{style:Hn},paddingX:{style:Hn},paddingY:{style:Hn},paddingInline:{style:Hn},paddingInlineStart:{style:Hn},paddingInlineEnd:{style:Hn},paddingBlock:{style:Hn},paddingBlockStart:{style:Hn},paddingBlockEnd:{style:Hn},m:{style:Gn},mt:{style:Gn},mr:{style:Gn},mb:{style:Gn},ml:{style:Gn},mx:{style:Gn},my:{style:Gn},margin:{style:Gn},marginTop:{style:Gn},marginRight:{style:Gn},marginBottom:{style:Gn},marginLeft:{style:Gn},marginX:{style:Gn},marginY:{style:Gn},marginInline:{style:Gn},marginInlineStart:{style:Gn},marginInlineEnd:{style:Gn},marginBlock:{style:Gn},marginBlockStart:{style:Gn},marginBlockEnd:{style:Gn},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:iv},rowGap:{style:av},columnGap:{style:ov},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:$o},maxWidth:{style:tb},minWidth:{transform:$o},height:{transform:$o},maxHeight:{transform:$o},minHeight:{transform:$o},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},sv=cN;function pN(...e){const t=e.reduce((a,p)=>a.concat(Object.keys(p)),[]),n=new Set(t);return e.every(a=>n.size===Object.keys(a).length)}function dN(e,t){return typeof e=="function"?e(t):e}function hN(){function e(n,a,p,f){const o={[n]:a,theme:p},v=f[n];if(!v)return{[n]:a};const{cssProperty:x=n,themeKey:S,transform:k,style:P}=v;if(a==null)return null;if(S==="typography"&&a==="inherit")return{[n]:a};const I=tv(p,S)||{};return P?P(o):al(o,a,V=>{let H=cy(I,k,V);return V===H&&typeof V=="string"&&(H=cy(I,k,`${n}${V==="default"?"":Jt(V)}`,V)),x===!1?H:{[x]:H}})}function t(n){var a;const{sx:p,theme:f={}}=n||{};if(!p)return null;const o=(a=f.unstable_sxConfig)!=null?a:sv;function v(x){let S=x;if(typeof x=="function")S=x(f);else if(typeof x!="object")return x;if(!S)return null;const k=E6(f.breakpoints),P=Object.keys(k);let I=k;return Object.keys(S).forEach(q=>{const V=dN(S[q],f);if(V!=null)if(typeof V=="object")if(o[q])I=Mh(I,e(q,V,f,o));else{const H=al({theme:f},V,oe=>({[q]:oe}));pN(H,V)?I[q]=t({sx:V,theme:f}):I=Mh(I,H)}else I=Mh(I,e(q,V,f,o))}),C6(P,I)}return Array.isArray(p)?p.map(v):v(p)}return t}const LI=hN();LI.filterProps=["sx"];const lv=LI;function fN(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const mN=["breakpoints","palette","spacing","shape"];function rb(e={},...t){const{breakpoints:n={},palette:a={},spacing:p,shape:f={}}=e,o=Ft(e,mN),v=w6(n),x=L6(p);let S=Mo({breakpoints:v,direction:"ltr",components:{},palette:ve({mode:"light"},a),spacing:x,shape:ve({},S6,f)},o);return S.applyStyles=fN,S=t.reduce((k,P)=>Mo(k,P),S),S.unstable_sxConfig=ve({},sv,o==null?void 0:o.unstable_sxConfig),S.unstable_sx=function(P){return lv({sx:P,theme:this})},S}function gN(e){return Object.keys(e).length===0}function yN(e=null){const t=te.useContext(Z1);return!t||gN(t)?e:t}const vN=rb();function uv(e=vN){return yN(e)}function _N({styles:e,themeId:t,defaultTheme:n={}}){const a=uv(n),p=typeof e=="function"?e(t&&a[t]||a):e;return ee.jsx(YO,{styles:p})}const xN=["sx"],bN=e=>{var t,n;const a={systemProps:{},otherProps:{}},p=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:sv;return Object.keys(e).forEach(f=>{p[f]?a.systemProps[f]=e[f]:a.otherProps[f]=e[f]}),a};function RI(e){const{sx:t}=e,n=Ft(e,xN),{systemProps:a,otherProps:p}=bN(n);let f;return Array.isArray(t)?f=[a,...t]:typeof t=="function"?f=(...o)=>{const v=t(...o);return Qs(v)?ve({},a,v):a}:f=ve({},a,t),ve({},p,{sx:f})}function DI(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var p=e.length;for(t=0;tv!=="theme"&&v!=="sx"&&v!=="as"})(lv);return te.forwardRef(function(x,S){const k=uv(n),P=RI(x),{className:I,component:q="div"}=P,V=Ft(P,wN);return ee.jsx(f,ve({as:q,ref:S,className:Ut(I,p?p(a):a),theme:t&&k[t]||k},V))})}const SN=["variant"];function GA(e){return e.length===0}function BI(e){const{variant:t}=e,n=Ft(e,SN);let a=t||"";return Object.keys(n).sort().forEach(p=>{p==="color"?a+=GA(a)?e[p]:Jt(e[p]):a+=`${GA(a)?p:Jt(p)}${Jt(e[p].toString())}`}),a}const EN=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function CN(e){return Object.keys(e).length===0}function kN(e){return typeof e=="string"&&e.charCodeAt(0)>96}const IN=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,py=e=>{let t=0;const n={};return e&&e.forEach(a=>{let p="";typeof a.props=="function"?(p=`callback${t}`,t+=1):p=BI(a.props),n[p]=a.style}),n},TN=(e,t)=>{let n=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants),py(n)},dy=(e,t,n)=>{const{ownerState:a={}}=e,p=[];let f=0;return n&&n.forEach(o=>{let v=!0;if(typeof o.props=="function"){const x=ve({},e,a);v=o.props(x)}else Object.keys(o.props).forEach(x=>{a[x]!==o.props[x]&&e[x]!==o.props[x]&&(v=!1)});v&&(typeof o.props=="function"?p.push(t[`callback${f}`]):p.push(t[BI(o.props)])),typeof o.props=="function"&&(f+=1)}),p},PN=(e,t,n,a)=>{var p;const f=n==null||(p=n.components)==null||(p=p[a])==null?void 0:p.variants;return dy(e,t,f)};function zh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const MN=rb(),zN=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Sg({defaultTheme:e,theme:t,themeId:n}){return CN(t)?e:t[n]||t}function LN(e){return e?(t,n)=>n[e]:null}const HA=({styledArg:e,props:t,defaultTheme:n,themeId:a})=>{const p=e(ve({},t,{theme:Sg(ve({},t,{defaultTheme:n,themeId:a}))}));let f;if(p&&p.variants&&(f=p.variants,delete p.variants),f){const o=dy(t,py(f),f);return[p,...o]}return p};function RN(e={}){const{themeId:t,defaultTheme:n=MN,rootShouldForwardProp:a=zh,slotShouldForwardProp:p=zh}=e,f=o=>lv(ve({},o,{theme:Sg(ve({},o,{defaultTheme:n,themeId:t}))}));return f.__mui_systemSx=!0,(o,v={})=>{JO(o,O=>O.filter(Y=>!(Y!=null&&Y.__mui_systemSx)));const{name:x,slot:S,skipVariantsResolver:k,skipSx:P,overridesResolver:I=LN(zN(S))}=v,q=Ft(v,EN),V=k!==void 0?k:S&&S!=="Root"&&S!=="root"||!1,H=P||!1;let oe,$=zh;S==="Root"||S==="root"?$=a:S?$=p:kN(o)&&($=void 0);const F=EI(o,ve({shouldForwardProp:$,label:oe},q)),L=(O,...Y)=>{const ne=Y?Y.map(he=>{if(typeof he=="function"&&he.__emotion_real!==he)return we=>HA({styledArg:he,props:we,defaultTheme:n,themeId:t});if(Qs(he)){let we=he,ie;return he&&he.variants&&(ie=he.variants,delete we.variants,we=me=>{let Ne=he;return dy(me,py(ie),ie).forEach(Se=>{Ne=Mo(Ne,Se)}),Ne}),we}return he}):[];let ue=O;if(Qs(O)){let he;O&&O.variants&&(he=O.variants,delete ue.variants,ue=we=>{let ie=O;return dy(we,py(he),he).forEach(Ne=>{ie=Mo(ie,Ne)}),ie})}else typeof O=="function"&&O.__emotion_real!==O&&(ue=he=>HA({styledArg:O,props:he,defaultTheme:n,themeId:t}));x&&I&&ne.push(he=>{const we=Sg(ve({},he,{defaultTheme:n,themeId:t})),ie=IN(x,we);if(ie){const me={};return Object.entries(ie).forEach(([Ne,$e])=>{me[Ne]=typeof $e=="function"?$e(ve({},he,{theme:we})):$e}),I(he,me)}return null}),x&&!V&&ne.push(he=>{const we=Sg(ve({},he,{defaultTheme:n,themeId:t}));return PN(he,TN(x,we),we,x)}),H||ne.push(f);const fe=ne.length-Y.length;if(Array.isArray(O)&&fe>0){const he=new Array(fe).fill("");ue=[...O,...he],ue.raw=[...O.raw,...he]}const Ce=F(ue,...ne);return o.muiName&&(Ce.muiName=o.muiName),Ce};return F.withConfig&&(L.withConfig=F.withConfig),L}}function DN(e){const{theme:t,name:n,props:a}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?a:X1(t.components[n].defaultProps,a)}function BN({props:e,name:t,defaultTheme:n,themeId:a}){let p=uv(n);return a&&(p=p[a]||p),DN({theme:p,name:t,props:e})}function nb(e,t=0,n=1){return _6(e,t,n)}function ON(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(a=>a+a)),n?`rgb${n.length===4?"a":""}(${n.map((a,p)=>p<3?parseInt(a,16):Math.round(parseInt(a,16)/255*1e3)/1e3).join(", ")})`:""}function ec(e){if(e.type)return e;if(e.charAt(0)==="#")return ec(ON(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Xl(9,e));let a=e.substring(t+1,e.length-1),p;if(n==="color"){if(a=a.split(" "),p=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(p)===-1)throw new Error(Xl(10,p))}else a=a.split(",");return a=a.map(f=>parseFloat(f)),{type:n,values:a,colorSpace:p}}function cv(e){const{type:t,colorSpace:n}=e;let{values:a}=e;return t.indexOf("rgb")!==-1?a=a.map((p,f)=>f<3?parseInt(p,10):p):t.indexOf("hsl")!==-1&&(a[1]=`${a[1]}%`,a[2]=`${a[2]}%`),t.indexOf("color")!==-1?a=`${n} ${a.join(" ")}`:a=`${a.join(", ")}`,`${t}(${a})`}function NN(e){e=ec(e);const{values:t}=e,n=t[0],a=t[1]/100,p=t[2]/100,f=a*Math.min(p,1-p),o=(S,k=(S+n/30)%12)=>p-f*Math.max(Math.min(k-3,9-k,1),-1);let v="rgb";const x=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(v+="a",x.push(t[3])),cv({type:v,values:x})}function ZA(e){e=ec(e);let t=e.type==="hsl"||e.type==="hsla"?ec(NN(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function FN(e,t){const n=ZA(e),a=ZA(t);return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function hi(e,t){return e=ec(e),t=nb(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,cv(e)}function jN(e,t){if(e=ec(e),t=nb(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return cv(e)}function UN(e,t){if(e=ec(e),t=nb(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return cv(e)}function VN(e,t){return ve({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const $N=["mode","contrastThreshold","tonalOffset"],KA={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:rf.white,default:rf.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},u_={text:{primary:rf.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:rf.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function XA(e,t,n,a){const p=a.light||a,f=a.dark||a*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=UN(e.main,p):t==="dark"&&(e.dark=jN(e.main,f)))}function qN(e="light"){return e==="dark"?{main:tp[200],light:tp[50],dark:tp[400]}:{main:tp[700],light:tp[400],dark:tp[800]}}function WN(e="light"){return e==="dark"?{main:ep[200],light:ep[50],dark:ep[400]}:{main:ep[500],light:ep[300],dark:ep[700]}}function GN(e="light"){return e==="dark"?{main:Jc[500],light:Jc[300],dark:Jc[700]}:{main:Jc[700],light:Jc[400],dark:Jc[800]}}function HN(e="light"){return e==="dark"?{main:rp[400],light:rp[300],dark:rp[700]}:{main:rp[700],light:rp[500],dark:rp[900]}}function ZN(e="light"){return e==="dark"?{main:np[400],light:np[300],dark:np[700]}:{main:np[800],light:np[500],dark:np[900]}}function KN(e="light"){return e==="dark"?{main:ah[400],light:ah[300],dark:ah[700]}:{main:"#ed6c02",light:ah[500],dark:ah[900]}}function XN(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:a=.2}=e,p=Ft(e,$N),f=e.primary||qN(t),o=e.secondary||WN(t),v=e.error||GN(t),x=e.info||HN(t),S=e.success||ZN(t),k=e.warning||KN(t);function P(H){return FN(H,u_.text.primary)>=n?u_.text.primary:KA.text.primary}const I=({color:H,name:oe,mainShade:$=500,lightShade:F=300,darkShade:L=700})=>{if(H=ve({},H),!H.main&&H[$]&&(H.main=H[$]),!H.hasOwnProperty("main"))throw new Error(Xl(11,oe?` (${oe})`:"",$));if(typeof H.main!="string")throw new Error(Xl(12,oe?` (${oe})`:"",JSON.stringify(H.main)));return XA(H,"light",F,a),XA(H,"dark",L,a),H.contrastText||(H.contrastText=P(H.main)),H},q={dark:u_,light:KA};return Mo(ve({common:ve({},rf),mode:t,primary:I({color:f,name:"primary"}),secondary:I({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:I({color:v,name:"error"}),warning:I({color:k,name:"warning"}),info:I({color:x,name:"info"}),success:I({color:S,name:"success"}),grey:KB,contrastThreshold:n,getContrastText:P,augmentColor:I,tonalOffset:a},q[t]),p)}const QN=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function YN(e){return Math.round(e*1e5)/1e5}const QA={textTransform:"uppercase"},YA='"Roboto", "Helvetica", "Arial", sans-serif';function JN(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:a=YA,fontSize:p=14,fontWeightLight:f=300,fontWeightRegular:o=400,fontWeightMedium:v=500,fontWeightBold:x=700,htmlFontSize:S=16,allVariants:k,pxToRem:P}=n,I=Ft(n,QN),q=p/14,V=P||($=>`${$/S*q}rem`),H=($,F,L,O,Y)=>ve({fontFamily:a,fontWeight:$,fontSize:V(F),lineHeight:L},a===YA?{letterSpacing:`${YN(O/F)}em`}:{},Y,k),oe={h1:H(f,96,1.167,-1.5),h2:H(f,60,1.2,-.5),h3:H(o,48,1.167,0),h4:H(o,34,1.235,.25),h5:H(o,24,1.334,0),h6:H(v,20,1.6,.15),subtitle1:H(o,16,1.75,.15),subtitle2:H(v,14,1.57,.1),body1:H(o,16,1.5,.15),body2:H(o,14,1.43,.15),button:H(v,14,1.75,.4,QA),caption:H(o,12,1.66,.4),overline:H(o,12,2.66,1,QA),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Mo(ve({htmlFontSize:S,pxToRem:V,fontFamily:a,fontSize:p,fontWeightLight:f,fontWeightRegular:o,fontWeightMedium:v,fontWeightBold:x},oe),I,{clone:!1})}const eF=.2,tF=.14,rF=.12;function Ln(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${eF})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${tF})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${rF})`].join(",")}const nF=["none",Ln(0,2,1,-1,0,1,1,0,0,1,3,0),Ln(0,3,1,-2,0,2,2,0,0,1,5,0),Ln(0,3,3,-2,0,3,4,0,0,1,8,0),Ln(0,2,4,-1,0,4,5,0,0,1,10,0),Ln(0,3,5,-1,0,5,8,0,0,1,14,0),Ln(0,3,5,-1,0,6,10,0,0,1,18,0),Ln(0,4,5,-2,0,7,10,1,0,2,16,1),Ln(0,5,5,-3,0,8,10,1,0,3,14,2),Ln(0,5,6,-3,0,9,12,1,0,3,16,2),Ln(0,6,6,-3,0,10,14,1,0,4,18,3),Ln(0,6,7,-4,0,11,15,1,0,4,20,3),Ln(0,7,8,-4,0,12,17,2,0,5,22,4),Ln(0,7,8,-4,0,13,19,2,0,5,24,4),Ln(0,7,9,-4,0,14,21,2,0,5,26,4),Ln(0,8,9,-5,0,15,22,2,0,6,28,5),Ln(0,8,10,-5,0,16,24,2,0,6,30,5),Ln(0,8,11,-5,0,17,26,2,0,6,32,5),Ln(0,9,11,-5,0,18,28,2,0,7,34,6),Ln(0,9,12,-6,0,19,29,2,0,7,36,6),Ln(0,10,13,-6,0,20,31,3,0,8,38,7),Ln(0,10,13,-6,0,21,33,3,0,8,40,7),Ln(0,10,14,-6,0,22,35,3,0,8,42,7),Ln(0,11,14,-7,0,23,36,3,0,9,44,8),Ln(0,11,15,-7,0,24,38,3,0,9,46,8)],iF=nF,oF=["duration","easing","delay"],aF={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},sF={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function JA(e){return`${Math.round(e)}ms`}function lF(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function uF(e){const t=ve({},aF,e.easing),n=ve({},sF,e.duration);return ve({getAutoHeightDuration:lF,create:(p=["all"],f={})=>{const{duration:o=n.standard,easing:v=t.easeInOut,delay:x=0}=f;return Ft(f,oF),(Array.isArray(p)?p:[p]).map(S=>`${S} ${typeof o=="string"?o:JA(o)} ${v} ${typeof x=="string"?x:JA(x)}`).join(",")}},e,{easing:t,duration:n})}const cF={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},pF=cF,dF=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function OI(e={},...t){const{mixins:n={},palette:a={},transitions:p={},typography:f={}}=e,o=Ft(e,dF);if(e.vars)throw new Error(Xl(18));const v=XN(a),x=rb(e);let S=Mo(x,{mixins:VN(x.breakpoints,n),palette:v,shadows:iF.slice(),typography:JN(v,f),transitions:uF(p),zIndex:ve({},pF)});return S=Mo(S,o),S=t.reduce((k,P)=>Mo(k,P),S),S.unstable_sxConfig=ve({},sv,o==null?void 0:o.unstable_sxConfig),S.unstable_sx=function(P){return lv({sx:P,theme:this})},S}const hF=OI(),pv=hF;function Yp(){const e=uv(pv);return e[ff]||e}function Fr({props:e,name:t}){return BN({props:e,name:t,defaultTheme:pv,themeId:ff})}const Yo=e=>zh(e)&&e!=="classes",fF=zh,mF=RN({themeId:ff,defaultTheme:pv,rootShouldForwardProp:Yo}),zt=mF,gF=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},eS=gF;function yF(e){return Lr("MuiSvgIcon",e)}Er("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const vF=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],_F=e=>{const{color:t,fontSize:n,classes:a}=e,p={root:["root",t!=="inherit"&&`color${Jt(t)}`,`fontSize${Jt(n)}`]};return Nr(p,yF,a)},xF=zt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Jt(n.color)}`],t[`fontSize${Jt(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,a,p,f,o,v,x,S,k,P,I,q,V;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(a=n.create)==null?void 0:a.call(n,"fill",{duration:(p=e.transitions)==null||(p=p.duration)==null?void 0:p.shorter}),fontSize:{inherit:"inherit",small:((f=e.typography)==null||(o=f.pxToRem)==null?void 0:o.call(f,20))||"1.25rem",medium:((v=e.typography)==null||(x=v.pxToRem)==null?void 0:x.call(v,24))||"1.5rem",large:((S=e.typography)==null||(k=S.pxToRem)==null?void 0:k.call(S,35))||"2.1875rem"}[t.fontSize],color:(P=(I=(e.vars||e).palette)==null||(I=I[t.color])==null?void 0:I.main)!=null?P:{action:(q=(e.vars||e).palette)==null||(q=q.action)==null?void 0:q.active,disabled:(V=(e.vars||e).palette)==null||(V=V.action)==null?void 0:V.disabled,inherit:void 0}[t.color]}}),NI=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiSvgIcon"}),{children:p,className:f,color:o="inherit",component:v="svg",fontSize:x="medium",htmlColor:S,inheritViewBox:k=!1,titleAccess:P,viewBox:I="0 0 24 24"}=a,q=Ft(a,vF),V=te.isValidElement(p)&&p.type==="svg",H=ve({},a,{color:o,component:v,fontSize:x,instanceFontSize:t.fontSize,inheritViewBox:k,viewBox:I,hasSvgAsChild:V}),oe={};k||(oe.viewBox=I);const $=_F(H);return ee.jsxs(xF,ve({as:v,className:Ut($.root,f),focusable:"false",color:S,"aria-hidden":P?void 0:!0,role:P?"img":void 0,ref:n},oe,q,V&&p.props,{ownerState:H,children:[V?p.props.children:p,P?ee.jsx("title",{children:P}):null]}))});NI.muiName="SvgIcon";const tS=NI;function dv(e,t){function n(a,p){return ee.jsx(tS,ve({"data-testid":`${t}Icon`,ref:p},a,{children:e}))}return n.muiName=tS.muiName,te.memo(te.forwardRef(n))}const bF={configure:e=>{Q1.configure(e)}},wF=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Jt,createChainedFunction:Ax,createSvgIcon:dv,debounce:gf,deprecatedPropType:e6,isMuiElement:Ph,ownerDocument:po,ownerWindow:_s,requirePropFactory:t6,setRef:uy,unstable_ClassNameGenerator:bF,unstable_useEnhancedEffect:ma,unstable_useId:Yy,unsupportedProp:i6,useControlled:Sx,useEventCallback:hs,useForkRef:Mi,useIsFocusVisible:II},Symbol.toStringTag,{value:"Module"}));var ln={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ib=Symbol.for("react.element"),ob=Symbol.for("react.portal"),hv=Symbol.for("react.fragment"),fv=Symbol.for("react.strict_mode"),mv=Symbol.for("react.profiler"),gv=Symbol.for("react.provider"),yv=Symbol.for("react.context"),AF=Symbol.for("react.server_context"),vv=Symbol.for("react.forward_ref"),_v=Symbol.for("react.suspense"),xv=Symbol.for("react.suspense_list"),bv=Symbol.for("react.memo"),wv=Symbol.for("react.lazy"),SF=Symbol.for("react.offscreen"),FI;FI=Symbol.for("react.module.reference");function ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ib:switch(e=e.type,e){case hv:case mv:case fv:case _v:case xv:return e;default:switch(e=e&&e.$$typeof,e){case AF:case yv:case vv:case wv:case bv:case gv:return e;default:return t}}case ob:return t}}}ln.ContextConsumer=yv;ln.ContextProvider=gv;ln.Element=ib;ln.ForwardRef=vv;ln.Fragment=hv;ln.Lazy=wv;ln.Memo=bv;ln.Portal=ob;ln.Profiler=mv;ln.StrictMode=fv;ln.Suspense=_v;ln.SuspenseList=xv;ln.isAsyncMode=function(){return!1};ln.isConcurrentMode=function(){return!1};ln.isContextConsumer=function(e){return ya(e)===yv};ln.isContextProvider=function(e){return ya(e)===gv};ln.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ib};ln.isForwardRef=function(e){return ya(e)===vv};ln.isFragment=function(e){return ya(e)===hv};ln.isLazy=function(e){return ya(e)===wv};ln.isMemo=function(e){return ya(e)===bv};ln.isPortal=function(e){return ya(e)===ob};ln.isProfiler=function(e){return ya(e)===mv};ln.isStrictMode=function(e){return ya(e)===fv};ln.isSuspense=function(e){return ya(e)===_v};ln.isSuspenseList=function(e){return ya(e)===xv};ln.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===hv||e===mv||e===fv||e===_v||e===xv||e===SF||typeof e=="object"&&e!==null&&(e.$$typeof===wv||e.$$typeof===bv||e.$$typeof===gv||e.$$typeof===yv||e.$$typeof===vv||e.$$typeof===FI||e.getModuleId!==void 0)};ln.typeOf=ya;function Cx(e,t){return Cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},Cx(e,t)}function jI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Cx(e,t)}const rS={disabled:!1},hy=ds.createContext(null);var EF=function(t){return t.scrollTop},xh="unmounted",Ou="exited",Nu="entering",ap="entered",kx="exiting",ll=function(e){jI(t,e);function t(a,p){var f;f=e.call(this,a,p)||this;var o=p,v=o&&!o.isMounting?a.enter:a.appear,x;return f.appearStatus=null,a.in?v?(x=Ou,f.appearStatus=Nu):x=ap:a.unmountOnExit||a.mountOnEnter?x=xh:x=Ou,f.state={status:x},f.nextCallback=null,f}t.getDerivedStateFromProps=function(p,f){var o=p.in;return o&&f.status===xh?{status:Ou}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(p){var f=null;if(p!==this.props){var o=this.state.status;this.props.in?o!==Nu&&o!==ap&&(f=Nu):(o===Nu||o===ap)&&(f=kx)}this.updateStatus(!1,f)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var p=this.props.timeout,f,o,v;return f=o=v=p,p!=null&&typeof p!="number"&&(f=p.exit,o=p.enter,v=p.appear!==void 0?p.appear:o),{exit:f,enter:o,appear:v}},n.updateStatus=function(p,f){if(p===void 0&&(p=!1),f!==null)if(this.cancelNextCallback(),f===Nu){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:gh.findDOMNode(this);o&&EF(o)}this.performEnter(p)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ou&&this.setState({status:xh})},n.performEnter=function(p){var f=this,o=this.props.enter,v=this.context?this.context.isMounting:p,x=this.props.nodeRef?[v]:[gh.findDOMNode(this),v],S=x[0],k=x[1],P=this.getTimeouts(),I=v?P.appear:P.enter;if(!p&&!o||rS.disabled){this.safeSetState({status:ap},function(){f.props.onEntered(S)});return}this.props.onEnter(S,k),this.safeSetState({status:Nu},function(){f.props.onEntering(S,k),f.onTransitionEnd(I,function(){f.safeSetState({status:ap},function(){f.props.onEntered(S,k)})})})},n.performExit=function(){var p=this,f=this.props.exit,o=this.getTimeouts(),v=this.props.nodeRef?void 0:gh.findDOMNode(this);if(!f||rS.disabled){this.safeSetState({status:Ou},function(){p.props.onExited(v)});return}this.props.onExit(v),this.safeSetState({status:kx},function(){p.props.onExiting(v),p.onTransitionEnd(o.exit,function(){p.safeSetState({status:Ou},function(){p.props.onExited(v)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(p,f){f=this.setNextCallback(f),this.setState(p,f)},n.setNextCallback=function(p){var f=this,o=!0;return this.nextCallback=function(v){o&&(o=!1,f.nextCallback=null,p(v))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(p,f){this.setNextCallback(f);var o=this.props.nodeRef?this.props.nodeRef.current:gh.findDOMNode(this),v=p==null&&!this.props.addEndListener;if(!o||v){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var x=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],S=x[0],k=x[1];this.props.addEndListener(S,k)}p!=null&&setTimeout(this.nextCallback,p)},n.render=function(){var p=this.state.status;if(p===xh)return null;var f=this.props,o=f.children;f.in,f.mountOnEnter,f.unmountOnExit,f.appear,f.enter,f.exit,f.timeout,f.addEndListener,f.onEnter,f.onEntering,f.onEntered,f.onExit,f.onExiting,f.onExited,f.nodeRef;var v=Ft(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ds.createElement(hy.Provider,{value:null},typeof o=="function"?o(p,v):ds.cloneElement(ds.Children.only(o),v))},t}(ds.Component);ll.contextType=hy;ll.propTypes={};function op(){}ll.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:op,onEntering:op,onEntered:op,onExit:op,onExiting:op,onExited:op};ll.UNMOUNTED=xh;ll.EXITED=Ou;ll.ENTERING=Nu;ll.ENTERED=ap;ll.EXITING=kx;const UI=ll;function CF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ab(e,t){var n=function(f){return t&&te.isValidElement(f)?t(f):f},a=Object.create(null);return e&&te.Children.map(e,function(p){return p}).forEach(function(p){a[p.key]=n(p)}),a}function kF(e,t){e=e||{},t=t||{};function n(k){return k in t?t[k]:e[k]}var a=Object.create(null),p=[];for(var f in e)f in t?p.length&&(a[f]=p,p=[]):p.push(f);var o,v={};for(var x in t){if(a[x])for(o=0;oe.scrollTop;function fy(e,t){var n,a;const{timeout:p,easing:f,style:o={}}=e;return{duration:(n=o.transitionDuration)!=null?n:typeof p=="number"?p:p[t.mode]||0,easing:(a=o.transitionTimingFunction)!=null?a:typeof f=="object"?f[t.mode]:f,delay:o.transitionDelay}}function LF(e){return Lr("MuiPaper",e)}Er("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const RF=["className","component","elevation","square","variant"],DF=e=>{const{square:t,elevation:n,variant:a,classes:p}=e,f={root:["root",a,!t&&"rounded",a==="elevation"&&`elevation${n}`]};return Nr(f,LF,p)},BF=zt("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return ve({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&ve({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${hi("#fff",eS(t.elevation))}, ${hi("#fff",eS(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),OF=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiPaper"}),{className:p,component:f="div",elevation:o=1,square:v=!1,variant:x="elevation"}=a,S=Ft(a,RF),k=ve({},a,{component:f,elevation:o,square:v,variant:x}),P=DF(k);return ee.jsx(BF,ve({as:f,ownerState:k,className:Ut(P.root,p),ref:n},S))}),lb=OF;function Wp(e){return typeof e=="string"}function NF(e,t,n){return e===void 0||Wp(e)?t:ve({},t,{ownerState:ve({},t.ownerState,n)})}function $I(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(a=>a.match(/^on[A-Z]/)&&typeof e[a]=="function"&&!t.includes(a)).forEach(a=>{n[a]=e[a]}),n}function FF(e,t,n){return typeof e=="function"?e(t,n):e}function nS(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function jF(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:p,className:f}=e;if(!t){const q=Ut(n==null?void 0:n.className,f,p==null?void 0:p.className,a==null?void 0:a.className),V=ve({},n==null?void 0:n.style,p==null?void 0:p.style,a==null?void 0:a.style),H=ve({},n,p,a);return q.length>0&&(H.className=q),Object.keys(V).length>0&&(H.style=V),{props:H,internalRef:void 0}}const o=$I(ve({},p,a)),v=nS(a),x=nS(p),S=t(o),k=Ut(S==null?void 0:S.className,n==null?void 0:n.className,f,p==null?void 0:p.className,a==null?void 0:a.className),P=ve({},S==null?void 0:S.style,n==null?void 0:n.style,p==null?void 0:p.style,a==null?void 0:a.style),I=ve({},S,n,x,v);return k.length>0&&(I.className=k),Object.keys(P).length>0&&(I.style=P),{props:I,internalRef:S.ref}}const UF=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function xs(e){var t;const{elementType:n,externalSlotProps:a,ownerState:p,skipResolvingSlotProps:f=!1}=e,o=Ft(e,UF),v=f?{}:FF(a,p),{props:x,internalRef:S}=jF(ve({},o,{externalSlotProps:v})),k=Mi(S,v==null?void 0:v.ref,(t=e.additionalProps)==null?void 0:t.ref);return NF(n,ve({},x,{ref:k}),p)}function VF(e){const{className:t,classes:n,pulsate:a=!1,rippleX:p,rippleY:f,rippleSize:o,in:v,onExited:x,timeout:S}=e,[k,P]=te.useState(!1),I=Ut(t,n.ripple,n.rippleVisible,a&&n.ripplePulsate),q={width:o,height:o,top:-(o/2)+f,left:-(o/2)+p},V=Ut(n.child,k&&n.childLeaving,a&&n.childPulsate);return!v&&!k&&P(!0),te.useEffect(()=>{if(!v&&x!=null){const H=setTimeout(x,S);return()=>{clearTimeout(H)}}},[x,v,S]),ee.jsx("span",{className:I,style:q,children:ee.jsx("span",{className:V})})}const $F=Er("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),sa=$F,qF=["center","classes","className"];let Av=e=>e,iS,oS,aS,sS;const Ix=550,WF=80,GF=K1(iS||(iS=Av` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),HF=K1(oS||(oS=Av` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),ZF=K1(aS||(aS=Av` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),KF=zt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),XF=zt(VF,{name:"MuiTouchRipple",slot:"Ripple"})(sS||(sS=Av` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),sa.rippleVisible,GF,Ix,({theme:e})=>e.transitions.easing.easeInOut,sa.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,sa.child,sa.childLeaving,HF,Ix,({theme:e})=>e.transitions.easing.easeInOut,sa.childPulsate,ZF,({theme:e})=>e.transitions.easing.easeInOut),QF=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiTouchRipple"}),{center:p=!1,classes:f={},className:o}=a,v=Ft(a,qF),[x,S]=te.useState([]),k=te.useRef(0),P=te.useRef(null);te.useEffect(()=>{P.current&&(P.current(),P.current=null)},[x]);const I=te.useRef(!1),q=kI(),V=te.useRef(null),H=te.useRef(null),oe=te.useCallback(O=>{const{pulsate:Y,rippleX:ne,rippleY:ue,rippleSize:fe,cb:Ce}=O;S(he=>[...he,ee.jsx(XF,{classes:{ripple:Ut(f.ripple,sa.ripple),rippleVisible:Ut(f.rippleVisible,sa.rippleVisible),ripplePulsate:Ut(f.ripplePulsate,sa.ripplePulsate),child:Ut(f.child,sa.child),childLeaving:Ut(f.childLeaving,sa.childLeaving),childPulsate:Ut(f.childPulsate,sa.childPulsate)},timeout:Ix,pulsate:Y,rippleX:ne,rippleY:ue,rippleSize:fe},k.current)]),k.current+=1,P.current=Ce},[f]),$=te.useCallback((O={},Y={},ne=()=>{})=>{const{pulsate:ue=!1,center:fe=p||Y.pulsate,fakeElement:Ce=!1}=Y;if((O==null?void 0:O.type)==="mousedown"&&I.current){I.current=!1;return}(O==null?void 0:O.type)==="touchstart"&&(I.current=!0);const he=Ce?null:H.current,we=he?he.getBoundingClientRect():{width:0,height:0,left:0,top:0};let ie,me,Ne;if(fe||O===void 0||O.clientX===0&&O.clientY===0||!O.clientX&&!O.touches)ie=Math.round(we.width/2),me=Math.round(we.height/2);else{const{clientX:$e,clientY:Se}=O.touches&&O.touches.length>0?O.touches[0]:O;ie=Math.round($e-we.left),me=Math.round(Se-we.top)}if(fe)Ne=Math.sqrt((2*we.width**2+we.height**2)/3),Ne%2===0&&(Ne+=1);else{const $e=Math.max(Math.abs((he?he.clientWidth:0)-ie),ie)*2+2,Se=Math.max(Math.abs((he?he.clientHeight:0)-me),me)*2+2;Ne=Math.sqrt($e**2+Se**2)}O!=null&&O.touches?V.current===null&&(V.current=()=>{oe({pulsate:ue,rippleX:ie,rippleY:me,rippleSize:Ne,cb:ne})},q.start(WF,()=>{V.current&&(V.current(),V.current=null)})):oe({pulsate:ue,rippleX:ie,rippleY:me,rippleSize:Ne,cb:ne})},[p,oe,q]),F=te.useCallback(()=>{$({},{pulsate:!0})},[$]),L=te.useCallback((O,Y)=>{if(q.clear(),(O==null?void 0:O.type)==="touchend"&&V.current){V.current(),V.current=null,q.start(0,()=>{L(O,Y)});return}V.current=null,S(ne=>ne.length>0?ne.slice(1):ne),P.current=Y},[q]);return te.useImperativeHandle(n,()=>({pulsate:F,start:$,stop:L}),[F,$,L]),ee.jsx(KF,ve({className:Ut(sa.root,f.root,o),ref:H},v,{children:ee.jsx(zF,{component:null,exit:!0,children:x})}))}),YF=QF;function JF(e){return Lr("MuiButtonBase",e)}const e8=Er("MuiButtonBase",["root","disabled","focusVisible"]),t8=e8,r8=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],n8=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:a,classes:p}=e,o=Nr({root:["root",t&&"disabled",n&&"focusVisible"]},JF,p);return n&&a&&(o.root+=` ${a}`),o},i8=zt("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${t8.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),o8=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiButtonBase"}),{action:p,centerRipple:f=!1,children:o,className:v,component:x="button",disabled:S=!1,disableRipple:k=!1,disableTouchRipple:P=!1,focusRipple:I=!1,LinkComponent:q="a",onBlur:V,onClick:H,onContextMenu:oe,onDragLeave:$,onFocus:F,onFocusVisible:L,onKeyDown:O,onKeyUp:Y,onMouseDown:ne,onMouseLeave:ue,onMouseUp:fe,onTouchEnd:Ce,onTouchMove:he,onTouchStart:we,tabIndex:ie=0,TouchRippleProps:me,touchRippleRef:Ne,type:$e}=a,Se=Ft(a,r8),Te=te.useRef(null),ze=te.useRef(null),He=Mi(ze,Ne),{isFocusVisibleRef:rt,onFocus:qe,onBlur:nt,ref:ct}=II(),[Le,vt]=te.useState(!1);S&&Le&&vt(!1),te.useImperativeHandle(p,()=>({focusVisible:()=>{vt(!0),Te.current.focus()}}),[]);const[$t,Je]=te.useState(!1);te.useEffect(()=>{Je(!0)},[]);const xr=$t&&!k&&!S;te.useEffect(()=>{Le&&I&&!k&&$t&&ze.current.pulsate()},[k,I,Le,$t]);function Ct(Lt,an,Kn=P){return hs($i=>(an&&an($i),!Kn&&ze.current&&ze.current[Lt]($i),!0))}const Ht=Ct("start",ne),er=Ct("stop",oe),qt=Ct("stop",$),lt=Ct("stop",fe),Ot=Ct("stop",Lt=>{Le&&Lt.preventDefault(),ue&&ue(Lt)}),tr=Ct("start",we),yr=Ct("stop",Ce),Pr=Ct("stop",he),Qt=Ct("stop",Lt=>{nt(Lt),rt.current===!1&&vt(!1),V&&V(Lt)},!1),Rr=hs(Lt=>{Te.current||(Te.current=Lt.currentTarget),qe(Lt),rt.current===!0&&(vt(!0),L&&L(Lt)),F&&F(Lt)}),sr=()=>{const Lt=Te.current;return x&&x!=="button"&&!(Lt.tagName==="A"&&Lt.href)},pr=te.useRef(!1),In=hs(Lt=>{I&&!pr.current&&Le&&ze.current&&Lt.key===" "&&(pr.current=!0,ze.current.stop(Lt,()=>{ze.current.start(Lt)})),Lt.target===Lt.currentTarget&&sr()&&Lt.key===" "&&Lt.preventDefault(),O&&O(Lt),Lt.target===Lt.currentTarget&&sr()&&Lt.key==="Enter"&&!S&&(Lt.preventDefault(),H&&H(Lt))}),Dr=hs(Lt=>{I&&Lt.key===" "&&ze.current&&Le&&!Lt.defaultPrevented&&(pr.current=!1,ze.current.stop(Lt,()=>{ze.current.pulsate(Lt)})),Y&&Y(Lt),H&&Lt.target===Lt.currentTarget&&sr()&&Lt.key===" "&&!Lt.defaultPrevented&&H(Lt)});let Yt=x;Yt==="button"&&(Se.href||Se.to)&&(Yt=q);const un={};Yt==="button"?(un.type=$e===void 0?"button":$e,un.disabled=S):(!Se.href&&!Se.to&&(un.role="button"),S&&(un["aria-disabled"]=S));const Xr=Mi(n,ct,Te),cn=ve({},a,{centerRipple:f,component:x,disabled:S,disableRipple:k,disableTouchRipple:P,focusRipple:I,tabIndex:ie,focusVisible:Le}),Cr=n8(cn);return ee.jsxs(i8,ve({as:Yt,className:Ut(Cr.root,v),ownerState:cn,onBlur:Qt,onClick:H,onContextMenu:er,onFocus:Rr,onKeyDown:In,onKeyUp:Dr,onMouseDown:Ht,onMouseLeave:Ot,onMouseUp:lt,onDragLeave:qt,onTouchEnd:yr,onTouchMove:Pr,onTouchStart:tr,ref:Xr,tabIndex:S?-1:ie,type:$e},un,Se,{children:[o,xr?ee.jsx(YF,ve({ref:He,center:f},me)):null]}))}),nc=o8;function a8(e){return Lr("MuiIconButton",e)}const s8=Er("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),l8=s8,u8=["edge","children","className","color","disabled","disableFocusRipple","size"],c8=e=>{const{classes:t,disabled:n,color:a,edge:p,size:f}=e,o={root:["root",n&&"disabled",a!=="default"&&`color${Jt(a)}`,p&&`edge${Jt(p)}`,`size${Jt(f)}`]};return Nr(o,a8,t)},p8=zt(nc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Jt(n.color)}`],n.edge&&t[`edge${Jt(n.edge)}`],t[`size${Jt(n.size)}`]]}})(({theme:e,ownerState:t})=>ve({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:hi(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const a=(n=(e.vars||e).palette)==null?void 0:n[t.color];return ve({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&ve({color:a==null?void 0:a.main},!t.disableRipple&&{"&:hover":ve({},a&&{backgroundColor:e.vars?`rgba(${a.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:hi(a.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${l8.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),d8=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiIconButton"}),{edge:p=!1,children:f,className:o,color:v="default",disabled:x=!1,disableFocusRipple:S=!1,size:k="medium"}=a,P=Ft(a,u8),I=ve({},a,{edge:p,color:v,disabled:x,disableFocusRipple:S,size:k}),q=c8(I);return ee.jsx(p8,ve({className:Ut(q.root,o),centerRipple:!0,focusRipple:!S,disabled:x,ref:n,ownerState:I},P,{children:f}))}),h8=d8;function f8(e){return Lr("MuiTypography",e)}Er("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const m8=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],g8=e=>{const{align:t,gutterBottom:n,noWrap:a,paragraph:p,variant:f,classes:o}=e,v={root:["root",f,e.align!=="inherit"&&`align${Jt(t)}`,n&&"gutterBottom",a&&"noWrap",p&&"paragraph"]};return Nr(v,f8,o)},y8=zt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Jt(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>ve({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),lS={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},v8={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_8=e=>v8[e]||e,x8=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiTypography"}),p=_8(a.color),f=RI(ve({},a,{color:p})),{align:o="inherit",className:v,component:x,gutterBottom:S=!1,noWrap:k=!1,paragraph:P=!1,variant:I="body1",variantMapping:q=lS}=f,V=Ft(f,m8),H=ve({},f,{align:o,color:p,className:v,component:x,gutterBottom:S,noWrap:k,paragraph:P,variant:I,variantMapping:q}),oe=x||(P?"p":q[I]||lS[I])||"span",$=g8(H);return ee.jsx(y8,ve({as:oe,ref:n,ownerState:H,className:Ut($.root,v)},V))}),La=x8,b8=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function w8(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function A8(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=a=>e.ownerDocument.querySelector(`input[type="radio"]${a}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function S8(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||A8(e))}function E8(e){const t=[],n=[];return Array.from(e.querySelectorAll(b8)).forEach((a,p)=>{const f=w8(a);f===-1||!S8(a)||(f===0?t.push(a):n.push({documentOrder:p,tabIndex:f,node:a}))}),n.sort((a,p)=>a.tabIndex===p.tabIndex?a.documentOrder-p.documentOrder:a.tabIndex-p.tabIndex).map(a=>a.node).concat(t)}function C8(){return!0}function k8(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:a=!1,disableRestoreFocus:p=!1,getTabbable:f=E8,isEnabled:o=C8,open:v}=e,x=te.useRef(!1),S=te.useRef(null),k=te.useRef(null),P=te.useRef(null),I=te.useRef(null),q=te.useRef(!1),V=te.useRef(null),H=Mi(t.ref,V),oe=te.useRef(null);te.useEffect(()=>{!v||!V.current||(q.current=!n)},[n,v]),te.useEffect(()=>{if(!v||!V.current)return;const L=po(V.current);return V.current.contains(L.activeElement)||(V.current.hasAttribute("tabIndex")||V.current.setAttribute("tabIndex","-1"),q.current&&V.current.focus()),()=>{p||(P.current&&P.current.focus&&(x.current=!0,P.current.focus()),P.current=null)}},[v]),te.useEffect(()=>{if(!v||!V.current)return;const L=po(V.current),O=ue=>{oe.current=ue,!(a||!o()||ue.key!=="Tab")&&L.activeElement===V.current&&ue.shiftKey&&(x.current=!0,k.current&&k.current.focus())},Y=()=>{const ue=V.current;if(ue===null)return;if(!L.hasFocus()||!o()||x.current){x.current=!1;return}if(ue.contains(L.activeElement)||a&&L.activeElement!==S.current&&L.activeElement!==k.current)return;if(L.activeElement!==I.current)I.current=null;else if(I.current!==null)return;if(!q.current)return;let fe=[];if((L.activeElement===S.current||L.activeElement===k.current)&&(fe=f(V.current)),fe.length>0){var Ce,he;const we=!!((Ce=oe.current)!=null&&Ce.shiftKey&&((he=oe.current)==null?void 0:he.key)==="Tab"),ie=fe[0],me=fe[fe.length-1];typeof ie!="string"&&typeof me!="string"&&(we?me.focus():ie.focus())}else ue.focus()};L.addEventListener("focusin",Y),L.addEventListener("keydown",O,!0);const ne=setInterval(()=>{L.activeElement&&L.activeElement.tagName==="BODY"&&Y()},50);return()=>{clearInterval(ne),L.removeEventListener("focusin",Y),L.removeEventListener("keydown",O,!0)}},[n,a,p,o,v,f]);const $=L=>{P.current===null&&(P.current=L.relatedTarget),q.current=!0,I.current=L.target;const O=t.props.onFocus;O&&O(L)},F=L=>{P.current===null&&(P.current=L.relatedTarget),q.current=!0};return ee.jsxs(te.Fragment,{children:[ee.jsx("div",{tabIndex:v?0:-1,onFocus:F,ref:S,"data-testid":"sentinelStart"}),te.cloneElement(t,{ref:H,onFocus:$}),ee.jsx("div",{tabIndex:v?0:-1,onFocus:F,ref:k,"data-testid":"sentinelEnd"})]})}function I8(e){return typeof e=="function"?e():e}const T8=te.forwardRef(function(t,n){const{children:a,container:p,disablePortal:f=!1}=t,[o,v]=te.useState(null),x=Mi(te.isValidElement(a)?a.ref:null,n);if(ma(()=>{f||v(I8(p)||document.body)},[p,f]),ma(()=>{if(o&&!f)return uy(n,o),()=>{uy(n,null)}},[n,o,f]),f){if(te.isValidElement(a)){const S={ref:x};return te.cloneElement(a,S)}return ee.jsx(te.Fragment,{children:a})}return ee.jsx(te.Fragment,{children:o&&S1.createPortal(a,o)})});function P8(e){const t=po(e);return t.body===e?_s(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Lh(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function uS(e){return parseInt(_s(e).getComputedStyle(e).paddingRight,10)||0}function M8(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,a=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||a}function cS(e,t,n,a,p){const f=[t,n,...a];[].forEach.call(e.children,o=>{const v=f.indexOf(o)===-1,x=!M8(o);v&&x&&Lh(o,p)})}function c_(e,t){let n=-1;return e.some((a,p)=>t(a)?(n=p,!0):!1),n}function z8(e,t){const n=[],a=e.container;if(!t.disableScrollLock){if(P8(a)){const o=TI(po(a));n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${uS(a)+o}px`;const v=po(a).querySelectorAll(".mui-fixed");[].forEach.call(v,x=>{n.push({value:x.style.paddingRight,property:"padding-right",el:x}),x.style.paddingRight=`${uS(x)+o}px`})}let f;if(a.parentNode instanceof DocumentFragment)f=po(a).body;else{const o=a.parentElement,v=_s(a);f=(o==null?void 0:o.nodeName)==="HTML"&&v.getComputedStyle(o).overflowY==="scroll"?o:a}n.push({value:f.style.overflow,property:"overflow",el:f},{value:f.style.overflowX,property:"overflow-x",el:f},{value:f.style.overflowY,property:"overflow-y",el:f}),f.style.overflow="hidden"}return()=>{n.forEach(({value:f,el:o,property:v})=>{f?o.style.setProperty(v,f):o.style.removeProperty(v)})}}function L8(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class R8{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let a=this.modals.indexOf(t);if(a!==-1)return a;a=this.modals.length,this.modals.push(t),t.modalRef&&Lh(t.modalRef,!1);const p=L8(n);cS(n,t.mount,t.modalRef,p,!0);const f=c_(this.containers,o=>o.container===n);return f!==-1?(this.containers[f].modals.push(t),a):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:p}),a)}mount(t,n){const a=c_(this.containers,f=>f.modals.indexOf(t)!==-1),p=this.containers[a];p.restore||(p.restore=z8(p,n))}remove(t,n=!0){const a=this.modals.indexOf(t);if(a===-1)return a;const p=c_(this.containers,o=>o.modals.indexOf(t)!==-1),f=this.containers[p];if(f.modals.splice(f.modals.indexOf(t),1),this.modals.splice(a,1),f.modals.length===0)f.restore&&f.restore(),t.modalRef&&Lh(t.modalRef,n),cS(f.container,t.mount,t.modalRef,f.hiddenSiblings,!1),this.containers.splice(p,1);else{const o=f.modals[f.modals.length-1];o.modalRef&&Lh(o.modalRef,!1)}return a}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function D8(e){return typeof e=="function"?e():e}function B8(e){return e?e.props.hasOwnProperty("in"):!1}const O8=new R8;function N8(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:a=!1,manager:p=O8,closeAfterTransition:f=!1,onTransitionEnter:o,onTransitionExited:v,children:x,onClose:S,open:k,rootRef:P}=e,I=te.useRef({}),q=te.useRef(null),V=te.useRef(null),H=Mi(V,P),[oe,$]=te.useState(!k),F=B8(x);let L=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(L=!1);const O=()=>po(q.current),Y=()=>(I.current.modalRef=V.current,I.current.mount=q.current,I.current),ne=()=>{p.mount(Y(),{disableScrollLock:a}),V.current&&(V.current.scrollTop=0)},ue=hs(()=>{const Se=D8(t)||O().body;p.add(Y(),Se),V.current&&ne()}),fe=te.useCallback(()=>p.isTopModal(Y()),[p]),Ce=hs(Se=>{q.current=Se,Se&&(k&&fe()?ne():V.current&&Lh(V.current,L))}),he=te.useCallback(()=>{p.remove(Y(),L)},[L,p]);te.useEffect(()=>()=>{he()},[he]),te.useEffect(()=>{k?ue():(!F||!f)&&he()},[k,he,F,f,ue]);const we=Se=>Te=>{var ze;(ze=Se.onKeyDown)==null||ze.call(Se,Te),!(Te.key!=="Escape"||Te.which===229||!fe())&&(n||(Te.stopPropagation(),S&&S(Te,"escapeKeyDown")))},ie=Se=>Te=>{var ze;(ze=Se.onClick)==null||ze.call(Se,Te),Te.target===Te.currentTarget&&S&&S(Te,"backdropClick")};return{getRootProps:(Se={})=>{const Te=$I(e);delete Te.onTransitionEnter,delete Te.onTransitionExited;const ze=ve({},Te,Se);return ve({role:"presentation"},ze,{onKeyDown:we(ze),ref:H})},getBackdropProps:(Se={})=>{const Te=Se;return ve({"aria-hidden":!0},Te,{onClick:ie(Te),open:k})},getTransitionProps:()=>{const Se=()=>{$(!1),o&&o()},Te=()=>{$(!0),v&&v(),f&&he()};return{onEnter:Ax(Se,x==null?void 0:x.props.onEnter),onExited:Ax(Te,x==null?void 0:x.props.onExited)}},rootRef:H,portalRef:Ce,isTopModal:fe,exited:oe,hasTransition:F}}const F8=["onChange","maxRows","minRows","style","value"];function eg(e){return parseInt(e,10)||0}const j8={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function pS(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const U8=te.forwardRef(function(t,n){const{onChange:a,maxRows:p,minRows:f=1,style:o,value:v}=t,x=Ft(t,F8),{current:S}=te.useRef(v!=null),k=te.useRef(null),P=Mi(n,k),I=te.useRef(null),q=te.useRef(0),[V,H]=te.useState({outerHeightStyle:0}),oe=te.useCallback(()=>{const O=k.current,ne=_s(O).getComputedStyle(O);if(ne.width==="0px")return{outerHeightStyle:0};const ue=I.current;ue.style.width=ne.width,ue.value=O.value||t.placeholder||"x",ue.value.slice(-1)===` +`&&(ue.value+=" ");const fe=ne.boxSizing,Ce=eg(ne.paddingBottom)+eg(ne.paddingTop),he=eg(ne.borderBottomWidth)+eg(ne.borderTopWidth),we=ue.scrollHeight;ue.value="x";const ie=ue.scrollHeight;let me=we;f&&(me=Math.max(Number(f)*ie,me)),p&&(me=Math.min(Number(p)*ie,me)),me=Math.max(me,ie);const Ne=me+(fe==="border-box"?Ce+he:0),$e=Math.abs(me-we)<=1;return{outerHeightStyle:Ne,overflow:$e}},[p,f,t.placeholder]),$=(O,Y)=>{const{outerHeightStyle:ne,overflow:ue}=Y;return q.current<20&&(ne>0&&Math.abs((O.outerHeightStyle||0)-ne)>1||O.overflow!==ue)?(q.current+=1,{overflow:ue,outerHeightStyle:ne}):O},F=te.useCallback(()=>{const O=oe();pS(O)||H(Y=>$(Y,O))},[oe]);ma(()=>{const O=()=>{const we=oe();pS(we)||S1.flushSync(()=>{H(ie=>$(ie,we))})},Y=()=>{q.current=0,O()};let ne;const ue=gf(Y),fe=k.current,Ce=_s(fe);Ce.addEventListener("resize",ue);let he;return typeof ResizeObserver<"u"&&(he=new ResizeObserver(Y),he.observe(fe)),()=>{ue.clear(),cancelAnimationFrame(ne),Ce.removeEventListener("resize",ue),he&&he.disconnect()}},[oe]),ma(()=>{F()}),te.useEffect(()=>{q.current=0},[v]);const L=O=>{q.current=0,S||F(),a&&a(O)};return ee.jsxs(te.Fragment,{children:[ee.jsx("textarea",ve({value:v,onChange:L,ref:P,rows:f,style:ve({height:V.outerHeightStyle,overflow:V.overflow?"hidden":void 0},o)},x)),ee.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:I,tabIndex:-1,style:ve({},j8.shadow,o,{paddingTop:0,paddingBottom:0})})]})});function Jp({props:e,states:t,muiFormControl:n}){return t.reduce((a,p)=>(a[p]=e[p],n&&typeof e[p]>"u"&&(a[p]=n[p]),a),{})}const V8=te.createContext(void 0),ub=V8;function ed(){return te.useContext(ub)}function $8(e){return ee.jsx(_N,ve({},e,{defaultTheme:pv,themeId:ff}))}function dS(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function my(e,t=!1){return e&&(dS(e.value)&&e.value!==""||t&&dS(e.defaultValue)&&e.defaultValue!=="")}function q8(e){return e.startAdornment}function W8(e){return Lr("MuiInputBase",e)}const G8=Er("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Gp=G8,H8=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Sv=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Jt(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Ev=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Z8=e=>{const{classes:t,color:n,disabled:a,error:p,endAdornment:f,focused:o,formControl:v,fullWidth:x,hiddenLabel:S,multiline:k,readOnly:P,size:I,startAdornment:q,type:V}=e,H={root:["root",`color${Jt(n)}`,a&&"disabled",p&&"error",x&&"fullWidth",o&&"focused",v&&"formControl",I&&I!=="medium"&&`size${Jt(I)}`,k&&"multiline",q&&"adornedStart",f&&"adornedEnd",S&&"hiddenLabel",P&&"readOnly"],input:["input",a&&"disabled",V==="search"&&"inputTypeSearch",k&&"inputMultiline",I==="small"&&"inputSizeSmall",S&&"inputHiddenLabel",q&&"inputAdornedStart",f&&"inputAdornedEnd",P&&"readOnly"]};return Nr(H,W8,t)},Cv=zt("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Sv})(({theme:e,ownerState:t})=>ve({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Gp.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&ve({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),kv=zt("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Ev})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",a=ve({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),p={opacity:"0 !important"},f=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return ve({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Gp.formControl} &`]:{"&::-webkit-input-placeholder":p,"&::-moz-placeholder":p,"&:-ms-input-placeholder":p,"&::-ms-input-placeholder":p,"&:focus::-webkit-input-placeholder":f,"&:focus::-moz-placeholder":f,"&:focus:-ms-input-placeholder":f,"&:focus::-ms-input-placeholder":f},[`&.${Gp.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),K8=ee.jsx($8,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),X8=te.forwardRef(function(t,n){var a;const p=Fr({props:t,name:"MuiInputBase"}),{"aria-describedby":f,autoComplete:o,autoFocus:v,className:x,components:S={},componentsProps:k={},defaultValue:P,disabled:I,disableInjectingGlobalStyles:q,endAdornment:V,fullWidth:H=!1,id:oe,inputComponent:$="input",inputProps:F={},inputRef:L,maxRows:O,minRows:Y,multiline:ne=!1,name:ue,onBlur:fe,onChange:Ce,onClick:he,onFocus:we,onKeyDown:ie,onKeyUp:me,placeholder:Ne,readOnly:$e,renderSuffix:Se,rows:Te,slotProps:ze={},slots:He={},startAdornment:rt,type:qe="text",value:nt}=p,ct=Ft(p,H8),Le=F.value!=null?F.value:nt,{current:vt}=te.useRef(Le!=null),$t=te.useRef(),Je=te.useCallback(Cr=>{},[]),xr=Mi($t,L,F.ref,Je),[Ct,Ht]=te.useState(!1),er=ed(),qt=Jp({props:p,muiFormControl:er,states:["color","disabled","error","hiddenLabel","size","required","filled"]});qt.focused=er?er.focused:Ct,te.useEffect(()=>{!er&&I&&Ct&&(Ht(!1),fe&&fe())},[er,I,Ct,fe]);const lt=er&&er.onFilled,Ot=er&&er.onEmpty,tr=te.useCallback(Cr=>{my(Cr)?lt&<():Ot&&Ot()},[lt,Ot]);ma(()=>{vt&&tr({value:Le})},[Le,tr,vt]);const yr=Cr=>{if(qt.disabled){Cr.stopPropagation();return}we&&we(Cr),F.onFocus&&F.onFocus(Cr),er&&er.onFocus?er.onFocus(Cr):Ht(!0)},Pr=Cr=>{fe&&fe(Cr),F.onBlur&&F.onBlur(Cr),er&&er.onBlur?er.onBlur(Cr):Ht(!1)},Qt=(Cr,...Lt)=>{if(!vt){const an=Cr.target||$t.current;if(an==null)throw new Error(Xl(1));tr({value:an.value})}F.onChange&&F.onChange(Cr,...Lt),Ce&&Ce(Cr,...Lt)};te.useEffect(()=>{tr($t.current)},[]);const Rr=Cr=>{$t.current&&Cr.currentTarget===Cr.target&&$t.current.focus(),he&&he(Cr)};let sr=$,pr=F;ne&&sr==="input"&&(Te?pr=ve({type:void 0,minRows:Te,maxRows:Te},pr):pr=ve({type:void 0,maxRows:O,minRows:Y},pr),sr=U8);const In=Cr=>{tr(Cr.animationName==="mui-auto-fill-cancel"?$t.current:{value:"x"})};te.useEffect(()=>{er&&er.setAdornedStart(!!rt)},[er,rt]);const Dr=ve({},p,{color:qt.color||"primary",disabled:qt.disabled,endAdornment:V,error:qt.error,focused:qt.focused,formControl:er,fullWidth:H,hiddenLabel:qt.hiddenLabel,multiline:ne,size:qt.size,startAdornment:rt,type:qe}),Yt=Z8(Dr),un=He.root||S.Root||Cv,Xr=ze.root||k.root||{},cn=He.input||S.Input||kv;return pr=ve({},pr,(a=ze.input)!=null?a:k.input),ee.jsxs(te.Fragment,{children:[!q&&K8,ee.jsxs(un,ve({},Xr,!Wp(un)&&{ownerState:ve({},Dr,Xr.ownerState)},{ref:n,onClick:Rr},ct,{className:Ut(Yt.root,Xr.className,x,$e&&"MuiInputBase-readOnly"),children:[rt,ee.jsx(ub.Provider,{value:null,children:ee.jsx(cn,ve({ownerState:Dr,"aria-invalid":qt.error,"aria-describedby":f,autoComplete:o,autoFocus:v,defaultValue:P,disabled:qt.disabled,id:oe,onAnimationStart:In,name:ue,placeholder:Ne,readOnly:$e,required:qt.required,rows:Te,value:Le,onKeyDown:ie,onKeyUp:me,type:qe},pr,!Wp(cn)&&{as:sr,ownerState:ve({},Dr,pr.ownerState)},{ref:xr,className:Ut(Yt.input,pr.className,$e&&"MuiInputBase-readOnly"),onBlur:Pr,onChange:Qt,onFocus:yr}))}),V,Se?Se(ve({},qt,{startAdornment:rt})):null]}))]})}),cb=X8;function Q8(e){return Lr("MuiInput",e)}const Y8=ve({},Gp,Er("MuiInput",["root","underline","input"])),lh=Y8;function J8(e){return Lr("MuiOutlinedInput",e)}const ej=ve({},Gp,Er("MuiOutlinedInput",["root","notchedOutline","input"])),Tl=ej;function tj(e){return Lr("MuiFilledInput",e)}const rj=ve({},Gp,Er("MuiFilledInput",["root","underline","input"])),zu=rj,nj=dv(ee.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ij=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],oj={entering:{opacity:1},entered:{opacity:1}},aj=te.forwardRef(function(t,n){const a=Yp(),p={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{addEndListener:f,appear:o=!0,children:v,easing:x,in:S,onEnter:k,onEntered:P,onEntering:I,onExit:q,onExited:V,onExiting:H,style:oe,timeout:$=p,TransitionComponent:F=UI}=t,L=Ft(t,ij),O=te.useRef(null),Y=Mi(O,v.ref,n),ne=Ne=>$e=>{if(Ne){const Se=O.current;$e===void 0?Ne(Se):Ne(Se,$e)}},ue=ne(I),fe=ne((Ne,$e)=>{VI(Ne);const Se=fy({style:oe,timeout:$,easing:x},{mode:"enter"});Ne.style.webkitTransition=a.transitions.create("opacity",Se),Ne.style.transition=a.transitions.create("opacity",Se),k&&k(Ne,$e)}),Ce=ne(P),he=ne(H),we=ne(Ne=>{const $e=fy({style:oe,timeout:$,easing:x},{mode:"exit"});Ne.style.webkitTransition=a.transitions.create("opacity",$e),Ne.style.transition=a.transitions.create("opacity",$e),q&&q(Ne)}),ie=ne(V),me=Ne=>{f&&f(O.current,Ne)};return ee.jsx(F,ve({appear:o,in:S,nodeRef:O,onEnter:fe,onEntered:Ce,onEntering:ue,onExit:we,onExited:ie,onExiting:he,addEndListener:me,timeout:$},L,{children:(Ne,$e)=>te.cloneElement(v,ve({style:ve({opacity:0,visibility:Ne==="exited"&&!S?"hidden":void 0},oj[Ne],oe,v.props.style),ref:Y},$e))}))}),qI=aj;function sj(e){return Lr("MuiBackdrop",e)}Er("MuiBackdrop",["root","invisible"]);const lj=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],uj=e=>{const{classes:t,invisible:n}=e;return Nr({root:["root",n&&"invisible"]},sj,t)},cj=zt("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>ve({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),pj=te.forwardRef(function(t,n){var a,p,f;const o=Fr({props:t,name:"MuiBackdrop"}),{children:v,className:x,component:S="div",components:k={},componentsProps:P={},invisible:I=!1,open:q,slotProps:V={},slots:H={},TransitionComponent:oe=qI,transitionDuration:$}=o,F=Ft(o,lj),L=ve({},o,{component:S,invisible:I}),O=uj(L),Y=(a=V.root)!=null?a:P.root;return ee.jsx(oe,ve({in:q,timeout:$},F,{children:ee.jsx(cj,ve({"aria-hidden":!0},Y,{as:(p=(f=H.root)!=null?f:k.Root)!=null?p:S,className:Ut(O.root,x,Y==null?void 0:Y.className),ownerState:ve({},L,Y==null?void 0:Y.ownerState),classes:O,ref:n,children:v}))}))}),WI=pj,dj=Er("MuiBox",["root"]),hj=dj,fj=OI(),mj=AN({themeId:ff,defaultTheme:fj,defaultClassName:hj.root,generateClassName:Q1.generate}),ii=mj;function gj(e){return Lr("MuiButton",e)}const yj=Er("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),tg=yj,vj=te.createContext({}),_j=vj,xj=te.createContext(void 0),bj=xj,wj=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Aj=e=>{const{color:t,disableElevation:n,fullWidth:a,size:p,variant:f,classes:o}=e,v={root:["root",f,`${f}${Jt(t)}`,`size${Jt(p)}`,`${f}Size${Jt(p)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",a&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Jt(p)}`],endIcon:["endIcon",`iconSize${Jt(p)}`]},x=Nr(v,gj,o);return ve({},o,x)},GI=e=>ve({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Sj=zt(nc,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Jt(n.color)}`],t[`size${Jt(n.size)}`],t[`${n.variant}Size${Jt(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,a;const p=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],f=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return ve({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":ve({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:hi(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:hi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:hi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:f,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":ve({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${tg.focusVisible}`]:ve({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${tg.disabled}`]:ve({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${hi(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(a=e.palette).getContrastText)==null?void 0:n.call(a,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:p,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${tg.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${tg.disabled}`]:{boxShadow:"none"}}),Ej=zt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Jt(n.size)}`]]}})(({ownerState:e})=>ve({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},GI(e))),Cj=zt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Jt(n.size)}`]]}})(({ownerState:e})=>ve({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},GI(e))),kj=te.forwardRef(function(t,n){const a=te.useContext(_j),p=te.useContext(bj),f=X1(a,t),o=Fr({props:f,name:"MuiButton"}),{children:v,color:x="primary",component:S="button",className:k,disabled:P=!1,disableElevation:I=!1,disableFocusRipple:q=!1,endIcon:V,focusVisibleClassName:H,fullWidth:oe=!1,size:$="medium",startIcon:F,type:L,variant:O="text"}=o,Y=Ft(o,wj),ne=ve({},o,{color:x,component:S,disabled:P,disableElevation:I,disableFocusRipple:q,fullWidth:oe,size:$,type:L,variant:O}),ue=Aj(ne),fe=F&&ee.jsx(Ej,{className:ue.startIcon,ownerState:ne,children:F}),Ce=V&&ee.jsx(Cj,{className:ue.endIcon,ownerState:ne,children:V}),he=p||"";return ee.jsxs(Sj,ve({ownerState:ne,className:Ut(a.className,ue.root,k,he),component:S,disabled:P,focusRipple:!q,focusVisibleClassName:Ut(ue.focusVisible,H),ref:n,type:L},Y,{classes:ue,children:[fe,v,Ce]}))}),rg=kj;function Ij(e){return Lr("MuiModal",e)}Er("MuiModal",["root","hidden","backdrop"]);const Tj=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Pj=e=>{const{open:t,exited:n,classes:a}=e;return Nr({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ij,a)},Mj=zt("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>ve({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),zj=zt(WI,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Lj=te.forwardRef(function(t,n){var a,p,f,o,v,x;const S=Fr({name:"MuiModal",props:t}),{BackdropComponent:k=zj,BackdropProps:P,className:I,closeAfterTransition:q=!1,children:V,container:H,component:oe,components:$={},componentsProps:F={},disableAutoFocus:L=!1,disableEnforceFocus:O=!1,disableEscapeKeyDown:Y=!1,disablePortal:ne=!1,disableRestoreFocus:ue=!1,disableScrollLock:fe=!1,hideBackdrop:Ce=!1,keepMounted:he=!1,onBackdropClick:we,open:ie,slotProps:me,slots:Ne}=S,$e=Ft(S,Tj),Se=ve({},S,{closeAfterTransition:q,disableAutoFocus:L,disableEnforceFocus:O,disableEscapeKeyDown:Y,disablePortal:ne,disableRestoreFocus:ue,disableScrollLock:fe,hideBackdrop:Ce,keepMounted:he}),{getRootProps:Te,getBackdropProps:ze,getTransitionProps:He,portalRef:rt,isTopModal:qe,exited:nt,hasTransition:ct}=N8(ve({},Se,{rootRef:n})),Le=ve({},Se,{exited:nt}),vt=Pj(Le),$t={};if(V.props.tabIndex===void 0&&($t.tabIndex="-1"),ct){const{onEnter:lt,onExited:Ot}=He();$t.onEnter=lt,$t.onExited=Ot}const Je=(a=(p=Ne==null?void 0:Ne.root)!=null?p:$.Root)!=null?a:Mj,xr=(f=(o=Ne==null?void 0:Ne.backdrop)!=null?o:$.Backdrop)!=null?f:k,Ct=(v=me==null?void 0:me.root)!=null?v:F.root,Ht=(x=me==null?void 0:me.backdrop)!=null?x:F.backdrop,er=xs({elementType:Je,externalSlotProps:Ct,externalForwardedProps:$e,getSlotProps:Te,additionalProps:{ref:n,as:oe},ownerState:Le,className:Ut(I,Ct==null?void 0:Ct.className,vt==null?void 0:vt.root,!Le.open&&Le.exited&&(vt==null?void 0:vt.hidden))}),qt=xs({elementType:xr,externalSlotProps:Ht,additionalProps:P,getSlotProps:lt=>ze(ve({},lt,{onClick:Ot=>{we&&we(Ot),lt!=null&<.onClick&<.onClick(Ot)}})),className:Ut(Ht==null?void 0:Ht.className,P==null?void 0:P.className,vt==null?void 0:vt.backdrop),ownerState:Le});return!he&&!ie&&(!ct||nt)?null:ee.jsx(T8,{ref:rt,container:H,disablePortal:ne,children:ee.jsxs(Je,ve({},er,{children:[!Ce&&k?ee.jsx(xr,ve({},qt)):null,ee.jsx(k8,{disableEnforceFocus:O,disableAutoFocus:L,disableRestoreFocus:ue,isEnabled:qe,open:ie,children:te.cloneElement(V,$t)})]}))})}),HI=Lj;function Rj(e){return Lr("MuiDialog",e)}const Dj=Er("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),p_=Dj,Bj=te.createContext({}),ZI=Bj,Oj=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Nj=zt(WI,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Fj=e=>{const{classes:t,scroll:n,maxWidth:a,fullWidth:p,fullScreen:f}=e,o={root:["root"],container:["container",`scroll${Jt(n)}`],paper:["paper",`paperScroll${Jt(n)}`,`paperWidth${Jt(String(a))}`,p&&"paperFullWidth",f&&"paperFullScreen"]};return Nr(o,Rj,t)},jj=zt(HI,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Uj=zt("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Jt(n.scroll)}`]]}})(({ownerState:e})=>ve({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),Vj=zt(lb,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Jt(n.scroll)}`],t[`paperWidth${Jt(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>ve({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${p_.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${p_.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${p_.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),$j=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiDialog"}),p=Yp(),f={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":v,BackdropComponent:x,BackdropProps:S,children:k,className:P,disableEscapeKeyDown:I=!1,fullScreen:q=!1,fullWidth:V=!1,maxWidth:H="sm",onBackdropClick:oe,onClose:$,open:F,PaperComponent:L=lb,PaperProps:O={},scroll:Y="paper",TransitionComponent:ne=qI,transitionDuration:ue=f,TransitionProps:fe}=a,Ce=Ft(a,Oj),he=ve({},a,{disableEscapeKeyDown:I,fullScreen:q,fullWidth:V,maxWidth:H,scroll:Y}),we=Fj(he),ie=te.useRef(),me=Te=>{ie.current=Te.target===Te.currentTarget},Ne=Te=>{ie.current&&(ie.current=null,oe&&oe(Te),$&&$(Te,"backdropClick"))},$e=Yy(v),Se=te.useMemo(()=>({titleId:$e}),[$e]);return ee.jsx(jj,ve({className:Ut(we.root,P),closeAfterTransition:!0,components:{Backdrop:Nj},componentsProps:{backdrop:ve({transitionDuration:ue,as:x},S)},disableEscapeKeyDown:I,onClose:$,open:F,ref:n,onClick:Ne,ownerState:he},Ce,{children:ee.jsx(ne,ve({appear:!0,in:F,timeout:ue,role:"presentation"},fe,{children:ee.jsx(Uj,{className:Ut(we.container),onMouseDown:me,ownerState:he,children:ee.jsx(Vj,ve({as:L,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":$e},O,{className:Ut(we.paper,O.className),ownerState:he,children:ee.jsx(ZI.Provider,{value:Se,children:k})}))})}))}))}),qj=$j;function Wj(e){return Lr("MuiDialogActions",e)}Er("MuiDialogActions",["root","spacing"]);const Gj=["className","disableSpacing"],Hj=e=>{const{classes:t,disableSpacing:n}=e;return Nr({root:["root",!n&&"spacing"]},Wj,t)},Zj=zt("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>ve({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Kj=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiDialogActions"}),{className:p,disableSpacing:f=!1}=a,o=Ft(a,Gj),v=ve({},a,{disableSpacing:f}),x=Hj(v);return ee.jsx(Zj,ve({className:Ut(x.root,p),ownerState:v,ref:n},o))}),Xj=Kj;function Qj(e){return Lr("MuiDialogContent",e)}Er("MuiDialogContent",["root","dividers"]);function Yj(e){return Lr("MuiDialogTitle",e)}const Jj=Er("MuiDialogTitle",["root"]),eU=Jj,tU=["className","dividers"],rU=e=>{const{classes:t,dividers:n}=e;return Nr({root:["root",n&&"dividers"]},Qj,t)},nU=zt("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>ve({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${eU.root} + &`]:{paddingTop:0}})),iU=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiDialogContent"}),{className:p,dividers:f=!1}=a,o=Ft(a,tU),v=ve({},a,{dividers:f}),x=rU(v);return ee.jsx(nU,ve({className:Ut(x.root,p),ownerState:v,ref:n},o))}),oU=iU,aU=["className","id"],sU=e=>{const{classes:t}=e;return Nr({root:["root"]},Yj,t)},lU=zt(La,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),uU=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiDialogTitle"}),{className:p,id:f}=a,o=Ft(a,aU),v=a,x=sU(v),{titleId:S=f}=te.useContext(ZI);return ee.jsx(lU,ve({component:"h2",className:Ut(x.root,p),ownerState:v,ref:n,variant:"h6",id:f??S},o))}),cU=uU,pU=Er("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),hS=pU,dU=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],hU=e=>{const{classes:t,disableUnderline:n}=e,p=Nr({root:["root",!n&&"underline"],input:["input"]},tj,t);return ve({},t,p)},fU=zt(Cv,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Sv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const a=e.palette.mode==="light",p=a?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",f=a?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=a?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",v=a?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return ve({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:f,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:f}},[`&.${zu.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:f},[`&.${zu.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:v}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zu.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zu.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:p}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zu.disabled}, .${zu.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${zu.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&ve({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),mU=zt(kv,{name:"MuiFilledInput",slot:"Input",overridesResolver:Ev})(({theme:e,ownerState:t})=>ve({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),KI=te.forwardRef(function(t,n){var a,p,f,o;const v=Fr({props:t,name:"MuiFilledInput"}),{components:x={},componentsProps:S,fullWidth:k=!1,inputComponent:P="input",multiline:I=!1,slotProps:q,slots:V={},type:H="text"}=v,oe=Ft(v,dU),$=ve({},v,{fullWidth:k,inputComponent:P,multiline:I,type:H}),F=hU(v),L={root:{ownerState:$},input:{ownerState:$}},O=q??S?Mo(L,q??S):L,Y=(a=(p=V.root)!=null?p:x.Root)!=null?a:fU,ne=(f=(o=V.input)!=null?o:x.Input)!=null?f:mU;return ee.jsx(cb,ve({slots:{root:Y,input:ne},componentsProps:O,fullWidth:k,inputComponent:P,multiline:I,ref:n,type:H},oe,{classes:F}))});KI.muiName="Input";const XI=KI;function gU(e){return Lr("MuiFormControl",e)}Er("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const yU=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],vU=e=>{const{classes:t,margin:n,fullWidth:a}=e,p={root:["root",n!=="none"&&`margin${Jt(n)}`,a&&"fullWidth"]};return Nr(p,gU,t)},_U=zt("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>ve({},t.root,t[`margin${Jt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>ve({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),xU=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiFormControl"}),{children:p,className:f,color:o="primary",component:v="div",disabled:x=!1,error:S=!1,focused:k,fullWidth:P=!1,hiddenLabel:I=!1,margin:q="none",required:V=!1,size:H="medium",variant:oe="outlined"}=a,$=Ft(a,yU),F=ve({},a,{color:o,component:v,disabled:x,error:S,fullWidth:P,hiddenLabel:I,margin:q,required:V,size:H,variant:oe}),L=vU(F),[O,Y]=te.useState(()=>{let me=!1;return p&&te.Children.forEach(p,Ne=>{if(!Ph(Ne,["Input","Select"]))return;const $e=Ph(Ne,["Select"])?Ne.props.input:Ne;$e&&q8($e.props)&&(me=!0)}),me}),[ne,ue]=te.useState(()=>{let me=!1;return p&&te.Children.forEach(p,Ne=>{Ph(Ne,["Input","Select"])&&(my(Ne.props,!0)||my(Ne.props.inputProps,!0))&&(me=!0)}),me}),[fe,Ce]=te.useState(!1);x&&fe&&Ce(!1);const he=k!==void 0&&!x?k:fe;let we;const ie=te.useMemo(()=>({adornedStart:O,setAdornedStart:Y,color:o,disabled:x,error:S,filled:ne,focused:he,fullWidth:P,hiddenLabel:I,size:H,onBlur:()=>{Ce(!1)},onEmpty:()=>{ue(!1)},onFilled:()=>{ue(!0)},onFocus:()=>{Ce(!0)},registerEffect:we,required:V,variant:oe}),[O,o,x,S,ne,he,P,I,we,V,H,oe]);return ee.jsx(ub.Provider,{value:ie,children:ee.jsx(_U,ve({as:v,ownerState:F,className:Ut(L.root,f),ref:n},$,{children:p}))})}),QI=xU;function bU(e){return Lr("MuiFormHelperText",e)}const wU=Er("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),fS=wU;var mS;const AU=["children","className","component","disabled","error","filled","focused","margin","required","variant"],SU=e=>{const{classes:t,contained:n,size:a,disabled:p,error:f,filled:o,focused:v,required:x}=e,S={root:["root",p&&"disabled",f&&"error",a&&`size${Jt(a)}`,n&&"contained",v&&"focused",o&&"filled",x&&"required"]};return Nr(S,bU,t)},EU=zt("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Jt(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>ve({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${fS.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${fS.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),CU=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiFormHelperText"}),{children:p,className:f,component:o="p"}=a,v=Ft(a,AU),x=ed(),S=Jp({props:a,muiFormControl:x,states:["variant","size","disabled","error","filled","focused","required"]}),k=ve({},a,{component:o,contained:S.variant==="filled"||S.variant==="outlined",variant:S.variant,size:S.size,disabled:S.disabled,error:S.error,filled:S.filled,focused:S.focused,required:S.required}),P=SU(k);return ee.jsx(EU,ve({as:o,ownerState:k,className:Ut(P.root,f),ref:n},v,{children:p===" "?mS||(mS=ee.jsx("span",{className:"notranslate",children:"​"})):p}))}),kU=CU;function IU(e){return Lr("MuiFormLabel",e)}const TU=Er("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Rh=TU,PU=["children","className","color","component","disabled","error","filled","focused","required"],MU=e=>{const{classes:t,color:n,focused:a,disabled:p,error:f,filled:o,required:v}=e,x={root:["root",`color${Jt(n)}`,p&&"disabled",f&&"error",o&&"filled",a&&"focused",v&&"required"],asterisk:["asterisk",f&&"error"]};return Nr(x,IU,t)},zU=zt("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>ve({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>ve({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Rh.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Rh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Rh.error}`]:{color:(e.vars||e).palette.error.main}})),LU=zt("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Rh.error}`]:{color:(e.vars||e).palette.error.main}})),RU=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiFormLabel"}),{children:p,className:f,component:o="label"}=a,v=Ft(a,PU),x=ed(),S=Jp({props:a,muiFormControl:x,states:["color","required","focused","disabled","error","filled"]}),k=ve({},a,{color:S.color||"primary",component:o,disabled:S.disabled,error:S.error,filled:S.filled,focused:S.focused,required:S.required}),P=MU(k);return ee.jsxs(zU,ve({as:o,ownerState:k,className:Ut(P.root,f),ref:n},v,{children:[p,S.required&&ee.jsxs(LU,{ownerState:k,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}))}),DU=RU,BU=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Tx(e){return`scale(${e}, ${e**2})`}const OU={entering:{opacity:1,transform:Tx(1)},entered:{opacity:1,transform:"none"}},d_=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),YI=te.forwardRef(function(t,n){const{addEndListener:a,appear:p=!0,children:f,easing:o,in:v,onEnter:x,onEntered:S,onEntering:k,onExit:P,onExited:I,onExiting:q,style:V,timeout:H="auto",TransitionComponent:oe=UI}=t,$=Ft(t,BU),F=kI(),L=te.useRef(),O=Yp(),Y=te.useRef(null),ne=Mi(Y,f.ref,n),ue=$e=>Se=>{if($e){const Te=Y.current;Se===void 0?$e(Te):$e(Te,Se)}},fe=ue(k),Ce=ue(($e,Se)=>{VI($e);const{duration:Te,delay:ze,easing:He}=fy({style:V,timeout:H,easing:o},{mode:"enter"});let rt;H==="auto"?(rt=O.transitions.getAutoHeightDuration($e.clientHeight),L.current=rt):rt=Te,$e.style.transition=[O.transitions.create("opacity",{duration:rt,delay:ze}),O.transitions.create("transform",{duration:d_?rt:rt*.666,delay:ze,easing:He})].join(","),x&&x($e,Se)}),he=ue(S),we=ue(q),ie=ue($e=>{const{duration:Se,delay:Te,easing:ze}=fy({style:V,timeout:H,easing:o},{mode:"exit"});let He;H==="auto"?(He=O.transitions.getAutoHeightDuration($e.clientHeight),L.current=He):He=Se,$e.style.transition=[O.transitions.create("opacity",{duration:He,delay:Te}),O.transitions.create("transform",{duration:d_?He:He*.666,delay:d_?Te:Te||He*.333,easing:ze})].join(","),$e.style.opacity=0,$e.style.transform=Tx(.75),P&&P($e)}),me=ue(I),Ne=$e=>{H==="auto"&&F.start(L.current||0,$e),a&&a(Y.current,$e)};return ee.jsx(oe,ve({appear:p,in:v,nodeRef:Y,onEnter:Ce,onEntered:he,onEntering:fe,onExit:ie,onExited:me,onExiting:we,addEndListener:Ne,timeout:H==="auto"?null:H},$,{children:($e,Se)=>te.cloneElement(f,ve({style:ve({opacity:0,transform:Tx(.75),visibility:$e==="exited"&&!v?"hidden":void 0},OU[$e],V,f.props.style),ref:ne},Se))}))});YI.muiSupportAuto=!0;const NU=YI,FU=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],jU=e=>{const{classes:t,disableUnderline:n}=e,p=Nr({root:["root",!n&&"underline"],input:["input"]},Q8,t);return ve({},t,p)},UU=zt(Cv,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Sv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let a=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(a=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),ve({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${lh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lh.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${a}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${lh.disabled}, .${lh.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${a}`}},[`&.${lh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),VU=zt(kv,{name:"MuiInput",slot:"Input",overridesResolver:Ev})({}),JI=te.forwardRef(function(t,n){var a,p,f,o;const v=Fr({props:t,name:"MuiInput"}),{disableUnderline:x,components:S={},componentsProps:k,fullWidth:P=!1,inputComponent:I="input",multiline:q=!1,slotProps:V,slots:H={},type:oe="text"}=v,$=Ft(v,FU),F=jU(v),O={root:{ownerState:{disableUnderline:x}}},Y=V??k?Mo(V??k,O):O,ne=(a=(p=H.root)!=null?p:S.Root)!=null?a:UU,ue=(f=(o=H.input)!=null?o:S.Input)!=null?f:VU;return ee.jsx(cb,ve({slots:{root:ne,input:ue},slotProps:Y,fullWidth:P,inputComponent:I,multiline:q,ref:n,type:oe},$,{classes:F}))});JI.muiName="Input";const eT=JI;function $U(e){return Lr("MuiInputLabel",e)}Er("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const qU=["disableAnimation","margin","shrink","variant","className"],WU=e=>{const{classes:t,formControl:n,size:a,shrink:p,disableAnimation:f,variant:o,required:v}=e,x={root:["root",n&&"formControl",!f&&"animated",p&&"shrink",a&&a!=="normal"&&`size${Jt(a)}`,o],asterisk:[v&&"asterisk"]},S=Nr(x,$U,t);return ve({},t,S)},GU=zt(DU,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Rh.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>ve({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&ve({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&ve({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&ve({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),HU=te.forwardRef(function(t,n){const a=Fr({name:"MuiInputLabel",props:t}),{disableAnimation:p=!1,shrink:f,className:o}=a,v=Ft(a,qU),x=ed();let S=f;typeof S>"u"&&x&&(S=x.filled||x.focused||x.adornedStart);const k=Jp({props:a,muiFormControl:x,states:["size","variant","required","focused"]}),P=ve({},a,{disableAnimation:p,formControl:x,shrink:S,size:k.size,variant:k.variant,required:k.required,focused:k.focused}),I=WU(P);return ee.jsx(GU,ve({"data-shrink":S,ownerState:P,ref:n,className:Ut(I.root,o)},v,{classes:I}))}),ZU=HU,KU=te.createContext({}),vs=KU;function XU(e){return Lr("MuiList",e)}Er("MuiList",["root","padding","dense","subheader"]);const QU=["children","className","component","dense","disablePadding","subheader"],YU=e=>{const{classes:t,disablePadding:n,dense:a,subheader:p}=e;return Nr({root:["root",!n&&"padding",a&&"dense",p&&"subheader"]},XU,t)},JU=zt("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>ve({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),eV=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiList"}),{children:p,className:f,component:o="ul",dense:v=!1,disablePadding:x=!1,subheader:S}=a,k=Ft(a,QU),P=te.useMemo(()=>({dense:v}),[v]),I=ve({},a,{component:o,dense:v,disablePadding:x}),q=YU(I);return ee.jsx(vs.Provider,{value:P,children:ee.jsxs(JU,ve({as:o,className:Ut(q.root,f),ref:n,ownerState:I},k,{children:[S,p]}))})}),Iv=eV;function tV(e){return Lr("MuiListItem",e)}const rV=Er("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),sp=rV;function nV(e){return Lr("MuiListItemButton",e)}const iV=Er("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),lp=iV,oV=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],aV=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},sV=e=>{const{alignItems:t,classes:n,dense:a,disabled:p,disableGutters:f,divider:o,selected:v}=e,S=Nr({root:["root",a&&"dense",!f&&"gutters",o&&"divider",p&&"disabled",t==="flex-start"&&"alignItemsFlexStart",v&&"selected"]},nV,n);return ve({},n,S)},lV=zt(nc,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:aV})(({theme:e,ownerState:t})=>ve({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${lp.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:hi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:hi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lp.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:hi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:hi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${lp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),uV=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiListItemButton"}),{alignItems:p="center",autoFocus:f=!1,component:o="div",children:v,dense:x=!1,disableGutters:S=!1,divider:k=!1,focusVisibleClassName:P,selected:I=!1,className:q}=a,V=Ft(a,oV),H=te.useContext(vs),oe=te.useMemo(()=>({dense:x||H.dense||!1,alignItems:p,disableGutters:S}),[p,H.dense,x,S]),$=te.useRef(null);ma(()=>{f&&$.current&&$.current.focus()},[f]);const F=ve({},a,{alignItems:p,dense:oe.dense,disableGutters:S,divider:k,selected:I}),L=sV(F),O=Mi($,n);return ee.jsx(vs.Provider,{value:oe,children:ee.jsx(lV,ve({ref:O,href:V.href||V.to,component:(V.href||V.to)&&o==="div"?"button":o,focusVisibleClassName:Ut(L.focusVisible,P),ownerState:F,className:Ut(L.root,q)},V,{classes:L,children:v}))})}),cV=uV;function pV(e){return Lr("MuiListItemSecondaryAction",e)}Er("MuiListItemSecondaryAction",["root","disableGutters"]);const dV=["className"],hV=e=>{const{disableGutters:t,classes:n}=e;return Nr({root:["root",t&&"disableGutters"]},pV,n)},fV=zt("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>ve({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),tT=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiListItemSecondaryAction"}),{className:p}=a,f=Ft(a,dV),o=te.useContext(vs),v=ve({},a,{disableGutters:o.disableGutters}),x=hV(v);return ee.jsx(fV,ve({className:Ut(x.root,p),ownerState:v,ref:n},f))});tT.muiName="ListItemSecondaryAction";const mV=tT,gV=["className"],yV=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],vV=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},_V=e=>{const{alignItems:t,button:n,classes:a,dense:p,disabled:f,disableGutters:o,disablePadding:v,divider:x,hasSecondaryAction:S,selected:k}=e;return Nr({root:["root",p&&"dense",!o&&"gutters",!v&&"padding",x&&"divider",f&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",S&&"secondaryAction",k&&"selected"],container:["container"]},tV,a)},xV=zt("div",{name:"MuiListItem",slot:"Root",overridesResolver:vV})(({theme:e,ownerState:t})=>ve({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&ve({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${lp.root}`]:{paddingRight:48}},{[`&.${sp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${sp.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:hi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${sp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:hi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${sp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${sp.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:hi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:hi(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),bV=zt("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),wV=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiListItem"}),{alignItems:p="center",autoFocus:f=!1,button:o=!1,children:v,className:x,component:S,components:k={},componentsProps:P={},ContainerComponent:I="li",ContainerProps:{className:q}={},dense:V=!1,disabled:H=!1,disableGutters:oe=!1,disablePadding:$=!1,divider:F=!1,focusVisibleClassName:L,secondaryAction:O,selected:Y=!1,slotProps:ne={},slots:ue={}}=a,fe=Ft(a.ContainerProps,gV),Ce=Ft(a,yV),he=te.useContext(vs),we=te.useMemo(()=>({dense:V||he.dense||!1,alignItems:p,disableGutters:oe}),[p,he.dense,V,oe]),ie=te.useRef(null);ma(()=>{f&&ie.current&&ie.current.focus()},[f]);const me=te.Children.toArray(v),Ne=me.length&&Ph(me[me.length-1],["ListItemSecondaryAction"]),$e=ve({},a,{alignItems:p,autoFocus:f,button:o,dense:we.dense,disabled:H,disableGutters:oe,disablePadding:$,divider:F,hasSecondaryAction:Ne,selected:Y}),Se=_V($e),Te=Mi(ie,n),ze=ue.root||k.Root||xV,He=ne.root||P.root||{},rt=ve({className:Ut(Se.root,He.className,x),disabled:H},Ce);let qe=S||"li";return o&&(rt.component=S||"div",rt.focusVisibleClassName=Ut(sp.focusVisible,L),qe=nc),Ne?(qe=!rt.component&&!S?"div":qe,I==="li"&&(qe==="li"?qe="div":rt.component==="li"&&(rt.component="div")),ee.jsx(vs.Provider,{value:we,children:ee.jsxs(bV,ve({as:I,className:Ut(Se.container,q),ref:Te,ownerState:$e},fe,{children:[ee.jsx(ze,ve({},He,!Wp(ze)&&{as:qe,ownerState:ve({},$e,He.ownerState)},rt,{children:me})),me.pop()]}))})):ee.jsx(vs.Provider,{value:we,children:ee.jsxs(ze,ve({},He,{as:qe,ref:Te},!Wp(ze)&&{ownerState:ve({},$e,He.ownerState)},rt,{children:[me,O&&ee.jsx(mV,{children:O})]}))})}),pb=wV,AV=Er("MuiListItemIcon",["root","alignItemsFlexStart"]),gS=AV;function SV(e){return Lr("MuiListItemText",e)}const EV=Er("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),gy=EV,CV=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],kV=e=>{const{classes:t,inset:n,primary:a,secondary:p,dense:f}=e;return Nr({root:["root",n&&"inset",f&&"dense",a&&p&&"multiline"],primary:["primary"],secondary:["secondary"]},SV,t)},IV=zt("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gy.primary}`]:t.primary},{[`& .${gy.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>ve({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),TV=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiListItemText"}),{children:p,className:f,disableTypography:o=!1,inset:v=!1,primary:x,primaryTypographyProps:S,secondary:k,secondaryTypographyProps:P}=a,I=Ft(a,CV),{dense:q}=te.useContext(vs);let V=x??p,H=k;const oe=ve({},a,{disableTypography:o,inset:v,primary:!!V,secondary:!!H,dense:q}),$=kV(oe);return V!=null&&V.type!==La&&!o&&(V=ee.jsx(La,ve({variant:q?"body2":"body1",className:$.primary,component:S!=null&&S.variant?void 0:"span",display:"block"},S,{children:V}))),H!=null&&H.type!==La&&!o&&(H=ee.jsx(La,ve({variant:"body2",className:$.secondary,color:"text.secondary",display:"block"},P,{children:H}))),ee.jsxs(IV,ve({className:Ut($.root,f),ownerState:oe,ref:n},I,{children:[V,H]}))}),PV=TV,MV=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function h_(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function yS(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function rT(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function uh(e,t,n,a,p,f){let o=!1,v=p(e,t,t?n:!1);for(;v;){if(v===e.firstChild){if(o)return!1;o=!0}const x=a?!1:v.disabled||v.getAttribute("aria-disabled")==="true";if(!v.hasAttribute("tabindex")||!rT(v,f)||x)v=p(e,v,n);else return v.focus(),!0}return!1}const zV=te.forwardRef(function(t,n){const{actions:a,autoFocus:p=!1,autoFocusItem:f=!1,children:o,className:v,disabledItemsFocusable:x=!1,disableListWrap:S=!1,onKeyDown:k,variant:P="selectedMenu"}=t,I=Ft(t,MV),q=te.useRef(null),V=te.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ma(()=>{p&&q.current.focus()},[p]),te.useImperativeHandle(a,()=>({adjustStyleForScrollbar:(L,O)=>{const Y=!q.current.style.width;if(L.clientHeight{const O=q.current,Y=L.key,ne=po(O).activeElement;if(Y==="ArrowDown")L.preventDefault(),uh(O,ne,S,x,h_);else if(Y==="ArrowUp")L.preventDefault(),uh(O,ne,S,x,yS);else if(Y==="Home")L.preventDefault(),uh(O,null,S,x,h_);else if(Y==="End")L.preventDefault(),uh(O,null,S,x,yS);else if(Y.length===1){const ue=V.current,fe=Y.toLowerCase(),Ce=performance.now();ue.keys.length>0&&(Ce-ue.lastTime>500?(ue.keys=[],ue.repeating=!0,ue.previousKeyMatched=!0):ue.repeating&&fe!==ue.keys[0]&&(ue.repeating=!1)),ue.lastTime=Ce,ue.keys.push(fe);const he=ne&&!ue.repeating&&rT(ne,ue);ue.previousKeyMatched&&(he||uh(O,ne,!1,x,h_,ue))?L.preventDefault():ue.previousKeyMatched=!1}k&&k(L)},oe=Mi(q,n);let $=-1;te.Children.forEach(o,(L,O)=>{if(!te.isValidElement(L)){$===O&&($+=1,$>=o.length&&($=-1));return}L.props.disabled||(P==="selectedMenu"&&L.props.selected||$===-1)&&($=O),$===O&&(L.props.disabled||L.props.muiSkipListHighlight||L.type.muiSkipListHighlight)&&($+=1,$>=o.length&&($=-1))});const F=te.Children.map(o,(L,O)=>{if(O===$){const Y={};return f&&(Y.autoFocus=!0),L.props.tabIndex===void 0&&P==="selectedMenu"&&(Y.tabIndex=0),te.cloneElement(L,Y)}return L});return ee.jsx(Iv,ve({role:"menu",ref:oe,className:v,onKeyDown:H,tabIndex:p?0:-1},I,{children:F}))}),LV=zV;function RV(e){return Lr("MuiPopover",e)}Er("MuiPopover",["root","paper"]);const DV=["onEntering"],BV=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],OV=["slotProps"];function vS(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function _S(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function xS(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function f_(e){return typeof e=="function"?e():e}const NV=e=>{const{classes:t}=e;return Nr({root:["root"],paper:["paper"]},RV,t)},FV=zt(HI,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nT=zt(lb,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),jV=te.forwardRef(function(t,n){var a,p,f;const o=Fr({props:t,name:"MuiPopover"}),{action:v,anchorEl:x,anchorOrigin:S={vertical:"top",horizontal:"left"},anchorPosition:k,anchorReference:P="anchorEl",children:I,className:q,container:V,elevation:H=8,marginThreshold:oe=16,open:$,PaperProps:F={},slots:L,slotProps:O,transformOrigin:Y={vertical:"top",horizontal:"left"},TransitionComponent:ne=NU,transitionDuration:ue="auto",TransitionProps:{onEntering:fe}={},disableScrollLock:Ce=!1}=o,he=Ft(o.TransitionProps,DV),we=Ft(o,BV),ie=(a=O==null?void 0:O.paper)!=null?a:F,me=te.useRef(),Ne=Mi(me,ie.ref),$e=ve({},o,{anchorOrigin:S,anchorReference:P,elevation:H,marginThreshold:oe,externalPaperSlotProps:ie,transformOrigin:Y,TransitionComponent:ne,transitionDuration:ue,TransitionProps:he}),Se=NV($e),Te=te.useCallback(()=>{if(P==="anchorPosition")return k;const lt=f_(x),tr=(lt&<.nodeType===1?lt:po(me.current).body).getBoundingClientRect();return{top:tr.top+vS(tr,S.vertical),left:tr.left+_S(tr,S.horizontal)}},[x,S.horizontal,S.vertical,k,P]),ze=te.useCallback(lt=>({vertical:vS(lt,Y.vertical),horizontal:_S(lt,Y.horizontal)}),[Y.horizontal,Y.vertical]),He=te.useCallback(lt=>{const Ot={width:lt.offsetWidth,height:lt.offsetHeight},tr=ze(Ot);if(P==="none")return{top:null,left:null,transformOrigin:xS(tr)};const yr=Te();let Pr=yr.top-tr.vertical,Qt=yr.left-tr.horizontal;const Rr=Pr+Ot.height,sr=Qt+Ot.width,pr=_s(f_(x)),In=pr.innerHeight-oe,Dr=pr.innerWidth-oe;if(oe!==null&&PrIn){const Yt=Rr-In;Pr-=Yt,tr.vertical+=Yt}if(oe!==null&&QtDr){const Yt=sr-Dr;Qt-=Yt,tr.horizontal+=Yt}return{top:`${Math.round(Pr)}px`,left:`${Math.round(Qt)}px`,transformOrigin:xS(tr)}},[x,P,Te,ze,oe]),[rt,qe]=te.useState($),nt=te.useCallback(()=>{const lt=me.current;if(!lt)return;const Ot=He(lt);Ot.top!==null&&(lt.style.top=Ot.top),Ot.left!==null&&(lt.style.left=Ot.left),lt.style.transformOrigin=Ot.transformOrigin,qe(!0)},[He]);te.useEffect(()=>(Ce&&window.addEventListener("scroll",nt),()=>window.removeEventListener("scroll",nt)),[x,Ce,nt]);const ct=(lt,Ot)=>{fe&&fe(lt,Ot),nt()},Le=()=>{qe(!1)};te.useEffect(()=>{$&&nt()}),te.useImperativeHandle(v,()=>$?{updatePosition:()=>{nt()}}:null,[$,nt]),te.useEffect(()=>{if(!$)return;const lt=gf(()=>{nt()}),Ot=_s(x);return Ot.addEventListener("resize",lt),()=>{lt.clear(),Ot.removeEventListener("resize",lt)}},[x,$,nt]);let vt=ue;ue==="auto"&&!ne.muiSupportAuto&&(vt=void 0);const $t=V||(x?po(f_(x)).body:void 0),Je=(p=L==null?void 0:L.root)!=null?p:FV,xr=(f=L==null?void 0:L.paper)!=null?f:nT,Ct=xs({elementType:xr,externalSlotProps:ve({},ie,{style:rt?ie.style:ve({},ie.style,{opacity:0})}),additionalProps:{elevation:H,ref:Ne},ownerState:$e,className:Ut(Se.paper,ie==null?void 0:ie.className)}),Ht=xs({elementType:Je,externalSlotProps:(O==null?void 0:O.root)||{},externalForwardedProps:we,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:$t,open:$},ownerState:$e,className:Ut(Se.root,q)}),{slotProps:er}=Ht,qt=Ft(Ht,OV);return ee.jsx(Je,ve({},qt,!Wp(Je)&&{slotProps:er,disableScrollLock:Ce},{children:ee.jsx(ne,ve({appear:!0,in:$,onEntering:ct,onExited:Le,timeout:vt},he,{children:ee.jsx(xr,ve({},Ct,{children:I}))}))}))}),UV=jV;function VV(e){return Lr("MuiMenu",e)}Er("MuiMenu",["root","paper","list"]);const $V=["onEntering"],qV=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],WV={vertical:"top",horizontal:"right"},GV={vertical:"top",horizontal:"left"},HV=e=>{const{classes:t}=e;return Nr({root:["root"],paper:["paper"],list:["list"]},VV,t)},ZV=zt(UV,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),KV=zt(nT,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),XV=zt(LV,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),QV=te.forwardRef(function(t,n){var a,p;const f=Fr({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:v,className:x,disableAutoFocusItem:S=!1,MenuListProps:k={},onClose:P,open:I,PaperProps:q={},PopoverClasses:V,transitionDuration:H="auto",TransitionProps:{onEntering:oe}={},variant:$="selectedMenu",slots:F={},slotProps:L={}}=f,O=Ft(f.TransitionProps,$V),Y=Ft(f,qV),ne=Yp(),ue=ne.direction==="rtl",fe=ve({},f,{autoFocus:o,disableAutoFocusItem:S,MenuListProps:k,onEntering:oe,PaperProps:q,transitionDuration:H,TransitionProps:O,variant:$}),Ce=HV(fe),he=o&&!S&&I,we=te.useRef(null),ie=(He,rt)=>{we.current&&we.current.adjustStyleForScrollbar(He,ne),oe&&oe(He,rt)},me=He=>{He.key==="Tab"&&(He.preventDefault(),P&&P(He,"tabKeyDown"))};let Ne=-1;te.Children.map(v,(He,rt)=>{te.isValidElement(He)&&(He.props.disabled||($==="selectedMenu"&&He.props.selected||Ne===-1)&&(Ne=rt))});const $e=(a=F.paper)!=null?a:KV,Se=(p=L.paper)!=null?p:q,Te=xs({elementType:F.root,externalSlotProps:L.root,ownerState:fe,className:[Ce.root,x]}),ze=xs({elementType:$e,externalSlotProps:Se,ownerState:fe,className:Ce.paper});return ee.jsx(ZV,ve({onClose:P,anchorOrigin:{vertical:"bottom",horizontal:ue?"right":"left"},transformOrigin:ue?WV:GV,slots:{paper:$e,root:F.root},slotProps:{root:Te,paper:ze},open:I,ref:n,transitionDuration:H,TransitionProps:ve({onEntering:ie},O),ownerState:fe},Y,{classes:V,children:ee.jsx(XV,ve({onKeyDown:me,actions:we,autoFocus:o&&(Ne===-1||S),autoFocusItem:he,variant:$},k,{className:Ut(Ce.list,k.className),children:v}))}))}),YV=QV;function JV(e){return Lr("MuiMenuItem",e)}const e9=Er("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ch=e9,t9=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],r9=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},n9=e=>{const{disabled:t,dense:n,divider:a,disableGutters:p,selected:f,classes:o}=e,x=Nr({root:["root",n&&"dense",t&&"disabled",!p&&"gutters",a&&"divider",f&&"selected"]},JV,o);return ve({},o,x)},i9=zt(nc,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:r9})(({theme:e,ownerState:t})=>ve({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ch.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:hi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ch.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:hi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ch.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:hi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:hi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ch.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ch.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${hS.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${hS.inset}`]:{marginLeft:52},[`& .${gy.root}`]:{marginTop:0,marginBottom:0},[`& .${gy.inset}`]:{paddingLeft:36},[`& .${gS.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&ve({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${gS.root} svg`]:{fontSize:"1.25rem"}}))),o9=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiMenuItem"}),{autoFocus:p=!1,component:f="li",dense:o=!1,divider:v=!1,disableGutters:x=!1,focusVisibleClassName:S,role:k="menuitem",tabIndex:P,className:I}=a,q=Ft(a,t9),V=te.useContext(vs),H=te.useMemo(()=>({dense:o||V.dense||!1,disableGutters:x}),[V.dense,o,x]),oe=te.useRef(null);ma(()=>{p&&oe.current&&oe.current.focus()},[p]);const $=ve({},a,{dense:H.dense,divider:v,disableGutters:x}),F=n9(a),L=Mi(oe,n);let O;return a.disabled||(O=P!==void 0?P:-1),ee.jsx(vs.Provider,{value:H,children:ee.jsx(i9,ve({ref:L,role:k,tabIndex:O,component:f,focusVisibleClassName:Ut(F.focusVisible,S),className:Ut(F.root,I)},q,{ownerState:$,classes:F}))})}),bS=o9;function a9(e){return Lr("MuiNativeSelect",e)}const s9=Er("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),db=s9,l9=["className","disabled","error","IconComponent","inputRef","variant"],u9=e=>{const{classes:t,variant:n,disabled:a,multiple:p,open:f,error:o}=e,v={select:["select",n,a&&"disabled",p&&"multiple",o&&"error"],icon:["icon",`icon${Jt(n)}`,f&&"iconOpen",a&&"disabled"]};return Nr(v,a9,t)},iT=({ownerState:e,theme:t})=>ve({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":ve({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${db.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),c9=zt("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Yo,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${db.multiple}`]:t.multiple}]}})(iT),oT=({ownerState:e,theme:t})=>ve({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${db.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),p9=zt("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Jt(n.variant)}`],n.open&&t.iconOpen]}})(oT),d9=te.forwardRef(function(t,n){const{className:a,disabled:p,error:f,IconComponent:o,inputRef:v,variant:x="standard"}=t,S=Ft(t,l9),k=ve({},t,{disabled:p,variant:x,error:f}),P=u9(k);return ee.jsxs(te.Fragment,{children:[ee.jsx(c9,ve({ownerState:k,className:Ut(P.select,a),disabled:p,ref:v||n},S)),t.multiple?null:ee.jsx(p9,{as:o,ownerState:k,className:P.icon})]})}),h9=d9;var wS;const f9=["children","classes","className","label","notched"],m9=zt("fieldset",{shouldForwardProp:Yo})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),g9=zt("legend",{shouldForwardProp:Yo})(({ownerState:e,theme:t})=>ve({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&ve({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function y9(e){const{className:t,label:n,notched:a}=e,p=Ft(e,f9),f=n!=null&&n!=="",o=ve({},e,{notched:a,withLabel:f});return ee.jsx(m9,ve({"aria-hidden":!0,className:t,ownerState:o},p,{children:ee.jsx(g9,{ownerState:o,children:f?ee.jsx("span",{children:n}):wS||(wS=ee.jsx("span",{className:"notranslate",children:"​"}))})}))}const v9=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],_9=e=>{const{classes:t}=e,a=Nr({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},J8,t);return ve({},t,a)},x9=zt(Cv,{shouldForwardProp:e=>Yo(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Sv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return ve({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Tl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Tl.focused} .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Tl.error} .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Tl.disabled} .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&ve({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),b9=zt(y9,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),w9=zt(kv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Ev})(({theme:e,ownerState:t})=>ve({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),aT=te.forwardRef(function(t,n){var a,p,f,o,v;const x=Fr({props:t,name:"MuiOutlinedInput"}),{components:S={},fullWidth:k=!1,inputComponent:P="input",label:I,multiline:q=!1,notched:V,slots:H={},type:oe="text"}=x,$=Ft(x,v9),F=_9(x),L=ed(),O=Jp({props:x,muiFormControl:L,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),Y=ve({},x,{color:O.color||"primary",disabled:O.disabled,error:O.error,focused:O.focused,formControl:L,fullWidth:k,hiddenLabel:O.hiddenLabel,multiline:q,size:O.size,type:oe}),ne=(a=(p=H.root)!=null?p:S.Root)!=null?a:x9,ue=(f=(o=H.input)!=null?o:S.Input)!=null?f:w9;return ee.jsx(cb,ve({slots:{root:ne,input:ue},renderSuffix:fe=>ee.jsx(b9,{ownerState:Y,className:F.notchedOutline,label:I!=null&&I!==""&&O.required?v||(v=ee.jsxs(te.Fragment,{children:[I," ","*"]})):I,notched:typeof V<"u"?V:!!(fe.startAdornment||fe.filled||fe.focused)}),fullWidth:k,inputComponent:P,multiline:q,ref:n,type:oe},$,{classes:ve({},F,{notchedOutline:null})}))});aT.muiName="Input";const sT=aT;function A9(e){return Lr("MuiSelect",e)}const S9=Er("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),ph=S9;var AS;const E9=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],C9=zt("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ph.select}`]:t.select},{[`&.${ph.select}`]:t[n.variant]},{[`&.${ph.error}`]:t.error},{[`&.${ph.multiple}`]:t.multiple}]}})(iT,{[`&.${ph.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),k9=zt("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Jt(n.variant)}`],n.open&&t.iconOpen]}})(oT),I9=zt("input",{shouldForwardProp:e=>fF(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function SS(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function T9(e){return e==null||typeof e=="string"&&!e.trim()}const P9=e=>{const{classes:t,variant:n,disabled:a,multiple:p,open:f,error:o}=e,v={select:["select",n,a&&"disabled",p&&"multiple",o&&"error"],icon:["icon",`icon${Jt(n)}`,f&&"iconOpen",a&&"disabled"],nativeInput:["nativeInput"]};return Nr(v,A9,t)},M9=te.forwardRef(function(t,n){var a;const{"aria-describedby":p,"aria-label":f,autoFocus:o,autoWidth:v,children:x,className:S,defaultOpen:k,defaultValue:P,disabled:I,displayEmpty:q,error:V=!1,IconComponent:H,inputRef:oe,labelId:$,MenuProps:F={},multiple:L,name:O,onBlur:Y,onChange:ne,onClose:ue,onFocus:fe,onOpen:Ce,open:he,readOnly:we,renderValue:ie,SelectDisplayProps:me={},tabIndex:Ne,value:$e,variant:Se="standard"}=t,Te=Ft(t,E9),[ze,He]=Sx({controlled:$e,default:P,name:"Select"}),[rt,qe]=Sx({controlled:he,default:k,name:"Select"}),nt=te.useRef(null),ct=te.useRef(null),[Le,vt]=te.useState(null),{current:$t}=te.useRef(he!=null),[Je,xr]=te.useState(),Ct=Mi(n,oe),Ht=te.useCallback(Mt=>{ct.current=Mt,Mt&&vt(Mt)},[]),er=Le==null?void 0:Le.parentNode;te.useImperativeHandle(Ct,()=>({focus:()=>{ct.current.focus()},node:nt.current,value:ze}),[ze]),te.useEffect(()=>{k&&rt&&Le&&!$t&&(xr(v?null:er.clientWidth),ct.current.focus())},[Le,v]),te.useEffect(()=>{o&&ct.current.focus()},[o]),te.useEffect(()=>{if(!$)return;const Mt=po(ct.current).getElementById($);if(Mt){const br=()=>{getSelection().isCollapsed&&ct.current.focus()};return Mt.addEventListener("click",br),()=>{Mt.removeEventListener("click",br)}}},[$]);const qt=(Mt,br)=>{Mt?Ce&&Ce(br):ue&&ue(br),$t||(xr(v?null:er.clientWidth),qe(Mt))},lt=Mt=>{Mt.button===0&&(Mt.preventDefault(),ct.current.focus(),qt(!0,Mt))},Ot=Mt=>{qt(!1,Mt)},tr=te.Children.toArray(x),yr=Mt=>{const br=tr.find(pt=>pt.props.value===Mt.target.value);br!==void 0&&(He(br.props.value),ne&&ne(Mt,br))},Pr=Mt=>br=>{let pt;if(br.currentTarget.hasAttribute("tabindex")){if(L){pt=Array.isArray(ze)?ze.slice():[];const Tt=ze.indexOf(Mt.props.value);Tt===-1?pt.push(Mt.props.value):pt.splice(Tt,1)}else pt=Mt.props.value;if(Mt.props.onClick&&Mt.props.onClick(br),ze!==pt&&(He(pt),ne)){const Tt=br.nativeEvent||br,lr=new Tt.constructor(Tt.type,Tt);Object.defineProperty(lr,"target",{writable:!0,value:{value:pt,name:O}}),ne(lr,Mt)}L||qt(!1,br)}},Qt=Mt=>{we||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Mt.key)!==-1&&(Mt.preventDefault(),qt(!0,Mt))},Rr=Le!==null&&rt,sr=Mt=>{!Rr&&Y&&(Object.defineProperty(Mt,"target",{writable:!0,value:{value:ze,name:O}}),Y(Mt))};delete Te["aria-invalid"];let pr,In;const Dr=[];let Yt=!1;(my({value:ze})||q)&&(ie?pr=ie(ze):Yt=!0);const un=tr.map(Mt=>{if(!te.isValidElement(Mt))return null;let br;if(L){if(!Array.isArray(ze))throw new Error(Xl(2));br=ze.some(pt=>SS(pt,Mt.props.value)),br&&Yt&&Dr.push(Mt.props.children)}else br=SS(ze,Mt.props.value),br&&Yt&&(In=Mt.props.children);return te.cloneElement(Mt,{"aria-selected":br?"true":"false",onClick:Pr(Mt),onKeyUp:pt=>{pt.key===" "&&pt.preventDefault(),Mt.props.onKeyUp&&Mt.props.onKeyUp(pt)},role:"option",selected:br,value:void 0,"data-value":Mt.props.value})});Yt&&(L?Dr.length===0?pr=null:pr=Dr.reduce((Mt,br,pt)=>(Mt.push(br),pt{const{classes:t}=e;return t},hb={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Yo(e)&&e!=="variant",slot:"Root"},B9=zt(eT,hb)(""),O9=zt(sT,hb)(""),N9=zt(XI,hb)(""),lT=te.forwardRef(function(t,n){const a=Fr({name:"MuiSelect",props:t}),{autoWidth:p=!1,children:f,classes:o={},className:v,defaultOpen:x=!1,displayEmpty:S=!1,IconComponent:k=nj,id:P,input:I,inputProps:q,label:V,labelId:H,MenuProps:oe,multiple:$=!1,native:F=!1,onClose:L,onOpen:O,open:Y,renderValue:ne,SelectDisplayProps:ue,variant:fe="outlined"}=a,Ce=Ft(a,L9),he=F?h9:z9,we=ed(),ie=Jp({props:a,muiFormControl:we,states:["variant","error"]}),me=ie.variant||fe,Ne=ve({},a,{variant:me,classes:o}),$e=D9(Ne),Se=Ft($e,R9),Te=I||{standard:ee.jsx(B9,{ownerState:Ne}),outlined:ee.jsx(O9,{label:V,ownerState:Ne}),filled:ee.jsx(N9,{ownerState:Ne})}[me],ze=Mi(n,Te.ref);return ee.jsx(te.Fragment,{children:te.cloneElement(Te,ve({inputComponent:he,inputProps:ve({children:f,error:ie.error,IconComponent:k,variant:me,type:void 0,multiple:$},F?{id:P}:{autoWidth:p,defaultOpen:x,displayEmpty:S,labelId:H,MenuProps:oe,onClose:L,onOpen:O,open:Y,renderValue:ne,SelectDisplayProps:ve({id:P},ue)},q,{classes:q?Mo(Se,q.classes):Se},I?I.props.inputProps:{})},($&&F||S)&&me==="outlined"?{notched:!0}:{},{ref:ze,className:Ut(Te.props.className,v,$e.root)},!I&&{variant:me},Ce))})});lT.muiName="Select";const uT=lT;function F9(e){return Lr("MuiTab",e)}const j9=Er("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Lu=j9,U9=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],V9=e=>{const{classes:t,textColor:n,fullWidth:a,wrapped:p,icon:f,label:o,selected:v,disabled:x}=e,S={root:["root",f&&o&&"labelIcon",`textColor${Jt(n)}`,a&&"fullWidth",p&&"wrapped",v&&"selected",x&&"disabled"],iconWrapper:["iconWrapper"]};return Nr(S,F9,t)},$9=zt(nc,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Jt(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>ve({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Lu.iconWrapper}`]:ve({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Lu.selected}`]:{opacity:1},[`&.${Lu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Lu.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Lu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Lu.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Lu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),q9=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiTab"}),{className:p,disabled:f=!1,disableFocusRipple:o=!1,fullWidth:v,icon:x,iconPosition:S="top",indicator:k,label:P,onChange:I,onClick:q,onFocus:V,selected:H,selectionFollowsFocus:oe,textColor:$="inherit",value:F,wrapped:L=!1}=a,O=Ft(a,U9),Y=ve({},a,{disabled:f,disableFocusRipple:o,selected:H,icon:!!x,iconPosition:S,label:!!P,fullWidth:v,textColor:$,wrapped:L}),ne=V9(Y),ue=x&&P&&te.isValidElement(x)?te.cloneElement(x,{className:Ut(ne.iconWrapper,x.props.className)}):x,fe=he=>{!H&&I&&I(he,F),q&&q(he)},Ce=he=>{oe&&!H&&I&&I(he,F),V&&V(he)};return ee.jsxs($9,ve({focusRipple:!o,className:Ut(ne.root,p),ref:n,role:"tab","aria-selected":H,disabled:f,onClick:fe,onFocus:Ce,ownerState:Y,tabIndex:H?0:-1},O,{children:[S==="top"||S==="start"?ee.jsxs(te.Fragment,{children:[ue,P]}):ee.jsxs(te.Fragment,{children:[P,ue]}),k]}))}),ql=q9,W9=dv(ee.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),G9=dv(ee.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function H9(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Z9(e,t,n,a={},p=()=>{}){const{ease:f=H9,duration:o=300}=a;let v=null;const x=t[e];let S=!1;const k=()=>{S=!0},P=I=>{if(S){p(new Error("Animation cancelled"));return}v===null&&(v=I);const q=Math.min(1,(I-v)/o);if(t[e]=f(q)*(n-x)+x,q>=1){requestAnimationFrame(()=>{p(null)});return}requestAnimationFrame(P)};return x===n?(p(new Error("Element already at target position")),k):(requestAnimationFrame(P),k)}const K9=["onChange"],X9={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Q9(e){const{onChange:t}=e,n=Ft(e,K9),a=te.useRef(),p=te.useRef(null),f=()=>{a.current=p.current.offsetHeight-p.current.clientHeight};return ma(()=>{const o=gf(()=>{const x=a.current;f(),x!==a.current&&t(a.current)}),v=_s(p.current);return v.addEventListener("resize",o),()=>{o.clear(),v.removeEventListener("resize",o)}},[t]),te.useEffect(()=>{f(),t(a.current)},[t]),ee.jsx("div",ve({style:X9,ref:p},n))}function Y9(e){return Lr("MuiTabScrollButton",e)}const J9=Er("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),e$=J9,t$=["className","slots","slotProps","direction","orientation","disabled"],r$=e=>{const{classes:t,orientation:n,disabled:a}=e;return Nr({root:["root",n,a&&"disabled"]},Y9,t)},n$=zt(nc,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>ve({width:40,flexShrink:0,opacity:.8,[`&.${e$.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),i$=te.forwardRef(function(t,n){var a,p;const f=Fr({props:t,name:"MuiTabScrollButton"}),{className:o,slots:v={},slotProps:x={},direction:S}=f,k=Ft(f,t$),I=Yp().direction==="rtl",q=ve({isRtl:I},f),V=r$(q),H=(a=v.StartScrollButtonIcon)!=null?a:W9,oe=(p=v.EndScrollButtonIcon)!=null?p:G9,$=xs({elementType:H,externalSlotProps:x.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:q}),F=xs({elementType:oe,externalSlotProps:x.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:q});return ee.jsx(n$,ve({component:"div",className:Ut(V.root,o),ref:n,role:null,ownerState:q,tabIndex:null},k,{children:S==="left"?ee.jsx(H,ve({},$)):ee.jsx(oe,ve({},F))}))}),o$=i$;function a$(e){return Lr("MuiTabs",e)}const s$=Er("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),m_=s$,l$=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ES=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,CS=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ng=(e,t,n)=>{let a=!1,p=n(e,t);for(;p;){if(p===e.firstChild){if(a)return;a=!0}const f=p.disabled||p.getAttribute("aria-disabled")==="true";if(!p.hasAttribute("tabindex")||f)p=n(e,p);else{p.focus();return}}},u$=e=>{const{vertical:t,fixed:n,hideScrollbar:a,scrollableX:p,scrollableY:f,centered:o,scrollButtonsHideMobile:v,classes:x}=e;return Nr({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",a&&"hideScrollbar",p&&"scrollableX",f&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",v&&"scrollButtonsHideMobile"],scrollableX:[p&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},a$,x)},c$=zt("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${m_.scrollButtons}`]:t.scrollButtons},{[`& .${m_.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>ve({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${m_.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),p$=zt("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>ve({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),d$=zt("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>ve({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),h$=zt("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>ve({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),f$=zt(Q9)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),kS={},m$=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiTabs"}),p=Yp(),f=p.direction==="rtl",{"aria-label":o,"aria-labelledby":v,action:x,centered:S=!1,children:k,className:P,component:I="div",allowScrollButtonsMobile:q=!1,indicatorColor:V="primary",onChange:H,orientation:oe="horizontal",ScrollButtonComponent:$=o$,scrollButtons:F="auto",selectionFollowsFocus:L,slots:O={},slotProps:Y={},TabIndicatorProps:ne={},TabScrollButtonProps:ue={},textColor:fe="primary",value:Ce,variant:he="standard",visibleScrollbar:we=!1}=a,ie=Ft(a,l$),me=he==="scrollable",Ne=oe==="vertical",$e=Ne?"scrollTop":"scrollLeft",Se=Ne?"top":"left",Te=Ne?"bottom":"right",ze=Ne?"clientHeight":"clientWidth",He=Ne?"height":"width",rt=ve({},a,{component:I,allowScrollButtonsMobile:q,indicatorColor:V,orientation:oe,vertical:Ne,scrollButtons:F,textColor:fe,variant:he,visibleScrollbar:we,fixed:!me,hideScrollbar:me&&!we,scrollableX:me&&!Ne,scrollableY:me&&Ne,centered:S&&!me,scrollButtonsHideMobile:!q}),qe=u$(rt),nt=xs({elementType:O.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:rt}),ct=xs({elementType:O.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:rt}),[Le,vt]=te.useState(!1),[$t,Je]=te.useState(kS),[xr,Ct]=te.useState(!1),[Ht,er]=te.useState(!1),[qt,lt]=te.useState(!1),[Ot,tr]=te.useState({overflow:"hidden",scrollbarWidth:0}),yr=new Map,Pr=te.useRef(null),Qt=te.useRef(null),Rr=()=>{const pt=Pr.current;let Tt;if(pt){const fr=pt.getBoundingClientRect();Tt={clientWidth:pt.clientWidth,scrollLeft:pt.scrollLeft,scrollTop:pt.scrollTop,scrollLeftNormalized:m6(pt,p.direction),scrollWidth:pt.scrollWidth,top:fr.top,bottom:fr.bottom,left:fr.left,right:fr.right}}let lr;if(pt&&Ce!==!1){const fr=Qt.current.children;if(fr.length>0){const Qr=fr[yr.get(Ce)];lr=Qr?Qr.getBoundingClientRect():null}}return{tabsMeta:Tt,tabMeta:lr}},sr=hs(()=>{const{tabsMeta:pt,tabMeta:Tt}=Rr();let lr=0,fr;if(Ne)fr="top",Tt&&pt&&(lr=Tt.top-pt.top+pt.scrollTop);else if(fr=f?"right":"left",Tt&&pt){const pn=f?pt.scrollLeftNormalized+pt.clientWidth-pt.scrollWidth:pt.scrollLeft;lr=(f?-1:1)*(Tt[fr]-pt[fr]+pn)}const Qr={[fr]:lr,[He]:Tt?Tt[He]:0};if(isNaN($t[fr])||isNaN($t[He]))Je(Qr);else{const pn=Math.abs($t[fr]-Qr[fr]),Tn=Math.abs($t[He]-Qr[He]);(pn>=1||Tn>=1)&&Je(Qr)}}),pr=(pt,{animation:Tt=!0}={})=>{Tt?Z9($e,Pr.current,pt,{duration:p.transitions.duration.standard}):Pr.current[$e]=pt},In=pt=>{let Tt=Pr.current[$e];Ne?Tt+=pt:(Tt+=pt*(f?-1:1),Tt*=f&&PI()==="reverse"?-1:1),pr(Tt)},Dr=()=>{const pt=Pr.current[ze];let Tt=0;const lr=Array.from(Qt.current.children);for(let fr=0;frpt){fr===0&&(Tt=pt);break}Tt+=Qr[ze]}return Tt},Yt=()=>{In(-1*Dr())},un=()=>{In(Dr())},Xr=te.useCallback(pt=>{tr({overflow:null,scrollbarWidth:pt})},[]),cn=()=>{const pt={};pt.scrollbarSizeListener=me?ee.jsx(f$,{onChange:Xr,className:Ut(qe.scrollableX,qe.hideScrollbar)}):null;const lr=me&&(F==="auto"&&(xr||Ht)||F===!0);return pt.scrollButtonStart=lr?ee.jsx($,ve({slots:{StartScrollButtonIcon:O.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:nt},orientation:oe,direction:f?"right":"left",onClick:Yt,disabled:!xr},ue,{className:Ut(qe.scrollButtons,ue.className)})):null,pt.scrollButtonEnd=lr?ee.jsx($,ve({slots:{EndScrollButtonIcon:O.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ct},orientation:oe,direction:f?"left":"right",onClick:un,disabled:!Ht},ue,{className:Ut(qe.scrollButtons,ue.className)})):null,pt},Cr=hs(pt=>{const{tabsMeta:Tt,tabMeta:lr}=Rr();if(!(!lr||!Tt)){if(lr[Se]Tt[Te]){const fr=Tt[$e]+(lr[Te]-Tt[Te]);pr(fr,{animation:pt})}}}),Lt=hs(()=>{me&&F!==!1&<(!qt)});te.useEffect(()=>{const pt=gf(()=>{Pr.current&&sr()});let Tt;const lr=pn=>{pn.forEach(Tn=>{Tn.removedNodes.forEach(ai=>{var fi;(fi=Tt)==null||fi.unobserve(ai)}),Tn.addedNodes.forEach(ai=>{var fi;(fi=Tt)==null||fi.observe(ai)})}),pt(),Lt()},fr=_s(Pr.current);fr.addEventListener("resize",pt);let Qr;return typeof ResizeObserver<"u"&&(Tt=new ResizeObserver(pt),Array.from(Qt.current.children).forEach(pn=>{Tt.observe(pn)})),typeof MutationObserver<"u"&&(Qr=new MutationObserver(lr),Qr.observe(Qt.current,{childList:!0})),()=>{var pn,Tn;pt.clear(),fr.removeEventListener("resize",pt),(pn=Qr)==null||pn.disconnect(),(Tn=Tt)==null||Tn.disconnect()}},[sr,Lt]),te.useEffect(()=>{const pt=Array.from(Qt.current.children),Tt=pt.length;if(typeof IntersectionObserver<"u"&&Tt>0&&me&&F!==!1){const lr=pt[0],fr=pt[Tt-1],Qr={root:Pr.current,threshold:.99},pn=Jo=>{Ct(!Jo[0].isIntersecting)},Tn=new IntersectionObserver(pn,Qr);Tn.observe(lr);const ai=Jo=>{er(!Jo[0].isIntersecting)},fi=new IntersectionObserver(ai,Qr);return fi.observe(fr),()=>{Tn.disconnect(),fi.disconnect()}}},[me,F,qt,k==null?void 0:k.length]),te.useEffect(()=>{vt(!0)},[]),te.useEffect(()=>{sr()}),te.useEffect(()=>{Cr(kS!==$t)},[Cr,$t]),te.useImperativeHandle(x,()=>({updateIndicator:sr,updateScrollButtons:Lt}),[sr,Lt]);const an=ee.jsx(h$,ve({},ne,{className:Ut(qe.indicator,ne.className),ownerState:rt,style:ve({},$t,ne.style)}));let Kn=0;const $i=te.Children.map(k,pt=>{if(!te.isValidElement(pt))return null;const Tt=pt.props.value===void 0?Kn:pt.props.value;yr.set(Tt,Kn);const lr=Tt===Ce;return Kn+=1,te.cloneElement(pt,ve({fullWidth:he==="fullWidth",indicator:lr&&!Le&&an,selected:lr,selectionFollowsFocus:L,onChange:H,textColor:fe,value:Tt},Kn===1&&Ce===!1&&!pt.props.tabIndex?{tabIndex:0}:{}))}),Mt=pt=>{const Tt=Qt.current,lr=po(Tt).activeElement;if(lr.getAttribute("role")!=="tab")return;let Qr=oe==="horizontal"?"ArrowLeft":"ArrowUp",pn=oe==="horizontal"?"ArrowRight":"ArrowDown";switch(oe==="horizontal"&&f&&(Qr="ArrowRight",pn="ArrowLeft"),pt.key){case Qr:pt.preventDefault(),ng(Tt,lr,CS);break;case pn:pt.preventDefault(),ng(Tt,lr,ES);break;case"Home":pt.preventDefault(),ng(Tt,null,ES);break;case"End":pt.preventDefault(),ng(Tt,null,CS);break}},br=cn();return ee.jsxs(c$,ve({className:Ut(qe.root,P),ownerState:rt,ref:n,as:I},ie,{children:[br.scrollButtonStart,br.scrollbarSizeListener,ee.jsxs(p$,{className:qe.scroller,ownerState:rt,style:{overflow:Ot.overflow,[Ne?`margin${f?"Left":"Right"}`:"marginBottom"]:we?void 0:-Ot.scrollbarWidth},ref:Pr,children:[ee.jsx(d$,{"aria-label":o,"aria-labelledby":v,"aria-orientation":oe==="vertical"?"vertical":null,className:qe.flexContainer,ownerState:rt,onKeyDown:Mt,ref:Qt,role:"tablist",children:$i}),Le&&an]}),br.scrollButtonEnd]}))}),fb=m$;function g$(e){return Lr("MuiTextField",e)}Er("MuiTextField",["root"]);const y$=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],v$={standard:eT,filled:XI,outlined:sT},_$=e=>{const{classes:t}=e;return Nr({root:["root"]},g$,t)},x$=zt(QI,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),b$=te.forwardRef(function(t,n){const a=Fr({props:t,name:"MuiTextField"}),{autoComplete:p,autoFocus:f=!1,children:o,className:v,color:x="primary",defaultValue:S,disabled:k=!1,error:P=!1,FormHelperTextProps:I,fullWidth:q=!1,helperText:V,id:H,InputLabelProps:oe,inputProps:$,InputProps:F,inputRef:L,label:O,maxRows:Y,minRows:ne,multiline:ue=!1,name:fe,onBlur:Ce,onChange:he,onFocus:we,placeholder:ie,required:me=!1,rows:Ne,select:$e=!1,SelectProps:Se,type:Te,value:ze,variant:He="outlined"}=a,rt=Ft(a,y$),qe=ve({},a,{autoFocus:f,color:x,disabled:k,error:P,fullWidth:q,multiline:ue,required:me,select:$e,variant:He}),nt=_$(qe),ct={};He==="outlined"&&(oe&&typeof oe.shrink<"u"&&(ct.notched=oe.shrink),ct.label=O),$e&&((!Se||!Se.native)&&(ct.id=void 0),ct["aria-describedby"]=void 0);const Le=Yy(H),vt=V&&Le?`${Le}-helper-text`:void 0,$t=O&&Le?`${Le}-label`:void 0,Je=v$[He],xr=ee.jsx(Je,ve({"aria-describedby":vt,autoComplete:p,autoFocus:f,defaultValue:S,fullWidth:q,multiline:ue,name:fe,rows:Ne,maxRows:Y,minRows:ne,type:Te,value:ze,id:Le,inputRef:L,onBlur:Ce,onChange:he,onFocus:we,placeholder:ie,inputProps:$},ct,F));return ee.jsxs(x$,ve({className:Ut(nt.root,v),disabled:k,error:P,fullWidth:q,ref:n,required:me,color:x,variant:He,ownerState:qe},rt,{children:[O!=null&&O!==""&&ee.jsx(ZU,ve({htmlFor:Le,id:$t},oe,{children:O})),$e?ee.jsx(uT,ve({"aria-describedby":vt,id:Le,labelId:$t,value:ze,input:xr},Se,{children:o})):xr,V&&ee.jsx(kU,ve({id:vt},I,{children:V}))]}))}),w$=b$,A$=({feederLayerCode:e,setFeederLayerCode:t})=>{const n=a=>{t(a.target.value)};return ee.jsx(QI,{variant:"outlined",className:"custom-feeder-selection",children:ee.jsxs(uT,{id:"feeder-selection",value:e,onChange:n,style:{width:"100%",height:"40px",fontSize:"12px",marginRight:"20px"},children:[ee.jsx(bS,{value:"PeakHourGasDemand_KW",children:"Peak Hour Gas Demand"}),ee.jsx(bS,{value:"PeakHourElectricityDemand_KW",children:"Peak Hour Electricity Demand"})]})})},S$=({propertiesNumber:e,handlePropertyChange:t,blockContainerVisible:n,mobilityContainerVisible:a})=>ee.jsx("div",{children:ee.jsxs("div",{className:"mobility-dropdown-container",children:[ee.jsxs("select",{className:"mobility-dropdown",value:e.mode,onChange:p=>t("mode",p.target.value),children:[ee.jsx("option",{value:"-1",children:"All Trip Modes"}),ee.jsx("option",{value:"0",children:"Walk"}),ee.jsx("option",{value:"1",children:"Bike"}),ee.jsx("option",{value:"2",children:"Car"}),n&&ee.jsx("option",{value:"3",children:"Public Transit"})]}),ee.jsx("select",{className:"mobility-dropdown",value:e.season,onChange:p=>t("season",p.target.value),children:ee.jsx("option",{value:"1",children:"Spring"})}),ee.jsxs("select",{className:"mobility-dropdown",value:e.timeOfDay,onChange:p=>t("timeOfDay",p.target.value),children:[ee.jsx("option",{value:"-1",children:"All Time Periods"}),ee.jsx("option",{value:"0",children:"Morning (12am - 6am)"}),ee.jsx("option",{value:"1",children:"Breakfast (6am - 11am)"}),ee.jsx("option",{value:"2",children:"Lunch (11am - 3pm)"}),ee.jsx("option",{value:"3",children:"Afternoon (3pm - 5pm)"}),ee.jsx("option",{value:"4",children:"Dinner (5pm - 9pm)"}),ee.jsx("option",{value:"5",children:"Night (9pm - 12am)"})]})]})}),E$=({propertiesNumber:e,handlePropertyChange:t})=>ee.jsxs("div",{className:"mobility-dropdown-container",children:[ee.jsxs("select",{className:"mobility-dropdown",value:e.weekday,onChange:n=>t("weekday",n.target.value),children:[ee.jsx("option",{value:"1",children:"Weekday"}),ee.jsx("option",{value:"0",children:"Weekend"})]}),ee.jsxs("select",{className:"mobility-dropdown-activity",value:e.fromActivity,onChange:n=>t("fromActivity",n.target.value),children:[ee.jsx("option",{value:"0",children:"Home"}),ee.jsx("option",{value:"1",children:"Work/School"}),ee.jsx("option",{value:"2",children:"Leisure"}),ee.jsx("option",{value:"-1",children:"All From-Activities"})]}),ee.jsxs("select",{className:"mobility-dropdown-activity",value:e.toActivity,onChange:n=>t("toActivity",n.target.value),children:[ee.jsx("option",{value:"0",children:"Home"}),ee.jsx("option",{value:"1",children:"Work/School"}),ee.jsx("option",{value:"2",children:"Leisure"}),ee.jsx("option",{value:"-1",children:"All To-Activities"})]})]}),C$=()=>{const[e,t]=te.useState(0),n=(a,p)=>{t(p)};return ee.jsxs(ii,{sx:{width:"100%"},children:[ee.jsxs(fb,{value:e,onChange:n,centered:!0,children:[ee.jsx(ql,{label:"Weekday Trip Volume",sx:{textTransform:"none"}}),ee.jsx(ql,{label:"Weekend Trip Volume",sx:{textTransform:"none"}})]}),ee.jsx("div",{role:"tabpanel",hidden:e!==0,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-weekday",className:"graph-container-weekday"})})}),ee.jsx("div",{role:"tabpanel",hidden:e!==1,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-weekend",className:"graph-container-weekend"})})})]})},k$=()=>{const[e,t]=te.useState(0),n=(a,p)=>{t(p)};return ee.jsxs(ii,{sx:{width:"100%",overflow:"hidden"},children:[" ",ee.jsxs(fb,{value:e,onChange:n,centered:!0,sx:{".MuiTabs-flexContainer":{paddingLeft:"0px"},".MuiTab-root":{textTransform:"none",marginRight:"0px"}},children:[ee.jsx(ql,{label:"Summary"}),ee.jsx(ql,{label:"End Use"}),ee.jsx(ql,{label:"Fuel Use"})]}),ee.jsx("div",{role:"tabpanel",hidden:e!==0,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-energysummaryuse",className:"graph-container-energysummaryuse"})})}),ee.jsx("div",{role:"tabpanel",hidden:e!==1,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-energyenduse",className:"graph-container-energyenduse"})})}),ee.jsx("div",{role:"tabpanel",hidden:e!==2,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-energyfueluse",className:"graph-container-energyfueluse"})})})]})},I$=()=>{const[e,t]=te.useState(0),n=(a,p)=>{t(p)};return ee.jsxs(ii,{sx:{width:"100%"},children:[ee.jsxs(fb,{value:e,onChange:n,centered:!0,children:[ee.jsx(ql,{label:"Winter Load",sx:{textTransform:"none"}}),ee.jsx(ql,{label:"Summer Load",sx:{textTransform:"none"}}),ee.jsx(ql,{label:"Load Duration Curve",sx:{textTransform:"none"}})]}),ee.jsx("div",{role:"tabpanel",hidden:e!==0,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-energyone",className:"graph-container-energyone"})})}),ee.jsx("div",{role:"tabpanel",hidden:e!==1,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-energytwo",className:"graph-container-energytwo"})})}),ee.jsx("div",{role:"tabpanel",hidden:e!==2,children:ee.jsx(ii,{sx:{p:3},children:ee.jsx("div",{id:"graph-container-energythree",className:"graph-container-energythree"})})})]})},Dh=F1().domain(["Heating[KWh][Yr]","Cooling[KWh][Yr]","Equipment[KWh][Yr]","Lighting[KWh][Yr]","HotWater[KWh][Yr]","PV[KWh][Yr]"]).range(["#cf5867","#6faadd","#959595","#f2e75c","#eec176","#9C27B0"]);function T$({}){const e=te.useRef();return te.useEffect(()=>{const t=e.current;if(!t)return;Kl(t).select("svg").remove();const n=125,a=20,f=Math.ceil(Dh.domain().length/3)*a,o=Kl(t).append("svg").attr("width","100%").attr("height",f).append("g");Dh.domain().forEach((v,x)=>{const S=Math.floor(x/3),k=x%3,P=o.append("g").attr("transform",`translate(${k*n}, ${S*a})`);P.append("rect").attr("x",15).attr("y",0).attr("width",10).attr("height",10).attr("fill",Dh(v)),P.append("text").attr("x",30).attr("y",10).style("font-size","10px").text(v)})},[]),ee.jsx(ii,{ref:e})}function P$({data:e,colorScale:t,onBarDoubleClick:n,maxSum:a}){const p=te.useRef();return te.useEffect(()=>{if(!p.current)return;const f=p.current;Kl(f).selectAll("*").remove();const o={top:0,right:0,bottom:0,left:0},v=220-o.left-o.right,x=20-o.top-o.bottom,S=Kl(f).append("svg").attr("width",v+o.left+o.right).attr("height",x+o.top+o.bottom).append("g").attr("transform",`translate(${o.left}, ${o.top})`),k=j1().domain([0,a]).range([0,v]);let P=0;S.selectAll(".bar").data(e).enter().append("rect").attr("class","bar").attr("x",I=>{const q=P;return P+=k(I.value),q}).attr("y",0).attr("width",I=>Math.max(1,k(I.value))).attr("height",x).attr("fill",I=>t(I.name)).on("dblclick",I=>n(I.name))},[e,t,n,a]),ee.jsx(ii,{ref:p})}function IS({files:e,setfiles:t,mapRef:n,setBuildingDataUrl:a,setIthacaEnergyUrl:p,BUILDING_DATA_URL:f}){const[o,v]=te.useState([]),[x,S]=te.useState([]),[k,P]=te.useState(null),I=te.useMemo(()=>o.length?Math.max(...o.map(O=>O.data.reduce((Y,ne)=>Y+ne.value,0))):0,[o]),q=O=>{if(!O||O.length===0){v([]);return}let Y=[],ne=0;O.forEach(ue=>{const fe=Ce=>{try{const he=JSON.parse(Ce);he.features[0].properties.type=="EnergyBuilding"&&he.features.forEach(we=>{if(we.geometry.type==="Point"){const ie=ue.name.replace(".geojson",""),me=[{name:"Heating[KWh][Yr]",value:we.properties["Heating[KWh][Yr]"]||0},{name:"Cooling[KWh][Yr]",value:we.properties["Cooling[KWh][Yr]"]||0},{name:"Equipment[KWh][Yr]",value:we.properties["Equipment[KWh][Yr]"]||0},{name:"Lighting[KWh][Yr]",value:we.properties["Lighting[KWh][Yr]"]||0},{name:"HotWater[KWh][Yr]",value:we.properties["HotWater[KWh][Yr]"]||0},{name:"PV[KWh][Yr]",value:we.properties["PV[KWh][Yr]"]||0}];let Ne=Y.findIndex($e=>$e.name===ie);Ne===-1?Y.push({id:Date.now(),name:ie,data:me,fileBlob:ue.file}):Y[Ne].data=me}})}catch(he){console.error("Error parsing file content:",he)}finally{ne++,ne===O.length&&v(Y)}};if(ue.file&&ue.file instanceof File){const Ce=new FileReader;Ce.onload=he=>fe(he.target.result),Ce.onerror=he=>console.error("Error reading the file:",he),Ce.readAsText(ue.file)}else ue.content&&(console.log("Using preloaded content"),fe(ue.content))})};te.useEffect(()=>{e&&q(e)},[e]),te.useEffect(()=>{const O=Y=>{Y.ctrlKey&&Y.key==="z"&&V()};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[x]);const V=()=>{if(x.length>0){const O=x.pop();v(O)}},H=(O,Y)=>{O.dataTransfer.setData("text/plain",Y)},oe=(O,Y)=>{O.preventDefault();const ne=parseInt(O.dataTransfer.getData("text/plain"),10),ue=o.findIndex(we=>we.id===Y),fe=o.findIndex(we=>we.id===ne),Ce=[...o],[he]=Ce.splice(fe,1);Ce.splice(ue,0,he),v(Ce)},$=O=>{O.preventDefault()},F=O=>{P(O);const Y=o.find(ne=>ne.name===O);if(Y){const ne=URL.createObjectURL(Y.fileBlob);a(ne),p(ne);const ue=n.current;if(ue){const fe=ue.getSource("ithaca-energy-Building"),Ce=ue.getSource("ithaca-energy-Summary");if(fe&&Ce)try{fe.setData(ne),Ce.setData(ne)}catch(he){console.error("Error setting map data:",he)}else console.error("Map sources not found.")}}},L=O=>{const Y=O.reduce((fe,Ce)=>fe+Ce.value,0);let ne=1,ue="";return Y>=1e9?(ne=1e9,ue="9"):Y>=1e6?(ne=1e6,ue="6"):Y>=1e3&&(ne=1e3,ue="3"),{value:(Y/ne).toFixed(2),exponent:ue}};return ee.jsxs(ii,{children:[ee.jsx(T$,{colorScale:Dh}),ee.jsx(Iv,{style:{padding:"12px",backgroundColor:"transparent",fontFamily:"Open Sans, sans-serif"},children:o.map(O=>ee.jsxs(pb,{draggable:!0,onDragStart:Y=>H(Y,O.id),onDragOver:$,onDrop:Y=>oe(Y,O.id),onDoubleClick:()=>F(O.name),style:{margin:"7px 0",backgroundColor:k===O.name?"#E0E0E0":"#F5F5F5",borderRadius:"4px",border:"1px solid #E0E0E0",display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"stretch",padding:"10px",cursor:"pointer",height:"100%"},disableGutters:!0,children:[ee.jsx(La,{variant:"body2",style:{fontSize:"14px",fontWeight:"500",marginBottom:"10px"},children:O.name}),ee.jsxs(ii,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[ee.jsx(P$,{data:O.data,colorScale:Dh,maxSum:I,onBarDoubleClick:F}),ee.jsxs(ii,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",marginRight:0},children:[ee.jsx(La,{variant:"body2",style:{fontSize:"12px",fontWeight:"400"},children:ee.jsxs("span",{children:[L(O.data).value,L(O.data).exponent&&ee.jsxs("span",{children:[" ×10",ee.jsx("sup",{children:L(O.data).exponent})]})]})}),ee.jsx(La,{variant:"caption",component:"span",style:{fontWeight:"300",fontSize:"9px"},children:"KWh"})]})]})]},O.id))})]})}const TS=F1().domain(["PeakHourGasDemand_KW","PeakHourElectricityDemand_KW"]).range(["#FFB100","#1569C7"]);function M$({colorScale:e}){const t=te.useRef();return te.useEffect(()=>{const n=t.current;if(!n)return;Kl(n).select("svg").remove();const a=160,p=20,o=Math.ceil(e.domain().length/3)*p,v=Kl(n).append("svg").attr("width","100%").attr("height",o).append("g");e.domain().forEach((x,S)=>{const k=Math.floor(S/3),P=S%3,I=v.append("g").attr("transform",`translate(${P*a}, ${k*p})`);I.append("rect").attr("x",15).attr("y",0).attr("width",10).attr("height",10).attr("fill",e(x)),I.append("text").attr("x",30).attr("y",10).style("font-size","10px").text(x)})},[e]),ee.jsx(ii,{ref:t})}function z$({data:e,colorScale:t,onBarDoubleClick:n,maxSum:a}){const p=te.useRef();return te.useEffect(()=>{if(!p.current)return;const f=p.current;Kl(f).selectAll("*").remove();const o={top:0,right:0,bottom:0,left:0},v=220-o.left-o.right,x=20-o.top-o.bottom,S=Kl(f).append("svg").attr("width",v+o.left+o.right).attr("height",x+o.top+o.bottom).append("g").attr("transform",`translate(${o.left}, ${o.top})`),k=j1().domain([0,a]).range([0,v]);let P=0;S.selectAll(".bar").data(e).enter().append("rect").attr("class","bar").attr("x",I=>{const q=P;return P+=k(I.value),q}).attr("y",0).attr("width",I=>Math.max(1,k(I.value))).attr("height",x).attr("fill",I=>t(I.name)).on("dblclick",I=>n(I.name))},[e,t,n,a]),ee.jsx(ii,{ref:p})}function L$({files:e,setfiles:t,mapRef:n,setFeederDataUrl:a,FEEDER_DATA_URL:p}){const[f,o]=te.useState([]),[v,x]=te.useState([]),[S,k]=te.useState(null),P=te.useMemo(()=>f.length?Math.max(...f.map(L=>L.data.reduce((O,Y)=>O+Y.value,0))):0,[f]),I=L=>{if(!L||L.length===0){o([]);return}let O=[],Y=0;L.forEach(ne=>{const ue=fe=>{try{const Ce=JSON.parse(fe);Ce.features[0].properties.type=="EnergyGrid"&&Ce.features.forEach(he=>{if(he.geometry.type==="Point"){const we=ne.name.replace(".geojson",""),ie=[{name:"PeakHourGasDemand_KW",value:he.properties.PeakHourGasDemand_KW||0},{name:"PeakHourElectricityDemand_KW",value:he.properties.PeakHourElectricityDemand_KW||0}];let me=O.findIndex(Ne=>Ne.name===we);me===-1?O.push({id:Date.now(),name:we,data:ie,fileBlob:ne.file}):O[me].data=ie}})}catch(Ce){console.error("Error parsing file content:",Ce)}finally{Y++,Y===L.length&&o(O)}};if(ne.file&&ne.file instanceof File){const fe=new FileReader;fe.onload=Ce=>ue(Ce.target.result),fe.onerror=Ce=>console.error("Error reading the file:",Ce),fe.readAsText(ne.file)}else ne.content&&(console.log("Using preloaded content"),ue(ne.content))})};te.useEffect(()=>{e&&I(e)},[e]),te.useEffect(()=>{const L=O=>{O.ctrlKey&&O.key==="z"&&q()};return window.addEventListener("keydown",L),()=>{window.removeEventListener("keydown",L)}},[v]);const q=()=>{if(v.length>0){const L=v.pop();o(L)}},V=(L,O)=>{L.dataTransfer.setData("text/plain",O)},H=(L,O)=>{L.preventDefault();const Y=parseInt(L.dataTransfer.getData("text/plain"),10),ne=f.findIndex(he=>he.id===O),ue=f.findIndex(he=>he.id===Y),fe=[...f],[Ce]=fe.splice(ue,1);fe.splice(ne,0,Ce),o(fe)},oe=L=>{L.preventDefault()},$=L=>{k(L);const O=f.find(Y=>Y.name===L);if(O){const Y=URL.createObjectURL(O.fileBlob);a(Y);const ne=n.current;if(ne){const ue=ne.getSource("ithaca-energy-Feeder");if(ue)try{ue.setData(Y)}catch(fe){console.error("Error setting feeder data:",fe)}else console.error("Feeder source not found.")}}else console.error("Selected scenario not found.")},F=L=>{const O=L.reduce((ue,fe)=>ue+fe.value,0);let Y=1,ne="";return O>=1e9?(Y=1e9,ne="9"):O>=1e6?(Y=1e6,ne="6"):O>=1e3&&(Y=1e3,ne="3"),{value:(O/Y).toFixed(2),exponent:ne}};return ee.jsxs(ii,{children:[ee.jsx(M$,{colorScale:TS}),ee.jsx(Iv,{style:{padding:"12px",backgroundColor:"transparent",fontFamily:"Open Sans, sans-serif"},children:f.map(L=>ee.jsxs(pb,{draggable:!0,onDragStart:O=>V(O,L.id),onDragOver:oe,onDrop:O=>H(O,L.id),onDoubleClick:()=>$(L.name),style:{margin:"7px 0",backgroundColor:S===L.name?"#E0E0E0":"#F5F5F5",borderRadius:"4px",border:"1px solid #E0E0E0",display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"stretch",padding:"10px",cursor:"pointer",height:"100%"},disableGutters:!0,children:[ee.jsx(La,{variant:"body2",style:{fontSize:"14px",fontWeight:"500",marginBottom:"10px"},children:L.name}),ee.jsxs(ii,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[ee.jsx(z$,{data:L.data,colorScale:TS,maxSum:P,onBarDoubleClick:$}),ee.jsxs(ii,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",marginRight:0},children:[ee.jsx(La,{variant:"body2",style:{fontSize:"12px",fontWeight:"400"},children:ee.jsxs("span",{children:[F(L.data).value,F(L.data).exponent&&ee.jsxs("span",{children:[" ×10",ee.jsx("sup",{children:F(L.data).exponent})]})]})}),ee.jsx(La,{variant:"caption",component:"span",style:{fontWeight:"300",fontSize:"9px"},children:"KW"})]})]})]},L.id))})]})}var mb={},cT={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(cT);var R$=cT.exports,g_={};const D$=RS(wF);var PS;function B$(){return PS||(PS=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=D$}(g_)),g_}var O$=R$;Object.defineProperty(mb,"__esModule",{value:!0});var pT=mb.default=void 0,N$=O$(B$()),F$=ee;pT=mb.default=(0,N$.default)((0,F$.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");const MS=({sAreas:e,files:t,setFiles:n,energyBuildingDataImport:a,energyGridDataImport:p,mobilityStreetDataImport:f,mobilityBlockDataImport:o,mapRef:v,setTitle:x,setDisplayingLayers:S,setHomeContainerVisible:k,setGeneralContainerVisible:P,buttonSize:I})=>{const[q,V]=te.useState(!1),[H,oe]=te.useState(null),$=te.useRef(null),F=()=>V(!0),L=()=>V(!1),O=fe=>{if(H){const Ce=t.map(he=>he===H?{...he,name:fe.target.value}:he);n(Ce)}},Y=fe=>{Array.from(fe.target.files).map(he=>({file:he,name:he.name.replace(".json","").substring(0,20),content:null})).forEach(he=>{const we=new FileReader;we.onload=ie=>{he.content=ie.target.result,n(me=>me.some($e=>$e.name===he.name)?(alert(`A file with the name ${he.name} already exists.`),me):[...me,he])},we.readAsText(he.file)})},ne=fe=>{const Ce=[...t];Ce.splice(fe,1),n(Ce),H===t[fe]&&oe(null)},ue=()=>{let fe=H;if(!fe&&t.length>0&&(fe=t[0]),!fe){alert("Please select a file from the list!");return}try{const Ce=URL.createObjectURL(fe.file),he=JSON.parse(fe.content);if(he.features&&he.features.length>0){const we=he.features[0].properties.type,ie=v.current;ie.flyTo({center:[-76.5087,42.444],zoom:13}),we==="EnergyBuilding"?(a(Ce),S(["energy-Building","energy-Building-highlighted","energy-Building-other"]),["energy-Building","energy-Building-highlighted","energy-Building-other"].forEach(me=>{ie.setLayoutProperty(me,"visibility","visible")})):we==="EnergyGrid"?(p(Ce),S(["energy-Feeder","energy-Feeder-highlighted","energy-Feeder-other"]),["energy-Feeder","energy-Feeder-highlighted","energy-Feeder-other"].forEach(me=>{ie.setLayoutProperty(me,"visibility","visible")})):we==="MobilityStreet"?(f(Ce),S(["mobility-Street-Detailed","mobility-Street-Detailed-highlighted","mobility-Street-Detailed-other"]),["mobility-Street-Detailed","mobility-Street-Detailed-highlighted","mobility-Street-Detailed-other"].forEach(me=>{ie.setLayoutProperty(me,"visibility","visible")})):we==="MobilityBlock"?(o(Ce),S(["mobility-Block-Detailed","mobility-Block-Detailed-highlighted","mobility-Block-Detailed-other"]),["mobility-Block-Detailed","mobility-Block-Detailed-highlighted","mobility-Block-Detailed-other"].forEach(me=>{ie.setLayoutProperty(me,"visibility","visible")})):alert("Unknown data type in geojson file, please follow the correct format."),x("Urbano Viewer / Ithaca"),k(!1),P(!0)}else throw new Error("No features found in geojson file")}catch(Ce){console.error("Error processing the file",Ce)}L()};return ee.jsxs("div",{children:[ee.jsx(rg,{variant:"contained",color:"primary",onClick:F,sx:{backgroundColor:"gray",fontSize:I==="large"?"1rem":"0.75rem",padding:I==="large"?"8px 12px":"2px 5px"},children:"+ Manage Data"}),ee.jsxs(qj,{open:q,onClose:L,fullWidth:!0,maxWidth:"sm",children:[ee.jsx(cU,{children:"Add and Manage your GeoJSON files here."}),ee.jsxs(oU,{children:[ee.jsxs(rg,{variant:"outlined",component:"label",sx:{marginTop:2},children:["Add File",ee.jsx("input",{type:"file",hidden:!0,accept:".geojson",multiple:!0,onChange:Y,ref:$})]}),ee.jsx(Iv,{children:t.map((fe,Ce)=>ee.jsx(pb,{disablePadding:!0,secondaryAction:ee.jsx(h8,{edge:"end","aria-label":"delete",onClick:()=>ne(Ce),children:ee.jsx(pT,{})}),children:ee.jsx(cV,{onClick:()=>oe(fe),selected:H===fe,children:ee.jsx(PV,{primary:fe.name})})},Ce))}),H&&ee.jsx(w$,{fullWidth:!0,label:"File Name",variant:"outlined",value:H.name,onChange:O,margin:"normal",sx:{marginTop:2}})]}),ee.jsxs(Xj,{children:[ee.jsx(rg,{onClick:L,children:"Cancel"}),ee.jsx(rg,{onClick:ue,children:"View"})]})]})]})};Zs.accessToken="pk.eyJ1Ijoia3g2NCIsImEiOiJjbGkzd2E1dmsxMzNoM2twY2p2azF0bGVlIn0.t_v73kaAMUtoGBPESpw3uA";const j$="./Data/ithaca_mobility_summary.geojson",U$="./Data/ithaca_siteSummary_energy.geojson",V$="./Data/ithaca_energy_buildingData_1107.geojson",$$="./Data/ithaca_energy_feeder.geojson",q$="./Data/ithaca_trip_volume_by_streets.geojson",W$="./Data/ithaca_trip_volume_from_blocks.geojson",zS="./Data/mobility_metric_specification.json",LS="./Data/energy_metric_specification.json",G$="https://geotile.urbano.io/Ithaca_TripVolume/{z}/{x}/{y}.mvt";function H$(){var G;const e=te.useRef(null),t=te.useRef(null),[n,a]=te.useState([0,398]),[p,f]=te.useState(V$),[o,v]=te.useState($$),[x,S]=te.useState(q$),[k,P]=te.useState(W$),[I,q]=te.useState(U$),[V,H]=te.useState(!0),oe="mapbox://styles/kx64/cljdd8xr6003l01qkbxctho6q",[$,F]=te.useState("Urbano Viewer"),[L,O]=te.useState(""),[Y,ne]=te.useState(!0),[ue,fe]=te.useState(!1),[Ce,he]=te.useState(!1),[we,ie]=te.useState(!1),[me,Ne]=te.useState(!1),[$e,Se]=te.useState(!1),[Te,ze]=te.useState(!1),[He,rt]=te.useState(!1),[qe,nt]=te.useState(!1),[ct,Le]=te.useState([]);te.useState(!1);const[vt,$t]=te.useState([]),Je=te.useRef(new Set),[xr,Ct]=te.useState(0),[Ht,er]=te.useState("1_1_-1_-1_-1_-1"),[qt,lt]=te.useState("Gas[kWh_m2][Yr]"),[Ot,tr]=te.useState("PeakHourElectricityDemand_KW"),[yr,Pr]=te.useState(12857),[Qt,Rr]=te.useState(1700),[sr,pr]=te.useState(1e3),[In,Dr]=te.useState(0),[Yt,un]=te.useState(53143),[Xr,cn]=te.useState(1),[Cr,Lt]=te.useState(1),[an,Kn]=te.useState({season:1,mode:-1,weekday:1,timeOfDay:-1,fromActivity:-1,toActivity:-1}),[$i,Mt]=te.useState("People/hr"),[br,pt]=te.useState(ct.length>0?(G=Ym.find(R=>R.id===ct[0]))==null?void 0:G.label:"Dashboard Selector"),Tt=()=>{if(t.current){const R=t.current;ct.forEach(K=>{R.setLayoutProperty(K,"visibility","none")}),F("Urbano Viewer"),Se(!1),he(!1),ie(!1),Ne(!1),ze(!1),fe(!1),ne(!0),Qm(t,Je),Ct(Je.current.size),R.flyTo({center:[-76.5087,42.4558],zoom:8})}},lr=()=>{if(t.current){const R=t.current;R.flyTo({center:[-76.5087,42.444],zoom:13}),Le(["energy-Building","energy-Building-highlighted","energy-Building-other"]),ct.forEach(K=>{R.setLayoutProperty(K,"visibility","visible")}),F("Urbano Viewer"),O("Ithaca /ˈɪθəkə/ is a city and the county seat of Tompkins County, New York, United States. Situated on the southern shore of Cayuga Lake in the Finger Lakes region of New York, Ithaca is the largest community in the Ithaca metropolitan statistical area. It is named after the Greek island of Ithaca."),ne(!1),fe(!0),he(!1),Qm(t,Je),Ct(Je.current.size),popup.remove()}},fr=(R,K)=>{Kn(le=>({...le,[R]:parseInt(K)}))},Qr=()=>{const R=`1_${an.weekday}_${an.mode}_${an.timeOfDay}_${an.fromActivity}_${an.toActivity}`;er(R),console.log("the layer Code you selected is",Ht)};te.useEffect(()=>{const R=K=>{K.key==="Escape"&&(Qm(t,Je),Ct(Je.current.size),ct.includes("energy-Building")&&(SA(Je,t,I),EA(Je,t)),ct.includes("energy-Feeder")&&(CA(Je,t),kA(Je,t),IA(Je,t)),ct.includes("mobility-Block-Detailed")&&(r_(Je,t),t_(Je,t),n_(Je,t),i_(Je,t)),ct.includes("mobility-Street-Detailed")&&(r_(Je,t),t_(Je,t),n_(Je,t),i_(Je,t)))};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R)}},[I]),te.useEffect(()=>{fetch(x).then(R=>R.json()).then(R=>{const K=R.features.map(Ve=>{var Qe;return((Qe=Ve.properties[Ht])==null?void 0:Qe.replace(/,/g,""))||0});K.sort((Ve,it)=>Ve-it);const le=Math.floor(K.length*.05),ge=Math.floor(K.length*.95),W=K[le],re=K[ge],Ee=re-W,Ue=re+1.5*Ee,Ge=K.filter(Ve=>Ve<=Ue),Me=Math.max(...Ge);Pr(Me),ct.includes("mobility-Street-Detailed")&&cn(Me)}).catch(R=>{console.error("Error loading GeoJSON data:",R)})},[Ht]),te.useEffect(()=>{fetch(k).then(R=>R.json()).then(R=>{const K=R.features.map(Ve=>{var Qe;return parseFloat((Qe=Ve.properties[Ht])==null?void 0:Qe.replace(/,/g,""))||0});K.sort((Ve,it)=>Ve-it);const le=Math.floor(K.length*.05),ge=Math.floor(K.length*.95),W=K[le],re=K[ge],Ee=re-W,Ue=re+1.5*Ee,Ge=K.filter(Ve=>Ve<=Ue),Me=Math.max(...Ge);Rr(Me),ct.includes("mobility-Block-Detailed")&&cn(Me)}).catch(R=>{console.error("Error loading GeoJSON data:",R)})},[Ht]),te.useEffect(()=>{fetch(p).then(R=>R.json()).then(R=>{const K=R.features.map(it=>it.properties[qt]||0);K.sort((it,Qe)=>it-Qe);const le=Math.floor(K.length*.2),ge=Math.floor(K.length*.8),W=K[le],re=K[ge],Ee=re-W,Ue=re+1.5*Ee,Ge=K.filter(it=>it<=Ue),Me=Math.max(...Ge),Ve=Math.min(...Ge);pr(Me),Dr(Ve),ct.includes("energy-Building")&&(cn(Me),Lt(Ve))}).catch(R=>{console.error("Error loading GeoJSON data:",R)})},[qt,p]),te.useEffect(()=>{fetch(o).then(R=>R.json()).then(R=>{const K=R.features.map(Ve=>parseFloat(String(Ve.properties[Ot]).replace(/,/g,""))||0);K.sort((Ve,it)=>Ve-it);const le=Math.floor(K.length*.2),ge=Math.floor(K.length*.8),W=K[le],re=K[ge],Ee=re-W,Ue=re+1.5*Ee,Ge=K.filter(Ve=>Ve<=Ue),Me=Math.max(...Ge);un(Me),ct.includes("energy-Feeder")&&cn(Me)}).catch(R=>{console.error("Error loading GeoJSON data:",R)})},[Ot]);const pn=R=>{const K=[];let le=9,ge=Uo(Ht,le);R.includes("mobility-Street-Detailed")?(le=yr,ge=Uo(Ht,le)):R.includes("mobility-Block-Detailed")?(le=Qt,ge=Uo(Ht,le)):R.includes("energy-Building")?(le=sr,ge=Uo(qt,le)):R.includes("energy-Feeder")&&(le=Yt,ge=Uo(Ot,le)),K.push(ee.jsx("div",{className:"legend-title",children:$i},"legend-title")),K.push(ee.jsxs("div",{className:"input-container",children:[" ",Tn()]}));for(let W=ge.length-2;W>=2;W-=2){const re=parseFloat(ge[W]),Ee=ge[W+1];K.push(ee.jsxs("div",{className:"legend-item",children:[ee.jsx("span",{className:"value-label",children:RB(re)}),ee.jsx("div",{className:"color-swatch",style:{backgroundColor:Ee}})]},re))}return K},Tn=()=>{if(ct.includes("mobility-Street-Detailed"))return ee.jsx("input",{id:"user-max-value",type:"number",value:parseInt(yr),onChange:R=>{const K=parseInt(R.target.value);Pr(K)},onBlur:R=>{yr<10&&Pr(10),R.target.value.trim()===""&&Pr(Xr)},placeholder:"Enter Max Value",inputMode:"numeric"});if(ct.includes("mobility-Block-Detailed"))return ee.jsx("input",{id:"user-max-value",type:"number",value:parseInt(Qt),onChange:R=>{const K=parseInt(R.target.value);Rr(K)},onBlur:R=>{Qt<10&&Rr(10),R.target.value.trim()===""&&Rr(Xr)},placeholder:"Enter Max Value",inputMode:"numeric"});if(ct.includes("energy-Building"))return ee.jsx("input",{id:"user-max-value",type:"number",value:parseInt(sr),onChange:R=>{const K=parseInt(R.target.value);pr(K)},onBlur:R=>{sr<10&&pr(10),R.target.value.trim()===""&&pr(Xr)},placeholder:"Enter Max Value",inputMode:"numeric"});if(ct.includes("energy-Feeder"))return ee.jsx("input",{id:"user-max-value",type:"number",value:parseInt(Yt),onChange:R=>{const K=parseInt(R.target.value);un(K)},onBlur:R=>{Yt<10&&un(10),R.target.value.trim()===""&&un(Xr)},placeholder:"Enter Max Value",inputMode:"numeric"})};te.useEffect(()=>{if(!e.current)return;const R=new Zs.Map({container:e.current,style:oe,center:[-76.5087,42.4558],zoom:8.5,dragRotate:!1,accessToken:Zs.accessToken});return t.current=R,()=>{R&&R.remove()}},[V]),te.useEffect(()=>{if(t.current){const R=t.current,K=new zL({accessToken:Zs.accessToken,flyTo:{bearing:0,speed:2,curve:1,easing:function(le){return le}},mapboxgl:Zs});R.addControl(K)}},[]),te.useEffect(()=>{t.current&&t.current.addControl(new Zs.NavigationControl)},[]),te.useEffect(()=>{if(t.current){const R=t.current,K=R.getCanvasContainer();let le,ge,W;R.on("load",function(){const re=R.getStyle().layers;let Ee;for(const Ke of re)if(Ke.type==="symbol"){Ee=Ke.id;break}R.addSource("mobility-Street-mvt",{type:"vector",tiles:[G$]}),R.addSource("mobility-Street-geojson",{type:"geojson",data:x}),R.addSource("mobility-Block-geojson",{type:"geojson",data:k}),R.addSource("mobility-Ithaca",{type:"geojson",data:j$}),R.addLayer({id:"mobility-Block-Detailed",type:"fill",source:"mobility-Block-geojson",paint:{"fill-outline-color":"#ECECEC","fill-color":Uo(Ht,Qt),"fill-opacity":.75},layout:{visibility:"none"}},Ee),R.addLayer({id:"mobility-Block-Detailed-other",type:"fill",source:"mobility-Block-geojson",paint:{"fill-opacity":0},layout:{visibility:"none"}},Ee),R.addLayer({id:"mobility-Block-Detailed-highlighted",type:"fill",source:"mobility-Block-geojson",paint:{"fill-outline-color":"#ffffff","fill-color":"#E8E8E8","fill-opacity":.99},filter:["in","object_id",""],layout:{visibility:"none"}},Ee),R.addLayer({id:"mobility-Street-Detailed",type:"line",source:"mobility-Street-geojson",paint:{"line-color":Uo(Ht,yr),"line-width":["interpolate",["exponential",1],["to-number",["get",Ht]],0,1,parseFloat(yr),5]},layout:{visibility:"none"}},Ee),R.addLayer({id:"mobility-Street-Detailed-other",type:"line",source:"mobility-Street-geojson",paint:{"line-color":"#f7f7f7","line-width":0},layout:{visibility:"none"}},Ee),R.addLayer({id:"mobility-Street-Detailed-highlighted",type:"line",source:"mobility-Street-geojson",paint:{"line-color":"#d8d8d8","line-width":["interpolate",["exponential",1],["to-number",["get",Ht]],0,1.75,parseFloat(yr),6]},filter:["in","object_id",""],layout:{visibility:"none"}},Ee),R.addLayer({id:"mobility-Ithaca-boundary",type:"line",source:"mobility-Ithaca",paint:{"line-color":"#bbbbbb","line-dasharray":[10,6],"line-opacity":.6},layout:{visibility:"none"}});const Ue=new Zs.Popup({closeButton:!1,closeOnClick:!1});R.on("mouseenter","mobility-point",Ke=>{R.getCanvas().style.cursor="pointer";const Ze=Ke.features[0].geometry.coordinates.slice(),ot=`
Ithaca, New York
+
Available Dashboard:
+ +
Building Energy
+
Grid Energy
+
Street Mobility
+
Block Mobility
`;for(;Math.abs(Ke.lngLat.lng-Ze[0])>180;)Ze[0]+=Ke.lngLat.lng>Ze[0]?360:-360;Ue.setLngLat(Ze).setHTML(ot).addTo(R)}),R.on("mouseleave","mobility-point",()=>{R.getCanvas().style.cursor="",Ue.remove()}),R.on("click","mobility-point",Ke=>{R.flyTo({center:Ke.features[0].geometry.coordinates,zoom:13}),Le(["energy-Building","energy-Building-highlighted","energy-Building-other"]),ct.forEach(Ze=>{R.setLayoutProperty(Ze,"visibility","visible")}),F("Urbano Viewer"),O("Ithaca /ˈɪθəkə/ is a city and the county seat of Tompkins County, New York, United States. Situated on the southern shore of Cayuga Lake in the Finger Lakes region of New York, Ithaca is the largest community in the Ithaca metropolitan statistical area. It is named after the Greek island of Ithaca."),ne(!1),fe(!0),Ue.remove()}),R.on("boxzoomend",Ke=>{R.dragPan.enable();const Ze=Ke.boxZoomBounds;R.fitBounds(Ze,{padding:1})}),R.on("zoom",()=>{const Ke="mobility-Ithaca-boundary";R.getZoom()<10?R.setLayoutProperty(Ke,"visibility","none"):R.setLayoutProperty(Ke,"visibility","visible")}),K.addEventListener("mousedown",Ve,!0);function Ge(Ke){const Ze=K.getBoundingClientRect();return new Zs.Point(Ke.clientX-Ze.left-K.clientLeft,Ke.clientY-Ze.top-K.clientTop)}function Me(){console.log("sAreas.current:",Je.current);const Ke=Array.from(Je.current).filter(Ze=>Ze!==void 0);Ke.length>0?(R.setFilter("mobility-Street-Detailed-highlighted",["!in","object_id",...Ke]),R.setFilter("mobility-Block-Detailed-highlighted",["!in","object_id",...Ke])):console.error("No valid areas to set in filter")}function Ve(Ke){if(Ke.button===0&&(Ke.shiftKey&&R.dragPan.disable(),document.addEventListener("mouseup",it),document.addEventListener("keydown",Be),le=Ge(Ke),Ke.ctrlKey)){const ot=R.queryRenderedFeatures([le,le],{layers:["mobility-Street-Detailed","mobility-Block-Detailed"]}).map(Wt=>Wt.properties.object_id);Je.current=new Set([...Je.current].filter(Wt=>!ot.includes(Wt))),Me(),Ct(Je.current.size)}}function it(Ke){R.dragPan.enable(),ge=Ge(Ke);const Ze=R.queryRenderedFeatures([le,ge],{layers:["mobility-Street-Detailed","mobility-Block-Detailed"]});Qe(Ke,Ze)}function Qe(Ke,Ze){if(W||(W=document.createElement("div"),W.classList.add("boxdraw"),K.appendChild(W)),Ke.shiftKey){for(const ot of Ze)Je.current.add(ot.properties.object_id);Me()}if(Ke.ctrlKey){for(const ot of Ze)Je.current.delete(ot.properties.object_id);Me()}document.removeEventListener("keydown",Be),document.removeEventListener("mouseup",it),Ct(Je.current.size)}function Be(Ke){Ke.keyCode===27&&mobilityfinish()}})}},[]),te.useEffect(()=>{if(t.current){const R=t.current,K=R.getCanvasContainer();let le,ge;R.on("load",function(){const W=R.getStyle().layers;let re;for(const Qe of W)if(Qe.type==="symbol"){re=Qe.id;break}R.addSource("ithaca-energy-Summary",{type:"geojson",data:I}),R.addSource("ithaca-energy-Building",{type:"geojson",data:p}),R.addSource("ithaca-energy-Feeder",{type:"geojson",data:o}),R.addLayer({id:"energy-Building",type:"fill",source:"ithaca-energy-Building",filter:["has","Equipment[KWh][Yr]"],paint:{"fill-outline-color":"#eeeeee","fill-color":Uo(qt,sr)},layout:{visibility:"none"}},re),R.addLayer({id:"energy-Building-highlighted",type:"fill",source:"ithaca-energy-Building",paint:{"fill-outline-color":"#ffffff","fill-color":"#d8d8d8","fill-opacity":.99},filter:["in","ID_ESL",""],layout:{visibility:"none"}},re),R.addLayer({id:"energy-Building-other",type:"fill",source:"ithaca-energy-Building",filter:["!",["has","Gas[kWh][Mth]"]],paint:{"fill-outline-color":"#d9d9d9","fill-color":"#f1f1f1"},layout:{visibility:"none"}},re),R.addLayer({id:"energy-Feeder",type:"line",source:"ithaca-energy-Feeder",filter:["has","PeakHourGasDemand_KW"],paint:{"line-color":Uo(Ot,Yt),"line-width":3},layout:{visibility:"none"}},re),R.addLayer({id:"energy-Feeder-other",type:"line",source:"ithaca-energy-Feeder",filter:["!",["has","PeakHourGasDemand_KW"]],paint:{"line-width":3,"line-color":"#d8d8d8"},layout:{visibility:"none"}},re),R.addLayer({id:"energy-Feeder-highlighted",type:"line",source:"ithaca-energy-Feeder",filter:["has","PeakHourGasDemand_KW"],paint:{"line-color":"#d8d8d8","line-width":3},layout:{visibility:"none"}},re),K.addEventListener("mousedown",Ge,!0);function Ee(Qe){const Be=K.getBoundingClientRect();return new Zs.Point(Qe.clientX-Be.left-K.clientLeft,Qe.clientY-Be.top-K.clientTop)}function Ue(){console.log("sAreas.current:",Je.current);const Qe=Array.from(Je.current).filter(Be=>Be!==void 0);Qe.length>0?(R.setFilter("energy-Building-highlighted",["!in","ID_ESL",...Qe]),R.setFilter("energy-Feeder-highlighted",["!in","ID_ESL",...Qe])):console.error("No valid areas to set in filter")}function Ge(Qe){Qe.button===0&&(Qe.shiftKey&&R.dragPan.disable(),document.removeEventListener("mouseup",Me),document.removeEventListener("keydown",Ve),document.addEventListener("mouseup",Me),document.addEventListener("keydown",Ve),le=Ee(Qe),Qe.ctrlKey&&(R.queryRenderedFeatures([le,le],{layers:["energy-Building","energy-Feeder"]}).map(Ze=>Ze.properties.ID_ESL).forEach(Ze=>{Je.current.has(Ze)&&Je.current.delete(Ze)}),Ue()))}function Me(Qe){R.dragPan.enable(),ge=Ee(Qe);const Be=R.queryRenderedFeatures([le,ge],{layers:["energy-Building","energy-Feeder"]});it(Qe,Be)}function Ve(Qe){Qe.keyCode===27&&it(Qe,[])}function it(Qe,Be){document.removeEventListener("mouseup",Me),document.removeEventListener("keydown",Ve),Qe.shiftKey?(Be.forEach(Ke=>{const Ze=Ke.properties.ID_ESL;Je.current.has(Ze)||Je.current.add(Ze)}),Ue()):Qe.ctrlKey&&(Be.forEach(Ke=>{const Ze=Ke.properties.ID_ESL;Je.current.has(Ze)&&Je.current.delete(Ze)}),Ue()),Ct(Je.current.size),console.log(Je.current)}te.useEffect(()=>{},[p,I,Je])})}},[p,I]),te.useEffect(()=>{const K=setTimeout(async()=>{if(t.current){const le=t.current,ge="mobility-Street-Detailed",W="mobility-Street-Detailed-highlighted",re="mobility-Block-Detailed",Ee="energy-Building",Ue="energy-Feeder",Ge=yr,Me=Qt,Ve=sr,it=Yt;le.getLayer(ge)&&(le.setPaintProperty(ge,"line-color",Uo(Ht,Ge)),le.setPaintProperty(W,"line-width",["interpolate",["exponential",1],["to-number",["get",Ht]],0,1.75,parseFloat(yr),6]),le.setPaintProperty(ge,"line-width",["interpolate",["exponential",1],["to-number",["get",Ht]],0,1.5,parseFloat(yr),6])),le.getLayer(re)&&le.setPaintProperty(re,"fill-color",Uo(Ht,Me)),le.getLayer(Ee)&&le.setPaintProperty(Ee,"fill-color",Uo(qt,Ve)),le.getLayer(Ue)&&le.setPaintProperty(Ue,"line-color",Uo(Ot,it))}},700);return()=>clearTimeout(K)},[Qt,yr,sr,Yt,Ht,qt,Ot]),te.useEffect(()=>{if(t.current){const R=t.current,K=["mobility-Street-Detailed","mobility-Block-Detailed","energy-Building","energy-Feeder"];for(const le of K){if(!R.getLayer(le))continue;const ge=ct.includes(o_(le)),W=ct.includes(a_(le)),re=ct.includes(le)||ge||W;W&&R.setLayoutProperty(a_(le),"visibility",re?"visible":"none"),ge&&R.setLayoutProperty(o_(le),"visibility",re?"visible":"none"),R.setLayoutProperty(le,"visibility",re?"visible":"none")}}},[ct]);const ai=R=>{const K=t.current,le=o_(R),ge=a_(R),W=ct.includes(le),re=ct.includes(ge),Ee=ct.find(Ue=>Ue!==le);if(Qm(t,Je),K.setLayoutProperty(Ee,"visibility","none"),ct.forEach(Ue=>{K.setLayoutProperty(Ue,"visibility","none")}),ct.includes(R))Le(ct.filter(Ue=>Ue!==le&&Ue!==ge&&Ue!==R)),pt("Map Dashboard Selector"),he(!1),Ne(!1),he(!1),Se(!1),ze(!1),set;else{Le([le,ge,R]),K.setLayoutProperty(le,"visibility",W?"visible":"none"),K.setLayoutProperty(ge,"visibility",re?"visible":"none");const Ge=Ym.find(Me=>Me.id===R);pt((Ge==null?void 0:Ge.label)||"Map Dashboard Selector")}};te.useEffect(()=>{ct.includes("energy-Building")&&(he(!1),Ne(!0),Se(!0),ze(!1),fetch(LS).then(R=>R.json()).then(R=>{const K=R[0].metric_description;O(K)}),cn(sr),Mt("kWh/m2")),ct.includes("energy-Feeder")&&(he(!1),ie(!1),Ne(!0),ze(!0),Se(!1),fetch(LS).then(R=>R.json()).then(R=>{const K=R[1].metric_description;O(K)}),cn(Yt),Mt("kW")),(ct.includes("mobility-Street-Detailed")||ct.includes("mobility-Block-Detailed"))&&(he(!0),Ne(!1),Se(!1),ze(!1),ct.includes("mobility-Street-Detailed")?(fetch(zS).then(R=>R.json()).then(R=>{const K=R[0].metric_description;O(K)}),cn(yr),ie(!1)):(fetch(zS).then(R=>R.json()).then(R=>{const K=R[1].metric_description;O(K)}),cn(Qt),ie(!0)),Mt("Number of Trips"))},[ct,qt,Je]);const[fi,Jo]=te.useState(null),dn={home:ee.jsx(TA,{handleDigitalTwinClick:lr}),general:ee.jsx(PA,{toggleableLayers:Ym,displayingLayers:ct,handleLayerToggle:ai}),notUsing:ee.jsx("div",{className:"city-info",children:L})},B=(R,K,le)=>{const ge=[Math.min(R[0],K),Math.min(R[1],K)];return ge[0]>ge[1]&&(ge[0]=le),ge};te.useEffect(()=>{const R=parseFloat(sr),K=parseFloat(In),le=B(n,R,K);a(le)},[sr,In]);const j=()=>{nt(!qe)};return ee.jsxs("div",{className:"container",children:[(Ce||me)&&ee.jsxs("div",{className:"sidebar",children:[ee.jsx("div",{className:"title-container",children:ee.jsx("div",{className:"title",children:ee.jsx("p",{onClick:Tt,children:$})})}),dn[fi],Y&&ee.jsx("div",{className:"home-page",children:ee.jsx(TA,{handleDigitalTwinClick:lr})}),ue&&ee.jsx("div",{children:ee.jsx(PA,{toggleableLayers:Ym,displayingLayers:ct,handleLayerToggle:ai})}),He&&ee.jsx("div",{className:"city-info",children:L}),ue&&ee.jsxs("div",{className:"dataset-container-flex",children:[ee.jsx("div",{className:"hr-container",children:ee.jsx("span",{className:"summary-title",children:"Dataset Management"})}),ee.jsx("div",{className:"manage-button-map",children:ee.jsx(MS,{sAreas:Je,files:vt,setFiles:$t,energyBuildingDataImport:f,energyGridDataImport:v,mobilityStreetDataImport:S,mobilityBlockDataImport:P,mapRef:t,setTitle:F,setDisplayingLayers:Le,setHomeContainerVisible:ne,setGeneralContainerVisible:fe,handleLayerToggle:!0,buttonSize:"small"})})]}),Ce&&ee.jsx("div",{children:ee.jsx(IS,{files:vt,setfiles:$t,mapRef:t,setBuildingDataUrl:f,setIthacaEnergyUrl:q,BUILDING_DATA_URL:p})}),$e&&ee.jsx("div",{children:ee.jsx(IS,{files:vt,setfiles:$t,mapRef:t,setBuildingDataUrl:f,setIthacaEnergyUrl:q,BUILDING_DATA_URL:p})}),Te&&ee.jsx("div",{children:ee.jsx(L$,{files:vt,setfiles:$t,mapRef:t,setFeederDataUrl:v,FEEDER_DATA_URL:o})})]}),(Ce||me)&&ee.jsxs("div",{className:"sidebar-graph",children:[ue&&ee.jsxs("div",{children:[ee.jsx("div",{class:"hr-container",children:ee.jsx("span",{class:"summary-title",children:"Summary Report"})}),ee.jsx("div",{className:"selected-number",children:ee.jsxs("p",{children:[xr," Selected objects."]})})]}),Ce&&ee.jsx("div",{children:ee.jsx(C$,{})}),$e&&ee.jsx("div",{children:ee.jsx(k$,{})}),Te&&ee.jsx("div",{children:ee.jsx(I$,{})}),(Y||ue)&&ee.jsx("div",{style:{margin:"20px"}}),Ce&&(r_(Je,t),t_(Je,t),n_(Je,t),i_(Je,t)),me&&(DB(Je,t,I),SA(Je,t,I),EA(Je,t)),Te&&(CA(Je,t),kA(Je,t),IA(Je,t))]}),ee.jsxs("div",{className:"content-container",children:[ee.jsx("div",{className:"map-container",ref:e}),Y&&ee.jsx("img",{className:"homepage-logo",src:"Image/Urbano-Viewer-Logo.png",alt:"Urbano Viewer"}),Y&&ee.jsx("div",{className:"manage-button-home",children:ee.jsx(MS,{sAreas:Je,files:vt,setFiles:$t,energyBuildingDataImport:f,energyGridDataImport:v,mobilityStreetDataImport:S,mobilityBlockDataImport:P,mapRef:t,setTitle:F,setDisplayingLayers:Le,setHomeContainerVisible:ne,setGeneralContainerVisible:fe,buttonSize:"large"})}),(Ce||me)&&ee.jsx("div",{className:"main-legend-container",children:pn(ct)}),(Ce||me)&&ee.jsxs("div",{className:"metric-container",children:[ue&&ee.jsx("div",{style:{position:"relative"},children:ee.jsx("span",{class:"click-title",onClick:j,children:ee.jsx("div",{class:"click-title",style:{display:"flex",alignItems:"center"},children:"Metrics"})})}),qe&&$e&&ee.jsx(jB,{buildingLayerCode:qt,setBuildingLayerCode:lt}),qe&&Te&&ee.jsx(A$,{feederLayerCode:Ot,setFeederLayerCode:tr}),qe&&Ce&&ee.jsx(S$,{propertiesNumber:an,handlePropertyChange:fr,blockContainerVisible:we}),qe&&Ce&&ee.jsx(E$,{propertiesNumber:an,handlePropertyChange:fr}),qe&&Ce&&ee.jsx("button",{className:"submit-button",onClick:Qr,children:"Apply"})]})]})]})}function Z$(e){gh.render(ee.jsx(H$,{}),e)}Z$(document.getElementById("app")); diff --git a/assets/index-7386ba2e.css b/assets/index-7386ba2e.css new file mode 100644 index 00000000..5974f228 --- /dev/null +++ b/assets/index-7386ba2e.css @@ -0,0 +1 @@ +body{margin:0;font-family:Open Sans,Arial,sans-serif;width:100vw;height:100vh;overflow:hidden}#app{width:100%;height:100%}.container{position:relative;width:100%;height:100%;display:flex}.content-container{flex:1;height:100%;display:flex;flex-direction:column}.content-container-blur{filter:blur(5px);flex:1;height:100%;display:flex;flex-direction:column}.content-container .login-container{position:absolute;right:275px;top:10px}.homepage-logo{width:500px;height:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:transparent}.login-button{padding:10px 20px;font-size:12px;font-weight:700;text-align:center;color:#000;background-color:#fff;border:1px solid #cccccc;border-radius:4px;cursor:pointer}.login-button:hover{background-color:#d4d4d4}.manage-button-home{position:absolute;top:60%;left:47%}.sidebar .manage-button-map{position:relative;vertical-align:top;padding:10px 15px}.sidebar .dataset-container-flex{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sidebar,.sidebar-graph{position:fixed;left:15px;max-width:390px;width:100%;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);overflow-y:auto;z-index:1000;border-radius:15px;box-shadow:0 4px 8px #0003;padding:15px}.sidebar{top:15px;height:calc(50vh + 15px)}.sidebar-graph{top:calc(50vh + 80px);height:calc(50vh - 140px);margin-bottom:10px}.sidebar::-webkit-scrollbar,.sidebar-graph::-webkit-scrollbar{width:.4em}.sidebar::-webkit-scrollbar-thumb,.sidebar-graph::-webkit-scrollbar-thumb{background-color:#0000001a;border-radius:4px}.title-container{display:flex;align-items:center}.homepage-title{position:absolute;top:25%;left:50%;transform:translate(-50%,-50%);font-family:Open Sans,Arial,sans-serif;font-weight:900;font-size:72px}.title{font-family:Open Sans,Arial,sans-serif;font-weight:700;margin-bottom:5px;font-size:26px}.second-title{font-family:Open Sans,Arial,sans-serif;font-size:16px;font-weight:700}.third-title{cursor:pointer;font-family:Open Sans,Arial,sans-serif;font-size:14px;font-weight:700;margin-bottom:5px}.summary-title{font-family:Open Sans,Arial,sans-serif;font-size:18px;font-weight:700}.click-title{font-family:Open Sans,Arial,sans-serif;font-size:14px;font-weight:700;margin-bottom:5px}.main-text{max-width:95%;font-family:Open Sans,Arial,sans-serif;font-size:12px;font-weight:light}.version-text{margin-left:10px;font-family:Open Sans,Arial,sans-serif;font-size:8px;font-weight:light;color:#959595}.sidebar .general-image{max-width:95%;height:auto}.logo-image{max-width:25%;height:auto;margin-top:10px;margin-right:5px}.icon-image{width:25px;margin:3px 4px}.dashboard-selector{position:relative;justify-content:space-between;align-items:center}.checkbox-container{display:flex;align-items:center;padding:2px;cursor:pointer}.checkbox-container:hover{background-color:#f0f0f0}.checkbox-container input:checked+label{font-weight:700;font-family:Open Sans,Arial,sans-serif}.checkbox-container:hover label{font-weight:400;font-family:Open Sans,Arial,sans-serif}.dropdown{position:relative}.dropdown-toggle{display:block;padding:6px 12px;height:35px;width:320px;font-size:14px;font-weight:600;font-family:Open Sans,Arial,sans-serif;line-height:1.42857143;color:#333;background-color:#fff;border:1px solid #ccc;border-radius:4px;margin-bottom:20px;margin-left:20px}.dropdown.open .dropdown-toggle{background-color:#f8f8f8}.dropdown-menu{display:none;position:absolute;width:320px;top:100%;z-index:1000;min-width:160px;padding:10px 0;font-size:12px;font-family:Open Sans,Arial,sans-serif;text-align:middle;background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 3px 3px #0000002d;margin:2px 0 0 20px}.dropdown.open .dropdown-menu{display:block}.mobility-dropdown-mode{height:30px;display:block;padding:6px 12px;width:140px;font-size:10px;font-family:Open Sans,Arial,sans-serif;line-height:1.42857143;color:#333;background-color:#fff;border:1px solid #ccc;border-radius:4px;margin-bottom:20px}.city-info{font-size:12px;font-family:Open Sans,Arial,sans-serif;margin-bottom:20px;margin-left:15px;margin-right:15px}.hr-container{display:flex;align-items:center;margin-top:5px;margin-bottom:10px}.sidebar-divider{flex-grow:1;border:none;border-top:1.25px solid #959595;margin:10px}.sidebar-divider-2{flex-grow:1;border:none;border-top:2px dashed #959595;margin:30px 0}.dashboard-button-menu{width:380px;display:flex;flex-wrap:wrap;justify-content:center}.dashboard-button{font-size:12px;font-family:Open Sans,Arial,sans-serif;display:flex;flex-direction:column;align-items:center;padding:6px;margin:5px 10px 15px 5px;background-color:#e2e2e2;border:none;cursor:pointer;width:80px;min-height:40px;box-sizing:border-box;gap:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-radius:10px}.dashboard-button.active{min-height:auto;background-color:#e3e3e3;color:#222}.dashboard-button:hover{background-color:#e6e6e6;color:#000}.dashboard-label-selected{font-size:12px;font-family:Open Sans,Arial,sans-serif;font-weight:700;display:block;max-height:40px;overflow:hidden;word-wrap:break-word;white-space:normal}.dashboard-label-unselected{font-size:13px;font-family:Open Sans,Arial,sans-serif;font-weight:400;color:#969696;display:block;min-height:40px;overflow:hidden;word-wrap:break-word;white-space:normal}.graph-container-info .graph-container-weekday .graph-container-weekend .graph-container-energybuildingsenario .graph-container-energysummaryuse .graph-container-energyenduse .graph-container-energyfueluse .graph-container-energyzero .graph-container-energyone .graph-container-energytwo .graph-container-energythree{font-family:Open Sans,Arial,sans-serif}.graph-container-info svg .graph-container-weekday svg .graph-container-weekend svg .graph-container-energyzero svg .graph-container-energysummaryuse svg .graph-container-energyenduse svg .graph-container-energyfueluse svg .graph-container-energyone svg .graph-container-energytwo svg .graph-container-energythree svg{width:100%;font-family:Open Sans,Arial,sans-serif}.graph-container-info .legend,.graph-container-weekday .legend,.graph-container-weekend .legend,.graph-container-energyzero .legend .graph-container-energysummaryuse .legend .graph-container-energyenduse .legend .graph-container-energyfueluse .legend .graph-container-energyone .legend .graph-container-energytwo .legend .graph-container-energythree .legend{font-size:12px;font-family:Open Sans,Arial,sans-serif}.graph-container-info .legend rect,.graph-container-weekday .legend rect,.graph-container-weekend .legend rect,.graph-container-energyzero .legend rect .graph-container-energysummaryuse .legend rect .graph-container-energyenduse .legend rect .graph-container-energyfueluse .legend rect .graph-container-energyone .legend rect .graph-container-energytwo .legend rect .graph-container-energythree .legend rect{font-family:Open Sans,Arial,sans-serif}.bar{display:flex;margin-bottom:20px}.bar-label{width:100px;margin-right:10px;font-size:10px;font-family:Open Sans,Arial,sans-serif}.bar-value{width:200px;height:20px;background-color:#ccc}.bar-value-inner{height:100%}.bar-graph-container{position:relative;width:100%;height:100%}.Selection-tutorial{font-family:Open Sans,Arial,sans-serif;font-size:10px;width:400px;color:#8d8d8d;-webkit-user-select:none;user-select:none;cursor:pointer}.triangle{display:inline-block;margin-left:5px}.triangle.right{transform:rotate(180deg)}.triangle.up{transform:rotate(90deg)}.map-container{flex:1;position:relative}.bar-value-label{font-family:Open Sans,Arial,sans-serif;font-size:10px;text-anchor:middle;fill:#333;margin-top:-5px}.total-sum-label{font-family:Open Sans,Arial,sans-serif;font-size:12px;text-anchor:middle;fill:#333;margin-bottom:10px}.sidebar .contact-button{padding:5px;border:1px solid #ccc;border-radius:5px;margin-top:35px;margin-bottom:20px;width:140px;border:1px solid #cccccc;font-weight:500;font-family:Open Sans,Arial,sans-serif;cursor:pointer;background-color:#f5f5f5}.contact-button:hover{background-color:#e0e0e0;font-weight:700}.week-caption{font-size:12px;font-family:Open Sans,Arial,sans-serif}.sidebar .energy-button{position:absolute;bottom:30px;right:120px;width:50px;padding:5px;border:1px solid #ccc;border-radius:5px;margin-bottom:8px}#sankey-chart{width:100%;height:calc(100% - 120px);margin-top:120px}.mobility-dropdown-container{display:flex;width:380px;gap:10px;margin-bottom:8px}.mobility-dropdown{width:130px;padding:5px;border:1px solid #ccc;border-radius:5px;margin-bottom:10px}.mobility-dropdown-activity{width:185px;padding:5px;border:1px solid #ccc;border-radius:5px;margin-bottom:10px}.energy-dropdown{width:180px;padding:5px;border:1px solid #ccc;border-radius:5px;margin-bottom:12px;margin-right:7px}.energy-dropdown-feeder{width:230px;padding:5px;border:1px solid #ccc;border-radius:5px;margin-bottom:12px;margin-right:8px}.submit-button{width:140px;padding:3px;border:1px solid #cccccc;font-weight:500;font-family:Open Sans,Arial,sans-serif;cursor:pointer;background-color:#f5f5f5;margin-bottom:5px}.groupSelect-button{width:100px;padding:2px;border:1px solid #cccccc;font-weight:500;font-family:Open Sans,Arial,sans-serif;cursor:pointer;background-color:#f5f5f5;margin-top:40px}.submit-button:hover{background-color:#e0e0e0;font-weight:700}.selected-number{font-size:11px;font-family:Open Sans,Arial,sans-serif}.content-container .metric-container{position:fixed;top:20px;left:460px;width:auto;height:auto;padding:15px;margin-top:5px;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:4px;box-shadow:2px 2px 5px #0000001a}.content-container .groupSelection-container{position:absolute;height:150px;width:auto;padding:12px;margin:10px 10px 10px 15px;bottom:30px;background-color:#ffffffb3;border-radius:5px;box-shadow:2px 2px 5px #0000001a}.groupSelection-min{font-size:14px;font-weight:700;font-family:Open Sans,Arial,sans-serif;margin-right:20px}.groupSelection-max{font-size:14px;font-weight:700;font-family:Open Sans,Arial,sans-serif;margin-left:20px}.track{height:10px;width:100%;border-radius:5px;background:#ddd;align-self:center}.thumb{height:20px;width:20px;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center;box-shadow:0 2px 6px #aaa;border:solid 2px #CCC}.innerThumb{height:16px;width:16px;border-radius:50%;background-color:#ccc}.rangeDisplay{margin-top:30px;text-align:center;font-size:16px}.main-legend-container{position:absolute;width:70px;padding:12px;margin:15px;bottom:10px;right:1px;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:5px;box-shadow:2px 2px 5px #0000001a}.legend-item{display:flex;align-items:center;margin-bottom:15px}.value-label{font-size:12px;font-family:Open Sans,Arial,sans-serif;width:30px;margin-right:15px;text-align:right;color:#000;right:3px}.color-swatch{width:20px;height:13px;margin-left:auto}.legend-title{margin-left:7px;margin-bottom:12px;font-size:12px;font-weight:600;font-family:Open Sans,Arial,sans-serif;color:#000}.content-container .input-container{font-size:10px;font-family:Open Sans,Arial,sans-serif;position:absolute;right:40px;margin-bottom:12px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{min-width:36px;height:10px;width:calc(12px * var(--input-value-length, 1))}.mobility-popup{width:160px;height:100px;font-size:12px;font-family:Open Sans,Arial,sans-serif}.mobility-popup .block-id{font-size:16px;font-family:Open Sans,Arial,sans-serif} diff --git a/index.html b/index.html index bb5e0fd9..6befd2a0 100644 --- a/index.html +++ b/index.html @@ -15,8 +15,8 @@ - - + +