function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
var $q=Object.defineProperty;var Qq=(n,e,t)=>e in n?$q(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var sn=(n,e,t)=>(Qq(n,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=t(i);fetch(i.href,o)}})();var Vf=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function Ba(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function VB(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var oF={exports:{}},D5={},aF={exports:{}},Bo={};/**
 * @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 Ib=Symbol.for("react.element"),Yq=Symbol.for("react.portal"),qq=Symbol.for("react.fragment"),Vq=Symbol.for("react.strict_mode"),Hq=Symbol.for("react.profiler"),Zq=Symbol.for("react.provider"),Xq=Symbol.for("react.context"),Jq=Symbol.for("react.forward_ref"),eV=Symbol.for("react.suspense"),tV=Symbol.for("react.memo"),nV=Symbol.for("react.lazy"),Wk=Symbol.iterator;function rV(n){return n===null||typeof n!="object"?null:(n=Wk&&n[Wk]||n["@@iterator"],typeof n=="function"?n:null)}var sF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lF=Object.assign,uF={};function xv(n,e,t){this.props=n,this.context=e,this.refs=uF,this.updater=t||sF}xv.prototype.isReactComponent={};xv.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=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,n,e,"setState")};xv.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function AF(){}AF.prototype=xv.prototype;function HB(n,e,t){this.props=n,this.context=e,this.refs=uF,this.updater=t||sF}var ZB=HB.prototype=new AF;ZB.constructor=HB;lF(ZB,xv.prototype);ZB.isPureReactComponent=!0;var Gk=Array.isArray,cF=Object.prototype.hasOwnProperty,XB={current:null},dF={key:!0,ref:!0,__self:!0,__source:!0};function hF(n,e,t){var r,i={},o=null,a=null;if(e!=null)for(r in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)cF.call(e,r)&&!dF.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=t;else if(1<s){for(var d=Array(s),f=0;f<s;f++)d[f]=arguments[f+2];i.children=d}if(n&&n.defaultProps)for(r in s=n.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Ib,type:n,key:o,ref:a,props:i,_owner:XB.current}}function iV(n,e){return{$$typeof:Ib,type:n.type,key:e,ref:n.ref,props:n.props,_owner:n._owner}}function JB(n){return typeof n=="object"&&n!==null&&n.$$typeof===Ib}function oV(n){var e={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(t){return e[t]})}var $k=/\/+/g;function YM(n,e){return typeof n=="object"&&n!==null&&n.key!=null?oV(""+n.key):e.toString(36)}function o3(n,e,t,r,i){var o=typeof n;(o==="undefined"||o==="boolean")&&(n=null);var a=!1;if(n===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(n.$$typeof){case Ib:case Yq:a=!0}}if(a)return a=n,i=i(a),n=r===""?"."+YM(a,0):r,Gk(i)?(t="",n!=null&&(t=n.replace($k,"$&/")+"/"),o3(i,e,t,"",function(f){return f})):i!=null&&(JB(i)&&(i=iV(i,t+(!i.key||a&&a.key===i.key?"":(""+i.key).replace($k,"$&/")+"/")+n)),e.push(i)),1;if(a=0,r=r===""?".":r+":",Gk(n))for(var s=0;s<n.length;s++){o=n[s];var d=r+YM(o,s);a+=o3(o,e,t,d,i)}else if(d=rV(n),typeof d=="function")for(n=d.call(n),s=0;!(o=n.next()).done;)o=o.value,d=r+YM(o,s++),a+=o3(o,e,t,d,i);else if(o==="object")throw e=String(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function n2(n,e,t){if(n==null)return n;var r=[],i=0;return o3(n,r,"","",function(o){return e.call(t,o,i++)}),r}function aV(n){if(n._status===-1){var e=n._result;e=e(),e.then(function(t){(n._status===0||n._status===-1)&&(n._status=1,n._result=t)},function(t){(n._status===0||n._status===-1)&&(n._status=2,n._result=t)}),n._status===-1&&(n._status=0,n._result=e)}if(n._status===1)return n._result.default;throw n._result}var $A={current:null},a3={transition:null},sV={ReactCurrentDispatcher:$A,ReactCurrentBatchConfig:a3,ReactCurrentOwner:XB};Bo.Children={map:n2,forEach:function(n,e,t){n2(n,function(){e.apply(this,arguments)},t)},count:function(n){var e=0;return n2(n,function(){e++}),e},toArray:function(n){return n2(n,function(e){return e})||[]},only:function(n){if(!JB(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Bo.Component=xv;Bo.Fragment=qq;Bo.Profiler=Hq;Bo.PureComponent=HB;Bo.StrictMode=Vq;Bo.Suspense=eV;Bo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sV;Bo.cloneElement=function(n,e,t){if(n==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+n+".");var r=lF({},n.props),i=n.key,o=n.ref,a=n._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,a=XB.current),e.key!==void 0&&(i=""+e.key),n.type&&n.type.defaultProps)var s=n.type.defaultProps;for(d in e)cF.call(e,d)&&!dF.hasOwnProperty(d)&&(r[d]=e[d]===void 0&&s!==void 0?s[d]:e[d])}var d=arguments.length-2;if(d===1)r.children=t;else if(1<d){s=Array(d);for(var f=0;f<d;f++)s[f]=arguments[f+2];r.children=s}return{$$typeof:Ib,type:n.type,key:i,ref:o,props:r,_owner:a}};Bo.createContext=function(n){return n={$$typeof:Xq,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},n.Provider={$$typeof:Zq,_context:n},n.Consumer=n};Bo.createElement=hF;Bo.createFactory=function(n){var e=hF.bind(null,n);return e.type=n,e};Bo.createRef=function(){return{current:null}};Bo.forwardRef=function(n){return{$$typeof:Jq,render:n}};Bo.isValidElement=JB;Bo.lazy=function(n){return{$$typeof:nV,_payload:{_status:-1,_result:n},_init:aV}};Bo.memo=function(n,e){return{$$typeof:tV,type:n,compare:e===void 0?null:e}};Bo.startTransition=function(n){var e=a3.transition;a3.transition={};try{n()}finally{a3.transition=e}};Bo.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Bo.useCallback=function(n,e){return $A.current.useCallback(n,e)};Bo.useContext=function(n){return $A.current.useContext(n)};Bo.useDebugValue=function(){};Bo.useDeferredValue=function(n){return $A.current.useDeferredValue(n)};Bo.useEffect=function(n,e){return $A.current.useEffect(n,e)};Bo.useId=function(){return $A.current.useId()};Bo.useImperativeHandle=function(n,e,t){return $A.current.useImperativeHandle(n,e,t)};Bo.useInsertionEffect=function(n,e){return $A.current.useInsertionEffect(n,e)};Bo.useLayoutEffect=function(n,e){return $A.current.useLayoutEffect(n,e)};Bo.useMemo=function(n,e){return $A.current.useMemo(n,e)};Bo.useReducer=function(n,e,t){return $A.current.useReducer(n,e,t)};Bo.useRef=function(n){return $A.current.useRef(n)};Bo.useState=function(n){return $A.current.useState(n)};Bo.useSyncExternalStore=function(n,e,t){return $A.current.useSyncExternalStore(n,e,t)};Bo.useTransition=function(){return $A.current.useTransition()};Bo.version="18.2.0";aF.exports=Bo;var Wn=aF.exports;const Mn=Ba(Wn);/**
 * @license React
 * react-jsx-runtime.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 lV=Wn,uV=Symbol.for("react.element"),AV=Symbol.for("react.fragment"),cV=Object.prototype.hasOwnProperty,dV=lV.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hV={key:!0,ref:!0,__self:!0,__source:!0};function fF(n,e,t){var r,i={},o=null,a=null;t!==void 0&&(o=""+t),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)cV.call(e,r)&&!hV.hasOwnProperty(r)&&(i[r]=e[r]);if(n&&n.defaultProps)for(r in e=n.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:uV,type:n,key:o,ref:a,props:i,_owner:dV.current}}D5.Fragment=AV;D5.jsx=fF;D5.jsxs=fF;oF.exports=D5;var G=oF.exports,pF={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},XE=Mn.createContext&&Mn.createContext(pF),fV=["attr","size","title"];function pV(n,e){if(n==null)return{};var t=mV(n,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function mV(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function K3(){return K3=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},K3.apply(this,arguments)}function Qk(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function P3(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Qk(Object(t),!0).forEach(function(r){gV(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Qk(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function gV(n,e,t){return e=yV(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yV(n){var e=vV(n,"string");return typeof e=="symbol"?e:String(e)}function vV(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mF(n){return n&&n.map((e,t)=>Mn.createElement(e.tag,P3({key:t},e.attr),mF(e.child)))}function Xs(n){return e=>Mn.createElement(CV,K3({attr:P3({},n.attr)},e),mF(n.child))}function CV(n){var e=t=>{var{attr:r,size:i,title:o}=n,a=pV(n,fV),s=i||t.size||"1em",d;return t.className&&(d=t.className),n.className&&(d=(d?d+" ":"")+n.className),Mn.createElement("svg",K3({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:d,style:P3(P3({color:n.color||t.color},t.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&Mn.createElement("title",null,o),n.children)};return XE!==void 0?Mn.createElement(XE.Consumer,null,t=>e(t)):e(pF)}var gF={exports:{}},od={},yF={exports:{}},vF={};/**
 * @license React
 * scheduler.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.
 */(function(n){function e(st,ft){var Re=st.length;st.push(ft);e:for(;0<Re;){var Ve=Re-1>>>1,Xe=st[Ve];if(0<i(Xe,ft))st[Ve]=ft,st[Re]=Xe,Re=Ve;else break e}}function t(st){return st.length===0?null:st[0]}function r(st){if(st.length===0)return null;var ft=st[0],Re=st.pop();if(Re!==ft){st[0]=Re;e:for(var Ve=0,Xe=st.length,Jt=Xe>>>1;Ve<Jt;){var Ht=2*(Ve+1)-1,bt=st[Ht],Qt=Ht+1,Yt=st[Qt];if(0>i(bt,Re))Qt<Xe&&0>i(Yt,bt)?(st[Ve]=Yt,st[Qt]=Re,Ve=Qt):(st[Ve]=bt,st[Ht]=Re,Ve=Ht);else if(Qt<Xe&&0>i(Yt,Re))st[Ve]=Yt,st[Qt]=Re,Ve=Qt;else break e}}return ft}function i(st,ft){var Re=st.sortIndex-ft.sortIndex;return Re!==0?Re:st.id-ft.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();n.unstable_now=function(){return a.now()-s}}var d=[],f=[],C=1,O=null,E=3,P=!1,D=!1,$=!1,H=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Z(st){for(var ft=t(f);ft!==null;){if(ft.callback===null)r(f);else if(ft.startTime<=st)r(f),ft.sortIndex=ft.expirationTime,e(d,ft);else break;ft=t(f)}}function ae(st){if($=!1,Z(st),!D)if(t(d)!==null)D=!0,gt(pe);else{var ft=t(f);ft!==null&&yt(ae,ft.startTime-st)}}function pe(st,ft){D=!1,$&&($=!1,Q(oe),oe=-1),P=!0;var Re=E;try{for(Z(ft),O=t(d);O!==null&&(!(O.expirationTime>ft)||st&&!Te());){var Ve=O.callback;if(typeof Ve=="function"){O.callback=null,E=O.priorityLevel;var Xe=Ve(O.expirationTime<=ft);ft=n.unstable_now(),typeof Xe=="function"?O.callback=Xe:O===t(d)&&r(d),Z(ft)}else r(d);O=t(d)}if(O!==null)var Jt=!0;else{var Ht=t(f);Ht!==null&&yt(ae,Ht.startTime-ft),Jt=!1}return Jt}finally{O=null,E=Re,P=!1}}var fe=!1,X=null,oe=-1,Ce=5,we=-1;function Te(){return!(n.unstable_now()-we<Ce)}function Pe(){if(X!==null){var st=n.unstable_now();we=st;var ft=!0;try{ft=X(!0,st)}finally{ft?he():(fe=!1,X=null)}}else fe=!1}var he;if(typeof N=="function")he=function(){N(Pe)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,ye=$e.port2;$e.port1.onmessage=Pe,he=function(){ye.postMessage(null)}}else he=function(){H(Pe,0)};function gt(st){X=st,fe||(fe=!0,he())}function yt(st,ft){oe=H(function(){st(n.unstable_now())},ft)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(st){st.callback=null},n.unstable_continueExecution=function(){D||P||(D=!0,gt(pe))},n.unstable_forceFrameRate=function(st){0>st||125<st?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ce=0<st?Math.floor(1e3/st):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_getFirstCallbackNode=function(){return t(d)},n.unstable_next=function(st){switch(E){case 1:case 2:case 3:var ft=3;break;default:ft=E}var Re=E;E=ft;try{return st()}finally{E=Re}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(st,ft){switch(st){case 1:case 2:case 3:case 4:case 5:break;default:st=3}var Re=E;E=st;try{return ft()}finally{E=Re}},n.unstable_scheduleCallback=function(st,ft,Re){var Ve=n.unstable_now();switch(typeof Re=="object"&&Re!==null?(Re=Re.delay,Re=typeof Re=="number"&&0<Re?Ve+Re:Ve):Re=Ve,st){case 1:var Xe=-1;break;case 2:Xe=250;break;case 5:Xe=1073741823;break;case 4:Xe=1e4;break;default:Xe=5e3}return Xe=Re+Xe,st={id:C++,callback:ft,priorityLevel:st,startTime:Re,expirationTime:Xe,sortIndex:-1},Re>Ve?(st.sortIndex=Re,e(f,st),t(d)===null&&st===t(f)&&($?(Q(oe),oe=-1):$=!0,yt(ae,Re-Ve))):(st.sortIndex=Xe,e(d,st),D||P||(D=!0,gt(pe))),st},n.unstable_shouldYield=Te,n.unstable_wrapCallback=function(st){var ft=E;return function(){var Re=E;E=ft;try{return st.apply(this,arguments)}finally{E=Re}}}})(vF);yF.exports=vF;var _V=yF.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 CF=Wn,id=_V;function Yn(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+n+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _F=new Set,L_={};function N1(n,e){iv(n,e),iv(n+"Capture",e)}function iv(n,e){for(L_[n]=e,n=0;n<e.length;n++)_F.add(e[n])}var Yp=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JE=Object.prototype.hasOwnProperty,bV=/^[: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]*$/,Yk={},qk={};function xV(n){return JE.call(qk,n)?!0:JE.call(Yk,n)?!1:bV.test(n)?qk[n]=!0:(Yk[n]=!0,!1)}function wV(n,e,t,r){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function MV(n,e,t,r){if(e===null||typeof e>"u"||wV(n,e,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function QA(n,e,t,r,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var Nu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Nu[n]=new QA(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Nu[e]=new QA(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Nu[n]=new QA(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Nu[n]=new QA(n,2,!1,n,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(n){Nu[n]=new QA(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Nu[n]=new QA(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Nu[n]=new QA(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Nu[n]=new QA(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Nu[n]=new QA(n,5,!1,n.toLowerCase(),null,!1,!1)});var e7=/[\-:]([a-z])/g;function t7(n){return n[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(n){var e=n.replace(e7,t7);Nu[e]=new QA(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(e7,t7);Nu[e]=new QA(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(e7,t7);Nu[e]=new QA(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Nu[n]=new QA(n,1,!1,n.toLowerCase(),null,!1,!1)});Nu.xlinkHref=new QA("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Nu[n]=new QA(n,1,!1,n.toLowerCase(),null,!0,!0)});function n7(n,e,t,r){var i=Nu.hasOwnProperty(e)?Nu[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(MV(e,t,i,r)&&(t=null),r||i===null?xV(e)&&(t===null?n.removeAttribute(e):n.setAttribute(e,""+t)):i.mustUseProperty?n[i.propertyName]=t===null?i.type===3?!1:"":t:(e=i.attributeName,r=i.attributeNamespace,t===null?n.removeAttribute(e):(i=i.type,t=i===3||i===4&&t===!0?"":""+t,r?n.setAttributeNS(r,e,t):n.setAttribute(e,t))))}var Zp=CF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,r2=Symbol.for("react.element"),ry=Symbol.for("react.portal"),iy=Symbol.for("react.fragment"),r7=Symbol.for("react.strict_mode"),e6=Symbol.for("react.profiler"),bF=Symbol.for("react.provider"),xF=Symbol.for("react.context"),i7=Symbol.for("react.forward_ref"),t6=Symbol.for("react.suspense"),n6=Symbol.for("react.suspense_list"),o7=Symbol.for("react.memo"),Bm=Symbol.for("react.lazy"),wF=Symbol.for("react.offscreen"),Vk=Symbol.iterator;function vC(n){return n===null||typeof n!="object"?null:(n=Vk&&n[Vk]||n["@@iterator"],typeof n=="function"?n:null)}var Zs=Object.assign,qM;function $C(n){if(qM===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);qM=e&&e[1]||""}return`
`+qM+n}var VM=!1;function HM(n,e){if(!n||VM)return"";VM=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(f){var r=f}Reflect.construct(n,[],e)}else{try{e.call()}catch(f){r=f}n.call(e.prototype)}else{try{throw Error()}catch(f){r=f}n()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var i=f.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var d=`
`+i[a].replace(" at new "," at ");return n.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",n.displayName)),d}while(1<=a&&0<=s);break}}}finally{VM=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?$C(n):""}function SV(n){switch(n.tag){case 5:return $C(n.type);case 16:return $C("Lazy");case 13:return $C("Suspense");case 19:return $C("SuspenseList");case 0:case 2:case 15:return n=HM(n.type,!1),n;case 11:return n=HM(n.type.render,!1),n;case 1:return n=HM(n.type,!0),n;default:return""}}function r6(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case iy:return"Fragment";case ry:return"Portal";case e6:return"Profiler";case r7:return"StrictMode";case t6:return"Suspense";case n6:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case xF:return(n.displayName||"Context")+".Consumer";case bF:return(n._context.displayName||"Context")+".Provider";case i7:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case o7:return e=n.displayName||null,e!==null?e:r6(n.type)||"Memo";case Bm:e=n._payload,n=n._init;try{return r6(n(e))}catch{}}return null}function EV(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return r6(e);case 8:return e===r7?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function s0(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function MF(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function OV(n){var e=MF(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),r=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,o=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function i2(n){n._valueTracker||(n._valueTracker=OV(n))}function SF(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),r="";return n&&(r=MF(n)?n.checked?"true":"false":n.value),n=r,n!==t?(e.setValue(n),!0):!1}function D3(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function i6(n,e){var t=e.checked;return Zs({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function Hk(n,e){var t=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;t=s0(e.value!=null?e.value:t),n._wrapperState={initialChecked:r,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function EF(n,e){e=e.checked,e!=null&&n7(n,"checked",e,!1)}function o6(n,e){EF(n,e);var t=s0(e.value),r=e.type;if(t!=null)r==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(r==="submit"||r==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?a6(n,e.type,t):e.hasOwnProperty("defaultValue")&&a6(n,e.type,s0(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function Zk(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function a6(n,e,t){(e!=="number"||D3(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var QC=Array.isArray;function Oy(n,e,t,r){if(n=n.options,e){e={};for(var i=0;i<t.length;i++)e["$"+t[i]]=!0;for(t=0;t<n.length;t++)i=e.hasOwnProperty("$"+n[t].value),n[t].selected!==i&&(n[t].selected=i),i&&r&&(n[t].defaultSelected=!0)}else{for(t=""+s0(t),e=null,i=0;i<n.length;i++){if(n[i].value===t){n[i].selected=!0,r&&(n[i].defaultSelected=!0);return}e!==null||n[i].disabled||(e=n[i])}e!==null&&(e.selected=!0)}}function s6(n,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Yn(91));return Zs({},e,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Xk(n,e){var t=e.value;if(t==null){if(t=e.children,e=e.defaultValue,t!=null){if(e!=null)throw Error(Yn(92));if(QC(t)){if(1<t.length)throw Error(Yn(93));t=t[0]}e=t}e==null&&(e=""),t=e}n._wrapperState={initialValue:s0(t)}}function OF(n,e){var t=s0(e.value),r=s0(e.defaultValue);t!=null&&(t=""+t,t!==n.value&&(n.value=t),e.defaultValue==null&&n.defaultValue!==t&&(n.defaultValue=t)),r!=null&&(n.defaultValue=""+r)}function Jk(n){var e=n.textContent;e===n._wrapperState.initialValue&&e!==""&&e!==null&&(n.value=e)}function BF(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function l6(n,e){return n==null||n==="http://www.w3.org/1999/xhtml"?BF(e):n==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var o2,IF=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,t,r,i){MSApp.execUnsafeLocalFunction(function(){return n(e,t,r,i)})}:n}(function(n,e){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=e;else{for(o2=o2||document.createElement("div"),o2.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=o2.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function F_(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var l_={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},BV=["Webkit","ms","Moz","O"];Object.keys(l_).forEach(function(n){BV.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),l_[e]=l_[n]})});function kF(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||l_.hasOwnProperty(n)&&l_[n]?(""+e).trim():e+"px"}function TF(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var r=t.indexOf("--")===0,i=kF(t,e[t],r);t==="float"&&(t="cssFloat"),r?n.setProperty(t,i):n[t]=i}}var IV=Zs({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 u6(n,e){if(e){if(IV[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Yn(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Yn(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Yn(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Yn(62))}}function A6(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){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 c6=null;function a7(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var d6=null,By=null,Iy=null;function e9(n){if(n=Kb(n)){if(typeof d6!="function")throw Error(Yn(280));var e=n.stateNode;e&&(e=z5(e),d6(n.stateNode,n.type,e))}}function KF(n){By?Iy?Iy.push(n):Iy=[n]:By=n}function PF(){if(By){var n=By,e=Iy;if(Iy=By=null,e9(n),e)for(n=0;n<e.length;n++)e9(e[n])}}function DF(n,e){return n(e)}function LF(){}var ZM=!1;function FF(n,e,t){if(ZM)return n(e,t);ZM=!0;try{return DF(n,e,t)}finally{ZM=!1,(By!==null||Iy!==null)&&(LF(),PF())}}function U_(n,e){var t=n.stateNode;if(t===null)return null;var r=z5(t);if(r===null)return null;t=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(n=n.type,r=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!r;break e;default:n=!1}if(n)return null;if(t&&typeof t!="function")throw Error(Yn(231,e,typeof t));return t}var h6=!1;if(Yp)try{var CC={};Object.defineProperty(CC,"passive",{get:function(){h6=!0}}),window.addEventListener("test",CC,CC),window.removeEventListener("test",CC,CC)}catch{h6=!1}function kV(n,e,t,r,i,o,a,s,d){var f=Array.prototype.slice.call(arguments,3);try{e.apply(t,f)}catch(C){this.onError(C)}}var u_=!1,L3=null,F3=!1,f6=null,TV={onError:function(n){u_=!0,L3=n}};function KV(n,e,t,r,i,o,a,s,d){u_=!1,L3=null,kV.apply(TV,arguments)}function PV(n,e,t,r,i,o,a,s,d){if(KV.apply(this,arguments),u_){if(u_){var f=L3;u_=!1,L3=null}else throw Error(Yn(198));F3||(F3=!0,f6=f)}}function W1(n){var e=n,t=n;if(n.alternate)for(;e.return;)e=e.return;else{n=e;do e=n,e.flags&4098&&(t=e.return),n=e.return;while(n)}return e.tag===3?t:null}function UF(n){if(n.tag===13){var e=n.memoizedState;if(e===null&&(n=n.alternate,n!==null&&(e=n.memoizedState)),e!==null)return e.dehydrated}return null}function t9(n){if(W1(n)!==n)throw Error(Yn(188))}function DV(n){var e=n.alternate;if(!e){if(e=W1(n),e===null)throw Error(Yn(188));return e!==n?null:n}for(var t=n,r=e;;){var i=t.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){t=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===t)return t9(i),n;if(o===r)return t9(i),e;o=o.sibling}throw Error(Yn(188))}if(t.return!==r.return)t=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===t){a=!0,t=i,r=o;break}if(s===r){a=!0,r=i,t=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===t){a=!0,t=o,r=i;break}if(s===r){a=!0,r=o,t=i;break}s=s.sibling}if(!a)throw Error(Yn(189))}}if(t.alternate!==r)throw Error(Yn(190))}if(t.tag!==3)throw Error(Yn(188));return t.stateNode.current===t?n:e}function RF(n){return n=DV(n),n!==null?zF(n):null}function zF(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var e=zF(n);if(e!==null)return e;n=n.sibling}return null}var jF=id.unstable_scheduleCallback,n9=id.unstable_cancelCallback,LV=id.unstable_shouldYield,FV=id.unstable_requestPaint,_l=id.unstable_now,UV=id.unstable_getCurrentPriorityLevel,s7=id.unstable_ImmediatePriority,NF=id.unstable_UserBlockingPriority,U3=id.unstable_NormalPriority,RV=id.unstable_LowPriority,WF=id.unstable_IdlePriority,L5=null,Uf=null;function zV(n){if(Uf&&typeof Uf.onCommitFiberRoot=="function")try{Uf.onCommitFiberRoot(L5,n,void 0,(n.current.flags&128)===128)}catch{}}var Th=Math.clz32?Math.clz32:WV,jV=Math.log,NV=Math.LN2;function WV(n){return n>>>=0,n===0?32:31-(jV(n)/NV|0)|0}var a2=64,s2=4194304;function YC(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function R3(n,e){var t=n.pendingLanes;if(t===0)return 0;var r=0,i=n.suspendedLanes,o=n.pingedLanes,a=t&268435455;if(a!==0){var s=a&~i;s!==0?r=YC(s):(o&=a,o!==0&&(r=YC(o)))}else a=t&~i,a!==0?r=YC(a):o!==0&&(r=YC(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=r;0<e;)t=31-Th(e),i=1<<t,r|=n[t],e&=~i;return r}function GV(n,e){switch(n){case 1:case 2:case 4:return e+250;case 8:case 16:case 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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $V(n,e){for(var t=n.suspendedLanes,r=n.pingedLanes,i=n.expirationTimes,o=n.pendingLanes;0<o;){var a=31-Th(o),s=1<<a,d=i[a];d===-1?(!(s&t)||s&r)&&(i[a]=GV(s,e)):d<=e&&(n.expiredLanes|=s),o&=~s}}function p6(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function GF(){var n=a2;return a2<<=1,!(a2&4194240)&&(a2=64),n}function XM(n){for(var e=[],t=0;31>t;t++)e.push(n);return e}function kb(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Th(e),n[e]=t}function QV(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var r=n.eventTimes;for(n=n.expirationTimes;0<t;){var i=31-Th(t),o=1<<i;e[i]=0,r[i]=-1,n[i]=-1,t&=~o}}function l7(n,e){var t=n.entangledLanes|=e;for(n=n.entanglements;t;){var r=31-Th(t),i=1<<r;i&e|n[r]&e&&(n[r]|=e),t&=~i}}var Oa=0;function $F(n){return n&=-n,1<n?4<n?n&268435455?16:536870912:4:1}var QF,u7,YF,qF,VF,m6=!1,l2=[],Qm=null,Ym=null,qm=null,R_=new Map,z_=new Map,Pm=[],YV="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function r9(n,e){switch(n){case"focusin":case"focusout":Qm=null;break;case"dragenter":case"dragleave":Ym=null;break;case"mouseover":case"mouseout":qm=null;break;case"pointerover":case"pointerout":R_.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":z_.delete(e.pointerId)}}function _C(n,e,t,r,i,o){return n===null||n.nativeEvent!==o?(n={blockedOn:e,domEventName:t,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Kb(e),e!==null&&u7(e)),n):(n.eventSystemFlags|=r,e=n.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),n)}function qV(n,e,t,r,i){switch(e){case"focusin":return Qm=_C(Qm,n,e,t,r,i),!0;case"dragenter":return Ym=_C(Ym,n,e,t,r,i),!0;case"mouseover":return qm=_C(qm,n,e,t,r,i),!0;case"pointerover":var o=i.pointerId;return R_.set(o,_C(R_.get(o)||null,n,e,t,r,i)),!0;case"gotpointercapture":return o=i.pointerId,z_.set(o,_C(z_.get(o)||null,n,e,t,r,i)),!0}return!1}function HF(n){var e=l1(n.target);if(e!==null){var t=W1(e);if(t!==null){if(e=t.tag,e===13){if(e=UF(t),e!==null){n.blockedOn=e,VF(n.priority,function(){YF(t)});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){n.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}n.blockedOn=null}function s3(n){if(n.blockedOn!==null)return!1;for(var e=n.targetContainers;0<e.length;){var t=g6(n.domEventName,n.eventSystemFlags,e[0],n.nativeEvent);if(t===null){t=n.nativeEvent;var r=new t.constructor(t.type,t);c6=r,t.target.dispatchEvent(r),c6=null}else return e=Kb(t),e!==null&&u7(e),n.blockedOn=t,!1;e.shift()}return!0}function i9(n,e,t){s3(n)&&t.delete(e)}function VV(){m6=!1,Qm!==null&&s3(Qm)&&(Qm=null),Ym!==null&&s3(Ym)&&(Ym=null),qm!==null&&s3(qm)&&(qm=null),R_.forEach(i9),z_.forEach(i9)}function bC(n,e){n.blockedOn===e&&(n.blockedOn=null,m6||(m6=!0,id.unstable_scheduleCallback(id.unstable_NormalPriority,VV)))}function j_(n){function e(i){return bC(i,n)}if(0<l2.length){bC(l2[0],n);for(var t=1;t<l2.length;t++){var r=l2[t];r.blockedOn===n&&(r.blockedOn=null)}}for(Qm!==null&&bC(Qm,n),Ym!==null&&bC(Ym,n),qm!==null&&bC(qm,n),R_.forEach(e),z_.forEach(e),t=0;t<Pm.length;t++)r=Pm[t],r.blockedOn===n&&(r.blockedOn=null);for(;0<Pm.length&&(t=Pm[0],t.blockedOn===null);)HF(t),t.blockedOn===null&&Pm.shift()}var ky=Zp.ReactCurrentBatchConfig,z3=!0;function HV(n,e,t,r){var i=Oa,o=ky.transition;ky.transition=null;try{Oa=1,A7(n,e,t,r)}finally{Oa=i,ky.transition=o}}function ZV(n,e,t,r){var i=Oa,o=ky.transition;ky.transition=null;try{Oa=4,A7(n,e,t,r)}finally{Oa=i,ky.transition=o}}function A7(n,e,t,r){if(z3){var i=g6(n,e,t,r);if(i===null)lS(n,e,r,j3,t),r9(n,r);else if(qV(i,n,e,t,r))r.stopPropagation();else if(r9(n,r),e&4&&-1<YV.indexOf(n)){for(;i!==null;){var o=Kb(i);if(o!==null&&QF(o),o=g6(n,e,t,r),o===null&&lS(n,e,r,j3,t),o===i)break;i=o}i!==null&&r.stopPropagation()}else lS(n,e,r,null,t)}}var j3=null;function g6(n,e,t,r){if(j3=null,n=a7(r),n=l1(n),n!==null)if(e=W1(n),e===null)n=null;else if(t=e.tag,t===13){if(n=UF(e),n!==null)return n;n=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;n=null}else e!==n&&(n=null);return j3=n,null}function ZF(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(UV()){case s7:return 1;case NF:return 4;case U3:case RV:return 16;case WF:return 536870912;default:return 16}default:return 16}}var Um=null,c7=null,l3=null;function XF(){if(l3)return l3;var n,e=c7,t=e.length,r,i="value"in Um?Um.value:Um.textContent,o=i.length;for(n=0;n<t&&e[n]===i[n];n++);var a=t-n;for(r=1;r<=a&&e[t-r]===i[o-r];r++);return l3=i.slice(n,1<r?1-r:void 0)}function u3(n){var e=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&e===13&&(n=13)):n=e,n===10&&(n=13),32<=n||n===13?n:0}function u2(){return!0}function o9(){return!1}function ad(n){function e(t,r,i,o,a){this._reactName=t,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in n)n.hasOwnProperty(s)&&(t=n[s],this[s]=t?t(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?u2:o9,this.isPropagationStopped=o9,this}return Zs(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=u2)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=u2)},persist:function(){},isPersistent:u2}),e}var wv={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},d7=ad(wv),Tb=Zs({},wv,{view:0,detail:0}),XV=ad(Tb),JM,eS,xC,F5=Zs({},Tb,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:h7,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==xC&&(xC&&n.type==="mousemove"?(JM=n.screenX-xC.screenX,eS=n.screenY-xC.screenY):eS=JM=0,xC=n),JM)},movementY:function(n){return"movementY"in n?n.movementY:eS}}),a9=ad(F5),JV=Zs({},F5,{dataTransfer:0}),eH=ad(JV),tH=Zs({},Tb,{relatedTarget:0}),tS=ad(tH),nH=Zs({},wv,{animationName:0,elapsedTime:0,pseudoElement:0}),rH=ad(nH),iH=Zs({},wv,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),oH=ad(iH),aH=Zs({},wv,{data:0}),s9=ad(aH),sH={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lH={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},uH={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AH(n){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(n):(n=uH[n])?!!e[n]:!1}function h7(){return AH}var cH=Zs({},Tb,{key:function(n){if(n.key){var e=sH[n.key]||n.key;if(e!=="Unidentified")return e}return n.type==="keypress"?(n=u3(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?lH[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:h7,charCode:function(n){return n.type==="keypress"?u3(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?u3(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),dH=ad(cH),hH=Zs({},F5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),l9=ad(hH),fH=Zs({},Tb,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:h7}),pH=ad(fH),mH=Zs({},wv,{propertyName:0,elapsedTime:0,pseudoElement:0}),gH=ad(mH),yH=Zs({},F5,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),vH=ad(yH),CH=[9,13,27,32],f7=Yp&&"CompositionEvent"in window,A_=null;Yp&&"documentMode"in document&&(A_=document.documentMode);var _H=Yp&&"TextEvent"in window&&!A_,JF=Yp&&(!f7||A_&&8<A_&&11>=A_),u9=" ",A9=!1;function eU(n,e){switch(n){case"keyup":return CH.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tU(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var oy=!1;function bH(n,e){switch(n){case"compositionend":return tU(e);case"keypress":return e.which!==32?null:(A9=!0,u9);case"textInput":return n=e.data,n===u9&&A9?null:n;default:return null}}function xH(n,e){if(oy)return n==="compositionend"||!f7&&eU(n,e)?(n=XF(),l3=c7=Um=null,oy=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return JF&&e.locale!=="ko"?null:e.data;default:return null}}var wH={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function c9(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e==="input"?!!wH[n.type]:e==="textarea"}function nU(n,e,t,r){KF(r),e=N3(e,"onChange"),0<e.length&&(t=new d7("onChange","change",null,t,r),n.push({event:t,listeners:e}))}var c_=null,N_=null;function MH(n){hU(n,0)}function U5(n){var e=ly(n);if(SF(e))return n}function SH(n,e){if(n==="change")return e}var rU=!1;if(Yp){var nS;if(Yp){var rS="oninput"in document;if(!rS){var d9=document.createElement("div");d9.setAttribute("oninput","return;"),rS=typeof d9.oninput=="function"}nS=rS}else nS=!1;rU=nS&&(!document.documentMode||9<document.documentMode)}function h9(){c_&&(c_.detachEvent("onpropertychange",iU),N_=c_=null)}function iU(n){if(n.propertyName==="value"&&U5(N_)){var e=[];nU(e,N_,n,a7(n)),FF(MH,e)}}function EH(n,e,t){n==="focusin"?(h9(),c_=e,N_=t,c_.attachEvent("onpropertychange",iU)):n==="focusout"&&h9()}function OH(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return U5(N_)}function BH(n,e){if(n==="click")return U5(e)}function IH(n,e){if(n==="input"||n==="change")return U5(e)}function kH(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var Dh=typeof Object.is=="function"?Object.is:kH;function W_(n,e){if(Dh(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;var t=Object.keys(n),r=Object.keys(e);if(t.length!==r.length)return!1;for(r=0;r<t.length;r++){var i=t[r];if(!JE.call(e,i)||!Dh(n[i],e[i]))return!1}return!0}function f9(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function p9(n,e){var t=f9(n);n=0;for(var r;t;){if(t.nodeType===3){if(r=n+t.textContent.length,n<=e&&r>=e)return{node:t,offset:e-n};n=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=f9(t)}}function oU(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?oU(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function aU(){for(var n=window,e=D3();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=D3(n.document)}return e}function p7(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function TH(n){var e=aU(),t=n.focusedElem,r=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&oU(t.ownerDocument.documentElement,t)){if(r!==null&&p7(t)){if(e=r.start,n=r.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var i=t.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!n.extend&&o>r&&(i=r,r=o,o=i),i=p9(t,o);var a=p9(t,r);i&&a&&(n.rangeCount!==1||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==a.node||n.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),n.removeAllRanges(),o>r?(n.addRange(e),n.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)n=e[t],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var KH=Yp&&"documentMode"in document&&11>=document.documentMode,ay=null,y6=null,d_=null,v6=!1;function m9(n,e,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;v6||ay==null||ay!==D3(r)||(r=ay,"selectionStart"in r&&p7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),d_&&W_(d_,r)||(d_=r,r=N3(y6,"onSelect"),0<r.length&&(e=new d7("onSelect","select",null,e,t),n.push({event:e,listeners:r}),e.target=ay)))}function A2(n,e){var t={};return t[n.toLowerCase()]=e.toLowerCase(),t["Webkit"+n]="webkit"+e,t["Moz"+n]="moz"+e,t}var sy={animationend:A2("Animation","AnimationEnd"),animationiteration:A2("Animation","AnimationIteration"),animationstart:A2("Animation","AnimationStart"),transitionend:A2("Transition","TransitionEnd")},iS={},sU={};Yp&&(sU=document.createElement("div").style,"AnimationEvent"in window||(delete sy.animationend.animation,delete sy.animationiteration.animation,delete sy.animationstart.animation),"TransitionEvent"in window||delete sy.transitionend.transition);function R5(n){if(iS[n])return iS[n];if(!sy[n])return n;var e=sy[n],t;for(t in e)if(e.hasOwnProperty(t)&&t in sU)return iS[n]=e[t];return n}var lU=R5("animationend"),uU=R5("animationiteration"),AU=R5("animationstart"),cU=R5("transitionend"),dU=new Map,g9="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function d0(n,e){dU.set(n,e),N1(e,[n])}for(var oS=0;oS<g9.length;oS++){var aS=g9[oS],PH=aS.toLowerCase(),DH=aS[0].toUpperCase()+aS.slice(1);d0(PH,"on"+DH)}d0(lU,"onAnimationEnd");d0(uU,"onAnimationIteration");d0(AU,"onAnimationStart");d0("dblclick","onDoubleClick");d0("focusin","onFocus");d0("focusout","onBlur");d0(cU,"onTransitionEnd");iv("onMouseEnter",["mouseout","mouseover"]);iv("onMouseLeave",["mouseout","mouseover"]);iv("onPointerEnter",["pointerout","pointerover"]);iv("onPointerLeave",["pointerout","pointerover"]);N1("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));N1("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));N1("onBeforeInput",["compositionend","keypress","textInput","paste"]);N1("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));N1("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));N1("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qC="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),LH=new Set("cancel close invalid load scroll toggle".split(" ").concat(qC));function y9(n,e,t){var r=n.type||"unknown-event";n.currentTarget=t,PV(r,e,void 0,n),n.currentTarget=null}function hU(n,e){e=(e&4)!==0;for(var t=0;t<n.length;t++){var r=n[t],i=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var s=r[a],d=s.instance,f=s.currentTarget;if(s=s.listener,d!==o&&i.isPropagationStopped())break e;y9(i,s,f),o=d}else for(a=0;a<r.length;a++){if(s=r[a],d=s.instance,f=s.currentTarget,s=s.listener,d!==o&&i.isPropagationStopped())break e;y9(i,s,f),o=d}}}if(F3)throw n=f6,F3=!1,f6=null,n}function ps(n,e){var t=e[w6];t===void 0&&(t=e[w6]=new Set);var r=n+"__bubble";t.has(r)||(fU(e,n,2,!1),t.add(r))}function sS(n,e,t){var r=0;e&&(r|=4),fU(t,n,r,e)}var c2="_reactListening"+Math.random().toString(36).slice(2);function G_(n){if(!n[c2]){n[c2]=!0,_F.forEach(function(t){t!=="selectionchange"&&(LH.has(t)||sS(t,!1,n),sS(t,!0,n))});var e=n.nodeType===9?n:n.ownerDocument;e===null||e[c2]||(e[c2]=!0,sS("selectionchange",!1,e))}}function fU(n,e,t,r){switch(ZF(e)){case 1:var i=HV;break;case 4:i=ZV;break;default:i=A7}t=i.bind(null,e,t,n),i=void 0,!h6||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?n.addEventListener(e,t,{capture:!0,passive:i}):n.addEventListener(e,t,!0):i!==void 0?n.addEventListener(e,t,{passive:i}):n.addEventListener(e,t,!1)}function lS(n,e,t,r,i){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var d=a.tag;if((d===3||d===4)&&(d=a.stateNode.containerInfo,d===i||d.nodeType===8&&d.parentNode===i))return;a=a.return}for(;s!==null;){if(a=l1(s),a===null)return;if(d=a.tag,d===5||d===6){r=o=a;continue e}s=s.parentNode}}r=r.return}FF(function(){var f=o,C=a7(t),O=[];e:{var E=dU.get(n);if(E!==void 0){var P=d7,D=n;switch(n){case"keypress":if(u3(t)===0)break e;case"keydown":case"keyup":P=dH;break;case"focusin":D="focus",P=tS;break;case"focusout":D="blur",P=tS;break;case"beforeblur":case"afterblur":P=tS;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=a9;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=eH;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=pH;break;case lU:case uU:case AU:P=rH;break;case cU:P=gH;break;case"scroll":P=XV;break;case"wheel":P=vH;break;case"copy":case"cut":case"paste":P=oH;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=l9}var $=(e&4)!==0,H=!$&&n==="scroll",Q=$?E!==null?E+"Capture":null:E;$=[];for(var N=f,Z;N!==null;){Z=N;var ae=Z.stateNode;if(Z.tag===5&&ae!==null&&(Z=ae,Q!==null&&(ae=U_(N,Q),ae!=null&&$.push($_(N,ae,Z)))),H)break;N=N.return}0<$.length&&(E=new P(E,D,null,t,C),O.push({event:E,listeners:$}))}}if(!(e&7)){e:{if(E=n==="mouseover"||n==="pointerover",P=n==="mouseout"||n==="pointerout",E&&t!==c6&&(D=t.relatedTarget||t.fromElement)&&(l1(D)||D[qp]))break e;if((P||E)&&(E=C.window===C?C:(E=C.ownerDocument)?E.defaultView||E.parentWindow:window,P?(D=t.relatedTarget||t.toElement,P=f,D=D?l1(D):null,D!==null&&(H=W1(D),D!==H||D.tag!==5&&D.tag!==6)&&(D=null)):(P=null,D=f),P!==D)){if($=a9,ae="onMouseLeave",Q="onMouseEnter",N="mouse",(n==="pointerout"||n==="pointerover")&&($=l9,ae="onPointerLeave",Q="onPointerEnter",N="pointer"),H=P==null?E:ly(P),Z=D==null?E:ly(D),E=new $(ae,N+"leave",P,t,C),E.target=H,E.relatedTarget=Z,ae=null,l1(C)===f&&($=new $(Q,N+"enter",D,t,C),$.target=Z,$.relatedTarget=H,ae=$),H=ae,P&&D)t:{for($=P,Q=D,N=0,Z=$;Z;Z=Ig(Z))N++;for(Z=0,ae=Q;ae;ae=Ig(ae))Z++;for(;0<N-Z;)$=Ig($),N--;for(;0<Z-N;)Q=Ig(Q),Z--;for(;N--;){if($===Q||Q!==null&&$===Q.alternate)break t;$=Ig($),Q=Ig(Q)}$=null}else $=null;P!==null&&v9(O,E,P,$,!1),D!==null&&H!==null&&v9(O,H,D,$,!0)}}e:{if(E=f?ly(f):window,P=E.nodeName&&E.nodeName.toLowerCase(),P==="select"||P==="input"&&E.type==="file")var pe=SH;else if(c9(E))if(rU)pe=IH;else{pe=OH;var fe=EH}else(P=E.nodeName)&&P.toLowerCase()==="input"&&(E.type==="checkbox"||E.type==="radio")&&(pe=BH);if(pe&&(pe=pe(n,f))){nU(O,pe,t,C);break e}fe&&fe(n,E,f),n==="focusout"&&(fe=E._wrapperState)&&fe.controlled&&E.type==="number"&&a6(E,"number",E.value)}switch(fe=f?ly(f):window,n){case"focusin":(c9(fe)||fe.contentEditable==="true")&&(ay=fe,y6=f,d_=null);break;case"focusout":d_=y6=ay=null;break;case"mousedown":v6=!0;break;case"contextmenu":case"mouseup":case"dragend":v6=!1,m9(O,t,C);break;case"selectionchange":if(KH)break;case"keydown":case"keyup":m9(O,t,C)}var X;if(f7)e:{switch(n){case"compositionstart":var oe="onCompositionStart";break e;case"compositionend":oe="onCompositionEnd";break e;case"compositionupdate":oe="onCompositionUpdate";break e}oe=void 0}else oy?eU(n,t)&&(oe="onCompositionEnd"):n==="keydown"&&t.keyCode===229&&(oe="onCompositionStart");oe&&(JF&&t.locale!=="ko"&&(oy||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&oy&&(X=XF()):(Um=C,c7="value"in Um?Um.value:Um.textContent,oy=!0)),fe=N3(f,oe),0<fe.length&&(oe=new s9(oe,n,null,t,C),O.push({event:oe,listeners:fe}),X?oe.data=X:(X=tU(t),X!==null&&(oe.data=X)))),(X=_H?bH(n,t):xH(n,t))&&(f=N3(f,"onBeforeInput"),0<f.length&&(C=new s9("onBeforeInput","beforeinput",null,t,C),O.push({event:C,listeners:f}),C.data=X))}hU(O,e)})}function $_(n,e,t){return{instance:n,listener:e,currentTarget:t}}function N3(n,e){for(var t=e+"Capture",r=[];n!==null;){var i=n,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=U_(n,t),o!=null&&r.unshift($_(n,o,i)),o=U_(n,e),o!=null&&r.push($_(n,o,i))),n=n.return}return r}function Ig(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function v9(n,e,t,r,i){for(var o=e._reactName,a=[];t!==null&&t!==r;){var s=t,d=s.alternate,f=s.stateNode;if(d!==null&&d===r)break;s.tag===5&&f!==null&&(s=f,i?(d=U_(t,o),d!=null&&a.unshift($_(t,d,s))):i||(d=U_(t,o),d!=null&&a.push($_(t,d,s)))),t=t.return}a.length!==0&&n.push({event:e,listeners:a})}var FH=/\r\n?/g,UH=/\u0000|\uFFFD/g;function C9(n){return(typeof n=="string"?n:""+n).replace(FH,`
`).replace(UH,"")}function d2(n,e,t){if(e=C9(e),C9(n)!==e&&t)throw Error(Yn(425))}function W3(){}var C6=null,_6=null;function b6(n,e){return n==="textarea"||n==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var x6=typeof setTimeout=="function"?setTimeout:void 0,RH=typeof clearTimeout=="function"?clearTimeout:void 0,_9=typeof Promise=="function"?Promise:void 0,zH=typeof queueMicrotask=="function"?queueMicrotask:typeof _9<"u"?function(n){return _9.resolve(null).then(n).catch(jH)}:x6;function jH(n){setTimeout(function(){throw n})}function uS(n,e){var t=e,r=0;do{var i=t.nextSibling;if(n.removeChild(t),i&&i.nodeType===8)if(t=i.data,t==="/$"){if(r===0){n.removeChild(i),j_(e);return}r--}else t!=="$"&&t!=="$?"&&t!=="$!"||r++;t=i}while(t);j_(e)}function Vm(n){for(;n!=null;n=n.nextSibling){var e=n.nodeType;if(e===1||e===3)break;if(e===8){if(e=n.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return n}function b9(n){n=n.previousSibling;for(var e=0;n;){if(n.nodeType===8){var t=n.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return n;e--}else t==="/$"&&e++}n=n.previousSibling}return null}var Mv=Math.random().toString(36).slice(2),kf="__reactFiber$"+Mv,Q_="__reactProps$"+Mv,qp="__reactContainer$"+Mv,w6="__reactEvents$"+Mv,NH="__reactListeners$"+Mv,WH="__reactHandles$"+Mv;function l1(n){var e=n[kf];if(e)return e;for(var t=n.parentNode;t;){if(e=t[qp]||t[kf]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(n=b9(n);n!==null;){if(t=n[kf])return t;n=b9(n)}return e}n=t,t=n.parentNode}return null}function Kb(n){return n=n[kf]||n[qp],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ly(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(Yn(33))}function z5(n){return n[Q_]||null}var M6=[],uy=-1;function h0(n){return{current:n}}function _s(n){0>uy||(n.current=M6[uy],M6[uy]=null,uy--)}function ns(n,e){uy++,M6[uy]=n.current,n.current=e}var l0={},gA=h0(l0),wc=h0(!1),E1=l0;function ov(n,e){var t=n.type.contextTypes;if(!t)return l0;var r=n.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in t)i[o]=e[o];return r&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=i),i}function Mc(n){return n=n.childContextTypes,n!=null}function G3(){_s(wc),_s(gA)}function x9(n,e,t){if(gA.current!==l0)throw Error(Yn(168));ns(gA,e),ns(wc,t)}function pU(n,e,t){var r=n.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Yn(108,EV(n)||"Unknown",i));return Zs({},t,r)}function $3(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||l0,E1=gA.current,ns(gA,n),ns(wc,wc.current),!0}function w9(n,e,t){var r=n.stateNode;if(!r)throw Error(Yn(169));t?(n=pU(n,e,E1),r.__reactInternalMemoizedMergedChildContext=n,_s(wc),_s(gA),ns(gA,n)):_s(wc),ns(wc,t)}var Kp=null,j5=!1,AS=!1;function mU(n){Kp===null?Kp=[n]:Kp.push(n)}function GH(n){j5=!0,mU(n)}function f0(){if(!AS&&Kp!==null){AS=!0;var n=0,e=Oa;try{var t=Kp;for(Oa=1;n<t.length;n++){var r=t[n];do r=r(!0);while(r!==null)}Kp=null,j5=!1}catch(i){throw Kp!==null&&(Kp=Kp.slice(n+1)),jF(s7,f0),i}finally{Oa=e,AS=!1}}return null}var Ay=[],cy=0,Q3=null,Y3=0,Pd=[],Dd=0,O1=null,Rp=1,zp="";function V0(n,e){Ay[cy++]=Y3,Ay[cy++]=Q3,Q3=n,Y3=e}function gU(n,e,t){Pd[Dd++]=Rp,Pd[Dd++]=zp,Pd[Dd++]=O1,O1=n;var r=Rp;n=zp;var i=32-Th(r)-1;r&=~(1<<i),t+=1;var o=32-Th(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Rp=1<<32-Th(e)+i|t<<i|r,zp=o+n}else Rp=1<<o|t<<i|r,zp=n}function m7(n){n.return!==null&&(V0(n,1),gU(n,1,0))}function g7(n){for(;n===Q3;)Q3=Ay[--cy],Ay[cy]=null,Y3=Ay[--cy],Ay[cy]=null;for(;n===O1;)O1=Pd[--Dd],Pd[Dd]=null,zp=Pd[--Dd],Pd[Dd]=null,Rp=Pd[--Dd],Pd[Dd]=null}var td=null,Xc=null,Ks=!1,Ih=null;function yU(n,e){var t=Fd(5,null,null,0);t.elementType="DELETED",t.stateNode=e,t.return=n,e=n.deletions,e===null?(n.deletions=[t],n.flags|=16):e.push(t)}function M9(n,e){switch(n.tag){case 5:var t=n.type;return e=e.nodeType!==1||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(n.stateNode=e,td=n,Xc=Vm(e.firstChild),!0):!1;case 6:return e=n.pendingProps===""||e.nodeType!==3?null:e,e!==null?(n.stateNode=e,td=n,Xc=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(t=O1!==null?{id:Rp,overflow:zp}:null,n.memoizedState={dehydrated:e,treeContext:t,retryLane:1073741824},t=Fd(18,null,null,0),t.stateNode=e,t.return=n,n.child=t,td=n,Xc=null,!0):!1;default:return!1}}function S6(n){return(n.mode&1)!==0&&(n.flags&128)===0}function E6(n){if(Ks){var e=Xc;if(e){var t=e;if(!M9(n,e)){if(S6(n))throw Error(Yn(418));e=Vm(t.nextSibling);var r=td;e&&M9(n,e)?yU(r,t):(n.flags=n.flags&-4097|2,Ks=!1,td=n)}}else{if(S6(n))throw Error(Yn(418));n.flags=n.flags&-4097|2,Ks=!1,td=n}}}function S9(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;td=n}function h2(n){if(n!==td)return!1;if(!Ks)return S9(n),Ks=!0,!1;var e;if((e=n.tag!==3)&&!(e=n.tag!==5)&&(e=n.type,e=e!=="head"&&e!=="body"&&!b6(n.type,n.memoizedProps)),e&&(e=Xc)){if(S6(n))throw vU(),Error(Yn(418));for(;e;)yU(n,e),e=Vm(e.nextSibling)}if(S9(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(Yn(317));e:{for(n=n.nextSibling,e=0;n;){if(n.nodeType===8){var t=n.data;if(t==="/$"){if(e===0){Xc=Vm(n.nextSibling);break e}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++}n=n.nextSibling}Xc=null}}else Xc=td?Vm(n.stateNode.nextSibling):null;return!0}function vU(){for(var n=Xc;n;)n=Vm(n.nextSibling)}function av(){Xc=td=null,Ks=!1}function y7(n){Ih===null?Ih=[n]:Ih.push(n)}var $H=Zp.ReactCurrentBatchConfig;function Mh(n,e){if(n&&n.defaultProps){e=Zs({},e),n=n.defaultProps;for(var t in n)e[t]===void 0&&(e[t]=n[t]);return e}return e}var q3=h0(null),V3=null,dy=null,v7=null;function C7(){v7=dy=V3=null}function _7(n){var e=q3.current;_s(q3),n._currentValue=e}function O6(n,e,t){for(;n!==null;){var r=n.alternate;if((n.childLanes&e)!==e?(n.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),n===t)break;n=n.return}}function Ty(n,e){V3=n,v7=dy=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&e&&(xc=!0),n.firstContext=null)}function Wd(n){var e=n._currentValue;if(v7!==n)if(n={context:n,memoizedValue:e,next:null},dy===null){if(V3===null)throw Error(Yn(308));dy=n,V3.dependencies={lanes:0,firstContext:n}}else dy=dy.next=n;return e}var u1=null;function b7(n){u1===null?u1=[n]:u1.push(n)}function CU(n,e,t,r){var i=e.interleaved;return i===null?(t.next=t,b7(e)):(t.next=i.next,i.next=t),e.interleaved=t,Vp(n,r)}function Vp(n,e){n.lanes|=e;var t=n.alternate;for(t!==null&&(t.lanes|=e),t=n,n=n.return;n!==null;)n.childLanes|=e,t=n.alternate,t!==null&&(t.childLanes|=e),t=n,n=n.return;return t.tag===3?t.stateNode:null}var Im=!1;function x7(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _U(n,e){n=n.updateQueue,e.updateQueue===n&&(e.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function jp(n,e){return{eventTime:n,lane:e,tag:0,payload:null,callback:null,next:null}}function Hm(n,e,t){var r=n.updateQueue;if(r===null)return null;if(r=r.shared,Vo&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Vp(n,t)}return i=r.interleaved,i===null?(e.next=e,b7(r)):(e.next=i.next,i.next=e),r.interleaved=e,Vp(n,t)}function A3(n,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var r=e.lanes;r&=n.pendingLanes,t|=r,e.lanes=t,l7(n,t)}}function E9(n,e){var t=n.updateQueue,r=n.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var i=null,o=null;if(t=t.firstBaseUpdate,t!==null){do{var a={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};o===null?i=o=a:o=o.next=a,t=t.next}while(t!==null);o===null?i=o=e:o=o.next=e}else i=o=e;t={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},n.updateQueue=t;return}n=t.lastBaseUpdate,n===null?t.firstBaseUpdate=e:n.next=e,t.lastBaseUpdate=e}function H3(n,e,t,r){var i=n.updateQueue;Im=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var d=s,f=d.next;d.next=null,a===null?o=f:a.next=f,a=d;var C=n.alternate;C!==null&&(C=C.updateQueue,s=C.lastBaseUpdate,s!==a&&(s===null?C.firstBaseUpdate=f:s.next=f,C.lastBaseUpdate=d))}if(o!==null){var O=i.baseState;a=0,C=f=d=null,s=o;do{var E=s.lane,P=s.eventTime;if((r&E)===E){C!==null&&(C=C.next={eventTime:P,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var D=n,$=s;switch(E=e,P=t,$.tag){case 1:if(D=$.payload,typeof D=="function"){O=D.call(P,O,E);break e}O=D;break e;case 3:D.flags=D.flags&-65537|128;case 0:if(D=$.payload,E=typeof D=="function"?D.call(P,O,E):D,E==null)break e;O=Zs({},O,E);break e;case 2:Im=!0}}s.callback!==null&&s.lane!==0&&(n.flags|=64,E=i.effects,E===null?i.effects=[s]:E.push(s))}else P={eventTime:P,lane:E,tag:s.tag,payload:s.payload,callback:s.callback,next:null},C===null?(f=C=P,d=O):C=C.next=P,a|=E;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;E=s,s=E.next,E.next=null,i.lastBaseUpdate=E,i.shared.pending=null}}while(!0);if(C===null&&(d=O),i.baseState=d,i.firstBaseUpdate=f,i.lastBaseUpdate=C,e=i.shared.interleaved,e!==null){i=e;do a|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);I1|=a,n.lanes=a,n.memoizedState=O}}function O9(n,e,t){if(n=e.effects,e.effects=null,n!==null)for(e=0;e<n.length;e++){var r=n[e],i=r.callback;if(i!==null){if(r.callback=null,r=t,typeof i!="function")throw Error(Yn(191,i));i.call(r)}}}var bU=new CF.Component().refs;function B6(n,e,t,r){e=n.memoizedState,t=t(r,e),t=t==null?e:Zs({},e,t),n.memoizedState=t,n.lanes===0&&(n.updateQueue.baseState=t)}var N5={isMounted:function(n){return(n=n._reactInternals)?W1(n)===n:!1},enqueueSetState:function(n,e,t){n=n._reactInternals;var r=WA(),i=Xm(n),o=jp(r,i);o.payload=e,t!=null&&(o.callback=t),e=Hm(n,o,i),e!==null&&(Kh(e,n,i,r),A3(e,n,i))},enqueueReplaceState:function(n,e,t){n=n._reactInternals;var r=WA(),i=Xm(n),o=jp(r,i);o.tag=1,o.payload=e,t!=null&&(o.callback=t),e=Hm(n,o,i),e!==null&&(Kh(e,n,i,r),A3(e,n,i))},enqueueForceUpdate:function(n,e){n=n._reactInternals;var t=WA(),r=Xm(n),i=jp(t,r);i.tag=2,e!=null&&(i.callback=e),e=Hm(n,i,r),e!==null&&(Kh(e,n,r,t),A3(e,n,r))}};function B9(n,e,t,r,i,o,a){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(r,o,a):e.prototype&&e.prototype.isPureReactComponent?!W_(t,r)||!W_(i,o):!0}function xU(n,e,t){var r=!1,i=l0,o=e.contextType;return typeof o=="object"&&o!==null?o=Wd(o):(i=Mc(e)?E1:gA.current,r=e.contextTypes,o=(r=r!=null)?ov(n,i):l0),e=new e(t,o),n.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=N5,n.stateNode=e,e._reactInternals=n,r&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=o),e}function I9(n,e,t,r){n=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,r),e.state!==n&&N5.enqueueReplaceState(e,e.state,null)}function I6(n,e,t,r){var i=n.stateNode;i.props=t,i.state=n.memoizedState,i.refs=bU,x7(n);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Wd(o):(o=Mc(e)?E1:gA.current,i.context=ov(n,o)),i.state=n.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(B6(n,e,o,t),i.state=n.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&N5.enqueueReplaceState(i,i.state,null),H3(n,t,i,r),i.state=n.memoizedState),typeof i.componentDidMount=="function"&&(n.flags|=4194308)}function wC(n,e,t){if(n=t.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(Yn(309));var r=t.stateNode}if(!r)throw Error(Yn(147,n));var i=r,o=""+n;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(a){var s=i.refs;s===bU&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},e._stringRef=o,e)}if(typeof n!="string")throw Error(Yn(284));if(!t._owner)throw Error(Yn(290,n))}return n}function f2(n,e){throw n=Object.prototype.toString.call(e),Error(Yn(31,n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n))}function k9(n){var e=n._init;return e(n._payload)}function wU(n){function e(Q,N){if(n){var Z=Q.deletions;Z===null?(Q.deletions=[N],Q.flags|=16):Z.push(N)}}function t(Q,N){if(!n)return null;for(;N!==null;)e(Q,N),N=N.sibling;return null}function r(Q,N){for(Q=new Map;N!==null;)N.key!==null?Q.set(N.key,N):Q.set(N.index,N),N=N.sibling;return Q}function i(Q,N){return Q=Jm(Q,N),Q.index=0,Q.sibling=null,Q}function o(Q,N,Z){return Q.index=Z,n?(Z=Q.alternate,Z!==null?(Z=Z.index,Z<N?(Q.flags|=2,N):Z):(Q.flags|=2,N)):(Q.flags|=1048576,N)}function a(Q){return n&&Q.alternate===null&&(Q.flags|=2),Q}function s(Q,N,Z,ae){return N===null||N.tag!==6?(N=gS(Z,Q.mode,ae),N.return=Q,N):(N=i(N,Z),N.return=Q,N)}function d(Q,N,Z,ae){var pe=Z.type;return pe===iy?C(Q,N,Z.props.children,ae,Z.key):N!==null&&(N.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===Bm&&k9(pe)===N.type)?(ae=i(N,Z.props),ae.ref=wC(Q,N,Z),ae.return=Q,ae):(ae=m3(Z.type,Z.key,Z.props,null,Q.mode,ae),ae.ref=wC(Q,N,Z),ae.return=Q,ae)}function f(Q,N,Z,ae){return N===null||N.tag!==4||N.stateNode.containerInfo!==Z.containerInfo||N.stateNode.implementation!==Z.implementation?(N=yS(Z,Q.mode,ae),N.return=Q,N):(N=i(N,Z.children||[]),N.return=Q,N)}function C(Q,N,Z,ae,pe){return N===null||N.tag!==7?(N=v1(Z,Q.mode,ae,pe),N.return=Q,N):(N=i(N,Z),N.return=Q,N)}function O(Q,N,Z){if(typeof N=="string"&&N!==""||typeof N=="number")return N=gS(""+N,Q.mode,Z),N.return=Q,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case r2:return Z=m3(N.type,N.key,N.props,null,Q.mode,Z),Z.ref=wC(Q,null,N),Z.return=Q,Z;case ry:return N=yS(N,Q.mode,Z),N.return=Q,N;case Bm:var ae=N._init;return O(Q,ae(N._payload),Z)}if(QC(N)||vC(N))return N=v1(N,Q.mode,Z,null),N.return=Q,N;f2(Q,N)}return null}function E(Q,N,Z,ae){var pe=N!==null?N.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number")return pe!==null?null:s(Q,N,""+Z,ae);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case r2:return Z.key===pe?d(Q,N,Z,ae):null;case ry:return Z.key===pe?f(Q,N,Z,ae):null;case Bm:return pe=Z._init,E(Q,N,pe(Z._payload),ae)}if(QC(Z)||vC(Z))return pe!==null?null:C(Q,N,Z,ae,null);f2(Q,Z)}return null}function P(Q,N,Z,ae,pe){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return Q=Q.get(Z)||null,s(N,Q,""+ae,pe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case r2:return Q=Q.get(ae.key===null?Z:ae.key)||null,d(N,Q,ae,pe);case ry:return Q=Q.get(ae.key===null?Z:ae.key)||null,f(N,Q,ae,pe);case Bm:var fe=ae._init;return P(Q,N,Z,fe(ae._payload),pe)}if(QC(ae)||vC(ae))return Q=Q.get(Z)||null,C(N,Q,ae,pe,null);f2(N,ae)}return null}function D(Q,N,Z,ae){for(var pe=null,fe=null,X=N,oe=N=0,Ce=null;X!==null&&oe<Z.length;oe++){X.index>oe?(Ce=X,X=null):Ce=X.sibling;var we=E(Q,X,Z[oe],ae);if(we===null){X===null&&(X=Ce);break}n&&X&&we.alternate===null&&e(Q,X),N=o(we,N,oe),fe===null?pe=we:fe.sibling=we,fe=we,X=Ce}if(oe===Z.length)return t(Q,X),Ks&&V0(Q,oe),pe;if(X===null){for(;oe<Z.length;oe++)X=O(Q,Z[oe],ae),X!==null&&(N=o(X,N,oe),fe===null?pe=X:fe.sibling=X,fe=X);return Ks&&V0(Q,oe),pe}for(X=r(Q,X);oe<Z.length;oe++)Ce=P(X,Q,oe,Z[oe],ae),Ce!==null&&(n&&Ce.alternate!==null&&X.delete(Ce.key===null?oe:Ce.key),N=o(Ce,N,oe),fe===null?pe=Ce:fe.sibling=Ce,fe=Ce);return n&&X.forEach(function(Te){return e(Q,Te)}),Ks&&V0(Q,oe),pe}function $(Q,N,Z,ae){var pe=vC(Z);if(typeof pe!="function")throw Error(Yn(150));if(Z=pe.call(Z),Z==null)throw Error(Yn(151));for(var fe=pe=null,X=N,oe=N=0,Ce=null,we=Z.next();X!==null&&!we.done;oe++,we=Z.next()){X.index>oe?(Ce=X,X=null):Ce=X.sibling;var Te=E(Q,X,we.value,ae);if(Te===null){X===null&&(X=Ce);break}n&&X&&Te.alternate===null&&e(Q,X),N=o(Te,N,oe),fe===null?pe=Te:fe.sibling=Te,fe=Te,X=Ce}if(we.done)return t(Q,X),Ks&&V0(Q,oe),pe;if(X===null){for(;!we.done;oe++,we=Z.next())we=O(Q,we.value,ae),we!==null&&(N=o(we,N,oe),fe===null?pe=we:fe.sibling=we,fe=we);return Ks&&V0(Q,oe),pe}for(X=r(Q,X);!we.done;oe++,we=Z.next())we=P(X,Q,oe,we.value,ae),we!==null&&(n&&we.alternate!==null&&X.delete(we.key===null?oe:we.key),N=o(we,N,oe),fe===null?pe=we:fe.sibling=we,fe=we);return n&&X.forEach(function(Pe){return e(Q,Pe)}),Ks&&V0(Q,oe),pe}function H(Q,N,Z,ae){if(typeof Z=="object"&&Z!==null&&Z.type===iy&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case r2:e:{for(var pe=Z.key,fe=N;fe!==null;){if(fe.key===pe){if(pe=Z.type,pe===iy){if(fe.tag===7){t(Q,fe.sibling),N=i(fe,Z.props.children),N.return=Q,Q=N;break e}}else if(fe.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===Bm&&k9(pe)===fe.type){t(Q,fe.sibling),N=i(fe,Z.props),N.ref=wC(Q,fe,Z),N.return=Q,Q=N;break e}t(Q,fe);break}else e(Q,fe);fe=fe.sibling}Z.type===iy?(N=v1(Z.props.children,Q.mode,ae,Z.key),N.return=Q,Q=N):(ae=m3(Z.type,Z.key,Z.props,null,Q.mode,ae),ae.ref=wC(Q,N,Z),ae.return=Q,Q=ae)}return a(Q);case ry:e:{for(fe=Z.key;N!==null;){if(N.key===fe)if(N.tag===4&&N.stateNode.containerInfo===Z.containerInfo&&N.stateNode.implementation===Z.implementation){t(Q,N.sibling),N=i(N,Z.children||[]),N.return=Q,Q=N;break e}else{t(Q,N);break}else e(Q,N);N=N.sibling}N=yS(Z,Q.mode,ae),N.return=Q,Q=N}return a(Q);case Bm:return fe=Z._init,H(Q,N,fe(Z._payload),ae)}if(QC(Z))return D(Q,N,Z,ae);if(vC(Z))return $(Q,N,Z,ae);f2(Q,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,N!==null&&N.tag===6?(t(Q,N.sibling),N=i(N,Z),N.return=Q,Q=N):(t(Q,N),N=gS(Z,Q.mode,ae),N.return=Q,Q=N),a(Q)):t(Q,N)}return H}var sv=wU(!0),MU=wU(!1),Pb={},Rf=h0(Pb),Y_=h0(Pb),q_=h0(Pb);function A1(n){if(n===Pb)throw Error(Yn(174));return n}function w7(n,e){switch(ns(q_,e),ns(Y_,n),ns(Rf,Pb),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:l6(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=l6(e,n)}_s(Rf),ns(Rf,e)}function lv(){_s(Rf),_s(Y_),_s(q_)}function SU(n){A1(q_.current);var e=A1(Rf.current),t=l6(e,n.type);e!==t&&(ns(Y_,n),ns(Rf,t))}function M7(n){Y_.current===n&&(_s(Rf),_s(Y_))}var Ys=h0(0);function Z3(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var cS=[];function S7(){for(var n=0;n<cS.length;n++)cS[n]._workInProgressVersionPrimary=null;cS.length=0}var c3=Zp.ReactCurrentDispatcher,dS=Zp.ReactCurrentBatchConfig,B1=0,Hs=null,Zl=null,Cu=null,X3=!1,h_=!1,V_=0,QH=0;function cA(){throw Error(Yn(321))}function E7(n,e){if(e===null)return!1;for(var t=0;t<e.length&&t<n.length;t++)if(!Dh(n[t],e[t]))return!1;return!0}function O7(n,e,t,r,i,o){if(B1=o,Hs=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,c3.current=n===null||n.memoizedState===null?HH:ZH,n=t(r,i),h_){o=0;do{if(h_=!1,V_=0,25<=o)throw Error(Yn(301));o+=1,Cu=Zl=null,e.updateQueue=null,c3.current=XH,n=t(r,i)}while(h_)}if(c3.current=J3,e=Zl!==null&&Zl.next!==null,B1=0,Cu=Zl=Hs=null,X3=!1,e)throw Error(Yn(300));return n}function B7(){var n=V_!==0;return V_=0,n}function xf(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cu===null?Hs.memoizedState=Cu=n:Cu=Cu.next=n,Cu}function Gd(){if(Zl===null){var n=Hs.alternate;n=n!==null?n.memoizedState:null}else n=Zl.next;var e=Cu===null?Hs.memoizedState:Cu.next;if(e!==null)Cu=e,Zl=n;else{if(n===null)throw Error(Yn(310));Zl=n,n={memoizedState:Zl.memoizedState,baseState:Zl.baseState,baseQueue:Zl.baseQueue,queue:Zl.queue,next:null},Cu===null?Hs.memoizedState=Cu=n:Cu=Cu.next=n}return Cu}function H_(n,e){return typeof e=="function"?e(n):e}function hS(n){var e=Gd(),t=e.queue;if(t===null)throw Error(Yn(311));t.lastRenderedReducer=n;var r=Zl,i=r.baseQueue,o=t.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,t.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,d=null,f=o;do{var C=f.lane;if((B1&C)===C)d!==null&&(d=d.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:n(r,f.action);else{var O={lane:C,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};d===null?(s=d=O,a=r):d=d.next=O,Hs.lanes|=C,I1|=C}f=f.next}while(f!==null&&f!==o);d===null?a=r:d.next=s,Dh(r,e.memoizedState)||(xc=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=d,t.lastRenderedState=r}if(n=t.interleaved,n!==null){i=n;do o=i.lane,Hs.lanes|=o,I1|=o,i=i.next;while(i!==n)}else i===null&&(t.lanes=0);return[e.memoizedState,t.dispatch]}function fS(n){var e=Gd(),t=e.queue;if(t===null)throw Error(Yn(311));t.lastRenderedReducer=n;var r=t.dispatch,i=t.pending,o=e.memoizedState;if(i!==null){t.pending=null;var a=i=i.next;do o=n(o,a.action),a=a.next;while(a!==i);Dh(o,e.memoizedState)||(xc=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),t.lastRenderedState=o}return[o,r]}function EU(){}function OU(n,e){var t=Hs,r=Gd(),i=e(),o=!Dh(r.memoizedState,i);if(o&&(r.memoizedState=i,xc=!0),r=r.queue,I7(kU.bind(null,t,r,n),[n]),r.getSnapshot!==e||o||Cu!==null&&Cu.memoizedState.tag&1){if(t.flags|=2048,Z_(9,IU.bind(null,t,r,i,e),void 0,null),bu===null)throw Error(Yn(349));B1&30||BU(t,e,i)}return i}function BU(n,e,t){n.flags|=16384,n={getSnapshot:e,value:t},e=Hs.updateQueue,e===null?(e={lastEffect:null,stores:null},Hs.updateQueue=e,e.stores=[n]):(t=e.stores,t===null?e.stores=[n]:t.push(n))}function IU(n,e,t,r){e.value=t,e.getSnapshot=r,TU(e)&&KU(n)}function kU(n,e,t){return t(function(){TU(e)&&KU(n)})}function TU(n){var e=n.getSnapshot;n=n.value;try{var t=e();return!Dh(n,t)}catch{return!0}}function KU(n){var e=Vp(n,1);e!==null&&Kh(e,n,1,-1)}function T9(n){var e=xf();return typeof n=="function"&&(n=n()),e.memoizedState=e.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:H_,lastRenderedState:n},e.queue=n,n=n.dispatch=VH.bind(null,Hs,n),[e.memoizedState,n]}function Z_(n,e,t,r){return n={tag:n,create:e,destroy:t,deps:r,next:null},e=Hs.updateQueue,e===null?(e={lastEffect:null,stores:null},Hs.updateQueue=e,e.lastEffect=n.next=n):(t=e.lastEffect,t===null?e.lastEffect=n.next=n:(r=t.next,t.next=n,n.next=r,e.lastEffect=n)),n}function PU(){return Gd().memoizedState}function d3(n,e,t,r){var i=xf();Hs.flags|=n,i.memoizedState=Z_(1|e,t,void 0,r===void 0?null:r)}function W5(n,e,t,r){var i=Gd();r=r===void 0?null:r;var o=void 0;if(Zl!==null){var a=Zl.memoizedState;if(o=a.destroy,r!==null&&E7(r,a.deps)){i.memoizedState=Z_(e,t,o,r);return}}Hs.flags|=n,i.memoizedState=Z_(1|e,t,o,r)}function K9(n,e){return d3(8390656,8,n,e)}function I7(n,e){return W5(2048,8,n,e)}function DU(n,e){return W5(4,2,n,e)}function LU(n,e){return W5(4,4,n,e)}function FU(n,e){if(typeof e=="function")return n=n(),e(n),function(){e(null)};if(e!=null)return n=n(),e.current=n,function(){e.current=null}}function UU(n,e,t){return t=t!=null?t.concat([n]):null,W5(4,4,FU.bind(null,e,n),t)}function k7(){}function RU(n,e){var t=Gd();e=e===void 0?null:e;var r=t.memoizedState;return r!==null&&e!==null&&E7(e,r[1])?r[0]:(t.memoizedState=[n,e],n)}function zU(n,e){var t=Gd();e=e===void 0?null:e;var r=t.memoizedState;return r!==null&&e!==null&&E7(e,r[1])?r[0]:(n=n(),t.memoizedState=[n,e],n)}function jU(n,e,t){return B1&21?(Dh(t,e)||(t=GF(),Hs.lanes|=t,I1|=t,n.baseState=!0),e):(n.baseState&&(n.baseState=!1,xc=!0),n.memoizedState=t)}function YH(n,e){var t=Oa;Oa=t!==0&&4>t?t:4,n(!0);var r=dS.transition;dS.transition={};try{n(!1),e()}finally{Oa=t,dS.transition=r}}function NU(){return Gd().memoizedState}function qH(n,e,t){var r=Xm(n);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},WU(n))GU(e,t);else if(t=CU(n,e,t,r),t!==null){var i=WA();Kh(t,n,r,i),$U(t,e,r)}}function VH(n,e,t){var r=Xm(n),i={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(WU(n))GU(e,i);else{var o=n.alternate;if(n.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,t);if(i.hasEagerState=!0,i.eagerState=s,Dh(s,a)){var d=e.interleaved;d===null?(i.next=i,b7(e)):(i.next=d.next,d.next=i),e.interleaved=i;return}}catch{}finally{}t=CU(n,e,i,r),t!==null&&(i=WA(),Kh(t,n,r,i),$U(t,e,r))}}function WU(n){var e=n.alternate;return n===Hs||e!==null&&e===Hs}function GU(n,e){h_=X3=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function $U(n,e,t){if(t&4194240){var r=e.lanes;r&=n.pendingLanes,t|=r,e.lanes=t,l7(n,t)}}var J3={readContext:Wd,useCallback:cA,useContext:cA,useEffect:cA,useImperativeHandle:cA,useInsertionEffect:cA,useLayoutEffect:cA,useMemo:cA,useReducer:cA,useRef:cA,useState:cA,useDebugValue:cA,useDeferredValue:cA,useTransition:cA,useMutableSource:cA,useSyncExternalStore:cA,useId:cA,unstable_isNewReconciler:!1},HH={readContext:Wd,useCallback:function(n,e){return xf().memoizedState=[n,e===void 0?null:e],n},useContext:Wd,useEffect:K9,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,d3(4194308,4,FU.bind(null,e,n),t)},useLayoutEffect:function(n,e){return d3(4194308,4,n,e)},useInsertionEffect:function(n,e){return d3(4,2,n,e)},useMemo:function(n,e){var t=xf();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var r=xf();return e=t!==void 0?t(e):e,r.memoizedState=r.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},r.queue=n,n=n.dispatch=qH.bind(null,Hs,n),[r.memoizedState,n]},useRef:function(n){var e=xf();return n={current:n},e.memoizedState=n},useState:T9,useDebugValue:k7,useDeferredValue:function(n){return xf().memoizedState=n},useTransition:function(){var n=T9(!1),e=n[0];return n=YH.bind(null,n[1]),xf().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var r=Hs,i=xf();if(Ks){if(t===void 0)throw Error(Yn(407));t=t()}else{if(t=e(),bu===null)throw Error(Yn(349));B1&30||BU(r,e,t)}i.memoizedState=t;var o={value:t,getSnapshot:e};return i.queue=o,K9(kU.bind(null,r,o,n),[n]),r.flags|=2048,Z_(9,IU.bind(null,r,o,t,e),void 0,null),t},useId:function(){var n=xf(),e=bu.identifierPrefix;if(Ks){var t=zp,r=Rp;t=(r&~(1<<32-Th(r)-1)).toString(32)+t,e=":"+e+"R"+t,t=V_++,0<t&&(e+="H"+t.toString(32)),e+=":"}else t=QH++,e=":"+e+"r"+t.toString(32)+":";return n.memoizedState=e},unstable_isNewReconciler:!1},ZH={readContext:Wd,useCallback:RU,useContext:Wd,useEffect:I7,useImperativeHandle:UU,useInsertionEffect:DU,useLayoutEffect:LU,useMemo:zU,useReducer:hS,useRef:PU,useState:function(){return hS(H_)},useDebugValue:k7,useDeferredValue:function(n){var e=Gd();return jU(e,Zl.memoizedState,n)},useTransition:function(){var n=hS(H_)[0],e=Gd().memoizedState;return[n,e]},useMutableSource:EU,useSyncExternalStore:OU,useId:NU,unstable_isNewReconciler:!1},XH={readContext:Wd,useCallback:RU,useContext:Wd,useEffect:I7,useImperativeHandle:UU,useInsertionEffect:DU,useLayoutEffect:LU,useMemo:zU,useReducer:fS,useRef:PU,useState:function(){return fS(H_)},useDebugValue:k7,useDeferredValue:function(n){var e=Gd();return Zl===null?e.memoizedState=n:jU(e,Zl.memoizedState,n)},useTransition:function(){var n=fS(H_)[0],e=Gd().memoizedState;return[n,e]},useMutableSource:EU,useSyncExternalStore:OU,useId:NU,unstable_isNewReconciler:!1};function uv(n,e){try{var t="",r=e;do t+=SV(r),r=r.return;while(r);var i=t}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:n,source:e,stack:i,digest:null}}function pS(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function k6(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var JH=typeof WeakMap=="function"?WeakMap:Map;function QU(n,e,t){t=jp(-1,t),t.tag=3,t.payload={element:null};var r=e.value;return t.callback=function(){t4||(t4=!0,j6=r),k6(n,e)},t}function YU(n,e,t){t=jp(-1,t),t.tag=3;var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;t.payload=function(){return r(i)},t.callback=function(){k6(n,e)}}var o=n.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){k6(n,e),typeof r!="function"&&(Zm===null?Zm=new Set([this]):Zm.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),t}function P9(n,e,t){var r=n.pingCache;if(r===null){r=n.pingCache=new JH;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(t)||(i.add(t),n=hZ.bind(null,n,e,t),e.then(n,n))}function D9(n){do{var e;if((e=n.tag===13)&&(e=n.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return n;n=n.return}while(n!==null);return null}function L9(n,e,t,r,i){return n.mode&1?(n.flags|=65536,n.lanes=i,n):(n===e?n.flags|=65536:(n.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=jp(-1,1),e.tag=2,Hm(t,e,1))),t.lanes|=1),n)}var eZ=Zp.ReactCurrentOwner,xc=!1;function RA(n,e,t,r){e.child=n===null?MU(e,null,t,r):sv(e,n.child,t,r)}function F9(n,e,t,r,i){t=t.render;var o=e.ref;return Ty(e,i),r=O7(n,e,t,r,o,i),t=B7(),n!==null&&!xc?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~i,Hp(n,e,i)):(Ks&&t&&m7(e),e.flags|=1,RA(n,e,r,i),e.child)}function U9(n,e,t,r,i){if(n===null){var o=t.type;return typeof o=="function"&&!R7(o)&&o.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=o,qU(n,e,o,r,i)):(n=m3(t.type,null,r,e,e.mode,i),n.ref=e.ref,n.return=e,e.child=n)}if(o=n.child,!(n.lanes&i)){var a=o.memoizedProps;if(t=t.compare,t=t!==null?t:W_,t(a,r)&&n.ref===e.ref)return Hp(n,e,i)}return e.flags|=1,n=Jm(o,r),n.ref=e.ref,n.return=e,e.child=n}function qU(n,e,t,r,i){if(n!==null){var o=n.memoizedProps;if(W_(o,r)&&n.ref===e.ref)if(xc=!1,e.pendingProps=r=o,(n.lanes&i)!==0)n.flags&131072&&(xc=!0);else return e.lanes=n.lanes,Hp(n,e,i)}return T6(n,e,t,r,i)}function VU(n,e,t){var r=e.pendingProps,i=r.children,o=n!==null?n.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ns(fy,Yc),Yc|=t;else{if(!(t&1073741824))return n=o!==null?o.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:n,cachePool:null,transitions:null},e.updateQueue=null,ns(fy,Yc),Yc|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:t,ns(fy,Yc),Yc|=r}else o!==null?(r=o.baseLanes|t,e.memoizedState=null):r=t,ns(fy,Yc),Yc|=r;return RA(n,e,i,t),e.child}function HU(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function T6(n,e,t,r,i){var o=Mc(t)?E1:gA.current;return o=ov(e,o),Ty(e,i),t=O7(n,e,t,r,o,i),r=B7(),n!==null&&!xc?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~i,Hp(n,e,i)):(Ks&&r&&m7(e),e.flags|=1,RA(n,e,t,i),e.child)}function R9(n,e,t,r,i){if(Mc(t)){var o=!0;$3(e)}else o=!1;if(Ty(e,i),e.stateNode===null)h3(n,e),xU(e,t,r),I6(e,t,r,i),r=!0;else if(n===null){var a=e.stateNode,s=e.memoizedProps;a.props=s;var d=a.context,f=t.contextType;typeof f=="object"&&f!==null?f=Wd(f):(f=Mc(t)?E1:gA.current,f=ov(e,f));var C=t.getDerivedStateFromProps,O=typeof C=="function"||typeof a.getSnapshotBeforeUpdate=="function";O||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||d!==f)&&I9(e,a,r,f),Im=!1;var E=e.memoizedState;a.state=E,H3(e,r,a,i),d=e.memoizedState,s!==r||E!==d||wc.current||Im?(typeof C=="function"&&(B6(e,t,C,r),d=e.memoizedState),(s=Im||B9(e,t,s,r,E,d,f))?(O||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=d),a.props=r,a.state=d,a.context=f,r=s):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,_U(n,e),s=e.memoizedProps,f=e.type===e.elementType?s:Mh(e.type,s),a.props=f,O=e.pendingProps,E=a.context,d=t.contextType,typeof d=="object"&&d!==null?d=Wd(d):(d=Mc(t)?E1:gA.current,d=ov(e,d));var P=t.getDerivedStateFromProps;(C=typeof P=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==O||E!==d)&&I9(e,a,r,d),Im=!1,E=e.memoizedState,a.state=E,H3(e,r,a,i);var D=e.memoizedState;s!==O||E!==D||wc.current||Im?(typeof P=="function"&&(B6(e,t,P,r),D=e.memoizedState),(f=Im||B9(e,t,f,r,E,D,d)||!1)?(C||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,D,d),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,D,d)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===n.memoizedProps&&E===n.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===n.memoizedProps&&E===n.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=D),a.props=r,a.state=D,a.context=d,r=f):(typeof a.componentDidUpdate!="function"||s===n.memoizedProps&&E===n.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===n.memoizedProps&&E===n.memoizedState||(e.flags|=1024),r=!1)}return K6(n,e,t,r,o,i)}function K6(n,e,t,r,i,o){HU(n,e);var a=(e.flags&128)!==0;if(!r&&!a)return i&&w9(e,t,!1),Hp(n,e,o);r=e.stateNode,eZ.current=e;var s=a&&typeof t.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,n!==null&&a?(e.child=sv(e,n.child,null,o),e.child=sv(e,null,s,o)):RA(n,e,s,o),e.memoizedState=r.state,i&&w9(e,t,!0),e.child}function ZU(n){var e=n.stateNode;e.pendingContext?x9(n,e.pendingContext,e.pendingContext!==e.context):e.context&&x9(n,e.context,!1),w7(n,e.containerInfo)}function z9(n,e,t,r,i){return av(),y7(i),e.flags|=256,RA(n,e,t,r),e.child}var P6={dehydrated:null,treeContext:null,retryLane:0};function D6(n){return{baseLanes:n,cachePool:null,transitions:null}}function XU(n,e,t){var r=e.pendingProps,i=Ys.current,o=!1,a=(e.flags&128)!==0,s;if((s=a)||(s=n!==null&&n.memoizedState===null?!1:(i&2)!==0),s?(o=!0,e.flags&=-129):(n===null||n.memoizedState!==null)&&(i|=1),ns(Ys,i&1),n===null)return E6(e),n=e.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(e.mode&1?n.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=r.children,n=r.fallback,o?(r=e.mode,o=e.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Q5(a,r,0,null),n=v1(n,r,t,null),o.return=e,n.return=e,o.sibling=n,e.child=o,e.child.memoizedState=D6(t),e.memoizedState=P6,n):T7(e,a));if(i=n.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return tZ(n,e,a,r,s,i,t);if(o){o=r.fallback,a=e.mode,i=n.child,s=i.sibling;var d={mode:"hidden",children:r.children};return!(a&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=d,e.deletions=null):(r=Jm(i,d),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Jm(s,o):(o=v1(o,a,t,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,a=n.child.memoizedState,a=a===null?D6(t):{baseLanes:a.baseLanes|t,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=n.childLanes&~t,e.memoizedState=P6,r}return o=n.child,n=o.sibling,r=Jm(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=t),r.return=e,r.sibling=null,n!==null&&(t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)),e.child=r,e.memoizedState=null,r}function T7(n,e){return e=Q5({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function p2(n,e,t,r){return r!==null&&y7(r),sv(e,n.child,null,t),n=T7(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function tZ(n,e,t,r,i,o,a){if(t)return e.flags&256?(e.flags&=-257,r=pS(Error(Yn(422))),p2(n,e,a,r)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Q5({mode:"visible",children:r.children},i,0,null),o=v1(o,i,a,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&sv(e,n.child,null,a),e.child.memoizedState=D6(a),e.memoizedState=P6,o);if(!(e.mode&1))return p2(n,e,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Yn(419)),r=pS(o,r,void 0),p2(n,e,a,r)}if(s=(a&n.childLanes)!==0,xc||s){if(r=bu,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Vp(n,i),Kh(r,n,i,-1))}return U7(),r=pS(Error(Yn(421))),p2(n,e,a,r)}return i.data==="$?"?(e.flags|=128,e.child=n.child,e=fZ.bind(null,n),i._reactRetry=e,null):(n=o.treeContext,Xc=Vm(i.nextSibling),td=e,Ks=!0,Ih=null,n!==null&&(Pd[Dd++]=Rp,Pd[Dd++]=zp,Pd[Dd++]=O1,Rp=n.id,zp=n.overflow,O1=e),e=T7(e,r.children),e.flags|=4096,e)}function j9(n,e,t){n.lanes|=e;var r=n.alternate;r!==null&&(r.lanes|=e),O6(n.return,e,t)}function mS(n,e,t,r,i){var o=n.memoizedState;o===null?n.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=t,o.tailMode=i)}function JU(n,e,t){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(RA(n,e,r.children,t),r=Ys.current,r&2)r=r&1|2,e.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=e.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&j9(n,t,e);else if(n.tag===19)j9(n,t,e);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}r&=1}if(ns(Ys,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(t=e.child,i=null;t!==null;)n=t.alternate,n!==null&&Z3(n)===null&&(i=t),t=t.sibling;t=i,t===null?(i=e.child,e.child=null):(i=t.sibling,t.sibling=null),mS(e,!1,i,t,o);break;case"backwards":for(t=null,i=e.child,e.child=null;i!==null;){if(n=i.alternate,n!==null&&Z3(n)===null){e.child=i;break}n=i.sibling,i.sibling=t,t=i,i=n}mS(e,!0,t,null,o);break;case"together":mS(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function h3(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function Hp(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),I1|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(Yn(153));if(e.child!==null){for(n=e.child,t=Jm(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=Jm(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function nZ(n,e,t){switch(e.tag){case 3:ZU(e),av();break;case 5:SU(e);break;case 1:Mc(e.type)&&$3(e);break;case 4:w7(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;ns(q3,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ns(Ys,Ys.current&1),e.flags|=128,null):t&e.child.childLanes?XU(n,e,t):(ns(Ys,Ys.current&1),n=Hp(n,e,t),n!==null?n.sibling:null);ns(Ys,Ys.current&1);break;case 19:if(r=(t&e.childLanes)!==0,n.flags&128){if(r)return JU(n,e,t);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ns(Ys,Ys.current),r)break;return null;case 22:case 23:return e.lanes=0,VU(n,e,t)}return Hp(n,e,t)}var eR,L6,tR,nR;eR=function(n,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)n.appendChild(t.stateNode);else if(t.tag!==4&&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;t=t.return}t.sibling.return=t.return,t=t.sibling}};L6=function(){};tR=function(n,e,t,r){var i=n.memoizedProps;if(i!==r){n=e.stateNode,A1(Rf.current);var o=null;switch(t){case"input":i=i6(n,i),r=i6(n,r),o=[];break;case"select":i=Zs({},i,{value:void 0}),r=Zs({},r,{value:void 0}),o=[];break;case"textarea":i=s6(n,i),r=s6(n,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(n.onclick=W3)}u6(t,r);var a;t=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var s=i[f];for(a in s)s.hasOwnProperty(a)&&(t||(t={}),t[a]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(L_.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var d=r[f];if(s=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&d!==s&&(d!=null||s!=null))if(f==="style")if(s){for(a in s)!s.hasOwnProperty(a)||d&&d.hasOwnProperty(a)||(t||(t={}),t[a]="");for(a in d)d.hasOwnProperty(a)&&s[a]!==d[a]&&(t||(t={}),t[a]=d[a])}else t||(o||(o=[]),o.push(f,t)),t=d;else f==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,s=s?s.__html:void 0,d!=null&&s!==d&&(o=o||[]).push(f,d)):f==="children"?typeof d!="string"&&typeof d!="number"||(o=o||[]).push(f,""+d):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(L_.hasOwnProperty(f)?(d!=null&&f==="onScroll"&&ps("scroll",n),o||s===d||(o=[])):(o=o||[]).push(f,d))}t&&(o=o||[]).push("style",t);var f=o;(e.updateQueue=f)&&(e.flags|=4)}};nR=function(n,e,t,r){t!==r&&(e.flags|=4)};function MC(n,e){if(!Ks)switch(n.tailMode){case"hidden":e=n.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?n.tail=null:t.sibling=null;break;case"collapsed":t=n.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e||n.tail===null?n.tail=null:n.tail.sibling=null:r.sibling=null}}function dA(n){var e=n.alternate!==null&&n.alternate.child===n.child,t=0,r=0;if(e)for(var i=n.child;i!==null;)t|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=n,i=i.sibling;else for(i=n.child;i!==null;)t|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=n,i=i.sibling;return n.subtreeFlags|=r,n.childLanes=t,e}function rZ(n,e,t){var r=e.pendingProps;switch(g7(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dA(e),null;case 1:return Mc(e.type)&&G3(),dA(e),null;case 3:return r=e.stateNode,lv(),_s(wc),_s(gA),S7(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(n===null||n.child===null)&&(h2(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ih!==null&&(G6(Ih),Ih=null))),L6(n,e),dA(e),null;case 5:M7(e);var i=A1(q_.current);if(t=e.type,n!==null&&e.stateNode!=null)tR(n,e,t,r,i),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Yn(166));return dA(e),null}if(n=A1(Rf.current),h2(e)){r=e.stateNode,t=e.type;var o=e.memoizedProps;switch(r[kf]=e,r[Q_]=o,n=(e.mode&1)!==0,t){case"dialog":ps("cancel",r),ps("close",r);break;case"iframe":case"object":case"embed":ps("load",r);break;case"video":case"audio":for(i=0;i<qC.length;i++)ps(qC[i],r);break;case"source":ps("error",r);break;case"img":case"image":case"link":ps("error",r),ps("load",r);break;case"details":ps("toggle",r);break;case"input":Hk(r,o),ps("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ps("invalid",r);break;case"textarea":Xk(r,o),ps("invalid",r)}u6(t,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&d2(r.textContent,s,n),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&d2(r.textContent,s,n),i=["children",""+s]):L_.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&ps("scroll",r)}switch(t){case"input":i2(r),Zk(r,o,!0);break;case"textarea":i2(r),Jk(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=W3)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=BF(t)),n==="http://www.w3.org/1999/xhtml"?t==="script"?(n=a.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof r.is=="string"?n=a.createElement(t,{is:r.is}):(n=a.createElement(t),t==="select"&&(a=n,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):n=a.createElementNS(n,t),n[kf]=e,n[Q_]=r,eR(n,e,!1,!1),e.stateNode=n;e:{switch(a=A6(t,r),t){case"dialog":ps("cancel",n),ps("close",n),i=r;break;case"iframe":case"object":case"embed":ps("load",n),i=r;break;case"video":case"audio":for(i=0;i<qC.length;i++)ps(qC[i],n);i=r;break;case"source":ps("error",n),i=r;break;case"img":case"image":case"link":ps("error",n),ps("load",n),i=r;break;case"details":ps("toggle",n),i=r;break;case"input":Hk(n,r),i=i6(n,r),ps("invalid",n);break;case"option":i=r;break;case"select":n._wrapperState={wasMultiple:!!r.multiple},i=Zs({},r,{value:void 0}),ps("invalid",n);break;case"textarea":Xk(n,r),i=s6(n,r),ps("invalid",n);break;default:i=r}u6(t,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var d=s[o];o==="style"?TF(n,d):o==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,d!=null&&IF(n,d)):o==="children"?typeof d=="string"?(t!=="textarea"||d!=="")&&F_(n,d):typeof d=="number"&&F_(n,""+d):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(L_.hasOwnProperty(o)?d!=null&&o==="onScroll"&&ps("scroll",n):d!=null&&n7(n,o,d,a))}switch(t){case"input":i2(n),Zk(n,r,!1);break;case"textarea":i2(n),Jk(n);break;case"option":r.value!=null&&n.setAttribute("value",""+s0(r.value));break;case"select":n.multiple=!!r.multiple,o=r.value,o!=null?Oy(n,!!r.multiple,o,!1):r.defaultValue!=null&&Oy(n,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(n.onclick=W3)}switch(t){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return dA(e),null;case 6:if(n&&e.stateNode!=null)nR(n,e,n.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Yn(166));if(t=A1(q_.current),A1(Rf.current),h2(e)){if(r=e.stateNode,t=e.memoizedProps,r[kf]=e,(o=r.nodeValue!==t)&&(n=td,n!==null))switch(n.tag){case 3:d2(r.nodeValue,t,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&d2(r.nodeValue,t,(n.mode&1)!==0)}o&&(e.flags|=4)}else r=(t.nodeType===9?t:t.ownerDocument).createTextNode(r),r[kf]=e,e.stateNode=r}return dA(e),null;case 13:if(_s(Ys),r=e.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Ks&&Xc!==null&&e.mode&1&&!(e.flags&128))vU(),av(),e.flags|=98560,o=!1;else if(o=h2(e),r!==null&&r.dehydrated!==null){if(n===null){if(!o)throw Error(Yn(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Yn(317));o[kf]=e}else av(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;dA(e),o=!1}else Ih!==null&&(G6(Ih),Ih=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=t,e):(r=r!==null,r!==(n!==null&&n.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(n===null||Ys.current&1?Xl===0&&(Xl=3):U7())),e.updateQueue!==null&&(e.flags|=4),dA(e),null);case 4:return lv(),L6(n,e),n===null&&G_(e.stateNode.containerInfo),dA(e),null;case 10:return _7(e.type._context),dA(e),null;case 17:return Mc(e.type)&&G3(),dA(e),null;case 19:if(_s(Ys),o=e.memoizedState,o===null)return dA(e),null;if(r=(e.flags&128)!==0,a=o.rendering,a===null)if(r)MC(o,!1);else{if(Xl!==0||n!==null&&n.flags&128)for(n=e.child;n!==null;){if(a=Z3(n),a!==null){for(e.flags|=128,MC(o,!1),r=a.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=t,t=e.child;t!==null;)o=t,n=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=n,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,n=a.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t=t.sibling;return ns(Ys,Ys.current&1|2),e.child}n=n.sibling}o.tail!==null&&_l()>Av&&(e.flags|=128,r=!0,MC(o,!1),e.lanes=4194304)}else{if(!r)if(n=Z3(a),n!==null){if(e.flags|=128,r=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),MC(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ks)return dA(e),null}else 2*_l()-o.renderingStartTime>Av&&t!==1073741824&&(e.flags|=128,r=!0,MC(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(t=o.last,t!==null?t.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=_l(),e.sibling=null,t=Ys.current,ns(Ys,r?t&1|2:t&1),e):(dA(e),null);case 22:case 23:return F7(),r=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Yc&1073741824&&(dA(e),e.subtreeFlags&6&&(e.flags|=8192)):dA(e),null;case 24:return null;case 25:return null}throw Error(Yn(156,e.tag))}function iZ(n,e){switch(g7(e),e.tag){case 1:return Mc(e.type)&&G3(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return lv(),_s(wc),_s(gA),S7(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return M7(e),null;case 13:if(_s(Ys),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Yn(340));av()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return _s(Ys),null;case 4:return lv(),null;case 10:return _7(e.type._context),null;case 22:case 23:return F7(),null;case 24:return null;default:return null}}var m2=!1,mA=!1,oZ=typeof WeakSet=="function"?WeakSet:Set,Kr=null;function hy(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){al(n,e,r)}else t.current=null}function F6(n,e,t){try{t()}catch(r){al(n,e,r)}}var N9=!1;function aZ(n,e){if(C6=z3,n=aU(),p7(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var a=0,s=-1,d=-1,f=0,C=0,O=n,E=null;t:for(;;){for(var P;O!==t||i!==0&&O.nodeType!==3||(s=a+i),O!==o||r!==0&&O.nodeType!==3||(d=a+r),O.nodeType===3&&(a+=O.nodeValue.length),(P=O.firstChild)!==null;)E=O,O=P;for(;;){if(O===n)break t;if(E===t&&++f===i&&(s=a),E===o&&++C===r&&(d=a),(P=O.nextSibling)!==null)break;O=E,E=O.parentNode}O=P}t=s===-1||d===-1?null:{start:s,end:d}}else t=null}t=t||{start:0,end:0}}else t=null;for(_6={focusedElem:n,selectionRange:t},z3=!1,Kr=e;Kr!==null;)if(e=Kr,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Kr=n;else for(;Kr!==null;){e=Kr;try{var D=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(D!==null){var $=D.memoizedProps,H=D.memoizedState,Q=e.stateNode,N=Q.getSnapshotBeforeUpdate(e.elementType===e.type?$:Mh(e.type,$),H);Q.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var Z=e.stateNode.containerInfo;Z.nodeType===1?Z.textContent="":Z.nodeType===9&&Z.documentElement&&Z.removeChild(Z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Yn(163))}}catch(ae){al(e,e.return,ae)}if(n=e.sibling,n!==null){n.return=e.return,Kr=n;break}Kr=e.return}return D=N9,N9=!1,D}function f_(n,e,t){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&n)===n){var o=i.destroy;i.destroy=void 0,o!==void 0&&F6(e,t,o)}i=i.next}while(i!==r)}}function G5(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var r=t.create;t.destroy=r()}t=t.next}while(t!==e)}}function U6(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function rR(n){var e=n.alternate;e!==null&&(n.alternate=null,rR(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[kf],delete e[Q_],delete e[w6],delete e[NH],delete e[WH])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function iR(n){return n.tag===5||n.tag===3||n.tag===4}function W9(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||iR(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function R6(n,e,t){var r=n.tag;if(r===5||r===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=W3));else if(r!==4&&(n=n.child,n!==null))for(R6(n,e,t),n=n.sibling;n!==null;)R6(n,e,t),n=n.sibling}function z6(n,e,t){var r=n.tag;if(r===5||r===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(r!==4&&(n=n.child,n!==null))for(z6(n,e,t),n=n.sibling;n!==null;)z6(n,e,t),n=n.sibling}var Uu=null,Oh=!1;function Cm(n,e,t){for(t=t.child;t!==null;)oR(n,e,t),t=t.sibling}function oR(n,e,t){if(Uf&&typeof Uf.onCommitFiberUnmount=="function")try{Uf.onCommitFiberUnmount(L5,t)}catch{}switch(t.tag){case 5:mA||hy(t,e);case 6:var r=Uu,i=Oh;Uu=null,Cm(n,e,t),Uu=r,Oh=i,Uu!==null&&(Oh?(n=Uu,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Uu.removeChild(t.stateNode));break;case 18:Uu!==null&&(Oh?(n=Uu,t=t.stateNode,n.nodeType===8?uS(n.parentNode,t):n.nodeType===1&&uS(n,t),j_(n)):uS(Uu,t.stateNode));break;case 4:r=Uu,i=Oh,Uu=t.stateNode.containerInfo,Oh=!0,Cm(n,e,t),Uu=r,Oh=i;break;case 0:case 11:case 14:case 15:if(!mA&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&F6(t,e,a),i=i.next}while(i!==r)}Cm(n,e,t);break;case 1:if(!mA&&(hy(t,e),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(s){al(t,e,s)}Cm(n,e,t);break;case 21:Cm(n,e,t);break;case 22:t.mode&1?(mA=(r=mA)||t.memoizedState!==null,Cm(n,e,t),mA=r):Cm(n,e,t);break;default:Cm(n,e,t)}}function G9(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new oZ),e.forEach(function(r){var i=pZ.bind(null,n,r);t.has(r)||(t.add(r),r.then(i,i))})}}function _h(n,e){var t=e.deletions;if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];try{var o=n,a=e,s=a;e:for(;s!==null;){switch(s.tag){case 5:Uu=s.stateNode,Oh=!1;break e;case 3:Uu=s.stateNode.containerInfo,Oh=!0;break e;case 4:Uu=s.stateNode.containerInfo,Oh=!0;break e}s=s.return}if(Uu===null)throw Error(Yn(160));oR(o,a,i),Uu=null,Oh=!1;var d=i.alternate;d!==null&&(d.return=null),i.return=null}catch(f){al(i,e,f)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)aR(e,n),e=e.sibling}function aR(n,e){var t=n.alternate,r=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(_h(e,n),_f(n),r&4){try{f_(3,n,n.return),G5(3,n)}catch($){al(n,n.return,$)}try{f_(5,n,n.return)}catch($){al(n,n.return,$)}}break;case 1:_h(e,n),_f(n),r&512&&t!==null&&hy(t,t.return);break;case 5:if(_h(e,n),_f(n),r&512&&t!==null&&hy(t,t.return),n.flags&32){var i=n.stateNode;try{F_(i,"")}catch($){al(n,n.return,$)}}if(r&4&&(i=n.stateNode,i!=null)){var o=n.memoizedProps,a=t!==null?t.memoizedProps:o,s=n.type,d=n.updateQueue;if(n.updateQueue=null,d!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&EF(i,o),A6(s,a);var f=A6(s,o);for(a=0;a<d.length;a+=2){var C=d[a],O=d[a+1];C==="style"?TF(i,O):C==="dangerouslySetInnerHTML"?IF(i,O):C==="children"?F_(i,O):n7(i,C,O,f)}switch(s){case"input":o6(i,o);break;case"textarea":OF(i,o);break;case"select":var E=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var P=o.value;P!=null?Oy(i,!!o.multiple,P,!1):E!==!!o.multiple&&(o.defaultValue!=null?Oy(i,!!o.multiple,o.defaultValue,!0):Oy(i,!!o.multiple,o.multiple?[]:"",!1))}i[Q_]=o}catch($){al(n,n.return,$)}}break;case 6:if(_h(e,n),_f(n),r&4){if(n.stateNode===null)throw Error(Yn(162));i=n.stateNode,o=n.memoizedProps;try{i.nodeValue=o}catch($){al(n,n.return,$)}}break;case 3:if(_h(e,n),_f(n),r&4&&t!==null&&t.memoizedState.isDehydrated)try{j_(e.containerInfo)}catch($){al(n,n.return,$)}break;case 4:_h(e,n),_f(n);break;case 13:_h(e,n),_f(n),i=n.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(D7=_l())),r&4&&G9(n);break;case 22:if(C=t!==null&&t.memoizedState!==null,n.mode&1?(mA=(f=mA)||C,_h(e,n),mA=f):_h(e,n),_f(n),r&8192){if(f=n.memoizedState!==null,(n.stateNode.isHidden=f)&&!C&&n.mode&1)for(Kr=n,C=n.child;C!==null;){for(O=Kr=C;Kr!==null;){switch(E=Kr,P=E.child,E.tag){case 0:case 11:case 14:case 15:f_(4,E,E.return);break;case 1:hy(E,E.return);var D=E.stateNode;if(typeof D.componentWillUnmount=="function"){r=E,t=E.return;try{e=r,D.props=e.memoizedProps,D.state=e.memoizedState,D.componentWillUnmount()}catch($){al(r,t,$)}}break;case 5:hy(E,E.return);break;case 22:if(E.memoizedState!==null){Q9(O);continue}}P!==null?(P.return=E,Kr=P):Q9(O)}C=C.sibling}e:for(C=null,O=n;;){if(O.tag===5){if(C===null){C=O;try{i=O.stateNode,f?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=O.stateNode,d=O.memoizedProps.style,a=d!=null&&d.hasOwnProperty("display")?d.display:null,s.style.display=kF("display",a))}catch($){al(n,n.return,$)}}}else if(O.tag===6){if(C===null)try{O.stateNode.nodeValue=f?"":O.memoizedProps}catch($){al(n,n.return,$)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===n)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===n)break e;for(;O.sibling===null;){if(O.return===null||O.return===n)break e;C===O&&(C=null),O=O.return}C===O&&(C=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:_h(e,n),_f(n),r&4&&G9(n);break;case 21:break;default:_h(e,n),_f(n)}}function _f(n){var e=n.flags;if(e&2){try{e:{for(var t=n.return;t!==null;){if(iR(t)){var r=t;break e}t=t.return}throw Error(Yn(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(F_(i,""),r.flags&=-33);var o=W9(n);z6(n,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=W9(n);R6(n,s,a);break;default:throw Error(Yn(161))}}catch(d){al(n,n.return,d)}n.flags&=-3}e&4096&&(n.flags&=-4097)}function sZ(n,e,t){Kr=n,sR(n)}function sR(n,e,t){for(var r=(n.mode&1)!==0;Kr!==null;){var i=Kr,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||m2;if(!a){var s=i.alternate,d=s!==null&&s.memoizedState!==null||mA;s=m2;var f=mA;if(m2=a,(mA=d)&&!f)for(Kr=i;Kr!==null;)a=Kr,d=a.child,a.tag===22&&a.memoizedState!==null?Y9(i):d!==null?(d.return=a,Kr=d):Y9(i);for(;o!==null;)Kr=o,sR(o),o=o.sibling;Kr=i,m2=s,mA=f}$9(n)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Kr=o):$9(n)}}function $9(n){for(;Kr!==null;){var e=Kr;if(e.flags&8772){var t=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:mA||G5(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!mA)if(t===null)r.componentDidMount();else{var i=e.elementType===e.type?t.memoizedProps:Mh(e.type,t.memoizedProps);r.componentDidUpdate(i,t.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&O9(e,o,r);break;case 3:var a=e.updateQueue;if(a!==null){if(t=null,e.child!==null)switch(e.child.tag){case 5:t=e.child.stateNode;break;case 1:t=e.child.stateNode}O9(e,a,t)}break;case 5:var s=e.stateNode;if(t===null&&e.flags&4){t=s;var d=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":d.autoFocus&&t.focus();break;case"img":d.src&&(t.src=d.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var f=e.alternate;if(f!==null){var C=f.memoizedState;if(C!==null){var O=C.dehydrated;O!==null&&j_(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Yn(163))}mA||e.flags&512&&U6(e)}catch(E){al(e,e.return,E)}}if(e===n){Kr=null;break}if(t=e.sibling,t!==null){t.return=e.return,Kr=t;break}Kr=e.return}}function Q9(n){for(;Kr!==null;){var e=Kr;if(e===n){Kr=null;break}var t=e.sibling;if(t!==null){t.return=e.return,Kr=t;break}Kr=e.return}}function Y9(n){for(;Kr!==null;){var e=Kr;try{switch(e.tag){case 0:case 11:case 15:var t=e.return;try{G5(4,e)}catch(d){al(e,t,d)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(d){al(e,i,d)}}var o=e.return;try{U6(e)}catch(d){al(e,o,d)}break;case 5:var a=e.return;try{U6(e)}catch(d){al(e,a,d)}}}catch(d){al(e,e.return,d)}if(e===n){Kr=null;break}var s=e.sibling;if(s!==null){s.return=e.return,Kr=s;break}Kr=e.return}}var lZ=Math.ceil,e4=Zp.ReactCurrentDispatcher,K7=Zp.ReactCurrentOwner,zd=Zp.ReactCurrentBatchConfig,Vo=0,bu=null,Dl=null,zu=0,Yc=0,fy=h0(0),Xl=0,X_=null,I1=0,$5=0,P7=0,p_=null,_c=null,D7=0,Av=1/0,Ip=null,t4=!1,j6=null,Zm=null,g2=!1,Rm=null,n4=0,m_=0,N6=null,f3=-1,p3=0;function WA(){return Vo&6?_l():f3!==-1?f3:f3=_l()}function Xm(n){return n.mode&1?Vo&2&&zu!==0?zu&-zu:$H.transition!==null?(p3===0&&(p3=GF()),p3):(n=Oa,n!==0||(n=window.event,n=n===void 0?16:ZF(n.type)),n):1}function Kh(n,e,t,r){if(50<m_)throw m_=0,N6=null,Error(Yn(185));kb(n,t,r),(!(Vo&2)||n!==bu)&&(n===bu&&(!(Vo&2)&&($5|=t),Xl===4&&Dm(n,zu)),Sc(n,r),t===1&&Vo===0&&!(e.mode&1)&&(Av=_l()+500,j5&&f0()))}function Sc(n,e){var t=n.callbackNode;$V(n,e);var r=R3(n,n===bu?zu:0);if(r===0)t!==null&&n9(t),n.callbackNode=null,n.callbackPriority=0;else if(e=r&-r,n.callbackPriority!==e){if(t!=null&&n9(t),e===1)n.tag===0?GH(q9.bind(null,n)):mU(q9.bind(null,n)),zH(function(){!(Vo&6)&&f0()}),t=null;else{switch($F(r)){case 1:t=s7;break;case 4:t=NF;break;case 16:t=U3;break;case 536870912:t=WF;break;default:t=U3}t=pR(t,lR.bind(null,n))}n.callbackPriority=e,n.callbackNode=t}}function lR(n,e){if(f3=-1,p3=0,Vo&6)throw Error(Yn(327));var t=n.callbackNode;if(Ky()&&n.callbackNode!==t)return null;var r=R3(n,n===bu?zu:0);if(r===0)return null;if(r&30||r&n.expiredLanes||e)e=r4(n,r);else{e=r;var i=Vo;Vo|=2;var o=AR();(bu!==n||zu!==e)&&(Ip=null,Av=_l()+500,y1(n,e));do try{cZ();break}catch(s){uR(n,s)}while(!0);C7(),e4.current=o,Vo=i,Dl!==null?e=0:(bu=null,zu=0,e=Xl)}if(e!==0){if(e===2&&(i=p6(n),i!==0&&(r=i,e=W6(n,i))),e===1)throw t=X_,y1(n,0),Dm(n,r),Sc(n,_l()),t;if(e===6)Dm(n,r);else{if(i=n.current.alternate,!(r&30)&&!uZ(i)&&(e=r4(n,r),e===2&&(o=p6(n),o!==0&&(r=o,e=W6(n,o))),e===1))throw t=X_,y1(n,0),Dm(n,r),Sc(n,_l()),t;switch(n.finishedWork=i,n.finishedLanes=r,e){case 0:case 1:throw Error(Yn(345));case 2:H0(n,_c,Ip);break;case 3:if(Dm(n,r),(r&130023424)===r&&(e=D7+500-_l(),10<e)){if(R3(n,0)!==0)break;if(i=n.suspendedLanes,(i&r)!==r){WA(),n.pingedLanes|=n.suspendedLanes&i;break}n.timeoutHandle=x6(H0.bind(null,n,_c,Ip),e);break}H0(n,_c,Ip);break;case 4:if(Dm(n,r),(r&4194240)===r)break;for(e=n.eventTimes,i=-1;0<r;){var a=31-Th(r);o=1<<a,a=e[a],a>i&&(i=a),r&=~o}if(r=i,r=_l()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lZ(r/1960))-r,10<r){n.timeoutHandle=x6(H0.bind(null,n,_c,Ip),r);break}H0(n,_c,Ip);break;case 5:H0(n,_c,Ip);break;default:throw Error(Yn(329))}}}return Sc(n,_l()),n.callbackNode===t?lR.bind(null,n):null}function W6(n,e){var t=p_;return n.current.memoizedState.isDehydrated&&(y1(n,e).flags|=256),n=r4(n,e),n!==2&&(e=_c,_c=t,e!==null&&G6(e)),n}function G6(n){_c===null?_c=n:_c.push.apply(_c,n)}function uZ(n){for(var e=n;;){if(e.flags&16384){var t=e.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var r=0;r<t.length;r++){var i=t[r],o=i.getSnapshot;i=i.value;try{if(!Dh(o(),i))return!1}catch{return!1}}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Dm(n,e){for(e&=~P7,e&=~$5,n.suspendedLanes|=e,n.pingedLanes&=~e,n=n.expirationTimes;0<e;){var t=31-Th(e),r=1<<t;n[t]=-1,e&=~r}}function q9(n){if(Vo&6)throw Error(Yn(327));Ky();var e=R3(n,0);if(!(e&1))return Sc(n,_l()),null;var t=r4(n,e);if(n.tag!==0&&t===2){var r=p6(n);r!==0&&(e=r,t=W6(n,r))}if(t===1)throw t=X_,y1(n,0),Dm(n,e),Sc(n,_l()),t;if(t===6)throw Error(Yn(345));return n.finishedWork=n.current.alternate,n.finishedLanes=e,H0(n,_c,Ip),Sc(n,_l()),null}function L7(n,e){var t=Vo;Vo|=1;try{return n(e)}finally{Vo=t,Vo===0&&(Av=_l()+500,j5&&f0())}}function k1(n){Rm!==null&&Rm.tag===0&&!(Vo&6)&&Ky();var e=Vo;Vo|=1;var t=zd.transition,r=Oa;try{if(zd.transition=null,Oa=1,n)return n()}finally{Oa=r,zd.transition=t,Vo=e,!(Vo&6)&&f0()}}function F7(){Yc=fy.current,_s(fy)}function y1(n,e){n.finishedWork=null,n.finishedLanes=0;var t=n.timeoutHandle;if(t!==-1&&(n.timeoutHandle=-1,RH(t)),Dl!==null)for(t=Dl.return;t!==null;){var r=t;switch(g7(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&G3();break;case 3:lv(),_s(wc),_s(gA),S7();break;case 5:M7(r);break;case 4:lv();break;case 13:_s(Ys);break;case 19:_s(Ys);break;case 10:_7(r.type._context);break;case 22:case 23:F7()}t=t.return}if(bu=n,Dl=n=Jm(n.current,null),zu=Yc=e,Xl=0,X_=null,P7=$5=I1=0,_c=p_=null,u1!==null){for(e=0;e<u1.length;e++)if(t=u1[e],r=t.interleaved,r!==null){t.interleaved=null;var i=r.next,o=t.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}t.pending=r}u1=null}return n}function uR(n,e){do{var t=Dl;try{if(C7(),c3.current=J3,X3){for(var r=Hs.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}X3=!1}if(B1=0,Cu=Zl=Hs=null,h_=!1,V_=0,K7.current=null,t===null||t.return===null){Xl=1,X_=e,Dl=null;break}e:{var o=n,a=t.return,s=t,d=e;if(e=zu,s.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){var f=d,C=s,O=C.tag;if(!(C.mode&1)&&(O===0||O===11||O===15)){var E=C.alternate;E?(C.updateQueue=E.updateQueue,C.memoizedState=E.memoizedState,C.lanes=E.lanes):(C.updateQueue=null,C.memoizedState=null)}var P=D9(a);if(P!==null){P.flags&=-257,L9(P,a,s,o,e),P.mode&1&&P9(o,f,e),e=P,d=f;var D=e.updateQueue;if(D===null){var $=new Set;$.add(d),e.updateQueue=$}else D.add(d);break e}else{if(!(e&1)){P9(o,f,e),U7();break e}d=Error(Yn(426))}}else if(Ks&&s.mode&1){var H=D9(a);if(H!==null){!(H.flags&65536)&&(H.flags|=256),L9(H,a,s,o,e),y7(uv(d,s));break e}}o=d=uv(d,s),Xl!==4&&(Xl=2),p_===null?p_=[o]:p_.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var Q=QU(o,d,e);E9(o,Q);break e;case 1:s=d;var N=o.type,Z=o.stateNode;if(!(o.flags&128)&&(typeof N.getDerivedStateFromError=="function"||Z!==null&&typeof Z.componentDidCatch=="function"&&(Zm===null||!Zm.has(Z)))){o.flags|=65536,e&=-e,o.lanes|=e;var ae=YU(o,s,e);E9(o,ae);break e}}o=o.return}while(o!==null)}dR(t)}catch(pe){e=pe,Dl===t&&t!==null&&(Dl=t=t.return);continue}break}while(!0)}function AR(){var n=e4.current;return e4.current=J3,n===null?J3:n}function U7(){(Xl===0||Xl===3||Xl===2)&&(Xl=4),bu===null||!(I1&268435455)&&!($5&268435455)||Dm(bu,zu)}function r4(n,e){var t=Vo;Vo|=2;var r=AR();(bu!==n||zu!==e)&&(Ip=null,y1(n,e));do try{AZ();break}catch(i){uR(n,i)}while(!0);if(C7(),Vo=t,e4.current=r,Dl!==null)throw Error(Yn(261));return bu=null,zu=0,Xl}function AZ(){for(;Dl!==null;)cR(Dl)}function cZ(){for(;Dl!==null&&!LV();)cR(Dl)}function cR(n){var e=fR(n.alternate,n,Yc);n.memoizedProps=n.pendingProps,e===null?dR(n):Dl=e,K7.current=null}function dR(n){var e=n;do{var t=e.alternate;if(n=e.return,e.flags&32768){if(t=iZ(t,e),t!==null){t.flags&=32767,Dl=t;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{Xl=6,Dl=null;return}}else if(t=rZ(t,e,Yc),t!==null){Dl=t;return}if(e=e.sibling,e!==null){Dl=e;return}Dl=e=n}while(e!==null);Xl===0&&(Xl=5)}function H0(n,e,t){var r=Oa,i=zd.transition;try{zd.transition=null,Oa=1,dZ(n,e,t,r)}finally{zd.transition=i,Oa=r}return null}function dZ(n,e,t,r){do Ky();while(Rm!==null);if(Vo&6)throw Error(Yn(327));t=n.finishedWork;var i=n.finishedLanes;if(t===null)return null;if(n.finishedWork=null,n.finishedLanes=0,t===n.current)throw Error(Yn(177));n.callbackNode=null,n.callbackPriority=0;var o=t.lanes|t.childLanes;if(QV(n,o),n===bu&&(Dl=bu=null,zu=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||g2||(g2=!0,pR(U3,function(){return Ky(),null})),o=(t.flags&15990)!==0,t.subtreeFlags&15990||o){o=zd.transition,zd.transition=null;var a=Oa;Oa=1;var s=Vo;Vo|=4,K7.current=null,aZ(n,t),aR(t,n),TH(_6),z3=!!C6,_6=C6=null,n.current=t,sZ(t),FV(),Vo=s,Oa=a,zd.transition=o}else n.current=t;if(g2&&(g2=!1,Rm=n,n4=i),o=n.pendingLanes,o===0&&(Zm=null),zV(t.stateNode),Sc(n,_l()),e!==null)for(r=n.onRecoverableError,t=0;t<e.length;t++)i=e[t],r(i.value,{componentStack:i.stack,digest:i.digest});if(t4)throw t4=!1,n=j6,j6=null,n;return n4&1&&n.tag!==0&&Ky(),o=n.pendingLanes,o&1?n===N6?m_++:(m_=0,N6=n):m_=0,f0(),null}function Ky(){if(Rm!==null){var n=$F(n4),e=zd.transition,t=Oa;try{if(zd.transition=null,Oa=16>n?16:n,Rm===null)var r=!1;else{if(n=Rm,Rm=null,n4=0,Vo&6)throw Error(Yn(331));var i=Vo;for(Vo|=4,Kr=n.current;Kr!==null;){var o=Kr,a=o.child;if(Kr.flags&16){var s=o.deletions;if(s!==null){for(var d=0;d<s.length;d++){var f=s[d];for(Kr=f;Kr!==null;){var C=Kr;switch(C.tag){case 0:case 11:case 15:f_(8,C,o)}var O=C.child;if(O!==null)O.return=C,Kr=O;else for(;Kr!==null;){C=Kr;var E=C.sibling,P=C.return;if(rR(C),C===f){Kr=null;break}if(E!==null){E.return=P,Kr=E;break}Kr=P}}}var D=o.alternate;if(D!==null){var $=D.child;if($!==null){D.child=null;do{var H=$.sibling;$.sibling=null,$=H}while($!==null)}}Kr=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,Kr=a;else e:for(;Kr!==null;){if(o=Kr,o.flags&2048)switch(o.tag){case 0:case 11:case 15:f_(9,o,o.return)}var Q=o.sibling;if(Q!==null){Q.return=o.return,Kr=Q;break e}Kr=o.return}}var N=n.current;for(Kr=N;Kr!==null;){a=Kr;var Z=a.child;if(a.subtreeFlags&2064&&Z!==null)Z.return=a,Kr=Z;else e:for(a=N;Kr!==null;){if(s=Kr,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:G5(9,s)}}catch(pe){al(s,s.return,pe)}if(s===a){Kr=null;break e}var ae=s.sibling;if(ae!==null){ae.return=s.return,Kr=ae;break e}Kr=s.return}}if(Vo=i,f0(),Uf&&typeof Uf.onPostCommitFiberRoot=="function")try{Uf.onPostCommitFiberRoot(L5,n)}catch{}r=!0}return r}finally{Oa=t,zd.transition=e}}return!1}function V9(n,e,t){e=uv(t,e),e=QU(n,e,1),n=Hm(n,e,1),e=WA(),n!==null&&(kb(n,1,e),Sc(n,e))}function al(n,e,t){if(n.tag===3)V9(n,n,t);else for(;e!==null;){if(e.tag===3){V9(e,n,t);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zm===null||!Zm.has(r))){n=uv(t,n),n=YU(e,n,1),e=Hm(e,n,1),n=WA(),e!==null&&(kb(e,1,n),Sc(e,n));break}}e=e.return}}function hZ(n,e,t){var r=n.pingCache;r!==null&&r.delete(e),e=WA(),n.pingedLanes|=n.suspendedLanes&t,bu===n&&(zu&t)===t&&(Xl===4||Xl===3&&(zu&130023424)===zu&&500>_l()-D7?y1(n,0):P7|=t),Sc(n,e)}function hR(n,e){e===0&&(n.mode&1?(e=s2,s2<<=1,!(s2&130023424)&&(s2=4194304)):e=1);var t=WA();n=Vp(n,e),n!==null&&(kb(n,e,t),Sc(n,t))}function fZ(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),hR(n,t)}function pZ(n,e){var t=0;switch(n.tag){case 13:var r=n.stateNode,i=n.memoizedState;i!==null&&(t=i.retryLane);break;case 19:r=n.stateNode;break;default:throw Error(Yn(314))}r!==null&&r.delete(e),hR(n,t)}var fR;fR=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||wc.current)xc=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return xc=!1,nZ(n,e,t);xc=!!(n.flags&131072)}else xc=!1,Ks&&e.flags&1048576&&gU(e,Y3,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;h3(n,e),n=e.pendingProps;var i=ov(e,gA.current);Ty(e,t),i=O7(null,e,r,n,i,t);var o=B7();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Mc(r)?(o=!0,$3(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,x7(e),i.updater=N5,e.stateNode=i,i._reactInternals=e,I6(e,r,n,t),e=K6(null,e,r,!0,o,t)):(e.tag=0,Ks&&o&&m7(e),RA(null,e,i,t),e=e.child),e;case 16:r=e.elementType;e:{switch(h3(n,e),n=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=gZ(r),n=Mh(r,n),i){case 0:e=T6(null,e,r,n,t);break e;case 1:e=R9(null,e,r,n,t);break e;case 11:e=F9(null,e,r,n,t);break e;case 14:e=U9(null,e,r,Mh(r.type,n),t);break e}throw Error(Yn(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mh(r,i),T6(n,e,r,i,t);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mh(r,i),R9(n,e,r,i,t);case 3:e:{if(ZU(e),n===null)throw Error(Yn(387));r=e.pendingProps,o=e.memoizedState,i=o.element,_U(n,e),H3(e,r,null,t);var a=e.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=uv(Error(Yn(423)),e),e=z9(n,e,r,t,i);break e}else if(r!==i){i=uv(Error(Yn(424)),e),e=z9(n,e,r,t,i);break e}else for(Xc=Vm(e.stateNode.containerInfo.firstChild),td=e,Ks=!0,Ih=null,t=MU(e,null,r,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(av(),r===i){e=Hp(n,e,t);break e}RA(n,e,r,t)}e=e.child}return e;case 5:return SU(e),n===null&&E6(e),r=e.type,i=e.pendingProps,o=n!==null?n.memoizedProps:null,a=i.children,b6(r,i)?a=null:o!==null&&b6(r,o)&&(e.flags|=32),HU(n,e),RA(n,e,a,t),e.child;case 6:return n===null&&E6(e),null;case 13:return XU(n,e,t);case 4:return w7(e,e.stateNode.containerInfo),r=e.pendingProps,n===null?e.child=sv(e,null,r,t):RA(n,e,r,t),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mh(r,i),F9(n,e,r,i,t);case 7:return RA(n,e,e.pendingProps,t),e.child;case 8:return RA(n,e,e.pendingProps.children,t),e.child;case 12:return RA(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,ns(q3,r._currentValue),r._currentValue=a,o!==null)if(Dh(o.value,a)){if(o.children===i.children&&!wc.current){e=Hp(n,e,t);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var d=s.firstContext;d!==null;){if(d.context===r){if(o.tag===1){d=jp(-1,t&-t),d.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var C=f.pending;C===null?d.next=d:(d.next=C.next,C.next=d),f.pending=d}}o.lanes|=t,d=o.alternate,d!==null&&(d.lanes|=t),O6(o.return,t,e),s.lanes|=t;break}d=d.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Yn(341));a.lanes|=t,s=a.alternate,s!==null&&(s.lanes|=t),O6(a,t,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}RA(n,e,i.children,t),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ty(e,t),i=Wd(i),r=r(i),e.flags|=1,RA(n,e,r,t),e.child;case 14:return r=e.type,i=Mh(r,e.pendingProps),i=Mh(r.type,i),U9(n,e,r,i,t);case 15:return qU(n,e,e.type,e.pendingProps,t);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mh(r,i),h3(n,e),e.tag=1,Mc(r)?(n=!0,$3(e)):n=!1,Ty(e,t),xU(e,r,i),I6(e,r,i,t),K6(null,e,r,!0,n,t);case 19:return JU(n,e,t);case 22:return VU(n,e,t)}throw Error(Yn(156,e.tag))};function pR(n,e){return jF(n,e)}function mZ(n,e,t,r){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fd(n,e,t,r){return new mZ(n,e,t,r)}function R7(n){return n=n.prototype,!(!n||!n.isReactComponent)}function gZ(n){if(typeof n=="function")return R7(n)?1:0;if(n!=null){if(n=n.$$typeof,n===i7)return 11;if(n===o7)return 14}return 2}function Jm(n,e){var t=n.alternate;return t===null?(t=Fd(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function m3(n,e,t,r,i,o){var a=2;if(r=n,typeof n=="function")R7(n)&&(a=1);else if(typeof n=="string")a=5;else e:switch(n){case iy:return v1(t.children,i,o,e);case r7:a=8,i|=8;break;case e6:return n=Fd(12,t,e,i|2),n.elementType=e6,n.lanes=o,n;case t6:return n=Fd(13,t,e,i),n.elementType=t6,n.lanes=o,n;case n6:return n=Fd(19,t,e,i),n.elementType=n6,n.lanes=o,n;case wF:return Q5(t,i,o,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case bF:a=10;break e;case xF:a=9;break e;case i7:a=11;break e;case o7:a=14;break e;case Bm:a=16,r=null;break e}throw Error(Yn(130,n==null?n:typeof n,""))}return e=Fd(a,t,e,i),e.elementType=n,e.type=r,e.lanes=o,e}function v1(n,e,t,r){return n=Fd(7,n,r,e),n.lanes=t,n}function Q5(n,e,t,r){return n=Fd(22,n,r,e),n.elementType=wF,n.lanes=t,n.stateNode={isHidden:!1},n}function gS(n,e,t){return n=Fd(6,n,null,e),n.lanes=t,n}function yS(n,e,t){return e=Fd(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function yZ(n,e,t,r,i){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=XM(0),this.expirationTimes=XM(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=XM(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function z7(n,e,t,r,i,o,a,s,d){return n=new yZ(n,e,t,s,d),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Fd(3,null,null,e),n.current=o,o.stateNode=n,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},x7(o),n}function vZ(n,e,t){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ry,key:r==null?null:""+r,children:n,containerInfo:e,implementation:t}}function mR(n){if(!n)return l0;n=n._reactInternals;e:{if(W1(n)!==n||n.tag!==1)throw Error(Yn(170));var e=n;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Mc(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Yn(171))}if(n.tag===1){var t=n.type;if(Mc(t))return pU(n,t,e)}return e}function gR(n,e,t,r,i,o,a,s,d){return n=z7(t,r,!0,n,i,o,a,s,d),n.context=mR(null),t=n.current,r=WA(),i=Xm(t),o=jp(r,i),o.callback=e??null,Hm(t,o,i),n.current.lanes=i,kb(n,i,r),Sc(n,r),n}function Y5(n,e,t,r){var i=e.current,o=WA(),a=Xm(i);return t=mR(t),e.context===null?e.context=t:e.pendingContext=t,e=jp(o,a),e.payload={element:n},r=r===void 0?null:r,r!==null&&(e.callback=r),n=Hm(i,e,a),n!==null&&(Kh(n,i,a,o),A3(n,i,a)),a}function i4(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function H9(n,e){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var t=n.retryLane;n.retryLane=t!==0&&t<e?t:e}}function j7(n,e){H9(n,e),(n=n.alternate)&&H9(n,e)}function CZ(){return null}var yR=typeof reportError=="function"?reportError:function(n){console.error(n)};function N7(n){this._internalRoot=n}q5.prototype.render=N7.prototype.render=function(n){var e=this._internalRoot;if(e===null)throw Error(Yn(409));Y5(n,e,null,null)};q5.prototype.unmount=N7.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var e=n.containerInfo;k1(function(){Y5(null,n,null,null)}),e[qp]=null}};function q5(n){this._internalRoot=n}q5.prototype.unstable_scheduleHydration=function(n){if(n){var e=qF();n={blockedOn:null,target:n,priority:e};for(var t=0;t<Pm.length&&e!==0&&e<Pm[t].priority;t++);Pm.splice(t,0,n),t===0&&HF(n)}};function W7(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function V5(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Z9(){}function _Z(n,e,t,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var f=i4(a);o.call(f)}}var a=gR(e,r,n,0,null,!1,!1,"",Z9);return n._reactRootContainer=a,n[qp]=a.current,G_(n.nodeType===8?n.parentNode:n),k1(),a}for(;i=n.lastChild;)n.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var f=i4(d);s.call(f)}}var d=z7(n,0,!1,null,null,!1,!1,"",Z9);return n._reactRootContainer=d,n[qp]=d.current,G_(n.nodeType===8?n.parentNode:n),k1(function(){Y5(e,d,t,r)}),d}function H5(n,e,t,r,i){var o=t._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var d=i4(a);s.call(d)}}Y5(e,a,n,i)}else a=_Z(t,e,n,i,r);return i4(a)}QF=function(n){switch(n.tag){case 3:var e=n.stateNode;if(e.current.memoizedState.isDehydrated){var t=YC(e.pendingLanes);t!==0&&(l7(e,t|1),Sc(e,_l()),!(Vo&6)&&(Av=_l()+500,f0()))}break;case 13:k1(function(){var r=Vp(n,1);if(r!==null){var i=WA();Kh(r,n,1,i)}}),j7(n,1)}};u7=function(n){if(n.tag===13){var e=Vp(n,134217728);if(e!==null){var t=WA();Kh(e,n,134217728,t)}j7(n,134217728)}};YF=function(n){if(n.tag===13){var e=Xm(n),t=Vp(n,e);if(t!==null){var r=WA();Kh(t,n,e,r)}j7(n,e)}};qF=function(){return Oa};VF=function(n,e){var t=Oa;try{return Oa=n,e()}finally{Oa=t}};d6=function(n,e,t){switch(e){case"input":if(o6(n,t),e=t.name,t.type==="radio"&&e!=null){for(t=n;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<t.length;e++){var r=t[e];if(r!==n&&r.form===n.form){var i=z5(r);if(!i)throw Error(Yn(90));SF(r),o6(r,i)}}}break;case"textarea":OF(n,t);break;case"select":e=t.value,e!=null&&Oy(n,!!t.multiple,e,!1)}};DF=L7;LF=k1;var bZ={usingClientEntryPoint:!1,Events:[Kb,ly,z5,KF,PF,L7]},SC={findFiberByHostInstance:l1,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},xZ={bundleType:SC.bundleType,version:SC.version,rendererPackageName:SC.rendererPackageName,rendererConfig:SC.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zp.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=RF(n),n===null?null:n.stateNode},findFiberByHostInstance:SC.findFiberByHostInstance||CZ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var y2=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!y2.isDisabled&&y2.supportsFiber)try{L5=y2.inject(xZ),Uf=y2}catch{}}od.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bZ;od.createPortal=function(n,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!W7(e))throw Error(Yn(200));return vZ(n,e,null,t)};od.createRoot=function(n,e){if(!W7(n))throw Error(Yn(299));var t=!1,r="",i=yR;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=z7(n,1,!1,null,null,t,!1,r,i),n[qp]=e.current,G_(n.nodeType===8?n.parentNode:n),new N7(e)};od.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var e=n._reactInternals;if(e===void 0)throw typeof n.render=="function"?Error(Yn(188)):(n=Object.keys(n).join(","),Error(Yn(268,n)));return n=RF(e),n=n===null?null:n.stateNode,n};od.flushSync=function(n){return k1(n)};od.hydrate=function(n,e,t){if(!V5(e))throw Error(Yn(200));return H5(null,n,e,!0,t)};od.hydrateRoot=function(n,e,t){if(!W7(n))throw Error(Yn(405));var r=t!=null&&t.hydratedSources||null,i=!1,o="",a=yR;if(t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),e=gR(e,null,n,1,t??null,i,!1,o,a),n[qp]=e.current,G_(n),r)for(n=0;n<r.length;n++)t=r[n],i=t._getVersion,i=i(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i);return new q5(e)};od.render=function(n,e,t){if(!V5(e))throw Error(Yn(200));return H5(null,n,e,!1,t)};od.unmountComponentAtNode=function(n){if(!V5(n))throw Error(Yn(40));return n._reactRootContainer?(k1(function(){H5(null,null,n,!1,function(){n._reactRootContainer=null,n[qp]=null})}),!0):!1};od.unstable_batchedUpdates=L7;od.unstable_renderSubtreeIntoContainer=function(n,e,t,r){if(!V5(t))throw Error(Yn(200));if(n==null||n._reactInternals===void 0)throw Error(Yn(38));return H5(n,e,t,!1,r)};od.version="18.2.0-next-9e3b772b8-20220608";function vR(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vR)}catch(n){console.error(n)}}vR(),gF.exports=od;var p0=gF.exports;const wZ=Ba(p0);var CR,X9=p0;CR=X9.createRoot,X9.hydrateRoot;const MZ="modulepreload",SZ=function(n){return"/maputnik/"+n},J9={},vS=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.all(t.map(d=>{if(d=SZ(d),d in J9)return;J9[d]=!0;const f=d.endsWith(".css"),C=f?'[rel="stylesheet"]':"";if(!!r)for(let P=o.length-1;P>=0;P--){const D=o[P];if(D.href===d&&(!f||D.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${C}`))return;const E=document.createElement("link");if(E.rel=f?"stylesheet":MZ,f||(E.as="script",E.crossOrigin=""),E.href=d,s&&E.setAttribute("nonce",s),document.head.appendChild(E),f)return new Promise((P,D)=>{E.addEventListener("load",P),E.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${d}`)))})}))}return i.then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},EZ=(n,e)=>{const t=n[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((r,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))})},OZ={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class o4{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||OZ,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new o4(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new o4(this.logger,e)}}var Df=new o4;let Z5=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(t)||0;this.observers[r].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[s,d]=a;for(let f=0;f<d;f++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[s,d]=a;for(let f=0;f<d;f++)s.apply(s,[e,...r])})}};function EC(){let n,e;const t=new Promise((r,i)=>{n=r,e=i});return t.resolve=n,t.reject=e,t}function eT(n){return n==null?"":""+n}function BZ(n,e,t){n.forEach(r=>{e[r]&&(t[r]=e[r])})}const IZ=/###/g;function g_(n,e,t){function r(s){return s&&s.indexOf("###")>-1?s.replace(IZ,"."):s}function i(){return!n||typeof n=="string"}const o=typeof e!="string"?e:e.split(".");let a=0;for(;a<o.length-1;){if(i())return{};const s=r(o[a]);!n[s]&&t&&(n[s]=new t),Object.prototype.hasOwnProperty.call(n,s)?n=n[s]:n={},++a}return i()?{}:{obj:n,k:r(o[a])}}function tT(n,e,t){const{obj:r,k:i}=g_(n,e,Object);if(r!==void 0||e.length===1){r[i]=t;return}let o=e[e.length-1],a=e.slice(0,e.length-1),s=g_(n,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=g_(n,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=t}function kZ(n,e,t,r){const{obj:i,k:o}=g_(n,e,Object);i[o]=i[o]||[],i[o].push(t)}function a4(n,e){const{obj:t,k:r}=g_(n,e);if(t)return t[r]}function TZ(n,e,t){const r=a4(n,t);return r!==void 0?r:a4(e,t)}function _R(n,e,t){for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?typeof n[r]=="string"||n[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?t&&(n[r]=e[r]):_R(n[r],e[r],t):n[r]=e[r]);return n}function kg(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var KZ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function PZ(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,e=>KZ[e]):n}class DZ{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const LZ=[" ",",","?","!",";"],FZ=new DZ(20);function UZ(n,e,t){e=e||"",t=t||"";const r=LZ.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(r.length===0)return!0;const i=FZ.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(n);if(!o){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(o=!0)}return o}function $6(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const r=e.split(t);let i=n;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let a,s="";for(let d=o;d<r.length;++d)if(d!==o&&(s+=t),s+=r[d],a=i[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&d<r.length-1)continue;o+=d-o+1;break}i=a}return i}function s4(n){return n&&n.indexOf("_")>0?n.replace("_","-"):n}class nT extends Z5{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],r&&(Array.isArray(r)?s.push(...r):typeof r=="string"&&o?s.push(...r.split(o)):s.push(r)));const d=a4(this.data,s);return!d&&!t&&!r&&e.indexOf(".")>-1&&(e=s[0],t=s[1],r=s.slice(2).join(".")),d||!a||typeof r!="string"?d:$6(this.data&&this.data[e]&&this.data[e][t],r,o)}addResource(e,t,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[e,t];r&&(s=s.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(s=e.split("."),i=t,t=s[1]),this.addNamespaces(t),tT(this.data,s,i),o.silent||this.emit("added",e,t,r,i)}addResources(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});i.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),i=r,r=t,t=s[1]),this.addNamespaces(t);let d=a4(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?_R(d,r,o):d={...d,...r},tT(this.data,s,d),a.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var bR={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,i){return n.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,t,r,i))}),e}};const rT={};class l4 extends Z5{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),BZ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Df.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return r&&r.res!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!UZ(e,r,i);if(a&&!s){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:o};const f=e.split(r);(r!==i||r===i&&this.options.ns.indexOf(f[0])>-1)&&(o=f.shift()),e=f.join(i)}return typeof o=="string"&&(o=[o]),{key:e,namespaces:o}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],t),d=s[s.length-1],f=t.lng||this.language,C=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(C){const ae=t.nsSeparator||this.options.nsSeparator;return i?{res:`${d}${ae}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:d,usedParams:this.getUsedParamsDetails(t)}:`${d}${ae}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:d,usedParams:this.getUsedParamsDetails(t)}:a}const O=this.resolve(e,t);let E=O&&O.res;const P=O&&O.usedKey||a,D=O&&O.exactUsedKey||a,$=Object.prototype.toString.apply(E),H=["[object Number]","[object Function]","[object RegExp]"],Q=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject;if(N&&E&&(typeof E!="string"&&typeof E!="boolean"&&typeof E!="number")&&H.indexOf($)<0&&!(typeof Q=="string"&&Array.isArray(E))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ae=this.options.returnedObjectHandler?this.options.returnedObjectHandler(P,E,{...t,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(O.res=ae,O.usedParams=this.getUsedParamsDetails(t),O):ae}if(o){const ae=Array.isArray(E),pe=ae?[]:{},fe=ae?D:P;for(const X in E)if(Object.prototype.hasOwnProperty.call(E,X)){const oe=`${fe}${o}${X}`;pe[X]=this.translate(oe,{...t,joinArrays:!1,ns:s}),pe[X]===oe&&(pe[X]=E[X])}E=pe}}else if(N&&typeof Q=="string"&&Array.isArray(E))E=E.join(Q),E&&(E=this.extendTranslation(E,e,t,r));else{let ae=!1,pe=!1;const fe=t.count!==void 0&&typeof t.count!="string",X=l4.hasDefaultValue(t),oe=fe?this.pluralResolver.getSuffix(f,t.count,t):"",Ce=t.ordinal&&fe?this.pluralResolver.getSuffix(f,t.count,{ordinal:!1}):"",we=fe&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),Te=we&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${oe}`]||t[`defaultValue${Ce}`]||t.defaultValue;!this.isValidLookup(E)&&X&&(ae=!0,E=Te),this.isValidLookup(E)||(pe=!0,E=a);const he=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&pe?void 0:E,$e=X&&Te!==E&&this.options.updateMissing;if(pe||ae||$e){if(this.logger.log($e?"updateKey":"missingKey",f,d,a,$e?Te:E),o){const st=this.resolve(a,{...t,keySeparator:!1});st&&st.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ye=[];const gt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&gt&&gt[0])for(let st=0;st<gt.length;st++)ye.push(gt[st]);else this.options.saveMissingTo==="all"?ye=this.languageUtils.toResolveHierarchy(t.lng||this.language):ye.push(t.lng||this.language);const yt=(st,ft,Re)=>{const Ve=X&&Re!==E?Re:he;this.options.missingKeyHandler?this.options.missingKeyHandler(st,d,ft,Ve,$e,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(st,d,ft,Ve,$e,t),this.emit("missingKey",st,d,ft,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&fe?ye.forEach(st=>{const ft=this.pluralResolver.getSuffixes(st,t);we&&t[`defaultValue${this.options.pluralSeparator}zero`]&&ft.indexOf(`${this.options.pluralSeparator}zero`)<0&&ft.push(`${this.options.pluralSeparator}zero`),ft.forEach(Re=>{yt([st],a+Re,t[`defaultValue${Re}`]||Te)})}):yt(ye,a,Te))}E=this.extendTranslation(E,e,t,O,r),pe&&E===a&&this.options.appendNamespaceToMissingKey&&(E=`${d}:${a}`),(pe||ae)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${a}`:a,ae?E:void 0):E=this.options.parseMissingKeyHandler(E))}return i?(O.res=E,O.usedParams=this.getUsedParamsDetails(t),O):E}extendTranslation(e,t,r,i,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let C;if(f){const E=e.match(this.interpolator.nestingRegexp);C=E&&E.length}let O=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(O={...this.options.interpolation.defaultVariables,...O}),e=this.interpolator.interpolate(e,O,r.lng||this.language||i.usedLng,r),f){const E=e.match(this.interpolator.nestingRegexp),P=E&&E.length;C<P&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var E=arguments.length,P=new Array(E),D=0;D<E;D++)P[D]=arguments[D];return o&&o[0]===P[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${P[0]} in key: ${t[0]}`),null):a.translate(...P,t)},r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,d=typeof s=="string"?[s]:s;return e!=null&&d&&d.length&&r.applyPostProcessor!==!1&&(e=bR.handle(d,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return typeof e=="string"&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(d,t),C=f.key;i=C;let O=f.namespaces;this.options.fallbackNS&&(O=O.concat(this.options.fallbackNS));const E=t.count!==void 0&&typeof t.count!="string",P=E&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),D=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",$=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);O.forEach(H=>{this.isValidLookup(r)||(s=H,!rT[`${$[0]}-${H}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(rT[`${$[0]}-${H}`]=!0,this.logger.warn(`key "${i}" for languages "${$.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),$.forEach(Q=>{if(this.isValidLookup(r))return;a=Q;const N=[C];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(N,C,Q,H,t);else{let ae;E&&(ae=this.pluralResolver.getSuffix(Q,t.count,t));const pe=`${this.options.pluralSeparator}zero`,fe=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(N.push(C+ae),t.ordinal&&ae.indexOf(fe)===0&&N.push(C+ae.replace(fe,this.options.pluralSeparator)),P&&N.push(C+pe)),D){const X=`${C}${this.options.contextSeparator}${t.context}`;N.push(X),E&&(N.push(X+ae),t.ordinal&&ae.indexOf(fe)===0&&N.push(X+ae.replace(fe,this.options.pluralSeparator)),P&&N.push(X+pe))}}let Z;for(;Z=N.pop();)this.isValidLookup(r)||(o=Z,r=this.getResource(Q,H,Z,t))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,i):this.resourceStore.getResource(e,t,r,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let i=r?e.replace:e;if(r&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of t)delete i[o]}return i}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}function CS(n){return n.charAt(0).toUpperCase()+n.slice(1)}class iT{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Df.create("languageUtils")}getScriptPartFromCode(e){if(e=s4(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=s4(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=CS(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=CS(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=CS(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}let RZ=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],zZ={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1&&n%100!=11?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n==0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3}};const jZ=["v1","v2","v3"],NZ=["v4"],oT={zero:0,one:1,two:2,few:3,many:4,other:5};function WZ(){const n={};return RZ.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:zZ[e.fc]}})}),n}class GZ{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Df.create("pluralResolver"),(!this.options.compatibilityJSON||NZ.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=WZ()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(s4(e==="dev"?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>oT[i]-oT[o]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!jZ.includes(this.options.compatibilityJSON)}}function aT(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=TZ(n,e,t);return!o&&i&&typeof t=="string"&&(o=$6(n,t,r),o===void 0&&(o=$6(e,t,r))),o}class $Z{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Df.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:d,formatSeparator:f,unescapeSuffix:C,unescapePrefix:O,nestingPrefix:E,nestingPrefixEscaped:P,nestingSuffix:D,nestingSuffixEscaped:$,nestingOptionsSeparator:H,maxReplaces:Q,alwaysFormat:N}=e.interpolation;this.escape=t!==void 0?t:PZ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?kg(o):a||"{{",this.suffix=s?kg(s):d||"}}",this.formatSeparator=f||",",this.unescapePrefix=C?"":O||"-",this.unescapeSuffix=this.unescapePrefix?"":C||"",this.nestingPrefix=E?kg(E):P||kg("$t("),this.nestingSuffix=D?kg(D):$||kg(")"),this.nestingOptionsSeparator=H||",",this.maxReplaces=Q||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>t&&t.source===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,i){let o,a,s;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(D){return D.replace(/\$/g,"$$$$")}const C=D=>{if(D.indexOf(this.formatSeparator)<0){const N=aT(t,d,D,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,r,{...i,...t,interpolationkey:D}):N}const $=D.split(this.formatSeparator),H=$.shift().trim(),Q=$.join(this.formatSeparator).trim();return this.format(aT(t,d,H,this.options.keySeparator,this.options.ignoreJSONStructure),Q,r,{...i,...t,interpolationkey:H})};this.resetRegExp();const O=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,E=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:D=>f(D)},{regex:this.regexp,safeValue:D=>this.escapeValue?f(this.escape(D)):f(D)}].forEach(D=>{for(s=0;o=D.regex.exec(e);){const $=o[1].trim();if(a=C($),a===void 0)if(typeof O=="function"){const Q=O(e,o,i);a=typeof Q=="string"?Q:""}else if(i&&Object.prototype.hasOwnProperty.call(i,$))a="";else if(E){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${$} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=eT(a));const H=D.safeValue(a);if(e=e.replace(o[0],H),E?(D.regex.lastIndex+=a.length,D.regex.lastIndex-=o[0].length):D.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;function s(d,f){const C=this.nestingOptionsSeparator;if(d.indexOf(C)<0)return d;const O=d.split(new RegExp(`${C}[ ]*{`));let E=`{${O[1]}`;d=O[0],E=this.interpolate(E,a);const P=E.match(/'/g),D=E.match(/"/g);(P&&P.length%2===0&&!D||D.length%2!==0)&&(E=E.replace(/'/g,'"'));try{a=JSON.parse(E),f&&(a={...f,...a})}catch($){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,$),`${d}${C}${E}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,d}for(;i=this.nestingRegexp.exec(e);){let d=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const C=i[1].split(this.formatSeparator).map(O=>O.trim());i[1]=C.shift(),d=C,f=!0}if(o=t(s.call(this,i[1].trim(),a),a),o&&i[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=eT(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),f&&(o=d.reduce((C,O)=>this.format(C,O,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}}function QZ(n){let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...d]=a.split(":"),f=d.join(":").trim().replace(/^'+|'+$/g,""),C=s.trim();t[C]||(t[C]=f),f==="false"&&(t[C]=!1),f==="true"&&(t[C]=!0),isNaN(f)||(t[C]=parseInt(f,10))}})}return{formatName:e,formatOptions:t}}function Tg(n){const e={};return function(r,i,o){const a=i+JSON.stringify(o);let s=e[a];return s||(s=n(s4(i),o),e[a]=s),s(r)}}class YZ{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Df.create("formatter"),this.options=e,this.formats={number:Tg((t,r)=>{const i=new Intl.NumberFormat(t,{...r});return o=>i.format(o)}),currency:Tg((t,r)=>{const i=new Intl.NumberFormat(t,{...r,style:"currency"});return o=>i.format(o)}),datetime:Tg((t,r)=>{const i=new Intl.DateTimeFormat(t,{...r});return o=>i.format(o)}),relativetime:Tg((t,r)=>{const i=new Intl.RelativeTimeFormat(t,{...r});return o=>i.format(o,r.range||"day")}),list:Tg((t,r)=>{const i=new Intl.ListFormat(t,{...r});return o=>i.format(o)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Tg(t)}format(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((s,d)=>{const{formatName:f,formatOptions:C}=QZ(d);if(this.formats[f]){let O=s;try{const E=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},P=E.locale||E.lng||i.locale||i.lng||r;O=this.formats[f](s,P,{...C,...i,...E})}catch(E){this.logger.warn(E)}return O}else this.logger.warn(`there was no format function for ${f}`);return s},e)}}function qZ(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class VZ extends Z5{constructor(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Df.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(e,t,r,i){const o={},a={},s={},d={};return e.forEach(f=>{let C=!0;t.forEach(O=>{const E=`${f}|${O}`;!r.reload&&this.store.hasResourceBundle(f,O)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?a[E]===void 0&&(a[E]=!0):(this.state[E]=1,C=!1,a[E]===void 0&&(a[E]=!0),o[E]===void 0&&(o[E]=!0),d[O]===void 0&&(d[O]=!0)))}),C||(s[f]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const i=e.split("|"),o=i[0],a=i[1];t&&this.emit("failedLoading",o,a,t),r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const s={};this.queue.forEach(d=>{kZ(d.loaded,[o],a),qZ(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(f=>{s[f]||(s[f]={});const C=d.loaded[f];C.length&&C.forEach(O=>{s[f][O]===void 0&&(s[f][O]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(d=>!d.done)}read(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(f,C)=>{if(this.readingCalls--,this.waitingReads.length>0){const O=this.waitingReads.shift();this.read(O.lng,O.ns,O.fcName,O.tried,O.wait,O.callback)}if(f&&C&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,i+1,o*2,a)},o);return}a(f,C)},d=this.backend[r].bind(this.backend);if(d.length===2){try{const f=d(e,t);f&&typeof f.then=="function"?f.then(C=>s(null,C)).catch(s):s(null,f)}catch(f){s(f)}return}return d(e,t,s)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,s),this.loaded(e,a,s)})}saveMissing(e,t,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const d={...a,isUpdate:o},f=this.backend.create.bind(this.backend);if(f.length<6)try{let C;f.length===5?C=f(e,t,r,i,d):C=f(e,t,r,i),C&&typeof C.then=="function"?C.then(O=>s(null,O)).catch(s):s(null,C)}catch(C){s(C)}else f(e,t,r,i,s,d)}!e||!e[0]||this.store.addResource(e[0],t,r,i)}}}function sT(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(i=>{t[i]=r[i]})}return t},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function lT(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function v2(){}function HZ(n){Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})}class J_ extends Z5{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=lT(e),this.services={},this.logger=Df,this.modules={external:[]},HZ(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=sT();this.options={...i,...this.options,...lT(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function o(C){return C?typeof C=="function"?new C:C:null}if(!this.options.isClone){this.modules.logger?Df.init(o(this.modules.logger),this.options):Df.init(null,this.options);let C;this.modules.formatter?C=this.modules.formatter:typeof Intl<"u"&&(C=YZ);const O=new iT(this.options);this.store=new nT(this.options.resources,this.options);const E=this.services;E.logger=Df,E.resourceStore=this.store,E.languageUtils=O,E.pluralResolver=new GZ(O,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),C&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(E.formatter=o(C),E.formatter.init(E,this.options),this.options.interpolation.format=E.formatter.format.bind(E.formatter)),E.interpolator=new $Z(this.options),E.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},E.backendConnector=new VZ(o(this.modules.backend),E.resourceStore,E,this.options),E.backendConnector.on("*",function(P){for(var D=arguments.length,$=new Array(D>1?D-1:0),H=1;H<D;H++)$[H-1]=arguments[H];e.emit(P,...$)}),this.modules.languageDetector&&(E.languageDetector=o(this.modules.languageDetector),E.languageDetector.init&&E.languageDetector.init(E,this.options.detection,this.options)),this.modules.i18nFormat&&(E.i18nFormat=o(this.modules.i18nFormat),E.i18nFormat.init&&E.i18nFormat.init(this)),this.translator=new l4(this.services,this.options),this.translator.on("*",function(P){for(var D=arguments.length,$=new Array(D>1?D-1:0),H=1;H<D;H++)$[H-1]=arguments[H];e.emit(P,...$)}),this.modules.external.forEach(P=>{P.init&&P.init(this)})}if(this.format=this.options.interpolation.format,r||(r=v2),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const C=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);C.length>0&&C[0]!=="dev"&&(this.options.lng=C[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(C=>{this[C]=function(){return e.store[C](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(C=>{this[C]=function(){return e.store[C](...arguments),e}});const d=EC(),f=()=>{const C=(O,E)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(E),r(O,E)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return C(null,this.t.bind(this));this.changeLanguage(this.options.lng,C)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),d}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v2;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>a(d)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,t,r){const i=EC();return e||(e=this.languages),t||(t=this.options.ns),r||(r=v2),this.services.backendConnector.reload(e,t,o=>{i.resolve(),r(o)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&bR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const i=EC();this.emit("languageChanging",e);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},a=(d,f)=>{f?(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),t&&t(d,function(){return r.t(...arguments)})},s=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const f=typeof d=="string"?d:this.services.languageUtils.getBestMatchFromCodes(d);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(f)),this.loadResources(f,C=>{a(C,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,t,r){var i=this;const o=function(a,s){let d;if(typeof s!="object"){for(var f=arguments.length,C=new Array(f>2?f-2:0),O=2;O<f;O++)C[O-2]=arguments[O];d=i.options.overloadTranslationOptionHandler([a,s].concat(C))}else d={...s};d.lng=d.lng||o.lng,d.lngs=d.lngs||o.lngs,d.ns=d.ns||o.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||o.keyPrefix);const E=i.options.keySeparator||".";let P;return d.keyPrefix&&Array.isArray(a)?P=a.map(D=>`${d.keyPrefix}${E}${D}`):P=d.keyPrefix?`${d.keyPrefix}${E}${a}`:a,i.t(P,d)};return typeof e=="string"?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,d)=>{const f=this.services.backendConnector.state[`${s}|${d}`];return f===-1||f===2};if(t.precheck){const s=t.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}loadNamespaces(e,t){const r=EC();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=EC();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],o=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),t&&t(a)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new iT(sT());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new J_(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v2;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new J_(i);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new nT(this.store.data,i),o.services.resourceStore=o.store),o.translator=new l4(o.services,i),o.translator.on("*",function(s){for(var d=arguments.length,f=new Array(d>1?d-1:0),C=1;C<d;C++)f[C-1]=arguments[C];o.emit(s,...f)}),o.init(i,t),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vA=J_.createInstance();vA.createInstance=J_.createInstance;vA.createInstance;vA.dir;vA.init;vA.loadResources;vA.reloadResources;vA.use;vA.changeLanguage;vA.getFixedT;vA.t;vA.exists;vA.setDefaultNamespace;vA.hasLoadedNamespace;vA.loadNamespaces;vA.loadLanguages;const{slice:ZZ,forEach:XZ}=[];function JZ(n){return XZ.call(ZZ.call(arguments,1),e=>{if(e)for(const t in e)n[t]===void 0&&(n[t]=e[t])}),n}const uT=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,eX=(n,e,t)=>{const r=t||{};r.path=r.path||"/";const i=encodeURIComponent(e);let o=`${n}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!uT.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!uT.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},AT={create(n,e,t,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),r&&(i.domain=r),document.cookie=eX(n,encodeURIComponent(e),i)},read(n){const e=`${n}=`,t=document.cookie.split(";");for(let r=0;r<t.length;r++){let i=t[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(n){this.create(n,"",-1)}};var tX={name:"cookie",lookup(n){let{lookupCookie:e}=n;if(e&&typeof document<"u")return AT.read(e)||void 0},cacheUserLanguage(n,e){let{lookupCookie:t,cookieMinutes:r,cookieDomain:i,cookieOptions:o}=e;t&&typeof document<"u"&&AT.create(t,n,r,i,o)}},nX={name:"querystring",lookup(n){var r;let{lookupQuerystring:e}=n,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let s=0;s<a.length;s++){const d=a[s].indexOf("=");d>0&&a[s].substring(0,d)===e&&(t=a[s].substring(d+1))}}return t}};let OC=null;const cT=()=>{if(OC!==null)return OC;try{OC=window!=="undefined"&&window.localStorage!==null;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{OC=!1}return OC};var rX={name:"localStorage",lookup(n){let{lookupLocalStorage:e}=n;if(e&&cT())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupLocalStorage:t}=e;t&&cT()&&window.localStorage.setItem(t,n)}};let BC=null;const dT=()=>{if(BC!==null)return BC;try{BC=window!=="undefined"&&window.sessionStorage!==null;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{BC=!1}return BC};var iX={name:"sessionStorage",lookup(n){let{lookupSessionStorage:e}=n;if(e&&dT())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupSessionStorage:t}=e;t&&dT()&&window.sessionStorage.setItem(t,n)}},oX={name:"navigator",lookup(n){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:r,language:i}=navigator;if(t)for(let o=0;o<t.length;o++)e.push(t[o]);r&&e.push(r),i&&e.push(i)}return e.length>0?e:void 0}},aX={name:"htmlTag",lookup(n){let{htmlTag:e}=n,t;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},sX={name:"path",lookup(n){var i;let{lookupFromPathIndex:e}=n;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},lX={name:"subdomain",lookup(n){var i,o;let{lookupFromSubdomainIndex:e}=n;const t=typeof e=="number"?e+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[t]}};function uX(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n}}class xR{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=JZ(t,this.options||{},uX()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(tX),this.addDetector(nX),this.addDetector(rX),this.addDetector(iX),this.addDetector(oX),this.addDetector(aX),this.addDetector(sX),this.addDetector(lX)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let t=[];return e.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e,t){t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}xR.type="languageDetector";var AX=function(e){return{type:"backend",init:function(r,i,o){},read:function(r,i,o){if(typeof e=="function"){if(e.length<3){try{var a=e(r,i);a&&typeof a.then=="function"?a.then(function(s){return o(null,s&&s.default||s)}).catch(o):o(null,a)}catch(s){o(s)}return}e(r,i,o);return}o(null,e&&e[r]&&e[r][i])}}},cX={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const dX=Ba(cX);var hX=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function hT(n){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=n.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(dX[t[1]]||n.charAt(n.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var r=n.indexOf("-->");return{type:"comment",comment:r!==-1?n.slice(4,r):""}}for(var i=new RegExp(hX),o=null;(o=i.exec(n))!==null;)if(o[0].trim())if(o[1]){var a=o[1].trim(),s=[a,""];a.indexOf("=")>-1&&(s=a.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else o[2]&&(e.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return e}var fX=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,pX=/^\s*$/,mX=Object.create(null);function wR(n,e){switch(e.type){case"text":return n+e.content;case"tag":return n+="<"+e.name+(e.attrs?function(t){var r=[];for(var i in t)r.push(i+'="'+t[i]+'"');return r.length?" "+r.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?n:n+e.children.reduce(wR,"")+"</"+e.name+">";case"comment":return n+"<!--"+e.comment+"-->"}}var gX={parse:function(n,e){e||(e={}),e.components||(e.components=mX);var t,r=[],i=[],o=-1,a=!1;if(n.indexOf("<")!==0){var s=n.indexOf("<");r.push({type:"text",content:s===-1?n:n.substring(0,s)})}return n.replace(fX,function(d,f){if(a){if(d!=="</"+t.name+">")return;a=!1}var C,O=d.charAt(1)!=="/",E=d.startsWith("<!--"),P=f+d.length,D=n.charAt(P);if(E){var $=hT(d);return o<0?(r.push($),r):((C=i[o]).children.push($),r)}if(O&&(o++,(t=hT(d)).type==="tag"&&e.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!D||D==="<"||t.children.push({type:"text",content:n.slice(P,n.indexOf("<",P))}),o===0&&r.push(t),(C=i[o-1])&&C.children.push(t),i[o]=t),(!O||t.voidElement)&&(o>-1&&(t.voidElement||t.name===d.slice(2,-1))&&(o--,t=o===-1?r:i[o]),!a&&D!=="<"&&D)){C=o===-1?r:i[o].children;var H=n.indexOf("<",P),Q=n.slice(P,H===-1?void 0:H);pX.test(Q)&&(Q=" "),(H>-1&&o+C.length>=0||Q!==" ")&&C.push({type:"text",content:Q})}}),r},stringify:function(n){return n.reduce(function(e,t){return e+wR("",t)},"")}};const g3=(...n)=>{console!=null&&console.warn&&(nd(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),console.warn(...n))},fT={},u4=(...n)=>{nd(n[0])&&fT[n[0]]||(nd(n[0])&&(fT[n[0]]=new Date),g3(...n))},MR=(n,e)=>()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}},pT=(n,e,t)=>{n.loadNamespaces(e,MR(n,t))},mT=(n,e,t,r)=>{nd(t)&&(t=[t]),t.forEach(i=>{n.options.ns.indexOf(i)<0&&n.options.ns.push(i)}),n.loadLanguages(e,MR(n,r))},yX=(n,e,t={})=>!e.languages||!e.languages.length?(u4("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(n,{lng:t.lng,precheck:(r,i)=>{var o;if(((o=t.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,n))return!1}}),vX=n=>n.displayName||n.name||(nd(n)&&n.length>0?n:"Unknown"),nd=n=>typeof n=="string",py=n=>typeof n=="object"&&n!==null,CX=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_X={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},bX=n=>_X[n],xX=n=>n.replace(CX,bX);let Q6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xX};const wX=(n={})=>{Q6={...Q6,...n}},SR=()=>Q6;let ER;const MX=n=>{ER=n},G7=()=>ER,_S=(n,e)=>{var r;if(!n)return!1;const t=((r=n.props)==null?void 0:r.children)??n.children;return e?t.length>0:!!t},bS=n=>{var t,r;if(!n)return[];const e=((t=n.props)==null?void 0:t.children)??n.children;return(r=n.props)!=null&&r.i18nIsDynamicList?my(e):e},SX=n=>Array.isArray(n)&&n.every(Wn.isValidElement),my=n=>Array.isArray(n)?n:[n],EX=(n,e)=>{const t={...e};return t.props=Object.assign(n.props,e.props),t},OR=(n,e)=>{if(!n)return"";let t="";const r=my(n),i=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,a)=>{if(nd(o))t+=`${o}`;else if(Wn.isValidElement(o)){const{props:s,type:d}=o,f=Object.keys(s).length,C=i.indexOf(d)>-1,O=s.children;if(!O&&C&&!f)t+=`<${d}/>`;else if(!O&&(!C||f)||s.i18nIsDynamicList)t+=`<${a}></${a}>`;else if(C&&f===1&&nd(O))t+=`<${d}>${O}</${d}>`;else{const E=OR(O,e);t+=`<${a}>${E}</${a}>`}}else if(o===null)g3("Trans: the passed in value is invalid - seems you passed in a null child.");else if(py(o)){const{format:s,...d}=o,f=Object.keys(d);if(f.length===1){const C=s?`${f[0]}, ${s}`:f[0];t+=`{{${C}}}`}else g3("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else g3("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),t},OX=(n,e,t,r,i,o)=>{if(e==="")return[];const a=r.transKeepBasicHtmlNodesFor||[],s=e&&new RegExp(a.map(H=>`<${H}`).join("|")).test(e);if(!n&&!s&&!o)return[e];const d={},f=H=>{my(H).forEach(N=>{nd(N)||(_S(N)?f(bS(N)):py(N)&&!Wn.isValidElement(N)&&Object.assign(d,N))})};f(n);const C=gX.parse(`<0>${e}</0>`),O={...d,...i},E=(H,Q,N)=>{var pe;const Z=bS(H),ae=D(Z,Q.children,N);return SX(Z)&&ae.length===0||(pe=H.props)!=null&&pe.i18nIsDynamicList?Z:ae},P=(H,Q,N,Z,ae)=>{H.dummy?(H.children=Q,N.push(Wn.cloneElement(H,{key:Z},ae?void 0:Q))):N.push(...Wn.Children.map([H],pe=>{const fe={...pe.props};return delete fe.i18nIsDynamicList,Wn.createElement(pe.type,{...fe,key:Z,ref:pe.ref},ae?null:Q)}))},D=(H,Q,N)=>{const Z=my(H);return my(Q).reduce((pe,fe,X)=>{var Ce,we;const oe=((we=(Ce=fe.children)==null?void 0:Ce[0])==null?void 0:we.content)&&t.services.interpolator.interpolate(fe.children[0].content,O,t.language);if(fe.type==="tag"){let Te=Z[parseInt(fe.name,10)];N.length===1&&!Te&&(Te=N[0][fe.name]),Te||(Te={});const Pe=Object.keys(fe.attrs).length!==0?EX({props:fe.attrs},Te):Te,he=Wn.isValidElement(Pe),$e=he&&_S(fe,!0)&&!fe.voidElement,ye=s&&py(Pe)&&Pe.dummy&&!he,gt=py(n)&&Object.hasOwnProperty.call(n,fe.name);if(nd(Pe)){const yt=t.services.interpolator.interpolate(Pe,O,t.language);pe.push(yt)}else if(_S(Pe)||$e){const yt=E(Pe,fe,N);P(Pe,yt,pe,X)}else if(ye){const yt=D(Z,fe.children,N);P(Pe,yt,pe,X)}else if(Number.isNaN(parseFloat(fe.name)))if(gt){const yt=E(Pe,fe,N);P(Pe,yt,pe,X,fe.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(fe.name)>-1)if(fe.voidElement)pe.push(Wn.createElement(fe.name,{key:`${fe.name}-${X}`}));else{const yt=D(Z,fe.children,N);pe.push(Wn.createElement(fe.name,{key:`${fe.name}-${X}`},yt))}else if(fe.voidElement)pe.push(`<${fe.name} />`);else{const yt=D(Z,fe.children,N);pe.push(`<${fe.name}>${yt}</${fe.name}>`)}else if(py(Pe)&&!he){const yt=fe.children[0]?oe:null;yt&&pe.push(yt)}else P(Pe,oe,pe,X,fe.children.length!==1||!oe)}else if(fe.type==="text"){const Te=r.transWrapTextNodes,Pe=o?r.unescape(t.services.interpolator.interpolate(fe.content,O,t.language)):t.services.interpolator.interpolate(fe.content,O,t.language);Te?pe.push(Wn.createElement(Te,{key:`${fe.name}-${X}`},Pe)):pe.push(Pe)}return pe},[])},$=D([{dummy:!0,children:n||[]}],C,my(n||[]));return bS($[0])};function BX({children:n,count:e,parent:t,i18nKey:r,context:i,tOptions:o={},values:a,defaults:s,components:d,ns:f,i18n:C,t:O,shouldUnescape:E,...P}){var Te,Pe,he,$e;const D=C||G7();if(!D)return u4("You will need to pass in an i18next instance by using i18nextReactModule"),n;const $=O||D.t.bind(D)||(ye=>ye),H={...SR(),...(Te=D.options)==null?void 0:Te.react};let Q=f||$.ns||((Pe=D.options)==null?void 0:Pe.defaultNS);Q=nd(Q)?[Q]:Q||["translation"];const N=OR(n,H),Z=s||N||H.transEmptyNodeValue||r,{hashTransKey:ae}=H,pe=r||(ae?ae(N||Z):N||Z);($e=(he=D.options)==null?void 0:he.interpolation)!=null&&$e.defaultVariables&&(a=a&&Object.keys(a).length>0?{...a,...D.options.interpolation.defaultVariables}:{...D.options.interpolation.defaultVariables});const fe=a||e!==void 0||!n?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},X={...o,context:i||o.context,count:e,...a,...fe,defaultValue:Z,ns:Q},oe=pe?$(pe,X):Z;d&&Object.keys(d).forEach(ye=>{const gt=d[ye];if(typeof gt.type=="function"||!gt.props||!gt.props.children||oe.indexOf(`${ye}/>`)<0&&oe.indexOf(`${ye} />`)<0)return;function yt(){return Wn.createElement(Wn.Fragment,null,gt)}d[ye]=Wn.createElement(yt)});const Ce=OX(d||n,oe,D,H,X,E),we=t??H.defaultTransParent;return we?Wn.createElement(we,P,Ce):Ce}const IX={type:"3rdParty",init(n){wX(n.options.react),MX(n)}},BR=Wn.createContext();class kX{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{var r;(r=this.usedNamespaces)[t]??(r[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function e0({children:n,count:e,parent:t,i18nKey:r,context:i,tOptions:o={},values:a,defaults:s,components:d,ns:f,i18n:C,t:O,shouldUnescape:E,...P}){var N;const{i18n:D,defaultNS:$}=Wn.useContext(BR)||{},H=C||D||G7(),Q=O||(H==null?void 0:H.t.bind(H));return BX({children:n,count:e,parent:t,i18nKey:r,context:i,tOptions:o,values:a,defaults:s,components:d,ns:f||(Q==null?void 0:Q.ns)||$||((N=H==null?void 0:H.options)==null?void 0:N.defaultNS),i18n:H,t:O,shouldUnescape:E,...P})}const TX=(n,e)=>{const t=Wn.useRef();return Wn.useEffect(()=>{t.current=e?t.current:n},[n,e]),t.current},IR=(n,e,t,r)=>n.getFixedT(e,t,r),KX=(n,e,t,r)=>Wn.useCallback(IR(n,e,t,r),[n,e,t,r]),PX=(n,e={})=>{var ae,pe,fe,X;const{i18n:t}=e,{i18n:r,defaultNS:i}=Wn.useContext(BR)||{},o=t||r||G7();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new kX),!o){u4("You will need to pass in an i18next instance by using initReactI18next");const oe=(we,Te)=>nd(Te)?Te:py(Te)&&nd(Te.defaultValue)?Te.defaultValue:Array.isArray(we)?we[we.length-1]:we,Ce=[oe,{},!1];return Ce.t=oe,Ce.i18n={},Ce.ready=!1,Ce}(ae=o.options.react)!=null&&ae.wait&&u4("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...SR(),...o.options.react,...e},{useSuspense:s,keyPrefix:d}=a;let f=n||i||((pe=o.options)==null?void 0:pe.defaultNS);f=nd(f)?[f]:f||["translation"],(X=(fe=o.reportNamespaces).addUsedNamespaces)==null||X.call(fe,f);const C=(o.isInitialized||o.initializedStoreOnce)&&f.every(oe=>yX(oe,o,a)),O=KX(o,e.lng||null,a.nsMode==="fallback"?f:f[0],d),E=()=>O,P=()=>IR(o,e.lng||null,a.nsMode==="fallback"?f:f[0],d),[D,$]=Wn.useState(E);let H=f.join();e.lng&&(H=`${e.lng}${H}`);const Q=TX(H),N=Wn.useRef(!0);Wn.useEffect(()=>{const{bindI18n:oe,bindI18nStore:Ce}=a;N.current=!0,!C&&!s&&(e.lng?mT(o,e.lng,f,()=>{N.current&&$(P)}):pT(o,f,()=>{N.current&&$(P)})),C&&Q&&Q!==H&&N.current&&$(P);const we=()=>{N.current&&$(P)};return oe&&(o==null||o.on(oe,we)),Ce&&(o==null||o.store.on(Ce,we)),()=>{N.current=!1,o&&(oe==null||oe.split(" ").forEach(Te=>o.off(Te,we))),Ce&&o&&Ce.split(" ").forEach(Te=>o.store.off(Te,we))}},[o,H]),Wn.useEffect(()=>{N.current&&C&&$(E)},[o,d,C]);const Z=[D,o,C];if(Z.t=D,Z.i18n=o,Z.ready=C,C||!C&&!s)return Z;throw new Promise(oe=>{e.lng?mT(o,e.lng,f,()=>oe()):pT(o,f,()=>oe())})},No=(n,e={})=>function(r){function i({forwardedRef:a,...s}){const[d,f,C]=PX(n,{...s,keyPrefix:e.keyPrefix}),O={...s,t:d,i18n:f,tReady:C};return e.withRef&&a?O.ref=a:!e.withRef&&a&&(O.forwardedRef=a),Wn.createElement(r,O)}i.displayName=`withI18nextTranslation(${vX(r)})`,i.WrappedComponent=r;const o=(a,s)=>Wn.createElement(i,Object.assign({},a,{forwardedRef:s}));return e.withRef?Wn.forwardRef(o):i};function il(){var n="/home/runner/work/maputnik/maputnik/src/i18n.ts",e="f5cf59e09a96a81d1dffafadc6c7a66fe8135d2a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/i18n.ts",statementMap:{0:{start:{line:5,column:34},end:{line:10,column:1}},1:{start:{line:11,column:0},end:{line:37,column:3}},2:{start:{line:13,column:4},end:{line:15,column:5}},3:{start:{line:14,column:6},end:{line:14,column:16}},4:{start:{line:16,column:4},end:{line:16,column:353}},5:{start:{line:16,column:119},end:{line:16,column:158}},6:{start:{line:16,column:198},end:{line:16,column:237}},7:{start:{line:16,column:277},end:{line:16,column:316}},8:{start:{line:32,column:4},end:{line:34,column:5}},9:{start:{line:33,column:6},end:{line:33,column:13}},10:{start:{line:35,column:4},end:{line:35,column:77}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:21},end:{line:12,column:22}},loc:{start:{line:12,column:35},end:{line:17,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:16,column:113},end:{line:16,column:114}},loc:{start:{line:16,column:119},end:{line:16,column:158}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:16,column:192},end:{line:16,column:193}},loc:{start:{line:16,column:198},end:{line:16,column:237}},line:16},3:{name:"(anonymous_3)",decl:{start:{line:16,column:271},end:{line:16,column:272}},loc:{start:{line:16,column:277},end:{line:16,column:316}},line:16},4:{name:"(anonymous_4)",decl:{start:{line:31,column:21},end:{line:31,column:22}},loc:{start:{line:31,column:41},end:{line:36,column:3}},line:31}},branchMap:{0:{loc:{start:{line:13,column:4},end:{line:15,column:5}},type:"if",locations:[{start:{line:13,column:4},end:{line:15,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:13},1:{loc:{start:{line:32,column:4},end:{line:34,column:5}},type:"if",locations:[{start:{line:32,column:4},end:{line:34,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:32}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/i18n.ts"],names:[],mappings:"kFAAA,MAAA,CAAO,IAAU,CAAA,IAAA,CAAA,CAAA,OAAA,CAAA,CAAA;AACjB,MAAA,CAAO,QAAc,CAAA,IAAA,CAAA,CAAA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,CAAA;AACrB,MAAA,CAAO,kBAAwB,CAAA,IAAA,CAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,CAAA,OAAA,CAAA,CAAA;AAC/B,MAAA,CAAA,CAAA,CAAS,gBAAwB,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAE1B,MAAA,CAAA,KAAA,CAAM,kBAAqB,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAChC,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACR,CAAA,CAAA;AAEA,IACG,CAAA,GAAA,CAAI,QAAQ,CACZ,CAAA,GAAA,CAAA;AAAA,CACC,CAAA,kBAAA,CAAmB,CAAC,IAAA,CAAA,CAAc,EAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAC/C,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAI,SAAS,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA;AAEjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,CAAC,CAAA,CAAA;AAAA,CACV,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,qVAA8B,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA;AACH,CACC,CAAA,GAAA,CAAI,gBAAgB,CAAA,CACpB,IAAK,CAAA,CAAA;AAAA,CACJ,CAAA,aAAA,CAAA,CAAe,MAAO,CAAA,IAAA,CAAK,kBAAkB,CAAA,CAAA;AAAA,CAAA,CAC7C,YAAc,CAAA,CAAA,KAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,IAAA,CAAA,EAAA,CAAA,IAAA,CAAA,QAAA,CAAA,OAAA;AAAA,CAAA,CACd,WAAa,CAAA,CAAA,KAAA,CAAA;AAAA,CAAA,CACb,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACb,WAAa,CAAA,CAAA,KAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,GAAA,CAAA,EAAA;AAAA,CACf,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,WAAa,CAAA,CAAA,IAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,IAAA;AAAA,CAAA,CACb,WAAa,CAAA,CAAA,KAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,QAAA,CAAA,EAAA,CAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,GAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,CAAA,GAAA,CAAA,iBAAA;AAAA,CAAA,CACb,iBAAmB,CAAA,CAAA,CAAC,IAAM,CAAA,CAAA,GAAA,CAAA,CAAK,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACrC,CAAI,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA;AAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAA;AAAA,CAAQ,CAAA,CAAA,CAAA,CAAA;AAChC,CAAQ,CAAA,CAAA,CAAA,OAAA,CAAA,IAAA,CAAK,4BAA4B,GAAG,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAS,KAAK,IAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAC,CAAG,CAAA,CAAA,CAAA,CAAA;AAAA,CACzE,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;AAEH,MAAe,CAAA,OAAA,CAAA,IAAA,CAAA;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f5cf59e09a96a81d1dffafadc6c7a66fe8135d2a"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return il=function(){return a},a}il();const kR=(il().s[0]++,{en:"English",ja:"日本語",he:"עברית",zh:"简体中文"});il().s[1]++;vA.use(xR).use(AX((n,e)=>(il().f[0]++,il().s[2]++,n==="en"?(il().b[0][0]++,il().s[3]++,{}):(il().b[0][1]++,il().s[4]++,EZ(Object.assign({"./locales/he/translation.json":()=>(il().f[1]++,il().s[5]++,vS(()=>import("./translation-CS21YPxX.js"),__vite__mapDeps([]))),"./locales/ja/translation.json":()=>(il().f[2]++,il().s[6]++,vS(()=>import("./translation-BuANh82s.js"),__vite__mapDeps([]))),"./locales/zh/translation.json":()=>(il().f[3]++,il().s[7]++,vS(()=>import("./translation-DoS3tcPI.js"),__vite__mapDeps([])))}),`./locales/${n}/${e}.json`))))).use(IX).init({supportedLngs:Object.keys(kR),keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},saveMissing:!0,fallbackLng:!1,missingKeyHandler:(n,e,t)=>{if(il().f[4]++,il().s[8]++,n[0]==="en"){il().b[1][0]++,il().s[9]++;return}else il().b[1][1]++;il().s[10]++,console.warn(`Missing translation for "${t}" in "${n.join(", ")}"`)}});var Y6={exports:{}};(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=["constructor","render","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount"],r=[];function i(a){if(a===void 0){console.error("Autobind error: No context provided.");return}var s=Object.getPrototypeOf(a);arguments.length>1?r=Array.prototype.slice.call(arguments,1):r=Object.getOwnPropertyNames(s),r.forEach(function(d){var f=Object.getOwnPropertyDescriptor(s,d);if(f===void 0){console.warn('Autobind: "'+d+'" method not found in class.');return}t.indexOf(d)!==-1||typeof f.value!="function"||Object.defineProperty(s,d,o(s,d,f))})}function o(a,s,d){var f=d.value;return{configurable:!0,get:function(){if(this===a||this.hasOwnProperty(s))return f;var O=f.bind(this);return Object.defineProperty(this,s,{value:O,configurable:!0,writable:!0}),O}}}n.exports=e.default})(Y6,Y6.exports);var DX=Y6.exports,LX=DX;const FX=Ba(LX);var A4={exports:{}};A4.exports;(function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",d="[object Date]",f="[object Error]",C="[object Function]",O="[object GeneratorFunction]",E="[object Map]",P="[object Number]",D="[object Object]",$="[object Promise]",H="[object RegExp]",Q="[object Set]",N="[object String]",Z="[object Symbol]",ae="[object WeakMap]",pe="[object ArrayBuffer]",fe="[object DataView]",X="[object Float32Array]",oe="[object Float64Array]",Ce="[object Int8Array]",we="[object Int16Array]",Te="[object Int32Array]",Pe="[object Uint8Array]",he="[object Uint8ClampedArray]",$e="[object Uint16Array]",ye="[object Uint32Array]",gt=/[\\^$.*+?()[\]{}|]/g,yt=/\w*$/,st=/^\[object .+?Constructor\]$/,ft=/^(?:0|[1-9]\d*)$/,Re={};Re[o]=Re[a]=Re[pe]=Re[fe]=Re[s]=Re[d]=Re[X]=Re[oe]=Re[Ce]=Re[we]=Re[Te]=Re[E]=Re[P]=Re[D]=Re[H]=Re[Q]=Re[N]=Re[Z]=Re[Pe]=Re[he]=Re[$e]=Re[ye]=!0,Re[f]=Re[C]=Re[ae]=!1;var Ve=typeof window=="object"&&window&&window.Object===Object&&window,Xe=typeof self=="object"&&self&&self.Object===Object&&self,Jt=Ve||Xe||Function("return this")(),Ht=e&&!e.nodeType&&e,bt=Ht&&!0&&n&&!n.nodeType&&n,Qt=bt&&bt.exports===Ht;function Yt(z,le){return z.set(le[0],le[1]),z}function ke(z,le){return z.add(le),z}function ge(z,le){for(var Ue=-1,vt=z?z.length:0;++Ue<vt&&le(z[Ue],Ue,z)!==!1;);return z}function Se(z,le){for(var Ue=-1,vt=le.length,$n=z.length;++Ue<vt;)z[$n+Ue]=le[Ue];return z}function ze(z,le,Ue,vt){var $n=-1,vn=z?z.length:0;for(vt&&vn&&(Ue=z[++$n]);++$n<vn;)Ue=le(Ue,z[$n],$n,z);return Ue}function it(z,le){for(var Ue=-1,vt=Array(z);++Ue<z;)vt[Ue]=le(Ue);return vt}function ot(z,le){return z==null?void 0:z[le]}function St(z){var le=!1;if(z!=null&&typeof z.toString!="function")try{le=!!(z+"")}catch{}return le}function Rt(z){var le=-1,Ue=Array(z.size);return z.forEach(function(vt,$n){Ue[++le]=[$n,vt]}),Ue}function zt(z,le){return function(Ue){return z(le(Ue))}}function mt(z){var le=-1,Ue=Array(z.size);return z.forEach(function(vt){Ue[++le]=vt}),Ue}var or=Array.prototype,gn=Function.prototype,yn=Object.prototype,tr=Jt["__core-js_shared__"],dr=function(){var z=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return z?"Symbol(src)_1."+z:""}(),Sr=gn.toString,Nr=yn.hasOwnProperty,yr=yn.toString,_i=RegExp("^"+Sr.call(Nr).replace(gt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=Qt?Jt.Buffer:void 0,ee=Jt.Symbol,V=Jt.Uint8Array,Ke=zt(Object.getPrototypeOf,Object),At=Object.create,Bt=yn.propertyIsEnumerable,kt=or.splice,Lt=Object.getOwnPropertySymbols,fn=Ee?Ee.isBuffer:void 0,Pn=zt(Object.keys,Object),On=ta(Jt,"DataView"),g=ta(Jt,"Map"),Kt=ta(Jt,"Promise"),Pr=ta(Jt,"Set"),rr=ta(Jt,"WeakMap"),Le=ta(Object,"create"),ce=Wo(On),xe=Wo(g),Ie=Wo(Kt),je=Wo(Pr),rt=Wo(rr),lt=ee?ee.prototype:void 0,pt=lt?lt.valueOf:void 0;function et(z){var le=-1,Ue=z?z.length:0;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function Mt(){this.__data__=Le?Le(null):{}}function tn(z){return this.has(z)&&delete this.__data__[z]}function qt(z){var le=this.__data__;if(Le){var Ue=le[z];return Ue===r?void 0:Ue}return Nr.call(le,z)?le[z]:void 0}function en(z){var le=this.__data__;return Le?le[z]!==void 0:Nr.call(le,z)}function Fn(z,le){var Ue=this.__data__;return Ue[z]=Le&&le===void 0?r:le,this}et.prototype.clear=Mt,et.prototype.delete=tn,et.prototype.get=qt,et.prototype.has=en,et.prototype.set=Fn;function Bn(z){var le=-1,Ue=z?z.length:0;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function Hn(){this.__data__=[]}function Or(z){var le=this.__data__,Ue=ro(le,z);if(Ue<0)return!1;var vt=le.length-1;return Ue==vt?le.pop():kt.call(le,Ue,1),!0}function cr(z){var le=this.__data__,Ue=ro(le,z);return Ue<0?void 0:le[Ue][1]}function Qr(z){return ro(this.__data__,z)>-1}function Br(z,le){var Ue=this.__data__,vt=ro(Ue,z);return vt<0?Ue.push([z,le]):Ue[vt][1]=le,this}Bn.prototype.clear=Hn,Bn.prototype.delete=Or,Bn.prototype.get=cr,Bn.prototype.has=Qr,Bn.prototype.set=Br;function Fr(z){var le=-1,Ue=z?z.length:0;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function ar(){this.__data__={hash:new et,map:new(g||Bn),string:new et}}function di(z){return as(this,z).delete(z)}function Ui(z){return as(this,z).get(z)}function to(z){return as(this,z).has(z)}function ho(z,le){return as(this,z).set(z,le),this}Fr.prototype.clear=ar,Fr.prototype.delete=di,Fr.prototype.get=Ui,Fr.prototype.has=to,Fr.prototype.set=ho;function si(z){this.__data__=new Bn(z)}function fo(){this.__data__=new Bn}function Na(z){return this.__data__.delete(z)}function Ia(z){return this.__data__.get(z)}function Ei(z){return this.__data__.has(z)}function os(z,le){var Ue=this.__data__;if(Ue instanceof Bn){var vt=Ue.__data__;if(!g||vt.length<t-1)return vt.push([z,le]),this;Ue=this.__data__=new Fr(vt)}return Ue.set(z,le),this}si.prototype.clear=fo,si.prototype.delete=Na,si.prototype.get=Ia,si.prototype.has=Ei,si.prototype.set=os;function yi(z,le){var Ue=ul(z)||ss(z)?it(z.length,String):[],vt=Ue.length,$n=!!vt;for(var vn in z)(le||Nr.call(z,vn))&&!($n&&(vn=="length"||Wu(vn,vt)))&&Ue.push(vn);return Ue}function Gn(z,le,Ue){var vt=z[le];(!(Nr.call(z,le)&&nu(vt,Ue))||Ue===void 0&&!(le in z))&&(z[le]=Ue)}function ro(z,le){for(var Ue=z.length;Ue--;)if(nu(z[Ue][0],le))return Ue;return-1}function Co(z,le){return z&&Ga(le,xA(le),z)}function Ri(z,le,Ue,vt,$n,vn,Kn){var Ur;if(vt&&(Ur=vn?vt(z,$n,vn,Kn):vt(z)),Ur!==void 0)return Ur;if(!ua(z))return z;var vr=ul(z);if(vr){if(Ur=wu(z),!le)return vi(z,Ur)}else{var kr=bs(z),Ti=kr==C||kr==O;if(Al(z))return wn(z,le);if(kr==D||kr==o||Ti&&!vn){if(St(z))return vn?z:{};if(Ur=ma(Ti?{}:z),!le)return ea(z,Co(Ur,z))}else{if(!Re[kr])return vn?z:{};Ur=_A(z,kr,Ri,le)}}Kn||(Kn=new si);var po=Kn.get(z);if(po)return po;if(Kn.set(z,Ur),!vr)var Oi=Ue?xu(z):xA(z);return ge(Oi||z,function(Zr,Vi){Oi&&(Vi=Zr,Zr=z[Vi]),Gn(Ur,Vi,Ri(Zr,le,Ue,vt,Vi,z,Kn))}),Ur}function _e(z){return ua(z)?At(z):{}}function Je(z,le,Ue){var vt=le(z);return ul(z)?vt:Se(vt,Ue(z))}function Zt(z){return yr.call(z)}function ln(z){if(!ua(z)||Mu(z))return!1;var le=Ml(z)||St(z)?_i:st;return le.test(Wo(z))}function Ft(z){if(!Gu(z))return Pn(z);var le=[];for(var Ue in Object(z))Nr.call(z,Ue)&&Ue!="constructor"&&le.push(Ue);return le}function wn(z,le){if(le)return z.slice();var Ue=new z.constructor(z.length);return z.copy(Ue),Ue}function hr(z){var le=new z.constructor(z.byteLength);return new V(le).set(new V(z)),le}function ii(z,le){var Ue=le?hr(z.buffer):z.buffer;return new z.constructor(Ue,z.byteOffset,z.byteLength)}function li(z,le,Ue){var vt=le?Ue(Rt(z),!0):Rt(z);return ze(vt,Yt,new z.constructor)}function Jo(z){var le=new z.constructor(z.source,yt.exec(z));return le.lastIndex=z.lastIndex,le}function Ka(z,le,Ue){var vt=le?Ue(mt(z),!0):mt(z);return ze(vt,ke,new z.constructor)}function Dr(z){return pt?Object(pt.call(z)):{}}function Wa(z,le){var Ue=le?hr(z.buffer):z.buffer;return new z.constructor(Ue,z.byteOffset,z.length)}function vi(z,le){var Ue=-1,vt=z.length;for(le||(le=Array(vt));++Ue<vt;)le[Ue]=z[Ue];return le}function Ga(z,le,Ue,vt){Ue||(Ue={});for(var $n=-1,vn=le.length;++$n<vn;){var Kn=le[$n],Ur=vt?vt(Ue[Kn],z[Kn],Kn,Ue,z):void 0;Gn(Ue,Kn,Ur===void 0?z[Kn]:Ur)}return Ue}function ea(z,le){return Ga(z,na(z),le)}function xu(z){return Je(z,xA,na)}function as(z,le){var Ue=z.__data__;return bA(le)?Ue[typeof le=="string"?"string":"hash"]:Ue.map}function ta(z,le){var Ue=ot(z,le);return ln(Ue)?Ue:void 0}var na=Lt?zt(Lt,Object):vo,bs=Zt;(On&&bs(new On(new ArrayBuffer(1)))!=fe||g&&bs(new g)!=E||Kt&&bs(Kt.resolve())!=$||Pr&&bs(new Pr)!=Q||rr&&bs(new rr)!=ae)&&(bs=function(z){var le=yr.call(z),Ue=le==D?z.constructor:void 0,vt=Ue?Wo(Ue):void 0;if(vt)switch(vt){case ce:return fe;case xe:return E;case Ie:return $;case je:return Q;case rt:return ae}return le});function wu(z){var le=z.length,Ue=z.constructor(le);return le&&typeof z[0]=="string"&&Nr.call(z,"index")&&(Ue.index=z.index,Ue.input=z.input),Ue}function ma(z){return typeof z.constructor=="function"&&!Gu(z)?_e(Ke(z)):{}}function _A(z,le,Ue,vt){var $n=z.constructor;switch(le){case pe:return hr(z);case s:case d:return new $n(+z);case fe:return ii(z,vt);case X:case oe:case Ce:case we:case Te:case Pe:case he:case $e:case ye:return Wa(z,vt);case E:return li(z,vt,Ue);case P:case N:return new $n(z);case H:return Jo(z);case Q:return Ka(z,vt,Ue);case Z:return Dr(z)}}function Wu(z,le){return le=le??i,!!le&&(typeof z=="number"||ft.test(z))&&z>-1&&z%1==0&&z<le}function bA(z){var le=typeof z;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?z!=="__proto__":z===null}function Mu(z){return!!dr&&dr in z}function Gu(z){var le=z&&z.constructor,Ue=typeof le=="function"&&le.prototype||yn;return z===Ue}function Wo(z){if(z!=null){try{return Sr.call(z)}catch{}try{return z+""}catch{}}return""}function xs(z){return Ri(z,!0,!0)}function nu(z,le){return z===le||z!==z&&le!==le}function ss(z){return Su(z)&&Nr.call(z,"callee")&&(!Bt.call(z,"callee")||yr.call(z)==o)}var ul=Array.isArray;function Go(z){return z!=null&&ru(z.length)&&!Ml(z)}function Su(z){return cl(z)&&Go(z)}var Al=fn||io;function Ml(z){var le=ua(z)?yr.call(z):"";return le==C||le==O}function ru(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=i}function ua(z){var le=typeof z;return!!z&&(le=="object"||le=="function")}function cl(z){return!!z&&typeof z=="object"}function xA(z){return Go(z)?yi(z):Ft(z)}function vo(){return[]}function io(){return!1}n.exports=xs})(A4,A4.exports);var UX=A4.exports;const gT=Ba(UX);var yT=NaN,RX="[object Symbol]",zX=/^\s+|\s+$/g,jX=/^[-+]0x[0-9a-f]+$/i,NX=/^0b[01]+$/i,WX=/^0o[0-7]+$/i,GX=parseInt,$X=Object.prototype,QX=$X.toString;function YX(n,e,t){return n===n&&(t!==void 0&&(n=n<=t?n:t),e!==void 0&&(n=n>=e?n:e)),n}function vT(n){var e=typeof n;return!!n&&(e=="object"||e=="function")}function qX(n){return!!n&&typeof n=="object"}function VX(n){return typeof n=="symbol"||qX(n)&&QX.call(n)==RX}function xS(n){if(typeof n=="number")return n;if(VX(n))return yT;if(vT(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=vT(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=n.replace(zX,"");var t=NX.test(n);return t||WX.test(n)?GX(n.slice(2),t?2:8):jX.test(n)?yT:+n}function HX(n,e,t){return t===void 0&&(t=e,e=void 0),t!==void 0&&(t=xS(t),t=t===t?t:0),e!==void 0&&(e=xS(e),e=e===e?e:0),YX(xS(n),e,t)}var ZX=HX;const CT=Ba(ZX);var TR={},X5={};X5.byteLength=eJ;X5.toByteArray=nJ;X5.fromByteArray=oJ;var Tf=[],kd=[],XX=typeof Uint8Array<"u"?Uint8Array:Array,wS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Kg=0,JX=wS.length;Kg<JX;++Kg)Tf[Kg]=wS[Kg],kd[wS.charCodeAt(Kg)]=Kg;kd[45]=62;kd[95]=63;function KR(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var r=t===e?0:4-t%4;return[t,r]}function eJ(n){var e=KR(n),t=e[0],r=e[1];return(t+r)*3/4-r}function tJ(n,e,t){return(e+t)*3/4-t}function nJ(n){var e,t=KR(n),r=t[0],i=t[1],o=new XX(tJ(n,r,i)),a=0,s=i>0?r-4:r,d;for(d=0;d<s;d+=4)e=kd[n.charCodeAt(d)]<<18|kd[n.charCodeAt(d+1)]<<12|kd[n.charCodeAt(d+2)]<<6|kd[n.charCodeAt(d+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return i===2&&(e=kd[n.charCodeAt(d)]<<2|kd[n.charCodeAt(d+1)]>>4,o[a++]=e&255),i===1&&(e=kd[n.charCodeAt(d)]<<10|kd[n.charCodeAt(d+1)]<<4|kd[n.charCodeAt(d+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function rJ(n){return Tf[n>>18&63]+Tf[n>>12&63]+Tf[n>>6&63]+Tf[n&63]}function iJ(n,e,t){for(var r,i=[],o=e;o<t;o+=3)r=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),i.push(rJ(r));return i.join("")}function oJ(n){for(var e,t=n.length,r=t%3,i=[],o=16383,a=0,s=t-r;a<s;a+=o)i.push(iJ(n,a,a+o>s?s:a+o));return r===1?(e=n[t-1],i.push(Tf[e>>2]+Tf[e<<4&63]+"==")):r===2&&(e=(n[t-2]<<8)+n[t-1],i.push(Tf[e>>10]+Tf[e>>4&63]+Tf[e<<2&63]+"=")),i.join("")}var J5={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */J5.read=function(n,e,t,r,i){var o,a,s=i*8-r-1,d=(1<<s)-1,f=d>>1,C=-7,O=t?i-1:0,E=t?-1:1,P=n[e+O];for(O+=E,o=P&(1<<-C)-1,P>>=-C,C+=s;C>0;o=o*256+n[e+O],O+=E,C-=8);for(a=o&(1<<-C)-1,o>>=-C,C+=r;C>0;a=a*256+n[e+O],O+=E,C-=8);if(o===0)o=1-f;else{if(o===d)return a?NaN:(P?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-f}return(P?-1:1)*a*Math.pow(2,o-r)};J5.write=function(n,e,t,r,i,o){var a,s,d,f=o*8-i-1,C=(1<<f)-1,O=C>>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=r?0:o-1,D=r?1:-1,$=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=C):(a=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+O>=1?e+=E/d:e+=E*Math.pow(2,1-O),e*d>=2&&(a++,d/=2),a+O>=C?(s=0,a=C):a+O>=1?(s=(e*d-1)*Math.pow(2,i),a=a+O):(s=e*Math.pow(2,O-1)*Math.pow(2,i),a=0));i>=8;n[t+P]=s&255,P+=D,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;n[t+P]=a&255,P+=D,a/=256,f-=8);n[t+P-D]|=$*128};/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */(function(n){const e=X5,t=J5,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=s,n.SlowBuffer=N,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const Ee=new Uint8Array(1),ee={foo:function(){return 42}};return Object.setPrototypeOf(ee,Uint8Array.prototype),Object.setPrototypeOf(Ee,ee),Ee.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(Ee){if(Ee>i)throw new RangeError('The value "'+Ee+'" is invalid for option "size"');const ee=new Uint8Array(Ee);return Object.setPrototypeOf(ee,s.prototype),ee}function s(Ee,ee,V){if(typeof Ee=="number"){if(typeof ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return O(Ee)}return d(Ee,ee,V)}s.poolSize=8192;function d(Ee,ee,V){if(typeof Ee=="string")return E(Ee,ee);if(ArrayBuffer.isView(Ee))return D(Ee);if(Ee==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ee);if(dr(Ee,ArrayBuffer)||Ee&&dr(Ee.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(dr(Ee,SharedArrayBuffer)||Ee&&dr(Ee.buffer,SharedArrayBuffer)))return $(Ee,ee,V);if(typeof Ee=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ke=Ee.valueOf&&Ee.valueOf();if(Ke!=null&&Ke!==Ee)return s.from(Ke,ee,V);const At=H(Ee);if(At)return At;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ee[Symbol.toPrimitive]=="function")return s.from(Ee[Symbol.toPrimitive]("string"),ee,V);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ee)}s.from=function(Ee,ee,V){return d(Ee,ee,V)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function f(Ee){if(typeof Ee!="number")throw new TypeError('"size" argument must be of type number');if(Ee<0)throw new RangeError('The value "'+Ee+'" is invalid for option "size"')}function C(Ee,ee,V){return f(Ee),Ee<=0?a(Ee):ee!==void 0?typeof V=="string"?a(Ee).fill(ee,V):a(Ee).fill(ee):a(Ee)}s.alloc=function(Ee,ee,V){return C(Ee,ee,V)};function O(Ee){return f(Ee),a(Ee<0?0:Q(Ee)|0)}s.allocUnsafe=function(Ee){return O(Ee)},s.allocUnsafeSlow=function(Ee){return O(Ee)};function E(Ee,ee){if((typeof ee!="string"||ee==="")&&(ee="utf8"),!s.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);const V=Z(Ee,ee)|0;let Ke=a(V);const At=Ke.write(Ee,ee);return At!==V&&(Ke=Ke.slice(0,At)),Ke}function P(Ee){const ee=Ee.length<0?0:Q(Ee.length)|0,V=a(ee);for(let Ke=0;Ke<ee;Ke+=1)V[Ke]=Ee[Ke]&255;return V}function D(Ee){if(dr(Ee,Uint8Array)){const ee=new Uint8Array(Ee);return $(ee.buffer,ee.byteOffset,ee.byteLength)}return P(Ee)}function $(Ee,ee,V){if(ee<0||Ee.byteLength<ee)throw new RangeError('"offset" is outside of buffer bounds');if(Ee.byteLength<ee+(V||0))throw new RangeError('"length" is outside of buffer bounds');let Ke;return ee===void 0&&V===void 0?Ke=new Uint8Array(Ee):V===void 0?Ke=new Uint8Array(Ee,ee):Ke=new Uint8Array(Ee,ee,V),Object.setPrototypeOf(Ke,s.prototype),Ke}function H(Ee){if(s.isBuffer(Ee)){const ee=Q(Ee.length)|0,V=a(ee);return V.length===0||Ee.copy(V,0,0,ee),V}if(Ee.length!==void 0)return typeof Ee.length!="number"||Sr(Ee.length)?a(0):P(Ee);if(Ee.type==="Buffer"&&Array.isArray(Ee.data))return P(Ee.data)}function Q(Ee){if(Ee>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return Ee|0}function N(Ee){return+Ee!=Ee&&(Ee=0),s.alloc(+Ee)}s.isBuffer=function(ee){return ee!=null&&ee._isBuffer===!0&&ee!==s.prototype},s.compare=function(ee,V){if(dr(ee,Uint8Array)&&(ee=s.from(ee,ee.offset,ee.byteLength)),dr(V,Uint8Array)&&(V=s.from(V,V.offset,V.byteLength)),!s.isBuffer(ee)||!s.isBuffer(V))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ee===V)return 0;let Ke=ee.length,At=V.length;for(let Bt=0,kt=Math.min(Ke,At);Bt<kt;++Bt)if(ee[Bt]!==V[Bt]){Ke=ee[Bt],At=V[Bt];break}return Ke<At?-1:At<Ke?1:0},s.isEncoding=function(ee){switch(String(ee).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(ee,V){if(!Array.isArray(ee))throw new TypeError('"list" argument must be an Array of Buffers');if(ee.length===0)return s.alloc(0);let Ke;if(V===void 0)for(V=0,Ke=0;Ke<ee.length;++Ke)V+=ee[Ke].length;const At=s.allocUnsafe(V);let Bt=0;for(Ke=0;Ke<ee.length;++Ke){let kt=ee[Ke];if(dr(kt,Uint8Array))Bt+kt.length>At.length?(s.isBuffer(kt)||(kt=s.from(kt)),kt.copy(At,Bt)):Uint8Array.prototype.set.call(At,kt,Bt);else if(s.isBuffer(kt))kt.copy(At,Bt);else throw new TypeError('"list" argument must be an Array of Buffers');Bt+=kt.length}return At};function Z(Ee,ee){if(s.isBuffer(Ee))return Ee.length;if(ArrayBuffer.isView(Ee)||dr(Ee,ArrayBuffer))return Ee.byteLength;if(typeof Ee!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ee);const V=Ee.length,Ke=arguments.length>2&&arguments[2]===!0;if(!Ke&&V===0)return 0;let At=!1;for(;;)switch(ee){case"ascii":case"latin1":case"binary":return V;case"utf8":case"utf-8":return mt(Ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V*2;case"hex":return V>>>1;case"base64":return yn(Ee).length;default:if(At)return Ke?-1:mt(Ee).length;ee=(""+ee).toLowerCase(),At=!0}}s.byteLength=Z;function ae(Ee,ee,V){let Ke=!1;if((ee===void 0||ee<0)&&(ee=0),ee>this.length||((V===void 0||V>this.length)&&(V=this.length),V<=0)||(V>>>=0,ee>>>=0,V<=ee))return"";for(Ee||(Ee="utf8");;)switch(Ee){case"hex":return ft(this,ee,V);case"utf8":case"utf-8":return $e(this,ee,V);case"ascii":return yt(this,ee,V);case"latin1":case"binary":return st(this,ee,V);case"base64":return he(this,ee,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Re(this,ee,V);default:if(Ke)throw new TypeError("Unknown encoding: "+Ee);Ee=(Ee+"").toLowerCase(),Ke=!0}}s.prototype._isBuffer=!0;function pe(Ee,ee,V){const Ke=Ee[ee];Ee[ee]=Ee[V],Ee[V]=Ke}s.prototype.swap16=function(){const ee=this.length;if(ee%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let V=0;V<ee;V+=2)pe(this,V,V+1);return this},s.prototype.swap32=function(){const ee=this.length;if(ee%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let V=0;V<ee;V+=4)pe(this,V,V+3),pe(this,V+1,V+2);return this},s.prototype.swap64=function(){const ee=this.length;if(ee%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let V=0;V<ee;V+=8)pe(this,V,V+7),pe(this,V+1,V+6),pe(this,V+2,V+5),pe(this,V+3,V+4);return this},s.prototype.toString=function(){const ee=this.length;return ee===0?"":arguments.length===0?$e(this,0,ee):ae.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(ee){if(!s.isBuffer(ee))throw new TypeError("Argument must be a Buffer");return this===ee?!0:s.compare(this,ee)===0},s.prototype.inspect=function(){let ee="";const V=n.INSPECT_MAX_BYTES;return ee=this.toString("hex",0,V).replace(/(.{2})/g,"$1 ").trim(),this.length>V&&(ee+=" ... "),"<Buffer "+ee+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(ee,V,Ke,At,Bt){if(dr(ee,Uint8Array)&&(ee=s.from(ee,ee.offset,ee.byteLength)),!s.isBuffer(ee))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ee);if(V===void 0&&(V=0),Ke===void 0&&(Ke=ee?ee.length:0),At===void 0&&(At=0),Bt===void 0&&(Bt=this.length),V<0||Ke>ee.length||At<0||Bt>this.length)throw new RangeError("out of range index");if(At>=Bt&&V>=Ke)return 0;if(At>=Bt)return-1;if(V>=Ke)return 1;if(V>>>=0,Ke>>>=0,At>>>=0,Bt>>>=0,this===ee)return 0;let kt=Bt-At,Lt=Ke-V;const fn=Math.min(kt,Lt),Pn=this.slice(At,Bt),On=ee.slice(V,Ke);for(let g=0;g<fn;++g)if(Pn[g]!==On[g]){kt=Pn[g],Lt=On[g];break}return kt<Lt?-1:Lt<kt?1:0};function fe(Ee,ee,V,Ke,At){if(Ee.length===0)return-1;if(typeof V=="string"?(Ke=V,V=0):V>2147483647?V=2147483647:V<-2147483648&&(V=-2147483648),V=+V,Sr(V)&&(V=At?0:Ee.length-1),V<0&&(V=Ee.length+V),V>=Ee.length){if(At)return-1;V=Ee.length-1}else if(V<0)if(At)V=0;else return-1;if(typeof ee=="string"&&(ee=s.from(ee,Ke)),s.isBuffer(ee))return ee.length===0?-1:X(Ee,ee,V,Ke,At);if(typeof ee=="number")return ee=ee&255,typeof Uint8Array.prototype.indexOf=="function"?At?Uint8Array.prototype.indexOf.call(Ee,ee,V):Uint8Array.prototype.lastIndexOf.call(Ee,ee,V):X(Ee,[ee],V,Ke,At);throw new TypeError("val must be string, number or Buffer")}function X(Ee,ee,V,Ke,At){let Bt=1,kt=Ee.length,Lt=ee.length;if(Ke!==void 0&&(Ke=String(Ke).toLowerCase(),Ke==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(Ee.length<2||ee.length<2)return-1;Bt=2,kt/=2,Lt/=2,V/=2}function fn(On,g){return Bt===1?On[g]:On.readUInt16BE(g*Bt)}let Pn;if(At){let On=-1;for(Pn=V;Pn<kt;Pn++)if(fn(Ee,Pn)===fn(ee,On===-1?0:Pn-On)){if(On===-1&&(On=Pn),Pn-On+1===Lt)return On*Bt}else On!==-1&&(Pn-=Pn-On),On=-1}else for(V+Lt>kt&&(V=kt-Lt),Pn=V;Pn>=0;Pn--){let On=!0;for(let g=0;g<Lt;g++)if(fn(Ee,Pn+g)!==fn(ee,g)){On=!1;break}if(On)return Pn}return-1}s.prototype.includes=function(ee,V,Ke){return this.indexOf(ee,V,Ke)!==-1},s.prototype.indexOf=function(ee,V,Ke){return fe(this,ee,V,Ke,!0)},s.prototype.lastIndexOf=function(ee,V,Ke){return fe(this,ee,V,Ke,!1)};function oe(Ee,ee,V,Ke){V=Number(V)||0;const At=Ee.length-V;Ke?(Ke=Number(Ke),Ke>At&&(Ke=At)):Ke=At;const Bt=ee.length;Ke>Bt/2&&(Ke=Bt/2);let kt;for(kt=0;kt<Ke;++kt){const Lt=parseInt(ee.substr(kt*2,2),16);if(Sr(Lt))return kt;Ee[V+kt]=Lt}return kt}function Ce(Ee,ee,V,Ke){return tr(mt(ee,Ee.length-V),Ee,V,Ke)}function we(Ee,ee,V,Ke){return tr(or(ee),Ee,V,Ke)}function Te(Ee,ee,V,Ke){return tr(yn(ee),Ee,V,Ke)}function Pe(Ee,ee,V,Ke){return tr(gn(ee,Ee.length-V),Ee,V,Ke)}s.prototype.write=function(ee,V,Ke,At){if(V===void 0)At="utf8",Ke=this.length,V=0;else if(Ke===void 0&&typeof V=="string")At=V,Ke=this.length,V=0;else if(isFinite(V))V=V>>>0,isFinite(Ke)?(Ke=Ke>>>0,At===void 0&&(At="utf8")):(At=Ke,Ke=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Bt=this.length-V;if((Ke===void 0||Ke>Bt)&&(Ke=Bt),ee.length>0&&(Ke<0||V<0)||V>this.length)throw new RangeError("Attempt to write outside buffer bounds");At||(At="utf8");let kt=!1;for(;;)switch(At){case"hex":return oe(this,ee,V,Ke);case"utf8":case"utf-8":return Ce(this,ee,V,Ke);case"ascii":case"latin1":case"binary":return we(this,ee,V,Ke);case"base64":return Te(this,ee,V,Ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,ee,V,Ke);default:if(kt)throw new TypeError("Unknown encoding: "+At);At=(""+At).toLowerCase(),kt=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function he(Ee,ee,V){return ee===0&&V===Ee.length?e.fromByteArray(Ee):e.fromByteArray(Ee.slice(ee,V))}function $e(Ee,ee,V){V=Math.min(Ee.length,V);const Ke=[];let At=ee;for(;At<V;){const Bt=Ee[At];let kt=null,Lt=Bt>239?4:Bt>223?3:Bt>191?2:1;if(At+Lt<=V){let fn,Pn,On,g;switch(Lt){case 1:Bt<128&&(kt=Bt);break;case 2:fn=Ee[At+1],(fn&192)===128&&(g=(Bt&31)<<6|fn&63,g>127&&(kt=g));break;case 3:fn=Ee[At+1],Pn=Ee[At+2],(fn&192)===128&&(Pn&192)===128&&(g=(Bt&15)<<12|(fn&63)<<6|Pn&63,g>2047&&(g<55296||g>57343)&&(kt=g));break;case 4:fn=Ee[At+1],Pn=Ee[At+2],On=Ee[At+3],(fn&192)===128&&(Pn&192)===128&&(On&192)===128&&(g=(Bt&15)<<18|(fn&63)<<12|(Pn&63)<<6|On&63,g>65535&&g<1114112&&(kt=g))}}kt===null?(kt=65533,Lt=1):kt>65535&&(kt-=65536,Ke.push(kt>>>10&1023|55296),kt=56320|kt&1023),Ke.push(kt),At+=Lt}return gt(Ke)}const ye=4096;function gt(Ee){const ee=Ee.length;if(ee<=ye)return String.fromCharCode.apply(String,Ee);let V="",Ke=0;for(;Ke<ee;)V+=String.fromCharCode.apply(String,Ee.slice(Ke,Ke+=ye));return V}function yt(Ee,ee,V){let Ke="";V=Math.min(Ee.length,V);for(let At=ee;At<V;++At)Ke+=String.fromCharCode(Ee[At]&127);return Ke}function st(Ee,ee,V){let Ke="";V=Math.min(Ee.length,V);for(let At=ee;At<V;++At)Ke+=String.fromCharCode(Ee[At]);return Ke}function ft(Ee,ee,V){const Ke=Ee.length;(!ee||ee<0)&&(ee=0),(!V||V<0||V>Ke)&&(V=Ke);let At="";for(let Bt=ee;Bt<V;++Bt)At+=Nr[Ee[Bt]];return At}function Re(Ee,ee,V){const Ke=Ee.slice(ee,V);let At="";for(let Bt=0;Bt<Ke.length-1;Bt+=2)At+=String.fromCharCode(Ke[Bt]+Ke[Bt+1]*256);return At}s.prototype.slice=function(ee,V){const Ke=this.length;ee=~~ee,V=V===void 0?Ke:~~V,ee<0?(ee+=Ke,ee<0&&(ee=0)):ee>Ke&&(ee=Ke),V<0?(V+=Ke,V<0&&(V=0)):V>Ke&&(V=Ke),V<ee&&(V=ee);const At=this.subarray(ee,V);return Object.setPrototypeOf(At,s.prototype),At};function Ve(Ee,ee,V){if(Ee%1!==0||Ee<0)throw new RangeError("offset is not uint");if(Ee+ee>V)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(ee,V,Ke){ee=ee>>>0,V=V>>>0,Ke||Ve(ee,V,this.length);let At=this[ee],Bt=1,kt=0;for(;++kt<V&&(Bt*=256);)At+=this[ee+kt]*Bt;return At},s.prototype.readUintBE=s.prototype.readUIntBE=function(ee,V,Ke){ee=ee>>>0,V=V>>>0,Ke||Ve(ee,V,this.length);let At=this[ee+--V],Bt=1;for(;V>0&&(Bt*=256);)At+=this[ee+--V]*Bt;return At},s.prototype.readUint8=s.prototype.readUInt8=function(ee,V){return ee=ee>>>0,V||Ve(ee,1,this.length),this[ee]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(ee,V){return ee=ee>>>0,V||Ve(ee,2,this.length),this[ee]|this[ee+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(ee,V){return ee=ee>>>0,V||Ve(ee,2,this.length),this[ee]<<8|this[ee+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(ee,V){return ee=ee>>>0,V||Ve(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+this[ee+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(ee,V){return ee=ee>>>0,V||Ve(ee,4,this.length),this[ee]*16777216+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},s.prototype.readBigUInt64LE=yr(function(ee){ee=ee>>>0,ot(ee,"offset");const V=this[ee],Ke=this[ee+7];(V===void 0||Ke===void 0)&&St(ee,this.length-8);const At=V+this[++ee]*2**8+this[++ee]*2**16+this[++ee]*2**24,Bt=this[++ee]+this[++ee]*2**8+this[++ee]*2**16+Ke*2**24;return BigInt(At)+(BigInt(Bt)<<BigInt(32))}),s.prototype.readBigUInt64BE=yr(function(ee){ee=ee>>>0,ot(ee,"offset");const V=this[ee],Ke=this[ee+7];(V===void 0||Ke===void 0)&&St(ee,this.length-8);const At=V*2**24+this[++ee]*2**16+this[++ee]*2**8+this[++ee],Bt=this[++ee]*2**24+this[++ee]*2**16+this[++ee]*2**8+Ke;return(BigInt(At)<<BigInt(32))+BigInt(Bt)}),s.prototype.readIntLE=function(ee,V,Ke){ee=ee>>>0,V=V>>>0,Ke||Ve(ee,V,this.length);let At=this[ee],Bt=1,kt=0;for(;++kt<V&&(Bt*=256);)At+=this[ee+kt]*Bt;return Bt*=128,At>=Bt&&(At-=Math.pow(2,8*V)),At},s.prototype.readIntBE=function(ee,V,Ke){ee=ee>>>0,V=V>>>0,Ke||Ve(ee,V,this.length);let At=V,Bt=1,kt=this[ee+--At];for(;At>0&&(Bt*=256);)kt+=this[ee+--At]*Bt;return Bt*=128,kt>=Bt&&(kt-=Math.pow(2,8*V)),kt},s.prototype.readInt8=function(ee,V){return ee=ee>>>0,V||Ve(ee,1,this.length),this[ee]&128?(255-this[ee]+1)*-1:this[ee]},s.prototype.readInt16LE=function(ee,V){ee=ee>>>0,V||Ve(ee,2,this.length);const Ke=this[ee]|this[ee+1]<<8;return Ke&32768?Ke|4294901760:Ke},s.prototype.readInt16BE=function(ee,V){ee=ee>>>0,V||Ve(ee,2,this.length);const Ke=this[ee+1]|this[ee]<<8;return Ke&32768?Ke|4294901760:Ke},s.prototype.readInt32LE=function(ee,V){return ee=ee>>>0,V||Ve(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},s.prototype.readInt32BE=function(ee,V){return ee=ee>>>0,V||Ve(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},s.prototype.readBigInt64LE=yr(function(ee){ee=ee>>>0,ot(ee,"offset");const V=this[ee],Ke=this[ee+7];(V===void 0||Ke===void 0)&&St(ee,this.length-8);const At=this[ee+4]+this[ee+5]*2**8+this[ee+6]*2**16+(Ke<<24);return(BigInt(At)<<BigInt(32))+BigInt(V+this[++ee]*2**8+this[++ee]*2**16+this[++ee]*2**24)}),s.prototype.readBigInt64BE=yr(function(ee){ee=ee>>>0,ot(ee,"offset");const V=this[ee],Ke=this[ee+7];(V===void 0||Ke===void 0)&&St(ee,this.length-8);const At=(V<<24)+this[++ee]*2**16+this[++ee]*2**8+this[++ee];return(BigInt(At)<<BigInt(32))+BigInt(this[++ee]*2**24+this[++ee]*2**16+this[++ee]*2**8+Ke)}),s.prototype.readFloatLE=function(ee,V){return ee=ee>>>0,V||Ve(ee,4,this.length),t.read(this,ee,!0,23,4)},s.prototype.readFloatBE=function(ee,V){return ee=ee>>>0,V||Ve(ee,4,this.length),t.read(this,ee,!1,23,4)},s.prototype.readDoubleLE=function(ee,V){return ee=ee>>>0,V||Ve(ee,8,this.length),t.read(this,ee,!0,52,8)},s.prototype.readDoubleBE=function(ee,V){return ee=ee>>>0,V||Ve(ee,8,this.length),t.read(this,ee,!1,52,8)};function Xe(Ee,ee,V,Ke,At,Bt){if(!s.isBuffer(Ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(ee>At||ee<Bt)throw new RangeError('"value" argument is out of bounds');if(V+Ke>Ee.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(ee,V,Ke,At){if(ee=+ee,V=V>>>0,Ke=Ke>>>0,!At){const Lt=Math.pow(2,8*Ke)-1;Xe(this,ee,V,Ke,Lt,0)}let Bt=1,kt=0;for(this[V]=ee&255;++kt<Ke&&(Bt*=256);)this[V+kt]=ee/Bt&255;return V+Ke},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(ee,V,Ke,At){if(ee=+ee,V=V>>>0,Ke=Ke>>>0,!At){const Lt=Math.pow(2,8*Ke)-1;Xe(this,ee,V,Ke,Lt,0)}let Bt=Ke-1,kt=1;for(this[V+Bt]=ee&255;--Bt>=0&&(kt*=256);)this[V+Bt]=ee/kt&255;return V+Ke},s.prototype.writeUint8=s.prototype.writeUInt8=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,1,255,0),this[V]=ee&255,V+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,2,65535,0),this[V]=ee&255,this[V+1]=ee>>>8,V+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,2,65535,0),this[V]=ee>>>8,this[V+1]=ee&255,V+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,4,4294967295,0),this[V+3]=ee>>>24,this[V+2]=ee>>>16,this[V+1]=ee>>>8,this[V]=ee&255,V+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,4,4294967295,0),this[V]=ee>>>24,this[V+1]=ee>>>16,this[V+2]=ee>>>8,this[V+3]=ee&255,V+4};function Jt(Ee,ee,V,Ke,At){it(ee,Ke,At,Ee,V,7);let Bt=Number(ee&BigInt(4294967295));Ee[V++]=Bt,Bt=Bt>>8,Ee[V++]=Bt,Bt=Bt>>8,Ee[V++]=Bt,Bt=Bt>>8,Ee[V++]=Bt;let kt=Number(ee>>BigInt(32)&BigInt(4294967295));return Ee[V++]=kt,kt=kt>>8,Ee[V++]=kt,kt=kt>>8,Ee[V++]=kt,kt=kt>>8,Ee[V++]=kt,V}function Ht(Ee,ee,V,Ke,At){it(ee,Ke,At,Ee,V,7);let Bt=Number(ee&BigInt(4294967295));Ee[V+7]=Bt,Bt=Bt>>8,Ee[V+6]=Bt,Bt=Bt>>8,Ee[V+5]=Bt,Bt=Bt>>8,Ee[V+4]=Bt;let kt=Number(ee>>BigInt(32)&BigInt(4294967295));return Ee[V+3]=kt,kt=kt>>8,Ee[V+2]=kt,kt=kt>>8,Ee[V+1]=kt,kt=kt>>8,Ee[V]=kt,V+8}s.prototype.writeBigUInt64LE=yr(function(ee,V=0){return Jt(this,ee,V,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=yr(function(ee,V=0){return Ht(this,ee,V,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(ee,V,Ke,At){if(ee=+ee,V=V>>>0,!At){const fn=Math.pow(2,8*Ke-1);Xe(this,ee,V,Ke,fn-1,-fn)}let Bt=0,kt=1,Lt=0;for(this[V]=ee&255;++Bt<Ke&&(kt*=256);)ee<0&&Lt===0&&this[V+Bt-1]!==0&&(Lt=1),this[V+Bt]=(ee/kt>>0)-Lt&255;return V+Ke},s.prototype.writeIntBE=function(ee,V,Ke,At){if(ee=+ee,V=V>>>0,!At){const fn=Math.pow(2,8*Ke-1);Xe(this,ee,V,Ke,fn-1,-fn)}let Bt=Ke-1,kt=1,Lt=0;for(this[V+Bt]=ee&255;--Bt>=0&&(kt*=256);)ee<0&&Lt===0&&this[V+Bt+1]!==0&&(Lt=1),this[V+Bt]=(ee/kt>>0)-Lt&255;return V+Ke},s.prototype.writeInt8=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,1,127,-128),ee<0&&(ee=255+ee+1),this[V]=ee&255,V+1},s.prototype.writeInt16LE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,2,32767,-32768),this[V]=ee&255,this[V+1]=ee>>>8,V+2},s.prototype.writeInt16BE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,2,32767,-32768),this[V]=ee>>>8,this[V+1]=ee&255,V+2},s.prototype.writeInt32LE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,4,2147483647,-2147483648),this[V]=ee&255,this[V+1]=ee>>>8,this[V+2]=ee>>>16,this[V+3]=ee>>>24,V+4},s.prototype.writeInt32BE=function(ee,V,Ke){return ee=+ee,V=V>>>0,Ke||Xe(this,ee,V,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),this[V]=ee>>>24,this[V+1]=ee>>>16,this[V+2]=ee>>>8,this[V+3]=ee&255,V+4},s.prototype.writeBigInt64LE=yr(function(ee,V=0){return Jt(this,ee,V,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=yr(function(ee,V=0){return Ht(this,ee,V,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function bt(Ee,ee,V,Ke,At,Bt){if(V+Ke>Ee.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("Index out of range")}function Qt(Ee,ee,V,Ke,At){return ee=+ee,V=V>>>0,At||bt(Ee,ee,V,4),t.write(Ee,ee,V,Ke,23,4),V+4}s.prototype.writeFloatLE=function(ee,V,Ke){return Qt(this,ee,V,!0,Ke)},s.prototype.writeFloatBE=function(ee,V,Ke){return Qt(this,ee,V,!1,Ke)};function Yt(Ee,ee,V,Ke,At){return ee=+ee,V=V>>>0,At||bt(Ee,ee,V,8),t.write(Ee,ee,V,Ke,52,8),V+8}s.prototype.writeDoubleLE=function(ee,V,Ke){return Yt(this,ee,V,!0,Ke)},s.prototype.writeDoubleBE=function(ee,V,Ke){return Yt(this,ee,V,!1,Ke)},s.prototype.copy=function(ee,V,Ke,At){if(!s.isBuffer(ee))throw new TypeError("argument should be a Buffer");if(Ke||(Ke=0),!At&&At!==0&&(At=this.length),V>=ee.length&&(V=ee.length),V||(V=0),At>0&&At<Ke&&(At=Ke),At===Ke||ee.length===0||this.length===0)return 0;if(V<0)throw new RangeError("targetStart out of bounds");if(Ke<0||Ke>=this.length)throw new RangeError("Index out of range");if(At<0)throw new RangeError("sourceEnd out of bounds");At>this.length&&(At=this.length),ee.length-V<At-Ke&&(At=ee.length-V+Ke);const Bt=At-Ke;return this===ee&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(V,Ke,At):Uint8Array.prototype.set.call(ee,this.subarray(Ke,At),V),Bt},s.prototype.fill=function(ee,V,Ke,At){if(typeof ee=="string"){if(typeof V=="string"?(At=V,V=0,Ke=this.length):typeof Ke=="string"&&(At=Ke,Ke=this.length),At!==void 0&&typeof At!="string")throw new TypeError("encoding must be a string");if(typeof At=="string"&&!s.isEncoding(At))throw new TypeError("Unknown encoding: "+At);if(ee.length===1){const kt=ee.charCodeAt(0);(At==="utf8"&&kt<128||At==="latin1")&&(ee=kt)}}else typeof ee=="number"?ee=ee&255:typeof ee=="boolean"&&(ee=Number(ee));if(V<0||this.length<V||this.length<Ke)throw new RangeError("Out of range index");if(Ke<=V)return this;V=V>>>0,Ke=Ke===void 0?this.length:Ke>>>0,ee||(ee=0);let Bt;if(typeof ee=="number")for(Bt=V;Bt<Ke;++Bt)this[Bt]=ee;else{const kt=s.isBuffer(ee)?ee:s.from(ee,At),Lt=kt.length;if(Lt===0)throw new TypeError('The value "'+ee+'" is invalid for argument "value"');for(Bt=0;Bt<Ke-V;++Bt)this[Bt+V]=kt[Bt%Lt]}return this};const ke={};function ge(Ee,ee,V){ke[Ee]=class extends V{constructor(){super(),Object.defineProperty(this,"message",{value:ee.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ee}]`,this.stack,delete this.name}get code(){return Ee}set code(At){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:At,writable:!0})}toString(){return`${this.name} [${Ee}]: ${this.message}`}}}ge("ERR_BUFFER_OUT_OF_BOUNDS",function(Ee){return Ee?`${Ee} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ge("ERR_INVALID_ARG_TYPE",function(Ee,ee){return`The "${Ee}" argument must be of type number. Received type ${typeof ee}`},TypeError),ge("ERR_OUT_OF_RANGE",function(Ee,ee,V){let Ke=`The value of "${Ee}" is out of range.`,At=V;return Number.isInteger(V)&&Math.abs(V)>2**32?At=Se(String(V)):typeof V=="bigint"&&(At=String(V),(V>BigInt(2)**BigInt(32)||V<-(BigInt(2)**BigInt(32)))&&(At=Se(At)),At+="n"),Ke+=` It must be ${ee}. Received ${At}`,Ke},RangeError);function Se(Ee){let ee="",V=Ee.length;const Ke=Ee[0]==="-"?1:0;for(;V>=Ke+4;V-=3)ee=`_${Ee.slice(V-3,V)}${ee}`;return`${Ee.slice(0,V)}${ee}`}function ze(Ee,ee,V){ot(ee,"offset"),(Ee[ee]===void 0||Ee[ee+V]===void 0)&&St(ee,Ee.length-(V+1))}function it(Ee,ee,V,Ke,At,Bt){if(Ee>V||Ee<ee){const kt=typeof ee=="bigint"?"n":"";let Lt;throw Bt>3?ee===0||ee===BigInt(0)?Lt=`>= 0${kt} and < 2${kt} ** ${(Bt+1)*8}${kt}`:Lt=`>= -(2${kt} ** ${(Bt+1)*8-1}${kt}) and < 2 ** ${(Bt+1)*8-1}${kt}`:Lt=`>= ${ee}${kt} and <= ${V}${kt}`,new ke.ERR_OUT_OF_RANGE("value",Lt,Ee)}ze(Ke,At,Bt)}function ot(Ee,ee){if(typeof Ee!="number")throw new ke.ERR_INVALID_ARG_TYPE(ee,"number",Ee)}function St(Ee,ee,V){throw Math.floor(Ee)!==Ee?(ot(Ee,V),new ke.ERR_OUT_OF_RANGE(V||"offset","an integer",Ee)):ee<0?new ke.ERR_BUFFER_OUT_OF_BOUNDS:new ke.ERR_OUT_OF_RANGE(V||"offset",`>= ${V?1:0} and <= ${ee}`,Ee)}const Rt=/[^+/0-9A-Za-z-_]/g;function zt(Ee){if(Ee=Ee.split("=")[0],Ee=Ee.trim().replace(Rt,""),Ee.length<2)return"";for(;Ee.length%4!==0;)Ee=Ee+"=";return Ee}function mt(Ee,ee){ee=ee||1/0;let V;const Ke=Ee.length;let At=null;const Bt=[];for(let kt=0;kt<Ke;++kt){if(V=Ee.charCodeAt(kt),V>55295&&V<57344){if(!At){if(V>56319){(ee-=3)>-1&&Bt.push(239,191,189);continue}else if(kt+1===Ke){(ee-=3)>-1&&Bt.push(239,191,189);continue}At=V;continue}if(V<56320){(ee-=3)>-1&&Bt.push(239,191,189),At=V;continue}V=(At-55296<<10|V-56320)+65536}else At&&(ee-=3)>-1&&Bt.push(239,191,189);if(At=null,V<128){if((ee-=1)<0)break;Bt.push(V)}else if(V<2048){if((ee-=2)<0)break;Bt.push(V>>6|192,V&63|128)}else if(V<65536){if((ee-=3)<0)break;Bt.push(V>>12|224,V>>6&63|128,V&63|128)}else if(V<1114112){if((ee-=4)<0)break;Bt.push(V>>18|240,V>>12&63|128,V>>6&63|128,V&63|128)}else throw new Error("Invalid code point")}return Bt}function or(Ee){const ee=[];for(let V=0;V<Ee.length;++V)ee.push(Ee.charCodeAt(V)&255);return ee}function gn(Ee,ee){let V,Ke,At;const Bt=[];for(let kt=0;kt<Ee.length&&!((ee-=2)<0);++kt)V=Ee.charCodeAt(kt),Ke=V>>8,At=V%256,Bt.push(At),Bt.push(Ke);return Bt}function yn(Ee){return e.toByteArray(zt(Ee))}function tr(Ee,ee,V,Ke){let At;for(At=0;At<Ke&&!(At+V>=ee.length||At>=Ee.length);++At)ee[At+V]=Ee[At];return At}function dr(Ee,ee){return Ee instanceof ee||Ee!=null&&Ee.constructor!=null&&Ee.constructor.name!=null&&Ee.constructor.name===ee.name}function Sr(Ee){return Ee!==Ee}const Nr=function(){const Ee="0123456789abcdef",ee=new Array(256);for(let V=0;V<16;++V){const Ke=V*16;for(let At=0;At<16;++At)ee[Ke+At]=Ee[V]+Ee[At]}return ee}();function yr(Ee){return typeof BigInt>"u"?_i:Ee}function _i(){throw new Error("BigInt not supported")}})(TR);const aJ=Ba(TR);var sJ="Expected a function",PR="__lodash_hash_undefined__",DR=1/0,lJ="[object Function]",uJ="[object GeneratorFunction]",AJ="[object Symbol]",cJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dJ=/^\w*$/,hJ=/^\./,fJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pJ=/[\\^$.*+?()[\]{}|]/g,mJ=/\\(\\)?/g,gJ=/^\[object .+?Constructor\]$/,yJ=typeof window=="object"&&window&&window.Object===Object&&window,vJ=typeof self=="object"&&self&&self.Object===Object&&self,$7=yJ||vJ||Function("return this")();function CJ(n,e){return n==null?void 0:n[e]}function _J(n){var e=!1;if(n!=null&&typeof n.toString!="function")try{e=!!(n+"")}catch{}return e}var bJ=Array.prototype,xJ=Function.prototype,LR=Object.prototype,MS=$7["__core-js_shared__"],_T=function(){var n=/[^.]+$/.exec(MS&&MS.keys&&MS.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),FR=xJ.toString,Q7=LR.hasOwnProperty,UR=LR.toString,wJ=RegExp("^"+FR.call(Q7).replace(pJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bT=$7.Symbol,MJ=bJ.splice,SJ=RR($7,"Map"),eb=RR(Object,"create"),xT=bT?bT.prototype:void 0,wT=xT?xT.toString:void 0;function T1(n){var e=-1,t=n?n.length:0;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}function EJ(){this.__data__=eb?eb(null):{}}function OJ(n){return this.has(n)&&delete this.__data__[n]}function BJ(n){var e=this.__data__;if(eb){var t=e[n];return t===PR?void 0:t}return Q7.call(e,n)?e[n]:void 0}function IJ(n){var e=this.__data__;return eb?e[n]!==void 0:Q7.call(e,n)}function kJ(n,e){var t=this.__data__;return t[n]=eb&&e===void 0?PR:e,this}T1.prototype.clear=EJ;T1.prototype.delete=OJ;T1.prototype.get=BJ;T1.prototype.has=IJ;T1.prototype.set=kJ;function Sv(n){var e=-1,t=n?n.length:0;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}function TJ(){this.__data__=[]}function KJ(n){var e=this.__data__,t=ew(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():MJ.call(e,t,1),!0}function PJ(n){var e=this.__data__,t=ew(e,n);return t<0?void 0:e[t][1]}function DJ(n){return ew(this.__data__,n)>-1}function LJ(n,e){var t=this.__data__,r=ew(t,n);return r<0?t.push([n,e]):t[r][1]=e,this}Sv.prototype.clear=TJ;Sv.prototype.delete=KJ;Sv.prototype.get=PJ;Sv.prototype.has=DJ;Sv.prototype.set=LJ;function G1(n){var e=-1,t=n?n.length:0;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}function FJ(){this.__data__={hash:new T1,map:new(SJ||Sv),string:new T1}}function UJ(n){return tw(this,n).delete(n)}function RJ(n){return tw(this,n).get(n)}function zJ(n){return tw(this,n).has(n)}function jJ(n,e){return tw(this,n).set(n,e),this}G1.prototype.clear=FJ;G1.prototype.delete=UJ;G1.prototype.get=RJ;G1.prototype.has=zJ;G1.prototype.set=jJ;function ew(n,e){for(var t=n.length;t--;)if(XJ(n[t][0],e))return t;return-1}function NJ(n,e){e=QJ(e,n)?[e]:$J(e);for(var t=0,r=e.length;n!=null&&t<r;)n=n[HJ(e[t++])];return t&&t==r?n:void 0}function WJ(n){if(!jR(n)||qJ(n))return!1;var e=JJ(n)||_J(n)?wJ:gJ;return e.test(ZJ(n))}function GJ(n){if(typeof n=="string")return n;if(q7(n))return wT?wT.call(n):"";var e=n+"";return e=="0"&&1/n==-DR?"-0":e}function $J(n){return zR(n)?n:VJ(n)}function tw(n,e){var t=n.__data__;return YJ(e)?t[typeof e=="string"?"string":"hash"]:t.map}function RR(n,e){var t=CJ(n,e);return WJ(t)?t:void 0}function QJ(n,e){if(zR(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||q7(n)?!0:dJ.test(n)||!cJ.test(n)||e!=null&&n in Object(e)}function YJ(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function qJ(n){return!!_T&&_T in n}var VJ=Y7(function(n){n=tee(n);var e=[];return hJ.test(n)&&e.push(""),n.replace(fJ,function(t,r,i,o){e.push(i?o.replace(mJ,"$1"):r||t)}),e});function HJ(n){if(typeof n=="string"||q7(n))return n;var e=n+"";return e=="0"&&1/n==-DR?"-0":e}function ZJ(n){if(n!=null){try{return FR.call(n)}catch{}try{return n+""}catch{}}return""}function Y7(n,e){if(typeof n!="function"||e&&typeof e!="function")throw new TypeError(sJ);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var a=n.apply(this,r);return t.cache=o.set(i,a),a};return t.cache=new(Y7.Cache||G1),t}Y7.Cache=G1;function XJ(n,e){return n===e||n!==n&&e!==e}var zR=Array.isArray;function JJ(n){var e=jR(n)?UR.call(n):"";return e==lJ||e==uJ}function jR(n){var e=typeof n;return!!n&&(e=="object"||e=="function")}function eee(n){return!!n&&typeof n=="object"}function q7(n){return typeof n=="symbol"||eee(n)&&UR.call(n)==AJ}function tee(n){return n==null?"":GJ(n)}function nee(n,e,t){var r=n==null?void 0:NJ(n,e);return r===void 0?t:r}var ree=nee;const iee=Ba(ree);var c4={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */c4.exports;(function(n,e){(function(){var t,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,C="__lodash_placeholder__",O=1,E=2,P=4,D=1,$=2,H=1,Q=2,N=4,Z=8,ae=16,pe=32,fe=64,X=128,oe=256,Ce=512,we=30,Te="...",Pe=800,he=16,$e=1,ye=2,gt=3,yt=1/0,st=9007199254740991,ft=17976931348623157e292,Re=NaN,Ve=4294967295,Xe=Ve-1,Jt=Ve>>>1,Ht=[["ary",X],["bind",H],["bindKey",Q],["curry",Z],["curryRight",ae],["flip",Ce],["partial",pe],["partialRight",fe],["rearg",oe]],bt="[object Arguments]",Qt="[object Array]",Yt="[object AsyncFunction]",ke="[object Boolean]",ge="[object Date]",Se="[object DOMException]",ze="[object Error]",it="[object Function]",ot="[object GeneratorFunction]",St="[object Map]",Rt="[object Number]",zt="[object Null]",mt="[object Object]",or="[object Promise]",gn="[object Proxy]",yn="[object RegExp]",tr="[object Set]",dr="[object String]",Sr="[object Symbol]",Nr="[object Undefined]",yr="[object WeakMap]",_i="[object WeakSet]",Ee="[object ArrayBuffer]",ee="[object DataView]",V="[object Float32Array]",Ke="[object Float64Array]",At="[object Int8Array]",Bt="[object Int16Array]",kt="[object Int32Array]",Lt="[object Uint8Array]",fn="[object Uint8ClampedArray]",Pn="[object Uint16Array]",On="[object Uint32Array]",g=/\b__p \+= '';/g,Kt=/\b(__p \+=) '' \+/g,Pr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rr=/&(?:amp|lt|gt|quot|#39);/g,Le=/[&<>"']/g,ce=RegExp(rr.source),xe=RegExp(Le.source),Ie=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mt=/[\\^$.*+?()[\]{}|]/g,tn=RegExp(Mt.source),qt=/^\s+/,en=/\s/,Fn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bn=/\{\n\/\* \[wrapped with (.+)\] \*/,Hn=/,? & /,Or=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,cr=/[()=,{}\[\]\/\s]/,Qr=/\\(\\)?/g,Br=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fr=/\w*$/,ar=/^[-+]0x[0-9a-f]+$/i,di=/^0b[01]+$/i,Ui=/^\[object .+?Constructor\]$/,to=/^0o[0-7]+$/i,ho=/^(?:0|[1-9]\d*)$/,si=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fo=/($^)/,Na=/['\n\r\u2028\u2029\\]/g,Ia="\\ud800-\\udfff",Ei="\\u0300-\\u036f",os="\\ufe20-\\ufe2f",yi="\\u20d0-\\u20ff",Gn=Ei+os+yi,ro="\\u2700-\\u27bf",Co="a-z\\xdf-\\xf6\\xf8-\\xff",Ri="\\xac\\xb1\\xd7\\xf7",_e="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Je="\\u2000-\\u206f",Zt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ln="A-Z\\xc0-\\xd6\\xd8-\\xde",Ft="\\ufe0e\\ufe0f",wn=Ri+_e+Je+Zt,hr="['’]",ii="["+Ia+"]",li="["+wn+"]",Jo="["+Gn+"]",Ka="\\d+",Dr="["+ro+"]",Wa="["+Co+"]",vi="[^"+Ia+wn+Ka+ro+Co+ln+"]",Ga="\\ud83c[\\udffb-\\udfff]",ea="(?:"+Jo+"|"+Ga+")",xu="[^"+Ia+"]",as="(?:\\ud83c[\\udde6-\\uddff]){2}",ta="[\\ud800-\\udbff][\\udc00-\\udfff]",na="["+ln+"]",bs="\\u200d",wu="(?:"+Wa+"|"+vi+")",ma="(?:"+na+"|"+vi+")",_A="(?:"+hr+"(?:d|ll|m|re|s|t|ve))?",Wu="(?:"+hr+"(?:D|LL|M|RE|S|T|VE))?",bA=ea+"?",Mu="["+Ft+"]?",Gu="(?:"+bs+"(?:"+[xu,as,ta].join("|")+")"+Mu+bA+")*",Wo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xs="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nu=Mu+bA+Gu,ss="(?:"+[Dr,as,ta].join("|")+")"+nu,ul="(?:"+[xu+Jo+"?",Jo,as,ta,ii].join("|")+")",Go=RegExp(hr,"g"),Su=RegExp(Jo,"g"),Al=RegExp(Ga+"(?="+Ga+")|"+ul+nu,"g"),Ml=RegExp([na+"?"+Wa+"+"+_A+"(?="+[li,na,"$"].join("|")+")",ma+"+"+Wu+"(?="+[li,na+wu,"$"].join("|")+")",na+"?"+wu+"+"+_A,na+"+"+Wu,xs,Wo,Ka,ss].join("|"),"g"),ru=RegExp("["+bs+Ia+Gn+Ft+"]"),ua=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xA=-1,vo={};vo[V]=vo[Ke]=vo[At]=vo[Bt]=vo[kt]=vo[Lt]=vo[fn]=vo[Pn]=vo[On]=!0,vo[bt]=vo[Qt]=vo[Ee]=vo[ke]=vo[ee]=vo[ge]=vo[ze]=vo[it]=vo[St]=vo[Rt]=vo[mt]=vo[yn]=vo[tr]=vo[dr]=vo[yr]=!1;var io={};io[bt]=io[Qt]=io[Ee]=io[ee]=io[ke]=io[ge]=io[V]=io[Ke]=io[At]=io[Bt]=io[kt]=io[St]=io[Rt]=io[mt]=io[yn]=io[tr]=io[dr]=io[Sr]=io[Lt]=io[fn]=io[Pn]=io[On]=!0,io[ze]=io[it]=io[yr]=!1;var z={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ue={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},vt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,vn=parseInt,Kn=typeof window=="object"&&window&&window.Object===Object&&window,Ur=typeof self=="object"&&self&&self.Object===Object&&self,vr=Kn||Ur||Function("return this")(),kr=e&&!e.nodeType&&e,Ti=kr&&!0&&n&&!n.nodeType&&n,po=Ti&&Ti.exports===kr,Oi=po&&Kn.process,Zr=function(){try{var Et=Ti&&Ti.require&&Ti.require("util").types;return Et||Oi&&Oi.binding&&Oi.binding("util")}catch{}}(),Vi=Zr&&Zr.isArrayBuffer,Io=Zr&&Zr.isDate,wo=Zr&&Zr.isMap,$a=Zr&&Zr.isRegExp,Fl=Zr&&Zr.isSet,iu=Zr&&Zr.isTypedArray;function ga(Et,an,jt){switch(jt.length){case 0:return Et.call(an);case 1:return Et.call(an,jt[0]);case 2:return Et.call(an,jt[0],jt[1]);case 3:return Et.call(an,jt[0],jt[1],jt[2])}return Et.apply(an,jt)}function v0(Et,an,jt,fr){for(var ui=-1,oo=Et==null?0:Et.length;++ui<oo;){var Pa=Et[ui];an(fr,Pa,jt(Pa),Et)}return fr}function ou(Et,an){for(var jt=-1,fr=Et==null?0:Et.length;++jt<fr&&an(Et[jt],jt,Et)!==!1;);return Et}function Rh(Et,an){for(var jt=Et==null?0:Et.length;jt--&&an(Et[jt],jt,Et)!==!1;);return Et}function ld(Et,an){for(var jt=-1,fr=Et==null?0:Et.length;++jt<fr;)if(!an(Et[jt],jt,Et))return!1;return!0}function $u(Et,an){for(var jt=-1,fr=Et==null?0:Et.length,ui=0,oo=[];++jt<fr;){var Pa=Et[jt];an(Pa,jt,Et)&&(oo[ui++]=Pa)}return oo}function ud(Et,an){var jt=Et==null?0:Et.length;return!!jt&&ko(Et,an,0)>-1}function YA(Et,an,jt){for(var fr=-1,ui=Et==null?0:Et.length;++fr<ui;)if(jt(an,Et[fr]))return!0;return!1}function ra(Et,an){for(var jt=-1,fr=Et==null?0:Et.length,ui=Array(fr);++jt<fr;)ui[jt]=an(Et[jt],jt,Et);return ui}function Qu(Et,an){for(var jt=-1,fr=an.length,ui=Et.length;++jt<fr;)Et[ui+jt]=an[jt];return Et}function Vd(Et,an,jt,fr){var ui=-1,oo=Et==null?0:Et.length;for(fr&&oo&&(jt=Et[++ui]);++ui<oo;)jt=an(jt,Et[ui],ui,Et);return jt}function qA(Et,an,jt,fr){var ui=Et==null?0:Et.length;for(fr&&ui&&(jt=Et[--ui]);ui--;)jt=an(jt,Et[ui],ui,Et);return jt}function kc(Et,an){for(var jt=-1,fr=Et==null?0:Et.length;++jt<fr;)if(an(Et[jt],jt,Et))return!0;return!1}var Eu=Jf("length");function Ad(Et){return Et.split("")}function em(Et){return Et.match(Or)||[]}function zh(Et,an,jt){var fr;return jt(Et,function(ui,oo,Pa){if(an(ui,oo,Pa))return fr=oo,!1}),fr}function Ki(Et,an,jt,fr){for(var ui=Et.length,oo=jt+(fr?1:-1);fr?oo--:++oo<ui;)if(an(Et[oo],oo,Et))return oo;return-1}function ko(Et,an,jt){return an===an?MA(Et,an,jt):Ki(Et,jh,jt)}function C0(Et,an,jt,fr){for(var ui=jt-1,oo=Et.length;++ui<oo;)if(fr(Et[ui],an))return ui;return-1}function jh(Et){return Et!==Et}function Yu(Et,an){var jt=Et==null?0:Et.length;return jt?VA(Et,an)/jt:Re}function Jf(Et){return function(an){return an==null?t:an[Et]}}function Aa(Et){return function(an){return Et==null?t:Et[an]}}function ep(Et,an,jt,fr,ui){return ui(Et,function(oo,Pa,Ko){jt=fr?(fr=!1,oo):an(jt,oo,Pa,Ko)}),jt}function Gi(Et,an){var jt=Et.length;for(Et.sort(an);jt--;)Et[jt]=Et[jt].value;return Et}function VA(Et,an){for(var jt,fr=-1,ui=Et.length;++fr<ui;){var oo=an(Et[fr]);oo!==t&&(jt=jt===t?oo:jt+oo)}return jt}function To(Et,an){for(var jt=-1,fr=Array(Et);++jt<Et;)fr[jt]=an(jt);return fr}function Fo(Et,an){return ra(an,function(jt){return[jt,Et[jt]]})}function HA(Et){return Et&&Et.slice(0,Zd(Et)+1).replace(qt,"")}function Us(Et){return function(an){return Et(an)}}function Nh(Et,an){return ra(an,function(jt){return Et[jt]})}function au(Et,an){return Et.has(an)}function Ul(Et,an){for(var jt=-1,fr=Et.length;++jt<fr&&ko(an,Et[jt],0)>-1;);return jt}function Tc(Et,an){for(var jt=Et.length;jt--&&ko(an,Et[jt],0)>-1;);return jt}function Wh(Et,an){for(var jt=Et.length,fr=0;jt--;)Et[jt]===an&&++fr;return fr}var Hd=Aa(z),Ou=Aa(le);function wA(Et){return"\\"+vt[Et]}function ZA(Et,an){return Et==null?t:Et[an]}function XA(Et){return ru.test(Et)}function tp(Et){return ua.test(Et)}function tm(Et){for(var an,jt=[];!(an=Et.next()).done;)jt.push(an.value);return jt}function Kc(Et){var an=-1,jt=Array(Et.size);return Et.forEach(function(fr,ui){jt[++an]=[ui,fr]}),jt}function cd(Et,an){return function(jt){return Et(an(jt))}}function Rl(Et,an){for(var jt=-1,fr=Et.length,ui=0,oo=[];++jt<fr;){var Pa=Et[jt];(Pa===an||Pa===C)&&(Et[jt]=C,oo[ui++]=jt)}return oo}function Sl(Et){var an=-1,jt=Array(Et.size);return Et.forEach(function(fr){jt[++an]=fr}),jt}function ya(Et){var an=-1,jt=Array(Et.size);return Et.forEach(function(fr){jt[++an]=[fr,fr]}),jt}function MA(Et,an,jt){for(var fr=jt-1,ui=Et.length;++fr<ui;)if(Et[fr]===an)return fr;return-1}function zl(Et,an,jt){for(var fr=jt+1;fr--;)if(Et[fr]===an)return fr;return fr}function Bu(Et){return XA(Et)?Iu(Et):Eu(Et)}function jl(Et){return XA(Et)?Dc(Et):Ad(Et)}function Zd(Et){for(var an=Et.length;an--&&en.test(Et.charAt(an)););return an}var Pc=Aa(Ue);function Iu(Et){for(var an=Al.lastIndex=0;Al.test(Et);)++an;return an}function Dc(Et){return Et.match(Al)||[]}function dd(Et){return Et.match(Ml)||[]}var Xd=function Et(an){an=an==null?vr:su.defaults(vr.Object(),an,su.pick(vr,cl));var jt=an.Array,fr=an.Date,ui=an.Error,oo=an.Function,Pa=an.Math,Ko=an.Object,SA=an.RegExp,Jd=an.String,Po=an.TypeError,EA=jt.prototype,ws=oo.prototype,Qa=Ko.prototype,qu=an["__core-js_shared__"],ls=ws.toString,Hi=Qa.hasOwnProperty,Gh=0,$h=function(){var v=/[^.]+$/.exec(qu&&qu.keys&&qu.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),lu=Qa.toString,JA=ls.call(Ko),va=vr._,dl=SA("^"+ls.call(Hi).replace(Mt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qn=po?an.Buffer:t,Nl=an.Symbol,Vu=an.Uint8Array,ec=Qn?Qn.allocUnsafe:t,Hu=cd(Ko.getPrototypeOf,Ko),Jn=Ko.create,tc=Qa.propertyIsEnumerable,Zu=EA.splice,np=Nl?Nl.isConcatSpreadable:t,Xu=Nl?Nl.iterator:t,Ju=Nl?Nl.toStringTag:t,nc=function(){try{var v=Sd(Ko,"defineProperty");return v({},"",{}),v}catch{}}(),eh=an.clearTimeout!==vr.clearTimeout&&an.clearTimeout,Lc=fr&&fr.now!==vr.Date.now&&fr.now,eA=an.setTimeout!==vr.setTimeout&&an.setTimeout,Mo=Pa.ceil,tA=Pa.floor,hd=Ko.getOwnPropertySymbols,rp=Qn?Qn.isBuffer:t,Qh=an.isFinite,Yh=EA.join,ip=cd(Ko.keys,Ko),ao=Pa.max,ca=Pa.min,xr=fr.now,Ir=an.parseInt,OA=Pa.random,Fc=EA.reverse,rc=Sd(an,"DataView"),da=Sd(an,"Map"),ic=Sd(an,"Promise"),ka=Sd(an,"Set"),nA=Sd(an,"WeakMap"),hl=Sd(Ko,"create"),$o=nA&&new nA,Qo={},op=As(rc),th=As(da),rA=As(ic),El=As(ka),ap=As(nA),fd=Nl?Nl.prototype:t,BA=fd?fd.valueOf:t,qh=fd?fd.toString:t;function Fe(v){if(mn(v)&&!re(v)&&!(v instanceof Yr)){if(v instanceof $i)return v;if(Hi.call(v,"__wrapped__"))return Ol(v)}return new $i(v)}var oc=function(){function v(){}return function(S){if(!xn(S))return{};if(Jn)return Jn(S);v.prototype=S;var L=new v;return v.prototype=t,L}}();function us(){}function $i(v,S){this.__wrapped__=v,this.__actions__=[],this.__chain__=!!S,this.__index__=0,this.__values__=t}Fe.templateSettings={escape:Ie,evaluate:je,interpolate:rt,variable:"",imports:{_:Fe}},Fe.prototype=us.prototype,Fe.prototype.constructor=Fe,$i.prototype=oc(us.prototype),$i.prototype.constructor=$i;function Yr(v){this.__wrapped__=v,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ve,this.__views__=[]}function Ca(){var v=new Yr(this.__wrapped__);return v.__actions__=el(this.__actions__),v.__dir__=this.__dir__,v.__filtered__=this.__filtered__,v.__iteratees__=el(this.__iteratees__),v.__takeCount__=this.__takeCount__,v.__views__=el(this.__views__),v}function ac(){if(this.__filtered__){var v=new Yr(this);v.__dir__=-1,v.__filtered__=!0}else v=this.clone(),v.__dir__*=-1;return v}function pd(){var v=this.__wrapped__.value(),S=this.__dir__,L=re(v),te=S<0,Me=L?v.length:0,We=qv(0,Me,this.__views__),ut=We.start,_t=We.end,Tt=_t-ut,Cn=te?_t:ut-1,_n=this.__iteratees__,Tn=_n.length,pr=0,Hr=ca(Tt,this.__takeCount__);if(!L||!te&&Me==Tt&&Hr==Tt)return rf(v,this.__actions__);var bi=[];e:for(;Tt--&&pr<Hr;){Cn+=S;for(var lo=-1,xi=v[Cn];++lo<Tn;){var bo=_n[lo],Do=bo.iteratee,Gc=bo.type,FA=Do(xi);if(Gc==ye)xi=FA;else if(!FA){if(Gc==$e)continue e;break e}}bi[pr++]=xi}return bi}Yr.prototype=oc(us.prototype),Yr.prototype.constructor=Yr;function uu(v){var S=-1,L=v==null?0:v.length;for(this.clear();++S<L;){var te=v[S];this.set(te[0],te[1])}}function md(){this.__data__=hl?hl(null):{},this.size=0}function sc(v){var S=this.has(v)&&delete this.__data__[v];return this.size-=S?1:0,S}function sp(v){var S=this.__data__;if(hl){var L=S[v];return L===d?t:L}return Hi.call(S,v)?S[v]:t}function gd(v){var S=this.__data__;return hl?S[v]!==t:Hi.call(S,v)}function lc(v,S){var L=this.__data__;return this.size+=this.has(v)?0:1,L[v]=hl&&S===t?d:S,this}uu.prototype.clear=md,uu.prototype.delete=sc,uu.prototype.get=sp,uu.prototype.has=gd,uu.prototype.set=lc;function Wl(v){var S=-1,L=v==null?0:v.length;for(this.clear();++S<L;){var te=v[S];this.set(te[0],te[1])}}function lp(){this.__data__=[],this.size=0}function nh(v){var S=this.__data__,L=Xt(S,v);if(L<0)return!1;var te=S.length-1;return L==te?S.pop():Zu.call(S,L,1),--this.size,!0}function Vh(v){var S=this.__data__,L=Xt(S,v);return L<0?t:S[L][1]}function I(v){return Xt(this.__data__,v)>-1}function u(v,S){var L=this.__data__,te=Xt(L,v);return te<0?(++this.size,L.push([v,S])):L[te][1]=S,this}Wl.prototype.clear=lp,Wl.prototype.delete=nh,Wl.prototype.get=Vh,Wl.prototype.has=I,Wl.prototype.set=u;function m(v){var S=-1,L=v==null?0:v.length;for(this.clear();++S<L;){var te=v[S];this.set(te[0],te[1])}}function _(){this.size=0,this.__data__={hash:new uu,map:new(da||Wl),string:new uu}}function w(v){var S=ff(this,v).delete(v);return this.size-=S?1:0,S}function k(v){return ff(this,v).get(v)}function R(v){return ff(this,v).has(v)}function j(v,S){var L=ff(this,v),te=L.size;return L.set(v,S),this.size+=L.size==te?0:1,this}m.prototype.clear=_,m.prototype.delete=w,m.prototype.get=k,m.prototype.has=R,m.prototype.set=j;function Y(v){var S=-1,L=v==null?0:v.length;for(this.__data__=new m;++S<L;)this.add(v[S])}function ie(v){return this.__data__.set(v,d),this}function de(v){return this.__data__.has(v)}Y.prototype.add=Y.prototype.push=ie,Y.prototype.has=de;function me(v){var S=this.__data__=new Wl(v);this.size=S.size}function Oe(){this.__data__=new Wl,this.size=0}function qe(v){var S=this.__data__,L=S.delete(v);return this.size=S.size,L}function Ye(v){return this.__data__.get(v)}function He(v){return this.__data__.has(v)}function Ne(v,S){var L=this.__data__;if(L instanceof Wl){var te=L.__data__;if(!da||te.length<i-1)return te.push([v,S]),this.size=++L.size,this;L=this.__data__=new m(te)}return L.set(v,S),this.size=L.size,this}me.prototype.clear=Oe,me.prototype.delete=qe,me.prototype.get=Ye,me.prototype.has=He,me.prototype.set=Ne;function ht(v,S){var L=re(v),te=!L&&J(v),Me=!L&&!te&&Ge(v),We=!L&&!te&&!Me&&Gs(v),ut=L||te||Me||We,_t=ut?To(v.length,Jd):[],Tt=_t.length;for(var Cn in v)(S||Hi.call(v,Cn))&&!(ut&&(Cn=="length"||Me&&(Cn=="offset"||Cn=="parent")||We&&(Cn=="buffer"||Cn=="byteLength"||Cn=="byteOffset")||x(Cn,Tt)))&&_t.push(Cn);return _t}function Dt(v){var S=v.length;return S?v[rm(0,S-1)]:t}function tt(v,S){return qa(el(v),In(S,0,v.length))}function xt(v){return qa(el(v))}function Pt(v,S,L){(L!==t&&!K(v[S],L)||L===t&&!(S in v))&&qn(v,S,L)}function Ut(v,S,L){var te=v[S];(!(Hi.call(v,S)&&K(te,L))||L===t&&!(S in v))&&qn(v,S,L)}function Xt(v,S){for(var L=v.length;L--;)if(K(v[L][0],S))return L;return-1}function hn(v,S,L,te){return Wr(v,function(Me,We,ut){S(te,Me,L(Me),ut)}),te}function un(v,S){return v&&sA(S,Tl(S),v)}function pn(v,S){return v&&sA(S,Ha(S),v)}function qn(v,S,L){S=="__proto__"&&nc?nc(v,S,{configurable:!0,enumerable:!0,value:L,writable:!0}):v[S]=L}function qr(v,S){for(var L=-1,te=S.length,Me=jt(te),We=v==null;++L<te;)Me[L]=We?t:gC(v,S[L]);return Me}function In(v,S,L){return v===v&&(L!==t&&(v=v<=L?v:L),S!==t&&(v=v>=S?v:S)),v}function Cr(v,S,L,te,Me,We){var ut,_t=S&O,Tt=S&E,Cn=S&P;if(L&&(ut=Me?L(v,te,Me,We):L(v)),ut!==t)return ut;if(!xn(v))return v;var _n=re(v);if(_n){if(ut=Vv(v),!_t)return el(v,ut)}else{var Tn=zs(v),pr=Tn==it||Tn==ot;if(Ge(v))return E0(v,_t);if(Tn==mt||Tn==bt||pr&&!Me){if(ut=Tt||pr?{}:T0(v),!_t)return Tt?mp(v,pn(ut,v)):O0(v,un(ut,v))}else{if(!io[Tn])return Me?v:{};ut=pf(v,Tn,_t)}}We||(We=new me);var Hr=We.get(v);if(Hr)return Hr;We.set(v,ut),hs(v)?v.forEach(function(xi){ut.add(Cr(xi,S,L,xi,v,We))}):ur(v)&&v.forEach(function(xi,bo){ut.set(bo,Cr(xi,S,L,bo,v,We))});var bi=Cn?Tt?df:hm:Tt?Ha:Tl,lo=_n?t:bi(v);return ou(lo||v,function(xi,bo){lo&&(bo=xi,xi=v[bo]),Ut(ut,bo,Cr(xi,S,L,bo,v,We))}),ut}function hi(v){var S=Tl(v);return function(L){return Pi(L,v,S)}}function Pi(v,S,L){var te=L.length;if(v==null)return!te;for(v=Ko(v);te--;){var Me=L[te],We=S[Me],ut=v[Me];if(ut===t&&!(Me in v)||!We(ut))return!1}return!0}function Vr(v,S,L){if(typeof v!="function")throw new Po(a);return Tr(function(){v.apply(t,L)},S)}function ei(v,S,L,te){var Me=-1,We=ud,ut=!0,_t=v.length,Tt=[],Cn=S.length;if(!_t)return Tt;L&&(S=ra(S,Us(L))),te?(We=YA,ut=!1):S.length>=i&&(We=au,ut=!1,S=new Y(S));e:for(;++Me<_t;){var _n=v[Me],Tn=L==null?_n:L(_n);if(_n=te||_n!==0?_n:0,ut&&Tn===Tn){for(var pr=Cn;pr--;)if(S[pr]===Tn)continue e;Tt.push(_n)}else We(S,Tn,te)||Tt.push(_n)}return Tt}var Wr=lh(Ms),Ho=lh(iA,!0);function Uo(v,S){var L=!0;return Wr(v,function(te,Me,We){return L=!!S(te,Me,We),L}),L}function Rs(v,S,L){for(var te=-1,Me=v.length;++te<Me;){var We=v[te],ut=S(We);if(ut!=null&&(_t===t?ut===ut&&!Xo(ut):L(ut,_t)))var _t=ut,Tt=We}return Tt}function Da(v,S,L,te){var Me=v.length;for(L=Jr(L),L<0&&(L=-L>Me?0:Me+L),te=te===t||te>Me?Me:Jr(te),te<0&&(te+=Me),te=L>te?0:Ts(te);L<te;)v[L++]=S;return v}function mo(v,S){var L=[];return Wr(v,function(te,Me,We){S(te,Me,We)&&L.push(te)}),L}function so(v,S,L,te,Me){var We=-1,ut=v.length;for(L||(L=p),Me||(Me=[]);++We<ut;){var _t=v[We];S>0&&L(_t)?S>1?so(_t,S-1,L,te,Me):Qu(Me,_t):te||(Me[Me.length]=_t)}return Me}var Js=og(),Au=og(!0);function Ms(v,S){return v&&Js(v,S,Tl)}function iA(v,S){return v&&Au(v,S,Tl)}function Gl(v,S){return $u(S,function(L){return zn(v[L])})}function Ss(v,S){S=xd(S,v);for(var L=0,te=S.length;v!=null&&L<te;)v=v[Fa(S[L++])];return L&&L==te?v:t}function zi(v,S,L){var te=S(v);return re(v)?te:Qu(te,L(v))}function Bi(v){return v==null?v===t?Nr:zt:Ju&&Ju in Ko(v)?vp(v):cn(v)}function ia(v,S){return v>S}function Uc(v,S){return v!=null&&Hi.call(v,S)}function Zo(v,S){return v!=null&&S in Ko(v)}function _a(v,S,L){return v>=ca(S,L)&&v<ao(S,L)}function Es(v,S,L){for(var te=L?YA:ud,Me=v[0].length,We=v.length,ut=We,_t=jt(We),Tt=1/0,Cn=[];ut--;){var _n=v[ut];ut&&S&&(_n=ra(_n,Us(S))),Tt=ca(_n.length,Tt),_t[ut]=!L&&(S||Me>=120&&_n.length>=120)?new Y(ut&&_n):t}_n=v[0];var Tn=-1,pr=_t[0];e:for(;++Tn<Me&&Cn.length<Tt;){var Hr=_n[Tn],bi=S?S(Hr):Hr;if(Hr=L||Hr!==0?Hr:0,!(pr?au(pr,bi):te(Cn,bi,L))){for(ut=We;--ut;){var lo=_t[ut];if(!(lo?au(lo,bi):te(v[ut],bi,L)))continue e}pr&&pr.push(bi),Cn.push(Hr)}}return Cn}function Di(v,S,L,te){return Ms(v,function(Me,We,ut){S(te,L(Me),We,ut)}),te}function uc(v,S,L){S=xd(S,v),v=Vn(v,S);var te=v==null?v:v[Fa(KA(S))];return te==null?t:ga(te,v,L)}function Hh(v){return mn(v)&&Bi(v)==bt}function cu(v){return mn(v)&&Bi(v)==Ee}function Ac(v){return mn(v)&&Bi(v)==ge}function ku(v,S,L,te,Me){return v===S?!0:v==null||S==null||!mn(v)&&!mn(S)?v!==v&&S!==S:Zh(v,S,L,te,ku,Me)}function Zh(v,S,L,te,Me,We){var ut=re(v),_t=re(S),Tt=ut?Qt:zs(v),Cn=_t?Qt:zs(S);Tt=Tt==bt?mt:Tt,Cn=Cn==bt?mt:Cn;var _n=Tt==mt,Tn=Cn==mt,pr=Tt==Cn;if(pr&&Ge(v)){if(!Ge(S))return!1;ut=!0,_n=!1}if(pr&&!_n)return We||(We=new me),ut||Gs(v)?Du(v,S,L,te,Me,We):dm(v,S,Tt,L,te,Me,We);if(!(L&D)){var Hr=_n&&Hi.call(v,"__wrapped__"),bi=Tn&&Hi.call(S,"__wrapped__");if(Hr||bi){var lo=Hr?v.value():v,xi=bi?S.value():S;return We||(We=new me),Me(lo,xi,L,te,We)}}return pr?(We||(We=new me),k0(v,S,L,te,Me,We)):!1}function Tu(v){return mn(v)&&zs(v)==St}function Xh(v,S,L,te){var Me=L.length,We=Me,ut=!te;if(v==null)return!We;for(v=Ko(v);Me--;){var _t=L[Me];if(ut&&_t[2]?_t[1]!==v[_t[0]]:!(_t[0]in v))return!1}for(;++Me<We;){_t=L[Me];var Tt=_t[0],Cn=v[Tt],_n=_t[1];if(ut&&_t[2]){if(Cn===t&&!(Tt in v))return!1}else{var Tn=new me;if(te)var pr=te(Cn,_n,Tt,v,S,Tn);if(!(pr===t?ku(_n,Cn,D|$,te,Tn):pr))return!1}}return!0}function IA(v){if(!xn(v)||ne(v))return!1;var S=zn(v)?dl:Ui;return S.test(As(v))}function up(v){return mn(v)&&Bi(v)==yn}function yd(v){return mn(v)&&zs(v)==tr}function Ap(v){return mn(v)&&Xn(v.length)&&!!vo[Bi(v)]}function oA(v){return typeof v=="function"?v:v==null?yc:typeof v=="object"?re(v)?tf(v[0],v[1]):ef(v):jk(v)}function vd(v){if(!ve(v))return ip(v);var S=[];for(var L in Ko(v))Hi.call(v,L)&&L!="constructor"&&S.push(L);return S}function Jh(v){if(!xn(v))return Nt(v);var S=ve(v),L=[];for(var te in v)te=="constructor"&&(S||!Hi.call(v,te))||L.push(te);return L}function aA(v,S){return v<S}function _0(v,S){var L=-1,te=be(v)?jt(v.length):[];return Wr(v,function(Me,We,ut){te[++L]=S(Me,We,ut)}),te}function ef(v){var S=So(v);return S.length==1&&S[0][2]?nt(S[0][0],S[0][1]):function(L){return L===v||Xh(L,v,S)}}function tf(v,S){return B(v)&&Qe(S)?nt(Fa(v),S):function(L){var te=gC(L,v);return te===t&&te===S?yC(L,v):ku(S,te,D|$)}}function du(v,S,L,te,Me){v!==S&&Js(S,function(We,ut){if(Me||(Me=new me),xn(We))rh(v,S,ut,L,du,te,Me);else{var _t=te?te(Rn(v,ut),We,ut+"",v,S,Me):t;_t===t&&(_t=We),Pt(v,ut,_t)}},Ha)}function rh(v,S,L,te,Me,We,ut){var _t=Rn(v,L),Tt=Rn(S,L),Cn=ut.get(Tt);if(Cn){Pt(v,L,Cn);return}var _n=We?We(_t,Tt,L+"",v,S,ut):t,Tn=_n===t;if(Tn){var pr=re(Tt),Hr=!pr&&Ge(Tt),bi=!pr&&!Hr&&Gs(Tt);_n=Tt,pr||Hr||bi?re(_t)?_n=_t:Be(_t)?_n=el(_t):Hr?(Tn=!1,_n=E0(Tt,!0)):bi?(Tn=!1,_n=ba(Tt,!0)):_n=[]:Ua(Tt)||J(Tt)?(_n=_t,J(_t)?_n=Il(_t):(!xn(_t)||zn(_t))&&(_n=T0(Tt))):Tn=!1}Tn&&(ut.set(Tt,_n),Me(_n,Tt,te,We,ut),ut.delete(Tt)),Pt(v,L,_n)}function ih(v,S){var L=v.length;if(L)return S+=S<0?L:0,x(S,L)?v[S]:t}function eg(v,S,L){S.length?S=ra(S,function(We){return re(We)?function(ut){return Ss(ut,We.length===1?We[0]:We)}:We}):S=[yc];var te=-1;S=ra(S,Us(Xr()));var Me=_0(v,function(We,ut,_t){var Tt=ra(S,function(Cn){return Cn(We)});return{criteria:Tt,index:++te,value:We}});return Gi(Me,function(We,ut){return ig(We,ut,L)})}function fl(v,S){return oh(v,S,function(L,te){return yC(v,te)})}function oh(v,S,L){for(var te=-1,Me=S.length,We={};++te<Me;){var ut=S[te],_t=Ss(v,ut);L(_t,ut)&&nf(We,xd(ut,v),_t)}return We}function b0(v){return function(S){return Ss(S,v)}}function nm(v,S,L,te){var Me=te?C0:ko,We=-1,ut=S.length,_t=v;for(v===S&&(S=el(S)),L&&(_t=ra(v,Us(L)));++We<ut;)for(var Tt=0,Cn=S[We],_n=L?L(Cn):Cn;(Tt=Me(_t,_n,Tt,te))>-1;)_t!==v&&Zu.call(_t,Tt,1),Zu.call(v,Tt,1);return v}function Os(v,S){for(var L=v?S.length:0,te=L-1;L--;){var Me=S[L];if(L==te||Me!==We){var We=Me;x(Me)?Zu.call(v,Me,1):am(v,Me)}}return v}function rm(v,S){return v+tA(OA()*(S-v+1))}function im(v,S,L,te){for(var Me=-1,We=ao(Mo((S-v)/(L||1)),0),ut=jt(We);We--;)ut[te?We:++Me]=v,v+=L;return ut}function x0(v,S){var L="";if(!v||S<1||S>st)return L;do S%2&&(L+=v),S=tA(S/2),S&&(v+=v);while(S);return L}function Qi(v,S){return _r(kn(v,S,yc),v+"")}function w0(v){return Dt(Bg(v))}function M0(v,S){var L=Bg(v);return qa(L,In(S,0,L.length))}function nf(v,S,L,te){if(!xn(v))return v;S=xd(S,v);for(var Me=-1,We=S.length,ut=We-1,_t=v;_t!=null&&++Me<We;){var Tt=Fa(S[Me]),Cn=L;if(Tt==="__proto__"||Tt==="constructor"||Tt==="prototype")return v;if(Me!=ut){var _n=_t[Tt];Cn=te?te(_n,Tt,_t):t,Cn===t&&(Cn=xn(_n)?_n:x(S[Me+1])?[]:{})}Ut(_t,Tt,Cn),_t=_t[Tt]}return v}var om=$o?function(v,S){return $o.set(v,S),v}:yc,tg=nc?function(v,S){return nc(v,"toString",{configurable:!0,enumerable:!1,value:jM(S),writable:!0})}:yc;function S0(v){return qa(Bg(v))}function La(v,S,L){var te=-1,Me=v.length;S<0&&(S=-S>Me?0:Me+S),L=L>Me?Me:L,L<0&&(L+=Me),Me=S>L?0:L-S>>>0,S>>>=0;for(var We=jt(Me);++te<Me;)We[te]=v[te+S];return We}function pl(v,S){var L;return Wr(v,function(te,Me,We){return L=S(te,Me,We),!L}),!!L}function Cd(v,S,L){var te=0,Me=v==null?te:v.length;if(typeof S=="number"&&S===S&&Me<=Jt){for(;te<Me;){var We=te+Me>>>1,ut=v[We];ut!==null&&!Xo(ut)&&(L?ut<=S:ut<S)?te=We+1:Me=We}return Me}return ah(v,S,yc,L)}function ah(v,S,L,te){var Me=0,We=v==null?0:v.length;if(We===0)return 0;S=L(S);for(var ut=S!==S,_t=S===null,Tt=Xo(S),Cn=S===t;Me<We;){var _n=tA((Me+We)/2),Tn=L(v[_n]),pr=Tn!==t,Hr=Tn===null,bi=Tn===Tn,lo=Xo(Tn);if(ut)var xi=te||bi;else Cn?xi=bi&&(te||pr):_t?xi=bi&&pr&&(te||!Hr):Tt?xi=bi&&pr&&!Hr&&(te||!lo):Hr||lo?xi=!1:xi=te?Tn<=S:Tn<S;xi?Me=_n+1:We=_n}return ca(We,Xe)}function kA(v,S){for(var L=-1,te=v.length,Me=0,We=[];++L<te;){var ut=v[L],_t=S?S(ut):ut;if(!L||!K(_t,Tt)){var Tt=_t;We[Me++]=ut===0?0:ut}}return We}function ng(v){return typeof v=="number"?v:Xo(v)?Re:+v}function Ku(v){if(typeof v=="string")return v;if(re(v))return ra(v,Ku)+"";if(Xo(v))return qh?qh.call(v):"";var S=v+"";return S=="0"&&1/v==-yt?"-0":S}function Pu(v,S,L){var te=-1,Me=ud,We=v.length,ut=!0,_t=[],Tt=_t;if(L)ut=!1,Me=YA;else if(We>=i){var Cn=S?null:sg(v);if(Cn)return Sl(Cn);ut=!1,Me=au,Tt=new Y}else Tt=S?[]:_t;e:for(;++te<We;){var _n=v[te],Tn=S?S(_n):_n;if(_n=L||_n!==0?_n:0,ut&&Tn===Tn){for(var pr=Tt.length;pr--;)if(Tt[pr]===Tn)continue e;S&&Tt.push(Tn),_t.push(_n)}else Me(Tt,Tn,L)||(Tt!==_t&&Tt.push(Tn),_t.push(_n))}return _t}function am(v,S){return S=xd(S,v),v=Vn(v,S),v==null||delete v[Fa(KA(S))]}function cp(v,S,L,te){return nf(v,S,L(Ss(v,S)),te)}function _d(v,S,L,te){for(var Me=v.length,We=te?Me:-1;(te?We--:++We<Me)&&S(v[We],We,v););return L?La(v,te?0:We,te?We+1:Me):La(v,te?We+1:0,te?Me:We)}function rf(v,S){var L=v;return L instanceof Yr&&(L=L.value()),Vd(S,function(te,Me){return Me.func.apply(Me.thisArg,Qu([te],Me.args))},L)}function hu(v,S,L){var te=v.length;if(te<2)return te?Pu(v[0]):[];for(var Me=-1,We=jt(te);++Me<te;)for(var ut=v[Me],_t=-1;++_t<te;)_t!=Me&&(We[Me]=ei(We[Me]||ut,v[_t],S,L));return Pu(so(We,1),S,L)}function bd(v,S,L){for(var te=-1,Me=v.length,We=S.length,ut={};++te<Me;){var _t=te<We?S[te]:t;L(ut,v[te],_t)}return ut}function dp(v){return Be(v)?v:[]}function hp(v){return typeof v=="function"?v:yc}function xd(v,S){return re(v)?v:B(v,S)?[v]:xa(pi(v))}var fp=Qi;function Rc(v,S,L){var te=v.length;return L=L===t?te:L,!S&&L>=te?v:La(v,S,L)}var rg=eh||function(v){return vr.clearTimeout(v)};function E0(v,S){if(S)return v.slice();var L=v.length,te=ec?ec(L):new v.constructor(L);return v.copy(te),te}function wd(v){var S=new v.constructor(v.byteLength);return new Vu(S).set(new Vu(v)),S}function Qv(v,S){var L=S?wd(v.buffer):v.buffer;return new v.constructor(L,v.byteOffset,v.byteLength)}function of(v){var S=new v.constructor(v.source,Fr.exec(v));return S.lastIndex=v.lastIndex,S}function pp(v){return BA?Ko(BA.call(v)):{}}function ba(v,S){var L=S?wd(v.buffer):v.buffer;return new v.constructor(L,v.byteOffset,v.length)}function af(v,S){if(v!==S){var L=v!==t,te=v===null,Me=v===v,We=Xo(v),ut=S!==t,_t=S===null,Tt=S===S,Cn=Xo(S);if(!_t&&!Cn&&!We&&v>S||We&&ut&&Tt&&!_t&&!Cn||te&&ut&&Tt||!L&&Tt||!Me)return 1;if(!te&&!We&&!Cn&&v<S||Cn&&L&&Me&&!te&&!We||_t&&L&&Me||!ut&&Me||!Tt)return-1}return 0}function ig(v,S,L){for(var te=-1,Me=v.criteria,We=S.criteria,ut=Me.length,_t=L.length;++te<ut;){var Tt=af(Me[te],We[te]);if(Tt){if(te>=_t)return Tt;var Cn=L[te];return Tt*(Cn=="desc"?-1:1)}}return v.index-S.index}function sh(v,S,L,te){for(var Me=-1,We=v.length,ut=L.length,_t=-1,Tt=S.length,Cn=ao(We-ut,0),_n=jt(Tt+Cn),Tn=!te;++_t<Tt;)_n[_t]=S[_t];for(;++Me<ut;)(Tn||Me<We)&&(_n[L[Me]]=v[Me]);for(;Cn--;)_n[_t++]=v[Me++];return _n}function sf(v,S,L,te){for(var Me=-1,We=v.length,ut=-1,_t=L.length,Tt=-1,Cn=S.length,_n=ao(We-_t,0),Tn=jt(_n+Cn),pr=!te;++Me<_n;)Tn[Me]=v[Me];for(var Hr=Me;++Tt<Cn;)Tn[Hr+Tt]=S[Tt];for(;++ut<_t;)(pr||Me<We)&&(Tn[Hr+L[ut]]=v[Me++]);return Tn}function el(v,S){var L=-1,te=v.length;for(S||(S=jt(te));++L<te;)S[L]=v[L];return S}function sA(v,S,L,te){var Me=!L;L||(L={});for(var We=-1,ut=S.length;++We<ut;){var _t=S[We],Tt=te?te(L[_t],v[_t],_t,L,v):t;Tt===t&&(Tt=v[_t]),Me?qn(L,_t,Tt):Ut(L,_t,Tt)}return L}function O0(v,S){return sA(v,jc(v),S)}function mp(v,S){return sA(v,ug(v),S)}function Md(v,S){return function(L,te){var Me=re(L)?v0:hn,We=S?S():{};return Me(L,v,Xr(te,2),We)}}function lA(v){return Qi(function(S,L){var te=-1,Me=L.length,We=Me>1?L[Me-1]:t,ut=Me>2?L[2]:t;for(We=v.length>3&&typeof We=="function"?(Me--,We):t,ut&&b(L[0],L[1],ut)&&(We=Me<3?t:We,Me=1),S=Ko(S);++te<Me;){var _t=L[te];_t&&v(S,_t,te,We)}return S})}function lh(v,S){return function(L,te){if(L==null)return L;if(!be(L))return v(L,te);for(var Me=L.length,We=S?Me:-1,ut=Ko(L);(S?We--:++We<Me)&&te(ut[We],We,ut)!==!1;);return L}}function og(v){return function(S,L,te){for(var Me=-1,We=Ko(S),ut=te(S),_t=ut.length;_t--;){var Tt=ut[v?_t:++Me];if(L(We[Tt],Tt,We)===!1)break}return S}}function B0(v,S,L){var te=S&H,Me=uh(v);function We(){var ut=this&&this!==vr&&this instanceof We?Me:v;return ut.apply(te?L:this,arguments)}return We}function lf(v){return function(S){S=pi(S);var L=XA(S)?jl(S):t,te=L?L[0]:S.charAt(0),Me=L?Rc(L,1).join(""):S.slice(1);return te[v]()+Me}}function uf(v){return function(S){return Vd(Rk(Uk(S).replace(Go,"")),v,"")}}function uh(v){return function(){var S=arguments;switch(S.length){case 0:return new v;case 1:return new v(S[0]);case 2:return new v(S[0],S[1]);case 3:return new v(S[0],S[1],S[2]);case 4:return new v(S[0],S[1],S[2],S[3]);case 5:return new v(S[0],S[1],S[2],S[3],S[4]);case 6:return new v(S[0],S[1],S[2],S[3],S[4],S[5]);case 7:return new v(S[0],S[1],S[2],S[3],S[4],S[5],S[6])}var L=oc(v.prototype),te=v.apply(L,S);return xn(te)?te:L}}function Yv(v,S,L){var te=uh(v);function Me(){for(var We=arguments.length,ut=jt(We),_t=We,Tt=hf(Me);_t--;)ut[_t]=arguments[_t];var Cn=We<3&&ut[0]!==Tt&&ut[We-1]!==Tt?[]:Rl(ut,Tt);if(We-=Cn.length,We<L)return uA(v,S,Af,Me.placeholder,t,ut,Cn,t,t,L-We);var _n=this&&this!==vr&&this instanceof Me?te:v;return ga(_n,this,ut)}return Me}function gp(v){return function(S,L,te){var Me=Ko(S);if(!be(S)){var We=Xr(L,3);S=Tl(S),L=function(_t){return We(Me[_t],_t,Me)}}var ut=v(S,L,te);return ut>-1?Me[We?S[ut]:ut]:t}}function sm(v){return cc(function(S){var L=S.length,te=L,Me=$i.prototype.thru;for(v&&S.reverse();te--;){var We=S[te];if(typeof We!="function")throw new Po(a);if(Me&&!ut&&hh(We)=="wrapper")var ut=new $i([],!0)}for(te=ut?te:L;++te<L;){We=S[te];var _t=hh(We),Tt=_t=="wrapper"?zc(We):t;Tt&&q(Tt[0])&&Tt[1]==(X|Z|pe|oe)&&!Tt[4].length&&Tt[9]==1?ut=ut[hh(Tt[0])].apply(ut,Tt[3]):ut=We.length==1&&q(We)?ut[_t]():ut.thru(We)}return function(){var Cn=arguments,_n=Cn[0];if(ut&&Cn.length==1&&re(_n))return ut.plant(_n).value();for(var Tn=0,pr=L?S[Tn].apply(this,Cn):_n;++Tn<L;)pr=S[Tn].call(this,pr);return pr}})}function Af(v,S,L,te,Me,We,ut,_t,Tt,Cn){var _n=S&X,Tn=S&H,pr=S&Q,Hr=S&(Z|ae),bi=S&Ce,lo=pr?t:uh(v);function xi(){for(var bo=arguments.length,Do=jt(bo),Gc=bo;Gc--;)Do[Gc]=arguments[Gc];if(Hr)var FA=hf(xi),$c=Wh(Do,FA);if(te&&(Do=sh(Do,te,Me,Hr)),We&&(Do=sf(Do,We,ut,Hr)),bo-=$c,Hr&&bo<Cn){var ml=Rl(Do,FA);return uA(v,S,Af,xi.placeholder,L,Do,ml,_t,Tt,Cn-bo)}var Ch=Tn?L:this,bp=pr?Ch[v]:v;return bo=Do.length,_t?Do=bn(Do,_t):bi&&bo>1&&Do.reverse(),_n&&Tt<bo&&(Do.length=Tt),this&&this!==vr&&this instanceof xi&&(bp=lo||uh(bp)),bp.apply(Ch,Do)}return xi}function lm(v,S){return function(L,te){return Di(L,v,S(te),{})}}function Ah(v,S){return function(L,te){var Me;if(L===t&&te===t)return S;if(L!==t&&(Me=L),te!==t){if(Me===t)return te;typeof L=="string"||typeof te=="string"?(L=Ku(L),te=Ku(te)):(L=ng(L),te=ng(te)),Me=v(L,te)}return Me}}function um(v){return cc(function(S){return S=ra(S,Us(Xr())),Qi(function(L){var te=this;return v(S,function(Me){return ga(Me,te,L)})})})}function Am(v,S){S=S===t?" ":Ku(S);var L=S.length;if(L<2)return L?x0(S,v):S;var te=x0(S,Mo(v/Bu(S)));return XA(S)?Rc(jl(te),0,v).join(""):te.slice(0,v)}function ag(v,S,L,te){var Me=S&H,We=uh(v);function ut(){for(var _t=-1,Tt=arguments.length,Cn=-1,_n=te.length,Tn=jt(_n+Tt),pr=this&&this!==vr&&this instanceof ut?We:v;++Cn<_n;)Tn[Cn]=te[Cn];for(;Tt--;)Tn[Cn++]=arguments[++_t];return ga(pr,Me?L:this,Tn)}return ut}function ch(v){return function(S,L,te){return te&&typeof te!="number"&&b(S,L,te)&&(L=te=t),S=fs(S),L===t?(L=S,S=0):L=fs(L),te=te===t?S<L?1:-1:fs(te),im(S,L,te,v)}}function yp(v){return function(S,L){return typeof S=="string"&&typeof L=="string"||(S=oi(S),L=oi(L)),v(S,L)}}function uA(v,S,L,te,Me,We,ut,_t,Tt,Cn){var _n=S&Z,Tn=_n?ut:t,pr=_n?t:ut,Hr=_n?We:t,bi=_n?t:We;S|=_n?pe:fe,S&=~(_n?fe:pe),S&N||(S&=~(H|Q));var lo=[v,S,Me,Hr,Tn,bi,pr,_t,Tt,Cn],xi=L.apply(t,lo);return q(v)&&lr(xi,lo),xi.placeholder=te,fi(xi,v,S)}function I0(v){var S=Pa[v];return function(L,te){if(L=oi(L),te=te==null?0:ca(Jr(te),292),te&&Qh(L)){var Me=(pi(L)+"e").split("e"),We=S(Me[0]+"e"+(+Me[1]+te));return Me=(pi(We)+"e").split("e"),+(Me[0]+"e"+(+Me[1]-te))}return S(L)}}var sg=ka&&1/Sl(new ka([,-0]))[1]==yt?function(v){return new ka(v)}:GM;function dh(v){return function(S){var L=zs(S);return L==St?Kc(S):L==tr?ya(S):Fo(S,v(S))}}function _o(v,S,L,te,Me,We,ut,_t){var Tt=S&Q;if(!Tt&&typeof v!="function")throw new Po(a);var Cn=te?te.length:0;if(Cn||(S&=~(pe|fe),te=Me=t),ut=ut===t?ut:ao(Jr(ut),0),_t=_t===t?_t:Jr(_t),Cn-=Me?Me.length:0,S&fe){var _n=te,Tn=Me;te=Me=t}var pr=Tt?t:zc(v),Hr=[v,S,L,te,Me,_n,Tn,We,ut,_t];if(pr&&Ct(Hr,pr),v=Hr[0],S=Hr[1],L=Hr[2],te=Hr[3],Me=Hr[4],_t=Hr[9]=Hr[9]===t?Tt?0:v.length:ao(Hr[9]-Cn,0),!_t&&S&(Z|ae)&&(S&=~(Z|ae)),!S||S==H)var bi=B0(v,S,L);else S==Z||S==ae?bi=Yv(v,S,_t):(S==pe||S==(H|pe))&&!Me.length?bi=ag(v,S,L,te):bi=Af.apply(t,Hr);var lo=pr?om:lr;return fi(lo(bi,Hr),v,S)}function lg(v,S,L,te){return v===t||K(v,Qa[L])&&!Hi.call(te,L)?S:v}function cm(v,S,L,te,Me,We){return xn(v)&&xn(S)&&(We.set(S,v),du(v,S,t,cm,We),We.delete(S)),v}function cf(v){return Ua(v)?t:v}function Du(v,S,L,te,Me,We){var ut=L&D,_t=v.length,Tt=S.length;if(_t!=Tt&&!(ut&&Tt>_t))return!1;var Cn=We.get(v),_n=We.get(S);if(Cn&&_n)return Cn==S&&_n==v;var Tn=-1,pr=!0,Hr=L&$?new Y:t;for(We.set(v,S),We.set(S,v);++Tn<_t;){var bi=v[Tn],lo=S[Tn];if(te)var xi=ut?te(lo,bi,Tn,S,v,We):te(bi,lo,Tn,v,S,We);if(xi!==t){if(xi)continue;pr=!1;break}if(Hr){if(!kc(S,function(bo,Do){if(!au(Hr,Do)&&(bi===bo||Me(bi,bo,L,te,We)))return Hr.push(Do)})){pr=!1;break}}else if(!(bi===lo||Me(bi,lo,L,te,We))){pr=!1;break}}return We.delete(v),We.delete(S),pr}function dm(v,S,L,te,Me,We,ut){switch(L){case ee:if(v.byteLength!=S.byteLength||v.byteOffset!=S.byteOffset)return!1;v=v.buffer,S=S.buffer;case Ee:return!(v.byteLength!=S.byteLength||!We(new Vu(v),new Vu(S)));case ke:case ge:case Rt:return K(+v,+S);case ze:return v.name==S.name&&v.message==S.message;case yn:case dr:return v==S+"";case St:var _t=Kc;case tr:var Tt=te&D;if(_t||(_t=Sl),v.size!=S.size&&!Tt)return!1;var Cn=ut.get(v);if(Cn)return Cn==S;te|=$,ut.set(v,S);var _n=Du(_t(v),_t(S),te,Me,We,ut);return ut.delete(v),_n;case Sr:if(BA)return BA.call(v)==BA.call(S)}return!1}function k0(v,S,L,te,Me,We){var ut=L&D,_t=hm(v),Tt=_t.length,Cn=hm(S),_n=Cn.length;if(Tt!=_n&&!ut)return!1;for(var Tn=Tt;Tn--;){var pr=_t[Tn];if(!(ut?pr in S:Hi.call(S,pr)))return!1}var Hr=We.get(v),bi=We.get(S);if(Hr&&bi)return Hr==S&&bi==v;var lo=!0;We.set(v,S),We.set(S,v);for(var xi=ut;++Tn<Tt;){pr=_t[Tn];var bo=v[pr],Do=S[pr];if(te)var Gc=ut?te(Do,bo,pr,S,v,We):te(bo,Do,pr,v,S,We);if(!(Gc===t?bo===Do||Me(bo,Do,L,te,We):Gc)){lo=!1;break}xi||(xi=pr=="constructor")}if(lo&&!xi){var FA=v.constructor,$c=S.constructor;FA!=$c&&"constructor"in v&&"constructor"in S&&!(typeof FA=="function"&&FA instanceof FA&&typeof $c=="function"&&$c instanceof $c)&&(lo=!1)}return We.delete(v),We.delete(S),lo}function cc(v){return _r(kn(v,t,Va),v+"")}function hm(v){return zi(v,Tl,jc)}function df(v){return zi(v,Ha,ug)}var zc=$o?function(v){return $o.get(v)}:GM;function hh(v){for(var S=v.name+"",L=Qo[S],te=Hi.call(Qo,S)?L.length:0;te--;){var Me=L[te],We=Me.func;if(We==null||We==v)return Me.name}return S}function hf(v){var S=Hi.call(Fe,"placeholder")?Fe:v;return S.placeholder}function Xr(){var v=Fe.iteratee||NM;return v=v===NM?oA:v,arguments.length?v(arguments[0],arguments[1]):v}function ff(v,S){var L=v.__data__;return U(S)?L[typeof S=="string"?"string":"hash"]:L.map}function So(v){for(var S=Tl(v),L=S.length;L--;){var te=S[L],Me=v[te];S[L]=[te,Me,Qe(Me)]}return S}function Sd(v,S){var L=ZA(v,S);return IA(L)?L:t}function vp(v){var S=Hi.call(v,Ju),L=v[Ju];try{v[Ju]=t;var te=!0}catch{}var Me=lu.call(v);return te&&(S?v[Ju]=L:delete v[Ju]),Me}var jc=hd?function(v){return v==null?[]:(v=Ko(v),$u(hd(v),function(S){return tc.call(v,S)}))}:$M,ug=hd?function(v){for(var S=[];v;)Qu(S,jc(v)),v=Hu(v);return S}:$M,zs=Bi;(rc&&zs(new rc(new ArrayBuffer(1)))!=ee||da&&zs(new da)!=St||ic&&zs(ic.resolve())!=or||ka&&zs(new ka)!=tr||nA&&zs(new nA)!=yr)&&(zs=function(v){var S=Bi(v),L=S==mt?v.constructor:t,te=L?As(L):"";if(te)switch(te){case op:return ee;case th:return St;case rA:return or;case El:return tr;case ap:return yr}return S});function qv(v,S,L){for(var te=-1,Me=L.length;++te<Me;){var We=L[te],ut=We.size;switch(We.type){case"drop":v+=ut;break;case"dropRight":S-=ut;break;case"take":S=ca(S,v+ut);break;case"takeRight":v=ao(v,S-ut);break}}return{start:v,end:S}}function Ya(v){var S=v.match(Bn);return S?S[1].split(Hn):[]}function Ag(v,S,L){S=xd(S,v);for(var te=-1,Me=S.length,We=!1;++te<Me;){var ut=Fa(S[te]);if(!(We=v!=null&&L(v,ut)))break;v=v[ut]}return We||++te!=Me?We:(Me=v==null?0:v.length,!!Me&&Xn(Me)&&x(ut,Me)&&(re(v)||J(v)))}function Vv(v){var S=v.length,L=new v.constructor(S);return S&&typeof v[0]=="string"&&Hi.call(v,"index")&&(L.index=v.index,L.input=v.input),L}function T0(v){return typeof v.constructor=="function"&&!ve(v)?oc(Hu(v)):{}}function pf(v,S,L){var te=v.constructor;switch(S){case Ee:return wd(v);case ke:case ge:return new te(+v);case ee:return Qv(v,L);case V:case Ke:case At:case Bt:case kt:case Lt:case fn:case Pn:case On:return ba(v,L);case St:return new te;case Rt:case dr:return new te(v);case yn:return of(v);case tr:return new te;case Sr:return pp(v)}}function A(v,S){var L=S.length;if(!L)return v;var te=L-1;return S[te]=(L>1?"& ":"")+S[te],S=S.join(L>2?", ":" "),v.replace(Fn,`{
/* [wrapped with `+S+`] */
`)}function p(v){return re(v)||J(v)||!!(np&&v&&v[np])}function x(v,S){var L=typeof v;return S=S??st,!!S&&(L=="number"||L!="symbol"&&ho.test(v))&&v>-1&&v%1==0&&v<S}function b(v,S,L){if(!xn(L))return!1;var te=typeof S;return(te=="number"?be(L)&&x(S,L.length):te=="string"&&S in L)?K(L[S],v):!1}function B(v,S){if(re(v))return!1;var L=typeof v;return L=="number"||L=="symbol"||L=="boolean"||v==null||Xo(v)?!0:pt.test(v)||!lt.test(v)||S!=null&&v in Ko(S)}function U(v){var S=typeof v;return S=="string"||S=="number"||S=="symbol"||S=="boolean"?v!=="__proto__":v===null}function q(v){var S=hh(v),L=Fe[S];if(typeof L!="function"||!(S in Yr.prototype))return!1;if(v===L)return!0;var te=zc(L);return!!te&&v===te[0]}function ne(v){return!!$h&&$h in v}var ue=qu?zn:QM;function ve(v){var S=v&&v.constructor,L=typeof S=="function"&&S.prototype||Qa;return v===L}function Qe(v){return v===v&&!xn(v)}function nt(v,S){return function(L){return L==null?!1:L[v]===S&&(S!==t||v in Ko(L))}}function Ot(v){var S=vm(v,function(te){return L.size===f&&L.clear(),te}),L=S.cache;return S}function Ct(v,S){var L=v[1],te=S[1],Me=L|te,We=Me<(H|Q|X),ut=te==X&&L==Z||te==X&&L==oe&&v[7].length<=S[8]||te==(X|oe)&&S[7].length<=S[8]&&L==Z;if(!(We||ut))return v;te&H&&(v[2]=S[2],Me|=L&H?0:N);var _t=S[3];if(_t){var Tt=v[3];v[3]=Tt?sh(Tt,_t,S[4]):_t,v[4]=Tt?Rl(v[3],C):S[4]}return _t=S[5],_t&&(Tt=v[5],v[5]=Tt?sf(Tt,_t,S[6]):_t,v[6]=Tt?Rl(v[5],C):S[6]),_t=S[7],_t&&(v[7]=_t),te&X&&(v[8]=v[8]==null?S[8]:ca(v[8],S[8])),v[9]==null&&(v[9]=S[9]),v[0]=S[0],v[1]=Me,v}function Nt(v){var S=[];if(v!=null)for(var L in Ko(v))S.push(L);return S}function cn(v){return lu.call(v)}function kn(v,S,L){return S=ao(S===t?v.length-1:S,0),function(){for(var te=arguments,Me=-1,We=ao(te.length-S,0),ut=jt(We);++Me<We;)ut[Me]=te[S+Me];Me=-1;for(var _t=jt(S+1);++Me<S;)_t[Me]=te[Me];return _t[S]=L(ut),ga(v,this,_t)}}function Vn(v,S){return S.length<2?v:Ss(v,La(S,0,-1))}function bn(v,S){for(var L=v.length,te=ca(S.length,L),Me=el(v);te--;){var We=S[te];v[te]=x(We,L)?Me[We]:t}return v}function Rn(v,S){if(!(S==="constructor"&&typeof v[S]=="function")&&S!="__proto__")return v[S]}var lr=Ro(om),Tr=eA||function(v,S){return vr.setTimeout(v,S)},_r=Ro(tg);function fi(v,S,L){var te=S+"";return _r(v,A(te,cs(Ya(te),L)))}function Ro(v){var S=0,L=0;return function(){var te=xr(),Me=he-(te-L);if(L=te,Me>0){if(++S>=Pe)return arguments[0]}else S=0;return v.apply(t,arguments)}}function qa(v,S){var L=-1,te=v.length,Me=te-1;for(S=S===t?te:S;++L<S;){var We=rm(L,Me),ut=v[We];v[We]=v[L],v[L]=ut}return v.length=S,v}var xa=Ot(function(v){var S=[];return v.charCodeAt(0)===46&&S.push(""),v.replace(et,function(L,te,Me,We){S.push(Me?We.replace(Qr,"$1"):te||L)}),S});function Fa(v){if(typeof v=="string"||Xo(v))return v;var S=v+"";return S=="0"&&1/v==-yt?"-0":S}function As(v){if(v!=null){try{return ls.call(v)}catch{}try{return v+""}catch{}}return""}function cs(v,S){return ou(Ht,function(L){var te="_."+L[0];S&L[1]&&!ud(v,te)&&v.push(te)}),v.sort()}function Ol(v){if(v instanceof Yr)return v.clone();var S=new $i(v.__wrapped__,v.__chain__);return S.__actions__=el(v.__actions__),S.__index__=v.__index__,S.__values__=v.__values__,S}function tl(v,S,L){(L?b(v,S,L):S===t)?S=1:S=ao(Jr(S),0);var te=v==null?0:v.length;if(!te||S<1)return[];for(var Me=0,We=0,ut=jt(Mo(te/S));Me<te;)ut[We++]=La(v,Me,Me+=S);return ut}function Bs(v){for(var S=-1,L=v==null?0:v.length,te=0,Me=[];++S<L;){var We=v[S];We&&(Me[te++]=We)}return Me}function ds(){var v=arguments.length;if(!v)return[];for(var S=jt(v-1),L=arguments[0],te=v;te--;)S[te-1]=arguments[te];return Qu(re(L)?el(L):[L],so(S,1))}var ha=Qi(function(v,S){return Be(v)?ei(v,so(S,1,Be,!0)):[]}),Is=Qi(function(v,S){var L=KA(S);return Be(L)&&(L=t),Be(v)?ei(v,so(S,1,Be,!0),Xr(L,2)):[]}),fh=Qi(function(v,S){var L=KA(S);return Be(L)&&(L=t),Be(v)?ei(v,so(S,1,Be,!0),t,L):[]});function dc(v,S,L){var te=v==null?0:v.length;return te?(S=L||S===t?1:Jr(S),La(v,S<0?0:S,te)):[]}function js(v,S,L){var te=v==null?0:v.length;return te?(S=L||S===t?1:Jr(S),S=te-S,La(v,0,S<0?0:S)):[]}function hc(v,S){return v&&v.length?_d(v,Xr(S,3),!0,!0):[]}function Ns(v,S){return v&&v.length?_d(v,Xr(S,3),!0):[]}function K0(v,S,L,te){var Me=v==null?0:v.length;return Me?(L&&typeof L!="number"&&b(v,S,L)&&(L=0,te=Me),Da(v,S,L,te)):[]}function TA(v,S,L){var te=v==null?0:v.length;if(!te)return-1;var Me=L==null?0:Jr(L);return Me<0&&(Me=ao(te+Me,0)),Ki(v,Xr(S,3),Me)}function Nc(v,S,L){var te=v==null?0:v.length;if(!te)return-1;var Me=te-1;return L!==t&&(Me=Jr(L),Me=L<0?ao(te+Me,0):ca(Me,te-1)),Ki(v,Xr(S,3),Me,!0)}function Va(v){var S=v==null?0:v.length;return S?so(v,1):[]}function nl(v){var S=v==null?0:v.length;return S?so(v,yt):[]}function ph(v,S){var L=v==null?0:v.length;return L?(S=S===t?1:Jr(S),so(v,S)):[]}function fc(v){for(var S=-1,L=v==null?0:v.length,te={};++S<L;){var Me=v[S];te[Me[0]]=Me[1]}return te}function fm(v){return v&&v.length?v[0]:t}function P0(v,S,L){var te=v==null?0:v.length;if(!te)return-1;var Me=L==null?0:Jr(L);return Me<0&&(Me=ao(te+Me,0)),ko(v,S,Me)}function pm(v){var S=v==null?0:v.length;return S?La(v,0,-1):[]}var cg=Qi(function(v){var S=ra(v,dp);return S.length&&S[0]===v[0]?Es(S):[]}),dg=Qi(function(v){var S=KA(v),L=ra(v,dp);return S===KA(L)?S=t:L.pop(),L.length&&L[0]===v[0]?Es(L,Xr(S,2)):[]}),dM=Qi(function(v){var S=KA(v),L=ra(v,dp);return S=typeof S=="function"?S:t,S&&L.pop(),L.length&&L[0]===v[0]?Es(L,t,S):[]});function _x(v,S){return v==null?"":Yh.call(v,S)}function KA(v){var S=v==null?0:v.length;return S?v[S-1]:t}function hM(v,S,L){var te=v==null?0:v.length;if(!te)return-1;var Me=te;return L!==t&&(Me=Jr(L),Me=Me<0?ao(te+Me,0):ca(Me,te-1)),S===S?zl(v,S,Me):Ki(v,jh,Me,!0)}function bx(v,S){return v&&v.length?ih(v,Jr(S)):t}var xx=Qi(hg);function hg(v,S){return v&&v.length&&S&&S.length?nm(v,S):v}function Hv(v,S,L){return v&&v.length&&S&&S.length?nm(v,S,Xr(L,2)):v}function fM(v,S,L){return v&&v.length&&S&&S.length?nm(v,S,t,L):v}var pM=cc(function(v,S){var L=v==null?0:v.length,te=qr(v,S);return Os(v,ra(S,function(Me){return x(Me,L)?+Me:Me}).sort(af)),te});function wx(v,S){var L=[];if(!(v&&v.length))return L;var te=-1,Me=[],We=v.length;for(S=Xr(S,3);++te<We;){var ut=v[te];S(ut,te,v)&&(L.push(ut),Me.push(te))}return Os(v,Me),L}function Cp(v){return v==null?v:Fc.call(v)}function Ed(v,S,L){var te=v==null?0:v.length;return te?(L&&typeof L!="number"&&b(v,S,L)?(S=0,L=te):(S=S==null?0:Jr(S),L=L===t?te:Jr(L)),La(v,S,L)):[]}function mf(v,S){return Cd(v,S)}function Mx(v,S,L){return ah(v,S,Xr(L,2))}function Zv(v,S){var L=v==null?0:v.length;if(L){var te=Cd(v,S);if(te<L&&K(v[te],S))return te}return-1}function mM(v,S){return Cd(v,S,!0)}function gM(v,S,L){return ah(v,S,Xr(L,2),!0)}function fg(v,S){var L=v==null?0:v.length;if(L){var te=Cd(v,S,!0)-1;if(K(v[te],S))return te}return-1}function Xv(v){return v&&v.length?kA(v):[]}function yM(v,S){return v&&v.length?kA(v,Xr(S,2)):[]}function Jv(v){var S=v==null?0:v.length;return S?La(v,1,S):[]}function eC(v,S,L){return v&&v.length?(S=L||S===t?1:Jr(S),La(v,0,S<0?0:S)):[]}function mm(v,S,L){var te=v==null?0:v.length;return te?(S=L||S===t?1:Jr(S),S=te-S,La(v,S<0?0:S,te)):[]}function Sx(v,S){return v&&v.length?_d(v,Xr(S,3),!1,!0):[]}function Ex(v,S){return v&&v.length?_d(v,Xr(S,3)):[]}var tC=Qi(function(v){return Pu(so(v,1,Be,!0))}),Ox=Qi(function(v){var S=KA(v);return Be(S)&&(S=t),Pu(so(v,1,Be,!0),Xr(S,2))}),pg=Qi(function(v){var S=KA(v);return S=typeof S=="function"?S:t,Pu(so(v,1,Be,!0),t,S)});function Bx(v){return v&&v.length?Pu(v):[]}function vM(v,S){return v&&v.length?Pu(v,Xr(S,2)):[]}function CM(v,S){return S=typeof S=="function"?S:t,v&&v.length?Pu(v,t,S):[]}function mg(v){if(!(v&&v.length))return[];var S=0;return v=$u(v,function(L){if(Be(L))return S=ao(L.length,S),!0}),To(S,function(L){return ra(v,Jf(L))})}function Ix(v,S){if(!(v&&v.length))return[];var L=mg(v);return S==null?L:ra(L,function(te){return ga(S,t,te)})}var _M=Qi(function(v,S){return Be(v)?ei(v,S):[]}),bM=Qi(function(v){return hu($u(v,Be))}),xM=Qi(function(v){var S=KA(v);return Be(S)&&(S=t),hu($u(v,Be),Xr(S,2))}),nC=Qi(function(v){var S=KA(v);return S=typeof S=="function"?S:t,hu($u(v,Be),t,S)}),gf=Qi(mg);function kx(v,S){return bd(v||[],S||[],Ut)}function Tx(v,S){return bd(v||[],S||[],nf)}var Kx=Qi(function(v){var S=v.length,L=S>1?v[S-1]:t;return L=typeof L=="function"?(v.pop(),L):t,Ix(v,L)});function rC(v){var S=Fe(v);return S.__chain__=!0,S}function Px(v,S){return S(v),v}function gm(v,S){return S(v)}var gg=cc(function(v){var S=v.length,L=S?v[0]:0,te=this.__wrapped__,Me=function(We){return qr(We,v)};return S>1||this.__actions__.length||!(te instanceof Yr)||!x(L)?this.thru(Me):(te=te.slice(L,+L+(S?1:0)),te.__actions__.push({func:gm,args:[Me],thisArg:t}),new $i(te,this.__chain__).thru(function(We){return S&&!We.length&&We.push(t),We}))});function Dx(){return rC(this)}function iC(){return new $i(this.value(),this.__chain__)}function Lx(){this.__values__===t&&(this.__values__=Bl(this.value()));var v=this.__index__>=this.__values__.length,S=v?t:this.__values__[this.__index__++];return{done:v,value:S}}function PA(){return this}function D0(v){for(var S,L=this;L instanceof us;){var te=Ol(L);te.__index__=0,te.__values__=t,S?Me.__wrapped__=te:S=te;var Me=te;L=L.__wrapped__}return Me.__wrapped__=v,S}function Fx(){var v=this.__wrapped__;if(v instanceof Yr){var S=v;return this.__actions__.length&&(S=new Yr(this)),S=S.reverse(),S.__actions__.push({func:gm,args:[Cp],thisArg:t}),new $i(S,this.__chain__)}return this.thru(Cp)}function Ux(){return rf(this.__wrapped__,this.__actions__)}var Rx=Md(function(v,S,L){Hi.call(v,L)?++v[L]:qn(v,L,1)});function zx(v,S,L){var te=re(v)?ld:Uo;return L&&b(v,S,L)&&(S=t),te(v,Xr(S,3))}function jx(v,S){var L=re(v)?$u:mo;return L(v,Xr(S,3))}var Nx=gp(TA),wM=gp(Nc);function Wx(v,S){return so(mh(v,S),1)}function yf(v,S){return so(mh(v,S),yt)}function Gx(v,S,L){return L=L===t?1:Jr(L),so(mh(v,S),L)}function oC(v,S){var L=re(v)?ou:Wr;return L(v,Xr(S,3))}function aC(v,S){var L=re(v)?Rh:Ho;return L(v,Xr(S,3))}var $x=Md(function(v,S,L){Hi.call(v,L)?v[L].push(S):qn(v,L,[S])});function MM(v,S,L,te){v=be(v)?v:Bg(v),L=L&&!te?Jr(L):0;var Me=v.length;return L<0&&(L=ao(Me+L,0)),ks(v)?L<=Me&&v.indexOf(S,L)>-1:!!Me&&ko(v,S,L)>-1}var SM=Qi(function(v,S,L){var te=-1,Me=typeof S=="function",We=be(v)?jt(v.length):[];return Wr(v,function(ut){We[++te]=Me?ga(S,ut,L):uc(ut,S,L)}),We}),Qx=Md(function(v,S,L){qn(v,L,S)});function mh(v,S){var L=re(v)?ra:_0;return L(v,Xr(S,3))}function Yx(v,S,L,te){return v==null?[]:(re(S)||(S=S==null?[]:[S]),L=te?t:L,re(L)||(L=L==null?[]:[L]),eg(v,S,L))}var yg=Md(function(v,S,L){v[L?0:1].push(S)},function(){return[[],[]]});function qx(v,S,L){var te=re(v)?Vd:ep,Me=arguments.length<3;return te(v,Xr(S,4),L,Me,Wr)}function vg(v,S,L){var te=re(v)?qA:ep,Me=arguments.length<3;return te(v,Xr(S,4),L,Me,Ho)}function Cg(v,S){var L=re(v)?$u:mo;return L(v,L0(Xr(S,3)))}function _g(v){var S=re(v)?Dt:w0;return S(v)}function EM(v,S,L){(L?b(v,S,L):S===t)?S=1:S=Jr(S);var te=re(v)?tt:M0;return te(v,S)}function OM(v){var S=re(v)?xt:S0;return S(v)}function BM(v){if(v==null)return 0;if(be(v))return ks(v)?Bu(v):v.length;var S=zs(v);return S==St||S==tr?v.size:vd(v).length}function IM(v,S,L){var te=re(v)?kc:pl;return L&&b(v,S,L)&&(S=t),te(v,Xr(S,3))}var ym=Qi(function(v,S){if(v==null)return[];var L=S.length;return L>1&&b(v,S[0],S[1])?S=[]:L>2&&b(S[0],S[1],S[2])&&(S=[S[0]]),eg(v,so(S,1),[])}),Ws=Lc||function(){return vr.Date.now()};function vf(v,S){if(typeof S!="function")throw new Po(a);return v=Jr(v),function(){if(--v<1)return S.apply(this,arguments)}}function bg(v,S,L){return S=L?t:S,S=v&&S==null?v.length:S,_o(v,X,t,t,t,t,S)}function sC(v,S){var L;if(typeof S!="function")throw new Po(a);return v=Jr(v),function(){return--v>0&&(L=S.apply(this,arguments)),v<=1&&(S=t),L}}var xg=Qi(function(v,S,L){var te=H;if(L.length){var Me=Rl(L,hf(xg));te|=pe}return _o(v,te,S,L,Me)}),wg=Qi(function(v,S,L){var te=H|Q;if(L.length){var Me=Rl(L,hf(wg));te|=pe}return _o(S,te,v,L,Me)});function Vx(v,S,L){S=L?t:S;var te=_o(v,Z,t,t,t,t,t,S);return te.placeholder=Vx.placeholder,te}function lC(v,S,L){S=L?t:S;var te=_o(v,ae,t,t,t,t,t,S);return te.placeholder=lC.placeholder,te}function uC(v,S,L){var te,Me,We,ut,_t,Tt,Cn=0,_n=!1,Tn=!1,pr=!0;if(typeof v!="function")throw new Po(a);S=oi(S)||0,xn(L)&&(_n=!!L.leading,Tn="maxWait"in L,We=Tn?ao(oi(L.maxWait)||0,S):We,pr="trailing"in L?!!L.trailing:pr);function Hr(ml){var Ch=te,bp=Me;return te=Me=t,Cn=ml,ut=v.apply(bp,Ch),ut}function bi(ml){return Cn=ml,_t=Tr(bo,S),_n?Hr(ml):ut}function lo(ml){var Ch=ml-Tt,bp=ml-Cn,Nk=S-Ch;return Tn?ca(Nk,We-bp):Nk}function xi(ml){var Ch=ml-Tt,bp=ml-Cn;return Tt===t||Ch>=S||Ch<0||Tn&&bp>=We}function bo(){var ml=Ws();if(xi(ml))return Do(ml);_t=Tr(bo,lo(ml))}function Do(ml){return _t=t,pr&&te?Hr(ml):(te=Me=t,ut)}function Gc(){_t!==t&&rg(_t),Cn=0,te=Tt=Me=_t=t}function FA(){return _t===t?ut:Do(Ws())}function $c(){var ml=Ws(),Ch=xi(ml);if(te=arguments,Me=this,Tt=ml,Ch){if(_t===t)return bi(Tt);if(Tn)return rg(_t),_t=Tr(bo,S),Hr(Tt)}return _t===t&&(_t=Tr(bo,S)),ut}return $c.cancel=Gc,$c.flush=FA,$c}var kM=Qi(function(v,S){return Vr(v,1,S)}),Hx=Qi(function(v,S,L){return Vr(v,oi(S)||0,L)});function AC(v){return _o(v,Ce)}function vm(v,S){if(typeof v!="function"||S!=null&&typeof S!="function")throw new Po(a);var L=function(){var te=arguments,Me=S?S.apply(this,te):te[0],We=L.cache;if(We.has(Me))return We.get(Me);var ut=v.apply(this,te);return L.cache=We.set(Me,ut)||We,ut};return L.cache=new(vm.Cache||m),L}vm.Cache=m;function L0(v){if(typeof v!="function")throw new Po(a);return function(){var S=arguments;switch(S.length){case 0:return!v.call(this);case 1:return!v.call(this,S[0]);case 2:return!v.call(this,S[0],S[1]);case 3:return!v.call(this,S[0],S[1],S[2])}return!v.apply(this,S)}}function F0(v){return sC(2,v)}var cC=fp(function(v,S){S=S.length==1&&re(S[0])?ra(S[0],Us(Xr())):ra(so(S,1),Us(Xr()));var L=S.length;return Qi(function(te){for(var Me=-1,We=ca(te.length,L);++Me<We;)te[Me]=S[Me].call(this,te[Me]);return ga(v,this,te)})}),Mg=Qi(function(v,S){var L=Rl(S,hf(Mg));return _o(v,pe,t,S,L)}),Sg=Qi(function(v,S){var L=Rl(S,hf(Sg));return _o(v,fe,t,S,L)}),Eg=cc(function(v,S){return _o(v,oe,t,t,t,S)});function U0(v,S){if(typeof v!="function")throw new Po(a);return S=S===t?S:Jr(S),Qi(v,S)}function dC(v,S){if(typeof v!="function")throw new Po(a);return S=S==null?0:ao(Jr(S),0),Qi(function(L){var te=L[S],Me=Rc(L,0,S);return te&&Qu(Me,te),ga(v,this,Me)})}function hC(v,S,L){var te=!0,Me=!0;if(typeof v!="function")throw new Po(a);return xn(L)&&(te="leading"in L?!!L.leading:te,Me="trailing"in L?!!L.trailing:Me),uC(v,S,{leading:te,maxWait:S,trailing:Me})}function fC(v){return bg(v,1)}function TM(v,S){return Mg(hp(S),v)}function c(){if(!arguments.length)return[];var v=arguments[0];return re(v)?v:[v]}function l(v){return Cr(v,P)}function h(v,S){return S=typeof S=="function"?S:t,Cr(v,P,S)}function y(v){return Cr(v,O|P)}function M(v,S){return S=typeof S=="function"?S:t,Cr(v,O|P,S)}function T(v,S){return S==null||Pi(v,S,Tl(S))}function K(v,S){return v===S||v!==v&&S!==S}var F=yp(ia),W=yp(function(v,S){return v>=S}),J=Hh(function(){return arguments}())?Hh:function(v){return mn(v)&&Hi.call(v,"callee")&&!tc.call(v,"callee")},re=jt.isArray,Ae=Vi?Us(Vi):cu;function be(v){return v!=null&&Xn(v.length)&&!zn(v)}function Be(v){return mn(v)&&be(v)}function De(v){return v===!0||v===!1||mn(v)&&Bi(v)==ke}var Ge=rp||QM,Ze=Io?Us(Io):Ac;function at(v){return mn(v)&&v.nodeType===1&&!Ua(v)}function It(v){if(v==null)return!0;if(be(v)&&(re(v)||typeof v=="string"||typeof v.splice=="function"||Ge(v)||Gs(v)||J(v)))return!v.length;var S=zs(v);if(S==St||S==tr)return!v.size;if(ve(v))return!vd(v).length;for(var L in v)if(Hi.call(v,L))return!1;return!0}function ct(v,S){return ku(v,S)}function wt(v,S,L){L=typeof L=="function"?L:t;var te=L?L(v,S):t;return te===t?ku(v,S,t,L):!!te}function rn(v){if(!mn(v))return!1;var S=Bi(v);return S==ze||S==Se||typeof v.message=="string"&&typeof v.name=="string"&&!Ua(v)}function An(v){return typeof v=="number"&&Qh(v)}function zn(v){if(!xn(v))return!1;var S=Bi(v);return S==it||S==ot||S==Yt||S==gn}function br(v){return typeof v=="number"&&v==Jr(v)}function Xn(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=st}function xn(v){var S=typeof v;return v!=null&&(S=="object"||S=="function")}function mn(v){return v!=null&&typeof v=="object"}var ur=wo?Us(wo):Tu;function jn(v,S){return v===S||Xh(v,S,So(S))}function Sn(v,S,L){return L=typeof L=="function"?L:t,Xh(v,S,So(S),L)}function Lr(v){return pa(v)&&v!=+v}function Mr(v){if(ue(v))throw new ui(o);return IA(v)}function ji(v){return v===null}function fa(v){return v==null}function pa(v){return typeof v=="number"||mn(v)&&Bi(v)==Rt}function Ua(v){if(!mn(v)||Bi(v)!=mt)return!1;var S=Hu(v);if(S===null)return!0;var L=Hi.call(S,"constructor")&&S.constructor;return typeof L=="function"&&L instanceof L&&ls.call(L)==JA}var fu=$a?Us($a):up;function pu(v){return br(v)&&v>=-st&&v<=st}var hs=Fl?Us(Fl):yd;function ks(v){return typeof v=="string"||!re(v)&&mn(v)&&Bi(v)==dr}function Xo(v){return typeof v=="symbol"||mn(v)&&Bi(v)==Sr}var Gs=iu?Us(iu):Ap;function mu(v){return v===t}function $s(v){return mn(v)&&zs(v)==yr}function Qs(v){return mn(v)&&Bi(v)==_i}var $l=yp(aA),gu=yp(function(v,S){return v<=S});function Bl(v){if(!v)return[];if(be(v))return ks(v)?jl(v):el(v);if(Xu&&v[Xu])return tm(v[Xu]());var S=zs(v),L=S==St?Kc:S==tr?Sl:Bg;return L(v)}function fs(v){if(!v)return v===0?v:0;if(v=oi(v),v===yt||v===-yt){var S=v<0?-1:1;return S*ft}return v===v?v:0}function Jr(v){var S=fs(v),L=S%1;return S===S?L?S-L:S:0}function Ts(v){return v?In(Jr(v),0,Ve):0}function oi(v){if(typeof v=="number")return v;if(Xo(v))return Re;if(xn(v)){var S=typeof v.valueOf=="function"?v.valueOf():v;v=xn(S)?S+"":S}if(typeof v!="string")return v===0?v:+v;v=HA(v);var L=di.test(v);return L||to.test(v)?vn(v.slice(2),L?2:8):ar.test(v)?Re:+v}function Il(v){return sA(v,Ha(v))}function kl(v){return v?In(Jr(v),-st,st):v===0?v:0}function pi(v){return v==null?"":Ku(v)}var pc=lA(function(v,S){if(ve(S)||be(S)){sA(S,Tl(S),v);return}for(var L in S)Hi.call(S,L)&&Ut(v,L,S[L])}),mc=lA(function(v,S){sA(S,Ha(S),v)}),AA=lA(function(v,S,L,te){sA(S,Ha(S),v,te)}),gh=lA(function(v,S,L,te){sA(S,Tl(S),v,te)}),gc=cc(qr);function DA(v,S){var L=oc(v);return S==null?L:un(L,S)}var Lu=Qi(function(v,S){v=Ko(v);var L=-1,te=S.length,Me=te>2?S[2]:t;for(Me&&b(S[0],S[1],Me)&&(te=1);++L<te;)for(var We=S[L],ut=Ha(We),_t=-1,Tt=ut.length;++_t<Tt;){var Cn=ut[_t],_n=v[Cn];(_n===t||K(_n,Qa[Cn])&&!Hi.call(v,Cn))&&(v[Cn]=We[Cn])}return v}),yh=Qi(function(v){return v.push(t,cm),ga(t2,t,v)});function R0(v,S){return zh(v,Xr(S,3),Ms)}function Zx(v,S){return zh(v,Xr(S,3),iA)}function pC(v,S){return v==null?v:Js(v,Xr(S,3),Ha)}function mC(v,S){return v==null?v:Au(v,Xr(S,3),Ha)}function vh(v,S){return v&&Ms(v,Xr(S,3))}function Xx(v,S){return v&&iA(v,Xr(S,3))}function Jx(v){return v==null?[]:Gl(v,Tl(v))}function KM(v){return v==null?[]:Gl(v,Ha(v))}function gC(v,S,L){var te=v==null?t:Ss(v,S);return te===t?L:te}function PM(v,S){return v!=null&&Ag(v,S,Uc)}function yC(v,S){return v!=null&&Ag(v,S,Zo)}var DM=lm(function(v,S,L){S!=null&&typeof S.toString!="function"&&(S=lu.call(S)),v[S]=L},jM(yc)),LM=lm(function(v,S,L){S!=null&&typeof S.toString!="function"&&(S=lu.call(S)),Hi.call(v,S)?v[S].push(L):v[S]=[L]},Xr),FM=Qi(uc);function Tl(v){return be(v)?ht(v):vd(v)}function Ha(v){return be(v)?ht(v,!0):Jh(v)}function Og(v,S){var L={};return S=Xr(S,3),Ms(v,function(te,Me,We){qn(L,S(te,Me,We),te)}),L}function e2(v,S){var L={};return S=Xr(S,3),Ms(v,function(te,Me,We){qn(L,Me,S(te,Me,We))}),L}var UM=lA(function(v,S,L){du(v,S,L)}),t2=lA(function(v,S,L,te){du(v,S,L,te)}),RM=cc(function(v,S){var L={};if(v==null)return L;var te=!1;S=ra(S,function(We){return We=xd(We,v),te||(te=We.length>1),We}),sA(v,df(v),L),te&&(L=Cr(L,O|E|P,cf));for(var Me=S.length;Me--;)am(L,S[Me]);return L});function Ql(v,S){return Cf(v,L0(Xr(S)))}var LA=cc(function(v,S){return v==null?{}:fl(v,S)});function Cf(v,S){if(v==null)return{};var L=ra(df(v),function(te){return[te]});return S=Xr(S),oh(v,L,function(te,Me){return S(te,Me[0])})}function Wc(v,S,L){S=xd(S,v);var te=-1,Me=S.length;for(Me||(Me=1,v=t);++te<Me;){var We=v==null?t:v[Fa(S[te])];We===t&&(te=Me,We=L),v=zn(We)?We.call(v):We}return v}function _p(v,S,L){return v==null?v:nf(v,S,L)}function Od(v,S,L,te){return te=typeof te=="function"?te:t,v==null?v:nf(v,S,L,te)}var Dk=dh(Tl),Lk=dh(Ha);function SY(v,S,L){var te=re(v),Me=te||Ge(v)||Gs(v);if(S=Xr(S,4),L==null){var We=v&&v.constructor;Me?L=te?new We:[]:xn(v)?L=zn(We)?oc(Hu(v)):{}:L={}}return(Me?ou:Ms)(v,function(ut,_t,Tt){return S(L,ut,_t,Tt)}),L}function EY(v,S){return v==null?!0:am(v,S)}function OY(v,S,L){return v==null?v:cp(v,S,hp(L))}function BY(v,S,L,te){return te=typeof te=="function"?te:t,v==null?v:cp(v,S,hp(L),te)}function Bg(v){return v==null?[]:Nh(v,Tl(v))}function IY(v){return v==null?[]:Nh(v,Ha(v))}function kY(v,S,L){return L===t&&(L=S,S=t),L!==t&&(L=oi(L),L=L===L?L:0),S!==t&&(S=oi(S),S=S===S?S:0),In(oi(v),S,L)}function TY(v,S,L){return S=fs(S),L===t?(L=S,S=0):L=fs(L),v=oi(v),_a(v,S,L)}function KY(v,S,L){if(L&&typeof L!="boolean"&&b(v,S,L)&&(S=L=t),L===t&&(typeof S=="boolean"?(L=S,S=t):typeof v=="boolean"&&(L=v,v=t)),v===t&&S===t?(v=0,S=1):(v=fs(v),S===t?(S=v,v=0):S=fs(S)),v>S){var te=v;v=S,S=te}if(L||v%1||S%1){var Me=OA();return ca(v+Me*(S-v+$n("1e-"+((Me+"").length-1))),S)}return rm(v,S)}var PY=uf(function(v,S,L){return S=S.toLowerCase(),v+(L?Fk(S):S)});function Fk(v){return zM(pi(v).toLowerCase())}function Uk(v){return v=pi(v),v&&v.replace(si,Hd).replace(Su,"")}function DY(v,S,L){v=pi(v),S=Ku(S);var te=v.length;L=L===t?te:In(Jr(L),0,te);var Me=L;return L-=S.length,L>=0&&v.slice(L,Me)==S}function LY(v){return v=pi(v),v&&xe.test(v)?v.replace(Le,Ou):v}function FY(v){return v=pi(v),v&&tn.test(v)?v.replace(Mt,"\\$&"):v}var UY=uf(function(v,S,L){return v+(L?"-":"")+S.toLowerCase()}),RY=uf(function(v,S,L){return v+(L?" ":"")+S.toLowerCase()}),zY=lf("toLowerCase");function jY(v,S,L){v=pi(v),S=Jr(S);var te=S?Bu(v):0;if(!S||te>=S)return v;var Me=(S-te)/2;return Am(tA(Me),L)+v+Am(Mo(Me),L)}function NY(v,S,L){v=pi(v),S=Jr(S);var te=S?Bu(v):0;return S&&te<S?v+Am(S-te,L):v}function WY(v,S,L){v=pi(v),S=Jr(S);var te=S?Bu(v):0;return S&&te<S?Am(S-te,L)+v:v}function GY(v,S,L){return L||S==null?S=0:S&&(S=+S),Ir(pi(v).replace(qt,""),S||0)}function $Y(v,S,L){return(L?b(v,S,L):S===t)?S=1:S=Jr(S),x0(pi(v),S)}function QY(){var v=arguments,S=pi(v[0]);return v.length<3?S:S.replace(v[1],v[2])}var YY=uf(function(v,S,L){return v+(L?"_":"")+S.toLowerCase()});function qY(v,S,L){return L&&typeof L!="number"&&b(v,S,L)&&(S=L=t),L=L===t?Ve:L>>>0,L?(v=pi(v),v&&(typeof S=="string"||S!=null&&!fu(S))&&(S=Ku(S),!S&&XA(v))?Rc(jl(v),0,L):v.split(S,L)):[]}var VY=uf(function(v,S,L){return v+(L?" ":"")+zM(S)});function HY(v,S,L){return v=pi(v),L=L==null?0:In(Jr(L),0,v.length),S=Ku(S),v.slice(L,L+S.length)==S}function ZY(v,S,L){var te=Fe.templateSettings;L&&b(v,S,L)&&(S=t),v=pi(v),S=AA({},S,te,lg);var Me=AA({},S.imports,te.imports,lg),We=Tl(Me),ut=Nh(Me,We),_t,Tt,Cn=0,_n=S.interpolate||fo,Tn="__p += '",pr=SA((S.escape||fo).source+"|"+_n.source+"|"+(_n===rt?Br:fo).source+"|"+(S.evaluate||fo).source+"|$","g"),Hr="//# sourceURL="+(Hi.call(S,"sourceURL")?(S.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xA+"]")+`
`;v.replace(pr,function(xi,bo,Do,Gc,FA,$c){return Do||(Do=Gc),Tn+=v.slice(Cn,$c).replace(Na,wA),bo&&(_t=!0,Tn+=`' +
__e(`+bo+`) +
'`),FA&&(Tt=!0,Tn+=`';
`+FA+`;
__p += '`),Do&&(Tn+=`' +
((__t = (`+Do+`)) == null ? '' : __t) +
'`),Cn=$c+xi.length,xi}),Tn+=`';
`;var bi=Hi.call(S,"variable")&&S.variable;if(!bi)Tn=`with (obj) {
`+Tn+`
}
`;else if(cr.test(bi))throw new ui(s);Tn=(Tt?Tn.replace(g,""):Tn).replace(Kt,"$1").replace(Pr,"$1;"),Tn="function("+(bi||"obj")+`) {
`+(bi?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(_t?", __e = _.escape":"")+(Tt?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Tn+`return __p
}`;var lo=zk(function(){return oo(We,Hr+"return "+Tn).apply(t,ut)});if(lo.source=Tn,rn(lo))throw lo;return lo}function XY(v){return pi(v).toLowerCase()}function JY(v){return pi(v).toUpperCase()}function eq(v,S,L){if(v=pi(v),v&&(L||S===t))return HA(v);if(!v||!(S=Ku(S)))return v;var te=jl(v),Me=jl(S),We=Ul(te,Me),ut=Tc(te,Me)+1;return Rc(te,We,ut).join("")}function tq(v,S,L){if(v=pi(v),v&&(L||S===t))return v.slice(0,Zd(v)+1);if(!v||!(S=Ku(S)))return v;var te=jl(v),Me=Tc(te,jl(S))+1;return Rc(te,0,Me).join("")}function nq(v,S,L){if(v=pi(v),v&&(L||S===t))return v.replace(qt,"");if(!v||!(S=Ku(S)))return v;var te=jl(v),Me=Ul(te,jl(S));return Rc(te,Me).join("")}function rq(v,S){var L=we,te=Te;if(xn(S)){var Me="separator"in S?S.separator:Me;L="length"in S?Jr(S.length):L,te="omission"in S?Ku(S.omission):te}v=pi(v);var We=v.length;if(XA(v)){var ut=jl(v);We=ut.length}if(L>=We)return v;var _t=L-Bu(te);if(_t<1)return te;var Tt=ut?Rc(ut,0,_t).join(""):v.slice(0,_t);if(Me===t)return Tt+te;if(ut&&(_t+=Tt.length-_t),fu(Me)){if(v.slice(_t).search(Me)){var Cn,_n=Tt;for(Me.global||(Me=SA(Me.source,pi(Fr.exec(Me))+"g")),Me.lastIndex=0;Cn=Me.exec(_n);)var Tn=Cn.index;Tt=Tt.slice(0,Tn===t?_t:Tn)}}else if(v.indexOf(Ku(Me),_t)!=_t){var pr=Tt.lastIndexOf(Me);pr>-1&&(Tt=Tt.slice(0,pr))}return Tt+te}function iq(v){return v=pi(v),v&&ce.test(v)?v.replace(rr,Pc):v}var oq=uf(function(v,S,L){return v+(L?" ":"")+S.toUpperCase()}),zM=lf("toUpperCase");function Rk(v,S,L){return v=pi(v),S=L?t:S,S===t?tp(v)?dd(v):em(v):v.match(S)||[]}var zk=Qi(function(v,S){try{return ga(v,t,S)}catch(L){return rn(L)?L:new ui(L)}}),aq=cc(function(v,S){return ou(S,function(L){L=Fa(L),qn(v,L,xg(v[L],v))}),v});function sq(v){var S=v==null?0:v.length,L=Xr();return v=S?ra(v,function(te){if(typeof te[1]!="function")throw new Po(a);return[L(te[0]),te[1]]}):[],Qi(function(te){for(var Me=-1;++Me<S;){var We=v[Me];if(ga(We[0],this,te))return ga(We[1],this,te)}})}function lq(v){return hi(Cr(v,O))}function jM(v){return function(){return v}}function uq(v,S){return v==null||v!==v?S:v}var Aq=sm(),cq=sm(!0);function yc(v){return v}function NM(v){return oA(typeof v=="function"?v:Cr(v,O))}function dq(v){return ef(Cr(v,O))}function hq(v,S){return tf(v,Cr(S,O))}var fq=Qi(function(v,S){return function(L){return uc(L,v,S)}}),pq=Qi(function(v,S){return function(L){return uc(v,L,S)}});function WM(v,S,L){var te=Tl(S),Me=Gl(S,te);L==null&&!(xn(S)&&(Me.length||!te.length))&&(L=S,S=v,v=this,Me=Gl(S,Tl(S)));var We=!(xn(L)&&"chain"in L)||!!L.chain,ut=zn(v);return ou(Me,function(_t){var Tt=S[_t];v[_t]=Tt,ut&&(v.prototype[_t]=function(){var Cn=this.__chain__;if(We||Cn){var _n=v(this.__wrapped__),Tn=_n.__actions__=el(this.__actions__);return Tn.push({func:Tt,args:arguments,thisArg:v}),_n.__chain__=Cn,_n}return Tt.apply(v,Qu([this.value()],arguments))})}),v}function mq(){return vr._===this&&(vr._=va),this}function GM(){}function gq(v){return v=Jr(v),Qi(function(S){return ih(S,v)})}var yq=um(ra),vq=um(ld),Cq=um(kc);function jk(v){return B(v)?Jf(Fa(v)):b0(v)}function _q(v){return function(S){return v==null?t:Ss(v,S)}}var bq=ch(),xq=ch(!0);function $M(){return[]}function QM(){return!1}function wq(){return{}}function Mq(){return""}function Sq(){return!0}function Eq(v,S){if(v=Jr(v),v<1||v>st)return[];var L=Ve,te=ca(v,Ve);S=Xr(S),v-=Ve;for(var Me=To(te,S);++L<v;)S(L);return Me}function Oq(v){return re(v)?ra(v,Fa):Xo(v)?[v]:el(xa(pi(v)))}function Bq(v){var S=++Gh;return pi(v)+S}var Iq=Ah(function(v,S){return v+S},0),kq=I0("ceil"),Tq=Ah(function(v,S){return v/S},1),Kq=I0("floor");function Pq(v){return v&&v.length?Rs(v,yc,ia):t}function Dq(v,S){return v&&v.length?Rs(v,Xr(S,2),ia):t}function Lq(v){return Yu(v,yc)}function Fq(v,S){return Yu(v,Xr(S,2))}function Uq(v){return v&&v.length?Rs(v,yc,aA):t}function Rq(v,S){return v&&v.length?Rs(v,Xr(S,2),aA):t}var zq=Ah(function(v,S){return v*S},1),jq=I0("round"),Nq=Ah(function(v,S){return v-S},0);function Wq(v){return v&&v.length?VA(v,yc):0}function Gq(v,S){return v&&v.length?VA(v,Xr(S,2)):0}return Fe.after=vf,Fe.ary=bg,Fe.assign=pc,Fe.assignIn=mc,Fe.assignInWith=AA,Fe.assignWith=gh,Fe.at=gc,Fe.before=sC,Fe.bind=xg,Fe.bindAll=aq,Fe.bindKey=wg,Fe.castArray=c,Fe.chain=rC,Fe.chunk=tl,Fe.compact=Bs,Fe.concat=ds,Fe.cond=sq,Fe.conforms=lq,Fe.constant=jM,Fe.countBy=Rx,Fe.create=DA,Fe.curry=Vx,Fe.curryRight=lC,Fe.debounce=uC,Fe.defaults=Lu,Fe.defaultsDeep=yh,Fe.defer=kM,Fe.delay=Hx,Fe.difference=ha,Fe.differenceBy=Is,Fe.differenceWith=fh,Fe.drop=dc,Fe.dropRight=js,Fe.dropRightWhile=hc,Fe.dropWhile=Ns,Fe.fill=K0,Fe.filter=jx,Fe.flatMap=Wx,Fe.flatMapDeep=yf,Fe.flatMapDepth=Gx,Fe.flatten=Va,Fe.flattenDeep=nl,Fe.flattenDepth=ph,Fe.flip=AC,Fe.flow=Aq,Fe.flowRight=cq,Fe.fromPairs=fc,Fe.functions=Jx,Fe.functionsIn=KM,Fe.groupBy=$x,Fe.initial=pm,Fe.intersection=cg,Fe.intersectionBy=dg,Fe.intersectionWith=dM,Fe.invert=DM,Fe.invertBy=LM,Fe.invokeMap=SM,Fe.iteratee=NM,Fe.keyBy=Qx,Fe.keys=Tl,Fe.keysIn=Ha,Fe.map=mh,Fe.mapKeys=Og,Fe.mapValues=e2,Fe.matches=dq,Fe.matchesProperty=hq,Fe.memoize=vm,Fe.merge=UM,Fe.mergeWith=t2,Fe.method=fq,Fe.methodOf=pq,Fe.mixin=WM,Fe.negate=L0,Fe.nthArg=gq,Fe.omit=RM,Fe.omitBy=Ql,Fe.once=F0,Fe.orderBy=Yx,Fe.over=yq,Fe.overArgs=cC,Fe.overEvery=vq,Fe.overSome=Cq,Fe.partial=Mg,Fe.partialRight=Sg,Fe.partition=yg,Fe.pick=LA,Fe.pickBy=Cf,Fe.property=jk,Fe.propertyOf=_q,Fe.pull=xx,Fe.pullAll=hg,Fe.pullAllBy=Hv,Fe.pullAllWith=fM,Fe.pullAt=pM,Fe.range=bq,Fe.rangeRight=xq,Fe.rearg=Eg,Fe.reject=Cg,Fe.remove=wx,Fe.rest=U0,Fe.reverse=Cp,Fe.sampleSize=EM,Fe.set=_p,Fe.setWith=Od,Fe.shuffle=OM,Fe.slice=Ed,Fe.sortBy=ym,Fe.sortedUniq=Xv,Fe.sortedUniqBy=yM,Fe.split=qY,Fe.spread=dC,Fe.tail=Jv,Fe.take=eC,Fe.takeRight=mm,Fe.takeRightWhile=Sx,Fe.takeWhile=Ex,Fe.tap=Px,Fe.throttle=hC,Fe.thru=gm,Fe.toArray=Bl,Fe.toPairs=Dk,Fe.toPairsIn=Lk,Fe.toPath=Oq,Fe.toPlainObject=Il,Fe.transform=SY,Fe.unary=fC,Fe.union=tC,Fe.unionBy=Ox,Fe.unionWith=pg,Fe.uniq=Bx,Fe.uniqBy=vM,Fe.uniqWith=CM,Fe.unset=EY,Fe.unzip=mg,Fe.unzipWith=Ix,Fe.update=OY,Fe.updateWith=BY,Fe.values=Bg,Fe.valuesIn=IY,Fe.without=_M,Fe.words=Rk,Fe.wrap=TM,Fe.xor=bM,Fe.xorBy=xM,Fe.xorWith=nC,Fe.zip=gf,Fe.zipObject=kx,Fe.zipObjectDeep=Tx,Fe.zipWith=Kx,Fe.entries=Dk,Fe.entriesIn=Lk,Fe.extend=mc,Fe.extendWith=AA,WM(Fe,Fe),Fe.add=Iq,Fe.attempt=zk,Fe.camelCase=PY,Fe.capitalize=Fk,Fe.ceil=kq,Fe.clamp=kY,Fe.clone=l,Fe.cloneDeep=y,Fe.cloneDeepWith=M,Fe.cloneWith=h,Fe.conformsTo=T,Fe.deburr=Uk,Fe.defaultTo=uq,Fe.divide=Tq,Fe.endsWith=DY,Fe.eq=K,Fe.escape=LY,Fe.escapeRegExp=FY,Fe.every=zx,Fe.find=Nx,Fe.findIndex=TA,Fe.findKey=R0,Fe.findLast=wM,Fe.findLastIndex=Nc,Fe.findLastKey=Zx,Fe.floor=Kq,Fe.forEach=oC,Fe.forEachRight=aC,Fe.forIn=pC,Fe.forInRight=mC,Fe.forOwn=vh,Fe.forOwnRight=Xx,Fe.get=gC,Fe.gt=F,Fe.gte=W,Fe.has=PM,Fe.hasIn=yC,Fe.head=fm,Fe.identity=yc,Fe.includes=MM,Fe.indexOf=P0,Fe.inRange=TY,Fe.invoke=FM,Fe.isArguments=J,Fe.isArray=re,Fe.isArrayBuffer=Ae,Fe.isArrayLike=be,Fe.isArrayLikeObject=Be,Fe.isBoolean=De,Fe.isBuffer=Ge,Fe.isDate=Ze,Fe.isElement=at,Fe.isEmpty=It,Fe.isEqual=ct,Fe.isEqualWith=wt,Fe.isError=rn,Fe.isFinite=An,Fe.isFunction=zn,Fe.isInteger=br,Fe.isLength=Xn,Fe.isMap=ur,Fe.isMatch=jn,Fe.isMatchWith=Sn,Fe.isNaN=Lr,Fe.isNative=Mr,Fe.isNil=fa,Fe.isNull=ji,Fe.isNumber=pa,Fe.isObject=xn,Fe.isObjectLike=mn,Fe.isPlainObject=Ua,Fe.isRegExp=fu,Fe.isSafeInteger=pu,Fe.isSet=hs,Fe.isString=ks,Fe.isSymbol=Xo,Fe.isTypedArray=Gs,Fe.isUndefined=mu,Fe.isWeakMap=$s,Fe.isWeakSet=Qs,Fe.join=_x,Fe.kebabCase=UY,Fe.last=KA,Fe.lastIndexOf=hM,Fe.lowerCase=RY,Fe.lowerFirst=zY,Fe.lt=$l,Fe.lte=gu,Fe.max=Pq,Fe.maxBy=Dq,Fe.mean=Lq,Fe.meanBy=Fq,Fe.min=Uq,Fe.minBy=Rq,Fe.stubArray=$M,Fe.stubFalse=QM,Fe.stubObject=wq,Fe.stubString=Mq,Fe.stubTrue=Sq,Fe.multiply=zq,Fe.nth=bx,Fe.noConflict=mq,Fe.noop=GM,Fe.now=Ws,Fe.pad=jY,Fe.padEnd=NY,Fe.padStart=WY,Fe.parseInt=GY,Fe.random=KY,Fe.reduce=qx,Fe.reduceRight=vg,Fe.repeat=$Y,Fe.replace=QY,Fe.result=Wc,Fe.round=jq,Fe.runInContext=Et,Fe.sample=_g,Fe.size=BM,Fe.snakeCase=YY,Fe.some=IM,Fe.sortedIndex=mf,Fe.sortedIndexBy=Mx,Fe.sortedIndexOf=Zv,Fe.sortedLastIndex=mM,Fe.sortedLastIndexBy=gM,Fe.sortedLastIndexOf=fg,Fe.startCase=VY,Fe.startsWith=HY,Fe.subtract=Nq,Fe.sum=Wq,Fe.sumBy=Gq,Fe.template=ZY,Fe.times=Eq,Fe.toFinite=fs,Fe.toInteger=Jr,Fe.toLength=Ts,Fe.toLower=XY,Fe.toNumber=oi,Fe.toSafeInteger=kl,Fe.toString=pi,Fe.toUpper=JY,Fe.trim=eq,Fe.trimEnd=tq,Fe.trimStart=nq,Fe.truncate=rq,Fe.unescape=iq,Fe.uniqueId=Bq,Fe.upperCase=oq,Fe.upperFirst=zM,Fe.each=oC,Fe.eachRight=aC,Fe.first=fm,WM(Fe,function(){var v={};return Ms(Fe,function(S,L){Hi.call(Fe.prototype,L)||(v[L]=S)}),v}(),{chain:!1}),Fe.VERSION=r,ou(["bind","bindKey","curry","curryRight","partial","partialRight"],function(v){Fe[v].placeholder=Fe}),ou(["drop","take"],function(v,S){Yr.prototype[v]=function(L){L=L===t?1:ao(Jr(L),0);var te=this.__filtered__&&!S?new Yr(this):this.clone();return te.__filtered__?te.__takeCount__=ca(L,te.__takeCount__):te.__views__.push({size:ca(L,Ve),type:v+(te.__dir__<0?"Right":"")}),te},Yr.prototype[v+"Right"]=function(L){return this.reverse()[v](L).reverse()}}),ou(["filter","map","takeWhile"],function(v,S){var L=S+1,te=L==$e||L==gt;Yr.prototype[v]=function(Me){var We=this.clone();return We.__iteratees__.push({iteratee:Xr(Me,3),type:L}),We.__filtered__=We.__filtered__||te,We}}),ou(["head","last"],function(v,S){var L="take"+(S?"Right":"");Yr.prototype[v]=function(){return this[L](1).value()[0]}}),ou(["initial","tail"],function(v,S){var L="drop"+(S?"":"Right");Yr.prototype[v]=function(){return this.__filtered__?new Yr(this):this[L](1)}}),Yr.prototype.compact=function(){return this.filter(yc)},Yr.prototype.find=function(v){return this.filter(v).head()},Yr.prototype.findLast=function(v){return this.reverse().find(v)},Yr.prototype.invokeMap=Qi(function(v,S){return typeof v=="function"?new Yr(this):this.map(function(L){return uc(L,v,S)})}),Yr.prototype.reject=function(v){return this.filter(L0(Xr(v)))},Yr.prototype.slice=function(v,S){v=Jr(v);var L=this;return L.__filtered__&&(v>0||S<0)?new Yr(L):(v<0?L=L.takeRight(-v):v&&(L=L.drop(v)),S!==t&&(S=Jr(S),L=S<0?L.dropRight(-S):L.take(S-v)),L)},Yr.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},Yr.prototype.toArray=function(){return this.take(Ve)},Ms(Yr.prototype,function(v,S){var L=/^(?:filter|find|map|reject)|While$/.test(S),te=/^(?:head|last)$/.test(S),Me=Fe[te?"take"+(S=="last"?"Right":""):S],We=te||/^find/.test(S);Me&&(Fe.prototype[S]=function(){var ut=this.__wrapped__,_t=te?[1]:arguments,Tt=ut instanceof Yr,Cn=_t[0],_n=Tt||re(ut),Tn=function(bo){var Do=Me.apply(Fe,Qu([bo],_t));return te&&pr?Do[0]:Do};_n&&L&&typeof Cn=="function"&&Cn.length!=1&&(Tt=_n=!1);var pr=this.__chain__,Hr=!!this.__actions__.length,bi=We&&!pr,lo=Tt&&!Hr;if(!We&&_n){ut=lo?ut:new Yr(this);var xi=v.apply(ut,_t);return xi.__actions__.push({func:gm,args:[Tn],thisArg:t}),new $i(xi,pr)}return bi&&lo?v.apply(this,_t):(xi=this.thru(Tn),bi?te?xi.value()[0]:xi.value():xi)})}),ou(["pop","push","shift","sort","splice","unshift"],function(v){var S=EA[v],L=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",te=/^(?:pop|shift)$/.test(v);Fe.prototype[v]=function(){var Me=arguments;if(te&&!this.__chain__){var We=this.value();return S.apply(re(We)?We:[],Me)}return this[L](function(ut){return S.apply(re(ut)?ut:[],Me)})}}),Ms(Yr.prototype,function(v,S){var L=Fe[S];if(L){var te=L.name+"";Hi.call(Qo,te)||(Qo[te]=[]),Qo[te].push({name:S,func:L})}}),Qo[Af(t,Q).name]=[{name:"wrapper",func:t}],Yr.prototype.clone=Ca,Yr.prototype.reverse=ac,Yr.prototype.value=pd,Fe.prototype.at=gg,Fe.prototype.chain=Dx,Fe.prototype.commit=iC,Fe.prototype.next=Lx,Fe.prototype.plant=D0,Fe.prototype.reverse=Fx,Fe.prototype.toJSON=Fe.prototype.valueOf=Fe.prototype.value=Ux,Fe.prototype.first=Fe.prototype.head,Xu&&(Fe.prototype[Xu]=PA),Fe},su=Xd();Ti?((Ti.exports=su)._=su,kr._=su):vr._=su}).call(Vf)})(c4,c4.exports);var nw=c4.exports;const q6=Ba(nw);function oee(n,e,t){const r=e<0?n.length+e:e;if(r>=0&&r<n.length){const i=t<0?n.length+t:t,[o]=n.splice(e,1);n.splice(i,0,o)}}function aee(n){for(var e=5381,t=n.length;t;)e=e*33^n.charCodeAt(--t);return e>>>0}var see=aee;const MT=Ba(see);var lee=8,uee={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Aee={"*":{type:"source"}},cee=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],dee={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:"*"}},hee={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:"*"}},fee={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},pee={type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},mee={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"}}},gee={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"}}},yee={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"}},vee=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Cee={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_ee={"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"}},bee={"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"}},xee={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},wee={"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"}},Mee={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},See={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Eee={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Oee={type:"array",value:"*"},Bee={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Iee={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},kee={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Tee={type:"array",value:"*",minimum:1},Kee={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}},Pee={"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},Dee={source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},Lee=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Fee={"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"}},Uee={"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"}},Ree={"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"}},zee={"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"}},jee={"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"}},Nee={"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"}},Wee={"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"}},Gee={"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"}},$ee={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Qee={"*":{type:"string"}},Ea={$version:lee,$root:uee,sources:Aee,source:cee,source_vector:dee,source_raster:hee,source_raster_dem:fee,source_geojson:pee,source_video:mee,source_image:gee,layer:yee,layout:vee,layout_background:Cee,layout_fill:_ee,layout_circle:bee,layout_heatmap:xee,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:wee,layout_symbol:Mee,layout_raster:See,layout_hillshade:Eee,filter:Oee,filter_operator:Bee,geometry_type:Iee,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:kee,expression:Tee,light:Kee,sky:Pee,terrain:Dee,paint:Lee,paint_fill:Fee,"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:Uee,paint_circle:Ree,paint_heatmap:zee,paint_symbol:jee,paint_raster:Nee,paint_hillshade:Wee,paint_background:Gee,transition:$ee,"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:Qee};const Yee=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function qee(n,e){const t={};for(const r in n)r!=="ref"&&(t[r]=n[r]);return Yee.forEach(r=>{r in e&&(t[r]=e[r])}),t}function Vee(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=qee(n[t],e[n[t].ref]));return n}function za(n,e){if(Array.isArray(n)){if(!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(!za(n[t],e[t]))return!1;return!0}if(typeof n=="object"&&n!==null&&e!==null){if(typeof e!="object"||Object.keys(n).length!==Object.keys(e).length)return!1;for(const r in n)if(!za(n[r],e[r]))return!1;return!0}return n===e}function Td(n,e){n.push(e)}function NR(n,e,t){Td(t,{command:"addSource",args:[n,e[n]]})}function WR(n,e,t){Td(e,{command:"removeSource",args:[n]}),t[n]=!0}function Hee(n,e,t,r){WR(n,t,r),NR(n,e,t)}function Zee(n,e,t){let r;for(r in n[t])if(Object.prototype.hasOwnProperty.call(n[t],r)&&r!=="data"&&!za(n[t][r],e[t][r]))return!1;for(r in e[t])if(Object.prototype.hasOwnProperty.call(e[t],r)&&r!=="data"&&!za(n[t][r],e[t][r]))return!1;return!0}function Xee(n,e,t,r){n=n||{},e=e||{};let i;for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(Object.prototype.hasOwnProperty.call(e,i)||WR(i,t,r));for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(n,i)?za(n[i],e[i])||(n[i].type==="geojson"&&e[i].type==="geojson"&&Zee(n,e,i)?Td(t,{command:"setGeoJSONSourceData",args:[i,e[i].data]}):Hee(i,e,t,r)):NR(i,e,t))}function C2(n,e,t,r,i,o){n=n||{},e=e||{};for(const a in n)Object.prototype.hasOwnProperty.call(n,a)&&(za(n[a],e[a])||t.push({command:o,args:[r,a,e[a],i]}));for(const a in e)!Object.prototype.hasOwnProperty.call(e,a)||Object.prototype.hasOwnProperty.call(n,a)||za(n[a],e[a])||t.push({command:o,args:[r,a,e[a],i]})}function ST(n){return n.id}function ET(n,e){return n[e.id]=e,n}function Jee(n,e,t){n=n||[],e=e||[];const r=n.map(ST),i=e.map(ST),o=n.reduce(ET,{}),a=e.reduce(ET,{}),s=r.slice(),d=Object.create(null);let f,C,O,E,P;for(let D=0,$=0;D<r.length;D++)f=r[D],Object.prototype.hasOwnProperty.call(a,f)?$++:(Td(t,{command:"removeLayer",args:[f]}),s.splice(s.indexOf(f,$),1));for(let D=0,$=0;D<i.length;D++)f=i[i.length-1-D],s[s.length-1-D]!==f&&(Object.prototype.hasOwnProperty.call(o,f)?(Td(t,{command:"removeLayer",args:[f]}),s.splice(s.lastIndexOf(f,s.length-$),1)):$++,E=s[s.length-D],Td(t,{command:"addLayer",args:[a[f],E]}),s.splice(s.length-D,0,f),d[f]=!0);for(let D=0;D<i.length;D++)if(f=i[D],C=o[f],O=a[f],!(d[f]||za(C,O))){if(!za(C.source,O.source)||!za(C["source-layer"],O["source-layer"])||!za(C.type,O.type)){Td(t,{command:"removeLayer",args:[f]}),E=s[s.lastIndexOf(f)+1],Td(t,{command:"addLayer",args:[O,E]});continue}C2(C.layout,O.layout,t,f,null,"setLayoutProperty"),C2(C.paint,O.paint,t,f,null,"setPaintProperty"),za(C.filter,O.filter)||Td(t,{command:"setFilter",args:[f,O.filter]}),(!za(C.minzoom,O.minzoom)||!za(C.maxzoom,O.maxzoom))&&Td(t,{command:"setLayerZoomRange",args:[f,O.minzoom,O.maxzoom]});for(P in C)Object.prototype.hasOwnProperty.call(C,P)&&(P==="layout"||P==="paint"||P==="filter"||P==="metadata"||P==="minzoom"||P==="maxzoom"||(P.indexOf("paint.")===0?C2(C[P],O[P],t,f,P.slice(6),"setPaintProperty"):za(C[P],O[P])||Td(t,{command:"setLayerProperty",args:[f,P,O[P]]})));for(P in O)!Object.prototype.hasOwnProperty.call(O,P)||Object.prototype.hasOwnProperty.call(C,P)||P==="layout"||P==="paint"||P==="filter"||P==="metadata"||P==="minzoom"||P==="maxzoom"||(P.indexOf("paint.")===0?C2(C[P],O[P],t,f,P.slice(6),"setPaintProperty"):za(C[P],O[P])||Td(t,{command:"setLayerProperty",args:[f,P,O[P]]}))}}function ete(n,e){if(!n)return[{command:"setStyle",args:[e]}];let t=[];try{if(!za(n.version,e.version))return[{command:"setStyle",args:[e]}];za(n.center,e.center)||t.push({command:"setCenter",args:[e.center]}),za(n.zoom,e.zoom)||t.push({command:"setZoom",args:[e.zoom]}),za(n.bearing,e.bearing)||t.push({command:"setBearing",args:[e.bearing]}),za(n.pitch,e.pitch)||t.push({command:"setPitch",args:[e.pitch]}),za(n.sprite,e.sprite)||t.push({command:"setSprite",args:[e.sprite]}),za(n.glyphs,e.glyphs)||t.push({command:"setGlyphs",args:[e.glyphs]}),za(n.transition,e.transition)||t.push({command:"setTransition",args:[e.transition]}),za(n.light,e.light)||t.push({command:"setLight",args:[e.light]}),za(n.terrain,e.terrain)||t.push({command:"setTerrain",args:[e.terrain]}),za(n.sky,e.sky)||t.push({command:"setSky",args:[e.sky]});const r={},i=[];Xee(n.sources,e.sources,i,r);const o=[];n.layers&&n.layers.forEach(a=>{"source"in a&&r[a.source]?t.push({command:"removeLayer",args:[a.id]}):o.push(a)}),t=t.concat(i),Jee(o,e.layers,t)}catch(r){console.warn("Unable to compute style diff:",r),t=[{command:"setStyle",args:[e]}]}return t}class er{constructor(e,t,r,i){this.message=(e?`${e}: `:"")+r,i&&(this.identifier=i),t!=null&&t.__line__&&(this.line=t.__line__)}}function cv(n,...e){for(const t of e)for(const r in t)n[r]=t[r];return n}class Kf extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}let tte=class GR{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[r,i]of t)this.bindings[r]=i}concat(e){return new GR(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}};const rw={kind:"null"},ir={kind:"number"},yo={kind:"string"},Zi={kind:"boolean"},zf={kind:"color"},Py={kind:"object"},Ji={kind:"value"},nte={kind:"error"},iw={kind:"collator"},ow={kind:"formatted"},aw={kind:"padding"},Db={kind:"resolvedImage"},sw={kind:"variableAnchorOffsetCollection"};function Vc(n,e){return{kind:"array",itemType:n,N:e}}function Ps(n){if(n.kind==="array"){const e=Ps(n.itemType);return typeof n.N=="number"?`array<${e}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const rte=[rw,ir,yo,Zi,zf,ow,Py,Vc(Ji),aw,Db,sw];function tb(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!tb(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of rte)if(!tb(t,e))return null}}return`Expected ${Ps(n)} but found ${Ps(e)} instead.`}function V7(n,e){return e.some(t=>t.kind===n.kind)}function nb(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}function IC(n,e){return n.kind==="array"&&e.kind==="array"?n.itemType.kind===e.itemType.kind&&typeof n.N=="number":n.kind===e.kind}const $R=.96422,QR=1,YR=.82521,qR=4/29,Dy=6/29,VR=3*Dy*Dy,ite=Dy*Dy*Dy,ote=Math.PI/180,ate=180/Math.PI;function HR(n){return n=n%360,n<0&&(n+=360),n}function ZR([n,e,t,r]){n=SS(n),e=SS(e),t=SS(t);let i,o;const a=ES((.2225045*n+.7168786*e+.0606169*t)/QR);n===e&&e===t?i=o=a:(i=ES((.4360747*n+.3850649*e+.1430804*t)/$R),o=ES((.0139322*n+.0971045*e+.7141733*t)/YR));const s=116*a-16;return[s<0?0:s,500*(i-a),200*(a-o),r]}function SS(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function ES(n){return n>ite?Math.pow(n,1/3):n/VR+qR}function XR([n,e,t,r]){let i=(n+16)/116,o=isNaN(e)?i:i+e/500,a=isNaN(t)?i:i-t/200;return i=QR*BS(i),o=$R*BS(o),a=YR*BS(a),[OS(3.1338561*o-1.6168667*i-.4906146*a),OS(-.9787684*o+1.9161415*i+.033454*a),OS(.0719453*o-.2289914*i+1.4052427*a),r]}function OS(n){return n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055,n<0?0:n>1?1:n}function BS(n){return n>Dy?n*n*n:VR*(n-qR)}function ste(n){const[e,t,r,i]=ZR(n),o=Math.sqrt(t*t+r*r);return[Math.round(o*1e4)?HR(Math.atan2(r,t)*ate):NaN,o,e,i]}function lte([n,e,t,r]){return n=isNaN(n)?0:n*ote,XR([t,Math.cos(n)*e,Math.sin(n)*e,r])}function ute([n,e,t,r]){n=HR(n),e/=100,t/=100;function i(o){const a=(o+n/30)%12,s=e*Math.min(t,1-t);return t-s*Math.max(-1,Math.min(a-3,9-a,1))}return[i(0),i(8),i(4),r]}function Ate(n){if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];const e=cte[n];if(e){const[i,o,a]=e;return[i/255,o/255,a/255,1]}if(n.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(n)){const o=n.length<6?1:2;let a=1;return[_2(n.slice(a,a+=o)),_2(n.slice(a,a+=o)),_2(n.slice(a,a+=o)),_2(n.slice(a,a+o)||"ff")]}if(n.startsWith("rgb")){const i=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,o=n.match(i);if(o){const[a,s,d,f,C,O,E,P,D,$,H,Q]=o,N=[f||" ",E||" ",$].join("");if(N==="  "||N==="  /"||N===",,"||N===",,,"){const Z=[d,O,D].join(""),ae=Z==="%%%"?100:Z===""?255:0;if(ae){const pe=[Yg(+s/ae,0,1),Yg(+C/ae,0,1),Yg(+P/ae,0,1),H?OT(+H,Q):1];if(BT(pe))return pe}}return}}const t=/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,r=n.match(t);if(r){const[i,o,a,s,d,f,C,O,E]=r,P=[a||" ",d||" ",C].join("");if(P==="  "||P==="  /"||P===",,"||P===",,,"){const D=[+o,Yg(+s,0,100),Yg(+f,0,100),O?OT(+O,E):1];if(BT(D))return ute(D)}}}function _2(n){return parseInt(n.padEnd(2,n),16)/255}function OT(n,e){return Yg(e?n/100:n,0,1)}function Yg(n,e,t){return Math.min(Math.max(e,n),t)}function BT(n){return!n.some(Number.isNaN)}const cte={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};let Ls=class V6{constructor(e,t,r,i=1,o=!0){this.r=e,this.g=t,this.b=r,this.a=i,o||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[e,t,r,i]))}static parse(e){if(e instanceof V6)return e;if(typeof e!="string")return;const t=Ate(e);if(t)return new V6(...t,!1)}get rgb(){const{r:e,g:t,b:r,a:i}=this,o=i||1/0;return this.overwriteGetter("rgb",[e/o,t/o,r/o,i])}get hcl(){return this.overwriteGetter("hcl",ste(this.rgb))}get lab(){return this.overwriteGetter("lab",ZR(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){const[e,t,r,i]=this.rgb;return`rgba(${[e,t,r].map(o=>Math.round(o*255)).join(",")},${i})`}};Ls.black=new Ls(0,0,0,1);Ls.white=new Ls(1,1,1,1);Ls.transparent=new Ls(0,0,0,0);Ls.red=new Ls(1,0,0,1);let H7=class{constructor(e,t,r){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}},H6=class{constructor(e,t,r,i,o){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=o}},Ev=class y3{constructor(e){this.sections=e}static fromString(e){return new y3([new H6(e,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof y3?e:y3.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}};class rd{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof rd)return e;if(typeof e=="number")return new rd([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const t of e)if(typeof t!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]];break}return new rd(e)}}toString(){return JSON.stringify(this.values)}}const dte=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Nf{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Nf)return e;if(!(!Array.isArray(e)||e.length<1||e.length%2!==0)){for(let t=0;t<e.length;t+=2){const r=e[t],i=e[t+1];if(typeof r!="string"||!dte.has(r)||!Array.isArray(i)||i.length!==2||typeof i[0]!="number"||typeof i[1]!="number")return}return new Nf(e)}}toString(){return JSON.stringify(this.values)}}let $1=class JR{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new JR({name:e,available:!1}):null}};function ez(n,e,t,r){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof r>"u"||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[n,e,t,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[n,e,t,r]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function d4(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof Ls||n instanceof H7||n instanceof Ev||n instanceof rd||n instanceof Nf||n instanceof $1)return!0;if(Array.isArray(n)){for(const e of n)if(!d4(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!d4(n[e]))return!1;return!0}else return!1}function Jl(n){if(n===null)return rw;if(typeof n=="string")return yo;if(typeof n=="boolean")return Zi;if(typeof n=="number")return ir;if(n instanceof Ls)return zf;if(n instanceof H7)return iw;if(n instanceof Ev)return ow;if(n instanceof rd)return aw;if(n instanceof Nf)return sw;if(n instanceof $1)return Db;if(Array.isArray(n)){const e=n.length;let t;for(const r of n){const i=Jl(r);if(!t)t=i;else{if(t===i)continue;t=Ji;break}}return Vc(t||Ji,e)}else return Py}function y_(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof Ls||n instanceof Ev||n instanceof rd||n instanceof Nf||n instanceof $1?n.toString():JSON.stringify(n)}let h4=class tz{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!d4(e[1]))return t.error("invalid value");const r=e[1];let i=Jl(r);const o=t.expectedType;return i.kind==="array"&&i.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(i=o),new tz(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},wl=class{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}};const b2={string:yo,number:ir,boolean:Zi,object:Py};let Lp=class nz{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=1,i;const o=e[0];if(o==="array"){let s;if(e.length>2){const f=e[1];if(typeof f!="string"||!(f in b2)||f==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);s=b2[f],r++}else s=Ji;let d;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);d=e[2],r++}i=Vc(s,d)}else{if(!b2[o])throw new Error(`Types doesn't contain name = ${o}`);i=b2[o]}const a=[];for(;r<e.length;r++){const s=t.parse(e[r],r,Ji);if(!s)return null;a.push(s)}return new nz(i,a)}evaluate(e){for(let t=0;t<this.args.length;t++){const r=this.args[t].evaluate(e);if(tb(this.type,Jl(r))){if(t===this.args.length-1)throw new wl(`Expected value to be of type ${Ps(this.type)}, but found ${Ps(Jl(r))} instead.`)}else return r}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const IT={"to-boolean":Zi,"to-color":zf,"to-number":ir,"to-string":yo};let gy=class rz{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if(!IT[r])throw new Error(`Can't parse ${r} as it is not part of the known types`);if((r==="to-boolean"||r==="to-string")&&e.length!==2)return t.error("Expected one argument.");const i=IT[r],o=[];for(let a=1;a<e.length;a++){const s=t.parse(e[a],a,Ji);if(!s)return null;o.push(s)}return new rz(i,o)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(const i of this.args){if(t=i.evaluate(e),r=null,t instanceof Ls)return t;if(typeof t=="string"){const o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&(t.length<3||t.length>4?r=`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:r=ez(t[0],t[1],t[2],t[3]),!r))return new Ls(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new wl(r||`Could not parse color from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"padding":{let t;for(const r of this.args){t=r.evaluate(e);const i=rd.parse(t);if(i)return i}throw new wl(`Could not parse padding from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(const r of this.args){t=r.evaluate(e);const i=Nf.parse(t);if(i)return i}throw new wl(`Could not parse variableAnchorOffsetCollection from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(const r of this.args){if(t=r.evaluate(e),t===null)return 0;const i=Number(t);if(!isNaN(i))return i}throw new wl(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return Ev.fromString(y_(this.args[0].evaluate(e)));case"resolvedImage":return $1.fromString(y_(this.args[0].evaluate(e)));default:return y_(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const hte=["Unknown","Point","LineString","Polygon"];let iz=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?hte[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Ls.parse(e)),t}},oz=class az{constructor(e,t,r=[],i,o=new tte,a=[]){this.registry=e,this.path=r,this.key=r.map(s=>`[${s}]`).join(""),this.scope=o,this.errors=a,this.expectedType=i,this._isConstant=t}parse(e,t,r,i,o={}){return t?this.concat(t,r,i)._parse(e,o):this._parse(e,o)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function r(i,o,a){return a==="assert"?new Lp(o,[i]):a==="coerce"?new gy(o,[i]):i}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if(typeof i!="string")return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[i];if(o){let a=o.parse(e,this);if(!a)return null;if(this.expectedType){const s=this.expectedType,d=a.type;if((s.kind==="string"||s.kind==="number"||s.kind==="boolean"||s.kind==="object"||s.kind==="array")&&d.kind==="value")a=r(a,s,t.typeAnnotation||"assert");else if((s.kind==="color"||s.kind==="formatted"||s.kind==="resolvedImage")&&(d.kind==="value"||d.kind==="string"))a=r(a,s,t.typeAnnotation||"coerce");else if(s.kind==="padding"&&(d.kind==="value"||d.kind==="number"||d.kind==="array"))a=r(a,s,t.typeAnnotation||"coerce");else if(s.kind==="variableAnchorOffsetCollection"&&(d.kind==="value"||d.kind==="array"))a=r(a,s,t.typeAnnotation||"coerce");else if(this.checkSubtype(s,d))return null}if(!(a instanceof h4)&&a.type.kind!=="resolvedImage"&&this._isConstant(a)){const s=new iz;try{a=new h4(a.type,a.evaluate(s))}catch(d){return this.error(d.message),null}}return a}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const i=typeof e=="number"?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new az(this.registry,this._isConstant,i,t||null,o,this.errors)}error(e,...t){const r=`${this.key}${t.map(i=>`[${i}]`).join("")}`;this.errors.push(new Kf(r,e))}checkSubtype(e,t){const r=tb(e,t);return r&&this.error(r),r}},sz=class lz{constructor(e,t,r){this.type=iw,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(e.length!==2)return t.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return t.error("Collator options argument must be an object.");const i=t.parse(r["case-sensitive"]===void 0?!1:r["case-sensitive"],1,Zi);if(!i)return null;const o=t.parse(r["diacritic-sensitive"]===void 0?!1:r["diacritic-sensitive"],1,Zi);if(!o)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,yo),!a)?null:new lz(i,o,a)}evaluate(e){return new H7(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}};const t0=8192;function Z7(n,e){n[0]=Math.min(n[0],e[0]),n[1]=Math.min(n[1],e[1]),n[2]=Math.max(n[2],e[0]),n[3]=Math.max(n[3],e[1])}function fte(n){return(180+n)/360}function pte(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function f4(n,e){return!(n[0]<=e[0]||n[2]>=e[2]||n[1]<=e[1]||n[3]>=e[3])}function mte(n,e){const t=fte(n[0]),r=pte(n[1]),i=Math.pow(2,e.z);return[Math.round(t*i*t0),Math.round(r*i*t0)]}function gte(n,e,t){const r=n[0]-e[0],i=n[1]-e[1],o=n[0]-t[0],a=n[1]-t[1];return r*a-o*i===0&&r*o<=0&&i*a<=0}function yte(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function X7(n,e){let t=!1;for(let r=0,i=e.length;r<i;r++){const o=e[r];for(let a=0,s=o.length;a<s-1;a++){if(gte(n,o[a],o[a+1]))return!1;yte(n,o[a],o[a+1])&&(t=!t)}}return t}function vte(n,e){for(let t=0;t<e.length;t++)if(X7(n,e[t]))return!0;return!1}function Cte(n,e){return n[0]*e[1]-n[1]*e[0]}function kT(n,e,t,r){const i=n[0]-t[0],o=n[1]-t[1],a=e[0]-t[0],s=e[1]-t[1],d=r[0]-t[0],f=r[1]-t[1],C=i*f-d*o,O=a*f-d*s;return C>0&&O<0||C<0&&O>0}function _te(n,e,t,r){const i=[e[0]-n[0],e[1]-n[1]],o=[r[0]-t[0],r[1]-t[1]];return Cte(o,i)===0?!1:!!(kT(n,e,t,r)&&kT(t,r,n,e))}function bte(n,e,t){for(const r of t)for(let i=0;i<r.length-1;++i)if(_te(n,e,r[i],r[i+1]))return!0;return!1}function uz(n,e){for(let t=0;t<n.length;++t)if(!X7(n[t],e))return!1;for(let t=0;t<n.length-1;++t)if(bte(n[t],n[t+1],e))return!1;return!0}function xte(n,e){for(let t=0;t<e.length;t++)if(uz(n,e[t]))return!0;return!1}function J7(n,e,t){const r=[];for(let i=0;i<n.length;i++){const o=[];for(let a=0;a<n[i].length;a++){const s=mte(n[i][a],t);Z7(e,s),o.push(s)}r.push(o)}return r}function Az(n,e,t){const r=[];for(let i=0;i<n.length;i++){const o=J7(n[i],e,t);r.push(o)}return r}function cz(n,e,t,r){if(n[0]<t[0]||n[0]>t[2]){const i=r*.5;let o=n[0]-t[0]>i?-r:t[0]-n[0]>i?r:0;o===0&&(o=n[0]-t[2]>i?-r:t[2]-n[0]>i?r:0),n[0]+=o}Z7(e,n)}function wte(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function TT(n,e,t,r){const i=Math.pow(2,r.z)*t0,o=[r.x*t0,r.y*t0],a=[];for(const s of n)for(const d of s){const f=[d.x+o[0],d.y+o[1]];cz(f,e,t,i),a.push(f)}return a}function KT(n,e,t,r){const i=Math.pow(2,r.z)*t0,o=[r.x*t0,r.y*t0],a=[];for(const s of n){const d=[];for(const f of s){const C=[f.x+o[0],f.y+o[1]];Z7(e,C),d.push(C)}a.push(d)}if(e[2]-e[0]<=i/2){wte(e);for(const s of a)for(const d of s)cz(d,e,t,i)}return a}function Mte(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(e.type==="Polygon"){const o=J7(e.coordinates,r,i),a=TT(n.geometry(),t,r,i);if(!f4(t,r))return!1;for(const s of a)if(!X7(s,o))return!1}if(e.type==="MultiPolygon"){const o=Az(e.coordinates,r,i),a=TT(n.geometry(),t,r,i);if(!f4(t,r))return!1;for(const s of a)if(!vte(s,o))return!1}return!0}function Ste(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(e.type==="Polygon"){const o=J7(e.coordinates,r,i),a=KT(n.geometry(),t,r,i);if(!f4(t,r))return!1;for(const s of a)if(!uz(s,o))return!1}if(e.type==="MultiPolygon"){const o=Az(e.coordinates,r,i),a=KT(n.geometry(),t,r,i);if(!f4(t,r))return!1;for(const s of a)if(!xte(s,o))return!1}return!0}let e8=class v3{constructor(e,t){this.type=Zi,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(d4(e[1])){const r=e[1];if(r.type==="FeatureCollection"){const i=[];for(const o of r.features){const{type:a,coordinates:s}=o.geometry;a==="Polygon"&&i.push(s),a==="MultiPolygon"&&i.push(...s)}if(i.length){const o={type:"MultiPolygon",coordinates:i};return new v3(r,o)}}else if(r.type==="Feature"){const i=r.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new v3(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new v3(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return Mte(e,this.geometries);if(e.geometryType()==="LineString")return Ste(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},dz=class hz{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new hz(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}},Ov=class VC{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){const r=e[0],i=VC.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter(([f])=>!Array.isArray(f)||f.length===e.length-1);let d=null;for(const[f,C]of s){d=new oz(t.registry,p4,t.path,null,t.scope);const O=[];let E=!1;for(let P=1;P<e.length;P++){const D=e[P],$=Array.isArray(f)?f[P-1]:f.type,H=d.parse(D,1+O.length,$);if(!H){E=!0;break}O.push(H)}if(!E){if(Array.isArray(f)&&f.length!==O.length){d.error(`Expected ${f.length} arguments, but found ${O.length} instead.`);continue}for(let P=0;P<O.length;P++){const D=Array.isArray(f)?f[P]:f.type,$=O[P];d.concat(P+1).checkSubtype(D,$.type)}if(d.errors.length===0)return new VC(r,o,C,O)}}if(s.length===1)t.errors.push(...d.errors);else{const C=(s.length?s:a).map(([E])=>Ete(E)).join(" | "),O=[];for(let E=1;E<e.length;E++){const P=t.parse(e[E],1+O.length);if(!P)return null;O.push(Ps(P.type))}t.error(`Expected arguments of type ${C}, but found (${O.join(", ")}) instead.`)}return null}static register(e,t){VC.definitions=t;for(const r in t)e[r]=VC}};function Ete(n){return Array.isArray(n)?`(${n.map(Ps).join(", ")})`:`(${Ps(n.type)}...)`}function p4(n){if(n instanceof dz)return p4(n.boundExpression);if(n instanceof Ov&&n.name==="error")return!1;if(n instanceof sz)return!1;if(n instanceof e8)return!1;const e=n instanceof gy||n instanceof Lp;let t=!0;return n.eachChild(r=>{e?t=t&&p4(r):t=t&&r instanceof h4}),t?lw(n)&&uw(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function lw(n){if(n instanceof Ov){if(n.name==="get"&&n.args.length===1)return!1;if(n.name==="feature-state")return!1;if(n.name==="has"&&n.args.length===1)return!1;if(n.name==="properties"||n.name==="geometry-type"||n.name==="id")return!1;if(/^filter-/.test(n.name))return!1}if(n instanceof e8)return!1;let e=!0;return n.eachChild(t=>{e&&!lw(t)&&(e=!1)}),e}function rb(n){if(n instanceof Ov&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!rb(t)&&(e=!1)}),e}function uw(n,e){if(n instanceof Ov&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(r=>{t&&!uw(r,e)&&(t=!1)}),t}function Aw(n,e){const t=n.length-1;let r=0,i=t,o=0,a,s;for(;r<=i;)if(o=Math.floor((r+i)/2),a=n[o],s=n[o+1],a<=e){if(o===t||e<s)return o;r=o+1}else if(a>e)i=o-1;else throw new wl("Input is not a number.");return 0}let fz=class pz{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[i,o]of r)this.labels.push(i),this.outputs.push(o)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,ir);if(!r)return null;const i=[];let o=null;t.expectedType&&t.expectedType.kind!=="value"&&(o=t.expectedType);for(let a=1;a<e.length;a+=2){const s=a===1?-1/0:e[a],d=e[a+1],f=a,C=a+1;if(typeof s!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(i.length&&i[i.length-1][0]>=s)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',f);const O=t.parse(d,C,o);if(!O)return null;o=o||O.type,i.push([s,O])}return new pz(o,r,i)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const o=t.length;if(i>=t[o-1])return r[o-1].evaluate(e);const a=Aw(t,i);return r[a].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Ote(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bte=mz;function mz(n,e,t,r){this.cx=3*n,this.bx=3*(t-n)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=n,this.p1y=e,this.p2x=t,this.p2y=r}mz.prototype={sampleCurveX:function(n){return((this.ax*n+this.bx)*n+this.cx)*n},sampleCurveY:function(n){return((this.ay*n+this.by)*n+this.cy)*n},sampleCurveDerivativeX:function(n){return(3*this.ax*n+2*this.bx)*n+this.cx},solveCurveX:function(n,e){if(e===void 0&&(e=1e-6),n<0)return 0;if(n>1)return 1;for(var t=n,r=0;r<8;r++){var i=this.sampleCurveX(t)-n;if(Math.abs(i)<e)return t;var o=this.sampleCurveDerivativeX(t);if(Math.abs(o)<1e-6)break;t=t-i/o}var a=0,s=1;for(t=n,r=0;r<20&&(i=this.sampleCurveX(t),!(Math.abs(i-n)<e));r++)n>i?a=t:s=t,t=(s-a)*.5+a;return t},solve:function(n,e){return this.sampleCurveY(this.solveCurveX(n,e))}};var Ite=Ote(Bte);function kte(n){return n==="rgb"||n==="hcl"||n==="lab"}function C1(n,e,t){return n+t*(e-n)}function Tte(n,e,t,r="rgb"){switch(r){case"rgb":{const[i,o,a,s]=m4(n.rgb,e.rgb,t);return new Ls(i,o,a,s,!1)}case"hcl":{const[i,o,a,s]=n.hcl,[d,f,C,O]=e.hcl;let E,P;if(!isNaN(i)&&!isNaN(d)){let N=d-i;d>i&&N>180?N-=360:d<i&&i-d>180&&(N+=360),E=i+t*N}else isNaN(i)?isNaN(d)?E=NaN:(E=d,(a===1||a===0)&&(P=f)):(E=i,(C===1||C===0)&&(P=o));const[D,$,H,Q]=lte([E,P??C1(o,f,t),C1(a,C,t),C1(s,O,t)]);return new Ls(D,$,H,Q,!1)}case"lab":{const[i,o,a,s]=XR(m4(n.lab,e.lab,t));return new Ls(i,o,a,s,!1)}}}function m4(n,e,t){return n.map((r,i)=>C1(r,e[i],t))}function Kte(n,e,t){return new rd(m4(n.values,e.values,t))}function Pte(n,e,t){const r=n.values,i=e.values;if(r.length!==i.length)throw new wl(`Cannot interpolate values of different length. from: ${n.toString()}, to: ${e.toString()}`);const o=[];for(let a=0;a<r.length;a+=2){if(r[a]!==i[a])throw new wl(`Cannot interpolate values containing mismatched anchors. from[${a}]: ${r[a]}, to[${a}]: ${i[a]}`);o.push(r[a]);const[s,d]=r[a+1],[f,C]=i[a+1];o.push([C1(s,f,t),C1(d,C,t)])}return new Nf(o)}const C3={number:C1,color:Tte,array:m4,padding:Kte,variableAnchorOffsetCollection:Pte};let Np=class Z6{constructor(e,t,r,i,o){this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(const[a,s]of o)this.labels.push(a),this.outputs.push(s)}static interpolationFactor(e,t,r,i){let o=0;if(e.name==="exponential")o=IS(t,e.base,r,i);else if(e.name==="linear")o=IS(t,1,r,i);else if(e.name==="cubic-bezier"){const a=e.controlPoints;o=new Ite(a[0],a[1],a[2],a[3]).solve(IS(t,1,r,i))}return o}static parse(e,t){let[r,i,o,...a]=e;if(!Array.isArray(i)||i.length===0)return t.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const f=i[1];if(typeof f!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:f}}else if(i[0]==="cubic-bezier"){const f=i.slice(1);if(f.length!==4||f.some(C=>typeof C!="number"||C<0||C>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:f}}else return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,ir),!o)return null;const s=[];let d=null;r==="interpolate-hcl"||r==="interpolate-lab"?d=zf:t.expectedType&&t.expectedType.kind!=="value"&&(d=t.expectedType);for(let f=0;f<a.length;f+=2){const C=a[f],O=a[f+1],E=f+3,P=f+4;if(typeof C!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',E);if(s.length&&s[s.length-1][0]>=C)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',E);const D=t.parse(O,P,d);if(!D)return null;d=d||D.type,s.push([C,D])}return!IC(d,ir)&&!IC(d,zf)&&!IC(d,aw)&&!IC(d,sw)&&!IC(d,Vc(ir))?t.error(`Type ${Ps(d)} is not interpolatable.`):new Z6(d,r,i,o,s)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const o=t.length;if(i>=t[o-1])return r[o-1].evaluate(e);const a=Aw(t,i),s=t[a],d=t[a+1],f=Z6.interpolationFactor(this.interpolation,i,s,d),C=r[a].evaluate(e),O=r[a+1].evaluate(e);switch(this.operator){case"interpolate":return C3[this.type.kind](C,O,f);case"interpolate-hcl":return C3.color(C,O,f,"hcl");case"interpolate-lab":return C3.color(C,O,f,"lab")}}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function IS(n,e,t,r){const i=r-t,o=n-t;return i===0?0:e===1?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}let gz=class X6{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let r=null;const i=t.expectedType;i&&i.kind!=="value"&&(r=i);const o=[];for(const s of e.slice(1)){const d=t.parse(s,1+o.length,r,void 0,{typeAnnotation:"omit"});if(!d)return null;r=r||d.type,o.push(d)}if(!r)throw new Error("No output type");return i&&o.some(s=>tb(i,s.type))?new X6(Ji,o):new X6(r,o)}evaluate(e){let t=null,r=0,i;for(const o of this.args)if(r++,t=o.evaluate(e),t&&t instanceof $1&&!t.available&&(i||(i=t.name),t=null,r===this.args.length&&(t=i)),t!==null)break;return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},yz=class vz{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let o=1;o<e.length-1;o+=2){const a=e[o];if(typeof a!="string")return t.error(`Expected string, but found ${typeof a} instead.`,o);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",o);const s=t.parse(e[o+1],o+1);if(!s)return null;r.push([a,s])}const i=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return i?new vz(r,i):null}outputDefined(){return this.result.outputDefined()}},Dte=class Cz{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ir),i=t.parse(e[2],2,Vc(t.expectedType||Ji));if(!r||!i)return null;const o=i.type;return new Cz(o.itemType,r,i)}evaluate(e){const t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new wl(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new wl(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new wl(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},Lte=class _z{constructor(e,t){this.type=Zi,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Ji),i=t.parse(e[2],2,Ji);return!r||!i?null:V7(r.type,[Zi,yo,ir,rw,Ji])?new _z(r,i):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ps(r.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!nb(t,["boolean","string","number","null"]))throw new wl(`Expected first argument to be of type boolean, string, number or null, but found ${Ps(Jl(t))} instead.`);if(!nb(r,["string","array"]))throw new wl(`Expected second argument to be of type array or string, but found ${Ps(Jl(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},Fte=class J6{constructor(e,t,r){this.type=ir,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Ji),i=t.parse(e[2],2,Ji);if(!r||!i)return null;if(!V7(r.type,[Zi,yo,ir,rw,Ji]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ps(r.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,ir);return o?new J6(r,i,o):null}else return new J6(r,i)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!nb(t,["boolean","string","number","null"]))throw new wl(`Expected first argument to be of type boolean, string, number or null, but found ${Ps(Jl(t))} instead.`);if(!nb(r,["string","array"]))throw new wl(`Expected second argument to be of type array or string, but found ${Ps(Jl(r))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(e);return r.indexOf(t,i)}return r.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},Ute=class bz{constructor(e,t,r,i,o,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=o,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let r,i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const o={},a=[];for(let f=2;f<e.length-1;f+=2){let C=e[f];const O=e[f+1];Array.isArray(C)||(C=[C]);const E=t.concat(f);if(C.length===0)return E.error("Expected at least one branch label.");for(const D of C){if(typeof D!="number"&&typeof D!="string")return E.error("Branch labels must be numbers or strings.");if(typeof D=="number"&&Math.abs(D)>Number.MAX_SAFE_INTEGER)return E.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof D=="number"&&Math.floor(D)!==D)return E.error("Numeric branch labels must be integer values.");if(!r)r=Jl(D);else if(E.checkSubtype(r,Jl(D)))return null;if(typeof o[String(D)]<"u")return E.error("Branch labels must be unique.");o[String(D)]=a.length}const P=t.parse(O,f,i);if(!P)return null;i=i||P.type,a.push(P)}const s=t.parse(e[1],1,Ji);if(!s)return null;const d=t.parse(e[e.length-1],e.length-1,i);return!d||s.type.kind!=="value"&&t.concat(1).checkSubtype(r,s.type)?null:new bz(r,i,s,o,a,d)}evaluate(e){const t=this.input.evaluate(e);return(Jl(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},Rte=class xz{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const i=[];for(let a=1;a<e.length-1;a+=2){const s=t.parse(e[a],a,Zi);if(!s)return null;const d=t.parse(e[a+1],a+1,r);if(!d)return null;i.push([s,d]),r=r||d.type}const o=t.parse(e[e.length-1],e.length-1,r);if(!o)return null;if(!r)throw new Error("Can't infer output type");return new xz(r,i,o)}evaluate(e){for(const[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}},zte=class eO{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Ji),i=t.parse(e[2],2,ir);if(!r||!i)return null;if(!V7(r.type,[Vc(Ji),yo,Ji]))return t.error(`Expected first argument to be of type array or string, but found ${Ps(r.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,ir);return o?new eO(r.type,r,i,o):null}else return new eO(r.type,r,i)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!nb(t,["string","array"]))throw new wl(`Expected first argument to be of type array or string, but found ${Ps(Jl(t))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(e);return t.slice(r,i)}return t.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}};function PT(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function jte(n,e,t){return e===t}function Nte(n,e,t){return e!==t}function Wte(n,e,t){return e<t}function Gte(n,e,t){return e>t}function $te(n,e,t){return e<=t}function Qte(n,e,t){return e>=t}function wz(n,e,t,r){return r.compare(e,t)===0}function Yte(n,e,t,r){return!wz(n,e,t,r)}function qte(n,e,t,r){return r.compare(e,t)<0}function Vte(n,e,t,r){return r.compare(e,t)>0}function Hte(n,e,t,r){return r.compare(e,t)<=0}function Zte(n,e,t,r){return r.compare(e,t)>=0}function Bv(n,e,t){const r=n!=="=="&&n!=="!=";return class Mz{constructor(o,a,s){this.type=Zi,this.lhs=o,this.rhs=a,this.collator=s,this.hasUntypedArgument=o.type.kind==="value"||a.type.kind==="value"}static parse(o,a){if(o.length!==3&&o.length!==4)return a.error("Expected two or three arguments.");const s=o[0];let d=a.parse(o[1],1,Ji);if(!d)return null;if(!PT(s,d.type))return a.concat(1).error(`"${s}" comparisons are not supported for type '${Ps(d.type)}'.`);let f=a.parse(o[2],2,Ji);if(!f)return null;if(!PT(s,f.type))return a.concat(2).error(`"${s}" comparisons are not supported for type '${Ps(f.type)}'.`);if(d.type.kind!==f.type.kind&&d.type.kind!=="value"&&f.type.kind!=="value")return a.error(`Cannot compare types '${Ps(d.type)}' and '${Ps(f.type)}'.`);r&&(d.type.kind==="value"&&f.type.kind!=="value"?d=new Lp(f.type,[d]):d.type.kind!=="value"&&f.type.kind==="value"&&(f=new Lp(d.type,[f])));let C=null;if(o.length===4){if(d.type.kind!=="string"&&f.type.kind!=="string"&&d.type.kind!=="value"&&f.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(C=a.parse(o[3],3,iw),!C)return null}return new Mz(d,f,C)}evaluate(o){const a=this.lhs.evaluate(o),s=this.rhs.evaluate(o);if(r&&this.hasUntypedArgument){const d=Jl(a),f=Jl(s);if(d.kind!==f.kind||!(d.kind==="string"||d.kind==="number"))throw new wl(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${d.kind}, ${f.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const d=Jl(a),f=Jl(s);if(d.kind!=="string"||f.kind!=="string")return e(o,a,s)}return this.collator?t(o,a,s,this.collator.evaluate(o)):e(o,a,s)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}}}const Xte=Bv("==",jte,wz),Jte=Bv("!=",Nte,Yte),ene=Bv("<",Wte,qte),tne=Bv(">",Gte,Vte),nne=Bv("<=",$te,Hte),rne=Bv(">=",Qte,Zte);let ine=class Sz{constructor(e,t,r,i,o){this.type=yo,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=o}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ir);if(!r)return null;const i=e[2];if(typeof i!="object"||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=t.parse(i.locale,1,yo),!o))return null;let a=null;if(i.currency&&(a=t.parse(i.currency,1,yo),!a))return null;let s=null;if(i["min-fraction-digits"]&&(s=t.parse(i["min-fraction-digits"],1,ir),!s))return null;let d=null;return i["max-fraction-digits"]&&(d=t.parse(i["max-fraction-digits"],1,ir),!d)?null:new Sz(r,o,a,s,d)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},one=class Ez{constructor(e){this.type=ow,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return t.error("First argument must be an image or text section.");const i=[];let o=!1;for(let a=1;a<=e.length-1;++a){const s=e[a];if(o&&typeof s=="object"&&!Array.isArray(s)){o=!1;let d=null;if(s["font-scale"]&&(d=t.parse(s["font-scale"],1,ir),!d))return null;let f=null;if(s["text-font"]&&(f=t.parse(s["text-font"],1,Vc(yo)),!f))return null;let C=null;if(s["text-color"]&&(C=t.parse(s["text-color"],1,zf),!C))return null;const O=i[i.length-1];O.scale=d,O.font=f,O.textColor=C}else{const d=t.parse(e[a],1,Ji);if(!d)return null;const f=d.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:d,scale:null,font:null,textColor:null})}}return new Ez(i)}evaluate(e){const t=r=>{const i=r.content.evaluate(e);return Jl(i)===Db?new H6("",i,null,null,null):new H6(y_(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)};return new Ev(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}},ane=class Oz{constructor(e){this.type=Db,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const r=t.parse(e[1],1,yo);return r?new Oz(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=$1.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},sne=class Bz{constructor(e){this.type=ir,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${Ps(r.type)} instead.`):new Bz(r):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return t.length;if(Array.isArray(t))return t.length;throw new wl(`Expected value to be of type string or array, but found ${Ps(Jl(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}};const t8={"==":Xte,"!=":Jte,">":tne,"<":ene,">=":rne,"<=":nne,array:Lp,at:Dte,boolean:Lp,case:Rte,coalesce:gz,collator:sz,format:one,image:ane,in:Lte,"index-of":Fte,interpolate:Np,"interpolate-hcl":Np,"interpolate-lab":Np,length:sne,let:yz,literal:h4,match:Ute,number:Lp,"number-format":ine,object:Lp,slice:zte,step:fz,string:Lp,"to-boolean":gy,"to-color":gy,"to-number":gy,"to-string":gy,var:dz,within:e8};function DT(n,[e,t,r,i]){e=e.evaluate(n),t=t.evaluate(n),r=r.evaluate(n);const o=i?i.evaluate(n):1,a=ez(e,t,r,o);if(a)throw new wl(a);return new Ls(e/255,t/255,r/255,o,!1)}function LT(n,e){return n in e}function kS(n,e){const t=e[n];return typeof t>"u"?null:t}function lne(n,e,t,r){for(;t<=r;){const i=t+r>>1;if(e[i]===n)return!0;e[i]>n?r=i-1:t=i+1}return!1}function z0(n){return{type:n}}Ov.register(t8,{error:[nte,[yo],(n,[e])=>{throw new wl(e.evaluate(n))}],typeof:[yo,[Ji],(n,[e])=>Ps(Jl(e.evaluate(n)))],"to-rgba":[Vc(ir,4),[zf],(n,[e])=>{const[t,r,i,o]=e.evaluate(n).rgb;return[t*255,r*255,i*255,o]}],rgb:[zf,[ir,ir,ir],DT],rgba:[zf,[ir,ir,ir,ir],DT],has:{type:Zi,overloads:[[[yo],(n,[e])=>LT(e.evaluate(n),n.properties())],[[yo,Py],(n,[e,t])=>LT(e.evaluate(n),t.evaluate(n))]]},get:{type:Ji,overloads:[[[yo],(n,[e])=>kS(e.evaluate(n),n.properties())],[[yo,Py],(n,[e,t])=>kS(e.evaluate(n),t.evaluate(n))]]},"feature-state":[Ji,[yo],(n,[e])=>kS(e.evaluate(n),n.featureState||{})],properties:[Py,[],n=>n.properties()],"geometry-type":[yo,[],n=>n.geometryType()],id:[Ji,[],n=>n.id()],zoom:[ir,[],n=>n.globals.zoom],"heatmap-density":[ir,[],n=>n.globals.heatmapDensity||0],"line-progress":[ir,[],n=>n.globals.lineProgress||0],accumulated:[Ji,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[ir,z0(ir),(n,e)=>{let t=0;for(const r of e)t+=r.evaluate(n);return t}],"*":[ir,z0(ir),(n,e)=>{let t=1;for(const r of e)t*=r.evaluate(n);return t}],"-":{type:ir,overloads:[[[ir,ir],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[ir],(n,[e])=>-e.evaluate(n)]]},"/":[ir,[ir,ir],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[ir,[ir,ir],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[ir,[],()=>Math.LN2],pi:[ir,[],()=>Math.PI],e:[ir,[],()=>Math.E],"^":[ir,[ir,ir],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[ir,[ir],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[ir,[ir],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[ir,[ir],(n,[e])=>Math.log(e.evaluate(n))],log2:[ir,[ir],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[ir,[ir],(n,[e])=>Math.sin(e.evaluate(n))],cos:[ir,[ir],(n,[e])=>Math.cos(e.evaluate(n))],tan:[ir,[ir],(n,[e])=>Math.tan(e.evaluate(n))],asin:[ir,[ir],(n,[e])=>Math.asin(e.evaluate(n))],acos:[ir,[ir],(n,[e])=>Math.acos(e.evaluate(n))],atan:[ir,[ir],(n,[e])=>Math.atan(e.evaluate(n))],min:[ir,z0(ir),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[ir,z0(ir),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[ir,[ir],(n,[e])=>Math.abs(e.evaluate(n))],round:[ir,[ir],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[ir,[ir],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[ir,[ir],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[Zi,[yo,Ji],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[Zi,[Ji],(n,[e])=>n.id()===e.value],"filter-type-==":[Zi,[yo],(n,[e])=>n.geometryType()===e.value],"filter-<":[Zi,[yo,Ji],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<i}],"filter-id-<":[Zi,[Ji],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<r}],"filter->":[Zi,[yo,Ji],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>i}],"filter-id->":[Zi,[Ji],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>r}],"filter-<=":[Zi,[yo,Ji],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[Zi,[Ji],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<=r}],"filter->=":[Zi,[yo,Ji],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[Zi,[Ji],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>=r}],"filter-has":[Zi,[Ji],(n,[e])=>e.value in n.properties()],"filter-has-id":[Zi,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Zi,[Vc(yo)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[Zi,[Vc(Ji)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[Zi,[yo,Vc(Ji)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[Zi,[yo,Vc(Ji)],(n,[e,t])=>lne(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:Zi,overloads:[[[Zi,Zi],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[z0(Zi),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:Zi,overloads:[[[Zi,Zi],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[z0(Zi),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[Zi,[Zi],(n,[e])=>!e.evaluate(n)],"is-supported-script":[Zi,[yo],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[yo,[yo],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[yo,[yo],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[yo,z0(Ji),(n,e)=>e.map(t=>y_(t.evaluate(n))).join("")],"resolved-locale":[yo,[iw],(n,[e])=>e.evaluate(n).resolvedLocale()]});function tO(n){return{result:"success",value:n}}function qg(n){return{result:"error",value:n}}function g4(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function Iz(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function n8(n){return!!n.expression&&n.expression.interpolated}function jo(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function Lb(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function une(n){return n}function r8(n,e){const t=e.type==="color",r=n.stops&&typeof n.stops[0][0]=="object",i=r||n.property!==void 0,o=r||!i,a=n.type||(n8(e)?"exponential":"interval");if(t||e.type==="padding"){const C=t?Ls.parse:rd.parse;n=cv({},n),n.stops&&(n.stops=n.stops.map(O=>[O[0],C(O[1])])),n.default?n.default=C(n.default):n.default=C(e.default)}if(n.colorSpace&&!kte(n.colorSpace))throw new Error(`Unknown color space: "${n.colorSpace}"`);let s,d,f;if(a==="exponential")s=FT;else if(a==="interval")s=cne;else if(a==="categorical"){s=Ane,d=Object.create(null);for(const C of n.stops)d[C[0]]=C[1];f=typeof n.stops[0][0]}else if(a==="identity")s=dne;else throw new Error(`Unknown function type "${a}"`);if(r){const C={},O=[];for(let D=0;D<n.stops.length;D++){const $=n.stops[D],H=$[0].zoom;C[H]===void 0&&(C[H]={zoom:H,type:n.type,property:n.property,default:n.default,stops:[]},O.push(H)),C[H].stops.push([$[0].value,$[1]])}const E=[];for(const D of O)E.push([C[D].zoom,r8(C[D],e)]);const P={name:"linear"};return{kind:"composite",interpolationType:P,interpolationFactor:Np.interpolationFactor.bind(void 0,P),zoomStops:E.map(D=>D[0]),evaluate({zoom:D},$){return FT({stops:E,base:n.base},e,D).evaluate(D,$)}}}else if(o){const C=a==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:C,interpolationFactor:Np.interpolationFactor.bind(void 0,C),zoomStops:n.stops.map(O=>O[0]),evaluate:({zoom:O})=>s(n,e,O,d,f)}}else return{kind:"source",evaluate(C,O){const E=O&&O.properties?O.properties[n.property]:void 0;return E===void 0?Fb(n.default,e.default):s(n,e,E,d,f)}}}function Fb(n,e,t){if(n!==void 0)return n;if(e!==void 0)return e;if(t!==void 0)return t}function Ane(n,e,t,r,i){const o=typeof t===i?r[t]:void 0;return Fb(o,n.default,e.default)}function cne(n,e,t){if(jo(t)!=="number")return Fb(n.default,e.default);const r=n.stops.length;if(r===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[r-1][0])return n.stops[r-1][1];const i=Aw(n.stops.map(o=>o[0]),t);return n.stops[i][1]}function FT(n,e,t){const r=n.base!==void 0?n.base:1;if(jo(t)!=="number")return Fb(n.default,e.default);const i=n.stops.length;if(i===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[i-1][0])return n.stops[i-1][1];const o=Aw(n.stops.map(C=>C[0]),t),a=hne(t,r,n.stops[o][0],n.stops[o+1][0]),s=n.stops[o][1],d=n.stops[o+1][1],f=C3[e.type]||une;return typeof s.evaluate=="function"?{evaluate(...C){const O=s.evaluate.apply(void 0,C),E=d.evaluate.apply(void 0,C);if(!(O===void 0||E===void 0))return f(O,E,a,n.colorSpace)}}:f(s,d,a,n.colorSpace)}function dne(n,e,t){switch(e.type){case"color":t=Ls.parse(t);break;case"formatted":t=Ev.fromString(t.toString());break;case"resolvedImage":t=$1.fromString(t.toString());break;case"padding":t=rd.parse(t);break;default:jo(t)!==e.type&&(e.type!=="enum"||!e.values[t])&&(t=void 0)}return Fb(t,n.default,e.default)}function hne(n,e,t,r){const i=r-t,o=n-t;return i===0?0:e===1?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}let kz=class{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new iz,this._defaultValue=t?gne(t):null,this._enumValues=t&&t.type==="enum"?t.values:null}evaluateWithoutErrorHandling(e,t,r,i,o,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,o,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a||null;try{const s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new wl(`Expected value to be one of ${Object.keys(this._enumValues).map(d=>JSON.stringify(d)).join(", ")}, but found ${JSON.stringify(s)} instead.`);return s}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,typeof console<"u"&&console.warn(s.message)),this._defaultValue}}};function Ub(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in t8}function i8(n,e){const t=new oz(t8,p4,[],e?mne(e):void 0),r=t.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return r?tO(new kz(r,e)):qg(t.errors)}let nO=class{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!rb(t.expression)}evaluateWithoutErrorHandling(e,t,r,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,o,a)}evaluate(e,t,r,i,o,a){return this._styleExpression.evaluate(e,t,r,i,o,a)}},rO=class{constructor(e,t,r,i){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!rb(t.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,t,r,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,o,a)}evaluate(e,t,r,i,o,a){return this._styleExpression.evaluate(e,t,r,i,o,a)}interpolationFactor(e,t,r){return this.interpolationType?Np.interpolationFactor(this.interpolationType,e,t,r):0}};function fne(n){return n._styleExpression!==void 0}function o8(n,e){const t=i8(n,e);if(t.result==="error")return t;const r=t.value.expression,i=lw(r);if(!i&&!g4(e))return qg([new Kf("","data expressions not supported")]);const o=uw(r,["zoom"]);if(!o&&!Iz(e))return qg([new Kf("","zoom expressions not supported")]);const a=_3(r);if(!a&&!o)return qg([new Kf("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Kf)return qg([a]);if(a instanceof Np&&!n8(e))return qg([new Kf("",'"interpolate" expressions cannot be used with this property')]);if(!a)return tO(i?new nO("constant",t.value):new nO("source",t.value));const s=a instanceof Np?a.interpolation:void 0;return tO(i?new rO("camera",t.value,a.labels,s):new rO("composite",t.value,a.labels,s))}let Tz=class Kz{constructor(e,t){this._parameters=e,this._specification=t,cv(this,r8(this._parameters,this._specification))}static deserialize(e){return new Kz(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}};function pne(n,e){if(Lb(n))return new Tz(n,e);if(Ub(n)){const t=o8(n,e);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return t.value}else{let t=n;return e.type==="color"&&typeof n=="string"?t=Ls.parse(n):e.type==="padding"&&(typeof n=="number"||Array.isArray(n))?t=rd.parse(n):e.type==="variableAnchorOffsetCollection"&&Array.isArray(n)&&(t=Nf.parse(n)),{kind:"constant",evaluate:()=>t}}}function _3(n){let e=null;if(n instanceof yz)e=_3(n.result);else if(n instanceof gz){for(const t of n.args)if(e=_3(t),e)break}else(n instanceof fz||n instanceof Np)&&n.input instanceof Ov&&n.input.name==="zoom"&&(e=n);return e instanceof Kf||n.eachChild(t=>{const r=_3(t);r instanceof Kf?e=r:!e&&r?e=new Kf("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Kf("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function mne(n){const e={color:zf,string:yo,number:ir,enum:yo,boolean:Zi,formatted:ow,padding:aw,resolvedImage:Db,variableAnchorOffsetCollection:sw};return n.type==="array"?Vc(e[n.value]||Ji,n.length):e[n.type]}function gne(n){return n.type==="color"&&Lb(n.default)?new Ls(0,0,0,0):n.type==="color"?Ls.parse(n.default)||null:n.type==="padding"?rd.parse(n.default)||null:n.type==="variableAnchorOffsetCollection"?Nf.parse(n.default)||null:n.default===void 0?null:n.default}function cw(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const e of n.slice(1))if(!cw(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function v_(n,e={}){if(cw(n))return n;if(!n)return!0;const t=n,r=t[0];if(n.length<=1)return r!=="any";switch(r){case"==":case"!=":case"<":case">":case"<=":case">=":{const[,i,o]=n;return vne(i,o,r,e)}case"any":{const[,...i]=t;return["any",...i.map(a=>{const s={},d=v_(a,s),f=yne(s);return f===!0?d:["case",f,d,!1]})]}case"all":{const[,...i]=t,o=i.map(a=>v_(a,e));return o.length>1?["all",...o]:o[0]}case"none":{const[,...i]=t;return["!",v_(["any",...i],{})]}case"in":{const[,i,...o]=t;return UT(i,o)}case"!in":{const[,i,...o]=t;return UT(i,o,!0)}case"has":return RT(t[1]);case"!has":return["!",RT(t[1])];default:return!0}}function yne(n){const e=[];for(const t in n){const r=t==="$id"?["id"]:["get",t];e.push(["==",["typeof",r],n[t]])}return e.length===0?!0:e.length===1?e[0]:["all",...e]}function vne(n,e,t,r){let i;if(n==="$type")return[t,["geometry-type"],e];if(n==="$id"?i=["id"]:i=["get",n],r&&e!==null){const o=typeof e;r[n]=o}return t==="=="&&n!=="$id"&&e===null?["all",["has",n],["==",i,null]]:t==="!="&&n!=="$id"&&e===null?["any",["!",["has",n]],["!=",i,null]]:[t,i,e]}function UT(n,e,t=!1){if(e.length===0)return t;let r;n==="$type"?r=["geometry-type"]:n==="$id"?r=["id"]:r=["get",n];let i=!0;const o=typeof e[0];for(const a of e)if(typeof a!==o){i=!1;break}if(i&&(o==="string"||o==="number")){const a=e.sort().filter((s,d)=>d===0||e[d-1]!==s);return["match",r,a,!t,t]}return t?["all",...e.map(a=>["!=",r,a])]:["any",...e.map(a=>["==",r,a])]}function RT(n){return n==="$type"?!0:n==="$id"?["!=",["id"],null]:["has",n]}function ib(n){return typeof n=="object"?["literal",n]:n}function Pz(n,e){let t=n.stops;if(!t)return Cne(n,e);const r=t&&typeof t[0][0]=="object",i=r||n.property!==void 0,o=r||!i;return t=t.map(a=>!i&&e.tokens&&typeof a[1]=="string"?[a[0],Dz(a[1])]:[a[0],ib(a[1])]),r?_ne(n,e,t):o?xne(n,e,t):iO(n,e,t)}function Cne(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const r=[e.type==="color"?"to-color":e.type,t,ib(n.default)];return e.type==="array"&&r.splice(1,0,e.value,e.length||null),r}}function a8(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function _ne(n,e,t){const r={},i={},o=[];for(let s=0;s<t.length;s++){const d=t[s],f=d[0].zoom;r[f]===void 0&&(r[f]={zoom:f,type:n.type,property:n.property,default:n.default},i[f]=[],o.push(f)),i[f].push([d[0].value,d[1]])}if(l8({},e)==="exponential"){const s=[a8(n),["linear"],["zoom"]];for(const d of o){const f=iO(r[d],e,i[d]);Ly(s,d,f,!1)}return s}else{const s=["step",["zoom"]];for(const d of o){const f=iO(r[d],e,i[d]);Ly(s,d,f,!0)}return s8(s),s}}function bne(n,e){if(n!==void 0)return n;if(e!==void 0)return e}function zT(n,e){const t=ib(bne(n.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function iO(n,e,t){const r=l8(n,e),i=["get",n.property];if(r==="categorical"&&typeof t[0][0]=="boolean"){const o=["case"];for(const a of t)o.push(["==",i,a[0]],a[1]);return o.push(zT(n,e)),o}else if(r==="categorical"){const o=["match",i];for(const a of t)Ly(o,a[0],a[1],!1);return o.push(zT(n,e)),o}else if(r==="interval"){const o=["step",["number",i]];for(const a of t)Ly(o,a[0],a[1],!0);return s8(o),n.default===void 0?o:["case",["==",["typeof",i],"number"],o,ib(n.default)]}else if(r==="exponential"){const o=n.base!==void 0?n.base:1,a=[a8(n),o===1?["linear"]:["exponential",o],["number",i]];for(const s of t)Ly(a,s[0],s[1],!1);return n.default===void 0?a:["case",["==",["typeof",i],"number"],a,ib(n.default)]}else throw new Error(`Unknown property function type ${r}`)}function xne(n,e,t,r=["zoom"]){const i=l8(n,e);let o,a=!1;if(i==="interval")o=["step",r],a=!0;else if(i==="exponential"){const s=n.base!==void 0?n.base:1;o=[a8(n),s===1?["linear"]:["exponential",s],r]}else throw new Error(`Unknown zoom function type "${i}"`);for(const s of t)Ly(o,s[0],s[1],a);return s8(o),o}function s8(n){n[0]==="step"&&n.length===3&&(n.push(0),n.push(n[3]))}function Ly(n,e,t,r){n.length>3&&e===n[n.length-2]||(r&&n.length===2||n.push(e),n.push(t))}function l8(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function Dz(n){const e=["concat"],t=/{([^{}]+)}/g;let r=0;for(let i=t.exec(n);i!==null;i=t.exec(n)){const o=n.slice(r,t.lastIndex-i[0].length);r=t.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(e.length===1)return n;if(r<n.length)e.push(n.slice(r));else if(e.length===2)return["to-string",e[1]];return e}function wne(n){for(let e=0;e<Ea.layout.length;e++)for(const t in Ea[Ea.layout[e]])if(t===n)return Ea[Ea.layout[e]][t];for(let e=0;e<Ea.paint.length;e++)for(const t in Ea[Ea.paint[e]])if(t===n)return Ea[Ea.paint[e]][t];return null}function Mne(n,e){for(const t in n.sources)e(n.sources[t])}function C_(n,e){for(const t of n.layers)e(t)}function u8(n,e,t){function r(i,o){const a=i[o];a&&Object.keys(a).forEach(s=>{t({path:[i.id,o,s],key:s,value:a[s],reference:wne(s),set(d){a[s]=d}})})}C_(n,i=>{e.paint&&r(i,"paint"),e.layout&&r(i,"layout")})}function Lz(n){const e=n.key,t=n.value;return t?[new er(e,t,"constants have been deprecated as of v8")]:[]}function ll(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function K1(n){if(Array.isArray(n))return n.map(K1);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const e={};for(const t in n)e[t]=K1(n[t]);return e}return ll(n)}function Ud(n){const e=n.key,t=n.value,r=n.valueSpec||{},i=n.objectElementValidators||{},o=n.style,a=n.styleSpec,s=n.validateSpec;let d=[];const f=jo(t);if(f!=="object")return[new er(e,t,`object expected, ${f} found`)];for(const C in t){const O=C.split(".")[0],E=r[O]||r["*"];let P;if(i[O])P=i[O];else if(r[O])P=s;else if(i["*"])P=i["*"];else if(r["*"])P=s;else{d.push(new er(e,t[C],`unknown property "${C}"`));continue}d=d.concat(P({key:(e&&`${e}.`)+C,value:t[C],valueSpec:E,style:o,styleSpec:a,object:t,objectKey:C,validateSpec:s},t))}for(const C in r)i[C]||r[C].required&&r[C].default===void 0&&t[C]===void 0&&d.push(new er(e,t,`missing required property "${C}"`));return d}function A8(n){const e=n.value,t=n.valueSpec,r=n.validateSpec,i=n.style,o=n.styleSpec,a=n.key,s=n.arrayElementValidator||r;if(jo(e)!=="array")return[new er(a,e,`array expected, ${jo(e)} found`)];if(t.length&&e.length!==t.length)return[new er(a,e,`array length ${t.length} expected, length ${e.length} found`)];if(t["min-length"]&&e.length<t["min-length"])return[new er(a,e,`array length at least ${t["min-length"]} expected, length ${e.length} found`)];let d={type:t.value,values:t.values};o.$version<7&&(d.function=t.function),jo(t.value)==="object"&&(d=t.value);let f=[];for(let C=0;C<e.length;C++)f=f.concat(s({array:e,arrayIndex:C,value:e[C],valueSpec:d,validateSpec:n.validateSpec,style:i,styleSpec:o,key:`${a}[${C}]`}));return f}function c8(n){const e=n.key,t=n.value,r=n.valueSpec;let i=jo(t);return i==="number"&&t!==t&&(i="NaN"),i!=="number"?[new er(e,t,`number expected, ${i} found`)]:"minimum"in r&&t<r.minimum?[new er(e,t,`${t} is less than the minimum value ${r.minimum}`)]:"maximum"in r&&t>r.maximum?[new er(e,t,`${t} is greater than the maximum value ${r.maximum}`)]:[]}function Fz(n){const e=n.valueSpec,t=ll(n.value.type);let r,i={},o,a;const s=t!=="categorical"&&n.value.property===void 0,d=!s,f=jo(n.value.stops)==="array"&&jo(n.value.stops[0])==="array"&&jo(n.value.stops[0][0])==="object",C=Ud({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:O,default:D}});return t==="identity"&&s&&C.push(new er(n.key,n.value,'missing required property "property"')),t!=="identity"&&!n.value.stops&&C.push(new er(n.key,n.value,'missing required property "stops"')),t==="exponential"&&n.valueSpec.expression&&!n8(n.valueSpec)&&C.push(new er(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(d&&!g4(n.valueSpec)?C.push(new er(n.key,n.value,"property functions not supported")):s&&!Iz(n.valueSpec)&&C.push(new er(n.key,n.value,"zoom functions not supported"))),(t==="categorical"||f)&&n.value.property===void 0&&C.push(new er(n.key,n.value,'"property" property is required')),C;function O($){if(t==="identity")return[new er($.key,$.value,'identity function may not have a "stops" property')];let H=[];const Q=$.value;return H=H.concat(A8({key:$.key,value:Q,valueSpec:$.valueSpec,validateSpec:$.validateSpec,style:$.style,styleSpec:$.styleSpec,arrayElementValidator:E})),jo(Q)==="array"&&Q.length===0&&H.push(new er($.key,Q,"array must have at least one stop")),H}function E($){let H=[];const Q=$.value,N=$.key;if(jo(Q)!=="array")return[new er(N,Q,`array expected, ${jo(Q)} found`)];if(Q.length!==2)return[new er(N,Q,`array length 2 expected, length ${Q.length} found`)];if(f){if(jo(Q[0])!=="object")return[new er(N,Q,`object expected, ${jo(Q[0])} found`)];if(Q[0].zoom===void 0)return[new er(N,Q,"object stop key must have zoom")];if(Q[0].value===void 0)return[new er(N,Q,"object stop key must have value")];if(a&&a>ll(Q[0].zoom))return[new er(N,Q[0].zoom,"stop zoom values must appear in ascending order")];ll(Q[0].zoom)!==a&&(a=ll(Q[0].zoom),o=void 0,i={}),H=H.concat(Ud({key:`${N}[0]`,value:Q[0],valueSpec:{zoom:{}},validateSpec:$.validateSpec,style:$.style,styleSpec:$.styleSpec,objectElementValidators:{zoom:c8,value:P}}))}else H=H.concat(P({key:`${N}[0]`,value:Q[0],valueSpec:{},validateSpec:$.validateSpec,style:$.style,styleSpec:$.styleSpec},Q));return Ub(K1(Q[1]))?H.concat([new er(`${N}[1]`,Q[1],"expressions are not allowed in function stops.")]):H.concat($.validateSpec({key:`${N}[1]`,value:Q[1],valueSpec:e,validateSpec:$.validateSpec,style:$.style,styleSpec:$.styleSpec}))}function P($,H){const Q=jo($.value),N=ll($.value),Z=$.value!==null?$.value:H;if(!r)r=Q;else if(Q!==r)return[new er($.key,Z,`${Q} stop domain type must match previous stop domain type ${r}`)];if(Q!=="number"&&Q!=="string"&&Q!=="boolean")return[new er($.key,Z,"stop domain value must be a number, string, or boolean")];if(Q!=="number"&&t!=="categorical"){let ae=`number expected, ${Q} found`;return g4(e)&&t===void 0&&(ae+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new er($.key,Z,ae)]}return t==="categorical"&&Q==="number"&&(!isFinite(N)||Math.floor(N)!==N)?[new er($.key,Z,`integer expected, found ${N}`)]:t!=="categorical"&&Q==="number"&&o!==void 0&&N<o?[new er($.key,Z,"stop domain values must appear in ascending order")]:(o=N,t==="categorical"&&N in i?[new er($.key,Z,"stop domain values must be unique")]:(i[N]=!0,[]))}function D($){return $.validateSpec({key:$.key,value:$.value,valueSpec:e,validateSpec:$.validateSpec,style:$.style,styleSpec:$.styleSpec})}}function dv(n){const e=(n.expressionContext==="property"?o8:i8)(K1(n.value),n.valueSpec);if(e.result==="error")return e.value.map(r=>new er(`${n.key}${r.key}`,n.value,r.message));const t=e.value.expression||e.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!t.outputDefined())return[new er(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!rb(t))return[new er(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!rb(t))return[new er(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!uw(t,["zoom","feature-state"]))return[new er(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!lw(t))return[new er(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Sne(n){const e=n.value,t=n.key,r=jo(e);return r!=="boolean"?[new er(t,e,`boolean expected, ${r} found`)]:[]}function Ene(n){const e=n.key,t=n.value,r=jo(t);return r!=="string"?[new er(e,t,`color expected, ${r} found`)]:Ls.parse(String(t))?[]:[new er(e,t,`color expected, "${t}" found`)]}function ob(n){const e=n.key,t=n.value,r=n.valueSpec,i=[];return Array.isArray(r.values)?r.values.indexOf(ll(t))===-1&&i.push(new er(e,t,`expected one of [${r.values.join(", ")}], ${JSON.stringify(t)} found`)):Object.keys(r.values).indexOf(ll(t))===-1&&i.push(new er(e,t,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(t)} found`)),i}function d8(n){return cw(K1(n.value))?dv(cv({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Uz(n)}function Uz(n){const e=n.value,t=n.key;if(jo(e)!=="array")return[new er(t,e,`array expected, ${jo(e)} found`)];const r=n.styleSpec;let i,o=[];if(e.length<1)return[new er(t,e,"filter array must have at least 1 element")];switch(o=o.concat(ob({key:`${t}[0]`,value:e[0],valueSpec:r.filter_operator,style:n.style,styleSpec:n.styleSpec})),ll(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&ll(e[1])==="$type"&&o.push(new er(t,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&o.push(new er(t,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(i=jo(e[1]),i!=="string"&&o.push(new er(`${t}[1]`,e[1],`string expected, ${i} found`)));for(let a=2;a<e.length;a++)i=jo(e[a]),ll(e[1])==="$type"?o=o.concat(ob({key:`${t}[${a}]`,value:e[a],valueSpec:r.geometry_type,style:n.style,styleSpec:n.styleSpec})):i!=="string"&&i!=="number"&&i!=="boolean"&&o.push(new er(`${t}[${a}]`,e[a],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let a=1;a<e.length;a++)o=o.concat(Uz({key:`${t}[${a}]`,value:e[a],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":i=jo(e[1]),e.length!==2?o.push(new er(t,e,`filter array for "${e[0]}" operator must have 2 elements`)):i!=="string"&&o.push(new er(`${t}[1]`,e[1],`string expected, ${i} found`));break;case"within":i=jo(e[1]),e.length!==2?o.push(new er(t,e,`filter array for "${e[0]}" operator must have 2 elements`)):i!=="object"&&o.push(new er(`${t}[1]`,e[1],`object expected, ${i} found`));break}return o}function Rz(n,e){const t=n.key,r=n.validateSpec,i=n.style,o=n.styleSpec,a=n.value,s=n.objectKey,d=o[`${e}_${n.layerType}`];if(!d)return[];const f=s.match(/^(.*)-transition$/);if(e==="paint"&&f&&d[f[1]]&&d[f[1]].transition)return r({key:t,value:a,valueSpec:o.transition,style:i,styleSpec:o});const C=n.valueSpec||d[s];if(!C)return[new er(t,a,`unknown property "${s}"`)];let O;if(jo(a)==="string"&&g4(C)&&!C.tokens&&(O=/^{([^}]+)}$/.exec(a)))return[new er(t,a,`"${s}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(O[1])} }\`.`)];const E=[];return n.layerType==="symbol"&&(s==="text-field"&&i&&!i.glyphs&&E.push(new er(t,a,'use of "text-field" requires a style "glyphs" property')),s==="text-font"&&Lb(K1(a))&&ll(a.type)==="identity"&&E.push(new er(t,a,'"text-font" does not support identity functions'))),E.concat(r({key:n.key,value:a,valueSpec:C,style:i,styleSpec:o,expressionContext:"property",propertyType:e,propertyKey:s}))}function zz(n){return Rz(n,"paint")}function jz(n){return Rz(n,"layout")}function Nz(n){let e=[];const t=n.value,r=n.key,i=n.style,o=n.styleSpec;!t.type&&!t.ref&&e.push(new er(r,t,'either "type" or "ref" is required'));let a=ll(t.type);const s=ll(t.ref);if(t.id){const d=ll(t.id);for(let f=0;f<n.arrayIndex;f++){const C=i.layers[f];ll(C.id)===d&&e.push(new er(r,t.id,`duplicate layer id "${t.id}", previously used at line ${C.id.__line__}`))}}if("ref"in t){["type","source","source-layer","filter","layout"].forEach(f=>{f in t&&e.push(new er(r,t[f],`"${f}" is prohibited for ref layers`))});let d;i.layers.forEach(f=>{ll(f.id)===s&&(d=f)}),d?d.ref?e.push(new er(r,t.ref,"ref cannot reference another ref layer")):a=ll(d.type):e.push(new er(r,t.ref,`ref layer "${s}" not found`))}else if(a!=="background")if(!t.source)e.push(new er(r,t,'missing required property "source"'));else{const d=i.sources&&i.sources[t.source],f=d&&ll(d.type);d?f==="vector"&&a==="raster"?e.push(new er(r,t.source,`layer "${t.id}" requires a raster source`)):f!=="raster-dem"&&a==="hillshade"?e.push(new er(r,t.source,`layer "${t.id}" requires a raster-dem source`)):f==="raster"&&a!=="raster"?e.push(new er(r,t.source,`layer "${t.id}" requires a vector source`)):f==="vector"&&!t["source-layer"]?e.push(new er(r,t,`layer "${t.id}" must specify a "source-layer"`)):f==="raster-dem"&&a!=="hillshade"?e.push(new er(r,t.source,"raster-dem source can only be used with layer type 'hillshade'.")):a==="line"&&t.paint&&t.paint["line-gradient"]&&(f!=="geojson"||!d.lineMetrics)&&e.push(new er(r,t,`layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new er(r,t.source,`source "${t.source}" not found`))}return e=e.concat(Ud({key:r,value:t,valueSpec:o.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*"(){return[]},type(){return n.validateSpec({key:`${r}.type`,value:t.type,valueSpec:o.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:t,objectKey:"type"})},filter:d8,layout(d){return Ud({layer:t,key:d.key,value:d.value,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,objectElementValidators:{"*"(f){return jz(cv({layerType:a},f))}}})},paint(d){return Ud({layer:t,key:d.key,value:d.value,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,objectElementValidators:{"*"(f){return zz(cv({layerType:a},f))}}})}}})),e}function P1(n){const e=n.value,t=n.key,r=jo(e);return r!=="string"?[new er(t,e,`string expected, ${r} found`)]:[]}function One(n){var e;const t=(e=n.sourceName)!==null&&e!==void 0?e:"",r=n.value,i=n.styleSpec,o=i.source_raster_dem,a=n.style;let s=[];const d=jo(r);if(r===void 0)return s;if(d!=="object")return s.push(new er("source_raster_dem",r,`object expected, ${d} found`)),s;const C=ll(r.encoding)==="custom",O=["redFactor","greenFactor","blueFactor","baseShift"],E=n.value.encoding?`"${n.value.encoding}"`:"Default";for(const P in r)!C&&O.includes(P)?s.push(new er(P,r[P],`In "${t}": "${P}" is only valid when "encoding" is set to "custom". ${E} encoding found`)):o[P]?s=s.concat(n.validateSpec({key:P,value:r[P],valueSpec:o[P],validateSpec:n.validateSpec,style:a,styleSpec:i})):s.push(new er(P,r[P],`unknown property "${P}"`));return s}const jT={promoteId:Bne};function Wz(n){const e=n.value,t=n.key,r=n.styleSpec,i=n.style,o=n.validateSpec;if(!e.type)return[new er(t,e,'"type" is required')];const a=ll(e.type);let s;switch(a){case"vector":case"raster":return s=Ud({key:t,value:e,valueSpec:r[`source_${a.replace("-","_")}`],style:n.style,styleSpec:r,objectElementValidators:jT,validateSpec:o}),s;case"raster-dem":return s=One({sourceName:t,value:e,style:n.style,styleSpec:r,validateSpec:o}),s;case"geojson":if(s=Ud({key:t,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,validateSpec:o,objectElementValidators:jT}),e.cluster)for(const d in e.clusterProperties){const[f,C]=e.clusterProperties[d],O=typeof f=="string"?[f,["accumulated"],["get",d]]:f;s.push(...dv({key:`${t}.${d}.map`,value:C,validateSpec:o,expressionContext:"cluster-map"})),s.push(...dv({key:`${t}.${d}.reduce`,value:O,validateSpec:o,expressionContext:"cluster-reduce"}))}return s;case"video":return Ud({key:t,value:e,valueSpec:r.source_video,style:i,validateSpec:o,styleSpec:r});case"image":return Ud({key:t,value:e,valueSpec:r.source_image,style:i,validateSpec:o,styleSpec:r});case"canvas":return[new er(t,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ob({key:`${t}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:o,styleSpec:r})}}function Bne({key:n,value:e}){if(jo(e)==="string")return P1({key:n,value:e});{const t=[];for(const r in e)t.push(...P1({key:`${n}.${r}`,value:e[r]}));return t}}function Gz(n){const e=n.value,t=n.styleSpec,r=t.light,i=n.style;let o=[];const a=jo(e);if(e===void 0)return o;if(a!=="object")return o=o.concat([new er("light",e,`object expected, ${a} found`)]),o;for(const s in e){const d=s.match(/^(.*)-transition$/);d&&r[d[1]]&&r[d[1]].transition?o=o.concat(n.validateSpec({key:s,value:e[s],valueSpec:t.transition,validateSpec:n.validateSpec,style:i,styleSpec:t})):r[s]?o=o.concat(n.validateSpec({key:s,value:e[s],valueSpec:r[s],validateSpec:n.validateSpec,style:i,styleSpec:t})):o=o.concat([new er(s,e[s],`unknown property "${s}"`)])}return o}function $z(n){const e=n.value,t=n.styleSpec,r=t.sky,i=n.style,o=jo(e);if(e===void 0)return[];if(o!=="object")return[new er("sky",e,`object expected, ${o} found`)];let a=[];for(const s in e)r[s]?a=a.concat(Fy({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:t})):a=a.concat([new er(s,e[s],`unknown property "${s}"`)]);return a}function Qz(n){const e=n.value,t=n.styleSpec,r=t.terrain,i=n.style;let o=[];const a=jo(e);if(e===void 0)return o;if(a!=="object")return o=o.concat([new er("terrain",e,`object expected, ${a} found`)]),o;for(const s in e)r[s]?o=o.concat(n.validateSpec({key:s,value:e[s],valueSpec:r[s],validateSpec:n.validateSpec,style:i,styleSpec:t})):o=o.concat([new er(s,e[s],`unknown property "${s}"`)]);return o}function Ine(n){return P1(n).length===0?[]:dv(n)}function kne(n){return P1(n).length===0?[]:dv(n)}function Tne(n){const e=n.key,t=n.value;if(jo(t)==="array"){if(t.length<1||t.length>4)return[new er(e,t,`padding requires 1 to 4 values; ${t.length} values found`)];const i={type:"number"};let o=[];for(let a=0;a<t.length;a++)o=o.concat(n.validateSpec({key:`${e}[${a}]`,value:t[a],validateSpec:n.validateSpec,valueSpec:i}));return o}else return c8({key:e,value:t,valueSpec:{}})}function Kne(n){const e=n.key,t=n.value,r=jo(t),i=n.styleSpec;if(r!=="array"||t.length<1||t.length%2!==0)return[new er(e,t,"variableAnchorOffsetCollection requires a non-empty array of even length")];let o=[];for(let a=0;a<t.length;a+=2)o=o.concat(ob({key:`${e}[${a}]`,value:t[a],valueSpec:i.layout_symbol["text-anchor"]})),o=o.concat(A8({key:`${e}[${a+1}]`,value:t[a+1],valueSpec:{length:2,value:"number"},validateSpec:n.validateSpec,style:n.style,styleSpec:i}));return o}function Yz(n){let e=[];const t=n.value,r=n.key;if(Array.isArray(t)){const i=[],o=[];for(const a in t){t[a].id&&i.includes(t[a].id)&&e.push(new er(r,t,`all the sprites' ids must be unique, but ${t[a].id} is duplicated`)),i.push(t[a].id),t[a].url&&o.includes(t[a].url)&&e.push(new er(r,t,`all the sprites' URLs must be unique, but ${t[a].url} is duplicated`)),o.push(t[a].url);const s={id:{type:"string",required:!0},url:{type:"string",required:!0}};e=e.concat(Ud({key:`${r}[${a}]`,value:t[a],valueSpec:s,validateSpec:n.validateSpec}))}return e}else return P1({key:r,value:t})}const NT={"*"(){return[]},array:A8,boolean:Sne,number:c8,color:Ene,constants:Lz,enum:ob,filter:d8,function:Fz,layer:Nz,object:Ud,source:Wz,light:Gz,sky:$z,terrain:Qz,string:P1,formatted:Ine,resolvedImage:kne,padding:Tne,variableAnchorOffsetCollection:Kne,sprite:Yz};function Fy(n){const e=n.value,t=n.valueSpec,r=n.styleSpec;return n.validateSpec=Fy,t.expression&&Lb(ll(e))?Fz(n):t.expression&&Ub(K1(e))?dv(n):t.type&&NT[t.type]?NT[t.type](n):Ud(cv({},n,{valueSpec:t.type?r[t.type]:t}))}function qz(n){const e=n.value,t=n.key,r=P1(n);return r.length||(e.indexOf("{fontstack}")===-1&&r.push(new er(t,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&r.push(new er(t,e,'"glyphs" url must include a "{range}" token'))),r}function Yd(n,e=Ea){let t=[];return t=t.concat(Fy({key:"",value:n,valueSpec:e.$root,styleSpec:e,style:n,validateSpec:Fy,objectElementValidators:{glyphs:qz,"*"(){return[]}}})),n.constants&&(t=t.concat(Lz({key:"constants",value:n.constants,style:n,styleSpec:e,validateSpec:Fy}))),Vz(t)}Yd.source=Zf(Hf(Wz));Yd.sprite=Zf(Hf(Yz));Yd.glyphs=Zf(Hf(qz));Yd.light=Zf(Hf(Gz));Yd.sky=Zf(Hf($z));Yd.terrain=Zf(Hf(Qz));Yd.layer=Zf(Hf(Nz));Yd.filter=Zf(Hf(d8));Yd.paintProperty=Zf(Hf(zz));Yd.layoutProperty=Zf(Hf(jz));function Hf(n){return function(e){return n({...e,validateSpec:Fy})}}function Vz(n){return[].concat(n).sort((e,t)=>e.line-t.line)}function Zf(n){return function(...e){return Vz(n.apply(this,e))}}const Pne=/("(?:[^\\"]|\\.)*")|[:,]/g;function Dne(n,e={}){const t=JSON.stringify([1],void 0,e.indent===void 0?2:e.indent).slice(2,-3),r=t===""?1/0:e.maxLength===void 0?80:e.maxLength;let{replacer:i}=e;return function o(a,s,d){a&&typeof a.toJSON=="function"&&(a=a.toJSON());const f=JSON.stringify(a,i);if(f===void 0)return f;const C=r-s.length-d;if(f.length<=C){const O=f.replace(Pne,(E,P)=>P||`${E} `);if(O.length<=C)return O}if(i!=null&&(a=JSON.parse(f),i=void 0),typeof a=="object"&&a!==null){const O=s+t,E=[];let P=0,D,$;if(Array.isArray(a)){D="[",$="]";const{length:H}=a;for(;P<H;P++)E.push(o(a[P],O,P===H-1?0:1)||"null")}else{D="{",$="}";const H=Object.keys(a),{length:Q}=H;for(;P<Q;P++){const N=H[P],Z=`${JSON.stringify(N)}: `,ae=o(a[N],O,Z.length+(P===Q-1?0:1));ae!==void 0&&E.push(Z+ae)}}if(E.length>0)return[D,t+E.join(`,
${O}`),$].join(`
${s}`)}return f}(n,"",0)}function WT(n,e){const t={};for(const r in e)n[r]!==void 0&&(t[r]=n[r]);for(const r in n)t[r]===void 0&&(t[r]=n[r]);return t}function Hz(n,e=2){return n=WT(n,Ea.$root),n.layers&&(n.layers=n.layers.map(t=>WT(t,Ea.layer))),Dne(n,{indent:e})}function TS(n,e){for(const t in n)t.indexOf("layout")===0&&e(n[t],t)}function GT(n,e){for(const t in n)t.indexOf("paint")===0&&e(n[t],t)}function oO(n,e){return typeof e=="string"&&e[0]==="@"?oO(n,n.constants[e]):e}function Lne(n){return Array.isArray(n.stops)}function kC(n,e,t){n[t]=n[e],delete n[e]}function Fne(n){n.version=8,Mne(n,i=>{i.type==="video"&&i.url!==void 0&&kC(i,"url","urls"),i.type==="video"&&i.coordinates.forEach(o=>o.reverse())}),C_(n,i=>{TS(i,o=>{o["symbol-min-distance"]!==void 0&&kC(o,"symbol-min-distance","symbol-spacing")}),GT(i,o=>{o["background-image"]!==void 0&&kC(o,"background-image","background-pattern"),o["line-image"]!==void 0&&kC(o,"line-image","line-pattern"),o["fill-image"]!==void 0&&kC(o,"fill-image","fill-pattern")})}),u8(n,{paint:!0,layout:!0},i=>{const o=oO(n,i.value);Lne(o)&&o.stops.forEach(a=>{a[1]=oO(n,a[1])}),i.set(o)}),delete n.constants,C_(n,i=>{TS(i,o=>{delete o["text-max-size"],delete o["icon-max-size"]}),GT(i,o=>{o["text-size"]&&(i.layout||(i.layout={}),i.layout["text-size"]=o["text-size"],delete o["text-size"]),o["icon-size"]&&(i.layout||(i.layout={}),i.layout["icon-size"]=o["icon-size"],delete o["icon-size"])})});function e(i){function o(a){return a.split(",").map(s=>s.trim())}if(Array.isArray(i))return i;if(typeof i=="string")return o(i);if(typeof i=="object")return i.stops.forEach(a=>{a[1]=o(a[1])}),i;throw new Error("unexpected font value")}C_(n,i=>{TS(i,o=>{o["text-font"]&&(o["text-font"]=e(o["text-font"]))})});let t=0;for(let i=n.layers.length-1;i>=0;i--)if(n.layers[i].type!=="symbol"){t=i+1;break}const r=n.layers.splice(t);return r.reverse(),n.layers=n.layers.concat(r),n}function Une(n){const e=[];return C_(n,t=>{t.filter&&(t.filter=v_(t.filter))}),u8(n,{paint:!0,layout:!0},({path:t,value:r,reference:i,set:o})=>{Ub(r)||(typeof r=="object"&&!Array.isArray(r)?(o(Pz(r,i)),e.push(t.join("."))):i.tokens&&typeof r=="string"&&o(Dz(r)))}),n}function Rne(n){return JSON.parse(zne(JSON.stringify(n)))}function zne(n){return n.replace(/"hsla?\((.+?)\)"/gi,(e,t)=>{const r=t.match(/^(.+?)\s*,\s*(.+?)\s*,\s*(.+?)(?:\s*,\s*(.+))?$/i);if(r){let[i,o,a,s]=r.slice(1);return[o,a]=[o,a].map(d=>d.endsWith("%")?d:`${parseFloat(d)*100}%`),`"hsl${typeof s=="string"?"a":""}(${[i,o,a,s].filter(Boolean).join(",")})"`}return e})}function jne(n){let e=!1;if(n.version===7&&(n=Fne(n),e=!0),n.version===8&&(e=!!Une(n),e=!0),u8(n,{paint:!0,layout:!0},({value:t,reference:r,set:i})=>{r.type==="color"&&i(Rne(t))}),!e)throw new Error(`Cannot migrate from ${n.version}`);return n}const Nne={StyleExpression:kz,StylePropertyFunction:Tz,ZoomConstantExpression:nO,ZoomDependentExpression:rO,createExpression:i8,createPropertyExpression:o8,isExpression:Ub,isExpressionFilter:cw,isZoomExpression:fne,normalizePropertyExpression:pne},Wne={convertFunction:Pz,createFunction:r8,isFunction:Lb};var Zz={exports:{}};/**
 * MapLibre GL JS
 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.2/LICENSE.txt
 */(function(n,e){(function(t,r){n.exports=r()})(Vf,function(){var t={},r={};function i(a,s,d){if(r[a]=d,a==="index"){var f="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",C={};return r.shared(C),r.index(t,C),typeof window<"u"&&t.setWorkerUrl(window.URL.createObjectURL(new Blob([f],{type:"text/javascript"}))),t}}i("shared",["exports"],function(a){function s(c,l,h,y){return new(h||(h=Promise))(function(M,T){function K(J){try{W(y.next(J))}catch(re){T(re)}}function F(J){try{W(y.throw(J))}catch(re){T(re)}}function W(J){var re;J.done?M(J.value):(re=J.value,re instanceof h?re:new h(function(Ae){Ae(re)})).then(K,F)}W((y=y.apply(c,l||[])).next())})}function d(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}typeof SuppressedError=="function"&&SuppressedError;var f=C;function C(c,l){this.x=c,this.y=l}C.prototype={clone:function(){return new C(this.x,this.y)},add:function(c){return this.clone()._add(c)},sub:function(c){return this.clone()._sub(c)},multByPoint:function(c){return this.clone()._multByPoint(c)},divByPoint:function(c){return this.clone()._divByPoint(c)},mult:function(c){return this.clone()._mult(c)},div:function(c){return this.clone()._div(c)},rotate:function(c){return this.clone()._rotate(c)},rotateAround:function(c,l){return this.clone()._rotateAround(c,l)},matMult:function(c){return this.clone()._matMult(c)},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(c){return this.x===c.x&&this.y===c.y},dist:function(c){return Math.sqrt(this.distSqr(c))},distSqr:function(c){var l=c.x-this.x,h=c.y-this.y;return l*l+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(c){return Math.atan2(this.y-c.y,this.x-c.x)},angleWith:function(c){return this.angleWithSep(c.x,c.y)},angleWithSep:function(c,l){return Math.atan2(this.x*l-this.y*c,this.x*c+this.y*l)},_matMult:function(c){var l=c[2]*this.x+c[3]*this.y;return this.x=c[0]*this.x+c[1]*this.y,this.y=l,this},_add:function(c){return this.x+=c.x,this.y+=c.y,this},_sub:function(c){return this.x-=c.x,this.y-=c.y,this},_mult:function(c){return this.x*=c,this.y*=c,this},_div:function(c){return this.x/=c,this.y/=c,this},_multByPoint:function(c){return this.x*=c.x,this.y*=c.y,this},_divByPoint:function(c){return this.x/=c.x,this.y/=c.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var c=this.y;return this.y=this.x,this.x=-c,this},_rotate:function(c){var l=Math.cos(c),h=Math.sin(c),y=h*this.x+l*this.y;return this.x=l*this.x-h*this.y,this.y=y,this},_rotateAround:function(c,l){var h=Math.cos(c),y=Math.sin(c),M=l.y+y*(this.x-l.x)+h*(this.y-l.y);return this.x=l.x+h*(this.x-l.x)-y*(this.y-l.y),this.y=M,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},C.convert=function(c){return c instanceof C?c:Array.isArray(c)?new C(c[0],c[1]):c};var O=d(f),E=P;function P(c,l,h,y){this.cx=3*c,this.bx=3*(h-c)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=c,this.p1y=l,this.p2x=h,this.p2y=y}P.prototype={sampleCurveX:function(c){return((this.ax*c+this.bx)*c+this.cx)*c},sampleCurveY:function(c){return((this.ay*c+this.by)*c+this.cy)*c},sampleCurveDerivativeX:function(c){return(3*this.ax*c+2*this.bx)*c+this.cx},solveCurveX:function(c,l){if(l===void 0&&(l=1e-6),c<0)return 0;if(c>1)return 1;for(var h=c,y=0;y<8;y++){var M=this.sampleCurveX(h)-c;if(Math.abs(M)<l)return h;var T=this.sampleCurveDerivativeX(h);if(Math.abs(T)<1e-6)break;h-=M/T}var K=0,F=1;for(h=c,y=0;y<20&&(M=this.sampleCurveX(h),!(Math.abs(M-c)<l));y++)c>M?K=h:F=h,h=.5*(F-K)+K;return h},solve:function(c,l){return this.sampleCurveY(this.solveCurveX(c,l))}};var D=d(E);let $,H;function Q(){return $==null&&($=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),$}function N(){if(H==null&&(H=!1,Q())){const l=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(l){for(let y=0;y<5*5;y++){const M=4*y;l.fillStyle=`rgb(${M},${M+1},${M+2})`,l.fillRect(y%5,Math.floor(y/5),1,1)}const h=l.getImageData(0,0,5,5).data;for(let y=0;y<5*5*4;y++)if(y%4!=3&&h[y]!==y){H=!0;break}}}return H||!1}function Z(c,l,h,y){const M=new D(c,l,h,y);return function(T){return M.solve(T)}}const ae=Z(.25,.1,.25,1);function pe(c,l,h){return Math.min(h,Math.max(l,c))}function fe(c,l,h){const y=h-l,M=((c-l)%y+y)%y+l;return M===l?h:M}function X(c,...l){for(const h of l)for(const y in h)c[y]=h[y];return c}let oe=1;function Ce(c,l,h){const y={};for(const M in c)y[M]=l.call(h||this,c[M],M,c);return y}function we(c,l,h){const y={};for(const M in c)l.call(h||this,c[M],M,c)&&(y[M]=c[M]);return y}function Te(c){return Array.isArray(c)?c.map(Te):typeof c=="object"&&c?Ce(c,Te):c}const Pe={};function he(c){Pe[c]||(typeof console<"u"&&console.warn(c),Pe[c]=!0)}function $e(c,l,h){return(h.y-c.y)*(l.x-c.x)>(l.y-c.y)*(h.x-c.x)}function ye(c){let l=0;for(let h,y,M=0,T=c.length,K=T-1;M<T;K=M++)h=c[M],y=c[K],l+=(y.x-h.x)*(h.y+y.y);return l}function gt(c){return typeof WorkerGlobalScope<"u"&&c!==void 0&&c instanceof WorkerGlobalScope}let yt=null;function st(c){return typeof ImageBitmap<"u"&&c instanceof ImageBitmap}const ft="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Re(c,l,h,y,M){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const T=new VideoFrame(c,{timestamp:0});try{const K=T==null?void 0:T.format;if(!K||!K.startsWith("BGR")&&!K.startsWith("RGB"))throw new Error(`Unrecognized format ${K}`);const F=K.startsWith("BGR"),W=new Uint8ClampedArray(y*M*4);if(yield T.copyTo(W,function(J,re,Ae,be,Be){const De=4*Math.max(-re,0),Ge=(Math.max(0,Ae)-Ae)*be*4+De,Ze=4*be,at=Math.max(0,re),It=Math.max(0,Ae);return{rect:{x:at,y:It,width:Math.min(J.width,re+be)-at,height:Math.min(J.height,Ae+Be)-It},layout:[{offset:Ge,stride:Ze}]}}(c,l,h,y,M)),F)for(let J=0;J<W.length;J+=4){const re=W[J];W[J]=W[J+2],W[J+2]=re}return W}finally{T.close()}})}let Ve,Xe;const Jt="AbortError";function Ht(){return new Error(Jt)}const bt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Qt(c){return bt.REGISTERED_PROTOCOLS[c.substring(0,c.indexOf("://"))]}const Yt="global-dispatcher";class ke extends Error{constructor(l,h,y,M){super(`AJAXError: ${h} (${l}): ${y}`),this.status=l,this.statusText=h,this.url=y,this.body=M}}const ge=()=>gt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(c,l){if(/:\/\//.test(c.url)&&!/^https?:|^file:/.test(c.url)){const y=Qt(c.url);if(y)return y(c,l);if(gt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:c,targetMapId:Yt},l)}if(!(/^file:/.test(h=c.url)||/^file:/.test(ge())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(y,M){return s(this,void 0,void 0,function*(){const T=new Request(y.url,{method:y.method||"GET",body:y.body,credentials:y.credentials,headers:y.headers,cache:y.cache,referrer:ge(),signal:M.signal});y.type==="json"&&T.headers.set("Accept","application/json");const K=yield fetch(T);if(!K.ok){const J=yield K.blob();throw new ke(K.status,K.statusText,y.url,J)}let F;F=y.type==="arrayBuffer"||y.type==="image"?K.arrayBuffer():y.type==="json"?K.json():K.text();const W=yield F;if(M.signal.aborted)throw Ht();return{data:W,cacheControl:K.headers.get("Cache-Control"),expires:K.headers.get("Expires")}})}(c,l);if(gt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:c,mustQueue:!0,targetMapId:Yt},l)}var h;return function(y,M){return new Promise((T,K)=>{const F=new XMLHttpRequest;F.open(y.method||"GET",y.url,!0),y.type!=="arrayBuffer"&&y.type!=="image"||(F.responseType="arraybuffer");for(const W in y.headers)F.setRequestHeader(W,y.headers[W]);y.type==="json"&&(F.responseType="text",F.setRequestHeader("Accept","application/json")),F.withCredentials=y.credentials==="include",F.onerror=()=>{K(new Error(F.statusText))},F.onload=()=>{if(!M.signal.aborted)if((F.status>=200&&F.status<300||F.status===0)&&F.response!==null){let W=F.response;if(y.type==="json")try{W=JSON.parse(F.response)}catch(J){return void K(J)}T({data:W,cacheControl:F.getResponseHeader("Cache-Control"),expires:F.getResponseHeader("Expires")})}else{const W=new Blob([F.response],{type:F.getResponseHeader("Content-Type")});K(new ke(F.status,F.statusText,y.url,W))}},M.signal.addEventListener("abort",()=>{F.abort(),K(Ht())}),F.send(y.body)})}(c,l)};function ze(c){if(!c||c.indexOf("://")<=0||c.indexOf("data:image/")===0||c.indexOf("blob:")===0)return!0;const l=new URL(c),h=window.location;return l.protocol===h.protocol&&l.host===h.host}function it(c,l,h){h[c]&&h[c].indexOf(l)!==-1||(h[c]=h[c]||[],h[c].push(l))}function ot(c,l,h){if(h&&h[c]){const y=h[c].indexOf(l);y!==-1&&h[c].splice(y,1)}}class St{constructor(l,h={}){X(this,h),this.type=l}}class Rt extends St{constructor(l,h={}){super("error",X({error:l},h))}}class zt{on(l,h){return this._listeners=this._listeners||{},it(l,h,this._listeners),this}off(l,h){return ot(l,h,this._listeners),ot(l,h,this._oneTimeListeners),this}once(l,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},it(l,h,this._oneTimeListeners),this):new Promise(y=>this.once(l,y))}fire(l,h){typeof l=="string"&&(l=new St(l,h||{}));const y=l.type;if(this.listens(y)){l.target=this;const M=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const F of M)F.call(this,l);const T=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const F of T)ot(y,F,this._oneTimeListeners),F.call(this,l);const K=this._eventedParent;K&&(X(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),K.fire(l))}else l instanceof Rt&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,h){return this._eventedParent=l,this._eventedParentData=h,this}}var mt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},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"}}};const or=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function gn(c,l){const h={};for(const y in c)y!=="ref"&&(h[y]=c[y]);return or.forEach(y=>{y in l&&(h[y]=l[y])}),h}function yn(c,l){if(Array.isArray(c)){if(!Array.isArray(l)||c.length!==l.length)return!1;for(let h=0;h<c.length;h++)if(!yn(c[h],l[h]))return!1;return!0}if(typeof c=="object"&&c!==null&&l!==null){if(typeof l!="object"||Object.keys(c).length!==Object.keys(l).length)return!1;for(const h in c)if(!yn(c[h],l[h]))return!1;return!0}return c===l}function tr(c,l){c.push(l)}function dr(c,l,h){tr(h,{command:"addSource",args:[c,l[c]]})}function Sr(c,l,h){tr(l,{command:"removeSource",args:[c]}),h[c]=!0}function Nr(c,l,h,y){Sr(c,h,y),dr(c,l,h)}function yr(c,l,h){let y;for(y in c[h])if(Object.prototype.hasOwnProperty.call(c[h],y)&&y!=="data"&&!yn(c[h][y],l[h][y]))return!1;for(y in l[h])if(Object.prototype.hasOwnProperty.call(l[h],y)&&y!=="data"&&!yn(c[h][y],l[h][y]))return!1;return!0}function _i(c,l,h,y,M,T){c=c||{},l=l||{};for(const K in c)Object.prototype.hasOwnProperty.call(c,K)&&(yn(c[K],l[K])||h.push({command:T,args:[y,K,l[K],M]}));for(const K in l)Object.prototype.hasOwnProperty.call(l,K)&&!Object.prototype.hasOwnProperty.call(c,K)&&(yn(c[K],l[K])||h.push({command:T,args:[y,K,l[K],M]}))}function Ee(c){return c.id}function ee(c,l){return c[l.id]=l,c}class V{constructor(l,h,y,M){this.message=(l?`${l}: `:"")+y,M&&(this.identifier=M),h!=null&&h.__line__&&(this.line=h.__line__)}}function Ke(c,...l){for(const h of l)for(const y in h)c[y]=h[y];return c}class At extends Error{constructor(l,h){super(h),this.message=h,this.key=l}}class Bt{constructor(l,h=[]){this.parent=l,this.bindings={};for(const[y,M]of h)this.bindings[y]=M}concat(l){return new Bt(this,l)}get(l){if(this.bindings[l])return this.bindings[l];if(this.parent)return this.parent.get(l);throw new Error(`${l} not found in scope.`)}has(l){return!!this.bindings[l]||!!this.parent&&this.parent.has(l)}}const kt={kind:"null"},Lt={kind:"number"},fn={kind:"string"},Pn={kind:"boolean"},On={kind:"color"},g={kind:"object"},Kt={kind:"value"},Pr={kind:"collator"},rr={kind:"formatted"},Le={kind:"padding"},ce={kind:"resolvedImage"},xe={kind:"variableAnchorOffsetCollection"};function Ie(c,l){return{kind:"array",itemType:c,N:l}}function je(c){if(c.kind==="array"){const l=je(c.itemType);return typeof c.N=="number"?`array<${l}, ${c.N}>`:c.itemType.kind==="value"?"array":`array<${l}>`}return c.kind}const rt=[kt,Lt,fn,Pn,On,rr,g,Ie(Kt),Le,ce,xe];function lt(c,l){if(l.kind==="error")return null;if(c.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!lt(c.itemType,l.itemType))&&(typeof c.N!="number"||c.N===l.N))return null}else{if(c.kind===l.kind)return null;if(c.kind==="value"){for(const h of rt)if(!lt(h,l))return null}}return`Expected ${je(c)} but found ${je(l)} instead.`}function pt(c,l){return l.some(h=>h.kind===c.kind)}function et(c,l){return l.some(h=>h==="null"?c===null:h==="array"?Array.isArray(c):h==="object"?c&&!Array.isArray(c)&&typeof c=="object":h===typeof c)}function Mt(c,l){return c.kind==="array"&&l.kind==="array"?c.itemType.kind===l.itemType.kind&&typeof c.N=="number":c.kind===l.kind}const tn=.96422,qt=.82521,en=4/29,Fn=6/29,Bn=3*Fn*Fn,Hn=Fn*Fn*Fn,Or=Math.PI/180,cr=180/Math.PI;function Qr(c){return(c%=360)<0&&(c+=360),c}function Br([c,l,h,y]){let M,T;const K=ar((.2225045*(c=Fr(c))+.7168786*(l=Fr(l))+.0606169*(h=Fr(h)))/1);c===l&&l===h?M=T=K:(M=ar((.4360747*c+.3850649*l+.1430804*h)/tn),T=ar((.0139322*c+.0971045*l+.7141733*h)/qt));const F=116*K-16;return[F<0?0:F,500*(M-K),200*(K-T),y]}function Fr(c){return c<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function ar(c){return c>Hn?Math.pow(c,1/3):c/Bn+en}function di([c,l,h,y]){let M=(c+16)/116,T=isNaN(l)?M:M+l/500,K=isNaN(h)?M:M-h/200;return M=1*to(M),T=tn*to(T),K=qt*to(K),[Ui(3.1338561*T-1.6168667*M-.4906146*K),Ui(-.9787684*T+1.9161415*M+.033454*K),Ui(.0719453*T-.2289914*M+1.4052427*K),y]}function Ui(c){return(c=c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055)<0?0:c>1?1:c}function to(c){return c>Fn?c*c*c:Bn*(c-en)}function ho(c){return parseInt(c.padEnd(2,c),16)/255}function si(c,l){return fo(l?c/100:c,0,1)}function fo(c,l,h){return Math.min(Math.max(l,c),h)}function Na(c){return!c.some(Number.isNaN)}const Ia={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Ei{constructor(l,h,y,M=1,T=!0){this.r=l,this.g=h,this.b=y,this.a=M,T||(this.r*=M,this.g*=M,this.b*=M,M||this.overwriteGetter("rgb",[l,h,y,M]))}static parse(l){if(l instanceof Ei)return l;if(typeof l!="string")return;const h=function(y){if((y=y.toLowerCase().trim())==="transparent")return[0,0,0,0];const M=Ia[y];if(M){const[K,F,W]=M;return[K/255,F/255,W/255,1]}if(y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(y)){const K=y.length<6?1:2;let F=1;return[ho(y.slice(F,F+=K)),ho(y.slice(F,F+=K)),ho(y.slice(F,F+=K)),ho(y.slice(F,F+K)||"ff")]}if(y.startsWith("rgb")){const K=y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(K){const[F,W,J,re,Ae,be,Be,De,Ge,Ze,at,It]=K,ct=[re||" ",Be||" ",Ze].join("");if(ct==="  "||ct==="  /"||ct===",,"||ct===",,,"){const wt=[J,be,Ge].join(""),rn=wt==="%%%"?100:wt===""?255:0;if(rn){const An=[fo(+W/rn,0,1),fo(+Ae/rn,0,1),fo(+De/rn,0,1),at?si(+at,It):1];if(Na(An))return An}}return}}const T=y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(T){const[K,F,W,J,re,Ae,be,Be,De]=T,Ge=[W||" ",re||" ",be].join("");if(Ge==="  "||Ge==="  /"||Ge===",,"||Ge===",,,"){const Ze=[+F,fo(+J,0,100),fo(+Ae,0,100),Be?si(+Be,De):1];if(Na(Ze))return function([at,It,ct,wt]){function rn(An){const zn=(An+at/30)%12,br=It*Math.min(ct,1-ct);return ct-br*Math.max(-1,Math.min(zn-3,9-zn,1))}return at=Qr(at),It/=100,ct/=100,[rn(0),rn(8),rn(4),wt]}(Ze)}}}(l);return h?new Ei(...h,!1):void 0}get rgb(){const{r:l,g:h,b:y,a:M}=this,T=M||1/0;return this.overwriteGetter("rgb",[l/T,h/T,y/T,M])}get hcl(){return this.overwriteGetter("hcl",function(l){const[h,y,M,T]=Br(l),K=Math.sqrt(y*y+M*M);return[Math.round(1e4*K)?Qr(Math.atan2(M,y)*cr):NaN,K,h,T]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Br(this.rgb))}overwriteGetter(l,h){return Object.defineProperty(this,l,{value:h}),h}toString(){const[l,h,y,M]=this.rgb;return`rgba(${[l,h,y].map(T=>Math.round(255*T)).join(",")},${M})`}}Ei.black=new Ei(0,0,0,1),Ei.white=new Ei(1,1,1,1),Ei.transparent=new Ei(0,0,0,0),Ei.red=new Ei(1,0,0,1);class os{constructor(l,h,y){this.sensitivity=l?h?"variant":"case":h?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,h){return this.collator.compare(l,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class yi{constructor(l,h,y,M,T){this.text=l,this.image=h,this.scale=y,this.fontStack=M,this.textColor=T}}class Gn{constructor(l){this.sections=l}static fromString(l){return new Gn([new yi(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof Gn?l:Gn.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class ro{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof ro)return l;if(typeof l=="number")return new ro([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const h of l)if(typeof h!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new ro(l)}}toString(){return JSON.stringify(this.values)}}const Co=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Ri{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof Ri)return l;if(Array.isArray(l)&&!(l.length<1)&&l.length%2==0){for(let h=0;h<l.length;h+=2){const y=l[h],M=l[h+1];if(typeof y!="string"||!Co.has(y)||!Array.isArray(M)||M.length!==2||typeof M[0]!="number"||typeof M[1]!="number")return}return new Ri(l)}}toString(){return JSON.stringify(this.values)}}class _e{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new _e({name:l,available:!1}):null}}function Je(c,l,h,y){return typeof c=="number"&&c>=0&&c<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof h=="number"&&h>=0&&h<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[c,l,h,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[c,l,h,y]:[c,l,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Zt(c){if(c===null||typeof c=="string"||typeof c=="boolean"||typeof c=="number"||c instanceof Ei||c instanceof os||c instanceof Gn||c instanceof ro||c instanceof Ri||c instanceof _e)return!0;if(Array.isArray(c)){for(const l of c)if(!Zt(l))return!1;return!0}if(typeof c=="object"){for(const l in c)if(!Zt(c[l]))return!1;return!0}return!1}function ln(c){if(c===null)return kt;if(typeof c=="string")return fn;if(typeof c=="boolean")return Pn;if(typeof c=="number")return Lt;if(c instanceof Ei)return On;if(c instanceof os)return Pr;if(c instanceof Gn)return rr;if(c instanceof ro)return Le;if(c instanceof Ri)return xe;if(c instanceof _e)return ce;if(Array.isArray(c)){const l=c.length;let h;for(const y of c){const M=ln(y);if(h){if(h===M)continue;h=Kt;break}h=M}return Ie(h||Kt,l)}return g}function Ft(c){const l=typeof c;return c===null?"":l==="string"||l==="number"||l==="boolean"?String(c):c instanceof Ei||c instanceof Gn||c instanceof ro||c instanceof Ri||c instanceof _e?c.toString():JSON.stringify(c)}class wn{constructor(l,h){this.type=l,this.value=h}static parse(l,h){if(l.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!Zt(l[1]))return h.error("invalid value");const y=l[1];let M=ln(y);const T=h.expectedType;return M.kind!=="array"||M.N!==0||!T||T.kind!=="array"||typeof T.N=="number"&&T.N!==0||(M=T),new wn(M,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class hr{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const ii={string:fn,number:Lt,boolean:Pn,object:g};class li{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");let y,M=1;const T=l[0];if(T==="array"){let F,W;if(l.length>2){const J=l[1];if(typeof J!="string"||!(J in ii)||J==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);F=ii[J],M++}else F=Kt;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return h.error('The length argument to "array" must be a positive integer literal',2);W=l[2],M++}y=Ie(F,W)}else{if(!ii[T])throw new Error(`Types doesn't contain name = ${T}`);y=ii[T]}const K=[];for(;M<l.length;M++){const F=h.parse(l[M],M,Kt);if(!F)return null;K.push(F)}return new li(y,K)}evaluate(l){for(let h=0;h<this.args.length;h++){const y=this.args[h].evaluate(l);if(!lt(this.type,ln(y)))return y;if(h===this.args.length-1)throw new hr(`Expected value to be of type ${je(this.type)}, but found ${je(ln(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Jo={"to-boolean":Pn,"to-color":On,"to-number":Lt,"to-string":fn};class Ka{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");const y=l[0];if(!Jo[y])throw new Error(`Can't parse ${y} as it is not part of the known types`);if((y==="to-boolean"||y==="to-string")&&l.length!==2)return h.error("Expected one argument.");const M=Jo[y],T=[];for(let K=1;K<l.length;K++){const F=h.parse(l[K],K,Kt);if(!F)return null;T.push(F)}return new Ka(M,T)}evaluate(l){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(l);case"color":{let h,y;for(const M of this.args){if(h=M.evaluate(l),y=null,h instanceof Ei)return h;if(typeof h=="string"){const T=l.parseColor(h);if(T)return T}else if(Array.isArray(h)&&(y=h.length<3||h.length>4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:Je(h[0],h[1],h[2],h[3]),!y))return new Ei(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new hr(y||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const y of this.args){h=y.evaluate(l);const M=ro.parse(h);if(M)return M}throw new hr(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const y of this.args){h=y.evaluate(l);const M=Ri.parse(h);if(M)return M}throw new hr(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const y of this.args){if(h=y.evaluate(l),h===null)return 0;const M=Number(h);if(!isNaN(M))return M}throw new hr(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return Gn.fromString(Ft(this.args[0].evaluate(l)));case"resolvedImage":return _e.fromString(Ft(this.args[0].evaluate(l)));default:return Ft(this.args[0].evaluate(l))}}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Dr=["Unknown","Point","LineString","Polygon"];class Wa{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Dr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(l){let h=this._parseColorCache[l];return h||(h=this._parseColorCache[l]=Ei.parse(l)),h}}class vi{constructor(l,h,y=[],M,T=new Bt,K=[]){this.registry=l,this.path=y,this.key=y.map(F=>`[${F}]`).join(""),this.scope=T,this.errors=K,this.expectedType=M,this._isConstant=h}parse(l,h,y,M,T={}){return h?this.concat(h,y,M)._parse(l,T):this._parse(l,T)}_parse(l,h){function y(M,T,K){return K==="assert"?new li(T,[M]):K==="coerce"?new Ka(T,[M]):M}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const M=l[0];if(typeof M!="string")return this.error(`Expression name must be a string, but found ${typeof M} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const T=this.registry[M];if(T){let K=T.parse(l,this);if(!K)return null;if(this.expectedType){const F=this.expectedType,W=K.type;if(F.kind!=="string"&&F.kind!=="number"&&F.kind!=="boolean"&&F.kind!=="object"&&F.kind!=="array"||W.kind!=="value")if(F.kind!=="color"&&F.kind!=="formatted"&&F.kind!=="resolvedImage"||W.kind!=="value"&&W.kind!=="string")if(F.kind!=="padding"||W.kind!=="value"&&W.kind!=="number"&&W.kind!=="array")if(F.kind!=="variableAnchorOffsetCollection"||W.kind!=="value"&&W.kind!=="array"){if(this.checkSubtype(F,W))return null}else K=y(K,F,h.typeAnnotation||"coerce");else K=y(K,F,h.typeAnnotation||"coerce");else K=y(K,F,h.typeAnnotation||"coerce");else K=y(K,F,h.typeAnnotation||"assert")}if(!(K instanceof wn)&&K.type.kind!=="resolvedImage"&&this._isConstant(K)){const F=new Wa;try{K=new wn(K.type,K.evaluate(F))}catch(W){return this.error(W.message),null}}return K}return this.error(`Unknown expression "${M}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,h,y){const M=typeof l=="number"?this.path.concat(l):this.path,T=y?this.scope.concat(y):this.scope;return new vi(this.registry,this._isConstant,M,h||null,T,this.errors)}error(l,...h){const y=`${this.key}${h.map(M=>`[${M}]`).join("")}`;this.errors.push(new At(y,l))}checkSubtype(l,h){const y=lt(l,h);return y&&this.error(y),y}}class Ga{constructor(l,h,y){this.type=Pr,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=h}static parse(l,h){if(l.length!==2)return h.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return h.error("Collator options argument must be an object.");const M=h.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,Pn);if(!M)return null;const T=h.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,Pn);if(!T)return null;let K=null;return y.locale&&(K=h.parse(y.locale,1,fn),!K)?null:new Ga(M,T,K)}evaluate(l){return new os(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}const ea=8192;function xu(c,l){c[0]=Math.min(c[0],l[0]),c[1]=Math.min(c[1],l[1]),c[2]=Math.max(c[2],l[0]),c[3]=Math.max(c[3],l[1])}function as(c,l){return!(c[0]<=l[0]||c[2]>=l[2]||c[1]<=l[1]||c[3]>=l[3])}function ta(c,l){const h=(180+c[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+c[1]*Math.PI/360)))/360,M=Math.pow(2,l.z);return[Math.round(h*M*ea),Math.round(y*M*ea)]}function na(c,l,h){const y=c[0]-l[0],M=c[1]-l[1],T=c[0]-h[0],K=c[1]-h[1];return y*K-T*M==0&&y*T<=0&&M*K<=0}function bs(c,l){let h=!1;for(let K=0,F=l.length;K<F;K++){const W=l[K];for(let J=0,re=W.length;J<re-1;J++){if(na(c,W[J],W[J+1]))return!1;(M=W[J])[1]>(y=c)[1]!=(T=W[J+1])[1]>y[1]&&y[0]<(T[0]-M[0])*(y[1]-M[1])/(T[1]-M[1])+M[0]&&(h=!h)}}var y,M,T;return h}function wu(c,l){for(let h=0;h<l.length;h++)if(bs(c,l[h]))return!0;return!1}function ma(c,l,h,y){const M=y[0]-h[0],T=y[1]-h[1],K=(c[0]-h[0])*T-M*(c[1]-h[1]),F=(l[0]-h[0])*T-M*(l[1]-h[1]);return K>0&&F<0||K<0&&F>0}function _A(c,l,h){for(const J of h)for(let re=0;re<J.length-1;++re)if((F=[(K=J[re+1])[0]-(T=J[re])[0],K[1]-T[1]])[0]*(W=[(M=l)[0]-(y=c)[0],M[1]-y[1]])[1]-F[1]*W[0]!=0&&ma(y,M,T,K)&&ma(T,K,y,M))return!0;var y,M,T,K,F,W;return!1}function Wu(c,l){for(let h=0;h<c.length;++h)if(!bs(c[h],l))return!1;for(let h=0;h<c.length-1;++h)if(_A(c[h],c[h+1],l))return!1;return!0}function bA(c,l){for(let h=0;h<l.length;h++)if(Wu(c,l[h]))return!0;return!1}function Mu(c,l,h){const y=[];for(let M=0;M<c.length;M++){const T=[];for(let K=0;K<c[M].length;K++){const F=ta(c[M][K],h);xu(l,F),T.push(F)}y.push(T)}return y}function Gu(c,l,h){const y=[];for(let M=0;M<c.length;M++){const T=Mu(c[M],l,h);y.push(T)}return y}function Wo(c,l,h,y){if(c[0]<h[0]||c[0]>h[2]){const M=.5*y;let T=c[0]-h[0]>M?-y:h[0]-c[0]>M?y:0;T===0&&(T=c[0]-h[2]>M?-y:h[2]-c[0]>M?y:0),c[0]+=T}xu(l,c)}function xs(c,l,h,y){const M=Math.pow(2,y.z)*ea,T=[y.x*ea,y.y*ea],K=[];for(const F of c)for(const W of F){const J=[W.x+T[0],W.y+T[1]];Wo(J,l,h,M),K.push(J)}return K}function nu(c,l,h,y){const M=Math.pow(2,y.z)*ea,T=[y.x*ea,y.y*ea],K=[];for(const W of c){const J=[];for(const re of W){const Ae=[re.x+T[0],re.y+T[1]];xu(l,Ae),J.push(Ae)}K.push(J)}if(l[2]-l[0]<=M/2){(F=l)[0]=F[1]=1/0,F[2]=F[3]=-1/0;for(const W of K)for(const J of W)Wo(J,l,h,M)}var F;return K}class ss{constructor(l,h){this.type=Pn,this.geojson=l,this.geometries=h}static parse(l,h){if(l.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(Zt(l[1])){const y=l[1];if(y.type==="FeatureCollection"){const M=[];for(const T of y.features){const{type:K,coordinates:F}=T.geometry;K==="Polygon"&&M.push(F),K==="MultiPolygon"&&M.push(...F)}if(M.length)return new ss(y,{type:"MultiPolygon",coordinates:M})}else if(y.type==="Feature"){const M=y.geometry.type;if(M==="Polygon"||M==="MultiPolygon")return new ss(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new ss(y,y)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(h,y){const M=[1/0,1/0,-1/0,-1/0],T=[1/0,1/0,-1/0,-1/0],K=h.canonicalID();if(y.type==="Polygon"){const F=Mu(y.coordinates,T,K),W=xs(h.geometry(),M,T,K);if(!as(M,T))return!1;for(const J of W)if(!bs(J,F))return!1}if(y.type==="MultiPolygon"){const F=Gu(y.coordinates,T,K),W=xs(h.geometry(),M,T,K);if(!as(M,T))return!1;for(const J of W)if(!wu(J,F))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(h,y){const M=[1/0,1/0,-1/0,-1/0],T=[1/0,1/0,-1/0,-1/0],K=h.canonicalID();if(y.type==="Polygon"){const F=Mu(y.coordinates,T,K),W=nu(h.geometry(),M,T,K);if(!as(M,T))return!1;for(const J of W)if(!Wu(J,F))return!1}if(y.type==="MultiPolygon"){const F=Gu(y.coordinates,T,K),W=nu(h.geometry(),M,T,K);if(!as(M,T))return!1;for(const J of W)if(!bA(J,F))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class ul{constructor(l,h){this.type=h.type,this.name=l,this.boundExpression=h}static parse(l,h){if(l.length!==2||typeof l[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const y=l[1];return h.scope.has(y)?new ul(y,h.scope.get(y)):h.error(`Unknown variable "${y}". Make sure "${y}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(l){return this.boundExpression.evaluate(l)}eachChild(){}outputDefined(){return!1}}class Go{constructor(l,h,y,M){this.name=l,this.type=h,this._evaluate=y,this.args=M}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,h){const y=l[0],M=Go.definitions[y];if(!M)return h.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const T=Array.isArray(M)?M[0]:M.type,K=Array.isArray(M)?[[M[1],M[2]]]:M.overloads,F=K.filter(([J])=>!Array.isArray(J)||J.length===l.length-1);let W=null;for(const[J,re]of F){W=new vi(h.registry,Su,h.path,null,h.scope);const Ae=[];let be=!1;for(let Be=1;Be<l.length;Be++){const De=l[Be],Ge=Array.isArray(J)?J[Be-1]:J.type,Ze=W.parse(De,1+Ae.length,Ge);if(!Ze){be=!0;break}Ae.push(Ze)}if(!be)if(Array.isArray(J)&&J.length!==Ae.length)W.error(`Expected ${J.length} arguments, but found ${Ae.length} instead.`);else{for(let Be=0;Be<Ae.length;Be++){const De=Array.isArray(J)?J[Be]:J.type,Ge=Ae[Be];W.concat(Be+1).checkSubtype(De,Ge.type)}if(W.errors.length===0)return new Go(y,T,re,Ae)}}if(F.length===1)h.errors.push(...W.errors);else{const J=(F.length?F:K).map(([Ae])=>{return be=Ae,Array.isArray(be)?`(${be.map(je).join(", ")})`:`(${je(be.type)}...)`;var be}).join(" | "),re=[];for(let Ae=1;Ae<l.length;Ae++){const be=h.parse(l[Ae],1+re.length);if(!be)return null;re.push(je(be.type))}h.error(`Expected arguments of type ${J}, but found (${re.join(", ")}) instead.`)}return null}static register(l,h){Go.definitions=h;for(const y in h)l[y]=Go}}function Su(c){if(c instanceof ul)return Su(c.boundExpression);if(c instanceof Go&&c.name==="error"||c instanceof Ga||c instanceof ss)return!1;const l=c instanceof Ka||c instanceof li;let h=!0;return c.eachChild(y=>{h=l?h&&Su(y):h&&y instanceof wn}),!!h&&Al(c)&&ru(c,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Al(c){if(c instanceof Go&&(c.name==="get"&&c.args.length===1||c.name==="feature-state"||c.name==="has"&&c.args.length===1||c.name==="properties"||c.name==="geometry-type"||c.name==="id"||/^filter-/.test(c.name))||c instanceof ss)return!1;let l=!0;return c.eachChild(h=>{l&&!Al(h)&&(l=!1)}),l}function Ml(c){if(c instanceof Go&&c.name==="feature-state")return!1;let l=!0;return c.eachChild(h=>{l&&!Ml(h)&&(l=!1)}),l}function ru(c,l){if(c instanceof Go&&l.indexOf(c.name)>=0)return!1;let h=!0;return c.eachChild(y=>{h&&!ru(y,l)&&(h=!1)}),h}function ua(c,l){const h=c.length-1;let y,M,T=0,K=h,F=0;for(;T<=K;)if(F=Math.floor((T+K)/2),y=c[F],M=c[F+1],y<=l){if(F===h||l<M)return F;T=F+1}else{if(!(y>l))throw new hr("Input is not a number.");K=F-1}return 0}class cl{constructor(l,h,y){this.type=l,this.input=h,this.labels=[],this.outputs=[];for(const[M,T]of y)this.labels.push(M),this.outputs.push(T)}static parse(l,h){if(l.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return h.error("Expected an even number of arguments.");const y=h.parse(l[1],1,Lt);if(!y)return null;const M=[];let T=null;h.expectedType&&h.expectedType.kind!=="value"&&(T=h.expectedType);for(let K=1;K<l.length;K+=2){const F=K===1?-1/0:l[K],W=l[K+1],J=K,re=K+1;if(typeof F!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',J);if(M.length&&M[M.length-1][0]>=F)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',J);const Ae=h.parse(W,re,T);if(!Ae)return null;T=T||Ae.type,M.push([F,Ae])}return new cl(T,y,M)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const M=this.input.evaluate(l);if(M<=h[0])return y[0].evaluate(l);const T=h.length;return M>=h[T-1]?y[T-1].evaluate(l):y[ua(h,M)].evaluate(l)}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function xA(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var vo=io;function io(c,l,h,y){this.cx=3*c,this.bx=3*(h-c)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=c,this.p1y=l,this.p2x=h,this.p2y=y}io.prototype={sampleCurveX:function(c){return((this.ax*c+this.bx)*c+this.cx)*c},sampleCurveY:function(c){return((this.ay*c+this.by)*c+this.cy)*c},sampleCurveDerivativeX:function(c){return(3*this.ax*c+2*this.bx)*c+this.cx},solveCurveX:function(c,l){if(l===void 0&&(l=1e-6),c<0)return 0;if(c>1)return 1;for(var h=c,y=0;y<8;y++){var M=this.sampleCurveX(h)-c;if(Math.abs(M)<l)return h;var T=this.sampleCurveDerivativeX(h);if(Math.abs(T)<1e-6)break;h-=M/T}var K=0,F=1;for(h=c,y=0;y<20&&(M=this.sampleCurveX(h),!(Math.abs(M-c)<l));y++)c>M?K=h:F=h,h=.5*(F-K)+K;return h},solve:function(c,l){return this.sampleCurveY(this.solveCurveX(c,l))}};var z=xA(vo);function le(c,l,h){return c+h*(l-c)}function Ue(c,l,h){return c.map((y,M)=>le(y,l[M],h))}const vt={number:le,color:function(c,l,h,y="rgb"){switch(y){case"rgb":{const[M,T,K,F]=Ue(c.rgb,l.rgb,h);return new Ei(M,T,K,F,!1)}case"hcl":{const[M,T,K,F]=c.hcl,[W,J,re,Ae]=l.hcl;let be,Be;if(isNaN(M)||isNaN(W))isNaN(M)?isNaN(W)?be=NaN:(be=W,K!==1&&K!==0||(Be=J)):(be=M,re!==1&&re!==0||(Be=T));else{let It=W-M;W>M&&It>180?It-=360:W<M&&M-W>180&&(It+=360),be=M+h*It}const[De,Ge,Ze,at]=function([It,ct,wt,rn]){return It=isNaN(It)?0:It*Or,di([wt,Math.cos(It)*ct,Math.sin(It)*ct,rn])}([be,Be??le(T,J,h),le(K,re,h),le(F,Ae,h)]);return new Ei(De,Ge,Ze,at,!1)}case"lab":{const[M,T,K,F]=di(Ue(c.lab,l.lab,h));return new Ei(M,T,K,F,!1)}}},array:Ue,padding:function(c,l,h){return new ro(Ue(c.values,l.values,h))},variableAnchorOffsetCollection:function(c,l,h){const y=c.values,M=l.values;if(y.length!==M.length)throw new hr(`Cannot interpolate values of different length. from: ${c.toString()}, to: ${l.toString()}`);const T=[];for(let K=0;K<y.length;K+=2){if(y[K]!==M[K])throw new hr(`Cannot interpolate values containing mismatched anchors. from[${K}]: ${y[K]}, to[${K}]: ${M[K]}`);T.push(y[K]);const[F,W]=y[K+1],[J,re]=M[K+1];T.push([le(F,J,h),le(W,re,h)])}return new Ri(T)}};class $n{constructor(l,h,y,M,T){this.type=l,this.operator=h,this.interpolation=y,this.input=M,this.labels=[],this.outputs=[];for(const[K,F]of T)this.labels.push(K),this.outputs.push(F)}static interpolationFactor(l,h,y,M){let T=0;if(l.name==="exponential")T=vn(h,l.base,y,M);else if(l.name==="linear")T=vn(h,1,y,M);else if(l.name==="cubic-bezier"){const K=l.controlPoints;T=new z(K[0],K[1],K[2],K[3]).solve(vn(h,1,y,M))}return T}static parse(l,h){let[y,M,T,...K]=l;if(!Array.isArray(M)||M.length===0)return h.error("Expected an interpolation type expression.",1);if(M[0]==="linear")M={name:"linear"};else if(M[0]==="exponential"){const J=M[1];if(typeof J!="number")return h.error("Exponential interpolation requires a numeric base.",1,1);M={name:"exponential",base:J}}else{if(M[0]!=="cubic-bezier")return h.error(`Unknown interpolation type ${String(M[0])}`,1,0);{const J=M.slice(1);if(J.length!==4||J.some(re=>typeof re!="number"||re<0||re>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);M={name:"cubic-bezier",controlPoints:J}}}if(l.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(T=h.parse(T,2,Lt),!T)return null;const F=[];let W=null;y==="interpolate-hcl"||y==="interpolate-lab"?W=On:h.expectedType&&h.expectedType.kind!=="value"&&(W=h.expectedType);for(let J=0;J<K.length;J+=2){const re=K[J],Ae=K[J+1],be=J+3,Be=J+4;if(typeof re!="number")return h.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',be);if(F.length&&F[F.length-1][0]>=re)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',be);const De=h.parse(Ae,Be,W);if(!De)return null;W=W||De.type,F.push([re,De])}return Mt(W,Lt)||Mt(W,On)||Mt(W,Le)||Mt(W,xe)||Mt(W,Ie(Lt))?new $n(W,y,M,T,F):h.error(`Type ${je(W)} is not interpolatable.`)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const M=this.input.evaluate(l);if(M<=h[0])return y[0].evaluate(l);const T=h.length;if(M>=h[T-1])return y[T-1].evaluate(l);const K=ua(h,M),F=$n.interpolationFactor(this.interpolation,M,h[K],h[K+1]),W=y[K].evaluate(l),J=y[K+1].evaluate(l);switch(this.operator){case"interpolate":return vt[this.type.kind](W,J,F);case"interpolate-hcl":return vt.color(W,J,F,"hcl");case"interpolate-lab":return vt.color(W,J,F,"lab")}}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function vn(c,l,h,y){const M=y-h,T=c-h;return M===0?0:l===1?T/M:(Math.pow(l,T)-1)/(Math.pow(l,M)-1)}class Kn{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expectected at least one argument.");let y=null;const M=h.expectedType;M&&M.kind!=="value"&&(y=M);const T=[];for(const F of l.slice(1)){const W=h.parse(F,1+T.length,y,void 0,{typeAnnotation:"omit"});if(!W)return null;y=y||W.type,T.push(W)}if(!y)throw new Error("No output type");const K=M&&T.some(F=>lt(M,F.type));return new Kn(K?Kt:y,T)}evaluate(l){let h,y=null,M=0;for(const T of this.args)if(M++,y=T.evaluate(l),y&&y instanceof _e&&!y.available&&(h||(h=y.name),y=null,M===this.args.length&&(y=h)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}class Ur{constructor(l,h){this.type=h.type,this.bindings=[].concat(l),this.result=h}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const h of this.bindings)l(h[1]);l(this.result)}static parse(l,h){if(l.length<4)return h.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let T=1;T<l.length-1;T+=2){const K=l[T];if(typeof K!="string")return h.error(`Expected string, but found ${typeof K} instead.`,T);if(/[^a-zA-Z0-9_]/.test(K))return h.error("Variable names must contain only alphanumeric characters or '_'.",T);const F=h.parse(l[T+1],T+1);if(!F)return null;y.push([K,F])}const M=h.parse(l[l.length-1],l.length-1,h.expectedType,y);return M?new Ur(y,M):null}outputDefined(){return this.result.outputDefined()}}class vr{constructor(l,h,y){this.type=l,this.index=h,this.input=y}static parse(l,h){if(l.length!==3)return h.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Lt),M=h.parse(l[2],2,Ie(h.expectedType||Kt));return y&&M?new vr(M.type.itemType,y,M):null}evaluate(l){const h=this.index.evaluate(l),y=this.input.evaluate(l);if(h<0)throw new hr(`Array index out of bounds: ${h} < 0.`);if(h>=y.length)throw new hr(`Array index out of bounds: ${h} > ${y.length-1}.`);if(h!==Math.floor(h))throw new hr(`Array index must be an integer, but found ${h} instead.`);return y[h]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class kr{constructor(l,h){this.type=Pn,this.needle=l,this.haystack=h}static parse(l,h){if(l.length!==3)return h.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Kt),M=h.parse(l[2],2,Kt);return y&&M?pt(y.type,[Pn,fn,Lt,kt,Kt])?new kr(y,M):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${je(y.type)} instead`):null}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!et(h,["boolean","string","number","null"]))throw new hr(`Expected first argument to be of type boolean, string, number or null, but found ${je(ln(h))} instead.`);if(!et(y,["string","array"]))throw new hr(`Expected second argument to be of type array or string, but found ${je(ln(y))} instead.`);return y.indexOf(h)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class Ti{constructor(l,h,y){this.type=Lt,this.needle=l,this.haystack=h,this.fromIndex=y}static parse(l,h){if(l.length<=2||l.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Kt),M=h.parse(l[2],2,Kt);if(!y||!M)return null;if(!pt(y.type,[Pn,fn,Lt,kt,Kt]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${je(y.type)} instead`);if(l.length===4){const T=h.parse(l[3],3,Lt);return T?new Ti(y,M,T):null}return new Ti(y,M)}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!et(h,["boolean","string","number","null"]))throw new hr(`Expected first argument to be of type boolean, string, number or null, but found ${je(ln(h))} instead.`);if(!et(y,["string","array"]))throw new hr(`Expected second argument to be of type array or string, but found ${je(ln(y))} instead.`);if(this.fromIndex){const M=this.fromIndex.evaluate(l);return y.indexOf(h,M)}return y.indexOf(h)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class po{constructor(l,h,y,M,T,K){this.inputType=l,this.type=h,this.input=y,this.cases=M,this.outputs=T,this.otherwise=K}static parse(l,h){if(l.length<5)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return h.error("Expected an even number of arguments.");let y,M;h.expectedType&&h.expectedType.kind!=="value"&&(M=h.expectedType);const T={},K=[];for(let J=2;J<l.length-1;J+=2){let re=l[J];const Ae=l[J+1];Array.isArray(re)||(re=[re]);const be=h.concat(J);if(re.length===0)return be.error("Expected at least one branch label.");for(const De of re){if(typeof De!="number"&&typeof De!="string")return be.error("Branch labels must be numbers or strings.");if(typeof De=="number"&&Math.abs(De)>Number.MAX_SAFE_INTEGER)return be.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof De=="number"&&Math.floor(De)!==De)return be.error("Numeric branch labels must be integer values.");if(y){if(be.checkSubtype(y,ln(De)))return null}else y=ln(De);if(T[String(De)]!==void 0)return be.error("Branch labels must be unique.");T[String(De)]=K.length}const Be=h.parse(Ae,J,M);if(!Be)return null;M=M||Be.type,K.push(Be)}const F=h.parse(l[1],1,Kt);if(!F)return null;const W=h.parse(l[l.length-1],l.length-1,M);return W?F.type.kind!=="value"&&h.concat(1).checkSubtype(y,F.type)?null:new po(y,M,F,T,K,W):null}evaluate(l){const h=this.input.evaluate(l);return(ln(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class Oi{constructor(l,h,y){this.type=l,this.branches=h,this.otherwise=y}static parse(l,h){if(l.length<4)return h.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return h.error("Expected an odd number of arguments.");let y;h.expectedType&&h.expectedType.kind!=="value"&&(y=h.expectedType);const M=[];for(let K=1;K<l.length-1;K+=2){const F=h.parse(l[K],K,Pn);if(!F)return null;const W=h.parse(l[K+1],K+1,y);if(!W)return null;M.push([F,W]),y=y||W.type}const T=h.parse(l[l.length-1],l.length-1,y);if(!T)return null;if(!y)throw new Error("Can't infer output type");return new Oi(y,M,T)}evaluate(l){for(const[h,y]of this.branches)if(h.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[h,y]of this.branches)l(h),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,h])=>h.outputDefined())&&this.otherwise.outputDefined()}}class Zr{constructor(l,h,y,M){this.type=l,this.input=h,this.beginIndex=y,this.endIndex=M}static parse(l,h){if(l.length<=2||l.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Kt),M=h.parse(l[2],2,Lt);if(!y||!M)return null;if(!pt(y.type,[Ie(Kt),fn,Kt]))return h.error(`Expected first argument to be of type array or string, but found ${je(y.type)} instead`);if(l.length===4){const T=h.parse(l[3],3,Lt);return T?new Zr(y.type,y,M,T):null}return new Zr(y.type,y,M)}evaluate(l){const h=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!et(h,["string","array"]))throw new hr(`Expected first argument to be of type array or string, but found ${je(ln(h))} instead.`);if(this.endIndex){const M=this.endIndex.evaluate(l);return h.slice(y,M)}return h.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function Vi(c,l){return c==="=="||c==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function Io(c,l,h,y){return y.compare(l,h)===0}function wo(c,l,h){const y=c!=="=="&&c!=="!=";return class Xz{constructor(T,K,F){this.type=Pn,this.lhs=T,this.rhs=K,this.collator=F,this.hasUntypedArgument=T.type.kind==="value"||K.type.kind==="value"}static parse(T,K){if(T.length!==3&&T.length!==4)return K.error("Expected two or three arguments.");const F=T[0];let W=K.parse(T[1],1,Kt);if(!W)return null;if(!Vi(F,W.type))return K.concat(1).error(`"${F}" comparisons are not supported for type '${je(W.type)}'.`);let J=K.parse(T[2],2,Kt);if(!J)return null;if(!Vi(F,J.type))return K.concat(2).error(`"${F}" comparisons are not supported for type '${je(J.type)}'.`);if(W.type.kind!==J.type.kind&&W.type.kind!=="value"&&J.type.kind!=="value")return K.error(`Cannot compare types '${je(W.type)}' and '${je(J.type)}'.`);y&&(W.type.kind==="value"&&J.type.kind!=="value"?W=new li(J.type,[W]):W.type.kind!=="value"&&J.type.kind==="value"&&(J=new li(W.type,[J])));let re=null;if(T.length===4){if(W.type.kind!=="string"&&J.type.kind!=="string"&&W.type.kind!=="value"&&J.type.kind!=="value")return K.error("Cannot use collator to compare non-string types.");if(re=K.parse(T[3],3,Pr),!re)return null}return new Xz(W,J,re)}evaluate(T){const K=this.lhs.evaluate(T),F=this.rhs.evaluate(T);if(y&&this.hasUntypedArgument){const W=ln(K),J=ln(F);if(W.kind!==J.kind||W.kind!=="string"&&W.kind!=="number")throw new hr(`Expected arguments for "${c}" to be (string, string) or (number, number), but found (${W.kind}, ${J.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const W=ln(K),J=ln(F);if(W.kind!=="string"||J.kind!=="string")return l(T,K,F)}return this.collator?h(T,K,F,this.collator.evaluate(T)):l(T,K,F)}eachChild(T){T(this.lhs),T(this.rhs),this.collator&&T(this.collator)}outputDefined(){return!0}}}const $a=wo("==",function(c,l,h){return l===h},Io),Fl=wo("!=",function(c,l,h){return l!==h},function(c,l,h,y){return!Io(0,l,h,y)}),iu=wo("<",function(c,l,h){return l<h},function(c,l,h,y){return y.compare(l,h)<0}),ga=wo(">",function(c,l,h){return l>h},function(c,l,h,y){return y.compare(l,h)>0}),v0=wo("<=",function(c,l,h){return l<=h},function(c,l,h,y){return y.compare(l,h)<=0}),ou=wo(">=",function(c,l,h){return l>=h},function(c,l,h,y){return y.compare(l,h)>=0});class Rh{constructor(l,h,y,M,T){this.type=fn,this.number=l,this.locale=h,this.currency=y,this.minFractionDigits=M,this.maxFractionDigits=T}static parse(l,h){if(l.length!==3)return h.error("Expected two arguments.");const y=h.parse(l[1],1,Lt);if(!y)return null;const M=l[2];if(typeof M!="object"||Array.isArray(M))return h.error("NumberFormat options argument must be an object.");let T=null;if(M.locale&&(T=h.parse(M.locale,1,fn),!T))return null;let K=null;if(M.currency&&(K=h.parse(M.currency,1,fn),!K))return null;let F=null;if(M["min-fraction-digits"]&&(F=h.parse(M["min-fraction-digits"],1,Lt),!F))return null;let W=null;return M["max-fraction-digits"]&&(W=h.parse(M["max-fraction-digits"],1,Lt),!W)?null:new Rh(y,T,K,F,W)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class ld{constructor(l){this.type=rr,this.sections=l}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return h.error("First argument must be an image or text section.");const M=[];let T=!1;for(let K=1;K<=l.length-1;++K){const F=l[K];if(T&&typeof F=="object"&&!Array.isArray(F)){T=!1;let W=null;if(F["font-scale"]&&(W=h.parse(F["font-scale"],1,Lt),!W))return null;let J=null;if(F["text-font"]&&(J=h.parse(F["text-font"],1,Ie(fn)),!J))return null;let re=null;if(F["text-color"]&&(re=h.parse(F["text-color"],1,On),!re))return null;const Ae=M[M.length-1];Ae.scale=W,Ae.font=J,Ae.textColor=re}else{const W=h.parse(l[K],1,Kt);if(!W)return null;const J=W.type.kind;if(J!=="string"&&J!=="value"&&J!=="null"&&J!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");T=!0,M.push({content:W,scale:null,font:null,textColor:null})}}return new ld(M)}evaluate(l){return new Gn(this.sections.map(h=>{const y=h.content.evaluate(l);return ln(y)===ce?new yi("",y,null,null,null):new yi(Ft(y),null,h.scale?h.scale.evaluate(l):null,h.font?h.font.evaluate(l).join(","):null,h.textColor?h.textColor.evaluate(l):null)}))}eachChild(l){for(const h of this.sections)l(h.content),h.scale&&l(h.scale),h.font&&l(h.font),h.textColor&&l(h.textColor)}outputDefined(){return!1}}class $u{constructor(l){this.type=ce,this.input=l}static parse(l,h){if(l.length!==2)return h.error("Expected two arguments.");const y=h.parse(l[1],1,fn);return y?new $u(y):h.error("No image name provided.")}evaluate(l){const h=this.input.evaluate(l),y=_e.fromString(h);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(h)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class ud{constructor(l){this.type=Lt,this.input=l}static parse(l,h){if(l.length!==2)return h.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=h.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${je(y.type)} instead.`):new ud(y):null}evaluate(l){const h=this.input.evaluate(l);if(typeof h=="string"||Array.isArray(h))return h.length;throw new hr(`Expected value to be of type string or array, but found ${je(ln(h))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const YA={"==":$a,"!=":Fl,">":ga,"<":iu,">=":ou,"<=":v0,array:li,at:vr,boolean:li,case:Oi,coalesce:Kn,collator:Ga,format:ld,image:$u,in:kr,"index-of":Ti,interpolate:$n,"interpolate-hcl":$n,"interpolate-lab":$n,length:ud,let:Ur,literal:wn,match:po,number:li,"number-format":Rh,object:li,slice:Zr,step:cl,string:li,"to-boolean":Ka,"to-color":Ka,"to-number":Ka,"to-string":Ka,var:ul,within:ss};function ra(c,[l,h,y,M]){l=l.evaluate(c),h=h.evaluate(c),y=y.evaluate(c);const T=M?M.evaluate(c):1,K=Je(l,h,y,T);if(K)throw new hr(K);return new Ei(l/255,h/255,y/255,T,!1)}function Qu(c,l){return c in l}function Vd(c,l){const h=l[c];return h===void 0?null:h}function qA(c){return{type:c}}function kc(c){return{result:"success",value:c}}function Eu(c){return{result:"error",value:c}}function Ad(c){return c["property-type"]==="data-driven"||c["property-type"]==="cross-faded-data-driven"}function em(c){return!!c.expression&&c.expression.parameters.indexOf("zoom")>-1}function zh(c){return!!c.expression&&c.expression.interpolated}function Ki(c){return c instanceof Number?"number":c instanceof String?"string":c instanceof Boolean?"boolean":Array.isArray(c)?"array":c===null?"null":typeof c}function ko(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function C0(c){return c}function jh(c,l){const h=l.type==="color",y=c.stops&&typeof c.stops[0][0]=="object",M=y||!(y||c.property!==void 0),T=c.type||(zh(l)?"exponential":"interval");if(h||l.type==="padding"){const re=h?Ei.parse:ro.parse;(c=Ke({},c)).stops&&(c.stops=c.stops.map(Ae=>[Ae[0],re(Ae[1])])),c.default=re(c.default?c.default:l.default)}if(c.colorSpace&&(K=c.colorSpace)!=="rgb"&&K!=="hcl"&&K!=="lab")throw new Error(`Unknown color space: "${c.colorSpace}"`);var K;let F,W,J;if(T==="exponential")F=ep;else if(T==="interval")F=Aa;else if(T==="categorical"){F=Jf,W=Object.create(null);for(const re of c.stops)W[re[0]]=re[1];J=typeof c.stops[0][0]}else{if(T!=="identity")throw new Error(`Unknown function type "${T}"`);F=Gi}if(y){const re={},Ae=[];for(let De=0;De<c.stops.length;De++){const Ge=c.stops[De],Ze=Ge[0].zoom;re[Ze]===void 0&&(re[Ze]={zoom:Ze,type:c.type,property:c.property,default:c.default,stops:[]},Ae.push(Ze)),re[Ze].stops.push([Ge[0].value,Ge[1]])}const be=[];for(const De of Ae)be.push([re[De].zoom,jh(re[De],l)]);const Be={name:"linear"};return{kind:"composite",interpolationType:Be,interpolationFactor:$n.interpolationFactor.bind(void 0,Be),zoomStops:be.map(De=>De[0]),evaluate:({zoom:De},Ge)=>ep({stops:be,base:c.base},l,De).evaluate(De,Ge)}}if(M){const re=T==="exponential"?{name:"exponential",base:c.base!==void 0?c.base:1}:null;return{kind:"camera",interpolationType:re,interpolationFactor:$n.interpolationFactor.bind(void 0,re),zoomStops:c.stops.map(Ae=>Ae[0]),evaluate:({zoom:Ae})=>F(c,l,Ae,W,J)}}return{kind:"source",evaluate(re,Ae){const be=Ae&&Ae.properties?Ae.properties[c.property]:void 0;return be===void 0?Yu(c.default,l.default):F(c,l,be,W,J)}}}function Yu(c,l,h){return c!==void 0?c:l!==void 0?l:h!==void 0?h:void 0}function Jf(c,l,h,y,M){return Yu(typeof h===M?y[h]:void 0,c.default,l.default)}function Aa(c,l,h){if(Ki(h)!=="number")return Yu(c.default,l.default);const y=c.stops.length;if(y===1||h<=c.stops[0][0])return c.stops[0][1];if(h>=c.stops[y-1][0])return c.stops[y-1][1];const M=ua(c.stops.map(T=>T[0]),h);return c.stops[M][1]}function ep(c,l,h){const y=c.base!==void 0?c.base:1;if(Ki(h)!=="number")return Yu(c.default,l.default);const M=c.stops.length;if(M===1||h<=c.stops[0][0])return c.stops[0][1];if(h>=c.stops[M-1][0])return c.stops[M-1][1];const T=ua(c.stops.map(re=>re[0]),h),K=function(re,Ae,be,Be){const De=Be-be,Ge=re-be;return De===0?0:Ae===1?Ge/De:(Math.pow(Ae,Ge)-1)/(Math.pow(Ae,De)-1)}(h,y,c.stops[T][0],c.stops[T+1][0]),F=c.stops[T][1],W=c.stops[T+1][1],J=vt[l.type]||C0;return typeof F.evaluate=="function"?{evaluate(...re){const Ae=F.evaluate.apply(void 0,re),be=W.evaluate.apply(void 0,re);if(Ae!==void 0&&be!==void 0)return J(Ae,be,K,c.colorSpace)}}:J(F,W,K,c.colorSpace)}function Gi(c,l,h){switch(l.type){case"color":h=Ei.parse(h);break;case"formatted":h=Gn.fromString(h.toString());break;case"resolvedImage":h=_e.fromString(h.toString());break;case"padding":h=ro.parse(h);break;default:Ki(h)===l.type||l.type==="enum"&&l.values[h]||(h=void 0)}return Yu(h,c.default,l.default)}Go.register(YA,{error:[{kind:"error"},[fn],(c,[l])=>{throw new hr(l.evaluate(c))}],typeof:[fn,[Kt],(c,[l])=>je(ln(l.evaluate(c)))],"to-rgba":[Ie(Lt,4),[On],(c,[l])=>{const[h,y,M,T]=l.evaluate(c).rgb;return[255*h,255*y,255*M,T]}],rgb:[On,[Lt,Lt,Lt],ra],rgba:[On,[Lt,Lt,Lt,Lt],ra],has:{type:Pn,overloads:[[[fn],(c,[l])=>Qu(l.evaluate(c),c.properties())],[[fn,g],(c,[l,h])=>Qu(l.evaluate(c),h.evaluate(c))]]},get:{type:Kt,overloads:[[[fn],(c,[l])=>Vd(l.evaluate(c),c.properties())],[[fn,g],(c,[l,h])=>Vd(l.evaluate(c),h.evaluate(c))]]},"feature-state":[Kt,[fn],(c,[l])=>Vd(l.evaluate(c),c.featureState||{})],properties:[g,[],c=>c.properties()],"geometry-type":[fn,[],c=>c.geometryType()],id:[Kt,[],c=>c.id()],zoom:[Lt,[],c=>c.globals.zoom],"heatmap-density":[Lt,[],c=>c.globals.heatmapDensity||0],"line-progress":[Lt,[],c=>c.globals.lineProgress||0],accumulated:[Kt,[],c=>c.globals.accumulated===void 0?null:c.globals.accumulated],"+":[Lt,qA(Lt),(c,l)=>{let h=0;for(const y of l)h+=y.evaluate(c);return h}],"*":[Lt,qA(Lt),(c,l)=>{let h=1;for(const y of l)h*=y.evaluate(c);return h}],"-":{type:Lt,overloads:[[[Lt,Lt],(c,[l,h])=>l.evaluate(c)-h.evaluate(c)],[[Lt],(c,[l])=>-l.evaluate(c)]]},"/":[Lt,[Lt,Lt],(c,[l,h])=>l.evaluate(c)/h.evaluate(c)],"%":[Lt,[Lt,Lt],(c,[l,h])=>l.evaluate(c)%h.evaluate(c)],ln2:[Lt,[],()=>Math.LN2],pi:[Lt,[],()=>Math.PI],e:[Lt,[],()=>Math.E],"^":[Lt,[Lt,Lt],(c,[l,h])=>Math.pow(l.evaluate(c),h.evaluate(c))],sqrt:[Lt,[Lt],(c,[l])=>Math.sqrt(l.evaluate(c))],log10:[Lt,[Lt],(c,[l])=>Math.log(l.evaluate(c))/Math.LN10],ln:[Lt,[Lt],(c,[l])=>Math.log(l.evaluate(c))],log2:[Lt,[Lt],(c,[l])=>Math.log(l.evaluate(c))/Math.LN2],sin:[Lt,[Lt],(c,[l])=>Math.sin(l.evaluate(c))],cos:[Lt,[Lt],(c,[l])=>Math.cos(l.evaluate(c))],tan:[Lt,[Lt],(c,[l])=>Math.tan(l.evaluate(c))],asin:[Lt,[Lt],(c,[l])=>Math.asin(l.evaluate(c))],acos:[Lt,[Lt],(c,[l])=>Math.acos(l.evaluate(c))],atan:[Lt,[Lt],(c,[l])=>Math.atan(l.evaluate(c))],min:[Lt,qA(Lt),(c,l)=>Math.min(...l.map(h=>h.evaluate(c)))],max:[Lt,qA(Lt),(c,l)=>Math.max(...l.map(h=>h.evaluate(c)))],abs:[Lt,[Lt],(c,[l])=>Math.abs(l.evaluate(c))],round:[Lt,[Lt],(c,[l])=>{const h=l.evaluate(c);return h<0?-Math.round(-h):Math.round(h)}],floor:[Lt,[Lt],(c,[l])=>Math.floor(l.evaluate(c))],ceil:[Lt,[Lt],(c,[l])=>Math.ceil(l.evaluate(c))],"filter-==":[Pn,[fn,Kt],(c,[l,h])=>c.properties()[l.value]===h.value],"filter-id-==":[Pn,[Kt],(c,[l])=>c.id()===l.value],"filter-type-==":[Pn,[fn],(c,[l])=>c.geometryType()===l.value],"filter-<":[Pn,[fn,Kt],(c,[l,h])=>{const y=c.properties()[l.value],M=h.value;return typeof y==typeof M&&y<M}],"filter-id-<":[Pn,[Kt],(c,[l])=>{const h=c.id(),y=l.value;return typeof h==typeof y&&h<y}],"filter->":[Pn,[fn,Kt],(c,[l,h])=>{const y=c.properties()[l.value],M=h.value;return typeof y==typeof M&&y>M}],"filter-id->":[Pn,[Kt],(c,[l])=>{const h=c.id(),y=l.value;return typeof h==typeof y&&h>y}],"filter-<=":[Pn,[fn,Kt],(c,[l,h])=>{const y=c.properties()[l.value],M=h.value;return typeof y==typeof M&&y<=M}],"filter-id-<=":[Pn,[Kt],(c,[l])=>{const h=c.id(),y=l.value;return typeof h==typeof y&&h<=y}],"filter->=":[Pn,[fn,Kt],(c,[l,h])=>{const y=c.properties()[l.value],M=h.value;return typeof y==typeof M&&y>=M}],"filter-id->=":[Pn,[Kt],(c,[l])=>{const h=c.id(),y=l.value;return typeof h==typeof y&&h>=y}],"filter-has":[Pn,[Kt],(c,[l])=>l.value in c.properties()],"filter-has-id":[Pn,[],c=>c.id()!==null&&c.id()!==void 0],"filter-type-in":[Pn,[Ie(fn)],(c,[l])=>l.value.indexOf(c.geometryType())>=0],"filter-id-in":[Pn,[Ie(Kt)],(c,[l])=>l.value.indexOf(c.id())>=0],"filter-in-small":[Pn,[fn,Ie(Kt)],(c,[l,h])=>h.value.indexOf(c.properties()[l.value])>=0],"filter-in-large":[Pn,[fn,Ie(Kt)],(c,[l,h])=>function(y,M,T,K){for(;T<=K;){const F=T+K>>1;if(M[F]===y)return!0;M[F]>y?K=F-1:T=F+1}return!1}(c.properties()[l.value],h.value,0,h.value.length-1)],all:{type:Pn,overloads:[[[Pn,Pn],(c,[l,h])=>l.evaluate(c)&&h.evaluate(c)],[qA(Pn),(c,l)=>{for(const h of l)if(!h.evaluate(c))return!1;return!0}]]},any:{type:Pn,overloads:[[[Pn,Pn],(c,[l,h])=>l.evaluate(c)||h.evaluate(c)],[qA(Pn),(c,l)=>{for(const h of l)if(h.evaluate(c))return!0;return!1}]]},"!":[Pn,[Pn],(c,[l])=>!l.evaluate(c)],"is-supported-script":[Pn,[fn],(c,[l])=>{const h=c.globals&&c.globals.isSupportedScript;return!h||h(l.evaluate(c))}],upcase:[fn,[fn],(c,[l])=>l.evaluate(c).toUpperCase()],downcase:[fn,[fn],(c,[l])=>l.evaluate(c).toLowerCase()],concat:[fn,qA(Kt),(c,l)=>l.map(h=>Ft(h.evaluate(c))).join("")],"resolved-locale":[fn,[Pr],(c,[l])=>l.evaluate(c).resolvedLocale()]});class VA{constructor(l,h){var y;this.expression=l,this._warningHistory={},this._evaluator=new Wa,this._defaultValue=h?(y=h).type==="color"&&ko(y.default)?new Ei(0,0,0,0):y.type==="color"?Ei.parse(y.default)||null:y.type==="padding"?ro.parse(y.default)||null:y.type==="variableAnchorOffsetCollection"?Ri.parse(y.default)||null:y.default===void 0?null:y.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(l,h,y,M,T,K){return this._evaluator.globals=l,this._evaluator.feature=h,this._evaluator.featureState=y,this._evaluator.canonical=M,this._evaluator.availableImages=T||null,this._evaluator.formattedSection=K,this.expression.evaluate(this._evaluator)}evaluate(l,h,y,M,T,K){this._evaluator.globals=l,this._evaluator.feature=h||null,this._evaluator.featureState=y||null,this._evaluator.canonical=M,this._evaluator.availableImages=T||null,this._evaluator.formattedSection=K||null;try{const F=this.expression.evaluate(this._evaluator);if(F==null||typeof F=="number"&&F!=F)return this._defaultValue;if(this._enumValues&&!(F in this._enumValues))throw new hr(`Expected value to be one of ${Object.keys(this._enumValues).map(W=>JSON.stringify(W)).join(", ")}, but found ${JSON.stringify(F)} instead.`);return F}catch(F){return this._warningHistory[F.message]||(this._warningHistory[F.message]=!0,typeof console<"u"&&console.warn(F.message)),this._defaultValue}}}function To(c){return Array.isArray(c)&&c.length>0&&typeof c[0]=="string"&&c[0]in YA}function Fo(c,l){const h=new vi(YA,Su,[],l?function(M){const T={color:On,string:fn,number:Lt,enum:fn,boolean:Pn,formatted:rr,padding:Le,resolvedImage:ce,variableAnchorOffsetCollection:xe};return M.type==="array"?Ie(T[M.value]||Kt,M.length):T[M.type]}(l):void 0),y=h.parse(c,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?kc(new VA(y,l)):Eu(h.errors)}class HA{constructor(l,h){this.kind=l,this._styleExpression=h,this.isStateDependent=l!=="constant"&&!Ml(h.expression)}evaluateWithoutErrorHandling(l,h,y,M,T,K){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,M,T,K)}evaluate(l,h,y,M,T,K){return this._styleExpression.evaluate(l,h,y,M,T,K)}}class Us{constructor(l,h,y,M){this.kind=l,this.zoomStops=y,this._styleExpression=h,this.isStateDependent=l!=="camera"&&!Ml(h.expression),this.interpolationType=M}evaluateWithoutErrorHandling(l,h,y,M,T,K){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,M,T,K)}evaluate(l,h,y,M,T,K){return this._styleExpression.evaluate(l,h,y,M,T,K)}interpolationFactor(l,h,y){return this.interpolationType?$n.interpolationFactor(this.interpolationType,l,h,y):0}}function Nh(c,l){const h=Fo(c,l);if(h.result==="error")return h;const y=h.value.expression,M=Al(y);if(!M&&!Ad(l))return Eu([new At("","data expressions not supported")]);const T=ru(y,["zoom"]);if(!T&&!em(l))return Eu([new At("","zoom expressions not supported")]);const K=Ul(y);return K||T?K instanceof At?Eu([K]):K instanceof $n&&!zh(l)?Eu([new At("",'"interpolate" expressions cannot be used with this property')]):kc(K?new Us(M?"camera":"composite",h.value,K.labels,K instanceof $n?K.interpolation:void 0):new HA(M?"constant":"source",h.value)):Eu([new At("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class au{constructor(l,h){this._parameters=l,this._specification=h,Ke(this,jh(this._parameters,this._specification))}static deserialize(l){return new au(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function Ul(c){let l=null;if(c instanceof Ur)l=Ul(c.result);else if(c instanceof Kn){for(const h of c.args)if(l=Ul(h),l)break}else(c instanceof cl||c instanceof $n)&&c.input instanceof Go&&c.input.name==="zoom"&&(l=c);return l instanceof At||c.eachChild(h=>{const y=Ul(h);y instanceof At?l=y:!l&&y?l=new At("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new At("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function Tc(c){if(c===!0||c===!1)return!0;if(!Array.isArray(c)||c.length===0)return!1;switch(c[0]){case"has":return c.length>=2&&c[1]!=="$id"&&c[1]!=="$type";case"in":return c.length>=3&&(typeof c[1]!="string"||Array.isArray(c[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return c.length!==3||Array.isArray(c[1])||Array.isArray(c[2]);case"any":case"all":for(const l of c.slice(1))if(!Tc(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const Wh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Hd(c){if(c==null)return{filter:()=>!0,needGeometry:!1};Tc(c)||(c=ZA(c));const l=Fo(c,Wh);if(l.result==="error")throw new Error(l.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,y,M)=>l.value.evaluate(h,y,{},M),needGeometry:wA(c)}}function Ou(c,l){return c<l?-1:c>l?1:0}function wA(c){if(!Array.isArray(c))return!1;if(c[0]==="within")return!0;for(let l=1;l<c.length;l++)if(wA(c[l]))return!0;return!1}function ZA(c){if(!c)return!0;const l=c[0];return c.length<=1?l!=="any":l==="=="?XA(c[1],c[2],"=="):l==="!="?Kc(XA(c[1],c[2],"==")):l==="<"||l===">"||l==="<="||l===">="?XA(c[1],c[2],l):l==="any"?(h=c.slice(1),["any"].concat(h.map(ZA))):l==="all"?["all"].concat(c.slice(1).map(ZA)):l==="none"?["all"].concat(c.slice(1).map(ZA).map(Kc)):l==="in"?tp(c[1],c.slice(2)):l==="!in"?Kc(tp(c[1],c.slice(2))):l==="has"?tm(c[1]):l==="!has"?Kc(tm(c[1])):l!=="within"||c;var h}function XA(c,l,h){switch(c){case"$type":return[`filter-type-${h}`,l];case"$id":return[`filter-id-${h}`,l];default:return[`filter-${h}`,c,l]}}function tp(c,l){if(l.length===0)return!1;switch(c){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(h=>typeof h!=typeof l[0])?["filter-in-large",c,["literal",l.sort(Ou)]]:["filter-in-small",c,["literal",l]]}}function tm(c){switch(c){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",c]}}function Kc(c){return["!",c]}function cd(c){const l=typeof c;if(l==="number"||l==="boolean"||l==="string"||c==null)return JSON.stringify(c);if(Array.isArray(c)){let M="[";for(const T of c)M+=`${cd(T)},`;return`${M}]`}const h=Object.keys(c).sort();let y="{";for(let M=0;M<h.length;M++)y+=`${JSON.stringify(h[M])}:${cd(c[h[M]])},`;return`${y}}`}function Rl(c){let l="";for(const h of or)l+=`/${cd(c[h])}`;return l}function Sl(c){const l=c.value;return l?[new V(c.key,l,"constants have been deprecated as of v8")]:[]}function ya(c){return c instanceof Number||c instanceof String||c instanceof Boolean?c.valueOf():c}function MA(c){if(Array.isArray(c))return c.map(MA);if(c instanceof Object&&!(c instanceof Number||c instanceof String||c instanceof Boolean)){const l={};for(const h in c)l[h]=MA(c[h]);return l}return ya(c)}function zl(c){const l=c.key,h=c.value,y=c.valueSpec||{},M=c.objectElementValidators||{},T=c.style,K=c.styleSpec,F=c.validateSpec;let W=[];const J=Ki(h);if(J!=="object")return[new V(l,h,`object expected, ${J} found`)];for(const re in h){const Ae=re.split(".")[0],be=y[Ae]||y["*"];let Be;if(M[Ae])Be=M[Ae];else if(y[Ae])Be=F;else if(M["*"])Be=M["*"];else{if(!y["*"]){W.push(new V(l,h[re],`unknown property "${re}"`));continue}Be=F}W=W.concat(Be({key:(l&&`${l}.`)+re,value:h[re],valueSpec:be,style:T,styleSpec:K,object:h,objectKey:re,validateSpec:F},h))}for(const re in y)M[re]||y[re].required&&y[re].default===void 0&&h[re]===void 0&&W.push(new V(l,h,`missing required property "${re}"`));return W}function Bu(c){const l=c.value,h=c.valueSpec,y=c.style,M=c.styleSpec,T=c.key,K=c.arrayElementValidator||c.validateSpec;if(Ki(l)!=="array")return[new V(T,l,`array expected, ${Ki(l)} found`)];if(h.length&&l.length!==h.length)return[new V(T,l,`array length ${h.length} expected, length ${l.length} found`)];if(h["min-length"]&&l.length<h["min-length"])return[new V(T,l,`array length at least ${h["min-length"]} expected, length ${l.length} found`)];let F={type:h.value,values:h.values};M.$version<7&&(F.function=h.function),Ki(h.value)==="object"&&(F=h.value);let W=[];for(let J=0;J<l.length;J++)W=W.concat(K({array:l,arrayIndex:J,value:l[J],valueSpec:F,validateSpec:c.validateSpec,style:y,styleSpec:M,key:`${T}[${J}]`}));return W}function jl(c){const l=c.key,h=c.value,y=c.valueSpec;let M=Ki(h);return M==="number"&&h!=h&&(M="NaN"),M!=="number"?[new V(l,h,`number expected, ${M} found`)]:"minimum"in y&&h<y.minimum?[new V(l,h,`${h} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&h>y.maximum?[new V(l,h,`${h} is greater than the maximum value ${y.maximum}`)]:[]}function Zd(c){const l=c.valueSpec,h=ya(c.value.type);let y,M,T,K={};const F=h!=="categorical"&&c.value.property===void 0,W=!F,J=Ki(c.value.stops)==="array"&&Ki(c.value.stops[0])==="array"&&Ki(c.value.stops[0][0])==="object",re=zl({key:c.key,value:c.value,valueSpec:c.styleSpec.function,validateSpec:c.validateSpec,style:c.style,styleSpec:c.styleSpec,objectElementValidators:{stops:function(Be){if(h==="identity")return[new V(Be.key,Be.value,'identity function may not have a "stops" property')];let De=[];const Ge=Be.value;return De=De.concat(Bu({key:Be.key,value:Ge,valueSpec:Be.valueSpec,validateSpec:Be.validateSpec,style:Be.style,styleSpec:Be.styleSpec,arrayElementValidator:Ae})),Ki(Ge)==="array"&&Ge.length===0&&De.push(new V(Be.key,Ge,"array must have at least one stop")),De},default:function(Be){return Be.validateSpec({key:Be.key,value:Be.value,valueSpec:l,validateSpec:Be.validateSpec,style:Be.style,styleSpec:Be.styleSpec})}}});return h==="identity"&&F&&re.push(new V(c.key,c.value,'missing required property "property"')),h==="identity"||c.value.stops||re.push(new V(c.key,c.value,'missing required property "stops"')),h==="exponential"&&c.valueSpec.expression&&!zh(c.valueSpec)&&re.push(new V(c.key,c.value,"exponential functions not supported")),c.styleSpec.$version>=8&&(W&&!Ad(c.valueSpec)?re.push(new V(c.key,c.value,"property functions not supported")):F&&!em(c.valueSpec)&&re.push(new V(c.key,c.value,"zoom functions not supported"))),h!=="categorical"&&!J||c.value.property!==void 0||re.push(new V(c.key,c.value,'"property" property is required')),re;function Ae(Be){let De=[];const Ge=Be.value,Ze=Be.key;if(Ki(Ge)!=="array")return[new V(Ze,Ge,`array expected, ${Ki(Ge)} found`)];if(Ge.length!==2)return[new V(Ze,Ge,`array length 2 expected, length ${Ge.length} found`)];if(J){if(Ki(Ge[0])!=="object")return[new V(Ze,Ge,`object expected, ${Ki(Ge[0])} found`)];if(Ge[0].zoom===void 0)return[new V(Ze,Ge,"object stop key must have zoom")];if(Ge[0].value===void 0)return[new V(Ze,Ge,"object stop key must have value")];if(T&&T>ya(Ge[0].zoom))return[new V(Ze,Ge[0].zoom,"stop zoom values must appear in ascending order")];ya(Ge[0].zoom)!==T&&(T=ya(Ge[0].zoom),M=void 0,K={}),De=De.concat(zl({key:`${Ze}[0]`,value:Ge[0],valueSpec:{zoom:{}},validateSpec:Be.validateSpec,style:Be.style,styleSpec:Be.styleSpec,objectElementValidators:{zoom:jl,value:be}}))}else De=De.concat(be({key:`${Ze}[0]`,value:Ge[0],valueSpec:{},validateSpec:Be.validateSpec,style:Be.style,styleSpec:Be.styleSpec},Ge));return To(MA(Ge[1]))?De.concat([new V(`${Ze}[1]`,Ge[1],"expressions are not allowed in function stops.")]):De.concat(Be.validateSpec({key:`${Ze}[1]`,value:Ge[1],valueSpec:l,validateSpec:Be.validateSpec,style:Be.style,styleSpec:Be.styleSpec}))}function be(Be,De){const Ge=Ki(Be.value),Ze=ya(Be.value),at=Be.value!==null?Be.value:De;if(y){if(Ge!==y)return[new V(Be.key,at,`${Ge} stop domain type must match previous stop domain type ${y}`)]}else y=Ge;if(Ge!=="number"&&Ge!=="string"&&Ge!=="boolean")return[new V(Be.key,at,"stop domain value must be a number, string, or boolean")];if(Ge!=="number"&&h!=="categorical"){let It=`number expected, ${Ge} found`;return Ad(l)&&h===void 0&&(It+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new V(Be.key,at,It)]}return h!=="categorical"||Ge!=="number"||isFinite(Ze)&&Math.floor(Ze)===Ze?h!=="categorical"&&Ge==="number"&&M!==void 0&&Ze<M?[new V(Be.key,at,"stop domain values must appear in ascending order")]:(M=Ze,h==="categorical"&&Ze in K?[new V(Be.key,at,"stop domain values must be unique")]:(K[Ze]=!0,[])):[new V(Be.key,at,`integer expected, found ${Ze}`)]}}function Pc(c){const l=(c.expressionContext==="property"?Nh:Fo)(MA(c.value),c.valueSpec);if(l.result==="error")return l.value.map(y=>new V(`${c.key}${y.key}`,c.value,y.message));const h=l.value.expression||l.value._styleExpression.expression;if(c.expressionContext==="property"&&c.propertyKey==="text-font"&&!h.outputDefined())return[new V(c.key,c.value,`Invalid data expression for "${c.propertyKey}". Output values must be contained as literals within the expression.`)];if(c.expressionContext==="property"&&c.propertyType==="layout"&&!Ml(h))return[new V(c.key,c.value,'"feature-state" data expressions are not supported with layout properties.')];if(c.expressionContext==="filter"&&!Ml(h))return[new V(c.key,c.value,'"feature-state" data expressions are not supported with filters.')];if(c.expressionContext&&c.expressionContext.indexOf("cluster")===0){if(!ru(h,["zoom","feature-state"]))return[new V(c.key,c.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(c.expressionContext==="cluster-initial"&&!Al(h))return[new V(c.key,c.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Iu(c){const l=c.key,h=c.value,y=c.valueSpec,M=[];return Array.isArray(y.values)?y.values.indexOf(ya(h))===-1&&M.push(new V(l,h,`expected one of [${y.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(y.values).indexOf(ya(h))===-1&&M.push(new V(l,h,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(h)} found`)),M}function Dc(c){return Tc(MA(c.value))?Pc(Ke({},c,{expressionContext:"filter",valueSpec:{value:"boolean"}})):dd(c)}function dd(c){const l=c.value,h=c.key;if(Ki(l)!=="array")return[new V(h,l,`array expected, ${Ki(l)} found`)];const y=c.styleSpec;let M,T=[];if(l.length<1)return[new V(h,l,"filter array must have at least 1 element")];switch(T=T.concat(Iu({key:`${h}[0]`,value:l[0],valueSpec:y.filter_operator,style:c.style,styleSpec:c.styleSpec})),ya(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&ya(l[1])==="$type"&&T.push(new V(h,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&T.push(new V(h,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(M=Ki(l[1]),M!=="string"&&T.push(new V(`${h}[1]`,l[1],`string expected, ${M} found`)));for(let K=2;K<l.length;K++)M=Ki(l[K]),ya(l[1])==="$type"?T=T.concat(Iu({key:`${h}[${K}]`,value:l[K],valueSpec:y.geometry_type,style:c.style,styleSpec:c.styleSpec})):M!=="string"&&M!=="number"&&M!=="boolean"&&T.push(new V(`${h}[${K}]`,l[K],`string, number, or boolean expected, ${M} found`));break;case"any":case"all":case"none":for(let K=1;K<l.length;K++)T=T.concat(dd({key:`${h}[${K}]`,value:l[K],style:c.style,styleSpec:c.styleSpec}));break;case"has":case"!has":M=Ki(l[1]),l.length!==2?T.push(new V(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):M!=="string"&&T.push(new V(`${h}[1]`,l[1],`string expected, ${M} found`));break;case"within":M=Ki(l[1]),l.length!==2?T.push(new V(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):M!=="object"&&T.push(new V(`${h}[1]`,l[1],`object expected, ${M} found`))}return T}function Xd(c,l){const h=c.key,y=c.validateSpec,M=c.style,T=c.styleSpec,K=c.value,F=c.objectKey,W=T[`${l}_${c.layerType}`];if(!W)return[];const J=F.match(/^(.*)-transition$/);if(l==="paint"&&J&&W[J[1]]&&W[J[1]].transition)return y({key:h,value:K,valueSpec:T.transition,style:M,styleSpec:T});const re=c.valueSpec||W[F];if(!re)return[new V(h,K,`unknown property "${F}"`)];let Ae;if(Ki(K)==="string"&&Ad(re)&&!re.tokens&&(Ae=/^{([^}]+)}$/.exec(K)))return[new V(h,K,`"${F}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Ae[1])} }\`.`)];const be=[];return c.layerType==="symbol"&&(F==="text-field"&&M&&!M.glyphs&&be.push(new V(h,K,'use of "text-field" requires a style "glyphs" property')),F==="text-font"&&ko(MA(K))&&ya(K.type)==="identity"&&be.push(new V(h,K,'"text-font" does not support identity functions'))),be.concat(y({key:c.key,value:K,valueSpec:re,style:M,styleSpec:T,expressionContext:"property",propertyType:l,propertyKey:F}))}function su(c){return Xd(c,"paint")}function Et(c){return Xd(c,"layout")}function an(c){let l=[];const h=c.value,y=c.key,M=c.style,T=c.styleSpec;h.type||h.ref||l.push(new V(y,h,'either "type" or "ref" is required'));let K=ya(h.type);const F=ya(h.ref);if(h.id){const W=ya(h.id);for(let J=0;J<c.arrayIndex;J++){const re=M.layers[J];ya(re.id)===W&&l.push(new V(y,h.id,`duplicate layer id "${h.id}", previously used at line ${re.id.__line__}`))}}if("ref"in h){let W;["type","source","source-layer","filter","layout"].forEach(J=>{J in h&&l.push(new V(y,h[J],`"${J}" is prohibited for ref layers`))}),M.layers.forEach(J=>{ya(J.id)===F&&(W=J)}),W?W.ref?l.push(new V(y,h.ref,"ref cannot reference another ref layer")):K=ya(W.type):l.push(new V(y,h.ref,`ref layer "${F}" not found`))}else if(K!=="background")if(h.source){const W=M.sources&&M.sources[h.source],J=W&&ya(W.type);W?J==="vector"&&K==="raster"?l.push(new V(y,h.source,`layer "${h.id}" requires a raster source`)):J!=="raster-dem"&&K==="hillshade"?l.push(new V(y,h.source,`layer "${h.id}" requires a raster-dem source`)):J==="raster"&&K!=="raster"?l.push(new V(y,h.source,`layer "${h.id}" requires a vector source`)):J!=="vector"||h["source-layer"]?J==="raster-dem"&&K!=="hillshade"?l.push(new V(y,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):K!=="line"||!h.paint||!h.paint["line-gradient"]||J==="geojson"&&W.lineMetrics||l.push(new V(y,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):l.push(new V(y,h,`layer "${h.id}" must specify a "source-layer"`)):l.push(new V(y,h.source,`source "${h.source}" not found`))}else l.push(new V(y,h,'missing required property "source"'));return l=l.concat(zl({key:y,value:h,valueSpec:T.layer,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*":()=>[],type:()=>c.validateSpec({key:`${y}.type`,value:h.type,valueSpec:T.layer.type,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,object:h,objectKey:"type"}),filter:Dc,layout:W=>zl({layer:h,key:W.key,value:W.value,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":J=>Et(Ke({layerType:K},J))}}),paint:W=>zl({layer:h,key:W.key,value:W.value,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":J=>su(Ke({layerType:K},J))}})}})),l}function jt(c){const l=c.value,h=c.key,y=Ki(l);return y!=="string"?[new V(h,l,`string expected, ${y} found`)]:[]}const fr={promoteId:function({key:c,value:l}){if(Ki(l)==="string")return jt({key:c,value:l});{const h=[];for(const y in l)h.push(...jt({key:`${c}.${y}`,value:l[y]}));return h}}};function ui(c){const l=c.value,h=c.key,y=c.styleSpec,M=c.style,T=c.validateSpec;if(!l.type)return[new V(h,l,'"type" is required')];const K=ya(l.type);let F;switch(K){case"vector":case"raster":return F=zl({key:h,value:l,valueSpec:y[`source_${K.replace("-","_")}`],style:c.style,styleSpec:y,objectElementValidators:fr,validateSpec:T}),F;case"raster-dem":return F=function(W){var J;const re=(J=W.sourceName)!==null&&J!==void 0?J:"",Ae=W.value,be=W.styleSpec,Be=be.source_raster_dem,De=W.style;let Ge=[];const Ze=Ki(Ae);if(Ae===void 0)return Ge;if(Ze!=="object")return Ge.push(new V("source_raster_dem",Ae,`object expected, ${Ze} found`)),Ge;const at=ya(Ae.encoding)==="custom",It=["redFactor","greenFactor","blueFactor","baseShift"],ct=W.value.encoding?`"${W.value.encoding}"`:"Default";for(const wt in Ae)!at&&It.includes(wt)?Ge.push(new V(wt,Ae[wt],`In "${re}": "${wt}" is only valid when "encoding" is set to "custom". ${ct} encoding found`)):Be[wt]?Ge=Ge.concat(W.validateSpec({key:wt,value:Ae[wt],valueSpec:Be[wt],validateSpec:W.validateSpec,style:De,styleSpec:be})):Ge.push(new V(wt,Ae[wt],`unknown property "${wt}"`));return Ge}({sourceName:h,value:l,style:c.style,styleSpec:y,validateSpec:T}),F;case"geojson":if(F=zl({key:h,value:l,valueSpec:y.source_geojson,style:M,styleSpec:y,validateSpec:T,objectElementValidators:fr}),l.cluster)for(const W in l.clusterProperties){const[J,re]=l.clusterProperties[W],Ae=typeof J=="string"?[J,["accumulated"],["get",W]]:J;F.push(...Pc({key:`${h}.${W}.map`,value:re,validateSpec:T,expressionContext:"cluster-map"})),F.push(...Pc({key:`${h}.${W}.reduce`,value:Ae,validateSpec:T,expressionContext:"cluster-reduce"}))}return F;case"video":return zl({key:h,value:l,valueSpec:y.source_video,style:M,validateSpec:T,styleSpec:y});case"image":return zl({key:h,value:l,valueSpec:y.source_image,style:M,validateSpec:T,styleSpec:y});case"canvas":return[new V(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Iu({key:`${h}.type`,value:l.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:M,validateSpec:T,styleSpec:y})}}function oo(c){const l=c.value,h=c.styleSpec,y=h.light,M=c.style;let T=[];const K=Ki(l);if(l===void 0)return T;if(K!=="object")return T=T.concat([new V("light",l,`object expected, ${K} found`)]),T;for(const F in l){const W=F.match(/^(.*)-transition$/);T=T.concat(W&&y[W[1]]&&y[W[1]].transition?c.validateSpec({key:F,value:l[F],valueSpec:h.transition,validateSpec:c.validateSpec,style:M,styleSpec:h}):y[F]?c.validateSpec({key:F,value:l[F],valueSpec:y[F],validateSpec:c.validateSpec,style:M,styleSpec:h}):[new V(F,l[F],`unknown property "${F}"`)])}return T}function Pa(c){const l=c.value,h=c.styleSpec,y=h.sky,M=c.style,T=Ki(l);if(l===void 0)return[];if(T!=="object")return[new V("sky",l,`object expected, ${T} found`)];let K=[];for(const F in l)K=K.concat(y[F]?Po({key:F,value:l[F],valueSpec:y[F],style:M,styleSpec:h}):[new V(F,l[F],`unknown property "${F}"`)]);return K}function Ko(c){const l=c.value,h=c.styleSpec,y=h.terrain,M=c.style;let T=[];const K=Ki(l);if(l===void 0)return T;if(K!=="object")return T=T.concat([new V("terrain",l,`object expected, ${K} found`)]),T;for(const F in l)T=T.concat(y[F]?c.validateSpec({key:F,value:l[F],valueSpec:y[F],validateSpec:c.validateSpec,style:M,styleSpec:h}):[new V(F,l[F],`unknown property "${F}"`)]);return T}function SA(c){let l=[];const h=c.value,y=c.key;if(Array.isArray(h)){const M=[],T=[];for(const K in h)h[K].id&&M.includes(h[K].id)&&l.push(new V(y,h,`all the sprites' ids must be unique, but ${h[K].id} is duplicated`)),M.push(h[K].id),h[K].url&&T.includes(h[K].url)&&l.push(new V(y,h,`all the sprites' URLs must be unique, but ${h[K].url} is duplicated`)),T.push(h[K].url),l=l.concat(zl({key:`${y}[${K}]`,value:h[K],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:c.validateSpec}));return l}return jt({key:y,value:h})}const Jd={"*":()=>[],array:Bu,boolean:function(c){const l=c.value,h=c.key,y=Ki(l);return y!=="boolean"?[new V(h,l,`boolean expected, ${y} found`)]:[]},number:jl,color:function(c){const l=c.key,h=c.value,y=Ki(h);return y!=="string"?[new V(l,h,`color expected, ${y} found`)]:Ei.parse(String(h))?[]:[new V(l,h,`color expected, "${h}" found`)]},constants:Sl,enum:Iu,filter:Dc,function:Zd,layer:an,object:zl,source:ui,light:oo,sky:Pa,terrain:Ko,string:jt,formatted:function(c){return jt(c).length===0?[]:Pc(c)},resolvedImage:function(c){return jt(c).length===0?[]:Pc(c)},padding:function(c){const l=c.key,h=c.value;if(Ki(h)==="array"){if(h.length<1||h.length>4)return[new V(l,h,`padding requires 1 to 4 values; ${h.length} values found`)];const y={type:"number"};let M=[];for(let T=0;T<h.length;T++)M=M.concat(c.validateSpec({key:`${l}[${T}]`,value:h[T],validateSpec:c.validateSpec,valueSpec:y}));return M}return jl({key:l,value:h,valueSpec:{}})},variableAnchorOffsetCollection:function(c){const l=c.key,h=c.value,y=Ki(h),M=c.styleSpec;if(y!=="array"||h.length<1||h.length%2!=0)return[new V(l,h,"variableAnchorOffsetCollection requires a non-empty array of even length")];let T=[];for(let K=0;K<h.length;K+=2)T=T.concat(Iu({key:`${l}[${K}]`,value:h[K],valueSpec:M.layout_symbol["text-anchor"]})),T=T.concat(Bu({key:`${l}[${K+1}]`,value:h[K+1],valueSpec:{length:2,value:"number"},validateSpec:c.validateSpec,style:c.style,styleSpec:M}));return T},sprite:SA};function Po(c){const l=c.value,h=c.valueSpec,y=c.styleSpec;return c.validateSpec=Po,h.expression&&ko(ya(l))?Zd(c):h.expression&&To(MA(l))?Pc(c):h.type&&Jd[h.type]?Jd[h.type](c):zl(Ke({},c,{valueSpec:h.type?y[h.type]:h}))}function EA(c){const l=c.value,h=c.key,y=jt(c);return y.length||(l.indexOf("{fontstack}")===-1&&y.push(new V(h,l,'"glyphs" url must include a "{fontstack}" token')),l.indexOf("{range}")===-1&&y.push(new V(h,l,'"glyphs" url must include a "{range}" token'))),y}function ws(c,l=mt){let h=[];return h=h.concat(Po({key:"",value:c,valueSpec:l.$root,styleSpec:l,style:c,validateSpec:Po,objectElementValidators:{glyphs:EA,"*":()=>[]}})),c.constants&&(h=h.concat(Sl({key:"constants",value:c.constants,style:c,styleSpec:l,validateSpec:Po}))),qu(h)}function Qa(c){return function(l){return c({...l,validateSpec:Po})}}function qu(c){return[].concat(c).sort((l,h)=>l.line-h.line)}function ls(c){return function(...l){return qu(c.apply(this,l))}}ws.source=ls(Qa(ui)),ws.sprite=ls(Qa(SA)),ws.glyphs=ls(Qa(EA)),ws.light=ls(Qa(oo)),ws.sky=ls(Qa(Pa)),ws.terrain=ls(Qa(Ko)),ws.layer=ls(Qa(an)),ws.filter=ls(Qa(Dc)),ws.paintProperty=ls(Qa(su)),ws.layoutProperty=ls(Qa(Et));const Hi=ws,Gh=Hi.light,$h=Hi.paintProperty,lu=Hi.layoutProperty;function JA(c,l){let h=!1;if(l&&l.length)for(const y of l)c.fire(new Rt(new Error(y.message))),h=!0;return h}class va{constructor(l,h,y){const M=this.cells=[];if(l instanceof ArrayBuffer){this.arrayBuffer=l;const K=new Int32Array(this.arrayBuffer);l=K[0],this.d=(h=K[1])+2*(y=K[2]);for(let W=0;W<this.d*this.d;W++){const J=K[3+W],re=K[3+W+1];M.push(J===re?null:K.subarray(J,re))}const F=K[3+M.length+1];this.keys=K.subarray(K[3+M.length],F),this.bboxes=K.subarray(F),this.insert=this._insertReadonly}else{this.d=h+2*y;for(let K=0;K<this.d*this.d;K++)M.push([]);this.keys=[],this.bboxes=[]}this.n=h,this.extent=l,this.padding=y,this.scale=h/l,this.uid=0;const T=y/h*l;this.min=-T,this.max=l+T}insert(l,h,y,M,T){this._forEachCell(h,y,M,T,this._insertCell,this.uid++,void 0,void 0),this.keys.push(l),this.bboxes.push(h),this.bboxes.push(y),this.bboxes.push(M),this.bboxes.push(T)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(l,h,y,M,T,K){this.cells[T].push(K)}query(l,h,y,M,T){const K=this.min,F=this.max;if(l<=K&&h<=K&&F<=y&&F<=M&&!T)return Array.prototype.slice.call(this.keys);{const W=[];return this._forEachCell(l,h,y,M,this._queryCell,W,{},T),W}}_queryCell(l,h,y,M,T,K,F,W){const J=this.cells[T];if(J!==null){const re=this.keys,Ae=this.bboxes;for(let be=0;be<J.length;be++){const Be=J[be];if(F[Be]===void 0){const De=4*Be;(W?W(Ae[De+0],Ae[De+1],Ae[De+2],Ae[De+3]):l<=Ae[De+2]&&h<=Ae[De+3]&&y>=Ae[De+0]&&M>=Ae[De+1])?(F[Be]=!0,K.push(re[Be])):F[Be]=!1}}}}_forEachCell(l,h,y,M,T,K,F,W){const J=this._convertToCellCoord(l),re=this._convertToCellCoord(h),Ae=this._convertToCellCoord(y),be=this._convertToCellCoord(M);for(let Be=J;Be<=Ae;Be++)for(let De=re;De<=be;De++){const Ge=this.d*De+Be;if((!W||W(this._convertFromCellCoord(Be),this._convertFromCellCoord(De),this._convertFromCellCoord(Be+1),this._convertFromCellCoord(De+1)))&&T.call(this,l,h,y,M,Ge,K,F,W))return}}_convertFromCellCoord(l){return(l-this.padding)/this.scale}_convertToCellCoord(l){return Math.max(0,Math.min(this.d-1,Math.floor(l*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const l=this.cells,h=3+this.cells.length+1+1;let y=0;for(let K=0;K<this.cells.length;K++)y+=this.cells[K].length;const M=new Int32Array(h+y+this.keys.length+this.bboxes.length);M[0]=this.extent,M[1]=this.n,M[2]=this.padding;let T=h;for(let K=0;K<l.length;K++){const F=l[K];M[3+K]=T,M.set(F,T),T+=F.length}return M[3+l.length]=T,M.set(this.keys,T),T+=this.keys.length,M[3+l.length+1]=T,M.set(this.bboxes,T),T+=this.bboxes.length,M.buffer}static serialize(l,h){const y=l.toArrayBuffer();return h&&h.push(y),{buffer:y}}static deserialize(l){return new va(l.buffer)}}const dl={};function Qn(c,l,h={}){if(dl[c])throw new Error(`${c} is already registered.`);Object.defineProperty(l,"_classRegistryKey",{value:c,writeable:!1}),dl[c]={klass:l,omit:h.omit||[],shallow:h.shallow||[]}}Qn("Object",Object),Qn("TransferableGridIndex",va),Qn("Color",Ei),Qn("Error",Error),Qn("AJAXError",ke),Qn("ResolvedImage",_e),Qn("StylePropertyFunction",au),Qn("StyleExpression",VA,{omit:["_evaluator"]}),Qn("ZoomDependentExpression",Us),Qn("ZoomConstantExpression",HA),Qn("CompoundExpression",Go,{omit:["_evaluate"]});for(const c in YA)YA[c]._classRegistryKey||Qn(`Expression_${c}`,YA[c]);function Nl(c){return c&&typeof ArrayBuffer<"u"&&(c instanceof ArrayBuffer||c.constructor&&c.constructor.name==="ArrayBuffer")}function Vu(c,l){if(c==null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c instanceof Boolean||c instanceof Number||c instanceof String||c instanceof Date||c instanceof RegExp||c instanceof Blob||c instanceof Error)return c;if(Nl(c)||st(c))return l&&l.push(c),c;if(ArrayBuffer.isView(c)){const h=c;return l&&l.push(h.buffer),h}if(c instanceof ImageData)return l&&l.push(c.data.buffer),c;if(Array.isArray(c)){const h=[];for(const y of c)h.push(Vu(y,l));return h}if(typeof c=="object"){const h=c.constructor,y=h._classRegistryKey;if(!y)throw new Error(`can't serialize object of unregistered class ${h.name}`);if(!dl[y])throw new Error(`${y} is not registered.`);const M=h.serialize?h.serialize(c,l):{};if(h.serialize){if(l&&M===l[l.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const T in c){if(!c.hasOwnProperty(T)||dl[y].omit.indexOf(T)>=0)continue;const K=c[T];M[T]=dl[y].shallow.indexOf(T)>=0?K:Vu(K,l)}c instanceof Error&&(M.message=c.message)}if(M.$name)throw new Error("$name property is reserved for worker serialization logic.");return y!=="Object"&&(M.$name=y),M}throw new Error("can't serialize object of type "+typeof c)}function ec(c){if(c==null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c instanceof Boolean||c instanceof Number||c instanceof String||c instanceof Date||c instanceof RegExp||c instanceof Blob||c instanceof Error||Nl(c)||st(c)||ArrayBuffer.isView(c)||c instanceof ImageData)return c;if(Array.isArray(c))return c.map(ec);if(typeof c=="object"){const l=c.$name||"Object";if(!dl[l])throw new Error(`can't deserialize unregistered class ${l}`);const{klass:h}=dl[l];if(!h)throw new Error(`can't deserialize unregistered class ${l}`);if(h.deserialize)return h.deserialize(c);const y=Object.create(h.prototype);for(const M of Object.keys(c)){if(M==="$name")continue;const T=c[M];y[M]=dl[l].shallow.indexOf(M)>=0?T:ec(T)}return y}throw new Error("can't deserialize object of type "+typeof c)}class Hu{constructor(){this.first=!0}update(l,h){const y=Math.floor(l);return this.first?(this.first=!1,this.lastIntegerZoom=y,this.lastIntegerZoomTime=0,this.lastZoom=l,this.lastFloorZoom=y,!0):(this.lastFloorZoom>y?(this.lastIntegerZoom=y+1,this.lastIntegerZoomTime=h):this.lastFloorZoom<y&&(this.lastIntegerZoom=y,this.lastIntegerZoomTime=h),l!==this.lastZoom&&(this.lastZoom=l,this.lastFloorZoom=y,!0))}}const Jn={"Latin-1 Supplement":c=>c>=128&&c<=255,Arabic:c=>c>=1536&&c<=1791,"Arabic Supplement":c=>c>=1872&&c<=1919,"Arabic Extended-A":c=>c>=2208&&c<=2303,"Hangul Jamo":c=>c>=4352&&c<=4607,"Unified Canadian Aboriginal Syllabics":c=>c>=5120&&c<=5759,Khmer:c=>c>=6016&&c<=6143,"Unified Canadian Aboriginal Syllabics Extended":c=>c>=6320&&c<=6399,"General Punctuation":c=>c>=8192&&c<=8303,"Letterlike Symbols":c=>c>=8448&&c<=8527,"Number Forms":c=>c>=8528&&c<=8591,"Miscellaneous Technical":c=>c>=8960&&c<=9215,"Control Pictures":c=>c>=9216&&c<=9279,"Optical Character Recognition":c=>c>=9280&&c<=9311,"Enclosed Alphanumerics":c=>c>=9312&&c<=9471,"Geometric Shapes":c=>c>=9632&&c<=9727,"Miscellaneous Symbols":c=>c>=9728&&c<=9983,"Miscellaneous Symbols and Arrows":c=>c>=11008&&c<=11263,"CJK Radicals Supplement":c=>c>=11904&&c<=12031,"Kangxi Radicals":c=>c>=12032&&c<=12255,"Ideographic Description Characters":c=>c>=12272&&c<=12287,"CJK Symbols and Punctuation":c=>c>=12288&&c<=12351,Hiragana:c=>c>=12352&&c<=12447,Katakana:c=>c>=12448&&c<=12543,Bopomofo:c=>c>=12544&&c<=12591,"Hangul Compatibility Jamo":c=>c>=12592&&c<=12687,Kanbun:c=>c>=12688&&c<=12703,"Bopomofo Extended":c=>c>=12704&&c<=12735,"CJK Strokes":c=>c>=12736&&c<=12783,"Katakana Phonetic Extensions":c=>c>=12784&&c<=12799,"Enclosed CJK Letters and Months":c=>c>=12800&&c<=13055,"CJK Compatibility":c=>c>=13056&&c<=13311,"CJK Unified Ideographs Extension A":c=>c>=13312&&c<=19903,"Yijing Hexagram Symbols":c=>c>=19904&&c<=19967,"CJK Unified Ideographs":c=>c>=19968&&c<=40959,"Yi Syllables":c=>c>=40960&&c<=42127,"Yi Radicals":c=>c>=42128&&c<=42191,"Hangul Jamo Extended-A":c=>c>=43360&&c<=43391,"Hangul Syllables":c=>c>=44032&&c<=55215,"Hangul Jamo Extended-B":c=>c>=55216&&c<=55295,"Private Use Area":c=>c>=57344&&c<=63743,"CJK Compatibility Ideographs":c=>c>=63744&&c<=64255,"Arabic Presentation Forms-A":c=>c>=64336&&c<=65023,"Vertical Forms":c=>c>=65040&&c<=65055,"CJK Compatibility Forms":c=>c>=65072&&c<=65103,"Small Form Variants":c=>c>=65104&&c<=65135,"Arabic Presentation Forms-B":c=>c>=65136&&c<=65279,"Halfwidth and Fullwidth Forms":c=>c>=65280&&c<=65519};function tc(c){for(const l of c)if(Xu(l.charCodeAt(0)))return!0;return!1}function Zu(c){for(const l of c)if(!np(l.charCodeAt(0)))return!1;return!0}function np(c){return!(Jn.Arabic(c)||Jn["Arabic Supplement"](c)||Jn["Arabic Extended-A"](c)||Jn["Arabic Presentation Forms-A"](c)||Jn["Arabic Presentation Forms-B"](c))}function Xu(c){return!(c!==746&&c!==747&&(c<4352||!(Jn["Bopomofo Extended"](c)||Jn.Bopomofo(c)||Jn["CJK Compatibility Forms"](c)&&!(c>=65097&&c<=65103)||Jn["CJK Compatibility Ideographs"](c)||Jn["CJK Compatibility"](c)||Jn["CJK Radicals Supplement"](c)||Jn["CJK Strokes"](c)||!(!Jn["CJK Symbols and Punctuation"](c)||c>=12296&&c<=12305||c>=12308&&c<=12319||c===12336)||Jn["CJK Unified Ideographs Extension A"](c)||Jn["CJK Unified Ideographs"](c)||Jn["Enclosed CJK Letters and Months"](c)||Jn["Hangul Compatibility Jamo"](c)||Jn["Hangul Jamo Extended-A"](c)||Jn["Hangul Jamo Extended-B"](c)||Jn["Hangul Jamo"](c)||Jn["Hangul Syllables"](c)||Jn.Hiragana(c)||Jn["Ideographic Description Characters"](c)||Jn.Kanbun(c)||Jn["Kangxi Radicals"](c)||Jn["Katakana Phonetic Extensions"](c)||Jn.Katakana(c)&&c!==12540||!(!Jn["Halfwidth and Fullwidth Forms"](c)||c===65288||c===65289||c===65293||c>=65306&&c<=65310||c===65339||c===65341||c===65343||c>=65371&&c<=65503||c===65507||c>=65512&&c<=65519)||!(!Jn["Small Form Variants"](c)||c>=65112&&c<=65118||c>=65123&&c<=65126)||Jn["Unified Canadian Aboriginal Syllabics"](c)||Jn["Unified Canadian Aboriginal Syllabics Extended"](c)||Jn["Vertical Forms"](c)||Jn["Yijing Hexagram Symbols"](c)||Jn["Yi Syllables"](c)||Jn["Yi Radicals"](c))))}function Ju(c){return!(Xu(c)||function(l){return!!(Jn["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||Jn["General Punctuation"](l)&&(l===8214||l===8224||l===8225||l===8240||l===8241||l===8251||l===8252||l===8258||l===8263||l===8264||l===8265||l===8273)||Jn["Letterlike Symbols"](l)||Jn["Number Forms"](l)||Jn["Miscellaneous Technical"](l)&&(l>=8960&&l<=8967||l>=8972&&l<=8991||l>=8996&&l<=9e3||l===9003||l>=9085&&l<=9114||l>=9150&&l<=9165||l===9167||l>=9169&&l<=9179||l>=9186&&l<=9215)||Jn["Control Pictures"](l)&&l!==9251||Jn["Optical Character Recognition"](l)||Jn["Enclosed Alphanumerics"](l)||Jn["Geometric Shapes"](l)||Jn["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||Jn["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||Jn["CJK Symbols and Punctuation"](l)||Jn.Katakana(l)||Jn["Private Use Area"](l)||Jn["CJK Compatibility Forms"](l)||Jn["Small Form Variants"](l)||Jn["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(c))}function nc(c){return c>=1424&&c<=2303||Jn["Arabic Presentation Forms-A"](c)||Jn["Arabic Presentation Forms-B"](c)}function eh(c,l){return!(!l&&nc(c)||c>=2304&&c<=3583||c>=3840&&c<=4255||Jn.Khmer(c))}function Lc(c){for(const l of c)if(nc(l.charCodeAt(0)))return!0;return!1}const eA=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(c){this.pluginStatus=c.pluginStatus,this.pluginURL=c.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(c){this.applyArabicShaping=c.applyArabicShaping,this.processBidirectionalText=c.processBidirectionalText,this.processStyledBidirectionalText=c.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Mo{constructor(l,h){this.zoom=l,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Hu,this.transition={})}isSupportedScript(l){return function(h,y){for(const M of h)if(!eh(M.charCodeAt(0),y))return!1;return!0}(l,eA.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const l=this.zoom,h=l-Math.floor(l),y=this.crossFadingFactor();return l>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*y}:{fromScale:.5,toScale:1,t:1-(1-y)*h}}}class tA{constructor(l,h){this.property=l,this.value=h,this.expression=function(y,M){if(ko(y))return new au(y,M);if(To(y)){const T=Nh(y,M);if(T.result==="error")throw new Error(T.value.map(K=>`${K.key}: ${K.message}`).join(", "));return T.value}{let T=y;return M.type==="color"&&typeof y=="string"?T=Ei.parse(y):M.type!=="padding"||typeof y!="number"&&!Array.isArray(y)?M.type==="variableAnchorOffsetCollection"&&Array.isArray(y)&&(T=Ri.parse(y)):T=ro.parse(y),{kind:"constant",evaluate:()=>T}}}(h===void 0?l.specification.default:h,l.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(l,h,y){return this.property.possiblyEvaluate(this,l,h,y)}}class hd{constructor(l){this.property=l,this.value=new tA(l,void 0)}transitioned(l,h){return new Qh(this.property,this.value,h,X({},l.transition,this.transition),l.now)}untransitioned(){return new Qh(this.property,this.value,null,{},0)}}class rp{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitionablePropertyValues)}getValue(l){return Te(this._values[l].value.value)}setValue(l,h){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new hd(this._values[l].property)),this._values[l].value=new tA(this._values[l].property,h===null?void 0:Te(h))}getTransition(l){return Te(this._values[l].transition)}setTransition(l,h){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new hd(this._values[l].property)),this._values[l].transition=Te(h)||void 0}serialize(){const l={};for(const h of Object.keys(this._values)){const y=this.getValue(h);y!==void 0&&(l[h]=y);const M=this.getTransition(h);M!==void 0&&(l[`${h}-transition`]=M)}return l}transitioned(l,h){const y=new Yh(this._properties);for(const M of Object.keys(this._values))y._values[M]=this._values[M].transitioned(l,h._values[M]);return y}untransitioned(){const l=new Yh(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].untransitioned();return l}}class Qh{constructor(l,h,y,M,T){this.property=l,this.value=h,this.begin=T+M.delay||0,this.end=this.begin+M.duration||0,l.specification.transition&&(M.delay||M.duration)&&(this.prior=y)}possiblyEvaluate(l,h,y){const M=l.now||0,T=this.value.possiblyEvaluate(l,h,y),K=this.prior;if(K){if(M>this.end)return this.prior=null,T;if(this.value.isDataDriven())return this.prior=null,T;if(M<this.begin)return K.possiblyEvaluate(l,h,y);{const F=(M-this.begin)/(this.end-this.begin);return this.property.interpolate(K.possiblyEvaluate(l,h,y),T,function(W){if(W<=0)return 0;if(W>=1)return 1;const J=W*W,re=J*W;return 4*(W<.5?re:3*(W-J)+re-.75)}(F))}}return T}}class Yh{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitioningPropertyValues)}possiblyEvaluate(l,h,y){const M=new ca(this._properties);for(const T of Object.keys(this._values))M._values[T]=this._values[T].possiblyEvaluate(l,h,y);return M}hasTransition(){for(const l of Object.keys(this._values))if(this._values[l].prior)return!0;return!1}}class ip{constructor(l){this._properties=l,this._values=Object.create(l.defaultPropertyValues)}hasValue(l){return this._values[l].value!==void 0}getValue(l){return Te(this._values[l].value)}setValue(l,h){this._values[l]=new tA(this._values[l].property,h===null?void 0:Te(h))}serialize(){const l={};for(const h of Object.keys(this._values)){const y=this.getValue(h);y!==void 0&&(l[h]=y)}return l}possiblyEvaluate(l,h,y){const M=new ca(this._properties);for(const T of Object.keys(this._values))M._values[T]=this._values[T].possiblyEvaluate(l,h,y);return M}}class ao{constructor(l,h,y){this.property=l,this.value=h,this.parameters=y}isConstant(){return this.value.kind==="constant"}constantOr(l){return this.value.kind==="constant"?this.value.value:l}evaluate(l,h,y,M){return this.property.evaluate(this.value,this.parameters,l,h,y,M)}}class ca{constructor(l){this._properties=l,this._values=Object.create(l.defaultPossiblyEvaluatedValues)}get(l){return this._values[l]}}class xr{constructor(l){this.specification=l}possiblyEvaluate(l,h){if(l.isDataDriven())throw new Error("Value should not be data driven");return l.expression.evaluate(h)}interpolate(l,h,y){const M=vt[this.specification.type];return M?M(l,h,y):l}}class Ir{constructor(l,h){this.specification=l,this.overrides=h}possiblyEvaluate(l,h,y,M){return new ao(this,l.expression.kind==="constant"||l.expression.kind==="camera"?{kind:"constant",value:l.expression.evaluate(h,null,{},y,M)}:l.expression,h)}interpolate(l,h,y){if(l.value.kind!=="constant"||h.value.kind!=="constant")return l;if(l.value.value===void 0||h.value.value===void 0)return new ao(this,{kind:"constant",value:void 0},l.parameters);const M=vt[this.specification.type];if(M){const T=M(l.value.value,h.value.value,y);return new ao(this,{kind:"constant",value:T},l.parameters)}return l}evaluate(l,h,y,M,T,K){return l.kind==="constant"?l.value:l.evaluate(h,y,M,T,K)}}class OA extends Ir{possiblyEvaluate(l,h,y,M){if(l.value===void 0)return new ao(this,{kind:"constant",value:void 0},h);if(l.expression.kind==="constant"){const T=l.expression.evaluate(h,null,{},y,M),K=l.property.specification.type==="resolvedImage"&&typeof T!="string"?T.name:T,F=this._calculate(K,K,K,h);return new ao(this,{kind:"constant",value:F},h)}if(l.expression.kind==="camera"){const T=this._calculate(l.expression.evaluate({zoom:h.zoom-1}),l.expression.evaluate({zoom:h.zoom}),l.expression.evaluate({zoom:h.zoom+1}),h);return new ao(this,{kind:"constant",value:T},h)}return new ao(this,l.expression,h)}evaluate(l,h,y,M,T,K){if(l.kind==="source"){const F=l.evaluate(h,y,M,T,K);return this._calculate(F,F,F,h)}return l.kind==="composite"?this._calculate(l.evaluate({zoom:Math.floor(h.zoom)-1},y,M),l.evaluate({zoom:Math.floor(h.zoom)},y,M),l.evaluate({zoom:Math.floor(h.zoom)+1},y,M),h):l.value}_calculate(l,h,y,M){return M.zoom>M.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class Fc{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,M){if(l.value!==void 0){if(l.expression.kind==="constant"){const T=l.expression.evaluate(h,null,{},y,M);return this._calculate(T,T,T,h)}return this._calculate(l.expression.evaluate(new Mo(Math.floor(h.zoom-1),h)),l.expression.evaluate(new Mo(Math.floor(h.zoom),h)),l.expression.evaluate(new Mo(Math.floor(h.zoom+1),h)),h)}}_calculate(l,h,y,M){return M.zoom>M.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class rc{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,M){return!!l.expression.evaluate(h,null,{},y,M)}interpolate(){return!1}}class da{constructor(l){this.properties=l,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in l){const y=l[h];y.specification.overridable&&this.overridableProperties.push(h);const M=this.defaultPropertyValues[h]=new tA(y,void 0),T=this.defaultTransitionablePropertyValues[h]=new hd(y);this.defaultTransitioningPropertyValues[h]=T.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=M.possiblyEvaluate({})}}}Qn("DataDrivenProperty",Ir),Qn("DataConstantProperty",xr),Qn("CrossFadedDataDrivenProperty",OA),Qn("CrossFadedProperty",Fc),Qn("ColorRampProperty",rc);const ic="-transition";class ka extends zt{constructor(l,h){if(super(),this.id=l.id,this.type=l.type,this._featureFilter={filter:()=>!0,needGeometry:!1},l.type!=="custom"&&(this.metadata=l.metadata,this.minzoom=l.minzoom,this.maxzoom=l.maxzoom,l.type!=="background"&&(this.source=l.source,this.sourceLayer=l["source-layer"],this.filter=l.filter),h.layout&&(this._unevaluatedLayout=new ip(h.layout)),h.paint)){this._transitionablePaint=new rp(h.paint);for(const y in l.paint)this.setPaintProperty(y,l.paint[y],{validate:!1});for(const y in l.layout)this.setLayoutProperty(y,l.layout[y],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ca(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(l){return l==="visibility"?this.visibility:this._unevaluatedLayout.getValue(l)}setLayoutProperty(l,h,y={}){h!=null&&this._validate(lu,`layers.${this.id}.layout.${l}`,l,h,y)||(l!=="visibility"?this._unevaluatedLayout.setValue(l,h):this.visibility=h)}getPaintProperty(l){return l.endsWith(ic)?this._transitionablePaint.getTransition(l.slice(0,-11)):this._transitionablePaint.getValue(l)}setPaintProperty(l,h,y={}){if(h!=null&&this._validate($h,`layers.${this.id}.paint.${l}`,l,h,y))return!1;if(l.endsWith(ic))return this._transitionablePaint.setTransition(l.slice(0,-11),h||void 0),!1;{const M=this._transitionablePaint._values[l],T=M.property.specification["property-type"]==="cross-faded-data-driven",K=M.value.isDataDriven(),F=M.value;this._transitionablePaint.setValue(l,h),this._handleSpecialPaintPropertyUpdate(l);const W=this._transitionablePaint._values[l].value;return W.isDataDriven()||K||T||this._handleOverridablePaintPropertyUpdate(l,F,W)}}_handleSpecialPaintPropertyUpdate(l){}_handleOverridablePaintPropertyUpdate(l,h,y){return!1}isHidden(l){return!!(this.minzoom&&l<this.minzoom)||!!(this.maxzoom&&l>=this.maxzoom)||this.visibility==="none"}updateTransitions(l){this._transitioningPaint=this._transitionablePaint.transitioned(l,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(l,h){l.getCrossfadeParameters&&(this._crossfadeParameters=l.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(l,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(l,void 0,h)}serialize(){const l={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&&(l.layout=l.layout||{},l.layout.visibility=this.visibility),we(l,(h,y)=>!(h===void 0||y==="layout"&&!Object.keys(h).length||y==="paint"&&!Object.keys(h).length))}_validate(l,h,y,M,T={}){return(!T||T.validate!==!1)&&JA(this,l.call(Hi,{key:h,layerType:this.type,objectKey:y,value:M,styleSpec:mt,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const l in this.paint._values){const h=this.paint.get(l);if(h instanceof ao&&Ad(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const nA={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class hl{constructor(l,h){this._structArray=l,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class $o{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(l,h){return l._trim(),h&&(l.isTransferred=!0,h.push(l.arrayBuffer)),{length:l.length,arrayBuffer:l.arrayBuffer}}static deserialize(l){const h=Object.create(this.prototype);return h.arrayBuffer=l.arrayBuffer,h.length=l.length,h.capacity=l.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(l){this.reserve(l),this.length=l}reserve(l){if(l>this.capacity){this.capacity=Math.max(l,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Qo(c,l=1){let h=0,y=0;return{members:c.map(M=>{const T=nA[M.type].BYTES_PER_ELEMENT,K=h=op(h,Math.max(l,T)),F=M.components||1;return y=Math.max(y,T),h+=T*F,{name:M.name,type:M.type,components:F,offset:K}}),size:op(h,Math.max(y,l)),alignment:l}}function op(c,l){return Math.ceil(c/l)*l}class th extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const M=2*l;return this.int16[M+0]=h,this.int16[M+1]=y,l}}th.prototype.bytesPerElement=4,Qn("StructArrayLayout2i4",th);class rA extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y){const M=this.length;return this.resize(M+1),this.emplace(M,l,h,y)}emplace(l,h,y,M){const T=3*l;return this.int16[T+0]=h,this.int16[T+1]=y,this.int16[T+2]=M,l}}rA.prototype.bytesPerElement=6,Qn("StructArrayLayout3i6",rA);class El extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,M){const T=this.length;return this.resize(T+1),this.emplace(T,l,h,y,M)}emplace(l,h,y,M,T){const K=4*l;return this.int16[K+0]=h,this.int16[K+1]=y,this.int16[K+2]=M,this.int16[K+3]=T,l}}El.prototype.bytesPerElement=8,Qn("StructArrayLayout4i8",El);class ap extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K){const F=this.length;return this.resize(F+1),this.emplace(F,l,h,y,M,T,K)}emplace(l,h,y,M,T,K,F){const W=6*l;return this.int16[W+0]=h,this.int16[W+1]=y,this.int16[W+2]=M,this.int16[W+3]=T,this.int16[W+4]=K,this.int16[W+5]=F,l}}ap.prototype.bytesPerElement=12,Qn("StructArrayLayout2i4i12",ap);class fd extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K){const F=this.length;return this.resize(F+1),this.emplace(F,l,h,y,M,T,K)}emplace(l,h,y,M,T,K,F){const W=4*l,J=8*l;return this.int16[W+0]=h,this.int16[W+1]=y,this.uint8[J+4]=M,this.uint8[J+5]=T,this.uint8[J+6]=K,this.uint8[J+7]=F,l}}fd.prototype.bytesPerElement=8,Qn("StructArrayLayout2i4ub8",fd);class BA extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const M=2*l;return this.float32[M+0]=h,this.float32[M+1]=y,l}}BA.prototype.bytesPerElement=8,Qn("StructArrayLayout2f8",BA);class qh extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K,F,W,J,re){const Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,l,h,y,M,T,K,F,W,J,re)}emplace(l,h,y,M,T,K,F,W,J,re,Ae){const be=10*l;return this.uint16[be+0]=h,this.uint16[be+1]=y,this.uint16[be+2]=M,this.uint16[be+3]=T,this.uint16[be+4]=K,this.uint16[be+5]=F,this.uint16[be+6]=W,this.uint16[be+7]=J,this.uint16[be+8]=re,this.uint16[be+9]=Ae,l}}qh.prototype.bytesPerElement=20,Qn("StructArrayLayout10ui20",qh);class Fe extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K,F,W,J,re,Ae,be){const Be=this.length;return this.resize(Be+1),this.emplace(Be,l,h,y,M,T,K,F,W,J,re,Ae,be)}emplace(l,h,y,M,T,K,F,W,J,re,Ae,be,Be){const De=12*l;return this.int16[De+0]=h,this.int16[De+1]=y,this.int16[De+2]=M,this.int16[De+3]=T,this.uint16[De+4]=K,this.uint16[De+5]=F,this.uint16[De+6]=W,this.uint16[De+7]=J,this.int16[De+8]=re,this.int16[De+9]=Ae,this.int16[De+10]=be,this.int16[De+11]=Be,l}}Fe.prototype.bytesPerElement=24,Qn("StructArrayLayout4i4ui4i24",Fe);class oc extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y){const M=this.length;return this.resize(M+1),this.emplace(M,l,h,y)}emplace(l,h,y,M){const T=3*l;return this.float32[T+0]=h,this.float32[T+1]=y,this.float32[T+2]=M,l}}oc.prototype.bytesPerElement=12,Qn("StructArrayLayout3f12",oc);class us extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.uint32[1*l+0]=h,l}}us.prototype.bytesPerElement=4,Qn("StructArrayLayout1ul4",us);class $i extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K,F,W,J){const re=this.length;return this.resize(re+1),this.emplace(re,l,h,y,M,T,K,F,W,J)}emplace(l,h,y,M,T,K,F,W,J,re){const Ae=10*l,be=5*l;return this.int16[Ae+0]=h,this.int16[Ae+1]=y,this.int16[Ae+2]=M,this.int16[Ae+3]=T,this.int16[Ae+4]=K,this.int16[Ae+5]=F,this.uint32[be+3]=W,this.uint16[Ae+8]=J,this.uint16[Ae+9]=re,l}}$i.prototype.bytesPerElement=20,Qn("StructArrayLayout6i1ul2ui20",$i);class Yr extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K){const F=this.length;return this.resize(F+1),this.emplace(F,l,h,y,M,T,K)}emplace(l,h,y,M,T,K,F){const W=6*l;return this.int16[W+0]=h,this.int16[W+1]=y,this.int16[W+2]=M,this.int16[W+3]=T,this.int16[W+4]=K,this.int16[W+5]=F,l}}Yr.prototype.bytesPerElement=12,Qn("StructArrayLayout2i2i2i12",Yr);class Ca extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T){const K=this.length;return this.resize(K+1),this.emplace(K,l,h,y,M,T)}emplace(l,h,y,M,T,K){const F=4*l,W=8*l;return this.float32[F+0]=h,this.float32[F+1]=y,this.float32[F+2]=M,this.int16[W+6]=T,this.int16[W+7]=K,l}}Ca.prototype.bytesPerElement=16,Qn("StructArrayLayout2f1f2i16",Ca);class ac extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,M){const T=this.length;return this.resize(T+1),this.emplace(T,l,h,y,M)}emplace(l,h,y,M,T){const K=12*l,F=3*l;return this.uint8[K+0]=h,this.uint8[K+1]=y,this.float32[F+1]=M,this.float32[F+2]=T,l}}ac.prototype.bytesPerElement=12,Qn("StructArrayLayout2ub2f12",ac);class pd extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const M=this.length;return this.resize(M+1),this.emplace(M,l,h,y)}emplace(l,h,y,M){const T=3*l;return this.uint16[T+0]=h,this.uint16[T+1]=y,this.uint16[T+2]=M,l}}pd.prototype.bytesPerElement=6,Qn("StructArrayLayout3ui6",pd);class uu extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge,Ze,at){const It=this.length;return this.resize(It+1),this.emplace(It,l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge,Ze,at)}emplace(l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge,Ze,at,It){const ct=24*l,wt=12*l,rn=48*l;return this.int16[ct+0]=h,this.int16[ct+1]=y,this.uint16[ct+2]=M,this.uint16[ct+3]=T,this.uint32[wt+2]=K,this.uint32[wt+3]=F,this.uint32[wt+4]=W,this.uint16[ct+10]=J,this.uint16[ct+11]=re,this.uint16[ct+12]=Ae,this.float32[wt+7]=be,this.float32[wt+8]=Be,this.uint8[rn+36]=De,this.uint8[rn+37]=Ge,this.uint8[rn+38]=Ze,this.uint32[wt+10]=at,this.int16[ct+22]=It,l}}uu.prototype.bytesPerElement=48,Qn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",uu);class md extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge,Ze,at,It,ct,wt,rn,An,zn,br,Xn,xn,mn,ur){const jn=this.length;return this.resize(jn+1),this.emplace(jn,l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge,Ze,at,It,ct,wt,rn,An,zn,br,Xn,xn,mn,ur)}emplace(l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge,Ze,at,It,ct,wt,rn,An,zn,br,Xn,xn,mn,ur,jn){const Sn=32*l,Lr=16*l;return this.int16[Sn+0]=h,this.int16[Sn+1]=y,this.int16[Sn+2]=M,this.int16[Sn+3]=T,this.int16[Sn+4]=K,this.int16[Sn+5]=F,this.int16[Sn+6]=W,this.int16[Sn+7]=J,this.uint16[Sn+8]=re,this.uint16[Sn+9]=Ae,this.uint16[Sn+10]=be,this.uint16[Sn+11]=Be,this.uint16[Sn+12]=De,this.uint16[Sn+13]=Ge,this.uint16[Sn+14]=Ze,this.uint16[Sn+15]=at,this.uint16[Sn+16]=It,this.uint16[Sn+17]=ct,this.uint16[Sn+18]=wt,this.uint16[Sn+19]=rn,this.uint16[Sn+20]=An,this.uint16[Sn+21]=zn,this.uint16[Sn+22]=br,this.uint32[Lr+12]=Xn,this.float32[Lr+13]=xn,this.float32[Lr+14]=mn,this.uint16[Sn+30]=ur,this.uint16[Sn+31]=jn,l}}md.prototype.bytesPerElement=64,Qn("StructArrayLayout8i15ui1ul2f2ui64",md);class sc extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.float32[1*l+0]=h,l}}sc.prototype.bytesPerElement=4,Qn("StructArrayLayout1f4",sc);class sp extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y){const M=this.length;return this.resize(M+1),this.emplace(M,l,h,y)}emplace(l,h,y,M){const T=3*l;return this.uint16[6*l+0]=h,this.float32[T+1]=y,this.float32[T+2]=M,l}}sp.prototype.bytesPerElement=12,Qn("StructArrayLayout1ui2f12",sp);class gd extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const M=this.length;return this.resize(M+1),this.emplace(M,l,h,y)}emplace(l,h,y,M){const T=4*l;return this.uint32[2*l+0]=h,this.uint16[T+2]=y,this.uint16[T+3]=M,l}}gd.prototype.bytesPerElement=8,Qn("StructArrayLayout1ul2ui8",gd);class lc extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const M=2*l;return this.uint16[M+0]=h,this.uint16[M+1]=y,l}}lc.prototype.bytesPerElement=4,Qn("StructArrayLayout2ui4",lc);class Wl extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.uint16[1*l+0]=h,l}}Wl.prototype.bytesPerElement=2,Qn("StructArrayLayout1ui2",Wl);class lp extends $o{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,M){const T=this.length;return this.resize(T+1),this.emplace(T,l,h,y,M)}emplace(l,h,y,M,T){const K=4*l;return this.float32[K+0]=h,this.float32[K+1]=y,this.float32[K+2]=M,this.float32[K+3]=T,l}}lp.prototype.bytesPerElement=16,Qn("StructArrayLayout4f16",lp);class nh extends hl{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new O(this.anchorPointX,this.anchorPointY)}}nh.prototype.size=20;class Vh extends $i{get(l){return new nh(this,l)}}Qn("CollisionBoxArray",Vh);class I extends hl{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(l){this._structArray.uint8[this._pos1+37]=l}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(l){this._structArray.uint8[this._pos1+38]=l}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(l){this._structArray.uint32[this._pos4+10]=l}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}I.prototype.size=48;class u extends uu{get(l){return new I(this,l)}}Qn("PlacedSymbolArray",u);class m extends hl{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(l){this._structArray.uint32[this._pos4+12]=l}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}m.prototype.size=64;class _ extends md{get(l){return new m(this,l)}}Qn("SymbolInstanceArray",_);class w extends sc{getoffsetX(l){return this.float32[1*l+0]}}Qn("GlyphOffsetArray",w);class k extends rA{getx(l){return this.int16[3*l+0]}gety(l){return this.int16[3*l+1]}gettileUnitDistanceFromAnchor(l){return this.int16[3*l+2]}}Qn("SymbolLineVertexArray",k);class R extends hl{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}R.prototype.size=12;class j extends sp{get(l){return new R(this,l)}}Qn("TextAnchorOffsetArray",j);class Y extends hl{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Y.prototype.size=8;class ie extends gd{get(l){return new Y(this,l)}}Qn("FeatureIndexArray",ie);class de extends th{}class me extends th{}class Oe extends th{}class qe extends ap{}class Ye extends fd{}class He extends BA{}class Ne extends qh{}class ht extends Fe{}class Dt extends oc{}class tt extends us{}class xt extends Yr{}class Pt extends ac{}class Ut extends pd{}class Xt extends lc{}const hn=Qo([{name:"a_pos",components:2,type:"Int16"}],4),{members:un}=hn;class pn{constructor(l=[]){this.segments=l}prepareSegment(l,h,y,M){let T=this.segments[this.segments.length-1];return l>pn.MAX_VERTEX_ARRAY_LENGTH&&he(`Max vertices per segment is ${pn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${l}`),(!T||T.vertexLength+l>pn.MAX_VERTEX_ARRAY_LENGTH||T.sortKey!==M)&&(T={vertexOffset:h.length,primitiveOffset:y.length,vertexLength:0,primitiveLength:0},M!==void 0&&(T.sortKey=M),this.segments.push(T)),T}get(){return this.segments}destroy(){for(const l of this.segments)for(const h in l.vaos)l.vaos[h].destroy()}static simpleSegment(l,h,y,M){return new pn([{vertexOffset:l,primitiveOffset:h,vertexLength:y,primitiveLength:M,vaos:{},sortKey:0}])}}function qn(c,l){return 256*(c=pe(Math.floor(c),0,255))+pe(Math.floor(l),0,255)}pn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Qn("SegmentVector",pn);const qr=Qo([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var In={exports:{}},Cr={exports:{}};Cr.exports=function(c,l){var h,y,M,T,K,F,W,J;for(y=c.length-(h=3&c.length),M=l,K=3432918353,F=461845907,J=0;J<y;)W=255&c.charCodeAt(J)|(255&c.charCodeAt(++J))<<8|(255&c.charCodeAt(++J))<<16|(255&c.charCodeAt(++J))<<24,++J,M=27492+(65535&(T=5*(65535&(M=(M^=W=(65535&(W=(W=(65535&W)*K+(((W>>>16)*K&65535)<<16)&4294967295)<<15|W>>>17))*F+(((W>>>16)*F&65535)<<16)&4294967295)<<13|M>>>19))+((5*(M>>>16)&65535)<<16)&4294967295))+((58964+(T>>>16)&65535)<<16);switch(W=0,h){case 3:W^=(255&c.charCodeAt(J+2))<<16;case 2:W^=(255&c.charCodeAt(J+1))<<8;case 1:M^=W=(65535&(W=(W=(65535&(W^=255&c.charCodeAt(J)))*K+(((W>>>16)*K&65535)<<16)&4294967295)<<15|W>>>17))*F+(((W>>>16)*F&65535)<<16)&4294967295}return M^=c.length,M=2246822507*(65535&(M^=M>>>16))+((2246822507*(M>>>16)&65535)<<16)&4294967295,M=3266489909*(65535&(M^=M>>>13))+((3266489909*(M>>>16)&65535)<<16)&4294967295,(M^=M>>>16)>>>0};var hi=Cr.exports,Pi={exports:{}};Pi.exports=function(c,l){for(var h,y=c.length,M=l^y,T=0;y>=4;)h=1540483477*(65535&(h=255&c.charCodeAt(T)|(255&c.charCodeAt(++T))<<8|(255&c.charCodeAt(++T))<<16|(255&c.charCodeAt(++T))<<24))+((1540483477*(h>>>16)&65535)<<16),M=1540483477*(65535&M)+((1540483477*(M>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),y-=4,++T;switch(y){case 3:M^=(255&c.charCodeAt(T+2))<<16;case 2:M^=(255&c.charCodeAt(T+1))<<8;case 1:M=1540483477*(65535&(M^=255&c.charCodeAt(T)))+((1540483477*(M>>>16)&65535)<<16)}return M=1540483477*(65535&(M^=M>>>13))+((1540483477*(M>>>16)&65535)<<16),(M^=M>>>15)>>>0};var Vr=hi,ei=Pi.exports;In.exports=Vr,In.exports.murmur3=Vr,In.exports.murmur2=ei;var Wr=d(In.exports);class Ho{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(l,h,y,M){this.ids.push(Uo(l)),this.positions.push(h,y,M)}getPositions(l){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=Uo(l);let y=0,M=this.ids.length-1;for(;y<M;){const K=y+M>>1;this.ids[K]>=h?M=K:y=K+1}const T=[];for(;this.ids[y]===h;)T.push({index:this.positions[3*y],start:this.positions[3*y+1],end:this.positions[3*y+2]}),y++;return T}static serialize(l,h){const y=new Float64Array(l.ids),M=new Uint32Array(l.positions);return Rs(y,M,0,y.length-1),h&&h.push(y.buffer,M.buffer),{ids:y,positions:M}}static deserialize(l){const h=new Ho;return h.ids=l.ids,h.positions=l.positions,h.indexed=!0,h}}function Uo(c){const l=+c;return!isNaN(l)&&l<=Number.MAX_SAFE_INTEGER?l:Wr(String(c))}function Rs(c,l,h,y){for(;h<y;){const M=c[h+y>>1];let T=h-1,K=y+1;for(;;){do T++;while(c[T]<M);do K--;while(c[K]>M);if(T>=K)break;Da(c,T,K),Da(l,3*T,3*K),Da(l,3*T+1,3*K+1),Da(l,3*T+2,3*K+2)}K-h<y-K?(Rs(c,l,h,K),h=K+1):(Rs(c,l,K+1,y),y=K)}}function Da(c,l,h){const y=c[l];c[l]=c[h],c[h]=y}Qn("FeaturePositionMap",Ho);class mo{constructor(l,h){this.gl=l.gl,this.location=h}}class so extends mo{constructor(l,h){super(l,h),this.current=0}set(l){this.current!==l&&(this.current=l,this.gl.uniform1f(this.location,l))}}class Js extends mo{constructor(l,h){super(l,h),this.current=[0,0,0,0]}set(l){l[0]===this.current[0]&&l[1]===this.current[1]&&l[2]===this.current[2]&&l[3]===this.current[3]||(this.current=l,this.gl.uniform4f(this.location,l[0],l[1],l[2],l[3]))}}class Au extends mo{constructor(l,h){super(l,h),this.current=Ei.transparent}set(l){l.r===this.current.r&&l.g===this.current.g&&l.b===this.current.b&&l.a===this.current.a||(this.current=l,this.gl.uniform4f(this.location,l.r,l.g,l.b,l.a))}}const Ms=new Float32Array(16);function iA(c){return[qn(255*c.r,255*c.g),qn(255*c.b,255*c.a)]}class Gl{constructor(l,h,y){this.value=l,this.uniformNames=h.map(M=>`u_${M}`),this.type=y}setUniform(l,h,y){l.set(y.constantOr(this.value))}getBinding(l,h,y){return this.type==="color"?new Au(l,h):new so(l,h)}}class Ss{constructor(l,h){this.uniformNames=h.map(y=>`u_${y}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(l,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=l.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=l.tlbr}setUniform(l,h,y,M){const T=M==="u_pattern_to"?this.patternTo:M==="u_pattern_from"?this.patternFrom:M==="u_pixel_ratio_to"?this.pixelRatioTo:M==="u_pixel_ratio_from"?this.pixelRatioFrom:null;T&&l.set(T)}getBinding(l,h,y){return y.substr(0,9)==="u_pattern"?new Js(l,h):new so(l,h)}}class zi{constructor(l,h,y,M){this.expression=l,this.type=y,this.maxValue=0,this.paintVertexAttributes=h.map(T=>({name:`a_${T}`,type:"Float32",components:y==="color"?2:1,offset:0})),this.paintVertexArray=new M}populatePaintArray(l,h,y,M,T){const K=this.paintVertexArray.length,F=this.expression.evaluate(new Mo(0),h,{},M,[],T);this.paintVertexArray.resize(l),this._setPaintValue(K,l,F)}updatePaintArray(l,h,y,M){const T=this.expression.evaluate({zoom:0},y,M);this._setPaintValue(l,h,T)}_setPaintValue(l,h,y){if(this.type==="color"){const M=iA(y);for(let T=l;T<h;T++)this.paintVertexArray.emplace(T,M[0],M[1])}else{for(let M=l;M<h;M++)this.paintVertexArray.emplace(M,y);this.maxValue=Math.max(this.maxValue,Math.abs(y))}}upload(l){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=l.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Bi{constructor(l,h,y,M,T,K){this.expression=l,this.uniformNames=h.map(F=>`u_${F}_t`),this.type=y,this.useIntegerZoom=M,this.zoom=T,this.maxValue=0,this.paintVertexAttributes=h.map(F=>({name:`a_${F}`,type:"Float32",components:y==="color"?4:2,offset:0})),this.paintVertexArray=new K}populatePaintArray(l,h,y,M,T){const K=this.expression.evaluate(new Mo(this.zoom),h,{},M,[],T),F=this.expression.evaluate(new Mo(this.zoom+1),h,{},M,[],T),W=this.paintVertexArray.length;this.paintVertexArray.resize(l),this._setPaintValue(W,l,K,F)}updatePaintArray(l,h,y,M){const T=this.expression.evaluate({zoom:this.zoom},y,M),K=this.expression.evaluate({zoom:this.zoom+1},y,M);this._setPaintValue(l,h,T,K)}_setPaintValue(l,h,y,M){if(this.type==="color"){const T=iA(y),K=iA(M);for(let F=l;F<h;F++)this.paintVertexArray.emplace(F,T[0],T[1],K[0],K[1])}else{for(let T=l;T<h;T++)this.paintVertexArray.emplace(T,y,M);this.maxValue=Math.max(this.maxValue,Math.abs(y),Math.abs(M))}}upload(l){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=l.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(l,h){const y=this.useIntegerZoom?Math.floor(h.zoom):h.zoom,M=pe(this.expression.interpolationFactor(y,this.zoom,this.zoom+1),0,1);l.set(M)}getBinding(l,h,y){return new so(l,h)}}class ia{constructor(l,h,y,M,T,K){this.expression=l,this.type=h,this.useIntegerZoom=y,this.zoom=M,this.layerId=K,this.zoomInPaintVertexArray=new T,this.zoomOutPaintVertexArray=new T}populatePaintArray(l,h,y){const M=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(l),this.zoomOutPaintVertexArray.resize(l),this._setPaintValues(M,l,h.patterns&&h.patterns[this.layerId],y)}updatePaintArray(l,h,y,M,T){this._setPaintValues(l,h,y.patterns&&y.patterns[this.layerId],T)}_setPaintValues(l,h,y,M){if(!M||!y)return;const{min:T,mid:K,max:F}=y,W=M[T],J=M[K],re=M[F];if(W&&J&&re)for(let Ae=l;Ae<h;Ae++)this.zoomInPaintVertexArray.emplace(Ae,J.tl[0],J.tl[1],J.br[0],J.br[1],W.tl[0],W.tl[1],W.br[0],W.br[1],J.pixelRatio,W.pixelRatio),this.zoomOutPaintVertexArray.emplace(Ae,J.tl[0],J.tl[1],J.br[0],J.br[1],re.tl[0],re.tl[1],re.br[0],re.br[1],J.pixelRatio,re.pixelRatio)}upload(l){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=l.createVertexBuffer(this.zoomInPaintVertexArray,qr.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=l.createVertexBuffer(this.zoomOutPaintVertexArray,qr.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Uc{constructor(l,h,y){this.binders={},this._buffers=[];const M=[];for(const T in l.paint._values){if(!y(T))continue;const K=l.paint.get(T);if(!(K instanceof ao&&Ad(K.property.specification)))continue;const F=_a(T,l.type),W=K.value,J=K.property.specification.type,re=K.property.useIntegerZoom,Ae=K.property.specification["property-type"],be=Ae==="cross-faded"||Ae==="cross-faded-data-driven";if(W.kind==="constant")this.binders[T]=be?new Ss(W.value,F):new Gl(W.value,F,J),M.push(`/u_${T}`);else if(W.kind==="source"||be){const Be=Es(T,J,"source");this.binders[T]=be?new ia(W,J,re,h,Be,l.id):new zi(W,F,J,Be),M.push(`/a_${T}`)}else{const Be=Es(T,J,"composite");this.binders[T]=new Bi(W,F,J,re,h,Be),M.push(`/z_${T}`)}}this.cacheKey=M.sort().join("")}getMaxValue(l){const h=this.binders[l];return h instanceof zi||h instanceof Bi?h.maxValue:0}populatePaintArrays(l,h,y,M,T){for(const K in this.binders){const F=this.binders[K];(F instanceof zi||F instanceof Bi||F instanceof ia)&&F.populatePaintArray(l,h,y,M,T)}}setConstantPatternPositions(l,h){for(const y in this.binders){const M=this.binders[y];M instanceof Ss&&M.setConstantPatternPositions(l,h)}}updatePaintArrays(l,h,y,M,T){let K=!1;for(const F in l){const W=h.getPositions(F);for(const J of W){const re=y.feature(J.index);for(const Ae in this.binders){const be=this.binders[Ae];if((be instanceof zi||be instanceof Bi||be instanceof ia)&&be.expression.isStateDependent===!0){const Be=M.paint.get(Ae);be.expression=Be.value,be.updatePaintArray(J.start,J.end,re,l[F],T),K=!0}}}}return K}defines(){const l=[];for(const h in this.binders){const y=this.binders[h];(y instanceof Gl||y instanceof Ss)&&l.push(...y.uniformNames.map(M=>`#define HAS_UNIFORM_${M}`))}return l}getBinderAttributes(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof zi||y instanceof Bi)for(let M=0;M<y.paintVertexAttributes.length;M++)l.push(y.paintVertexAttributes[M].name);else if(y instanceof ia)for(let M=0;M<qr.members.length;M++)l.push(qr.members[M].name)}return l}getBinderUniforms(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof Gl||y instanceof Ss||y instanceof Bi)for(const M of y.uniformNames)l.push(M)}return l}getPaintVertexBuffers(){return this._buffers}getUniforms(l,h){const y=[];for(const M in this.binders){const T=this.binders[M];if(T instanceof Gl||T instanceof Ss||T instanceof Bi){for(const K of T.uniformNames)if(h[K]){const F=T.getBinding(l,h[K],K);y.push({name:K,property:M,binding:F})}}}return y}setUniforms(l,h,y,M){for(const{name:T,property:K,binding:F}of h)this.binders[K].setUniform(F,M,y.get(K),T)}updatePaintBuffers(l){this._buffers=[];for(const h in this.binders){const y=this.binders[h];if(l&&y instanceof ia){const M=l.fromScale===2?y.zoomInPaintVertexBuffer:y.zoomOutPaintVertexBuffer;M&&this._buffers.push(M)}else(y instanceof zi||y instanceof Bi)&&y.paintVertexBuffer&&this._buffers.push(y.paintVertexBuffer)}}upload(l){for(const h in this.binders){const y=this.binders[h];(y instanceof zi||y instanceof Bi||y instanceof ia)&&y.upload(l)}this.updatePaintBuffers()}destroy(){for(const l in this.binders){const h=this.binders[l];(h instanceof zi||h instanceof Bi||h instanceof ia)&&h.destroy()}}}class Zo{constructor(l,h,y=()=>!0){this.programConfigurations={};for(const M of l)this.programConfigurations[M.id]=new Uc(M,h,y);this.needsUpload=!1,this._featureMap=new Ho,this._bufferOffset=0}populatePaintArrays(l,h,y,M,T,K){for(const F in this.programConfigurations)this.programConfigurations[F].populatePaintArrays(l,h,M,T,K);h.id!==void 0&&this._featureMap.add(h.id,y,this._bufferOffset,l),this._bufferOffset=l,this.needsUpload=!0}updatePaintArrays(l,h,y,M){for(const T of y)this.needsUpload=this.programConfigurations[T.id].updatePaintArrays(l,this._featureMap,h,T,M)||this.needsUpload}get(l){return this.programConfigurations[l]}upload(l){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(l);this.needsUpload=!1}}destroy(){for(const l in this.programConfigurations)this.programConfigurations[l].destroy()}}function _a(c,l){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[c]||[c.replace(`${l}-`,"").replace(/-/g,"_")]}function Es(c,l,h){const y={color:{source:BA,composite:lp},number:{source:sc,composite:BA}},M=function(T){return{"line-pattern":{source:Ne,composite:Ne},"fill-pattern":{source:Ne,composite:Ne},"fill-extrusion-pattern":{source:Ne,composite:Ne}}[T]}(c);return M&&M[h]||y[l][h]}Qn("ConstantBinder",Gl),Qn("CrossFadedConstantBinder",Ss),Qn("SourceExpressionBinder",zi),Qn("CrossFadedCompositeBinder",ia),Qn("CompositeExpressionBinder",Bi),Qn("ProgramConfiguration",Uc,{omit:["_buffers"]}),Qn("ProgramConfigurationSet",Zo);const Di=8192,uc=Math.pow(2,14)-1,Hh=-uc-1;function cu(c){const l=Di/c.extent,h=c.loadGeometry();for(let y=0;y<h.length;y++){const M=h[y];for(let T=0;T<M.length;T++){const K=M[T],F=Math.round(K.x*l),W=Math.round(K.y*l);K.x=pe(F,Hh,uc),K.y=pe(W,Hh,uc),(F<K.x||F>K.x+1||W<K.y||W>K.y+1)&&he("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function Ac(c,l){return{type:c.type,id:c.id,properties:c.properties,geometry:l?cu(c):[]}}function ku(c,l,h,y,M){c.emplaceBack(2*l+(y+1)/2,2*h+(M+1)/2)}class Zh{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new me,this.indexArray=new Ut,this.segments=new pn,this.programConfigurations=new Zo(l.layers,l.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){const M=this.layers[0],T=[];let K=null,F=!1;M.type==="circle"&&(K=M.layout.get("circle-sort-key"),F=!K.isConstant());for(const{feature:W,id:J,index:re,sourceLayerIndex:Ae}of l){const be=this.layers[0]._featureFilter.needGeometry,Be=Ac(W,be);if(!this.layers[0]._featureFilter.filter(new Mo(this.zoom),Be,y))continue;const De=F?K.evaluate(Be,{},y):void 0,Ge={id:J,properties:W.properties,type:W.type,sourceLayerIndex:Ae,index:re,geometry:be?Be.geometry:cu(W),patterns:{},sortKey:De};T.push(Ge)}F&&T.sort((W,J)=>W.sortKey-J.sortKey);for(const W of T){const{geometry:J,index:re,sourceLayerIndex:Ae}=W,be=l[re].feature;this.addFeature(W,J,re,y),h.featureIndex.insert(be,J,re,Ae,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,un),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(l,h,y,M){for(const T of h)for(const K of T){const F=K.x,W=K.y;if(F<0||F>=Di||W<0||W>=Di)continue;const J=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,l.sortKey),re=J.vertexLength;ku(this.layoutVertexArray,F,W,-1,-1),ku(this.layoutVertexArray,F,W,1,-1),ku(this.layoutVertexArray,F,W,1,1),ku(this.layoutVertexArray,F,W,-1,1),this.indexArray.emplaceBack(re,re+1,re+2),this.indexArray.emplaceBack(re,re+3,re+2),J.vertexLength+=4,J.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,{},M)}}function Tu(c,l){for(let h=0;h<c.length;h++)if(aA(l,c[h]))return!0;for(let h=0;h<l.length;h++)if(aA(c,l[h]))return!0;return!!yd(c,l)}function Xh(c,l,h){return!!aA(c,l)||!!oA(l,c,h)}function IA(c,l){if(c.length===1)return Jh(l,c[0]);for(let h=0;h<l.length;h++){const y=l[h];for(let M=0;M<y.length;M++)if(aA(c,y[M]))return!0}for(let h=0;h<c.length;h++)if(Jh(l,c[h]))return!0;for(let h=0;h<l.length;h++)if(yd(c,l[h]))return!0;return!1}function up(c,l,h){if(c.length>1){if(yd(c,l))return!0;for(let y=0;y<l.length;y++)if(oA(l[y],c,h))return!0}for(let y=0;y<c.length;y++)if(oA(c[y],l,h))return!0;return!1}function yd(c,l){if(c.length===0||l.length===0)return!1;for(let h=0;h<c.length-1;h++){const y=c[h],M=c[h+1];for(let T=0;T<l.length-1;T++)if(Ap(y,M,l[T],l[T+1]))return!0}return!1}function Ap(c,l,h,y){return $e(c,h,y)!==$e(l,h,y)&&$e(c,l,h)!==$e(c,l,y)}function oA(c,l,h){const y=h*h;if(l.length===1)return c.distSqr(l[0])<y;for(let M=1;M<l.length;M++)if(vd(c,l[M-1],l[M])<y)return!0;return!1}function vd(c,l,h){const y=l.distSqr(h);if(y===0)return c.distSqr(l);const M=((c.x-l.x)*(h.x-l.x)+(c.y-l.y)*(h.y-l.y))/y;return c.distSqr(M<0?l:M>1?h:h.sub(l)._mult(M)._add(l))}function Jh(c,l){let h,y,M,T=!1;for(let K=0;K<c.length;K++){h=c[K];for(let F=0,W=h.length-1;F<h.length;W=F++)y=h[F],M=h[W],y.y>l.y!=M.y>l.y&&l.x<(M.x-y.x)*(l.y-y.y)/(M.y-y.y)+y.x&&(T=!T)}return T}function aA(c,l){let h=!1;for(let y=0,M=c.length-1;y<c.length;M=y++){const T=c[y],K=c[M];T.y>l.y!=K.y>l.y&&l.x<(K.x-T.x)*(l.y-T.y)/(K.y-T.y)+T.x&&(h=!h)}return h}function _0(c,l,h){const y=h[0],M=h[2];if(c.x<y.x&&l.x<y.x||c.x>M.x&&l.x>M.x||c.y<y.y&&l.y<y.y||c.y>M.y&&l.y>M.y)return!1;const T=$e(c,l,h[0]);return T!==$e(c,l,h[1])||T!==$e(c,l,h[2])||T!==$e(c,l,h[3])}function ef(c,l,h){const y=l.paint.get(c).value;return y.kind==="constant"?y.value:h.programConfigurations.get(l.id).getMaxValue(c)}function tf(c){return Math.sqrt(c[0]*c[0]+c[1]*c[1])}function du(c,l,h,y,M){if(!l[0]&&!l[1])return c;const T=O.convert(l)._mult(M);h==="viewport"&&T._rotate(-y);const K=[];for(let F=0;F<c.length;F++)K.push(c[F].sub(T));return K}let rh,ih;Qn("CircleBucket",Zh,{omit:["layers"]});var eg={get paint(){return ih=ih||new da({"circle-radius":new Ir(mt.paint_circle["circle-radius"]),"circle-color":new Ir(mt.paint_circle["circle-color"]),"circle-blur":new Ir(mt.paint_circle["circle-blur"]),"circle-opacity":new Ir(mt.paint_circle["circle-opacity"]),"circle-translate":new xr(mt.paint_circle["circle-translate"]),"circle-translate-anchor":new xr(mt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new xr(mt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new xr(mt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ir(mt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ir(mt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ir(mt.paint_circle["circle-stroke-opacity"])})},get layout(){return rh=rh||new da({"circle-sort-key":new Ir(mt.layout_circle["circle-sort-key"])})}},fl=1e-6,oh=typeof Float32Array<"u"?Float32Array:Array;function b0(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}function nm(c,l,h){var y=l[0],M=l[1],T=l[2],K=l[3],F=l[4],W=l[5],J=l[6],re=l[7],Ae=l[8],be=l[9],Be=l[10],De=l[11],Ge=l[12],Ze=l[13],at=l[14],It=l[15],ct=h[0],wt=h[1],rn=h[2],An=h[3];return c[0]=ct*y+wt*F+rn*Ae+An*Ge,c[1]=ct*M+wt*W+rn*be+An*Ze,c[2]=ct*T+wt*J+rn*Be+An*at,c[3]=ct*K+wt*re+rn*De+An*It,c[4]=(ct=h[4])*y+(wt=h[5])*F+(rn=h[6])*Ae+(An=h[7])*Ge,c[5]=ct*M+wt*W+rn*be+An*Ze,c[6]=ct*T+wt*J+rn*Be+An*at,c[7]=ct*K+wt*re+rn*De+An*It,c[8]=(ct=h[8])*y+(wt=h[9])*F+(rn=h[10])*Ae+(An=h[11])*Ge,c[9]=ct*M+wt*W+rn*be+An*Ze,c[10]=ct*T+wt*J+rn*Be+An*at,c[11]=ct*K+wt*re+rn*De+An*It,c[12]=(ct=h[12])*y+(wt=h[13])*F+(rn=h[14])*Ae+(An=h[15])*Ge,c[13]=ct*M+wt*W+rn*be+An*Ze,c[14]=ct*T+wt*J+rn*Be+An*at,c[15]=ct*K+wt*re+rn*De+An*It,c}Math.hypot||(Math.hypot=function(){for(var c=0,l=arguments.length;l--;)c+=arguments[l]*arguments[l];return Math.sqrt(c)});var Os,rm=nm;function im(c,l,h){var y=l[0],M=l[1],T=l[2],K=l[3];return c[0]=h[0]*y+h[4]*M+h[8]*T+h[12]*K,c[1]=h[1]*y+h[5]*M+h[9]*T+h[13]*K,c[2]=h[2]*y+h[6]*M+h[10]*T+h[14]*K,c[3]=h[3]*y+h[7]*M+h[11]*T+h[15]*K,c}Os=new oh(4),oh!=Float32Array&&(Os[0]=0,Os[1]=0,Os[2]=0,Os[3]=0);class x0 extends ka{constructor(l){super(l,eg)}createBucket(l){return new Zh(l)}queryRadius(l){const h=l;return ef("circle-radius",this,h)+ef("circle-stroke-width",this,h)+tf(this.paint.get("circle-translate"))}queryIntersectsFeature(l,h,y,M,T,K,F,W){const J=du(l,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),K.angle,F),re=this.paint.get("circle-radius").evaluate(h,y)+this.paint.get("circle-stroke-width").evaluate(h,y),Ae=this.paint.get("circle-pitch-alignment")==="map",be=Ae?J:function(De,Ge){return De.map(Ze=>Qi(Ze,Ge))}(J,W),Be=Ae?re*F:re;for(const De of M)for(const Ge of De){const Ze=Ae?Ge:Qi(Ge,W);let at=Be;const It=im([],[Ge.x,Ge.y,0,1],W);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?at*=It[3]/K.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(at*=K.cameraToCenterDistance/It[3]),Xh(be,Ze,at))return!0}return!1}}function Qi(c,l){const h=im([],[c.x,c.y,0,1],l);return new O(h[0]/h[3],h[1]/h[3])}class w0 extends Zh{}let M0;Qn("HeatmapBucket",w0,{omit:["layers"]});var nf={get paint(){return M0=M0||new da({"heatmap-radius":new Ir(mt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ir(mt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xr(mt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new rc(mt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xr(mt.paint_heatmap["heatmap-opacity"])})}};function om(c,{width:l,height:h},y,M){if(M){if(M instanceof Uint8ClampedArray)M=new Uint8Array(M.buffer);else if(M.length!==l*h*y)throw new RangeError(`mismatched image size. expected: ${M.length} but got: ${l*h*y}`)}else M=new Uint8Array(l*h*y);return c.width=l,c.height=h,c.data=M,c}function tg(c,{width:l,height:h},y){if(l===c.width&&h===c.height)return;const M=om({},{width:l,height:h},y);S0(c,M,{x:0,y:0},{x:0,y:0},{width:Math.min(c.width,l),height:Math.min(c.height,h)},y),c.width=l,c.height=h,c.data=M.data}function S0(c,l,h,y,M,T){if(M.width===0||M.height===0)return l;if(M.width>c.width||M.height>c.height||h.x>c.width-M.width||h.y>c.height-M.height)throw new RangeError("out of range source coordinates for image copy");if(M.width>l.width||M.height>l.height||y.x>l.width-M.width||y.y>l.height-M.height)throw new RangeError("out of range destination coordinates for image copy");const K=c.data,F=l.data;if(K===F)throw new Error("srcData equals dstData, so image is already copied");for(let W=0;W<M.height;W++){const J=((h.y+W)*c.width+h.x)*T,re=((y.y+W)*l.width+y.x)*T;for(let Ae=0;Ae<M.width*T;Ae++)F[re+Ae]=K[J+Ae]}return l}class La{constructor(l,h){om(this,l,1,h)}resize(l){tg(this,l,1)}clone(){return new La({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,M,T){S0(l,h,y,M,T,1)}}class pl{constructor(l,h){om(this,l,4,h)}resize(l){tg(this,l,4)}replace(l,h){h?this.data.set(l):this.data=l instanceof Uint8ClampedArray?new Uint8Array(l.buffer):l}clone(){return new pl({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,M,T){S0(l,h,y,M,T,4)}}function Cd(c){const l={},h=c.resolution||256,y=c.clips?c.clips.length:1,M=c.image||new pl({width:h,height:y});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const T=(K,F,W)=>{l[c.evaluationKey]=W;const J=c.expression.evaluate(l);M.data[K+F+0]=Math.floor(255*J.r/J.a),M.data[K+F+1]=Math.floor(255*J.g/J.a),M.data[K+F+2]=Math.floor(255*J.b/J.a),M.data[K+F+3]=Math.floor(255*J.a)};if(c.clips)for(let K=0,F=0;K<y;++K,F+=4*h)for(let W=0,J=0;W<h;W++,J+=4){const re=W/(h-1),{start:Ae,end:be}=c.clips[K];T(F,J,Ae*(1-re)+be*re)}else for(let K=0,F=0;K<h;K++,F+=4)T(0,F,K/(h-1));return M}Qn("AlphaImage",La),Qn("RGBAImage",pl);class ah extends ka{createBucket(l){return new w0(l)}constructor(l){super(l,nf),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(l){l==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Cd({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let kA;var ng={get paint(){return kA=kA||new da({"hillshade-illumination-direction":new xr(mt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new xr(mt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new xr(mt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new xr(mt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new xr(mt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new xr(mt.paint_hillshade["hillshade-accent-color"])})}};class Ku extends ka{constructor(l){super(l,ng)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const Pu=Qo([{name:"a_pos",components:2,type:"Int16"}],4),{members:am}=Pu;var cp={exports:{}};function _d(c,l,h){h=h||2;var y,M,T,K,F,W,J,re=l&&l.length,Ae=re?l[0]*h:c.length,be=rf(c,0,Ae,h,!0),Be=[];if(!be||be.next===be.prev)return Be;if(re&&(be=function(Ge,Ze,at,It){var ct,wt,rn,An=[];for(ct=0,wt=Ze.length;ct<wt;ct++)(rn=rf(Ge,Ze[ct]*It,ct<wt-1?Ze[ct+1]*It:Ge.length,It,!1))===rn.next&&(rn.steiner=!0),An.push(Qv(rn));for(An.sort(Rc),ct=0;ct<An.length;ct++)at=rg(An[ct],at);return at}(c,l,be,h)),c.length>80*h){y=T=c[0],M=K=c[1];for(var De=h;De<Ae;De+=h)(F=c[De])<y&&(y=F),(W=c[De+1])<M&&(M=W),F>T&&(T=F),W>K&&(K=W);J=(J=Math.max(T-y,K-M))!==0?32767/J:0}return bd(be,Be,h,y,M,J,0),Be}function rf(c,l,h,y,M){var T,K;if(M===lA(c,l,h,y)>0)for(T=l;T<h;T+=y)K=O0(T,c[T],c[T+1],K);else for(T=h-y;T>=l;T-=y)K=O0(T,c[T],c[T+1],K);return K&&af(K,K.next)&&(mp(K),K=K.next),K}function hu(c,l){if(!c)return c;l||(l=c);var h,y=c;do if(h=!1,y.steiner||!af(y,y.next)&&ba(y.prev,y,y.next)!==0)y=y.next;else{if(mp(y),(y=l=y.prev)===y.next)break;h=!0}while(h||y!==l);return l}function bd(c,l,h,y,M,T,K){if(c){!K&&T&&function(re,Ae,be,Be){var De=re;do De.z===0&&(De.z=wd(De.x,De.y,Ae,be,Be)),De.prevZ=De.prev,De.nextZ=De.next,De=De.next;while(De!==re);De.prevZ.nextZ=null,De.prevZ=null,function(Ge){var Ze,at,It,ct,wt,rn,An,zn,br=1;do{for(at=Ge,Ge=null,wt=null,rn=0;at;){for(rn++,It=at,An=0,Ze=0;Ze<br&&(An++,It=It.nextZ);Ze++);for(zn=br;An>0||zn>0&&It;)An!==0&&(zn===0||!It||at.z<=It.z)?(ct=at,at=at.nextZ,An--):(ct=It,It=It.nextZ,zn--),wt?wt.nextZ=ct:Ge=ct,ct.prevZ=wt,wt=ct;at=It}wt.nextZ=null,br*=2}while(rn>1)}(De)}(c,y,M,T);for(var F,W,J=c;c.prev!==c.next;)if(F=c.prev,W=c.next,T?hp(c,y,M,T):dp(c))l.push(F.i/h|0),l.push(c.i/h|0),l.push(W.i/h|0),mp(c),c=W.next,J=W.next;else if((c=W)===J){K?K===1?bd(c=xd(hu(c),l,h),l,h,y,M,T,2):K===2&&fp(c,l,h,y,M,T):bd(hu(c),l,h,y,M,T,1);break}}}function dp(c){var l=c.prev,h=c,y=c.next;if(ba(l,h,y)>=0)return!1;for(var M=l.x,T=h.x,K=y.x,F=l.y,W=h.y,J=y.y,re=M<T?M<K?M:K:T<K?T:K,Ae=F<W?F<J?F:J:W<J?W:J,be=M>T?M>K?M:K:T>K?T:K,Be=F>W?F>J?F:J:W>J?W:J,De=y.next;De!==l;){if(De.x>=re&&De.x<=be&&De.y>=Ae&&De.y<=Be&&of(M,F,T,W,K,J,De.x,De.y)&&ba(De.prev,De,De.next)>=0)return!1;De=De.next}return!0}function hp(c,l,h,y){var M=c.prev,T=c,K=c.next;if(ba(M,T,K)>=0)return!1;for(var F=M.x,W=T.x,J=K.x,re=M.y,Ae=T.y,be=K.y,Be=F<W?F<J?F:J:W<J?W:J,De=re<Ae?re<be?re:be:Ae<be?Ae:be,Ge=F>W?F>J?F:J:W>J?W:J,Ze=re>Ae?re>be?re:be:Ae>be?Ae:be,at=wd(Be,De,l,h,y),It=wd(Ge,Ze,l,h,y),ct=c.prevZ,wt=c.nextZ;ct&&ct.z>=at&&wt&&wt.z<=It;){if(ct.x>=Be&&ct.x<=Ge&&ct.y>=De&&ct.y<=Ze&&ct!==M&&ct!==K&&of(F,re,W,Ae,J,be,ct.x,ct.y)&&ba(ct.prev,ct,ct.next)>=0||(ct=ct.prevZ,wt.x>=Be&&wt.x<=Ge&&wt.y>=De&&wt.y<=Ze&&wt!==M&&wt!==K&&of(F,re,W,Ae,J,be,wt.x,wt.y)&&ba(wt.prev,wt,wt.next)>=0))return!1;wt=wt.nextZ}for(;ct&&ct.z>=at;){if(ct.x>=Be&&ct.x<=Ge&&ct.y>=De&&ct.y<=Ze&&ct!==M&&ct!==K&&of(F,re,W,Ae,J,be,ct.x,ct.y)&&ba(ct.prev,ct,ct.next)>=0)return!1;ct=ct.prevZ}for(;wt&&wt.z<=It;){if(wt.x>=Be&&wt.x<=Ge&&wt.y>=De&&wt.y<=Ze&&wt!==M&&wt!==K&&of(F,re,W,Ae,J,be,wt.x,wt.y)&&ba(wt.prev,wt,wt.next)>=0)return!1;wt=wt.nextZ}return!0}function xd(c,l,h){var y=c;do{var M=y.prev,T=y.next.next;!af(M,T)&&ig(M,y,y.next,T)&&el(M,T)&&el(T,M)&&(l.push(M.i/h|0),l.push(y.i/h|0),l.push(T.i/h|0),mp(y),mp(y.next),y=c=T),y=y.next}while(y!==c);return hu(y)}function fp(c,l,h,y,M,T){var K=c;do{for(var F=K.next.next;F!==K.prev;){if(K.i!==F.i&&pp(K,F)){var W=sA(K,F);return K=hu(K,K.next),W=hu(W,W.next),bd(K,l,h,y,M,T,0),void bd(W,l,h,y,M,T,0)}F=F.next}K=K.next}while(K!==c)}function Rc(c,l){return c.x-l.x}function rg(c,l){var h=function(M,T){var K,F=T,W=M.x,J=M.y,re=-1/0;do{if(J<=F.y&&J>=F.next.y&&F.next.y!==F.y){var Ae=F.x+(J-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(Ae<=W&&Ae>re&&(re=Ae,K=F.x<F.next.x?F:F.next,Ae===W))return K}F=F.next}while(F!==T);if(!K)return null;var be,Be=K,De=K.x,Ge=K.y,Ze=1/0;F=K;do W>=F.x&&F.x>=De&&W!==F.x&&of(J<Ge?W:re,J,De,Ge,J<Ge?re:W,J,F.x,F.y)&&(be=Math.abs(J-F.y)/(W-F.x),el(F,M)&&(be<Ze||be===Ze&&(F.x>K.x||F.x===K.x&&E0(K,F)))&&(K=F,Ze=be)),F=F.next;while(F!==Be);return K}(c,l);if(!h)return l;var y=sA(h,c);return hu(y,y.next),hu(h,h.next)}function E0(c,l){return ba(c.prev,c,l.prev)<0&&ba(l.next,c,c.next)<0}function wd(c,l,h,y,M){return(c=1431655765&((c=858993459&((c=252645135&((c=16711935&((c=(c-h)*M|0)|c<<8))|c<<4))|c<<2))|c<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=(l-y)*M|0)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function Qv(c){var l=c,h=c;do(l.x<h.x||l.x===h.x&&l.y<h.y)&&(h=l),l=l.next;while(l!==c);return h}function of(c,l,h,y,M,T,K,F){return(M-K)*(l-F)>=(c-K)*(T-F)&&(c-K)*(y-F)>=(h-K)*(l-F)&&(h-K)*(T-F)>=(M-K)*(y-F)}function pp(c,l){return c.next.i!==l.i&&c.prev.i!==l.i&&!function(h,y){var M=h;do{if(M.i!==h.i&&M.next.i!==h.i&&M.i!==y.i&&M.next.i!==y.i&&ig(M,M.next,h,y))return!0;M=M.next}while(M!==h);return!1}(c,l)&&(el(c,l)&&el(l,c)&&function(h,y){var M=h,T=!1,K=(h.x+y.x)/2,F=(h.y+y.y)/2;do M.y>F!=M.next.y>F&&M.next.y!==M.y&&K<(M.next.x-M.x)*(F-M.y)/(M.next.y-M.y)+M.x&&(T=!T),M=M.next;while(M!==h);return T}(c,l)&&(ba(c.prev,c,l.prev)||ba(c,l.prev,l))||af(c,l)&&ba(c.prev,c,c.next)>0&&ba(l.prev,l,l.next)>0)}function ba(c,l,h){return(l.y-c.y)*(h.x-l.x)-(l.x-c.x)*(h.y-l.y)}function af(c,l){return c.x===l.x&&c.y===l.y}function ig(c,l,h,y){var M=sf(ba(c,l,h)),T=sf(ba(c,l,y)),K=sf(ba(h,y,c)),F=sf(ba(h,y,l));return M!==T&&K!==F||!(M!==0||!sh(c,h,l))||!(T!==0||!sh(c,y,l))||!(K!==0||!sh(h,c,y))||!(F!==0||!sh(h,l,y))}function sh(c,l,h){return l.x<=Math.max(c.x,h.x)&&l.x>=Math.min(c.x,h.x)&&l.y<=Math.max(c.y,h.y)&&l.y>=Math.min(c.y,h.y)}function sf(c){return c>0?1:c<0?-1:0}function el(c,l){return ba(c.prev,c,c.next)<0?ba(c,l,c.next)>=0&&ba(c,c.prev,l)>=0:ba(c,l,c.prev)<0||ba(c,c.next,l)<0}function sA(c,l){var h=new Md(c.i,c.x,c.y),y=new Md(l.i,l.x,l.y),M=c.next,T=l.prev;return c.next=l,l.prev=c,h.next=M,M.prev=h,y.next=h,h.prev=y,T.next=y,y.prev=T,y}function O0(c,l,h,y){var M=new Md(c,l,h);return y?(M.next=y.next,M.prev=y,y.next.prev=M,y.next=M):(M.prev=M,M.next=M),M}function mp(c){c.next.prev=c.prev,c.prev.next=c.next,c.prevZ&&(c.prevZ.nextZ=c.nextZ),c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function Md(c,l,h){this.i=c,this.x=l,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function lA(c,l,h,y){for(var M=0,T=l,K=h-y;T<h;T+=y)M+=(c[K]-c[T])*(c[T+1]+c[K+1]),K=T;return M}cp.exports=_d,cp.exports.default=_d,_d.deviation=function(c,l,h,y){var M=l&&l.length,T=Math.abs(lA(c,0,M?l[0]*h:c.length,h));if(M)for(var K=0,F=l.length;K<F;K++)T-=Math.abs(lA(c,l[K]*h,K<F-1?l[K+1]*h:c.length,h));var W=0;for(K=0;K<y.length;K+=3){var J=y[K]*h,re=y[K+1]*h,Ae=y[K+2]*h;W+=Math.abs((c[J]-c[Ae])*(c[re+1]-c[J+1])-(c[J]-c[re])*(c[Ae+1]-c[J+1]))}return T===0&&W===0?0:Math.abs((W-T)/T)},_d.flatten=function(c){for(var l=c[0][0].length,h={vertices:[],holes:[],dimensions:l},y=0,M=0;M<c.length;M++){for(var T=0;T<c[M].length;T++)for(var K=0;K<l;K++)h.vertices.push(c[M][T][K]);M>0&&h.holes.push(y+=c[M-1].length)}return h};var lh=d(cp.exports);function og(c,l,h,y,M){B0(c,l,h||0,y||c.length-1,M||uf)}function B0(c,l,h,y,M){for(;y>h;){if(y-h>600){var T=y-h+1,K=l-h+1,F=Math.log(T),W=.5*Math.exp(2*F/3),J=.5*Math.sqrt(F*W*(T-W)/T)*(K-T/2<0?-1:1);B0(c,l,Math.max(h,Math.floor(l-K*W/T+J)),Math.min(y,Math.floor(l+(T-K)*W/T+J)),M)}var re=c[l],Ae=h,be=y;for(lf(c,h,l),M(c[y],re)>0&&lf(c,h,y);Ae<be;){for(lf(c,Ae,be),Ae++,be--;M(c[Ae],re)<0;)Ae++;for(;M(c[be],re)>0;)be--}M(c[h],re)===0?lf(c,h,be):lf(c,++be,y),be<=l&&(h=be+1),l<=be&&(y=be-1)}}function lf(c,l,h){var y=c[l];c[l]=c[h],c[h]=y}function uf(c,l){return c<l?-1:c>l?1:0}function uh(c,l){const h=c.length;if(h<=1)return[c];const y=[];let M,T;for(let K=0;K<h;K++){const F=ye(c[K]);F!==0&&(c[K].area=Math.abs(F),T===void 0&&(T=F<0),T===F<0?(M&&y.push(M),M=[c[K]]):M.push(c[K]))}if(M&&y.push(M),l>1)for(let K=0;K<y.length;K++)y[K].length<=l||(og(y[K],l,1,y[K].length-1,Yv),y[K]=y[K].slice(0,l));return y}function Yv(c,l){return l.area-c.area}function gp(c,l,h){const y=h.patternDependencies;let M=!1;for(const T of l){const K=T.paint.get(`${c}-pattern`);K.isConstant()||(M=!0);const F=K.constantOr(null);F&&(M=!0,y[F.to]=!0,y[F.from]=!0)}return M}function sm(c,l,h,y,M){const T=M.patternDependencies;for(const K of l){const F=K.paint.get(`${c}-pattern`).value;if(F.kind!=="constant"){let W=F.evaluate({zoom:y-1},h,{},M.availableImages),J=F.evaluate({zoom:y},h,{},M.availableImages),re=F.evaluate({zoom:y+1},h,{},M.availableImages);W=W&&W.name?W.name:W,J=J&&J.name?J.name:J,re=re&&re.name?re.name:re,T[W]=!0,T[J]=!0,T[re]=!0,h.patterns[K.id]={min:W,mid:J,max:re}}}return h}class Af{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Oe,this.indexArray=new Ut,this.indexArray2=new Xt,this.programConfigurations=new Zo(l.layers,l.zoom),this.segments=new pn,this.segments2=new pn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=gp("fill",this.layers,h);const M=this.layers[0].layout.get("fill-sort-key"),T=!M.isConstant(),K=[];for(const{feature:F,id:W,index:J,sourceLayerIndex:re}of l){const Ae=this.layers[0]._featureFilter.needGeometry,be=Ac(F,Ae);if(!this.layers[0]._featureFilter.filter(new Mo(this.zoom),be,y))continue;const Be=T?M.evaluate(be,{},y,h.availableImages):void 0,De={id:W,properties:F.properties,type:F.type,sourceLayerIndex:re,index:J,geometry:Ae?be.geometry:cu(F),patterns:{},sortKey:Be};K.push(De)}T&&K.sort((F,W)=>F.sortKey-W.sortKey);for(const F of K){const{geometry:W,index:J,sourceLayerIndex:re}=F;if(this.hasPattern){const Ae=sm("fill",this.layers,F,this.zoom,h);this.patternFeatures.push(Ae)}else this.addFeature(F,W,J,y,{});h.featureIndex.insert(l[J].feature,W,J,re,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const M of this.patternFeatures)this.addFeature(M,M.geometry,M.index,h,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,am),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.indexBuffer2=l.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(l,h,y,M,T){for(const K of uh(h,500)){let F=0;for(const Be of K)F+=Be.length;const W=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray),J=W.vertexLength,re=[],Ae=[];for(const Be of K){if(Be.length===0)continue;Be!==K[0]&&Ae.push(re.length/2);const De=this.segments2.prepareSegment(Be.length,this.layoutVertexArray,this.indexArray2),Ge=De.vertexLength;this.layoutVertexArray.emplaceBack(Be[0].x,Be[0].y),this.indexArray2.emplaceBack(Ge+Be.length-1,Ge),re.push(Be[0].x),re.push(Be[0].y);for(let Ze=1;Ze<Be.length;Ze++)this.layoutVertexArray.emplaceBack(Be[Ze].x,Be[Ze].y),this.indexArray2.emplaceBack(Ge+Ze-1,Ge+Ze),re.push(Be[Ze].x),re.push(Be[Ze].y);De.vertexLength+=Be.length,De.primitiveLength+=Be.length}const be=lh(re,Ae);for(let Be=0;Be<be.length;Be+=3)this.indexArray.emplaceBack(J+be[Be],J+be[Be+1],J+be[Be+2]);W.vertexLength+=F,W.primitiveLength+=be.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,T,M)}}let lm,Ah;Qn("FillBucket",Af,{omit:["layers","patternFeatures"]});var um={get paint(){return Ah=Ah||new da({"fill-antialias":new xr(mt.paint_fill["fill-antialias"]),"fill-opacity":new Ir(mt.paint_fill["fill-opacity"]),"fill-color":new Ir(mt.paint_fill["fill-color"]),"fill-outline-color":new Ir(mt.paint_fill["fill-outline-color"]),"fill-translate":new xr(mt.paint_fill["fill-translate"]),"fill-translate-anchor":new xr(mt.paint_fill["fill-translate-anchor"]),"fill-pattern":new OA(mt.paint_fill["fill-pattern"])})},get layout(){return lm=lm||new da({"fill-sort-key":new Ir(mt.layout_fill["fill-sort-key"])})}};class Am extends ka{constructor(l){super(l,um)}recalculate(l,h){super.recalculate(l,h);const y=this.paint._values["fill-outline-color"];y.value.kind==="constant"&&y.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(l){return new Af(l)}queryRadius(){return tf(this.paint.get("fill-translate"))}queryIntersectsFeature(l,h,y,M,T,K,F){return IA(du(l,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),K.angle,F),M)}isTileClipped(){return!0}}const ag=Qo([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ch=Qo([{name:"a_centroid",components:2,type:"Int16"}],4),{members:yp}=ag;var uA={},I0=f,sg=dh;function dh(c,l,h,y,M){this.properties={},this.extent=h,this.type=0,this._pbf=c,this._geometry=-1,this._keys=y,this._values=M,c.readFields(_o,this,l)}function _o(c,l,h){c==1?l.id=h.readVarint():c==2?function(y,M){for(var T=y.readVarint()+y.pos;y.pos<T;){var K=M._keys[y.readVarint()],F=M._values[y.readVarint()];M.properties[K]=F}}(h,l):c==3?l.type=h.readVarint():c==4&&(l._geometry=h.pos)}function lg(c){for(var l,h,y=0,M=0,T=c.length,K=T-1;M<T;K=M++)y+=((h=c[K]).x-(l=c[M]).x)*(l.y+h.y);return y}dh.types=["Unknown","Point","LineString","Polygon"],dh.prototype.loadGeometry=function(){var c=this._pbf;c.pos=this._geometry;for(var l,h=c.readVarint()+c.pos,y=1,M=0,T=0,K=0,F=[];c.pos<h;){if(M<=0){var W=c.readVarint();y=7&W,M=W>>3}if(M--,y===1||y===2)T+=c.readSVarint(),K+=c.readSVarint(),y===1&&(l&&F.push(l),l=[]),l.push(new I0(T,K));else{if(y!==7)throw new Error("unknown command "+y);l&&l.push(l[0].clone())}}return l&&F.push(l),F},dh.prototype.bbox=function(){var c=this._pbf;c.pos=this._geometry;for(var l=c.readVarint()+c.pos,h=1,y=0,M=0,T=0,K=1/0,F=-1/0,W=1/0,J=-1/0;c.pos<l;){if(y<=0){var re=c.readVarint();h=7&re,y=re>>3}if(y--,h===1||h===2)(M+=c.readSVarint())<K&&(K=M),M>F&&(F=M),(T+=c.readSVarint())<W&&(W=T),T>J&&(J=T);else if(h!==7)throw new Error("unknown command "+h)}return[K,W,F,J]},dh.prototype.toGeoJSON=function(c,l,h){var y,M,T=this.extent*Math.pow(2,h),K=this.extent*c,F=this.extent*l,W=this.loadGeometry(),J=dh.types[this.type];function re(Be){for(var De=0;De<Be.length;De++){var Ge=Be[De];Be[De]=[360*(Ge.x+K)/T-180,360/Math.PI*Math.atan(Math.exp((180-360*(Ge.y+F)/T)*Math.PI/180))-90]}}switch(this.type){case 1:var Ae=[];for(y=0;y<W.length;y++)Ae[y]=W[y][0];re(W=Ae);break;case 2:for(y=0;y<W.length;y++)re(W[y]);break;case 3:for(W=function(Be){var De=Be.length;if(De<=1)return[Be];for(var Ge,Ze,at=[],It=0;It<De;It++){var ct=lg(Be[It]);ct!==0&&(Ze===void 0&&(Ze=ct<0),Ze===ct<0?(Ge&&at.push(Ge),Ge=[Be[It]]):Ge.push(Be[It]))}return Ge&&at.push(Ge),at}(W),y=0;y<W.length;y++)for(M=0;M<W[y].length;M++)re(W[y][M])}W.length===1?W=W[0]:J="Multi"+J;var be={type:"Feature",geometry:{type:J,coordinates:W},properties:this.properties};return"id"in this&&(be.id=this.id),be};var cm=sg,cf=Du;function Du(c,l){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=c,this._keys=[],this._values=[],this._features=[],c.readFields(dm,this,l),this.length=this._features.length}function dm(c,l,h){c===15?l.version=h.readVarint():c===1?l.name=h.readString():c===5?l.extent=h.readVarint():c===2?l._features.push(h.pos):c===3?l._keys.push(h.readString()):c===4&&l._values.push(function(y){for(var M=null,T=y.readVarint()+y.pos;y.pos<T;){var K=y.readVarint()>>3;M=K===1?y.readString():K===2?y.readFloat():K===3?y.readDouble():K===4?y.readVarint64():K===5?y.readVarint():K===6?y.readSVarint():K===7?y.readBoolean():null}return M}(h))}Du.prototype.feature=function(c){if(c<0||c>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[c];var l=this._pbf.readVarint()+this._pbf.pos;return new cm(this._pbf,l,this.extent,this._keys,this._values)};var k0=cf;function cc(c,l,h){if(c===3){var y=new k0(h,h.readVarint()+h.pos);y.length&&(l[y.name]=y)}}uA.VectorTile=function(c,l){this.layers=c.readFields(cc,{},l)},uA.VectorTileFeature=sg,uA.VectorTileLayer=cf;const hm=uA.VectorTileFeature.types,df=Math.pow(2,13);function zc(c,l,h,y,M,T,K,F){c.emplaceBack(l,h,2*Math.floor(y*df)+K,M*df*2,T*df*2,Math.round(F))}class hh{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new qe,this.centroidVertexArray=new de,this.indexArray=new Ut,this.programConfigurations=new Zo(l.layers,l.zoom),this.segments=new pn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.features=[],this.hasPattern=gp("fill-extrusion",this.layers,h);for(const{feature:M,id:T,index:K,sourceLayerIndex:F}of l){const W=this.layers[0]._featureFilter.needGeometry,J=Ac(M,W);if(!this.layers[0]._featureFilter.filter(new Mo(this.zoom),J,y))continue;const re={id:T,sourceLayerIndex:F,index:K,geometry:W?J.geometry:cu(M),properties:M.properties,type:M.type,patterns:{}};this.hasPattern?this.features.push(sm("fill-extrusion",this.layers,re,this.zoom,h)):this.addFeature(re,re.geometry,K,y,{}),h.featureIndex.insert(M,re.geometry,K,F,this.index,!0)}}addFeatures(l,h,y){for(const M of this.features){const{geometry:T}=M;this.addFeature(M,T,M.index,h,y)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,yp),this.centroidVertexBuffer=l.createVertexBuffer(this.centroidVertexArray,ch.members,!0),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(l,h,y,M,T){const K={x:0,y:0,vertexCount:0};for(const F of uh(h,500)){let W=0;for(const De of F)W+=De.length;let J=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const De of F){if(De.length===0||Xr(De))continue;let Ge=0;for(let Ze=0;Ze<De.length;Ze++){const at=De[Ze];if(Ze>=1){const It=De[Ze-1];if(!hf(at,It)){J.vertexLength+4>pn.MAX_VERTEX_ARRAY_LENGTH&&(J=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const ct=at.sub(It)._perp()._unit(),wt=It.dist(at);Ge+wt>32768&&(Ge=0),zc(this.layoutVertexArray,at.x,at.y,ct.x,ct.y,0,0,Ge),zc(this.layoutVertexArray,at.x,at.y,ct.x,ct.y,0,1,Ge),K.x+=2*at.x,K.y+=2*at.y,K.vertexCount+=2,Ge+=wt,zc(this.layoutVertexArray,It.x,It.y,ct.x,ct.y,0,0,Ge),zc(this.layoutVertexArray,It.x,It.y,ct.x,ct.y,0,1,Ge),K.x+=2*It.x,K.y+=2*It.y,K.vertexCount+=2;const rn=J.vertexLength;this.indexArray.emplaceBack(rn,rn+2,rn+1),this.indexArray.emplaceBack(rn+1,rn+2,rn+3),J.vertexLength+=4,J.primitiveLength+=2}}}}if(J.vertexLength+W>pn.MAX_VERTEX_ARRAY_LENGTH&&(J=this.segments.prepareSegment(W,this.layoutVertexArray,this.indexArray)),hm[l.type]!=="Polygon")continue;const re=[],Ae=[],be=J.vertexLength;for(const De of F)if(De.length!==0){De!==F[0]&&Ae.push(re.length/2);for(let Ge=0;Ge<De.length;Ge++){const Ze=De[Ge];zc(this.layoutVertexArray,Ze.x,Ze.y,0,0,1,1,0),K.x+=Ze.x,K.y+=Ze.y,K.vertexCount+=1,re.push(Ze.x),re.push(Ze.y)}}const Be=lh(re,Ae);for(let De=0;De<Be.length;De+=3)this.indexArray.emplaceBack(be+Be[De],be+Be[De+2],be+Be[De+1]);J.primitiveLength+=Be.length/3,J.vertexLength+=W}for(let F=0;F<K.vertexCount;F++)this.centroidVertexArray.emplaceBack(Math.floor(K.x/K.vertexCount),Math.floor(K.y/K.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,T,M)}}function hf(c,l){return c.x===l.x&&(c.x<0||c.x>Di)||c.y===l.y&&(c.y<0||c.y>Di)}function Xr(c){return c.every(l=>l.x<0)||c.every(l=>l.x>Di)||c.every(l=>l.y<0)||c.every(l=>l.y>Di)}let ff;Qn("FillExtrusionBucket",hh,{omit:["layers","features"]});var So={get paint(){return ff=ff||new da({"fill-extrusion-opacity":new xr(mt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ir(mt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xr(mt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xr(mt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new OA(mt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ir(mt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ir(mt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xr(mt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Sd extends ka{constructor(l){super(l,So)}createBucket(l){return new hh(l)}queryRadius(){return tf(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(l,h,y,M,T,K,F,W){const J=du(l,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),K.angle,F),re=this.paint.get("fill-extrusion-height").evaluate(h,y),Ae=this.paint.get("fill-extrusion-base").evaluate(h,y),be=function(De,Ge,Ze,at){const It=[];for(const ct of De){const wt=[ct.x,ct.y,0,1];im(wt,wt,Ge),It.push(new O(wt[0]/wt[3],wt[1]/wt[3]))}return It}(J,W),Be=function(De,Ge,Ze,at){const It=[],ct=[],wt=at[8]*Ge,rn=at[9]*Ge,An=at[10]*Ge,zn=at[11]*Ge,br=at[8]*Ze,Xn=at[9]*Ze,xn=at[10]*Ze,mn=at[11]*Ze;for(const ur of De){const jn=[],Sn=[];for(const Lr of ur){const Mr=Lr.x,ji=Lr.y,fa=at[0]*Mr+at[4]*ji+at[12],pa=at[1]*Mr+at[5]*ji+at[13],Ua=at[2]*Mr+at[6]*ji+at[14],fu=at[3]*Mr+at[7]*ji+at[15],pu=Ua+An,hs=fu+zn,ks=fa+br,Xo=pa+Xn,Gs=Ua+xn,mu=fu+mn,$s=new O((fa+wt)/hs,(pa+rn)/hs);$s.z=pu/hs,jn.push($s);const Qs=new O(ks/mu,Xo/mu);Qs.z=Gs/mu,Sn.push(Qs)}It.push(jn),ct.push(Sn)}return[It,ct]}(M,Ae,re,W);return function(De,Ge,Ze){let at=1/0;IA(Ze,Ge)&&(at=jc(Ze,Ge[0]));for(let It=0;It<Ge.length;It++){const ct=Ge[It],wt=De[It];for(let rn=0;rn<ct.length-1;rn++){const An=ct[rn],zn=[An,ct[rn+1],wt[rn+1],wt[rn],An];Tu(Ze,zn)&&(at=Math.min(at,jc(Ze,zn)))}}return at!==1/0&&at}(Be[0],Be[1],be)}}function vp(c,l){return c.x*l.x+c.y*l.y}function jc(c,l){if(c.length===1){let h=0;const y=l[h++];let M;for(;!M||y.equals(M);)if(M=l[h++],!M)return 1/0;for(;h<l.length;h++){const T=l[h],K=c[0],F=M.sub(y),W=T.sub(y),J=K.sub(y),re=vp(F,F),Ae=vp(F,W),be=vp(W,W),Be=vp(J,F),De=vp(J,W),Ge=re*be-Ae*Ae,Ze=(be*Be-Ae*De)/Ge,at=(re*De-Ae*Be)/Ge,It=y.z*(1-Ze-at)+M.z*Ze+T.z*at;if(isFinite(It))return It}return 1/0}{let h=1/0;for(const y of l)h=Math.min(h,y.z);return h}}const ug=Qo([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:zs}=ug,qv=Qo([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:Ya}=qv,Ag=uA.VectorTileFeature.types,Vv=Math.cos(Math.PI/180*37.5),T0=Math.pow(2,14)/.5;class pf{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new Ye,this.layoutVertexArray2=new He,this.indexArray=new Ut,this.programConfigurations=new Zo(l.layers,l.zoom),this.segments=new pn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=gp("line",this.layers,h);const M=this.layers[0].layout.get("line-sort-key"),T=!M.isConstant(),K=[];for(const{feature:F,id:W,index:J,sourceLayerIndex:re}of l){const Ae=this.layers[0]._featureFilter.needGeometry,be=Ac(F,Ae);if(!this.layers[0]._featureFilter.filter(new Mo(this.zoom),be,y))continue;const Be=T?M.evaluate(be,{},y):void 0,De={id:W,properties:F.properties,type:F.type,sourceLayerIndex:re,index:J,geometry:Ae?be.geometry:cu(F),patterns:{},sortKey:Be};K.push(De)}T&&K.sort((F,W)=>F.sortKey-W.sortKey);for(const F of K){const{geometry:W,index:J,sourceLayerIndex:re}=F;if(this.hasPattern){const Ae=sm("line",this.layers,F,this.zoom,h);this.patternFeatures.push(Ae)}else this.addFeature(F,W,J,y,{});h.featureIndex.insert(l[J].feature,W,J,re,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const M of this.patternFeatures)this.addFeature(M,M.geometry,M.index,h,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=l.createVertexBuffer(this.layoutVertexArray2,Ya)),this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,zs),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(l){if(l.properties&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_end"))return{start:+l.properties.mapbox_clip_start,end:+l.properties.mapbox_clip_end}}addFeature(l,h,y,M,T){const K=this.layers[0].layout,F=K.get("line-join").evaluate(l,{}),W=K.get("line-cap"),J=K.get("line-miter-limit"),re=K.get("line-round-limit");this.lineClips=this.lineFeatureClips(l);for(const Ae of h)this.addLine(Ae,l,F,W,J,re);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,T,M)}addLine(l,h,y,M,T,K){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let at=0;at<l.length-1;at++)this.totalDistance+=l[at].dist(l[at+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const F=Ag[h.type]==="Polygon";let W=l.length;for(;W>=2&&l[W-1].equals(l[W-2]);)W--;let J=0;for(;J<W-1&&l[J].equals(l[J+1]);)J++;if(W<(F?3:2))return;y==="bevel"&&(T=1.05);const re=this.overscaling<=16?15*Di/(512*this.overscaling):0,Ae=this.segments.prepareSegment(10*W,this.layoutVertexArray,this.indexArray);let be,Be,De,Ge,Ze;this.e1=this.e2=-1,F&&(be=l[W-2],Ze=l[J].sub(be)._unit()._perp());for(let at=J;at<W;at++){if(De=at===W-1?F?l[J+1]:void 0:l[at+1],De&&l[at].equals(De))continue;Ze&&(Ge=Ze),be&&(Be=be),be=l[at],Ze=De?De.sub(be)._unit()._perp():Ge,Ge=Ge||Ze;let It=Ge.add(Ze);It.x===0&&It.y===0||It._unit();const ct=Ge.x*Ze.x+Ge.y*Ze.y,wt=It.x*Ze.x+It.y*Ze.y,rn=wt!==0?1/wt:1/0,An=2*Math.sqrt(2-2*wt),zn=wt<Vv&&Be&&De,br=Ge.x*Ze.y-Ge.y*Ze.x>0;if(zn&&at>J){const mn=be.dist(Be);if(mn>2*re){const ur=be.sub(be.sub(Be)._mult(re/mn)._round());this.updateDistance(Be,ur),this.addCurrentVertex(ur,Ge,0,0,Ae),Be=ur}}const Xn=Be&&De;let xn=Xn?y:F?"butt":M;if(Xn&&xn==="round"&&(rn<K?xn="miter":rn<=2&&(xn="fakeround")),xn==="miter"&&rn>T&&(xn="bevel"),xn==="bevel"&&(rn>2&&(xn="flipbevel"),rn<T&&(xn="miter")),Be&&this.updateDistance(Be,be),xn==="miter")It._mult(rn),this.addCurrentVertex(be,It,0,0,Ae);else if(xn==="flipbevel"){if(rn>100)It=Ze.mult(-1);else{const mn=rn*Ge.add(Ze).mag()/Ge.sub(Ze).mag();It._perp()._mult(mn*(br?-1:1))}this.addCurrentVertex(be,It,0,0,Ae),this.addCurrentVertex(be,It.mult(-1),0,0,Ae)}else if(xn==="bevel"||xn==="fakeround"){const mn=-Math.sqrt(rn*rn-1),ur=br?mn:0,jn=br?0:mn;if(Be&&this.addCurrentVertex(be,Ge,ur,jn,Ae),xn==="fakeround"){const Sn=Math.round(180*An/Math.PI/20);for(let Lr=1;Lr<Sn;Lr++){let Mr=Lr/Sn;if(Mr!==.5){const fa=Mr-.5;Mr+=Mr*fa*(Mr-1)*((1.0904+ct*(ct*(3.55645-1.43519*ct)-3.2452))*fa*fa+(.848013+ct*(.215638*ct-1.06021)))}const ji=Ze.sub(Ge)._mult(Mr)._add(Ge)._unit()._mult(br?-1:1);this.addHalfVertex(be,ji.x,ji.y,!1,br,0,Ae)}}De&&this.addCurrentVertex(be,Ze,-ur,-jn,Ae)}else if(xn==="butt")this.addCurrentVertex(be,It,0,0,Ae);else if(xn==="square"){const mn=Be?1:-1;this.addCurrentVertex(be,It,mn,mn,Ae)}else xn==="round"&&(Be&&(this.addCurrentVertex(be,Ge,0,0,Ae),this.addCurrentVertex(be,Ge,1,1,Ae,!0)),De&&(this.addCurrentVertex(be,Ze,-1,-1,Ae,!0),this.addCurrentVertex(be,Ze,0,0,Ae)));if(zn&&at<W-1){const mn=be.dist(De);if(mn>2*re){const ur=be.add(De.sub(be)._mult(re/mn)._round());this.updateDistance(be,ur),this.addCurrentVertex(ur,Ze,0,0,Ae),be=ur}}}}addCurrentVertex(l,h,y,M,T,K=!1){const F=h.y*M-h.x,W=-h.y-h.x*M;this.addHalfVertex(l,h.x+h.y*y,h.y-h.x*y,K,!1,y,T),this.addHalfVertex(l,F,W,K,!0,-M,T),this.distance>T0/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(l,h,y,M,T,K))}addHalfVertex({x:l,y:h},y,M,T,K,F,W){const J=.5*(this.lineClips?this.scaledDistance*(T0-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((l<<1)+(T?1:0),(h<<1)+(K?1:0),Math.round(63*y)+128,Math.round(63*M)+128,1+(F===0?0:F<0?-1:1)|(63&J)<<2,J>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const re=W.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,re),W.primitiveLength++),K?this.e2=re:this.e1=re}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(l,h){this.distance+=l.dist(h),this.updateScaledDistance()}}let A,p;Qn("LineBucket",pf,{omit:["layers","patternFeatures"]});var x={get paint(){return p=p||new da({"line-opacity":new Ir(mt.paint_line["line-opacity"]),"line-color":new Ir(mt.paint_line["line-color"]),"line-translate":new xr(mt.paint_line["line-translate"]),"line-translate-anchor":new xr(mt.paint_line["line-translate-anchor"]),"line-width":new Ir(mt.paint_line["line-width"]),"line-gap-width":new Ir(mt.paint_line["line-gap-width"]),"line-offset":new Ir(mt.paint_line["line-offset"]),"line-blur":new Ir(mt.paint_line["line-blur"]),"line-dasharray":new Fc(mt.paint_line["line-dasharray"]),"line-pattern":new OA(mt.paint_line["line-pattern"]),"line-gradient":new rc(mt.paint_line["line-gradient"])})},get layout(){return A=A||new da({"line-cap":new xr(mt.layout_line["line-cap"]),"line-join":new Ir(mt.layout_line["line-join"]),"line-miter-limit":new xr(mt.layout_line["line-miter-limit"]),"line-round-limit":new xr(mt.layout_line["line-round-limit"]),"line-sort-key":new Ir(mt.layout_line["line-sort-key"])})}};class b extends Ir{possiblyEvaluate(l,h){return h=new Mo(Math.floor(h.zoom),{now:h.now,fadeDuration:h.fadeDuration,zoomHistory:h.zoomHistory,transition:h.transition}),super.possiblyEvaluate(l,h)}evaluate(l,h,y,M){return h=X({},h,{zoom:Math.floor(h.zoom)}),super.evaluate(l,h,y,M)}}let B;class U extends ka{constructor(l){super(l,x),this.gradientVersion=0,B||(B=new b(x.paint.properties["line-width"].specification),B.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(l){if(l==="line-gradient"){const h=this.gradientExpression();this.stepInterpolant=!!function(y){return y._styleExpression!==void 0}(h)&&h._styleExpression.expression instanceof cl,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(l,h){super.recalculate(l,h),this.paint._values["line-floorwidth"]=B.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,l)}createBucket(l){return new pf(l)}queryRadius(l){const h=l,y=q(ef("line-width",this,h),ef("line-gap-width",this,h)),M=ef("line-offset",this,h);return y/2+Math.abs(M)+tf(this.paint.get("line-translate"))}queryIntersectsFeature(l,h,y,M,T,K,F){const W=du(l,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),K.angle,F),J=F/2*q(this.paint.get("line-width").evaluate(h,y),this.paint.get("line-gap-width").evaluate(h,y)),re=this.paint.get("line-offset").evaluate(h,y);return re&&(M=function(Ae,be){const Be=[];for(let De=0;De<Ae.length;De++){const Ge=Ae[De],Ze=[];for(let at=0;at<Ge.length;at++){const It=Ge[at-1],ct=Ge[at],wt=Ge[at+1],rn=at===0?new O(0,0):ct.sub(It)._unit()._perp(),An=at===Ge.length-1?new O(0,0):wt.sub(ct)._unit()._perp(),zn=rn._add(An)._unit(),br=zn.x*An.x+zn.y*An.y;br!==0&&zn._mult(1/br),Ze.push(zn._mult(be)._add(ct))}Be.push(Ze)}return Be}(M,re*F)),function(Ae,be,Be){for(let De=0;De<be.length;De++){const Ge=be[De];if(Ae.length>=3){for(let Ze=0;Ze<Ge.length;Ze++)if(aA(Ae,Ge[Ze]))return!0}if(up(Ae,Ge,Be))return!0}return!1}(W,M,J)}isTileClipped(){return!0}}function q(c,l){return l>0?l+2*c:c}const ne=Qo([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),ue=Qo([{name:"a_projected_pos",components:3,type:"Float32"}],4);Qo([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const ve=Qo([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);Qo([{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"}]);const Qe=Qo([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nt=Qo([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Ot(c,l,h){return c.sections.forEach(y=>{y.text=function(M,T,K){const F=T.layout.get("text-transform").evaluate(K,{});return F==="uppercase"?M=M.toLocaleUpperCase():F==="lowercase"&&(M=M.toLocaleLowerCase()),eA.applyArabicShaping&&(M=eA.applyArabicShaping(M)),M}(y.text,l,h)}),c}Qo([{name:"triangle",components:3,type:"Uint16"}]),Qo([{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"}]),Qo([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Qo([{type:"Float32",name:"offsetX"}]),Qo([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Qo([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Ct={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var Nt=24,cn=bn,kn=function(c,l,h,y,M){var T,K,F=8*M-y-1,W=(1<<F)-1,J=W>>1,re=-7,Ae=h?M-1:0,be=h?-1:1,Be=c[l+Ae];for(Ae+=be,T=Be&(1<<-re)-1,Be>>=-re,re+=F;re>0;T=256*T+c[l+Ae],Ae+=be,re-=8);for(K=T&(1<<-re)-1,T>>=-re,re+=y;re>0;K=256*K+c[l+Ae],Ae+=be,re-=8);if(T===0)T=1-J;else{if(T===W)return K?NaN:1/0*(Be?-1:1);K+=Math.pow(2,y),T-=J}return(Be?-1:1)*K*Math.pow(2,T-y)},Vn=function(c,l,h,y,M,T){var K,F,W,J=8*T-M-1,re=(1<<J)-1,Ae=re>>1,be=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,Be=y?0:T-1,De=y?1:-1,Ge=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(F=isNaN(l)?1:0,K=re):(K=Math.floor(Math.log(l)/Math.LN2),l*(W=Math.pow(2,-K))<1&&(K--,W*=2),(l+=K+Ae>=1?be/W:be*Math.pow(2,1-Ae))*W>=2&&(K++,W/=2),K+Ae>=re?(F=0,K=re):K+Ae>=1?(F=(l*W-1)*Math.pow(2,M),K+=Ae):(F=l*Math.pow(2,Ae-1)*Math.pow(2,M),K=0));M>=8;c[h+Be]=255&F,Be+=De,F/=256,M-=8);for(K=K<<M|F,J+=M;J>0;c[h+Be]=255&K,Be+=De,K/=256,J-=8);c[h+Be-De]|=128*Ge};function bn(c){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(c)?c:new Uint8Array(c||0),this.pos=0,this.type=0,this.length=this.buf.length}bn.Varint=0,bn.Fixed64=1,bn.Bytes=2,bn.Fixed32=5;var Rn=4294967296,lr=1/Rn,Tr=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function _r(c){return c.type===bn.Bytes?c.readVarint()+c.pos:c.pos+1}function fi(c,l,h){return h?4294967296*l+(c>>>0):4294967296*(l>>>0)+(c>>>0)}function Ro(c,l,h){var y=l<=16383?1:l<=2097151?2:l<=268435455?3:Math.floor(Math.log(l)/(7*Math.LN2));h.realloc(y);for(var M=h.pos-1;M>=c;M--)h.buf[M+y]=h.buf[M]}function qa(c,l){for(var h=0;h<c.length;h++)l.writeVarint(c[h])}function xa(c,l){for(var h=0;h<c.length;h++)l.writeSVarint(c[h])}function Fa(c,l){for(var h=0;h<c.length;h++)l.writeFloat(c[h])}function As(c,l){for(var h=0;h<c.length;h++)l.writeDouble(c[h])}function cs(c,l){for(var h=0;h<c.length;h++)l.writeBoolean(c[h])}function Ol(c,l){for(var h=0;h<c.length;h++)l.writeFixed32(c[h])}function tl(c,l){for(var h=0;h<c.length;h++)l.writeSFixed32(c[h])}function Bs(c,l){for(var h=0;h<c.length;h++)l.writeFixed64(c[h])}function ds(c,l){for(var h=0;h<c.length;h++)l.writeSFixed64(c[h])}function ha(c,l){return(c[l]|c[l+1]<<8|c[l+2]<<16)+16777216*c[l+3]}function Is(c,l,h){c[h]=l,c[h+1]=l>>>8,c[h+2]=l>>>16,c[h+3]=l>>>24}function fh(c,l){return(c[l]|c[l+1]<<8|c[l+2]<<16)+(c[l+3]<<24)}bn.prototype={destroy:function(){this.buf=null},readFields:function(c,l,h){for(h=h||this.length;this.pos<h;){var y=this.readVarint(),M=y>>3,T=this.pos;this.type=7&y,c(M,l,this),this.pos===T&&this.skip(y)}return l},readMessage:function(c,l){return this.readFields(c,l,this.readVarint()+this.pos)},readFixed32:function(){var c=ha(this.buf,this.pos);return this.pos+=4,c},readSFixed32:function(){var c=fh(this.buf,this.pos);return this.pos+=4,c},readFixed64:function(){var c=ha(this.buf,this.pos)+ha(this.buf,this.pos+4)*Rn;return this.pos+=8,c},readSFixed64:function(){var c=ha(this.buf,this.pos)+fh(this.buf,this.pos+4)*Rn;return this.pos+=8,c},readFloat:function(){var c=kn(this.buf,this.pos,!0,23,4);return this.pos+=4,c},readDouble:function(){var c=kn(this.buf,this.pos,!0,52,8);return this.pos+=8,c},readVarint:function(c){var l,h,y=this.buf;return l=127&(h=y[this.pos++]),h<128?l:(l|=(127&(h=y[this.pos++]))<<7,h<128?l:(l|=(127&(h=y[this.pos++]))<<14,h<128?l:(l|=(127&(h=y[this.pos++]))<<21,h<128?l:function(M,T,K){var F,W,J=K.buf;if(F=(112&(W=J[K.pos++]))>>4,W<128||(F|=(127&(W=J[K.pos++]))<<3,W<128)||(F|=(127&(W=J[K.pos++]))<<10,W<128)||(F|=(127&(W=J[K.pos++]))<<17,W<128)||(F|=(127&(W=J[K.pos++]))<<24,W<128)||(F|=(1&(W=J[K.pos++]))<<31,W<128))return fi(M,F,T);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(h=y[this.pos]))<<28,c,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var c=this.readVarint();return c%2==1?(c+1)/-2:c/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var c=this.readVarint()+this.pos,l=this.pos;return this.pos=c,c-l>=12&&Tr?function(h,y,M){return Tr.decode(h.subarray(y,M))}(this.buf,l,c):function(h,y,M){for(var T="",K=y;K<M;){var F,W,J,re=h[K],Ae=null,be=re>239?4:re>223?3:re>191?2:1;if(K+be>M)break;be===1?re<128&&(Ae=re):be===2?(192&(F=h[K+1]))==128&&(Ae=(31&re)<<6|63&F)<=127&&(Ae=null):be===3?(W=h[K+2],(192&(F=h[K+1]))==128&&(192&W)==128&&((Ae=(15&re)<<12|(63&F)<<6|63&W)<=2047||Ae>=55296&&Ae<=57343)&&(Ae=null)):be===4&&(W=h[K+2],J=h[K+3],(192&(F=h[K+1]))==128&&(192&W)==128&&(192&J)==128&&((Ae=(15&re)<<18|(63&F)<<12|(63&W)<<6|63&J)<=65535||Ae>=1114112)&&(Ae=null)),Ae===null?(Ae=65533,be=1):Ae>65535&&(Ae-=65536,T+=String.fromCharCode(Ae>>>10&1023|55296),Ae=56320|1023&Ae),T+=String.fromCharCode(Ae),K+=be}return T}(this.buf,l,c)},readBytes:function(){var c=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,c);return this.pos=c,l},readPackedVarint:function(c,l){if(this.type!==bn.Bytes)return c.push(this.readVarint(l));var h=_r(this);for(c=c||[];this.pos<h;)c.push(this.readVarint(l));return c},readPackedSVarint:function(c){if(this.type!==bn.Bytes)return c.push(this.readSVarint());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readSVarint());return c},readPackedBoolean:function(c){if(this.type!==bn.Bytes)return c.push(this.readBoolean());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readBoolean());return c},readPackedFloat:function(c){if(this.type!==bn.Bytes)return c.push(this.readFloat());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readFloat());return c},readPackedDouble:function(c){if(this.type!==bn.Bytes)return c.push(this.readDouble());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readDouble());return c},readPackedFixed32:function(c){if(this.type!==bn.Bytes)return c.push(this.readFixed32());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readFixed32());return c},readPackedSFixed32:function(c){if(this.type!==bn.Bytes)return c.push(this.readSFixed32());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readSFixed32());return c},readPackedFixed64:function(c){if(this.type!==bn.Bytes)return c.push(this.readFixed64());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readFixed64());return c},readPackedSFixed64:function(c){if(this.type!==bn.Bytes)return c.push(this.readSFixed64());var l=_r(this);for(c=c||[];this.pos<l;)c.push(this.readSFixed64());return c},skip:function(c){var l=7&c;if(l===bn.Varint)for(;this.buf[this.pos++]>127;);else if(l===bn.Bytes)this.pos=this.readVarint()+this.pos;else if(l===bn.Fixed32)this.pos+=4;else{if(l!==bn.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(c,l){this.writeVarint(c<<3|l)},realloc:function(c){for(var l=this.length||16;l<this.pos+c;)l*=2;if(l!==this.length){var h=new Uint8Array(l);h.set(this.buf),this.buf=h,this.length=l}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(c){this.realloc(4),Is(this.buf,c,this.pos),this.pos+=4},writeSFixed32:function(c){this.realloc(4),Is(this.buf,c,this.pos),this.pos+=4},writeFixed64:function(c){this.realloc(8),Is(this.buf,-1&c,this.pos),Is(this.buf,Math.floor(c*lr),this.pos+4),this.pos+=8},writeSFixed64:function(c){this.realloc(8),Is(this.buf,-1&c,this.pos),Is(this.buf,Math.floor(c*lr),this.pos+4),this.pos+=8},writeVarint:function(c){(c=+c||0)>268435455||c<0?function(l,h){var y,M;if(l>=0?(y=l%4294967296|0,M=l/4294967296|0):(M=~(-l/4294967296),4294967295^(y=~(-l%4294967296))?y=y+1|0:(y=0,M=M+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(T,K,F){F.buf[F.pos++]=127&T|128,T>>>=7,F.buf[F.pos++]=127&T|128,T>>>=7,F.buf[F.pos++]=127&T|128,T>>>=7,F.buf[F.pos++]=127&T|128,F.buf[F.pos]=127&(T>>>=7)}(y,0,h),function(T,K){var F=(7&T)<<4;K.buf[K.pos++]|=F|((T>>>=3)?128:0),T&&(K.buf[K.pos++]=127&T|((T>>>=7)?128:0),T&&(K.buf[K.pos++]=127&T|((T>>>=7)?128:0),T&&(K.buf[K.pos++]=127&T|((T>>>=7)?128:0),T&&(K.buf[K.pos++]=127&T|((T>>>=7)?128:0),T&&(K.buf[K.pos++]=127&T)))))}(M,h)}(c,this):(this.realloc(4),this.buf[this.pos++]=127&c|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=c>>>7&127))))},writeSVarint:function(c){this.writeVarint(c<0?2*-c-1:2*c)},writeBoolean:function(c){this.writeVarint(!!c)},writeString:function(c){c=String(c),this.realloc(4*c.length),this.pos++;var l=this.pos;this.pos=function(y,M,T){for(var K,F,W=0;W<M.length;W++){if((K=M.charCodeAt(W))>55295&&K<57344){if(!F){K>56319||W+1===M.length?(y[T++]=239,y[T++]=191,y[T++]=189):F=K;continue}if(K<56320){y[T++]=239,y[T++]=191,y[T++]=189,F=K;continue}K=F-55296<<10|K-56320|65536,F=null}else F&&(y[T++]=239,y[T++]=191,y[T++]=189,F=null);K<128?y[T++]=K:(K<2048?y[T++]=K>>6|192:(K<65536?y[T++]=K>>12|224:(y[T++]=K>>18|240,y[T++]=K>>12&63|128),y[T++]=K>>6&63|128),y[T++]=63&K|128)}return T}(this.buf,c,this.pos);var h=this.pos-l;h>=128&&Ro(l,h,this),this.pos=l-1,this.writeVarint(h),this.pos+=h},writeFloat:function(c){this.realloc(4),Vn(this.buf,c,this.pos,!0,23,4),this.pos+=4},writeDouble:function(c){this.realloc(8),Vn(this.buf,c,this.pos,!0,52,8),this.pos+=8},writeBytes:function(c){var l=c.length;this.writeVarint(l),this.realloc(l);for(var h=0;h<l;h++)this.buf[this.pos++]=c[h]},writeRawMessage:function(c,l){this.pos++;var h=this.pos;c(l,this);var y=this.pos-h;y>=128&&Ro(h,y,this),this.pos=h-1,this.writeVarint(y),this.pos+=y},writeMessage:function(c,l,h){this.writeTag(c,bn.Bytes),this.writeRawMessage(l,h)},writePackedVarint:function(c,l){l.length&&this.writeMessage(c,qa,l)},writePackedSVarint:function(c,l){l.length&&this.writeMessage(c,xa,l)},writePackedBoolean:function(c,l){l.length&&this.writeMessage(c,cs,l)},writePackedFloat:function(c,l){l.length&&this.writeMessage(c,Fa,l)},writePackedDouble:function(c,l){l.length&&this.writeMessage(c,As,l)},writePackedFixed32:function(c,l){l.length&&this.writeMessage(c,Ol,l)},writePackedSFixed32:function(c,l){l.length&&this.writeMessage(c,tl,l)},writePackedFixed64:function(c,l){l.length&&this.writeMessage(c,Bs,l)},writePackedSFixed64:function(c,l){l.length&&this.writeMessage(c,ds,l)},writeBytesField:function(c,l){this.writeTag(c,bn.Bytes),this.writeBytes(l)},writeFixed32Field:function(c,l){this.writeTag(c,bn.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(c,l){this.writeTag(c,bn.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(c,l){this.writeTag(c,bn.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(c,l){this.writeTag(c,bn.Fixed64),this.writeSFixed64(l)},writeVarintField:function(c,l){this.writeTag(c,bn.Varint),this.writeVarint(l)},writeSVarintField:function(c,l){this.writeTag(c,bn.Varint),this.writeSVarint(l)},writeStringField:function(c,l){this.writeTag(c,bn.Bytes),this.writeString(l)},writeFloatField:function(c,l){this.writeTag(c,bn.Fixed32),this.writeFloat(l)},writeDoubleField:function(c,l){this.writeTag(c,bn.Fixed64),this.writeDouble(l)},writeBooleanField:function(c,l){this.writeVarintField(c,!!l)}};var dc=d(cn);const js=3;function hc(c,l,h){c===1&&h.readMessage(Ns,l)}function Ns(c,l,h){if(c===3){const{id:y,bitmap:M,width:T,height:K,left:F,top:W,advance:J}=h.readMessage(K0,{});l.push({id:y,bitmap:new La({width:T+2*js,height:K+2*js},M),metrics:{width:T,height:K,left:F,top:W,advance:J}})}}function K0(c,l,h){c===1?l.id=h.readVarint():c===2?l.bitmap=h.readBytes():c===3?l.width=h.readVarint():c===4?l.height=h.readVarint():c===5?l.left=h.readSVarint():c===6?l.top=h.readSVarint():c===7&&(l.advance=h.readVarint())}const TA=js;function Nc(c){let l=0,h=0;for(const K of c)l+=K.w*K.h,h=Math.max(h,K.w);c.sort((K,F)=>F.h-K.h);const y=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(l/.95)),h),h:1/0}];let M=0,T=0;for(const K of c)for(let F=y.length-1;F>=0;F--){const W=y[F];if(!(K.w>W.w||K.h>W.h)){if(K.x=W.x,K.y=W.y,T=Math.max(T,K.y+K.h),M=Math.max(M,K.x+K.w),K.w===W.w&&K.h===W.h){const J=y.pop();F<y.length&&(y[F]=J)}else K.h===W.h?(W.x+=K.w,W.w-=K.w):K.w===W.w?(W.y+=K.h,W.h-=K.h):(y.push({x:W.x+K.w,y:W.y,w:W.w-K.w,h:K.h}),W.y+=K.h,W.h-=K.h);break}}return{w:M,h:T,fill:l/(M*T)||0}}const Va=1;class nl{constructor(l,{pixelRatio:h,version:y,stretchX:M,stretchY:T,content:K}){this.paddedRect=l,this.pixelRatio=h,this.stretchX=M,this.stretchY=T,this.content=K,this.version=y}get tl(){return[this.paddedRect.x+Va,this.paddedRect.y+Va]}get br(){return[this.paddedRect.x+this.paddedRect.w-Va,this.paddedRect.y+this.paddedRect.h-Va]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Va)/this.pixelRatio,(this.paddedRect.h-2*Va)/this.pixelRatio]}}class ph{constructor(l,h){const y={},M={};this.haveRenderCallbacks=[];const T=[];this.addImages(l,y,T),this.addImages(h,M,T);const{w:K,h:F}=Nc(T),W=new pl({width:K||1,height:F||1});for(const J in l){const re=l[J],Ae=y[J].paddedRect;pl.copy(re.data,W,{x:0,y:0},{x:Ae.x+Va,y:Ae.y+Va},re.data)}for(const J in h){const re=h[J],Ae=M[J].paddedRect,be=Ae.x+Va,Be=Ae.y+Va,De=re.data.width,Ge=re.data.height;pl.copy(re.data,W,{x:0,y:0},{x:be,y:Be},re.data),pl.copy(re.data,W,{x:0,y:Ge-1},{x:be,y:Be-1},{width:De,height:1}),pl.copy(re.data,W,{x:0,y:0},{x:be,y:Be+Ge},{width:De,height:1}),pl.copy(re.data,W,{x:De-1,y:0},{x:be-1,y:Be},{width:1,height:Ge}),pl.copy(re.data,W,{x:0,y:0},{x:be+De,y:Be},{width:1,height:Ge})}this.image=W,this.iconPositions=y,this.patternPositions=M}addImages(l,h,y){for(const M in l){const T=l[M],K={x:0,y:0,w:T.data.width+2*Va,h:T.data.height+2*Va};y.push(K),h[M]=new nl(K,T),T.hasRenderCallback&&this.haveRenderCallbacks.push(M)}}patchUpdatedImages(l,h){l.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const y in l.updatedImages)this.patchUpdatedImage(this.iconPositions[y],l.getImage(y),h),this.patchUpdatedImage(this.patternPositions[y],l.getImage(y),h)}patchUpdatedImage(l,h,y){if(!l||!h||l.version===h.version)return;l.version=h.version;const[M,T]=l.tl;y.update(h.data,void 0,{x:M,y:T})}}var fc;Qn("ImagePosition",nl),Qn("ImageAtlas",ph),a.ah=void 0,(fc=a.ah||(a.ah={}))[fc.none=0]="none",fc[fc.horizontal=1]="horizontal",fc[fc.vertical=2]="vertical",fc[fc.horizontalOnly=3]="horizontalOnly";const fm=-17;class P0{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(l,h){const y=new P0;return y.scale=l||1,y.fontStack=h,y}static forImage(l){const h=new P0;return h.imageName=l,h}}class pm{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(l,h){const y=new pm;for(let M=0;M<l.sections.length;M++){const T=l.sections[M];T.image?y.addImageSection(T):y.addTextSection(T,h)}return y}length(){return this.text.length}getSection(l){return this.sections[this.sectionIndex[l]]}getSectionIndex(l){return this.sectionIndex[l]}getCharCode(l){return this.text.charCodeAt(l)}verticalizePunctuation(){this.text=function(l){let h="";for(let y=0;y<l.length;y++){const M=l.charCodeAt(y+1)||null,T=l.charCodeAt(y-1)||null;h+=M&&Ju(M)&&!Ct[l[y+1]]||T&&Ju(T)&&!Ct[l[y-1]]||!Ct[l[y]]?l[y]:Ct[l[y]]}return h}(this.text)}trim(){let l=0;for(let y=0;y<this.text.length&&dg[this.text.charCodeAt(y)];y++)l++;let h=this.text.length;for(let y=this.text.length-1;y>=0&&y>=l&&dg[this.text.charCodeAt(y)];y--)h--;this.text=this.text.substring(l,h),this.sectionIndex=this.sectionIndex.slice(l,h)}substring(l,h){const y=new pm;return y.text=this.text.substring(l,h),y.sectionIndex=this.sectionIndex.slice(l,h),y.sections=this.sections,y}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((l,h)=>Math.max(l,this.sections[h].scale),0)}addTextSection(l,h){this.text+=l.text,this.sections.push(P0.forText(l.scale,l.fontStack||h));const y=this.sections.length-1;for(let M=0;M<l.text.length;++M)this.sectionIndex.push(y)}addImageSection(l){const h=l.image?l.image.name:"";if(h.length===0)return void he("Can't add FormattedSection with an empty image.");const y=this.getNextImageSectionCharCode();y?(this.text+=String.fromCharCode(y),this.sections.push(P0.forImage(h)),this.sectionIndex.push(this.sections.length-1)):he("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function cg(c,l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge){const Ze=pm.fromFeature(c,M);let at;Ae===a.ah.vertical&&Ze.verticalizePunctuation();const{processBidirectionalText:It,processStyledBidirectionalText:ct}=eA;if(It&&Ze.sections.length===1){at=[];const An=It(Ze.toString(),hg(Ze,J,T,l,y,Be,De));for(const zn of An){const br=new pm;br.text=zn,br.sections=Ze.sections;for(let Xn=0;Xn<zn.length;Xn++)br.sectionIndex.push(0);at.push(br)}}else if(ct){at=[];const An=ct(Ze.text,Ze.sectionIndex,hg(Ze,J,T,l,y,Be,De));for(const zn of An){const br=new pm;br.text=zn[0],br.sectionIndex=zn[1],br.sections=Ze.sections,at.push(br)}}else at=function(An,zn){const br=[],Xn=An.text;let xn=0;for(const mn of zn)br.push(An.substring(xn,mn)),xn=mn;return xn<Xn.length&&br.push(An.substring(xn,Xn.length)),br}(Ze,hg(Ze,J,T,l,y,Be,De));const wt=[],rn={positionedLines:wt,text:Ze.toString(),top:re[1],bottom:re[1],left:re[0],right:re[0],writingMode:Ae,iconsInText:!1,verticalizable:!1};return function(An,zn,br,Xn,xn,mn,ur,jn,Sn,Lr,Mr,ji){let fa=0,pa=fm,Ua=0,fu=0;const pu=jn==="right"?1:jn==="left"?0:.5;let hs=0;for(const $s of xn){$s.trim();const Qs=$s.getMaxScale(),$l=(Qs-1)*Nt,gu={positionedGlyphs:[],lineOffset:0};An.positionedLines[hs]=gu;const Bl=gu.positionedGlyphs;let fs=0;if(!$s.length()){pa+=mn,++hs;continue}for(let Ts=0;Ts<$s.length();Ts++){const oi=$s.getSection(Ts),Il=$s.getSectionIndex(Ts),kl=$s.getCharCode(Ts);let pi=0,pc=null,mc=null,AA=null,gh=Nt;const gc=!(Sn===a.ah.horizontal||!Mr&&!Xu(kl)||Mr&&(dg[kl]||(ks=kl,Jn.Arabic(ks)||Jn["Arabic Supplement"](ks)||Jn["Arabic Extended-A"](ks)||Jn["Arabic Presentation Forms-A"](ks)||Jn["Arabic Presentation Forms-B"](ks))));if(oi.imageName){const DA=Xn[oi.imageName];if(!DA)continue;AA=oi.imageName,An.iconsInText=An.iconsInText||!0,mc=DA.paddedRect;const Lu=DA.displaySize;oi.scale=oi.scale*Nt/ji,pc={width:Lu[0],height:Lu[1],left:Va,top:-TA,advance:gc?Lu[1]:Lu[0]},pi=$l+(Nt-Lu[1]*oi.scale),gh=pc.advance;const yh=gc?Lu[0]*oi.scale-Nt*Qs:Lu[1]*oi.scale-Nt*Qs;yh>0&&yh>fs&&(fs=yh)}else{const DA=br[oi.fontStack],Lu=DA&&DA[kl];if(Lu&&Lu.rect)mc=Lu.rect,pc=Lu.metrics;else{const yh=zn[oi.fontStack],R0=yh&&yh[kl];if(!R0)continue;pc=R0.metrics}pi=(Qs-oi.scale)*Nt}gc?(An.verticalizable=!0,Bl.push({glyph:kl,imageName:AA,x:fa,y:pa+pi,vertical:gc,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:Il,metrics:pc,rect:mc}),fa+=gh*oi.scale+Lr):(Bl.push({glyph:kl,imageName:AA,x:fa,y:pa+pi,vertical:gc,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:Il,metrics:pc,rect:mc}),fa+=pc.advance*oi.scale+Lr)}Bl.length!==0&&(Ua=Math.max(fa-Lr,Ua),fM(Bl,0,Bl.length-1,pu,fs)),fa=0;const Jr=mn*Qs+fs;gu.lineOffset=Math.max(fs,$l),pa+=Jr,fu=Math.max(Jr,fu),++hs}var ks;const Xo=pa-fm,{horizontalAlign:Gs,verticalAlign:mu}=Hv(ur);(function($s,Qs,$l,gu,Bl,fs,Jr,Ts,oi){const Il=(Qs-$l)*Bl;let kl=0;kl=fs!==Jr?-Ts*gu-fm:(-gu*oi+.5)*Jr;for(const pi of $s)for(const pc of pi.positionedGlyphs)pc.x+=Il,pc.y+=kl})(An.positionedLines,pu,Gs,mu,Ua,fu,mn,Xo,xn.length),An.top+=-mu*Xo,An.bottom=An.top+Xo,An.left+=-Gs*Ua,An.right=An.left+Ua}(rn,l,h,y,at,K,F,W,Ae,J,be,Ge),!function(An){for(const zn of An)if(zn.positionedGlyphs.length!==0)return!1;return!0}(wt)&&rn}const dg={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},dM={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function _x(c,l,h,y,M,T){if(l.imageName){const K=y[l.imageName];return K?K.displaySize[0]*l.scale*Nt/T+M:0}{const K=h[l.fontStack],F=K&&K[c];return F?F.metrics.advance*l.scale+M:0}}function KA(c,l,h,y){const M=Math.pow(c-l,2);return y?c<l?M/2:2*M:M+Math.abs(h)*h}function hM(c,l,h){let y=0;return c===10&&(y-=1e4),h&&(y+=150),c!==40&&c!==65288||(y+=50),l!==41&&l!==65289||(y+=50),y}function bx(c,l,h,y,M,T){let K=null,F=KA(l,h,M,T);for(const W of y){const J=KA(l-W.x,h,M,T)+W.badness;J<=F&&(K=W,F=J)}return{index:c,x:l,priorBreak:K,badness:F}}function xx(c){return c?xx(c.priorBreak).concat(c.index):[]}function hg(c,l,h,y,M,T,K){if(T!=="point")return[];if(!c)return[];const F=[],W=function(be,Be,De,Ge,Ze,at){let It=0;for(let ct=0;ct<be.length();ct++){const wt=be.getSection(ct);It+=_x(be.getCharCode(ct),wt,Ge,Ze,Be,at)}return It/Math.max(1,Math.ceil(It/De))}(c,l,h,y,M,K),J=c.text.indexOf("​")>=0;let re=0;for(let be=0;be<c.length();be++){const Be=c.getSection(be),De=c.getCharCode(be);if(dg[De]||(re+=_x(De,Be,y,M,l,K)),be<c.length()-1){const Ge=!((Ae=De)<11904||!(Jn["Bopomofo Extended"](Ae)||Jn.Bopomofo(Ae)||Jn["CJK Compatibility Forms"](Ae)||Jn["CJK Compatibility Ideographs"](Ae)||Jn["CJK Compatibility"](Ae)||Jn["CJK Radicals Supplement"](Ae)||Jn["CJK Strokes"](Ae)||Jn["CJK Symbols and Punctuation"](Ae)||Jn["CJK Unified Ideographs Extension A"](Ae)||Jn["CJK Unified Ideographs"](Ae)||Jn["Enclosed CJK Letters and Months"](Ae)||Jn["Halfwidth and Fullwidth Forms"](Ae)||Jn.Hiragana(Ae)||Jn["Ideographic Description Characters"](Ae)||Jn["Kangxi Radicals"](Ae)||Jn["Katakana Phonetic Extensions"](Ae)||Jn.Katakana(Ae)||Jn["Vertical Forms"](Ae)||Jn["Yi Radicals"](Ae)||Jn["Yi Syllables"](Ae)));(dM[De]||Ge||Be.imageName)&&F.push(bx(be+1,re,W,F,hM(De,c.getCharCode(be+1),Ge&&J),!1))}}var Ae;return xx(bx(c.length(),re,W,F,0,!0))}function Hv(c){let l=.5,h=.5;switch(c){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(c){case"bottom":case"bottom-right":case"bottom-left":h=1;break;case"top":case"top-right":case"top-left":h=0}return{horizontalAlign:l,verticalAlign:h}}function fM(c,l,h,y,M){if(!y&&!M)return;const T=c[h],K=(c[h].x+T.metrics.advance*T.scale)*y;for(let F=l;F<=h;F++)c[F].x-=K,c[F].y+=M}function pM(c,l,h){const{horizontalAlign:y,verticalAlign:M}=Hv(h),T=l[0]-c.displaySize[0]*y,K=l[1]-c.displaySize[1]*M;return{image:c,top:K,bottom:K+c.displaySize[1],left:T,right:T+c.displaySize[0]}}function wx(c,l,h,y,M,T){const K=c.image;let F;if(K.content){const Ze=K.content,at=K.pixelRatio||1;F=[Ze[0]/at,Ze[1]/at,K.displaySize[0]-Ze[2]/at,K.displaySize[1]-Ze[3]/at]}const W=l.left*T,J=l.right*T;let re,Ae,be,Be;h==="width"||h==="both"?(Be=M[0]+W-y[3],Ae=M[0]+J+y[1]):(Be=M[0]+(W+J-K.displaySize[0])/2,Ae=Be+K.displaySize[0]);const De=l.top*T,Ge=l.bottom*T;return h==="height"||h==="both"?(re=M[1]+De-y[0],be=M[1]+Ge+y[2]):(re=M[1]+(De+Ge-K.displaySize[1])/2,be=re+K.displaySize[1]),{image:K,top:re,right:Ae,bottom:be,left:Be,collisionPadding:F}}const Cp=255,Ed=128,mf=Cp*Ed;function Mx(c,l){const{expression:h}=l;if(h.kind==="constant")return{kind:"constant",layoutSize:h.evaluate(new Mo(c+1))};if(h.kind==="source")return{kind:"source"};{const{zoomStops:y,interpolationType:M}=h;let T=0;for(;T<y.length&&y[T]<=c;)T++;T=Math.max(0,T-1);let K=T;for(;K<y.length&&y[K]<c+1;)K++;K=Math.min(y.length-1,K);const F=y[T],W=y[K];return h.kind==="composite"?{kind:"composite",minZoom:F,maxZoom:W,interpolationType:M}:{kind:"camera",minZoom:F,maxZoom:W,minSize:h.evaluate(new Mo(F)),maxSize:h.evaluate(new Mo(W)),interpolationType:M}}}function Zv(c,l,h){let y="never";const M=c.get(l);return M?y=M:c.get(h)&&(y="always"),y}const mM=uA.VectorTileFeature.types,gM=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function fg(c,l,h,y,M,T,K,F,W,J,re,Ae,be){const Be=F?Math.min(mf,Math.round(F[0])):0,De=F?Math.min(mf,Math.round(F[1])):0;c.emplaceBack(l,h,Math.round(32*y),Math.round(32*M),T,K,(Be<<1)+(W?1:0),De,16*J,16*re,256*Ae,256*be)}function Xv(c,l,h){c.emplaceBack(l.x,l.y,h),c.emplaceBack(l.x,l.y,h),c.emplaceBack(l.x,l.y,h),c.emplaceBack(l.x,l.y,h)}function yM(c){for(const l of c.sections)if(Lc(l.text))return!0;return!1}class Jv{constructor(l){this.layoutVertexArray=new ht,this.indexArray=new Ut,this.programConfigurations=l,this.segments=new pn,this.dynamicLayoutVertexArray=new Dt,this.opacityVertexArray=new tt,this.hasVisibleVertices=!1,this.placedSymbolArray=new u}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(l,h,y,M){this.isEmpty()||(y&&(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,ne.members),this.indexBuffer=l.createIndexBuffer(this.indexArray,h),this.dynamicLayoutVertexBuffer=l.createVertexBuffer(this.dynamicLayoutVertexArray,ue.members,!0),this.opacityVertexBuffer=l.createVertexBuffer(this.opacityVertexArray,gM,!0),this.opacityVertexBuffer.itemSize=1),(y||M)&&this.programConfigurations.upload(l))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Qn("SymbolBuffers",Jv);class eC{constructor(l,h,y){this.layoutVertexArray=new l,this.layoutAttributes=h,this.indexArray=new y,this.segments=new pn,this.collisionVertexArray=new Pt}upload(l){this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=l.createVertexBuffer(this.collisionVertexArray,ve.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Qn("CollisionBuffers",eC);class mm{constructor(l){this.collisionBoxArray=l.collisionBoxArray,this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(K=>K.id),this.index=l.index,this.pixelRatio=l.pixelRatio,this.sourceLayerIndex=l.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=b0([]),this.placementViewportMatrix=b0([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Mx(this.zoom,h["text-size"]),this.iconSizeData=Mx(this.zoom,h["icon-size"]);const y=this.layers[0].layout,M=y.get("symbol-sort-key"),T=y.get("symbol-z-order");this.canOverlap=Zv(y,"text-overlap","text-allow-overlap")!=="never"||Zv(y,"icon-overlap","icon-allow-overlap")!=="never"||y.get("text-ignore-placement")||y.get("icon-ignore-placement"),this.sortFeaturesByKey=T!=="viewport-y"&&!M.isConstant(),this.sortFeaturesByY=(T==="viewport-y"||T==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,y.get("symbol-placement")==="point"&&(this.writingModes=y.get("text-writing-mode").map(K=>a.ah[K])),this.stateDependentLayerIds=this.layers.filter(K=>K.isStateDependent()).map(K=>K.id),this.sourceID=l.sourceID}createArrays(){this.text=new Jv(new Zo(this.layers,this.zoom,l=>/^text/.test(l))),this.icon=new Jv(new Zo(this.layers,this.zoom,l=>/^icon/.test(l))),this.glyphOffsetArray=new w,this.lineVertexArray=new k,this.symbolInstances=new _,this.textAnchorOffsets=new j}calculateGlyphDependencies(l,h,y,M,T){for(let K=0;K<l.length;K++)if(h[l.charCodeAt(K)]=!0,(y||M)&&T){const F=Ct[l.charAt(K)];F&&(h[F.charCodeAt(0)]=!0)}}populate(l,h,y){const M=this.layers[0],T=M.layout,K=T.get("text-font"),F=T.get("text-field"),W=T.get("icon-image"),J=(F.value.kind!=="constant"||F.value.value instanceof Gn&&!F.value.value.isEmpty()||F.value.value.toString().length>0)&&(K.value.kind!=="constant"||K.value.value.length>0),re=W.value.kind!=="constant"||!!W.value.value||Object.keys(W.parameters).length>0,Ae=T.get("symbol-sort-key");if(this.features=[],!J&&!re)return;const be=h.iconDependencies,Be=h.glyphDependencies,De=h.availableImages,Ge=new Mo(this.zoom);for(const{feature:Ze,id:at,index:It,sourceLayerIndex:ct}of l){const wt=M._featureFilter.needGeometry,rn=Ac(Ze,wt);if(!M._featureFilter.filter(Ge,rn,y))continue;let An,zn;if(wt||(rn.geometry=cu(Ze)),J){const Xn=M.getValueAndResolveTokens("text-field",rn,y,De),xn=Gn.factory(Xn),mn=this.hasRTLText=this.hasRTLText||yM(xn);(!mn||eA.getRTLTextPluginStatus()==="unavailable"||mn&&eA.isParsed())&&(An=Ot(xn,M,rn))}if(re){const Xn=M.getValueAndResolveTokens("icon-image",rn,y,De);zn=Xn instanceof _e?Xn:_e.fromString(Xn)}if(!An&&!zn)continue;const br=this.sortFeaturesByKey?Ae.evaluate(rn,{},y):void 0;if(this.features.push({id:at,text:An,icon:zn,index:It,sourceLayerIndex:ct,geometry:rn.geometry,properties:Ze.properties,type:mM[Ze.type],sortKey:br}),zn&&(be[zn.name]=!0),An){const Xn=K.evaluate(rn,{},y).join(","),xn=T.get("text-rotation-alignment")!=="viewport"&&T.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(a.ah.vertical)>=0;for(const mn of An.sections)if(mn.image)be[mn.image.name]=!0;else{const ur=tc(An.toString()),jn=mn.fontStack||Xn,Sn=Be[jn]=Be[jn]||{};this.calculateGlyphDependencies(mn.text,Sn,xn,this.allowVerticalPlacement,ur)}}}T.get("symbol-placement")==="line"&&(this.features=function(Ze){const at={},It={},ct=[];let wt=0;function rn(Xn){ct.push(Ze[Xn]),wt++}function An(Xn,xn,mn){const ur=It[Xn];return delete It[Xn],It[xn]=ur,ct[ur].geometry[0].pop(),ct[ur].geometry[0]=ct[ur].geometry[0].concat(mn[0]),ur}function zn(Xn,xn,mn){const ur=at[xn];return delete at[xn],at[Xn]=ur,ct[ur].geometry[0].shift(),ct[ur].geometry[0]=mn[0].concat(ct[ur].geometry[0]),ur}function br(Xn,xn,mn){const ur=mn?xn[0][xn[0].length-1]:xn[0][0];return`${Xn}:${ur.x}:${ur.y}`}for(let Xn=0;Xn<Ze.length;Xn++){const xn=Ze[Xn],mn=xn.geometry,ur=xn.text?xn.text.toString():null;if(!ur){rn(Xn);continue}const jn=br(ur,mn),Sn=br(ur,mn,!0);if(jn in It&&Sn in at&&It[jn]!==at[Sn]){const Lr=zn(jn,Sn,mn),Mr=An(jn,Sn,ct[Lr].geometry);delete at[jn],delete It[Sn],It[br(ur,ct[Mr].geometry,!0)]=Mr,ct[Lr].geometry=null}else jn in It?An(jn,Sn,mn):Sn in at?zn(jn,Sn,mn):(rn(Xn),at[jn]=wt-1,It[Sn]=wt-1)}return ct.filter(Xn=>Xn.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ze,at)=>Ze.sortKey-at.sortKey)}update(l,h,y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(l,h,this.layers,y),this.icon.programConfigurations.updatePaintArrays(l,h,this.layers,y))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(l){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(l),this.iconCollisionBox.upload(l)),this.text.upload(l,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(l,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(l,h){const y=this.lineVertexArray.length;if(l.segment!==void 0){let M=l.dist(h[l.segment+1]),T=l.dist(h[l.segment]);const K={};for(let F=l.segment+1;F<h.length;F++)K[F]={x:h[F].x,y:h[F].y,tileUnitDistanceFromAnchor:M},F<h.length-1&&(M+=h[F+1].dist(h[F]));for(let F=l.segment||0;F>=0;F--)K[F]={x:h[F].x,y:h[F].y,tileUnitDistanceFromAnchor:T},F>0&&(T+=h[F-1].dist(h[F]));for(let F=0;F<h.length;F++){const W=K[F];this.lineVertexArray.emplaceBack(W.x,W.y,W.tileUnitDistanceFromAnchor)}}return{lineStartIndex:y,lineLength:this.lineVertexArray.length-y}}addSymbols(l,h,y,M,T,K,F,W,J,re,Ae,be){const Be=l.indexArray,De=l.layoutVertexArray,Ge=l.segments.prepareSegment(4*h.length,De,Be,this.canOverlap?K.sortKey:void 0),Ze=this.glyphOffsetArray.length,at=Ge.vertexLength,It=this.allowVerticalPlacement&&F===a.ah.vertical?Math.PI/2:0,ct=K.text&&K.text.sections;for(let wt=0;wt<h.length;wt++){const{tl:rn,tr:An,bl:zn,br,tex:Xn,pixelOffsetTL:xn,pixelOffsetBR:mn,minFontScaleX:ur,minFontScaleY:jn,glyphOffset:Sn,isSDF:Lr,sectionIndex:Mr}=h[wt],ji=Ge.vertexLength,fa=Sn[1];fg(De,W.x,W.y,rn.x,fa+rn.y,Xn.x,Xn.y,y,Lr,xn.x,xn.y,ur,jn),fg(De,W.x,W.y,An.x,fa+An.y,Xn.x+Xn.w,Xn.y,y,Lr,mn.x,xn.y,ur,jn),fg(De,W.x,W.y,zn.x,fa+zn.y,Xn.x,Xn.y+Xn.h,y,Lr,xn.x,mn.y,ur,jn),fg(De,W.x,W.y,br.x,fa+br.y,Xn.x+Xn.w,Xn.y+Xn.h,y,Lr,mn.x,mn.y,ur,jn),Xv(l.dynamicLayoutVertexArray,W,It),Be.emplaceBack(ji,ji+1,ji+2),Be.emplaceBack(ji+1,ji+2,ji+3),Ge.vertexLength+=4,Ge.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Sn[0]),wt!==h.length-1&&Mr===h[wt+1].sectionIndex||l.programConfigurations.populatePaintArrays(De.length,K,K.index,{},be,ct&&ct[Mr])}l.placedSymbolArray.emplaceBack(W.x,W.y,Ze,this.glyphOffsetArray.length-Ze,at,J,re,W.segment,y?y[0]:0,y?y[1]:0,M[0],M[1],F,0,!1,0,Ae)}_addCollisionDebugVertex(l,h,y,M,T,K){return h.emplaceBack(0,0),l.emplaceBack(y.x,y.y,M,T,Math.round(K.x),Math.round(K.y))}addCollisionDebugVertices(l,h,y,M,T,K,F){const W=T.segments.prepareSegment(4,T.layoutVertexArray,T.indexArray),J=W.vertexLength,re=T.layoutVertexArray,Ae=T.collisionVertexArray,be=F.anchorX,Be=F.anchorY;this._addCollisionDebugVertex(re,Ae,K,be,Be,new O(l,h)),this._addCollisionDebugVertex(re,Ae,K,be,Be,new O(y,h)),this._addCollisionDebugVertex(re,Ae,K,be,Be,new O(y,M)),this._addCollisionDebugVertex(re,Ae,K,be,Be,new O(l,M)),W.vertexLength+=4;const De=T.indexArray;De.emplaceBack(J,J+1),De.emplaceBack(J+1,J+2),De.emplaceBack(J+2,J+3),De.emplaceBack(J+3,J),W.primitiveLength+=4}addDebugCollisionBoxes(l,h,y,M){for(let T=l;T<h;T++){const K=this.collisionBoxArray.get(T);this.addCollisionDebugVertices(K.x1,K.y1,K.x2,K.y2,M?this.textCollisionBox:this.iconCollisionBox,K.anchorPoint,y)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new eC(xt,Qe.members,Xt),this.iconCollisionBox=new eC(xt,Qe.members,Xt);for(let l=0;l<this.symbolInstances.length;l++){const h=this.symbolInstances.get(l);this.addDebugCollisionBoxes(h.textBoxStartIndex,h.textBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.verticalTextBoxStartIndex,h.verticalTextBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.iconBoxStartIndex,h.iconBoxEndIndex,h,!1),this.addDebugCollisionBoxes(h.verticalIconBoxStartIndex,h.verticalIconBoxEndIndex,h,!1)}}_deserializeCollisionBoxesForSymbol(l,h,y,M,T,K,F,W,J){const re={};for(let Ae=h;Ae<y;Ae++){const be=l.get(Ae);re.textBox={x1:be.x1,y1:be.y1,x2:be.x2,y2:be.y2,anchorPointX:be.anchorPointX,anchorPointY:be.anchorPointY},re.textFeatureIndex=be.featureIndex;break}for(let Ae=M;Ae<T;Ae++){const be=l.get(Ae);re.verticalTextBox={x1:be.x1,y1:be.y1,x2:be.x2,y2:be.y2,anchorPointX:be.anchorPointX,anchorPointY:be.anchorPointY},re.verticalTextFeatureIndex=be.featureIndex;break}for(let Ae=K;Ae<F;Ae++){const be=l.get(Ae);re.iconBox={x1:be.x1,y1:be.y1,x2:be.x2,y2:be.y2,anchorPointX:be.anchorPointX,anchorPointY:be.anchorPointY},re.iconFeatureIndex=be.featureIndex;break}for(let Ae=W;Ae<J;Ae++){const be=l.get(Ae);re.verticalIconBox={x1:be.x1,y1:be.y1,x2:be.x2,y2:be.y2,anchorPointX:be.anchorPointX,anchorPointY:be.anchorPointY},re.verticalIconFeatureIndex=be.featureIndex;break}return re}deserializeCollisionBoxes(l){this.collisionArrays=[];for(let h=0;h<this.symbolInstances.length;h++){const y=this.symbolInstances.get(h);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(l,y.textBoxStartIndex,y.textBoxEndIndex,y.verticalTextBoxStartIndex,y.verticalTextBoxEndIndex,y.iconBoxStartIndex,y.iconBoxEndIndex,y.verticalIconBoxStartIndex,y.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(l,h){const y=l.placedSymbolArray.get(h),M=y.vertexStartIndex+4*y.numGlyphs;for(let T=y.vertexStartIndex;T<M;T+=4)l.indexArray.emplaceBack(T,T+1,T+2),l.indexArray.emplaceBack(T+1,T+2,T+3)}getSortedSymbolIndexes(l){if(this.sortedAngle===l&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(l),y=Math.cos(l),M=[],T=[],K=[];for(let F=0;F<this.symbolInstances.length;++F){K.push(F);const W=this.symbolInstances.get(F);M.push(0|Math.round(h*W.anchorX+y*W.anchorY)),T.push(W.featureIndex)}return K.sort((F,W)=>M[F]-M[W]||T[W]-T[F]),K}addToSortKeyRanges(l,h){const y=this.sortKeyRanges[this.sortKeyRanges.length-1];y&&y.sortKey===h?y.symbolInstanceEnd=l+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:l,symbolInstanceEnd:l+1})}sortFeatures(l){if(this.sortFeaturesByY&&this.sortedAngle!==l&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(l),this.sortedAngle=l,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const y=this.symbolInstances.get(h);this.featureSortOrder.push(y.featureIndex),[y.rightJustifiedTextSymbolIndex,y.centerJustifiedTextSymbolIndex,y.leftJustifiedTextSymbolIndex].forEach((M,T,K)=>{M>=0&&K.indexOf(M)===T&&this.addIndicesForPlacedSymbol(this.text,M)}),y.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,y.verticalPlacedTextSymbolIndex),y.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,y.placedIconSymbolIndex),y.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,y.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Sx,Ex;Qn("SymbolBucket",mm,{omit:["layers","collisionBoxArray","features","compareText"]}),mm.MAX_GLYPHS=65535,mm.addDynamicAttributes=Xv;var tC={get paint(){return Ex=Ex||new da({"icon-opacity":new Ir(mt.paint_symbol["icon-opacity"]),"icon-color":new Ir(mt.paint_symbol["icon-color"]),"icon-halo-color":new Ir(mt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ir(mt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ir(mt.paint_symbol["icon-halo-blur"]),"icon-translate":new xr(mt.paint_symbol["icon-translate"]),"icon-translate-anchor":new xr(mt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ir(mt.paint_symbol["text-opacity"]),"text-color":new Ir(mt.paint_symbol["text-color"],{runtimeType:On,getOverride:c=>c.textColor,hasOverride:c=>!!c.textColor}),"text-halo-color":new Ir(mt.paint_symbol["text-halo-color"]),"text-halo-width":new Ir(mt.paint_symbol["text-halo-width"]),"text-halo-blur":new Ir(mt.paint_symbol["text-halo-blur"]),"text-translate":new xr(mt.paint_symbol["text-translate"]),"text-translate-anchor":new xr(mt.paint_symbol["text-translate-anchor"])})},get layout(){return Sx=Sx||new da({"symbol-placement":new xr(mt.layout_symbol["symbol-placement"]),"symbol-spacing":new xr(mt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xr(mt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ir(mt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xr(mt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xr(mt.layout_symbol["icon-allow-overlap"]),"icon-overlap":new xr(mt.layout_symbol["icon-overlap"]),"icon-ignore-placement":new xr(mt.layout_symbol["icon-ignore-placement"]),"icon-optional":new xr(mt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xr(mt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ir(mt.layout_symbol["icon-size"]),"icon-text-fit":new xr(mt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xr(mt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ir(mt.layout_symbol["icon-image"]),"icon-rotate":new Ir(mt.layout_symbol["icon-rotate"]),"icon-padding":new Ir(mt.layout_symbol["icon-padding"]),"icon-keep-upright":new xr(mt.layout_symbol["icon-keep-upright"]),"icon-offset":new Ir(mt.layout_symbol["icon-offset"]),"icon-anchor":new Ir(mt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xr(mt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xr(mt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xr(mt.layout_symbol["text-rotation-alignment"]),"text-field":new Ir(mt.layout_symbol["text-field"]),"text-font":new Ir(mt.layout_symbol["text-font"]),"text-size":new Ir(mt.layout_symbol["text-size"]),"text-max-width":new Ir(mt.layout_symbol["text-max-width"]),"text-line-height":new xr(mt.layout_symbol["text-line-height"]),"text-letter-spacing":new Ir(mt.layout_symbol["text-letter-spacing"]),"text-justify":new Ir(mt.layout_symbol["text-justify"]),"text-radial-offset":new Ir(mt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xr(mt.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ir(mt.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ir(mt.layout_symbol["text-anchor"]),"text-max-angle":new xr(mt.layout_symbol["text-max-angle"]),"text-writing-mode":new xr(mt.layout_symbol["text-writing-mode"]),"text-rotate":new Ir(mt.layout_symbol["text-rotate"]),"text-padding":new xr(mt.layout_symbol["text-padding"]),"text-keep-upright":new xr(mt.layout_symbol["text-keep-upright"]),"text-transform":new Ir(mt.layout_symbol["text-transform"]),"text-offset":new Ir(mt.layout_symbol["text-offset"]),"text-allow-overlap":new xr(mt.layout_symbol["text-allow-overlap"]),"text-overlap":new xr(mt.layout_symbol["text-overlap"]),"text-ignore-placement":new xr(mt.layout_symbol["text-ignore-placement"]),"text-optional":new xr(mt.layout_symbol["text-optional"])})}};class Ox{constructor(l){if(l.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=l.property.overrides?l.property.overrides.runtimeType:kt,this.defaultValue=l}evaluate(l){if(l.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(l.formattedSection))return h.getOverride(l.formattedSection)}return l.feature&&l.featureState?this.defaultValue.evaluate(l.feature,l.featureState):this.defaultValue.property.specification.default}eachChild(l){this.defaultValue.isConstant()||l(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Qn("FormatSectionOverride",Ox,{omit:["defaultValue"]});class pg extends ka{constructor(l){super(l,tC)}recalculate(l,h){if(super.recalculate(l,h),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const y=this.layout.get("text-writing-mode");if(y){const M=[];for(const T of y)M.indexOf(T)<0&&M.push(T);this.layout._values["text-writing-mode"]=M}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(l,h,y,M){const T=this.layout.get(l).evaluate(h,{},y,M),K=this._unevaluatedLayout._values[l];return K.isDataDriven()||To(K.value)||!T?T:function(F,W){return W.replace(/{([^{}]+)}/g,(J,re)=>F&&re in F?String(F[re]):"")}(h.properties,T)}createBucket(l){return new mm(l)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const l of tC.paint.overridableProperties){if(!pg.hasPaintOverride(this.layout,l))continue;const h=this.paint.get(l),y=new Ox(h),M=new VA(y,h.property.specification);let T=null;T=h.value.kind==="constant"||h.value.kind==="source"?new HA("source",M):new Us("composite",M,h.value.zoomStops),this.paint._values[l]=new ao(h.property,T,h.parameters)}}_handleOverridablePaintPropertyUpdate(l,h,y){return!(!this.layout||h.isDataDriven()||y.isDataDriven())&&pg.hasPaintOverride(this.layout,l)}static hasPaintOverride(l,h){const y=l.get("text-field"),M=tC.paint.properties[h];let T=!1;const K=F=>{for(const W of F)if(M.overrides&&M.overrides.hasOverride(W))return void(T=!0)};if(y.value.kind==="constant"&&y.value.value instanceof Gn)K(y.value.value.sections);else if(y.value.kind==="source"){const F=J=>{T||(J instanceof wn&&ln(J.value)===rr?K(J.value.sections):J instanceof ld?K(J.sections):J.eachChild(F))},W=y.value;W._styleExpression&&F(W._styleExpression.expression)}return T}}let Bx;var vM={get paint(){return Bx=Bx||new da({"background-color":new xr(mt.paint_background["background-color"]),"background-pattern":new Fc(mt.paint_background["background-pattern"]),"background-opacity":new xr(mt.paint_background["background-opacity"])})}};class CM extends ka{constructor(l){super(l,vM)}}let mg;var Ix={get paint(){return mg=mg||new da({"raster-opacity":new xr(mt.paint_raster["raster-opacity"]),"raster-hue-rotate":new xr(mt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xr(mt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xr(mt.paint_raster["raster-brightness-max"]),"raster-saturation":new xr(mt.paint_raster["raster-saturation"]),"raster-contrast":new xr(mt.paint_raster["raster-contrast"]),"raster-resampling":new xr(mt.paint_raster["raster-resampling"]),"raster-fade-duration":new xr(mt.paint_raster["raster-fade-duration"])})}};class _M extends ka{constructor(l){super(l,Ix)}}class bM extends ka{constructor(l){super(l,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=l}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class xM{constructor(l){this._methodToThrottle=l,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const nC=63710088e-1;class gf{constructor(l,h){if(isNaN(l)||isNaN(h))throw new Error(`Invalid LngLat object: (${l}, ${h})`);if(this.lng=+l,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new gf(fe(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(l){const h=Math.PI/180,y=this.lat*h,M=l.lat*h,T=Math.sin(y)*Math.sin(M)+Math.cos(y)*Math.cos(M)*Math.cos((l.lng-this.lng)*h);return nC*Math.acos(Math.min(T,1))}static convert(l){if(l instanceof gf)return l;if(Array.isArray(l)&&(l.length===2||l.length===3))return new gf(Number(l[0]),Number(l[1]));if(!Array.isArray(l)&&typeof l=="object"&&l!==null)return new gf(Number("lng"in l?l.lng:l.lon),Number(l.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const kx=2*Math.PI*nC;function Tx(c){return kx*Math.cos(c*Math.PI/180)}function Kx(c){return(180+c)/360}function rC(c){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+c*Math.PI/360)))/360}function Px(c,l){return c/Tx(l)}function gm(c){return 360/Math.PI*Math.atan(Math.exp((180-360*c)*Math.PI/180))-90}class gg{constructor(l,h,y=0){this.x=+l,this.y=+h,this.z=+y}static fromLngLat(l,h=0){const y=gf.convert(l);return new gg(Kx(y.lng),rC(y.lat),Px(h,y.lat))}toLngLat(){return new gf(360*this.x-180,gm(this.y))}toAltitude(){return this.z*Tx(gm(this.y))}meterInMercatorCoordinateUnits(){return 1/kx*(l=gm(this.y),1/Math.cos(l*Math.PI/180));var l}}function Dx(c,l,h){var y=2*Math.PI*6378137/256/Math.pow(2,h);return[c*y-2*Math.PI*6378137/2,l*y-2*Math.PI*6378137/2]}class iC{constructor(l,h,y){if(l<0||l>25||y<0||y>=Math.pow(2,l)||h<0||h>=Math.pow(2,l))throw new Error(`x=${h}, y=${y}, z=${l} outside of bounds. 0<=x<${Math.pow(2,l)}, 0<=y<${Math.pow(2,l)} 0<=z<=25 `);this.z=l,this.x=h,this.y=y,this.key=D0(0,l,l,h,y)}equals(l){return this.z===l.z&&this.x===l.x&&this.y===l.y}url(l,h,y){const M=(K=this.y,F=this.z,W=Dx(256*(T=this.x),256*(K=Math.pow(2,F)-K-1),F),J=Dx(256*(T+1),256*(K+1),F),W[0]+","+W[1]+","+J[0]+","+J[1]);var T,K,F,W,J;const re=function(Ae,be,Be){let De,Ge="";for(let Ze=Ae;Ze>0;Ze--)De=1<<Ze-1,Ge+=(be&De?1:0)+(Be&De?2:0);return Ge}(this.z,this.x,this.y);return l[(this.x+this.y)%l.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(y==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,h>1?"@2x":"").replace(/{quadkey}/g,re).replace(/{bbox-epsg-3857}/g,M)}isChildOf(l){const h=this.z-l.z;return h>0&&l.x===this.x>>h&&l.y===this.y>>h}getTilePoint(l){const h=Math.pow(2,this.z);return new O((l.x*h-this.x)*Di,(l.y*h-this.y)*Di)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Lx{constructor(l,h){this.wrap=l,this.canonical=h,this.key=D0(l,h.z,h.z,h.x,h.y)}}class PA{constructor(l,h,y,M,T){if(l<y)throw new Error(`overscaledZ should be >= z; overscaledZ = ${l}; z = ${y}`);this.overscaledZ=l,this.wrap=h,this.canonical=new iC(y,+M,+T),this.key=D0(h,l,y,M,T)}clone(){return new PA(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(l){return this.overscaledZ===l.overscaledZ&&this.wrap===l.wrap&&this.canonical.equals(l.canonical)}scaledTo(l){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-l;return l>this.canonical.z?new PA(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new PA(l,this.wrap,l,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(l,h){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const y=this.canonical.z-l;return l>this.canonical.z?D0(this.wrap*+h,l,this.canonical.z,this.canonical.x,this.canonical.y):D0(this.wrap*+h,l,l,this.canonical.x>>y,this.canonical.y>>y)}isChildOf(l){if(l.wrap!==this.wrap)return!1;const h=this.canonical.z-l.canonical.z;return l.overscaledZ===0||l.overscaledZ<this.overscaledZ&&l.canonical.x===this.canonical.x>>h&&l.canonical.y===this.canonical.y>>h}children(l){if(this.overscaledZ>=l)return[new PA(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,y=2*this.canonical.x,M=2*this.canonical.y;return[new PA(h,this.wrap,h,y,M),new PA(h,this.wrap,h,y+1,M),new PA(h,this.wrap,h,y,M+1),new PA(h,this.wrap,h,y+1,M+1)]}isLessThan(l){return this.wrap<l.wrap||!(this.wrap>l.wrap)&&(this.overscaledZ<l.overscaledZ||!(this.overscaledZ>l.overscaledZ)&&(this.canonical.x<l.canonical.x||!(this.canonical.x>l.canonical.x)&&this.canonical.y<l.canonical.y))}wrapped(){return new PA(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(l){return new PA(this.overscaledZ,l,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Lx(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(l){return this.canonical.getTilePoint(new gg(l.x-this.wrap,l.y))}}function D0(c,l,h,y,M){(c*=2)<0&&(c=-1*c-1);const T=1<<h;return(T*T*c+T*M+y).toString(36)+h.toString(36)+l.toString(36)}Qn("CanonicalTileID",iC),Qn("OverscaledTileID",PA,{omit:["posMatrix"]});class Fx{constructor(l,h,y,M=1,T=1,K=1,F=0){if(this.uid=l,h.height!==h.width)throw new RangeError("DEM tiles must be square");if(y&&!["mapbox","terrarium","custom"].includes(y))return void he(`"${y}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=h.height;const W=this.dim=h.height-2;switch(this.data=new Uint32Array(h.data.buffer),y){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=M,this.greenFactor=T,this.blueFactor=K,this.baseShift=F;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let J=0;J<W;J++)this.data[this._idx(-1,J)]=this.data[this._idx(0,J)],this.data[this._idx(W,J)]=this.data[this._idx(W-1,J)],this.data[this._idx(J,-1)]=this.data[this._idx(J,0)],this.data[this._idx(J,W)]=this.data[this._idx(J,W-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(W,-1)]=this.data[this._idx(W-1,0)],this.data[this._idx(-1,W)]=this.data[this._idx(0,W-1)],this.data[this._idx(W,W)]=this.data[this._idx(W-1,W-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let J=0;J<W;J++)for(let re=0;re<W;re++){const Ae=this.get(J,re);Ae>this.max&&(this.max=Ae),Ae<this.min&&(this.min=Ae)}}get(l,h){const y=new Uint8Array(this.data.buffer),M=4*this._idx(l,h);return this.unpack(y[M],y[M+1],y[M+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(l,h){if(l<-1||l>=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(l+1)}unpack(l,h,y){return l*this.redFactor+h*this.greenFactor+y*this.blueFactor-this.baseShift}getPixels(){return new pl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(l,h,y){if(this.dim!==l.dim)throw new Error("dem dimension mismatch");let M=h*this.dim,T=h*this.dim+this.dim,K=y*this.dim,F=y*this.dim+this.dim;switch(h){case-1:M=T-1;break;case 1:T=M+1}switch(y){case-1:K=F-1;break;case 1:F=K+1}const W=-h*this.dim,J=-y*this.dim;for(let re=K;re<F;re++)for(let Ae=M;Ae<T;Ae++)this.data[this._idx(Ae,re)]=l.data[this._idx(Ae+W,re+J)]}}Qn("DEMData",Fx);class Ux{constructor(l){this._stringToNumber={},this._numberToString=[];for(let h=0;h<l.length;h++){const y=l[h];this._stringToNumber[y]=h,this._numberToString[h]=y}}encode(l){return this._stringToNumber[l]}decode(l){if(l>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${l} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[l]}}class Rx{constructor(l,h,y,M,T){this.type="Feature",this._vectorTileFeature=l,l._z=h,l._x=y,l._y=M,this.properties=l.properties,this.id=T}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(l){this._geometry=l}toJSON(){const l={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(l[h]=this[h]);return l}}class zx{constructor(l,h){this.tileID=l,this.x=l.canonical.x,this.y=l.canonical.y,this.z=l.canonical.z,this.grid=new va(Di,16,0),this.grid3D=new va(Di,16,0),this.featureIndexArray=new ie,this.promoteId=h}insert(l,h,y,M,T,K){const F=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(y,M,T);const W=K?this.grid3D:this.grid;for(let J=0;J<h.length;J++){const re=h[J],Ae=[1/0,1/0,-1/0,-1/0];for(let be=0;be<re.length;be++){const Be=re[be];Ae[0]=Math.min(Ae[0],Be.x),Ae[1]=Math.min(Ae[1],Be.y),Ae[2]=Math.max(Ae[2],Be.x),Ae[3]=Math.max(Ae[3],Be.y)}Ae[0]<Di&&Ae[1]<Di&&Ae[2]>=0&&Ae[3]>=0&&W.insert(F,Ae[0],Ae[1],Ae[2],Ae[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new uA.VectorTile(new dc(this.rawTileData)).layers,this.sourceLayerCoder=new Ux(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(l,h,y,M){this.loadVTLayers();const T=l.params||{},K=Di/l.tileSize/l.scale,F=Hd(T.filter),W=l.queryGeometry,J=l.queryPadding*K,re=Nx(W),Ae=this.grid.query(re.minX-J,re.minY-J,re.maxX+J,re.maxY+J),be=Nx(l.cameraQueryGeometry),Be=this.grid3D.query(be.minX-J,be.minY-J,be.maxX+J,be.maxY+J,(Ze,at,It,ct)=>function(wt,rn,An,zn,br){for(const xn of wt)if(rn<=xn.x&&An<=xn.y&&zn>=xn.x&&br>=xn.y)return!0;const Xn=[new O(rn,An),new O(rn,br),new O(zn,br),new O(zn,An)];if(wt.length>2){for(const xn of Xn)if(aA(wt,xn))return!0}for(let xn=0;xn<wt.length-1;xn++)if(_0(wt[xn],wt[xn+1],Xn))return!0;return!1}(l.cameraQueryGeometry,Ze-J,at-J,It+J,ct+J));for(const Ze of Be)Ae.push(Ze);Ae.sort(wM);const De={};let Ge;for(let Ze=0;Ze<Ae.length;Ze++){const at=Ae[Ze];if(at===Ge)continue;Ge=at;const It=this.featureIndexArray.get(at);let ct=null;this.loadMatchingFeature(De,It.bucketIndex,It.sourceLayerIndex,It.featureIndex,F,T.layers,T.availableImages,h,y,M,(wt,rn,An)=>(ct||(ct=cu(wt)),rn.queryIntersectsFeature(W,wt,An,ct,this.z,l.transform,K,l.pixelPosMatrix)))}return De}loadMatchingFeature(l,h,y,M,T,K,F,W,J,re,Ae){const be=this.bucketLayerIDs[h];if(K&&!function(Ze,at){for(let It=0;It<Ze.length;It++)if(at.indexOf(Ze[It])>=0)return!0;return!1}(K,be))return;const Be=this.sourceLayerCoder.decode(y),De=this.vtLayers[Be].feature(M);if(T.needGeometry){const Ze=Ac(De,!0);if(!T.filter(new Mo(this.tileID.overscaledZ),Ze,this.tileID.canonical))return}else if(!T.filter(new Mo(this.tileID.overscaledZ),De))return;const Ge=this.getId(De,Be);for(let Ze=0;Ze<be.length;Ze++){const at=be[Ze];if(K&&K.indexOf(at)<0)continue;const It=W[at];if(!It)continue;let ct={};Ge&&re&&(ct=re.getState(It.sourceLayer||"_geojsonTileLayer",Ge));const wt=X({},J[at]);wt.paint=jx(wt.paint,It.paint,De,ct,F),wt.layout=jx(wt.layout,It.layout,De,ct,F);const rn=!Ae||Ae(De,It,ct);if(!rn)continue;const An=new Rx(De,this.z,this.x,this.y,Ge);An.layer=wt;let zn=l[at];zn===void 0&&(zn=l[at]=[]),zn.push({featureIndex:M,feature:An,intersectionZ:rn})}}lookupSymbolFeatures(l,h,y,M,T,K,F,W){const J={};this.loadVTLayers();const re=Hd(T);for(const Ae of l)this.loadMatchingFeature(J,y,M,Ae,re,K,F,W,h);return J}hasLayer(l){for(const h of this.bucketLayerIDs)for(const y of h)if(l===y)return!0;return!1}getId(l,h){let y=l.id;return this.promoteId&&(y=l.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[h]],typeof y=="boolean"&&(y=Number(y))),y}}function jx(c,l,h,y,M){return Ce(c,(T,K)=>{const F=l instanceof ca?l.get(K):null;return F&&F.evaluate?F.evaluate(h,y,M):F})}function Nx(c){let l=1/0,h=1/0,y=-1/0,M=-1/0;for(const T of c)l=Math.min(l,T.x),h=Math.min(h,T.y),y=Math.max(y,T.x),M=Math.max(M,T.y);return{minX:l,minY:h,maxX:y,maxY:M}}function wM(c,l){return l-c}function Wx(c,l,h,y,M){const T=[];for(let K=0;K<c.length;K++){const F=c[K];let W;for(let J=0;J<F.length-1;J++){let re=F[J],Ae=F[J+1];re.x<l&&Ae.x<l||(re.x<l?re=new O(l,re.y+(l-re.x)/(Ae.x-re.x)*(Ae.y-re.y))._round():Ae.x<l&&(Ae=new O(l,re.y+(l-re.x)/(Ae.x-re.x)*(Ae.y-re.y))._round()),re.y<h&&Ae.y<h||(re.y<h?re=new O(re.x+(h-re.y)/(Ae.y-re.y)*(Ae.x-re.x),h)._round():Ae.y<h&&(Ae=new O(re.x+(h-re.y)/(Ae.y-re.y)*(Ae.x-re.x),h)._round()),re.x>=y&&Ae.x>=y||(re.x>=y?re=new O(y,re.y+(y-re.x)/(Ae.x-re.x)*(Ae.y-re.y))._round():Ae.x>=y&&(Ae=new O(y,re.y+(y-re.x)/(Ae.x-re.x)*(Ae.y-re.y))._round()),re.y>=M&&Ae.y>=M||(re.y>=M?re=new O(re.x+(M-re.y)/(Ae.y-re.y)*(Ae.x-re.x),M)._round():Ae.y>=M&&(Ae=new O(re.x+(M-re.y)/(Ae.y-re.y)*(Ae.x-re.x),M)._round()),W&&re.equals(W[W.length-1])||(W=[re],T.push(W)),W.push(Ae)))))}}return T}Qn("FeatureIndex",zx,{omit:["rawTileData","sourceLayerCoder"]});class yf extends O{constructor(l,h,y,M){super(l,h),this.angle=y,M!==void 0&&(this.segment=M)}clone(){return new yf(this.x,this.y,this.angle,this.segment)}}function Gx(c,l,h,y,M){if(l.segment===void 0||h===0)return!0;let T=l,K=l.segment+1,F=0;for(;F>-h/2;){if(K--,K<0)return!1;F-=c[K].dist(T),T=c[K]}F+=c[K].dist(c[K+1]),K++;const W=[];let J=0;for(;F<h/2;){const re=c[K],Ae=c[K+1];if(!Ae)return!1;let be=c[K-1].angleTo(re)-re.angleTo(Ae);for(be=Math.abs((be+3*Math.PI)%(2*Math.PI)-Math.PI),W.push({distance:F,angleDelta:be}),J+=be;F-W[0].distance>y;)J-=W.shift().angleDelta;if(J>M)return!1;K++,F+=re.dist(Ae)}return!0}function oC(c){let l=0;for(let h=0;h<c.length-1;h++)l+=c[h].dist(c[h+1]);return l}function aC(c,l,h){return c?.6*l*h:0}function $x(c,l){return Math.max(c?c.right-c.left:0,l?l.right-l.left:0)}function MM(c,l,h,y,M,T){const K=aC(h,M,T),F=$x(h,y)*T;let W=0;const J=oC(c)/2;for(let re=0;re<c.length-1;re++){const Ae=c[re],be=c[re+1],Be=Ae.dist(be);if(W+Be>J){const De=(J-W)/Be,Ge=vt.number(Ae.x,be.x,De),Ze=vt.number(Ae.y,be.y,De),at=new yf(Ge,Ze,be.angleTo(Ae),re);return at._round(),!K||Gx(c,at,F,K,l)?at:void 0}W+=Be}}function SM(c,l,h,y,M,T,K,F,W){const J=aC(y,T,K),re=$x(y,M),Ae=re*K,be=c[0].x===0||c[0].x===W||c[0].y===0||c[0].y===W;return l-Ae<l/4&&(l=Ae+l/4),Qx(c,be?l/2*F%l:(re/2+2*T)*K*F%l,l,J,h,Ae,be,!1,W)}function Qx(c,l,h,y,M,T,K,F,W){const J=T/2,re=oC(c);let Ae=0,be=l-h,Be=[];for(let De=0;De<c.length-1;De++){const Ge=c[De],Ze=c[De+1],at=Ge.dist(Ze),It=Ze.angleTo(Ge);for(;be+h<Ae+at;){be+=h;const ct=(be-Ae)/at,wt=vt.number(Ge.x,Ze.x,ct),rn=vt.number(Ge.y,Ze.y,ct);if(wt>=0&&wt<W&&rn>=0&&rn<W&&be-J>=0&&be+J<=re){const An=new yf(wt,rn,It,De);An._round(),y&&!Gx(c,An,T,y,M)||Be.push(An)}}Ae+=at}return F||Be.length||K||(Be=Qx(c,Ae/2,h,y,M,T,K,!0,W)),Be}Qn("Anchor",yf);const mh=Va;function Yx(c,l,h,y){const M=[],T=c.image,K=T.pixelRatio,F=T.paddedRect.w-2*mh,W=T.paddedRect.h-2*mh,J=c.right-c.left,re=c.bottom-c.top,Ae=T.stretchX||[[0,F]],be=T.stretchY||[[0,W]],Be=(mn,ur)=>mn+ur[1]-ur[0],De=Ae.reduce(Be,0),Ge=be.reduce(Be,0),Ze=F-De,at=W-Ge;let It=0,ct=De,wt=0,rn=Ge,An=0,zn=Ze,br=0,Xn=at;if(T.content&&y){const mn=T.content;It=yg(Ae,0,mn[0]),wt=yg(be,0,mn[1]),ct=yg(Ae,mn[0],mn[2]),rn=yg(be,mn[1],mn[3]),An=mn[0]-It,br=mn[1]-wt,zn=mn[2]-mn[0]-ct,Xn=mn[3]-mn[1]-rn}const xn=(mn,ur,jn,Sn)=>{const Lr=vg(mn.stretch-It,ct,J,c.left),Mr=Cg(mn.fixed-An,zn,mn.stretch,De),ji=vg(ur.stretch-wt,rn,re,c.top),fa=Cg(ur.fixed-br,Xn,ur.stretch,Ge),pa=vg(jn.stretch-It,ct,J,c.left),Ua=Cg(jn.fixed-An,zn,jn.stretch,De),fu=vg(Sn.stretch-wt,rn,re,c.top),pu=Cg(Sn.fixed-br,Xn,Sn.stretch,Ge),hs=new O(Lr,ji),ks=new O(pa,ji),Xo=new O(pa,fu),Gs=new O(Lr,fu),mu=new O(Mr/K,fa/K),$s=new O(Ua/K,pu/K),Qs=l*Math.PI/180;if(Qs){const Bl=Math.sin(Qs),fs=Math.cos(Qs),Jr=[fs,-Bl,Bl,fs];hs._matMult(Jr),ks._matMult(Jr),Gs._matMult(Jr),Xo._matMult(Jr)}const $l=mn.stretch+mn.fixed,gu=ur.stretch+ur.fixed;return{tl:hs,tr:ks,bl:Gs,br:Xo,tex:{x:T.paddedRect.x+mh+$l,y:T.paddedRect.y+mh+gu,w:jn.stretch+jn.fixed-$l,h:Sn.stretch+Sn.fixed-gu},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:mu,pixelOffsetBR:$s,minFontScaleX:zn/K/J,minFontScaleY:Xn/K/re,isSDF:h}};if(y&&(T.stretchX||T.stretchY)){const mn=qx(Ae,Ze,De),ur=qx(be,at,Ge);for(let jn=0;jn<mn.length-1;jn++){const Sn=mn[jn],Lr=mn[jn+1];for(let Mr=0;Mr<ur.length-1;Mr++)M.push(xn(Sn,ur[Mr],Lr,ur[Mr+1]))}}else M.push(xn({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:F+1},{fixed:0,stretch:W+1}));return M}function yg(c,l,h){let y=0;for(const M of c)y+=Math.max(l,Math.min(h,M[1]))-Math.max(l,Math.min(h,M[0]));return y}function qx(c,l,h){const y=[{fixed:-mh,stretch:0}];for(const[M,T]of c){const K=y[y.length-1];y.push({fixed:M-K.stretch,stretch:K.stretch}),y.push({fixed:M-K.stretch,stretch:K.stretch+(T-M)})}return y.push({fixed:l+mh,stretch:h}),y}function vg(c,l,h,y){return c/l*h+y}function Cg(c,l,h,y){return c-l*h/y}class _g{constructor(l,h,y,M,T,K,F,W,J,re){if(this.boxStartIndex=l.length,J){let Ae=K.top,be=K.bottom;const Be=K.collisionPadding;Be&&(Ae-=Be[1],be+=Be[3]);let De=be-Ae;De>0&&(De=Math.max(10,De),this.circleDiameter=De)}else{let Ae=K.top*F-W[0],be=K.bottom*F+W[2],Be=K.left*F-W[3],De=K.right*F+W[1];const Ge=K.collisionPadding;if(Ge&&(Be-=Ge[0]*F,Ae-=Ge[1]*F,De+=Ge[2]*F,be+=Ge[3]*F),re){const Ze=new O(Be,Ae),at=new O(De,Ae),It=new O(Be,be),ct=new O(De,be),wt=re*Math.PI/180;Ze._rotate(wt),at._rotate(wt),It._rotate(wt),ct._rotate(wt),Be=Math.min(Ze.x,at.x,It.x,ct.x),De=Math.max(Ze.x,at.x,It.x,ct.x),Ae=Math.min(Ze.y,at.y,It.y,ct.y),be=Math.max(Ze.y,at.y,It.y,ct.y)}l.emplaceBack(h.x,h.y,Be,Ae,De,be,y,M,T)}this.boxEndIndex=l.length}}class EM{constructor(l=[],h=OM){if(this.data=l,this.length=this.data.length,this.compare=h,this.length>0)for(let y=(this.length>>1)-1;y>=0;y--)this._down(y)}push(l){this.data.push(l),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const l=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),l}peek(){return this.data[0]}_up(l){const{data:h,compare:y}=this,M=h[l];for(;l>0;){const T=l-1>>1,K=h[T];if(y(M,K)>=0)break;h[l]=K,l=T}h[l]=M}_down(l){const{data:h,compare:y}=this,M=this.length>>1,T=h[l];for(;l<M;){let K=1+(l<<1),F=h[K];const W=K+1;if(W<this.length&&y(h[W],F)<0&&(K=W,F=h[W]),y(F,T)>=0)break;h[l]=F,l=K}h[l]=T}}function OM(c,l){return c<l?-1:c>l?1:0}function BM(c,l=1,h=!1){let y=1/0,M=1/0,T=-1/0,K=-1/0;const F=c[0];for(let Be=0;Be<F.length;Be++){const De=F[Be];(!Be||De.x<y)&&(y=De.x),(!Be||De.y<M)&&(M=De.y),(!Be||De.x>T)&&(T=De.x),(!Be||De.y>K)&&(K=De.y)}const W=Math.min(T-y,K-M);let J=W/2;const re=new EM([],IM);if(W===0)return new O(y,M);for(let Be=y;Be<T;Be+=W)for(let De=M;De<K;De+=W)re.push(new ym(Be+J,De+J,J,c));let Ae=function(Be){let De=0,Ge=0,Ze=0;const at=Be[0];for(let It=0,ct=at.length,wt=ct-1;It<ct;wt=It++){const rn=at[It],An=at[wt],zn=rn.x*An.y-An.x*rn.y;Ge+=(rn.x+An.x)*zn,Ze+=(rn.y+An.y)*zn,De+=3*zn}return new ym(Ge/De,Ze/De,0,Be)}(c),be=re.length;for(;re.length;){const Be=re.pop();(Be.d>Ae.d||!Ae.d)&&(Ae=Be,h&&console.log("found best %d after %d probes",Math.round(1e4*Be.d)/1e4,be)),Be.max-Ae.d<=l||(J=Be.h/2,re.push(new ym(Be.p.x-J,Be.p.y-J,J,c)),re.push(new ym(Be.p.x+J,Be.p.y-J,J,c)),re.push(new ym(Be.p.x-J,Be.p.y+J,J,c)),re.push(new ym(Be.p.x+J,Be.p.y+J,J,c)),be+=4)}return h&&(console.log(`num probes: ${be}`),console.log(`best distance: ${Ae.d}`)),Ae.p}function IM(c,l){return l.max-c.max}function ym(c,l,h,y){this.p=new O(c,l),this.h=h,this.d=function(M,T){let K=!1,F=1/0;for(let W=0;W<T.length;W++){const J=T[W];for(let re=0,Ae=J.length,be=Ae-1;re<Ae;be=re++){const Be=J[re],De=J[be];Be.y>M.y!=De.y>M.y&&M.x<(De.x-Be.x)*(M.y-Be.y)/(De.y-Be.y)+Be.x&&(K=!K),F=Math.min(F,vd(M,Be,De))}}return(K?1:-1)*Math.sqrt(F)}(this.p,y),this.max=this.d+this.h*Math.SQRT2}var Ws;a.ap=void 0,(Ws=a.ap||(a.ap={}))[Ws.center=1]="center",Ws[Ws.left=2]="left",Ws[Ws.right=3]="right",Ws[Ws.top=4]="top",Ws[Ws.bottom=5]="bottom",Ws[Ws["top-left"]=6]="top-left",Ws[Ws["top-right"]=7]="top-right",Ws[Ws["bottom-left"]=8]="bottom-left",Ws[Ws["bottom-right"]=9]="bottom-right";const vf=7,bg=Number.POSITIVE_INFINITY;function sC(c,l){return l[1]!==bg?function(h,y,M){let T=0,K=0;switch(y=Math.abs(y),M=Math.abs(M),h){case"top-right":case"top-left":case"top":K=M-vf;break;case"bottom-right":case"bottom-left":case"bottom":K=-M+vf}switch(h){case"top-right":case"bottom-right":case"right":T=-y;break;case"top-left":case"bottom-left":case"left":T=y}return[T,K]}(c,l[0],l[1]):function(h,y){let M=0,T=0;y<0&&(y=0);const K=y/Math.SQRT2;switch(h){case"top-right":case"top-left":T=K-vf;break;case"bottom-right":case"bottom-left":T=-K+vf;break;case"bottom":T=-y+vf;break;case"top":T=y-vf}switch(h){case"top-right":case"bottom-right":M=-K;break;case"top-left":case"bottom-left":M=K;break;case"left":M=y;break;case"right":M=-y}return[M,T]}(c,l[0])}function xg(c,l,h){var y;const M=c.layout,T=(y=M.get("text-variable-anchor-offset"))===null||y===void 0?void 0:y.evaluate(l,{},h);if(T){const F=T.values,W=[];for(let J=0;J<F.length;J+=2){const re=W[J]=F[J],Ae=F[J+1].map(be=>be*Nt);re.startsWith("top")?Ae[1]-=vf:re.startsWith("bottom")&&(Ae[1]+=vf),W[J+1]=Ae}return new Ri(W)}const K=M.get("text-variable-anchor");if(K){let F;F=c._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[M.get("text-radial-offset").evaluate(l,{},h)*Nt,bg]:M.get("text-offset").evaluate(l,{},h).map(J=>J*Nt);const W=[];for(const J of K)W.push(J,sC(J,F));return new Ri(W)}return null}function wg(c){switch(c){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Vx(c,l,h,y,M,T,K,F,W,J,re){let Ae=T.textMaxSize.evaluate(l,{});Ae===void 0&&(Ae=K);const be=c.layers[0].layout,Be=be.get("icon-offset").evaluate(l,{},re),De=uC(h.horizontal),Ge=K/24,Ze=c.tilePixelRatio*Ge,at=c.tilePixelRatio*Ae/24,It=c.tilePixelRatio*F,ct=c.tilePixelRatio*be.get("symbol-spacing"),wt=be.get("text-padding")*c.tilePixelRatio,rn=function(Sn,Lr,Mr,ji=1){const fa=Sn.get("icon-padding").evaluate(Lr,{},Mr),pa=fa&&fa.values;return[pa[0]*ji,pa[1]*ji,pa[2]*ji,pa[3]*ji]}(be,l,re,c.tilePixelRatio),An=be.get("text-max-angle")/180*Math.PI,zn=be.get("text-rotation-alignment")!=="viewport"&&be.get("symbol-placement")!=="point",br=be.get("icon-rotation-alignment")==="map"&&be.get("symbol-placement")!=="point",Xn=be.get("symbol-placement"),xn=ct/2,mn=be.get("icon-text-fit");let ur;y&&mn!=="none"&&(c.allowVerticalPlacement&&h.vertical&&(ur=wx(y,h.vertical,mn,be.get("icon-text-fit-padding"),Be,Ge)),De&&(y=wx(y,De,mn,be.get("icon-text-fit-padding"),Be,Ge)));const jn=(Sn,Lr)=>{Lr.x<0||Lr.x>=Di||Lr.y<0||Lr.y>=Di||function(Mr,ji,fa,pa,Ua,fu,pu,hs,ks,Xo,Gs,mu,$s,Qs,$l,gu,Bl,fs,Jr,Ts,oi,Il,kl,pi,pc){const mc=Mr.addToLineVertexArray(ji,fa);let AA,gh,gc,DA,Lu=0,yh=0,R0=0,Zx=0,pC=-1,mC=-1;const vh={};let Xx=Wr("");if(Mr.allowVerticalPlacement&&pa.vertical){const Ql=hs.layout.get("text-rotate").evaluate(oi,{},pi)+90;gc=new _g(ks,ji,Xo,Gs,mu,pa.vertical,$s,Qs,$l,Ql),pu&&(DA=new _g(ks,ji,Xo,Gs,mu,pu,Bl,fs,$l,Ql))}if(Ua){const Ql=hs.layout.get("icon-rotate").evaluate(oi,{}),LA=hs.layout.get("icon-text-fit")!=="none",Cf=Yx(Ua,Ql,kl,LA),Wc=pu?Yx(pu,Ql,kl,LA):void 0;gh=new _g(ks,ji,Xo,Gs,mu,Ua,Bl,fs,!1,Ql),Lu=4*Cf.length;const _p=Mr.iconSizeData;let Od=null;_p.kind==="source"?(Od=[Ed*hs.layout.get("icon-size").evaluate(oi,{})],Od[0]>mf&&he(`${Mr.layerIds[0]}: Value for "icon-size" is >= ${Cp}. Reduce your "icon-size".`)):_p.kind==="composite"&&(Od=[Ed*Il.compositeIconSizes[0].evaluate(oi,{},pi),Ed*Il.compositeIconSizes[1].evaluate(oi,{},pi)],(Od[0]>mf||Od[1]>mf)&&he(`${Mr.layerIds[0]}: Value for "icon-size" is >= ${Cp}. Reduce your "icon-size".`)),Mr.addSymbols(Mr.icon,Cf,Od,Ts,Jr,oi,a.ah.none,ji,mc.lineStartIndex,mc.lineLength,-1,pi),pC=Mr.icon.placedSymbolArray.length-1,Wc&&(yh=4*Wc.length,Mr.addSymbols(Mr.icon,Wc,Od,Ts,Jr,oi,a.ah.vertical,ji,mc.lineStartIndex,mc.lineLength,-1,pi),mC=Mr.icon.placedSymbolArray.length-1)}const Jx=Object.keys(pa.horizontal);for(const Ql of Jx){const LA=pa.horizontal[Ql];if(!AA){Xx=Wr(LA.text);const Wc=hs.layout.get("text-rotate").evaluate(oi,{},pi);AA=new _g(ks,ji,Xo,Gs,mu,LA,$s,Qs,$l,Wc)}const Cf=LA.positionedLines.length===1;if(R0+=lC(Mr,ji,LA,fu,hs,$l,oi,gu,mc,pa.vertical?a.ah.horizontal:a.ah.horizontalOnly,Cf?Jx:[Ql],vh,pC,Il,pi),Cf)break}pa.vertical&&(Zx+=lC(Mr,ji,pa.vertical,fu,hs,$l,oi,gu,mc,a.ah.vertical,["vertical"],vh,mC,Il,pi));const KM=AA?AA.boxStartIndex:Mr.collisionBoxArray.length,gC=AA?AA.boxEndIndex:Mr.collisionBoxArray.length,PM=gc?gc.boxStartIndex:Mr.collisionBoxArray.length,yC=gc?gc.boxEndIndex:Mr.collisionBoxArray.length,DM=gh?gh.boxStartIndex:Mr.collisionBoxArray.length,LM=gh?gh.boxEndIndex:Mr.collisionBoxArray.length,FM=DA?DA.boxStartIndex:Mr.collisionBoxArray.length,Tl=DA?DA.boxEndIndex:Mr.collisionBoxArray.length;let Ha=-1;const Og=(Ql,LA)=>Ql&&Ql.circleDiameter?Math.max(Ql.circleDiameter,LA):LA;Ha=Og(AA,Ha),Ha=Og(gc,Ha),Ha=Og(gh,Ha),Ha=Og(DA,Ha);const e2=Ha>-1?1:0;e2&&(Ha*=pc/Nt),Mr.glyphOffsetArray.length>=mm.MAX_GLYPHS&&he("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),oi.sortKey!==void 0&&Mr.addToSortKeyRanges(Mr.symbolInstances.length,oi.sortKey);const UM=xg(hs,oi,pi),[t2,RM]=function(Ql,LA){const Cf=Ql.length,Wc=LA==null?void 0:LA.values;if((Wc==null?void 0:Wc.length)>0)for(let _p=0;_p<Wc.length;_p+=2){const Od=Wc[_p+1];Ql.emplaceBack(a.ap[Wc[_p]],Od[0],Od[1])}return[Cf,Ql.length]}(Mr.textAnchorOffsets,UM);Mr.symbolInstances.emplaceBack(ji.x,ji.y,vh.right>=0?vh.right:-1,vh.center>=0?vh.center:-1,vh.left>=0?vh.left:-1,vh.vertical||-1,pC,mC,Xx,KM,gC,PM,yC,DM,LM,FM,Tl,Xo,R0,Zx,Lu,yh,e2,0,$s,Ha,t2,RM)}(c,Lr,Sn,h,y,M,ur,c.layers[0],c.collisionBoxArray,l.index,l.sourceLayerIndex,c.index,Ze,[wt,wt,wt,wt],zn,W,It,rn,br,Be,l,T,J,re,K)};if(Xn==="line")for(const Sn of Wx(l.geometry,0,0,Di,Di)){const Lr=SM(Sn,ct,An,h.vertical||De,y,24,at,c.overscaling,Di);for(const Mr of Lr)De&&kM(c,De.text,xn,Mr)||jn(Sn,Mr)}else if(Xn==="line-center"){for(const Sn of l.geometry)if(Sn.length>1){const Lr=MM(Sn,An,h.vertical||De,y,24,at);Lr&&jn(Sn,Lr)}}else if(l.type==="Polygon")for(const Sn of uh(l.geometry,0)){const Lr=BM(Sn,16);jn(Sn[0],new yf(Lr.x,Lr.y,0))}else if(l.type==="LineString")for(const Sn of l.geometry)jn(Sn,new yf(Sn[0].x,Sn[0].y,0));else if(l.type==="Point")for(const Sn of l.geometry)for(const Lr of Sn)jn([Lr],new yf(Lr.x,Lr.y,0))}function lC(c,l,h,y,M,T,K,F,W,J,re,Ae,be,Be,De){const Ge=function(It,ct,wt,rn,An,zn,br,Xn){const xn=rn.layout.get("text-rotate").evaluate(zn,{})*Math.PI/180,mn=[];for(const ur of ct.positionedLines)for(const jn of ur.positionedGlyphs){if(!jn.rect)continue;const Sn=jn.rect||{};let Lr=TA+1,Mr=!0,ji=1,fa=0;const pa=(An||Xn)&&jn.vertical,Ua=jn.metrics.advance*jn.scale/2;if(Xn&&ct.verticalizable&&(fa=ur.lineOffset/2-(jn.imageName?-(Nt-jn.metrics.width*jn.scale)/2:(jn.scale-1)*Nt)),jn.imageName){const Ts=br[jn.imageName];Mr=Ts.sdf,ji=Ts.pixelRatio,Lr=Va/ji}const fu=An?[jn.x+Ua,jn.y]:[0,0];let pu=An?[0,0]:[jn.x+Ua+wt[0],jn.y+wt[1]-fa],hs=[0,0];pa&&(hs=pu,pu=[0,0]);const ks=jn.metrics.isDoubleResolution?2:1,Xo=(jn.metrics.left-Lr)*jn.scale-Ua+pu[0],Gs=(-jn.metrics.top-Lr)*jn.scale+pu[1],mu=Xo+Sn.w/ks*jn.scale/ji,$s=Gs+Sn.h/ks*jn.scale/ji,Qs=new O(Xo,Gs),$l=new O(mu,Gs),gu=new O(Xo,$s),Bl=new O(mu,$s);if(pa){const Ts=new O(-Ua,Ua-fm),oi=-Math.PI/2,Il=Nt/2-Ua,kl=new O(5-fm-Il,-(jn.imageName?Il:0)),pi=new O(...hs);Qs._rotateAround(oi,Ts)._add(kl)._add(pi),$l._rotateAround(oi,Ts)._add(kl)._add(pi),gu._rotateAround(oi,Ts)._add(kl)._add(pi),Bl._rotateAround(oi,Ts)._add(kl)._add(pi)}if(xn){const Ts=Math.sin(xn),oi=Math.cos(xn),Il=[oi,-Ts,Ts,oi];Qs._matMult(Il),$l._matMult(Il),gu._matMult(Il),Bl._matMult(Il)}const fs=new O(0,0),Jr=new O(0,0);mn.push({tl:Qs,tr:$l,bl:gu,br:Bl,tex:Sn,writingMode:ct.writingMode,glyphOffset:fu,sectionIndex:jn.sectionIndex,isSDF:Mr,pixelOffsetTL:fs,pixelOffsetBR:Jr,minFontScaleX:0,minFontScaleY:0})}return mn}(0,h,F,M,T,K,y,c.allowVerticalPlacement),Ze=c.textSizeData;let at=null;Ze.kind==="source"?(at=[Ed*M.layout.get("text-size").evaluate(K,{})],at[0]>mf&&he(`${c.layerIds[0]}: Value for "text-size" is >= ${Cp}. Reduce your "text-size".`)):Ze.kind==="composite"&&(at=[Ed*Be.compositeTextSizes[0].evaluate(K,{},De),Ed*Be.compositeTextSizes[1].evaluate(K,{},De)],(at[0]>mf||at[1]>mf)&&he(`${c.layerIds[0]}: Value for "text-size" is >= ${Cp}. Reduce your "text-size".`)),c.addSymbols(c.text,Ge,at,F,T,K,J,l,W.lineStartIndex,W.lineLength,be,De);for(const It of re)Ae[It]=c.text.placedSymbolArray.length-1;return 4*Ge.length}function uC(c){for(const l in c)return c[l];return null}function kM(c,l,h,y){const M=c.compareText;if(l in M){const T=M[l];for(let K=T.length-1;K>=0;K--)if(y.dist(T[K])<h)return!0}else M[l]=[];return M[l].push(y),!1}const Hx=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class AC{static from(l){if(!(l instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[h,y]=new Uint8Array(l,0,2);if(h!==219)throw new Error("Data does not appear to be in a KDBush format.");const M=y>>4;if(M!==1)throw new Error(`Got v${M} data when expected v1.`);const T=Hx[15&y];if(!T)throw new Error("Unrecognized array type.");const[K]=new Uint16Array(l,2,1),[F]=new Uint32Array(l,4,1);return new AC(F,K,T,l)}constructor(l,h=64,y=Float64Array,M){if(isNaN(l)||l<0)throw new Error(`Unpexpected numItems value: ${l}.`);this.numItems=+l,this.nodeSize=Math.min(Math.max(+h,2),65535),this.ArrayType=y,this.IndexArrayType=l<65536?Uint16Array:Uint32Array;const T=Hx.indexOf(this.ArrayType),K=2*l*this.ArrayType.BYTES_PER_ELEMENT,F=l*this.IndexArrayType.BYTES_PER_ELEMENT,W=(8-F%8)%8;if(T<0)throw new Error(`Unexpected typed array class: ${y}.`);M&&M instanceof ArrayBuffer?(this.data=M,this.ids=new this.IndexArrayType(this.data,8,l),this.coords=new this.ArrayType(this.data,8+F+W,2*l),this._pos=2*l,this._finished=!0):(this.data=new ArrayBuffer(8+K+F+W),this.ids=new this.IndexArrayType(this.data,8,l),this.coords=new this.ArrayType(this.data,8+F+W,2*l),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+T]),new Uint16Array(this.data,2,1)[0]=h,new Uint32Array(this.data,4,1)[0]=l)}add(l,h){const y=this._pos>>1;return this.ids[y]=y,this.coords[this._pos++]=l,this.coords[this._pos++]=h,y}finish(){const l=this._pos>>1;if(l!==this.numItems)throw new Error(`Added ${l} items when expected ${this.numItems}.`);return vm(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(l,h,y,M){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:T,coords:K,nodeSize:F}=this,W=[0,T.length-1,0],J=[];for(;W.length;){const re=W.pop()||0,Ae=W.pop()||0,be=W.pop()||0;if(Ae-be<=F){for(let Ze=be;Ze<=Ae;Ze++){const at=K[2*Ze],It=K[2*Ze+1];at>=l&&at<=y&&It>=h&&It<=M&&J.push(T[Ze])}continue}const Be=be+Ae>>1,De=K[2*Be],Ge=K[2*Be+1];De>=l&&De<=y&&Ge>=h&&Ge<=M&&J.push(T[Be]),(re===0?l<=De:h<=Ge)&&(W.push(be),W.push(Be-1),W.push(1-re)),(re===0?y>=De:M>=Ge)&&(W.push(Be+1),W.push(Ae),W.push(1-re))}return J}within(l,h,y){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:M,coords:T,nodeSize:K}=this,F=[0,M.length-1,0],W=[],J=y*y;for(;F.length;){const re=F.pop()||0,Ae=F.pop()||0,be=F.pop()||0;if(Ae-be<=K){for(let Ze=be;Ze<=Ae;Ze++)Mg(T[2*Ze],T[2*Ze+1],l,h)<=J&&W.push(M[Ze]);continue}const Be=be+Ae>>1,De=T[2*Be],Ge=T[2*Be+1];Mg(De,Ge,l,h)<=J&&W.push(M[Be]),(re===0?l-y<=De:h-y<=Ge)&&(F.push(be),F.push(Be-1),F.push(1-re)),(re===0?l+y>=De:h+y>=Ge)&&(F.push(Be+1),F.push(Ae),F.push(1-re))}return W}}function vm(c,l,h,y,M,T){if(M-y<=h)return;const K=y+M>>1;L0(c,l,K,y,M,T),vm(c,l,h,y,K-1,1-T),vm(c,l,h,K+1,M,1-T)}function L0(c,l,h,y,M,T){for(;M>y;){if(M-y>600){const J=M-y+1,re=h-y+1,Ae=Math.log(J),be=.5*Math.exp(2*Ae/3),Be=.5*Math.sqrt(Ae*be*(J-be)/J)*(re-J/2<0?-1:1);L0(c,l,h,Math.max(y,Math.floor(h-re*be/J+Be)),Math.min(M,Math.floor(h+(J-re)*be/J+Be)),T)}const K=l[2*h+T];let F=y,W=M;for(F0(c,l,y,h),l[2*M+T]>K&&F0(c,l,y,M);F<W;){for(F0(c,l,F,W),F++,W--;l[2*F+T]<K;)F++;for(;l[2*W+T]>K;)W--}l[2*y+T]===K?F0(c,l,y,W):(W++,F0(c,l,W,M)),W<=h&&(y=W+1),h<=W&&(M=W-1)}}function F0(c,l,h,y){cC(c,h,y),cC(l,2*h,2*y),cC(l,2*h+1,2*y+1)}function cC(c,l,h){const y=c[l];c[l]=c[h],c[h]=y}function Mg(c,l,h,y){const M=c-h,T=l-y;return M*M+T*T}var Sg;a.bd=void 0,(Sg=a.bd||(a.bd={})).create="create",Sg.load="load",Sg.fullLoad="fullLoad";let Eg=null,U0=[];const dC=1e3/60,hC="loadTime",fC="fullLoadTime",TM={mark(c){performance.mark(c)},frame(c){const l=c;Eg!=null&&U0.push(l-Eg),Eg=l},clearMetrics(){Eg=null,U0=[],performance.clearMeasures(hC),performance.clearMeasures(fC);for(const c in a.bd)performance.clearMarks(a.bd[c])},getPerformanceMetrics(){performance.measure(hC,a.bd.create,a.bd.load),performance.measure(fC,a.bd.create,a.bd.fullLoad);const c=performance.getEntriesByName(hC)[0].duration,l=performance.getEntriesByName(fC)[0].duration,h=U0.length,y=1/(U0.reduce((T,K)=>T+K,0)/h/1e3),M=U0.filter(T=>T>dC).reduce((T,K)=>T+(K-dC)/dC,0);return{loadTime:c,fullLoadTime:l,fps:y,percentDroppedFrames:M/(h+M)*100,totalFrames:h}}};a.$=pn,a.A=oh,a.B=function(c){if(yt==null){const l=c.navigator?c.navigator.userAgent:null;yt=!!c.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return yt},a.C=class{constructor(c,l){this.target=c,this.mapId=l,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new xM(()=>this.process()),this.subscription=function(h,y,M,T){return h.addEventListener(y,M,!1),{unsubscribe:()=>{h.removeEventListener(y,M,!1)}}}(this.target,"message",h=>this.receive(h)),this.globalScope=gt(self)?c:window}registerMessageHandler(c,l){this.messageHandlers[c]=l}sendAsync(c,l){return new Promise((h,y)=>{const M=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[M]={resolve:h,reject:y},l&&l.signal.addEventListener("abort",()=>{delete this.resolveRejects[M];const F={id:M,type:"<cancel>",origin:location.origin,targetMapId:c.targetMapId,sourceMapId:this.mapId};this.target.postMessage(F)},{once:!0});const T=[],K=Object.assign(Object.assign({},c),{id:M,sourceMapId:this.mapId,origin:location.origin,data:Vu(c.data,T)});this.target.postMessage(K,{transfer:T})})}receive(c){const l=c.data,h=l.id;if(!(l.origin!=="file://"&&location.origin!=="file://"&&l.origin!==location.origin||l.targetMapId&&this.mapId!==l.targetMapId)){if(l.type==="<cancel>"){delete this.tasks[h];const y=this.abortControllers[h];return delete this.abortControllers[h],void(y&&y.abort())}if(gt(self)||l.mustQueue)return this.tasks[h]=l,this.taskQueue.push(h),void this.invoker.trigger();this.processTask(h,l)}}process(){if(this.taskQueue.length===0)return;const c=this.taskQueue.shift(),l=this.tasks[c];delete this.tasks[c],this.taskQueue.length>0&&this.invoker.trigger(),l&&this.processTask(c,l)}processTask(c,l){return s(this,void 0,void 0,function*(){if(l.type==="<response>"){const M=this.resolveRejects[c];return delete this.resolveRejects[c],M?void(l.error?M.reject(ec(l.error)):M.resolve(ec(l.data))):void 0}if(!this.messageHandlers[l.type])return void this.completeTask(c,new Error(`Could not find a registered handler for ${l.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const h=ec(l.data),y=new AbortController;this.abortControllers[c]=y;try{const M=yield this.messageHandlers[l.type](l.sourceMapId,h,y);this.completeTask(c,null,M)}catch(M){this.completeTask(c,M)}})}completeTask(c,l,h){const y=[];delete this.abortControllers[c];const M={id:c,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:l?Vu(l):null,data:Vu(h,y)};this.target.postMessage(M,{transfer:y})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.D=xr,a.E=zt,a.F=function(){var c=new oh(16);return oh!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[11]=0,c[12]=0,c[13]=0,c[14]=0),c[0]=1,c[5]=1,c[10]=1,c[15]=1,c},a.G=Yt,a.H=function(c,l,h){var y,M,T,K,F,W,J,re,Ae,be,Be,De,Ge=h[0],Ze=h[1],at=h[2];return l===c?(c[12]=l[0]*Ge+l[4]*Ze+l[8]*at+l[12],c[13]=l[1]*Ge+l[5]*Ze+l[9]*at+l[13],c[14]=l[2]*Ge+l[6]*Ze+l[10]*at+l[14],c[15]=l[3]*Ge+l[7]*Ze+l[11]*at+l[15]):(M=l[1],T=l[2],K=l[3],F=l[4],W=l[5],J=l[6],re=l[7],Ae=l[8],be=l[9],Be=l[10],De=l[11],c[0]=y=l[0],c[1]=M,c[2]=T,c[3]=K,c[4]=F,c[5]=W,c[6]=J,c[7]=re,c[8]=Ae,c[9]=be,c[10]=Be,c[11]=De,c[12]=y*Ge+F*Ze+Ae*at+l[12],c[13]=M*Ge+W*Ze+be*at+l[13],c[14]=T*Ge+J*Ze+Be*at+l[14],c[15]=K*Ge+re*Ze+De*at+l[15]),c},a.I=nl,a.J=function(c,l,h){var y=h[0],M=h[1],T=h[2];return c[0]=l[0]*y,c[1]=l[1]*y,c[2]=l[2]*y,c[3]=l[3]*y,c[4]=l[4]*M,c[5]=l[5]*M,c[6]=l[6]*M,c[7]=l[7]*M,c[8]=l[8]*T,c[9]=l[9]*T,c[10]=l[10]*T,c[11]=l[11]*T,c[12]=l[12],c[13]=l[13],c[14]=l[14],c[15]=l[15],c},a.K=nm,a.L=function(c,l){const h={};for(let y=0;y<l.length;y++){const M=l[y];M in c&&(h[M]=c[M])}return h},a.M=gf,a.N=Kx,a.O=rC,a.P=O,a.Q=PA,a.R=pl,a.S=Q,a.T=rp,a.U=N,a.V=Re,a.W=Di,a.X=Qo,a.Y=gg,a.Z=class extends El{},a._=s,a.a=bt,a.a$=function(c,l,h){return c[0]=l[0]*h[0],c[1]=l[1]*h[1],c[2]=l[2]*h[2],c[3]=l[3]*h[3],c},a.a0=iC,a.a1=V,a.a2=c=>{const l=window.document.createElement("video");return l.muted=!0,new Promise(h=>{l.onloadstart=()=>{h(l)};for(const y of c){const M=window.document.createElement("source");ze(y)||(l.crossOrigin="Anonymous"),M.src=y,l.appendChild(M)}})},a.a3=function(){return oe++},a.a4=Vh,a.a5=mm,a.a6=Hd,a.a7=Ac,a.a8=Mo,a.a9=Rx,a.aA=Te,a.aB=function(c,l){if(!c)return[{command:"setStyle",args:[l]}];let h=[];try{if(!yn(c.version,l.version))return[{command:"setStyle",args:[l]}];yn(c.center,l.center)||h.push({command:"setCenter",args:[l.center]}),yn(c.zoom,l.zoom)||h.push({command:"setZoom",args:[l.zoom]}),yn(c.bearing,l.bearing)||h.push({command:"setBearing",args:[l.bearing]}),yn(c.pitch,l.pitch)||h.push({command:"setPitch",args:[l.pitch]}),yn(c.sprite,l.sprite)||h.push({command:"setSprite",args:[l.sprite]}),yn(c.glyphs,l.glyphs)||h.push({command:"setGlyphs",args:[l.glyphs]}),yn(c.transition,l.transition)||h.push({command:"setTransition",args:[l.transition]}),yn(c.light,l.light)||h.push({command:"setLight",args:[l.light]}),yn(c.terrain,l.terrain)||h.push({command:"setTerrain",args:[l.terrain]}),yn(c.sky,l.sky)||h.push({command:"setSky",args:[l.sky]});const y={},M=[];(function(K,F,W,J){let re;for(re in F=F||{},K=K||{})Object.prototype.hasOwnProperty.call(K,re)&&(Object.prototype.hasOwnProperty.call(F,re)||Sr(re,W,J));for(re in F)Object.prototype.hasOwnProperty.call(F,re)&&(Object.prototype.hasOwnProperty.call(K,re)?yn(K[re],F[re])||(K[re].type==="geojson"&&F[re].type==="geojson"&&yr(K,F,re)?tr(W,{command:"setGeoJSONSourceData",args:[re,F[re].data]}):Nr(re,F,W,J)):dr(re,F,W))})(c.sources,l.sources,M,y);const T=[];c.layers&&c.layers.forEach(K=>{"source"in K&&y[K.source]?h.push({command:"removeLayer",args:[K.id]}):T.push(K)}),h=h.concat(M),function(K,F,W){F=F||[];const J=(K=K||[]).map(Ee),re=F.map(Ee),Ae=K.reduce(ee,{}),be=F.reduce(ee,{}),Be=J.slice(),De=Object.create(null);let Ge,Ze,at,It,ct;for(let wt=0,rn=0;wt<J.length;wt++)Ge=J[wt],Object.prototype.hasOwnProperty.call(be,Ge)?rn++:(tr(W,{command:"removeLayer",args:[Ge]}),Be.splice(Be.indexOf(Ge,rn),1));for(let wt=0,rn=0;wt<re.length;wt++)Ge=re[re.length-1-wt],Be[Be.length-1-wt]!==Ge&&(Object.prototype.hasOwnProperty.call(Ae,Ge)?(tr(W,{command:"removeLayer",args:[Ge]}),Be.splice(Be.lastIndexOf(Ge,Be.length-rn),1)):rn++,It=Be[Be.length-wt],tr(W,{command:"addLayer",args:[be[Ge],It]}),Be.splice(Be.length-wt,0,Ge),De[Ge]=!0);for(let wt=0;wt<re.length;wt++)if(Ge=re[wt],Ze=Ae[Ge],at=be[Ge],!De[Ge]&&!yn(Ze,at))if(yn(Ze.source,at.source)&&yn(Ze["source-layer"],at["source-layer"])&&yn(Ze.type,at.type)){for(ct in _i(Ze.layout,at.layout,W,Ge,null,"setLayoutProperty"),_i(Ze.paint,at.paint,W,Ge,null,"setPaintProperty"),yn(Ze.filter,at.filter)||tr(W,{command:"setFilter",args:[Ge,at.filter]}),yn(Ze.minzoom,at.minzoom)&&yn(Ze.maxzoom,at.maxzoom)||tr(W,{command:"setLayerZoomRange",args:[Ge,at.minzoom,at.maxzoom]}),Ze)Object.prototype.hasOwnProperty.call(Ze,ct)&&ct!=="layout"&&ct!=="paint"&&ct!=="filter"&&ct!=="metadata"&&ct!=="minzoom"&&ct!=="maxzoom"&&(ct.indexOf("paint.")===0?_i(Ze[ct],at[ct],W,Ge,ct.slice(6),"setPaintProperty"):yn(Ze[ct],at[ct])||tr(W,{command:"setLayerProperty",args:[Ge,ct,at[ct]]}));for(ct in at)Object.prototype.hasOwnProperty.call(at,ct)&&!Object.prototype.hasOwnProperty.call(Ze,ct)&&ct!=="layout"&&ct!=="paint"&&ct!=="filter"&&ct!=="metadata"&&ct!=="minzoom"&&ct!=="maxzoom"&&(ct.indexOf("paint.")===0?_i(Ze[ct],at[ct],W,Ge,ct.slice(6),"setPaintProperty"):yn(Ze[ct],at[ct])||tr(W,{command:"setLayerProperty",args:[Ge,ct,at[ct]]}))}else tr(W,{command:"removeLayer",args:[Ge]}),It=Be[Be.lastIndexOf(Ge)+1],tr(W,{command:"addLayer",args:[at,It]})}(T,l.layers,h)}catch(y){console.warn("Unable to compute style diff:",y),h=[{command:"setStyle",args:[l]}]}return h},a.aC=function(c){const l=[],h=c.id;return h===void 0&&l.push({message:`layers.${h}: missing required property "id"`}),c.render===void 0&&l.push({message:`layers.${h}: missing required method "render"`}),c.renderingMode&&c.renderingMode!=="2d"&&c.renderingMode!=="3d"&&l.push({message:`layers.${h}: property "renderingMode" must be either "2d" or "3d"`}),l},a.aD=function c(l,h){if(Array.isArray(l)){if(!Array.isArray(h)||l.length!==h.length)return!1;for(let y=0;y<l.length;y++)if(!c(l[y],h[y]))return!1;return!0}if(typeof l=="object"&&l!==null&&h!==null){if(typeof h!="object"||Object.keys(l).length!==Object.keys(h).length)return!1;for(const y in l)if(!c(l[y],h[y]))return!1;return!0}return l===h},a.aE=Ce,a.aF=we,a.aG=class extends mo{constructor(c,l){super(c,l),this.current=0}set(c){this.current!==c&&(this.current=c,this.gl.uniform1i(this.location,c))}},a.aH=so,a.aI=class extends mo{constructor(c,l){super(c,l),this.current=Ms}set(c){if(c[12]!==this.current[12]||c[0]!==this.current[0])return this.current=c,void this.gl.uniformMatrix4fv(this.location,!1,c);for(let l=1;l<16;l++)if(c[l]!==this.current[l]){this.current=c,this.gl.uniformMatrix4fv(this.location,!1,c);break}}},a.aJ=Js,a.aK=class extends mo{constructor(c,l){super(c,l),this.current=[0,0,0]}set(c){c[0]===this.current[0]&&c[1]===this.current[1]&&c[2]===this.current[2]||(this.current=c,this.gl.uniform3f(this.location,c[0],c[1],c[2]))}},a.aL=class extends mo{constructor(c,l){super(c,l),this.current=[0,0]}set(c){c[0]===this.current[0]&&c[1]===this.current[1]||(this.current=c,this.gl.uniform2f(this.location,c[0],c[1]))}},a.aM=Au,a.aN=function(c,l,h,y,M,T,K){var F=1/(l-h),W=1/(y-M),J=1/(T-K);return c[0]=-2*F,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=-2*W,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=2*J,c[11]=0,c[12]=(l+h)*F,c[13]=(M+y)*W,c[14]=(K+T)*J,c[15]=1,c},a.aO=Ei,a.aP=rm,a.aQ=class extends Ca{},a.aR=nt,a.aS=class extends pd{},a.aT=function(c){return c<=1?1:Math.pow(2,Math.ceil(Math.log(c)/Math.LN2))},a.aU=Cd,a.aV=de,a.aW=class extends Wl{},a.aX=Ut,a.aY=function(c,l){return c[0]===l[0]&&c[1]===l[1]&&c[2]===l[2]&&c[3]===l[3]&&c[4]===l[4]&&c[5]===l[5]&&c[6]===l[6]&&c[7]===l[7]&&c[8]===l[8]&&c[9]===l[9]&&c[10]===l[10]&&c[11]===l[11]&&c[12]===l[12]&&c[13]===l[13]&&c[14]===l[14]&&c[15]===l[15]},a.aZ=function(c,l){var h=c[0],y=c[1],M=c[2],T=c[3],K=c[4],F=c[5],W=c[6],J=c[7],re=c[8],Ae=c[9],be=c[10],Be=c[11],De=c[12],Ge=c[13],Ze=c[14],at=c[15],It=l[0],ct=l[1],wt=l[2],rn=l[3],An=l[4],zn=l[5],br=l[6],Xn=l[7],xn=l[8],mn=l[9],ur=l[10],jn=l[11],Sn=l[12],Lr=l[13],Mr=l[14],ji=l[15];return Math.abs(h-It)<=fl*Math.max(1,Math.abs(h),Math.abs(It))&&Math.abs(y-ct)<=fl*Math.max(1,Math.abs(y),Math.abs(ct))&&Math.abs(M-wt)<=fl*Math.max(1,Math.abs(M),Math.abs(wt))&&Math.abs(T-rn)<=fl*Math.max(1,Math.abs(T),Math.abs(rn))&&Math.abs(K-An)<=fl*Math.max(1,Math.abs(K),Math.abs(An))&&Math.abs(F-zn)<=fl*Math.max(1,Math.abs(F),Math.abs(zn))&&Math.abs(W-br)<=fl*Math.max(1,Math.abs(W),Math.abs(br))&&Math.abs(J-Xn)<=fl*Math.max(1,Math.abs(J),Math.abs(Xn))&&Math.abs(re-xn)<=fl*Math.max(1,Math.abs(re),Math.abs(xn))&&Math.abs(Ae-mn)<=fl*Math.max(1,Math.abs(Ae),Math.abs(mn))&&Math.abs(be-ur)<=fl*Math.max(1,Math.abs(be),Math.abs(ur))&&Math.abs(Be-jn)<=fl*Math.max(1,Math.abs(Be),Math.abs(jn))&&Math.abs(De-Sn)<=fl*Math.max(1,Math.abs(De),Math.abs(Sn))&&Math.abs(Ge-Lr)<=fl*Math.max(1,Math.abs(Ge),Math.abs(Lr))&&Math.abs(Ze-Mr)<=fl*Math.max(1,Math.abs(Ze),Math.abs(Mr))&&Math.abs(at-ji)<=fl*Math.max(1,Math.abs(at),Math.abs(ji))},a.a_=function(c,l){return c[0]=l[0],c[1]=l[1],c[2]=l[2],c[3]=l[3],c[4]=l[4],c[5]=l[5],c[6]=l[6],c[7]=l[7],c[8]=l[8],c[9]=l[9],c[10]=l[10],c[11]=l[11],c[12]=l[12],c[13]=l[13],c[14]=l[14],c[15]=l[15],c},a.aa=function(c){const l={};if(c.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,y,M,T)=>{const K=M||T;return l[y]=!K||K.toLowerCase(),""}),l["max-age"]){const h=parseInt(l["max-age"],10);isNaN(h)?delete l["max-age"]:l["max-age"]=h}return l},a.ab=function(c,l){const h=[];for(const y in c)y in l||h.push(y);return h},a.ac=pe,a.ad=function(c,l,h){var y=Math.sin(h),M=Math.cos(h),T=l[0],K=l[1],F=l[2],W=l[3],J=l[4],re=l[5],Ae=l[6],be=l[7];return l!==c&&(c[8]=l[8],c[9]=l[9],c[10]=l[10],c[11]=l[11],c[12]=l[12],c[13]=l[13],c[14]=l[14],c[15]=l[15]),c[0]=T*M+J*y,c[1]=K*M+re*y,c[2]=F*M+Ae*y,c[3]=W*M+be*y,c[4]=J*M-T*y,c[5]=re*M-K*y,c[6]=Ae*M-F*y,c[7]=be*M-W*y,c},a.ae=function(c){var l=new oh(16);return l[0]=c[0],l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=c[6],l[7]=c[7],l[8]=c[8],l[9]=c[9],l[10]=c[10],l[11]=c[11],l[12]=c[12],l[13]=c[13],l[14]=c[14],l[15]=c[15],l},a.af=im,a.ag=function(c,l){let h=0,y=0;if(c.kind==="constant")y=c.layoutSize;else if(c.kind!=="source"){const{interpolationType:M,minZoom:T,maxZoom:K}=c,F=M?pe($n.interpolationFactor(M,l,T,K),0,1):0;c.kind==="camera"?y=vt.number(c.minSize,c.maxSize,F):h=F}return{uSizeT:h,uSize:y}},a.ai=function(c,{uSize:l,uSizeT:h},{lowerSize:y,upperSize:M}){return c.kind==="source"?y/Ed:c.kind==="composite"?vt.number(y/Ed,M/Ed,h):l},a.aj=Xv,a.ak=function(c,l,h,y){const M=l.y-c.y,T=l.x-c.x,K=y.y-h.y,F=y.x-h.x,W=K*T-F*M;if(W===0)return null;const J=(F*(c.y-h.y)-K*(c.x-h.x))/W;return new O(c.x+J*T,c.y+J*M)},a.al=Wx,a.am=Tu,a.an=b0,a.ao=Nt,a.aq=Zv,a.ar=function(c,l){var h=l[0],y=l[1],M=l[2],T=l[3],K=l[4],F=l[5],W=l[6],J=l[7],re=l[8],Ae=l[9],be=l[10],Be=l[11],De=l[12],Ge=l[13],Ze=l[14],at=l[15],It=h*F-y*K,ct=h*W-M*K,wt=h*J-T*K,rn=y*W-M*F,An=y*J-T*F,zn=M*J-T*W,br=re*Ge-Ae*De,Xn=re*Ze-be*De,xn=re*at-Be*De,mn=Ae*Ze-be*Ge,ur=Ae*at-Be*Ge,jn=be*at-Be*Ze,Sn=It*jn-ct*ur+wt*mn+rn*xn-An*Xn+zn*br;return Sn?(c[0]=(F*jn-W*ur+J*mn)*(Sn=1/Sn),c[1]=(M*ur-y*jn-T*mn)*Sn,c[2]=(Ge*zn-Ze*An+at*rn)*Sn,c[3]=(be*An-Ae*zn-Be*rn)*Sn,c[4]=(W*xn-K*jn-J*Xn)*Sn,c[5]=(h*jn-M*xn+T*Xn)*Sn,c[6]=(Ze*wt-De*zn-at*ct)*Sn,c[7]=(re*zn-be*wt+Be*ct)*Sn,c[8]=(K*ur-F*xn+J*br)*Sn,c[9]=(y*xn-h*ur-T*br)*Sn,c[10]=(De*An-Ge*wt+at*It)*Sn,c[11]=(Ae*wt-re*An-Be*It)*Sn,c[12]=(F*Xn-K*mn-W*br)*Sn,c[13]=(h*mn-y*Xn+M*br)*Sn,c[14]=(Ge*ct-De*rn-Ze*It)*Sn,c[15]=(re*rn-Ae*ct+be*It)*Sn,c):null},a.as=wg,a.at=Hv,a.au=AC,a.av=function(){const c={},l=mt.$version;for(const h in mt.$root){const y=mt.$root[h];if(y.required){let M=null;M=h==="version"?l:y.type==="array"?[]:{},M!=null&&(c[h]=M)}}return c},a.aw=Hu,a.ax=ge,a.ay=function(c){c=c.slice();const l=Object.create(null);for(let h=0;h<c.length;h++)l[c[h].id]=c[h];for(let h=0;h<c.length;h++)"ref"in c[h]&&(c[h]=gn(c[h],l[c[h].ref]));return c},a.az=function(c){if(c.type==="custom")return new bM(c);switch(c.type){case"background":return new CM(c);case"circle":return new x0(c);case"fill":return new Am(c);case"fill-extrusion":return new Sd(c);case"heatmap":return new ah(c);case"hillshade":return new Ku(c);case"line":return new U(c);case"raster":return new _M(c);case"symbol":return new pg(c)}},a.b=st,a.b0=function(c,l){return c[0]*l[0]+c[1]*l[1]+c[2]*l[2]+c[3]*l[3]},a.b1=fe,a.b2=Lx,a.b3=Px,a.b4=function(c,l,h,y,M){var T,K=1/Math.tan(l/2);return c[0]=K/h,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=K,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[11]=-1,c[12]=0,c[13]=0,c[15]=0,M!=null&&M!==1/0?(c[10]=(M+y)*(T=1/(y-M)),c[14]=2*M*y*T):(c[10]=-1,c[14]=-2*y),c},a.b5=function(c,l,h){var y=Math.sin(h),M=Math.cos(h),T=l[4],K=l[5],F=l[6],W=l[7],J=l[8],re=l[9],Ae=l[10],be=l[11];return l!==c&&(c[0]=l[0],c[1]=l[1],c[2]=l[2],c[3]=l[3],c[12]=l[12],c[13]=l[13],c[14]=l[14],c[15]=l[15]),c[4]=T*M+J*y,c[5]=K*M+re*y,c[6]=F*M+Ae*y,c[7]=W*M+be*y,c[8]=J*M-T*y,c[9]=re*M-K*y,c[10]=Ae*M-F*y,c[11]=be*M-W*y,c},a.b6=Z,a.b7=ae,a.b8=function(c){return c*Math.PI/180},a.b9=function(c,l){return c[0]=l[0],c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=l[1],c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=l[2],c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},a.bA=eA,a.ba=class extends rA{},a.bb=nC,a.bc=TM,a.be=ke,a.bf=function(c,l){bt.REGISTERED_PROTOCOLS[c]=l},a.bg=function(c){delete bt.REGISTERED_PROTOCOLS[c]},a.bh=function(c,l){const h={};for(let M=0;M<c.length;M++){const T=l&&l[c[M].id]||Rl(c[M]);l&&(l[c[M].id]=T);let K=h[T];K||(K=h[T]=[]),K.push(c[M])}const y=[];for(const M in h)y.push(h[M]);return y},a.bi=Qn,a.bj=Ux,a.bk=zx,a.bl=ph,a.bm=function(c){c.bucket.createArrays(),c.bucket.tilePixelRatio=Di/(512*c.bucket.overscaling),c.bucket.compareText={},c.bucket.iconsNeedLinear=!1;const l=c.bucket.layers[0],h=l.layout,y=l._unevaluatedLayout._values,M={layoutIconSize:y["icon-size"].possiblyEvaluate(new Mo(c.bucket.zoom+1),c.canonical),layoutTextSize:y["text-size"].possiblyEvaluate(new Mo(c.bucket.zoom+1),c.canonical),textMaxSize:y["text-size"].possiblyEvaluate(new Mo(18))};if(c.bucket.textSizeData.kind==="composite"){const{minZoom:J,maxZoom:re}=c.bucket.textSizeData;M.compositeTextSizes=[y["text-size"].possiblyEvaluate(new Mo(J),c.canonical),y["text-size"].possiblyEvaluate(new Mo(re),c.canonical)]}if(c.bucket.iconSizeData.kind==="composite"){const{minZoom:J,maxZoom:re}=c.bucket.iconSizeData;M.compositeIconSizes=[y["icon-size"].possiblyEvaluate(new Mo(J),c.canonical),y["icon-size"].possiblyEvaluate(new Mo(re),c.canonical)]}const T=h.get("text-line-height")*Nt,K=h.get("text-rotation-alignment")!=="viewport"&&h.get("symbol-placement")!=="point",F=h.get("text-keep-upright"),W=h.get("text-size");for(const J of c.bucket.features){const re=h.get("text-font").evaluate(J,{},c.canonical).join(","),Ae=W.evaluate(J,{},c.canonical),be=M.layoutTextSize.evaluate(J,{},c.canonical),Be=M.layoutIconSize.evaluate(J,{},c.canonical),De={horizontal:{},vertical:void 0},Ge=J.text;let Ze,at=[0,0];if(Ge){const wt=Ge.toString(),rn=h.get("text-letter-spacing").evaluate(J,{},c.canonical)*Nt,An=Zu(wt)?rn:0,zn=h.get("text-anchor").evaluate(J,{},c.canonical),br=xg(l,J,c.canonical);if(!br){const jn=h.get("text-radial-offset").evaluate(J,{},c.canonical);at=jn?sC(zn,[jn*Nt,bg]):h.get("text-offset").evaluate(J,{},c.canonical).map(Sn=>Sn*Nt)}let Xn=K?"center":h.get("text-justify").evaluate(J,{},c.canonical);const xn=h.get("symbol-placement"),mn=xn==="point"?h.get("text-max-width").evaluate(J,{},c.canonical)*Nt:0,ur=()=>{c.bucket.allowVerticalPlacement&&tc(wt)&&(De.vertical=cg(Ge,c.glyphMap,c.glyphPositions,c.imagePositions,re,mn,T,zn,"left",An,at,a.ah.vertical,!0,xn,be,Ae))};if(!K&&br){const jn=new Set;if(Xn==="auto")for(let Lr=0;Lr<br.values.length;Lr+=2)jn.add(wg(br.values[Lr]));else jn.add(Xn);let Sn=!1;for(const Lr of jn)if(!De.horizontal[Lr])if(Sn)De.horizontal[Lr]=De.horizontal[0];else{const Mr=cg(Ge,c.glyphMap,c.glyphPositions,c.imagePositions,re,mn,T,"center",Lr,An,at,a.ah.horizontal,!1,xn,be,Ae);Mr&&(De.horizontal[Lr]=Mr,Sn=Mr.positionedLines.length===1)}ur()}else{Xn==="auto"&&(Xn=wg(zn));const jn=cg(Ge,c.glyphMap,c.glyphPositions,c.imagePositions,re,mn,T,zn,Xn,An,at,a.ah.horizontal,!1,xn,be,Ae);jn&&(De.horizontal[Xn]=jn),ur(),tc(wt)&&K&&F&&(De.vertical=cg(Ge,c.glyphMap,c.glyphPositions,c.imagePositions,re,mn,T,zn,Xn,An,at,a.ah.vertical,!1,xn,be,Ae))}}let It=!1;if(J.icon&&J.icon.name){const wt=c.imageMap[J.icon.name];wt&&(Ze=pM(c.imagePositions[J.icon.name],h.get("icon-offset").evaluate(J,{},c.canonical),h.get("icon-anchor").evaluate(J,{},c.canonical)),It=!!wt.sdf,c.bucket.sdfIcons===void 0?c.bucket.sdfIcons=It:c.bucket.sdfIcons!==It&&he("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(wt.pixelRatio!==c.bucket.pixelRatio||h.get("icon-rotate").constantOr(1)!==0)&&(c.bucket.iconsNeedLinear=!0))}const ct=uC(De.horizontal)||De.vertical;c.bucket.iconsInText=!!ct&&ct.iconsInText,(ct||Ze)&&Vx(c.bucket,J,De,Ze,c.imageMap,M,be,Be,at,It,c.canonical)}c.showCollisionBoxes&&c.bucket.generateCollisionDebugBuffers()},a.bn=pf,a.bo=Af,a.bp=hh,a.bq=uA,a.br=dc,a.bs=class{constructor(c){this._marks={start:[c.url,"start"].join("#"),end:[c.url,"end"].join("#"),measure:c.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let c=performance.getEntriesByName(this._marks.measure);return c.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),c=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),c}},a.bt=function(c,l,h,y,M){return s(this,void 0,void 0,function*(){if(N())try{return yield Re(c,l,h,y,M)}catch{}return function(T,K,F,W,J){const re=T.width,Ae=T.height;Ve&&Xe||(Ve=new OffscreenCanvas(re,Ae),Xe=Ve.getContext("2d",{willReadFrequently:!0})),Ve.width=re,Ve.height=Ae,Xe.drawImage(T,0,0,re,Ae);const be=Xe.getImageData(K,F,W,J);return Xe.clearRect(0,0,re,Ae),be.data}(c,l,h,y,M)})},a.bu=Fx,a.bv=d,a.bw=f,a.bx=cn,a.by=Fo,a.bz=function(c){return c.message===Jt},a.c=Ht,a.d=c=>s(void 0,void 0,void 0,function*(){if(c.byteLength===0)return createImageBitmap(new ImageData(1,1));const l=new Blob([new Uint8Array(c)],{type:"image/png"});try{return createImageBitmap(l)}catch(h){throw new Error(`Could not load image because of ${h.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),a.e=X,a.f=c=>new Promise((l,h)=>{const y=new Image;y.onload=()=>{l(y),URL.revokeObjectURL(y.src),y.onload=null,window.requestAnimationFrame(()=>{y.src=ft})},y.onerror=()=>h(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const M=new Blob([new Uint8Array(c)],{type:"image/png"});y.src=c.byteLength?URL.createObjectURL(M):ft}),a.g=Qt,a.h=(c,l)=>Se(X(c,{type:"json"}),l),a.i=gt,a.j=Rt,a.k=St,a.l=(c,l)=>Se(X(c,{type:"arrayBuffer"}),l),a.m=Se,a.n=function(c){return new dc(c).readFields(hc,[])},a.o=La,a.p=Nc,a.q=da,a.r=Gh,a.s=ze,a.t=JA,a.u=Jn,a.v=mt,a.w=he,a.x=Hi,a.y=function([c,l,h]){return l+=90,l*=Math.PI/180,h*=Math.PI/180,{x:c*Math.cos(l)*Math.sin(h),y:c*Math.sin(l)*Math.sin(h),z:c*Math.cos(h)}},a.z=vt}),i("worker",["./shared"],function(a){class s{constructor(ce){this.keyCache={},ce&&this.replace(ce)}replace(ce){this._layerConfigs={},this._layers={},this.update(ce,[])}update(ce,xe){for(const je of ce){this._layerConfigs[je.id]=je;const rt=this._layers[je.id]=a.az(je);rt._featureFilter=a.a6(rt.filter),this.keyCache[je.id]&&delete this.keyCache[je.id]}for(const je of xe)delete this.keyCache[je],delete this._layerConfigs[je],delete this._layers[je];this.familiesBySource={};const Ie=a.bh(Object.values(this._layerConfigs),this.keyCache);for(const je of Ie){const rt=je.map(qt=>this._layers[qt.id]),lt=rt[0];if(lt.visibility==="none")continue;const pt=lt.source||"";let et=this.familiesBySource[pt];et||(et=this.familiesBySource[pt]={});const Mt=lt.sourceLayer||"_geojsonTileLayer";let tn=et[Mt];tn||(tn=et[Mt]=[]),tn.push(rt)}}}class d{constructor(ce){const xe={},Ie=[];for(const pt in ce){const et=ce[pt],Mt=xe[pt]={};for(const tn in et){const qt=et[+tn];if(!qt||qt.bitmap.width===0||qt.bitmap.height===0)continue;const en={x:0,y:0,w:qt.bitmap.width+2,h:qt.bitmap.height+2};Ie.push(en),Mt[tn]={rect:en,metrics:qt.metrics}}}const{w:je,h:rt}=a.p(Ie),lt=new a.o({width:je||1,height:rt||1});for(const pt in ce){const et=ce[pt];for(const Mt in et){const tn=et[+Mt];if(!tn||tn.bitmap.width===0||tn.bitmap.height===0)continue;const qt=xe[pt][Mt].rect;a.o.copy(tn.bitmap,lt,{x:0,y:0},{x:qt.x+1,y:qt.y+1},tn.bitmap)}}this.image=lt,this.positions=xe}}a.bi("GlyphAtlas",d);class f{constructor(ce){this.tileID=new a.Q(ce.tileID.overscaledZ,ce.tileID.wrap,ce.tileID.canonical.z,ce.tileID.canonical.x,ce.tileID.canonical.y),this.uid=ce.uid,this.zoom=ce.zoom,this.pixelRatio=ce.pixelRatio,this.tileSize=ce.tileSize,this.source=ce.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=ce.showCollisionBoxes,this.collectResourceTiming=!!ce.collectResourceTiming,this.returnDependencies=!!ce.returnDependencies,this.promoteId=ce.promoteId,this.inFlightDependencies=[]}parse(ce,xe,Ie,je){return a._(this,void 0,void 0,function*(){this.status="parsing",this.data=ce,this.collisionBoxArray=new a.a4;const rt=new a.bj(Object.keys(ce.layers).sort()),lt=new a.bk(this.tileID,this.promoteId);lt.bucketLayerIDs=[];const pt={},et={featureIndex:lt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ie},Mt=xe.familiesBySource[this.source];for(const ar in Mt){const di=ce.layers[ar];if(!di)continue;di.version===1&&a.w(`Vector tile source "${this.source}" layer "${ar}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Ui=rt.encode(ar),to=[];for(let ho=0;ho<di.length;ho++){const si=di.feature(ho),fo=lt.getId(si,ar);to.push({feature:si,id:fo,index:ho,sourceLayerIndex:Ui})}for(const ho of Mt[ar]){const si=ho[0];si.source!==this.source&&a.w(`layer.source = ${si.source} does not equal this.source = ${this.source}`),si.minzoom&&this.zoom<Math.floor(si.minzoom)||si.maxzoom&&this.zoom>=si.maxzoom||si.visibility!=="none"&&(C(ho,this.zoom,Ie),(pt[si.id]=si.createBucket({index:lt.bucketLayerIDs.length,layers:ho,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ui,sourceID:this.source})).populate(to,et,this.tileID.canonical),lt.bucketLayerIDs.push(ho.map(fo=>fo.id)))}}const tn=a.aE(et.glyphDependencies,ar=>Object.keys(ar).map(Number));this.inFlightDependencies.forEach(ar=>ar==null?void 0:ar.abort()),this.inFlightDependencies=[];let qt=Promise.resolve({});if(Object.keys(tn).length){const ar=new AbortController;this.inFlightDependencies.push(ar),qt=je.sendAsync({type:"getGlyphs",data:{stacks:tn,source:this.source,tileID:this.tileID,type:"glyphs"}},ar)}const en=Object.keys(et.iconDependencies);let Fn=Promise.resolve({});if(en.length){const ar=new AbortController;this.inFlightDependencies.push(ar),Fn=je.sendAsync({type:"getImages",data:{icons:en,source:this.source,tileID:this.tileID,type:"icons"}},ar)}const Bn=Object.keys(et.patternDependencies);let Hn=Promise.resolve({});if(Bn.length){const ar=new AbortController;this.inFlightDependencies.push(ar),Hn=je.sendAsync({type:"getImages",data:{icons:Bn,source:this.source,tileID:this.tileID,type:"patterns"}},ar)}const[Or,cr,Qr]=yield Promise.all([qt,Fn,Hn]),Br=new d(Or),Fr=new a.bl(cr,Qr);for(const ar in pt){const di=pt[ar];di instanceof a.a5?(C(di.layers,this.zoom,Ie),a.bm({bucket:di,glyphMap:Or,glyphPositions:Br.positions,imageMap:cr,imagePositions:Fr.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):di.hasPattern&&(di instanceof a.bn||di instanceof a.bo||di instanceof a.bp)&&(C(di.layers,this.zoom,Ie),di.addFeatures(et,this.tileID.canonical,Fr.patternPositions))}return this.status="done",{buckets:Object.values(pt).filter(ar=>!ar.isEmpty()),featureIndex:lt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Br.image,imageAtlas:Fr,glyphMap:this.returnDependencies?Or:null,iconMap:this.returnDependencies?cr:null,glyphPositions:this.returnDependencies?Br.positions:null}})}}function C(Le,ce,xe){const Ie=new a.a8(ce);for(const je of Le)je.recalculate(Ie,xe)}class O{constructor(ce,xe,Ie){this.actor=ce,this.layerIndex=xe,this.availableImages=Ie,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(ce,xe){return a._(this,void 0,void 0,function*(){const Ie=yield a.l(ce.request,xe);try{return{vectorTile:new a.bq.VectorTile(new a.br(Ie.data)),rawData:Ie.data,cacheControl:Ie.cacheControl,expires:Ie.expires}}catch(je){const rt=new Uint8Array(Ie.data);let lt=`Unable to parse the tile at ${ce.request.url}, `;throw lt+=rt[0]===31&&rt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${je.messge}`,new Error(lt)}})}loadTile(ce){return a._(this,void 0,void 0,function*(){const xe=ce.uid,Ie=!!(ce&&ce.request&&ce.request.collectResourceTiming)&&new a.bs(ce.request),je=new f(ce);this.loading[xe]=je;const rt=new AbortController;je.abort=rt;try{const lt=yield this.loadVectorTile(ce,rt);if(delete this.loading[xe],!lt)return null;const pt=lt.rawData,et={};lt.expires&&(et.expires=lt.expires),lt.cacheControl&&(et.cacheControl=lt.cacheControl);const Mt={};if(Ie){const qt=Ie.finish();qt&&(Mt.resourceTiming=JSON.parse(JSON.stringify(qt)))}je.vectorTile=lt.vectorTile;const tn=je.parse(lt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[xe]=je,this.fetching[xe]={rawTileData:pt,cacheControl:et,resourceTiming:Mt};try{const qt=yield tn;return a.e({rawTileData:pt.slice(0)},qt,et,Mt)}finally{delete this.fetching[xe]}}catch(lt){throw delete this.loading[xe],je.status="done",this.loaded[xe]=je,lt}})}reloadTile(ce){return a._(this,void 0,void 0,function*(){const xe=ce.uid;if(!this.loaded||!this.loaded[xe])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Ie=this.loaded[xe];if(Ie.showCollisionBoxes=ce.showCollisionBoxes,Ie.status==="parsing"){const je=yield Ie.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);let rt;if(this.fetching[xe]){const{rawTileData:lt,cacheControl:pt,resourceTiming:et}=this.fetching[xe];delete this.fetching[xe],rt=a.e({rawTileData:lt.slice(0)},je,pt,et)}else rt=je;return rt}if(Ie.status==="done"&&Ie.vectorTile)return Ie.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(ce){return a._(this,void 0,void 0,function*(){const xe=this.loading,Ie=ce.uid;xe&&xe[Ie]&&xe[Ie].abort&&(xe[Ie].abort.abort(),delete xe[Ie])})}removeTile(ce){return a._(this,void 0,void 0,function*(){this.loaded&&this.loaded[ce.uid]&&delete this.loaded[ce.uid]})}}class E{constructor(){this.loaded={}}loadTile(ce){return a._(this,void 0,void 0,function*(){const{uid:xe,encoding:Ie,rawImageData:je,redFactor:rt,greenFactor:lt,blueFactor:pt,baseShift:et}=ce,Mt=je.width+2,tn=je.height+2,qt=a.b(je)?new a.R({width:Mt,height:tn},yield a.bt(je,-1,-1,Mt,tn)):je,en=new a.bu(xe,qt,Ie,rt,lt,pt,et);return this.loaded=this.loaded||{},this.loaded[xe]=en,en})}removeTile(ce){const xe=this.loaded,Ie=ce.uid;xe&&xe[Ie]&&delete xe[Ie]}}function P(Le,ce){if(Le.length!==0){D(Le[0],ce);for(var xe=1;xe<Le.length;xe++)D(Le[xe],!ce)}}function D(Le,ce){for(var xe=0,Ie=0,je=0,rt=Le.length,lt=rt-1;je<rt;lt=je++){var pt=(Le[je][0]-Le[lt][0])*(Le[lt][1]+Le[je][1]),et=xe+pt;Ie+=Math.abs(xe)>=Math.abs(pt)?xe-et+pt:pt-et+xe,xe=et}xe+Ie>=0!=!!ce&&Le.reverse()}var $=a.bv(function Le(ce,xe){var Ie,je=ce&&ce.type;if(je==="FeatureCollection")for(Ie=0;Ie<ce.features.length;Ie++)Le(ce.features[Ie],xe);else if(je==="GeometryCollection")for(Ie=0;Ie<ce.geometries.length;Ie++)Le(ce.geometries[Ie],xe);else if(je==="Feature")Le(ce.geometry,xe);else if(je==="Polygon")P(ce.coordinates,xe);else if(je==="MultiPolygon")for(Ie=0;Ie<ce.coordinates.length;Ie++)P(ce.coordinates[Ie],xe);return ce});const H=a.bq.VectorTileFeature.prototype.toGeoJSON;var Q={exports:{}},N=a.bw,Z=a.bq.VectorTileFeature,ae=pe;function pe(Le,ce){this.options=ce||{},this.features=Le,this.length=Le.length}function fe(Le,ce){this.id=typeof Le.id=="number"?Le.id:void 0,this.type=Le.type,this.rawGeometry=Le.type===1?[Le.geometry]:Le.geometry,this.properties=Le.tags,this.extent=ce||4096}pe.prototype.feature=function(Le){return new fe(this.features[Le],this.options.extent)},fe.prototype.loadGeometry=function(){var Le=this.rawGeometry;this.geometry=[];for(var ce=0;ce<Le.length;ce++){for(var xe=Le[ce],Ie=[],je=0;je<xe.length;je++)Ie.push(new N(xe[je][0],xe[je][1]));this.geometry.push(Ie)}return this.geometry},fe.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Le=this.geometry,ce=1/0,xe=-1/0,Ie=1/0,je=-1/0,rt=0;rt<Le.length;rt++)for(var lt=Le[rt],pt=0;pt<lt.length;pt++){var et=lt[pt];ce=Math.min(ce,et.x),xe=Math.max(xe,et.x),Ie=Math.min(Ie,et.y),je=Math.max(je,et.y)}return[ce,Ie,xe,je]},fe.prototype.toGeoJSON=Z.prototype.toGeoJSON;var X=a.bx,oe=ae;function Ce(Le){var ce=new X;return function(xe,Ie){for(var je in xe.layers)Ie.writeMessage(3,we,xe.layers[je])}(Le,ce),ce.finish()}function we(Le,ce){var xe;ce.writeVarintField(15,Le.version||1),ce.writeStringField(1,Le.name||""),ce.writeVarintField(5,Le.extent||4096);var Ie={keys:[],values:[],keycache:{},valuecache:{}};for(xe=0;xe<Le.length;xe++)Ie.feature=Le.feature(xe),ce.writeMessage(2,Te,Ie);var je=Ie.keys;for(xe=0;xe<je.length;xe++)ce.writeStringField(3,je[xe]);var rt=Ie.values;for(xe=0;xe<rt.length;xe++)ce.writeMessage(4,gt,rt[xe])}function Te(Le,ce){var xe=Le.feature;xe.id!==void 0&&ce.writeVarintField(1,xe.id),ce.writeMessage(2,Pe,Le),ce.writeVarintField(3,xe.type),ce.writeMessage(4,ye,xe)}function Pe(Le,ce){var xe=Le.feature,Ie=Le.keys,je=Le.values,rt=Le.keycache,lt=Le.valuecache;for(var pt in xe.properties){var et=xe.properties[pt],Mt=rt[pt];if(et!==null){Mt===void 0&&(Ie.push(pt),rt[pt]=Mt=Ie.length-1),ce.writeVarint(Mt);var tn=typeof et;tn!=="string"&&tn!=="boolean"&&tn!=="number"&&(et=JSON.stringify(et));var qt=tn+":"+et,en=lt[qt];en===void 0&&(je.push(et),lt[qt]=en=je.length-1),ce.writeVarint(en)}}}function he(Le,ce){return(ce<<3)+(7&Le)}function $e(Le){return Le<<1^Le>>31}function ye(Le,ce){for(var xe=Le.loadGeometry(),Ie=Le.type,je=0,rt=0,lt=xe.length,pt=0;pt<lt;pt++){var et=xe[pt],Mt=1;Ie===1&&(Mt=et.length),ce.writeVarint(he(1,Mt));for(var tn=Ie===3?et.length-1:et.length,qt=0;qt<tn;qt++){qt===1&&Ie!==1&&ce.writeVarint(he(2,tn-1));var en=et[qt].x-je,Fn=et[qt].y-rt;ce.writeVarint($e(en)),ce.writeVarint($e(Fn)),je+=en,rt+=Fn}Ie===3&&ce.writeVarint(he(7,1))}}function gt(Le,ce){var xe=typeof Le;xe==="string"?ce.writeStringField(1,Le):xe==="boolean"?ce.writeBooleanField(7,Le):xe==="number"&&(Le%1!=0?ce.writeDoubleField(3,Le):Le<0?ce.writeSVarintField(6,Le):ce.writeVarintField(5,Le))}Q.exports=Ce,Q.exports.fromVectorTileJs=Ce,Q.exports.fromGeojsonVt=function(Le,ce){ce=ce||{};var xe={};for(var Ie in Le)xe[Ie]=new oe(Le[Ie].features,ce),xe[Ie].name=Ie,xe[Ie].version=ce.version,xe[Ie].extent=ce.extent;return Ce({layers:xe})},Q.exports.GeoJSONWrapper=oe;var yt=a.bv(Q.exports);const st={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Le=>Le},ft=Math.fround||(Re=new Float32Array(1),Le=>(Re[0]=+Le,Re[0]));var Re;const Ve=3,Xe=5,Jt=6;class Ht{constructor(ce){this.options=Object.assign(Object.create(st),ce),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(ce){const{log:xe,minZoom:Ie,maxZoom:je}=this.options;xe&&console.time("total time");const rt=`prepare ${ce.length} points`;xe&&console.time(rt),this.points=ce;const lt=[];for(let et=0;et<ce.length;et++){const Mt=ce[et];if(!Mt.geometry)continue;const[tn,qt]=Mt.geometry.coordinates,en=ft(Yt(tn)),Fn=ft(ke(qt));lt.push(en,Fn,1/0,et,-1,1),this.options.reduce&&lt.push(0)}let pt=this.trees[je+1]=this._createTree(lt);xe&&console.timeEnd(rt);for(let et=je;et>=Ie;et--){const Mt=+Date.now();pt=this.trees[et]=this._createTree(this._cluster(pt,et)),xe&&console.log("z%d: %d clusters in %dms",et,pt.numItems,+Date.now()-Mt)}return xe&&console.timeEnd("total time"),this}getClusters(ce,xe){let Ie=((ce[0]+180)%360+360)%360-180;const je=Math.max(-90,Math.min(90,ce[1]));let rt=ce[2]===180?180:((ce[2]+180)%360+360)%360-180;const lt=Math.max(-90,Math.min(90,ce[3]));if(ce[2]-ce[0]>=360)Ie=-180,rt=180;else if(Ie>rt){const qt=this.getClusters([Ie,je,180,lt],xe),en=this.getClusters([-180,je,rt,lt],xe);return qt.concat(en)}const pt=this.trees[this._limitZoom(xe)],et=pt.range(Yt(Ie),ke(lt),Yt(rt),ke(je)),Mt=pt.data,tn=[];for(const qt of et){const en=this.stride*qt;tn.push(Mt[en+Xe]>1?bt(Mt,en,this.clusterProps):this.points[Mt[en+Ve]])}return tn}getChildren(ce){const xe=this._getOriginId(ce),Ie=this._getOriginZoom(ce),je="No cluster with the specified id.",rt=this.trees[Ie];if(!rt)throw new Error(je);const lt=rt.data;if(xe*this.stride>=lt.length)throw new Error(je);const pt=this.options.radius/(this.options.extent*Math.pow(2,Ie-1)),et=rt.within(lt[xe*this.stride],lt[xe*this.stride+1],pt),Mt=[];for(const tn of et){const qt=tn*this.stride;lt[qt+4]===ce&&Mt.push(lt[qt+Xe]>1?bt(lt,qt,this.clusterProps):this.points[lt[qt+Ve]])}if(Mt.length===0)throw new Error(je);return Mt}getLeaves(ce,xe,Ie){const je=[];return this._appendLeaves(je,ce,xe=xe||10,Ie=Ie||0,0),je}getTile(ce,xe,Ie){const je=this.trees[this._limitZoom(ce)],rt=Math.pow(2,ce),{extent:lt,radius:pt}=this.options,et=pt/lt,Mt=(Ie-et)/rt,tn=(Ie+1+et)/rt,qt={features:[]};return this._addTileFeatures(je.range((xe-et)/rt,Mt,(xe+1+et)/rt,tn),je.data,xe,Ie,rt,qt),xe===0&&this._addTileFeatures(je.range(1-et/rt,Mt,1,tn),je.data,rt,Ie,rt,qt),xe===rt-1&&this._addTileFeatures(je.range(0,Mt,et/rt,tn),je.data,-1,Ie,rt,qt),qt.features.length?qt:null}getClusterExpansionZoom(ce){let xe=this._getOriginZoom(ce)-1;for(;xe<=this.options.maxZoom;){const Ie=this.getChildren(ce);if(xe++,Ie.length!==1)break;ce=Ie[0].properties.cluster_id}return xe}_appendLeaves(ce,xe,Ie,je,rt){const lt=this.getChildren(xe);for(const pt of lt){const et=pt.properties;if(et&&et.cluster?rt+et.point_count<=je?rt+=et.point_count:rt=this._appendLeaves(ce,et.cluster_id,Ie,je,rt):rt<je?rt++:ce.push(pt),ce.length===Ie)break}return rt}_createTree(ce){const xe=new a.au(ce.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Ie=0;Ie<ce.length;Ie+=this.stride)xe.add(ce[Ie],ce[Ie+1]);return xe.finish(),xe.data=ce,xe}_addTileFeatures(ce,xe,Ie,je,rt,lt){for(const pt of ce){const et=pt*this.stride,Mt=xe[et+Xe]>1;let tn,qt,en;if(Mt)tn=Qt(xe,et,this.clusterProps),qt=xe[et],en=xe[et+1];else{const Hn=this.points[xe[et+Ve]];tn=Hn.properties;const[Or,cr]=Hn.geometry.coordinates;qt=Yt(Or),en=ke(cr)}const Fn={type:1,geometry:[[Math.round(this.options.extent*(qt*rt-Ie)),Math.round(this.options.extent*(en*rt-je))]],tags:tn};let Bn;Bn=Mt||this.options.generateId?xe[et+Ve]:this.points[xe[et+Ve]].id,Bn!==void 0&&(Fn.id=Bn),lt.features.push(Fn)}}_limitZoom(ce){return Math.max(this.options.minZoom,Math.min(Math.floor(+ce),this.options.maxZoom+1))}_cluster(ce,xe){const{radius:Ie,extent:je,reduce:rt,minPoints:lt}=this.options,pt=Ie/(je*Math.pow(2,xe)),et=ce.data,Mt=[],tn=this.stride;for(let qt=0;qt<et.length;qt+=tn){if(et[qt+2]<=xe)continue;et[qt+2]=xe;const en=et[qt],Fn=et[qt+1],Bn=ce.within(et[qt],et[qt+1],pt),Hn=et[qt+Xe];let Or=Hn;for(const cr of Bn){const Qr=cr*tn;et[Qr+2]>xe&&(Or+=et[Qr+Xe])}if(Or>Hn&&Or>=lt){let cr,Qr=en*Hn,Br=Fn*Hn,Fr=-1;const ar=((qt/tn|0)<<5)+(xe+1)+this.points.length;for(const di of Bn){const Ui=di*tn;if(et[Ui+2]<=xe)continue;et[Ui+2]=xe;const to=et[Ui+Xe];Qr+=et[Ui]*to,Br+=et[Ui+1]*to,et[Ui+4]=ar,rt&&(cr||(cr=this._map(et,qt,!0),Fr=this.clusterProps.length,this.clusterProps.push(cr)),rt(cr,this._map(et,Ui)))}et[qt+4]=ar,Mt.push(Qr/Or,Br/Or,1/0,ar,-1,Or),rt&&Mt.push(Fr)}else{for(let cr=0;cr<tn;cr++)Mt.push(et[qt+cr]);if(Or>1)for(const cr of Bn){const Qr=cr*tn;if(!(et[Qr+2]<=xe)){et[Qr+2]=xe;for(let Br=0;Br<tn;Br++)Mt.push(et[Qr+Br])}}}}return Mt}_getOriginId(ce){return ce-this.points.length>>5}_getOriginZoom(ce){return(ce-this.points.length)%32}_map(ce,xe,Ie){if(ce[xe+Xe]>1){const lt=this.clusterProps[ce[xe+Jt]];return Ie?Object.assign({},lt):lt}const je=this.points[ce[xe+Ve]].properties,rt=this.options.map(je);return Ie&&rt===je?Object.assign({},rt):rt}}function bt(Le,ce,xe){return{type:"Feature",id:Le[ce+Ve],properties:Qt(Le,ce,xe),geometry:{type:"Point",coordinates:[(Ie=Le[ce],360*(Ie-.5)),ge(Le[ce+1])]}};var Ie}function Qt(Le,ce,xe){const Ie=Le[ce+Xe],je=Ie>=1e4?`${Math.round(Ie/1e3)}k`:Ie>=1e3?Math.round(Ie/100)/10+"k":Ie,rt=Le[ce+Jt],lt=rt===-1?{}:Object.assign({},xe[rt]);return Object.assign(lt,{cluster:!0,cluster_id:Le[ce+Ve],point_count:Ie,point_count_abbreviated:je})}function Yt(Le){return Le/360+.5}function ke(Le){const ce=Math.sin(Le*Math.PI/180),xe=.5-.25*Math.log((1+ce)/(1-ce))/Math.PI;return xe<0?0:xe>1?1:xe}function ge(Le){const ce=(180-360*Le)*Math.PI/180;return 360*Math.atan(Math.exp(ce))/Math.PI-90}function Se(Le,ce,xe,Ie){for(var je,rt=Ie,lt=xe-ce>>1,pt=xe-ce,et=Le[ce],Mt=Le[ce+1],tn=Le[xe],qt=Le[xe+1],en=ce+3;en<xe;en+=3){var Fn=ze(Le[en],Le[en+1],et,Mt,tn,qt);if(Fn>rt)je=en,rt=Fn;else if(Fn===rt){var Bn=Math.abs(en-lt);Bn<pt&&(je=en,pt=Bn)}}rt>Ie&&(je-ce>3&&Se(Le,ce,je,Ie),Le[je+2]=rt,xe-je>3&&Se(Le,je,xe,Ie))}function ze(Le,ce,xe,Ie,je,rt){var lt=je-xe,pt=rt-Ie;if(lt!==0||pt!==0){var et=((Le-xe)*lt+(ce-Ie)*pt)/(lt*lt+pt*pt);et>1?(xe=je,Ie=rt):et>0&&(xe+=lt*et,Ie+=pt*et)}return(lt=Le-xe)*lt+(pt=ce-Ie)*pt}function it(Le,ce,xe,Ie){var je={id:Le===void 0?null:Le,type:ce,geometry:xe,tags:Ie,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(rt){var lt=rt.geometry,pt=rt.type;if(pt==="Point"||pt==="MultiPoint"||pt==="LineString")ot(rt,lt);else if(pt==="Polygon"||pt==="MultiLineString")for(var et=0;et<lt.length;et++)ot(rt,lt[et]);else if(pt==="MultiPolygon")for(et=0;et<lt.length;et++)for(var Mt=0;Mt<lt[et].length;Mt++)ot(rt,lt[et][Mt])}(je),je}function ot(Le,ce){for(var xe=0;xe<ce.length;xe+=3)Le.minX=Math.min(Le.minX,ce[xe]),Le.minY=Math.min(Le.minY,ce[xe+1]),Le.maxX=Math.max(Le.maxX,ce[xe]),Le.maxY=Math.max(Le.maxY,ce[xe+1])}function St(Le,ce,xe,Ie){if(ce.geometry){var je=ce.geometry.coordinates,rt=ce.geometry.type,lt=Math.pow(xe.tolerance/((1<<xe.maxZoom)*xe.extent),2),pt=[],et=ce.id;if(xe.promoteId?et=ce.properties[xe.promoteId]:xe.generateId&&(et=Ie||0),rt==="Point")Rt(je,pt);else if(rt==="MultiPoint")for(var Mt=0;Mt<je.length;Mt++)Rt(je[Mt],pt);else if(rt==="LineString")zt(je,pt,lt,!1);else if(rt==="MultiLineString"){if(xe.lineMetrics){for(Mt=0;Mt<je.length;Mt++)zt(je[Mt],pt=[],lt,!1),Le.push(it(et,"LineString",pt,ce.properties));return}mt(je,pt,lt,!1)}else if(rt==="Polygon")mt(je,pt,lt,!0);else{if(rt!=="MultiPolygon"){if(rt==="GeometryCollection"){for(Mt=0;Mt<ce.geometry.geometries.length;Mt++)St(Le,{id:et,geometry:ce.geometry.geometries[Mt],properties:ce.properties},xe,Ie);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Mt=0;Mt<je.length;Mt++){var tn=[];mt(je[Mt],tn,lt,!0),pt.push(tn)}}Le.push(it(et,rt,pt,ce.properties))}}function Rt(Le,ce){ce.push(or(Le[0])),ce.push(gn(Le[1])),ce.push(0)}function zt(Le,ce,xe,Ie){for(var je,rt,lt=0,pt=0;pt<Le.length;pt++){var et=or(Le[pt][0]),Mt=gn(Le[pt][1]);ce.push(et),ce.push(Mt),ce.push(0),pt>0&&(lt+=Ie?(je*Mt-et*rt)/2:Math.sqrt(Math.pow(et-je,2)+Math.pow(Mt-rt,2))),je=et,rt=Mt}var tn=ce.length-3;ce[2]=1,Se(ce,0,tn,xe),ce[tn+2]=1,ce.size=Math.abs(lt),ce.start=0,ce.end=ce.size}function mt(Le,ce,xe,Ie){for(var je=0;je<Le.length;je++){var rt=[];zt(Le[je],rt,xe,Ie),ce.push(rt)}}function or(Le){return Le/360+.5}function gn(Le){var ce=Math.sin(Le*Math.PI/180),xe=.5-.25*Math.log((1+ce)/(1-ce))/Math.PI;return xe<0?0:xe>1?1:xe}function yn(Le,ce,xe,Ie,je,rt,lt,pt){if(Ie/=ce,rt>=(xe/=ce)&&lt<Ie)return Le;if(lt<xe||rt>=Ie)return null;for(var et=[],Mt=0;Mt<Le.length;Mt++){var tn=Le[Mt],qt=tn.geometry,en=tn.type,Fn=je===0?tn.minX:tn.minY,Bn=je===0?tn.maxX:tn.maxY;if(Fn>=xe&&Bn<Ie)et.push(tn);else if(!(Bn<xe||Fn>=Ie)){var Hn=[];if(en==="Point"||en==="MultiPoint")tr(qt,Hn,xe,Ie,je);else if(en==="LineString")dr(qt,Hn,xe,Ie,je,!1,pt.lineMetrics);else if(en==="MultiLineString")Nr(qt,Hn,xe,Ie,je,!1);else if(en==="Polygon")Nr(qt,Hn,xe,Ie,je,!0);else if(en==="MultiPolygon")for(var Or=0;Or<qt.length;Or++){var cr=[];Nr(qt[Or],cr,xe,Ie,je,!0),cr.length&&Hn.push(cr)}if(Hn.length){if(pt.lineMetrics&&en==="LineString"){for(Or=0;Or<Hn.length;Or++)et.push(it(tn.id,en,Hn[Or],tn.tags));continue}en!=="LineString"&&en!=="MultiLineString"||(Hn.length===1?(en="LineString",Hn=Hn[0]):en="MultiLineString"),en!=="Point"&&en!=="MultiPoint"||(en=Hn.length===3?"Point":"MultiPoint"),et.push(it(tn.id,en,Hn,tn.tags))}}}return et.length?et:null}function tr(Le,ce,xe,Ie,je){for(var rt=0;rt<Le.length;rt+=3){var lt=Le[rt+je];lt>=xe&&lt<=Ie&&(ce.push(Le[rt]),ce.push(Le[rt+1]),ce.push(Le[rt+2]))}}function dr(Le,ce,xe,Ie,je,rt,lt){for(var pt,et,Mt=Sr(Le),tn=je===0?_i:Ee,qt=Le.start,en=0;en<Le.length-3;en+=3){var Fn=Le[en],Bn=Le[en+1],Hn=Le[en+2],Or=Le[en+3],cr=Le[en+4],Qr=je===0?Fn:Bn,Br=je===0?Or:cr,Fr=!1;lt&&(pt=Math.sqrt(Math.pow(Fn-Or,2)+Math.pow(Bn-cr,2))),Qr<xe?Br>xe&&(et=tn(Mt,Fn,Bn,Or,cr,xe),lt&&(Mt.start=qt+pt*et)):Qr>Ie?Br<Ie&&(et=tn(Mt,Fn,Bn,Or,cr,Ie),lt&&(Mt.start=qt+pt*et)):yr(Mt,Fn,Bn,Hn),Br<xe&&Qr>=xe&&(et=tn(Mt,Fn,Bn,Or,cr,xe),Fr=!0),Br>Ie&&Qr<=Ie&&(et=tn(Mt,Fn,Bn,Or,cr,Ie),Fr=!0),!rt&&Fr&&(lt&&(Mt.end=qt+pt*et),ce.push(Mt),Mt=Sr(Le)),lt&&(qt+=pt)}var ar=Le.length-3;Fn=Le[ar],Bn=Le[ar+1],Hn=Le[ar+2],(Qr=je===0?Fn:Bn)>=xe&&Qr<=Ie&&yr(Mt,Fn,Bn,Hn),ar=Mt.length-3,rt&&ar>=3&&(Mt[ar]!==Mt[0]||Mt[ar+1]!==Mt[1])&&yr(Mt,Mt[0],Mt[1],Mt[2]),Mt.length&&ce.push(Mt)}function Sr(Le){var ce=[];return ce.size=Le.size,ce.start=Le.start,ce.end=Le.end,ce}function Nr(Le,ce,xe,Ie,je,rt){for(var lt=0;lt<Le.length;lt++)dr(Le[lt],ce,xe,Ie,je,rt,!1)}function yr(Le,ce,xe,Ie){Le.push(ce),Le.push(xe),Le.push(Ie)}function _i(Le,ce,xe,Ie,je,rt){var lt=(rt-ce)/(Ie-ce);return Le.push(rt),Le.push(xe+(je-xe)*lt),Le.push(1),lt}function Ee(Le,ce,xe,Ie,je,rt){var lt=(rt-xe)/(je-xe);return Le.push(ce+(Ie-ce)*lt),Le.push(rt),Le.push(1),lt}function ee(Le,ce){for(var xe=[],Ie=0;Ie<Le.length;Ie++){var je,rt=Le[Ie],lt=rt.type;if(lt==="Point"||lt==="MultiPoint"||lt==="LineString")je=V(rt.geometry,ce);else if(lt==="MultiLineString"||lt==="Polygon"){je=[];for(var pt=0;pt<rt.geometry.length;pt++)je.push(V(rt.geometry[pt],ce))}else if(lt==="MultiPolygon")for(je=[],pt=0;pt<rt.geometry.length;pt++){for(var et=[],Mt=0;Mt<rt.geometry[pt].length;Mt++)et.push(V(rt.geometry[pt][Mt],ce));je.push(et)}xe.push(it(rt.id,lt,je,rt.tags))}return xe}function V(Le,ce){var xe=[];xe.size=Le.size,Le.start!==void 0&&(xe.start=Le.start,xe.end=Le.end);for(var Ie=0;Ie<Le.length;Ie+=3)xe.push(Le[Ie]+ce,Le[Ie+1],Le[Ie+2]);return xe}function Ke(Le,ce){if(Le.transformed)return Le;var xe,Ie,je,rt=1<<Le.z,lt=Le.x,pt=Le.y;for(xe=0;xe<Le.features.length;xe++){var et=Le.features[xe],Mt=et.geometry,tn=et.type;if(et.geometry=[],tn===1)for(Ie=0;Ie<Mt.length;Ie+=2)et.geometry.push(At(Mt[Ie],Mt[Ie+1],ce,rt,lt,pt));else for(Ie=0;Ie<Mt.length;Ie++){var qt=[];for(je=0;je<Mt[Ie].length;je+=2)qt.push(At(Mt[Ie][je],Mt[Ie][je+1],ce,rt,lt,pt));et.geometry.push(qt)}}return Le.transformed=!0,Le}function At(Le,ce,xe,Ie,je,rt){return[Math.round(xe*(Le*Ie-je)),Math.round(xe*(ce*Ie-rt))]}function Bt(Le,ce,xe,Ie,je){for(var rt=ce===je.maxZoom?0:je.tolerance/((1<<ce)*je.extent),lt={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:xe,y:Ie,z:ce,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},pt=0;pt<Le.length;pt++){lt.numFeatures++,kt(lt,Le[pt],rt,je);var et=Le[pt].minX,Mt=Le[pt].minY,tn=Le[pt].maxX,qt=Le[pt].maxY;et<lt.minX&&(lt.minX=et),Mt<lt.minY&&(lt.minY=Mt),tn>lt.maxX&&(lt.maxX=tn),qt>lt.maxY&&(lt.maxY=qt)}return lt}function kt(Le,ce,xe,Ie){var je=ce.geometry,rt=ce.type,lt=[];if(rt==="Point"||rt==="MultiPoint")for(var pt=0;pt<je.length;pt+=3)lt.push(je[pt]),lt.push(je[pt+1]),Le.numPoints++,Le.numSimplified++;else if(rt==="LineString")Lt(lt,je,Le,xe,!1,!1);else if(rt==="MultiLineString"||rt==="Polygon")for(pt=0;pt<je.length;pt++)Lt(lt,je[pt],Le,xe,rt==="Polygon",pt===0);else if(rt==="MultiPolygon")for(var et=0;et<je.length;et++){var Mt=je[et];for(pt=0;pt<Mt.length;pt++)Lt(lt,Mt[pt],Le,xe,!0,pt===0)}if(lt.length){var tn=ce.tags||null;if(rt==="LineString"&&Ie.lineMetrics){for(var qt in tn={},ce.tags)tn[qt]=ce.tags[qt];tn.mapbox_clip_start=je.start/je.size,tn.mapbox_clip_end=je.end/je.size}var en={geometry:lt,type:rt==="Polygon"||rt==="MultiPolygon"?3:rt==="LineString"||rt==="MultiLineString"?2:1,tags:tn};ce.id!==null&&(en.id=ce.id),Le.features.push(en)}}function Lt(Le,ce,xe,Ie,je,rt){var lt=Ie*Ie;if(Ie>0&&ce.size<(je?lt:Ie))xe.numPoints+=ce.length/3;else{for(var pt=[],et=0;et<ce.length;et+=3)(Ie===0||ce[et+2]>lt)&&(xe.numSimplified++,pt.push(ce[et]),pt.push(ce[et+1])),xe.numPoints++;je&&function(Mt,tn){for(var qt=0,en=0,Fn=Mt.length,Bn=Fn-2;en<Fn;Bn=en,en+=2)qt+=(Mt[en]-Mt[Bn])*(Mt[en+1]+Mt[Bn+1]);if(qt>0===tn)for(en=0,Fn=Mt.length;en<Fn/2;en+=2){var Hn=Mt[en],Or=Mt[en+1];Mt[en]=Mt[Fn-2-en],Mt[en+1]=Mt[Fn-1-en],Mt[Fn-2-en]=Hn,Mt[Fn-1-en]=Or}}(pt,rt),Le.push(pt)}}function fn(Le,ce){var xe=(ce=this.options=function(je,rt){for(var lt in rt)je[lt]=rt[lt];return je}(Object.create(this.options),ce)).debug;if(xe&&console.time("preprocess data"),ce.maxZoom<0||ce.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ce.promoteId&&ce.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ie=function(je,rt){var lt=[];if(je.type==="FeatureCollection")for(var pt=0;pt<je.features.length;pt++)St(lt,je.features[pt],rt,pt);else St(lt,je.type==="Feature"?je:{geometry:je},rt);return lt}(Le,ce);this.tiles={},this.tileCoords=[],xe&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ce.indexMaxZoom,ce.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ie=function(je,rt){var lt=rt.buffer/rt.extent,pt=je,et=yn(je,1,-1-lt,lt,0,-1,2,rt),Mt=yn(je,1,1-lt,2+lt,0,-1,2,rt);return(et||Mt)&&(pt=yn(je,1,-lt,1+lt,0,-1,2,rt)||[],et&&(pt=ee(et,1).concat(pt)),Mt&&(pt=pt.concat(ee(Mt,-1)))),pt}(Ie,ce),Ie.length&&this.splitTile(Ie,0,0,0),xe&&(Ie.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Pn(Le,ce,xe){return 32*((1<<Le)*xe+ce)+Le}function On(Le,ce){return ce?Le.properties[ce]:Le.id}function g(Le,ce){if(Le==null)return!0;if(Le.type==="Feature")return On(Le,ce)!=null;if(Le.type==="FeatureCollection"){const xe=new Set;for(const Ie of Le.features){const je=On(Ie,ce);if(je==null||xe.has(je))return!1;xe.add(je)}return!0}return!1}function Kt(Le,ce){const xe=new Map;if(Le!=null)if(Le.type==="Feature")xe.set(On(Le,ce),Le);else for(const Ie of Le.features)xe.set(On(Ie,ce),Ie);return xe}fn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},fn.prototype.splitTile=function(Le,ce,xe,Ie,je,rt,lt){for(var pt=[Le,ce,xe,Ie],et=this.options,Mt=et.debug;pt.length;){Ie=pt.pop(),xe=pt.pop(),ce=pt.pop(),Le=pt.pop();var tn=1<<ce,qt=Pn(ce,xe,Ie),en=this.tiles[qt];if(!en&&(Mt>1&&console.time("creation"),en=this.tiles[qt]=Bt(Le,ce,xe,Ie,et),this.tileCoords.push({z:ce,x:xe,y:Ie}),Mt)){Mt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ce,xe,Ie,en.numFeatures,en.numPoints,en.numSimplified),console.timeEnd("creation"));var Fn="z"+ce;this.stats[Fn]=(this.stats[Fn]||0)+1,this.total++}if(en.source=Le,je){if(ce===et.maxZoom||ce===je)continue;var Bn=1<<je-ce;if(xe!==Math.floor(rt/Bn)||Ie!==Math.floor(lt/Bn))continue}else if(ce===et.indexMaxZoom||en.numPoints<=et.indexMaxPoints)continue;if(en.source=null,Le.length!==0){Mt>1&&console.time("clipping");var Hn,Or,cr,Qr,Br,Fr,ar=.5*et.buffer/et.extent,di=.5-ar,Ui=.5+ar,to=1+ar;Hn=Or=cr=Qr=null,Br=yn(Le,tn,xe-ar,xe+Ui,0,en.minX,en.maxX,et),Fr=yn(Le,tn,xe+di,xe+to,0,en.minX,en.maxX,et),Le=null,Br&&(Hn=yn(Br,tn,Ie-ar,Ie+Ui,1,en.minY,en.maxY,et),Or=yn(Br,tn,Ie+di,Ie+to,1,en.minY,en.maxY,et),Br=null),Fr&&(cr=yn(Fr,tn,Ie-ar,Ie+Ui,1,en.minY,en.maxY,et),Qr=yn(Fr,tn,Ie+di,Ie+to,1,en.minY,en.maxY,et),Fr=null),Mt>1&&console.timeEnd("clipping"),pt.push(Hn||[],ce+1,2*xe,2*Ie),pt.push(Or||[],ce+1,2*xe,2*Ie+1),pt.push(cr||[],ce+1,2*xe+1,2*Ie),pt.push(Qr||[],ce+1,2*xe+1,2*Ie+1)}}},fn.prototype.getTile=function(Le,ce,xe){var Ie=this.options,je=Ie.extent,rt=Ie.debug;if(Le<0||Le>24)return null;var lt=1<<Le,pt=Pn(Le,ce=(ce%lt+lt)%lt,xe);if(this.tiles[pt])return Ke(this.tiles[pt],je);rt>1&&console.log("drilling down to z%d-%d-%d",Le,ce,xe);for(var et,Mt=Le,tn=ce,qt=xe;!et&&Mt>0;)Mt--,tn=Math.floor(tn/2),qt=Math.floor(qt/2),et=this.tiles[Pn(Mt,tn,qt)];return et&&et.source?(rt>1&&console.log("found parent tile z%d-%d-%d",Mt,tn,qt),rt>1&&console.time("drilling down"),this.splitTile(et.source,Mt,tn,qt,Le,ce,xe),rt>1&&console.timeEnd("drilling down"),this.tiles[pt]?Ke(this.tiles[pt],je):null):null};class Pr extends O{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(ce,xe){return a._(this,void 0,void 0,function*(){const Ie=ce.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const je=this._geoJSONIndex.getTile(Ie.z,Ie.x,Ie.y);if(!je)return null;const rt=new class{constructor(pt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=a.W,this.length=pt.length,this._features=pt}feature(pt){return new class{constructor(et){this._feature=et,this.extent=a.W,this.type=et.type,this.properties=et.tags,"id"in et&&!isNaN(et.id)&&(this.id=parseInt(et.id,10))}loadGeometry(){if(this._feature.type===1){const et=[];for(const Mt of this._feature.geometry)et.push([new a.P(Mt[0],Mt[1])]);return et}{const et=[];for(const Mt of this._feature.geometry){const tn=[];for(const qt of Mt)tn.push(new a.P(qt[0],qt[1]));et.push(tn)}return et}}toGeoJSON(et,Mt,tn){return H.call(this,et,Mt,tn)}}(this._features[pt])}}(je.features);let lt=yt(rt);return lt.byteOffset===0&&lt.byteLength===lt.buffer.byteLength||(lt=new Uint8Array(lt)),{vectorTile:rt,rawData:lt.buffer}})}loadData(ce){return a._(this,void 0,void 0,function*(){var xe;(xe=this._pendingRequest)===null||xe===void 0||xe.abort();const Ie=!!(ce&&ce.request&&ce.request.collectResourceTiming)&&new a.bs(ce.request);this._pendingRequest=new AbortController;try{let je=yield this.loadGeoJSON(ce,this._pendingRequest);if(delete this._pendingRequest,typeof je!="object")throw new Error(`Input data given to '${ce.source}' is not a valid GeoJSON object.`);if($(je,!0),ce.filter){const lt=a.by(ce.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(lt.result==="error")throw new Error(lt.value.map(et=>`${et.key}: ${et.message}`).join(", "));je={type:"FeatureCollection",features:je.features.filter(et=>lt.value.evaluate({zoom:0},et))}}this._geoJSONIndex=ce.cluster?new Ht(function({superclusterOptions:lt,clusterProperties:pt}){if(!pt||!lt)return lt;const et={},Mt={},tn={accumulated:null,zoom:0},qt={properties:null},en=Object.keys(pt);for(const Fn of en){const[Bn,Hn]=pt[Fn],Or=a.by(Hn),cr=a.by(typeof Bn=="string"?[Bn,["accumulated"],["get",Fn]]:Bn);et[Fn]=Or.value,Mt[Fn]=cr.value}return lt.map=Fn=>{qt.properties=Fn;const Bn={};for(const Hn of en)Bn[Hn]=et[Hn].evaluate(tn,qt);return Bn},lt.reduce=(Fn,Bn)=>{qt.properties=Bn;for(const Hn of en)tn.accumulated=Fn[Hn],Fn[Hn]=Mt[Hn].evaluate(tn,qt)},lt}(ce)).load(je.features):function(lt,pt){return new fn(lt,pt)}(je,ce.geojsonVtOptions),this.loaded={};const rt={};if(Ie){const lt=Ie.finish();lt&&(rt.resourceTiming={},rt.resourceTiming[ce.source]=JSON.parse(JSON.stringify(lt)))}return rt}catch(je){if(delete this._pendingRequest,a.bz(je))return{abandoned:!0};throw je}})}reloadTile(ce){const xe=this.loaded;return xe&&xe[ce.uid]?super.reloadTile(ce):this.loadTile(ce)}loadGeoJSON(ce,xe){return a._(this,void 0,void 0,function*(){const{promoteId:Ie}=ce;if(ce.request){const je=yield a.h(ce.request,xe);return this._dataUpdateable=g(je.data,Ie)?Kt(je.data,Ie):void 0,je.data}if(typeof ce.data=="string")try{const je=JSON.parse(ce.data);return this._dataUpdateable=g(je,Ie)?Kt(je,Ie):void 0,je}catch{throw new Error(`Input data given to '${ce.source}' is not a valid GeoJSON object.`)}if(!ce.dataDiff)throw new Error(`Input data given to '${ce.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${ce.source}`);return function(je,rt,lt){var pt,et,Mt,tn;if(rt.removeAll&&je.clear(),rt.remove)for(const qt of rt.remove)je.delete(qt);if(rt.add)for(const qt of rt.add){const en=On(qt,lt);en!=null&&je.set(en,qt)}if(rt.update)for(const qt of rt.update){let en=je.get(qt.id);if(en==null)continue;const Fn=!qt.removeAllProperties&&(((pt=qt.removeProperties)===null||pt===void 0?void 0:pt.length)>0||((et=qt.addOrUpdateProperties)===null||et===void 0?void 0:et.length)>0);if((qt.newGeometry||qt.removeAllProperties||Fn)&&(en=Object.assign({},en),je.set(qt.id,en),Fn&&(en.properties=Object.assign({},en.properties))),qt.newGeometry&&(en.geometry=qt.newGeometry),qt.removeAllProperties)en.properties={};else if(((Mt=qt.removeProperties)===null||Mt===void 0?void 0:Mt.length)>0)for(const Bn of qt.removeProperties)Object.prototype.hasOwnProperty.call(en.properties,Bn)&&delete en.properties[Bn];if(((tn=qt.addOrUpdateProperties)===null||tn===void 0?void 0:tn.length)>0)for(const{key:Bn,value:Hn}of qt.addOrUpdateProperties)en.properties[Bn]=Hn}}(this._dataUpdateable,ce.dataDiff,Ie),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(ce){return a._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(ce){return this._geoJSONIndex.getClusterExpansionZoom(ce.clusterId)}getClusterChildren(ce){return this._geoJSONIndex.getChildren(ce.clusterId)}getClusterLeaves(ce){return this._geoJSONIndex.getLeaves(ce.clusterId,ce.limit,ce.offset)}}class rr{constructor(ce){this.self=ce,this.actor=new a.C(ce),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(xe,Ie)=>{if(this.externalWorkerSourceTypes[xe])throw new Error(`Worker source with name "${xe}" already registered.`);this.externalWorkerSourceTypes[xe]=Ie},this.self.addProtocol=a.bf,this.self.removeProtocol=a.bg,this.self.registerRTLTextPlugin=xe=>{if(a.bA.isParsed())throw new Error("RTL text plugin already registered.");a.bA.setMethods(xe)},this.actor.registerMessageHandler("loadDEMTile",(xe,Ie)=>this._getDEMWorkerSource(xe,Ie.source).loadTile(Ie)),this.actor.registerMessageHandler("removeDEMTile",(xe,Ie)=>a._(this,void 0,void 0,function*(){this._getDEMWorkerSource(xe,Ie.source).removeTile(Ie)})),this.actor.registerMessageHandler("getClusterExpansionZoom",(xe,Ie)=>a._(this,void 0,void 0,function*(){return this._getWorkerSource(xe,Ie.type,Ie.source).getClusterExpansionZoom(Ie)})),this.actor.registerMessageHandler("getClusterChildren",(xe,Ie)=>a._(this,void 0,void 0,function*(){return this._getWorkerSource(xe,Ie.type,Ie.source).getClusterChildren(Ie)})),this.actor.registerMessageHandler("getClusterLeaves",(xe,Ie)=>a._(this,void 0,void 0,function*(){return this._getWorkerSource(xe,Ie.type,Ie.source).getClusterLeaves(Ie)})),this.actor.registerMessageHandler("loadData",(xe,Ie)=>this._getWorkerSource(xe,Ie.type,Ie.source).loadData(Ie)),this.actor.registerMessageHandler("loadTile",(xe,Ie)=>this._getWorkerSource(xe,Ie.type,Ie.source).loadTile(Ie)),this.actor.registerMessageHandler("reloadTile",(xe,Ie)=>this._getWorkerSource(xe,Ie.type,Ie.source).reloadTile(Ie)),this.actor.registerMessageHandler("abortTile",(xe,Ie)=>this._getWorkerSource(xe,Ie.type,Ie.source).abortTile(Ie)),this.actor.registerMessageHandler("removeTile",(xe,Ie)=>this._getWorkerSource(xe,Ie.type,Ie.source).removeTile(Ie)),this.actor.registerMessageHandler("removeSource",(xe,Ie)=>a._(this,void 0,void 0,function*(){if(!this.workerSources[xe]||!this.workerSources[xe][Ie.type]||!this.workerSources[xe][Ie.type][Ie.source])return;const je=this.workerSources[xe][Ie.type][Ie.source];delete this.workerSources[xe][Ie.type][Ie.source],je.removeSource!==void 0&&je.removeSource(Ie)})),this.actor.registerMessageHandler("removeMap",xe=>a._(this,void 0,void 0,function*(){delete this.layerIndexes[xe],delete this.availableImages[xe],delete this.workerSources[xe],delete this.demWorkerSources[xe]})),this.actor.registerMessageHandler("setReferrer",(xe,Ie)=>a._(this,void 0,void 0,function*(){this.referrer=Ie})),this.actor.registerMessageHandler("syncRTLPluginState",(xe,Ie)=>this._syncRTLPluginState(xe,Ie)),this.actor.registerMessageHandler("importScript",(xe,Ie)=>a._(this,void 0,void 0,function*(){this.self.importScripts(Ie)})),this.actor.registerMessageHandler("setImages",(xe,Ie)=>this._setImages(xe,Ie)),this.actor.registerMessageHandler("updateLayers",(xe,Ie)=>a._(this,void 0,void 0,function*(){this._getLayerIndex(xe).update(Ie.layers,Ie.removedIds)})),this.actor.registerMessageHandler("setLayers",(xe,Ie)=>a._(this,void 0,void 0,function*(){this._getLayerIndex(xe).replace(Ie)}))}_setImages(ce,xe){return a._(this,void 0,void 0,function*(){this.availableImages[ce]=xe;for(const Ie in this.workerSources[ce]){const je=this.workerSources[ce][Ie];for(const rt in je)je[rt].availableImages=xe}})}_syncRTLPluginState(ce,xe){return a._(this,void 0,void 0,function*(){if(a.bA.isParsed())return a.bA.getState();if(xe.pluginStatus!=="loading")return a.bA.setState(xe),xe;const Ie=xe.pluginURL;if(this.self.importScripts(Ie),a.bA.isParsed()){const je={pluginStatus:"loaded",pluginURL:Ie};return a.bA.setState(je),je}throw a.bA.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ie}`)})}_getAvailableImages(ce){let xe=this.availableImages[ce];return xe||(xe=[]),xe}_getLayerIndex(ce){let xe=this.layerIndexes[ce];return xe||(xe=this.layerIndexes[ce]=new s),xe}_getWorkerSource(ce,xe,Ie){if(this.workerSources[ce]||(this.workerSources[ce]={}),this.workerSources[ce][xe]||(this.workerSources[ce][xe]={}),!this.workerSources[ce][xe][Ie]){const je={sendAsync:(rt,lt)=>(rt.targetMapId=ce,this.actor.sendAsync(rt,lt))};switch(xe){case"vector":this.workerSources[ce][xe][Ie]=new O(je,this._getLayerIndex(ce),this._getAvailableImages(ce));break;case"geojson":this.workerSources[ce][xe][Ie]=new Pr(je,this._getLayerIndex(ce),this._getAvailableImages(ce));break;default:this.workerSources[ce][xe][Ie]=new this.externalWorkerSourceTypes[xe](je,this._getLayerIndex(ce),this._getAvailableImages(ce))}}return this.workerSources[ce][xe][Ie]}_getDEMWorkerSource(ce,xe){return this.demWorkerSources[ce]||(this.demWorkerSources[ce]={}),this.demWorkerSources[ce][xe]||(this.demWorkerSources[ce][xe]=new E),this.demWorkerSources[ce][xe]}}return a.i(self)&&(self.worker=new rr(self)),rr}),i("index",["exports","./shared"],function(a,s){var d="4.1.2";let f,C;const O={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:I=>new Promise((u,m)=>{const _=requestAnimationFrame(u);I.signal.addEventListener("abort",()=>{cancelAnimationFrame(_),m(s.c())})}),getImageData(I,u=0){return this.getImageCanvasContext(I).getImageData(-u,-u,I.width+2*u,I.height+2*u)},getImageCanvasContext(I){const u=window.document.createElement("canvas"),m=u.getContext("2d",{willReadFrequently:!0});if(!m)throw new Error("failed to create canvas 2d context");return u.width=I.width,u.height=I.height,m.drawImage(I,0,0,I.width,I.height),m},resolveURL:I=>(f||(f=document.createElement("a")),f.href=I,f.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(C==null&&(C=matchMedia("(prefers-reduced-motion: reduce)")),C.matches)}};class E{static testProp(u){if(!E.docStyle)return u[0];for(let m=0;m<u.length;m++)if(u[m]in E.docStyle)return u[m];return u[0]}static create(u,m,_){const w=window.document.createElement(u);return m!==void 0&&(w.className=m),_&&_.appendChild(w),w}static createNS(u,m){return window.document.createElementNS(u,m)}static disableDrag(){E.docStyle&&E.selectProp&&(E.userSelect=E.docStyle[E.selectProp],E.docStyle[E.selectProp]="none")}static enableDrag(){E.docStyle&&E.selectProp&&(E.docStyle[E.selectProp]=E.userSelect)}static setTransform(u,m){u.style[E.transformProp]=m}static addEventListener(u,m,_,w={}){u.addEventListener(m,_,"passive"in w?w:w.capture)}static removeEventListener(u,m,_,w={}){u.removeEventListener(m,_,"passive"in w?w:w.capture)}static suppressClickInternal(u){u.preventDefault(),u.stopPropagation(),window.removeEventListener("click",E.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",E.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",E.suppressClickInternal,!0)},0)}static getScale(u){const m=u.getBoundingClientRect();return{x:m.width/u.offsetWidth||1,y:m.height/u.offsetHeight||1,boundingClientRect:m}}static getPoint(u,m,_){const w=m.boundingClientRect;return new s.P((_.clientX-w.left)/m.x-u.clientLeft,(_.clientY-w.top)/m.y-u.clientTop)}static mousePos(u,m){const _=E.getScale(u);return E.getPoint(u,_,m)}static touchPos(u,m){const _=[],w=E.getScale(u);for(let k=0;k<m.length;k++)_.push(E.getPoint(u,w,m[k]));return _}static mouseButton(u){return u.button}static remove(u){u.parentNode&&u.parentNode.removeChild(u)}}E.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,E.selectProp=E.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),E.transformProp=E.testProp(["transform","WebkitTransform"]);const P={supported:!1,testSupport:function(I){!H&&$&&(Q?N(I):D=I)}};let D,$,H=!1,Q=!1;function N(I){const u=I.createTexture();I.bindTexture(I.TEXTURE_2D,u);try{if(I.texImage2D(I.TEXTURE_2D,0,I.RGBA,I.RGBA,I.UNSIGNED_BYTE,$),I.isContextLost())return;P.supported=!0}catch{}I.deleteTexture(u),H=!0}var Z,ae;typeof document<"u"&&($=document.createElement("img"),$.onload=function(){D&&N(D),D=null,Q=!0},$.onerror=function(){H=!0,D=null},$.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(I){let u,m,_,w;I.resetRequestQueue=()=>{u=[],m=0,_=0,w={}},I.addThrottleControl=Y=>{const ie=_++;return w[ie]=Y,ie},I.removeThrottleControl=Y=>{delete w[Y],R()},I.getImage=(Y,ie,de=!0)=>new Promise((me,Oe)=>{P.supported&&(Y.headers||(Y.headers={}),Y.headers.accept="image/webp,*/*"),s.e(Y,{type:"image"}),u.push({abortController:ie,requestParameters:Y,supportImageRefresh:de,state:"queued",onError:qe=>{Oe(qe)},onSuccess:qe=>{me(qe)}}),R()});const k=Y=>s._(this,void 0,void 0,function*(){Y.state="running";const{requestParameters:ie,supportImageRefresh:de,onError:me,onSuccess:Oe,abortController:qe}=Y,Ye=de===!1&&!s.i(self)&&!s.g(ie.url)&&(!ie.headers||Object.keys(ie.headers).reduce((ht,Dt)=>ht&&Dt==="accept",!0));m++;const He=Ye?j(ie,qe):s.m(ie,qe);try{const ht=yield He;delete Y.abortController,Y.state="completed",ht.data instanceof HTMLImageElement||s.b(ht.data)?Oe(ht):ht.data&&Oe({data:yield(Ne=ht.data,typeof createImageBitmap=="function"?s.d(Ne):s.f(Ne)),cacheControl:ht.cacheControl,expires:ht.expires})}catch(ht){delete Y.abortController,me(ht)}finally{m--,R()}var Ne}),R=()=>{const Y=(()=>{for(const ie of Object.keys(w))if(w[ie]())return!0;return!1})()?s.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:s.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let ie=m;ie<Y&&u.length>0;ie++){const de=u.shift();de.abortController.signal.aborted?ie--:k(de)}},j=(Y,ie)=>new Promise((de,me)=>{const Oe=new Image,qe=Y.url,Ye=Y.credentials;Ye&&Ye==="include"?Oe.crossOrigin="use-credentials":(Ye&&Ye==="same-origin"||!s.s(qe))&&(Oe.crossOrigin="anonymous"),ie.signal.addEventListener("abort",()=>{Oe.src="",me(s.c())}),Oe.fetchPriority="high",Oe.onload=()=>{Oe.onerror=Oe.onload=null,de({data:Oe})},Oe.onerror=()=>{Oe.onerror=Oe.onload=null,ie.signal.aborted||me(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Oe.src=qe})}(Z||(Z={})),Z.resetRequestQueue(),function(I){I.Glyphs="Glyphs",I.Image="Image",I.Source="Source",I.SpriteImage="SpriteImage",I.SpriteJSON="SpriteJSON",I.Style="Style",I.Tile="Tile",I.Unknown="Unknown"}(ae||(ae={}));class pe{constructor(u){this._transformRequestFn=u}transformRequest(u,m){return this._transformRequestFn&&this._transformRequestFn(u,m)||{url:u}}normalizeSpriteURL(u,m,_){const w=function(k){const R=k.match(fe);if(!R)throw new Error(`Unable to parse URL "${k}"`);return{protocol:R[1],authority:R[2],path:R[3]||"/",params:R[4]?R[4].split("&"):[]}}(u);return w.path+=`${m}${_}`,function(k){const R=k.params.length?`?${k.params.join("&")}`:"";return`${k.protocol}://${k.authority}${k.path}${R}`}(w)}setTransformRequest(u){this._transformRequestFn=u}}const fe=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function X(I){var u=new s.A(3);return u[0]=I[0],u[1]=I[1],u[2]=I[2],u}var oe,Ce=function(I,u,m){return I[0]=u[0]-m[0],I[1]=u[1]-m[1],I[2]=u[2]-m[2],I};oe=new s.A(3),s.A!=Float32Array&&(oe[0]=0,oe[1]=0,oe[2]=0);var we=function(I){var u=I[0],m=I[1];return u*u+m*m};function Te(I){const u=[];if(typeof I=="string")u.push({id:"default",url:I});else if(I&&I.length>0){const m=[];for(const{id:_,url:w}of I){const k=`${_}${w}`;m.indexOf(k)===-1&&(m.push(k),u.push({id:_,url:w}))}}return u}(function(){var I=new s.A(2);s.A!=Float32Array&&(I[0]=0,I[1]=0)})();class Pe{constructor(u,m,_,w){this.context=u,this.format=_,this.texture=u.gl.createTexture(),this.update(m,w)}update(u,m,_){const{width:w,height:k}=u,R=!(this.size&&this.size[0]===w&&this.size[1]===k||_),{context:j}=this,{gl:Y}=j;if(this.useMipmap=!!(m&&m.useMipmap),Y.bindTexture(Y.TEXTURE_2D,this.texture),j.pixelStoreUnpackFlipY.set(!1),j.pixelStoreUnpack.set(1),j.pixelStoreUnpackPremultiplyAlpha.set(this.format===Y.RGBA&&(!m||m.premultiply!==!1)),R)this.size=[w,k],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||s.b(u)?Y.texImage2D(Y.TEXTURE_2D,0,this.format,this.format,Y.UNSIGNED_BYTE,u):Y.texImage2D(Y.TEXTURE_2D,0,this.format,w,k,0,this.format,Y.UNSIGNED_BYTE,u.data);else{const{x:ie,y:de}=_||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||s.b(u)?Y.texSubImage2D(Y.TEXTURE_2D,0,ie,de,Y.RGBA,Y.UNSIGNED_BYTE,u):Y.texSubImage2D(Y.TEXTURE_2D,0,ie,de,w,k,Y.RGBA,Y.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Y.generateMipmap(Y.TEXTURE_2D)}bind(u,m,_){const{context:w}=this,{gl:k}=w;k.bindTexture(k.TEXTURE_2D,this.texture),_!==k.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(_=k.LINEAR),u!==this.filter&&(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,u),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,_||u),this.filter=u),m!==this.wrap&&(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,m),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,m),this.wrap=m)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}function he(I){const{userImage:u}=I;return!!(u&&u.render&&u.render())&&(I.data.replace(new Uint8Array(u.data.buffer)),!0)}class $e extends s.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(u){if(this.loaded!==u&&(this.loaded=u,u)){for(const{ids:m,promiseResolve:_}of this.requestors)_(this._getImagesForIds(m));this.requestors=[]}}getImage(u){const m=this.images[u];if(m&&!m.data&&m.spriteData){const _=m.spriteData;m.data=new s.R({width:_.width,height:_.height},_.context.getImageData(_.x,_.y,_.width,_.height).data),m.spriteData=null}return m}addImage(u,m){if(this.images[u])throw new Error(`Image id ${u} already exist, use updateImage instead`);this._validate(u,m)&&(this.images[u]=m)}_validate(u,m){let _=!0;const w=m.data||m.spriteData;return this._validateStretch(m.stretchX,w&&w.width)||(this.fire(new s.j(new Error(`Image "${u}" has invalid "stretchX" value`))),_=!1),this._validateStretch(m.stretchY,w&&w.height)||(this.fire(new s.j(new Error(`Image "${u}" has invalid "stretchY" value`))),_=!1),this._validateContent(m.content,m)||(this.fire(new s.j(new Error(`Image "${u}" has invalid "content" value`))),_=!1),_}_validateStretch(u,m){if(!u)return!0;let _=0;for(const w of u){if(w[0]<_||w[1]<w[0]||m<w[1])return!1;_=w[1]}return!0}_validateContent(u,m){if(!u)return!0;if(u.length!==4)return!1;const _=m.spriteData,w=_&&_.width||m.data.width,k=_&&_.height||m.data.height;return!(u[0]<0||w<u[0]||u[1]<0||k<u[1]||u[2]<0||w<u[2]||u[3]<0||k<u[3]||u[2]<u[0]||u[3]<u[1])}updateImage(u,m,_=!0){const w=this.getImage(u);if(_&&(w.data.width!==m.data.width||w.data.height!==m.data.height))throw new Error(`size mismatch between old image (${w.data.width}x${w.data.height}) and new image (${m.data.width}x${m.data.height}).`);m.version=w.version+1,this.images[u]=m,this.updatedImages[u]=!0}removeImage(u){const m=this.images[u];delete this.images[u],delete this.patterns[u],m.userImage&&m.userImage.onRemove&&m.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(u){return new Promise((m,_)=>{let w=!0;if(!this.isLoaded())for(const k of u)this.images[k]||(w=!1);this.isLoaded()||w?m(this._getImagesForIds(u)):this.requestors.push({ids:u,promiseResolve:m})})}_getImagesForIds(u){const m={};for(const _ of u){let w=this.getImage(_);w||(this.fire(new s.k("styleimagemissing",{id:_})),w=this.getImage(_)),w?m[_]={data:w.data.clone(),pixelRatio:w.pixelRatio,sdf:w.sdf,version:w.version,stretchX:w.stretchX,stretchY:w.stretchY,content:w.content,hasRenderCallback:!!(w.userImage&&w.userImage.render)}:s.w(`Image "${_}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return m}getPixelSize(){const{width:u,height:m}=this.atlasImage;return{width:u,height:m}}getPattern(u){const m=this.patterns[u],_=this.getImage(u);if(!_)return null;if(m&&m.position.version===_.version)return m.position;if(m)m.position.version=_.version;else{const w={w:_.data.width+2,h:_.data.height+2,x:0,y:0},k=new s.I(w,_);this.patterns[u]={bin:w,position:k}}return this._updatePatternAtlas(),this.patterns[u].position}bind(u){const m=u.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Pe(u,this.atlasImage,m.RGBA),this.atlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE)}_updatePatternAtlas(){const u=[];for(const k in this.patterns)u.push(this.patterns[k].bin);const{w:m,h:_}=s.p(u),w=this.atlasImage;w.resize({width:m||1,height:_||1});for(const k in this.patterns){const{bin:R}=this.patterns[k],j=R.x+1,Y=R.y+1,ie=this.getImage(k).data,de=ie.width,me=ie.height;s.R.copy(ie,w,{x:0,y:0},{x:j,y:Y},{width:de,height:me}),s.R.copy(ie,w,{x:0,y:me-1},{x:j,y:Y-1},{width:de,height:1}),s.R.copy(ie,w,{x:0,y:0},{x:j,y:Y+me},{width:de,height:1}),s.R.copy(ie,w,{x:de-1,y:0},{x:j-1,y:Y},{width:1,height:me}),s.R.copy(ie,w,{x:0,y:0},{x:j+de,y:Y},{width:1,height:me})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(u){for(const m of u){if(this.callbackDispatchedThisFrame[m])continue;this.callbackDispatchedThisFrame[m]=!0;const _=this.getImage(m);_||s.w(`Image with ID: "${m}" was not found`),he(_)&&this.updateImage(m,_)}}}const ye=1e20;function gt(I,u,m,_,w,k,R,j,Y){for(let ie=u;ie<u+_;ie++)yt(I,m*k+ie,k,w,R,j,Y);for(let ie=m;ie<m+w;ie++)yt(I,ie*k+u,1,_,R,j,Y)}function yt(I,u,m,_,w,k,R){k[0]=0,R[0]=-ye,R[1]=ye,w[0]=I[u];for(let j=1,Y=0,ie=0;j<_;j++){w[j]=I[u+j*m];const de=j*j;do{const me=k[Y];ie=(w[j]-w[me]+de-me*me)/(j-me)/2}while(ie<=R[Y]&&--Y>-1);Y++,k[Y]=j,R[Y]=ie,R[Y+1]=ye}for(let j=0,Y=0;j<_;j++){for(;R[Y+1]<j;)Y++;const ie=k[Y],de=j-ie;I[u+j*m]=w[ie]+de*de}}class st{constructor(u,m){this.requestManager=u,this.localIdeographFontFamily=m,this.entries={}}setURL(u){this.url=u}getGlyphs(u){return s._(this,void 0,void 0,function*(){const m=[];for(const k in u)for(const R of u[k])m.push(this._getAndCacheGlyphsPromise(k,R));const _=yield Promise.all(m),w={};for(const{stack:k,id:R,glyph:j}of _)w[k]||(w[k]={}),w[k][R]=j&&{id:j.id,bitmap:j.bitmap.clone(),metrics:j.metrics};return w})}_getAndCacheGlyphsPromise(u,m){return s._(this,void 0,void 0,function*(){let _=this.entries[u];_||(_=this.entries[u]={glyphs:{},requests:{},ranges:{}});let w=_.glyphs[m];if(w!==void 0)return{stack:u,id:m,glyph:w};if(w=this._tinySDF(_,u,m),w)return _.glyphs[m]=w,{stack:u,id:m,glyph:w};const k=Math.floor(m/256);if(256*k>65535)throw new Error("glyphs > 65535 not supported");if(_.ranges[k])return{stack:u,id:m,glyph:w};if(!this.url)throw new Error("glyphsUrl is not set");if(!_.requests[k]){const j=st.loadGlyphRange(u,k,this.url,this.requestManager);_.requests[k]=j}const R=yield _.requests[k];for(const j in R)this._doesCharSupportLocalGlyph(+j)||(_.glyphs[+j]=R[+j]);return _.ranges[k]=!0,{stack:u,id:m,glyph:R[m]||null}})}_doesCharSupportLocalGlyph(u){return!!this.localIdeographFontFamily&&(s.u["CJK Unified Ideographs"](u)||s.u["Hangul Syllables"](u)||s.u.Hiragana(u)||s.u.Katakana(u))}_tinySDF(u,m,_){const w=this.localIdeographFontFamily;if(!w||!this._doesCharSupportLocalGlyph(_))return;let k=u.tinySDF;if(!k){let j="400";/bold/i.test(m)?j="900":/medium/i.test(m)?j="500":/light/i.test(m)&&(j="200"),k=u.tinySDF=new st.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:w,fontWeight:j})}const R=k.draw(String.fromCharCode(_));return{id:_,bitmap:new s.o({width:R.width||60,height:R.height||60},R.data),metrics:{width:R.glyphWidth/2||24,height:R.glyphHeight/2||24,left:R.glyphLeft/2+.5||0,top:R.glyphTop/2-27.5||-8,advance:R.glyphAdvance/2||24,isDoubleResolution:!0}}}}st.loadGlyphRange=function(I,u,m,_){return s._(this,void 0,void 0,function*(){const w=256*u,k=w+255,R=_.transformRequest(m.replace("{fontstack}",I).replace("{range}",`${w}-${k}`),ae.Glyphs),j=yield s.l(R,new AbortController);if(!j||!j.data)throw new Error(`Could not load glyph range. range: ${u}, ${w}-${k}`);const Y={};for(const ie of s.n(j.data))Y[ie.id]=ie;return Y})},st.TinySDF=class{constructor({fontSize:I=24,buffer:u=3,radius:m=8,cutoff:_=.25,fontFamily:w="sans-serif",fontWeight:k="normal",fontStyle:R="normal"}={}){this.buffer=u,this.cutoff=_,this.radius=m;const j=this.size=I+4*u,Y=this._createCanvas(j),ie=this.ctx=Y.getContext("2d",{willReadFrequently:!0});ie.font=`${R} ${k} ${I}px ${w}`,ie.textBaseline="alphabetic",ie.textAlign="left",ie.fillStyle="black",this.gridOuter=new Float64Array(j*j),this.gridInner=new Float64Array(j*j),this.f=new Float64Array(j),this.z=new Float64Array(j+1),this.v=new Uint16Array(j)}_createCanvas(I){const u=document.createElement("canvas");return u.width=u.height=I,u}draw(I){const{width:u,actualBoundingBoxAscent:m,actualBoundingBoxDescent:_,actualBoundingBoxLeft:w,actualBoundingBoxRight:k}=this.ctx.measureText(I),R=Math.ceil(m),j=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(k-w))),Y=Math.min(this.size-this.buffer,R+Math.ceil(_)),ie=j+2*this.buffer,de=Y+2*this.buffer,me=Math.max(ie*de,0),Oe=new Uint8ClampedArray(me),qe={data:Oe,width:ie,height:de,glyphWidth:j,glyphHeight:Y,glyphTop:R,glyphLeft:0,glyphAdvance:u};if(j===0||Y===0)return qe;const{ctx:Ye,buffer:He,gridInner:Ne,gridOuter:ht}=this;Ye.clearRect(He,He,j,Y),Ye.fillText(I,He,He+R);const Dt=Ye.getImageData(He,He,j,Y);ht.fill(ye,0,me),Ne.fill(0,0,me);for(let tt=0;tt<Y;tt++)for(let xt=0;xt<j;xt++){const Pt=Dt.data[4*(tt*j+xt)+3]/255;if(Pt===0)continue;const Ut=(tt+He)*ie+xt+He;if(Pt===1)ht[Ut]=0,Ne[Ut]=ye;else{const Xt=.5-Pt;ht[Ut]=Xt>0?Xt*Xt:0,Ne[Ut]=Xt<0?Xt*Xt:0}}gt(ht,0,0,ie,de,ie,this.f,this.v,this.z),gt(Ne,He,He,j,Y,ie,this.f,this.v,this.z);for(let tt=0;tt<me;tt++){const xt=Math.sqrt(ht[tt])-Math.sqrt(Ne[tt]);Oe[tt]=Math.round(255-255*(xt/this.radius+this.cutoff))}return qe}};class ft{constructor(){this.specification=s.v.light.position}possiblyEvaluate(u,m){return s.y(u.expression.evaluate(m))}interpolate(u,m,_){return{x:s.z.number(u.x,m.x,_),y:s.z.number(u.y,m.y,_),z:s.z.number(u.z,m.z,_)}}}let Re;class Ve extends s.E{constructor(u){super(),Re=Re||new s.q({anchor:new s.D(s.v.light.anchor),position:new ft,color:new s.D(s.v.light.color),intensity:new s.D(s.v.light.intensity)}),this._transitionable=new s.T(Re),this.setLight(u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(u,m={}){if(!this._validate(s.r,u,m))for(const _ in u){const w=u[_];_.endsWith("-transition")?this._transitionable.setTransition(_.slice(0,-11),w):this._transitionable.setValue(_,w)}}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,m,_){return(!_||_.validate!==!1)&&s.t(this,u.call(s.x,{value:m,style:{glyphs:!0,sprite:!0},styleSpec:s.v}))}}class Xe{constructor(u,m){this.width=u,this.height=m,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(u,m){const _=u.join(",")+String(m);return this.dashEntry[_]||(this.dashEntry[_]=this.addDash(u,m)),this.dashEntry[_]}getDashRanges(u,m,_){const w=[];let k=u.length%2==1?-u[u.length-1]*_:0,R=u[0]*_,j=!0;w.push({left:k,right:R,isDash:j,zeroLength:u[0]===0});let Y=u[0];for(let ie=1;ie<u.length;ie++){j=!j;const de=u[ie];k=Y*_,Y+=de,R=Y*_,w.push({left:k,right:R,isDash:j,zeroLength:de===0})}return w}addRoundDash(u,m,_){const w=m/2;for(let k=-_;k<=_;k++){const R=this.width*(this.nextRow+_+k);let j=0,Y=u[j];for(let ie=0;ie<this.width;ie++){ie/Y.right>1&&(Y=u[++j]);const de=Math.abs(ie-Y.left),me=Math.abs(ie-Y.right),Oe=Math.min(de,me);let qe;const Ye=k/_*(w+1);if(Y.isDash){const He=w-Math.abs(Ye);qe=Math.sqrt(Oe*Oe+He*He)}else qe=w-Math.sqrt(Oe*Oe+Ye*Ye);this.data[R+ie]=Math.max(0,Math.min(255,qe+128))}}}addRegularDash(u){for(let j=u.length-1;j>=0;--j){const Y=u[j],ie=u[j+1];Y.zeroLength?u.splice(j,1):ie&&ie.isDash===Y.isDash&&(ie.left=Y.left,u.splice(j,1))}const m=u[0],_=u[u.length-1];m.isDash===_.isDash&&(m.left=_.left-this.width,_.right=m.right+this.width);const w=this.width*this.nextRow;let k=0,R=u[k];for(let j=0;j<this.width;j++){j/R.right>1&&(R=u[++k]);const Y=Math.abs(j-R.left),ie=Math.abs(j-R.right),de=Math.min(Y,ie);this.data[w+j]=Math.max(0,Math.min(255,(R.isDash?de:-de)+128))}}addDash(u,m){const _=m?7:0,w=2*_+1;if(this.nextRow+w>this.height)return s.w("LineAtlas out of space"),null;let k=0;for(let j=0;j<u.length;j++)k+=u[j];if(k!==0){const j=this.width/k,Y=this.getDashRanges(u,this.width,j);m?this.addRoundDash(Y,j,_):this.addRegularDash(Y)}const R={y:(this.nextRow+_+.5)/this.height,height:2*_/this.height,width:k};return this.nextRow+=w,this.dirty=!0,R}bind(u){const m=u.gl;this.texture?(m.bindTexture(m.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,m.texSubImage2D(m.TEXTURE_2D,0,0,0,this.width,this.height,m.ALPHA,m.UNSIGNED_BYTE,this.data))):(this.texture=m.createTexture(),m.bindTexture(m.TEXTURE_2D,this.texture),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texImage2D(m.TEXTURE_2D,0,m.ALPHA,this.width,this.height,0,m.ALPHA,m.UNSIGNED_BYTE,this.data))}}const Jt="maplibre_preloaded_worker_pool";class Ht{constructor(){this.active={}}acquire(u){if(!this.workers)for(this.workers=[];this.workers.length<Ht.workerCount;)this.workers.push(new Worker(s.a.WORKER_URL));return this.active[u]=!0,this.workers.slice()}release(u){delete this.active[u],this.numActive()===0&&(this.workers.forEach(m=>{m.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Jt]}numActive(){return Object.keys(this.active).length}}const bt=Math.floor(O.hardwareConcurrency/2);let Qt,Yt;function ke(){return Qt||(Qt=new Ht),Qt}Ht.workerCount=s.B(globalThis)?Math.max(Math.min(bt,3),1):1;class ge{constructor(u,m){this.workerPool=u,this.actors=[],this.currentActor=0,this.id=m;const _=this.workerPool.acquire(m);for(let w=0;w<_.length;w++){const k=new s.C(_[w],m);k.name=`Worker ${w}`,this.actors.push(k)}if(!this.actors.length)throw new Error("No actors found")}broadcast(u,m){const _=[];for(const w of this.actors)_.push(w.sendAsync({type:u,data:m}));return Promise.all(_)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(u=!0){this.actors.forEach(m=>{m.remove()}),this.actors=[],u&&this.workerPool.release(this.id)}registerMessageHandler(u,m){for(const _ of this.actors)_.registerMessageHandler(u,m)}}function Se(){return Yt||(Yt=new ge(ke(),s.G),Yt.registerMessageHandler("getResource",(I,u,m)=>s.m(u,m))),Yt}function ze(I,u){const m=s.F();return s.H(m,m,[1,1,0]),s.J(m,m,[.5*I.width,.5*I.height,1]),s.K(m,m,I.calculatePosMatrix(u.toUnwrapped()))}function it(I,u,m,_,w,k){const R=function(me,Oe,qe){if(me)for(const Ye of me){const He=Oe[Ye];if(He&&He.source===qe&&He.type==="fill-extrusion")return!0}else for(const Ye in Oe){const He=Oe[Ye];if(He.source===qe&&He.type==="fill-extrusion")return!0}return!1}(w&&w.layers,u,I.id),j=k.maxPitchScaleFactor(),Y=I.tilesIn(_,j,R);Y.sort(ot);const ie=[];for(const me of Y)ie.push({wrappedTileID:me.tileID.wrapped().key,queryResults:me.tile.queryRenderedFeatures(u,m,I._state,me.queryGeometry,me.cameraQueryGeometry,me.scale,w,k,j,ze(I.transform,me.tileID))});const de=function(me){const Oe={},qe={};for(const Ye of me){const He=Ye.queryResults,Ne=Ye.wrappedTileID,ht=qe[Ne]=qe[Ne]||{};for(const Dt in He){const tt=He[Dt],xt=ht[Dt]=ht[Dt]||{},Pt=Oe[Dt]=Oe[Dt]||[];for(const Ut of tt)xt[Ut.featureIndex]||(xt[Ut.featureIndex]=!0,Pt.push(Ut))}}return Oe}(ie);for(const me in de)de[me].forEach(Oe=>{const qe=Oe.feature,Ye=I.getFeatureState(qe.layer["source-layer"],qe.id);qe.source=qe.layer.source,qe.layer["source-layer"]&&(qe.sourceLayer=qe.layer["source-layer"]),qe.state=Ye});return de}function ot(I,u){const m=I.tileID,_=u.tileID;return m.overscaledZ-_.overscaledZ||m.canonical.y-_.canonical.y||m.wrap-_.wrap||m.canonical.x-_.canonical.x}function St(I,u,m){return s._(this,void 0,void 0,function*(){let _=I;if(I.url?_=(yield s.h(u.transformRequest(I.url,ae.Source),m)).data:yield O.frameAsync(m),!_)return null;const w=s.L(s.e(_,I),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in _&&_.vector_layers&&(w.vectorLayerIds=_.vector_layers.map(k=>k.id)),w})}class Rt{constructor(u,m){u&&(m?this.setSouthWest(u).setNorthEast(m):Array.isArray(u)&&(u.length===4?this.setSouthWest([u[0],u[1]]).setNorthEast([u[2],u[3]]):this.setSouthWest(u[0]).setNorthEast(u[1])))}setNorthEast(u){return this._ne=u instanceof s.M?new s.M(u.lng,u.lat):s.M.convert(u),this}setSouthWest(u){return this._sw=u instanceof s.M?new s.M(u.lng,u.lat):s.M.convert(u),this}extend(u){const m=this._sw,_=this._ne;let w,k;if(u instanceof s.M)w=u,k=u;else{if(!(u instanceof Rt))return Array.isArray(u)?u.length===4||u.every(Array.isArray)?this.extend(Rt.convert(u)):this.extend(s.M.convert(u)):u&&("lng"in u||"lon"in u)&&"lat"in u?this.extend(s.M.convert(u)):this;if(w=u._sw,k=u._ne,!w||!k)return this}return m||_?(m.lng=Math.min(w.lng,m.lng),m.lat=Math.min(w.lat,m.lat),_.lng=Math.max(k.lng,_.lng),_.lat=Math.max(k.lat,_.lat)):(this._sw=new s.M(w.lng,w.lat),this._ne=new s.M(k.lng,k.lat)),this}getCenter(){return new s.M((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new s.M(this.getWest(),this.getNorth())}getSouthEast(){return new s.M(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(u){const{lng:m,lat:_}=s.M.convert(u);let w=this._sw.lng<=m&&m<=this._ne.lng;return this._sw.lng>this._ne.lng&&(w=this._sw.lng>=m&&m>=this._ne.lng),this._sw.lat<=_&&_<=this._ne.lat&&w}static convert(u){return u instanceof Rt?u:u&&new Rt(u)}static fromLngLat(u,m=0){const _=360*m/40075017,w=_/Math.cos(Math.PI/180*u.lat);return new Rt(new s.M(u.lng-w,u.lat-_),new s.M(u.lng+w,u.lat+_))}}class zt{constructor(u,m,_){this.bounds=Rt.convert(this.validateBounds(u)),this.minzoom=m||0,this.maxzoom=_||24}validateBounds(u){return Array.isArray(u)&&u.length===4?[Math.max(-180,u[0]),Math.max(-90,u[1]),Math.min(180,u[2]),Math.min(90,u[3])]:[-180,-90,180,90]}contains(u){const m=Math.pow(2,u.z),_=Math.floor(s.N(this.bounds.getWest())*m),w=Math.floor(s.O(this.bounds.getNorth())*m),k=Math.ceil(s.N(this.bounds.getEast())*m),R=Math.ceil(s.O(this.bounds.getSouth())*m);return u.x>=_&&u.x<k&&u.y>=w&&u.y<R}}class mt extends s.E{constructor(u,m,_,w){if(super(),this.id=u,this.dispatcher=_,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,s.e(this,s.L(m,["url","scheme","tileSize","promoteId"])),this._options=s.e({type:"vector"},m),this._collectResourceTiming=m.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(w)}load(){return s._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield St(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),u&&(s.e(this,u),u.bounds&&(this.tileBounds=new zt(u.bounds,this.minzoom,this.maxzoom)),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new s.j(u))}})}loaded(){return this._loaded}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}onAdd(u){this.map=u,this.load()}setSourceProperty(u){this._tileJSONRequest&&this._tileJSONRequest.abort(),u(),this.load()}setTiles(u){return this.setSourceProperty(()=>{this._options.tiles=u}),this}setUrl(u){return this.setSourceProperty(()=>{this.url=u,this._options.url=u}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return s.e({},this._options)}loadTile(u){return s._(this,void 0,void 0,function*(){const m=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),_={request:this.map._requestManager.transformRequest(m,ae.Tile),uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,tileSize:this.tileSize*u.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};_.request.collectResourceTiming=this._collectResourceTiming;let w="reloadTile";if(u.actor&&u.state!=="expired"){if(u.state==="loading")return new Promise((k,R)=>{u.reloadPromise={resolve:k,reject:R}})}else u.actor=this.dispatcher.getActor(),w="loadTile";u.abortController=new AbortController;try{const k=yield u.actor.sendAsync({type:w,data:_},u.abortController);if(delete u.abortController,u.aborted)return;this._afterTileLoadWorkerResponse(u,k)}catch(k){if(delete u.abortController,u.aborted)return;if(k&&k.status!==404)throw k;this._afterTileLoadWorkerResponse(u,null)}})}_afterTileLoadWorkerResponse(u,m){if(m&&m.resourceTiming&&(u.resourceTiming=m.resourceTiming),m&&this.map._refreshExpiredTiles&&u.setExpiryData(m),u.loadVectorData(m,this.map.painter),u.reloadPromise){const _=u.reloadPromise;u.reloadPromise=null,this.loadTile(u).then(_.resolve).catch(_.reject)}}abortTile(u){return s._(this,void 0,void 0,function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.actor&&(yield u.actor.sendAsync({type:"abortTile",data:{uid:u.uid,type:this.type,source:this.id}}))})}unloadTile(u){return s._(this,void 0,void 0,function*(){u.unloadVectorData(),u.actor&&(yield u.actor.sendAsync({type:"removeTile",data:{uid:u.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class or extends s.E{constructor(u,m,_,w){super(),this.id=u,this.dispatcher=_,this.setEventedParent(w),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.e({type:"raster"},m),s.e(this,s.L(m,["url","scheme","tileSize"]))}load(){return s._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield St(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,u&&(s.e(this,u),u.bounds&&(this.tileBounds=new zt(u.bounds,this.minzoom,this.maxzoom)),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new s.j(u))}})}loaded(){return this._loaded}onAdd(u){this.map=u,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(u){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),u(),this.load()}setTiles(u){return this.setSourceProperty(()=>{this._options.tiles=u}),this}setUrl(u){return this.setSourceProperty(()=>{this.url=u,this._options.url=u}),this}serialize(){return s.e({},this._options)}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}loadTile(u){return s._(this,void 0,void 0,function*(){const m=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);u.abortController=new AbortController;try{const _=yield Z.getImage(this.map._requestManager.transformRequest(m,ae.Tile),u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(_&&_.data){this.map._refreshExpiredTiles&&_.cacheControl&&_.expires&&u.setExpiryData({cacheControl:_.cacheControl,expires:_.expires});const w=this.map.painter.context,k=w.gl,R=_.data;u.texture=this.map.painter.getTileTexture(R.width),u.texture?u.texture.update(R,{useMipmap:!0}):(u.texture=new Pe(w,R,k.RGBA,{useMipmap:!0}),u.texture.bind(k.LINEAR,k.CLAMP_TO_EDGE,k.LINEAR_MIPMAP_NEAREST),w.extTextureFilterAnisotropic&&k.texParameterf(k.TEXTURE_2D,w.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,w.extTextureFilterAnisotropicMax)),u.state="loaded"}}catch(_){if(delete u.abortController,u.aborted)u.state="unloaded";else if(_)throw u.state="errored",_}})}abortTile(u){return s._(this,void 0,void 0,function*(){u.abortController&&(u.abortController.abort(),delete u.abortController)})}unloadTile(u){return s._(this,void 0,void 0,function*(){u.texture&&this.map.painter.saveTileTexture(u.texture)})}hasTransition(){return!1}}class gn extends or{constructor(u,m,_,w){super(u,m,_,w),this.type="raster-dem",this.maxzoom=22,this._options=s.e({type:"raster-dem"},m),this.encoding=m.encoding||"mapbox",this.redFactor=m.redFactor,this.greenFactor=m.greenFactor,this.blueFactor=m.blueFactor,this.baseShift=m.baseShift}loadTile(u){return s._(this,void 0,void 0,function*(){const m=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),_=this.map._requestManager.transformRequest(m,ae.Tile);u.neighboringTiles=this._getNeighboringTiles(u.tileID),u.abortController=new AbortController;try{const w=yield Z.getImage(_,u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(w&&w.data){const k=w.data;this.map._refreshExpiredTiles&&w.cacheControl&&w.expires&&u.setExpiryData({cacheControl:w.cacheControl,expires:w.expires});const R=s.b(k)&&s.S()?k:yield this.readImageNow(k),j={type:this.type,uid:u.uid,source:this.id,rawImageData:R,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!u.actor||u.state==="expired"){u.actor=this.dispatcher.getActor();const Y=yield u.actor.sendAsync({type:"loadDEMTile",data:j});u.dem=Y,u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0,u.state="loaded"}}}catch(w){if(delete u.abortController,u.aborted)u.state="unloaded";else if(w)throw u.state="errored",w}})}readImageNow(u){return s._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&s.U()){const m=u.width+2,_=u.height+2;try{return new s.R({width:m,height:_},yield s.V(u,-1,-1,m,_))}catch{}}return O.getImageData(u,1)})}_getNeighboringTiles(u){const m=u.canonical,_=Math.pow(2,m.z),w=(m.x-1+_)%_,k=m.x===0?u.wrap-1:u.wrap,R=(m.x+1+_)%_,j=m.x+1===_?u.wrap+1:u.wrap,Y={};return Y[new s.Q(u.overscaledZ,k,m.z,w,m.y).key]={backfilled:!1},Y[new s.Q(u.overscaledZ,j,m.z,R,m.y).key]={backfilled:!1},m.y>0&&(Y[new s.Q(u.overscaledZ,k,m.z,w,m.y-1).key]={backfilled:!1},Y[new s.Q(u.overscaledZ,u.wrap,m.z,m.x,m.y-1).key]={backfilled:!1},Y[new s.Q(u.overscaledZ,j,m.z,R,m.y-1).key]={backfilled:!1}),m.y+1<_&&(Y[new s.Q(u.overscaledZ,k,m.z,w,m.y+1).key]={backfilled:!1},Y[new s.Q(u.overscaledZ,u.wrap,m.z,m.x,m.y+1).key]={backfilled:!1},Y[new s.Q(u.overscaledZ,j,m.z,R,m.y+1).key]={backfilled:!1}),Y}unloadTile(u){return s._(this,void 0,void 0,function*(){u.demTexture&&this.map.painter.saveTileTexture(u.demTexture),u.fbo&&(u.fbo.destroy(),delete u.fbo),u.dem&&delete u.dem,delete u.neighboringTiles,u.state="unloaded",u.actor&&(yield u.actor.sendAsync({type:"removeDEMTile",data:{type:this.type,uid:u.uid,source:this.id}}))})}}class yn extends s.E{constructor(u,m,_,w){super(),this.id=u,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=_.getActor(),this.setEventedParent(w),this._data=m.data,this._options=s.e({},m),this._collectResourceTiming=m.collectResourceTiming,m.maxzoom!==void 0&&(this.maxzoom=m.maxzoom),m.type&&(this.type=m.type),m.attribution&&(this.attribution=m.attribution),this.promoteId=m.promoteId;const k=s.W/this.tileSize;this.workerOptions=s.e({source:this.id,cluster:m.cluster||!1,geojsonVtOptions:{buffer:(m.buffer!==void 0?m.buffer:128)*k,tolerance:(m.tolerance!==void 0?m.tolerance:.375)*k,extent:s.W,maxZoom:this.maxzoom,lineMetrics:m.lineMetrics||!1,generateId:m.generateId||!1},superclusterOptions:{maxZoom:m.clusterMaxZoom!==void 0?m.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,m.clusterMinPoints||2),extent:s.W,radius:(m.clusterRadius||50)*k,log:!1,generateId:m.generateId||!1},clusterProperties:m.clusterProperties,filter:m.filter},m.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return s._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(u){this.map=u,this.load()}setData(u){return this._data=u,this._updateWorkerData(),this}updateData(u){return this._updateWorkerData(u),this}setClusterOptions(u){return this.workerOptions.cluster=u.cluster,u&&(u.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=u.clusterRadius),u.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=u.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(u){return this.actor.sendAsync({type:"getClusterExpansionZoom",data:{type:this.type,clusterId:u,source:this.id}})}getClusterChildren(u){return this.actor.sendAsync({type:"getClusterChildren",data:{type:this.type,clusterId:u,source:this.id}})}getClusterLeaves(u,m,_){return this.actor.sendAsync({type:"getClusterLeaves",data:{type:this.type,source:this.id,clusterId:u,limit:m,offset:_}})}_updateWorkerData(u){return s._(this,void 0,void 0,function*(){const m=s.e({type:this.type},this.workerOptions);u?m.dataDiff=u:typeof this._data=="string"?(m.request=this.map._requestManager.transformRequest(O.resolveURL(this._data),ae.Source),m.request.collectResourceTiming=this._collectResourceTiming):m.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new s.k("dataloading",{dataType:"source"}));try{const _=yield this.actor.sendAsync({type:"loadData",data:m});if(this._pendingLoads--,this._removed||_.abandoned)return void this.fire(new s.k("dataabort",{dataType:"source"}));let w=null;_.resourceTiming&&_.resourceTiming[this.id]&&(w=_.resourceTiming[this.id].slice(0));const k={dataType:"source"};this._collectResourceTiming&&w&&w.length>0&&s.e(k,{resourceTiming:w}),this.fire(new s.k("data",Object.assign(Object.assign({},k),{sourceDataType:"metadata"}))),this.fire(new s.k("data",Object.assign(Object.assign({},k),{sourceDataType:"content"})))}catch(_){if(this._pendingLoads--,this._removed)return void this.fire(new s.k("dataabort",{dataType:"source"}));this.fire(new s.j(_))}})}loaded(){return this._pendingLoads===0}loadTile(u){return s._(this,void 0,void 0,function*(){const m=u.actor?"reloadTile":"loadTile";u.actor=this.actor;const _={type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};u.abortController=new AbortController;const w=yield this.actor.sendAsync({type:m,data:_},u.abortController);delete u.abortController,u.unloadVectorData(),u.aborted||u.loadVectorData(w,this.map.painter,m==="reloadTile")})}abortTile(u){return s._(this,void 0,void 0,function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.aborted=!0})}unloadTile(u){return s._(this,void 0,void 0,function*(){u.unloadVectorData(),yield this.actor.sendAsync({type:"removeTile",data:{uid:u.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"removeSource",data:{type:this.type,source:this.id}})}serialize(){return s.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var tr=s.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class dr extends s.E{constructor(u,m,_,w){super(),this.id=u,this.dispatcher=_,this.coordinates=m.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(w),this.options=m}load(u){return s._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const m=yield Z.getImage(this.map._requestManager.transformRequest(this.url,ae.Image),this._request);this._request=null,this._loaded=!0,m&&m.data&&(this.image=m.data,u&&(this.coordinates=u),this._finishLoading())}catch(m){this._request=null,this.fire(new s.j(m))}})}loaded(){return this._loaded}updateImage(u){return u.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=u.url,this.load(u.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(u){this.map=u,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(u){this.coordinates=u;const m=u.map(s.Y.fromLngLat);this.tileID=function(w){let k=1/0,R=1/0,j=-1/0,Y=-1/0;for(const Oe of w)k=Math.min(k,Oe.x),R=Math.min(R,Oe.y),j=Math.max(j,Oe.x),Y=Math.max(Y,Oe.y);const ie=Math.max(j-k,Y-R),de=Math.max(0,Math.floor(-Math.log(ie)/Math.LN2)),me=Math.pow(2,de);return new s.a0(de,Math.floor((k+j)/2*me),Math.floor((R+Y)/2*me))}(m),this.minzoom=this.maxzoom=this.tileID.z;const _=m.map(w=>this.tileID.getTilePoint(w)._round());return this._boundsArray=new s.Z,this._boundsArray.emplaceBack(_[0].x,_[0].y,0,0),this._boundsArray.emplaceBack(_[1].x,_[1].y,s.W,0),this._boundsArray.emplaceBack(_[3].x,_[3].y,0,s.W),this._boundsArray.emplaceBack(_[2].x,_[2].y,s.W,s.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const u=this.map.painter.context,m=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,tr.members)),this.boundsSegments||(this.boundsSegments=s.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Pe(u,this.image,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));let _=!1;for(const w in this.tiles){const k=this.tiles[w];k.state!=="loaded"&&(k.state="loaded",k.texture=this.texture,_=!0)}_&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(u){return s._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(u.tileID.canonical)?(this.tiles[String(u.tileID.wrap)]=u,u.buckets={}):u.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Sr extends dr{constructor(u,m,_,w){super(u,m,_,w),this.roundZoom=!0,this.type="video",this.options=m}load(){return s._(this,void 0,void 0,function*(){this._loaded=!1;const u=this.options;this.urls=[];for(const m of u.urls)this.urls.push(this.map._requestManager.transformRequest(m,ae.Source).url);try{const m=yield s.a2(this.urls);if(this._loaded=!0,!m)return;this.video=m,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(m){this.fire(new s.j(m))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(u){if(this.video){const m=this.video.seekable;u<m.start(0)||u>m.end(0)?this.fire(new s.j(new s.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${m.start(0)} and ${m.end(0)}-second mark.`))):this.video.currentTime=u}}getVideo(){return this.video}onAdd(u){this.map||(this.map=u,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const u=this.map.painter.context,m=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,tr.members)),this.boundsSegments||(this.boundsSegments=s.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.texSubImage2D(m.TEXTURE_2D,0,0,0,m.RGBA,m.UNSIGNED_BYTE,this.video)):(this.texture=new Pe(u,this.video,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));let _=!1;for(const w in this.tiles){const k=this.tiles[w];k.state!=="loaded"&&(k.state="loaded",k.texture=this.texture,_=!0)}_&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Nr extends dr{constructor(u,m,_,w){super(u,m,_,w),m.coordinates?Array.isArray(m.coordinates)&&m.coordinates.length===4&&!m.coordinates.some(k=>!Array.isArray(k)||k.length!==2||k.some(R=>typeof R!="number"))||this.fire(new s.j(new s.a1(`sources.${u}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.j(new s.a1(`sources.${u}`,null,'missing required property "coordinates"'))),m.animate&&typeof m.animate!="boolean"&&this.fire(new s.j(new s.a1(`sources.${u}`,null,'optional "animate" property must be a boolean value'))),m.canvas?typeof m.canvas=="string"||m.canvas instanceof HTMLCanvasElement||this.fire(new s.j(new s.a1(`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 s.j(new s.a1(`sources.${u}`,null,'missing required property "canvas"'))),this.options=m,this.animate=m.animate===void 0||m.animate}load(){return s._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new s.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let 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)return;const m=this.map.painter.context,_=m.gl;this.boundsBuffer||(this.boundsBuffer=m.createVertexBuffer(this._boundsArray,tr.members)),this.boundsSegments||(this.boundsSegments=s.$.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Pe(m,this.canvas,_.RGBA,{premultiply:!0});let w=!1;for(const k in this.tiles){const R=this.tiles[k];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture,w=!0)}w&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const u of[this.canvas.width,this.canvas.height])if(isNaN(u)||u<=0)return!0;return!1}}const yr={},_i=I=>{switch(I){case"geojson":return yn;case"image":return dr;case"raster":return or;case"raster-dem":return gn;case"vector":return mt;case"video":return Sr;case"canvas":return Nr}return yr[I]},Ee="RTLPluginLoaded";class ee extends s.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Se()}_syncState(u){return this.status=u,this.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:u,pluginURL:this.url}).catch(m=>{throw this.status="error",m})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(u){return s._(this,arguments,void 0,function*(m,_=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=O.resolveURL(m),!this.url)throw new Error(`requested url ${m} is invalid`);if(this.status==="unavailable"){if(!_)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return s._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new s.k(Ee))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let V=null;function Ke(){return V||(V=new ee),V}class At{constructor(u,m){this.timeAdded=0,this.fadeEndTime=0,this.tileID=u,this.uid=s.a3(),this.uses=0,this.tileSize=m,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(u){const m=u+this.timeAdded;m<this.fadeEndTime||(this.fadeEndTime=m)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(u){this.demTexture&&u.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(u,m,_){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",u){u.featureIndex&&(this.latestFeatureIndex=u.featureIndex,u.rawTileData?(this.latestRawTileData=u.rawTileData,this.latestFeatureIndex.rawTileData=u.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=u.collisionBoxArray,this.buckets=function(w,k){const R={};if(!k)return R;for(const j of w){const Y=j.layerIds.map(ie=>k.getLayer(ie)).filter(Boolean);if(Y.length!==0){j.layers=Y,j.stateDependentLayerIds&&(j.stateDependentLayers=j.stateDependentLayerIds.map(ie=>Y.filter(de=>de.id===ie)[0]));for(const ie of Y)R[ie.id]=j}}return R}(u.buckets,m.style),this.hasSymbolBuckets=!1;for(const w in this.buckets){const k=this.buckets[w];if(k instanceof s.a5){if(this.hasSymbolBuckets=!0,!_)break;k.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const w in this.buckets){const k=this.buckets[w];if(k instanceof s.a5&&k.hasRTLText){this.hasRTLText=!0,Ke().lazyLoad();break}}this.queryPadding=0;for(const w in this.buckets){const k=this.buckets[w];this.queryPadding=Math.max(this.queryPadding,m.style.getLayer(w).queryRadius(k))}u.imageAtlas&&(this.imageAtlas=u.imageAtlas),u.glyphAtlasImage&&(this.glyphAtlasImage=u.glyphAtlasImage)}else this.collisionBoxArray=new s.a4}unloadVectorData(){for(const u in this.buckets)this.buckets[u].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(u){return this.buckets[u.id]}upload(u){for(const _ in this.buckets){const w=this.buckets[_];w.uploadPending()&&w.upload(u)}const m=u.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Pe(u,this.imageAtlas.image,m.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Pe(u,this.glyphAtlasImage,m.ALPHA),this.glyphAtlasImage=null)}prepare(u){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(u,this.imageAtlasTexture)}queryRenderedFeatures(u,m,_,w,k,R,j,Y,ie,de){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:w,cameraQueryGeometry:k,scale:R,tileSize:this.tileSize,pixelPosMatrix:de,transform:Y,params:j,queryPadding:this.queryPadding*ie},u,m,_):{}}querySourceFeatures(u,m){const _=this.latestFeatureIndex;if(!_||!_.rawTileData)return;const w=_.loadVTLayers(),k=m&&m.sourceLayer?m.sourceLayer:"",R=w._geojsonTileLayer||w[k];if(!R)return;const j=s.a6(m&&m.filter),{z:Y,x:ie,y:de}=this.tileID.canonical,me={z:Y,x:ie,y:de};for(let Oe=0;Oe<R.length;Oe++){const qe=R.feature(Oe);if(j.needGeometry){const Ne=s.a7(qe,!0);if(!j.filter(new s.a8(this.tileID.overscaledZ),Ne,this.tileID.canonical))continue}else if(!j.filter(new s.a8(this.tileID.overscaledZ),qe))continue;const Ye=_.getId(qe,k),He=new s.a9(qe,Y,ie,de,Ye);He.tile=me,u.push(He)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(u){const m=this.expirationTime;if(u.cacheControl){const _=s.aa(u.cacheControl);_["max-age"]&&(this.expirationTime=Date.now()+1e3*_["max-age"])}else u.expires&&(this.expirationTime=new Date(u.expires).getTime());if(this.expirationTime){const _=Date.now();let w=!1;if(this.expirationTime>_)w=!1;else if(m)if(this.expirationTime<m)w=!0;else{const k=this.expirationTime-m;k?this.expirationTime=_+Math.max(k,3e4):w=!0}else w=!0;w?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(u,m){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(u).length===0)return;const _=this.latestFeatureIndex.loadVTLayers();for(const w in this.buckets){if(!m.style.hasLayer(w))continue;const k=this.buckets[w],R=k.layers[0].sourceLayer||"_geojsonTileLayer",j=_[R],Y=u[R];if(!j||!Y||Object.keys(Y).length===0)continue;k.update(Y,j,this.imageAtlas&&this.imageAtlas.patternPositions||{});const ie=m&&m.style&&m.style.getLayer(w);ie&&(this.queryPadding=Math.max(this.queryPadding,ie.queryRadius(k)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<O.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(u){this.symbolFadeHoldUntil=O.now()+u}setDependencies(u,m){const _={};for(const w of m)_[w]=!0;this.dependencies[u]=_}hasDependency(u,m){for(const _ of u){const w=this.dependencies[_];if(w){for(const k of m)if(w[k])return!0}}return!1}}class Bt{constructor(u,m){this.max=u,this.onRemove=m,this.reset()}reset(){for(const u in this.data)for(const m of this.data[u])m.timeout&&clearTimeout(m.timeout),this.onRemove(m.value);return this.data={},this.order=[],this}add(u,m,_){const w=u.wrapped().key;this.data[w]===void 0&&(this.data[w]=[]);const k={value:m,timeout:void 0};if(_!==void 0&&(k.timeout=setTimeout(()=>{this.remove(u,k)},_)),this.data[w].push(k),this.order.push(w),this.order.length>this.max){const R=this._getAndRemoveByKey(this.order[0]);R&&this.onRemove(R)}return this}has(u){return u.wrapped().key in this.data}getAndRemove(u){return this.has(u)?this._getAndRemoveByKey(u.wrapped().key):null}_getAndRemoveByKey(u){const m=this.data[u].shift();return m.timeout&&clearTimeout(m.timeout),this.data[u].length===0&&delete this.data[u],this.order.splice(this.order.indexOf(u),1),m.value}getByKey(u){const m=this.data[u];return m?m[0].value:null}get(u){return this.has(u)?this.data[u.wrapped().key][0].value:null}remove(u,m){if(!this.has(u))return this;const _=u.wrapped().key,w=m===void 0?0:this.data[_].indexOf(m),k=this.data[_][w];return this.data[_].splice(w,1),k.timeout&&clearTimeout(k.timeout),this.data[_].length===0&&delete this.data[_],this.onRemove(k.value),this.order.splice(this.order.indexOf(_),1),this}setMaxSize(u){for(this.max=u;this.order.length>this.max;){const m=this._getAndRemoveByKey(this.order[0]);m&&this.onRemove(m)}return this}filter(u){const m=[];for(const _ in this.data)for(const w of this.data[_])u(w.value)||m.push(w);for(const _ of m)this.remove(_.value.tileID,_)}}class kt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(u,m,_){const w=String(m);if(this.stateChanges[u]=this.stateChanges[u]||{},this.stateChanges[u][w]=this.stateChanges[u][w]||{},s.e(this.stateChanges[u][w],_),this.deletedStates[u]===null){this.deletedStates[u]={};for(const k in this.state[u])k!==w&&(this.deletedStates[u][k]=null)}else if(this.deletedStates[u]&&this.deletedStates[u][w]===null){this.deletedStates[u][w]={};for(const k in this.state[u][w])_[k]||(this.deletedStates[u][w][k]=null)}else for(const k in _)this.deletedStates[u]&&this.deletedStates[u][w]&&this.deletedStates[u][w][k]===null&&delete this.deletedStates[u][w][k]}removeFeatureState(u,m,_){if(this.deletedStates[u]===null)return;const w=String(m);if(this.deletedStates[u]=this.deletedStates[u]||{},_&&m!==void 0)this.deletedStates[u][w]!==null&&(this.deletedStates[u][w]=this.deletedStates[u][w]||{},this.deletedStates[u][w][_]=null);else if(m!==void 0)if(this.stateChanges[u]&&this.stateChanges[u][w])for(_ in this.deletedStates[u][w]={},this.stateChanges[u][w])this.deletedStates[u][w][_]=null;else this.deletedStates[u][w]=null;else this.deletedStates[u]=null}getState(u,m){const _=String(m),w=s.e({},(this.state[u]||{})[_],(this.stateChanges[u]||{})[_]);if(this.deletedStates[u]===null)return{};if(this.deletedStates[u]){const k=this.deletedStates[u][m];if(k===null)return{};for(const R in k)delete w[R]}return w}initializeTileState(u,m){u.setFeatureState(this.state,m)}coalesceChanges(u,m){const _={};for(const w in this.stateChanges){this.state[w]=this.state[w]||{};const k={};for(const R in this.stateChanges[w])this.state[w][R]||(this.state[w][R]={}),s.e(this.state[w][R],this.stateChanges[w][R]),k[R]=this.state[w][R];_[w]=k}for(const w in this.deletedStates){this.state[w]=this.state[w]||{};const k={};if(this.deletedStates[w]===null)for(const R in this.state[w])k[R]={},this.state[w][R]={};else for(const R in this.deletedStates[w]){if(this.deletedStates[w][R]===null)this.state[w][R]={};else for(const j of Object.keys(this.deletedStates[w][R]))delete this.state[w][R][j];k[R]=this.state[w][R]}_[w]=_[w]||{},s.e(_[w],k)}if(this.stateChanges={},this.deletedStates={},Object.keys(_).length!==0)for(const w in u)u[w].setFeatureState(_,m)}}class Lt extends s.E{constructor(u,m,_){super(),this.id=u,this.dispatcher=_,this.on("data",w=>{w.dataType==="source"&&w.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType==="source"&&w.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((w,k,R,j)=>{const Y=new(_i(k.type))(w,k,R,j);if(Y.id!==w)throw new Error(`Expected Source id to be ${w} instead of ${Y.id}`);return Y})(u,m,_,this),this._tiles={},this._cache=new Bt(0,w=>this._unloadTile(w)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new kt,this._didEmitContent=!1,this._updated=!1}onAdd(u){this.map=u,this._maxTileCacheSize=u?u._maxTileCacheSize:null,this._maxTileCacheZoomLevels=u?u._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(u)}onRemove(u){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(u)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const u in this._tiles){const m=this._tiles[u];if(m.state!=="loaded"&&m.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const u=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,u&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(u,m,_){return s._(this,void 0,void 0,function*(){try{yield this._source.loadTile(u),this._tileLoaded(u,m,_)}catch(w){u.state="errored",w.status!==404?this._source.fire(new s.j(w,{tile:u})):this.update(this.transform,this.terrain)}})}_unloadTile(u){this._source.unloadTile&&this._source.unloadTile(u)}_abortTile(u){this._source.abortTile&&this._source.abortTile(u),this._source.fire(new s.k("dataabort",{tile:u,coord:u.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(u){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const m in this._tiles){const _=this._tiles[m];_.upload(u),_.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(u=>u.tileID).sort(fn).map(u=>u.key)}getRenderableIds(u){const m=[];for(const _ in this._tiles)this._isIdRenderable(_,u)&&m.push(this._tiles[_]);return u?m.sort((_,w)=>{const k=_.tileID,R=w.tileID,j=new s.P(k.canonical.x,k.canonical.y)._rotate(this.transform.angle),Y=new s.P(R.canonical.x,R.canonical.y)._rotate(this.transform.angle);return k.overscaledZ-R.overscaledZ||Y.y-j.y||Y.x-j.x}).map(_=>_.tileID.key):m.map(_=>_.tileID).sort(fn).map(_=>_.key)}hasRenderableParent(u){const m=this.findLoadedParent(u,0);return!!m&&this._isIdRenderable(m.tileID.key)}_isIdRenderable(u,m){return this._tiles[u]&&this._tiles[u].hasData()&&!this._coveredTiles[u]&&(m||!this._tiles[u].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const u in this._tiles)this._tiles[u].state!=="errored"&&this._reloadTile(u,"reloading")}}_reloadTile(u,m){return s._(this,void 0,void 0,function*(){const _=this._tiles[u];_&&(_.state!=="loading"&&(_.state=m),yield this._loadTile(_,u,m))})}_tileLoaded(u,m,_){u.timeAdded=O.now(),_==="expired"&&(u.refreshedUponExpiration=!0),this._setTileReloadTimer(m,u),this.getSource().type==="raster-dem"&&u.dem&&this._backfillDEM(u),this._state.initializeTileState(u,this.map?this.map.painter:null),u.aborted||this._source.fire(new s.k("data",{dataType:"source",tile:u,coord:u.tileID}))}_backfillDEM(u){const m=this.getRenderableIds();for(let w=0;w<m.length;w++){const k=m[w];if(u.neighboringTiles&&u.neighboringTiles[k]){const R=this.getTileByID(k);_(u,R),_(R,u)}}function _(w,k){w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0;let R=k.tileID.canonical.x-w.tileID.canonical.x;const j=k.tileID.canonical.y-w.tileID.canonical.y,Y=Math.pow(2,w.tileID.canonical.z),ie=k.tileID.key;R===0&&j===0||Math.abs(j)>1||(Math.abs(R)>1&&(Math.abs(R+Y)===1?R+=Y:Math.abs(R-Y)===1&&(R-=Y)),k.dem&&w.dem&&(w.dem.backfillBorder(k.dem,R,j),w.neighboringTiles&&w.neighboringTiles[ie]&&(w.neighboringTiles[ie].backfilled=!0)))}}getTile(u){return this.getTileByID(u.key)}getTileByID(u){return this._tiles[u]}_retainLoadedChildren(u,m,_,w){for(const k in this._tiles){let R=this._tiles[k];if(w[k]||!R.hasData()||R.tileID.overscaledZ<=m||R.tileID.overscaledZ>_)continue;let j=R.tileID;for(;R&&R.tileID.overscaledZ>m+1;){const ie=R.tileID.scaledTo(R.tileID.overscaledZ-1);R=this._tiles[ie.key],R&&R.hasData()&&(j=ie)}let Y=j;for(;Y.overscaledZ>m;)if(Y=Y.scaledTo(Y.overscaledZ-1),u[Y.key]){w[j.key]=j;break}}}findLoadedParent(u,m){if(u.key in this._loadedParentTiles){const _=this._loadedParentTiles[u.key];return _&&_.tileID.overscaledZ>=m?_:null}for(let _=u.overscaledZ-1;_>=m;_--){const w=u.scaledTo(_),k=this._getLoadedTile(w);if(k)return k}}_getLoadedTile(u){const m=this._tiles[u.key];return m&&m.hasData()?m:this._cache.getByKey(u.wrapped().key)}updateCacheSize(u){const m=Math.ceil(u.width/this._source.tileSize)+1,_=Math.ceil(u.height/this._source.tileSize)+1,w=Math.floor(m*_*(this._maxTileCacheZoomLevels===null?s.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),k=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,w):w;this._cache.setMaxSize(k)}handleWrapJump(u){const m=Math.round((u-(this._prevLng===void 0?u:this._prevLng))/360);if(this._prevLng=u,m){const _={};for(const w in this._tiles){const k=this._tiles[w];k.tileID=k.tileID.unwrapTo(k.tileID.wrap+m),_[k.tileID.key]=k}this._tiles=_;for(const w in this._timers)clearTimeout(this._timers[w]),delete this._timers[w];for(const w in this._tiles)this._setTileReloadTimer(w,this._tiles[w])}}update(u,m){if(this.transform=u,this.terrain=m,!this._sourceLoaded||this._paused)return;let _;this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?_=u.getVisibleUnwrappedCoordinates(this._source.tileID).map(de=>new s.Q(de.canonical.z,de.wrap,de.canonical.z,de.canonical.x,de.canonical.y)):(_=u.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:m}),this._source.hasTile&&(_=_.filter(de=>this._source.hasTile(de)))):_=[];const w=u.coveringZoomLevel(this._source),k=Math.max(w-Lt.maxOverzooming,this._source.minzoom),R=Math.max(w+Lt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const de={};for(const me of _)if(me.canonical.z>this._source.minzoom){const Oe=me.scaledTo(me.canonical.z-1);de[Oe.key]=Oe;const qe=me.scaledTo(Math.max(this._source.minzoom,Math.min(me.canonical.z,5)));de[qe.key]=qe}_=_.concat(Object.values(de))}const j=_.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,j&&this.fire(new s.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const Y=this._updateRetainedTiles(_,w);if(Pn(this._source.type)){const de={},me={},Oe=Object.keys(Y),qe=O.now();for(const Ye of Oe){const He=Y[Ye],Ne=this._tiles[Ye];if(!Ne||Ne.fadeEndTime!==0&&Ne.fadeEndTime<=qe)continue;const ht=this.findLoadedParent(He,k);ht&&(this._addTile(ht.tileID),de[ht.tileID.key]=ht.tileID),me[Ye]=He}this._retainLoadedChildren(me,w,R,Y);for(const Ye in de)Y[Ye]||(this._coveredTiles[Ye]=!0,Y[Ye]=de[Ye]);if(m){const Ye={},He={};for(const Ne of _)this._tiles[Ne.key].hasData()?Ye[Ne.key]=Ne:He[Ne.key]=Ne;for(const Ne in He){const ht=He[Ne].children(this._source.maxzoom);this._tiles[ht[0].key]&&this._tiles[ht[1].key]&&this._tiles[ht[2].key]&&this._tiles[ht[3].key]&&(Ye[ht[0].key]=Y[ht[0].key]=ht[0],Ye[ht[1].key]=Y[ht[1].key]=ht[1],Ye[ht[2].key]=Y[ht[2].key]=ht[2],Ye[ht[3].key]=Y[ht[3].key]=ht[3],delete He[Ne])}for(const Ne in He){const ht=this.findLoadedParent(He[Ne],this._source.minzoom);if(ht){Ye[ht.tileID.key]=Y[ht.tileID.key]=ht.tileID;for(const Dt in Ye)Ye[Dt].isChildOf(ht.tileID)&&delete Ye[Dt]}}for(const Ne in this._tiles)Ye[Ne]||(this._coveredTiles[Ne]=!0)}}for(const de in Y)this._tiles[de].clearFadeHold();const ie=s.ab(this._tiles,Y);for(const de of ie){const me=this._tiles[de];me.hasSymbolBuckets&&!me.holdingForFade()?me.setHoldDuration(this.map._fadeDuration):me.hasSymbolBuckets&&!me.symbolFadeFinished()||this._removeTile(de)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const u in this._tiles)this._tiles[u].holdingForFade()&&this._removeTile(u)}_updateRetainedTiles(u,m){const _={},w={},k=Math.max(m-Lt.maxOverzooming,this._source.minzoom),R=Math.max(m+Lt.maxUnderzooming,this._source.minzoom),j={};for(const Y of u){const ie=this._addTile(Y);_[Y.key]=Y,ie.hasData()||m<this._source.maxzoom&&(j[Y.key]=Y)}this._retainLoadedChildren(j,m,R,_);for(const Y of u){let ie=this._tiles[Y.key];if(ie.hasData())continue;if(m+1>this._source.maxzoom){const me=Y.children(this._source.maxzoom)[0],Oe=this.getTile(me);if(Oe&&Oe.hasData()){_[me.key]=me;continue}}else{const me=Y.children(this._source.maxzoom);if(_[me[0].key]&&_[me[1].key]&&_[me[2].key]&&_[me[3].key])continue}let de=ie.wasRequested();for(let me=Y.overscaledZ-1;me>=k;--me){const Oe=Y.scaledTo(me);if(w[Oe.key])break;if(w[Oe.key]=!0,ie=this.getTile(Oe),!ie&&de&&(ie=this._addTile(Oe)),ie){const qe=ie.hasData();if((de||qe)&&(_[Oe.key]=Oe),de=ie.wasRequested(),qe)break}}}return _}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const u in this._tiles){const m=[];let _,w=this._tiles[u].tileID;for(;w.overscaledZ>0;){if(w.key in this._loadedParentTiles){_=this._loadedParentTiles[w.key];break}m.push(w.key);const k=w.scaledTo(w.overscaledZ-1);if(_=this._getLoadedTile(k),_)break;w=k}for(const k of m)this._loadedParentTiles[k]=_}}_addTile(u){let m=this._tiles[u.key];if(m)return m;m=this._cache.getAndRemove(u),m&&(this._setTileReloadTimer(u.key,m),m.tileID=u,this._state.initializeTileState(m,this.map?this.map.painter:null),this._cacheTimers[u.key]&&(clearTimeout(this._cacheTimers[u.key]),delete this._cacheTimers[u.key],this._setTileReloadTimer(u.key,m)));const _=m;return m||(m=new At(u,this._source.tileSize*u.overscaleFactor()),this._loadTile(m,u.key,m.state)),m.uses++,this._tiles[u.key]=m,_||this._source.fire(new s.k("dataloading",{tile:m,coord:m.tileID,dataType:"source"})),m}_setTileReloadTimer(u,m){u in this._timers&&(clearTimeout(this._timers[u]),delete this._timers[u]);const _=m.getExpiryTimeout();_&&(this._timers[u]=setTimeout(()=>{this._reloadTile(u,"expired"),delete this._timers[u]},_))}_removeTile(u){const m=this._tiles[u];m&&(m.uses--,delete this._tiles[u],this._timers[u]&&(clearTimeout(this._timers[u]),delete this._timers[u]),m.uses>0||(m.hasData()&&m.state!=="reloading"?this._cache.add(m.tileID,m,m.getExpiryTimeout()):(m.aborted=!0,this._abortTile(m),this._unloadTile(m))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const u in this._tiles)this._removeTile(u);this._cache.reset()}tilesIn(u,m,_){const w=[],k=this.transform;if(!k)return w;const R=_?k.getCameraQueryGeometry(u):u,j=u.map(Ye=>k.pointCoordinate(Ye,this.terrain)),Y=R.map(Ye=>k.pointCoordinate(Ye,this.terrain)),ie=this.getIds();let de=1/0,me=1/0,Oe=-1/0,qe=-1/0;for(const Ye of Y)de=Math.min(de,Ye.x),me=Math.min(me,Ye.y),Oe=Math.max(Oe,Ye.x),qe=Math.max(qe,Ye.y);for(let Ye=0;Ye<ie.length;Ye++){const He=this._tiles[ie[Ye]];if(He.holdingForFade())continue;const Ne=He.tileID,ht=Math.pow(2,k.zoom-He.tileID.overscaledZ),Dt=m*He.queryPadding*s.W/He.tileSize/ht,tt=[Ne.getTilePoint(new s.Y(de,me)),Ne.getTilePoint(new s.Y(Oe,qe))];if(tt[0].x-Dt<s.W&&tt[0].y-Dt<s.W&&tt[1].x+Dt>=0&&tt[1].y+Dt>=0){const xt=j.map(Ut=>Ne.getTilePoint(Ut)),Pt=Y.map(Ut=>Ne.getTilePoint(Ut));w.push({tile:He,tileID:Ne,queryGeometry:xt,cameraQueryGeometry:Pt,scale:ht})}}return w}getVisibleCoordinates(u){const m=this.getRenderableIds(u).map(_=>this._tiles[_].tileID);for(const _ of m)_.posMatrix=this.transform.calculatePosMatrix(_.toUnwrapped());return m}hasTransition(){if(this._source.hasTransition())return!0;if(Pn(this._source.type)){const u=O.now();for(const m in this._tiles)if(this._tiles[m].fadeEndTime>=u)return!0}return!1}setFeatureState(u,m,_){this._state.updateState(u=u||"_geojsonTileLayer",m,_)}removeFeatureState(u,m,_){this._state.removeFeatureState(u=u||"_geojsonTileLayer",m,_)}getFeatureState(u,m){return this._state.getState(u=u||"_geojsonTileLayer",m)}setDependencies(u,m,_){const w=this._tiles[u];w&&w.setDependencies(m,_)}reloadTilesForDependencies(u,m){for(const _ in this._tiles)this._tiles[_].hasDependency(u,m)&&this._reloadTile(_,"reloading");this._cache.filter(_=>!_.hasDependency(u,m))}}function fn(I,u){const m=Math.abs(2*I.wrap)-+(I.wrap<0),_=Math.abs(2*u.wrap)-+(u.wrap<0);return I.overscaledZ-u.overscaledZ||_-m||u.canonical.y-I.canonical.y||u.canonical.x-I.canonical.x}function Pn(I){return I==="raster"||I==="image"||I==="video"}Lt.maxOverzooming=10,Lt.maxUnderzooming=3;class On{constructor(u,m){this.reset(u,m)}reset(u,m){this.points=u||[],this._distances=[0];for(let _=1;_<this.points.length;_++)this._distances[_]=this._distances[_-1]+this.points[_].dist(this.points[_-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(m||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(u){if(this.points.length===1)return this.points[0];u=s.ac(u,0,1);let m=1,_=this._distances[m];const w=u*this.paddedLength+this.padding;for(;_<w&&m<this._distances.length;)_=this._distances[++m];const k=m-1,R=this._distances[k],j=_-R,Y=j>0?(w-R)/j:0;return this.points[k].mult(1-Y).add(this.points[m].mult(Y))}}function g(I,u){let m=!0;return I==="always"||I!=="never"&&u!=="never"||(m=!1),m}class Kt{constructor(u,m,_){const w=this.boxCells=[],k=this.circleCells=[];this.xCellCount=Math.ceil(u/_),this.yCellCount=Math.ceil(m/_);for(let R=0;R<this.xCellCount*this.yCellCount;R++)w.push([]),k.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=u,this.height=m,this.xScale=this.xCellCount/u,this.yScale=this.yCellCount/m,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(u,m,_,w,k){this._forEachCell(m,_,w,k,this._insertBoxCell,this.boxUid++),this.boxKeys.push(u),this.bboxes.push(m),this.bboxes.push(_),this.bboxes.push(w),this.bboxes.push(k)}insertCircle(u,m,_,w){this._forEachCell(m-w,_-w,m+w,_+w,this._insertCircleCell,this.circleUid++),this.circleKeys.push(u),this.circles.push(m),this.circles.push(_),this.circles.push(w)}_insertBoxCell(u,m,_,w,k,R){this.boxCells[k].push(R)}_insertCircleCell(u,m,_,w,k,R){this.circleCells[k].push(R)}_query(u,m,_,w,k,R,j){if(_<0||u>this.width||w<0||m>this.height)return[];const Y=[];if(u<=0&&m<=0&&this.width<=_&&this.height<=w){if(k)return[{key:null,x1:u,y1:m,x2:_,y2:w}];for(let ie=0;ie<this.boxKeys.length;ie++)Y.push({key:this.boxKeys[ie],x1:this.bboxes[4*ie],y1:this.bboxes[4*ie+1],x2:this.bboxes[4*ie+2],y2:this.bboxes[4*ie+3]});for(let ie=0;ie<this.circleKeys.length;ie++){const de=this.circles[3*ie],me=this.circles[3*ie+1],Oe=this.circles[3*ie+2];Y.push({key:this.circleKeys[ie],x1:de-Oe,y1:me-Oe,x2:de+Oe,y2:me+Oe})}}else this._forEachCell(u,m,_,w,this._queryCell,Y,{hitTest:k,overlapMode:R,seenUids:{box:{},circle:{}}},j);return Y}query(u,m,_,w){return this._query(u,m,_,w,!1,null)}hitTest(u,m,_,w,k,R){return this._query(u,m,_,w,!0,k,R).length>0}hitTestCircle(u,m,_,w,k){const R=u-_,j=u+_,Y=m-_,ie=m+_;if(j<0||R>this.width||ie<0||Y>this.height)return!1;const de=[];return this._forEachCell(R,Y,j,ie,this._queryCellCircle,de,{hitTest:!0,overlapMode:w,circle:{x:u,y:m,radius:_},seenUids:{box:{},circle:{}}},k),de.length>0}_queryCell(u,m,_,w,k,R,j,Y){const{seenUids:ie,hitTest:de,overlapMode:me}=j,Oe=this.boxCells[k];if(Oe!==null){const Ye=this.bboxes;for(const He of Oe)if(!ie.box[He]){ie.box[He]=!0;const Ne=4*He,ht=this.boxKeys[He];if(u<=Ye[Ne+2]&&m<=Ye[Ne+3]&&_>=Ye[Ne+0]&&w>=Ye[Ne+1]&&(!Y||Y(ht))&&(!de||!g(me,ht.overlapMode))&&(R.push({key:ht,x1:Ye[Ne],y1:Ye[Ne+1],x2:Ye[Ne+2],y2:Ye[Ne+3]}),de))return!0}}const qe=this.circleCells[k];if(qe!==null){const Ye=this.circles;for(const He of qe)if(!ie.circle[He]){ie.circle[He]=!0;const Ne=3*He,ht=this.circleKeys[He];if(this._circleAndRectCollide(Ye[Ne],Ye[Ne+1],Ye[Ne+2],u,m,_,w)&&(!Y||Y(ht))&&(!de||!g(me,ht.overlapMode))){const Dt=Ye[Ne],tt=Ye[Ne+1],xt=Ye[Ne+2];if(R.push({key:ht,x1:Dt-xt,y1:tt-xt,x2:Dt+xt,y2:tt+xt}),de)return!0}}}return!1}_queryCellCircle(u,m,_,w,k,R,j,Y){const{circle:ie,seenUids:de,overlapMode:me}=j,Oe=this.boxCells[k];if(Oe!==null){const Ye=this.bboxes;for(const He of Oe)if(!de.box[He]){de.box[He]=!0;const Ne=4*He,ht=this.boxKeys[He];if(this._circleAndRectCollide(ie.x,ie.y,ie.radius,Ye[Ne+0],Ye[Ne+1],Ye[Ne+2],Ye[Ne+3])&&(!Y||Y(ht))&&!g(me,ht.overlapMode))return R.push(!0),!0}}const qe=this.circleCells[k];if(qe!==null){const Ye=this.circles;for(const He of qe)if(!de.circle[He]){de.circle[He]=!0;const Ne=3*He,ht=this.circleKeys[He];if(this._circlesCollide(Ye[Ne],Ye[Ne+1],Ye[Ne+2],ie.x,ie.y,ie.radius)&&(!Y||Y(ht))&&!g(me,ht.overlapMode))return R.push(!0),!0}}}_forEachCell(u,m,_,w,k,R,j,Y){const ie=this._convertToXCellCoord(u),de=this._convertToYCellCoord(m),me=this._convertToXCellCoord(_),Oe=this._convertToYCellCoord(w);for(let qe=ie;qe<=me;qe++)for(let Ye=de;Ye<=Oe;Ye++)if(k.call(this,u,m,_,w,this.xCellCount*Ye+qe,R,j,Y))return}_convertToXCellCoord(u){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(u*this.xScale)))}_convertToYCellCoord(u){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(u*this.yScale)))}_circlesCollide(u,m,_,w,k,R){const j=w-u,Y=k-m,ie=_+R;return ie*ie>j*j+Y*Y}_circleAndRectCollide(u,m,_,w,k,R,j){const Y=(R-w)/2,ie=Math.abs(u-(w+Y));if(ie>Y+_)return!1;const de=(j-k)/2,me=Math.abs(m-(k+de));if(me>de+_)return!1;if(ie<=Y||me<=de)return!0;const Oe=ie-Y,qe=me-de;return Oe*Oe+qe*qe<=_*_}}function Pr(I,u,m,_,w){const k=s.F();return u?(s.J(k,k,[1/w,1/w,1]),m||s.ad(k,k,_.angle)):s.K(k,_.labelPlaneMatrix,I),k}function rr(I,u,m,_,w){if(u){const k=s.ae(I);return s.J(k,k,[w,w,1]),m||s.ad(k,k,-_.angle),k}return _.glCoordMatrix}function Le(I,u,m){let _;m?(_=[I.x,I.y,m(I.x,I.y),1],s.af(_,_,u)):(_=[I.x,I.y,0,1],Bn(_,_,u));const w=_[3];return{point:new s.P(_[0]/w,_[1]/w),signedDistanceFromCamera:w}}function ce(I,u){return .5+I/u*.5}function xe(I,u){const m=I[0]/I[3],_=I[1]/I[3];return m>=-u[0]&&m<=u[0]&&_>=-u[1]&&_<=u[1]}function Ie(I,u,m,_,w,k,R,j,Y,ie){const de=_?I.textSizeData:I.iconSizeData,me=s.ag(de,m.transform.zoom),Oe=[256/m.width*2+1,256/m.height*2+1],qe=_?I.text.dynamicLayoutVertexArray:I.icon.dynamicLayoutVertexArray;qe.clear();const Ye=I.lineVertexArray,He=_?I.text.placedSymbolArray:I.icon.placedSymbolArray,Ne=m.transform.width/m.transform.height;let ht=!1;for(let Dt=0;Dt<He.length;Dt++){const tt=He.get(Dt);if(tt.hidden||tt.writingMode===s.ah.vertical&&!ht){Fn(tt.numGlyphs,qe);continue}let xt;if(ht=!1,ie?(xt=[tt.anchorX,tt.anchorY,ie(tt.anchorX,tt.anchorY),1],s.af(xt,xt,u)):(xt=[tt.anchorX,tt.anchorY,0,1],Bn(xt,xt,u)),!xe(xt,Oe)){Fn(tt.numGlyphs,qe);continue}const Pt=ce(m.transform.cameraToCenterDistance,xt[3]),Ut=s.ai(de,me,tt),Xt=R?Ut/Pt:Ut*Pt,hn=new s.P(tt.anchorX,tt.anchorY),un=Le(hn,w,ie).point,pn={projections:{},offsets:{}},qn=lt(tt,Xt,!1,j,u,w,k,I.glyphOffsetArray,Ye,qe,un,hn,pn,Ne,Y,ie);ht=qn.useVertical,(qn.notEnoughRoom||ht||qn.needsFlipping&&lt(tt,Xt,!0,j,u,w,k,I.glyphOffsetArray,Ye,qe,un,hn,pn,Ne,Y,ie).notEnoughRoom)&&Fn(tt.numGlyphs,qe)}_?I.text.dynamicLayoutVertexBuffer.updateData(qe):I.icon.dynamicLayoutVertexBuffer.updateData(qe)}function je(I,u,m,_,w,k,R,j,Y,ie,de,me,Oe){const qe=j.glyphStartIndex+j.numGlyphs,Ye=j.lineStartIndex,He=j.lineStartIndex+j.lineLength,Ne=u.getoffsetX(j.glyphStartIndex),ht=u.getoffsetX(qe-1),Dt=qt(I*Ne,m,_,w,k,R,j.segment,Ye,He,Y,ie,de,me,Oe);if(!Dt)return null;const tt=qt(I*ht,m,_,w,k,R,j.segment,Ye,He,Y,ie,de,me,Oe);return tt?{first:Dt,last:tt}:null}function rt(I,u,m,_){return I===s.ah.horizontal&&Math.abs(m.y-u.y)>Math.abs(m.x-u.x)*_?{useVertical:!0}:(I===s.ah.vertical?u.y<m.y:u.x>m.x)?{needsFlipping:!0}:null}function lt(I,u,m,_,w,k,R,j,Y,ie,de,me,Oe,qe,Ye,He){const Ne=u/24,ht=I.lineOffsetX*Ne,Dt=I.lineOffsetY*Ne;let tt;if(I.numGlyphs>1){const xt=I.glyphStartIndex+I.numGlyphs,Pt=I.lineStartIndex,Ut=I.lineStartIndex+I.lineLength,Xt=je(Ne,j,ht,Dt,m,de,me,I,Y,k,Oe,Ye,He);if(!Xt)return{notEnoughRoom:!0};const hn=Le(Xt.first.point,R,He).point,un=Le(Xt.last.point,R,He).point;if(_&&!m){const pn=rt(I.writingMode,hn,un,qe);if(pn)return pn}tt=[Xt.first];for(let pn=I.glyphStartIndex+1;pn<xt-1;pn++)tt.push(qt(Ne*j.getoffsetX(pn),ht,Dt,m,de,me,I.segment,Pt,Ut,Y,k,Oe,Ye,He));tt.push(Xt.last)}else{if(_&&!m){const Pt=Le(me,w,He).point,Ut=I.lineStartIndex+I.segment+1,Xt=new s.P(Y.getx(Ut),Y.gety(Ut)),hn=Le(Xt,w,He),un=hn.signedDistanceFromCamera>0?hn.point:pt(me,Xt,Pt,1,w,He),pn=rt(I.writingMode,Pt,un,qe);if(pn)return pn}const xt=qt(Ne*j.getoffsetX(I.glyphStartIndex),ht,Dt,m,de,me,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Y,k,Oe,Ye,He);if(!xt)return{notEnoughRoom:!0};tt=[xt]}for(const xt of tt)s.aj(ie,xt.point,xt.angle);return{}}function pt(I,u,m,_,w,k){const R=Le(I.add(I.sub(u)._unit()),w,k).point,j=m.sub(R);return m.add(j._mult(_/j.mag()))}function et(I,u){const{projectionCache:m,lineVertexArray:_,labelPlaneMatrix:w,tileAnchorPoint:k,distanceFromAnchor:R,getElevation:j,previousVertex:Y,direction:ie,absOffsetX:de}=u;if(m.projections[I])return m.projections[I];const me=new s.P(_.getx(I),_.gety(I)),Oe=Le(me,w,j);if(Oe.signedDistanceFromCamera>0)return m.projections[I]=Oe.point,Oe.point;const qe=I-ie;return pt(R===0?k:new s.P(_.getx(qe),_.gety(qe)),me,Y,de-R+1,w,j)}function Mt(I,u,m){return I._unit()._perp()._mult(u*m)}function tn(I,u,m,_,w,k,R,j){const{projectionCache:Y,direction:ie}=j;if(Y.offsets[I])return Y.offsets[I];const de=m.add(u);if(I+ie<_||I+ie>=w)return Y.offsets[I]=de,de;const me=et(I+ie,j),Oe=Mt(me.sub(m),R,ie),qe=m.add(Oe),Ye=me.add(Oe);return Y.offsets[I]=s.ak(k,de,qe,Ye)||de,Y.offsets[I]}function qt(I,u,m,_,w,k,R,j,Y,ie,de,me,Oe,qe){const Ye=_?I-u:I+u;let He=Ye>0?1:-1,Ne=0;_&&(He*=-1,Ne=Math.PI),He<0&&(Ne+=Math.PI);let ht,Dt,tt=He>0?j+R:j+R+1,xt=w,Pt=w,Ut=0,Xt=0;const hn=Math.abs(Ye),un=[];let pn;for(;Ut+Xt<=hn;){if(tt+=He,tt<j||tt>=Y)return null;Ut+=Xt,Pt=xt,Dt=ht;const In={projectionCache:me,lineVertexArray:ie,labelPlaneMatrix:de,tileAnchorPoint:k,distanceFromAnchor:Ut,getElevation:qe,previousVertex:Pt,direction:He,absOffsetX:hn};if(xt=et(tt,In),m===0)un.push(Pt),pn=xt.sub(Pt);else{let Cr;const hi=xt.sub(Pt);Cr=hi.mag()===0?Mt(et(tt+He,In).sub(xt),m,He):Mt(hi,m,He),Dt||(Dt=Pt.add(Cr)),ht=tn(tt,Cr,xt,j,Y,Dt,m,In),un.push(Dt),pn=ht.sub(Dt)}Xt=pn.mag()}const qn=pn._mult((hn-Ut)/Xt)._add(Dt||Pt),qr=Ne+Math.atan2(xt.y-Pt.y,xt.x-Pt.x);return un.push(qn),{point:qn,angle:Oe?qr:0,path:un}}const en=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Fn(I,u){for(let m=0;m<I;m++){const _=u.length;u.resize(_+4),u.float32.set(en,3*_)}}function Bn(I,u,m){const _=u[0],w=u[1];return I[0]=m[0]*_+m[4]*w+m[12],I[1]=m[1]*_+m[5]*w+m[13],I[3]=m[3]*_+m[7]*w+m[15],I}const Hn=100;class Or{constructor(u,m=new Kt(u.width+200,u.height+200,25),_=new Kt(u.width+200,u.height+200,25)){this.transform=u,this.grid=m,this.ignoredGrid=_,this.pitchfactor=Math.cos(u._pitch)*u.cameraToCenterDistance,this.screenRightBoundary=u.width+Hn,this.screenBottomBoundary=u.height+Hn,this.gridRightBoundary=u.width+200,this.gridBottomBoundary=u.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(u,m,_,w,k,R){const j=this.projectAndGetPerspectiveRatio(w,u.anchorPointX,u.anchorPointY,R),Y=_*j.perspectiveRatio,ie=u.x1*Y+j.point.x,de=u.y1*Y+j.point.y,me=u.x2*Y+j.point.x,Oe=u.y2*Y+j.point.y;return!this.isInsideGrid(ie,de,me,Oe)||m!=="always"&&this.grid.hitTest(ie,de,me,Oe,m,k)||j.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[ie,de,me,Oe],offscreen:this.isOffscreen(ie,de,me,Oe)}}placeCollisionCircles(u,m,_,w,k,R,j,Y,ie,de,me,Oe,qe,Ye){const He=[],Ne=new s.P(m.anchorX,m.anchorY),ht=Le(Ne,R,Ye),Dt=ce(this.transform.cameraToCenterDistance,ht.signedDistanceFromCamera),tt=(de?k/Dt:k*Dt)/s.ao,xt=Le(Ne,j,Ye).point,Pt=je(tt,w,m.lineOffsetX*tt,m.lineOffsetY*tt,!1,xt,Ne,m,_,j,{projections:{},offsets:{}},!1,Ye);let Ut=!1,Xt=!1,hn=!0;if(Pt){const un=.5*Oe*Dt+qe,pn=new s.P(-100,-100),qn=new s.P(this.screenRightBoundary,this.screenBottomBoundary),qr=new On,In=Pt.first,Cr=Pt.last;let hi=[];for(let ei=In.path.length-1;ei>=1;ei--)hi.push(In.path[ei]);for(let ei=1;ei<Cr.path.length;ei++)hi.push(Cr.path[ei]);const Pi=2.5*un;if(Y){const ei=hi.map(Wr=>Le(Wr,Y,Ye));hi=ei.some(Wr=>Wr.signedDistanceFromCamera<=0)?[]:ei.map(Wr=>Wr.point)}let Vr=[];if(hi.length>0){const ei=hi[0].clone(),Wr=hi[0].clone();for(let Ho=1;Ho<hi.length;Ho++)ei.x=Math.min(ei.x,hi[Ho].x),ei.y=Math.min(ei.y,hi[Ho].y),Wr.x=Math.max(Wr.x,hi[Ho].x),Wr.y=Math.max(Wr.y,hi[Ho].y);Vr=ei.x>=pn.x&&Wr.x<=qn.x&&ei.y>=pn.y&&Wr.y<=qn.y?[hi]:Wr.x<pn.x||ei.x>qn.x||Wr.y<pn.y||ei.y>qn.y?[]:s.al([hi],pn.x,pn.y,qn.x,qn.y)}for(const ei of Vr){qr.reset(ei,.25*un);let Wr=0;Wr=qr.length<=.5*un?1:Math.ceil(qr.paddedLength/Pi)+1;for(let Ho=0;Ho<Wr;Ho++){const Uo=Ho/Math.max(Wr-1,1),Rs=qr.lerp(Uo),Da=Rs.x+Hn,mo=Rs.y+Hn;He.push(Da,mo,un,0);const so=Da-un,Js=mo-un,Au=Da+un,Ms=mo+un;if(hn=hn&&this.isOffscreen(so,Js,Au,Ms),Xt=Xt||this.isInsideGrid(so,Js,Au,Ms),u!=="always"&&this.grid.hitTestCircle(Da,mo,un,u,me)&&(Ut=!0,!ie))return{circles:[],offscreen:!1,collisionDetected:Ut}}}}return{circles:!ie&&Ut||!Xt||Dt<this.perspectiveRatioCutoff?[]:He,offscreen:hn,collisionDetected:Ut}}queryRenderedSymbols(u){if(u.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const m=[];let _=1/0,w=1/0,k=-1/0,R=-1/0;for(const de of u){const me=new s.P(de.x+Hn,de.y+Hn);_=Math.min(_,me.x),w=Math.min(w,me.y),k=Math.max(k,me.x),R=Math.max(R,me.y),m.push(me)}const j=this.grid.query(_,w,k,R).concat(this.ignoredGrid.query(_,w,k,R)),Y={},ie={};for(const de of j){const me=de.key;if(Y[me.bucketInstanceId]===void 0&&(Y[me.bucketInstanceId]={}),Y[me.bucketInstanceId][me.featureIndex])continue;const Oe=[new s.P(de.x1,de.y1),new s.P(de.x2,de.y1),new s.P(de.x2,de.y2),new s.P(de.x1,de.y2)];s.am(m,Oe)&&(Y[me.bucketInstanceId][me.featureIndex]=!0,ie[me.bucketInstanceId]===void 0&&(ie[me.bucketInstanceId]=[]),ie[me.bucketInstanceId].push(me.featureIndex))}return ie}insertCollisionBox(u,m,_,w,k,R){(_?this.ignoredGrid:this.grid).insert({bucketInstanceId:w,featureIndex:k,collisionGroupID:R,overlapMode:m},u[0],u[1],u[2],u[3])}insertCollisionCircles(u,m,_,w,k,R){const j=_?this.ignoredGrid:this.grid,Y={bucketInstanceId:w,featureIndex:k,collisionGroupID:R,overlapMode:m};for(let ie=0;ie<u.length;ie+=4)j.insertCircle(Y,u[ie],u[ie+1],u[ie+2])}projectAndGetPerspectiveRatio(u,m,_,w){let k;return w?(k=[m,_,w(m,_),1],s.af(k,k,u)):(k=[m,_,0,1],Bn(k,k,u)),{point:new s.P((k[0]/k[3]+1)/2*this.transform.width+Hn,(-k[1]/k[3]+1)/2*this.transform.height+Hn),perspectiveRatio:.5+this.transform.cameraToCenterDistance/k[3]*.5}}isOffscreen(u,m,_,w){return _<Hn||u>=this.screenRightBoundary||w<Hn||m>this.screenBottomBoundary}isInsideGrid(u,m,_,w){return _>=0&&u<this.gridRightBoundary&&w>=0&&m<this.gridBottomBoundary}getViewportMatrix(){const u=s.an([]);return s.H(u,u,[-100,-100,0]),u}}function cr(I,u,m){return u*(s.W/(I.tileSize*Math.pow(2,m-I.tileID.overscaledZ)))}class Qr{constructor(u,m,_,w){this.opacity=u?Math.max(0,Math.min(1,u.opacity+(u.placed?m:-m))):w&&_?1:0,this.placed=_}isHidden(){return this.opacity===0&&!this.placed}}class Br{constructor(u,m,_,w,k){this.text=new Qr(u?u.text:null,m,_,k),this.icon=new Qr(u?u.icon:null,m,w,k)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Fr{constructor(u,m,_){this.text=u,this.icon=m,this.skipFade=_}}class ar{constructor(){this.invProjMatrix=s.F(),this.viewportMatrix=s.F(),this.circles=[]}}class di{constructor(u,m,_,w,k){this.bucketInstanceId=u,this.featureIndex=m,this.sourceLayerIndex=_,this.bucketIndex=w,this.tileID=k}}class Ui{constructor(u){this.crossSourceCollisions=u,this.maxGroupID=0,this.collisionGroups={}}get(u){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[u]){const m=++this.maxGroupID;this.collisionGroups[u]={ID:m,predicate:_=>_.collisionGroupID===m}}return this.collisionGroups[u]}}function to(I,u,m,_,w){const{horizontalAlign:k,verticalAlign:R}=s.at(I);return new s.P(-(k-.5)*u+_[0]*w,-(R-.5)*m+_[1]*w)}function ho(I,u,m,_,w,k){const{x1:R,x2:j,y1:Y,y2:ie,anchorPointX:de,anchorPointY:me}=I,Oe=new s.P(u,m);return _&&Oe._rotate(w?k:-k),{x1:R+Oe.x,y1:Y+Oe.y,x2:j+Oe.x,y2:ie+Oe.y,anchorPointX:de,anchorPointY:me}}class si{constructor(u,m,_,w,k){this.transform=u.clone(),this.terrain=m,this.collisionIndex=new Or(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=_,this.retainedQueryData={},this.collisionGroups=new Ui(w),this.collisionCircleArrays={},this.prevPlacement=k,k&&(k.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(u,m,_,w){const k=_.getBucket(m),R=_.latestFeatureIndex;if(!k||!R||m.id!==k.layerIds[0])return;const j=_.collisionBoxArray,Y=k.layers[0].layout,ie=Math.pow(2,this.transform.zoom-_.tileID.overscaledZ),de=_.tileSize/s.W,me=this.transform.calculatePosMatrix(_.tileID.toUnwrapped()),Oe=Y.get("text-pitch-alignment")==="map",qe=Y.get("text-rotation-alignment")==="map",Ye=cr(_,1,this.transform.zoom),He=Pr(me,Oe,qe,this.transform,Ye);let Ne=null;if(Oe){const Dt=rr(me,Oe,qe,this.transform,Ye);Ne=s.K([],this.transform.labelPlaneMatrix,Dt)}this.retainedQueryData[k.bucketInstanceId]=new di(k.bucketInstanceId,R,k.sourceLayerIndex,k.index,_.tileID);const ht={bucket:k,layout:Y,posMatrix:me,textLabelPlaneMatrix:He,labelToScreenMatrix:Ne,scale:ie,textPixelRatio:de,holdingForFade:_.holdingForFade(),collisionBoxArray:j,partiallyEvaluatedTextSize:s.ag(k.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(k.sourceID)};if(w)for(const Dt of k.sortKeyRanges){const{sortKey:tt,symbolInstanceStart:xt,symbolInstanceEnd:Pt}=Dt;u.push({sortKey:tt,symbolInstanceStart:xt,symbolInstanceEnd:Pt,parameters:ht})}else u.push({symbolInstanceStart:0,symbolInstanceEnd:k.symbolInstances.length,parameters:ht})}attemptAnchorPlacement(u,m,_,w,k,R,j,Y,ie,de,me,Oe,qe,Ye,He,Ne){const ht=s.ap[u.textAnchor],Dt=[u.textOffset0,u.textOffset1],tt=to(ht,_,w,Dt,k),xt=this.collisionIndex.placeCollisionBox(ho(m,tt.x,tt.y,R,j,this.transform.angle),me,Y,ie,de.predicate,Ne);if((!He||this.collisionIndex.placeCollisionBox(ho(He,tt.x,tt.y,R,j,this.transform.angle),me,Y,ie,de.predicate,Ne).box.length!==0)&&xt.box.length>0){let Pt;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Oe.crossTileID]&&this.prevPlacement.placements[Oe.crossTileID]&&this.prevPlacement.placements[Oe.crossTileID].text&&(Pt=this.prevPlacement.variableOffsets[Oe.crossTileID].anchor),Oe.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Oe.crossTileID]={textOffset:Dt,width:_,height:w,anchor:ht,textBoxScale:k,prevAnchor:Pt},this.markUsedJustification(qe,ht,Oe,Ye),qe.allowVerticalPlacement&&(this.markUsedOrientation(qe,Ye,Oe),this.placedOrientations[Oe.crossTileID]=Ye),{shift:tt,placedGlyphBoxes:xt}}}placeLayerBucketPart(u,m,_){const{bucket:w,layout:k,posMatrix:R,textLabelPlaneMatrix:j,labelToScreenMatrix:Y,textPixelRatio:ie,holdingForFade:de,collisionBoxArray:me,partiallyEvaluatedTextSize:Oe,collisionGroup:qe}=u.parameters,Ye=k.get("text-optional"),He=k.get("icon-optional"),Ne=s.aq(k,"text-overlap","text-allow-overlap"),ht=Ne==="always",Dt=s.aq(k,"icon-overlap","icon-allow-overlap"),tt=Dt==="always",xt=k.get("text-rotation-alignment")==="map",Pt=k.get("text-pitch-alignment")==="map",Ut=k.get("icon-text-fit")!=="none",Xt=k.get("symbol-z-order")==="viewport-y",hn=ht&&(tt||!w.hasIconData()||He),un=tt&&(ht||!w.hasTextData()||Ye);!w.collisionArrays&&me&&w.deserializeCollisionBoxes(me);const pn=this.retainedQueryData[w.bucketInstanceId].tileID,qn=this.terrain?(In,Cr)=>this.terrain.getElevation(pn,In,Cr):null,qr=(In,Cr)=>{var hi,Pi;if(m[In.crossTileID])return;if(de)return void(this.placements[In.crossTileID]=new Fr(!1,!1,!1));let Vr=!1,ei=!1,Wr=!0,Ho=null,Uo={box:null,offscreen:null},Rs={box:null,offscreen:null},Da=null,mo=null,so=null,Js=0,Au=0,Ms=0;Cr.textFeatureIndex?Js=Cr.textFeatureIndex:In.useRuntimeCollisionCircles&&(Js=In.featureIndex),Cr.verticalTextFeatureIndex&&(Au=Cr.verticalTextFeatureIndex);const iA=Cr.textBox;if(iA){const zi=Zo=>{let _a=s.ah.horizontal;if(w.allowVerticalPlacement&&!Zo&&this.prevPlacement){const Es=this.prevPlacement.placedOrientations[In.crossTileID];Es&&(this.placedOrientations[In.crossTileID]=Es,_a=Es,this.markUsedOrientation(w,_a,In))}return _a},Bi=(Zo,_a)=>{if(w.allowVerticalPlacement&&In.numVerticalGlyphVertices>0&&Cr.verticalTextBox){for(const Es of w.writingModes)if(Es===s.ah.vertical?(Uo=_a(),Rs=Uo):Uo=Zo(),Uo&&Uo.box&&Uo.box.length)break}else Uo=Zo()},ia=In.textAnchorOffsetStartIndex,Uc=In.textAnchorOffsetEndIndex;if(Uc===ia){const Zo=(_a,Es)=>{const Di=this.collisionIndex.placeCollisionBox(_a,Ne,ie,R,qe.predicate,qn);return Di&&Di.box&&Di.box.length&&(this.markUsedOrientation(w,Es,In),this.placedOrientations[In.crossTileID]=Es),Di};Bi(()=>Zo(iA,s.ah.horizontal),()=>{const _a=Cr.verticalTextBox;return w.allowVerticalPlacement&&In.numVerticalGlyphVertices>0&&_a?Zo(_a,s.ah.vertical):{box:null,offscreen:null}}),zi(Uo&&Uo.box&&Uo.box.length)}else{let Zo=s.ap[(Pi=(hi=this.prevPlacement)===null||hi===void 0?void 0:hi.variableOffsets[In.crossTileID])===null||Pi===void 0?void 0:Pi.anchor];const _a=(Di,uc,Hh)=>{const cu=Di.x2-Di.x1,Ac=Di.y2-Di.y1,ku=In.textBoxScale,Zh=Ut&&Dt==="never"?uc:null;let Tu={box:[],offscreen:!1},Xh=Ne==="never"?1:2,IA="never";Zo&&Xh++;for(let up=0;up<Xh;up++){for(let yd=ia;yd<Uc;yd++){const Ap=w.textAnchorOffsets.get(yd);if(Zo&&Ap.textAnchor!==Zo)continue;const oA=this.attemptAnchorPlacement(Ap,Di,cu,Ac,ku,xt,Pt,ie,R,qe,IA,In,w,Hh,Zh,qn);if(oA&&(Tu=oA.placedGlyphBoxes,Tu&&Tu.box&&Tu.box.length))return Vr=!0,Ho=oA.shift,Tu}Zo?Zo=null:IA=Ne}return Tu};Bi(()=>_a(iA,Cr.iconBox,s.ah.horizontal),()=>{const Di=Cr.verticalTextBox;return w.allowVerticalPlacement&&!(Uo&&Uo.box&&Uo.box.length)&&In.numVerticalGlyphVertices>0&&Di?_a(Di,Cr.verticalIconBox,s.ah.vertical):{box:null,offscreen:null}}),Uo&&(Vr=Uo.box,Wr=Uo.offscreen);const Es=zi(Uo&&Uo.box);if(!Vr&&this.prevPlacement){const Di=this.prevPlacement.variableOffsets[In.crossTileID];Di&&(this.variableOffsets[In.crossTileID]=Di,this.markUsedJustification(w,Di.anchor,In,Es))}}}if(Da=Uo,Vr=Da&&Da.box&&Da.box.length>0,Wr=Da&&Da.offscreen,In.useRuntimeCollisionCircles){const zi=w.text.placedSymbolArray.get(In.centerJustifiedTextSymbolIndex),Bi=s.ai(w.textSizeData,Oe,zi),ia=k.get("text-padding");mo=this.collisionIndex.placeCollisionCircles(Ne,zi,w.lineVertexArray,w.glyphOffsetArray,Bi,R,j,Y,_,Pt,qe.predicate,In.collisionCircleDiameter,ia,qn),mo.circles.length&&mo.collisionDetected&&!_&&s.w("Collisions detected, but collision boxes are not shown"),Vr=ht||mo.circles.length>0&&!mo.collisionDetected,Wr=Wr&&mo.offscreen}if(Cr.iconFeatureIndex&&(Ms=Cr.iconFeatureIndex),Cr.iconBox){const zi=Bi=>{const ia=Ut&&Ho?ho(Bi,Ho.x,Ho.y,xt,Pt,this.transform.angle):Bi;return this.collisionIndex.placeCollisionBox(ia,Dt,ie,R,qe.predicate,qn)};Rs&&Rs.box&&Rs.box.length&&Cr.verticalIconBox?(so=zi(Cr.verticalIconBox),ei=so.box.length>0):(so=zi(Cr.iconBox),ei=so.box.length>0),Wr=Wr&&so.offscreen}const Gl=Ye||In.numHorizontalGlyphVertices===0&&In.numVerticalGlyphVertices===0,Ss=He||In.numIconVertices===0;if(Gl||Ss?Ss?Gl||(ei=ei&&Vr):Vr=ei&&Vr:ei=Vr=ei&&Vr,Vr&&Da&&Da.box&&this.collisionIndex.insertCollisionBox(Da.box,Ne,k.get("text-ignore-placement"),w.bucketInstanceId,Rs&&Rs.box&&Au?Au:Js,qe.ID),ei&&so&&this.collisionIndex.insertCollisionBox(so.box,Dt,k.get("icon-ignore-placement"),w.bucketInstanceId,Ms,qe.ID),mo&&(Vr&&this.collisionIndex.insertCollisionCircles(mo.circles,Ne,k.get("text-ignore-placement"),w.bucketInstanceId,Js,qe.ID),_)){const zi=w.bucketInstanceId;let Bi=this.collisionCircleArrays[zi];Bi===void 0&&(Bi=this.collisionCircleArrays[zi]=new ar);for(let ia=0;ia<mo.circles.length;ia+=4)Bi.circles.push(mo.circles[ia+0]),Bi.circles.push(mo.circles[ia+1]),Bi.circles.push(mo.circles[ia+2]),Bi.circles.push(mo.collisionDetected?1:0)}if(In.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(w.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[In.crossTileID]=new Fr(Vr||hn,ei||un,Wr||w.justReloaded),m[In.crossTileID]=!0};if(Xt){if(u.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const In=w.getSortedSymbolIndexes(this.transform.angle);for(let Cr=In.length-1;Cr>=0;--Cr){const hi=In[Cr];qr(w.symbolInstances.get(hi),w.collisionArrays[hi])}}else for(let In=u.symbolInstanceStart;In<u.symbolInstanceEnd;In++)qr(w.symbolInstances.get(In),w.collisionArrays[In]);if(_&&w.bucketInstanceId in this.collisionCircleArrays){const In=this.collisionCircleArrays[w.bucketInstanceId];s.ar(In.invProjMatrix,R),In.viewportMatrix=this.collisionIndex.getViewportMatrix()}w.justReloaded=!1}markUsedJustification(u,m,_,w){let k;k=w===s.ah.vertical?_.verticalPlacedTextSymbolIndex:{left:_.leftJustifiedTextSymbolIndex,center:_.centerJustifiedTextSymbolIndex,right:_.rightJustifiedTextSymbolIndex}[s.as(m)];const R=[_.leftJustifiedTextSymbolIndex,_.centerJustifiedTextSymbolIndex,_.rightJustifiedTextSymbolIndex,_.verticalPlacedTextSymbolIndex];for(const j of R)j>=0&&(u.text.placedSymbolArray.get(j).crossTileID=k>=0&&j!==k?0:_.crossTileID)}markUsedOrientation(u,m,_){const w=m===s.ah.horizontal||m===s.ah.horizontalOnly?m:0,k=m===s.ah.vertical?m:0,R=[_.leftJustifiedTextSymbolIndex,_.centerJustifiedTextSymbolIndex,_.rightJustifiedTextSymbolIndex];for(const j of R)u.text.placedSymbolArray.get(j).placedOrientation=w;_.verticalPlacedTextSymbolIndex&&(u.text.placedSymbolArray.get(_.verticalPlacedTextSymbolIndex).placedOrientation=k)}commit(u){this.commitTime=u,this.zoomAtLastRecencyCheck=this.transform.zoom;const m=this.prevPlacement;let _=!1;this.prevZoomAdjustment=m?m.zoomAdjustment(this.transform.zoom):0;const w=m?m.symbolFadeChange(u):1,k=m?m.opacities:{},R=m?m.variableOffsets:{},j=m?m.placedOrientations:{};for(const Y in this.placements){const ie=this.placements[Y],de=k[Y];de?(this.opacities[Y]=new Br(de,w,ie.text,ie.icon),_=_||ie.text!==de.text.placed||ie.icon!==de.icon.placed):(this.opacities[Y]=new Br(null,w,ie.text,ie.icon,ie.skipFade),_=_||ie.text||ie.icon)}for(const Y in k){const ie=k[Y];if(!this.opacities[Y]){const de=new Br(ie,w,!1,!1);de.isHidden()||(this.opacities[Y]=de,_=_||ie.text.placed||ie.icon.placed)}}for(const Y in R)this.variableOffsets[Y]||!this.opacities[Y]||this.opacities[Y].isHidden()||(this.variableOffsets[Y]=R[Y]);for(const Y in j)this.placedOrientations[Y]||!this.opacities[Y]||this.opacities[Y].isHidden()||(this.placedOrientations[Y]=j[Y]);if(m&&m.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");_?this.lastPlacementChangeTime=u:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=m?m.lastPlacementChangeTime:u)}updateLayerOpacities(u,m){const _={};for(const w of m){const k=w.getBucket(u);k&&w.latestFeatureIndex&&u.id===k.layerIds[0]&&this.updateBucketOpacities(k,_,w.collisionBoxArray)}}updateBucketOpacities(u,m,_){u.hasTextData()&&(u.text.opacityVertexArray.clear(),u.text.hasVisibleVertices=!1),u.hasIconData()&&(u.icon.opacityVertexArray.clear(),u.icon.hasVisibleVertices=!1),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexArray.clear(),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexArray.clear();const w=u.layers[0],k=w.layout,R=new Br(null,0,!1,!1,!0),j=k.get("text-allow-overlap"),Y=k.get("icon-allow-overlap"),ie=w._unevaluatedLayout.hasValue("text-variable-anchor")||w._unevaluatedLayout.hasValue("text-variable-anchor-offset"),de=k.get("text-rotation-alignment")==="map",me=k.get("text-pitch-alignment")==="map",Oe=k.get("icon-text-fit")!=="none",qe=new Br(null,0,j&&(Y||!u.hasIconData()||k.get("icon-optional")),Y&&(j||!u.hasTextData()||k.get("text-optional")),!0);!u.collisionArrays&&_&&(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData())&&u.deserializeCollisionBoxes(_);const Ye=(He,Ne,ht)=>{for(let Dt=0;Dt<Ne/4;Dt++)He.opacityVertexArray.emplaceBack(ht);He.hasVisibleVertices=He.hasVisibleVertices||ht!==Ri};for(let He=0;He<u.symbolInstances.length;He++){const Ne=u.symbolInstances.get(He),{numHorizontalGlyphVertices:ht,numVerticalGlyphVertices:Dt,crossTileID:tt}=Ne;let xt=this.opacities[tt];m[tt]?xt=R:xt||(xt=qe,this.opacities[tt]=xt),m[tt]=!0;const Pt=Ne.numIconVertices>0,Ut=this.placedOrientations[Ne.crossTileID],Xt=Ut===s.ah.vertical,hn=Ut===s.ah.horizontal||Ut===s.ah.horizontalOnly;if(ht>0||Dt>0){const un=Co(xt.text);Ye(u.text,ht,Xt?Ri:un),Ye(u.text,Dt,hn?Ri:un);const pn=xt.text.isHidden();[Ne.rightJustifiedTextSymbolIndex,Ne.centerJustifiedTextSymbolIndex,Ne.leftJustifiedTextSymbolIndex].forEach(In=>{In>=0&&(u.text.placedSymbolArray.get(In).hidden=pn||Xt?1:0)}),Ne.verticalPlacedTextSymbolIndex>=0&&(u.text.placedSymbolArray.get(Ne.verticalPlacedTextSymbolIndex).hidden=pn||hn?1:0);const qn=this.variableOffsets[Ne.crossTileID];qn&&this.markUsedJustification(u,qn.anchor,Ne,Ut);const qr=this.placedOrientations[Ne.crossTileID];qr&&(this.markUsedJustification(u,"left",Ne,qr),this.markUsedOrientation(u,qr,Ne))}if(Pt){const un=Co(xt.icon),pn=!(Oe&&Ne.verticalPlacedIconSymbolIndex&&Xt);Ne.placedIconSymbolIndex>=0&&(Ye(u.icon,Ne.numIconVertices,pn?un:Ri),u.icon.placedSymbolArray.get(Ne.placedIconSymbolIndex).hidden=xt.icon.isHidden()),Ne.verticalPlacedIconSymbolIndex>=0&&(Ye(u.icon,Ne.numVerticalIconVertices,pn?Ri:un),u.icon.placedSymbolArray.get(Ne.verticalPlacedIconSymbolIndex).hidden=xt.icon.isHidden())}if(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData()){const un=u.collisionArrays[He];if(un){let pn=new s.P(0,0);if(un.textBox||un.verticalTextBox){let qr=!0;if(ie){const In=this.variableOffsets[tt];In?(pn=to(In.anchor,In.width,In.height,In.textOffset,In.textBoxScale),de&&pn._rotate(me?this.transform.angle:-this.transform.angle)):qr=!1}un.textBox&&fo(u.textCollisionBox.collisionVertexArray,xt.text.placed,!qr||Xt,pn.x,pn.y),un.verticalTextBox&&fo(u.textCollisionBox.collisionVertexArray,xt.text.placed,!qr||hn,pn.x,pn.y)}const qn=!!(!hn&&un.verticalIconBox);un.iconBox&&fo(u.iconCollisionBox.collisionVertexArray,xt.icon.placed,qn,Oe?pn.x:0,Oe?pn.y:0),un.verticalIconBox&&fo(u.iconCollisionBox.collisionVertexArray,xt.icon.placed,!qn,Oe?pn.x:0,Oe?pn.y:0)}}}if(u.sortFeatures(this.transform.angle),this.retainedQueryData[u.bucketInstanceId]&&(this.retainedQueryData[u.bucketInstanceId].featureSortOrder=u.featureSortOrder),u.hasTextData()&&u.text.opacityVertexBuffer&&u.text.opacityVertexBuffer.updateData(u.text.opacityVertexArray),u.hasIconData()&&u.icon.opacityVertexBuffer&&u.icon.opacityVertexBuffer.updateData(u.icon.opacityVertexArray),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexBuffer&&u.iconCollisionBox.collisionVertexBuffer.updateData(u.iconCollisionBox.collisionVertexArray),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexBuffer&&u.textCollisionBox.collisionVertexBuffer.updateData(u.textCollisionBox.collisionVertexArray),u.text.opacityVertexArray.length!==u.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${u.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${u.text.layoutVertexArray.length}) / 4`);if(u.icon.opacityVertexArray.length!==u.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${u.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${u.icon.layoutVertexArray.length}) / 4`);if(u.bucketInstanceId in this.collisionCircleArrays){const He=this.collisionCircleArrays[u.bucketInstanceId];u.placementInvProjMatrix=He.invProjMatrix,u.placementViewportMatrix=He.viewportMatrix,u.collisionCircleArray=He.circles,delete this.collisionCircleArrays[u.bucketInstanceId]}}symbolFadeChange(u){return this.fadeDuration===0?1:(u-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(u){return Math.max(0,(this.transform.zoom-u)/1.5)}hasTransitions(u){return this.stale||u-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(u,m){const _=this.zoomAtLastRecencyCheck===m?1-this.zoomAdjustment(m):1;return this.zoomAtLastRecencyCheck=m,this.commitTime+this.fadeDuration*_>u}setStale(){this.stale=!0}}function fo(I,u,m,_,w){I.emplaceBack(u?1:0,m?1:0,_||0,w||0),I.emplaceBack(u?1:0,m?1:0,_||0,w||0),I.emplaceBack(u?1:0,m?1:0,_||0,w||0),I.emplaceBack(u?1:0,m?1:0,_||0,w||0)}const Na=Math.pow(2,25),Ia=Math.pow(2,24),Ei=Math.pow(2,17),os=Math.pow(2,16),yi=Math.pow(2,9),Gn=Math.pow(2,8),ro=Math.pow(2,1);function Co(I){if(I.opacity===0&&!I.placed)return 0;if(I.opacity===1&&I.placed)return 4294967295;const u=I.placed?1:0,m=Math.floor(127*I.opacity);return m*Na+u*Ia+m*Ei+u*os+m*yi+u*Gn+m*ro+u}const Ri=0;class _e{constructor(u){this._sortAcrossTiles=u.layout.get("symbol-z-order")!=="viewport-y"&&!u.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(u,m,_,w,k){const R=this._bucketParts;for(;this._currentTileIndex<u.length;)if(m.getBucketParts(R,w,u[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,k())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,R.sort((j,Y)=>j.sortKey-Y.sortKey));this._currentPartIndex<R.length;)if(m.placeLayerBucketPart(R[this._currentPartIndex],this._seenCrossTileIDs,_),this._currentPartIndex++,k())return!0;return!1}}class Je{constructor(u,m,_,w,k,R,j,Y){this.placement=new si(u,m,R,j,Y),this._currentPlacementIndex=_.length-1,this._forceFullPlacement=w,this._showCollisionBoxes=k,this._done=!1}isDone(){return this._done}continuePlacement(u,m,_){const w=O.now(),k=()=>!this._forceFullPlacement&&O.now()-w>2;for(;this._currentPlacementIndex>=0;){const R=m[u[this._currentPlacementIndex]],j=this.placement.collisionIndex.transform.zoom;if(R.type==="symbol"&&(!R.minzoom||R.minzoom<=j)&&(!R.maxzoom||R.maxzoom>j)){if(this._inProgressLayer||(this._inProgressLayer=new _e(R)),this._inProgressLayer.continuePlacement(_[R.source],this.placement,this._showCollisionBoxes,R,k))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(u){return this.placement.commit(u),this.placement}}const Zt=512/s.W/2;class ln{constructor(u,m,_){this.tileID=u,this.bucketInstanceId=_,this._symbolsByKey={};const w=new Map;for(let k=0;k<m.length;k++){const R=m.get(k),j=R.key,Y=w.get(j);Y?Y.push(R):w.set(j,[R])}for(const[k,R]of w){const j={positions:R.map(Y=>({x:Math.floor(Y.anchorX*Zt),y:Math.floor(Y.anchorY*Zt)})),crossTileIDs:R.map(Y=>Y.crossTileID)};if(j.positions.length>128){const Y=new s.au(j.positions.length,16,Uint16Array);for(const{x:ie,y:de}of j.positions)Y.add(ie,de);Y.finish(),delete j.positions,j.index=Y}this._symbolsByKey[k]=j}}getScaledCoordinates(u,m){const{x:_,y:w,z:k}=this.tileID.canonical,{x:R,y:j,z:Y}=m.canonical,ie=Zt/Math.pow(2,Y-k),de=(j*s.W+u.anchorY)*ie,me=w*s.W*Zt;return{x:Math.floor((R*s.W+u.anchorX)*ie-_*s.W*Zt),y:Math.floor(de-me)}}findMatches(u,m,_){const w=this.tileID.canonical.z<m.canonical.z?1:Math.pow(2,this.tileID.canonical.z-m.canonical.z);for(let k=0;k<u.length;k++){const R=u.get(k);if(R.crossTileID)continue;const j=this._symbolsByKey[R.key];if(!j)continue;const Y=this.getScaledCoordinates(R,m);if(j.index){const ie=j.index.range(Y.x-w,Y.y-w,Y.x+w,Y.y+w).sort();for(const de of ie){const me=j.crossTileIDs[de];if(!_[me]){_[me]=!0,R.crossTileID=me;break}}}else if(j.positions)for(let ie=0;ie<j.positions.length;ie++){const de=j.positions[ie],me=j.crossTileIDs[ie];if(Math.abs(de.x-Y.x)<=w&&Math.abs(de.y-Y.y)<=w&&!_[me]){_[me]=!0,R.crossTileID=me;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:u})=>u)}}class Ft{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class wn{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(u){const m=Math.round((u-this.lng)/360);if(m!==0)for(const _ in this.indexes){const w=this.indexes[_],k={};for(const R in w){const j=w[R];j.tileID=j.tileID.unwrapTo(j.tileID.wrap+m),k[j.tileID.key]=j}this.indexes[_]=k}this.lng=u}addBucket(u,m,_){if(this.indexes[u.overscaledZ]&&this.indexes[u.overscaledZ][u.key]){if(this.indexes[u.overscaledZ][u.key].bucketInstanceId===m.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(u.overscaledZ,this.indexes[u.overscaledZ][u.key])}for(let k=0;k<m.symbolInstances.length;k++)m.symbolInstances.get(k).crossTileID=0;this.usedCrossTileIDs[u.overscaledZ]||(this.usedCrossTileIDs[u.overscaledZ]={});const w=this.usedCrossTileIDs[u.overscaledZ];for(const k in this.indexes){const R=this.indexes[k];if(Number(k)>u.overscaledZ)for(const j in R){const Y=R[j];Y.tileID.isChildOf(u)&&Y.findMatches(m.symbolInstances,u,w)}else{const j=R[u.scaledTo(Number(k)).key];j&&j.findMatches(m.symbolInstances,u,w)}}for(let k=0;k<m.symbolInstances.length;k++){const R=m.symbolInstances.get(k);R.crossTileID||(R.crossTileID=_.generate(),w[R.crossTileID]=!0)}return this.indexes[u.overscaledZ]===void 0&&(this.indexes[u.overscaledZ]={}),this.indexes[u.overscaledZ][u.key]=new ln(u,m.symbolInstances,m.bucketInstanceId),!0}removeBucketCrossTileIDs(u,m){for(const _ of m.getCrossTileIDsLists())for(const w of _)delete this.usedCrossTileIDs[u][w]}removeStaleBuckets(u){let m=!1;for(const _ in this.indexes){const w=this.indexes[_];for(const k in w)u[w[k].bucketInstanceId]||(this.removeBucketCrossTileIDs(_,w[k]),delete w[k],m=!0)}return m}}class hr{constructor(){this.layerIndexes={},this.crossTileIDs=new Ft,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(u,m,_){let w=this.layerIndexes[u.id];w===void 0&&(w=this.layerIndexes[u.id]=new wn);let k=!1;const R={};w.handleWrapJump(_);for(const j of m){const Y=j.getBucket(u);Y&&u.id===Y.layerIds[0]&&(Y.bucketInstanceId||(Y.bucketInstanceId=++this.maxBucketInstanceId),w.addBucket(j.tileID,Y,this.crossTileIDs)&&(k=!0),R[Y.bucketInstanceId]=!0)}return w.removeStaleBuckets(R)&&(k=!0),k}pruneUnusedLayers(u){const m={};u.forEach(_=>{m[_]=!0});for(const _ in this.layerIndexes)m[_]||delete this.layerIndexes[_]}}const ii=(I,u)=>s.t(I,u&&u.filter(m=>m.identifier!=="source.canvas")),li=s.av();class Jo extends s.E{constructor(u,m={}){super(),this._rtlPluginLoaded=()=>{for(const _ in this.sourceCaches){const w=this.sourceCaches[_].getSource().type;w!=="vector"&&w!=="geojson"||this.sourceCaches[_].reload()}},this.map=u,this.dispatcher=new ge(ke(),u._getMapId()),this.dispatcher.registerMessageHandler("getGlyphs",(_,w)=>this.getGlyphs(_,w)),this.dispatcher.registerMessageHandler("getImages",(_,w)=>this.getImages(_,w)),this.imageManager=new $e,this.imageManager.setEventedParent(this),this.glyphManager=new st(u._requestManager,m.localIdeographFontFamily),this.lineAtlas=new Xe(256,512),this.crossTileSymbolIndex=new hr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new s.aw,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",s.ax()),Ke().on(Ee,this._rtlPluginLoaded),this.on("data",_=>{if(_.dataType!=="source"||_.sourceDataType!=="metadata")return;const w=this.sourceCaches[_.sourceId];if(!w)return;const k=w.getSource();if(k&&k.vectorLayerIds)for(const R in this._layers){const j=this._layers[R];j.source===k.id&&this._validateLayer(j)}})}loadURL(u,m={},_){this.fire(new s.k("dataloading",{dataType:"style"})),m.validate=typeof m.validate!="boolean"||m.validate;const w=this.map._requestManager.transformRequest(u,ae.Style);this._loadStyleRequest=new AbortController,s.h(w,this._loadStyleRequest).then(k=>{this._loadStyleRequest=null,this._load(k.data,m,_)}).catch(k=>{this._loadStyleRequest=null,k&&this.fire(new s.j(k))})}loadJSON(u,m={},_){this.fire(new s.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,O.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,m.validate=m.validate!==!1,this._load(u,m,_)}).catch(()=>{})}loadEmpty(){this.fire(new s.k("dataloading",{dataType:"style"})),this._load(li,{validate:!1})}_load(u,m,_){var w;const k=m.transformStyle?m.transformStyle(_,u):u;if(!m.validate||!ii(this,s.x(k))){this._loaded=!0,this.stylesheet=k;for(const R in k.sources)this.addSource(R,k.sources[R],{validate:!1});k.sprite?this._loadSprite(k.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(k.glyphs),this._createLayers(),this.light=new Ve(this.stylesheet.light),this.map.setTerrain((w=this.stylesheet.terrain)!==null&&w!==void 0?w:null),this.fire(new s.k("data",{dataType:"style"})),this.fire(new s.k("style.load"))}}_createLayers(){const u=s.ay(this.stylesheet.layers);this.dispatcher.broadcast("setLayers",u),this._order=u.map(m=>m.id),this._layers={},this._serializedLayers=null;for(const m of u){const _=s.az(m);_.setEventedParent(this,{layer:{id:m.id}}),this._layers[m.id]=_}}_loadSprite(u,m=!1,_=void 0){let w;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(k,R,j,Y){return s._(this,void 0,void 0,function*(){const ie=Te(k),de=j>1?"@2x":"",me={},Oe={};for(const{id:qe,url:Ye}of ie){const He=R.transformRequest(R.normalizeSpriteURL(Ye,de,".json"),ae.SpriteJSON);me[qe]=s.h(He,Y);const Ne=R.transformRequest(R.normalizeSpriteURL(Ye,de,".png"),ae.SpriteImage);Oe[qe]=Z.getImage(Ne,Y)}return yield Promise.all([...Object.values(me),...Object.values(Oe)]),function(qe,Ye){return s._(this,void 0,void 0,function*(){const He={};for(const Ne in qe){He[Ne]={};const ht=O.getImageCanvasContext((yield Ye[Ne]).data),Dt=(yield qe[Ne]).data;for(const tt in Dt){const{width:xt,height:Pt,x:Ut,y:Xt,sdf:hn,pixelRatio:un,stretchX:pn,stretchY:qn,content:qr}=Dt[tt];He[Ne][tt]={data:null,pixelRatio:un,sdf:hn,stretchX:pn,stretchY:qn,content:qr,spriteData:{width:xt,height:Pt,x:Ut,y:Xt,context:ht}}}}return He})}(me,Oe)})}(u,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(k=>{if(this._spriteRequest=null,k)for(const R in k){this._spritesImagesIds[R]=[];const j=this._spritesImagesIds[R]?this._spritesImagesIds[R].filter(Y=>!(Y in k)):[];for(const Y of j)this.imageManager.removeImage(Y),this._changedImages[Y]=!0;for(const Y in k[R]){const ie=R==="default"?Y:`${R}:${Y}`;this._spritesImagesIds[R].push(ie),ie in this.imageManager.images?this.imageManager.updateImage(ie,k[R][Y],!1):this.imageManager.addImage(ie,k[R][Y]),m&&(this._changedImages[ie]=!0)}}}).catch(k=>{this._spriteRequest=null,w=k,this.fire(new s.j(w))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),m&&(this._changed=!0),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"})),_&&_(w)})}_unloadSprite(){for(const u of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(u),this._changedImages[u]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}_validateLayer(u){const m=this.sourceCaches[u.source];if(!m)return;const _=u.sourceLayer;if(!_)return;const w=m.getSource();(w.type==="geojson"||w.vectorLayerIds&&w.vectorLayerIds.indexOf(_)===-1)&&this.fire(new s.j(new Error(`Source layer "${_}" does not exist on source "${w.id}" as specified by style layer "${u.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(u){const m=this._serializedAllLayers();if(!u||u.length===0)return Object.values(m);const _=[];for(const w of u)m[w]&&_.push(m[w]);return _}_serializedAllLayers(){let u=this._serializedLayers;if(u)return u;u=this._serializedLayers={};const m=Object.keys(this._layers);for(const _ of m){const w=this._layers[_];w.type!=="custom"&&(u[_]=w.serialize())}return u}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(u){if(!this._loaded)return;const m=this._changed;if(this._changed){const w=Object.keys(this._updatedLayers),k=Object.keys(this._removedLayers);(w.length||k.length)&&this._updateWorkerLayers(w,k);for(const R in this._updatedSources){const j=this._updatedSources[R];if(j==="reload")this._reloadSource(R);else{if(j!=="clear")throw new Error(`Invalid action ${j}`);this._clearSource(R)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const R in this._updatedPaintProps)this._layers[R].updateTransitions(u);this.light.updateTransitions(u),this._resetUpdates()}const _={};for(const w in this.sourceCaches){const k=this.sourceCaches[w];_[w]=k.used,k.used=!1}for(const w of this._order){const k=this._layers[w];k.recalculate(u,this._availableImages),!k.isHidden(u.zoom)&&k.source&&(this.sourceCaches[k.source].used=!0)}for(const w in _){const k=this.sourceCaches[w];_[w]!==k.used&&k.fire(new s.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:w}))}this.light.recalculate(u),this.z=u.zoom,m&&this.fire(new s.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const u=Object.keys(this._changedImages);if(u.length){for(const m in this.sourceCaches)this.sourceCaches[m].reloadTilesForDependencies(["icons","patterns"],u);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const u in this.sourceCaches)this.sourceCaches[u].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(u,m){this.dispatcher.broadcast("updateLayers",{layers:this._serializeByIds(u),removedIds:m})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(u,m={}){var _;this._checkLoaded();const w=this.serialize();if(u=m.transformStyle?m.transformStyle(w,u):u,((_=m.validate)===null||_===void 0||_)&&ii(this,s.x(u)))return!1;(u=s.aA(u)).layers=s.ay(u.layers);const k=s.aB(w,u),R=this._getOperationsToPerform(k);if(R.unimplemented.length>0)throw new Error(`Unimplemented: ${R.unimplemented.join(", ")}.`);if(R.operations.length===0)return!1;for(const j of R.operations)j();return this.stylesheet=u,this._serializedLayers=null,!0}_getOperationsToPerform(u){const m=[],_=[];for(const w of u)switch(w.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":m.push(()=>this.addLayer.apply(this,w.args));break;case"removeLayer":m.push(()=>this.removeLayer.apply(this,w.args));break;case"setPaintProperty":m.push(()=>this.setPaintProperty.apply(this,w.args));break;case"setLayoutProperty":m.push(()=>this.setLayoutProperty.apply(this,w.args));break;case"setFilter":m.push(()=>this.setFilter.apply(this,w.args));break;case"addSource":m.push(()=>this.addSource.apply(this,w.args));break;case"removeSource":m.push(()=>this.removeSource.apply(this,w.args));break;case"setLayerZoomRange":m.push(()=>this.setLayerZoomRange.apply(this,w.args));break;case"setLight":m.push(()=>this.setLight.apply(this,w.args));break;case"setGeoJSONSourceData":m.push(()=>this.setGeoJSONSourceData.apply(this,w.args));break;case"setGlyphs":m.push(()=>this.setGlyphs.apply(this,w.args));break;case"setSprite":m.push(()=>this.setSprite.apply(this,w.args));break;case"setTerrain":m.push(()=>this.map.setTerrain.apply(this,w.args));break;case"setTransition":m.push(()=>{});break;default:_.push(w.command)}return{operations:m,unimplemented:_}}addImage(u,m){if(this.getImage(u))return this.fire(new s.j(new Error(`An image named "${u}" already exists.`)));this.imageManager.addImage(u,m),this._afterImageUpdated(u)}updateImage(u,m){this.imageManager.updateImage(u,m)}getImage(u){return this.imageManager.getImage(u)}removeImage(u){if(!this.getImage(u))return this.fire(new s.j(new Error(`An image named "${u}" does not exist.`)));this.imageManager.removeImage(u),this._afterImageUpdated(u)}_afterImageUpdated(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(u,m,_={}){if(this._checkLoaded(),this.sourceCaches[u]!==void 0)throw new Error(`Source "${u}" already exists.`);if(!m.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(m).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(m.type)>=0&&this._validate(s.x.source,`sources.${u}`,m,null,_))return;this.map&&this.map._collectResourceTiming&&(m.collectResourceTiming=!0);const w=this.sourceCaches[u]=new Lt(u,m,this.dispatcher);w.style=this,w.setEventedParent(this,()=>({isSourceLoaded:w.loaded(),source:w.serialize(),sourceId:u})),w.onAdd(this.map),this._changed=!0}removeSource(u){if(this._checkLoaded(),this.sourceCaches[u]===void 0)throw new Error("There is no source with this ID");for(const _ in this._layers)if(this._layers[_].source===u)return this.fire(new s.j(new Error(`Source "${u}" cannot be removed while layer "${_}" is using it.`)));const m=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],m.fire(new s.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),m.setEventedParent(null),m.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(u,m){if(this._checkLoaded(),this.sourceCaches[u]===void 0)throw new Error(`There is no source with this ID=${u}`);const _=this.sourceCaches[u].getSource();if(_.type!=="geojson")throw new Error(`geojsonSource.type is ${_.type}, which is !== 'geojson`);_.setData(m),this._changed=!0}getSource(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()}addLayer(u,m,_={}){this._checkLoaded();const w=u.id;if(this.getLayer(w))return void this.fire(new s.j(new Error(`Layer "${w}" already exists on this map.`)));let k;if(u.type==="custom"){if(ii(this,s.aC(u)))return;k=s.az(u)}else{if("source"in u&&typeof u.source=="object"&&(this.addSource(w,u.source),u=s.aA(u),u=s.e(u,{source:w})),this._validate(s.x.layer,`layers.${w}`,u,{arrayIndex:-1},_))return;k=s.az(u),this._validateLayer(k),k.setEventedParent(this,{layer:{id:w}})}const R=m?this._order.indexOf(m):this._order.length;if(m&&R===-1)this.fire(new s.j(new Error(`Cannot add layer "${w}" before non-existing layer "${m}".`)));else{if(this._order.splice(R,0,w),this._layerOrderChanged=!0,this._layers[w]=k,this._removedLayers[w]&&k.source&&k.type!=="custom"){const j=this._removedLayers[w];delete this._removedLayers[w],j.type!==k.type?this._updatedSources[k.source]="clear":(this._updatedSources[k.source]="reload",this.sourceCaches[k.source].pause())}this._updateLayer(k),k.onAdd&&k.onAdd(this.map)}}moveLayer(u,m){if(this._checkLoaded(),this._changed=!0,!this._layers[u])return void this.fire(new s.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be moved.`)));if(u===m)return;const _=this._order.indexOf(u);this._order.splice(_,1);const w=m?this._order.indexOf(m):this._order.length;m&&w===-1?this.fire(new s.j(new Error(`Cannot move layer "${u}" before non-existing layer "${m}".`))):(this._order.splice(w,0,u),this._layerOrderChanged=!0)}removeLayer(u){this._checkLoaded();const m=this._layers[u];if(!m)return void this.fire(new s.j(new Error(`Cannot remove non-existing layer "${u}".`)));m.setEventedParent(null);const _=this._order.indexOf(u);this._order.splice(_,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=m,delete this._layers[u],this._serializedLayers&&delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],m.onRemove&&m.onRemove(this.map)}getLayer(u){return this._layers[u]}getLayersOrder(){return[...this._order]}hasLayer(u){return u in this._layers}setLayerZoomRange(u,m,_){this._checkLoaded();const w=this.getLayer(u);w?w.minzoom===m&&w.maxzoom===_||(m!=null&&(w.minzoom=m),_!=null&&(w.maxzoom=_),this._updateLayer(w)):this.fire(new s.j(new Error(`Cannot set the zoom range of non-existing layer "${u}".`)))}setFilter(u,m,_={}){this._checkLoaded();const w=this.getLayer(u);if(w){if(!s.aD(w.filter,m))return m==null?(w.filter=void 0,void this._updateLayer(w)):void(this._validate(s.x.filter,`layers.${w.id}.filter`,m,null,_)||(w.filter=s.aA(m),this._updateLayer(w)))}else this.fire(new s.j(new Error(`Cannot filter non-existing layer "${u}".`)))}getFilter(u){return s.aA(this.getLayer(u).filter)}setLayoutProperty(u,m,_,w={}){this._checkLoaded();const k=this.getLayer(u);k?s.aD(k.getLayoutProperty(m),_)||(k.setLayoutProperty(m,_,w),this._updateLayer(k)):this.fire(new s.j(new Error(`Cannot style non-existing layer "${u}".`)))}getLayoutProperty(u,m){const _=this.getLayer(u);if(_)return _.getLayoutProperty(m);this.fire(new s.j(new Error(`Cannot get style of non-existing layer "${u}".`)))}setPaintProperty(u,m,_,w={}){this._checkLoaded();const k=this.getLayer(u);k?s.aD(k.getPaintProperty(m),_)||(k.setPaintProperty(m,_,w)&&this._updateLayer(k),this._changed=!0,this._updatedPaintProps[u]=!0):this.fire(new s.j(new Error(`Cannot style non-existing layer "${u}".`)))}getPaintProperty(u,m){return this.getLayer(u).getPaintProperty(m)}setFeatureState(u,m){this._checkLoaded();const _=u.source,w=u.sourceLayer,k=this.sourceCaches[_];if(k===void 0)return void this.fire(new s.j(new Error(`The source '${_}' does not exist in the map's style.`)));const R=k.getSource().type;R==="geojson"&&w?this.fire(new s.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):R!=="vector"||w?(u.id===void 0&&this.fire(new s.j(new Error("The feature id parameter must be provided."))),k.setFeatureState(w,u.id,m)):this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(u,m){this._checkLoaded();const _=u.source,w=this.sourceCaches[_];if(w===void 0)return void this.fire(new s.j(new Error(`The source '${_}' does not exist in the map's style.`)));const k=w.getSource().type,R=k==="vector"?u.sourceLayer:void 0;k!=="vector"||R?m&&typeof u.id!="string"&&typeof u.id!="number"?this.fire(new s.j(new Error("A feature id is required to remove its specific state property."))):w.removeFeatureState(R,u.id,m):this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(u){this._checkLoaded();const m=u.source,_=u.sourceLayer,w=this.sourceCaches[m];if(w!==void 0)return w.getSource().type!=="vector"||_?(u.id===void 0&&this.fire(new s.j(new Error("The feature id parameter must be provided."))),w.getFeatureState(_,u.id)):void this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new s.j(new Error(`The source '${m}' does not exist in the map's style.`)))}getTransition(){return s.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const u=s.aE(this.sourceCaches,k=>k.serialize()),m=this._serializeByIds(this._order),_=this.map.getTerrain()||void 0,w=this.stylesheet;return s.aF({version:w.version,name:w.name,metadata:w.metadata,light:w.light,center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,sprite:w.sprite,glyphs:w.glyphs,transition:w.transition,sources:u,layers:m,terrain:_},k=>k!==void 0)}_updateLayer(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._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(u){const m=R=>this._layers[R].type==="fill-extrusion",_={},w=[];for(let R=this._order.length-1;R>=0;R--){const j=this._order[R];if(m(j)){_[j]=R;for(const Y of u){const ie=Y[j];if(ie)for(const de of ie)w.push(de)}}}w.sort((R,j)=>j.intersectionZ-R.intersectionZ);const k=[];for(let R=this._order.length-1;R>=0;R--){const j=this._order[R];if(m(j))for(let Y=w.length-1;Y>=0;Y--){const ie=w[Y].feature;if(_[ie.layer.id]<R)break;k.push(ie),w.pop()}else for(const Y of u){const ie=Y[j];if(ie)for(const de of ie)k.push(de.feature)}}return k}queryRenderedFeatures(u,m,_){m&&m.filter&&this._validate(s.x.filter,"queryRenderedFeatures.filter",m.filter,null,m);const w={};if(m&&m.layers){if(!Array.isArray(m.layers))return this.fire(new s.j(new Error("parameters.layers must be an Array."))),[];for(const j of m.layers){const Y=this._layers[j];if(!Y)return this.fire(new s.j(new Error(`The layer '${j}' does not exist in the map's style and cannot be queried for features.`))),[];w[Y.source]=!0}}const k=[];m.availableImages=this._availableImages;const R=this._serializedAllLayers();for(const j in this.sourceCaches)m.layers&&!w[j]||k.push(it(this.sourceCaches[j],this._layers,R,u,m,_));return this.placement&&k.push(function(j,Y,ie,de,me,Oe,qe){const Ye={},He=Oe.queryRenderedSymbols(de),Ne=[];for(const ht of Object.keys(He).map(Number))Ne.push(qe[ht]);Ne.sort(ot);for(const ht of Ne){const Dt=ht.featureIndex.lookupSymbolFeatures(He[ht.bucketInstanceId],Y,ht.bucketIndex,ht.sourceLayerIndex,me.filter,me.layers,me.availableImages,j);for(const tt in Dt){const xt=Ye[tt]=Ye[tt]||[],Pt=Dt[tt];Pt.sort((Ut,Xt)=>{const hn=ht.featureSortOrder;if(hn){const un=hn.indexOf(Ut.featureIndex);return hn.indexOf(Xt.featureIndex)-un}return Xt.featureIndex-Ut.featureIndex});for(const Ut of Pt)xt.push(Ut)}}for(const ht in Ye)Ye[ht].forEach(Dt=>{const tt=Dt.feature,xt=ie[j[ht].source].getFeatureState(tt.layer["source-layer"],tt.id);tt.source=tt.layer.source,tt.layer["source-layer"]&&(tt.sourceLayer=tt.layer["source-layer"]),tt.state=xt});return Ye}(this._layers,R,this.sourceCaches,u,m,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(k)}querySourceFeatures(u,m){m&&m.filter&&this._validate(s.x.filter,"querySourceFeatures.filter",m.filter,null,m);const _=this.sourceCaches[u];return _?function(w,k){const R=w.getRenderableIds().map(ie=>w.getTileByID(ie)),j=[],Y={};for(let ie=0;ie<R.length;ie++){const de=R[ie],me=de.tileID.canonical.key;Y[me]||(Y[me]=!0,de.querySourceFeatures(j,k))}return j}(_,m):[]}getLight(){return this.light.getLight()}setLight(u,m={}){this._checkLoaded();const _=this.light.getLight();let w=!1;for(const R in u)if(!s.aD(u[R],_[R])){w=!0;break}if(!w)return;const k={now:O.now(),transition:s.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(u,m),this.light.updateTransitions(k)}_validate(u,m,_,w,k={}){return(!k||k.validate!==!1)&&ii(this,u.call(s.x,s.e({key:m,style:this.serialize(),value:_,styleSpec:s.v},w)))}_remove(u=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ke().off(Ee,this._rtlPluginLoaded);for(const m in this._layers)this._layers[m].setEventedParent(null);for(const m in this.sourceCaches){const _=this.sourceCaches[m];_.setEventedParent(null),_.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),u&&this.dispatcher.broadcast("removeMap",void 0),this.dispatcher.remove(u)}_clearSource(u){this.sourceCaches[u].clearTiles()}_reloadSource(u){this.sourceCaches[u].resume(),this.sourceCaches[u].reload()}_updateSources(u){for(const m in this.sourceCaches)this.sourceCaches[m].update(u,this.map.terrain)}_generateCollisionBoxes(){for(const u in this.sourceCaches)this._reloadSource(u)}_updatePlacement(u,m,_,w,k=!1){let R=!1,j=!1;const Y={};for(const ie of this._order){const de=this._layers[ie];if(de.type!=="symbol")continue;if(!Y[de.source]){const Oe=this.sourceCaches[de.source];Y[de.source]=Oe.getRenderableIds(!0).map(qe=>Oe.getTileByID(qe)).sort((qe,Ye)=>Ye.tileID.overscaledZ-qe.tileID.overscaledZ||(qe.tileID.isLessThan(Ye.tileID)?-1:1))}const me=this.crossTileSymbolIndex.addLayer(de,Y[de.source],u.center.lng);R=R||me}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((k=k||this._layerOrderChanged||_===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(O.now(),u.zoom))&&(this.pauseablePlacement=new Je(u,this.map.terrain,this._order,k,m,_,w,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Y),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(O.now()),j=!0),R&&this.pauseablePlacement.placement.setStale()),j||R)for(const ie of this._order){const de=this._layers[ie];de.type==="symbol"&&this.placement.updateLayerOpacities(de,Y[de.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(O.now())}_releaseSymbolFadeTiles(){for(const u in this.sourceCaches)this.sourceCaches[u].releaseSymbolFadeTiles()}getImages(u,m){return s._(this,void 0,void 0,function*(){const _=yield this.imageManager.getImages(m.icons);this._updateTilesForChangedImages();const w=this.sourceCaches[m.source];return w&&w.setDependencies(m.tileID.key,m.type,m.icons),_})}getGlyphs(u,m){return s._(this,void 0,void 0,function*(){const _=yield this.glyphManager.getGlyphs(m.stacks),w=this.sourceCaches[m.source];return w&&w.setDependencies(m.tileID.key,m.type,[""]),_})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(u,m={}){this._checkLoaded(),u&&this._validate(s.x.glyphs,"glyphs",u,null,m)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=u,this.glyphManager.entries={},this.glyphManager.setURL(u))}addSprite(u,m,_={},w){this._checkLoaded();const k=[{id:u,url:m}],R=[...Te(this.stylesheet.sprite),...k];this._validate(s.x.sprite,"sprite",R,null,_)||(this.stylesheet.sprite=R,this._loadSprite(k,!0,w))}removeSprite(u){this._checkLoaded();const m=Te(this.stylesheet.sprite);if(m.find(_=>_.id===u)){if(this._spritesImagesIds[u])for(const _ of this._spritesImagesIds[u])this.imageManager.removeImage(_),this._changedImages[_]=!0;m.splice(m.findIndex(_=>_.id===u),1),this.stylesheet.sprite=m.length>0?m:void 0,delete this._spritesImagesIds[u],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}else this.fire(new s.j(new Error(`Sprite "${u}" doesn't exists on this map.`)))}getSprite(){return Te(this.stylesheet.sprite)}setSprite(u,m={},_){this._checkLoaded(),u&&this._validate(s.x.sprite,"sprite",u,null,m)||(this.stylesheet.sprite=u,u?this._loadSprite(u,!0,_):(this._unloadSprite(),_&&_(null)))}}var Ka=s.X([{name:"a_pos",type:"Int16",components:2}]),Dr="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const Wa={prelude:vi(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
#else
return 0.0;
#endif
}`),background:vi(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:vi(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:vi(`varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:vi("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:vi(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:vi(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:vi("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_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,get_elevation(a_pos),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;}"),collisionCircle:vi("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:vi("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:vi(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:vi(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:vi(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:vi(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:vi(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:vi(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:vi(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:vi(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:vi(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:vi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),linePattern:vi(`#ifdef GL_ES
precision highp float;
#endif
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:vi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:vi(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:vi(`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;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,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),ele,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,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;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),z,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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:vi(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,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),ele,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,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:vi(`#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;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,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),ele,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,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:vi("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",Dr),terrainDepth:vi("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",Dr),terrainCoords:vi("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",Dr)};function vi(I,u){const m=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,_=u.match(/attribute ([\w]+) ([\w]+)/g),w=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),k=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),R=k?k.concat(w):w,j={};return{fragmentSource:I=I.replace(m,(Y,ie,de,me,Oe)=>(j[Oe]=!0,ie==="define"?`
#ifndef HAS_UNIFORM_u_${Oe}
varying ${de} ${me} ${Oe};
#else
uniform ${de} ${me} u_${Oe};
#endif
`:`
#ifdef HAS_UNIFORM_u_${Oe}
    ${de} ${me} ${Oe} = u_${Oe};
#endif
`)),vertexSource:u=u.replace(m,(Y,ie,de,me,Oe)=>{const qe=me==="float"?"vec2":"vec4",Ye=Oe.match(/color/)?"color":qe;return j[Oe]?ie==="define"?`
#ifndef HAS_UNIFORM_u_${Oe}
uniform lowp float u_${Oe}_t;
attribute ${de} ${qe} a_${Oe};
varying ${de} ${me} ${Oe};
#else
uniform ${de} ${me} u_${Oe};
#endif
`:Ye==="vec4"?`
#ifndef HAS_UNIFORM_u_${Oe}
    ${Oe} = a_${Oe};
#else
    ${de} ${me} ${Oe} = u_${Oe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Oe}
    ${Oe} = unpack_mix_${Ye}(a_${Oe}, u_${Oe}_t);
#else
    ${de} ${me} ${Oe} = u_${Oe};
#endif
`:ie==="define"?`
#ifndef HAS_UNIFORM_u_${Oe}
uniform lowp float u_${Oe}_t;
attribute ${de} ${qe} a_${Oe};
#else
uniform ${de} ${me} u_${Oe};
#endif
`:Ye==="vec4"?`
#ifndef HAS_UNIFORM_u_${Oe}
    ${de} ${me} ${Oe} = a_${Oe};
#else
    ${de} ${me} ${Oe} = u_${Oe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Oe}
    ${de} ${me} ${Oe} = unpack_mix_${Ye}(a_${Oe}, u_${Oe}_t);
#else
    ${de} ${me} ${Oe} = u_${Oe};
#endif
`}),staticAttributes:_,staticUniforms:R}}class Ga{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,m,_,w,k,R,j,Y,ie){this.context=u;let de=this.boundPaintVertexBuffers.length!==w.length;for(let me=0;!de&&me<w.length;me++)this.boundPaintVertexBuffers[me]!==w[me]&&(de=!0);!this.vao||this.boundProgram!==m||this.boundLayoutVertexBuffer!==_||de||this.boundIndexBuffer!==k||this.boundVertexOffset!==R||this.boundDynamicVertexBuffer!==j||this.boundDynamicVertexBuffer2!==Y||this.boundDynamicVertexBuffer3!==ie?this.freshBind(m,_,w,k,R,j,Y,ie):(u.bindVertexArray.set(this.vao),j&&j.bind(),k&&k.dynamicDraw&&k.bind(),Y&&Y.bind(),ie&&ie.bind())}freshBind(u,m,_,w,k,R,j,Y){const ie=u.numAttributes,de=this.context,me=de.gl;this.vao&&this.destroy(),this.vao=de.createVertexArray(),de.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=m,this.boundPaintVertexBuffers=_,this.boundIndexBuffer=w,this.boundVertexOffset=k,this.boundDynamicVertexBuffer=R,this.boundDynamicVertexBuffer2=j,this.boundDynamicVertexBuffer3=Y,m.enableAttributes(me,u);for(const Oe of _)Oe.enableAttributes(me,u);R&&R.enableAttributes(me,u),j&&j.enableAttributes(me,u),Y&&Y.enableAttributes(me,u),m.bind(),m.setVertexAttribPointers(me,u,k);for(const Oe of _)Oe.bind(),Oe.setVertexAttribPointers(me,u,k);R&&(R.bind(),R.setVertexAttribPointers(me,u,k)),w&&w.bind(),j&&(j.bind(),j.setVertexAttribPointers(me,u,k)),Y&&(Y.bind(),Y.setVertexAttribPointers(me,u,k)),de.currentNumAttributes=ie}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}function ea(I){const u=[];for(let m=0;m<I.length;m++){if(I[m]===null)continue;const _=I[m].split(" ");u.push(_.pop())}return u}class xu{constructor(u,m,_,w,k,R){const j=u.gl;this.program=j.createProgram();const Y=ea(m.staticAttributes),ie=_?_.getBinderAttributes():[],de=Y.concat(ie),me=Wa.prelude.staticUniforms?ea(Wa.prelude.staticUniforms):[],Oe=m.staticUniforms?ea(m.staticUniforms):[],qe=_?_.getBinderUniforms():[],Ye=me.concat(Oe).concat(qe),He=[];for(const Ut of Ye)He.indexOf(Ut)<0&&He.push(Ut);const Ne=_?_.defines():[];k&&Ne.push("#define OVERDRAW_INSPECTOR;"),R&&Ne.push("#define TERRAIN3D;");const ht=Ne.concat(Wa.prelude.fragmentSource,m.fragmentSource).join(`
`),Dt=Ne.concat(Wa.prelude.vertexSource,m.vertexSource).join(`
`),tt=j.createShader(j.FRAGMENT_SHADER);if(j.isContextLost())return void(this.failedToCreate=!0);if(j.shaderSource(tt,ht),j.compileShader(tt),!j.getShaderParameter(tt,j.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${j.getShaderInfoLog(tt)}`);j.attachShader(this.program,tt);const xt=j.createShader(j.VERTEX_SHADER);if(j.isContextLost())return void(this.failedToCreate=!0);if(j.shaderSource(xt,Dt),j.compileShader(xt),!j.getShaderParameter(xt,j.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${j.getShaderInfoLog(xt)}`);j.attachShader(this.program,xt),this.attributes={};const Pt={};this.numAttributes=de.length;for(let Ut=0;Ut<this.numAttributes;Ut++)de[Ut]&&(j.bindAttribLocation(this.program,Ut,de[Ut]),this.attributes[de[Ut]]=Ut);if(j.linkProgram(this.program),!j.getProgramParameter(this.program,j.LINK_STATUS))throw new Error(`Program failed to link: ${j.getProgramInfoLog(this.program)}`);j.deleteShader(xt),j.deleteShader(tt);for(let Ut=0;Ut<He.length;Ut++){const Xt=He[Ut];if(Xt&&!Pt[Xt]){const hn=j.getUniformLocation(this.program,Xt);hn&&(Pt[Xt]=hn)}}this.fixedUniforms=w(u,Pt),this.terrainUniforms=((Ut,Xt)=>({u_depth:new s.aG(Ut,Xt.u_depth),u_terrain:new s.aG(Ut,Xt.u_terrain),u_terrain_dim:new s.aH(Ut,Xt.u_terrain_dim),u_terrain_matrix:new s.aI(Ut,Xt.u_terrain_matrix),u_terrain_unpack:new s.aJ(Ut,Xt.u_terrain_unpack),u_terrain_exaggeration:new s.aH(Ut,Xt.u_terrain_exaggeration)}))(u,Pt),this.binderUniforms=_?_.getUniforms(u,Pt):[]}draw(u,m,_,w,k,R,j,Y,ie,de,me,Oe,qe,Ye,He,Ne,ht,Dt){const tt=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(_),u.setStencilMode(w),u.setColorMode(k),u.setCullFace(R),Y){u.activeTexture.set(tt.TEXTURE2),tt.bindTexture(tt.TEXTURE_2D,Y.depthTexture),u.activeTexture.set(tt.TEXTURE3),tt.bindTexture(tt.TEXTURE_2D,Y.texture);for(const Pt in this.terrainUniforms)this.terrainUniforms[Pt].set(Y[Pt])}for(const Pt in this.fixedUniforms)this.fixedUniforms[Pt].set(j[Pt]);He&&He.setUniforms(u,this.binderUniforms,qe,{zoom:Ye});let xt=0;switch(m){case tt.LINES:xt=2;break;case tt.TRIANGLES:xt=3;break;case tt.LINE_STRIP:xt=1}for(const Pt of Oe.get()){const Ut=Pt.vaos||(Pt.vaos={});(Ut[ie]||(Ut[ie]=new Ga)).bind(u,this,de,He?He.getPaintVertexBuffers():[],me,Pt.vertexOffset,Ne,ht,Dt),tt.drawElements(m,Pt.primitiveLength*xt,tt.UNSIGNED_SHORT,Pt.primitiveOffset*xt*2)}}}function as(I,u,m){const _=1/cr(m,1,u.transform.tileZoom),w=Math.pow(2,m.tileID.overscaledZ),k=m.tileSize*Math.pow(2,u.transform.tileZoom)/w,R=k*(m.tileID.canonical.x+m.tileID.wrap*w),j=k*m.tileID.canonical.y;return{u_image:0,u_texsize:m.imageAtlasTexture.size,u_scale:[_,I.fromScale,I.toScale],u_fade:I.t,u_pixel_coord_upper:[R>>16,j>>16],u_pixel_coord_lower:[65535&R,65535&j]}}const ta=(I,u,m,_)=>{const w=u.style.light,k=w.properties.get("position"),R=[k.x,k.y,k.z],j=function(){var ie=new s.A(9);return s.A!=Float32Array&&(ie[1]=0,ie[2]=0,ie[3]=0,ie[5]=0,ie[6]=0,ie[7]=0),ie[0]=1,ie[4]=1,ie[8]=1,ie}();w.properties.get("anchor")==="viewport"&&function(ie,de){var me=Math.sin(de),Oe=Math.cos(de);ie[0]=Oe,ie[1]=me,ie[2]=0,ie[3]=-me,ie[4]=Oe,ie[5]=0,ie[6]=0,ie[7]=0,ie[8]=1}(j,-u.transform.angle),function(ie,de,me){var Oe=de[0],qe=de[1],Ye=de[2];ie[0]=Oe*me[0]+qe*me[3]+Ye*me[6],ie[1]=Oe*me[1]+qe*me[4]+Ye*me[7],ie[2]=Oe*me[2]+qe*me[5]+Ye*me[8]}(R,R,j);const Y=w.properties.get("color");return{u_matrix:I,u_lightpos:R,u_lightintensity:w.properties.get("intensity"),u_lightcolor:[Y.r,Y.g,Y.b],u_vertical_gradient:+m,u_opacity:_}},na=(I,u,m,_,w,k,R)=>s.e(ta(I,u,m,_),as(k,u,R),{u_height_factor:-Math.pow(2,w.overscaledZ)/R.tileSize/8}),bs=I=>({u_matrix:I}),wu=(I,u,m,_)=>s.e(bs(I),as(m,u,_)),ma=(I,u)=>({u_matrix:I,u_world:u}),_A=(I,u,m,_,w)=>s.e(wu(I,u,m,_),{u_world:w}),Wu=(I,u,m,_)=>{const w=I.transform;let k,R;if(_.paint.get("circle-pitch-alignment")==="map"){const j=cr(m,1,w.zoom);k=!0,R=[j,j]}else k=!1,R=w.pixelsToGLUnits;return{u_camera_to_center_distance:w.cameraToCenterDistance,u_scale_with_map:+(_.paint.get("circle-pitch-scale")==="map"),u_matrix:I.translatePosMatrix(u.posMatrix,m,_.paint.get("circle-translate"),_.paint.get("circle-translate-anchor")),u_pitch_with_map:+k,u_device_pixel_ratio:I.pixelRatio,u_extrude_scale:R}},bA=(I,u,m)=>{const _=cr(m,1,u.zoom),w=Math.pow(2,u.zoom-m.tileID.overscaledZ),k=m.tileID.overscaleFactor();return{u_matrix:I,u_camera_to_center_distance:u.cameraToCenterDistance,u_pixels_to_tile_units:_,u_extrude_scale:[u.pixelsToGLUnits[0]/(_*w),u.pixelsToGLUnits[1]/(_*w)],u_overscale_factor:k}},Mu=(I,u,m=1)=>({u_matrix:I,u_color:u,u_overlay:0,u_overlay_scale:m}),Gu=I=>({u_matrix:I}),Wo=(I,u,m,_)=>({u_matrix:I,u_extrude_scale:cr(u,1,m),u_intensity:_});function xs(I,u){const m=Math.pow(2,u.canonical.z),_=u.canonical.y;return[new s.Y(0,_/m).toLngLat().lat,new s.Y(0,(_+1)/m).toLngLat().lat]}const nu=(I,u,m,_)=>{const w=I.transform;return{u_matrix:Al(I,u,m,_),u_ratio:1/cr(u,1,w.zoom),u_device_pixel_ratio:I.pixelRatio,u_units_to_pixels:[1/w.pixelsToGLUnits[0],1/w.pixelsToGLUnits[1]]}},ss=(I,u,m,_,w)=>s.e(nu(I,u,m,w),{u_image:0,u_image_height:_}),ul=(I,u,m,_,w)=>{const k=I.transform,R=Su(u,k);return{u_matrix:Al(I,u,m,w),u_texsize:u.imageAtlasTexture.size,u_ratio:1/cr(u,1,k.zoom),u_device_pixel_ratio:I.pixelRatio,u_image:0,u_scale:[R,_.fromScale,_.toScale],u_fade:_.t,u_units_to_pixels:[1/k.pixelsToGLUnits[0],1/k.pixelsToGLUnits[1]]}},Go=(I,u,m,_,w,k)=>{const R=I.lineAtlas,j=Su(u,I.transform),Y=m.layout.get("line-cap")==="round",ie=R.getDash(_.from,Y),de=R.getDash(_.to,Y),me=ie.width*w.fromScale,Oe=de.width*w.toScale;return s.e(nu(I,u,m,k),{u_patternscale_a:[j/me,-ie.height/2],u_patternscale_b:[j/Oe,-de.height/2],u_sdfgamma:R.width/(256*Math.min(me,Oe)*I.pixelRatio)/2,u_image:0,u_tex_y_a:ie.y,u_tex_y_b:de.y,u_mix:w.t})};function Su(I,u){return 1/cr(I,1,u.tileZoom)}function Al(I,u,m,_){return I.translatePosMatrix(_?_.posMatrix:u.tileID.posMatrix,u,m.paint.get("line-translate"),m.paint.get("line-translate-anchor"))}const Ml=(I,u,m,_,w)=>{return{u_matrix:I,u_tl_parent:u,u_scale_parent:m,u_buffer_scale:1,u_fade_t:_.mix,u_opacity:_.opacity*w.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:w.paint.get("raster-brightness-min"),u_brightness_high:w.paint.get("raster-brightness-max"),u_saturation_factor:(R=w.paint.get("raster-saturation"),R>0?1-1/(1.001-R):-R),u_contrast_factor:(k=w.paint.get("raster-contrast"),k>0?1/(1-k):1+k),u_spin_weights:ru(w.paint.get("raster-hue-rotate"))};var k,R};function ru(I){I*=Math.PI/180;const u=Math.sin(I),m=Math.cos(I);return[(2*m+1)/3,(-Math.sqrt(3)*u-m+1)/3,(Math.sqrt(3)*u-m+1)/3]}const ua=(I,u,m,_,w,k,R,j,Y,ie)=>{const de=w.transform;return{u_is_size_zoom_constant:+(I==="constant"||I==="source"),u_is_size_feature_constant:+(I==="constant"||I==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:de.cameraToCenterDistance,u_pitch:de.pitch/360*2*Math.PI,u_rotate_symbol:+m,u_aspect_ratio:de.width/de.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:k,u_label_plane_matrix:R,u_coord_matrix:j,u_is_text:+Y,u_pitch_with_map:+_,u_texsize:ie,u_texture:0}},cl=(I,u,m,_,w,k,R,j,Y,ie,de)=>{const me=w.transform;return s.e(ua(I,u,m,_,w,k,R,j,Y,ie),{u_gamma_scale:_?Math.cos(me._pitch)*me.cameraToCenterDistance:1,u_device_pixel_ratio:w.pixelRatio,u_is_halo:+de})},xA=(I,u,m,_,w,k,R,j,Y,ie)=>s.e(cl(I,u,m,_,w,k,R,j,!0,Y,!0),{u_texsize_icon:ie,u_texture_icon:1}),vo=(I,u,m)=>({u_matrix:I,u_opacity:u,u_color:m}),io=(I,u,m,_,w,k)=>s.e(function(R,j,Y,ie){const de=Y.imageManager.getPattern(R.from.toString()),me=Y.imageManager.getPattern(R.to.toString()),{width:Oe,height:qe}=Y.imageManager.getPixelSize(),Ye=Math.pow(2,ie.tileID.overscaledZ),He=ie.tileSize*Math.pow(2,Y.transform.tileZoom)/Ye,Ne=He*(ie.tileID.canonical.x+ie.tileID.wrap*Ye),ht=He*ie.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:de.tl,u_pattern_br_a:de.br,u_pattern_tl_b:me.tl,u_pattern_br_b:me.br,u_texsize:[Oe,qe],u_mix:j.t,u_pattern_size_a:de.displaySize,u_pattern_size_b:me.displaySize,u_scale_a:j.fromScale,u_scale_b:j.toScale,u_tile_units_to_pixels:1/cr(ie,1,Y.transform.tileZoom),u_pixel_coord_upper:[Ne>>16,ht>>16],u_pixel_coord_lower:[65535&Ne,65535&ht]}}(_,k,m,w),{u_matrix:I,u_opacity:u}),z={fillExtrusion:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_lightpos:new s.aK(I,u.u_lightpos),u_lightintensity:new s.aH(I,u.u_lightintensity),u_lightcolor:new s.aK(I,u.u_lightcolor),u_vertical_gradient:new s.aH(I,u.u_vertical_gradient),u_opacity:new s.aH(I,u.u_opacity)}),fillExtrusionPattern:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_lightpos:new s.aK(I,u.u_lightpos),u_lightintensity:new s.aH(I,u.u_lightintensity),u_lightcolor:new s.aK(I,u.u_lightcolor),u_vertical_gradient:new s.aH(I,u.u_vertical_gradient),u_height_factor:new s.aH(I,u.u_height_factor),u_image:new s.aG(I,u.u_image),u_texsize:new s.aL(I,u.u_texsize),u_pixel_coord_upper:new s.aL(I,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.aL(I,u.u_pixel_coord_lower),u_scale:new s.aK(I,u.u_scale),u_fade:new s.aH(I,u.u_fade),u_opacity:new s.aH(I,u.u_opacity)}),fill:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix)}),fillPattern:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_image:new s.aG(I,u.u_image),u_texsize:new s.aL(I,u.u_texsize),u_pixel_coord_upper:new s.aL(I,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.aL(I,u.u_pixel_coord_lower),u_scale:new s.aK(I,u.u_scale),u_fade:new s.aH(I,u.u_fade)}),fillOutline:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_world:new s.aL(I,u.u_world)}),fillOutlinePattern:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_world:new s.aL(I,u.u_world),u_image:new s.aG(I,u.u_image),u_texsize:new s.aL(I,u.u_texsize),u_pixel_coord_upper:new s.aL(I,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.aL(I,u.u_pixel_coord_lower),u_scale:new s.aK(I,u.u_scale),u_fade:new s.aH(I,u.u_fade)}),circle:(I,u)=>({u_camera_to_center_distance:new s.aH(I,u.u_camera_to_center_distance),u_scale_with_map:new s.aG(I,u.u_scale_with_map),u_pitch_with_map:new s.aG(I,u.u_pitch_with_map),u_extrude_scale:new s.aL(I,u.u_extrude_scale),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_matrix:new s.aI(I,u.u_matrix)}),collisionBox:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_camera_to_center_distance:new s.aH(I,u.u_camera_to_center_distance),u_pixels_to_tile_units:new s.aH(I,u.u_pixels_to_tile_units),u_extrude_scale:new s.aL(I,u.u_extrude_scale),u_overscale_factor:new s.aH(I,u.u_overscale_factor)}),collisionCircle:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_inv_matrix:new s.aI(I,u.u_inv_matrix),u_camera_to_center_distance:new s.aH(I,u.u_camera_to_center_distance),u_viewport_size:new s.aL(I,u.u_viewport_size)}),debug:(I,u)=>({u_color:new s.aM(I,u.u_color),u_matrix:new s.aI(I,u.u_matrix),u_overlay:new s.aG(I,u.u_overlay),u_overlay_scale:new s.aH(I,u.u_overlay_scale)}),clippingMask:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix)}),heatmap:(I,u)=>({u_extrude_scale:new s.aH(I,u.u_extrude_scale),u_intensity:new s.aH(I,u.u_intensity),u_matrix:new s.aI(I,u.u_matrix)}),heatmapTexture:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_world:new s.aL(I,u.u_world),u_image:new s.aG(I,u.u_image),u_color_ramp:new s.aG(I,u.u_color_ramp),u_opacity:new s.aH(I,u.u_opacity)}),hillshade:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_image:new s.aG(I,u.u_image),u_latrange:new s.aL(I,u.u_latrange),u_light:new s.aL(I,u.u_light),u_shadow:new s.aM(I,u.u_shadow),u_highlight:new s.aM(I,u.u_highlight),u_accent:new s.aM(I,u.u_accent)}),hillshadePrepare:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_image:new s.aG(I,u.u_image),u_dimension:new s.aL(I,u.u_dimension),u_zoom:new s.aH(I,u.u_zoom),u_unpack:new s.aJ(I,u.u_unpack)}),line:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_ratio:new s.aH(I,u.u_ratio),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_units_to_pixels:new s.aL(I,u.u_units_to_pixels)}),lineGradient:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_ratio:new s.aH(I,u.u_ratio),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_units_to_pixels:new s.aL(I,u.u_units_to_pixels),u_image:new s.aG(I,u.u_image),u_image_height:new s.aH(I,u.u_image_height)}),linePattern:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_texsize:new s.aL(I,u.u_texsize),u_ratio:new s.aH(I,u.u_ratio),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_image:new s.aG(I,u.u_image),u_units_to_pixels:new s.aL(I,u.u_units_to_pixels),u_scale:new s.aK(I,u.u_scale),u_fade:new s.aH(I,u.u_fade)}),lineSDF:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_ratio:new s.aH(I,u.u_ratio),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_units_to_pixels:new s.aL(I,u.u_units_to_pixels),u_patternscale_a:new s.aL(I,u.u_patternscale_a),u_patternscale_b:new s.aL(I,u.u_patternscale_b),u_sdfgamma:new s.aH(I,u.u_sdfgamma),u_image:new s.aG(I,u.u_image),u_tex_y_a:new s.aH(I,u.u_tex_y_a),u_tex_y_b:new s.aH(I,u.u_tex_y_b),u_mix:new s.aH(I,u.u_mix)}),raster:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_tl_parent:new s.aL(I,u.u_tl_parent),u_scale_parent:new s.aH(I,u.u_scale_parent),u_buffer_scale:new s.aH(I,u.u_buffer_scale),u_fade_t:new s.aH(I,u.u_fade_t),u_opacity:new s.aH(I,u.u_opacity),u_image0:new s.aG(I,u.u_image0),u_image1:new s.aG(I,u.u_image1),u_brightness_low:new s.aH(I,u.u_brightness_low),u_brightness_high:new s.aH(I,u.u_brightness_high),u_saturation_factor:new s.aH(I,u.u_saturation_factor),u_contrast_factor:new s.aH(I,u.u_contrast_factor),u_spin_weights:new s.aK(I,u.u_spin_weights)}),symbolIcon:(I,u)=>({u_is_size_zoom_constant:new s.aG(I,u.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aG(I,u.u_is_size_feature_constant),u_size_t:new s.aH(I,u.u_size_t),u_size:new s.aH(I,u.u_size),u_camera_to_center_distance:new s.aH(I,u.u_camera_to_center_distance),u_pitch:new s.aH(I,u.u_pitch),u_rotate_symbol:new s.aG(I,u.u_rotate_symbol),u_aspect_ratio:new s.aH(I,u.u_aspect_ratio),u_fade_change:new s.aH(I,u.u_fade_change),u_matrix:new s.aI(I,u.u_matrix),u_label_plane_matrix:new s.aI(I,u.u_label_plane_matrix),u_coord_matrix:new s.aI(I,u.u_coord_matrix),u_is_text:new s.aG(I,u.u_is_text),u_pitch_with_map:new s.aG(I,u.u_pitch_with_map),u_texsize:new s.aL(I,u.u_texsize),u_texture:new s.aG(I,u.u_texture)}),symbolSDF:(I,u)=>({u_is_size_zoom_constant:new s.aG(I,u.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aG(I,u.u_is_size_feature_constant),u_size_t:new s.aH(I,u.u_size_t),u_size:new s.aH(I,u.u_size),u_camera_to_center_distance:new s.aH(I,u.u_camera_to_center_distance),u_pitch:new s.aH(I,u.u_pitch),u_rotate_symbol:new s.aG(I,u.u_rotate_symbol),u_aspect_ratio:new s.aH(I,u.u_aspect_ratio),u_fade_change:new s.aH(I,u.u_fade_change),u_matrix:new s.aI(I,u.u_matrix),u_label_plane_matrix:new s.aI(I,u.u_label_plane_matrix),u_coord_matrix:new s.aI(I,u.u_coord_matrix),u_is_text:new s.aG(I,u.u_is_text),u_pitch_with_map:new s.aG(I,u.u_pitch_with_map),u_texsize:new s.aL(I,u.u_texsize),u_texture:new s.aG(I,u.u_texture),u_gamma_scale:new s.aH(I,u.u_gamma_scale),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_is_halo:new s.aG(I,u.u_is_halo)}),symbolTextAndIcon:(I,u)=>({u_is_size_zoom_constant:new s.aG(I,u.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aG(I,u.u_is_size_feature_constant),u_size_t:new s.aH(I,u.u_size_t),u_size:new s.aH(I,u.u_size),u_camera_to_center_distance:new s.aH(I,u.u_camera_to_center_distance),u_pitch:new s.aH(I,u.u_pitch),u_rotate_symbol:new s.aG(I,u.u_rotate_symbol),u_aspect_ratio:new s.aH(I,u.u_aspect_ratio),u_fade_change:new s.aH(I,u.u_fade_change),u_matrix:new s.aI(I,u.u_matrix),u_label_plane_matrix:new s.aI(I,u.u_label_plane_matrix),u_coord_matrix:new s.aI(I,u.u_coord_matrix),u_is_text:new s.aG(I,u.u_is_text),u_pitch_with_map:new s.aG(I,u.u_pitch_with_map),u_texsize:new s.aL(I,u.u_texsize),u_texsize_icon:new s.aL(I,u.u_texsize_icon),u_texture:new s.aG(I,u.u_texture),u_texture_icon:new s.aG(I,u.u_texture_icon),u_gamma_scale:new s.aH(I,u.u_gamma_scale),u_device_pixel_ratio:new s.aH(I,u.u_device_pixel_ratio),u_is_halo:new s.aG(I,u.u_is_halo)}),background:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_opacity:new s.aH(I,u.u_opacity),u_color:new s.aM(I,u.u_color)}),backgroundPattern:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_opacity:new s.aH(I,u.u_opacity),u_image:new s.aG(I,u.u_image),u_pattern_tl_a:new s.aL(I,u.u_pattern_tl_a),u_pattern_br_a:new s.aL(I,u.u_pattern_br_a),u_pattern_tl_b:new s.aL(I,u.u_pattern_tl_b),u_pattern_br_b:new s.aL(I,u.u_pattern_br_b),u_texsize:new s.aL(I,u.u_texsize),u_mix:new s.aH(I,u.u_mix),u_pattern_size_a:new s.aL(I,u.u_pattern_size_a),u_pattern_size_b:new s.aL(I,u.u_pattern_size_b),u_scale_a:new s.aH(I,u.u_scale_a),u_scale_b:new s.aH(I,u.u_scale_b),u_pixel_coord_upper:new s.aL(I,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.aL(I,u.u_pixel_coord_lower),u_tile_units_to_pixels:new s.aH(I,u.u_tile_units_to_pixels)}),terrain:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_texture:new s.aG(I,u.u_texture),u_ele_delta:new s.aH(I,u.u_ele_delta)}),terrainDepth:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_ele_delta:new s.aH(I,u.u_ele_delta)}),terrainCoords:(I,u)=>({u_matrix:new s.aI(I,u.u_matrix),u_texture:new s.aG(I,u.u_texture),u_terrain_coords_id:new s.aH(I,u.u_terrain_coords_id),u_ele_delta:new s.aH(I,u.u_ele_delta)})};class le{constructor(u,m,_){this.context=u;const w=u.gl;this.buffer=w.createBuffer(),this.dynamicDraw=!!_,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),w.bufferData(w.ELEMENT_ARRAY_BUFFER,m.arrayBuffer,this.dynamicDraw?w.DYNAMIC_DRAW:w.STATIC_DRAW),this.dynamicDraw||delete m.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const m=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),m.bufferSubData(m.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ue={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class vt{constructor(u,m,_,w){this.length=m.length,this.attributes=_,this.itemSize=m.bytesPerElement,this.dynamicDraw=w,this.context=u;const k=u.gl;this.buffer=k.createBuffer(),u.bindVertexBuffer.set(this.buffer),k.bufferData(k.ARRAY_BUFFER,m.arrayBuffer,this.dynamicDraw?k.DYNAMIC_DRAW:k.STATIC_DRAW),this.dynamicDraw||delete m.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const m=this.context.gl;this.bind(),m.bufferSubData(m.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,m){for(let _=0;_<this.attributes.length;_++){const w=m.attributes[this.attributes[_].name];w!==void 0&&u.enableVertexAttribArray(w)}}setVertexAttribPointers(u,m,_){for(let w=0;w<this.attributes.length;w++){const k=this.attributes[w],R=m.attributes[k.name];R!==void 0&&u.vertexAttribPointer(R,k.components,u[Ue[k.type]],!1,this.itemSize,k.offset+this.itemSize*(_||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const $n=new WeakMap;function vn(I){var u;if($n.has(I))return $n.get(I);{const m=(u=I.getParameter(I.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return $n.set(I,m),m}}class Kn{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Ur extends Kn{getDefault(){return s.aO.transparent}set(u){const m=this.current;(u.r!==m.r||u.g!==m.g||u.b!==m.b||u.a!==m.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class vr extends Kn{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class kr extends Kn{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class Ti extends Kn{getDefault(){return[!0,!0,!0,!0]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||u[2]!==m[2]||u[3]!==m[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class po extends Kn{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class Oi extends Kn{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class Zr extends Kn{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const m=this.current;(u.func!==m.func||u.ref!==m.ref||u.mask!==m.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class Vi extends Kn{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||u[2]!==m[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Io extends Kn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.STENCIL_TEST):m.disable(m.STENCIL_TEST),this.current=u,this.dirty=!1}}class wo extends Kn{getDefault(){return[0,1]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class $a extends Kn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.DEPTH_TEST):m.disable(m.DEPTH_TEST),this.current=u,this.dirty=!1}}class Fl extends Kn{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class iu extends Kn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.BLEND):m.disable(m.BLEND),this.current=u,this.dirty=!1}}class ga extends Kn{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class v0 extends Kn{getDefault(){return s.aO.transparent}set(u){const m=this.current;(u.r!==m.r||u.g!==m.g||u.b!==m.b||u.a!==m.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ou extends Kn{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Rh extends Kn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.CULL_FACE):m.disable(m.CULL_FACE),this.current=u,this.dirty=!1}}class ld extends Kn{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $u extends Kn{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class ud extends Kn{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class YA extends Kn{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class ra extends Kn{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||u[2]!==m[2]||u[3]!==m[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Qu extends Kn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindFramebuffer(m.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Vd extends Kn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindRenderbuffer(m.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class qA extends Kn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindTexture(m.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class kc extends Kn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindBuffer(m.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Eu extends Kn{getDefault(){return null}set(u){const m=this.gl;m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ad extends Kn{getDefault(){return null}set(u){var m;if(u===this.current&&!this.dirty)return;const _=this.gl;vn(_)?_.bindVertexArray(u):(m=_.getExtension("OES_vertex_array_object"))===null||m===void 0||m.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class em extends Kn{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class zh extends Kn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Ki extends Kn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class ko extends Kn{constructor(u,m){super(u),this.context=u,this.parent=m}getDefault(){return null}}class C0 extends ko{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class jh extends ko{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_ATTACHMENT,m.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Yu extends ko{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_STENCIL_ATTACHMENT,m.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Jf{constructor(u,m,_,w,k){this.context=u,this.width=m,this.height=_;const R=u.gl,j=this.framebuffer=R.createFramebuffer();if(this.colorAttachment=new C0(u,j),w)this.depthAttachment=k?new Yu(u,j):new jh(u,j);else if(k)throw new Error("Stencil cannot be set without depth");if(R.checkFramebufferStatus(R.FRAMEBUFFER)!==R.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,m=this.colorAttachment.get();if(m&&u.deleteTexture(m),this.depthAttachment){const _=this.depthAttachment.get();_&&u.deleteRenderbuffer(_)}u.deleteFramebuffer(this.framebuffer)}}class Aa{constructor(u,m,_){this.blendFunction=u,this.blendColor=m,this.mask=_}}Aa.Replace=[1,0],Aa.disabled=new Aa(Aa.Replace,s.aO.transparent,[!1,!1,!1,!1]),Aa.unblended=new Aa(Aa.Replace,s.aO.transparent,[!0,!0,!0,!0]),Aa.alphaBlended=new Aa([1,771],s.aO.transparent,[!0,!0,!0,!0]);class ep{constructor(u){var m,_;if(this.gl=u,this.clearColor=new Ur(this),this.clearDepth=new vr(this),this.clearStencil=new kr(this),this.colorMask=new Ti(this),this.depthMask=new po(this),this.stencilMask=new Oi(this),this.stencilFunc=new Zr(this),this.stencilOp=new Vi(this),this.stencilTest=new Io(this),this.depthRange=new wo(this),this.depthTest=new $a(this),this.depthFunc=new Fl(this),this.blend=new iu(this),this.blendFunc=new ga(this),this.blendColor=new v0(this),this.blendEquation=new ou(this),this.cullFace=new Rh(this),this.cullFaceSide=new ld(this),this.frontFace=new $u(this),this.program=new ud(this),this.activeTexture=new YA(this),this.viewport=new ra(this),this.bindFramebuffer=new Qu(this),this.bindRenderbuffer=new Vd(this),this.bindTexture=new qA(this),this.bindVertexBuffer=new kc(this),this.bindElementBuffer=new Eu(this),this.bindVertexArray=new Ad(this),this.pixelStoreUnpack=new em(this),this.pixelStoreUnpackPremultiplyAlpha=new zh(this),this.pixelStoreUnpackFlipY=new Ki(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),vn(u)){this.HALF_FLOAT=u.HALF_FLOAT;const w=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(m=u.RGBA16F)!==null&&m!==void 0?m:w==null?void 0:w.RGBA16F_EXT,this.RGB16F=(_=u.RGB16F)!==null&&_!==void 0?_:w==null?void 0:w.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const w=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=w==null?void 0:w.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,m){return new le(this,u,m)}createVertexBuffer(u,m,_){return new vt(this,u,m,_)}createRenderbuffer(u,m,_){const w=this.gl,k=w.createRenderbuffer();return this.bindRenderbuffer.set(k),w.renderbufferStorage(w.RENDERBUFFER,u,m,_),this.bindRenderbuffer.set(null),k}createFramebuffer(u,m,_,w){return new Jf(this,u,m,_,w)}clear({color:u,depth:m,stencil:_}){const w=this.gl;let k=0;u&&(k|=w.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),m!==void 0&&(k|=w.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(m),this.depthMask.set(!0)),_!==void 0&&(k|=w.STENCIL_BUFFER_BIT,this.clearStencil.set(_),this.stencilMask.set(255)),w.clear(k)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){s.aD(u.blendFunction,Aa.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return vn(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var m;return vn(this.gl)?this.gl.deleteVertexArray(u):(m=this.gl.getExtension("OES_vertex_array_object"))===null||m===void 0?void 0:m.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Gi{constructor(u,m,_){this.func=u,this.mask=m,this.range=_}}Gi.ReadOnly=!1,Gi.ReadWrite=!0,Gi.disabled=new Gi(519,Gi.ReadOnly,[0,1]);const VA=7680;class To{constructor(u,m,_,w,k,R){this.test=u,this.ref=m,this.mask=_,this.fail=w,this.depthFail=k,this.pass=R}}To.disabled=new To({func:519,mask:0},0,0,VA,VA,VA);class Fo{constructor(u,m,_){this.enable=u,this.mode=m,this.frontFace=_}}let HA;function Us(I,u,m,_,w,k,R){const j=I.context,Y=j.gl,ie=I.useProgram("collisionBox"),de=[];let me=0,Oe=0;for(let tt=0;tt<_.length;tt++){const xt=_[tt],Pt=u.getTile(xt),Ut=Pt.getBucket(m);if(!Ut)continue;let Xt=xt.posMatrix;w[0]===0&&w[1]===0||(Xt=I.translatePosMatrix(xt.posMatrix,Pt,w,k));const hn=R?Ut.textCollisionBox:Ut.iconCollisionBox,un=Ut.collisionCircleArray;if(un.length>0){const pn=s.F(),qn=Xt;s.aP(pn,Ut.placementInvProjMatrix,I.transform.glCoordMatrix),s.aP(pn,pn,Ut.placementViewportMatrix),de.push({circleArray:un,circleOffset:Oe,transform:qn,invTransform:pn,coord:xt}),me+=un.length/4,Oe=me}hn&&ie.draw(j,Y.LINES,Gi.disabled,To.disabled,I.colorModeForRenderPass(),Fo.disabled,bA(Xt,I.transform,Pt),I.style.map.terrain&&I.style.map.terrain.getTerrainData(xt),m.id,hn.layoutVertexBuffer,hn.indexBuffer,hn.segments,null,I.transform.zoom,null,null,hn.collisionVertexBuffer)}if(!R||!de.length)return;const qe=I.useProgram("collisionCircle"),Ye=new s.aQ;Ye.resize(4*me),Ye._trim();let He=0;for(const tt of de)for(let xt=0;xt<tt.circleArray.length/4;xt++){const Pt=4*xt,Ut=tt.circleArray[Pt+0],Xt=tt.circleArray[Pt+1],hn=tt.circleArray[Pt+2],un=tt.circleArray[Pt+3];Ye.emplace(He++,Ut,Xt,hn,un,0),Ye.emplace(He++,Ut,Xt,hn,un,1),Ye.emplace(He++,Ut,Xt,hn,un,2),Ye.emplace(He++,Ut,Xt,hn,un,3)}(!HA||HA.length<2*me)&&(HA=function(tt){const xt=2*tt,Pt=new s.aS;Pt.resize(xt),Pt._trim();for(let Ut=0;Ut<xt;Ut++){const Xt=6*Ut;Pt.uint16[Xt+0]=4*Ut+0,Pt.uint16[Xt+1]=4*Ut+1,Pt.uint16[Xt+2]=4*Ut+2,Pt.uint16[Xt+3]=4*Ut+2,Pt.uint16[Xt+4]=4*Ut+3,Pt.uint16[Xt+5]=4*Ut+0}return Pt}(me));const Ne=j.createIndexBuffer(HA,!0),ht=j.createVertexBuffer(Ye,s.aR.members,!0);for(const tt of de){const xt={u_matrix:tt.transform,u_inv_matrix:tt.invTransform,u_camera_to_center_distance:(Dt=I.transform).cameraToCenterDistance,u_viewport_size:[Dt.width,Dt.height]};qe.draw(j,Y.TRIANGLES,Gi.disabled,To.disabled,I.colorModeForRenderPass(),Fo.disabled,xt,I.style.map.terrain&&I.style.map.terrain.getTerrainData(tt.coord),m.id,ht,Ne,s.$.simpleSegment(0,2*tt.circleOffset,tt.circleArray.length,tt.circleArray.length/2),null,I.transform.zoom,null,null,null)}var Dt;ht.destroy(),Ne.destroy()}Fo.disabled=new Fo(!1,1029,2305),Fo.backCCW=new Fo(!0,1029,2305);const Nh=s.an(new Float32Array(16));function au(I,u,m,_,w,k){const{horizontalAlign:R,verticalAlign:j}=s.at(I);return new s.P((-(R-.5)*u/w+_[0])*k,(-(j-.5)*m/w+_[1])*k)}function Ul(I,u,m,_,w,k,R,j,Y,ie,de){const me=I.text.placedSymbolArray,Oe=I.text.dynamicLayoutVertexArray,qe=I.icon.dynamicLayoutVertexArray,Ye={};Oe.clear();for(let He=0;He<me.length;He++){const Ne=me.get(He),ht=Ne.hidden||!Ne.crossTileID||I.allowVerticalPlacement&&!Ne.placedOrientation?null:_[Ne.crossTileID];if(ht){const Dt=new s.P(Ne.anchorX,Ne.anchorY),tt=Le(Dt,m?R:k,de),xt=ce(w.cameraToCenterDistance,tt.signedDistanceFromCamera);let Pt=s.ai(I.textSizeData,Y,Ne)*xt/s.ao;m&&(Pt*=I.tilePixelRatio/j);const{width:Ut,height:Xt,anchor:hn,textOffset:un,textBoxScale:pn}=ht,qn=au(hn,Ut,Xt,un,pn,Pt),qr=m?Le(Dt.add(qn),k,de).point:tt.point.add(u?qn.rotate(-w.angle):qn),In=I.allowVerticalPlacement&&Ne.placedOrientation===s.ah.vertical?Math.PI/2:0;for(let Cr=0;Cr<Ne.numGlyphs;Cr++)s.aj(Oe,qr,In);ie&&Ne.associatedIconIndex>=0&&(Ye[Ne.associatedIconIndex]={shiftedAnchor:qr,angle:In})}else Fn(Ne.numGlyphs,Oe)}if(ie){qe.clear();const He=I.icon.placedSymbolArray;for(let Ne=0;Ne<He.length;Ne++){const ht=He.get(Ne);if(ht.hidden)Fn(ht.numGlyphs,qe);else{const Dt=Ye[Ne];if(Dt)for(let tt=0;tt<ht.numGlyphs;tt++)s.aj(qe,Dt.shiftedAnchor,Dt.angle);else Fn(ht.numGlyphs,qe)}}I.icon.dynamicLayoutVertexBuffer.updateData(qe)}I.text.dynamicLayoutVertexBuffer.updateData(Oe)}function Tc(I,u,m){return m.iconsInText&&u?"symbolTextAndIcon":I?"symbolSDF":"symbolIcon"}function Wh(I,u,m,_,w,k,R,j,Y,ie,de,me){const Oe=I.context,qe=Oe.gl,Ye=I.transform,He=j==="map",Ne=Y==="map",ht=j!=="viewport"&&m.layout.get("symbol-placement")!=="point",Dt=He&&!Ne&&!ht,tt=!m.layout.get("symbol-sort-key").isConstant();let xt=!1;const Pt=I.depthModeForSublayer(0,Gi.ReadOnly),Ut=m._unevaluatedLayout.hasValue("text-variable-anchor")||m._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Xt=[];for(const hn of _){const un=u.getTile(hn),pn=un.getBucket(m);if(!pn)continue;const qn=w?pn.text:pn.icon;if(!qn||!qn.segments.get().length||!qn.hasVisibleVertices)continue;const qr=qn.programConfigurations.get(m.id),In=w||pn.sdfIcons,Cr=w?pn.textSizeData:pn.iconSizeData,hi=Ne||Ye.pitch!==0,Pi=I.useProgram(Tc(In,w,pn),qr),Vr=s.ag(Cr,Ye.zoom),ei=I.style.map.terrain&&I.style.map.terrain.getTerrainData(hn);let Wr,Ho,Uo,Rs,Da=[0,0],mo=null;if(w)Ho=un.glyphAtlasTexture,Uo=qe.LINEAR,Wr=un.glyphAtlasTexture.size,pn.iconsInText&&(Da=un.imageAtlasTexture.size,mo=un.imageAtlasTexture,Rs=hi||I.options.rotating||I.options.zooming||Cr.kind==="composite"||Cr.kind==="camera"?qe.LINEAR:qe.NEAREST);else{const Zo=m.layout.get("icon-size").constantOr(0)!==1||pn.iconsNeedLinear;Ho=un.imageAtlasTexture,Uo=In||I.options.rotating||I.options.zooming||Zo||hi?qe.LINEAR:qe.NEAREST,Wr=un.imageAtlasTexture.size}const so=cr(un,1,I.transform.zoom),Js=Pr(hn.posMatrix,Ne,He,I.transform,so),Au=rr(hn.posMatrix,Ne,He,I.transform,so),Ms=Ut&&pn.hasTextData(),iA=m.layout.get("icon-text-fit")!=="none"&&Ms&&pn.hasIconData();if(ht){const Zo=I.style.map.terrain?(Es,Di)=>I.style.map.terrain.getElevation(hn,Es,Di):null,_a=m.layout.get("text-rotation-alignment")==="map";Ie(pn,hn.posMatrix,I,w,Js,Au,Ne,ie,_a,Zo)}const Gl=I.translatePosMatrix(hn.posMatrix,un,k,R),Ss=ht||w&&Ut||iA?Nh:Js,zi=I.translatePosMatrix(Au,un,k,R,!0),Bi=In&&m.paint.get(w?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let ia;ia=In?pn.iconsInText?xA(Cr.kind,Vr,Dt,Ne,I,Gl,Ss,zi,Wr,Da):cl(Cr.kind,Vr,Dt,Ne,I,Gl,Ss,zi,w,Wr,!0):ua(Cr.kind,Vr,Dt,Ne,I,Gl,Ss,zi,w,Wr);const Uc={program:Pi,buffers:qn,uniformValues:ia,atlasTexture:Ho,atlasTextureIcon:mo,atlasInterpolation:Uo,atlasInterpolationIcon:Rs,isSDF:In,hasHalo:Bi};if(tt&&pn.canOverlap){xt=!0;const Zo=qn.segments.get();for(const _a of Zo)Xt.push({segments:new s.$([_a]),sortKey:_a.sortKey,state:Uc,terrainData:ei})}else Xt.push({segments:qn.segments,sortKey:0,state:Uc,terrainData:ei})}xt&&Xt.sort((hn,un)=>hn.sortKey-un.sortKey);for(const hn of Xt){const un=hn.state;if(Oe.activeTexture.set(qe.TEXTURE0),un.atlasTexture.bind(un.atlasInterpolation,qe.CLAMP_TO_EDGE),un.atlasTextureIcon&&(Oe.activeTexture.set(qe.TEXTURE1),un.atlasTextureIcon&&un.atlasTextureIcon.bind(un.atlasInterpolationIcon,qe.CLAMP_TO_EDGE)),un.isSDF){const pn=un.uniformValues;un.hasHalo&&(pn.u_is_halo=1,Hd(un.buffers,hn.segments,m,I,un.program,Pt,de,me,pn,hn.terrainData)),pn.u_is_halo=0}Hd(un.buffers,hn.segments,m,I,un.program,Pt,de,me,un.uniformValues,hn.terrainData)}}function Hd(I,u,m,_,w,k,R,j,Y,ie){const de=_.context;w.draw(de,de.gl.TRIANGLES,k,R,j,Fo.disabled,Y,ie,m.id,I.layoutVertexBuffer,I.indexBuffer,u,m.paint,_.transform.zoom,I.programConfigurations.get(m.id),I.dynamicLayoutVertexBuffer,I.opacityVertexBuffer)}function Ou(I,u,m,_,w){if(!m||!_||!_.imageAtlas)return;const k=_.imageAtlas.patternPositions;let R=k[m.to.toString()],j=k[m.from.toString()];if(!R&&j&&(R=j),!j&&R&&(j=R),!R||!j){const Y=w.getPaintProperty(u);R=k[Y],j=k[Y]}R&&j&&I.setConstantPatternPositions(R,j)}function wA(I,u,m,_,w,k,R){const j=I.context.gl,Y="fill-pattern",ie=m.paint.get(Y),de=ie&&ie.constantOr(1),me=m.getCrossfadeParameters();let Oe,qe,Ye,He,Ne;R?(qe=de&&!m.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Oe=j.LINES):(qe=de?"fillPattern":"fill",Oe=j.TRIANGLES);const ht=ie.constantOr(null);for(const Dt of _){const tt=u.getTile(Dt);if(de&&!tt.patternsLoaded())continue;const xt=tt.getBucket(m);if(!xt)continue;const Pt=xt.programConfigurations.get(m.id),Ut=I.useProgram(qe,Pt),Xt=I.style.map.terrain&&I.style.map.terrain.getTerrainData(Dt);de&&(I.context.activeTexture.set(j.TEXTURE0),tt.imageAtlasTexture.bind(j.LINEAR,j.CLAMP_TO_EDGE),Pt.updatePaintBuffers(me)),Ou(Pt,Y,ht,tt,m);const hn=Xt?Dt:null,un=I.translatePosMatrix(hn?hn.posMatrix:Dt.posMatrix,tt,m.paint.get("fill-translate"),m.paint.get("fill-translate-anchor"));if(R){He=xt.indexBuffer2,Ne=xt.segments2;const pn=[j.drawingBufferWidth,j.drawingBufferHeight];Ye=qe==="fillOutlinePattern"&&de?_A(un,I,me,tt,pn):ma(un,pn)}else He=xt.indexBuffer,Ne=xt.segments,Ye=de?wu(un,I,me,tt):bs(un);Ut.draw(I.context,Oe,w,I.stencilModeForClipping(Dt),k,Fo.disabled,Ye,Xt,m.id,xt.layoutVertexBuffer,He,Ne,m.paint,I.transform.zoom,Pt)}}function ZA(I,u,m,_,w,k,R){const j=I.context,Y=j.gl,ie="fill-extrusion-pattern",de=m.paint.get(ie),me=de.constantOr(1),Oe=m.getCrossfadeParameters(),qe=m.paint.get("fill-extrusion-opacity"),Ye=de.constantOr(null);for(const He of _){const Ne=u.getTile(He),ht=Ne.getBucket(m);if(!ht)continue;const Dt=I.style.map.terrain&&I.style.map.terrain.getTerrainData(He),tt=ht.programConfigurations.get(m.id),xt=I.useProgram(me?"fillExtrusionPattern":"fillExtrusion",tt);me&&(I.context.activeTexture.set(Y.TEXTURE0),Ne.imageAtlasTexture.bind(Y.LINEAR,Y.CLAMP_TO_EDGE),tt.updatePaintBuffers(Oe)),Ou(tt,ie,Ye,Ne,m);const Pt=I.translatePosMatrix(He.posMatrix,Ne,m.paint.get("fill-extrusion-translate"),m.paint.get("fill-extrusion-translate-anchor")),Ut=m.paint.get("fill-extrusion-vertical-gradient"),Xt=me?na(Pt,I,Ut,qe,He,Oe,Ne):ta(Pt,I,Ut,qe);xt.draw(j,j.gl.TRIANGLES,w,k,R,Fo.backCCW,Xt,Dt,m.id,ht.layoutVertexBuffer,ht.indexBuffer,ht.segments,m.paint,I.transform.zoom,tt,I.style.map.terrain&&ht.centroidVertexBuffer)}}function XA(I,u,m,_,w,k,R){const j=I.context,Y=j.gl,ie=m.fbo;if(!ie)return;const de=I.useProgram("hillshade"),me=I.style.map.terrain&&I.style.map.terrain.getTerrainData(u);j.activeTexture.set(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,ie.colorAttachment.get()),de.draw(j,Y.TRIANGLES,w,k,R,Fo.disabled,((Oe,qe,Ye,He)=>{const Ne=Ye.paint.get("hillshade-shadow-color"),ht=Ye.paint.get("hillshade-highlight-color"),Dt=Ye.paint.get("hillshade-accent-color");let tt=Ye.paint.get("hillshade-illumination-direction")*(Math.PI/180);Ye.paint.get("hillshade-illumination-anchor")==="viewport"&&(tt-=Oe.transform.angle);const xt=!Oe.options.moving;return{u_matrix:He?He.posMatrix:Oe.transform.calculatePosMatrix(qe.tileID.toUnwrapped(),xt),u_image:0,u_latrange:xs(0,qe.tileID),u_light:[Ye.paint.get("hillshade-exaggeration"),tt],u_shadow:Ne,u_highlight:ht,u_accent:Dt}})(I,m,_,me?u:null),me,_.id,I.rasterBoundsBuffer,I.quadTriangleIndexBuffer,I.rasterBoundsSegments)}function tp(I,u,m,_,w,k){const R=I.context,j=R.gl,Y=u.dem;if(Y&&Y.data){const ie=Y.dim,de=Y.stride,me=Y.getPixels();if(R.activeTexture.set(j.TEXTURE1),R.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||I.getTileTexture(de),u.demTexture){const qe=u.demTexture;qe.update(me,{premultiply:!1}),qe.bind(j.NEAREST,j.CLAMP_TO_EDGE)}else u.demTexture=new Pe(R,me,j.RGBA,{premultiply:!1}),u.demTexture.bind(j.NEAREST,j.CLAMP_TO_EDGE);R.activeTexture.set(j.TEXTURE0);let Oe=u.fbo;if(!Oe){const qe=new Pe(R,{width:ie,height:ie,data:null},j.RGBA);qe.bind(j.LINEAR,j.CLAMP_TO_EDGE),Oe=u.fbo=R.createFramebuffer(ie,ie,!0,!1),Oe.colorAttachment.set(qe.texture)}R.bindFramebuffer.set(Oe.framebuffer),R.viewport.set([0,0,ie,ie]),I.useProgram("hillshadePrepare").draw(R,j.TRIANGLES,_,w,k,Fo.disabled,((qe,Ye)=>{const He=Ye.stride,Ne=s.F();return s.aN(Ne,0,s.W,-s.W,0,0,1),s.H(Ne,Ne,[0,-s.W,0]),{u_matrix:Ne,u_image:1,u_dimension:[He,He],u_zoom:qe.overscaledZ,u_unpack:Ye.getUnpackVector()}})(u.tileID,Y),null,m.id,I.rasterBoundsBuffer,I.quadTriangleIndexBuffer,I.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function tm(I,u,m,_,w,k){const R=_.paint.get("raster-fade-duration");if(!k&&R>0){const j=O.now(),Y=(j-I.timeAdded)/R,ie=u?(j-u.timeAdded)/R:-1,de=m.getSource(),me=w.coveringZoomLevel({tileSize:de.tileSize,roundZoom:de.roundZoom}),Oe=!u||Math.abs(u.tileID.overscaledZ-me)>Math.abs(I.tileID.overscaledZ-me),qe=Oe&&I.refreshedUponExpiration?1:s.ac(Oe?Y:1-ie,0,1);return I.refreshedUponExpiration&&Y>=1&&(I.refreshedUponExpiration=!1),u?{opacity:1,mix:1-qe}:{opacity:qe,mix:0}}return{opacity:1,mix:0}}const Kc=new s.aO(1,0,0,1),cd=new s.aO(0,1,0,1),Rl=new s.aO(0,0,1,1),Sl=new s.aO(1,0,1,1),ya=new s.aO(0,1,1,1);function MA(I,u,m,_){Bu(I,0,u+m/2,I.transform.width,m,_)}function zl(I,u,m,_){Bu(I,u-m/2,0,m,I.transform.height,_)}function Bu(I,u,m,_,w,k){const R=I.context,j=R.gl;j.enable(j.SCISSOR_TEST),j.scissor(u*I.pixelRatio,m*I.pixelRatio,_*I.pixelRatio,w*I.pixelRatio),R.clear({color:k}),j.disable(j.SCISSOR_TEST)}function jl(I,u,m){const _=I.context,w=_.gl,k=m.posMatrix,R=I.useProgram("debug"),j=Gi.disabled,Y=To.disabled,ie=I.colorModeForRenderPass(),de="$debug",me=I.style.map.terrain&&I.style.map.terrain.getTerrainData(m);_.activeTexture.set(w.TEXTURE0);const Oe=u.getTileByID(m.key).latestRawTileData,qe=Math.floor((Oe&&Oe.byteLength||0)/1024),Ye=u.getTile(m).tileSize,He=512/Math.min(Ye,512)*(m.overscaledZ/I.transform.zoom)*.5;let Ne=m.canonical.toString();m.overscaledZ!==m.canonical.z&&(Ne+=` => ${m.overscaledZ}`),function(ht,Dt){ht.initDebugOverlayCanvas();const tt=ht.debugOverlayCanvas,xt=ht.context.gl,Pt=ht.debugOverlayCanvas.getContext("2d");Pt.clearRect(0,0,tt.width,tt.height),Pt.shadowColor="white",Pt.shadowBlur=2,Pt.lineWidth=1.5,Pt.strokeStyle="white",Pt.textBaseline="top",Pt.font="bold 36px Open Sans, sans-serif",Pt.fillText(Dt,5,5),Pt.strokeText(Dt,5,5),ht.debugOverlayTexture.update(tt),ht.debugOverlayTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE)}(I,`${Ne} ${qe}kB`),R.draw(_,w.TRIANGLES,j,Y,Aa.alphaBlended,Fo.disabled,Mu(k,s.aO.transparent,He),null,de,I.debugBuffer,I.quadTriangleIndexBuffer,I.debugSegments),R.draw(_,w.LINE_STRIP,j,Y,ie,Fo.disabled,Mu(k,s.aO.red),me,de,I.debugBuffer,I.tileBorderIndexBuffer,I.debugSegments)}function Zd(I,u,m){const _=I.context,w=_.gl,k=I.colorModeForRenderPass(),R=new Gi(w.LEQUAL,Gi.ReadWrite,I.depthRangeFor3D),j=I.useProgram("terrain"),Y=u.getTerrainMesh();_.bindFramebuffer.set(null),_.viewport.set([0,0,I.width,I.height]);for(const ie of m){const de=I.renderToTexture.getTexture(ie),me=u.getTerrainData(ie.tileID);_.activeTexture.set(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,de.texture);const Oe={u_matrix:I.transform.calculatePosMatrix(ie.tileID.toUnwrapped()),u_texture:0,u_ele_delta:u.getMeshFrameDelta(I.transform.zoom)};j.draw(_,w.TRIANGLES,R,To.disabled,k,Fo.backCCW,Oe,me,"terrain",Y.vertexBuffer,Y.indexBuffer,Y.segments)}}class Pc{constructor(u,m){this.context=new ep(u),this.transform=m,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Lt.maxUnderzooming+Lt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new hr}resize(u,m,_){if(this.width=Math.floor(u*_),this.height=Math.floor(m*_),this.pixelRatio=_,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const w of this.style._order)this.style._layers[w].resize()}setup(){const u=this.context,m=new s.aV;m.emplaceBack(0,0),m.emplaceBack(s.W,0),m.emplaceBack(0,s.W),m.emplaceBack(s.W,s.W),this.tileExtentBuffer=u.createVertexBuffer(m,Ka.members),this.tileExtentSegments=s.$.simpleSegment(0,0,4,2);const _=new s.aV;_.emplaceBack(0,0),_.emplaceBack(s.W,0),_.emplaceBack(0,s.W),_.emplaceBack(s.W,s.W),this.debugBuffer=u.createVertexBuffer(_,Ka.members),this.debugSegments=s.$.simpleSegment(0,0,4,5);const w=new s.Z;w.emplaceBack(0,0,0,0),w.emplaceBack(s.W,0,s.W,0),w.emplaceBack(0,s.W,0,s.W),w.emplaceBack(s.W,s.W,s.W,s.W),this.rasterBoundsBuffer=u.createVertexBuffer(w,tr.members),this.rasterBoundsSegments=s.$.simpleSegment(0,0,4,2);const k=new s.aV;k.emplaceBack(0,0),k.emplaceBack(1,0),k.emplaceBack(0,1),k.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(k,Ka.members),this.viewportSegments=s.$.simpleSegment(0,0,4,2);const R=new s.aW;R.emplaceBack(0),R.emplaceBack(1),R.emplaceBack(3),R.emplaceBack(2),R.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(R);const j=new s.aX;j.emplaceBack(0,1,2),j.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(j);const Y=this.context.gl;this.stencilClearMode=new To({func:Y.ALWAYS,mask:0},0,255,Y.ZERO,Y.ZERO,Y.ZERO)}clearStencil(){const u=this.context,m=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const _=s.F();s.aN(_,0,this.width,this.height,0,0,1),s.J(_,_,[m.drawingBufferWidth,m.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,m.TRIANGLES,Gi.disabled,this.stencilClearMode,Aa.disabled,Fo.disabled,Gu(_),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,m){if(this.currentStencilSource===u.source||!u.isTileClipped()||!m||!m.length)return;this.currentStencilSource=u.source;const _=this.context,w=_.gl;this.nextStencilID+m.length>256&&this.clearStencil(),_.setColorMode(Aa.disabled),_.setDepthMode(Gi.disabled);const k=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const R of m){const j=this._tileClippingMaskIDs[R.key]=this.nextStencilID++,Y=this.style.map.terrain&&this.style.map.terrain.getTerrainData(R);k.draw(_,w.TRIANGLES,Gi.disabled,new To({func:w.ALWAYS,mask:0},j,255,w.KEEP,w.KEEP,w.REPLACE),Aa.disabled,Fo.disabled,Gu(R.posMatrix),Y,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,m=this.context.gl;return new To({func:m.NOTEQUAL,mask:255},u,255,m.KEEP,m.KEEP,m.REPLACE)}stencilModeForClipping(u){const m=this.context.gl;return new To({func:m.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,m.KEEP,m.KEEP,m.REPLACE)}stencilConfigForOverlap(u){const m=this.context.gl,_=u.sort((R,j)=>j.overscaledZ-R.overscaledZ),w=_[_.length-1].overscaledZ,k=_[0].overscaledZ-w+1;if(k>1){this.currentStencilSource=void 0,this.nextStencilID+k>256&&this.clearStencil();const R={};for(let j=0;j<k;j++)R[j+w]=new To({func:m.GEQUAL,mask:255},j+this.nextStencilID,255,m.KEEP,m.KEEP,m.REPLACE);return this.nextStencilID+=k,[R,_]}return[{[w]:To.disabled},_]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Aa([u.CONSTANT_COLOR,u.ONE],new s.aO(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Aa.unblended:Aa.alphaBlended}depthModeForSublayer(u,m,_){if(!this.opaquePassEnabledForLayer())return Gi.disabled;const w=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Gi(_||this.context.gl.LEQUAL,m,[w,w])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,m){this.style=u,this.options=m,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(O.now()),this.imageManager.beginFrame();const _=this.style._order,w=this.style.sourceCaches,k={},R={},j={};for(const Y in w){const ie=w[Y];ie.used&&ie.prepare(this.context),k[Y]=ie.getVisibleCoordinates(),R[Y]=k[Y].slice().reverse(),j[Y]=ie.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Y=0;Y<_.length;Y++)if(this.style._layers[_[Y]].is3D()){this.opaquePassCutoff=Y;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Y of _){const ie=this.style._layers[Y];if(!ie.hasOffscreenPass()||ie.isHidden(this.transform.zoom))continue;const de=R[ie.source];(ie.type==="custom"||de.length)&&this.renderLayer(this,w[ie.source],ie,de)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:m.showOverdrawInspector?s.aO.black:s.aO.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=m.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=_.length-1;this.currentLayer>=0;this.currentLayer--){const Y=this.style._layers[_[this.currentLayer]],ie=w[Y.source],de=k[Y.source];this._renderTileClippingMasks(Y,de),this.renderLayer(this,ie,Y,de)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<_.length;this.currentLayer++){const Y=this.style._layers[_[this.currentLayer]],ie=w[Y.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Y))continue;const de=(Y.type==="symbol"?j:R)[Y.source];this._renderTileClippingMasks(Y,k[Y.source]),this.renderLayer(this,ie,Y,de)}if(this.options.showTileBoundaries){const Y=function(ie,de){let me=null;const Oe=Object.values(ie._layers).flatMap(Ne=>Ne.source&&!Ne.isHidden(de)?[ie.sourceCaches[Ne.source]]:[]),qe=Oe.filter(Ne=>Ne.getSource().type==="vector"),Ye=Oe.filter(Ne=>Ne.getSource().type!=="vector"),He=Ne=>{(!me||me.getSource().maxzoom<Ne.getSource().maxzoom)&&(me=Ne)};return qe.forEach(Ne=>He(Ne)),me||Ye.forEach(Ne=>He(Ne)),me}(this.style,this.transform.zoom);Y&&function(ie,de,me){for(let Oe=0;Oe<me.length;Oe++)jl(ie,de,me[Oe])}(this,Y,Y.getVisibleCoordinates())}this.options.showPadding&&function(Y){const ie=Y.transform.padding;MA(Y,Y.transform.height-(ie.top||0),3,Kc),MA(Y,ie.bottom||0,3,cd),zl(Y,ie.left||0,3,Rl),zl(Y,Y.transform.width-(ie.right||0),3,Sl);const de=Y.transform.centerPoint;(function(me,Oe,qe,Ye){Bu(me,Oe-1,qe-10,2,20,Ye),Bu(me,Oe-10,qe-1,20,2,Ye)})(Y,de.x,Y.transform.height-de.y,ya)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const m=this.terrainFacilitator.matrix,_=this.transform.projMatrix;let w=this.terrainFacilitator.dirty;w||(w=u?!s.aY(m,_):!s.aZ(m,_)),w||(w=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),w&&(s.a_(m,_),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(k,R){const j=k.context,Y=j.gl,ie=Aa.unblended,de=new Gi(Y.LEQUAL,Gi.ReadWrite,[0,1]),me=R.getTerrainMesh(),Oe=R.sourceCache.getRenderableTiles(),qe=k.useProgram("terrainDepth");j.bindFramebuffer.set(R.getFramebuffer("depth").framebuffer),j.viewport.set([0,0,k.width/devicePixelRatio,k.height/devicePixelRatio]),j.clear({color:s.aO.transparent,depth:1});for(const Ye of Oe){const He=R.getTerrainData(Ye.tileID),Ne={u_matrix:k.transform.calculatePosMatrix(Ye.tileID.toUnwrapped()),u_ele_delta:R.getMeshFrameDelta(k.transform.zoom)};qe.draw(j,Y.TRIANGLES,de,To.disabled,ie,Fo.backCCW,Ne,He,"terrain",me.vertexBuffer,me.indexBuffer,me.segments)}j.bindFramebuffer.set(null),j.viewport.set([0,0,k.width,k.height])}(this,this.style.map.terrain),function(k,R){const j=k.context,Y=j.gl,ie=Aa.unblended,de=new Gi(Y.LEQUAL,Gi.ReadWrite,[0,1]),me=R.getTerrainMesh(),Oe=R.getCoordsTexture(),qe=R.sourceCache.getRenderableTiles(),Ye=k.useProgram("terrainCoords");j.bindFramebuffer.set(R.getFramebuffer("coords").framebuffer),j.viewport.set([0,0,k.width/devicePixelRatio,k.height/devicePixelRatio]),j.clear({color:s.aO.transparent,depth:1}),R.coordsIndex=[];for(const He of qe){const Ne=R.getTerrainData(He.tileID);j.activeTexture.set(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,Oe.texture);const ht={u_matrix:k.transform.calculatePosMatrix(He.tileID.toUnwrapped()),u_terrain_coords_id:(255-R.coordsIndex.length)/255,u_texture:0,u_ele_delta:R.getMeshFrameDelta(k.transform.zoom)};Ye.draw(j,Y.TRIANGLES,de,To.disabled,ie,Fo.backCCW,ht,Ne,"terrain",me.vertexBuffer,me.indexBuffer,me.segments),R.coordsIndex.push(He.tileID.key)}j.bindFramebuffer.set(null),j.viewport.set([0,0,k.width,k.height])}(this,this.style.map.terrain))}renderLayer(u,m,_,w){if(!_.isHidden(this.transform.zoom)&&(_.type==="background"||_.type==="custom"||(w||[]).length))switch(this.id=_.id,_.type){case"symbol":(function(k,R,j,Y,ie){if(k.renderPass!=="translucent")return;const de=To.disabled,me=k.colorModeForRenderPass();(j._unevaluatedLayout.hasValue("text-variable-anchor")||j._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Oe,qe,Ye,He,Ne,ht,Dt){const tt=qe.transform,xt=Ne==="map",Pt=ht==="map";for(const Ut of Oe){const Xt=He.getTile(Ut),hn=Xt.getBucket(Ye);if(!hn||!hn.text||!hn.text.segments.get().length)continue;const un=s.ag(hn.textSizeData,tt.zoom),pn=cr(Xt,1,qe.transform.zoom),qn=Pr(Ut.posMatrix,Pt,xt,qe.transform,pn),qr=Ye.layout.get("icon-text-fit")!=="none"&&hn.hasIconData();if(un){const In=Math.pow(2,tt.zoom-Xt.tileID.overscaledZ);Ul(hn,xt,Pt,Dt,tt,qn,Ut.posMatrix,In,un,qr,qe.style.map.terrain?(Cr,hi)=>qe.style.map.terrain.getElevation(Ut,Cr,hi):null)}}}(Y,k,j,R,j.layout.get("text-rotation-alignment"),j.layout.get("text-pitch-alignment"),ie),j.paint.get("icon-opacity").constantOr(1)!==0&&Wh(k,R,j,Y,!1,j.paint.get("icon-translate"),j.paint.get("icon-translate-anchor"),j.layout.get("icon-rotation-alignment"),j.layout.get("icon-pitch-alignment"),j.layout.get("icon-keep-upright"),de,me),j.paint.get("text-opacity").constantOr(1)!==0&&Wh(k,R,j,Y,!0,j.paint.get("text-translate"),j.paint.get("text-translate-anchor"),j.layout.get("text-rotation-alignment"),j.layout.get("text-pitch-alignment"),j.layout.get("text-keep-upright"),de,me),R.map.showCollisionBoxes&&(Us(k,R,j,Y,j.paint.get("text-translate"),j.paint.get("text-translate-anchor"),!0),Us(k,R,j,Y,j.paint.get("icon-translate"),j.paint.get("icon-translate-anchor"),!1))})(u,m,_,w,this.style.placement.variableOffsets);break;case"circle":(function(k,R,j,Y){if(k.renderPass!=="translucent")return;const ie=j.paint.get("circle-opacity"),de=j.paint.get("circle-stroke-width"),me=j.paint.get("circle-stroke-opacity"),Oe=!j.layout.get("circle-sort-key").isConstant();if(ie.constantOr(1)===0&&(de.constantOr(1)===0||me.constantOr(1)===0))return;const qe=k.context,Ye=qe.gl,He=k.depthModeForSublayer(0,Gi.ReadOnly),Ne=To.disabled,ht=k.colorModeForRenderPass(),Dt=[];for(let tt=0;tt<Y.length;tt++){const xt=Y[tt],Pt=R.getTile(xt),Ut=Pt.getBucket(j);if(!Ut)continue;const Xt=Ut.programConfigurations.get(j.id),hn=k.useProgram("circle",Xt),un=Ut.layoutVertexBuffer,pn=Ut.indexBuffer,qn=k.style.map.terrain&&k.style.map.terrain.getTerrainData(xt),qr={programConfiguration:Xt,program:hn,layoutVertexBuffer:un,indexBuffer:pn,uniformValues:Wu(k,xt,Pt,j),terrainData:qn};if(Oe){const In=Ut.segments.get();for(const Cr of In)Dt.push({segments:new s.$([Cr]),sortKey:Cr.sortKey,state:qr})}else Dt.push({segments:Ut.segments,sortKey:0,state:qr})}Oe&&Dt.sort((tt,xt)=>tt.sortKey-xt.sortKey);for(const tt of Dt){const{programConfiguration:xt,program:Pt,layoutVertexBuffer:Ut,indexBuffer:Xt,uniformValues:hn,terrainData:un}=tt.state;Pt.draw(qe,Ye.TRIANGLES,He,Ne,ht,Fo.disabled,hn,un,j.id,Ut,Xt,tt.segments,j.paint,k.transform.zoom,xt)}})(u,m,_,w);break;case"heatmap":(function(k,R,j,Y){if(j.paint.get("heatmap-opacity")!==0)if(k.renderPass==="offscreen"){const ie=k.context,de=ie.gl,me=To.disabled,Oe=new Aa([de.ONE,de.ONE],s.aO.transparent,[!0,!0,!0,!0]);(function(qe,Ye,He){const Ne=qe.gl;qe.activeTexture.set(Ne.TEXTURE1),qe.viewport.set([0,0,Ye.width/4,Ye.height/4]);let ht=He.heatmapFbo;if(ht)Ne.bindTexture(Ne.TEXTURE_2D,ht.colorAttachment.get()),qe.bindFramebuffer.set(ht.framebuffer);else{const Dt=Ne.createTexture();Ne.bindTexture(Ne.TEXTURE_2D,Dt),Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_WRAP_S,Ne.CLAMP_TO_EDGE),Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_WRAP_T,Ne.CLAMP_TO_EDGE),Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_MIN_FILTER,Ne.LINEAR),Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_MAG_FILTER,Ne.LINEAR),ht=He.heatmapFbo=qe.createFramebuffer(Ye.width/4,Ye.height/4,!1,!1),function(tt,xt,Pt,Ut){var Xt,hn;const un=tt.gl,pn=(Xt=tt.HALF_FLOAT)!==null&&Xt!==void 0?Xt:un.UNSIGNED_BYTE,qn=(hn=tt.RGBA16F)!==null&&hn!==void 0?hn:un.RGBA;un.texImage2D(un.TEXTURE_2D,0,qn,xt.width/4,xt.height/4,0,un.RGBA,pn,null),Ut.colorAttachment.set(Pt)}(qe,Ye,Dt,ht)}})(ie,k,j),ie.clear({color:s.aO.transparent});for(let qe=0;qe<Y.length;qe++){const Ye=Y[qe];if(R.hasRenderableParent(Ye))continue;const He=R.getTile(Ye),Ne=He.getBucket(j);if(!Ne)continue;const ht=Ne.programConfigurations.get(j.id),Dt=k.useProgram("heatmap",ht),{zoom:tt}=k.transform;Dt.draw(ie,de.TRIANGLES,Gi.disabled,me,Oe,Fo.disabled,Wo(Ye.posMatrix,He,tt,j.paint.get("heatmap-intensity")),null,j.id,Ne.layoutVertexBuffer,Ne.indexBuffer,Ne.segments,j.paint,k.transform.zoom,ht)}ie.viewport.set([0,0,k.width,k.height])}else k.renderPass==="translucent"&&(k.context.setColorMode(k.colorModeForRenderPass()),function(ie,de){const me=ie.context,Oe=me.gl,qe=de.heatmapFbo;if(!qe)return;me.activeTexture.set(Oe.TEXTURE0),Oe.bindTexture(Oe.TEXTURE_2D,qe.colorAttachment.get()),me.activeTexture.set(Oe.TEXTURE1);let Ye=de.colorRampTexture;Ye||(Ye=de.colorRampTexture=new Pe(me,de.colorRamp,Oe.RGBA)),Ye.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE),ie.useProgram("heatmapTexture").draw(me,Oe.TRIANGLES,Gi.disabled,To.disabled,ie.colorModeForRenderPass(),Fo.disabled,((He,Ne,ht,Dt)=>{const tt=s.F();s.aN(tt,0,He.width,He.height,0,0,1);const xt=He.context.gl;return{u_matrix:tt,u_world:[xt.drawingBufferWidth,xt.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:Ne.paint.get("heatmap-opacity")}})(ie,de),null,de.id,ie.viewportBuffer,ie.quadTriangleIndexBuffer,ie.viewportSegments,de.paint,ie.transform.zoom)}(k,j))})(u,m,_,w);break;case"line":(function(k,R,j,Y){if(k.renderPass!=="translucent")return;const ie=j.paint.get("line-opacity"),de=j.paint.get("line-width");if(ie.constantOr(1)===0||de.constantOr(1)===0)return;const me=k.depthModeForSublayer(0,Gi.ReadOnly),Oe=k.colorModeForRenderPass(),qe=j.paint.get("line-dasharray"),Ye=j.paint.get("line-pattern"),He=Ye.constantOr(1),Ne=j.paint.get("line-gradient"),ht=j.getCrossfadeParameters(),Dt=He?"linePattern":qe?"lineSDF":Ne?"lineGradient":"line",tt=k.context,xt=tt.gl;let Pt=!0;for(const Ut of Y){const Xt=R.getTile(Ut);if(He&&!Xt.patternsLoaded())continue;const hn=Xt.getBucket(j);if(!hn)continue;const un=hn.programConfigurations.get(j.id),pn=k.context.program.get(),qn=k.useProgram(Dt,un),qr=Pt||qn.program!==pn,In=k.style.map.terrain&&k.style.map.terrain.getTerrainData(Ut),Cr=Ye.constantOr(null);if(Cr&&Xt.imageAtlas){const Vr=Xt.imageAtlas,ei=Vr.patternPositions[Cr.to.toString()],Wr=Vr.patternPositions[Cr.from.toString()];ei&&Wr&&un.setConstantPatternPositions(ei,Wr)}const hi=In?Ut:null,Pi=He?ul(k,Xt,j,ht,hi):qe?Go(k,Xt,j,qe,ht,hi):Ne?ss(k,Xt,j,hn.lineClipsArray.length,hi):nu(k,Xt,j,hi);if(He)tt.activeTexture.set(xt.TEXTURE0),Xt.imageAtlasTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE),un.updatePaintBuffers(ht);else if(qe&&(qr||k.lineAtlas.dirty))tt.activeTexture.set(xt.TEXTURE0),k.lineAtlas.bind(tt);else if(Ne){const Vr=hn.gradients[j.id];let ei=Vr.texture;if(j.gradientVersion!==Vr.version){let Wr=256;if(j.stepInterpolant){const Ho=R.getSource().maxzoom,Uo=Ut.canonical.z===Ho?Math.ceil(1<<k.transform.maxZoom-Ut.canonical.z):1;Wr=s.ac(s.aT(hn.maxLineLength/s.W*1024*Uo),256,tt.maxTextureSize)}Vr.gradient=s.aU({expression:j.gradientExpression(),evaluationKey:"lineProgress",resolution:Wr,image:Vr.gradient||void 0,clips:hn.lineClipsArray}),Vr.texture?Vr.texture.update(Vr.gradient):Vr.texture=new Pe(tt,Vr.gradient,xt.RGBA),Vr.version=j.gradientVersion,ei=Vr.texture}tt.activeTexture.set(xt.TEXTURE0),ei.bind(j.stepInterpolant?xt.NEAREST:xt.LINEAR,xt.CLAMP_TO_EDGE)}qn.draw(tt,xt.TRIANGLES,me,k.stencilModeForClipping(Ut),Oe,Fo.disabled,Pi,In,j.id,hn.layoutVertexBuffer,hn.indexBuffer,hn.segments,j.paint,k.transform.zoom,un,hn.layoutVertexBuffer2),Pt=!1}})(u,m,_,w);break;case"fill":(function(k,R,j,Y){const ie=j.paint.get("fill-color"),de=j.paint.get("fill-opacity");if(de.constantOr(1)===0)return;const me=k.colorModeForRenderPass(),Oe=j.paint.get("fill-pattern"),qe=k.opaquePassEnabledForLayer()&&!Oe.constantOr(1)&&ie.constantOr(s.aO.transparent).a===1&&de.constantOr(0)===1?"opaque":"translucent";if(k.renderPass===qe){const Ye=k.depthModeForSublayer(1,k.renderPass==="opaque"?Gi.ReadWrite:Gi.ReadOnly);wA(k,R,j,Y,Ye,me,!1)}if(k.renderPass==="translucent"&&j.paint.get("fill-antialias")){const Ye=k.depthModeForSublayer(j.getPaintProperty("fill-outline-color")?2:0,Gi.ReadOnly);wA(k,R,j,Y,Ye,me,!0)}})(u,m,_,w);break;case"fill-extrusion":(function(k,R,j,Y){const ie=j.paint.get("fill-extrusion-opacity");if(ie!==0&&k.renderPass==="translucent"){const de=new Gi(k.context.gl.LEQUAL,Gi.ReadWrite,k.depthRangeFor3D);if(ie!==1||j.paint.get("fill-extrusion-pattern").constantOr(1))ZA(k,R,j,Y,de,To.disabled,Aa.disabled),ZA(k,R,j,Y,de,k.stencilModeFor3D(),k.colorModeForRenderPass());else{const me=k.colorModeForRenderPass();ZA(k,R,j,Y,de,To.disabled,me)}}})(u,m,_,w);break;case"hillshade":(function(k,R,j,Y){if(k.renderPass!=="offscreen"&&k.renderPass!=="translucent")return;const ie=k.context,de=k.depthModeForSublayer(0,Gi.ReadOnly),me=k.colorModeForRenderPass(),[Oe,qe]=k.renderPass==="translucent"?k.stencilConfigForOverlap(Y):[{},Y];for(const Ye of qe){const He=R.getTile(Ye);He.needsHillshadePrepare!==void 0&&He.needsHillshadePrepare&&k.renderPass==="offscreen"?tp(k,He,j,de,To.disabled,me):k.renderPass==="translucent"&&XA(k,Ye,He,j,de,Oe[Ye.overscaledZ],me)}ie.viewport.set([0,0,k.width,k.height])})(u,m,_,w);break;case"raster":(function(k,R,j,Y){if(k.renderPass!=="translucent"||j.paint.get("raster-opacity")===0||!Y.length)return;const ie=k.context,de=ie.gl,me=R.getSource(),Oe=k.useProgram("raster"),qe=k.colorModeForRenderPass(),[Ye,He]=me instanceof dr?[{},Y]:k.stencilConfigForOverlap(Y),Ne=He[He.length-1].overscaledZ,ht=!k.options.moving;for(const Dt of He){const tt=k.depthModeForSublayer(Dt.overscaledZ-Ne,j.paint.get("raster-opacity")===1?Gi.ReadWrite:Gi.ReadOnly,de.LESS),xt=R.getTile(Dt);xt.registerFadeDuration(j.paint.get("raster-fade-duration"));const Pt=R.findLoadedParent(Dt,0),Ut=tm(xt,Pt,R,j,k.transform,k.style.map.terrain);let Xt,hn;const un=j.paint.get("raster-resampling")==="nearest"?de.NEAREST:de.LINEAR;ie.activeTexture.set(de.TEXTURE0),xt.texture.bind(un,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),ie.activeTexture.set(de.TEXTURE1),Pt?(Pt.texture.bind(un,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),Xt=Math.pow(2,Pt.tileID.overscaledZ-xt.tileID.overscaledZ),hn=[xt.tileID.canonical.x*Xt%1,xt.tileID.canonical.y*Xt%1]):xt.texture.bind(un,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST);const pn=k.style.map.terrain&&k.style.map.terrain.getTerrainData(Dt),qn=pn?Dt:null,qr=qn?qn.posMatrix:k.transform.calculatePosMatrix(Dt.toUnwrapped(),ht),In=Ml(qr,hn||[0,0],Xt||1,Ut,j);me instanceof dr?Oe.draw(ie,de.TRIANGLES,tt,To.disabled,qe,Fo.disabled,In,pn,j.id,me.boundsBuffer,k.quadTriangleIndexBuffer,me.boundsSegments):Oe.draw(ie,de.TRIANGLES,tt,Ye[Dt.overscaledZ],qe,Fo.disabled,In,pn,j.id,k.rasterBoundsBuffer,k.quadTriangleIndexBuffer,k.rasterBoundsSegments)}})(u,m,_,w);break;case"background":(function(k,R,j,Y){const ie=j.paint.get("background-color"),de=j.paint.get("background-opacity");if(de===0)return;const me=k.context,Oe=me.gl,qe=k.transform,Ye=qe.tileSize,He=j.paint.get("background-pattern");if(k.isPatternMissing(He))return;const Ne=!He&&ie.a===1&&de===1&&k.opaquePassEnabledForLayer()?"opaque":"translucent";if(k.renderPass!==Ne)return;const ht=To.disabled,Dt=k.depthModeForSublayer(0,Ne==="opaque"?Gi.ReadWrite:Gi.ReadOnly),tt=k.colorModeForRenderPass(),xt=k.useProgram(He?"backgroundPattern":"background"),Pt=Y||qe.coveringTiles({tileSize:Ye,terrain:k.style.map.terrain});He&&(me.activeTexture.set(Oe.TEXTURE0),k.imageManager.bind(k.context));const Ut=j.getCrossfadeParameters();for(const Xt of Pt){const hn=Y?Xt.posMatrix:k.transform.calculatePosMatrix(Xt.toUnwrapped()),un=He?io(hn,de,k,He,{tileID:Xt,tileSize:Ye},Ut):vo(hn,de,ie),pn=k.style.map.terrain&&k.style.map.terrain.getTerrainData(Xt);xt.draw(me,Oe.TRIANGLES,Dt,ht,tt,Fo.disabled,un,pn,j.id,k.tileExtentBuffer,k.quadTriangleIndexBuffer,k.tileExtentSegments)}})(u,0,_,w);break;case"custom":(function(k,R,j){const Y=k.context,ie=j.implementation;if(k.renderPass==="offscreen"){const de=ie.prerender;de&&(k.setCustomLayerDefaults(),Y.setColorMode(k.colorModeForRenderPass()),de.call(ie,Y.gl,k.transform.customLayerMatrix()),Y.setDirty(),k.setBaseState())}else if(k.renderPass==="translucent"){k.setCustomLayerDefaults(),Y.setColorMode(k.colorModeForRenderPass()),Y.setStencilMode(To.disabled);const de=ie.renderingMode==="3d"?new Gi(k.context.gl.LEQUAL,Gi.ReadWrite,k.depthRangeFor3D):k.depthModeForSublayer(0,Gi.ReadOnly);Y.setDepthMode(de),ie.render(Y.gl,k.transform.customLayerMatrix()),Y.setDirty(),k.setBaseState(),Y.bindFramebuffer.set(null)}})(u,0,_)}}translatePosMatrix(u,m,_,w,k){if(!_[0]&&!_[1])return u;const R=k?w==="map"?this.transform.angle:0:w==="viewport"?-this.transform.angle:0;if(R){const ie=Math.sin(R),de=Math.cos(R);_=[_[0]*de-_[1]*ie,_[0]*ie+_[1]*de]}const j=[k?_[0]:cr(m,_[0],this.transform.zoom),k?_[1]:cr(m,_[1],this.transform.zoom),0],Y=new Float32Array(16);return s.H(Y,u,j),Y}saveTileTexture(u){const m=this._tileTextures[u.size[0]];m?m.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const m=this._tileTextures[u];return m&&m.length>0?m.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const m=this.imageManager.getPattern(u.from.toString()),_=this.imageManager.getPattern(u.to.toString());return!m||!_}useProgram(u,m){this.cache=this.cache||{};const _=u+(m?m.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[_]||(this.cache[_]=new xu(this.context,Wa[u],m,z[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[_]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Pe(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:m}=this.context.gl;return this.width!==u||this.height!==m}}class Iu{constructor(u,m){this.points=u,this.planes=m}static fromInvProjectionMatrix(u,m,_){const w=Math.pow(2,_),k=[[-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(j=>{const Y=1/(j=s.af([],j,u))[3]/m*w;return s.a$(j,j,[Y,Y,1/j[3],Y])}),R=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(j=>{const Y=function(Oe,qe){var Ye=qe[0],He=qe[1],Ne=qe[2],ht=Ye*Ye+He*He+Ne*Ne;return ht>0&&(ht=1/Math.sqrt(ht)),Oe[0]=qe[0]*ht,Oe[1]=qe[1]*ht,Oe[2]=qe[2]*ht,Oe}([],function(Oe,qe,Ye){var He=qe[0],Ne=qe[1],ht=qe[2],Dt=Ye[0],tt=Ye[1],xt=Ye[2];return Oe[0]=Ne*xt-ht*tt,Oe[1]=ht*Dt-He*xt,Oe[2]=He*tt-Ne*Dt,Oe}([],Ce([],k[j[0]],k[j[1]]),Ce([],k[j[2]],k[j[1]]))),ie=-((de=Y)[0]*(me=k[j[1]])[0]+de[1]*me[1]+de[2]*me[2]);var de,me;return Y.concat(ie)});return new Iu(k,R)}}class Dc{constructor(u,m){this.min=u,this.max=m,this.center=function(_,w,k){return _[0]=.5*w[0],_[1]=.5*w[1],_[2]=.5*w[2],_}([],function(_,w,k){return _[0]=w[0]+k[0],_[1]=w[1]+k[1],_[2]=w[2]+k[2],_}([],this.min,this.max))}quadrant(u){const m=[u%2==0,u<2],_=X(this.min),w=X(this.max);for(let k=0;k<m.length;k++)_[k]=m[k]?this.min[k]:this.center[k],w[k]=m[k]?this.center[k]:this.max[k];return w[2]=this.max[2],new Dc(_,w)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const m=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let _=!0;for(let w=0;w<u.planes.length;w++){const k=u.planes[w];let R=0;for(let j=0;j<m.length;j++)s.b0(k,m[j])>=0&&R++;if(R===0)return 0;R!==m.length&&(_=!1)}if(_)return 2;for(let w=0;w<3;w++){let k=Number.MAX_VALUE,R=-Number.MAX_VALUE;for(let j=0;j<u.points.length;j++){const Y=u.points[j][w]-this.min[w];k=Math.min(k,Y),R=Math.max(R,Y)}if(R<0||k>this.max[w]-this.min[w])return 0}return 1}}class dd{constructor(u=0,m=0,_=0,w=0){if(isNaN(u)||u<0||isNaN(m)||m<0||isNaN(_)||_<0||isNaN(w)||w<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=m,this.left=_,this.right=w}interpolate(u,m,_){return m.top!=null&&u.top!=null&&(this.top=s.z.number(u.top,m.top,_)),m.bottom!=null&&u.bottom!=null&&(this.bottom=s.z.number(u.bottom,m.bottom,_)),m.left!=null&&u.left!=null&&(this.left=s.z.number(u.left,m.left,_)),m.right!=null&&u.right!=null&&(this.right=s.z.number(u.right,m.right,_)),this}getCenter(u,m){const _=s.ac((this.left+u-this.right)/2,0,u),w=s.ac((this.top+m-this.bottom)/2,0,m);return new s.P(_,w)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new dd(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Xd=85.051129;class su{constructor(u,m,_,w,k){this.tileSize=512,this._renderWorldCopies=k===void 0||!!k,this._minZoom=u||0,this._maxZoom=m||22,this._minPitch=_??0,this._maxPitch=w??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new dd,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new su(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const m=-s.b1(u,-180,180)*Math.PI/180;this.angle!==m&&(this._unmodified=!1,this.angle=m,this._calcMatrices(),this.rotationMatrix=function(){var _=new s.A(4);return s.A!=Float32Array&&(_[1]=0,_[2]=0),_[0]=1,_[3]=1,_}(),function(_,w,k){var R=w[0],j=w[1],Y=w[2],ie=w[3],de=Math.sin(k),me=Math.cos(k);_[0]=R*me+Y*de,_[1]=j*me+ie*de,_[2]=R*-de+Y*me,_[3]=j*-de+ie*me}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const m=s.ac(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==m&&(this._unmodified=!1,this._pitch=m,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const m=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==m&&(this._unmodified=!1,this._zoom=m,this.tileZoom=Math.max(0,Math.floor(m)),this.scale=this.zoomScale(m),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,m,_){this._unmodified=!1,this._edgeInsets.interpolate(u,m,_),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const m=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,m)}getVisibleUnwrappedCoordinates(u){const m=[new s.b2(0,u)];if(this._renderWorldCopies){const _=this.pointCoordinate(new s.P(0,0)),w=this.pointCoordinate(new s.P(this.width,0)),k=this.pointCoordinate(new s.P(this.width,this.height)),R=this.pointCoordinate(new s.P(0,this.height)),j=Math.floor(Math.min(_.x,w.x,k.x,R.x)),Y=Math.floor(Math.max(_.x,w.x,k.x,R.x)),ie=1;for(let de=j-ie;de<=Y+ie;de++)de!==0&&m.push(new s.b2(de,u))}return m}coveringTiles(u){var m,_;let w=this.coveringZoomLevel(u);const k=w;if(u.minzoom!==void 0&&w<u.minzoom)return[];u.maxzoom!==void 0&&w>u.maxzoom&&(w=u.maxzoom);const R=this.pointCoordinate(this.getCameraPoint()),j=s.Y.fromLngLat(this.center),Y=Math.pow(2,w),ie=[Y*R.x,Y*R.y,0],de=[Y*j.x,Y*j.y,0],me=Iu.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,w);let Oe=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Oe=w);const qe=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,Ye=tt=>({aabb:new Dc([tt*Y,0,0],[(tt+1)*Y,Y,0]),zoom:0,x:0,y:0,wrap:tt,fullyVisible:!1}),He=[],Ne=[],ht=w,Dt=u.reparseOverscaled?k:w;if(this._renderWorldCopies)for(let tt=1;tt<=3;tt++)He.push(Ye(-tt)),He.push(Ye(tt));for(He.push(Ye(0));He.length>0;){const tt=He.pop(),xt=tt.x,Pt=tt.y;let Ut=tt.fullyVisible;if(!Ut){const qn=tt.aabb.intersects(me);if(qn===0)continue;Ut=qn===2}const Xt=u.terrain?ie:de,hn=tt.aabb.distanceX(Xt),un=tt.aabb.distanceY(Xt),pn=Math.max(Math.abs(hn),Math.abs(un));if(tt.zoom===ht||pn>qe+(1<<ht-tt.zoom)-2&&tt.zoom>=Oe){const qn=ht-tt.zoom,qr=ie[0]-.5-(xt<<qn),In=ie[1]-.5-(Pt<<qn);Ne.push({tileID:new s.Q(tt.zoom===ht?Dt:tt.zoom,tt.wrap,tt.zoom,xt,Pt),distanceSq:we([de[0]-.5-xt,de[1]-.5-Pt]),tileDistanceToCamera:Math.sqrt(qr*qr+In*In)})}else for(let qn=0;qn<4;qn++){const qr=(xt<<1)+qn%2,In=(Pt<<1)+(qn>>1),Cr=tt.zoom+1;let hi=tt.aabb.quadrant(qn);if(u.terrain){const Pi=new s.Q(Cr,tt.wrap,Cr,qr,In),Vr=u.terrain.getMinMaxElevation(Pi),ei=(m=Vr.minElevation)!==null&&m!==void 0?m:this.elevation,Wr=(_=Vr.maxElevation)!==null&&_!==void 0?_:this.elevation;hi=new Dc([hi.min[0],hi.min[1],ei],[hi.max[0],hi.max[1],Wr])}He.push({aabb:hi,zoom:Cr,x:qr,y:In,wrap:tt.wrap,fullyVisible:Ut})}}return Ne.sort((tt,xt)=>tt.distanceSq-xt.distanceSq).map(tt=>tt.tileID)}resize(u,m){this.width=u,this.height=m,this.pixelsToGLUnits=[2/u,-2/m],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const m=s.ac(u.lat,-85.051129,Xd);return new s.P(s.N(u.lng)*this.worldSize,s.O(m)*this.worldSize)}unproject(u){return new s.Y(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const m=this.elevation,_=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,w=this.pointLocation(this.centerPoint,u),k=u.getElevationForLngLatZoom(w,this.tileZoom);if(!(this.elevation-k))return;const R=_+m-k,j=Math.cos(this._pitch)*this.cameraToCenterDistance/R/s.b3(1,w.lat),Y=this.scaleZoom(j/this.tileSize);this._elevation=k,this._center=w,this.zoom=Y}setLocationAtPoint(u,m){const _=this.pointCoordinate(m),w=this.pointCoordinate(this.centerPoint),k=this.locationCoordinate(u),R=new s.Y(k.x-(_.x-w.x),k.y-(_.y-w.y));this.center=this.coordinateLocation(R),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,m){return m?this.coordinatePoint(this.locationCoordinate(u),m.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,m){return this.coordinateLocation(this.pointCoordinate(u,m))}locationCoordinate(u){return s.Y.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,m){if(m){const Oe=m.pointCoordinate(u);if(Oe!=null)return Oe}const _=[u.x,u.y,0,1],w=[u.x,u.y,1,1];s.af(_,_,this.pixelMatrixInverse),s.af(w,w,this.pixelMatrixInverse);const k=_[3],R=w[3],j=_[1]/k,Y=w[1]/R,ie=_[2]/k,de=w[2]/R,me=ie===de?0:(0-ie)/(de-ie);return new s.Y(s.z.number(_[0]/k,w[0]/R,me)/this.worldSize,s.z.number(j,Y,me)/this.worldSize)}coordinatePoint(u,m=0,_=this.pixelMatrix){const w=[u.x*this.worldSize,u.y*this.worldSize,m,1];return s.af(w,w,_),new s.P(w[0]/w[3],w[1]/w[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Rt().extend(this.pointLocation(new s.P(0,u))).extend(this.pointLocation(new s.P(this.width,u))).extend(this.pointLocation(new s.P(this.width,this.height))).extend(this.pointLocation(new s.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Rt([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Xd])}calculatePosMatrix(u,m=!1){const _=u.key,w=m?this._alignedPosMatrixCache:this._posMatrixCache;if(w[_])return w[_];const k=u.canonical,R=this.worldSize/this.zoomScale(k.z),j=k.x+Math.pow(2,k.z)*u.wrap,Y=s.an(new Float64Array(16));return s.H(Y,Y,[j*R,k.y*R,0]),s.J(Y,Y,[R/s.W,R/s.W,1]),s.K(Y,m?this.alignedProjMatrix:this.projMatrix,Y),w[_]=new Float32Array(Y),w[_]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,m){m=s.ac(+m,this.minZoom,this.maxZoom);const _={center:new s.M(u.lng,u.lat),zoom:m};let w=this.lngRange;if(!this._renderWorldCopies&&w===null){const tt=179.9999999999;w=[-tt,tt]}const k=this.tileSize*this.zoomScale(_.zoom);let R=0,j=k,Y=0,ie=k,de=0,me=0;const{x:Oe,y:qe}=this.size;if(this.latRange){const tt=this.latRange;R=s.O(tt[1])*k,j=s.O(tt[0])*k,j-R<qe&&(de=qe/(j-R))}w&&(Y=s.b1(s.N(w[0])*k,0,k),ie=s.b1(s.N(w[1])*k,0,k),ie<Y&&(ie+=k),ie-Y<Oe&&(me=Oe/(ie-Y)));const{x:Ye,y:He}=this.project.call({worldSize:k},u);let Ne,ht;const Dt=Math.max(me||0,de||0);if(Dt){const tt=new s.P(me?(ie+Y)/2:Ye,de?(j+R)/2:He);return _.center=this.unproject.call({worldSize:k},tt).wrap(),_.zoom+=this.scaleZoom(Dt),_}if(this.latRange){const tt=qe/2;He-tt<R&&(ht=R+tt),He+tt>j&&(ht=j-tt)}if(w){const tt=(Y+ie)/2;let xt=Ye;this._renderWorldCopies&&(xt=s.b1(Ye,tt-k/2,tt+k/2));const Pt=Oe/2;xt-Pt<Y&&(Ne=Y+Pt),xt+Pt>ie&&(Ne=ie-Pt)}if(Ne!==void 0||ht!==void 0){const tt=new s.P(Ne??Ye,ht??He);_.center=this.unproject.call({worldSize:k},tt).wrap()}return _}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:m,zoom:_}=this.getConstrained(this.center,this.zoom);this.center=m,this.zoom=_,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this.centerOffset,m=this.point.x,_=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=s.b3(1,this.center.lat)*this.worldSize;let w=s.an(new Float64Array(16));s.J(w,w,[this.width/2,-this.height/2,1]),s.H(w,w,[1,-1,0]),this.labelPlaneMatrix=w,w=s.an(new Float64Array(16)),s.J(w,w,[1,-1,1]),s.H(w,w,[-1,-1,0]),s.J(w,w,[2/this.width,2/this.height,1]),this.glCoordMatrix=w;const k=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),R=Math.min(this.elevation,this.minElevationForCurrentTile),j=k-R*this._pixelPerMeter/Math.cos(this._pitch),Y=R<0?j:k,ie=Math.PI/2+this._pitch,de=this._fov*(.5+u.y/this.height),me=Math.sin(de)*Y/Math.sin(s.ac(Math.PI-ie-de,.01,Math.PI-.01)),Oe=this.getHorizon(),qe=2*Math.atan(Oe/this.cameraToCenterDistance)*(.5+u.y/(2*Oe)),Ye=Math.sin(qe)*Y/Math.sin(s.ac(Math.PI-ie-qe,.01,Math.PI-.01)),He=Math.min(me,Ye),Ne=1.01*(Math.cos(Math.PI/2-this._pitch)*He+Y),ht=this.height/50;w=new Float64Array(16),s.b4(w,this._fov,this.width/this.height,ht,Ne),w[8]=2*-u.x/this.width,w[9]=2*u.y/this.height,s.J(w,w,[1,-1,1]),s.H(w,w,[0,0,-this.cameraToCenterDistance]),s.b5(w,w,this._pitch),s.ad(w,w,this.angle),s.H(w,w,[-m,-_,0]),this.mercatorMatrix=s.J([],w,[this.worldSize,this.worldSize,this.worldSize]),s.J(w,w,[1,1,this._pixelPerMeter]),this.pixelMatrix=s.K(new Float64Array(16),this.labelPlaneMatrix,w),s.H(w,w,[0,0,-this.elevation]),this.projMatrix=w,this.invProjMatrix=s.ar([],w),this.pixelMatrix3D=s.K(new Float64Array(16),this.labelPlaneMatrix,w);const Dt=this.width%2/2,tt=this.height%2/2,xt=Math.cos(this.angle),Pt=Math.sin(this.angle),Ut=m-Math.round(m)+xt*Dt+Pt*tt,Xt=_-Math.round(_)+xt*tt+Pt*Dt,hn=new Float64Array(w);if(s.H(hn,hn,[Ut>.5?Ut-1:Ut,Xt>.5?Xt-1:Xt,0]),this.alignedProjMatrix=hn,w=s.ar(new Float64Array(16),this.pixelMatrix),!w)throw new Error("failed to invert matrix");this.pixelMatrixInverse=w,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new s.P(0,0)),m=[u.x*this.worldSize,u.y*this.worldSize,0,1];return s.af(m,m,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.P(0,u))}getCameraQueryGeometry(u){const m=this.getCameraPoint();if(u.length===1)return[u[0],m];{let _=m.x,w=m.y,k=m.x,R=m.y;for(const j of u)_=Math.min(_,j.x),w=Math.min(w,j.y),k=Math.max(k,j.x),R=Math.max(R,j.y);return[new s.P(_,w),new s.P(k,w),new s.P(k,R),new s.P(_,R),new s.P(_,w)]}}lngLatToCameraDepth(u,m){const _=this.locationCoordinate(u),w=[_.x*this.worldSize,_.y*this.worldSize,m,1];return s.af(w,w,this.projMatrix),w[2]/w[3]}}function Et(I,u){let m,_=!1,w=null,k=null;const R=()=>{w=null,_&&(I.apply(k,m),w=setTimeout(R,u),_=!1)};return(...j)=>(_=!0,k=this,m=j,w||R(),w)}class an{constructor(u){this._getCurrentHash=()=>{const m=window.location.hash.replace("#","");if(this._hashName){let _;return m.split("&").map(w=>w.split("=")).forEach(w=>{w[0]===this._hashName&&(_=w)}),(_&&_[1]||"").split("/")}return m.split("/")},this._onHashChange=()=>{const m=this._getCurrentHash();if(m.length>=3&&!m.some(_=>isNaN(_))){const _=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(m[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+m[2],+m[1]],zoom:+m[0],bearing:_,pitch:+(m[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const m=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,m)}catch{}},this._updateHash=Et(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(u){const m=this._map.getCenter(),_=Math.round(100*this._map.getZoom())/100,w=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),k=Math.pow(10,w),R=Math.round(m.lng*k)/k,j=Math.round(m.lat*k)/k,Y=this._map.getBearing(),ie=this._map.getPitch();let de="";if(de+=u?`/${R}/${j}/${_}`:`${_}/${j}/${R}`,(Y||ie)&&(de+="/"+Math.round(10*Y)/10),ie&&(de+=`/${Math.round(ie)}`),this._hashName){const me=this._hashName;let Oe=!1;const qe=window.location.hash.slice(1).split("&").map(Ye=>{const He=Ye.split("=")[0];return He===me?(Oe=!0,`${He}=${de}`):Ye}).filter(Ye=>Ye);return Oe||qe.push(`${me}=${de}`),`#${qe.join("&")}`}return`#${de}`}}const jt={linearity:.3,easing:s.b6(0,0,.3,1)},fr=s.e({deceleration:2500,maxSpeed:1400},jt),ui=s.e({deceleration:20,maxSpeed:1400},jt),oo=s.e({deceleration:1e3,maxSpeed:360},jt),Pa=s.e({deceleration:1e3,maxSpeed:90},jt);class Ko{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:O.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,m=O.now();for(;u.length>0&&m-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const m={zoom:0,bearing:0,pitch:0,pan:new s.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:k}of this._inertiaBuffer)m.zoom+=k.zoomDelta||0,m.bearing+=k.bearingDelta||0,m.pitch+=k.pitchDelta||0,k.panDelta&&m.pan._add(k.panDelta),k.around&&(m.around=k.around),k.pinchAround&&(m.pinchAround=k.pinchAround);const _=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,w={};if(m.pan.mag()){const k=Jd(m.pan.mag(),_,s.e({},fr,u||{}));w.offset=m.pan.mult(k.amount/m.pan.mag()),w.center=this._map.transform.center,SA(w,k)}if(m.zoom){const k=Jd(m.zoom,_,ui);w.zoom=this._map.transform.zoom+k.amount,SA(w,k)}if(m.bearing){const k=Jd(m.bearing,_,oo);w.bearing=this._map.transform.bearing+s.ac(k.amount,-179,179),SA(w,k)}if(m.pitch){const k=Jd(m.pitch,_,Pa);w.pitch=this._map.transform.pitch+k.amount,SA(w,k)}if(w.zoom||w.bearing){const k=m.pinchAround===void 0?m.around:m.pinchAround;w.around=k?this._map.unproject(k):this._map.getCenter()}return this.clear(),s.e(w,{noMoveStart:!0})}}function SA(I,u){(!I.duration||I.duration<u.duration)&&(I.duration=u.duration,I.easing=u.easing)}function Jd(I,u,m){const{maxSpeed:_,linearity:w,deceleration:k}=m,R=s.ac(I*w/(u/1e3),-_,_),j=Math.abs(R)/(k*w);return{easing:m.easing,duration:1e3*j,amount:R*(j/2)}}class Po extends s.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,m,_,w={}){const k=E.mousePos(m.getCanvas(),_),R=m.unproject(k);super(u,s.e({point:k,lngLat:R,originalEvent:_},w)),this._defaultPrevented=!1,this.target=m}}class EA extends s.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,m,_){const w=u==="touchend"?_.changedTouches:_.touches,k=E.touchPos(m.getCanvasContainer(),w),R=k.map(Y=>m.unproject(Y)),j=k.reduce((Y,ie,de,me)=>Y.add(ie.div(me.length)),new s.P(0,0));super(u,{points:k,point:j,lngLats:R,lngLat:m.unproject(j),originalEvent:_}),this._defaultPrevented=!1}}class ws extends s.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,m,_){super(u,{originalEvent:_}),this._defaultPrevented=!1}}class Qa{constructor(u,m){this._map=u,this._clickTolerance=m.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new ws(u.type,this._map,u))}mousedown(u,m){return this._mousedownPos=m,this._firePreventable(new Po(u.type,this._map,u))}mouseup(u){this._map.fire(new Po(u.type,this._map,u))}click(u,m){this._mousedownPos&&this._mousedownPos.dist(m)>=this._clickTolerance||this._map.fire(new Po(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Po(u.type,this._map,u))}mouseover(u){this._map.fire(new Po(u.type,this._map,u))}mouseout(u){this._map.fire(new Po(u.type,this._map,u))}touchstart(u){return this._firePreventable(new EA(u.type,this._map,u))}touchmove(u){this._map.fire(new EA(u.type,this._map,u))}touchend(u){this._map.fire(new EA(u.type,this._map,u))}touchcancel(u){this._map.fire(new EA(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class qu{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Po(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Po("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Po(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ls{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(s.P.convert(u),this._map.terrain)}}class Hi{constructor(u,m){this._map=u,this._tr=new ls(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=m.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,m){this.isEnabled()&&u.shiftKey&&u.button===0&&(E.disableDrag(),this._startPos=this._lastPos=m,this._active=!0)}mousemoveWindow(u,m){if(!this._active)return;const _=m;if(this._lastPos.equals(_)||!this._box&&_.dist(this._startPos)<this._clickTolerance)return;const w=this._startPos;this._lastPos=_,this._box||(this._box=E.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const k=Math.min(w.x,_.x),R=Math.max(w.x,_.x),j=Math.min(w.y,_.y),Y=Math.max(w.y,_.y);E.setTransform(this._box,`translate(${k}px,${j}px)`),this._box.style.width=R-k+"px",this._box.style.height=Y-j+"px"}mouseupWindow(u,m){if(!this._active||u.button!==0)return;const _=this._startPos,w=m;if(this.reset(),E.suppressClick(),_.x!==w.x||_.y!==w.y)return this._map.fire(new s.k("boxzoomend",{originalEvent:u})),{cameraAnimation:k=>k.fitScreenCoordinates(_,w,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(E.remove(this._box),this._box=null),E.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,m){return this._map.fire(new s.k(u,{originalEvent:m}))}}function Gh(I,u){if(I.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${I.length}, points ${u.length}`);const m={};for(let _=0;_<I.length;_++)m[I[_].identifier]=u[_];return m}class $h{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,m,_){(this.centroid||_.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),_.length===this.numTouches&&(this.centroid=function(w){const k=new s.P(0,0);for(const R of w)k._add(R);return k.div(w.length)}(m),this.touches=Gh(_,m)))}touchmove(u,m,_){if(this.aborted||!this.centroid)return;const w=Gh(_,m);for(const k in this.touches){const R=w[k];(!R||R.dist(this.touches[k])>30)&&(this.aborted=!0)}}touchend(u,m,_){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),_.length===0){const w=!this.aborted&&this.centroid;if(this.reset(),w)return w}}}class lu{constructor(u){this.singleTap=new $h(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,m,_){this.singleTap.touchstart(u,m,_)}touchmove(u,m,_){this.singleTap.touchmove(u,m,_)}touchend(u,m,_){const w=this.singleTap.touchend(u,m,_);if(w){const k=u.timeStamp-this.lastTime<500,R=!this.lastTap||this.lastTap.dist(w)<30;if(k&&R||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=w,this.count===this.numTaps)return this.reset(),w}}}class JA{constructor(u){this._tr=new ls(u),this._zoomIn=new lu({numTouches:1,numTaps:2}),this._zoomOut=new lu({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,m,_){this._zoomIn.touchstart(u,m,_),this._zoomOut.touchstart(u,m,_)}touchmove(u,m,_){this._zoomIn.touchmove(u,m,_),this._zoomOut.touchmove(u,m,_)}touchend(u,m,_){const w=this._zoomIn.touchend(u,m,_),k=this._zoomOut.touchend(u,m,_),R=this._tr;return w?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:j=>j.easeTo({duration:300,zoom:R.zoom+1,around:R.unproject(w)},{originalEvent:u})}):k?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:j=>j.easeTo({duration:300,zoom:R.zoom-1,around:R.unproject(k)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class va{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const m=this._moveFunction(...u);if(m.bearingDelta||m.pitchDelta||m.around||m.panDelta)return this._active=!0,m}dragStart(u,m){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=m.length?m[0]:m,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,m){if(!this.isEnabled())return;const _=this._lastPoint;if(!_)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const w=m.length?m[0]:m;return!this._moved&&w.dist(_)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=w,this._move(_,w))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&E.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const dl={0:1,2:2};class Qn{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const m=E.mouseButton(u);this._eventButton=m}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(m,_){const w=dl[_];return m.buttons===void 0||(m.buttons&w)!==w}(u,this._eventButton)}isValidEndEvent(u){return E.mouseButton(u)===this._eventButton}}class Nl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){this._firstTouch=u.targetTouches[0].identifier}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const Vu=I=>{I.mousedown=I.dragStart,I.mousemoveWindow=I.dragMove,I.mouseup=I.dragEnd,I.contextmenu=function(u){u.preventDefault()}},ec=({enable:I,clickTolerance:u,bearingDegreesPerPixelMoved:m=.8})=>{const _=new Qn({checkCorrectEvent:w=>E.mouseButton(w)===0&&w.ctrlKey||E.mouseButton(w)===2});return new va({clickTolerance:u,move:(w,k)=>({bearingDelta:(k.x-w.x)*m}),moveStateManager:_,enable:I,assignEvents:Vu})},Hu=({enable:I,clickTolerance:u,pitchDegreesPerPixelMoved:m=-.5})=>{const _=new Qn({checkCorrectEvent:w=>E.mouseButton(w)===0&&w.ctrlKey||E.mouseButton(w)===2});return new va({clickTolerance:u,move:(w,k)=>({pitchDelta:(k.y-w.y)*m}),moveStateManager:_,enable:I,assignEvents:Vu})};class Jn{constructor(u,m){this._clickTolerance=u.clickTolerance||1,this._map=m,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(u,m,_){return this._calculateTransform(u,m,_)}touchmove(u,m,_){if(this._active&&!(_.length<this.minTouchs()))return u.preventDefault(),this._calculateTransform(u,m,_)}touchend(u,m,_){this._calculateTransform(u,m,_),this._active&&_.length<this.minTouchs()&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,m,_){_.length>0&&(this._active=!0);const w=Gh(_,m),k=new s.P(0,0),R=new s.P(0,0);let j=0;for(const ie in w){const de=w[ie],me=this._touches[ie];me&&(k._add(de),R._add(de.sub(me)),j++,w[ie]=de)}if(this._touches=w,j<this.minTouchs()||!R.mag())return;const Y=R.div(j);return this._sum._add(Y),this._sum.mag()<this._clickTolerance?void 0:{around:k.div(j),panDelta:Y}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class tc{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,m,_){this._firstTwoTouches||_.length<2||(this._firstTwoTouches=[_[0].identifier,_[1].identifier],this._start([m[0],m[1]]))}touchmove(u,m,_){if(!this._firstTwoTouches)return;u.preventDefault();const[w,k]=this._firstTwoTouches,R=Zu(_,m,w),j=Zu(_,m,k);if(!R||!j)return;const Y=this._aroundCenter?null:R.add(j).div(2);return this._move([R,j],Y,u)}touchend(u,m,_){if(!this._firstTwoTouches)return;const[w,k]=this._firstTwoTouches,R=Zu(_,m,w),j=Zu(_,m,k);R&&j||(this._active&&E.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Zu(I,u,m){for(let _=0;_<I.length;_++)if(I[_].identifier===m)return u[_]}function np(I,u){return Math.log(I/u)/Math.LN2}class Xu extends tc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,m){const _=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(np(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:np(this._distance,_),pinchAround:m}}}function Ju(I,u){return 180*I.angleWith(u)/Math.PI}class nc extends tc{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,m,_){const w=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ju(this._vector,w),pinchAround:m}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const m=25/(Math.PI*this._minDiameter)*360,_=Ju(u,this._startVector);return Math.abs(_)<m}}function eh(I){return Math.abs(I.y)>Math.abs(I.x)}class Lc extends tc{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,m,_){super.touchstart(u,m,_),this._currentTouchCount=_.length}_start(u){this._lastPoints=u,eh(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,m,_){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const w=u[0].sub(this._lastPoints[0]),k=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(w,k,_.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(w.y+k.y)/2*-.5}):void 0}gestureBeginsVertically(u,m,_){if(this._valid!==void 0)return this._valid;const w=u.mag()>=2,k=m.mag()>=2;if(!w&&!k)return;if(!w||!k)return this._firstMove===void 0&&(this._firstMove=_),_-this._firstMove<100&&void 0;const R=u.y>0==m.y>0;return eh(u)&&eh(m)&&R}}const eA={panStep:100,bearingStep:15,pitchStep:10};class Mo{constructor(u){this._tr=new ls(u);const m=eA;this._panStep=m.panStep,this._bearingStep=m.bearingStep,this._pitchStep=m.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let m=0,_=0,w=0,k=0,R=0;switch(u.keyCode){case 61:case 107:case 171:case 187:m=1;break;case 189:case 109:case 173:m=-1;break;case 37:u.shiftKey?_=-1:(u.preventDefault(),k=-1);break;case 39:u.shiftKey?_=1:(u.preventDefault(),k=1);break;case 38:u.shiftKey?w=1:(u.preventDefault(),R=-1);break;case 40:u.shiftKey?w=-1:(u.preventDefault(),R=1);break;default:return}return this._rotationDisabled&&(_=0,w=0),{cameraAnimation:j=>{const Y=this._tr;j.easeTo({duration:300,easeId:"keyboardHandler",easing:tA,zoom:m?Math.round(Y.zoom)+m*(u.shiftKey?2:1):Y.zoom,bearing:Y.bearing+_*this._bearingStep,pitch:Y.pitch+w*this._pitchStep,offset:[-k*this._panStep,-R*this._panStep],center:Y.center},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function tA(I){return I*(2-I)}const hd=4.000244140625;class rp{constructor(u,m){this._onTimeout=_=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(_)},this._map=u,this._tr=new ls(u),this._triggerRenderFrame=m,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(u){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!u[this._map.cooperativeGestures._bypassKey])return;let m=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const _=O.now(),w=_-(this._lastWheelEventTime||0);this._lastWheelEventTime=_,m!==0&&m%hd==0?this._type="wheel":m!==0&&Math.abs(m)<4?this._type="trackpad":w>400?(this._type=null,this._lastValue=m,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(w*m)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,m+=this._lastValue)),u.shiftKey&&m&&(m/=4),this._type&&(this._lastWheelEvent=u,this._delta-=m,this._active||this._start(u)),u.preventDefault()}_start(u){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const m=E.mousePos(this._map.getCanvas(),u),_=this._tr;this._around=m.y>_.transform.height/2-_.transform.getHorizon()?s.M.convert(this._aroundCenter?_.center:_.unproject(m)):s.M.convert(_.center),this._aroundPoint=_.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const j=this._type==="wheel"&&Math.abs(this._delta)>hd?this._wheelZoomRate:this._defaultZoomRate;let Y=2/(1+Math.exp(-Math.abs(this._delta*j)));this._delta<0&&Y!==0&&(Y=1/Y);const ie=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(ie*Y))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const m=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,_=this._startZoom,w=this._easing;let k,R=!1;if(this._type==="wheel"&&_&&w){const j=Math.min((O.now()-this._lastWheelEventTime)/200,1),Y=w(j);k=s.z.number(_,m,Y),j<1?this._frameId||(this._frameId=!0):R=!0}else k=m,R=!0;return this._active=!0,R&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!R,zoomDelta:k-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let m=s.b7;if(this._prevEase){const _=this._prevEase,w=(O.now()-_.start)/_.duration,k=_.easing(w+.01)-_.easing(w),R=.27/Math.sqrt(k*k+1e-4)*.01,j=Math.sqrt(.0729-R*R);m=s.b6(R,j,.25,1)}return this._prevEase={start:O.now(),duration:u,easing:m},m}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Qh{constructor(u,m){this._clickZoom=u,this._tapZoom=m}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Yh{constructor(u){this._tr=new ls(u),this.reset()}reset(){this._active=!1}dblclick(u,m){return u.preventDefault(),{cameraAnimation:_=>{_.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(m)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ip{constructor(){this._tap=new lu({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,m,_){if(!this._swipePoint)if(this._tapTime){const w=m[0],k=u.timeStamp-this._tapTime<500,R=this._tapPoint.dist(w)<30;k&&R?_.length>0&&(this._swipePoint=w,this._swipeTouch=_[0].identifier):this.reset()}else this._tap.touchstart(u,m,_)}touchmove(u,m,_){if(this._tapTime){if(this._swipePoint){if(_[0].identifier!==this._swipeTouch)return;const w=m[0],k=w.y-this._swipePoint.y;return this._swipePoint=w,u.preventDefault(),this._active=!0,{zoomDelta:k/128}}}else this._tap.touchmove(u,m,_)}touchend(u,m,_){if(this._tapTime)this._swipePoint&&_.length===0&&this.reset();else{const w=this._tap.touchend(u,m,_);w&&(this._tapTime=u.timeStamp,this._tapPoint=w)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ao{constructor(u,m,_){this._el=u,this._mousePan=m,this._touchPan=_}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ca{constructor(u,m,_){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=m,this._mousePitch=_}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class xr{constructor(u,m,_,w){this._el=u,this._touchZoom=m,this._touchRotate=_,this._tapDragZoom=w,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Ir{constructor(u,m){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=m,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=E.create("div","maplibregl-cooperative-gesture-screen",u);let m=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(m=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const _=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),w=document.createElement("div");w.className="maplibregl-desktop-message",w.textContent=m,this._container.appendChild(w);const k=document.createElement("div");k.className="maplibregl-mobile-message",k.textContent=_,this._container.appendChild(k),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(E.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destoryUI()}isEnabled(){return this._enabled}touchmove(u){this._onCooperativeGesture(u.touches.length===1)}wheel(u){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!u[this._bypassKey])}_onCooperativeGesture(u){this._enabled&&u&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const OA=I=>I.zoom||I.drag||I.pitch||I.rotate;class Fc extends s.k{}function rc(I){return I.panDelta&&I.panDelta.mag()||I.zoomDelta||I.bearingDelta||I.pitchDelta}class da{constructor(u,m){this.handleWindowEvent=w=>{this.handleEvent(w,`${w.type}Window`)},this.handleEvent=(w,k)=>{if(w.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const R=w.type==="renderFrame"?void 0:w,j={needsRenderFrame:!1},Y={},ie={},de=w.touches,me=de?this._getMapTouches(de):void 0,Oe=me?E.touchPos(this._map.getCanvas(),me):E.mousePos(this._map.getCanvas(),w);for(const{handlerName:He,handler:Ne,allowed:ht}of this._handlers){if(!Ne.isEnabled())continue;let Dt;this._blockedByActive(ie,ht,He)?Ne.reset():Ne[k||w.type]&&(Dt=Ne[k||w.type](w,Oe,me),this.mergeHandlerResult(j,Y,Dt,He,R),Dt&&Dt.needsRenderFrame&&this._triggerRenderFrame()),(Dt||Ne.isActive())&&(ie[He]=Ne)}const qe={};for(const He in this._previousActiveHandlers)ie[He]||(qe[He]=R);this._previousActiveHandlers=ie,(Object.keys(qe).length||rc(j))&&(this._changes.push([j,Y,qe]),this._triggerRenderFrame()),(Object.keys(ie).length||rc(j))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:Ye}=j;Ye&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ye(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ko(u),this._bearingSnap=m.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(m);const _=this._el;this._listeners=[[_,"touchstart",{passive:!0}],[_,"touchmove",{passive:!1}],[_,"touchend",void 0],[_,"touchcancel",void 0],[_,"mousedown",void 0],[_,"mousemove",void 0],[_,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[_,"mouseover",void 0],[_,"mouseout",void 0],[_,"dblclick",void 0],[_,"click",void 0],[_,"keydown",{capture:!1}],[_,"keyup",void 0],[_,"wheel",{passive:!1}],[_,"contextmenu",void 0],[window,"blur",void 0]];for(const[w,k,R]of this._listeners)E.addEventListener(w,k,w===document?this.handleWindowEvent:this.handleEvent,R)}destroy(){for(const[u,m,_]of this._listeners)E.removeEventListener(u,m,u===document?this.handleWindowEvent:this.handleEvent,_)}_addDefaultHandlers(u){const m=this._map,_=m.getCanvasContainer();this._add("mapEvent",new Qa(m,u));const w=m.boxZoom=new Hi(m,u);this._add("boxZoom",w),u.interactive&&u.boxZoom&&w.enable();const k=m.cooperativeGestures=new Ir(m,u.cooperativeGestures);this._add("cooperativeGestures",k),u.cooperativeGestures&&k.enable();const R=new JA(m),j=new Yh(m);m.doubleClickZoom=new Qh(j,R),this._add("tapZoom",R),this._add("clickZoom",j),u.interactive&&u.doubleClickZoom&&m.doubleClickZoom.enable();const Y=new ip;this._add("tapDragZoom",Y);const ie=m.touchPitch=new Lc(m);this._add("touchPitch",ie),u.interactive&&u.touchPitch&&m.touchPitch.enable(u.touchPitch);const de=ec(u),me=Hu(u);m.dragRotate=new ca(u,de,me),this._add("mouseRotate",de,["mousePitch"]),this._add("mousePitch",me,["mouseRotate"]),u.interactive&&u.dragRotate&&m.dragRotate.enable();const Oe=(({enable:Dt,clickTolerance:tt})=>{const xt=new Qn({checkCorrectEvent:Pt=>E.mouseButton(Pt)===0&&!Pt.ctrlKey});return new va({clickTolerance:tt,move:(Pt,Ut)=>({around:Ut,panDelta:Ut.sub(Pt)}),activateOnStart:!0,moveStateManager:xt,enable:Dt,assignEvents:Vu})})(u),qe=new Jn(u,m);m.dragPan=new ao(_,Oe,qe),this._add("mousePan",Oe),this._add("touchPan",qe,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&m.dragPan.enable(u.dragPan);const Ye=new nc,He=new Xu;m.touchZoomRotate=new xr(_,He,Ye,Y),this._add("touchRotate",Ye,["touchPan","touchZoom"]),this._add("touchZoom",He,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&m.touchZoomRotate.enable(u.touchZoomRotate);const Ne=m.scrollZoom=new rp(m,()=>this._triggerRenderFrame());this._add("scrollZoom",Ne,["mousePan"]),u.interactive&&u.scrollZoom&&m.scrollZoom.enable(u.scrollZoom);const ht=m.keyboard=new Mo(m);this._add("keyboard",ht),u.interactive&&u.keyboard&&m.keyboard.enable(),this._add("blockableMapEvent",new qu(m))}_add(u,m,_){this._handlers.push({handlerName:u,handler:m,allowed:_}),this._handlersById[u]=m}stop(u){if(!this._updatingCamera){for(const{handler:m}of this._handlers)m.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!OA(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,m,_){for(const w in u)if(w!==_&&(!m||m.indexOf(w)<0))return!0;return!1}_getMapTouches(u){const m=[];for(const _ of u)this._el.contains(_.target)&&m.push(_);return m}mergeHandlerResult(u,m,_,w,k){if(!_)return;s.e(u,_);const R={handlerName:w,originalEvent:_.originalEvent||k};_.zoomDelta!==void 0&&(m.zoom=R),_.panDelta!==void 0&&(m.drag=R),_.pitchDelta!==void 0&&(m.pitch=R),_.bearingDelta!==void 0&&(m.rotate=R)}_applyChanges(){const u={},m={},_={};for(const[w,k,R]of this._changes)w.panDelta&&(u.panDelta=(u.panDelta||new s.P(0,0))._add(w.panDelta)),w.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+w.zoomDelta),w.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+w.bearingDelta),w.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+w.pitchDelta),w.around!==void 0&&(u.around=w.around),w.pinchAround!==void 0&&(u.pinchAround=w.pinchAround),w.noInertia&&(u.noInertia=w.noInertia),s.e(m,k),s.e(_,R);this._updateMapTransform(u,m,_),this._changes=[]}_updateMapTransform(u,m,_){const w=this._map,k=w._getTransformForUpdate(),R=w.terrain;if(!(rc(u)||R&&this._terrainMovement))return this._fireEvents(m,_,!0);let{panDelta:j,zoomDelta:Y,bearingDelta:ie,pitchDelta:de,around:me,pinchAround:Oe}=u;Oe!==void 0&&(me=Oe),w._stop(!0),me=me||w.transform.centerPoint;const qe=k.pointLocation(j?me.sub(j):me);ie&&(k.bearing+=ie),de&&(k.pitch+=de),Y&&(k.zoom+=Y),R?this._terrainMovement||!m.drag&&!m.zoom?m.drag&&this._terrainMovement?k.center=k.pointLocation(k.centerPoint.sub(j)):k.setLocationAtPoint(qe,me):(this._terrainMovement=!0,this._map._elevationFreeze=!0,k.setLocationAtPoint(qe,me),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,k.recalculateZoom(w.terrain)})):k.setLocationAtPoint(qe,me),w._applyUpdatedTransform(k),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(m,_,!0)}_fireEvents(u,m,_){const w=OA(this._eventsInProgress),k=OA(u),R={};for(const de in u){const{originalEvent:me}=u[de];this._eventsInProgress[de]||(R[`${de}start`]=me),this._eventsInProgress[de]=u[de]}!w&&k&&this._fireEvent("movestart",k.originalEvent);for(const de in R)this._fireEvent(de,R[de]);k&&this._fireEvent("move",k.originalEvent);for(const de in u){const{originalEvent:me}=u[de];this._fireEvent(de,me)}const j={};let Y;for(const de in this._eventsInProgress){const{handlerName:me,originalEvent:Oe}=this._eventsInProgress[de];this._handlersById[me].isActive()||(delete this._eventsInProgress[de],Y=m[me]||Oe,j[`${de}end`]=Y)}for(const de in j)this._fireEvent(de,j[de]);const ie=OA(this._eventsInProgress);if(_&&(w||k)&&!ie){this._updatingCamera=!0;const de=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),me=Oe=>Oe!==0&&-this._bearingSnap<Oe&&Oe<this._bearingSnap;!de||!de.essential&&O.prefersReducedMotion?(this._map.fire(new s.k("moveend",{originalEvent:Y})),me(this._map.getBearing())&&this._map.resetNorth()):(me(de.bearing||this._map.getBearing())&&(de.bearing=0),de.freezeElevation=!0,this._map.easeTo(de,{originalEvent:Y})),this._updatingCamera=!1}}_fireEvent(u,m){this._map.fire(new s.k(u,m?{originalEvent:m}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new Fc("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ic extends s.E{constructor(u,m){super(),this._renderFrameCallback=()=>{const _=Math.min((O.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(_)),_<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=m.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new s.M(this.transform.center.lng,this.transform.center.lat)}setCenter(u,m){return this.jumpTo({center:u},m)}panBy(u,m,_){return u=s.P.convert(u).mult(-1),this.panTo(this.transform.center,s.e({offset:u},m),_)}panTo(u,m,_){return this.easeTo(s.e({center:u},m),_)}getZoom(){return this.transform.zoom}setZoom(u,m){return this.jumpTo({zoom:u},m),this}zoomTo(u,m,_){return this.easeTo(s.e({zoom:u},m),_)}zoomIn(u,m){return this.zoomTo(this.getZoom()+1,u,m),this}zoomOut(u,m){return this.zoomTo(this.getZoom()-1,u,m),this}getBearing(){return this.transform.bearing}setBearing(u,m){return this.jumpTo({bearing:u},m),this}getPadding(){return this.transform.padding}setPadding(u,m){return this.jumpTo({padding:u},m),this}rotateTo(u,m,_){return this.easeTo(s.e({bearing:u},m),_)}resetNorth(u,m){return this.rotateTo(0,s.e({duration:1e3},u),m),this}resetNorthPitch(u,m){return this.easeTo(s.e({bearing:0,pitch:0,duration:1e3},u),m),this}snapToNorth(u,m){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,m):this}getPitch(){return this.transform.pitch}setPitch(u,m){return this.jumpTo({pitch:u},m),this}cameraForBounds(u,m){u=Rt.convert(u);const _=m&&m.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),_,m)}_cameraForBoxAndBearing(u,m,_,w){const k={top:0,bottom:0,right:0,left:0};if(typeof(w=s.e({padding:k,offset:[0,0],maxZoom:this.transform.maxZoom},w)).padding=="number"){const qn=w.padding;w.padding={top:qn,bottom:qn,right:qn,left:qn}}w.padding=s.e(k,w.padding);const R=this.transform,j=R.padding,Y=new Rt(u,m),ie=R.project(Y.getNorthWest()),de=R.project(Y.getNorthEast()),me=R.project(Y.getSouthEast()),Oe=R.project(Y.getSouthWest()),qe=s.b8(-_),Ye=ie.rotate(qe),He=de.rotate(qe),Ne=me.rotate(qe),ht=Oe.rotate(qe),Dt=new s.P(Math.max(Ye.x,He.x,ht.x,Ne.x),Math.max(Ye.y,He.y,ht.y,Ne.y)),tt=new s.P(Math.min(Ye.x,He.x,ht.x,Ne.x),Math.min(Ye.y,He.y,ht.y,Ne.y)),xt=Dt.sub(tt),Pt=(R.width-(j.left+j.right+w.padding.left+w.padding.right))/xt.x,Ut=(R.height-(j.top+j.bottom+w.padding.top+w.padding.bottom))/xt.y;if(Ut<0||Pt<0)return void s.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const Xt=Math.min(R.scaleZoom(R.scale*Math.min(Pt,Ut)),w.maxZoom),hn=s.P.convert(w.offset),un=new s.P((w.padding.left-w.padding.right)/2,(w.padding.top-w.padding.bottom)/2).rotate(s.b8(_)),pn=hn.add(un).mult(R.scale/R.zoomScale(Xt));return{center:R.unproject(ie.add(me).div(2).sub(pn)),zoom:Xt,bearing:_}}fitBounds(u,m,_){return this._fitInternal(this.cameraForBounds(u,m),m,_)}fitScreenCoordinates(u,m,_,w,k){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(s.P.convert(u)),this.transform.pointLocation(s.P.convert(m)),_,w),w,k)}_fitInternal(u,m,_){return u?(delete(m=s.e(u,m)).padding,m.linear?this.easeTo(m,_):this.flyTo(m,_)):this}jumpTo(u,m){this.stop();const _=this._getTransformForUpdate();let w=!1,k=!1,R=!1;return"zoom"in u&&_.zoom!==+u.zoom&&(w=!0,_.zoom=+u.zoom),u.center!==void 0&&(_.center=s.M.convert(u.center)),"bearing"in u&&_.bearing!==+u.bearing&&(k=!0,_.bearing=+u.bearing),"pitch"in u&&_.pitch!==+u.pitch&&(R=!0,_.pitch=+u.pitch),u.padding==null||_.isPaddingEqual(u.padding)||(_.padding=u.padding),this._applyUpdatedTransform(_),this.fire(new s.k("movestart",m)).fire(new s.k("move",m)),w&&this.fire(new s.k("zoomstart",m)).fire(new s.k("zoom",m)).fire(new s.k("zoomend",m)),k&&this.fire(new s.k("rotatestart",m)).fire(new s.k("rotate",m)).fire(new s.k("rotateend",m)),R&&this.fire(new s.k("pitchstart",m)).fire(new s.k("pitch",m)).fire(new s.k("pitchend",m)),this.fire(new s.k("moveend",m))}calculateCameraOptionsFromTo(u,m,_,w=0){const k=s.Y.fromLngLat(u,m),R=s.Y.fromLngLat(_,w),j=R.x-k.x,Y=R.y-k.y,ie=R.z-k.z,de=Math.hypot(j,Y,ie);if(de===0)throw new Error("Can't calculate camera options with same From and To");const me=Math.hypot(j,Y),Oe=this.transform.scaleZoom(this.transform.cameraToCenterDistance/de/this.transform.tileSize),qe=180*Math.atan2(j,-Y)/Math.PI;let Ye=180*Math.acos(me/de)/Math.PI;return Ye=ie<0?90-Ye:90+Ye,{center:R.toLngLat(),zoom:Oe,pitch:Ye,bearing:qe}}easeTo(u,m){var _;this._stop(!1,u.easeId),((u=s.e({offset:[0,0],duration:500,easing:s.b7},u)).animate===!1||!u.essential&&O.prefersReducedMotion)&&(u.duration=0);const w=this._getTransformForUpdate(),k=this.getZoom(),R=this.getBearing(),j=this.getPitch(),Y=this.getPadding(),ie="bearing"in u?this._normalizeBearing(u.bearing,R):R,de="pitch"in u?+u.pitch:j,me="padding"in u?u.padding:w.padding,Oe=s.P.convert(u.offset);let qe=w.centerPoint.add(Oe);const Ye=w.pointLocation(qe),{center:He,zoom:Ne}=w.getConstrained(s.M.convert(u.center||Ye),(_=u.zoom)!==null&&_!==void 0?_:k);this._normalizeCenter(He);const ht=w.project(Ye),Dt=w.project(He).sub(ht),tt=w.zoomScale(Ne-k);let xt,Pt;u.around&&(xt=s.M.convert(u.around),Pt=w.locationPoint(xt));const Ut={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Ne!==k,this._rotating=this._rotating||R!==ie,this._pitching=this._pitching||de!==j,this._padding=!w.isPaddingEqual(me),this._easeId=u.easeId,this._prepareEase(m,u.noMoveStart,Ut),this.terrain&&this._prepareElevation(He),this._ease(Xt=>{if(this._zooming&&(w.zoom=s.z.number(k,Ne,Xt)),this._rotating&&(w.bearing=s.z.number(R,ie,Xt)),this._pitching&&(w.pitch=s.z.number(j,de,Xt)),this._padding&&(w.interpolatePadding(Y,me,Xt),qe=w.centerPoint.add(Oe)),this.terrain&&!u.freezeElevation&&this._updateElevation(Xt),xt)w.setLocationAtPoint(xt,Pt);else{const hn=w.zoomScale(w.zoom-k),un=Ne>k?Math.min(2,tt):Math.max(.5,tt),pn=Math.pow(un,1-Xt),qn=w.unproject(ht.add(Dt.mult(Xt*pn)).mult(hn));w.setLocationAtPoint(w.renderWorldCopies?qn.wrap():qn,qe)}this._applyUpdatedTransform(w),this._fireMoveEvents(m)},Xt=>{this.terrain&&this._finalizeElevation(),this._afterEase(m,Xt)},u),this}_prepareEase(u,m,_={}){this._moving=!0,m||_.moving||this.fire(new s.k("movestart",u)),this._zooming&&!_.zooming&&this.fire(new s.k("zoomstart",u)),this._rotating&&!_.rotating&&this.fire(new s.k("rotatestart",u)),this._pitching&&!_.pitching&&this.fire(new s.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const m=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&m!==this._elevationTarget){const _=this._elevationTarget-this._elevationStart;this._elevationStart+=u*(_-(m-(_*u+this._elevationStart))/(1-u)),this._elevationTarget=m}this.transform.elevation=s.z.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(u){if(!this.transformCameraUpdate)return;const m=u.clone(),{center:_,zoom:w,pitch:k,bearing:R,elevation:j}=this.transformCameraUpdate(m);_&&(m.center=_),w!==void 0&&(m.zoom=w),k!==void 0&&(m.pitch=k),R!==void 0&&(m.bearing=R),j!==void 0&&(m.elevation=j),this.transform.apply(m)}_fireMoveEvents(u){this.fire(new s.k("move",u)),this._zooming&&this.fire(new s.k("zoom",u)),this._rotating&&this.fire(new s.k("rotate",u)),this._pitching&&this.fire(new s.k("pitch",u))}_afterEase(u,m){if(this._easeId&&m&&this._easeId===m)return;delete this._easeId;const _=this._zooming,w=this._rotating,k=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_&&this.fire(new s.k("zoomend",u)),w&&this.fire(new s.k("rotateend",u)),k&&this.fire(new s.k("pitchend",u)),this.fire(new s.k("moveend",u))}flyTo(u,m){var _;if(!u.essential&&O.prefersReducedMotion){const Pi=s.L(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Pi,m)}this.stop(),u=s.e({offset:[0,0],speed:1.2,curve:1.42,easing:s.b7},u);const w=this._getTransformForUpdate(),k=this.getZoom(),R=this.getBearing(),j=this.getPitch(),Y=this.getPadding(),ie="bearing"in u?this._normalizeBearing(u.bearing,R):R,de="pitch"in u?+u.pitch:j,me="padding"in u?u.padding:w.padding,Oe=s.P.convert(u.offset);let qe=w.centerPoint.add(Oe);const Ye=w.pointLocation(qe),{center:He,zoom:Ne}=w.getConstrained(s.M.convert(u.center||Ye),(_=u.zoom)!==null&&_!==void 0?_:k);this._normalizeCenter(He);const ht=w.zoomScale(Ne-k),Dt=w.project(Ye),tt=w.project(He).sub(Dt);let xt=u.curve;const Pt=Math.max(w.width,w.height),Ut=Pt/ht,Xt=tt.mag();if("minZoom"in u){const Pi=s.ac(Math.min(u.minZoom,k,Ne),w.minZoom,w.maxZoom),Vr=Pt/w.zoomScale(Pi-k);xt=Math.sqrt(Vr/Xt*2)}const hn=xt*xt;function un(Pi){const Vr=(Ut*Ut-Pt*Pt+(Pi?-1:1)*hn*hn*Xt*Xt)/(2*(Pi?Ut:Pt)*hn*Xt);return Math.log(Math.sqrt(Vr*Vr+1)-Vr)}function pn(Pi){return(Math.exp(Pi)-Math.exp(-Pi))/2}function qn(Pi){return(Math.exp(Pi)+Math.exp(-Pi))/2}const qr=un(!1);let In=function(Pi){return qn(qr)/qn(qr+xt*Pi)},Cr=function(Pi){return Pt*((qn(qr)*(pn(Vr=qr+xt*Pi)/qn(Vr))-pn(qr))/hn)/Xt;var Vr},hi=(un(!0)-qr)/xt;if(Math.abs(Xt)<1e-6||!isFinite(hi)){if(Math.abs(Pt-Ut)<1e-6)return this.easeTo(u,m);const Pi=Ut<Pt?-1:1;hi=Math.abs(Math.log(Ut/Pt))/xt,Cr=function(){return 0},In=function(Vr){return Math.exp(Pi*xt*Vr)}}return u.duration="duration"in u?+u.duration:1e3*hi/("screenSpeed"in u?+u.screenSpeed/xt:+u.speed),u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=R!==ie,this._pitching=de!==j,this._padding=!w.isPaddingEqual(me),this._prepareEase(m,!1),this.terrain&&this._prepareElevation(He),this._ease(Pi=>{const Vr=Pi*hi,ei=1/In(Vr);w.zoom=Pi===1?Ne:k+w.scaleZoom(ei),this._rotating&&(w.bearing=s.z.number(R,ie,Pi)),this._pitching&&(w.pitch=s.z.number(j,de,Pi)),this._padding&&(w.interpolatePadding(Y,me,Pi),qe=w.centerPoint.add(Oe)),this.terrain&&!u.freezeElevation&&this._updateElevation(Pi);const Wr=Pi===1?He:w.unproject(Dt.add(tt.mult(Cr(Vr))).mult(ei));w.setLocationAtPoint(w.renderWorldCopies?Wr.wrap():Wr,qe),this._applyUpdatedTransform(w),this._fireMoveEvents(m)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(m)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,m){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const _=this._onEaseEnd;delete this._onEaseEnd,_.call(this,m)}if(!u){const _=this.handlers;_&&_.stop(!1)}return this}_ease(u,m,_){_.animate===!1||_.duration===0?(u(1),m()):(this._easeStart=O.now(),this._easeOptions=_,this._onEaseFrame=u,this._onEaseEnd=m,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,m){u=s.b1(u,-180,180);const _=Math.abs(u-m);return Math.abs(u-360-m)<_&&(u-=360),Math.abs(u+360-m)<_&&(u+=360),u}_normalizeCenter(u){const m=this.transform;if(!m.renderWorldCopies||m.lngRange)return;const _=u.lng-m.center.lng;u.lng+=_>180?-360:_<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(s.M.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const ka={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class nA{constructor(u=ka){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=m=>{!m||m.sourceDataType!=="metadata"&&m.sourceDataType!=="visibility"&&m.dataType!=="style"&&m.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=E.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=E.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=E.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){E.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,m){const _=this._map._getUIString(`AttributionControl.${m}`);u.title=_,u.setAttribute("aria-label",_)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(w=>typeof w!="string"?"":w)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const w=this._map.style.stylesheet;this.styleOwner=w.owner,this.styleId=w.id}const m=this._map.style.sourceCaches;for(const w in m){const k=m[w];if(k.used||k.usedForTerrain){const R=k.getSource();R.attribution&&u.indexOf(R.attribution)<0&&u.push(R.attribution)}}u=u.filter(w=>String(w).trim()),u.sort((w,k)=>w.length-k.length),u=u.filter((w,k)=>{for(let R=k+1;R<u.length;R++)if(u[R].indexOf(w)>=0)return!1;return!0});const _=u.join(" | ");_!==this._attribHTML&&(this._attribHTML=_,u.length?(this._innerContainer.innerHTML=_,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class hl{constructor(u={}){this._updateCompact=()=>{const m=this._container.children;if(m.length){const _=m[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&_.classList.add("maplibregl-compact"):_.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=E.create("div","maplibregl-ctrl");const m=E.create("a","maplibregl-ctrl-logo");return m.target="_blank",m.rel="noopener nofollow",m.href="https://maplibre.org/",m.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),m.setAttribute("rel","noopener nofollow"),this._container.appendChild(m),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){E.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class $o{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const m=++this._id;return this._queue.push({callback:u,id:m,cancelled:!1}),m}remove(u){const m=this._currentlyRunning,_=m?this._queue.concat(m):this._queue;for(const w of _)if(w.id===u)return void(w.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const m=this._currentlyRunning=this._queue;this._queue=[];for(const _ of m)if(!_.cancelled&&(_.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Qo=s.X([{name:"a_pos3d",type:"Int16",components:3}]);class op extends s.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,m){this.sourceCache.update(u,m),this._renderableTilesKeys=[];const _={};for(const w of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:m}))_[w.key]=!0,this._renderableTilesKeys.push(w.key),this._tiles[w.key]||(w.posMatrix=new Float64Array(16),s.aN(w.posMatrix,0,s.W,0,s.W,0,1),this._tiles[w.key]=new At(w,this.tileSize));for(const w in this._tiles)_[w]||delete this._tiles[w]}freeRtt(u){for(const m in this._tiles){const _=this._tiles[m];(!u||_.tileID.equals(u)||_.tileID.isChildOf(u)||u.isChildOf(_.tileID))&&(_.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const m={};for(const _ of this._renderableTilesKeys){const w=this._tiles[_].tileID;if(w.canonical.equals(u.canonical)){const k=u.clone();k.posMatrix=new Float64Array(16),s.aN(k.posMatrix,0,s.W,0,s.W,0,1),m[_]=k}else if(w.canonical.isChildOf(u.canonical)){const k=u.clone();k.posMatrix=new Float64Array(16);const R=w.canonical.z-u.canonical.z,j=w.canonical.x-(w.canonical.x>>R<<R),Y=w.canonical.y-(w.canonical.y>>R<<R),ie=s.W>>R;s.aN(k.posMatrix,0,ie,0,ie,0,1),s.H(k.posMatrix,k.posMatrix,[-j*ie,-Y*ie,0]),m[_]=k}else if(u.canonical.isChildOf(w.canonical)){const k=u.clone();k.posMatrix=new Float64Array(16);const R=u.canonical.z-w.canonical.z,j=u.canonical.x-(u.canonical.x>>R<<R),Y=u.canonical.y-(u.canonical.y>>R<<R),ie=s.W>>R;s.aN(k.posMatrix,0,s.W,0,s.W,0,1),s.H(k.posMatrix,k.posMatrix,[j*ie,Y*ie,0]),s.J(k.posMatrix,k.posMatrix,[1/2**R,1/2**R,0]),m[_]=k}}return m}getSourceTile(u,m){const _=this.sourceCache._source;let w=u.overscaledZ-this.deltaZoom;if(w>_.maxzoom&&(w=_.maxzoom),w<_.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(w).key);let k=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!k||!k.dem)&&m)for(;w>=_.minzoom&&(!k||!k.dem);)k=this.sourceCache.getTileByID(u.scaledTo(w--).key);return k}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(m=>m.timeAdded>=u)}}class th{constructor(u,m,_){this.painter=u,this.sourceCache=new op(m),this.options=_,this.exaggeration=typeof _.exaggeration=="number"?_.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,m,_,w=s.W){var k;if(!(m>=0&&m<w&&_>=0&&_<w))return 0;const R=this.getTerrainData(u),j=(k=R.tile)===null||k===void 0?void 0:k.dem;if(!j)return 0;const Y=function(Ye,He,Ne){var ht=He[0],Dt=He[1];return Ye[0]=Ne[0]*ht+Ne[4]*Dt+Ne[12],Ye[1]=Ne[1]*ht+Ne[5]*Dt+Ne[13],Ye}([],[m/w*s.W,_/w*s.W],R.u_terrain_matrix),ie=[Y[0]*j.dim,Y[1]*j.dim],de=Math.floor(ie[0]),me=Math.floor(ie[1]),Oe=ie[0]-de,qe=ie[1]-me;return j.get(de,me)*(1-Oe)*(1-qe)+j.get(de+1,me)*Oe*(1-qe)+j.get(de,me+1)*(1-Oe)*qe+j.get(de+1,me+1)*Oe*qe}getElevationForLngLatZoom(u,m){const{tileID:_,mercatorX:w,mercatorY:k}=this._getOverscaledTileIDFromLngLatZoom(u,m);return this.getElevation(_,w%s.W,k%s.W,s.W)}getElevation(u,m,_,w=s.W){return this.getDEMElevation(u,m,_,w)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const w=this.painter.context,k=new s.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new Pe(w,k,w.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new Pe(w,new s.R({width:1,height:1}),w.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=s.an([])}const m=this.sourceCache.getSourceTile(u,!0);if(m&&m.dem&&(!m.demTexture||m.needsTerrainPrepare)){const w=this.painter.context;m.demTexture=this.painter.getTileTexture(m.dem.stride),m.demTexture?m.demTexture.update(m.dem.getPixels(),{premultiply:!1}):m.demTexture=new Pe(w,m.dem.getPixels(),w.gl.RGBA,{premultiply:!1}),m.demTexture.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),m.needsTerrainPrepare=!1}const _=m&&m+m.tileID.key+u.key;if(_&&!this._demMatrixCache[_]){const w=this.sourceCache.sourceCache._source.maxzoom;let k=u.canonical.z-m.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=w?k=u.canonical.z-w:s.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const R=u.canonical.x-(u.canonical.x>>k<<k),j=u.canonical.y-(u.canonical.y>>k<<k),Y=s.b9(new Float64Array(16),[1/(s.W<<k),1/(s.W<<k),0]);s.H(Y,Y,[R*s.W,j*s.W,0]),this._demMatrixCache[u.key]={matrix:Y,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:m&&m.dem&&m.dem.dim||1,u_terrain_matrix:_?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:m&&m.dem&&m.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(m&&m.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:m}}getFramebuffer(u){const m=this.painter,_=m.width/devicePixelRatio,w=m.height/devicePixelRatio;return!this._fbo||this._fbo.width===_&&this._fbo.height===w||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new Pe(m.context,{width:_,height:w,data:null},m.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(m.context.gl.NEAREST,m.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new Pe(m.context,{width:_,height:w,data:null},m.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(m.context.gl.NEAREST,m.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=m.context.createFramebuffer(_,w,!0,!1),this._fbo.depthAttachment.set(m.context.createRenderbuffer(m.context.gl.DEPTH_COMPONENT16,_,w))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const m=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let k=0,R=0;k<this._coordsTextureSize;k++)for(let j=0;j<this._coordsTextureSize;j++,R+=4)m[R+0]=255&j,m[R+1]=255&k,m[R+2]=j>>8<<4|k>>8,m[R+3]=0;const _=new s.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(m.buffer)),w=new Pe(u,_,u.gl.RGBA,{premultiply:!1});return w.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=w,w}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const m=new Uint8Array(4),_=this.painter.context,w=_.gl;_.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),w.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,w.RGBA,w.UNSIGNED_BYTE,m),_.bindFramebuffer.set(null);const k=m[0]+(m[2]>>4<<8),R=m[1]+((15&m[2])<<8),j=this.coordsIndex[255-m[3]],Y=j&&this.sourceCache.getTileByID(j);if(!Y)return null;const ie=this._coordsTextureSize,de=(1<<Y.tileID.canonical.z)*ie;return new s.Y((Y.tileID.canonical.x*ie+k)/de+Y.tileID.wrap,(Y.tileID.canonical.y*ie+R)/de,this.getElevation(Y.tileID,k,R,ie))}depthAtPoint(u){const m=new Uint8Array(4),_=this.painter.context,w=_.gl;return _.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),w.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,w.RGBA,w.UNSIGNED_BYTE,m),_.bindFramebuffer.set(null),(m[0]/16777216+m[1]/65536+m[2]/256+m[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,m=new s.ba,_=new s.aX,w=this.meshSize,k=s.W/w,R=w*w;for(let me=0;me<=w;me++)for(let Oe=0;Oe<=w;Oe++)m.emplaceBack(Oe*k,me*k,0);for(let me=0;me<R;me+=w+1)for(let Oe=0;Oe<w;Oe++)_.emplaceBack(Oe+me,w+Oe+me+1,w+Oe+me+2),_.emplaceBack(Oe+me,w+Oe+me+2,Oe+me+1);const j=m.length,Y=j+2*(w+1);for(const me of[0,1])for(let Oe=0;Oe<=w;Oe++)for(const qe of[0,1])m.emplaceBack(Oe*k,me*s.W,qe);for(let me=0;me<2*w;me+=2)_.emplaceBack(Y+me,Y+me+1,Y+me+3),_.emplaceBack(Y+me,Y+me+3,Y+me+2),_.emplaceBack(j+me,j+me+3,j+me+1),_.emplaceBack(j+me,j+me+2,j+me+3);const ie=m.length,de=ie+2*(w+1);for(const me of[0,1])for(let Oe=0;Oe<=w;Oe++)for(const qe of[0,1])m.emplaceBack(me*s.W,Oe*k,qe);for(let me=0;me<2*w;me+=2)_.emplaceBack(ie+me,ie+me+1,ie+me+3),_.emplaceBack(ie+me,ie+me+3,ie+me+2),_.emplaceBack(de+me,de+me+3,de+me+1),_.emplaceBack(de+me,de+me+2,de+me+3);return this._mesh={indexBuffer:u.createIndexBuffer(_),vertexBuffer:u.createVertexBuffer(m,Qo.members),segments:s.$.simpleSegment(0,0,m.length,_.length)},this._mesh}getMeshFrameDelta(u){return 2*Math.PI*s.bb/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,m){var _;const{tileID:w}=this._getOverscaledTileIDFromLngLatZoom(u,m);return(_=this.getMinMaxElevation(w).minElevation)!==null&&_!==void 0?_:0}getMinMaxElevation(u){const m=this.getTerrainData(u).tile,_={minElevation:null,maxElevation:null};return m&&m.dem&&(_.minElevation=m.dem.min*this.exaggeration,_.maxElevation=m.dem.max*this.exaggeration),_}_getOverscaledTileIDFromLngLatZoom(u,m){const _=s.Y.fromLngLat(u.wrap()),w=(1<<m)*s.W,k=_.x*w,R=_.y*w,j=Math.floor(k/s.W),Y=Math.floor(R/s.W);return{tileID:new s.Q(m,0,m,j,Y),mercatorX:k,mercatorY:R}}}class rA{constructor(u,m,_){this._context=u,this._size=m,this._tileSize=_,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const m=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),_=new Pe(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return _.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),m.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),m.colorAttachment.set(_.texture),{id:u,fbo:m,texture:_,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(m=>u.id!==m),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const m of this._recentlyUsed)if(!this._objects[m].inUse)return this._objects[m];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const El={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ap{constructor(u,m){this.painter=u,this.terrain=m,this.pool=new rA(u.context,30,m.sourceCache.tileSize*m.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,m){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(_=>!u._layers[_].isHidden(m)),this._coordsDescendingInv={};for(const _ in u.sourceCaches){this._coordsDescendingInv[_]={};const w=u.sourceCaches[_].getVisibleCoordinates();for(const k of w){const R=this.terrain.sourceCache.getTerrainCoords(k);for(const j in R)this._coordsDescendingInv[_][j]||(this._coordsDescendingInv[_][j]=[]),this._coordsDescendingInv[_][j].push(R[j])}}this._coordsDescendingInvStr={};for(const _ of u._order){const w=u._layers[_],k=w.source;if(El[w.type]&&!this._coordsDescendingInvStr[k]){this._coordsDescendingInvStr[k]={};for(const R in this._coordsDescendingInv[k])this._coordsDescendingInvStr[k][R]=this._coordsDescendingInv[k][R].map(j=>j.key).sort().join()}}for(const _ of this._renderableTiles)for(const w in this._coordsDescendingInvStr){const k=this._coordsDescendingInvStr[w][_.tileID.key];k&&k!==_.rttCoords[w]&&(_.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const m=u.type,_=this.painter,w=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(El[m]&&(this._prevType&&El[this._prevType]||this._stacks.push([]),this._prevType=m,this._stacks[this._stacks.length-1].push(u.id),!w))return!0;if(El[this._prevType]||El[m]&&w){this._prevType=m;const k=this._stacks.length-1,R=this._stacks[k]||[];for(const j of this._renderableTiles){if(this.pool.isFull()&&(Zd(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(j),j.rtt[k]){const ie=this.pool.getObjectForId(j.rtt[k].id);if(ie.stamp===j.rtt[k].stamp){this.pool.useObject(ie);continue}}const Y=this.pool.getOrCreateFreeObject();this.pool.useObject(Y),this.pool.stampObject(Y),j.rtt[k]={id:Y.id,stamp:Y.stamp},_.context.bindFramebuffer.set(Y.fbo.framebuffer),_.context.clear({color:s.aO.transparent,stencil:0}),_.currentStencilSource=void 0;for(let ie=0;ie<R.length;ie++){const de=_.style._layers[R[ie]],me=de.source?this._coordsDescendingInv[de.source][j.tileID.key]:[j.tileID];_.context.viewport.set([0,0,Y.fbo.width,Y.fbo.height]),_._renderTileClippingMasks(de,me),_.renderLayer(_,_.style.sourceCaches[de.source],de,me),de.source&&(j.rttCoords[de.source]=this._coordsDescendingInvStr[de.source][j.tileID.key])}}return Zd(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),El[m]}return!1}}const fd={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},BA=d,qh={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:ka,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:s.a.MAX_TILE_CACHE_ZOOM_LEVELS,localIdeographFontFamily:"sans-serif",transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,validateStyle:!0,maxCanvasSize:[4096,4096]},Fe=I=>{I.touchstart=I.dragStart,I.touchmoveWindow=I.dragMove,I.touchend=I.dragEnd},oc={showCompass:!0,showZoom:!0,visualizePitch:!1};class us{constructor(u,m,_=!1){this.mousedown=R=>{this.startMouse(s.e({},R,{ctrlKey:!0,preventDefault:()=>R.preventDefault()}),E.mousePos(this.element,R)),E.addEventListener(window,"mousemove",this.mousemove),E.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=R=>{this.moveMouse(R,E.mousePos(this.element,R))},this.mouseup=R=>{this.mouseRotate.dragEnd(R),this.mousePitch&&this.mousePitch.dragEnd(R),this.offTemp()},this.touchstart=R=>{R.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=E.touchPos(this.element,R.targetTouches)[0],this.startTouch(R,this._startPos),E.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.addEventListener(window,"touchend",this.touchend))},this.touchmove=R=>{R.targetTouches.length!==1?this.reset():(this._lastPos=E.touchPos(this.element,R.targetTouches)[0],this.moveTouch(R,this._lastPos))},this.touchend=R=>{R.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const w=u.dragRotate._mouseRotate.getClickTolerance(),k=u.dragRotate._mousePitch.getClickTolerance();this.element=m,this.mouseRotate=ec({clickTolerance:w,enable:!0}),this.touchRotate=(({enable:R,clickTolerance:j,bearingDegreesPerPixelMoved:Y=.8})=>{const ie=new Nl;return new va({clickTolerance:j,move:(de,me)=>({bearingDelta:(me.x-de.x)*Y}),moveStateManager:ie,enable:R,assignEvents:Fe})})({clickTolerance:w,enable:!0}),this.map=u,_&&(this.mousePitch=Hu({clickTolerance:k,enable:!0}),this.touchPitch=(({enable:R,clickTolerance:j,pitchDegreesPerPixelMoved:Y=-.5})=>{const ie=new Nl;return new va({clickTolerance:j,move:(de,me)=>({pitchDelta:(me.y-de.y)*Y}),moveStateManager:ie,enable:R,assignEvents:Fe})})({clickTolerance:k,enable:!0})),E.addEventListener(m,"mousedown",this.mousedown),E.addEventListener(m,"touchstart",this.touchstart,{passive:!1}),E.addEventListener(m,"touchcancel",this.reset)}startMouse(u,m){this.mouseRotate.dragStart(u,m),this.mousePitch&&this.mousePitch.dragStart(u,m),E.disableDrag()}startTouch(u,m){this.touchRotate.dragStart(u,m),this.touchPitch&&this.touchPitch.dragStart(u,m),E.disableDrag()}moveMouse(u,m){const _=this.map,{bearingDelta:w}=this.mouseRotate.dragMove(u,m)||{};if(w&&_.setBearing(_.getBearing()+w),this.mousePitch){const{pitchDelta:k}=this.mousePitch.dragMove(u,m)||{};k&&_.setPitch(_.getPitch()+k)}}moveTouch(u,m){const _=this.map,{bearingDelta:w}=this.touchRotate.dragMove(u,m)||{};if(w&&_.setBearing(_.getBearing()+w),this.touchPitch){const{pitchDelta:k}=this.touchPitch.dragMove(u,m)||{};k&&_.setPitch(_.getPitch()+k)}}off(){const u=this.element;E.removeEventListener(u,"mousedown",this.mousedown),E.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),E.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.removeEventListener(window,"touchend",this.touchend),E.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){E.enableDrag(),E.removeEventListener(window,"mousemove",this.mousemove),E.removeEventListener(window,"mouseup",this.mouseup),E.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.removeEventListener(window,"touchend",this.touchend)}}let $i;function Yr(I,u,m){const _=new s.M(I.lng,I.lat);if(I=new s.M(I.lng,I.lat),u){const w=new s.M(I.lng-360,I.lat),k=new s.M(I.lng+360,I.lat),R=m.locationPoint(I).distSqr(u);m.locationPoint(w).distSqr(u)<R?I=w:m.locationPoint(k).distSqr(u)<R&&(I=k)}for(;Math.abs(I.lng-m.center.lng)>180;){const w=m.locationPoint(I);if(w.x>=0&&w.y>=0&&w.x<=m.width&&w.y<=m.height)break;I.lng>m.center.lng?I.lng-=360:I.lng+=360}return I.lng!==_.lng&&m.locationPoint(I).y>m.height/2-m.getHorizon()?I:_}const Ca={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ac(I,u,m){const _=I.classList;for(const w in Ca)_.remove(`maplibregl-${m}-anchor-${w}`);_.add(`maplibregl-${m}-anchor-${u}`)}class pd extends s.E{constructor(u){if(super(),this._onKeyPress=m=>{const _=m.code,w=m.charCode||m.keyCode;_!=="Space"&&_!=="Enter"&&w!==32&&w!==13||this.togglePopup()},this._onMapClick=m=>{const _=m.originalEvent.target,w=this._element;this._popup&&(_===w||w.contains(_))&&this.togglePopup()},this._update=m=>{var _;if(!this._map)return;const w=this._map.loaded()&&!this._map.isMoving();((m==null?void 0:m.type)==="terrain"||(m==null?void 0:m.type)==="render"&&!w)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Yr(this._lngLat,this._flatPos,this._map.transform):(_=this._lngLat)===null||_===void 0?void 0:_.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let k="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?k=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(k=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let R="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?R="rotateX(0deg)":this._pitchAlignment==="map"&&(R=`rotateX(${this._map.getPitch()}deg)`),m&&m.type!=="moveend"||(this._pos=this._pos.round()),E.setTransform(this._element,`${Ca[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${R} ${k}`),O.frameAsync(new AbortController).then(()=>{this._updateOpacity(m&&m.type==="moveend")}).catch(()=>{})},this._onMove=m=>{if(!this._isDragging){const _=this._clickTolerance||this._map._clickTolerance;this._isDragging=m.point.dist(this._pointerdownPos)>=_}this._isDragging&&(this._pos=m.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 s.k("dragstart"))),this.fire(new s.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new s.k("dragend")),this._state="inactive"},this._addDragHandler=m=>{this._element.contains(m.originalEvent.target)&&(m.preventDefault(),this._positionDelta=m.point.sub(this._pos).add(this._offset),this._pointerdownPos=m.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=s.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=E.create("div"),this._element.setAttribute("aria-label","Map marker");const m=E.createNS("http://www.w3.org/2000/svg","svg"),_=41,w=27;m.setAttributeNS(null,"display","block"),m.setAttributeNS(null,"height",`${_}px`),m.setAttributeNS(null,"width",`${w}px`),m.setAttributeNS(null,"viewBox",`0 0 ${w} ${_}`);const k=E.createNS("http://www.w3.org/2000/svg","g");k.setAttributeNS(null,"stroke","none"),k.setAttributeNS(null,"stroke-width","1"),k.setAttributeNS(null,"fill","none"),k.setAttributeNS(null,"fill-rule","evenodd");const R=E.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"fill-rule","nonzero");const j=E.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"transform","translate(3.0, 29.0)"),j.setAttributeNS(null,"fill","#000000");const Y=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const ht of Y){const Dt=E.createNS("http://www.w3.org/2000/svg","ellipse");Dt.setAttributeNS(null,"opacity","0.04"),Dt.setAttributeNS(null,"cx","10.5"),Dt.setAttributeNS(null,"cy","5.80029008"),Dt.setAttributeNS(null,"rx",ht.rx),Dt.setAttributeNS(null,"ry",ht.ry),j.appendChild(Dt)}const ie=E.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill",this._color);const de=E.createNS("http://www.w3.org/2000/svg","path");de.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ie.appendChild(de);const me=E.createNS("http://www.w3.org/2000/svg","g");me.setAttributeNS(null,"opacity","0.25"),me.setAttributeNS(null,"fill","#000000");const Oe=E.createNS("http://www.w3.org/2000/svg","path");Oe.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),me.appendChild(Oe);const qe=E.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"transform","translate(6.0, 7.0)"),qe.setAttributeNS(null,"fill","#FFFFFF");const Ye=E.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"transform","translate(8.0, 8.0)");const He=E.createNS("http://www.w3.org/2000/svg","circle");He.setAttributeNS(null,"fill","#000000"),He.setAttributeNS(null,"opacity","0.25"),He.setAttributeNS(null,"cx","5.5"),He.setAttributeNS(null,"cy","5.5"),He.setAttributeNS(null,"r","5.4999962");const Ne=E.createNS("http://www.w3.org/2000/svg","circle");Ne.setAttributeNS(null,"fill","#FFFFFF"),Ne.setAttributeNS(null,"cx","5.5"),Ne.setAttributeNS(null,"cy","5.5"),Ne.setAttributeNS(null,"r","5.4999962"),Ye.appendChild(He),Ye.appendChild(Ne),R.appendChild(j),R.appendChild(ie),R.appendChild(me),R.appendChild(qe),R.appendChild(Ye),m.appendChild(R),m.setAttributeNS(null,"height",_*this._scale+"px"),m.setAttributeNS(null,"width",w*this._scale+"px"),this._element.appendChild(m),this._offset=s.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",m=>{m.preventDefault()}),this._element.addEventListener("mousedown",m=>{m.preventDefault()}),ac(this._element,this._anchor,"marker"),u&&u.className)for(const m of u.className.split(" "))this._element.classList.add(m);this._popup=null}addTo(u){return this.remove(),this._map=u,u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),E.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=s.M.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const w=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[w,-1*(38.1-13.5+w)],"bottom-right":[-w,-1*(38.1-13.5+w)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var m,_;if(!(!((m=this._map)===null||m===void 0)&&m.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const w=this._map,k=w.terrain.depthAtPoint(this._pos),R=w.terrain.getElevationForLngLatZoom(this._lngLat,w.transform.tileZoom);if(w.transform.lngLatToCameraDepth(this._lngLat,R)-k<.006)return void(this._element.style.opacity=this._opacity);const j=-this._offset.y/w.transform._pixelPerMeter,Y=Math.sin(w.getPitch()*Math.PI/180)*j,ie=w.terrain.depthAtPoint(new s.P(this._pos.x,this._pos.y-this._offset.y)),de=w.transform.lngLatToCameraDepth(this._lngLat,R+Y)-ie>.006;!((_=this._popup)===null||_===void 0)&&_.isOpen()&&de&&this._popup.remove(),this._element.style.opacity=de?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=s.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(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}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,m){return u===void 0&&m===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),m!==void 0&&(this._opacityWhenCovered=m),this._map&&this._updateOpacity(!0),this}}const uu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let md=0,sc=!1;const sp={maxWidth:100,unit:"metric"};function gd(I,u,m){const _=m&&m.maxWidth||100,w=I._container.clientHeight/2,k=I.unproject([0,w]),R=I.unproject([_,w]),j=k.distanceTo(R);if(m&&m.unit==="imperial"){const Y=3.2808*j;Y>5280?lc(u,_,Y/5280,I._getUIString("ScaleControl.Miles")):lc(u,_,Y,I._getUIString("ScaleControl.Feet"))}else m&&m.unit==="nautical"?lc(u,_,j/1852,I._getUIString("ScaleControl.NauticalMiles")):j>=1e3?lc(u,_,j/1e3,I._getUIString("ScaleControl.Kilometers")):lc(u,_,j,I._getUIString("ScaleControl.Meters"))}function lc(I,u,m,_){const w=function(k){const R=Math.pow(10,`${Math.floor(k)}`.length-1);let j=k/R;return j=j>=10?10:j>=5?5:j>=3?3:j>=2?2:j>=1?1:function(Y){const ie=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*ie)/ie}(j),R*j}(m);I.style.width=u*(w/m)+"px",I.innerHTML=`${w}&nbsp;${_}`}const Wl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},lp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function nh(I){if(I){if(typeof I=="number"){const u=Math.round(Math.abs(I)/Math.SQRT2);return{center:new s.P(0,0),top:new s.P(0,I),"top-left":new s.P(u,u),"top-right":new s.P(-u,u),bottom:new s.P(0,-I),"bottom-left":new s.P(u,-u),"bottom-right":new s.P(-u,-u),left:new s.P(I,0),right:new s.P(-I,0)}}if(I instanceof s.P||Array.isArray(I)){const u=s.P.convert(I);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:s.P.convert(I.center||[0,0]),top:s.P.convert(I.top||[0,0]),"top-left":s.P.convert(I["top-left"]||[0,0]),"top-right":s.P.convert(I["top-right"]||[0,0]),bottom:s.P.convert(I.bottom||[0,0]),"bottom-left":s.P.convert(I["bottom-left"]||[0,0]),"bottom-right":s.P.convert(I["bottom-right"]||[0,0]),left:s.P.convert(I.left||[0,0]),right:s.P.convert(I.right||[0,0])}}return nh(new s.P(0,0))}const Vh=d;a.AJAXError=s.be,a.Evented=s.E,a.LngLat=s.M,a.MercatorCoordinate=s.Y,a.Point=s.P,a.addProtocol=s.bf,a.config=s.a,a.removeProtocol=s.bg,a.AttributionControl=nA,a.BoxZoomHandler=Hi,a.CanvasSource=Nr,a.CooperativeGesturesHandler=Ir,a.DoubleClickZoomHandler=Qh,a.DragPanHandler=ao,a.DragRotateHandler=ca,a.EdgeInsets=dd,a.FullscreenControl=class extends s.E{constructor(I={}){super(),this._onFullscreenChange=()=>{var u;let m=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((u=m==null?void 0:m.shadowRoot)===null||u===void 0)&&u.fullscreenElement;)m=m.shadowRoot.fullscreenElement;m===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,I&&I.container&&(I.container instanceof HTMLElement?this._container=I.container:s.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(I){return this._map=I,this._container||(this._container=this._map.getContainer()),this._controlContainer=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){E.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const I=this._fullscreenButton=E.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);E.create("span","maplibregl-ctrl-icon",I).setAttribute("aria-hidden","true"),I.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const I=this._getTitle();this._fullscreenButton.setAttribute("aria-label",I),this._fullscreenButton.title=I}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new s.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new s.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=yn,a.GeolocateControl=class extends s.E{constructor(I){super(),this._onSuccess=u=>{if(this._map){if(this._isOutOfMapMaxBounds(u))return this._setErrorState(),this.fire(new s.k("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("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(u),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(u),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.k("geolocate",u)),this._finish()}},this._updateCamera=u=>{const m=new s.M(u.coords.longitude,u.coords.latitude),_=u.coords.accuracy,w=this._map.getBearing(),k=s.e({bearing:w},this.options.fitBoundsOptions),R=Rt.fromLngLat(m,_);this._map.fitBounds(R,k,{geolocateSource:!0})},this._updateMarker=u=>{if(u){const m=new s.M(u.coords.longitude,u.coords.latitude);this._accuracyCircleMarker.setLngLat(m).addTo(this._map),this._userLocationDotMarker.setLngLat(m).addTo(this._map),this._accuracy=u.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=u=>{if(this._map){if(this.options.trackUserLocation)if(u.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const m=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=m,this._geolocateButton.setAttribute("aria-label",m),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(u.code===3&&sc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.k("error",u)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=u=>{if(this._map){if(this._container.addEventListener("contextmenu",m=>m.preventDefault()),this._geolocateButton=E.create("button","maplibregl-ctrl-geolocate",this._container),E.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",u===!1){s.w("Geolocation support is not available so the GeolocateControl will be disabled.");const m=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=m,this._geolocateButton.setAttribute("aria-label",m)}else{const m=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=m,this._geolocateButton.setAttribute("aria-label",m)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=E.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new pd({element:this._dotElement}),this._circleElement=E.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new pd({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",m=>{m.geolocateSource||this._watchState!=="ACTIVE_LOCK"||m.originalEvent&&m.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new s.k("trackuserlocationend")))})}},this.options=s.e({},uu,I)}onAdd(I){return this._map=I,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return s._(this,arguments,void 0,function*(u=!1){if($i!==void 0&&!u)return $i;if(window.navigator.permissions===void 0)return $i=!!window.navigator.geolocation,$i;try{$i=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{$i=!!window.navigator.geolocation}return $i})}().then(u=>this._setupUI(u)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),E.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,md=0,sc=!1}_isOutOfMapMaxBounds(I){const u=this._map.getMaxBounds(),m=I.coords;return u&&(m.longitude<u.getWest()||m.longitude>u.getEast()||m.latitude<u.getSouth()||m.latitude>u.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const I=this._map.getBounds(),u=I.getSouthEast(),m=I.getNorthEast(),_=u.distanceTo(m),w=Math.ceil(this._accuracy/(_/this._map._container.clientHeight)*2);this._circleElement.style.width=`${w}px`,this._circleElement.style.height=`${w}px`}trigger(){if(!this._setup)return s.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new s.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":md--,sc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new s.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new s.k("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let I;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),md++,md>1?(I={maximumAge:6e5,timeout:0},sc=!0):(I=this.options.positionOptions,sc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,I)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},a.Hash=an,a.ImageSource=dr,a.KeyboardHandler=Mo,a.LngLatBounds=Rt,a.LogoControl=hl,a.Map=class extends ic{constructor(I){if(s.bc.mark(s.bd.create),(I=s.e({},qh,I)).minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new su(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._contextLost=u=>{u.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new s.k("webglcontextlost",{originalEvent:u}))},this._contextRestored=u=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.k("webglcontextrestored",{originalEvent:u}))},this._onMapScroll=u=>{if(u.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=I.preserveDrawingBuffer,this._antialias=I.antialias,this._trackResize=I.trackResize,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=I.collectResourceTiming,this._renderTaskQueue=new $o,this._controls=[],this._mapId=s.a3(),this._locale=s.e({},fd,I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this._imageQueueHandle=Z.addThrottleControl(()=>this.isMoving()),this._requestManager=new pe(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let u=!1;const m=Et(_=>{this._trackResize&&!this._removed&&this.resize(_)._update()},50);this._resizeObserver=new ResizeObserver(_=>{u?m(_):u=!0}),this._resizeObserver.observe(this._container)}this.handlers=new da(this,I),this._hash=I.hash&&new an(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,s.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new nA(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new hl,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",u=>{this._update(u.dataType==="style"),this.fire(new s.k(`${u.dataType}data`,u))}),this.on("dataloading",u=>{this.fire(new s.k(`${u.dataType}dataloading`,u))}),this.on("dataabort",u=>{this.fire(new s.k("sourcedataabort",u))})}_getMapId(){return this._mapId}addControl(I,u){if(u===void 0&&(u=I.getDefaultPosition?I.getDefaultPosition():"top-right"),!I||!I.onAdd)return this.fire(new s.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const m=I.onAdd(this);this._controls.push(I);const _=this._controlPositions[u];return u.indexOf("bottom")!==-1?_.insertBefore(m,_.firstChild):_.appendChild(m),this}removeControl(I){if(!I||!I.onRemove)return this.fire(new s.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(I);return u>-1&&this._controls.splice(u,1),I.onRemove(this),this}hasControl(I){return this._controls.indexOf(I)>-1}calculateCameraOptionsFromTo(I,u,m,_){return _==null&&this.terrain&&(_=this.terrain.getElevationForLngLatZoom(m,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(I,u,m,_)}resize(I){var u;const m=this._containerDimensions(),_=m[0],w=m[1],k=this._getClampedPixelRatio(_,w);if(this._resizeCanvas(_,w,k),this.painter.resize(_,w,k),this.painter.overLimit()){const j=this.painter.context.gl;this._maxCanvasSize=[j.drawingBufferWidth,j.drawingBufferHeight];const Y=this._getClampedPixelRatio(_,w);this._resizeCanvas(_,w,Y),this.painter.resize(_,w,Y)}this.transform.resize(_,w),(u=this._requestedCameraState)===null||u===void 0||u.resize(_,w);const R=!this._moving;return R&&(this.stop(),this.fire(new s.k("movestart",I)).fire(new s.k("move",I))),this.fire(new s.k("resize",I)),R&&this.fire(new s.k("moveend",I)),this}_getClampedPixelRatio(I,u){const{0:m,1:_}=this._maxCanvasSize,w=this.getPixelRatio(),k=I*w,R=u*w;return Math.min(k>m?m/k:1,R>_?_/R:1)*w}getPixelRatio(){var I;return(I=this._overridePixelRatio)!==null&&I!==void 0?I:devicePixelRatio}setPixelRatio(I){this._overridePixelRatio=I,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(I){return this.transform.setMaxBounds(Rt.convert(I)),this._update()}setMinZoom(I){if((I=I??-2)>=-2&&I<=this.transform.maxZoom)return this.transform.minZoom=I,this._update(),this.getZoom()<I&&this.setZoom(I),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(I){if((I=I??22)>=this.transform.minZoom)return this.transform.maxZoom=I,this._update(),this.getZoom()>I&&this.setZoom(I),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(I){if((I=I??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(I>=0&&I<=this.transform.maxPitch)return this.transform.minPitch=I,this._update(),this.getPitch()<I&&this.setPitch(I),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(I){if((I=I??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(I>=this.transform.minPitch)return this.transform.maxPitch=I,this._update(),this.getPitch()>I&&this.setPitch(I),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(I){return this.transform.renderWorldCopies=I,this._update()}project(I){return this.transform.locationPoint(s.M.convert(I),this.style&&this.terrain)}unproject(I){return this.transform.pointLocation(s.P.convert(I),this.terrain)}isMoving(){var I;return this._moving||((I=this.handlers)===null||I===void 0?void 0:I.isMoving())}isZooming(){var I;return this._zooming||((I=this.handlers)===null||I===void 0?void 0:I.isZooming())}isRotating(){var I;return this._rotating||((I=this.handlers)===null||I===void 0?void 0:I.isRotating())}_createDelegatedListener(I,u,m){if(I==="mouseenter"||I==="mouseover"){let _=!1;return{layer:u,listener:m,delegates:{mousemove:k=>{const R=this.getLayer(u)?this.queryRenderedFeatures(k.point,{layers:[u]}):[];R.length?_||(_=!0,m.call(this,new Po(I,this,k.originalEvent,{features:R}))):_=!1},mouseout:()=>{_=!1}}}}if(I==="mouseleave"||I==="mouseout"){let _=!1;return{layer:u,listener:m,delegates:{mousemove:R=>{(this.getLayer(u)?this.queryRenderedFeatures(R.point,{layers:[u]}):[]).length?_=!0:_&&(_=!1,m.call(this,new Po(I,this,R.originalEvent)))},mouseout:R=>{_&&(_=!1,m.call(this,new Po(I,this,R.originalEvent)))}}}}{const _=w=>{const k=this.getLayer(u)?this.queryRenderedFeatures(w.point,{layers:[u]}):[];k.length&&(w.features=k,m.call(this,w),delete w.features)};return{layer:u,listener:m,delegates:{[I]:_}}}}on(I,u,m){if(m===void 0)return super.on(I,u);const _=this._createDelegatedListener(I,u,m);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[I]=this._delegatedListeners[I]||[],this._delegatedListeners[I].push(_);for(const w in _.delegates)this.on(w,_.delegates[w]);return this}once(I,u,m){if(m===void 0)return super.once(I,u);const _=this._createDelegatedListener(I,u,m);for(const w in _.delegates)this.once(w,_.delegates[w]);return this}off(I,u,m){return m===void 0?super.off(I,u):(this._delegatedListeners&&this._delegatedListeners[I]&&(_=>{const w=this._delegatedListeners[I];for(let k=0;k<w.length;k++){const R=w[k];if(R.layer===u&&R.listener===m){for(const j in R.delegates)this.off(j,R.delegates[j]);return w.splice(k,1),this}}})(),this)}queryRenderedFeatures(I,u){if(!this.style)return[];let m;const _=I instanceof s.P||Array.isArray(I),w=_?I:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(_?{}:I)||{},w instanceof s.P||typeof w[0]=="number")m=[s.P.convert(w)];else{const k=s.P.convert(w[0]),R=s.P.convert(w[1]);m=[k,new s.P(R.x,k.y),R,new s.P(k.x,R.y),k]}return this.style.queryRenderedFeatures(m,u,this.transform)}querySourceFeatures(I,u){return this.style.querySourceFeatures(I,u)}setStyle(I,u){return(u=s.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&I?(this._diffStyle(I,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(I,u))}setTransformRequest(I){return this._requestManager.setTransformRequest(I),this}_getUIString(I){const u=this._locale[I];if(u==null)throw new Error(`Missing UI string '${I}'`);return u}_updateStyle(I,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(I,u));const m=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!I)),I?(this.style=new Jo(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof I=="string"?this.style.loadURL(I,u,m):this.style.loadJSON(I,u,m),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Jo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(I,u){if(typeof I=="string"){const m=this._requestManager.transformRequest(I,ae.Style);s.h(m,new AbortController).then(_=>{this._updateDiff(_.data,u)}).catch(_=>{_&&this.fire(new s.j(_))})}else typeof I=="object"&&this._updateDiff(I,u)}_updateDiff(I,u){try{this.style.setState(I,u)&&this._update(!0)}catch(m){s.w(`Unable to perform style diff: ${m.message||m.error||m}.  Rebuilding the style from scratch.`),this._updateStyle(I,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.w("There is no style added to the map.")}addSource(I,u){return this._lazyInitEmptyStyle(),this.style.addSource(I,u),this._update(!0)}isSourceLoaded(I){const u=this.style&&this.style.sourceCaches[I];if(u!==void 0)return u.loaded();this.fire(new s.j(new Error(`There is no source with ID '${I}'`)))}setTerrain(I){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),I){const u=this.style.sourceCaches[I.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${I.source}`);this.terrain===null&&u.reload();for(const m in this.style._layers){const _=this.style._layers[m];_.type==="hillshade"&&_.source===I.source&&s.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new th(this.painter,u,I),this.painter.renderToTexture=new ap(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=m=>{m.dataType==="style"?this.terrain.sourceCache.freeRtt():m.dataType==="source"&&m.tile&&(m.sourceId!==I.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(m.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new s.k("terrain",{terrain:I})),this}getTerrain(){var I,u;return(u=(I=this.terrain)===null||I===void 0?void 0:I.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const I=this.style&&this.style.sourceCaches;for(const u in I){const m=I[u]._tiles;for(const _ in m){const w=m[_];if(w.state!=="loaded"&&w.state!=="errored")return!1}}return!0}removeSource(I){return this.style.removeSource(I),this._update(!0)}getSource(I){return this.style.getSource(I)}addImage(I,u,m={}){const{pixelRatio:_=1,sdf:w=!1,stretchX:k,stretchY:R,content:j}=m;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||s.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new s.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Y,height:ie,data:de}=u,me=u;return this.style.addImage(I,{data:new s.R({width:Y,height:ie},new Uint8Array(de)),pixelRatio:_,stretchX:k,stretchY:R,content:j,sdf:w,version:0,userImage:me}),me.onAdd&&me.onAdd(this,I),this}}{const{width:Y,height:ie,data:de}=O.getImageData(u);this.style.addImage(I,{data:new s.R({width:Y,height:ie},de),pixelRatio:_,stretchX:k,stretchY:R,content:j,sdf:w,version:0})}}updateImage(I,u){const m=this.style.getImage(I);if(!m)return this.fire(new s.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _=u instanceof HTMLImageElement||s.b(u)?O.getImageData(u):u,{width:w,height:k,data:R}=_;if(w===void 0||k===void 0)return this.fire(new s.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(w!==m.data.width||k!==m.data.height)return this.fire(new s.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const j=!(u instanceof HTMLImageElement||s.b(u));return m.data.replace(R,j),this.style.updateImage(I,m),this}getImage(I){return this.style.getImage(I)}hasImage(I){return I?!!this.style.getImage(I):(this.fire(new s.j(new Error("Missing required image id"))),!1)}removeImage(I){this.style.removeImage(I)}loadImage(I){return Z.getImage(this._requestManager.transformRequest(I,ae.Image),new AbortController)}listImages(){return this.style.listImages()}addLayer(I,u){return this._lazyInitEmptyStyle(),this.style.addLayer(I,u),this._update(!0)}moveLayer(I,u){return this.style.moveLayer(I,u),this._update(!0)}removeLayer(I){return this.style.removeLayer(I),this._update(!0)}getLayer(I){return this.style.getLayer(I)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(I,u,m){return this.style.setLayerZoomRange(I,u,m),this._update(!0)}setFilter(I,u,m={}){return this.style.setFilter(I,u,m),this._update(!0)}getFilter(I){return this.style.getFilter(I)}setPaintProperty(I,u,m,_={}){return this.style.setPaintProperty(I,u,m,_),this._update(!0)}getPaintProperty(I,u){return this.style.getPaintProperty(I,u)}setLayoutProperty(I,u,m,_={}){return this.style.setLayoutProperty(I,u,m,_),this._update(!0)}getLayoutProperty(I,u){return this.style.getLayoutProperty(I,u)}setGlyphs(I,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(I,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(I,u,m={}){return this._lazyInitEmptyStyle(),this.style.addSprite(I,u,m,_=>{_||this._update(!0)}),this}removeSprite(I){return this._lazyInitEmptyStyle(),this.style.removeSprite(I),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(I,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(I,u,m=>{m||this._update(!0)}),this}setLight(I,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(I,u),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(I,u){return this.style.setFeatureState(I,u),this._update()}removeFeatureState(I,u){return this.style.removeFeatureState(I,u),this._update()}getFeatureState(I){return this.style.getFeatureState(I)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let I=0,u=0;return this._container&&(I=this._container.clientWidth||400,u=this._container.clientHeight||300),[I,u]}_setupContainer(){const I=this._container;I.classList.add("maplibregl-map");const u=this._canvasContainer=E.create("div","maplibregl-canvas-container",I);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=E.create("canvas","maplibregl-canvas",u),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const m=this._containerDimensions(),_=this._getClampedPixelRatio(m[0],m[1]);this._resizeCanvas(m[0],m[1],_);const w=this._controlContainer=E.create("div","maplibregl-control-container",I),k=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(R=>{k[R]=E.create("div",`maplibregl-ctrl-${R} `,w)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(I,u,m){this._canvas.width=Math.floor(m*I),this._canvas.height=Math.floor(m*u),this._canvas.style.width=`${I}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const I={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",_=>{u={requestedAttributes:I},_&&(u.statusMessage=_.statusMessage,u.type=_.type)},{once:!0});const m=this._canvas.getContext("webgl2",I)||this._canvas.getContext("webgl",I);if(!m){const _="Failed to initialize WebGL";throw u?(u.message=_,new Error(JSON.stringify(u))):new Error(_)}this.painter=new Pc(m,this.transform),P.testSupport(m)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(I){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||I,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(I){return this._update(),this._renderTaskQueue.add(I)}_cancelRenderFrame(I){this._renderTaskQueue.remove(I)}_render(I){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(I),this._removed)return;let m=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const w=this.transform.zoom,k=O.now();this.style.zoomHistory.update(w,k);const R=new s.a8(w,{now:k,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),j=R.crossFadingFactor();j===1&&j===this._crossFadingFactor||(m=!0,this._crossFadingFactor=j),this.style.update(R)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new s.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.bc.mark(s.bd.load),this.fire(new s.k("load"))),this.style&&(this.style.hasTransitions()||m)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const _=this._sourcesDirty||this._styleDirty||this._placementDirty;return _||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.k("idle")),!this._loaded||this._fullyLoaded||_||(this._fullyLoaded=!0,s.bc.mark(s.bd.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var I;this._hash&&this._hash.remove();for(const m of this._controls)m.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),Z.removeThrottleControl(this._imageQueueHandle),(I=this._resizeObserver)===null||I===void 0||I.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u&&u.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),E.remove(this._canvasContainer),E.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),s.bc.clearMetrics(),this._removed=!0,this.fire(new s.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,O.frameAsync(this._frameRequest).then(I=>{s.bc.frame(I),this._frameRequest=null,this._render(I)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(I){this._showTileBoundaries!==I&&(this._showTileBoundaries=I,this._update())}get showPadding(){return!!this._showPadding}set showPadding(I){this._showPadding!==I&&(this._showPadding=I,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(I){this._showCollisionBoxes!==I&&(this._showCollisionBoxes=I,I?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(I){this._showOverdrawInspector!==I&&(this._showOverdrawInspector=I,this._update())}get repaint(){return!!this._repaint}set repaint(I){this._repaint!==I&&(this._repaint=I,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(I){this._vertices=I,this._update()}get version(){return BA}getCameraTargetElevation(){return this.transform.elevation}},a.MapMouseEvent=Po,a.MapTouchEvent=EA,a.MapWheelEvent=ws,a.Marker=pd,a.NavigationControl=class{constructor(I){this._updateZoomButtons=()=>{const u=this._map.getZoom(),m=u===this._map.getMaxZoom(),_=u===this._map.getMinZoom();this._zoomInButton.disabled=m,this._zoomOutButton.disabled=_,this._zoomInButton.setAttribute("aria-disabled",m.toString()),this._zoomOutButton.setAttribute("aria-disabled",_.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,m)=>{const _=this._map._getUIString(`NavigationControl.${m}`);u.title=_,u.setAttribute("aria-label",_)},this.options=s.e({},oc,I),this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),E.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),E.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=E.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(I){return this._map=I,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new us(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){E.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(I,u){const m=E.create("button",I,this._container);return m.type="button",m.addEventListener("click",u),m}},a.Popup=class extends s.E{constructor(I){super(),this.remove=()=>(this._content&&E.remove(this._content),this._container&&(E.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new s.k("close"))),this),this._onMouseUp=u=>{this._update(u.point)},this._onMouseMove=u=>{this._update(u.point)},this._onDrag=u=>{this._update(u.point)},this._update=u=>{var m;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=E.create("div","maplibregl-popup",this._map.getContainer()),this._tip=E.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const j of this.options.className.split(" "))this._container.classList.add(j);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Yr(this._lngLat,this._flatPos,this._map.transform):(m=this._lngLat)===null||m===void 0?void 0:m.wrap(),this._trackPointer&&!u)return;const _=this._flatPos=this._pos=this._trackPointer&&u?u:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&u?u:this._map.transform.locationPoint(this._lngLat));let w=this.options.anchor;const k=nh(this.options.offset);if(!w){const j=this._container.offsetWidth,Y=this._container.offsetHeight;let ie;ie=_.y+k.bottom.y<Y?["top"]:_.y>this._map.transform.height-Y?["bottom"]:[],_.x<j/2?ie.push("left"):_.x>this._map.transform.width-j/2&&ie.push("right"),w=ie.length===0?"bottom":ie.join("-")}let R=_.add(k[w]);this.options.subpixelPositioning||(R=R.round()),E.setTransform(this._container,`${Ca[w]} translate(${R.x}px,${R.y}px)`),ac(this._container,w,"popup")},this._onClose=()=>{this.remove()},this.options=s.e(Object.create(Wl),I)}addTo(I){return this._map&&this.remove(),this._map=I,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new s.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=s.M.convert(I),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(I){return this.setDOMContent(document.createTextNode(I))}setHTML(I){const u=document.createDocumentFragment(),m=document.createElement("body");let _;for(m.innerHTML=I;_=m.firstChild,_;)u.appendChild(_);return this.setDOMContent(u)}getMaxWidth(){var I;return(I=this._container)===null||I===void 0?void 0:I.style.maxWidth}setMaxWidth(I){return this.options.maxWidth=I,this._update(),this}setDOMContent(I){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=E.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(I),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(I){this._container&&this._container.classList.add(I)}removeClassName(I){this._container&&this._container.classList.remove(I)}setOffset(I){return this.options.offset=I,this._update(),this}toggleClassName(I){if(this._container)return this._container.classList.toggle(I)}setSubpixelPositioning(I){this.options.subpixelPositioning=I}_createCloseButton(){this.options.closeButton&&(this._closeButton=E.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const I=this._container.querySelector(lp);I&&I.focus()}},a.RasterDEMTileSource=gn,a.RasterTileSource=or,a.ScaleControl=class{constructor(I){this._onMove=()=>{gd(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,gd(this._map,this._container,this.options)},this.options=s.e({},sp,I)}getDefaultPosition(){return"bottom-left"}onAdd(I){return this._map=I,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-scale",I.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){E.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},a.ScrollZoomHandler=rp,a.Style=Jo,a.TerrainControl=class{constructor(I){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=I}onAdd(I){return this._map=I,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=E.create("button","maplibregl-ctrl-terrain",this._container),E.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){E.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},a.TwoFingersTouchPitchHandler=Lc,a.TwoFingersTouchRotateHandler=nc,a.TwoFingersTouchZoomHandler=Xu,a.TwoFingersTouchZoomRotateHandler=xr,a.VectorTileSource=mt,a.VideoSource=Sr,a.addSourceType=(I,u)=>s._(void 0,void 0,void 0,function*(){if(_i(I))throw new Error(`A source type called "${I}" already exists.`);((m,_)=>{yr[m]=_})(I,u)}),a.clearPrewarmedResources=function(){const I=Qt;I&&(I.isPreloaded()&&I.numActive()===1?(I.release(Jt),Qt=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()"))},a.getMaxParallelImageRequests=function(){return s.a.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return Ke().getRTLTextPluginStatus()},a.getVersion=function(){return Vh},a.getWorkerCount=function(){return Ht.workerCount},a.getWorkerUrl=function(){return s.a.WORKER_URL},a.importScriptInWorkers=function(I){return Se().broadcast("importScript",I)},a.prewarm=function(){ke().acquire(Jt)},a.setMaxParallelImageRequests=function(I){s.a.MAX_PARALLEL_IMAGE_REQUESTS=I},a.setRTLTextPlugin=function(I,u){return Ke().setRTLTextPlugin(I,u)},a.setWorkerCount=function(I){Ht.workerCount=I},a.setWorkerUrl=function(I){s.a.WORKER_URL=I}});var o=t;return o})})(Zz);var Gne=Zz.exports;const HC=Ba(Gne);var ZC=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function Jz(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var y4={exports:{}};y4.exports;(function(n,e){var t=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",C="[object Boolean]",O="[object Date]",E="[object Error]",P="[object Function]",D="[object GeneratorFunction]",$="[object Map]",H="[object Number]",Q="[object Null]",N="[object Object]",Z="[object Promise]",ae="[object Proxy]",pe="[object RegExp]",fe="[object Set]",X="[object String]",oe="[object Symbol]",Ce="[object Undefined]",we="[object WeakMap]",Te="[object ArrayBuffer]",Pe="[object DataView]",he="[object Float32Array]",$e="[object Float64Array]",ye="[object Int8Array]",gt="[object Int16Array]",yt="[object Int32Array]",st="[object Uint8Array]",ft="[object Uint8ClampedArray]",Re="[object Uint16Array]",Ve="[object Uint32Array]",Xe=/[\\^$.*+?()[\]{}|]/g,Jt=/^\[object .+?Constructor\]$/,Ht=/^(?:0|[1-9]\d*)$/,bt={};bt[he]=bt[$e]=bt[ye]=bt[gt]=bt[yt]=bt[st]=bt[ft]=bt[Re]=bt[Ve]=!0,bt[s]=bt[d]=bt[Te]=bt[C]=bt[Pe]=bt[O]=bt[E]=bt[P]=bt[$]=bt[H]=bt[N]=bt[pe]=bt[fe]=bt[X]=bt[we]=!1;var Qt=typeof ZC=="object"&&ZC&&ZC.Object===Object&&ZC,Yt=typeof self=="object"&&self&&self.Object===Object&&self,ke=Qt||Yt||Function("return this")(),ge=e&&!e.nodeType&&e,Se=ge&&!0&&n&&!n.nodeType&&n,ze=Se&&Se.exports===ge,it=ze&&Qt.process,ot=function(){try{return it&&it.binding&&it.binding("util")}catch{}}(),St=ot&&ot.isTypedArray;function Rt(z,le){for(var Ue=-1,vt=z==null?0:z.length,$n=0,vn=[];++Ue<vt;){var Kn=z[Ue];le(Kn,Ue,z)&&(vn[$n++]=Kn)}return vn}function zt(z,le){for(var Ue=-1,vt=le.length,$n=z.length;++Ue<vt;)z[$n+Ue]=le[Ue];return z}function mt(z,le){for(var Ue=-1,vt=z==null?0:z.length;++Ue<vt;)if(le(z[Ue],Ue,z))return!0;return!1}function or(z,le){for(var Ue=-1,vt=Array(z);++Ue<z;)vt[Ue]=le(Ue);return vt}function gn(z){return function(le){return z(le)}}function yn(z,le){return z.has(le)}function tr(z,le){return z==null?void 0:z[le]}function dr(z){var le=-1,Ue=Array(z.size);return z.forEach(function(vt,$n){Ue[++le]=[$n,vt]}),Ue}function Sr(z,le){return function(Ue){return z(le(Ue))}}function Nr(z){var le=-1,Ue=Array(z.size);return z.forEach(function(vt){Ue[++le]=vt}),Ue}var yr=Array.prototype,_i=Function.prototype,Ee=Object.prototype,ee=ke["__core-js_shared__"],V=_i.toString,Ke=Ee.hasOwnProperty,At=function(){var z=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||"");return z?"Symbol(src)_1."+z:""}(),Bt=Ee.toString,kt=RegExp("^"+V.call(Ke).replace(Xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=ze?ke.Buffer:void 0,fn=ke.Symbol,Pn=ke.Uint8Array,On=Ee.propertyIsEnumerable,g=yr.splice,Kt=fn?fn.toStringTag:void 0,Pr=Object.getOwnPropertySymbols,rr=Lt?Lt.isBuffer:void 0,Le=Sr(Object.keys,Object),ce=na(ke,"DataView"),xe=na(ke,"Map"),Ie=na(ke,"Promise"),je=na(ke,"Set"),rt=na(ke,"WeakMap"),lt=na(Object,"create"),pt=Wo(ce),et=Wo(xe),Mt=Wo(Ie),tn=Wo(je),qt=Wo(rt),en=fn?fn.prototype:void 0,Fn=en?en.valueOf:void 0;function Bn(z){var le=-1,Ue=z==null?0:z.length;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function Hn(){this.__data__=lt?lt(null):{},this.size=0}function Or(z){var le=this.has(z)&&delete this.__data__[z];return this.size-=le?1:0,le}function cr(z){var le=this.__data__;if(lt){var Ue=le[z];return Ue===r?void 0:Ue}return Ke.call(le,z)?le[z]:void 0}function Qr(z){var le=this.__data__;return lt?le[z]!==void 0:Ke.call(le,z)}function Br(z,le){var Ue=this.__data__;return this.size+=this.has(z)?0:1,Ue[z]=lt&&le===void 0?r:le,this}Bn.prototype.clear=Hn,Bn.prototype.delete=Or,Bn.prototype.get=cr,Bn.prototype.has=Qr,Bn.prototype.set=Br;function Fr(z){var le=-1,Ue=z==null?0:z.length;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function ar(){this.__data__=[],this.size=0}function di(z){var le=this.__data__,Ue=wn(le,z);if(Ue<0)return!1;var vt=le.length-1;return Ue==vt?le.pop():g.call(le,Ue,1),--this.size,!0}function Ui(z){var le=this.__data__,Ue=wn(le,z);return Ue<0?void 0:le[Ue][1]}function to(z){return wn(this.__data__,z)>-1}function ho(z,le){var Ue=this.__data__,vt=wn(Ue,z);return vt<0?(++this.size,Ue.push([z,le])):Ue[vt][1]=le,this}Fr.prototype.clear=ar,Fr.prototype.delete=di,Fr.prototype.get=Ui,Fr.prototype.has=to,Fr.prototype.set=ho;function si(z){var le=-1,Ue=z==null?0:z.length;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function fo(){this.size=0,this.__data__={hash:new Bn,map:new(xe||Fr),string:new Bn}}function Na(z){var le=ta(this,z).delete(z);return this.size-=le?1:0,le}function Ia(z){return ta(this,z).get(z)}function Ei(z){return ta(this,z).has(z)}function os(z,le){var Ue=ta(this,z),vt=Ue.size;return Ue.set(z,le),this.size+=Ue.size==vt?0:1,this}si.prototype.clear=fo,si.prototype.delete=Na,si.prototype.get=Ia,si.prototype.has=Ei,si.prototype.set=os;function yi(z){var le=-1,Ue=z==null?0:z.length;for(this.__data__=new si;++le<Ue;)this.add(z[le])}function Gn(z){return this.__data__.set(z,r),this}function ro(z){return this.__data__.has(z)}yi.prototype.add=yi.prototype.push=Gn,yi.prototype.has=ro;function Co(z){var le=this.__data__=new Fr(z);this.size=le.size}function Ri(){this.__data__=new Fr,this.size=0}function _e(z){var le=this.__data__,Ue=le.delete(z);return this.size=le.size,Ue}function Je(z){return this.__data__.get(z)}function Zt(z){return this.__data__.has(z)}function ln(z,le){var Ue=this.__data__;if(Ue instanceof Fr){var vt=Ue.__data__;if(!xe||vt.length<t-1)return vt.push([z,le]),this.size=++Ue.size,this;Ue=this.__data__=new si(vt)}return Ue.set(z,le),this.size=Ue.size,this}Co.prototype.clear=Ri,Co.prototype.delete=_e,Co.prototype.get=Je,Co.prototype.has=Zt,Co.prototype.set=ln;function Ft(z,le){var Ue=ss(z),vt=!Ue&&nu(z),$n=!Ue&&!vt&&Go(z),vn=!Ue&&!vt&&!$n&&cl(z),Kn=Ue||vt||$n||vn,Ur=Kn?or(z.length,String):[],vr=Ur.length;for(var kr in z)(le||Ke.call(z,kr))&&!(Kn&&(kr=="length"||$n&&(kr=="offset"||kr=="parent")||vn&&(kr=="buffer"||kr=="byteLength"||kr=="byteOffset")||_A(kr,vr)))&&Ur.push(kr);return Ur}function wn(z,le){for(var Ue=z.length;Ue--;)if(xs(z[Ue][0],le))return Ue;return-1}function hr(z,le,Ue){var vt=le(z);return ss(z)?vt:zt(vt,Ue(z))}function ii(z){return z==null?z===void 0?Ce:Q:Kt&&Kt in Object(z)?bs(z):Gu(z)}function li(z){return ua(z)&&ii(z)==s}function Jo(z,le,Ue,vt,$n){return z===le?!0:z==null||le==null||!ua(z)&&!ua(le)?z!==z&&le!==le:Ka(z,le,Ue,vt,Jo,$n)}function Ka(z,le,Ue,vt,$n,vn){var Kn=ss(z),Ur=ss(le),vr=Kn?d:ma(z),kr=Ur?d:ma(le);vr=vr==s?N:vr,kr=kr==s?N:kr;var Ti=vr==N,po=kr==N,Oi=vr==kr;if(Oi&&Go(z)){if(!Go(le))return!1;Kn=!0,Ti=!1}if(Oi&&!Ti)return vn||(vn=new Co),Kn||cl(z)?Ga(z,le,Ue,vt,$n,vn):ea(z,le,vr,Ue,vt,$n,vn);if(!(Ue&i)){var Zr=Ti&&Ke.call(z,"__wrapped__"),Vi=po&&Ke.call(le,"__wrapped__");if(Zr||Vi){var Io=Zr?z.value():z,wo=Vi?le.value():le;return vn||(vn=new Co),$n(Io,wo,Ue,vt,vn)}}return Oi?(vn||(vn=new Co),xu(z,le,Ue,vt,$n,vn)):!1}function Dr(z){if(!ru(z)||bA(z))return!1;var le=Al(z)?kt:Jt;return le.test(Wo(z))}function Wa(z){return ua(z)&&Ml(z.length)&&!!bt[ii(z)]}function vi(z){if(!Mu(z))return Le(z);var le=[];for(var Ue in Object(z))Ke.call(z,Ue)&&Ue!="constructor"&&le.push(Ue);return le}function Ga(z,le,Ue,vt,$n,vn){var Kn=Ue&i,Ur=z.length,vr=le.length;if(Ur!=vr&&!(Kn&&vr>Ur))return!1;var kr=vn.get(z);if(kr&&vn.get(le))return kr==le;var Ti=-1,po=!0,Oi=Ue&o?new yi:void 0;for(vn.set(z,le),vn.set(le,z);++Ti<Ur;){var Zr=z[Ti],Vi=le[Ti];if(vt)var Io=Kn?vt(Vi,Zr,Ti,le,z,vn):vt(Zr,Vi,Ti,z,le,vn);if(Io!==void 0){if(Io)continue;po=!1;break}if(Oi){if(!mt(le,function(wo,$a){if(!yn(Oi,$a)&&(Zr===wo||$n(Zr,wo,Ue,vt,vn)))return Oi.push($a)})){po=!1;break}}else if(!(Zr===Vi||$n(Zr,Vi,Ue,vt,vn))){po=!1;break}}return vn.delete(z),vn.delete(le),po}function ea(z,le,Ue,vt,$n,vn,Kn){switch(Ue){case Pe:if(z.byteLength!=le.byteLength||z.byteOffset!=le.byteOffset)return!1;z=z.buffer,le=le.buffer;case Te:return!(z.byteLength!=le.byteLength||!vn(new Pn(z),new Pn(le)));case C:case O:case H:return xs(+z,+le);case E:return z.name==le.name&&z.message==le.message;case pe:case X:return z==le+"";case $:var Ur=dr;case fe:var vr=vt&i;if(Ur||(Ur=Nr),z.size!=le.size&&!vr)return!1;var kr=Kn.get(z);if(kr)return kr==le;vt|=o,Kn.set(z,le);var Ti=Ga(Ur(z),Ur(le),vt,$n,vn,Kn);return Kn.delete(z),Ti;case oe:if(Fn)return Fn.call(z)==Fn.call(le)}return!1}function xu(z,le,Ue,vt,$n,vn){var Kn=Ue&i,Ur=as(z),vr=Ur.length,kr=as(le),Ti=kr.length;if(vr!=Ti&&!Kn)return!1;for(var po=vr;po--;){var Oi=Ur[po];if(!(Kn?Oi in le:Ke.call(le,Oi)))return!1}var Zr=vn.get(z);if(Zr&&vn.get(le))return Zr==le;var Vi=!0;vn.set(z,le),vn.set(le,z);for(var Io=Kn;++po<vr;){Oi=Ur[po];var wo=z[Oi],$a=le[Oi];if(vt)var Fl=Kn?vt($a,wo,Oi,le,z,vn):vt(wo,$a,Oi,z,le,vn);if(!(Fl===void 0?wo===$a||$n(wo,$a,Ue,vt,vn):Fl)){Vi=!1;break}Io||(Io=Oi=="constructor")}if(Vi&&!Io){var iu=z.constructor,ga=le.constructor;iu!=ga&&"constructor"in z&&"constructor"in le&&!(typeof iu=="function"&&iu instanceof iu&&typeof ga=="function"&&ga instanceof ga)&&(Vi=!1)}return vn.delete(z),vn.delete(le),Vi}function as(z){return hr(z,xA,wu)}function ta(z,le){var Ue=z.__data__;return Wu(le)?Ue[typeof le=="string"?"string":"hash"]:Ue.map}function na(z,le){var Ue=tr(z,le);return Dr(Ue)?Ue:void 0}function bs(z){var le=Ke.call(z,Kt),Ue=z[Kt];try{z[Kt]=void 0;var vt=!0}catch{}var $n=Bt.call(z);return vt&&(le?z[Kt]=Ue:delete z[Kt]),$n}var wu=Pr?function(z){return z==null?[]:(z=Object(z),Rt(Pr(z),function(le){return On.call(z,le)}))}:vo,ma=ii;(ce&&ma(new ce(new ArrayBuffer(1)))!=Pe||xe&&ma(new xe)!=$||Ie&&ma(Ie.resolve())!=Z||je&&ma(new je)!=fe||rt&&ma(new rt)!=we)&&(ma=function(z){var le=ii(z),Ue=le==N?z.constructor:void 0,vt=Ue?Wo(Ue):"";if(vt)switch(vt){case pt:return Pe;case et:return $;case Mt:return Z;case tn:return fe;case qt:return we}return le});function _A(z,le){return le=le??a,!!le&&(typeof z=="number"||Ht.test(z))&&z>-1&&z%1==0&&z<le}function Wu(z){var le=typeof z;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?z!=="__proto__":z===null}function bA(z){return!!At&&At in z}function Mu(z){var le=z&&z.constructor,Ue=typeof le=="function"&&le.prototype||Ee;return z===Ue}function Gu(z){return Bt.call(z)}function Wo(z){if(z!=null){try{return V.call(z)}catch{}try{return z+""}catch{}}return""}function xs(z,le){return z===le||z!==z&&le!==le}var nu=li(function(){return arguments}())?li:function(z){return ua(z)&&Ke.call(z,"callee")&&!On.call(z,"callee")},ss=Array.isArray;function ul(z){return z!=null&&Ml(z.length)&&!Al(z)}var Go=rr||io;function Su(z,le){return Jo(z,le)}function Al(z){if(!ru(z))return!1;var le=ii(z);return le==P||le==D||le==f||le==ae}function Ml(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=a}function ru(z){var le=typeof z;return z!=null&&(le=="object"||le=="function")}function ua(z){return z!=null&&typeof z=="object"}var cl=St?gn(St):Wa;function xA(z){return ul(z)?Ft(z):vi(z)}function vo(){return[]}function io(){return!1}n.exports=Su})(y4,y4.exports);var $ne=y4.exports,Qne=Jz($ne);function aO(n,e,t){const r={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(r["source-layer"]=t),r}function sO(n,e,t,r){const i={id:[t,r,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return r&&(i["source-layer"]=r),i}function lO(n,e,t){const r={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(r["source-layer"]=t),r}function Yne(n,e){const t=[],r=[],i=[];function o(a){return{circle:e(a,.8),line:e(a,.6),polygon:e(a,.3),polygonOutline:e(a,.6),default:e(a,1)}}return Object.keys(n).forEach(a=>{const s=n[a];if(!s||s.length===0){const d=o(a);r.push(aO(d.circle,a)),i.push(lO(d.line,a)),t.push(sO(d.polygon,d.polygonOutline,a))}else s.forEach(d=>{const f=o(d);r.push(aO(f.circle,a,d)),i.push(lO(f.line,a,d)),t.push(sO(f.polygon,f.polygonOutline,a,d))})}),t.concat(i).concat(r)}function qne(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const r={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},i={};return Object.keys(n.sources).forEach(o=>{const a=n.sources[o];(a.type==="vector"||a.type==="geojson")&&(i[o]=a)}),Object.assign(n,{layers:[r].concat(e),sources:i})}var $T={polygonLayer:sO,lineLayer:lO,circleLayer:aO,generateInspectStyle:qne,generateColoredLayers:Yne};class Vne{constructor(e){e=Object.assign({show:!0,onToggle(){}},e),this._btn=this.createButton(),this._btn.onclick=e.onToggle,this.elem=this.createContainer(this._btn,e.show)}createButton(){const e=document.createElement("button");return e.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect",e.type="button",e.setAttribute("aria-label","Inspect"),e}createContainer(e,t){const r=document.createElement("div");return r.className="maplibregl-ctrl maplibregl-ctrl-group",r.appendChild(e),t||(r.style.display="none"),r}setInspectIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect"}setMapIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-map"}}function Hne(n){return typeof n>"u"||n===null?n:n instanceof Date?n.toLocaleString():typeof n=="object"||typeof n=="number"||typeof n=="string"?n.toString():n}function QT(n,e){return`<div class="maplibregl-inspect_property"><div class="maplibregl-inspect_property-name">${n}</div><div class="maplibregl-inspect_property-value">${Hne(e)}</div></div>`}function Zne(n){return`<div class="maplibregl-inspect_layer">${n}</div>`}function Xne(n){const e=Zne(n.layer["source-layer"]||n.layer.source),t=QT("$type",n.geometry.type),r=Object.keys(n.properties).map(i=>QT(i,n.properties[i]));return[e,t].concat(r).join("")}function Jne(n){return n.map(e=>`<div class="maplibregl-inspect_feature">${Xne(e)}</div>`).join("")}function ere(n){return`<div class="maplibregl-inspect_popup">${Jne(n)}</div>`}var uO={exports:{}};(function(n,e){(function(t,r){{var i=r();n&&n.exports&&(e=n.exports=i),e.randomColor=i}})(ZC,function(){var t=null,r={};Q();var i=[],o=function(X){if(X=X||{},X.seed!==void 0&&X.seed!==null&&X.seed===parseInt(X.seed,10))t=X.seed;else if(typeof X.seed=="string")t=pe(X.seed);else{if(X.seed!==void 0&&X.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var oe,Ce,we;if(X.count!==null&&X.count!==void 0){for(var Te=X.count,Pe=[],he=0;he<X.count;he++)i.push(!1);for(X.count=null;Te>Pe.length;){var $e=o(X);t!==null&&(X.seed=t),Pe.push($e)}return X.count=Te,Pe}return oe=a(X),Ce=s(oe,X),we=d(oe,Ce,X),f([oe,Ce,we],X)};function a(X){if(i.length>0){var oe=fe(X.hue),Ce=D(oe),we=(oe[1]-oe[0])/i.length,Te=parseInt((Ce-oe[0])/we);i[Te]===!0?Te=(Te+2)%i.length:i[Te]=!0;var Pe=(oe[0]+Te*we)%359,he=(oe[0]+(Te+1)*we)%359;return oe=[Pe,he],Ce=D(oe),Ce<0&&(Ce=360+Ce),Ce}else{var oe=O(X.hue);return Ce=D(oe),Ce<0&&(Ce=360+Ce),Ce}}function s(X,oe){if(oe.hue==="monochrome")return 0;if(oe.luminosity==="random")return D([0,100]);var Ce=E(X),we=Ce[0],Te=Ce[1];switch(oe.luminosity){case"bright":we=55;break;case"dark":we=Te-10;break;case"light":Te=55;break}return D([we,Te])}function d(X,oe,Ce){var we=C(X,oe),Te=100;switch(Ce.luminosity){case"dark":Te=we+20;break;case"light":we=(Te+we)/2;break;case"random":we=0,Te=100;break}return D([we,Te])}function f(X,oe){switch(oe.format){case"hsvArray":return X;case"hslArray":return ae(X);case"hsl":var Ce=ae(X);return"hsl("+Ce[0]+", "+Ce[1]+"%, "+Ce[2]+"%)";case"hsla":var we=ae(X),he=oe.alpha||Math.random();return"hsla("+we[0]+", "+we[1]+"%, "+we[2]+"%, "+he+")";case"rgbArray":return N(X);case"rgb":var Te=N(X);return"rgb("+Te.join(", ")+")";case"rgba":var Pe=N(X),he=oe.alpha||Math.random();return"rgba("+Pe.join(", ")+", "+he+")";default:return $(X)}}function C(X,oe){for(var Ce=P(X).lowerBounds,we=0;we<Ce.length-1;we++){var Te=Ce[we][0],Pe=Ce[we][1],he=Ce[we+1][0],$e=Ce[we+1][1];if(oe>=Te&&oe<=he){var ye=($e-Pe)/(he-Te),gt=Pe-ye*Te;return ye*oe+gt}}return 0}function O(X){if(typeof parseInt(X)=="number"){var oe=parseInt(X);if(oe<360&&oe>0)return[oe,oe]}if(typeof X=="string"){if(r[X]){var Ce=r[X];if(Ce.hueRange)return Ce.hueRange}else if(X.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var we=Z(X)[0];return[we,we]}}return[0,360]}function E(X){return P(X).saturationRange}function P(X){X>=334&&X<=360&&(X-=360);for(var oe in r){var Ce=r[oe];if(Ce.hueRange&&X>=Ce.hueRange[0]&&X<=Ce.hueRange[1])return r[oe]}return"Color not found"}function D(X){if(t===null){var oe=.618033988749895,Ce=Math.random();return Ce+=oe,Ce%=1,Math.floor(X[0]+Ce*(X[1]+1-X[0]))}else{var we=X[1]||1,Te=X[0]||0;t=(t*9301+49297)%233280;var Pe=t/233280;return Math.floor(Te+Pe*(we-Te))}}function $(X){var oe=N(X);function Ce(Te){var Pe=Te.toString(16);return Pe.length==1?"0"+Pe:Pe}var we="#"+Ce(oe[0])+Ce(oe[1])+Ce(oe[2]);return we}function H(X,oe,Ce){var we=Ce[0][0],Te=Ce[Ce.length-1][0],Pe=Ce[Ce.length-1][1],he=Ce[0][1];r[X]={hueRange:oe,lowerBounds:Ce,saturationRange:[we,Te],brightnessRange:[Pe,he]}}function Q(){H("monochrome",null,[[0,0],[100,0]]),H("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),H("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),H("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),H("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),H("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),H("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),H("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function N(X){var oe=X[0];oe===0&&(oe=1),oe===360&&(oe=359),oe=oe/360;var Ce=X[1]/100,we=X[2]/100,Te=Math.floor(oe*6),Pe=oe*6-Te,he=we*(1-Ce),$e=we*(1-Pe*Ce),ye=we*(1-(1-Pe)*Ce),gt=256,yt=256,st=256;switch(Te){case 0:gt=we,yt=ye,st=he;break;case 1:gt=$e,yt=we,st=he;break;case 2:gt=he,yt=we,st=ye;break;case 3:gt=he,yt=$e,st=we;break;case 4:gt=ye,yt=he,st=we;break;case 5:gt=we,yt=he,st=$e;break}var ft=[Math.floor(gt*255),Math.floor(yt*255),Math.floor(st*255)];return ft}function Z(X){X=X.replace(/^#/,""),X=X.length===3?X.replace(/(.)/g,"$1$1"):X;var oe=parseInt(X.substr(0,2),16)/255,Ce=parseInt(X.substr(2,2),16)/255,we=parseInt(X.substr(4,2),16)/255,Te=Math.max(oe,Ce,we),Pe=Te-Math.min(oe,Ce,we),he=Te?Pe/Te:0;switch(Te){case oe:return[60*((Ce-we)/Pe%6)||0,he,Te];case Ce:return[60*((we-oe)/Pe+2)||0,he,Te];case we:return[60*((oe-Ce)/Pe+4)||0,he,Te]}}function ae(X){var oe=X[0],Ce=X[1]/100,we=X[2]/100,Te=(2-Ce)*we;return[oe,Math.round(Ce*we/(Te<1?Te:2-Te)*1e4)/100,Te/2*100]}function pe(X){for(var oe=0,Ce=0;Ce!==X.length&&!(oe>=Number.MAX_SAFE_INTEGER);Ce++)oe+=X.charCodeAt(Ce);return oe}function fe(X){if(isNaN(X)){if(typeof X=="string"){if(r[X]){var Ce=r[X];if(Ce.hueRange)return Ce.hueRange}else if(X.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var we=Z(X)[0];return P(we).hueRange}}}else{var oe=parseInt(X);if(oe<360&&oe>0)return P(X).hueRange}return[0,360]}return o})})(uO,uO.exports);var tre=uO.exports,nre=Jz(tre);function rre(n,e){let t="bright",r;return/water|ocean|lake|sea|river/.test(n)&&(r="blue"),/state|country|place/.test(n)&&(r="pink"),/road|highway|transport|streets/.test(n)&&(r="orange"),/contour|building|earth/.test(n)&&(r="monochrome"),/building/.test(n)&&(t="dark"),/earth/.test(n)&&(t="light"),/contour|landuse/.test(n)&&(r="yellow"),/wood|forest|park|landcover|land|natural/.test(n)&&(r="green"),`rgba(${nre({luminosity:t,hue:r,seed:n,format:"rgbArray"}).join(", ")}, ${e||"1"})`}var ire={brightColor:rre};function ore(n){return n.metadata&&n.metadata["maplibregl-inspect:inspect"]}function are(n){return Object.assign(n,{metadata:Object.assign({},n.metadata,{"maplibregl-inspect:inspect":!0})})}class h8{constructor(e){if(this._onSourceChange=r=>{if(r.sourceDataType==="visibility"||!r.isSourceLoaded)return;const i=Object.assign({},this.sources);this._setSourcesFromMap(),!Qne(i,this.sources)&&Object.keys(this.sources).length>0&&setTimeout(()=>this.render(),1e3)},this._onStyleChange=()=>{const r=this._map.getStyle();ore(r)||(this._originalStyle=r)},this._onRightClick=()=>{!this.options.showMapPopupOnHover&&!this.options.showInspectMapPopupOnHover&&!this.options.blockHoverPopupOnClick&&this._popup&&this._popup.remove()},this._onMousemove=r=>{if(this._showInspectMap){if(!this.options.showInspectMapPopup||r.type==="mousemove"&&!this.options.showInspectMapPopupOnHover)return;r.type==="click"&&this.options.showInspectMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}else{if(!this.options.showMapPopup||r.type==="mousemove"&&!this.options.showMapPopupOnHover)return;r.type==="click"&&this.options.showMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}if(!this._popupBlocked&&this._popup){let i;this.options.selectThreshold===0?i=r.point:i=[[r.point.x-this.options.selectThreshold,r.point.y+this.options.selectThreshold],[r.point.x+this.options.selectThreshold,r.point.y-this.options.selectThreshold]];const o=this._map.queryRenderedFeatures(i,this.options.queryParameters)||[];if(this._map.getCanvas().style.cursor=o.length?"pointer":"",!o.length)this._popup.remove();else{this._popup.setLngLat(r.lngLat);const a=this.options.renderPopup(o);typeof a=="string"?this._popup.setHTML(a):this._popup.setDOMContent(a),this._popup.addTo(this._map)}}},!(this instanceof h8))throw new Error("MaplibreInspect needs to be called with the new keyword");let t=null;window.maplibregl?t=new window.maplibregl.Popup({closeButton:!1,closeOnClick:!1}):e.popup||console.error("Maplibre GL JS can not be found. Make sure to include it or pass an initialized MaplibreGL Popup to MaplibreInspect if you are using moduleis."),this.options=Object.assign({showInspectMap:!1,showInspectButton:!0,showInspectMapPopup:!0,showMapPopup:!1,showMapPopupOnHover:!0,showInspectMapPopupOnHover:!0,blockHoverPopupOnClick:!1,backgroundColor:"#fff",assignLayerColor:ire.brightColor,buildInspectStyle:$T.generateInspectStyle,renderPopup:ere,popup:t,selectThreshold:5,useInspectStyle:!0,queryParameters:{},sources:{},toggleCallback(){},manageStyleOutside:!1},e),this.sources=this.options.sources,this.assignLayerColor=this.options.assignLayerColor,this._popup=this.options.popup,this._popupBlocked=!1,this._showInspectMap=this.options.showInspectMap,this._toggle=new Vne({show:this.options.showInspectButton,onToggle:()=>this.toggleInspector()})}toggleInspector(){this._showInspectMap=!this._showInspectMap,this._popupBlocked=!1,this.options.toggleCallback(this._showInspectMap),this.render()}_inspectStyle(){const e=$T.generateColoredLayers(this.sources,this.assignLayerColor);return this.options.buildInspectStyle(this._map.getStyle(),e,{backgroundColor:this.options.backgroundColor})}render(){this._showInspectMap?(this.options.useInspectStyle&&this._map.setStyle(are(this._inspectStyle())),this._toggle.setMapIcon()):this._originalStyle&&(this._popup&&this._popup.remove(),this.options.useInspectStyle&&this._map.setStyle(this._originalStyle),this._toggle.setInspectIcon())}_setSourcesFromMap(){const e=Object.keys(this._map.getStyle().sources);Object.keys(this._map.style.sourceCaches).forEach(t=>{const r=this._map.style.sourceCaches[t]||{_source:{}},i=r._source.vectorLayerIds;i?this.sources[t]=i:r._source.type==="geojson"&&(this.sources[t]=[])}),Object.keys(this.sources).forEach(t=>{e.indexOf(t)===-1&&delete this.sources[t]})}setOriginalStyle(e){this._originalStyle=e,this._setSourcesFromMap()}onAdd(e){return this._map=e,Object.keys(this.sources).length===0&&(e.on("tiledata",this._onSourceChange),e.on("sourcedata",this._onSourceChange)),e.on("styledata",this._onStyleChange),e.on("load",this._onStyleChange),e.on("mousemove",this._onMousemove),e.on("click",this._onMousemove),e.on("contextmenu",this._onRightClick),this._toggle.elem}onRemove(){this._map.off("styledata",this._onStyleChange),this._map.off("load",this._onStyleChange),this._map.off("tiledata",this._onSourceChange),this._map.off("sourcedata",this._onSourceChange),this._map.off("mousemove",this._onMousemove),this._map.off("click",this._onMousemove),this._map.off("contextmenu",this._onRightClick);const e=this._toggle.elem;e.parentNode.removeChild(e),this._map=void 0}}var AO={exports:{}};(function(n,e){(function(t,r){{var i=r();n&&n.exports&&(e=n.exports=i),e.randomColor=i}})(Vf,function(){var t=null,r={};Q();var i=[],o=function(X){if(X=X||{},X.seed!==void 0&&X.seed!==null&&X.seed===parseInt(X.seed,10))t=X.seed;else if(typeof X.seed=="string")t=pe(X.seed);else{if(X.seed!==void 0&&X.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var oe,Ce,we;if(X.count!==null&&X.count!==void 0){for(var Te=X.count,Pe=[],he=0;he<X.count;he++)i.push(!1);for(X.count=null;Te>Pe.length;){var $e=o(X);t!==null&&(X.seed=t),Pe.push($e)}return X.count=Te,Pe}return oe=a(X),Ce=s(oe,X),we=d(oe,Ce,X),f([oe,Ce,we],X)};function a(X){if(i.length>0){var oe=fe(X.hue),Ce=D(oe),we=(oe[1]-oe[0])/i.length,Te=parseInt((Ce-oe[0])/we);i[Te]===!0?Te=(Te+2)%i.length:i[Te]=!0;var Pe=(oe[0]+Te*we)%359,he=(oe[0]+(Te+1)*we)%359;return oe=[Pe,he],Ce=D(oe),Ce<0&&(Ce=360+Ce),Ce}else{var oe=O(X.hue);return Ce=D(oe),Ce<0&&(Ce=360+Ce),Ce}}function s(X,oe){if(oe.hue==="monochrome")return 0;if(oe.luminosity==="random")return D([0,100]);var Ce=E(X),we=Ce[0],Te=Ce[1];switch(oe.luminosity){case"bright":we=55;break;case"dark":we=Te-10;break;case"light":Te=55;break}return D([we,Te])}function d(X,oe,Ce){var we=C(X,oe),Te=100;switch(Ce.luminosity){case"dark":Te=we+20;break;case"light":we=(Te+we)/2;break;case"random":we=0,Te=100;break}return D([we,Te])}function f(X,oe){switch(oe.format){case"hsvArray":return X;case"hslArray":return ae(X);case"hsl":var Ce=ae(X);return"hsl("+Ce[0]+", "+Ce[1]+"%, "+Ce[2]+"%)";case"hsla":var we=ae(X),he=oe.alpha||Math.random();return"hsla("+we[0]+", "+we[1]+"%, "+we[2]+"%, "+he+")";case"rgbArray":return N(X);case"rgb":var Te=N(X);return"rgb("+Te.join(", ")+")";case"rgba":var Pe=N(X),he=oe.alpha||Math.random();return"rgba("+Pe.join(", ")+", "+he+")";default:return $(X)}}function C(X,oe){for(var Ce=P(X).lowerBounds,we=0;we<Ce.length-1;we++){var Te=Ce[we][0],Pe=Ce[we][1],he=Ce[we+1][0],$e=Ce[we+1][1];if(oe>=Te&&oe<=he){var ye=($e-Pe)/(he-Te),gt=Pe-ye*Te;return ye*oe+gt}}return 0}function O(X){if(typeof parseInt(X)=="number"){var oe=parseInt(X);if(oe<360&&oe>0)return[oe,oe]}if(typeof X=="string"){if(r[X]){var Ce=r[X];if(Ce.hueRange)return Ce.hueRange}else if(X.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var we=Z(X)[0];return[we,we]}}return[0,360]}function E(X){return P(X).saturationRange}function P(X){X>=334&&X<=360&&(X-=360);for(var oe in r){var Ce=r[oe];if(Ce.hueRange&&X>=Ce.hueRange[0]&&X<=Ce.hueRange[1])return r[oe]}return"Color not found"}function D(X){if(t===null){var oe=.618033988749895,Ce=Math.random();return Ce+=oe,Ce%=1,Math.floor(X[0]+Ce*(X[1]+1-X[0]))}else{var we=X[1]||1,Te=X[0]||0;t=(t*9301+49297)%233280;var Pe=t/233280;return Math.floor(Te+Pe*(we-Te))}}function $(X){var oe=N(X);function Ce(Te){var Pe=Te.toString(16);return Pe.length==1?"0"+Pe:Pe}var we="#"+Ce(oe[0])+Ce(oe[1])+Ce(oe[2]);return we}function H(X,oe,Ce){var we=Ce[0][0],Te=Ce[Ce.length-1][0],Pe=Ce[Ce.length-1][1],he=Ce[0][1];r[X]={hueRange:oe,lowerBounds:Ce,saturationRange:[we,Te],brightnessRange:[Pe,he]}}function Q(){H("monochrome",null,[[0,0],[100,0]]),H("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),H("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),H("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),H("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),H("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),H("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),H("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function N(X){var oe=X[0];oe===0&&(oe=1),oe===360&&(oe=359),oe=oe/360;var Ce=X[1]/100,we=X[2]/100,Te=Math.floor(oe*6),Pe=oe*6-Te,he=we*(1-Ce),$e=we*(1-Pe*Ce),ye=we*(1-(1-Pe)*Ce),gt=256,yt=256,st=256;switch(Te){case 0:gt=we,yt=ye,st=he;break;case 1:gt=$e,yt=we,st=he;break;case 2:gt=he,yt=we,st=ye;break;case 3:gt=he,yt=$e,st=we;break;case 4:gt=ye,yt=he,st=we;break;case 5:gt=we,yt=he,st=$e;break}var ft=[Math.floor(gt*255),Math.floor(yt*255),Math.floor(st*255)];return ft}function Z(X){X=X.replace(/^#/,""),X=X.length===3?X.replace(/(.)/g,"$1$1"):X;var oe=parseInt(X.substr(0,2),16)/255,Ce=parseInt(X.substr(2,2),16)/255,we=parseInt(X.substr(4,2),16)/255,Te=Math.max(oe,Ce,we),Pe=Te-Math.min(oe,Ce,we),he=Te?Pe/Te:0;switch(Te){case oe:return[60*((Ce-we)/Pe%6)||0,he,Te];case Ce:return[60*((we-oe)/Pe+2)||0,he,Te];case we:return[60*((oe-Ce)/Pe+4)||0,he,Te]}}function ae(X){var oe=X[0],Ce=X[1]/100,we=X[2]/100,Te=(2-Ce)*we;return[oe,Math.round(Ce*we/(Te<1?Te:2-Te)*1e4)/100,Te/2*100]}function pe(X){for(var oe=0,Ce=0;Ce!==X.length&&!(oe>=Number.MAX_SAFE_INTEGER);Ce++)oe+=X.charCodeAt(Ce);return oe}function fe(X){if(isNaN(X)){if(typeof X=="string"){if(r[X]){var Ce=r[X];if(Ce.hueRange)return Ce.hueRange}else if(X.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var we=Z(X)[0];return P(we).hueRange}}}else{var oe=parseInt(X);if(oe<360&&oe>0)return P(X).hueRange}return[0,360]}return o})})(AO,AO.exports);var sre=AO.exports;const lre=Ba(sre);function ure(n,e){let t="bright",r;return/water|ocean|lake|sea|river/.test(n)&&(r="blue"),/state|country|place/.test(n)&&(r="pink"),/road|highway|transport|streets/.test(n)&&(r="orange"),/contour|building|earth/.test(n)&&(r="monochrome"),/building/.test(n)&&(t="dark"),/earth/.test(n)&&(t="light"),/contour|landuse/.test(n)&&(r="yellow"),/wood|forest|park|landcover|land|natural/.test(n)&&(r="green"),`rgba(${lre({luminosity:t,hue:r,seed:n,format:"rgbArray"}).join(", ")}, ${e||"1"})`}const ej={brightColor:ure};var tj={exports:{}},Are="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",cre=Are,dre=cre;function nj(){}function rj(){}rj.resetWarningCache=nj;var hre=function(){function n(r,i,o,a,s,d){if(d!==dre){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:rj,resetWarningCache:nj};return t.PropTypes=t,t};tj.exports=hre();var Lh=tj.exports;const Rr=Ba(Lh);var YT=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n};function fre(n,e){var t={};for(var r in n)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var u0=function(e,t){var r=e.children,i=e.color,o=e.size,a=e.style,s=e.width,d=e.height,f=fre(e,["children","color","size","style","width","height"]),C=t.reactIconBase,O=C===void 0?{}:C,E=o||O.size||"1em";return Mn.createElement("svg",YT({children:r,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:d||E,width:s||E},O,f,{style:YT({verticalAlign:"middle",color:i||O.color},O.style||{},a)}))};u0.propTypes={color:Rr.string,size:Rr.oneOfType([Rr.string,Rr.number]),width:Rr.oneOfType([Rr.string,Rr.number]),height:Rr.oneOfType([Rr.string,Rr.number]),style:Rr.object};u0.contextTypes={reactIconBase:Rr.shape(u0.propTypes)};function v4(){var n="/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx",e="ace6118dd0ae83e2ceb20b70664ae2267741d924",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:478}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,iBAAiB,MAAM,UAAU;AAAA,EACpD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,GAAE,iUAAgU,WAAU,kBAAiB,GACrW;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ace6118dd0ae83e2ceb20b70664ae2267741d924"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return v4=function(){return a},a}v4();class pre extends Mn.Component{render(){return v4().f[0]++,v4().s[0]++,G.jsx(u0,{viewBox:"0 0 20 20",...this.props,children:G.jsx("path",{d:"M 12.34,1.29 C 12.5114,1.1076 12.7497,1.0029 13,1 13.5523,1 14,1.4477 14,2 14.0047,2.2478 13.907,2.4866 13.73,2.66 9.785626,6.5516986 6.6148407,9.7551593 2.65,13.72 2.4793,13.8963 2.2453,13.9971 2,14 1.4477,14 1,13.5523 1,13 0.9953,12.7522 1.093,12.5134 1.27,12.34 4.9761967,8.7018093 9.0356422,4.5930579 12.34,1.29 Z",transform:"translate(2,2)"})})}}function C4(){var n="/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx",e="8b9fc49e8fc93b42e35f3a9b2accdbccf6dcdb84",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:562}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,iBAAiB,MAAM,UAAU;AAAA,EACpD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,GAAE,kbAAib,GAC3b;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8b9fc49e8fc93b42e35f3a9b2accdbccf6dcdb84"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return C4=function(){return a},a}C4();class x2 extends Mn.Component{render(){return C4().f[0]++,C4().s[0]++,G.jsx(u0,{viewBox:"0 0 20 20",...this.props,children:G.jsx("path",{d:"M 2.84978,9.763512 9.462149,4.7316391 16.47225,9.478015 9.859886,14.509879 2.84978,9.763512 m -1.028761,0.492069 7.414535,5.020197 c 0.372277,0.25206 0.958697,0.239771 1.30985,-0.02745 L 17.539255,9.926162 C 17.89041,9.658941 17.873288,9.238006 17.501015,8.985946 L 10.08648,3.9657402 C 9.714204,3.7136802 9.127782,3.7259703 8.776627,3.9931918 L 1.782775,9.315365 c -0.3511551,0.267221 -0.3340331,0.688156 0.03824,0.940216 l 0,0 z"})})}}function _4(){var n="/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx",e="6ac2e596376f8b8c2e117c4345e33d1afb8f583b",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:535}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx"],names:[],mappings:"AASU;AATV,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,mBAAmB,MAAM,UAAU;AAAA,EACtD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,OAAE,WAAU,wDACX,8BAAC,UAAK,GAAE,4SAA2S,GACrT,GACF;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6ac2e596376f8b8c2e117c4345e33d1afb8f583b"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return _4=function(){return a},a}_4();class mre extends Mn.Component{render(){return _4().f[0]++,_4().s[0]++,G.jsx(u0,{viewBox:"0 0 20 20",...this.props,children:G.jsx("g",{transform:"matrix(1.2718518,0,0,1.2601269,16.559526,-7.4065264)",children:G.jsx("path",{d:"m -9.7959773,11.060163 c -0.3734787,-0.724437 -0.3580577,-1.2147051 -0.00547,-1.8767873 l 8.6034029,-0.019416 c 0.39670292,0.6865644 0.38365934,1.4750693 -0.011097,1.8864953 l -3.1359613,-0.0033 -0.013695,7.1305 c -0.4055357,0.397083 -1.3146432,0.397083 -1.7769191,-0.02274 l 0.030226,-7.104422 z"})})})}}function b4(){var n="/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx",e="f8813cd7d4a9138ff3fc7253bc195b86370ed6cf",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:464}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,uBAAuB,MAAM,UAAU;AAAA,EAC1D,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,GAAE,gVAA+U,GACzV;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f8813cd7d4a9138ff3fc7253bc195b86370ed6cf"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return b4=function(){return a},a}b4();class qT extends Mn.Component{render(){return b4().f[0]++,b4().s[0]++,G.jsx(u0,{viewBox:"0 0 20 20",...this.props,children:G.jsx("path",{d:"m 1.821019,10.255581 7.414535,5.020197 c 0.372277,0.25206 0.958697,0.239771 1.30985,-0.02745 L 17.539255,9.926162 C 17.89041,9.658941 17.873288,9.238006 17.501015,8.985946 L 10.08648,3.9657402 C 9.714204,3.7136802 9.127782,3.7259703 8.776627,3.9931918 L 1.782775,9.315365 c -0.3511551,0.267221 -0.3340331,0.688156 0.03824,0.940216 z"})})}}function x4(){var n="/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx",e="35a8c3687dcdeffeb7f2fe2d9c05ced9e802b5ca",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:378}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,mBAAmB,MAAM,UAAU;AAAA,EACtD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,WAAU,kBAAiB,GAAE,6NAA4N,GACjQ;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"35a8c3687dcdeffeb7f2fe2d9c05ced9e802b5ca"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return x4=function(){return a},a}x4();class gre extends Mn.Component{render(){return x4().f[0]++,x4().s[0]++,G.jsx(u0,{viewBox:"0 0 20 20",...this.props,children:G.jsx("path",{transform:"translate(2 2)",d:"M7.5,0C11.6422,0,15,3.3578,15,7.5S11.6422,15,7.5,15 S0,11.6422,0,7.5S3.3578,0,7.5,0z M7.5,1.6666c-3.2217,0-5.8333,2.6117-5.8333,5.8334S4.2783,13.3334,7.5,13.3334 s5.8333-2.6117,5.8333-5.8334S10.7217,1.6666,7.5,1.6666z"})})}}function Iv(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(n)}function yre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"},child:[]}]})(n)}function vre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"},child:[]}]})(n)}function Cre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function _re(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function bre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"},child:[]}]})(n)}function xre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6a2 2 0 0 0-2-2zm-7 6-4 4h3v6h2v-6h3l-4-4z"},child:[]}]})(n)}function wre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(n)}function Mre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},child:[]}]})(n)}function Sre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},child:[]}]})(n)}function ij(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function Ere(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(n)}function Ore(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(n)}function Bre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"},child:[]}]})(n)}function Ire(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"},child:[]}]})(n)}function cO(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"},child:[]}]})(n)}function kre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"},child:[]}]})(n)}function Tre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"},child:[]}]})(n)}function Kre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(n)}function Pre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 14 5-5 5 5z"},child:[]}]})(n)}function Dre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}function Lre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(n)}function Fre(n){return Xs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"2"},child:[]},{tag:"path",attr:{d:"M10 3h4v12h-4z"},child:[]}]})(n)}function w4(){var n="/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx",e="90c8ed80956547e1dbbdff164a42850c33eed62e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx"],names:[],mappings:"AAOM;AAPN,OAAO,WAAW;AAClB,SAAQ,sBAAqB;AAG7B,qBAAqB,oBAAoB,MAAM,UAAU;AAAA,EACvD,SAAS;AACP,WACE,oBAAC,kBAAgB,GAAG,KAAK,OAAO;AAAA,EAEpC;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"90c8ed80956547e1dbbdff164a42850c33eed62e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return w4=function(){return a},a}w4();class Ure extends Mn.Component{render(){return w4().f[0]++,w4().s[0]++,G.jsx(Fre,{...this.props})}}function ms(){var n="/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",e="89bd7eb08374d10a1476c7cf1e0e39f530ce1ff1",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",statementMap:{0:{start:{line:11,column:22},end:{line:11,column:49}},1:{start:{line:12,column:4},end:{line:33,column:5}},2:{start:{line:14,column:8},end:{line:14,column:69}},3:{start:{line:16,column:8},end:{line:16,column:63}},4:{start:{line:18,column:8},end:{line:18,column:63}},5:{start:{line:20,column:8},end:{line:20,column:63}},6:{start:{line:22,column:8},end:{line:22,column:63}},7:{start:{line:24,column:8},end:{line:24,column:69}},8:{start:{line:26,column:8},end:{line:26,column:63}},9:{start:{line:28,column:8},end:{line:28,column:65}},10:{start:{line:30,column:8},end:{line:30,column:65}},11:{start:{line:32,column:8},end:{line:32,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:34,column:3}},line:10}},branchMap:{0:{loc:{start:{line:12,column:4},end:{line:33,column:5}},type:"switch",locations:[{start:{line:13,column:6},end:{line:14,column:69}},{start:{line:15,column:6},end:{line:16,column:63}},{start:{line:17,column:6},end:{line:18,column:63}},{start:{line:19,column:6},end:{line:20,column:63}},{start:{line:21,column:6},end:{line:22,column:63}},{start:{line:23,column:6},end:{line:24,column:69}},{start:{line:25,column:6},end:{line:26,column:63}},{start:{line:27,column:6},end:{line:28,column:65}},{start:{line:29,column:6},end:{line:30,column:65}},{start:{line:31,column:6},end:{line:32,column:66}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0},b:{0:[0,0,0,0,0,0,0,0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx"],names:[],mappings:"AAmBkC;AAnBlC,OAAO,WAAW;AAElB,OAAO,cAAc;AACrB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AAQxB,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY,EAAE,OAAO,KAAK,MAAM,MAAM;AAC5C,YAAO,KAAK,MAAM,MAAM;AAAA,MACxB,KAAK;AAAkB,eAAO,oBAAC,kBAAgB,GAAG,WAAW;AAAA,MAC7D,KAAK;AAAU,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAC/C,KAAK;AAAa,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAClD,KAAK;AAAW,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAChD,KAAK;AAAQ,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAC7C,KAAK;AAAc,eAAO,oBAAC,kBAAgB,GAAG,WAAW;AAAA,MACzD,KAAK;AAAQ,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAC7C,KAAK;AAAU,eAAO,oBAAC,cAAY,GAAG,WAAW;AAAA,MACjD,KAAK;AAAU,eAAO,oBAAC,cAAY,GAAG,WAAW;AAAA,MACjD;AAAS,eAAO,oBAAC,eAAa,GAAG,WAAW;AAAA,IAC5C;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"89bd7eb08374d10a1476c7cf1e0e39f530ce1ff1"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ms=function(){return a},a}ms();class oj extends Mn.Component{render(){ms().f[0]++;const e=(ms().s[0]++,{style:this.props.style});switch(ms().s[1]++,this.props.type){case"fill-extrusion":return ms().b[0][0]++,ms().s[2]++,G.jsx(qT,{...e});case"raster":return ms().b[0][1]++,ms().s[3]++,G.jsx(x2,{...e});case"hillshade":return ms().b[0][2]++,ms().s[4]++,G.jsx(x2,{...e});case"heatmap":return ms().b[0][3]++,ms().s[5]++,G.jsx(x2,{...e});case"fill":return ms().b[0][4]++,ms().s[6]++,G.jsx(x2,{...e});case"background":return ms().b[0][5]++,ms().s[7]++,G.jsx(qT,{...e});case"line":return ms().b[0][6]++,ms().s[8]++,G.jsx(pre,{...e});case"symbol":return ms().b[0][7]++,ms().s[9]++,G.jsx(mre,{...e});case"circle":return ms().b[0][8]++,ms().s[10]++,G.jsx(gre,{...e});default:return ms().b[0][9]++,ms().s[11]++,G.jsx(Ure,{...e})}}}function wr(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",e="ea1e9940e142b9a2a1c672f6983f6f5748c841e6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",statementMap:{0:{start:{line:5,column:18},end:{line:5,column:20}},1:{start:{line:6,column:27},end:{line:6,column:29}},2:{start:{line:7,column:2},end:{line:18,column:5}},3:{start:{line:8,column:22},end:{line:8,column:51}},4:{start:{line:9,column:4},end:{line:17,column:5}},5:{start:{line:10,column:6},end:{line:10,column:43}},6:{start:{line:11,column:28},end:{line:11,column:91}},7:{start:{line:11,column:59},end:{line:11,column:90}},8:{start:{line:12,column:6},end:{line:12,column:65}},9:{start:{line:14,column:6},end:{line:14,column:52}},10:{start:{line:15,column:6},end:{line:15,column:39}},11:{start:{line:16,column:6},end:{line:16,column:45}},12:{start:{line:19,column:2},end:{line:19,column:17}},13:{start:{line:23,column:4},end:{line:25,column:5}},14:{start:{line:24,column:6},end:{line:24,column:13}},15:{start:{line:26,column:4},end:{line:44,column:5}},16:{start:{line:27,column:25},end:{line:27,column:44}},17:{start:{line:28,column:6},end:{line:30,column:7}},18:{start:{line:29,column:8},end:{line:29,column:48}},19:{start:{line:31,column:6},end:{line:33,column:7}},20:{start:{line:32,column:8},end:{line:32,column:48}},21:{start:{line:34,column:6},end:{line:36,column:7}},22:{start:{line:35,column:8},end:{line:35,column:48}},23:{start:{line:37,column:6},end:{line:39,column:7}},24:{start:{line:38,column:8},end:{line:38,column:58}},25:{start:{line:40,column:6},end:{line:40,column:21}},26:{start:{line:42,column:6},end:{line:42,column:63}},27:{start:{line:43,column:6},end:{line:43,column:21}},28:{start:{line:47,column:20},end:{line:47,column:67}},29:{start:{line:48,column:18},end:{line:93,column:6}},30:{start:{line:49,column:21},end:{line:88,column:8}},31:{start:{line:50,column:29},end:{line:50,column:76}},32:{start:{line:51,column:8},end:{line:87,column:10}},33:{start:{line:68,column:20},end:{line:68,column:63}},34:{start:{line:89,column:6},end:{line:92,column:26}},35:{start:{line:94,column:4},end:{line:94,column:102}}},fnMap:{0:{name:"groupFeaturesBySourceLayer",decl:{start:{line:4,column:9},end:{line:4,column:35}},loc:{start:{line:4,column:46},end:{line:20,column:1}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:32},end:{line:18,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:11,column:52},end:{line:11,column:53}},loc:{start:{line:11,column:59},end:{line:11,column:90}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:35},end:{line:45,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:11},end:{line:95,column:3}},line:46},5:{name:"(anonymous_5)",decl:{start:{line:48,column:43},end:{line:48,column:44}},loc:{start:{line:48,column:62},end:{line:93,column:5}},line:48},6:{name:"(anonymous_6)",decl:{start:{line:49,column:48},end:{line:49,column:49}},loc:{start:{line:49,column:66},end:{line:88,column:7}},line:49},7:{name:"(anonymous_7)",decl:{start:{line:67,column:27},end:{line:67,column:28}},loc:{start:{line:67,column:33},end:{line:69,column:19}},line:67}},branchMap:{0:{loc:{start:{line:9,column:4},end:{line:17,column:5}},type:"if",locations:[{start:{line:9,column:4},end:{line:17,column:5}},{start:{line:13,column:11},end:{line:17,column:5}}],line:9},1:{loc:{start:{line:14,column:27},end:{line:14,column:51}},type:"binary-expr",locations:[{start:{line:14,column:27},end:{line:14,column:45}},{start:{line:14,column:49},end:{line:14,column:51}}],line:14},2:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},3:{loc:{start:{line:28,column:6},end:{line:30,column:7}},type:"if",locations:[{start:{line:28,column:6},end:{line:30,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:28},4:{loc:{start:{line:28,column:10},end:{line:28,column:64}},type:"binary-expr",locations:[{start:{line:28,column:10},end:{line:28,column:36}},{start:{line:28,column:40},end:{line:28,column:64}}],line:28},5:{loc:{start:{line:31,column:6},end:{line:33,column:7}},type:"if",locations:[{start:{line:31,column:6},end:{line:33,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},6:{loc:{start:{line:31,column:10},end:{line:31,column:64}},type:"binary-expr",locations:[{start:{line:31,column:10},end:{line:31,column:36}},{start:{line:31,column:40},end:{line:31,column:64}}],line:31},7:{loc:{start:{line:34,column:6},end:{line:36,column:7}},type:"if",locations:[{start:{line:34,column:6},end:{line:36,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:34},8:{loc:{start:{line:34,column:10},end:{line:34,column:64}},type:"binary-expr",locations:[{start:{line:34,column:10},end:{line:34,column:36}},{start:{line:34,column:40},end:{line:34,column:64}}],line:34},9:{loc:{start:{line:37,column:6},end:{line:39,column:7}},type:"if",locations:[{start:{line:37,column:6},end:{line:39,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},10:{loc:{start:{line:37,column:10},end:{line:37,column:84}},type:"binary-expr",locations:[{start:{line:37,column:10},end:{line:37,column:46}},{start:{line:37,column:50},end:{line:37,column:84}}],line:37},11:{loc:{start:{line:71,column:20},end:{line:75,column:24}},type:"binary-expr",locations:[{start:{line:71,column:20},end:{line:71,column:38}},{start:{line:71,column:58},end:{line:75,column:24}}],line:71},12:{loc:{start:{line:77,column:20},end:{line:80,column:24}},type:"binary-expr",locations:[{start:{line:77,column:20},end:{line:77,column:35}},{start:{line:77,column:55},end:{line:80,column:24}}],line:77}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx"],names:[],mappings:"AA8EU,cAkBsB,YAlBtB;AA9EV,OAAO,WAAW;AAClB,OAAO,eAAe;AAGtB,SAAS,2BAA2B,UAA4B;AAC9D,QAAM,UAA6C,CAAC;AAEpD,QAAM,mBAA4C,CAAC;AAEnD,WAAS,QAAQ,aAAW;AAC1B,UAAM,YAAY,QAAQ,MAAM,cAAc;AAC9C,QAAG,OAAO,UAAU,eAAe,KAAK,kBAAkB,QAAQ,MAAM,EAAE,GAAG;AAC3E,uBAAiB,QAAQ,MAAM,EAAE;AAEjC,YAAM,gBAAgB,QAAQ,SAAS,EAAE,KAAK,CAAC,MAAsB,EAAE,MAAM,OAAO,QAAQ,MAAM,EAAE;AAEpG,oBAAe,UAAU,iBAAiB,QAAQ,MAAM,EAAE;AAAA,IAC5D,OAAO;AACL,cAAQ,SAAS,IAAI,QAAQ,SAAS,KAAK,CAAC;AAC5C,cAAQ,SAAS,EAAE,KAAK,OAAO;AAE/B,uBAAiB,QAAQ,MAAM,EAAE,IAAI;AAAA,IACvC;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAQA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,iBAAiB,SAAyB,OAAgB;AAExD,QAAI,CAAC,QAAQ,MAAM,OAAO;AACxB;AAAA,IACF;AAEA,QAAI;AACF,YAAM,aAAa,QAAQ,MAAM;AAEjC,UAAG,gBAAgB,cAAc,WAAW,YAAY,GAAG;AACzD,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,gBAAgB,cAAc,WAAW,YAAY,GAAG;AAC1D,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,gBAAgB,cAAc,WAAW,YAAY,GAAG;AAC1D,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,0BAA0B,cAAc,WAAW,sBAAsB,GAAG;AAC9E,eAAO,OAAO,WAAW,sBAAsB,CAAC;AAAA,MAClD;AAEA,aAAO;AAAA,IACT,SAGO,KAAK;AACV,cAAQ,KAAK,uCAAuC,GAAG;AACvD,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,UAAU,2BAA2B,KAAK,MAAM,QAAQ;AAE9D,UAAM,QAAQ,OAAO,KAAK,OAAO,EAAE,IAAI,mBAAiB;AACtD,YAAM,SAAS,QAAQ,aAAa,EAAE,IAAI,CAAC,SAAyB,QAAgB;AAClF,cAAM,eAAe,KAAK,iBAAiB,SAAS,KAAK,MAAM,IAAI;AAEnE,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,WAAU;AAAA,YAEV;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,OAAO,EAAC,YAAY,aAAY;AAAA;AAAA,cACjC;AAAA,cACD;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,MAAM;AACb,yBAAK,MAAM,cAAc,QAAQ,MAAM,EAAE;AAAA,kBAC3C;AAAA,kBAEC;AAAA,4BAAQ,MAAM,QACb,oBAAC,aAAU,MAAM,QAAQ,MAAM,MAAM,OAAO;AAAA,sBAC1C,OAAO;AAAA,sBACP,QAAQ;AAAA,sBACR,cAAc;AAAA,oBAChB,GAAE;AAAA,oBAEH,QAAQ,MAAM;AAAA,oBACd,QAAQ,WAAW,qBAAC,UAAK;AAAA;AAAA,sBAAI,QAAQ;AAAA,uBAAQ;AAAA;AAAA;AAAA,cAChD;AAAA;AAAA;AAAA,UAtBK;AAAA,QAuBP;AAAA,MACF,CAAC;AACD,aAAO,qBAAC,SACN;AAAA,4BAAC,SAAI,WAAU,2BAA2B,yBAAc;AAAA,QACvD;AAAA,WAFc,aAGjB;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,gCACnB,iBACH;AAAA,EACF;AACF;AAGA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ea1e9940e142b9a2a1c672f6983f6f5748c841e6"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return wr=function(){return a},a}wr();function Rre(n){wr().f[0]++;const e=(wr().s[0]++,{}),t=(wr().s[1]++,{});return wr().s[2]++,n.forEach(r=>{wr().f[1]++;const i=(wr().s[3]++,r.layer["source-layer"]);if(wr().s[4]++,Object.prototype.hasOwnProperty.call(t,r.layer.id)){wr().b[0][0]++,wr().s[5]++,t[r.layer.id]++;const o=(wr().s[6]++,e[i].find(a=>(wr().f[2]++,wr().s[7]++,a.layer.id===r.layer.id)));wr().s[8]++,o.counter=t[r.layer.id]}else wr().b[0][1]++,wr().s[9]++,e[i]=(wr().b[1][0]++,e[i]||(wr().b[1][1]++,[])),wr().s[10]++,e[i].push(r),wr().s[11]++,t[r.layer.id]=1}),wr().s[12]++,e}class aj extends Mn.Component{_getFeatureColor(e,t){if(wr().f[3]++,wr().s[13]++,e.layer.paint)wr().b[2][1]++;else{wr().b[2][0]++,wr().s[14]++;return}wr().s[15]++;try{const r=(wr().s[16]++,e.layer.paint);return wr().s[17]++,wr().b[4][0]++,"text-color"in r&&(wr().b[4][1]++,r["text-color"])?(wr().b[3][0]++,wr().s[18]++,String(r["text-color"])):(wr().b[3][1]++,wr().s[19]++,wr().b[6][0]++,"fill-color"in r&&(wr().b[6][1]++,r["fill-color"])?(wr().b[5][0]++,wr().s[20]++,String(r["fill-color"])):(wr().b[5][1]++,wr().s[21]++,wr().b[8][0]++,"line-color"in r&&(wr().b[8][1]++,r["line-color"])?(wr().b[7][0]++,wr().s[22]++,String(r["line-color"])):(wr().b[7][1]++,wr().s[23]++,wr().b[10][0]++,"fill-extrusion-color"in r&&(wr().b[10][1]++,r["fill-extrusion-color"])?(wr().b[9][0]++,wr().s[24]++,String(r["fill-extrusion-color"])):(wr().b[9][1]++,wr().s[25]++,"black"))))}catch(r){return wr().s[26]++,console.warn("Unable to get feature color, error:",r),wr().s[27]++,"black"}}render(){wr().f[4]++;const e=(wr().s[28]++,Rre(this.props.features)),t=(wr().s[29]++,Object.keys(e).map(r=>{wr().f[5]++;const i=(wr().s[30]++,e[r].map((o,a)=>{wr().f[6]++;const s=(wr().s[31]++,this._getFeatureColor(o,this.props.zoom));return wr().s[32]++,G.jsxs("div",{className:"maputnik-popup-layer",children:[G.jsx("div",{className:"maputnik-popup-layer__swatch",style:{background:s}}),G.jsxs("label",{className:"maputnik-popup-layer__label",onClick:()=>{wr().f[7]++,wr().s[33]++,this.props.onLayerSelect(o.layer.id)},children:[(wr().b[11][0]++,o.layer.type&&(wr().b[11][1]++,G.jsx(oj,{type:o.layer.type,style:{width:14,height:14,paddingRight:3}}))),o.layer.id,(wr().b[12][0]++,o.counter&&(wr().b[12][1]++,G.jsxs("span",{children:[" × ",o.counter]})))]})]},a)}));return wr().s[34]++,G.jsxs("div",{children:[G.jsx("div",{className:"maputnik-popup-layer-id",children:r}),i]},r)}));return wr().s[35]++,G.jsx("div",{className:"maputnik-feature-layer-popup",children:t})}}function gi(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",e="5f5bcb15b740e85b8bed2fa7ce2308584d19f10e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",statementMap:{0:{start:{line:4,column:2},end:{line:5,column:17}},1:{start:{line:5,column:4},end:{line:5,column:17}},2:{start:{line:6,column:2},end:{line:7,column:34}},3:{start:{line:7,column:4},end:{line:7,column:34}},4:{start:{line:8,column:2},end:{line:9,column:28}},5:{start:{line:9,column:4},end:{line:9,column:28}},6:{start:{line:10,column:2},end:{line:10,column:15}},7:{start:{line:13,column:2},end:{line:16,column:12}},8:{start:{line:19,column:2},end:{line:35,column:12}},9:{start:{line:32,column:23},end:{line:32,column:55}},10:{start:{line:33,column:6},end:{line:33,column:74}},11:{start:{line:38,column:25},end:{line:38,column:27}},12:{start:{line:39,column:2},end:{line:52,column:5}},13:{start:{line:40,column:25},end:{line:42,column:6}},14:{start:{line:41,column:6},end:{line:41,column:156}},15:{start:{line:43,column:4},end:{line:51,column:5}},16:{start:{line:44,column:6},end:{line:44,column:35}},17:{start:{line:46,column:6},end:{line:50,column:7}},18:{start:{line:47,column:8},end:{line:47,column:58}},19:{start:{line:49,column:8},end:{line:49,column:60}},20:{start:{line:53,column:2},end:{line:53,column:24}},21:{start:{line:57,column:21},end:{line:57,column:66}},22:{start:{line:58,column:4},end:{line:58,column:250}}},fnMap:{0:{name:"displayValue",decl:{start:{line:3,column:9},end:{line:3,column:21}},loc:{start:{line:3,column:29},end:{line:11,column:1}},line:3},1:{name:"renderKeyValueTableRow",decl:{start:{line:12,column:9},end:{line:12,column:31}},loc:{start:{line:12,column:44},end:{line:17,column:1}},line:12},2:{name:"renderFeature",decl:{start:{line:18,column:9},end:{line:18,column:22}},loc:{start:{line:18,column:37},end:{line:36,column:1}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:31,column:40},end:{line:31,column:41}},loc:{start:{line:31,column:58},end:{line:34,column:5}},line:31},4:{name:"removeDuplicatedFeatures",decl:{start:{line:37,column:9},end:{line:37,column:33}},loc:{start:{line:37,column:44},end:{line:54,column:1}},line:37},5:{name:"(anonymous_5)",decl:{start:{line:39,column:19},end:{line:39,column:20}},loc:{start:{line:39,column:32},end:{line:52,column:3}},line:39},6:{name:"(anonymous_6)",decl:{start:{line:40,column:50},end:{line:40,column:51}},loc:{start:{line:40,column:64},end:{line:42,column:5}},line:40},7:{name:"(anonymous_7)",decl:{start:{line:56,column:2},end:{line:56,column:3}},loc:{start:{line:56,column:11},end:{line:59,column:3}},line:56}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:5,column:17}},type:"if",locations:[{start:{line:4,column:2},end:{line:5,column:17}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:4},1:{loc:{start:{line:4,column:6},end:{line:4,column:52}},type:"binary-expr",locations:[{start:{line:4,column:6},end:{line:4,column:34}},{start:{line:4,column:38},end:{line:4,column:52}}],line:4},2:{loc:{start:{line:6,column:2},end:{line:7,column:34}},type:"if",locations:[{start:{line:6,column:2},end:{line:7,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},3:{loc:{start:{line:8,column:2},end:{line:9,column:28}},type:"if",locations:[{start:{line:8,column:2},end:{line:9,column:28}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:8},4:{loc:{start:{line:8,column:6},end:{line:8,column:89}},type:"binary-expr",locations:[{start:{line:8,column:6},end:{line:8,column:31}},{start:{line:8,column:35},end:{line:8,column:60}},{start:{line:8,column:64},end:{line:8,column:89}}],line:8},5:{loc:{start:{line:24,column:6},end:{line:27,column:10}},type:"binary-expr",locations:[{start:{line:24,column:6},end:{line:24,column:32}},{start:{line:24,column:52},end:{line:27,column:10}}],line:24},6:{loc:{start:{line:41,column:13},end:{line:41,column:155}},type:"binary-expr",locations:[{start:{line:41,column:13},end:{line:41,column:77}},{start:{line:41,column:81},end:{line:41,column:155}}],line:41},7:{loc:{start:{line:43,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:43,column:4},end:{line:51,column:5}},{start:{line:45,column:11},end:{line:51,column:5}}],line:43},8:{loc:{start:{line:46,column:6},end:{line:50,column:7}},type:"if",locations:[{start:{line:46,column:6},end:{line:50,column:7}},{start:{line:48,column:13},end:{line:50,column:7}}],line:46}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx"],names:[],mappings:"AAkBS,SACL,KADK;AAlBT,OAAO,WAAW;AAQlB,SAAS,aAAa,OAAoD;AACxE,MAAI,OAAO,UAAU,eAAe,UAAU;AAAM,WAAO;AAC3D,MAAI,iBAAiB;AAAM,WAAO,MAAM,eAAe;AACvD,MAAI,OAAO,UAAU,YACb,OAAO,UAAU,YACjB,OAAO,UAAU;AAAU,WAAO,MAAM,SAAS;AACzD,SAAO;AACT;AAEA,SAAS,uBAAuB,KAAa,OAA2B;AACtE,SAAO,qBAAC,QACN;AAAA,wBAAC,QAAG,WAAU,6BAA6B,eAAI;AAAA,IAC/C,oBAAC,QAAG,WAAU,6BAA6B,iBAAM;AAAA,OAFnC,GAGhB;AACF;AAEA,SAAS,cAAc,SAAyB,KAAa;AAC3D,SAAO,qBAAC,MAAM,UAAN,EACN;AAAA,wBAAC,QACC,+BAAC,QAAG,SAAS,GAAG,WAAU,2BAA2B;AAAA,cAAQ,MAAM,QAAQ;AAAA,MAAE;AAAA,MAAG,QAAQ,MAAM,cAAc;AAAA,MAAG,QAAQ,sBAAsB,qBAAC,UAAK;AAAA;AAAA,QAAI,QAAQ;AAAA,SAAmB;AAAA,OAAQ,GAC5L;AAAA,IACC,uBAAuB,SAAS,QAAQ,SAAS,IAAI;AAAA,IACrD,uBAAuB,OAAO,aAAa,QAAQ,EAAE,CAAC;AAAA,IACtD,OAAO,KAAK,QAAQ,UAAU,EAAE,IAAI,kBAAgB;AACnD,YAAM,WAAW,QAAQ,WAAW,YAAY;AAChD,aAAO,uBAAuB,cAAc,aAAa,QAAQ,CAAC;AAAA,IACpE,CAAC;AAAA,OATyB,GAU5B;AACF;AAEA,SAAS,yBAAyB,UAA4B;AAC5D,QAAM,iBAAmC,CAAC;AAE1C,WAAS,QAAQ,aAAW;AAC1B,UAAM,eAAe,eAAe,UAAU,cAAY;AACxD,aAAO,QAAQ,MAAM,cAAc,MAAM,SAAS,MAAM,cAAc,KACjE,KAAK,UAAU,QAAQ,UAAU,MAAM,KAAK,UAAU,SAAS,UAAU;AAAA,IAChF,CAAC;AAED,QAAG,iBAAiB,IAAI;AACtB,qBAAe,KAAK,OAAO;AAAA,IAC7B,OAAO;AACL,UAAG,wBAAwB,eAAe,YAAY,GAAG;AACvD,uBAAe,YAAY,EAAE;AAAA,MAC/B,OAAO;AACL,uBAAe,YAAY,EAAE,qBAAqB;AAAA,MACpD;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAMA,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,WAAW,yBAAyB,KAAK,MAAM,QAAQ;AAC7D,WAAO,oBAAC,SAAI,WAAU,mCACpB,8BAAC,WAAM,WAAU,wBACf,8BAAC,WACE,mBAAS,IAAI,aAAa,GAC7B,GACF,GACF;AAAA,EACF;AACF;AAGA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"5f5bcb15b740e85b8bed2fa7ce2308584d19f10e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return gi=function(){return a},a}gi();function VT(n){return gi().f[0]++,gi().s[0]++,gi().b[1][0]++,typeof n>"u"||(gi().b[1][1]++,n===null)?(gi().b[0][0]++,gi().s[1]++,n):(gi().b[0][1]++,gi().s[2]++,n instanceof Date?(gi().b[2][0]++,gi().s[3]++,n.toLocaleString()):(gi().b[2][1]++,gi().s[4]++,gi().b[4][0]++,typeof n=="object"||(gi().b[4][1]++,typeof n=="number")||(gi().b[4][2]++,typeof n=="string")?(gi().b[3][0]++,gi().s[5]++,n.toString()):(gi().b[3][1]++,gi().s[6]++,n)))}function KS(n,e){return gi().f[1]++,gi().s[7]++,G.jsxs("tr",{children:[G.jsx("td",{className:"maputnik-popup-table-cell",children:n}),G.jsx("td",{className:"maputnik-popup-table-cell",children:e})]},n)}function zre(n,e){return gi().f[2]++,gi().s[8]++,G.jsxs(Mn.Fragment,{children:[G.jsx("tr",{children:G.jsxs("td",{colSpan:2,className:"maputnik-popup-layer-id",children:[n.layer.source,": ",n.layer["source-layer"],(gi().b[5][0]++,n.inspectModeCounter&&(gi().b[5][1]++,G.jsxs("span",{children:[" × ",n.inspectModeCounter]})))]})}),KS("$type",n.geometry.type),KS("$id",VT(n.id)),Object.keys(n.properties).map(t=>{gi().f[3]++;const r=(gi().s[9]++,n.properties[t]);return gi().s[10]++,KS(t,VT(r))})]},e)}function jre(n){gi().f[4]++;const e=(gi().s[11]++,[]);return gi().s[12]++,n.forEach(t=>{gi().f[5]++;const r=(gi().s[13]++,e.findIndex(i=>(gi().f[6]++,gi().s[14]++,gi().b[6][0]++,t.layer["source-layer"]===i.layer["source-layer"]&&(gi().b[6][1]++,JSON.stringify(t.properties)===JSON.stringify(i.properties)))));gi().s[15]++,r===-1?(gi().b[7][0]++,gi().s[16]++,e.push(t)):(gi().b[7][1]++,gi().s[17]++,"inspectModeCounter"in e[r]?(gi().b[8][0]++,gi().s[18]++,e[r].inspectModeCounter++):(gi().b[8][1]++,gi().s[19]++,e[r].inspectModeCounter=2))}),gi().s[20]++,e}class Nre extends Mn.Component{render(){gi().f[7]++;const e=(gi().s[21]++,jre(this.props.features));return gi().s[22]++,G.jsx("div",{className:"maputnik-feature-property-popup",children:G.jsx("table",{className:"maputnik-popup-table",children:G.jsx("tbody",{children:e.map(zre)})})})}}var sj={exports:{}},lj={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},uj={exports:{}},Wre=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},Gre=Wre,$re=Array.prototype.concat,Qre=Array.prototype.slice,HT=uj.exports=function(e){for(var t=[],r=0,i=e.length;r<i;r++){var o=e[r];Gre(o)?t=$re.call(t,Qre.call(o)):t.push(o)}return t};HT.wrap=function(n){return function(){return n(HT(arguments))}};var Yre=uj.exports,__=lj,Rb=Yre,Aj=Object.hasOwnProperty,cj=Object.create(null);for(var PS in __)Aj.call(__,PS)&&(cj[__[PS]]=PS);var Jc=sj.exports={to:{},get:{}};Jc.get=function(n){var e=n.substring(0,3).toLowerCase(),t,r;switch(e){case"hsl":t=Jc.get.hsl(n),r="hsl";break;case"hwb":t=Jc.get.hwb(n),r="hwb";break;default:t=Jc.get.rgb(n),r="rgb";break}return t?{model:r,value:t}:null};Jc.get.rgb=function(n){if(!n)return null;var e=/^#([a-f0-9]{3,4})$/i,t=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,a=[0,0,0,1],s,d,f;if(s=n.match(t)){for(f=s[2],s=s[1],d=0;d<3;d++){var C=d*2;a[d]=parseInt(s.slice(C,C+2),16)}f&&(a[3]=parseInt(f,16)/255)}else if(s=n.match(e)){for(s=s[1],f=s[3],d=0;d<3;d++)a[d]=parseInt(s[d]+s[d],16);f&&(a[3]=parseInt(f+f,16)/255)}else if(s=n.match(r)){for(d=0;d<3;d++)a[d]=parseInt(s[d+1],0);s[4]&&(s[5]?a[3]=parseFloat(s[4])*.01:a[3]=parseFloat(s[4]))}else if(s=n.match(i)){for(d=0;d<3;d++)a[d]=Math.round(parseFloat(s[d+1])*2.55);s[4]&&(s[5]?a[3]=parseFloat(s[4])*.01:a[3]=parseFloat(s[4]))}else return(s=n.match(o))?s[1]==="transparent"?[0,0,0,0]:Aj.call(__,s[1])?(a=__[s[1]],a[3]=1,a):null:null;for(d=0;d<3;d++)a[d]=n0(a[d],0,255);return a[3]=n0(a[3],0,1),a};Jc.get.hsl=function(n){if(!n)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=n.match(e);if(t){var r=parseFloat(t[4]),i=(parseFloat(t[1])%360+360)%360,o=n0(parseFloat(t[2]),0,100),a=n0(parseFloat(t[3]),0,100),s=n0(isNaN(r)?1:r,0,1);return[i,o,a,s]}return null};Jc.get.hwb=function(n){if(!n)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=n.match(e);if(t){var r=parseFloat(t[4]),i=(parseFloat(t[1])%360+360)%360,o=n0(parseFloat(t[2]),0,100),a=n0(parseFloat(t[3]),0,100),s=n0(isNaN(r)?1:r,0,1);return[i,o,a,s]}return null};Jc.to.hex=function(){var n=Rb(arguments);return"#"+w2(n[0])+w2(n[1])+w2(n[2])+(n[3]<1?w2(Math.round(n[3]*255)):"")};Jc.to.rgb=function(){var n=Rb(arguments);return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};Jc.to.rgb.percent=function(){var n=Rb(arguments),e=Math.round(n[0]/255*100),t=Math.round(n[1]/255*100),r=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+e+"%, "+t+"%, "+r+"%)":"rgba("+e+"%, "+t+"%, "+r+"%, "+n[3]+")"};Jc.to.hsl=function(){var n=Rb(arguments);return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};Jc.to.hwb=function(){var n=Rb(arguments),e="";return n.length>=4&&n[3]!==1&&(e=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+e+")"};Jc.to.keyword=function(n){return cj[n.slice(0,3)]};function n0(n,e,t){return Math.min(Math.max(e,n),t)}function w2(n){var e=Math.round(n).toString(16).toUpperCase();return e.length<2?"0"+e:e}var qre=sj.exports;const ab=lj,dj={};for(const n of Object.keys(ab))dj[ab[n]]=n;const $r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var hj=$r;for(const n of Object.keys($r)){if(!("channels"in $r[n]))throw new Error("missing channels property: "+n);if(!("labels"in $r[n]))throw new Error("missing channel labels property: "+n);if($r[n].labels.length!==$r[n].channels)throw new Error("channel and label counts mismatch: "+n);const{channels:e,labels:t}=$r[n];delete $r[n].channels,delete $r[n].labels,Object.defineProperty($r[n],"channels",{value:e}),Object.defineProperty($r[n],"labels",{value:t})}$r.rgb.hsl=function(n){const e=n[0]/255,t=n[1]/255,r=n[2]/255,i=Math.min(e,t,r),o=Math.max(e,t,r),a=o-i;let s,d;o===i?s=0:e===o?s=(t-r)/a:t===o?s=2+(r-e)/a:r===o&&(s=4+(e-t)/a),s=Math.min(s*60,360),s<0&&(s+=360);const f=(i+o)/2;return o===i?d=0:f<=.5?d=a/(o+i):d=a/(2-o-i),[s,d*100,f*100]};$r.rgb.hsv=function(n){let e,t,r,i,o;const a=n[0]/255,s=n[1]/255,d=n[2]/255,f=Math.max(a,s,d),C=f-Math.min(a,s,d),O=function(E){return(f-E)/6/C+1/2};return C===0?(i=0,o=0):(o=C/f,e=O(a),t=O(s),r=O(d),a===f?i=r-t:s===f?i=1/3+e-r:d===f&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,f*100]};$r.rgb.hwb=function(n){const e=n[0],t=n[1];let r=n[2];const i=$r.rgb.hsl(n)[0],o=1/255*Math.min(e,Math.min(t,r));return r=1-1/255*Math.max(e,Math.max(t,r)),[i,o*100,r*100]};$r.rgb.cmyk=function(n){const e=n[0]/255,t=n[1]/255,r=n[2]/255,i=Math.min(1-e,1-t,1-r),o=(1-e-i)/(1-i)||0,a=(1-t-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[o*100,a*100,s*100,i*100]};function Vre(n,e){return(n[0]-e[0])**2+(n[1]-e[1])**2+(n[2]-e[2])**2}$r.rgb.keyword=function(n){const e=dj[n];if(e)return e;let t=1/0,r;for(const i of Object.keys(ab)){const o=ab[i],a=Vre(n,o);a<t&&(t=a,r=i)}return r};$r.keyword.rgb=function(n){return ab[n]};$r.rgb.xyz=function(n){let e=n[0]/255,t=n[1]/255,r=n[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=e*.4124+t*.3576+r*.1805,o=e*.2126+t*.7152+r*.0722,a=e*.0193+t*.1192+r*.9505;return[i*100,o*100,a*100]};$r.rgb.lab=function(n){const e=$r.rgb.xyz(n);let t=e[0],r=e[1],i=e[2];t/=95.047,r/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,a=500*(t-r),s=200*(r-i);return[o,a,s]};$r.hsl.rgb=function(n){const e=n[0]/360,t=n[1]/100,r=n[2]/100;let i,o,a;if(t===0)return a=r*255,[a,a,a];r<.5?i=r*(1+t):i=r+t-r*t;const s=2*r-i,d=[0,0,0];for(let f=0;f<3;f++)o=e+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?a=s+(i-s)*6*o:2*o<1?a=i:3*o<2?a=s+(i-s)*(2/3-o)*6:a=s,d[f]=a*255;return d};$r.hsl.hsv=function(n){const e=n[0];let t=n[1]/100,r=n[2]/100,i=t;const o=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,i*=o<=1?o:2-o;const a=(r+t)/2,s=r===0?2*i/(o+i):2*t/(r+t);return[e,s*100,a*100]};$r.hsv.rgb=function(n){const e=n[0]/60,t=n[1]/100;let r=n[2]/100;const i=Math.floor(e)%6,o=e-Math.floor(e),a=255*r*(1-t),s=255*r*(1-t*o),d=255*r*(1-t*(1-o));switch(r*=255,i){case 0:return[r,d,a];case 1:return[s,r,a];case 2:return[a,r,d];case 3:return[a,s,r];case 4:return[d,a,r];case 5:return[r,a,s]}};$r.hsv.hsl=function(n){const e=n[0],t=n[1]/100,r=n[2]/100,i=Math.max(r,.01);let o,a;a=(2-t)*r;const s=(2-t)*i;return o=t*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,o*100,a*100]};$r.hwb.rgb=function(n){const e=n[0]/360;let t=n[1]/100,r=n[2]/100;const i=t+r;let o;i>1&&(t/=i,r/=i);const a=Math.floor(6*e),s=1-r;o=6*e-a,a&1&&(o=1-o);const d=t+o*(s-t);let f,C,O;switch(a){default:case 6:case 0:f=s,C=d,O=t;break;case 1:f=d,C=s,O=t;break;case 2:f=t,C=s,O=d;break;case 3:f=t,C=d,O=s;break;case 4:f=d,C=t,O=s;break;case 5:f=s,C=t,O=d;break}return[f*255,C*255,O*255]};$r.cmyk.rgb=function(n){const e=n[0]/100,t=n[1]/100,r=n[2]/100,i=n[3]/100,o=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[o*255,a*255,s*255]};$r.xyz.rgb=function(n){const e=n[0]/100,t=n[1]/100,r=n[2]/100;let i,o,a;return i=e*3.2406+t*-1.5372+r*-.4986,o=e*-.9689+t*1.8758+r*.0415,a=e*.0557+t*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[i*255,o*255,a*255]};$r.xyz.lab=function(n){let e=n[0],t=n[1],r=n[2];e/=95.047,t/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*t-16,o=500*(e-t),a=200*(t-r);return[i,o,a]};$r.lab.xyz=function(n){const e=n[0],t=n[1],r=n[2];let i,o,a;o=(e+16)/116,i=t/500+o,a=o-r/200;const s=o**3,d=i**3,f=a**3;return o=s>.008856?s:(o-16/116)/7.787,i=d>.008856?d:(i-16/116)/7.787,a=f>.008856?f:(a-16/116)/7.787,i*=95.047,o*=100,a*=108.883,[i,o,a]};$r.lab.lch=function(n){const e=n[0],t=n[1],r=n[2];let i;i=Math.atan2(r,t)*360/2/Math.PI,i<0&&(i+=360);const a=Math.sqrt(t*t+r*r);return[e,a,i]};$r.lch.lab=function(n){const e=n[0],t=n[1],i=n[2]/360*2*Math.PI,o=t*Math.cos(i),a=t*Math.sin(i);return[e,o,a]};$r.rgb.ansi16=function(n,e=null){const[t,r,i]=n;let o=e===null?$r.rgb.hsv(n)[2]:e;if(o=Math.round(o/50),o===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return o===2&&(a+=60),a};$r.hsv.ansi16=function(n){return $r.rgb.ansi16($r.hsv.rgb(n),n[2])};$r.rgb.ansi256=function(n){const e=n[0],t=n[1],r=n[2];return e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5)};$r.ansi16.rgb=function(n){let e=n%10;if(e===0||e===7)return n>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const t=(~~(n>50)+1)*.5,r=(e&1)*t*255,i=(e>>1&1)*t*255,o=(e>>2&1)*t*255;return[r,i,o]};$r.ansi256.rgb=function(n){if(n>=232){const o=(n-232)*10+8;return[o,o,o]}n-=16;let e;const t=Math.floor(n/36)/5*255,r=Math.floor((e=n%36)/6)/5*255,i=e%6/5*255;return[t,r,i]};$r.rgb.hex=function(n){const t=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};$r.hex.rgb=function(n){const e=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=t.split("").map(s=>s+s).join(""));const r=parseInt(t,16),i=r>>16&255,o=r>>8&255,a=r&255;return[i,o,a]};$r.rgb.hcg=function(n){const e=n[0]/255,t=n[1]/255,r=n[2]/255,i=Math.max(Math.max(e,t),r),o=Math.min(Math.min(e,t),r),a=i-o;let s,d;return a<1?s=o/(1-a):s=0,a<=0?d=0:i===e?d=(t-r)/a%6:i===t?d=2+(r-e)/a:d=4+(e-t)/a,d/=6,d%=1,[d*360,a*100,s*100]};$r.hsl.hcg=function(n){const e=n[1]/100,t=n[2]/100,r=t<.5?2*e*t:2*e*(1-t);let i=0;return r<1&&(i=(t-.5*r)/(1-r)),[n[0],r*100,i*100]};$r.hsv.hcg=function(n){const e=n[1]/100,t=n[2]/100,r=e*t;let i=0;return r<1&&(i=(t-r)/(1-r)),[n[0],r*100,i*100]};$r.hcg.rgb=function(n){const e=n[0]/360,t=n[1]/100,r=n[2]/100;if(t===0)return[r*255,r*255,r*255];const i=[0,0,0],o=e%1*6,a=o%1,s=1-a;let d=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return d=(1-t)*r,[(t*i[0]+d)*255,(t*i[1]+d)*255,(t*i[2]+d)*255]};$r.hcg.hsv=function(n){const e=n[1]/100,t=n[2]/100,r=e+t*(1-e);let i=0;return r>0&&(i=e/r),[n[0],i*100,r*100]};$r.hcg.hsl=function(n){const e=n[1]/100,r=n[2]/100*(1-e)+.5*e;let i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[n[0],i*100,r*100]};$r.hcg.hwb=function(n){const e=n[1]/100,t=n[2]/100,r=e+t*(1-e);return[n[0],(r-e)*100,(1-r)*100]};$r.hwb.hcg=function(n){const e=n[1]/100,r=1-n[2]/100,i=r-e;let o=0;return i<1&&(o=(r-i)/(1-i)),[n[0],i*100,o*100]};$r.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};$r.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};$r.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};$r.gray.hsl=function(n){return[0,0,n[0]]};$r.gray.hsv=$r.gray.hsl;$r.gray.hwb=function(n){return[0,100,n[0]]};$r.gray.cmyk=function(n){return[0,0,0,n[0]]};$r.gray.lab=function(n){return[n[0],0,0]};$r.gray.hex=function(n){const e=Math.round(n[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};$r.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};const M4=hj;function Hre(){const n={},e=Object.keys(M4);for(let t=e.length,r=0;r<t;r++)n[e[r]]={distance:-1,parent:null};return n}function Zre(n){const e=Hre(),t=[n];for(e[n].distance=0;t.length;){const r=t.pop(),i=Object.keys(M4[r]);for(let o=i.length,a=0;a<o;a++){const s=i[a],d=e[s];d.distance===-1&&(d.distance=e[r].distance+1,d.parent=r,t.unshift(s))}}return e}function Xre(n,e){return function(t){return e(n(t))}}function Jre(n,e){const t=[e[n].parent,n];let r=M4[e[n].parent][n],i=e[n].parent;for(;e[i].parent;)t.unshift(e[i].parent),r=Xre(M4[e[i].parent][i],r),i=e[i].parent;return r.conversion=t,r}var eie=function(n){const e=Zre(n),t={},r=Object.keys(e);for(let i=r.length,o=0;o<i;o++){const a=r[o];e[a].parent!==null&&(t[a]=Jre(a,e))}return t};const dO=hj,tie=eie,Vg={},nie=Object.keys(dO);function rie(n){const e=function(...t){const r=t[0];return r==null?r:(r.length>1&&(t=r),n(t))};return"conversion"in n&&(e.conversion=n.conversion),e}function iie(n){const e=function(...t){const r=t[0];if(r==null)return r;r.length>1&&(t=r);const i=n(t);if(typeof i=="object")for(let o=i.length,a=0;a<o;a++)i[a]=Math.round(i[a]);return i};return"conversion"in n&&(e.conversion=n.conversion),e}nie.forEach(n=>{Vg[n]={},Object.defineProperty(Vg[n],"channels",{value:dO[n].channels}),Object.defineProperty(Vg[n],"labels",{value:dO[n].labels});const e=tie(n);Object.keys(e).forEach(r=>{const i=e[r];Vg[n][r]=iie(i),Vg[n][r].raw=rie(i)})});var oie=Vg;const Hg=qre,Hc=oie,fj=["keyword","gray","hex"],hO={};for(const n of Object.keys(Hc))hO[[...Hc[n].labels].sort().join("")]=n;const S4={};function _u(n,e){if(!(this instanceof _u))return new _u(n,e);if(e&&e in fj&&(e=null),e&&!(e in Hc))throw new Error("Unknown model: "+e);let t,r;if(n==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(n instanceof _u)this.model=n.model,this.color=[...n.color],this.valpha=n.valpha;else if(typeof n=="string"){const i=Hg.get(n);if(i===null)throw new Error("Unable to parse color from string: "+n);this.model=i.model,r=Hc[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(n.length>0){this.model=e||"rgb",r=Hc[this.model].channels;const i=Array.prototype.slice.call(n,0,r);this.color=fO(i,r),this.valpha=typeof n[r]=="number"?n[r]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(n);"alpha"in n&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);const o=i.sort().join("");if(!(o in hO))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=hO[o];const{labels:a}=Hc[this.model],s=[];for(t=0;t<a.length;t++)s.push(n[a[t]]);this.color=fO(s)}if(S4[this.model])for(r=Hc[this.model].channels,t=0;t<r;t++){const i=S4[this.model][t];i&&(this.color[t]=i(this.color[t]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}_u.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(n){let e=this.model in Hg.to?this:this.rgb();e=e.round(typeof n=="number"?n:1);const t=e.valpha===1?e.color:[...e.color,this.valpha];return Hg.to[e.model](t)},percentString(n){const e=this.rgb().round(typeof n=="number"?n:1),t=e.valpha===1?e.color:[...e.color,this.valpha];return Hg.to.rgb.percent(t)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const n={},{channels:e}=Hc[this.model],{labels:t}=Hc[this.model];for(let r=0;r<e;r++)n[t[r]]=this.color[r];return this.valpha!==1&&(n.alpha=this.valpha),n},unitArray(){const n=this.rgb().color;return n[0]/=255,n[1]/=255,n[2]/=255,this.valpha!==1&&n.push(this.valpha),n},unitObject(){const n=this.rgb().object();return n.r/=255,n.g/=255,n.b/=255,this.valpha!==1&&(n.alpha=this.valpha),n},round(n){return n=Math.max(n||0,0),new _u([...this.color.map(sie(n)),this.valpha],this.model)},alpha(n){return n!==void 0?new _u([...this.color,Math.max(0,Math.min(1,n))],this.model):this.valpha},red:rl("rgb",0,Yl(255)),green:rl("rgb",1,Yl(255)),blue:rl("rgb",2,Yl(255)),hue:rl(["hsl","hsv","hsl","hwb","hcg"],0,n=>(n%360+360)%360),saturationl:rl("hsl",1,Yl(100)),lightness:rl("hsl",2,Yl(100)),saturationv:rl("hsv",1,Yl(100)),value:rl("hsv",2,Yl(100)),chroma:rl("hcg",1,Yl(100)),gray:rl("hcg",2,Yl(100)),white:rl("hwb",1,Yl(100)),wblack:rl("hwb",2,Yl(100)),cyan:rl("cmyk",0,Yl(100)),magenta:rl("cmyk",1,Yl(100)),yellow:rl("cmyk",2,Yl(100)),black:rl("cmyk",3,Yl(100)),x:rl("xyz",0,Yl(95.047)),y:rl("xyz",1,Yl(100)),z:rl("xyz",2,Yl(108.833)),l:rl("lab",0,Yl(100)),a:rl("lab",1),b:rl("lab",2),keyword(n){return n!==void 0?new _u(n):Hc[this.model].keyword(this.color)},hex(n){return n!==void 0?new _u(n):Hg.to.hex(this.rgb().round().color)},hexa(n){if(n!==void 0)return new _u(n);const e=this.rgb().round().color;let t=Math.round(this.valpha*255).toString(16).toUpperCase();return t.length===1&&(t="0"+t),Hg.to.hex(e)+t},rgbNumber(){const n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){const n=this.rgb().color,e=[];for(const[t,r]of n.entries()){const i=r/255;e[t]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(n){const e=this.luminosity(),t=n.luminosity();return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)},level(n){const e=this.contrast(n);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const n=this.rgb();for(let e=0;e<3;e++)n.color[e]=255-n.color[e];return n},lighten(n){const e=this.hsl();return e.color[2]+=e.color[2]*n,e},darken(n){const e=this.hsl();return e.color[2]-=e.color[2]*n,e},saturate(n){const e=this.hsl();return e.color[1]+=e.color[1]*n,e},desaturate(n){const e=this.hsl();return e.color[1]-=e.color[1]*n,e},whiten(n){const e=this.hwb();return e.color[1]+=e.color[1]*n,e},blacken(n){const e=this.hwb();return e.color[2]+=e.color[2]*n,e},grayscale(){const n=this.rgb().color,e=n[0]*.3+n[1]*.59+n[2]*.11;return _u.rgb(e,e,e)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){const e=this.hsl();let t=e.color[0];return t=(t+n)%360,t=t<0?360+t:t,e.color[0]=t,e},mix(n,e){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);const t=n.rgb(),r=this.rgb(),i=e===void 0?.5:e,o=2*i-1,a=t.alpha()-r.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,d=1-s;return _u.rgb(s*t.red()+d*r.red(),s*t.green()+d*r.green(),s*t.blue()+d*r.blue(),t.alpha()*i+r.alpha()*(1-i))}};for(const n of Object.keys(Hc)){if(fj.includes(n))continue;const{channels:e}=Hc[n];_u.prototype[n]=function(...t){return this.model===n?new _u(this):t.length>0?new _u(t,n):new _u([...lie(Hc[this.model][n].raw(this.color)),this.valpha],n)},_u[n]=function(...t){let r=t[0];return typeof r=="number"&&(r=fO(t,e)),new _u(r,n)}}function aie(n,e){return Number(n.toFixed(e))}function sie(n){return function(e){return aie(e,n)}}function rl(n,e,t){n=Array.isArray(n)?n:[n];for(const r of n)(S4[r]||(S4[r]=[]))[e]=t;return n=n[0],function(r){let i;return r!==void 0?(t&&(r=t(r)),i=this[n](),i.color[e]=r,i):(i=this[n]().color[e],t&&(i=t(i)),i)}}function Yl(n){return function(e){return Math.max(0,Math.min(n,e))}}function lie(n){return Array.isArray(n)?n:[n]}function fO(n,e){for(let t=0;t<e;t++)typeof n[t]!="number"&&(n[t]=0);return n}var uie=_u;const pO=Ba(uie);function oa(){var n="/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",e="7d1173fb58dfe835db182403e5b1912f28c6db11",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",statementMap:{0:{start:{line:3,column:4},end:{line:3,column:23}},1:{start:{line:5,column:9},end:{line:5,column:15}},2:{start:{line:6,column:15},end:{line:6,column:21}},3:{start:{line:7,column:12},end:{line:7,column:16}},4:{start:{line:9,column:4},end:{line:9,column:20}},5:{start:{line:10,column:4},end:{line:10,column:52}},6:{start:{line:11,column:4},end:{line:11,column:93}},7:{start:{line:12,column:4},end:{line:12,column:70}},8:{start:{line:13,column:4},end:{line:15,column:6}},9:{start:{line:16,column:4},end:{line:16,column:57}},10:{start:{line:17,column:4},end:{line:17,column:29}},11:{start:{line:18,column:4},end:{line:18,column:27}},12:{start:{line:21,column:4},end:{line:21,column:60}},13:{start:{line:24,column:4},end:{line:24,column:57}},14:{start:{line:24,column:33},end:{line:24,column:55}},15:{start:{line:25,column:4},end:{line:25,column:57}},16:{start:{line:25,column:33},end:{line:25,column:55}},17:{start:{line:26,column:4},end:{line:26,column:58}},18:{start:{line:26,column:34},end:{line:26,column:56}},19:{start:{line:29,column:4},end:{line:29,column:60}},20:{start:{line:30,column:4},end:{line:30,column:23}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:2,column:2},end:{line:2,column:3}},loc:{start:{line:2,column:21},end:{line:4,column:3}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:13},end:{line:19,column:3}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:20},end:{line:22,column:3}},line:20},3:{name:"(anonymous_3)",decl:{start:{line:23,column:2},end:{line:23,column:3}},loc:{start:{line:23,column:22},end:{line:27,column:3}},line:23},4:{name:"(anonymous_4)",decl:{start:{line:24,column:27},end:{line:24,column:28}},loc:{start:{line:24,column:33},end:{line:24,column:55}},line:24},5:{name:"(anonymous_5)",decl:{start:{line:25,column:27},end:{line:25,column:28}},loc:{start:{line:25,column:33},end:{line:25,column:55}},line:25},6:{name:"(anonymous_6)",decl:{start:{line:26,column:28},end:{line:26,column:29}},loc:{start:{line:26,column:34},end:{line:26,column:56}},line:26},7:{name:"(anonymous_7)",decl:{start:{line:28,column:2},end:{line:28,column:3}},loc:{start:{line:28,column:13},end:{line:31,column:3}},line:28}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts"],names:[],mappings:"AAEA,qBAAqB,YAAY;AAAA,EAK/B,YAAmB,OAAe;AAAf;AAAA,EAAgB;AAAA,EAJnC,OAAuB;AAAA,EACvB,aAAyC;AAAA,EACzC,UAAkC;AAAA,EAIlC,MAAM,KAAU;AACd,SAAK,OAAO;AACZ,SAAK,aAAa,SAAS,cAAc,KAAK;AAC9C,SAAK,WAAW,YAAY;AAC5B,SAAK,WAAW,aAAa,eAAe,oBAAoB;AAChE,SAAK,WAAW,YAAY;AAAA,QACxB,KAAK,KAAK;AAAA;AAEd,SAAK,UAAU,KAAK,WAAW,cAAc,MAAM;AAEnD,SAAK,kBAAkB;AAEvB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,kBAAkB;AAChB,SAAK,QAAS,YAAY,KAAK,KAAM,QAAQ,EAAE,QAAQ,CAAC;AAAA,EAC1D;AAAA,EAEA,oBAAoB;AAClB,SAAK,KAAM,GAAG,UAAU,MAAM,KAAK,gBAAgB,CAAC;AACpD,SAAK,KAAM,GAAG,UAAU,MAAM,KAAK,gBAAgB,CAAC;AACpD,SAAK,KAAM,GAAG,WAAW,MAAM,KAAK,gBAAgB,CAAC;AAAA,EACvD;AAAA,EAEA,WAAW;AACT,SAAK,WAAY,WAAY,YAAY,KAAK,UAAW;AACzD,SAAK,OAAO;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7d1173fb58dfe835db182403e5b1912f28c6db11"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return oa=function(){return a},a}oa();class Aie{constructor(e){sn(this,"_map",(oa().s[1]++,void 0));sn(this,"_container",(oa().s[2]++,void 0));sn(this,"_textEl",(oa().s[3]++,null));oa().f[0]++,oa().s[0]++,this.label=e}onAdd(e){return oa().f[1]++,oa().s[4]++,this._map=e,oa().s[5]++,this._container=document.createElement("div"),oa().s[6]++,this._container.className="maplibregl-ctrl maplibregl-ctrl-group maplibregl-ctrl-zoom",oa().s[7]++,this._container.setAttribute("data-wd-key","maplibre:ctrl-zoom"),oa().s[8]++,this._container.innerHTML=`
      ${this.label} <span></span>
    `,oa().s[9]++,this._textEl=this._container.querySelector("span"),oa().s[10]++,this.addEventListeners(),oa().s[11]++,this._container}updateZoomLevel(){oa().f[2]++,oa().s[12]++,this._textEl.innerHTML=this._map.getZoom().toFixed(2)}addEventListeners(){oa().f[3]++,oa().s[13]++,this._map.on("render",()=>(oa().f[4]++,oa().s[14]++,this.updateZoomLevel())),oa().s[15]++,this._map.on("zoomIn",()=>(oa().f[5]++,oa().s[16]++,this.updateZoomLevel())),oa().s[17]++,this._map.on("zoomOut",()=>(oa().f[6]++,oa().s[18]++,this.updateZoomLevel()))}onRemove(){oa().f[7]++,oa().s[19]++,this._container.parentNode.removeChild(this._container),oa().s[20]++,this._map=void 0}}function mO(n,e,t){const r={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(r["source-layer"]=t),r}function gO(n,e,t,r){const i={id:[t,r,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return r&&(i["source-layer"]=r),i}function yO(n,e,t){const r={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(r["source-layer"]=t),r}function cie(n,e){const t=[],r=[],i=[];function o(a){return{circle:e(a,.8),line:e(a,.6),polygon:e(a,.3),polygonOutline:e(a,.6),default:e(a,1)}}return Object.keys(n).forEach(a=>{const s=n[a];if(!s||s.length===0){const d=o(a);r.push(mO(d.circle,a)),i.push(yO(d.line,a)),t.push(gO(d.polygon,d.polygonOutline,a))}else s.forEach(d=>{const f=o(d);r.push(mO(f.circle,a,d)),i.push(yO(f.line,a,d)),t.push(gO(f.polygon,f.polygonOutline,a,d))})}),t.concat(i).concat(r)}function die(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const r={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},i={};return Object.keys(n.sources).forEach(o=>{const a=n.sources[o];(a.type==="vector"||a.type==="geojson")&&(i[o]=a)}),Object.assign(n,{layers:[r].concat(e),sources:i})}const DS={polygonLayer:gO,lineLayer:yO,circleLayer:mO,generateInspectStyle:die,generateColoredLayers:cie};function Fi(){var n="/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",e="c6691b5ca8d2cfebe44cf9e3718b8a44b922cf42",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",statementMap:{0:{start:{line:4,column:2},end:{line:8,column:3}},1:{start:{line:5,column:4},end:{line:5,column:33}},2:{start:{line:6,column:9},end:{line:8,column:3}},3:{start:{line:7,column:4},end:{line:7,column:30}},4:{start:{line:9,column:2},end:{line:13,column:3}},5:{start:{line:10,column:4},end:{line:10,column:28}},6:{start:{line:12,column:4},end:{line:12,column:23}},7:{start:{line:14,column:2},end:{line:14,column:29}},8:{start:{line:15,column:2},end:{line:15,column:11}},9:{start:{line:18,column:2},end:{line:19,column:16}},10:{start:{line:19,column:4},end:{line:19,column:16}},11:{start:{line:20,column:24},end:{line:20,column:51}},12:{start:{line:21,column:16},end:{line:21,column:52}},13:{start:{line:22,column:2},end:{line:24,column:3}},14:{start:{line:23,column:4},end:{line:23,column:104}},15:{start:{line:25,column:2},end:{line:27,column:3}},16:{start:{line:26,column:4},end:{line:26,column:96}},17:{start:{line:28,column:2},end:{line:30,column:3}},18:{start:{line:29,column:4},end:{line:29,column:94}},19:{start:{line:31,column:2},end:{line:31,column:14}}},fnMap:{0:{name:"changeLayer",decl:{start:{line:3,column:9},end:{line:3,column:20}},loc:{start:{line:3,column:31},end:{line:16,column:1}},line:3},1:{name:"colorHighlightedLayer",decl:{start:{line:17,column:16},end:{line:17,column:37}},loc:{start:{line:17,column:45},end:{line:32,column:1}},line:17}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:8,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:8,column:3}},{start:{line:6,column:9},end:{line:8,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:8,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:8,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},2:{loc:{start:{line:9,column:2},end:{line:13,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:13,column:3}},{start:{line:11,column:9},end:{line:13,column:3}}],line:9},3:{loc:{start:{line:18,column:2},end:{line:19,column:16}},type:"if",locations:[{start:{line:18,column:2},end:{line:19,column:16}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},4:{loc:{start:{line:18,column:6},end:{line:18,column:70}},type:"binary-expr",locations:[{start:{line:18,column:6},end:{line:18,column:12}},{start:{line:18,column:16},end:{line:18,column:43}},{start:{line:18,column:47},end:{line:18,column:70}}],line:18},5:{loc:{start:{line:20,column:24},end:{line:20,column:51}},type:"binary-expr",locations:[{start:{line:20,column:24},end:{line:20,column:45}},{start:{line:20,column:49},end:{line:20,column:51}}],line:20},6:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},7:{loc:{start:{line:22,column:6},end:{line:22,column:62}},type:"binary-expr",locations:[{start:{line:22,column:6},end:{line:22,column:27}},{start:{line:22,column:31},end:{line:22,column:62}}],line:22},8:{loc:{start:{line:25,column:2},end:{line:27,column:3}},type:"if",locations:[{start:{line:25,column:2},end:{line:27,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:25},9:{loc:{start:{line:25,column:6},end:{line:25,column:56}},type:"binary-expr",locations:[{start:{line:25,column:6},end:{line:25,column:29}},{start:{line:25,column:33},end:{line:25,column:56}}],line:25},10:{loc:{start:{line:28,column:2},end:{line:30,column:3}},type:"if",locations:[{start:{line:28,column:2},end:{line:30,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/highlight.ts"],names:[],mappings:"AAAA,OAAO,cAAc;AACrB,OAAO,YAAY;AAKnB,SAAS,YAAY,GAAqB,OAA2B;AACnE,MAAG,EAAE,SAAS,UAAU;AACtB,MAAE,MAAO,eAAe,IAAI;AAAA,EAC9B,WAAU,EAAE,SAAS,QAAQ;AAC3B,MAAE,MAAO,YAAY,IAAI;AAAA,EAC3B;AAEA,MAAG,YAAY,OAAO;AACpB,MAAE,SAAS,MAAM;AAAA,EACnB,OAAO;AACL,WAAO,EAAE,QAAQ;AAAA,EACnB;AACA,IAAE,KAAK,EAAE,KAAK;AACd,SAAO;AACT;AAEO,gBAAS,sBAAsB,OAAqD;AACzF,MAAG,CAAC,SAAS,MAAM,SAAS,gBAAgB,MAAM,SAAS;AAAU,WAAO;AAE5E,QAAM,gBAAgB,MAAM,cAAc,KAAK;AAC/C,QAAM,QAAQ,OAAO,YAAY,eAAe,CAAC;AAEjD,MAAG,MAAM,SAAS,UAAU,MAAM,SAAS,kBAAkB;AAC3D,WAAO,YAAY,SAAS,aAAa,OAAO,OAAO,MAAM,QAAQ,MAAM,cAAc,CAAC,GAAG,KAAK;AAAA,EACpG;AAEA,MAAG,MAAM,SAAS,YAAY,MAAM,SAAS,UAAU;AACrD,WAAO,YAAY,SAAS,YAAY,OAAO,MAAM,QAAQ,MAAM,cAAc,CAAC,GAAG,KAAK;AAAA,EAC5F;AAEA,MAAG,MAAM,SAAS,QAAQ;AACxB,WAAO,YAAY,SAAS,UAAU,OAAO,MAAM,QAAQ,MAAM,cAAc,CAAC,GAAG,KAAK;AAAA,EAC1F;AAEA,SAAO;AACT;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c6691b5ca8d2cfebe44cf9e3718b8a44b922cf42"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Fi=function(){return a},a}Fi();function LS(n,e){return Fi().f[0]++,Fi().s[0]++,n.type==="circle"?(Fi().b[0][0]++,Fi().s[1]++,n.paint["circle-radius"]=3):(Fi().b[0][1]++,Fi().s[2]++,n.type==="line"?(Fi().b[1][0]++,Fi().s[3]++,n.paint["line-width"]=2):Fi().b[1][1]++),Fi().s[4]++,"filter"in e?(Fi().b[2][0]++,Fi().s[5]++,n.filter=e.filter):(Fi().b[2][1]++,Fi().s[6]++,delete n.filter),Fi().s[7]++,n.id=n.id+"_highlight",Fi().s[8]++,n}function hie(n){if(Fi().f[1]++,Fi().s[9]++,Fi().b[4][0]++,!n||(Fi().b[4][1]++,n.type==="background")||(Fi().b[4][2]++,n.type==="raster"))return Fi().b[3][0]++,Fi().s[10]++,null;Fi().b[3][1]++;const e=(Fi().s[11]++,Fi().b[5][0]++,n["source-layer"]||(Fi().b[5][1]++,"")),t=(Fi().s[12]++,ej.brightColor(e,1));return Fi().s[13]++,Fi().b[7][0]++,n.type==="fill"||(Fi().b[7][1]++,n.type==="fill-extrusion")?(Fi().b[6][0]++,Fi().s[14]++,LS(DS.polygonLayer(t,t,n.source,n["source-layer"]),n)):(Fi().b[6][1]++,Fi().s[15]++,Fi().b[9][0]++,n.type==="symbol"||(Fi().b[9][1]++,n.type==="circle")?(Fi().b[8][0]++,Fi().s[16]++,LS(DS.circleLayer(t,n.source,n["source-layer"]),n)):(Fi().b[8][1]++,Fi().s[17]++,n.type==="line"?(Fi().b[10][0]++,Fi().s[18]++,LS(DS.lineLayer(t,n.source,n["source-layer"]),n)):(Fi().b[10][1]++,Fi().s[19]++,null)))}function f8(){var n="/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",e="a9dc98f82c73787713de0672aff7a601bfeb069d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",statementMap:{0:{start:{line:2,column:0},end:{line:2,column:115}}},fnMap:{},branchMap:{},s:{0:0},f:{},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts"],names:[],mappings:"AAAA,OAAO,gBAAgB;AAEvB,WAAW,iBAAiB,gFAAgF,KAAK;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a9dc98f82c73787713de0672aff7a601bfeb069d"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return f8=function(){return a},a}f8();f8().s[0]++;HC.setRTLTextPlugin("https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js",!1);var XC=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function dw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var pj=pie,fie=Object.prototype.hasOwnProperty;function pie(){for(var n={},e=0;e<arguments.length;e++){var t=arguments[e];for(var r in t)fie.call(t,r)&&(n[r]=t[r])}return n}var Qc=dw(pj),mj={exports:{}};(function(n,e){(function(){var t={};n.exports=t,t.simpleFilter=function(r,i){return i.filter(function(o){return t.test(r,o)})},t.test=function(r,i){return t.match(r,i)!==null},t.match=function(r,i,o){o=o||{};var a=0,s=[],d=i.length,f=0,C=0,O=o.pre||"",E=o.post||"",P=o.caseSensitive&&i||i.toLowerCase(),D;r=o.caseSensitive&&r||r.toLowerCase();for(var $=0;$<d;$++)D=i[$],P[$]===r[a]?(D=O+D+E,a+=1,C+=1+C):C=0,f+=C,s[s.length]=D;return a===r.length?(f=P===r?1/0:f,{rendered:s.join(""),score:f}):null},t.filter=function(r,i,o){return!i||i.length===0?[]:typeof r!="string"?i:(o=o||{},i.reduce(function(a,s,d,f){var C=s;o.extract&&(C=o.extract(s));var O=t.match(r,C,o);return O!=null&&(a[a.length]={string:O.rendered,score:O.score,index:d,original:s}),a},[]).sort(function(a,s){var d=s.score-a.score;return d||a.index-s.index}))}})()})(mj);var mie=mj.exports,Ic=function(n){return this.component=n,this.items=[],this.active=n.options.noInitialSelection?-1:0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,n.el.parentNode.insertBefore(this.wrapper,n.el.nextSibling),this};Ic.prototype.show=function(){this.element.style.display="block"};Ic.prototype.hide=function(){this.element.style.display="none"};Ic.prototype.add=function(n){this.items.push(n)};Ic.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0};Ic.prototype.isEmpty=function(){return!this.items.length};Ic.prototype.isVisible=function(){return this.element.style.display==="block"};Ic.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var n=0;n<this.items.length;n++)this.drawItem(this.items[n],this.active===n);this.show()};Ic.prototype.drawItem=function(n,e){var t=document.createElement("li"),r=document.createElement("a");e&&(t.className+=" active"),r.innerHTML=n.string,t.appendChild(r),this.element.appendChild(t),t.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),t.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,n)}).bind(this))};Ic.prototype.handleMouseUp=function(n){this.selectingListItem=!1,this.component.value(n.original),this.clear(),this.draw()};Ic.prototype.move=function(n){this.active=n,this.draw()};Ic.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)};Ic.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)};Ic.prototype.drawError=function(n){var e=document.createElement("li");e.innerHTML=n,this.element.appendChild(e),this.show()};var gie=Ic,yie=pj,vie=mie,Cie=gie,CA=function(n,e,t){return t=t||{},this.options=yie({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},t),this.el=n,this.data=e||[],this.list=new Cie(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(r){this.handleKeyUp(r.keyCode,r)}).bind(this),!1),this.el.addEventListener("keydown",(function(r){this.handleKeyDown(r)}).bind(this)),this.el.addEventListener("focus",(function(){this.handleFocus()}).bind(this)),this.el.addEventListener("blur",(function(){this.handleBlur()}).bind(this)),this.el.addEventListener("paste",(function(r){this.handlePaste(r)}).bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};CA.prototype.handleKeyUp=function(n,e){if(!(n===40||n===38||n===27||n===9)){if(n===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),e.stopPropagation());return}this.handleInputChange(this.el.value)}};CA.prototype.handleKeyDown=function(n){switch(n.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&n.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.active].original:null),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}};CA.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()};CA.prototype.handlePaste=function(n){if(n.clipboardData)this.handleInputChange(n.clipboardData.getData("Text"));else{var e=this;setTimeout(function(){e.handleInputChange(n.target.value)},100)}};CA.prototype.handleInputChange=function(n){if(this.query=this.normalize(n),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(e){for(var t=0;t<e.length&&(this.list.add(e[t]),t!==this.options.limit-1);t++);this.list.draw()}).bind(this))};CA.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1};CA.prototype.update=function(n){this.data=n,this.handleKeyUp()};CA.prototype.clear=function(){this.data=[],this.list.clear()};CA.prototype.normalize=function(n){return n=n.toLowerCase(),n};CA.prototype.match=function(n,e){return n.indexOf(e)>-1};CA.prototype.value=function(n){if(this.selected=n,this.el.value=this.getItemValue(n||{place_name:this.query}),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")};CA.prototype.getCandidates=function(n){var e={pre:"<strong>",post:"</strong>",extract:(function(r){return this.getItemValue(r)}).bind(this)},t;this.options.filter?(t=vie.filter(this.query,this.data,e),t=t.map((function(r){return{original:r.original,string:this.render(r.original,r.string)}}).bind(this))):t=this.data.map((function(r){var i=this.render(r);return{original:r,string:i}}).bind(this)),n(t)};CA.prototype.getItemValue=function(n){return n};CA.prototype.render=function(n,e){if(e)return e;for(var t=n.original?this.getItemValue(n.original):this.getItemValue(n),r=this.normalize(t),i=r.lastIndexOf(this.query);i>-1;){var o=i+this.query.length;t=t.slice(0,i)+"<strong>"+t.slice(i,o)+"</strong>"+t.slice(o),i=r.slice(0,i).lastIndexOf(this.query)}return t};CA.prototype.renderError=function(n){this.list.drawError(n)};var _ie=CA,gj=_ie,bie=gj;typeof window<"u"&&(window.Suggestions=gj);var xie=dw(bie),yj={exports:{}};(function(n){(function(e,t,r){n.exports?n.exports=r():e[t]=r()})(XC,"subtag",function(){var e="",t=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function r(d){return d.match(t)||[]}function i(d){return r(d).filter(function(f,C){return f&&C})}function o(d){return d=r(d),{language:d[1]||e,extlang:d[2]||e,script:d[3]||e,region:d[4]||e}}function a(d,f,C){Object.defineProperty(d,f,{value:C,enumerable:!0})}function s(d,f,C){function O(E){return r(E)[d]||e}a(O,"pattern",f),a(o,C,O)}return s(1,/^[a-zA-Z]{2,3}$/,"language"),s(2,/^[a-zA-Z]{3}$/,"extlang"),s(3,/^[a-zA-Z]{4}$/,"script"),s(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),a(o,"split",i),o})})(yj);var wie=yj.exports,Mie=dw(wie),Sie="Expected a function",ZT=NaN,Eie="[object Symbol]",Oie=/^\s+|\s+$/g,Bie=/^[-+]0x[0-9a-f]+$/i,Iie=/^0b[01]+$/i,kie=/^0o[0-7]+$/i,Tie=parseInt,Kie=typeof XC=="object"&&XC&&XC.Object===Object&&XC,Pie=typeof self=="object"&&self&&self.Object===Object&&self,Die=Kie||Pie||Function("return this")(),Lie=Object.prototype,Fie=Lie.toString,Uie=Math.max,Rie=Math.min,FS=function(){return Die.Date.now()};function zie(n,e,t){var r,i,o,a,s,d,f=0,C=!1,O=!1,E=!0;if(typeof n!="function")throw new TypeError(Sie);e=XT(e)||0,vO(t)&&(C=!!t.leading,O="maxWait"in t,o=O?Uie(XT(t.maxWait)||0,e):o,E="trailing"in t?!!t.trailing:E);function P(fe){var X=r,oe=i;return r=i=void 0,f=fe,a=n.apply(oe,X),a}function D(fe){return f=fe,s=setTimeout(Q,e),C?P(fe):a}function $(fe){var X=fe-d,oe=fe-f,Ce=e-X;return O?Rie(Ce,o-oe):Ce}function H(fe){var X=fe-d,oe=fe-f;return d===void 0||X>=e||X<0||O&&oe>=o}function Q(){var fe=FS();if(H(fe))return N(fe);s=setTimeout(Q,$(fe))}function N(fe){return s=void 0,E&&r?P(fe):(r=i=void 0,a)}function Z(){s!==void 0&&clearTimeout(s),f=0,r=d=i=s=void 0}function ae(){return s===void 0?a:N(FS())}function pe(){var fe=FS(),X=H(fe);if(r=arguments,i=this,d=fe,X){if(s===void 0)return D(d);if(O)return s=setTimeout(Q,e),P(d)}return s===void 0&&(s=setTimeout(Q,e)),a}return pe.cancel=Z,pe.flush=ae,pe}function vO(n){var e=typeof n;return!!n&&(e=="object"||e=="function")}function jie(n){return!!n&&typeof n=="object"}function Nie(n){return typeof n=="symbol"||jie(n)&&Fie.call(n)==Eie}function XT(n){if(typeof n=="number")return n;if(Nie(n))return ZT;if(vO(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=vO(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=n.replace(Oie,"");var t=Iie.test(n);return t||kie.test(n)?Tie(n.slice(2),t?2:8):Bie.test(n)?ZT:+n}var Wie=zie,Gie=dw(Wie),p8={exports:{}},Uy=typeof Reflect=="object"?Reflect:null,JT=Uy&&typeof Uy.apply=="function"?Uy.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)},b3;Uy&&typeof Uy.ownKeys=="function"?b3=Uy.ownKeys:Object.getOwnPropertySymbols?b3=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:b3=function(e){return Object.getOwnPropertyNames(e)};function $ie(n){console&&console.warn&&console.warn(n)}var vj=Number.isNaN||function(e){return e!==e};function Ta(){Ta.init.call(this)}p8.exports=Ta;p8.exports.once=Vie;Ta.EventEmitter=Ta;Ta.prototype._events=void 0;Ta.prototype._eventsCount=0;Ta.prototype._maxListeners=void 0;var eK=10;function hw(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(Ta,"defaultMaxListeners",{enumerable:!0,get:function(){return eK},set:function(n){if(typeof n!="number"||n<0||vj(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");eK=n}});Ta.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};Ta.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||vj(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Cj(n){return n._maxListeners===void 0?Ta.defaultMaxListeners:n._maxListeners}Ta.prototype.getMaxListeners=function(){return Cj(this)};Ta.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var d=o[e];if(d===void 0)return!1;if(typeof d=="function")JT(d,this,t);else for(var f=d.length,C=Mj(d,f),r=0;r<f;++r)JT(C[r],this,t);return!0};function _j(n,e,t,r){var i,o,a;if(hw(t),o=n._events,o===void 0?(o=n._events=Object.create(null),n._eventsCount=0):(o.newListener!==void 0&&(n.emit("newListener",e,t.listener?t.listener:t),o=n._events),a=o[e]),a===void 0)a=o[e]=t,++n._eventsCount;else if(typeof a=="function"?a=o[e]=r?[t,a]:[a,t]:r?a.unshift(t):a.push(t),i=Cj(n),i>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=n,s.type=e,s.count=a.length,$ie(s)}return n}Ta.prototype.addListener=function(e,t){return _j(this,e,t,!1)};Ta.prototype.on=Ta.prototype.addListener;Ta.prototype.prependListener=function(e,t){return _j(this,e,t,!0)};function Qie(){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 bj(n,e,t){var r={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},i=Qie.bind(r);return i.listener=t,r.wrapFn=i,i}Ta.prototype.once=function(e,t){return hw(t),this.on(e,bj(this,e,t)),this};Ta.prototype.prependOnceListener=function(e,t){return hw(t),this.prependListener(e,bj(this,e,t)),this};Ta.prototype.removeListener=function(e,t){var r,i,o,a,s;if(hw(t),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===t||r.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if(typeof r!="function"){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():Yie(r,o),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,s||t)}return this};Ta.prototype.off=Ta.prototype.removeListener;Ta.prototype.removeAllListeners=function(e){var t,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var o=Object.keys(r),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=r[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function xj(n,e,t){var r=n._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?qie(i):Mj(i,i.length)}Ta.prototype.listeners=function(e){return xj(this,e,!0)};Ta.prototype.rawListeners=function(e){return xj(this,e,!1)};Ta.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):wj.call(n,e)};Ta.prototype.listenerCount=wj;function wj(n){var e=this._events;if(e!==void 0){var t=e[n];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Ta.prototype.eventNames=function(){return this._eventsCount>0?b3(this._events):[]};function Mj(n,e){for(var t=new Array(e),r=0;r<e;++r)t[r]=n[r];return t}function Yie(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function qie(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function Vie(n,e){return new Promise(function(t,r){function i(a){n.removeListener(e,o),r(a)}function o(){typeof n.removeListener=="function"&&n.removeListener("error",i),t([].slice.call(arguments))}Sj(n,e,o,{once:!0}),e!=="error"&&Hie(n,i,{once:!0})})}function Hie(n,e,t){typeof n.on=="function"&&Sj(n,"error",e,t)}function Sj(n,e,t,r){if(typeof n.on=="function")r.once?n.once(e,t):n.on(e,t);else if(typeof n.addEventListener=="function")n.addEventListener(e,function i(o){r.once&&n.removeEventListener(e,i),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var Zie=p8.exports;const tK={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}},Xie={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:"Поиск"};class Jie{constructor(e,t){this.options={zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:void 0,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,getItemValue:r=>r.text!==void 0?r.text:r.place_name,render:function(r){if(!r.geometry){const o=r.text,a=o.toLowerCase().indexOf(this.query.toLowerCase()),s=this.query.length,d=o.substring(0,a),f=o.substring(a,a+s),C=o.substring(a+s);return'<div class="maplibregl-ctrl-geocoder--suggestion"><svg class="maplibregl-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="maplibregl-ctrl-geocoder--suggestion-info"><div class="maplibregl-ctrl-geocoder--suggestion-title">'+d+'<span class="maplibregl-ctrl-geocoder--suggestion-match">'+f+"</span>"+C+"</div></div></div>"}const i=r.place_name.split(",");return'<div class="maplibregl-ctrl-geocoder--result"><svg class="maplibregl-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="maplibregl-ctrl-geocoder--result-title">'+i[0]+'</div><div class="maplibregl-ctrl-geocoder--result-address">'+i.splice(1,i.length).join(",")+"</div></div></div>"},popupRender:r=>{const i=r.place_name.split(",");return'<div class="maplibregl-ctrl-geocoder--suggestion popup-suggestion"><div class="maplibregl-ctrl-geocoder--suggestion-title popup-suggestion-title">'+i[0]+'</div><div class="maplibregl-ctrl-geocoder--suggestion-address popup-suggestion-address">'+i.splice(1,i.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},this._eventEmitter=new Zie.EventEmitter,this.options=Qc({},this.options,t),this.fresh=!0,this.lastSelected=null,this.geocoderApi=e}addTo(e){function t(r,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const o=r.onAdd();i.appendChild(o)}if(e instanceof HTMLElement)t(this,e);else if(typeof e=="string"){const r=document.querySelectorAll(e);if(r.length===0)throw new Error("Element "+e+"not found.");if(r.length>1)throw new Error("Geocoder can only be added to a single html element");t(this,r[0])}else if("addControl"in e)e.addControl(this);else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")}onAdd(e){if(e&&typeof e!="string"&&(this._map=e),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");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);const t=this.container=document.createElement("div");t.className="maplibregl-ctrl-geocoder maplibregl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";const r=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="maplibregl-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",Gie(this._onKeyDown,this.options.debounceSearch)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton);const i=document.createElement("div");i.classList.add("maplibregl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("type","button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="maplibregl-ctrl-geocoder--button";const o=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(o),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),i.appendChild(this._clearEl),i.appendChild(this._loadingEl),t.appendChild(r),t.appendChild(this._inputEl),t.appendChild(i),this._typeahead=new xie(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),t}createIcon(e,t){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("class","maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+e),r.setAttribute("viewBox","0 0 18 18"),r.setAttribute("xml:space","preserve"),r.setAttribute("width","18"),r.setAttribute("height","18"),"innerHTML"in r)r.innerHTML=t;else{const i=document.createElement("div");i.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";const o=i.firstChild,a=o.firstChild;r.appendChild(a)}return r}onRemove(){return this.container.remove(),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this}_onPaste(e){const t=(e.clipboardData||window.clipboardData).getData("text");t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)}_onKeyDown(e){if(e.keyCode===27&&this.options.clearAndBlurOnEsc)return this._clear(e),this._inputEl.blur();const i=e.target&&e.target.shadowRoot?e.target.shadowRoot.activeElement:e.target;if(!(i?i.value:""))return this.fresh=!0,e.keyCode!==9&&this.clear(e),this._clearEl.style.display="none";if(!(e.metaKey||[9,27,37,39,38,40].indexOf(e.keyCode)!==-1)){if(e.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(i.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(i.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}i.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(i.value)}}_showButton(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")}_hideButton(){this._typeahead.selected&&(this._clearEl.style.display="none")}_onBlur(e){this.options.clearOnBlur&&this._clearOnBlur(e),this.options.collapsed&&this._collapse()}_onChange(){const e=this._typeahead.selected;if(e&&!e.geometry)e.placeId?this._geocode(e.placeId,!0,!0):this._geocode(e.text,!0);else if(e&&JSON.stringify(e)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){let t;if(this._removeResultMarkers(),e.properties&&tK[e.properties.short_code])t=Qc({},this.options.flyTo),this._map&&this._map.fitBounds(tK[e.properties.short_code].bbox,t);else if(e.bbox){const r=e.bbox;t=Qc({},this.options.flyTo),this._map&&this._map.fitBounds([[r[0],r[1]],[r[2],r[3]]],t)}else{const r={zoom:this.options.zoom};t=Qc({},r,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)}}this.options.marker&&this._maplibregl&&this._handleMarker(e),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(e),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:e})}}_getConfigForRequest(){return["bbox","limit","proximity","countries","types","language","reverseMode"].reduce((r,i)=>(this.options[i]&&(["countries","types","language"].indexOf(i)>-1?r[i]=this.options[i].split(/[\s,]+/):r[i]=this.options[i],i==="proximity"&&this.options[i]&&typeof this.options[i].longitude=="number"&&typeof this.options[i].latitude=="number"&&(r[i]=[this.options[i].longitude,this.options[i].latitude])),r),{})}_geocode(e,t=!1,r=!1){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:e});let i=null,o=this._getConfigForRequest(),a;if(this.options.localGeocoderOnly)a=Promise.resolve();else if(this.options.reverseGeocode&&/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/.test(e)){const f=e.split(/[\s(,)?]+/).map(C=>parseFloat(C)).reverse();o=Qc(o,{query:f,limit:1}),"proximity"in o&&delete o.proximity,a=this.geocoderApi.reverseGeocode(o)}else o=Qc(o,{query:e}),this.geocoderApi.getSuggestions?t?this.geocoderApi.searchByPlaceId&&r?a=this.geocoderApi.searchByPlaceId(o):a=this.geocoderApi.forwardGeocode(o):a=this.geocoderApi.getSuggestions(o):a=this.geocoderApi.forwardGeocode(o);let s=[];this.options.localGeocoder&&(s=this.options.localGeocoder(e),s||(s=[]));let d=Promise.resolve([]);return a.catch(f=>{i=f}).then(f=>{this._loadingEl.style.display="none";let C={};return f?C=f:C={type:"FeatureCollection",features:[]},C.config=o,this.fresh&&(this.fresh=!1),C.features=C.features?s.concat(C.features):s,this.options.externalGeocoder?(d=this.options.externalGeocoder(e,C.features,o)||Promise.resolve([]),d.then(function(O){return C.features=C.features?O.concat(C.features):O,C},function(){return C})):C}).then(f=>{if(i)throw i;this.options.filter&&f.features.length&&(f.features=f.features.filter(this.options.filter));let C=[];f.suggestions?C=f.suggestions:f.place?C=[f.place]:C=f.features,C.length?(this._clearEl.style.display="block",this._typeahead.update(C),(!this.options.showResultsWhileTyping||t)&&this.options.showResultMarkers&&(f.features.length>0||f.place)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",f)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",f))}).catch(f=>{this._loadingEl.style.display="none",s.length&&this.options.localGeocoder||d.length&&this.options.externalGeocoder?(this._clearEl.style.display="block",this._typeahead.update(s)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:s}),this._eventEmitter.emit("error",{error:f})}),a}_clear(e){e&&e.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0}clear(e){this._clear(e),this._inputEl.focus()}_clearOnBlur(e){e.relatedTarget&&this._clear(e)}_onQueryResult(e){const t=e;if(!t.features.length)return;const r=t.features[0];this._typeahead.selected=r,this._inputEl.value=r.place_name,this._onChange()}_updateProximity(){if(this._map)if(this._map.getZoom()>9){const e=this._map.getCenter().wrap();this.setProximity({longitude:e.lng,latitude:e.lat})}else this.setProximity(null)}_collapse(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("maplibregl-ctrl-geocoder--collapsed")}_unCollapse(){this.container.classList.remove("maplibregl-ctrl-geocoder--collapsed")}query(e){return this._geocode(e).then(this._onQueryResult),this}_renderError(){this._renderMessage("<div class='maplibre-gl-geocoder--error'>There was an error reaching the server</div>")}_renderNoResults(){this._renderMessage("<div class='maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>No results found</div>")}_renderMessage(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)}_getPlaceholderText(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){const e=this.options.language.split(",")[0],t=Mie.language(e),r=Xie[t];if(r)return r}return"Search"}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;const e=this._typeahead.data.filter(function(t){return typeof t!="string"}).slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){const r=Qc({},{padding:100},this.options.flyTo),i=new this._maplibregl.LngLatBounds;e.forEach(function(o){i.extend(o.geometry.coordinates)}),this._map.fitBounds(i,r)}return e.length>0&&this._maplibregl&&this._handleResultMarkers(e),this}setInput(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e),this}setProximity(e){return this.options.proximity=e,this}getProximity(){return this.options.proximity}setRenderFunction(e){return e&&typeof e=="function"&&(this._typeahead.render=e),this}getRenderFunction(){return this._typeahead.render}setLanguage(e){return this.options.language=e||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(e){return this.options.zoom=e,this}getFlyTo(){return this.options.flyTo}setFlyTo(e){return this.options.flyTo=e,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(e){return this.placeholder=e||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this}getBbox(){return this.options.bbox}setBbox(e){return this.options.bbox=e,this}getCountries(){return this.options.countries}setCountries(e){return this.options.countries=e,this}getTypes(){return this.options.types}setTypes(e){return this.options.types=e,this}getMinLength(){return this.options.minLength}setMinLength(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this}getLimit(){return this.options.limit}setLimit(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this}getFilter(){return this.options.filter}setFilter(e){return this.options.filter=e,this}setGeocoderApi(e){return this.geocoderApi=e,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(e){if(!this._map)return;this._removeMarker();const r=Qc({},{color:"#4668F2"},this.options.marker);this.mapMarker=new this._maplibregl.Marker(r);let i;if(this.options.popup){const a=Qc({},{},this.options.popup);i=new this._maplibregl.Popup(a).setHTML(this.options.popupRender(e))}return e.center?(this.mapMarker.setLngLat(e.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)):e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)),this}_removeMarker(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)}_handleResultMarkers(e){if(!this._map)return;this._removeResultMarkers();let r=Qc({},{color:"#4668F2"},this.options.showResultMarkers);for(const i of e){let o;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(o=this.options.showResultMarkers.element.cloneNode(!0),r=Qc(r,{element:o}));const a=new this._maplibregl.Marker(Qc({},r,{element:o}));let s;if(this.options.popup){const f=Qc({},{},this.options.popup);s=new this._maplibregl.Popup(f).setHTML(this.options.popupRender(i))}i.center?(a.setLngLat(i.center).addTo(this._map),this.options.popup&&a.setPopup(s)):i.geometry&&i.geometry.type&&i.geometry.type==="Point"&&i.geometry.coordinates&&(a.setLngLat(i.geometry.coordinates).addTo(this._map),this.options.popup&&a.setPopup(s)),this.resultMarkers.push(a)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(e){e.remove()}),this.resultMarkers=[])}on(e,t){return this._eventEmitter.on(e,t),this}off(e,t){return this._eventEmitter.removeListener(e,t),this}}function nn(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",e="51cd1cb8f6e6b26a1376c1886253c2fd60ad0129",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",statementMap:{0:{start:{line:19,column:2},end:{line:19,column:36}},1:{start:{line:20,column:2},end:{line:20,column:19}},2:{start:{line:23,column:26},end:{line:29,column:3}},3:{start:{line:30,column:16},end:{line:30,column:55}},4:{start:{line:31,column:2},end:{line:33,column:3}},5:{start:{line:32,column:4},end:{line:32,column:30}},6:{start:{line:34,column:18},end:{line:34,column:20}},7:{start:{line:35,column:2},end:{line:40,column:5}},8:{start:{line:36,column:19},end:{line:36,column:53}},9:{start:{line:37,column:4},end:{line:39,column:5}},10:{start:{line:38,column:6},end:{line:38,column:33}},11:{start:{line:41,column:23},end:{line:45,column:3}},12:{start:{line:46,column:2},end:{line:46,column:22}},13:{start:{line:49,column:24},end:{line:59,column:3}},14:{start:{line:60,column:14},end:{line:60,column:18}},15:{start:{line:62,column:4},end:{line:62,column:17}},16:{start:{line:63,column:4},end:{line:66,column:6}},17:{start:{line:69,column:17},end:{line:69,column:22}},18:{start:{line:70,column:4},end:{line:73,column:5}},19:{start:{line:71,column:6},end:{line:71,column:132}},20:{start:{line:74,column:4},end:{line:74,column:18}},21:{start:{line:77,column:16},end:{line:77,column:30}},22:{start:{line:78,column:28},end:{line:78,column:79}},23:{start:{line:79,column:4},end:{line:84,column:5}},24:{start:{line:80,column:6},end:{line:80,column:52}},25:{start:{line:81,column:6},end:{line:81,column:70}},26:{start:{line:82,column:6},end:{line:82,column:70}},27:{start:{line:83,column:6},end:{line:83,column:76}},28:{start:{line:85,column:4},end:{line:87,column:5}},29:{start:{line:86,column:6},end:{line:86,column:43}},30:{start:{line:88,column:4},end:{line:93,column:5}},31:{start:{line:89,column:6},end:{line:89,column:59}},32:{start:{line:90,column:6},end:{line:92,column:14}},33:{start:{line:91,column:8},end:{line:91,column:36}},34:{start:{line:96,column:20},end:{line:105,column:5}},35:{start:{line:106,column:16},end:{line:106,column:43}},36:{start:{line:107,column:26},end:{line:111,column:5}},37:{start:{line:108,column:21},end:{line:108,column:36}},38:{start:{line:109,column:19},end:{line:109,column:32}},39:{start:{line:110,column:6},end:{line:110,column:44}},40:{start:{line:112,column:4},end:{line:112,column:20}},41:{start:{line:113,column:4},end:{line:113,column:56}},42:{start:{line:114,column:4},end:{line:114,column:56}},43:{start:{line:115,column:4},end:{line:115,column:62}},44:{start:{line:116,column:4},end:{line:116,column:27}},45:{start:{line:117,column:24},end:{line:117,column:62}},46:{start:{line:118,column:4},end:{line:118,column:45}},47:{start:{line:119,column:16},end:{line:119,column:74}},48:{start:{line:120,column:4},end:{line:120,column:37}},49:{start:{line:121,column:20},end:{line:121,column:49}},50:{start:{line:122,column:20},end:{line:142,column:6}},51:{start:{line:132,column:8},end:{line:132,column:82}},52:{start:{line:134,column:62},end:{line:134,column:141}},53:{start:{line:136,column:8},end:{line:140,column:9}},54:{start:{line:137,column:10},end:{line:137,column:108}},55:{start:{line:139,column:10},end:{line:139,column:160}},56:{start:{line:143,column:4},end:{line:143,column:28}},57:{start:{line:144,column:4},end:{line:150,column:7}},58:{start:{line:145,column:6},end:{line:149,column:9}},59:{start:{line:151,column:4},end:{line:157,column:7}},60:{start:{line:152,column:6},end:{line:153,column:15}},61:{start:{line:153,column:8},end:{line:153,column:15}},62:{start:{line:154,column:6},end:{line:156,column:9}},63:{start:{line:158,column:4},end:{line:160,column:7}},64:{start:{line:159,column:6},end:{line:159,column:30}},65:{start:{line:161,column:4},end:{line:165,column:7}},66:{start:{line:162,column:6},end:{line:164,column:9}},67:{start:{line:166,column:4},end:{line:166,column:37}},68:{start:{line:167,column:4},end:{line:167,column:37}},69:{start:{line:169,column:22},end:{line:172,column:3}},70:{start:{line:170,column:18},end:{line:170,column:82}},71:{start:{line:170,column:66},end:{line:170,column:81}},72:{start:{line:171,column:4},end:{line:171,column:36}},73:{start:{line:174,column:27},end:{line:207,column:5}},74:{start:{line:176,column:25},end:{line:176,column:27}},75:{start:{line:177,column:8},end:{line:202,column:9}},76:{start:{line:178,column:26},end:{line:178,column:138}},77:{start:{line:179,column:27},end:{line:179,column:47}},78:{start:{line:180,column:26},end:{line:180,column:47}},79:{start:{line:181,column:10},end:{line:199,column:11}},80:{start:{line:182,column:27},end:{line:185,column:13}},81:{start:{line:186,column:26},end:{line:197,column:13}},82:{start:{line:198,column:12},end:{line:198,column:33}},83:{start:{line:201,column:10},end:{line:201,column:69}},84:{start:{line:203,column:8},end:{line:205,column:10}},85:{start:{line:208,column:21},end:{line:211,column:6}},86:{start:{line:212,column:4},end:{line:212,column:41}},87:{start:{line:215,column:14},end:{line:215,column:26}},88:{start:{line:216,column:4},end:{line:225,column:6}},89:{start:{line:222,column:20},end:{line:222,column:38}},90:{start:{line:228,column:22},end:{line:228,column:62}}},fnMap:{0:{name:"renderPopup",decl:{start:{line:18,column:9},end:{line:18,column:20}},loc:{start:{line:18,column:39},end:{line:21,column:1}},line:18},1:{name:"buildInspectStyle",decl:{start:{line:22,column:9},end:{line:22,column:26}},loc:{start:{line:22,column:78},end:{line:47,column:1}},line:22},2:{name:"(anonymous_2)",decl:{start:{line:35,column:48},end:{line:35,column:49}},loc:{start:{line:35,column:62},end:{line:40,column:3}},line:35},3:{name:"(anonymous_3)",decl:{start:{line:50,column:17},end:{line:50,column:18}},loc:{start:{line:50,column:23},end:{line:51,column:5}},line:50},4:{name:"(anonymous_4)",decl:{start:{line:52,column:18},end:{line:52,column:19}},loc:{start:{line:52,column:24},end:{line:53,column:5}},line:52},5:{name:"(anonymous_5)",decl:{start:{line:54,column:19},end:{line:54,column:20}},loc:{start:{line:54,column:25},end:{line:55,column:5}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:56,column:14},end:{line:56,column:15}},loc:{start:{line:56,column:20},end:{line:57,column:5}},line:56},7:{name:"(anonymous_7)",decl:{start:{line:61,column:2},end:{line:61,column:3}},loc:{start:{line:61,column:21},end:{line:67,column:3}},line:61},8:{name:"(anonymous_8)",decl:{start:{line:68,column:2},end:{line:68,column:3}},loc:{start:{line:68,column:46},end:{line:75,column:3}},line:68},9:{name:"(anonymous_9)",decl:{start:{line:76,column:2},end:{line:76,column:3}},loc:{start:{line:76,column:23},end:{line:94,column:3}},line:76},10:{name:"(anonymous_10)",decl:{start:{line:90,column:17},end:{line:90,column:18}},loc:{start:{line:90,column:23},end:{line:92,column:7}},line:90},11:{name:"(anonymous_11)",decl:{start:{line:95,column:2},end:{line:95,column:3}},loc:{start:{line:95,column:22},end:{line:168,column:3}},line:95},12:{name:"(anonymous_12)",decl:{start:{line:107,column:26},end:{line:107,column:27}},loc:{start:{line:107,column:32},end:{line:111,column:5}},line:107},13:{name:"(anonymous_13)",decl:{start:{line:131,column:24},end:{line:131,column:25}},loc:{start:{line:131,column:44},end:{line:133,column:7}},line:131},14:{name:"(anonymous_14)",decl:{start:{line:134,column:25},end:{line:134,column:26}},loc:{start:{line:134,column:62},end:{line:134,column:141}},line:134},15:{name:"(anonymous_15)",decl:{start:{line:135,column:19},end:{line:135,column:20}},loc:{start:{line:135,column:33},end:{line:141,column:7}},line:135},16:{name:"(anonymous_16)",decl:{start:{line:144,column:25},end:{line:144,column:26}},loc:{start:{line:144,column:31},end:{line:150,column:5}},line:144},17:{name:"(anonymous_17)",decl:{start:{line:151,column:19},end:{line:151,column:20}},loc:{start:{line:151,column:26},end:{line:157,column:5}},line:151},18:{name:"(anonymous_18)",decl:{start:{line:158,column:20},end:{line:158,column:21}},loc:{start:{line:158,column:27},end:{line:160,column:5}},line:158},19:{name:"(anonymous_19)",decl:{start:{line:161,column:19},end:{line:161,column:20}},loc:{start:{line:161,column:27},end:{line:165,column:5}},line:161},20:{name:"(anonymous_20)",decl:{start:{line:169,column:22},end:{line:169,column:23}},loc:{start:{line:169,column:30},end:{line:172,column:3}},line:169},21:{name:"(anonymous_21)",decl:{start:{line:170,column:55},end:{line:170,column:56}},loc:{start:{line:170,column:66},end:{line:170,column:81}},line:170},22:{name:"(anonymous_22)",decl:{start:{line:173,column:2},end:{line:173,column:3}},loc:{start:{line:173,column:20},end:{line:213,column:3}},line:173},23:{name:"(anonymous_23)",decl:{start:{line:175,column:22},end:{line:175,column:23}},loc:{start:{line:175,column:40},end:{line:206,column:7}},line:175},24:{name:"(anonymous_24)",decl:{start:{line:214,column:2},end:{line:214,column:3}},loc:{start:{line:214,column:11},end:{line:226,column:3}},line:214},25:{name:"(anonymous_25)",decl:{start:{line:222,column:13},end:{line:222,column:14}},loc:{start:{line:222,column:20},end:{line:222,column:38}},line:222}},branchMap:{0:{loc:{start:{line:31,column:2},end:{line:33,column:3}},type:"if",locations:[{start:{line:31,column:2},end:{line:33,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},1:{loc:{start:{line:37,column:4},end:{line:39,column:5}},type:"if",locations:[{start:{line:37,column:4},end:{line:39,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},2:{loc:{start:{line:37,column:8},end:{line:37,column:64}},type:"binary-expr",locations:[{start:{line:37,column:8},end:{line:37,column:32}},{start:{line:37,column:36},end:{line:37,column:64}}],line:37},3:{loc:{start:{line:71,column:15},end:{line:71,column:131}},type:"binary-expr",locations:[{start:{line:71,column:15},end:{line:71,column:71}},{start:{line:71,column:75},end:{line:71,column:131}}],line:71},4:{loc:{start:{line:79,column:4},end:{line:84,column:5}},type:"if",locations:[{start:{line:79,column:4},end:{line:84,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:79},5:{loc:{start:{line:85,column:4},end:{line:87,column:5}},type:"if",locations:[{start:{line:85,column:4},end:{line:87,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:85},6:{loc:{start:{line:85,column:8},end:{line:85,column:98}},type:"binary-expr",locations:[{start:{line:85,column:8},end:{line:85,column:26}},{start:{line:85,column:30},end:{line:85,column:98}}],line:85},7:{loc:{start:{line:88,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:88,column:4},end:{line:93,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:88},8:{loc:{start:{line:88,column:8},end:{line:88,column:59}},type:"binary-expr",locations:[{start:{line:88,column:8},end:{line:88,column:26}},{start:{line:88,column:30},end:{line:88,column:59}}],line:88},9:{loc:{start:{line:136,column:8},end:{line:140,column:9}},type:"if",locations:[{start:{line:136,column:8},end:{line:140,column:9}},{start:{line:138,column:15},end:{line:140,column:9}}],line:136},10:{loc:{start:{line:152,column:6},end:{line:153,column:15}},type:"if",locations:[{start:{line:152,column:6},end:{line:153,column:15}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:152}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx"],names:[],mappings:"AAmL6B;AAnL7B,OAAO,WAAuB;AAC9B,OAAO,cAAc;AACrB,OAAO,gBAAwG;AAC/G,OAAO,qBAAqB;AAC5B,OAAO,YAAY;AACnB,OAAO,6BAA6B;AACpC,OAAO,uCAA2D;AAClE,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA2B,6BAA6B;AACxD,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,sBAA0E;AACjF,OAAO;AACP,SAAS,uBAAwC;AAEjD,SAAS,YAAY,OAAoB,WAA4C;AACnF,WAAS,OAAO,OAAO,SAAS;AAChC,SAAO;AACT;AAEA,SAAS,kBAAkB,kBAAsC,eAAmC,kBAAqC;AACvI,QAAM,kBAAkB;AAAA,IACtB,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,oBAAoB;AAAA,IACtB;AAAA,EACF;AAEA,QAAM,QAAQ,sBAAsB,gBAAgB;AACpD,MAAG,OAAO;AACR,kBAAc,KAAK,KAAK;AAAA,EAC1B;AAEA,QAAM,UAA+C,CAAC;AAEtD,SAAO,KAAK,iBAAiB,OAAO,EAAE,QAAQ,cAAY;AACxD,UAAM,SAAS,iBAAiB,QAAQ,QAAQ;AAChD,QAAG,OAAO,SAAS,YAAY,OAAO,SAAS,cAAc;AAC3D,cAAQ,QAAQ,IAAI;AAAA,IACtB;AAAA,EACF,CAAC;AAED,QAAM,eAAe;AAAA,IACnB,GAAG;AAAA,IACH;AAAA,IACA,QAAQ,CAAC,eAAe,EAAE,OAAO,aAAqC;AAAA,EACxE;AACA,SAAO;AACT;AAuBA,MAAM,8BAA8B,MAAM,UAA0D;AAAA,EAClG,OAAO,eAAe;AAAA,IACpB,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,eAAe,MAAM;AAAA,IAAC;AAAA,IACtB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,SAAS,CAAC;AAAA,EACZ;AAAA,EACA,YAAmC;AAAA,EAEnC,YAAY,OAAmC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,KAAK;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAGA,sBAAsB,WAAuC,WAA+B;AAC1F,QAAI,SAAS;AACb,QAAI;AACF,eAAS,KAAK,UAAU,KAAK,KAAK,MAAM,KAAK,UAAU,SAAS,KAAK,KAAK,UAAU,KAAK,KAAK,MAAM,KAAK,UAAU,SAAS;AAAA,IAC9H,SAAQ,GAAG;AAAA,IAEX;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB;AACnB,UAAM,MAAM,KAAK,MAAM;AAEvB,UAAM,kBAAkB,KAAK,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAC1E,QAAI,KAAK;AAIP,UAAI,SAAS,iBAAiB,EAAC,MAAM,KAAI,CAAC;AAC1C,UAAI,qBAAqB,KAAK,MAAM,SAAS;AAC7C,UAAI,qBAAqB,KAAK,MAAM,SAAS;AAC7C,UAAI,wBAAwB,KAAK,MAAM,SAAS;AAAA,IAClD;AAEA,QAAG,KAAK,MAAM,WAAW,KAAK,MAAM,uBAAuB,KAAK,MAAM,QAAQ,iBAAiB;AAC7F,WAAK,MAAM,QAAQ,gBAAgB;AAAA,IACrC;AACA,QAAI,KAAK,MAAM,WAAW,KAAK,MAAM,oBAAoB;AACvD,WAAK,MAAM,QAAQ,iBAAiB,eAAe;AAEnD,iBAAW,MAAM;AACf,aAAK,MAAM,QAAS,OAAO;AAAA,MAC7B,GAAG,GAAG;AAAA,IACR;AAAA,EACF;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,MAAM;AAAA,MACd,WAAW,KAAK;AAAA,MAChB,OAAO,KAAK,MAAM;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA;AAAA;AAAA,MAGT,0BAA0B;AAAA,IAC5B;AAEA,UAAM,MAAM,IAAI,WAAW,IAAI,OAAO;AAEtC,UAAM,gBAAgB,MAAM;AAC1B,YAAM,SAAS,IAAI,UAAU;AAC7B,YAAM,OAAO,IAAI,QAAQ;AACzB,WAAK,MAAM,SAAS,EAAC,QAAQ,KAAI,CAAC;AAAA,IACpC;AACA,kBAAc;AAEd,QAAI,qBAAqB,QAAQ;AACjC,QAAI,qBAAqB,QAAQ;AACjC,QAAI,wBAAwB,QAAQ;AAEpC,SAAK,aAAa,GAAG;AAErB,UAAM,cAAc,IAAI,YAAY,KAAK,MAAM,EAAE,OAAO,CAAC;AACzD,QAAI,WAAW,aAAa,WAAW;AAEvC,UAAM,MAAM,IAAI,WAAW,kBAAkB,EAAC,gBAAe,KAAI,CAAC;AAClE,QAAI,WAAW,KAAK,WAAW;AAE/B,UAAM,UAAU,SAAS,cAAc,KAAK;AAE5C,UAAM,UAAU,IAAI,gBAAgB;AAAA,MAClC,OAAO,IAAI,WAAW,MAAM;AAAA,QAC1B,cAAc;AAAA,MAChB,CAAC;AAAA,MACD,cAAc;AAAA,MACd,qBAAqB;AAAA,MACrB,4BAA4B;AAAA,MAC5B,mBAAmB;AAAA,MACnB,wBAAwB;AAAA,MACxB,kBAAkB,CAAC,SAAiB,UAAkB;AACpD,eAAO,MAAM,OAAO,YAAY,SAAS,KAAK,CAAC,EAAE,WAAW,GAAG,EAAE,OAAO;AAAA,MAC1E;AAAA,MACA,mBAAmB,CAAC,kBAAsC,kBAAsC,kBAAkB,kBAAkB,eAAe,KAAK,MAAM,gBAAgB;AAAA,MAC9K,aAAa,CAAC,aAA+B;AAC3C,YAAG,KAAK,MAAM,oBAAoB;AAChC,iBAAO,YAAY,oBAAC,qCAAkC,UAAoB,GAAI,OAAO;AAAA,QACvF,OAAO;AACL,iBAAO,YAAY,oBAAC,2BAAwB,UAAoB,eAAe,KAAK,mBAAmB,MAAM,KAAK,MAAM,MAAM,GAAI,OAAO;AAAA,QAC3I;AAAA,MACF;AAAA,IACF,CAAC;AACD,QAAI,WAAW,OAAO;AAEtB,QAAI,GAAG,cAAc,MAAM;AACzB,WAAK,SAAS;AAAA,QACZ;AAAA,QACA;AAAA,QACA,MAAM,IAAI,QAAQ;AAAA,MACpB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,QAAQ,OAAK;AAClB,UAAG,EAAE,aAAa;AAAQ;AAC1B,WAAK,MAAM,aAAc;AAAA,QACvB,KAAK,KAAK,MAAM;AAAA,MAClB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,SAAS,OAAK;AACnB,cAAQ,IAAI,SAAS,CAAC;AAAA,IACxB,CAAC;AAED,QAAI,GAAG,QAAQ,QAAM;AACnB,WAAK,SAAS;AAAA,QACZ,MAAM,IAAI,QAAQ;AAAA,MACpB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,WAAW,aAAa;AAC/B,QAAI,GAAG,WAAW,aAAa;AAAA,EACjC;AAAA,EAEA,oBAAoB,CAAC,OAAe;AAClC,UAAM,QAAQ,KAAK,MAAM,SAAS,OAAO,UAAU,WAAS,MAAM,OAAO,EAAE;AAC3E,SAAK,MAAM,cAAc,KAAK;AAAA,EAChC;AAAA,EAEA,aAAa,KAAU;AACrB,UAAM,iBAAiB;AAAA,MACrB,gBAAgB,OAAO,WAAsC;AAC3D,cAAM,WAAW,CAAC;AAClB,YAAI;AACF,gBAAM,UAAU,gDAAgD,OAAO,KAAK;AAC5E,gBAAM,WAAW,MAAM,MAAM,OAAO;AACpC,gBAAM,UAAU,MAAM,SAAS,KAAK;AACpC,qBAAW,WAAW,QAAQ,UAAU;AACtC,kBAAM,SAAS;AAAA,cACb,QAAQ,KAAK,CAAC,KACT,QAAQ,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,KAAK;AAAA,cAC1C,QAAQ,KAAK,CAAC,KACT,QAAQ,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,KAAK;AAAA,YAC5C;AACA,kBAAM,QAAQ;AAAA,cACZ,MAAM;AAAA,cACN,UAAU;AAAA,gBACR,MAAM;AAAA,gBACN,aAAa;AAAA,cACf;AAAA,cACA,YAAY,QAAQ,WAAW;AAAA,cAC/B,YAAY,QAAQ;AAAA,cACpB,MAAM,QAAQ,WAAW;AAAA,cACzB,YAAY,CAAC,OAAO;AAAA,cACpB;AAAA,YACF;AACA,qBAAS,KAAK,KAAK;AAAA,UACrB;AAAA,QACF,SAAS,GAAG;AACV,kBAAQ,MAAM,wCAAwC,CAAC,EAAE;AAAA,QAC3D;AACA,eAAO;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,UAAM,WAAW,IAAI,iBAAiB,gBAAgB;AAAA,MACpD,aAAa,KAAK,MAAM,EAAE,QAAQ;AAAA,MAClC,YAAY;AAAA,IACd,CAAC;AACD,QAAI,WAAW,UAAU,UAAU;AAAA,EACrC;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAY,EAAE,UAAU;AAAA,QACxB,KAAK,OAAK,KAAK,YAAY;AAAA,QAC3B,eAAY;AAAA;AAAA,IACb;AAAA,EACH;AACF;AAEA,MAAM,gBAAgB,gBAAgB,EAAE,qBAAqB;AAC7D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"51cd1cb8f6e6b26a1376c1886253c2fd60ad0129"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return nn=function(){return a},a}nn();function nK(n,e){return nn().f[0]++,nn().s[0]++,wZ.render(n,e),nn().s[1]++,e}function eoe(n,e,t){nn().f[1]++;const r=(nn().s[2]++,{id:"background",type:"background",paint:{"background-color":"#1c1f24"}}),i=(nn().s[3]++,hie(t));nn().s[4]++,i?(nn().b[0][0]++,nn().s[5]++,e.push(i)):nn().b[0][1]++;const o=(nn().s[6]++,{});nn().s[7]++,Object.keys(n.sources).forEach(s=>{nn().f[2]++;const d=(nn().s[8]++,n.sources[s]);nn().s[9]++,nn().b[2][0]++,d.type!=="raster"&&(nn().b[2][1]++,d.type!=="raster-dem")?(nn().b[1][0]++,nn().s[10]++,o[s]=d):nn().b[1][1]++});const a=(nn().s[11]++,{...n,sources:o,layers:[r].concat(e)});return nn().s[12]++,a}class Ej extends Mn.Component{constructor(t){nn().f[7]++,nn().s[15]++;super(t);sn(this,"container",(nn().s[14]++,null));sn(this,"onLayerSelectById",(nn().s[69]++,t=>{nn().f[20]++;const r=(nn().s[70]++,this.props.mapStyle.layers.findIndex(i=>(nn().f[21]++,nn().s[71]++,i.id===t)));nn().s[72]++,this.props.onLayerSelect(r)}));nn().s[16]++,this.state={map:null,inspect:null}}shouldComponentUpdate(t,r){nn().f[8]++;let i=(nn().s[17]++,!1);nn().s[18]++;try{nn().s[19]++,i=(nn().b[3][0]++,JSON.stringify(this.props)!==JSON.stringify(t)||(nn().b[3][1]++,JSON.stringify(this.state)!==JSON.stringify(r)))}catch{}return nn().s[20]++,i}componentDidUpdate(){var i,o,a;nn().f[9]++;const t=(nn().s[21]++,this.state.map),r=(nn().s[22]++,this.props.replaceAccessTokens(this.props.mapStyle));nn().s[23]++,t?(nn().b[4][0]++,nn().s[24]++,t.setStyle(r,{diff:!0}),nn().s[25]++,t.showTileBoundaries=(i=this.props.options)==null?void 0:i.showTileBoundaries,nn().s[26]++,t.showCollisionBoxes=(o=this.props.options)==null?void 0:o.showCollisionBoxes,nn().s[27]++,t.showOverdrawInspector=(a=this.props.options)==null?void 0:a.showOverdrawInspector):nn().b[4][1]++,nn().s[28]++,nn().b[6][0]++,this.state.inspect&&(nn().b[6][1]++,this.props.inspectModeEnabled!==this.state.inspect._showInspectMap)?(nn().b[5][0]++,nn().s[29]++,this.state.inspect.toggleInspector()):nn().b[5][1]++,nn().s[30]++,nn().b[8][0]++,this.state.inspect&&(nn().b[8][1]++,this.props.inspectModeEnabled)?(nn().b[7][0]++,nn().s[31]++,this.state.inspect.setOriginalStyle(r),nn().s[32]++,setTimeout(()=>{nn().f[10]++,nn().s[33]++,this.state.inspect.render()},500)):nn().b[7][1]++}componentDidMount(){nn().f[11]++;const t=(nn().s[34]++,{...this.props.options,container:this.container,style:this.props.mapStyle,hash:!0,maxZoom:24,localIdeographFontFamily:!1}),r=(nn().s[35]++,new HC.Map(t));nn().s[36]++;const i=()=>{nn().f[12]++;const f=(nn().s[37]++,r.getCenter()),C=(nn().s[38]++,r.getZoom());nn().s[39]++,this.props.onChange({center:f,zoom:C})};nn().s[40]++,i(),nn().s[41]++,r.showTileBoundaries=t.showTileBoundaries,nn().s[42]++,r.showCollisionBoxes=t.showCollisionBoxes,nn().s[43]++,r.showOverdrawInspector=t.showOverdrawInspector,nn().s[44]++,this.initGeocoder(r);const o=(nn().s[45]++,new Aie(this.props.t("Zoom:")));nn().s[46]++,r.addControl(o,"top-right");const a=(nn().s[47]++,new HC.NavigationControl({visualizePitch:!0}));nn().s[48]++,r.addControl(a,"top-right");const s=(nn().s[49]++,document.createElement("div")),d=(nn().s[50]++,new h8({popup:new HC.Popup({closeOnClick:!1}),showMapPopup:!0,showMapPopupOnHover:!1,showInspectMapPopupOnHover:!0,showInspectButton:!1,blockHoverPopupOnClick:!0,assignLayerColor:(f,C)=>(nn().f[13]++,nn().s[51]++,pO(ej.brightColor(f,C)).desaturate(.5).string()),buildInspectStyle:(f,C)=>(nn().f[14]++,nn().s[52]++,eoe(f,C,this.props.highlightedLayer)),renderPopup:f=>(nn().f[15]++,nn().s[53]++,this.props.inspectModeEnabled?(nn().b[9][0]++,nn().s[54]++,nK(G.jsx(Nre,{features:f}),s)):(nn().b[9][1]++,nn().s[55]++,nK(G.jsx(aj,{features:f,onLayerSelect:this.onLayerSelectById,zoom:this.state.zoom}),s)))}));nn().s[56]++,r.addControl(d),nn().s[57]++,r.on("style.load",()=>{nn().f[16]++,nn().s[58]++,this.setState({map:r,inspect:d,zoom:r.getZoom()})}),nn().s[59]++,r.on("data",f=>{if(nn().f[17]++,nn().s[60]++,f.dataType!=="tile"){nn().b[10][0]++,nn().s[61]++;return}else nn().b[10][1]++;nn().s[62]++,this.props.onDataChange({map:this.state.map})}),nn().s[63]++,r.on("error",f=>{nn().f[18]++,nn().s[64]++,console.log("ERROR",f)}),nn().s[65]++,r.on("zoom",f=>{nn().f[19]++,nn().s[66]++,this.setState({zoom:r.getZoom()})}),nn().s[67]++,r.on("dragend",i),nn().s[68]++,r.on("zoomend",i)}initGeocoder(t){nn().f[22]++;const r=(nn().s[73]++,{forwardGeocode:async o=>{nn().f[23]++;const a=(nn().s[74]++,[]);nn().s[75]++;try{const s=(nn().s[76]++,`https://nominatim.openstreetmap.org/search?q=${o.query}&format=geojson&polygon_geojson=1&addressdetails=1`),d=(nn().s[77]++,await fetch(s)),f=(nn().s[78]++,await d.json());nn().s[79]++;for(const C of f.features){const O=(nn().s[80]++,[C.bbox[0]+(C.bbox[2]-C.bbox[0])/2,C.bbox[1]+(C.bbox[3]-C.bbox[1])/2]),E=(nn().s[81]++,{type:"Feature",geometry:{type:"Point",coordinates:O},place_name:C.properties.display_name,properties:C.properties,text:C.properties.display_name,place_type:["place"],center:O});nn().s[82]++,a.push(E)}}catch(s){nn().s[83]++,console.error(`Failed to forwardGeocode with error: ${s}`)}return nn().s[84]++,{features:a}}}),i=(nn().s[85]++,new Jie(r,{placeholder:this.props.t("Search"),maplibregl:HC}));nn().s[86]++,t.addControl(i,"top-left")}render(){nn().f[24]++;const t=(nn().s[87]++,this.props.t);return nn().s[88]++,G.jsx("div",{className:"maputnik-map__map",role:"region","aria-label":t("Map view"),ref:r=>(nn().f[25]++,nn().s[89]++,this.container=r),"data-wd-key":"maplibre:map"})}}sn(Ej,"defaultProps",(nn().s[13]++,{onMapLoaded:()=>{nn().f[3]++},onDataChange:()=>{nn().f[4]++},onLayerSelect:()=>{nn().f[5]++},onChange:()=>{nn().f[6]++},options:{}}));const toe=(nn().s[90]++,No()(Ej));var Xp=function(){function n(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}return n.prototype.preventDefault=function(){this.defaultPrevented=!0},n.prototype.stopPropagation=function(){this.propagationStopped=!0},n}();const hv={PROPERTYCHANGE:"propertychange"};var noe=function(){function n(){this.disposed=!1}return n.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},n.prototype.disposeInternal=function(){},n}();const m8=noe;function roe(n,e,t){for(var r,i,o=t||D1,a=0,s=n.length,d=!1;a<s;)r=a+(s-a>>1),i=+o(n[r],e),i<0?a=r+1:(s=r,d=!i);return d?a:~a}function D1(n,e){return n>e?1:n<e?-1:0}function g8(n,e,t){var r=n.length;if(n[0]<=e)return 0;if(e<=n[r-1])return r-1;var i=void 0;if(t>0){for(i=1;i<r;++i)if(n[i]<e)return i-1}else if(t<0){for(i=1;i<r;++i)if(n[i]<=e)return i}else for(i=1;i<r;++i){if(n[i]==e)return i;if(n[i]<e)return typeof t=="function"?t(e,n[i-1],n[i])>0?i-1:i:n[i-1]-e<e-n[i]?i-1:i}return r-1}function ioe(n,e,t){for(;e<t;){var r=n[e];n[e]=n[t],n[t]=r,++e,--t}}function jf(n,e){for(var t=Array.isArray(e)?e:[e],r=t.length,i=0;i<r;i++)n[n.length]=t[i]}function Q1(n,e){var t=n.length;if(t!==e.length)return!1;for(var r=0;r<t;r++)if(n[r]!==e[r])return!1;return!0}function ooe(n,e,t){var r=e||D1;return n.every(function(i,o){if(o===0)return!0;var a=r(n[o-1],i);return!(a>0||t&&a===0)})}function Ry(){return!0}function fw(){return!1}function L1(){}function aoe(n){var e=!1,t,r,i;return function(){var o=Array.prototype.slice.call(arguments);return(!e||this!==i||!Q1(o,r))&&(e=!0,i=this,r=o,t=n.apply(this,arguments)),t}}var xl=typeof Object.assign=="function"?Object.assign:function(n,e){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(o!=null)for(var a in o)o.hasOwnProperty(a)&&(t[a]=o[a])}return t};function zb(n){for(var e in n)delete n[e]}var Oj=typeof Object.values=="function"?Object.values:function(n){var e=[];for(var t in n)e.push(n[t]);return e};function F1(n){var e;for(e in n)return!1;return!e}var soe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),loe=function(n){soe(e,n);function e(t){var r=n.call(this)||this;return r.eventTarget_=t,r.pendingRemovals_=null,r.dispatching_=null,r.listeners_=null,r}return e.prototype.addEventListener=function(t,r){if(!(!t||!r)){var i=this.listeners_||(this.listeners_={}),o=i[t]||(i[t]=[]);o.indexOf(r)===-1&&o.push(r)}},e.prototype.dispatchEvent=function(t){var r=typeof t=="string",i=r?t:t.type,o=this.listeners_&&this.listeners_[i];if(o){var a=r?new Xp(t):t;a.target||(a.target=this.eventTarget_||this);var s=this.dispatching_||(this.dispatching_={}),d=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,d[i]=0),++s[i];for(var f,C=0,O=o.length;C<O;++C)if("handleEvent"in o[C]?f=o[C].handleEvent(a):f=o[C].call(this,a),f===!1||a.propagationStopped){f=!1;break}if(--s[i]===0){var E=d[i];for(delete d[i];E--;)this.removeEventListener(i,L1);delete s[i]}return f}},e.prototype.disposeInternal=function(){this.listeners_&&zb(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1},e.prototype.removeEventListener=function(t,r){var i=this.listeners_&&this.listeners_[t];if(i){var o=i.indexOf(r);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[o]=L1,++this.pendingRemovals_[t]):(i.splice(o,1),i.length===0&&delete this.listeners_[t]))}},e}(m8);const kv=loe,Wi={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function Oo(n,e,t,r,i){if(r&&r!==n&&(t=t.bind(r)),i){var o=t;t=function(){n.removeEventListener(e,t),o.apply(this,arguments)}}var a={target:n,type:e,listener:t};return n.addEventListener(e,t),a}function E4(n,e,t,r){return Oo(n,e,t,r,!0)}function rs(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),zb(n))}var uoe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),pw=function(n){uoe(e,n);function e(){var t=n.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return e.prototype.changed=function(){++this.revision_,this.dispatchEvent(Wi.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,r){if(Array.isArray(t)){for(var i=t.length,o=new Array(i),a=0;a<i;++a)o[a]=Oo(this,t[a],r);return o}else return Oo(this,t,r)},e.prototype.onceInternal=function(t,r){var i;if(Array.isArray(t)){var o=t.length;i=new Array(o);for(var a=0;a<o;++a)i[a]=E4(this,t[a],r)}else i=E4(this,t,r);return r.ol_key=i,i},e.prototype.unInternal=function(t,r){var i=r.ol_key;if(i)sb(i);else if(Array.isArray(t))for(var o=0,a=t.length;o<a;++o)this.removeEventListener(t[o],r);else this.removeEventListener(t,r)},e}(kv);pw.prototype.on;pw.prototype.once;pw.prototype.un;function sb(n){if(Array.isArray(n))for(var e=0,t=n.length;e<t;++e)rs(n[e]);else rs(n)}const Bj=pw;function Ci(){return function(){throw new Error("Unimplemented abstract method.")}()}var Aoe=0;function qi(n){return n.ol_uid||(n.ol_uid=String(++Aoe))}var coe="6.15.1",Ij=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),rK=function(n){Ij(e,n);function e(t,r,i){var o=n.call(this,t)||this;return o.key=r,o.oldValue=i,o}return e}(Xp),Fh=function(n){Ij(e,n);function e(t){var r=n.call(this)||this;return r.on,r.once,r.un,qi(r),r.values_=null,t!==void 0&&r.setProperties(t),r}return e.prototype.get=function(t){var r;return this.values_&&this.values_.hasOwnProperty(t)&&(r=this.values_[t]),r},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&xl({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,r){var i;i="change:".concat(t),this.hasListener(i)&&this.dispatchEvent(new rK(i,t,r)),i=hv.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new rK(i,t,r))},e.prototype.addChangeListener=function(t,r){this.addEventListener("change:".concat(t),r)},e.prototype.removeChangeListener=function(t,r){this.removeEventListener("change:".concat(t),r)},e.prototype.set=function(t,r,i){var o=this.values_||(this.values_={});if(i)o[t]=r;else{var a=o[t];o[t]=r,a!==r&&this.notify(t,a)}},e.prototype.setProperties=function(t,r){for(var i in t)this.set(i,t[i],r)},e.prototype.applyProperties=function(t){t.values_&&xl(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,r){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],F1(this.values_)&&(this.values_=null),r||this.notify(t,i)}},e}(Bj),doe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),hoe=function(n){doe(e,n);function e(t){var r=this,i="v"+coe.split("-")[0],o="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+t+" for details.";return r=n.call(this,o)||this,r.code=t,r.name="AssertionError",r.message=o,r}return e}(Error);const kj=hoe;function co(n,e){if(!n)throw new kj(e)}var foe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),poe=function(n){foe(e,n);function e(t){var r=n.call(this)||this;if(r.on,r.once,r.un,r.id_=void 0,r.geometryName_="geometry",r.style_=null,r.styleFunction_=void 0,r.geometryChangeKey_=null,r.addChangeListener(r.geometryName_,r.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){var i=t;r.setGeometry(i)}else{var o=t;r.setProperties(o)}return r}return e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var r=this.getGeometry();r&&t.setGeometry(r.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(rs(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=Oo(t,Wi.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?moe(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(Fh);function moe(n){if(typeof n=="function")return n;var e;if(Array.isArray(n))e=n;else{co(typeof n.getZIndex=="function",41);var t=n;e=[t]}return function(){return e}}var GA={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Wf={};Wf[GA.RADIANS]=6370997/(2*Math.PI);Wf[GA.DEGREES]=2*Math.PI*6370997/360;Wf[GA.FEET]=.3048;Wf[GA.METERS]=1;Wf[GA.USFEET]=1200/3937;var A0=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",goe=A0.indexOf("firefox")!==-1,yoe=A0.indexOf("safari")!==-1&&A0.indexOf("chrom")==-1;yoe&&(A0.indexOf("version/15.4")>=0||A0.match(/cpu (os|iphone os) 15_4 like mac os x/));var voe=A0.indexOf("webkit")!==-1&&A0.indexOf("edge")==-1,Coe=A0.indexOf("macintosh")!==-1,Tj=typeof devicePixelRatio<"u"?devicePixelRatio:1,mw=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,_oe=typeof Image<"u"&&Image.prototype.decode,Kj=function(){var n=!1;try{var e=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return n}(),Pj=new Array(6);function jd(){return[1,0,0,1,0,0]}function iK(n){return gw(n,1,0,0,1,0,0)}function y8(n,e){var t=n[0],r=n[1],i=n[2],o=n[3],a=n[4],s=n[5],d=e[0],f=e[1],C=e[2],O=e[3],E=e[4],P=e[5];return n[0]=t*d+i*f,n[1]=r*d+o*f,n[2]=t*C+i*O,n[3]=r*C+o*O,n[4]=t*E+i*P+a,n[5]=r*E+o*P+s,n}function gw(n,e,t,r,i,o,a){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n[4]=o,n[5]=a,n}function boe(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Cl(n,e){var t=e[0],r=e[1];return e[0]=n[0]*t+n[2]*r+n[4],e[1]=n[1]*t+n[3]*r+n[5],e}function US(n,e,t){return y8(n,gw(Pj,e,0,0,t,0,0))}function xoe(n,e,t){return gw(n,e,0,0,t,0,0)}function woe(n,e,t){return y8(n,gw(Pj,1,0,0,1,e,t))}function Gf(n,e,t,r,i,o,a,s){var d=Math.sin(o),f=Math.cos(o);return n[0]=r*f,n[1]=i*d,n[2]=-r*d,n[3]=i*f,n[4]=a*r*f-s*r*d+e,n[5]=a*i*d+s*i*f+t,n}function v8(n,e){var t=Moe(e);co(t!==0,32);var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],d=e[5];return n[0]=a/t,n[1]=-i/t,n[2]=-o/t,n[3]=r/t,n[4]=(o*d-a*s)/t,n[5]=-(r*d-i*s)/t,n}function Moe(n){return n[0]*n[3]-n[1]*n[2]}var oK;function Dj(n){var e="matrix("+n.join(", ")+")";if(mw)return e;var t=oK||(oK=document.createElement("div"));return t.style.transform=e,t.style.transform}const vu={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function CO(n){for(var e=$d(),t=0,r=n.length;t<r;++t)b_(e,n[t]);return e}function Soe(n,e,t){var r=Math.min.apply(null,n),i=Math.min.apply(null,e),o=Math.max.apply(null,n),a=Math.max.apply(null,e);return $f(r,i,o,a,t)}function r0(n,e,t){return t?(t[0]=n[0]-e,t[1]=n[1]-e,t[2]=n[2]+e,t[3]=n[3]+e,t):[n[0]-e,n[1]-e,n[2]+e,n[3]+e]}function Lj(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n.slice()}function Y1(n,e,t){var r,i;return e<n[0]?r=n[0]-e:n[2]<e?r=e-n[2]:r=0,t<n[1]?i=n[1]-t:n[3]<t?i=t-n[3]:i=0,r*r+i*i}function jb(n,e){return C8(n,e[0],e[1])}function zm(n,e){return n[0]<=e[0]&&e[2]<=n[2]&&n[1]<=e[1]&&e[3]<=n[3]}function C8(n,e,t){return n[0]<=e&&e<=n[2]&&n[1]<=t&&t<=n[3]}function _O(n,e){var t=n[0],r=n[1],i=n[2],o=n[3],a=e[0],s=e[1],d=vu.UNKNOWN;return a<t?d=d|vu.LEFT:a>i&&(d=d|vu.RIGHT),s<r?d=d|vu.BELOW:s>o&&(d=d|vu.ABOVE),d===vu.UNKNOWN&&(d=vu.INTERSECTING),d}function $d(){return[1/0,1/0,-1/0,-1/0]}function $f(n,e,t,r,i){return i?(i[0]=n,i[1]=e,i[2]=t,i[3]=r,i):[n,e,t,r]}function Nb(n){return $f(1/0,1/0,-1/0,-1/0,n)}function Fj(n,e){var t=n[0],r=n[1];return $f(t,r,t,r,e)}function _8(n,e,t,r,i){var o=Nb(i);return Rj(o,n,e,t,r)}function fv(n,e){return n[0]==e[0]&&n[2]==e[2]&&n[1]==e[1]&&n[3]==e[3]}function Uj(n,e){return e[0]<n[0]&&(n[0]=e[0]),e[2]>n[2]&&(n[2]=e[2]),e[1]<n[1]&&(n[1]=e[1]),e[3]>n[3]&&(n[3]=e[3]),n}function b_(n,e){e[0]<n[0]&&(n[0]=e[0]),e[0]>n[2]&&(n[2]=e[0]),e[1]<n[1]&&(n[1]=e[1]),e[1]>n[3]&&(n[3]=e[1])}function Rj(n,e,t,r,i){for(;t<r;t+=i)Eoe(n,e[t],e[t+1]);return n}function Eoe(n,e,t){n[0]=Math.min(n[0],e),n[1]=Math.min(n[1],t),n[2]=Math.max(n[2],e),n[3]=Math.max(n[3],t)}function zj(n,e){var t;return t=e(yw(n)),t||(t=e(vw(n)),t)||(t=e(Cw(n)),t)||(t=e(m0(n)),t)?t:!1}function bO(n){var e=0;return b8(n)||(e=Cs(n)*Ec(n)),e}function yw(n){return[n[0],n[1]]}function vw(n){return[n[2],n[1]]}function c0(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function Ooe(n,e){var t;return e==="bottom-left"?t=yw(n):e==="bottom-right"?t=vw(n):e==="top-left"?t=m0(n):e==="top-right"?t=Cw(n):co(!1,13),t}function xO(n,e,t,r,i){var o=wO(n,e,t,r),a=o[0],s=o[1],d=o[2],f=o[3],C=o[4],O=o[5],E=o[6],P=o[7];return $f(Math.min(a,d,C,E),Math.min(s,f,O,P),Math.max(a,d,C,E),Math.max(s,f,O,P),i)}function wO(n,e,t,r){var i=e*r[0]/2,o=e*r[1]/2,a=Math.cos(t),s=Math.sin(t),d=i*a,f=i*s,C=o*a,O=o*s,E=n[0],P=n[1];return[E-d+O,P-f-C,E-d-O,P-f+C,E+d-O,P+f+C,E+d+O,P+f-C,E-d+O,P-f-C]}function Ec(n){return n[3]-n[1]}function _1(n,e,t){var r=t||$d();return bl(n,e)?(n[0]>e[0]?r[0]=n[0]:r[0]=e[0],n[1]>e[1]?r[1]=n[1]:r[1]=e[1],n[2]<e[2]?r[2]=n[2]:r[2]=e[2],n[3]<e[3]?r[3]=n[3]:r[3]=e[3]):Nb(r),r}function m0(n){return[n[0],n[3]]}function Cw(n){return[n[2],n[3]]}function Cs(n){return n[2]-n[0]}function bl(n,e){return n[0]<=e[2]&&n[2]>=e[0]&&n[1]<=e[3]&&n[3]>=e[1]}function b8(n){return n[2]<n[0]||n[3]<n[1]}function Boe(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n}function Ioe(n,e,t){var r=!1,i=_O(n,e),o=_O(n,t);if(i===vu.INTERSECTING||o===vu.INTERSECTING)r=!0;else{var a=n[0],s=n[1],d=n[2],f=n[3],C=e[0],O=e[1],E=t[0],P=t[1],D=(P-O)/(E-C),$=void 0,H=void 0;o&vu.ABOVE&&!(i&vu.ABOVE)&&($=E-(P-f)/D,r=$>=a&&$<=d),!r&&o&vu.RIGHT&&!(i&vu.RIGHT)&&(H=P-(E-d)*D,r=H>=s&&H<=f),!r&&o&vu.BELOW&&!(i&vu.BELOW)&&($=E-(P-s)/D,r=$>=a&&$<=d),!r&&o&vu.LEFT&&!(i&vu.LEFT)&&(H=P-(E-a)*D,r=H>=s&&H<=f)}return r}function koe(n,e,t,r){var i=[];if(r>1)for(var o=n[2]-n[0],a=n[3]-n[1],s=0;s<r;++s)i.push(n[0]+o*s/r,n[1],n[2],n[1]+a*s/r,n[2]-o*s/r,n[3],n[0],n[3]-a*s/r);else i=[n[0],n[1],n[2],n[1],n[2],n[3],n[0],n[3]];e(i,i,2);for(var d=[],f=[],s=0,C=i.length;s<C;s+=2)d.push(i[s]),f.push(i[s+1]);return Soe(d,f,t)}function jj(n,e){var t=e.getExtent(),r=c0(n);if(e.canWrapX()&&(r[0]<t[0]||r[0]>=t[2])){var i=Cs(t),o=Math.floor((r[0]-t[0])/i),a=o*i;n[0]-=a,n[2]-=a}return n}function Toe(n,e){if(e.canWrapX()){var t=e.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[t[0],n[1],t[2],n[3]]];jj(n,e);var r=Cs(t);if(Cs(n)>r)return[[t[0],n[1],t[2],n[3]]];if(n[0]<t[0])return[[n[0]+r,n[1],t[2],n[3]],[t[0],n[1],n[2],n[3]]];if(n[2]>t[2])return[[n[0],n[1],t[2],n[3]],[t[0],n[1],n[2]-r,n[3]]]}return[n]}var Koe=function(){function n(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return n.prototype.canWrapX=function(){return this.canWrapX_},n.prototype.getCode=function(){return this.code_},n.prototype.getExtent=function(){return this.extent_},n.prototype.getUnits=function(){return this.units_},n.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Wf[this.units_]},n.prototype.getWorldExtent=function(){return this.worldExtent_},n.prototype.getAxisOrientation=function(){return this.axisOrientation_},n.prototype.isGlobal=function(){return this.global_},n.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)},n.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},n.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},n.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)},n.prototype.setWorldExtent=function(e){this.worldExtent_=e},n.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},n.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},n}();const x8=Koe;function Ll(n,e,t){return Math.min(Math.max(n,e),t)}var Poe=function(){var n;return"cosh"in Math?n=Math.cosh:n=function(e){var t=Math.exp(e);return(t+1/t)/2},n}(),Doe=function(){var n;return"log2"in Math?n=Math.log2:n=function(e){return Math.log(e)*Math.LOG2E},n}();function Loe(n,e,t,r,i,o){var a=i-t,s=o-r;if(a!==0||s!==0){var d=((n-t)*a+(e-r)*s)/(a*a+s*s);d>1?(t=i,r=o):d>0&&(t+=a*d,r+=s*d)}return b1(n,e,t,r)}function b1(n,e,t,r){var i=t-n,o=r-e;return i*i+o*o}function Foe(n){for(var e=n.length,t=0;t<e;t++){for(var r=t,i=Math.abs(n[t][t]),o=t+1;o<e;o++){var a=Math.abs(n[o][t]);a>i&&(i=a,r=o)}if(i===0)return null;var s=n[r];n[r]=n[t],n[t]=s;for(var d=t+1;d<e;d++)for(var f=-n[d][t]/n[t][t],C=t;C<e+1;C++)t==C?n[d][C]=0:n[d][C]+=f*n[t][C]}for(var O=new Array(e),E=e-1;E>=0;E--){O[E]=n[E][e]/n[E][E];for(var P=E-1;P>=0;P--)n[P][e]-=n[P][E]*O[E]}return O}function x3(n){return n*Math.PI/180}function x1(n,e){var t=n%e;return t*e<0?t+e:t}function Pp(n,e,t){return n+t*(e-n)}function Nj(n,e){var t=Math.pow(10,e);return Math.round(n*t)/t}function M2(n,e){return Math.floor(Nj(n,e))}function S2(n,e){return Math.ceil(Nj(n,e))}var Uoe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Wb=6378137,yy=Math.PI*Wb,Roe=[-yy,-yy,yy,yy],zoe=[-180,-85,180,85],E2=Wb*Math.log(Math.tan(Math.PI/2)),Pg=function(n){Uoe(e,n);function e(t){return n.call(this,{code:t,units:GA.METERS,extent:Roe,global:!0,worldExtent:zoe,getPointResolution:function(r,i){return r/Poe(i[1]/Wb)}})||this}return e}(x8),aK=[new Pg("EPSG:3857"),new Pg("EPSG:102100"),new Pg("EPSG:102113"),new Pg("EPSG:900913"),new Pg("http://www.opengis.net/def/crs/EPSG/0/3857"),new Pg("http://www.opengis.net/gml/srs/epsg.xml#3857")];function joe(n,e,t){var r=n.length,i=t>1?t:2,o=e;o===void 0&&(i>2?o=n.slice():o=new Array(r));for(var a=0;a<r;a+=i){o[a]=yy*n[a]/180;var s=Wb*Math.log(Math.tan(Math.PI*(+n[a+1]+90)/360));s>E2?s=E2:s<-E2&&(s=-E2),o[a+1]=s}return o}function Noe(n,e,t){var r=n.length,i=t>1?t:2,o=e;o===void 0&&(i>2?o=n.slice():o=new Array(r));for(var a=0;a<r;a+=i)o[a]=180*n[a]/yy,o[a+1]=360*Math.atan(Math.exp(n[a+1]/Wb))/Math.PI-90;return o}var Woe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Goe=6378137,sK=[-180,-90,180,90],$oe=Math.PI*Goe/180,j0=function(n){Woe(e,n);function e(t,r){return n.call(this,{code:t,units:GA.DEGREES,extent:sK,axisOrientation:r,global:!0,metersPerUnit:$oe,worldExtent:sK})||this}return e}(x8),lK=[new j0("CRS:84"),new j0("EPSG:4326","neu"),new j0("urn:ogc:def:crs:OGC:1.3:CRS84"),new j0("urn:ogc:def:crs:OGC:2:84"),new j0("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new j0("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new j0("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],MO={};function Qoe(n){return MO[n]||MO[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Yoe(n,e){MO[n]=e}var zy={};function O4(n,e,t){var r=n.getCode(),i=e.getCode();r in zy||(zy[r]={}),zy[r][i]=t}function qoe(n,e){var t;return n in zy&&e in zy[n]&&(t=zy[n][e]),t}function Voe(n,e){return n[0]+=+e[0],n[1]+=+e[1],n}function B4(n,e){for(var t=!0,r=n.length-1;r>=0;--r)if(n[r]!=e[r]){t=!1;break}return t}function w8(n,e){var t=Math.cos(e),r=Math.sin(e),i=n[0]*t-n[1]*r,o=n[1]*t+n[0]*r;return n[0]=i,n[1]=o,n}function Hoe(n,e){return n[0]*=e,n[1]*=e,n}function M8(n,e){if(e.canWrapX()){var t=Cs(e.getExtent()),r=Zoe(n,e,t);r&&(n[0]-=r*t)}return n}function Zoe(n,e,t){var r=e.getExtent(),i=0;if(e.canWrapX()&&(n[0]<r[0]||n[0]>r[2])){var o=t||Cs(r);i=Math.floor((n[0]-r[0])/o)}return i}var Xoe=63710088e-1;function uK(n,e,t){var r=t||Xoe,i=x3(n[1]),o=x3(e[1]),a=(o-i)/2,s=x3(e[0]-n[0])/2,d=Math.sin(a)*Math.sin(a)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))}var SO=!0;function Wj(n){var e=n===void 0?!0:n;SO=!e}function S8(n,e,t){var r;if(e!==void 0){for(var i=0,o=n.length;i<o;++i)e[i]=n[i];r=e}else r=n.slice();return r}function Gj(n,e,t){if(e!==void 0&&n!==e){for(var r=0,i=n.length;r<i;++r)e[r]=n[r];n=e}return n}function Joe(n){Yoe(n.getCode(),n),O4(n,n,S8)}function eae(n){n.forEach(Joe)}function Vs(n){return typeof n=="string"?Qoe(n):n||null}function AK(n,e,t,r){n=Vs(n);var i,o=n.getPointResolutionFunc();if(o){if(i=o(e,t),r&&r!==n.getUnits()){var a=n.getMetersPerUnit();a&&(i=i*a/Wf[r])}}else{var s=n.getUnits();if(s==GA.DEGREES&&!r||r==GA.DEGREES)i=e;else{var d=_w(n,Vs("EPSG:4326"));if(d===Gj&&s!==GA.DEGREES)i=e*n.getMetersPerUnit();else{var f=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];f=d(f,f,2);var C=uK(f.slice(0,2),f.slice(2,4)),O=uK(f.slice(4,6),f.slice(6,8));i=(C+O)/2}var a=r?Wf[r]:n.getMetersPerUnit();a!==void 0&&(i/=a)}}return i}function cK(n){eae(n),n.forEach(function(e){n.forEach(function(t){e!==t&&O4(e,t,S8)})})}function tae(n,e,t,r){n.forEach(function(i){e.forEach(function(o){O4(i,o,t),O4(o,i,r)})})}function E8(n,e){return n?typeof n=="string"?Vs(n):n:Vs(e)}function EO(n,e){return Wj(),O8(n,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function RS(n,e){var t=O8(n,e!==void 0?e:"EPSG:3857","EPSG:4326"),r=t[0];return(r<-180||r>180)&&(t[0]=x1(r+180,360)-180),t}function n1(n,e){if(n===e)return!0;var t=n.getUnits()===e.getUnits();if(n.getCode()===e.getCode())return t;var r=_w(n,e);return r===S8&&t}function _w(n,e){var t=n.getCode(),r=e.getCode(),i=qoe(t,r);return i||(i=Gj),i}function I4(n,e){var t=Vs(n),r=Vs(e);return _w(t,r)}function O8(n,e,t){var r=I4(e,t);return r(n,void 0,n.length)}var nae=null;function rae(){return nae}function OO(n,e){return n}function Op(n,e){return SO&&!B4(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(SO=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function $j(n,e){return n}function c1(n,e){return n}function iae(){cK(aK),cK(lK),tae(lK,aK,joe,Noe)}iae();function i0(n,e,t,r,i,o){for(var a=o||[],s=0,d=e;d<t;d+=r){var f=n[d],C=n[d+1];a[s++]=i[0]*f+i[2]*C+i[4],a[s++]=i[1]*f+i[3]*C+i[5]}return o&&a.length!=s&&(a.length=s),a}function Qj(n,e,t,r,i,o,a){for(var s=a||[],d=Math.cos(i),f=Math.sin(i),C=o[0],O=o[1],E=0,P=e;P<t;P+=r){var D=n[P]-C,$=n[P+1]-O;s[E++]=C+D*d-$*f,s[E++]=O+D*f+$*d;for(var H=P+2;H<P+r;++H)s[E++]=n[H]}return a&&s.length!=E&&(s.length=E),s}function oae(n,e,t,r,i,o,a,s){for(var d=s||[],f=a[0],C=a[1],O=0,E=e;E<t;E+=r){var P=n[E]-f,D=n[E+1]-C;d[O++]=f+i*P,d[O++]=C+o*D;for(var $=E+2;$<E+r;++$)d[O++]=n[$]}return s&&d.length!=O&&(d.length=O),d}function aae(n,e,t,r,i,o,a){for(var s=a||[],d=0,f=e;f<t;f+=r){s[d++]=n[f]+i,s[d++]=n[f+1]+o;for(var C=f+2;C<f+r;++C)s[d++]=n[C]}return a&&s.length!=d&&(s.length=d),s}var sae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),dK=jd(),lae=function(n){sae(e,n);function e(){var t=n.call(this)||this;return t.extent_=$d(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=aoe(function(r,i,o){if(!o)return this.getSimplifiedGeometry(i);var a=this.clone();return a.applyTransform(o),a.getSimplifiedGeometry(i)}),t}return e.prototype.simplifyTransformed=function(t,r){return this.simplifyTransformedInternal(this.getRevision(),t,r)},e.prototype.clone=function(){return Ci()},e.prototype.closestPointXY=function(t,r,i,o){return Ci()},e.prototype.containsXY=function(t,r){var i=this.getClosestPoint([t,r]);return i[0]===t&&i[1]===r},e.prototype.getClosestPoint=function(t,r){var i=r||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return Ci()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var r=this.computeExtent(this.extent_);(isNaN(r[0])||isNaN(r[1]))&&Nb(r),this.extentRevision_=this.getRevision()}return Boe(this.extent_,t)},e.prototype.rotate=function(t,r){Ci()},e.prototype.scale=function(t,r,i){Ci()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Ci()},e.prototype.getType=function(){return Ci()},e.prototype.applyTransform=function(t){Ci()},e.prototype.intersectsExtent=function(t){return Ci()},e.prototype.translate=function(t,r){Ci()},e.prototype.transform=function(t,r){var i=Vs(t),o=i.getUnits()==GA.TILE_PIXELS?function(a,s,d){var f=i.getExtent(),C=i.getWorldExtent(),O=Ec(C)/Ec(f);return Gf(dK,C[0],C[3],O,-O,0,0,0),i0(a,0,a.length,d,dK,s),I4(i,r)(a,s,d)}:I4(i,r);return this.applyTransform(o),this},e}(Fh);const Yj=lae;var uae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Aae=function(n){uae(e,n);function e(t){var r=n.call(this)||this;return r.geometries_=t||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(rs),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,r=this.geometries_.length;t<r;++t)this.changeEventsKeys_.push(Oo(this.geometries_[t],Wi.CHANGE,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,r,i,o){if(o<Y1(this.getExtent(),t,r))return o;for(var a=this.geometries_,s=0,d=a.length;s<d;++s)o=a[s].closestPointXY(t,r,i,o);return o},e.prototype.containsXY=function(t,r){for(var i=this.geometries_,o=0,a=i.length;o<a;++o)if(i[o].containsXY(t,r))return!0;return!1},e.prototype.computeExtent=function(t){Nb(t);for(var r=this.geometries_,i=0,o=r.length;i<o;++i)Uj(t,r[i].getExtent());return t},e.prototype.getGeometries=function(){return hK(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],r=this.geometries_,i=0,o=r.length;i<o;++i)r[i].getType()===this.getType()?t=t.concat(r[i].getGeometriesArrayRecursive()):t.push(r[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var r=[],i=this.geometries_,o=!1,a=0,s=i.length;a<s;++a){var d=i[a],f=d.getSimplifiedGeometry(t);r.push(f),f!==d&&(o=!0)}if(o){var C=new e(null);return C.setGeometriesArray(r),C}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return"GeometryCollection"},e.prototype.intersectsExtent=function(t){for(var r=this.geometries_,i=0,o=r.length;i<o;++i)if(r[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return this.geometries_.length===0},e.prototype.rotate=function(t,r){for(var i=this.geometries_,o=0,a=i.length;o<a;++o)i[o].rotate(t,r);this.changed()},e.prototype.scale=function(t,r,i){var o=i;o||(o=c0(this.getExtent()));for(var a=this.geometries_,s=0,d=a.length;s<d;++s)a[s].scale(t,r,o);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(hK(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var r=this.geometries_,i=0,o=r.length;i<o;++i)r[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,r){for(var i=this.geometries_,o=0,a=i.length;o<a;++o)i[o].translate(t,r);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),n.prototype.disposeInternal.call(this)},e}(Yj);function hK(n){for(var e=[],t=0,r=n.length;t<r;++t)e.push(n[t].clone());return e}const cae=Aae;var qj=function(){function n(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return n.prototype.getReadOptions=function(e,t){var r;if(t){var i=t.dataProjection?Vs(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()===GA.TILE_PIXELS&&(i=Vs(i),i.setWorldExtent(t.extent)),r={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(r)},n.prototype.adaptOptions=function(e){return xl({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)},n.prototype.getType=function(){return Ci()},n.prototype.readFeature=function(e,t){return Ci()},n.prototype.readFeatures=function(e,t){return Ci()},n.prototype.readGeometry=function(e,t){return Ci()},n.prototype.readProjection=function(e){return Ci()},n.prototype.writeFeature=function(e,t){return Ci()},n.prototype.writeFeatures=function(e,t){return Ci()},n.prototype.writeGeometry=function(e,t){return Ci()},n}();function B8(n,e,t){var r=t?Vs(t.featureProjection):null,i=t?Vs(t.dataProjection):null,o;if(r&&i&&!n1(r,i)?o=(e?n.clone():n).transform(e?r:i,e?i:r):o=n,e&&t&&t.decimals!==void 0){var a=Math.pow(10,t.decimals),s=function(d){for(var f=0,C=d.length;f<C;++f)d[f]=Math.round(d[f]*a)/a;return d};o===n&&(o=n.clone()),o.applyTransform(s)}return o}var dae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),hae=function(n){dae(e,n);function e(){return n.call(this)||this}return e.prototype.getType=function(){return"json"},e.prototype.readFeature=function(t,r){return this.readFeatureFromObject(O2(t),this.getReadOptions(t,r))},e.prototype.readFeatures=function(t,r){return this.readFeaturesFromObject(O2(t),this.getReadOptions(t,r))},e.prototype.readFeatureFromObject=function(t,r){return Ci()},e.prototype.readFeaturesFromObject=function(t,r){return Ci()},e.prototype.readGeometry=function(t,r){return this.readGeometryFromObject(O2(t),this.getReadOptions(t,r))},e.prototype.readGeometryFromObject=function(t,r){return Ci()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(O2(t))},e.prototype.readProjectionFromObject=function(t){return Ci()},e.prototype.writeFeature=function(t,r){return JSON.stringify(this.writeFeatureObject(t,r))},e.prototype.writeFeatureObject=function(t,r){return Ci()},e.prototype.writeFeatures=function(t,r){return JSON.stringify(this.writeFeaturesObject(t,r))},e.prototype.writeFeaturesObject=function(t,r){return Ci()},e.prototype.writeGeometry=function(t,r){return JSON.stringify(this.writeGeometryObject(t,r))},e.prototype.writeGeometryObject=function(t,r){return Ci()},e}(qj);function O2(n){if(typeof n=="string"){var e=JSON.parse(n);return e||null}else return n!==null?n:null}const fae=hae,ja={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};var pae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),mae=function(n){pae(e,n);function e(){var t=n.call(this)||this;return t.layout=ja.XY,t.stride=2,t.flatCoordinates=null,t}return e.prototype.computeExtent=function(t){return _8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Ci()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var r=this.getSimplifiedGeometryInternal(t),i=r.getFlatCoordinates();return i.length<this.flatCoordinates.length?r:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,r){this.stride=fK(t),this.layout=t,this.flatCoordinates=r},e.prototype.setCoordinates=function(t,r){Ci()},e.prototype.setLayout=function(t,r,i){var o;if(t)o=fK(t);else{for(var a=0;a<i;++a)if(r.length===0){this.layout=ja.XY,this.stride=2;return}else r=r[0];o=r.length,t=gae(o)}this.layout=t,this.stride=o},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,r){var i=this.getFlatCoordinates();if(i){var o=this.getStride();Qj(i,0,i.length,o,t,r,i),this.changed()}},e.prototype.scale=function(t,r,i){var o=r;o===void 0&&(o=t);var a=i;a||(a=c0(this.getExtent()));var s=this.getFlatCoordinates();if(s){var d=this.getStride();oae(s,0,s.length,d,t,o,a,s),this.changed()}},e.prototype.translate=function(t,r){var i=this.getFlatCoordinates();if(i){var o=this.getStride();aae(i,0,i.length,o,t,r,i),this.changed()}},e}(Yj);function gae(n){var e;return n==2?e=ja.XY:n==3?e=ja.XYZ:n==4&&(e=ja.XYZM),e}function fK(n){var e;return n==ja.XY?e=2:n==ja.XYZ||n==ja.XYM?e=3:n==ja.XYZM&&(e=4),e}function yae(n,e,t){var r=n.getFlatCoordinates();if(r){var i=n.getStride();return i0(r,0,r.length,i,e,t)}else return null}const q1=mae;function pK(n,e,t,r,i,o,a){var s=n[e],d=n[e+1],f=n[t]-s,C=n[t+1]-d,O;if(f===0&&C===0)O=e;else{var E=((i-s)*f+(o-d)*C)/(f*f+C*C);if(E>1)O=t;else if(E>0){for(var P=0;P<r;++P)a[P]=Pp(n[e+P],n[t+P],E);a.length=r;return}else O=e}for(var P=0;P<r;++P)a[P]=n[O+P];a.length=r}function I8(n,e,t,r,i){var o=n[e],a=n[e+1];for(e+=r;e<t;e+=r){var s=n[e],d=n[e+1],f=b1(o,a,s,d);f>i&&(i=f),o=s,a=d}return i}function k8(n,e,t,r,i){for(var o=0,a=t.length;o<a;++o){var s=t[o];i=I8(n,e,s,r,i),e=s}return i}function vae(n,e,t,r,i){for(var o=0,a=t.length;o<a;++o){var s=t[o];i=k8(n,e,s,r,i),e=s[s.length-1]}return i}function T8(n,e,t,r,i,o,a,s,d,f,C){if(e==t)return f;var O,E;if(i===0)if(E=b1(a,s,n[e],n[e+1]),E<f){for(O=0;O<r;++O)d[O]=n[e+O];return d.length=r,E}else return f;for(var P=C||[NaN,NaN],D=e+r;D<t;)if(pK(n,D-r,D,r,a,s,P),E=b1(a,s,P[0],P[1]),E<f){for(f=E,O=0;O<r;++O)d[O]=P[O];d.length=r,D+=r}else D+=r*Math.max((Math.sqrt(E)-Math.sqrt(f))/i|0,1);if(o&&(pK(n,t-r,e,r,a,s,P),E=b1(a,s,P[0],P[1]),E<f)){for(f=E,O=0;O<r;++O)d[O]=P[O];d.length=r}return f}function K8(n,e,t,r,i,o,a,s,d,f,C){for(var O=C||[NaN,NaN],E=0,P=t.length;E<P;++E){var D=t[E];f=T8(n,e,D,r,i,o,a,s,d,f,O),e=D}return f}function Cae(n,e,t,r,i,o,a,s,d,f,C){for(var O=C||[NaN,NaN],E=0,P=t.length;E<P;++E){var D=t[E];f=K8(n,e,D,r,i,o,a,s,d,f,O),e=D[D.length-1]}return f}function _ae(n,e,t,r){for(var i=0,o=t.length;i<o;++i)n[e++]=t[i];return e}function bw(n,e,t,r){for(var i=0,o=t.length;i<o;++i)for(var a=t[i],s=0;s<r;++s)n[e++]=a[s];return e}function P8(n,e,t,r,i){for(var o=i||[],a=0,s=0,d=t.length;s<d;++s){var f=bw(n,e,t[s],r);o[a++]=f,e=f}return o.length=a,o}function bae(n,e,t,r,i){for(var o=i||[],a=0,s=0,d=t.length;s<d;++s){var f=P8(n,e,t[s],r,o[a]);o[a++]=f,e=f[f.length-1]}return o.length=a,o}function D8(n,e,t,r,i,o,a){var s=(t-e)/r;if(s<3){for(;e<t;e+=r)o[a++]=n[e],o[a++]=n[e+1];return a}var d=new Array(s);d[0]=1,d[s-1]=1;for(var f=[e,t-r],C=0;f.length>0;){for(var O=f.pop(),E=f.pop(),P=0,D=n[E],$=n[E+1],H=n[O],Q=n[O+1],N=E+r;N<O;N+=r){var Z=n[N],ae=n[N+1],pe=Loe(Z,ae,D,$,H,Q);pe>P&&(C=N,P=pe)}P>i&&(d[(C-e)/r]=1,E+r<C&&f.push(E,C),C+r<O&&f.push(C,O))}for(var N=0;N<s;++N)d[N]&&(o[a++]=n[e+N*r],o[a++]=n[e+N*r+1]);return a}function xae(n,e,t,r,i,o,a,s){for(var d=0,f=t.length;d<f;++d){var C=t[d];a=D8(n,e,C,r,i,o,a),s.push(a),e=C}return a}function Z0(n,e){return e*Math.round(n/e)}function wae(n,e,t,r,i,o,a){if(e==t)return a;var s=Z0(n[e],i),d=Z0(n[e+1],i);e+=r,o[a++]=s,o[a++]=d;var f,C;do if(f=Z0(n[e],i),C=Z0(n[e+1],i),e+=r,e==t)return o[a++]=f,o[a++]=C,a;while(f==s&&C==d);for(;e<t;){var O=Z0(n[e],i),E=Z0(n[e+1],i);if(e+=r,!(O==f&&E==C)){var P=f-s,D=C-d,$=O-s,H=E-d;if(P*H==D*$&&(P<0&&$<P||P==$||P>0&&$>P)&&(D<0&&H<D||D==H||D>0&&H>D)){f=O,C=E;continue}o[a++]=f,o[a++]=C,s=f,d=C,f=O,C=E}}return o[a++]=f,o[a++]=C,a}function Vj(n,e,t,r,i,o,a,s){for(var d=0,f=t.length;d<f;++d){var C=t[d];a=wae(n,e,C,r,i,o,a),s.push(a),e=C}return a}function Mae(n,e,t,r,i,o,a,s){for(var d=0,f=t.length;d<f;++d){var C=t[d],O=[];a=Vj(n,e,C,r,i,o,a,O),s.push(O),e=C[C.length-1]}return a}function Hj(n,e,t,r,i){var o;for(e+=r;e<t;e+=r)if(o=i(n.slice(e-r,e),n.slice(e,e+r)),o)return o;return!1}function jm(n,e,t,r,i){for(var o=i!==void 0?i:[],a=0,s=e;s<t;s+=r)o[a++]=n.slice(s,s+r);return o.length=a,o}function lb(n,e,t,r,i){for(var o=i!==void 0?i:[],a=0,s=0,d=t.length;s<d;++s){var f=t[s];o[a++]=jm(n,e,f,r,o[a]),e=f}return o.length=a,o}function BO(n,e,t,r,i){for(var o=i!==void 0?i:[],a=0,s=0,d=t.length;s<d;++s){var f=t[s];o[a++]=lb(n,e,f,r,o[a]),e=f[f.length-1]}return o.length=a,o}function k4(n,e,t,r,i,o,a){var s,d,f=(t-e)/r;if(f===1)s=e;else if(f===2)s=e,d=i;else if(f!==0){for(var C=n[e],O=n[e+1],E=0,P=[0],D=e+r;D<t;D+=r){var $=n[D],H=n[D+1];E+=Math.sqrt(($-C)*($-C)+(H-O)*(H-O)),P.push(E),C=$,O=H}var Q=i*E,N=roe(P,Q);N<0?(d=(Q-P[-N-2])/(P[-N-1]-P[-N-2]),s=e+(-N-2)*r):s=e+N*r}for(var Z=a>1?a:2,ae=o||new Array(Z),D=0;D<Z;++D)ae[D]=s===void 0?NaN:d===void 0?n[s+D]:Pp(n[s+D],n[s+r+D],d);return ae}function IO(n,e,t,r,i,o){if(t==e)return null;var a;if(i<n[e+r-1])return o?(a=n.slice(e,e+r),a[r-1]=i,a):null;if(n[t-1]<i)return o?(a=n.slice(t-r,t),a[r-1]=i,a):null;if(i==n[e+r-1])return n.slice(e,e+r);for(var s=e/r,d=t/r;s<d;){var f=s+d>>1;i<n[(f+1)*r-1]?d=f:s=f+1}var C=n[s*r-1];if(i==C)return n.slice((s-1)*r,(s-1)*r+r);var O=n[(s+1)*r-1],E=(i-C)/(O-C);a=[];for(var P=0;P<r-1;++P)a.push(Pp(n[(s-1)*r+P],n[s*r+P],E));return a.push(i),a}function Sae(n,e,t,r,i,o,a){if(a)return IO(n,e,t[t.length-1],r,i,o);var s;if(i<n[r-1])return o?(s=n.slice(0,r),s[r-1]=i,s):null;if(n[n.length-1]<i)return o?(s=n.slice(n.length-r),s[r-1]=i,s):null;for(var d=0,f=t.length;d<f;++d){var C=t[d];if(e!=C){if(i<n[e+r-1])return null;if(i<=n[C-1])return IO(n,e,C,r,i,!1);e=C}}return null}function Eae(n,e,t,r,i){var o=zj(i,function(a){return!d1(n,e,t,r,a[0],a[1])});return!o}function d1(n,e,t,r,i,o){for(var a=0,s=n[t-r],d=n[t-r+1];e<t;e+=r){var f=n[e],C=n[e+1];d<=o?C>o&&(f-s)*(o-d)-(i-s)*(C-d)>0&&a++:C<=o&&(f-s)*(o-d)-(i-s)*(C-d)<0&&a--,s=f,d=C}return a!==0}function L8(n,e,t,r,i,o){if(t.length===0||!d1(n,e,t[0],r,i,o))return!1;for(var a=1,s=t.length;a<s;++a)if(d1(n,t[a-1],t[a],r,i,o))return!1;return!0}function Oae(n,e,t,r,i,o){if(t.length===0)return!1;for(var a=0,s=t.length;a<s;++a){var d=t[a];if(L8(n,e,d,r,i,o))return!0;e=d[d.length-1]}return!1}function xw(n,e,t,r,i){var o=Rj($d(),n,e,t,r);return bl(i,o)?zm(i,o)||o[0]>=i[0]&&o[2]<=i[2]||o[1]>=i[1]&&o[3]<=i[3]?!0:Hj(n,e,t,r,function(a,s){return Ioe(i,a,s)}):!1}function Bae(n,e,t,r,i){for(var o=0,a=t.length;o<a;++o){if(xw(n,e,t[o],r,i))return!0;e=t[o]}return!1}function Zj(n,e,t,r,i){return!!(xw(n,e,t,r,i)||d1(n,e,t,r,i[0],i[1])||d1(n,e,t,r,i[0],i[3])||d1(n,e,t,r,i[2],i[1])||d1(n,e,t,r,i[2],i[3]))}function Xj(n,e,t,r,i){if(!Zj(n,e,t[0],r,i))return!1;if(t.length===1)return!0;for(var o=1,a=t.length;o<a;++o)if(Eae(n,t[o-1],t[o],r,i)&&!xw(n,t[o-1],t[o],r,i))return!1;return!0}function Iae(n,e,t,r,i){for(var o=0,a=t.length;o<a;++o){var s=t[o];if(Xj(n,e,s,r,i))return!0;e=s[s.length-1]}return!1}function Jj(n,e,t,r){for(var i=n[e],o=n[e+1],a=0,s=e+r;s<t;s+=r){var d=n[s],f=n[s+1];a+=Math.sqrt((d-i)*(d-i)+(f-o)*(f-o)),i=d,o=f}return a}var kae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Tae=function(n){kae(e,n);function e(t,r){var i=n.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,r!==void 0&&!Array.isArray(t[0])?i.setFlatCoordinates(r,t):i.setCoordinates(t,r),i}return e.prototype.appendCoordinate=function(t){this.flatCoordinates?jf(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,r,i,o){return o<Y1(this.getExtent(),t,r)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(I8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),T8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,r,i,o))},e.prototype.forEachSegment=function(t){return Hj(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,r){if(this.layout!=ja.XYM&&this.layout!=ja.XYZM)return null;var i=r!==void 0?r:!1;return IO(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return jm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,r){return k4(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,this.stride)},e.prototype.getLength=function(){return Jj(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=D8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,ja.XY)},e.prototype.getType=function(){return"LineString"},e.prototype.intersectsExtent=function(t){return xw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=bw(this.flatCoordinates,0,t,this.stride),this.changed()},e}(q1);const T4=Tae;var Kae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Pae=function(n){Kae(e,n);function e(t,r,i){var o=n.call(this)||this;if(o.ends_=[],o.maxDelta_=-1,o.maxDeltaRevision_=-1,Array.isArray(t[0]))o.setCoordinates(t,r);else if(r!==void 0&&i)o.setFlatCoordinates(r,t),o.ends_=i;else{for(var a=o.getLayout(),s=t,d=[],f=[],C=0,O=s.length;C<O;++C){var E=s[C];C===0&&(a=E.getLayout()),jf(d,E.getFlatCoordinates()),f.push(d.length)}o.setFlatCoordinates(a,d),o.ends_=f}return o}return e.prototype.appendLineString=function(t){this.flatCoordinates?jf(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,r,i,o){return o<Y1(this.getExtent(),t,r)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(k8(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),K8(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,r,i,o))},e.prototype.getCoordinateAtM=function(t,r,i){if(this.layout!=ja.XYM&&this.layout!=ja.XYZM||this.flatCoordinates.length===0)return null;var o=r!==void 0?r:!1,a=i!==void 0?i:!1;return Sae(this.flatCoordinates,0,this.ends_,this.stride,t,o,a)},e.prototype.getCoordinates=function(){return lb(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new T4(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,r=this.ends_,i=this.layout,o=[],a=0,s=0,d=r.length;s<d;++s){var f=r[s],C=new T4(t.slice(a,f),i);o.push(C),a=f}return o},e.prototype.getFlatMidpoints=function(){for(var t=[],r=this.flatCoordinates,i=0,o=this.ends_,a=this.stride,s=0,d=o.length;s<d;++s){var f=o[s],C=k4(r,i,f,a,.5);jf(t,C),i=f}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=xae(this.flatCoordinates,0,this.ends_,this.stride,t,r,0,i),new e(r,ja.XY,i)},e.prototype.getType=function(){return"MultiLineString"},e.prototype.intersectsExtent=function(t){return Bae(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=P8(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(q1);const eN=Pae;var Dae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Lae=function(n){Dae(e,n);function e(t,r){var i=n.call(this)||this;return i.setCoordinates(t,r),i}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,r,i,o){var a=this.flatCoordinates,s=b1(t,r,a[0],a[1]);if(s<o){for(var d=this.stride,f=0;f<d;++f)i[f]=a[f];return i.length=d,s}else return o},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Fj(this.flatCoordinates,t)},e.prototype.getType=function(){return"Point"},e.prototype.intersectsExtent=function(t){return C8(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=_ae(this.flatCoordinates,0,t,this.stride),this.changed()},e}(q1);const ub=Lae;var Fae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Uae=function(n){Fae(e,n);function e(t,r){var i=n.call(this)||this;return r&&!Array.isArray(t[0])?i.setFlatCoordinates(r,t):i.setCoordinates(t,r),i}return e.prototype.appendPoint=function(t){this.flatCoordinates?jf(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,r,i,o){if(o<Y1(this.getExtent(),t,r))return o;for(var a=this.flatCoordinates,s=this.stride,d=0,f=a.length;d<f;d+=s){var C=b1(t,r,a[d],a[d+1]);if(C<o){o=C;for(var O=0;O<s;++O)i[O]=a[d+O];i.length=s}}return o},e.prototype.getCoordinates=function(){return jm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var r=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||r<=t?null:new ub(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,r=this.layout,i=this.stride,o=[],a=0,s=t.length;a<s;a+=i){var d=new ub(t.slice(a,a+i),r);o.push(d)}return o},e.prototype.getType=function(){return"MultiPoint"},e.prototype.intersectsExtent=function(t){for(var r=this.flatCoordinates,i=this.stride,o=0,a=r.length;o<a;o+=i){var s=r[o],d=r[o+1];if(C8(t,s,d))return!0}return!1},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=bw(this.flatCoordinates,0,t,this.stride),this.changed()},e}(q1);const F8=Uae;function tN(n,e,t,r){for(var i=0,o=n[t-r],a=n[t-r+1];e<t;e+=r){var s=n[e],d=n[e+1];i+=a*s-o*d,o=s,a=d}return i/2}function nN(n,e,t,r){for(var i=0,o=0,a=t.length;o<a;++o){var s=t[o];i+=tN(n,e,s,r),e=s}return i}function Rae(n,e,t,r){for(var i=0,o=0,a=t.length;o<a;++o){var s=t[o];i+=nN(n,e,s,r),e=s[s.length-1]}return i}var zae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),jae=function(n){zae(e,n);function e(t,r){var i=n.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,r!==void 0&&!Array.isArray(t[0])?i.setFlatCoordinates(r,t):i.setCoordinates(t,r),i}return e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,r,i,o){return o<Y1(this.getExtent(),t,r)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(I8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),T8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,r,i,o))},e.prototype.getArea=function(){return tN(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return jm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=D8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,ja.XY)},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=bw(this.flatCoordinates,0,t,this.stride),this.changed()},e}(q1);const mK=jae;function U8(n,e,t,r,i,o,a){for(var s,d,f,C,O,E,P,D=i[o+1],$=[],H=0,Q=t.length;H<Q;++H){var N=t[H];for(C=n[N-r],E=n[N-r+1],s=e;s<N;s+=r)O=n[s],P=n[s+1],(D<=E&&P<=D||E<=D&&D<=P)&&(f=(D-E)/(P-E)*(O-C)+C,$.push(f)),C=O,E=P}var Z=NaN,ae=-1/0;for($.sort(D1),C=$[0],s=1,d=$.length;s<d;++s){O=$[s];var pe=Math.abs(O-C);pe>ae&&(f=(C+O)/2,L8(n,e,t,r,f,D)&&(Z=f,ae=pe)),C=O}return isNaN(Z)&&(Z=i[o]),a?(a.push(Z,D,ae),a):[Z,D,ae]}function rN(n,e,t,r,i){for(var o=[],a=0,s=t.length;a<s;++a){var d=t[a];o=U8(n,e,d,r,i,2*a,o),e=d[d.length-1]}return o}function Nae(n,e,t,r){for(;e<t-r;){for(var i=0;i<r;++i){var o=n[e+i];n[e+i]=n[t-r+i],n[t-r+i]=o}e+=r,t-=r}}function R8(n,e,t,r){for(var i=0,o=n[t-r],a=n[t-r+1];e<t;e+=r){var s=n[e],d=n[e+1];i+=(s-o)*(d+a),o=s,a=d}return i===0?void 0:i>0}function iN(n,e,t,r,i){for(var o=i!==void 0?i:!1,a=0,s=t.length;a<s;++a){var d=t[a],f=R8(n,e,d,r);if(a===0){if(o&&f||!o&&!f)return!1}else if(o&&!f||!o&&f)return!1;e=d}return!0}function Wae(n,e,t,r,i){for(var o=0,a=t.length;o<a;++o){var s=t[o];if(!iN(n,e,s,r,i))return!1;s.length&&(e=s[s.length-1])}return!0}function kO(n,e,t,r,i){for(var o=i!==void 0?i:!1,a=0,s=t.length;a<s;++a){var d=t[a],f=R8(n,e,d,r),C=a===0?o&&f||!o&&!f:o&&!f||!o&&f;C&&Nae(n,e,d,r),e=d}return e}function gK(n,e,t,r,i){for(var o=0,a=t.length;o<a;++o)e=kO(n,e,t[o],r,i);return e}function Gae(n,e){for(var t=[],r=0,i=0,o=0,a=e.length;o<a;++o){var s=e[o];if(!R8(n,r,s,2))t.push(e.slice(i,o+1));else{if(t.length===0)continue;t[t.length-1].push(e[i])}i=o+1,r=s}return t}var $ae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),oN=function(n){$ae(e,n);function e(t,r,i){var o=n.call(this)||this;return o.ends_=[],o.flatInteriorPointRevision_=-1,o.flatInteriorPoint_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,r!==void 0&&i?(o.setFlatCoordinates(r,t),o.ends_=i):o.setCoordinates(t,r),o}return e.prototype.appendLinearRing=function(t){this.flatCoordinates?jf(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,r,i,o){return o<Y1(this.getExtent(),t,r)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(k8(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),K8(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,r,i,o))},e.prototype.containsXY=function(t,r){return L8(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,r)},e.prototype.getArea=function(){return nN(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var r;return t!==void 0?(r=this.getOrientedFlatCoordinates().slice(),kO(r,0,this.ends_,this.stride,t)):r=this.flatCoordinates,lb(r,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=c0(this.getExtent());this.flatInteriorPoint_=U8(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new ub(this.getFlatInteriorPoint(),ja.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new mK(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,r=this.flatCoordinates,i=this.ends_,o=[],a=0,s=0,d=i.length;s<d;++s){var f=i[s],C=new mK(r.slice(a,f),t);o.push(C),a=f}return o},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;iN(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=kO(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=Vj(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),r,0,i),new e(r,ja.XY,i)},e.prototype.getType=function(){return"Polygon"},e.prototype.intersectsExtent=function(t){return Xj(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=P8(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(q1);const Ab=oN;function yK(n){var e=n[0],t=n[1],r=n[2],i=n[3],o=[e,t,e,i,r,i,r,t,e,t];return new oN(o,ja.XY,[o.length])}function aN(n,e,t,r){for(var i=[],o=$d(),a=0,s=t.length;a<s;++a){var d=t[a];o=_8(n,e,d[0],r),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=d[d.length-1]}return i}var Qae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Yae=function(n){Qae(e,n);function e(t,r,i){var o=n.call(this)||this;if(o.endss_=[],o.flatInteriorPointsRevision_=-1,o.flatInteriorPoints_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){for(var a=o.getLayout(),s=t,d=[],f=[],C=0,O=s.length;C<O;++C){var E=s[C];C===0&&(a=E.getLayout());for(var P=d.length,D=E.getEnds(),$=0,H=D.length;$<H;++$)D[$]+=P;jf(d,E.getFlatCoordinates()),f.push(D)}r=a,t=d,i=f}return r!==void 0&&i?(o.setFlatCoordinates(r,t),o.endss_=i):o.setCoordinates(t,r),o}return e.prototype.appendPolygon=function(t){var r;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),r=t.getEnds().slice(),this.endss_.push();else{var i=this.flatCoordinates.length;jf(this.flatCoordinates,t.getFlatCoordinates()),r=t.getEnds().slice();for(var o=0,a=r.length;o<a;++o)r[o]+=i}this.endss_.push(r),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,r=new Array(t),i=0;i<t;++i)r[i]=this.endss_[i].slice();var o=new e(this.flatCoordinates.slice(),this.layout,r);return o.applyProperties(this),o},e.prototype.closestPointXY=function(t,r,i,o){return o<Y1(this.getExtent(),t,r)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(vae(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Cae(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,r,i,o))},e.prototype.containsXY=function(t,r){return Oae(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,r)},e.prototype.getArea=function(){return Rae(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var r;return t!==void 0?(r=this.getOrientedFlatCoordinates().slice(),gK(r,0,this.endss_,this.stride,t)):r=this.flatCoordinates,BO(r,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=aN(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=rN(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new F8(this.getFlatInteriorPoints().slice(),ja.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Wae(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=gK(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=Mae(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),r,0,i),new e(r,ja.XY,i)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var r;if(t===0)r=0;else{var i=this.endss_[t-1];r=i[i.length-1]}var o=this.endss_[t].slice(),a=o[o.length-1];if(r!==0)for(var s=0,d=o.length;s<d;++s)o[s]-=r;return new Ab(this.flatCoordinates.slice(r,a),this.layout,o)},e.prototype.getPolygons=function(){for(var t=this.layout,r=this.flatCoordinates,i=this.endss_,o=[],a=0,s=0,d=i.length;s<d;++s){var f=i[s].slice(),C=f[f.length-1];if(a!==0)for(var O=0,E=f.length;O<E;++O)f[O]-=a;var P=new Ab(r.slice(a,C),t,f);o.push(P),a=C}return o},e.prototype.getType=function(){return"MultiPolygon"},e.prototype.intersectsExtent=function(t){return Iae(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,r){this.setLayout(r,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=bae(this.flatCoordinates,0,t,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{var o=i[i.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()},e}(q1);const sN=Yae;var qae=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Vae=function(n){qae(e,n);function e(t){var r=this,i=t||{};return r=n.call(this)||this,r.dataProjection=Vs(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(r.defaultFeatureProjection=Vs(i.featureProjection)),r.geometryName_=i.geometryName,r.extractGeometryName_=i.extractGeometryName,r.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],r}return e.prototype.readFeatureFromObject=function(t,r){var i=null;t.type==="Feature"?i=t:i={type:"Feature",geometry:t,properties:null};var o=TO(i.geometry,r),a=new poe;return this.geometryName_?a.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&a.setGeometryName(i.geometry_name),a.setGeometry(o),"id"in i&&a.setId(i.id),i.properties&&a.setProperties(i.properties,!0),a},e.prototype.readFeaturesFromObject=function(t,r){var i=t,o=null;if(i.type==="FeatureCollection"){var a=t;o=[];for(var s=a.features,d=0,f=s.length;d<f;++d)o.push(this.readFeatureFromObject(s[d],r))}else o=[this.readFeatureFromObject(t,r)];return o},e.prototype.readGeometryFromObject=function(t,r){return TO(t,r)},e.prototype.readProjectionFromObject=function(t){var r=t.crs,i;return r?r.type=="name"?i=Vs(r.properties.name):r.type==="EPSG"?i=Vs("EPSG:"+r.properties.code):co(!1,36):i=this.dataProjection,i},e.prototype.writeFeatureObject=function(t,r){r=this.adaptOptions(r);var i={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(i.id=o),!t.hasProperties())return i;var a=t.getProperties(),s=t.getGeometry();return s&&(i.geometry=KO(s,r),delete a[t.getGeometryName()]),F1(a)||(i.properties=a),i},e.prototype.writeFeaturesObject=function(t,r){r=this.adaptOptions(r);for(var i=[],o=0,a=t.length;o<a;++o)i.push(this.writeFeatureObject(t[o],r));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,r){return KO(t,this.adaptOptions(r))},e}(fae);function TO(n,e){if(!n)return null;var t;switch(n.type){case"Point":{t=Zae(n);break}case"LineString":{t=Xae(n);break}case"Polygon":{t=nse(n);break}case"MultiPoint":{t=ese(n);break}case"MultiLineString":{t=Jae(n);break}case"MultiPolygon":{t=tse(n);break}case"GeometryCollection":{t=Hae(n);break}default:throw new Error("Unsupported GeoJSON type: "+n.type)}return B8(t,!1,e)}function Hae(n,e){var t=n.geometries.map(function(r){return TO(r,e)});return new cae(t)}function Zae(n){return new ub(n.coordinates)}function Xae(n){return new T4(n.coordinates)}function Jae(n){return new eN(n.coordinates)}function ese(n){return new F8(n.coordinates)}function tse(n){return new sN(n.coordinates)}function nse(n){return new Ab(n.coordinates)}function KO(n,e){n=B8(n,!0,e);var t=n.getType(),r;switch(t){case"Point":{r=lse(n);break}case"LineString":{r=ise(n);break}case"Polygon":{r=use(n,e);break}case"MultiPoint":{r=ase(n);break}case"MultiLineString":{r=ose(n);break}case"MultiPolygon":{r=sse(n,e);break}case"GeometryCollection":{r=rse(n,e);break}case"Circle":{r={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return r}function rse(n,e){var t=n.getGeometriesArray().map(function(r){var i=xl({},e);return delete i.featureProjection,KO(r,i)});return{type:"GeometryCollection",geometries:t}}function ise(n,e){return{type:"LineString",coordinates:n.getCoordinates()}}function ose(n,e){return{type:"MultiLineString",coordinates:n.getCoordinates()}}function ase(n,e){return{type:"MultiPoint",coordinates:n.getCoordinates()}}function sse(n,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:n.getCoordinates(t)}}function lse(n,e){return{type:"Point",coordinates:n.getCoordinates()}}function use(n,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:n.getCoordinates(t)}}var Ase=sa,B2=J5;function sa(n){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(n)?n:new Uint8Array(n||0),this.pos=0,this.type=0,this.length=this.buf.length}sa.Varint=0;sa.Fixed64=1;sa.Bytes=2;sa.Fixed32=5;var PO=65536*65536,vK=1/PO,cse=12,lN=typeof TextDecoder>"u"?null:new TextDecoder("utf8");sa.prototype={destroy:function(){this.buf=null},readFields:function(n,e,t){for(t=t||this.length;this.pos<t;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=r&7,n(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(n,e){return this.readFields(n,e,this.readVarint()+this.pos)},readFixed32:function(){var n=I2(this.buf,this.pos);return this.pos+=4,n},readSFixed32:function(){var n=_K(this.buf,this.pos);return this.pos+=4,n},readFixed64:function(){var n=I2(this.buf,this.pos)+I2(this.buf,this.pos+4)*PO;return this.pos+=8,n},readSFixed64:function(){var n=I2(this.buf,this.pos)+_K(this.buf,this.pos+4)*PO;return this.pos+=8,n},readFloat:function(){var n=B2.read(this.buf,this.pos,!0,23,4);return this.pos+=4,n},readDouble:function(){var n=B2.read(this.buf,this.pos,!0,52,8);return this.pos+=8,n},readVarint:function(n){var e=this.buf,t,r;return r=e[this.pos++],t=r&127,r<128||(r=e[this.pos++],t|=(r&127)<<7,r<128)||(r=e[this.pos++],t|=(r&127)<<14,r<128)||(r=e[this.pos++],t|=(r&127)<<21,r<128)?t:(r=e[this.pos],t|=(r&15)<<28,dse(t,n,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var n=this.readVarint();return n%2===1?(n+1)/-2:n/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var n=this.readVarint()+this.pos,e=this.pos;return this.pos=n,n-e>=cse&&lN?Sse(this.buf,e,n):Mse(this.buf,e,n)},readBytes:function(){var n=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,n);return this.pos=n,e},readPackedVarint:function(n,e){if(this.type!==sa.Bytes)return n.push(this.readVarint(e));var t=xp(this);for(n=n||[];this.pos<t;)n.push(this.readVarint(e));return n},readPackedSVarint:function(n){if(this.type!==sa.Bytes)return n.push(this.readSVarint());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readSVarint());return n},readPackedBoolean:function(n){if(this.type!==sa.Bytes)return n.push(this.readBoolean());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readBoolean());return n},readPackedFloat:function(n){if(this.type!==sa.Bytes)return n.push(this.readFloat());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readFloat());return n},readPackedDouble:function(n){if(this.type!==sa.Bytes)return n.push(this.readDouble());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readDouble());return n},readPackedFixed32:function(n){if(this.type!==sa.Bytes)return n.push(this.readFixed32());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readFixed32());return n},readPackedSFixed32:function(n){if(this.type!==sa.Bytes)return n.push(this.readSFixed32());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readSFixed32());return n},readPackedFixed64:function(n){if(this.type!==sa.Bytes)return n.push(this.readFixed64());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readFixed64());return n},readPackedSFixed64:function(n){if(this.type!==sa.Bytes)return n.push(this.readSFixed64());var e=xp(this);for(n=n||[];this.pos<e;)n.push(this.readSFixed64());return n},skip:function(n){var e=n&7;if(e===sa.Varint)for(;this.buf[this.pos++]>127;);else if(e===sa.Bytes)this.pos=this.readVarint()+this.pos;else if(e===sa.Fixed32)this.pos+=4;else if(e===sa.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(n,e){this.writeVarint(n<<3|e)},realloc:function(n){for(var e=this.length||16;e<this.pos+n;)e*=2;if(e!==this.length){var t=new Uint8Array(e);t.set(this.buf),this.buf=t,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(n){this.realloc(4),Lg(this.buf,n,this.pos),this.pos+=4},writeSFixed32:function(n){this.realloc(4),Lg(this.buf,n,this.pos),this.pos+=4},writeFixed64:function(n){this.realloc(8),Lg(this.buf,n&-1,this.pos),Lg(this.buf,Math.floor(n*vK),this.pos+4),this.pos+=8},writeSFixed64:function(n){this.realloc(8),Lg(this.buf,n&-1,this.pos),Lg(this.buf,Math.floor(n*vK),this.pos+4),this.pos+=8},writeVarint:function(n){if(n=+n||0,n>268435455||n<0){hse(n,this);return}this.realloc(4),this.buf[this.pos++]=n&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=n>>>7&127)))},writeSVarint:function(n){this.writeVarint(n<0?-n*2-1:n*2)},writeBoolean:function(n){this.writeVarint(!!n)},writeString:function(n){n=String(n),this.realloc(n.length*4),this.pos++;var e=this.pos;this.pos=Ese(this.buf,n,this.pos);var t=this.pos-e;t>=128&&CK(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(n){this.realloc(4),B2.write(this.buf,n,this.pos,!0,23,4),this.pos+=4},writeDouble:function(n){this.realloc(8),B2.write(this.buf,n,this.pos,!0,52,8),this.pos+=8},writeBytes:function(n){var e=n.length;this.writeVarint(e),this.realloc(e);for(var t=0;t<e;t++)this.buf[this.pos++]=n[t]},writeRawMessage:function(n,e){this.pos++;var t=this.pos;n(e,this);var r=this.pos-t;r>=128&&CK(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeMessage:function(n,e,t){this.writeTag(n,sa.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(n,e){e.length&&this.writeMessage(n,mse,e)},writePackedSVarint:function(n,e){e.length&&this.writeMessage(n,gse,e)},writePackedBoolean:function(n,e){e.length&&this.writeMessage(n,Cse,e)},writePackedFloat:function(n,e){e.length&&this.writeMessage(n,yse,e)},writePackedDouble:function(n,e){e.length&&this.writeMessage(n,vse,e)},writePackedFixed32:function(n,e){e.length&&this.writeMessage(n,_se,e)},writePackedSFixed32:function(n,e){e.length&&this.writeMessage(n,bse,e)},writePackedFixed64:function(n,e){e.length&&this.writeMessage(n,xse,e)},writePackedSFixed64:function(n,e){e.length&&this.writeMessage(n,wse,e)},writeBytesField:function(n,e){this.writeTag(n,sa.Bytes),this.writeBytes(e)},writeFixed32Field:function(n,e){this.writeTag(n,sa.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(n,e){this.writeTag(n,sa.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(n,e){this.writeTag(n,sa.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(n,e){this.writeTag(n,sa.Fixed64),this.writeSFixed64(e)},writeVarintField:function(n,e){this.writeTag(n,sa.Varint),this.writeVarint(e)},writeSVarintField:function(n,e){this.writeTag(n,sa.Varint),this.writeSVarint(e)},writeStringField:function(n,e){this.writeTag(n,sa.Bytes),this.writeString(e)},writeFloatField:function(n,e){this.writeTag(n,sa.Fixed32),this.writeFloat(e)},writeDoubleField:function(n,e){this.writeTag(n,sa.Fixed64),this.writeDouble(e)},writeBooleanField:function(n,e){this.writeVarintField(n,!!e)}};function dse(n,e,t){var r=t.buf,i,o;if(o=r[t.pos++],i=(o&112)>>4,o<128||(o=r[t.pos++],i|=(o&127)<<3,o<128)||(o=r[t.pos++],i|=(o&127)<<10,o<128)||(o=r[t.pos++],i|=(o&127)<<17,o<128)||(o=r[t.pos++],i|=(o&127)<<24,o<128)||(o=r[t.pos++],i|=(o&1)<<31,o<128))return Dg(n,i,e);throw new Error("Expected varint not more than 10 bytes")}function xp(n){return n.type===sa.Bytes?n.readVarint()+n.pos:n.pos+1}function Dg(n,e,t){return t?e*4294967296+(n>>>0):(e>>>0)*4294967296+(n>>>0)}function hse(n,e){var t,r;if(n>=0?(t=n%4294967296|0,r=n/4294967296|0):(t=~(-n%4294967296),r=~(-n/4294967296),t^4294967295?t=t+1|0:(t=0,r=r+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),fse(t,r,e),pse(r,e)}function fse(n,e,t){t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos]=n&127}function pse(n,e){var t=(n&7)<<4;e.buf[e.pos++]|=t|((n>>>=3)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127)))))}function CK(n,e,t){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(r);for(var i=t.pos-1;i>=n;i--)t.buf[i+r]=t.buf[i]}function mse(n,e){for(var t=0;t<n.length;t++)e.writeVarint(n[t])}function gse(n,e){for(var t=0;t<n.length;t++)e.writeSVarint(n[t])}function yse(n,e){for(var t=0;t<n.length;t++)e.writeFloat(n[t])}function vse(n,e){for(var t=0;t<n.length;t++)e.writeDouble(n[t])}function Cse(n,e){for(var t=0;t<n.length;t++)e.writeBoolean(n[t])}function _se(n,e){for(var t=0;t<n.length;t++)e.writeFixed32(n[t])}function bse(n,e){for(var t=0;t<n.length;t++)e.writeSFixed32(n[t])}function xse(n,e){for(var t=0;t<n.length;t++)e.writeFixed64(n[t])}function wse(n,e){for(var t=0;t<n.length;t++)e.writeSFixed64(n[t])}function I2(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16)+n[e+3]*16777216}function Lg(n,e,t){n[t]=e,n[t+1]=e>>>8,n[t+2]=e>>>16,n[t+3]=e>>>24}function _K(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16)+(n[e+3]<<24)}function Mse(n,e,t){for(var r="",i=e;i<t;){var o=n[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s>t)break;var d,f,C;s===1?o<128&&(a=o):s===2?(d=n[i+1],(d&192)===128&&(a=(o&31)<<6|d&63,a<=127&&(a=null))):s===3?(d=n[i+1],f=n[i+2],(d&192)===128&&(f&192)===128&&(a=(o&15)<<12|(d&63)<<6|f&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(d=n[i+1],f=n[i+2],C=n[i+3],(d&192)===128&&(f&192)===128&&(C&192)===128&&(a=(o&15)<<18|(d&63)<<12|(f&63)<<6|C&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,r+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),r+=String.fromCharCode(a),i+=s}return r}function Sse(n,e,t){return lN.decode(n.subarray(e,t))}function Ese(n,e,t){for(var r=0,i,o;r<e.length;r++){if(i=e.charCodeAt(r),i>55295&&i<57344)if(o)if(i<56320){n[t++]=239,n[t++]=191,n[t++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||r+1===e.length?(n[t++]=239,n[t++]=191,n[t++]=189):o=i;continue}else o&&(n[t++]=239,n[t++]=191,n[t++]=189,o=null);i<128?n[t++]=i:(i<2048?n[t++]=i>>6|192:(i<65536?n[t++]=i>>12|224:(n[t++]=i>>18|240,n[t++]=i>>12&63|128),n[t++]=i>>6&63|128),n[t++]=i&63|128)}return t}const Ose=Ba(Ase);var bK=jd(),cb=function(){function n(e,t,r,i,o){this.styleFunction,this.extent_,this.id_=o,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=i}return n.prototype.get=function(e){return this.properties_[e]},n.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_==="Point"?Fj(this.flatCoordinates_):_8(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},n.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=c0(this.getExtent());this.flatInteriorPoints_=U8(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},n.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=aN(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=rN(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},n.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=k4(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},n.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var e=this.flatCoordinates_,t=0,r=this.ends_,i=0,o=r.length;i<o;++i){var a=r[i],s=k4(e,t,a,2,.5);jf(this.flatMidpoints_,s),t=a}}return this.flatMidpoints_},n.prototype.getId=function(){return this.id_},n.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},n.prototype.getGeometry=function(){return this},n.prototype.getSimplifiedGeometry=function(e){return this},n.prototype.simplifyTransformed=function(e,t){return this},n.prototype.getProperties=function(){return this.properties_},n.prototype.getStride=function(){return 2},n.prototype.getStyleFunction=function(){return this.styleFunction},n.prototype.getType=function(){return this.type_},n.prototype.transform=function(e){e=Vs(e);var t=e.getExtent(),r=e.getWorldExtent();if(t&&r){var i=Ec(r)/Ec(t);Gf(bK,r[0],r[3],i,-i,0,0,0),i0(this.flatCoordinates_,0,this.flatCoordinates_.length,2,bK,this.flatCoordinates_)}},n.prototype.getEnds=function(){return this.ends_},n}();cb.prototype.getEndss=cb.prototype.getEnds;cb.prototype.getFlatCoordinates=cb.prototype.getOrientedFlatCoordinates;const DO=cb;var Bse=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Ise=function(n){Bse(e,n);function e(t){var r=n.call(this)||this,i=t||{};return r.dataProjection=new x8({code:"",units:GA.TILE_PIXELS}),r.featureClass_=i.featureClass?i.featureClass:DO,r.geometryName_=i.geometryName,r.layerName_=i.layerName?i.layerName:"layer",r.layers_=i.layers?i.layers:null,r.idProperty_=i.idProperty,r.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],r}return e.prototype.readRawGeometry_=function(t,r,i,o){t.pos=r.geometry;for(var a=t.readVarint()+t.pos,s=1,d=0,f=0,C=0,O=0,E=0;t.pos<a;){if(!d){var P=t.readVarint();s=P&7,d=P>>3}d--,s===1||s===2?(f+=t.readSVarint(),C+=t.readSVarint(),s===1&&O>E&&(o.push(O),E=O),i.push(f,C),O+=2):s===7?O>E&&(i.push(i[E],i[E+1]),O+=2):co(!1,59)}O>E&&(o.push(O),E=O)},e.prototype.createFeature_=function(t,r,i){var o=r.type;if(o===0)return null;var a,s=r.properties,d;this.idProperty_?(d=s[this.idProperty_],delete s[this.idProperty_]):d=r.id,s[this.layerName_]=r.layer.name;var f=[],C=[];this.readRawGeometry_(t,r,f,C);var O=Dse(o,C.length);if(this.featureClass_===DO)a=new this.featureClass_(O,f,C,s,d),a.transform(i.dataProjection);else{var E=void 0;if(O=="Polygon"){var P=Gae(f,C);E=P.length>1?new sN(f,ja.XY,P):new Ab(f,ja.XY,C)}else E=O==="Point"?new ub(f,ja.XY):O==="LineString"?new T4(f,ja.XY):O==="MultiPoint"?new F8(f,ja.XY):O==="MultiLineString"?new eN(f,ja.XY,C):null;var D=this.featureClass_;a=new D,this.geometryName_&&a.setGeometryName(this.geometryName_);var $=B8(E,!1,i);a.setGeometry($),d!==void 0&&a.setId(d),a.setProperties(s,!0)}return a},e.prototype.getType=function(){return"arraybuffer"},e.prototype.readFeatures=function(t,r){var i=this.layers_,o=this.adaptOptions(r),a=Vs(o.dataProjection);a.setWorldExtent(o.extent),o.dataProjection=a;var s=new Ose(t),d=s.readFields(kse,{}),f=[];for(var C in d)if(!(i&&i.indexOf(C)==-1)){var O=d[C],E=O?[0,0,O.extent,O.extent]:null;a.setExtent(E);for(var P=0,D=O.length;P<D;++P){var $=Pse(s,O,P),H=this.createFeature_(s,$,o);H!==null&&f.push(H)}}return f},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(qj);function kse(n,e,t){if(n===3){var r={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(Tse,r,i),r.length=r.features.length,r.length&&(e[r.name]=r)}}function Tse(n,e,t){if(n===15)e.version=t.readVarint();else if(n===1)e.name=t.readString();else if(n===5)e.extent=t.readVarint();else if(n===2)e.features.push(t.pos);else if(n===3)e.keys.push(t.readString());else if(n===4){for(var r=null,i=t.readVarint()+t.pos;t.pos<i;)n=t.readVarint()>>3,r=n===1?t.readString():n===2?t.readFloat():n===3?t.readDouble():n===4?t.readVarint64():n===5?t.readVarint():n===6?t.readSVarint():n===7?t.readBoolean():null;e.values.push(r)}}function Kse(n,e,t){if(n==1)e.id=t.readVarint();else if(n==2)for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e.layer.keys[t.readVarint()],o=e.layer.values[t.readVarint()];e.properties[i]=o}else n==3?e.type=t.readVarint():n==4&&(e.geometry=t.pos)}function Pse(n,e,t){n.pos=e.features[t];var r=n.readVarint()+n.pos,i={layer:e,type:0,properties:{}};return n.readFields(Kse,i,r),i}function Dse(n,e){var t;return n===1?t=e===1?"Point":"MultiPoint":n===2?t=e===1?"LineString":"MultiLineString":n===3&&(t="Polygon"),t}const Lse=Ise;var Fse=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Use=/^([a-z]*)$|^hsla?\(.*\)$/i;function uN(n){return typeof n=="string"?n:AN(n)}function Rse(n){var e=document.createElement("div");if(e.style.color=n,e.style.color!==""){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}else return""}var zse=function(){var n=1024,e={},t=0;return function(r){var i;if(e.hasOwnProperty(r))i=e[r];else{if(t>=n){var o=0;for(var a in e)o++&3||(delete e[a],--t)}i=jse(r),e[r]=i,++t}return i}}();function K4(n){return Array.isArray(n)?n:zse(n)}function jse(n){var e,t,r,i,o;if(Use.exec(n)&&(n=Rse(n)),Fse.exec(n)){var a=n.length-1,s=void 0;a<=4?s=1:s=2;var d=a===4||a===8;e=parseInt(n.substr(1+0*s,s),16),t=parseInt(n.substr(1+1*s,s),16),r=parseInt(n.substr(1+2*s,s),16),d?i=parseInt(n.substr(1+3*s,s),16):i=255,s==1&&(e=(e<<4)+e,t=(t<<4)+t,r=(r<<4)+r,d&&(i=(i<<4)+i)),o=[e,t,r,i/255]}else n.indexOf("rgba(")==0?(o=n.slice(5,-1).split(",").map(Number),xK(o)):n.indexOf("rgb(")==0?(o=n.slice(4,-1).split(",").map(Number),o.push(1),xK(o)):co(!1,14);return o}function xK(n){return n[0]=Ll(n[0]+.5|0,0,255),n[1]=Ll(n[1]+.5|0,0,255),n[2]=Ll(n[2]+.5|0,0,255),n[3]=Ll(n[3],0,1),n}function AN(n){var e=n[0];e!=(e|0)&&(e=e+.5|0);var t=n[1];t!=(t|0)&&(t=t+.5|0);var r=n[2];r!=(r|0)&&(r=r+.5|0);var i=n[3]===void 0?1:Math.round(n[3]*100)/100;return"rgba("+e+","+t+","+r+","+i+")"}var Nse=function(){function n(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return n.prototype.clear=function(){this.cache_={},this.cacheSize_=0},n.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},n.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var r=this.cache_[t];!(e++&3)&&!r.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}},n.prototype.get=function(e,t,r){var i=wK(e,t,r);return i in this.cache_?this.cache_[i]:null},n.prototype.set=function(e,t,r,i){var o=wK(e,t,r);this.cache_[o]=i,++this.cacheSize_},n.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},n}();function wK(n,e,t){var r=t?uN(t):"null";return e+":"+n+":"+r}var P4=new Nse;const Ma={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};var Wse=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Gse=function(n){Wse(e,n);function e(t){var r=n.call(this)||this;r.on,r.once,r.un,r.background_=t.background;var i=xl({},t);return typeof t.properties=="object"&&(delete i.properties,xl(i,t.properties)),i[Ma.OPACITY]=t.opacity!==void 0?t.opacity:1,co(typeof i[Ma.OPACITY]=="number",64),i[Ma.VISIBLE]=t.visible!==void 0?t.visible:!0,i[Ma.Z_INDEX]=t.zIndex,i[Ma.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,i[Ma.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,i[Ma.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,i[Ma.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,r.className_=i.className!==void 0?i.className:"ol-layer",delete i.className,r.setProperties(i),r.state_=null,r}return e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var r=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return r.opacity=Ll(Math.round(this.getOpacity()*100)/100,0,1),r.visible=this.getVisible(),r.extent=this.getExtent(),r.zIndex=i===void 0&&!r.managed?1/0:i,r.maxResolution=this.getMaxResolution(),r.minResolution=Math.max(this.getMinResolution(),0),r.minZoom=this.getMinZoom(),r.maxZoom=this.getMaxZoom(),this.state_=r,r},e.prototype.getLayersArray=function(t){return Ci()},e.prototype.getLayerStatesArray=function(t){return Ci()},e.prototype.getExtent=function(){return this.get(Ma.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(Ma.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(Ma.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(Ma.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(Ma.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(Ma.OPACITY)},e.prototype.getSourceState=function(){return Ci()},e.prototype.getVisible=function(){return this.get(Ma.VISIBLE)},e.prototype.getZIndex=function(){return this.get(Ma.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Ma.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(Ma.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(Ma.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(Ma.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(Ma.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){co(typeof t=="number",64),this.set(Ma.OPACITY,t)},e.prototype.setVisible=function(t){this.set(Ma.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(Ma.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),n.prototype.disposeInternal.call(this)},e}(Fh);const cN=Gse,o0={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var $se=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ww=function(n){$se(e,n);function e(t){var r=this,i=xl({},t);delete i.source,r=n.call(this,i)||this,r.on,r.once,r.un,r.mapPrecomposeKey_=null,r.mapRenderKey_=null,r.sourceChangeKey_=null,r.renderer_=null,r.rendered=!1,t.render&&(r.render=t.render),t.map&&r.setMap(t.map),r.addChangeListener(Ma.SOURCE,r.handleSourcePropertyChange_);var o=t.source?t.source:null;return r.setSource(o),r}return e.prototype.getLayersArray=function(t){var r=t||[];return r.push(this),r},e.prototype.getLayerStatesArray=function(t){var r=t||[];return r.push(this.getLayerState()),r},e.prototype.getSource=function(){return this.get(Ma.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(rs(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Oo(t,Wi.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(function(r){return r([])})},e.prototype.getData=function(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)},e.prototype.render=function(t,r){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,r)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(Ma.MAP,t)},e.prototype.getMapInternal=function(){return this.get(Ma.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(rs(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(rs(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Oo(t,o0.PRECOMPOSE,function(r){var i=r,o=i.frameState.layerStatesArray,a=this.getLayerState(!1);co(!o.some(function(s){return s.layer===a.layer}),67),o.push(a)},this),this.mapRenderKey_=Oo(this,Wi.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Ma.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),n.prototype.disposeInternal.call(this)},e}(cN);function D4(n,e){if(!n.visible)return!1;var t=e.resolution;if(t<n.minResolution||t>=n.maxResolution)return!1;var r=e.zoom;return r>n.minZoom&&r<=n.maxZoom}var Qse=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Yse=function(n){Qse(e,n);function e(t){var r=n.call(this)||this;return r.map_=t,r}return e.prototype.dispatchRenderEvent=function(t,r){Ci()},e.prototype.calculateMatrices2D=function(t){var r=t.viewState,i=t.coordinateToPixelTransform,o=t.pixelToCoordinateTransform;Gf(i,t.size[0]/2,t.size[1]/2,1/r.resolution,-1/r.resolution,-r.rotation,-r.center[0],-r.center[1]),v8(o,i)},e.prototype.forEachFeatureAtCoordinate=function(t,r,i,o,a,s,d,f){var C,O=r.viewState;function E(ye,gt,yt,st){return a.call(s,gt,ye?yt:null,st)}var P=O.projection,D=M8(t.slice(),P),$=[[0,0]];if(P.canWrapX()&&o){var H=P.getExtent(),Q=Cs(H);$.push([-Q,0],[Q,0])}for(var N=r.layerStatesArray,Z=N.length,ae=[],pe=[],fe=0;fe<$.length;fe++)for(var X=Z-1;X>=0;--X){var oe=N[X],Ce=oe.layer;if(Ce.hasRenderer()&&D4(oe,O)&&d.call(f,Ce)){var we=Ce.getRenderer(),Te=Ce.getSource();if(we&&Te){var Pe=Te.getWrapX()?D:t,he=E.bind(null,oe.managed);pe[0]=Pe[0]+$[fe][0],pe[1]=Pe[1]+$[fe][1],C=we.forEachFeatureAtCoordinate(pe,r,i,he,ae)}if(C)return C}}if(ae.length!==0){var $e=1/ae.length;return ae.forEach(function(ye,gt){return ye.distanceSq+=gt*$e}),ae.sort(function(ye,gt){return ye.distanceSq-gt.distanceSq}),ae.some(function(ye){return C=ye.callback(ye.feature,ye.layer,ye.geometry)}),C}},e.prototype.forEachLayerAtPixel=function(t,r,i,o,a){return Ci()},e.prototype.hasFeatureAtCoordinate=function(t,r,i,o,a,s){var d=this.forEachFeatureAtCoordinate(t,r,i,o,Ry,this,a,s);return d!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Ci()},e.prototype.scheduleExpireIconCache=function(t){P4.canExpireCache()&&t.postRenderFunctions.push(qse)},e}(m8);function qse(n,e){P4.expire()}const Vse=Yse;var Hse=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),dN=function(n){Hse(e,n);function e(t,r,i,o){var a=n.call(this,t)||this;return a.inversePixelTransform=r,a.frameState=i,a.context=o,a}return e}(Xp),k2="ol-hidden",Zse="ol-selectable",Mw="ol-unselectable",z8="ol-control",MK="ol-collapsed",Xse=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),SK=["style","variant","weight","size","lineHeight","family"],hN=function(n){var e=n.match(Xse);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=SK.length;r<i;++r){var o=e[r+1];o!==void 0&&(t[SK[r]]=o)}return t.families=t.family.split(/,\s?/),t};function Oc(n,e,t,r){var i;return t&&t.length?i=t.shift():mw?i=new OffscreenCanvas(n||300,e||300):i=document.createElement("canvas"),n&&(i.width=n),e&&(i.height=e),i.getContext("2d",r)}function j8(n){var e=n.canvas;e.width=1,e.height=1,n.clearRect(0,0,1,1)}function Jse(n){var e=n.offsetWidth,t=getComputedStyle(n);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function ele(n){var e=n.offsetHeight,t=getComputedStyle(n);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function EK(n,e){var t=e.parentNode;t&&t.replaceChild(n,e)}function L4(n){return n&&n.parentNode?n.parentNode.removeChild(n):null}function fN(n){for(;n.lastChild;)n.removeChild(n.lastChild)}function tle(n,e){for(var t=n.childNodes,r=0;;++r){var i=t[r],o=e[r];if(!i&&!o)break;if(i!==o){if(!i){n.appendChild(o);continue}if(!o){n.removeChild(i),--r;continue}n.insertBefore(o,i)}}}var pN="10px sans-serif",Wp="#000",F4="round",db=[],hb=0,pv="round",fb=10,pb="#000",mb="center",U4="middle",h1=[0,0,0,0],gb=1,Bp=new Fh,LO=new kv;LO.setSize=function(){console.warn("labelCache is deprecated.")};var Zg=null,FO,UO={},nle=function(){var n=100,e="32px ",t=["monospace","serif"],r=t.length,i="wmytzilWMYTZIL@#/&?$%10",o,a;function s(f,C,O){for(var E=!0,P=0;P<r;++P){var D=t[P];if(a=R4(f+" "+C+" "+e+D,i),O!=D){var $=R4(f+" "+C+" "+e+O+","+D,i);E=E&&$!=a}}return!!E}function d(){for(var f=!0,C=Bp.getKeys(),O=0,E=C.length;O<E;++O){var P=C[O];Bp.get(P)<n&&(s.apply(this,P.split(`
`))?(zb(UO),Zg=null,FO=void 0,Bp.set(P,n)):(Bp.set(P,Bp.get(P)+1,!0),f=!1))}f&&(clearInterval(o),o=void 0)}return function(f){var C=hN(f);if(C)for(var O=C.families,E=0,P=O.length;E<P;++E){var D=O[E],$=C.style+`
`+C.weight+`
`+D;Bp.get($)===void 0&&(Bp.set($,n,!0),s(C.style,C.weight,D)||(Bp.set($,0,!0),o===void 0&&(o=setInterval(d,32))))}}}(),rle=function(){var n;return function(e){var t=UO[e];if(t==null){if(mw){var r=hN(e),i=mN(e,"Žg"),o=isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight);t=o*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);UO[e]=t}return t}}();function mN(n,e){return Zg||(Zg=Oc(1,1)),n!=FO&&(Zg.font=n,FO=Zg.font),Zg.measureText(e)}function R4(n,e){return mN(n,e).width}function OK(n,e,t){if(e in t)return t[e];var r=e.split(`
`).reduce(function(i,o){return Math.max(i,R4(n,o))},0);return t[e]=r,r}function ile(n,e){for(var t=[],r=[],i=[],o=0,a=0,s=0,d=0,f=0,C=e.length;f<=C;f+=2){var O=e[f];if(O===`
`||f===C){o=Math.max(o,a),i.push(a),a=0,s+=d;continue}var E=e[f+1]||n.font,P=R4(E,O);t.push(P),a+=P;var D=rle(E);r.push(D),d=Math.max(d,D)}return{width:o,height:s,widths:t,heights:r,lineWidths:i}}function ole(n,e,t,r,i,o,a,s,d,f,C){n.save(),t!==1&&(n.globalAlpha*=t),e&&n.setTransform.apply(n,e),r.contextInstructions?(n.translate(d,f),n.scale(C[0],C[1]),ale(r,n)):C[0]<0||C[1]<0?(n.translate(d,f),n.scale(C[0],C[1]),n.drawImage(r,i,o,a,s,0,0,a,s)):n.drawImage(r,i,o,a,s,d,f,a*C[0],s*C[1]),n.restore()}function ale(n,e){for(var t=n.contextInstructions,r=0,i=t.length;r<i;r+=2)Array.isArray(t[r+1])?e[t[r]].apply(e,t[r+1]):e[t[r]]=t[r+1]}var sle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),lle=function(n){sle(e,n);function e(t){var r=n.call(this,t)||this;r.fontChangeListenerKey_=Oo(Bp,hv.PROPERTYCHANGE,t.redrawText.bind(t)),r.element_=document.createElement("div");var i=r.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",r.element_.className=Mw+" ol-layers";var o=t.getViewport();return o.insertBefore(r.element_,o.firstChild||null),r.children_=[],r.renderedVisible_=!0,r}return e.prototype.dispatchRenderEvent=function(t,r){var i=this.getMap();if(i.hasListener(t)){var o=new dN(t,void 0,r);i.dispatchEvent(o)}},e.prototype.disposeInternal=function(){rs(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),n.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(o0.PRECOMPOSE,t);var r=t.layerStatesArray.sort(function(P,D){return P.zIndex-D.zIndex}),i=t.viewState;this.children_.length=0;for(var o=[],a=null,s=0,d=r.length;s<d;++s){var f=r[s];t.layerIndex=s;var C=f.layer,O=C.getSourceState();if(!D4(f,i)||O!="ready"&&O!="undefined"){C.unrender();continue}var E=C.render(t,a);E&&(E!==a&&(this.children_.push(E),a=E),"getDeclutter"in C&&o.push(C))}for(var s=o.length-1;s>=0;--s)o[s].renderDeclutter(t);tle(this.element_,this.children_),this.dispatchRenderEvent(o0.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)},e.prototype.forEachLayerAtPixel=function(t,r,i,o,a){for(var s=r.viewState,d=r.layerStatesArray,f=d.length,C=f-1;C>=0;--C){var O=d[C],E=O.layer;if(E.hasRenderer()&&D4(O,s)&&a(E)){var P=E.getRenderer(),D=P.getDataAtPixel(t,r,i);if(D){var $=o(E,D);if($)return $}}}},e}(Vse);const ule=lle,bc={ADD:"add",REMOVE:"remove"};var gN=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),BK={LENGTH:"length"},T2=function(n){gN(e,n);function e(t,r,i){var o=n.call(this,t)||this;return o.element=r,o.index=i,o}return e}(Xp),Rd=function(n){gN(e,n);function e(t,r){var i=n.call(this)||this;i.on,i.once,i.un;var o=r||{};if(i.unique_=!!o.unique,i.array_=t||[],i.unique_)for(var a=0,s=i.array_.length;a<s;++a)i.assertUnique_(i.array_[a],a);return i.updateLength_(),i}return e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var r=0,i=t.length;r<i;++r)this.push(t[r]);return this},e.prototype.forEach=function(t){for(var r=this.array_,i=0,o=r.length;i<o;++i)t(r[i],i,r)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(BK.LENGTH)},e.prototype.insertAt=function(t,r){this.unique_&&this.assertUnique_(r),this.array_.splice(t,0,r),this.updateLength_(),this.dispatchEvent(new T2(bc.ADD,r,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var r=this.getLength();return this.insertAt(r,t),this.getLength()},e.prototype.remove=function(t){for(var r=this.array_,i=0,o=r.length;i<o;++i)if(r[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var r=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new T2(bc.REMOVE,r,t)),r},e.prototype.setAt=function(t,r){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(r,t);var o=this.array_[t];this.array_[t]=r,this.dispatchEvent(new T2(bc.REMOVE,o,t)),this.dispatchEvent(new T2(bc.ADD,r,t))}else{for(var a=i;a<t;++a)this.insertAt(a,void 0);this.insertAt(t,r)}},e.prototype.updateLength_=function(){this.set(BK.LENGTH,this.array_.length)},e.prototype.assertUnique_=function(t,r){for(var i=0,o=this.array_.length;i<o;++i)if(this.array_[i]===t&&i!==r)throw new kj(58)},e}(Fh),yN=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),km=function(n){yN(e,n);function e(t,r){var i=n.call(this,t)||this;return i.layer=r,i}return e}(Xp),zS={LAYERS:"layers"},Ale=function(n){yN(e,n);function e(t){var r=this,i=t||{},o=xl({},i);delete o.layers;var a=i.layers;return r=n.call(this,o)||this,r.on,r.once,r.un,r.layersListenerKeys_=[],r.listenerKeys_={},r.addChangeListener(zS.LAYERS,r.handleLayersChanged_),a?Array.isArray(a)?a=new Rd(a.slice(),{unique:!0}):co(typeof a.getArray=="function",43):a=new Rd(void 0,{unique:!0}),r.setLayers(a),r}return e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(rs),this.layersListenerKeys_.length=0;var t=this.getLayers();this.layersListenerKeys_.push(Oo(t,bc.ADD,this.handleLayersAdd_,this),Oo(t,bc.REMOVE,this.handleLayersRemove_,this));for(var r in this.listenerKeys_)this.listenerKeys_[r].forEach(rs);zb(this.listenerKeys_);for(var i=t.getArray(),o=0,a=i.length;o<a;o++){var s=i[o];this.registerLayerListeners_(s),this.dispatchEvent(new km("addlayer",s))}this.changed()},e.prototype.registerLayerListeners_=function(t){var r=[Oo(t,hv.PROPERTYCHANGE,this.handleLayerChange_,this),Oo(t,Wi.CHANGE,this.handleLayerChange_,this)];t instanceof e&&r.push(Oo(t,"addlayer",this.handleLayerGroupAdd_,this),Oo(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[qi(t)]=r},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new km("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new km("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var r=t.element;this.registerLayerListeners_(r),this.dispatchEvent(new km("addlayer",r)),this.changed()},e.prototype.handleLayersRemove_=function(t){var r=t.element,i=qi(r);this.listenerKeys_[i].forEach(rs),delete this.listenerKeys_[i],this.dispatchEvent(new km("removelayer",r)),this.changed()},e.prototype.getLayers=function(){return this.get(zS.LAYERS)},e.prototype.setLayers=function(t){var r=this.getLayers();if(r)for(var i=r.getArray(),o=0,a=i.length;o<a;++o)this.dispatchEvent(new km("removelayer",i[o]));this.set(zS.LAYERS,t)},e.prototype.getLayersArray=function(t){var r=t!==void 0?t:[];return this.getLayers().forEach(function(i){i.getLayersArray(r)}),r},e.prototype.getLayerStatesArray=function(t){var r=t!==void 0?t:[],i=r.length;this.getLayers().forEach(function(C){C.getLayerStatesArray(r)});var o=this.getLayerState(),a=o.zIndex;!t&&o.zIndex===void 0&&(a=0);for(var s=i,d=r.length;s<d;s++){var f=r[s];f.opacity*=o.opacity,f.visible=f.visible&&o.visible,f.maxResolution=Math.min(f.maxResolution,o.maxResolution),f.minResolution=Math.max(f.minResolution,o.minResolution),f.minZoom=Math.max(f.minZoom,o.minZoom),f.maxZoom=Math.min(f.maxZoom,o.maxZoom),o.extent!==void 0&&(f.extent!==void 0?f.extent=_1(f.extent,o.extent):f.extent=o.extent),f.zIndex===void 0&&(f.zIndex=a)}return r},e.prototype.getSourceState=function(){return"ready"},e}(cN);const Sw=Ale;var cle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Xg=function(n){cle(e,n);function e(t,r,i){var o=n.call(this,t)||this;return o.map=r,o.frameState=i!==void 0?i:null,o}return e}(Xp),dle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Em=function(n){dle(e,n);function e(t,r,i,o,a,s){var d=n.call(this,t,r,a)||this;return d.originalEvent=i,d.pixel_=null,d.coordinate_=null,d.dragging=o!==void 0?o:!1,d.activePointers=s,d}return Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){n.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){n.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(Xg);const ol={SINGLECLICK:"singleclick",CLICK:Wi.CLICK,DBLCLICK:Wi.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},RO={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var hle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),fle=function(n){hle(e,n);function e(t,r){var i=n.call(this,t)||this;i.map_=t,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=r===void 0?1:r,i.down_=null;var o=i.map_.getViewport();return i.activePointers_=[],i.trackedTouches_={},i.element_=o,i.pointerdownListenerKey_=Oo(o,RO.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=Oo(o,RO.POINTERMOVE,i.relayMoveEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(Wi.TOUCHMOVE,i.boundHandleTouchMove_,Kj?{passive:!1}:!1),i}return e.prototype.emulateClick_=function(t){var r=new Em(ol.CLICK,this.map_,t);this.dispatchEvent(r),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,r=new Em(ol.DBLCLICK,this.map_,t),this.dispatchEvent(r)):this.clickTimeoutId_=setTimeout((function(){this.clickTimeoutId_=void 0;var i=new Em(ol.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}).bind(this),250)},e.prototype.updateActivePointers_=function(t){var r=t,i=r.pointerId;if(r.type==ol.POINTERUP||r.type==ol.POINTERCANCEL){delete this.trackedTouches_[i];for(var o in this.trackedTouches_)if(this.trackedTouches_[o].target!==r.target){delete this.trackedTouches_[o];break}}else(r.type==ol.POINTERDOWN||r.type==ol.POINTERMOVE)&&(this.trackedTouches_[i]=r);this.activePointers_=Oj(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var r=new Em(ol.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(r),this.emulateClicks_&&!r.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(rs),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return t.button===0},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);var r=new Em(ol.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(r),this.down_={};for(var i in t){var o=t[i];this.down_[i]=typeof o=="function"?L1:o}if(this.dragListenerKeys_.length===0){var a=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Oo(a,ol.POINTERMOVE,this.handlePointerMove_,this),Oo(a,ol.POINTERUP,this.handlePointerUp_,this),Oo(this.element_,ol.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==a&&this.dragListenerKeys_.push(Oo(this.element_.getRootNode(),ol.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var r=new Em(ol.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(r)}},e.prototype.relayMoveEvent_=function(t){this.originalPointerMoveEvent_=t;var r=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Em(ol.POINTERMOVE,this.map_,t,r))},e.prototype.handleTouchMove_=function(t){var r=this.originalPointerMoveEvent_;(!r||r.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(rs(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Wi.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(rs(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(rs),this.dragListenerKeys_.length=0,this.element_=null,n.prototype.disposeInternal.call(this)},e}(kv);const ple=fle,kp={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},fA={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};var z4=1/0,mle=function(){function n(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return n.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,zb(this.queuedElements_)},n.prototype.dequeue=function(){var e=this.elements_,t=this.priorities_,r=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));var i=this.keyFunction_(r);return delete this.queuedElements_[i],r},n.prototype.enqueue=function(e){co(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=z4?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1},n.prototype.getCount=function(){return this.elements_.length},n.prototype.getLeftChildIndex_=function(e){return e*2+1},n.prototype.getRightChildIndex_=function(e){return e*2+2},n.prototype.getParentIndex_=function(e){return e-1>>1},n.prototype.heapify_=function(){var e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)},n.prototype.isEmpty=function(){return this.elements_.length===0},n.prototype.isKeyQueued=function(e){return e in this.queuedElements_},n.prototype.isQueued=function(e){return this.isKeyQueued(this.keyFunction_(e))},n.prototype.siftUp_=function(e){for(var t=this.elements_,r=this.priorities_,i=t.length,o=t[e],a=r[e],s=e;e<i>>1;){var d=this.getLeftChildIndex_(e),f=this.getRightChildIndex_(e),C=f<i&&r[f]<r[d]?f:d;t[e]=t[C],r[e]=r[C],e=C}t[e]=o,r[e]=a,this.siftDown_(s,e)},n.prototype.siftDown_=function(e,t){for(var r=this.elements_,i=this.priorities_,o=r[t],a=i[t];t>e;){var s=this.getParentIndex_(t);if(i[s]>a)r[t]=r[s],i[t]=i[s],t=s;else break}r[t]=o,i[t]=a},n.prototype.reprioritize=function(){var e=this.priorityFunction_,t=this.elements_,r=this.priorities_,i=0,o=t.length,a,s,d;for(s=0;s<o;++s)a=t[s],d=e(a),d==z4?delete this.queuedElements_[this.keyFunction_(a)]:(r[i]=d,t[i++]=a);t.length=i,r.length=i,this.heapify_()},n}();const gle=mle,gr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var yle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),vle=function(n){yle(e,n);function e(t,r){var i=n.call(this,function(o){return t.apply(null,o)},function(o){return o[0].getKey()})||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=r,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return e.prototype.enqueue=function(t){var r=n.prototype.enqueue.call(this,t);if(r){var i=t[0];i.addEventListener(Wi.CHANGE,this.boundHandleTileChange_)}return r},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var r=t.target,i=r.getState();if(i===gr.LOADED||i===gr.ERROR||i===gr.EMPTY){r.removeEventListener(Wi.CHANGE,this.boundHandleTileChange_);var o=r.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,r){for(var i=0,o,a,s;this.tilesLoading_<t&&i<r&&this.getCount()>0;)a=this.dequeue()[0],s=a.getKey(),o=a.getState(),o===gr.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,a.load())},e}(gle);const Cle=vle;function _le(n,e,t,r,i){if(!n||!(t in n.wantedTiles)||!n.wantedTiles[t][e.getKey()])return z4;var o=n.viewState.center,a=r[0]-o[0],s=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(a*a+s*s)/i}const sl={ANIMATING:0,INTERACTING:1},bh={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var vN=42,N8=256;function IK(n,e,t){return function(r,i,o,a,s){if(r){if(!i&&!e)return r;var d=e?0:o[0]*i,f=e?0:o[1]*i,C=s?s[0]:0,O=s?s[1]:0,E=n[0]+d/2+C,P=n[2]-d/2+C,D=n[1]+f/2+O,$=n[3]-f/2+O;E>P&&(E=(P+E)/2,P=E),D>$&&(D=($+D)/2,$=D);var H=Ll(r[0],E,P),Q=Ll(r[1],D,$);if(a&&t&&i){var N=30*i;H+=-N*Math.log(1+Math.max(0,E-r[0])/N)+N*Math.log(1+Math.max(0,r[0]-P)/N),Q+=-N*Math.log(1+Math.max(0,D-r[1])/N)+N*Math.log(1+Math.max(0,r[1]-$)/N)}return[H,Q]}}}function ble(n){return n}function W8(n,e,t,r){var i=Cs(e)/t[0],o=Ec(e)/t[1];return r?Math.min(n,Math.max(i,o)):Math.min(n,Math.min(i,o))}function G8(n,e,t){var r=Math.min(n,e),i=50;return r*=Math.log(1+i*Math.max(0,n/e-1))/i+1,t&&(r=Math.max(r,t),r/=Math.log(1+i*Math.max(0,t/n-1))/i+1),Ll(r,t/2,e*2)}function xle(n,e,t,r){return function(i,o,a,s){if(i!==void 0){var d=n[0],f=n[n.length-1],C=t?W8(d,t,a,r):d;if(s){var O=e!==void 0?e:!0;return O?G8(i,C,f):Ll(i,f,C)}var E=Math.min(C,i),P=Math.floor(g8(n,E,o));return n[P]>C&&P<n.length-1?n[P+1]:n[P]}else return}}function wle(n,e,t,r,i,o){return function(a,s,d,f){if(a!==void 0){var C=i?W8(e,i,d,o):e,O=t!==void 0?t:0;if(f){var E=r!==void 0?r:!0;return E?G8(a,C,O):Ll(a,O,C)}var P=1e-9,D=Math.ceil(Math.log(e/C)/Math.log(n)-P),$=-s*(.5-P)+.5,H=Math.min(C,a),Q=Math.floor(Math.log(e/H)/Math.log(n)+$),N=Math.max(D,Q),Z=e/Math.pow(n,N);return Ll(Z,O,C)}else return}}function kK(n,e,t,r,i){return function(o,a,s,d){if(o!==void 0){var f=r?W8(n,r,s,i):n,C=t!==void 0?t:!0;return!C||!d?Ll(o,e,f):G8(o,f,e)}else return}}function $8(n){if(n!==void 0)return 0}function TK(n){if(n!==void 0)return n}function Mle(n){var e=2*Math.PI/n;return function(t,r){if(r)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t}}function Sle(n){var e=n||x3(5);return function(t,r){if(r)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}function CN(n){return Math.pow(n,3)}function Tv(n){return 1-CN(1-n)}function Ele(n){return 3*n*n-2*n*n*n}function Ole(n){return n}var Ble=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),jS=0,Fp=function(n){Ble(e,n);function e(t){var r=n.call(this)||this;r.on,r.once,r.un;var i=xl({},t);return r.hints_=[0,0],r.animations_=[],r.updateAnimationKey_,r.projection_=E8(i.projection,"EPSG:3857"),r.viewportSize_=[100,100],r.targetCenter_=null,r.targetResolution_,r.targetRotation_,r.nextCenter_=null,r.nextResolution_,r.nextRotation_,r.cancelAnchor_=void 0,i.projection&&Wj(),i.center&&(i.center=Op(i.center,r.projection_)),i.extent&&(i.extent=c1(i.extent,r.projection_)),r.applyOptions_(i),r}return e.prototype.applyOptions_=function(t){var r=xl({},t);for(var i in bh)delete r[i];this.setProperties(r,!0);var o=kle(t);this.maxResolution_=o.maxResolution,this.minResolution_=o.minResolution,this.zoomFactor_=o.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=o.minZoom;var a=Ile(t),s=o.constraint,d=Tle(t);this.constraints_={center:a,resolution:s,rotation:d},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var r=this.padding_;this.padding_=t;var i=this.getCenter();if(i){var o=t||[0,0,0,0];r=r||[0,0,0,0];var a=this.getResolution(),s=a/2*(o[3]-r[3]+r[1]-o[1]),d=a/2*(o[0]-r[0]+r[2]-o[2]);this.setCenterInternal([i[0]+s,i[1]-d])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var r=this.getProperties();return r.resolution!==void 0?r.resolution=this.getResolution():r.zoom=this.getZoom(),r.center=this.getCenterInternal(),r.rotation=this.getRotation(),xl({},r,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var r=new Array(arguments.length),i=0;i<r.length;++i){var o=arguments[i];o.center&&(o=xl({},o),o.center=Op(o.center,this.getProjection())),o.anchor&&(o=xl({},o),o.anchor=Op(o.anchor,this.getProjection())),r[i]=o}this.animateInternal.apply(this,r)},e.prototype.animateInternal=function(t){var r=arguments.length,i;r>1&&typeof arguments[r-1]=="function"&&(i=arguments[r-1],--r);for(var o=0;o<r&&!this.isDef();++o){var a=arguments[o];a.center&&this.setCenterInternal(a.center),a.zoom!==void 0?this.setZoom(a.zoom):a.resolution&&this.setResolution(a.resolution),a.rotation!==void 0&&this.setRotation(a.rotation)}if(o===r){i&&K2(i,!0);return}for(var s=Date.now(),d=this.targetCenter_.slice(),f=this.targetResolution_,C=this.targetRotation_,O=[];o<r;++o){var E=arguments[o],P={start:s,complete:!1,anchor:E.anchor,duration:E.duration!==void 0?E.duration:1e3,easing:E.easing||Ele,callback:i};if(E.center&&(P.sourceCenter=d,P.targetCenter=E.center.slice(),d=P.targetCenter),E.zoom!==void 0?(P.sourceResolution=f,P.targetResolution=this.getResolutionForZoom(E.zoom),f=P.targetResolution):E.resolution&&(P.sourceResolution=f,P.targetResolution=E.resolution,f=P.targetResolution),E.rotation!==void 0){P.sourceRotation=C;var D=x1(E.rotation-C+Math.PI,2*Math.PI)-Math.PI;P.targetRotation=C+D,C=P.targetRotation}Kle(P)?P.complete=!0:s+=P.duration,O.push(P)}this.animations_.push(O),this.setHint(sl.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[sl.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[sl.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(sl.ANIMATING,-this.hints_[sl.ANIMATING]);for(var t,r=0,i=this.animations_.length;r<i;++r){var o=this.animations_[r];if(o[0].callback&&K2(o[0].callback,!1),!t)for(var a=0,s=o.length;a<s;++a){var d=o[a];if(!d.complete){t=d.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!!this.getAnimating()){for(var t=Date.now(),r=!1,i=this.animations_.length-1;i>=0;--i){for(var o=this.animations_[i],a=!0,s=0,d=o.length;s<d;++s){var f=o[s];if(!f.complete){var C=t-f.start,O=f.duration>0?C/f.duration:1;O>=1?(f.complete=!0,O=1):a=!1;var E=f.easing(O);if(f.sourceCenter){var P=f.sourceCenter[0],D=f.sourceCenter[1],$=f.targetCenter[0],H=f.targetCenter[1];this.nextCenter_=f.targetCenter;var Q=P+E*($-P),N=D+E*(H-D);this.targetCenter_=[Q,N]}if(f.sourceResolution&&f.targetResolution){var Z=E===1?f.targetResolution:f.sourceResolution+E*(f.targetResolution-f.sourceResolution);if(f.anchor){var ae=this.getViewportSize_(this.getRotation()),pe=this.constraints_.resolution(Z,0,ae,!0);this.targetCenter_=this.calculateCenterZoom(pe,f.anchor)}this.nextResolution_=f.targetResolution,this.targetResolution_=Z,this.applyTargetState_(!0)}if(f.sourceRotation!==void 0&&f.targetRotation!==void 0){var fe=E===1?x1(f.targetRotation+Math.PI,2*Math.PI)-Math.PI:f.sourceRotation+E*(f.targetRotation-f.sourceRotation);if(f.anchor){var X=this.constraints_.rotation(fe,!0);this.targetCenter_=this.calculateCenterRotate(X,f.anchor)}this.nextRotation_=f.targetRotation,this.targetRotation_=fe}if(this.applyTargetState_(!0),r=!0,!f.complete)break}}if(a){this.animations_[i]=null,this.setHint(sl.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var oe=o[0].callback;oe&&K2(oe,!0)}}this.animations_=this.animations_.filter(Boolean),r&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,r){var i,o=this.getCenterInternal();return o!==void 0&&(i=[o[0]-r[0],o[1]-r[1]],w8(i,t-this.getRotation()),Voe(i,r)),i},e.prototype.calculateCenterZoom=function(t,r){var i,o=this.getCenterInternal(),a=this.getResolution();if(o!==void 0&&a!==void 0){var s=r[0]-t*(r[0]-o[0])/a,d=r[1]-t*(r[1]-o[1])/a;i=[s,d]}return i},e.prototype.getViewportSize_=function(t){var r=this.viewportSize_;if(t){var i=r[0],o=r[1];return[Math.abs(i*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(o*Math.cos(t))]}else return r},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t&&OO(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(bh.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var r=this.calculateExtentInternal(t);return $j(r,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var r=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();co(i,1);var o=this.getResolution();co(o!==void 0,2);var a=this.getRotation();return co(a!==void 0,3),xO(i,o,a,r)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(bh.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,r){return this.getResolutionForExtentInternal(c1(t,this.getProjection()),r)},e.prototype.getResolutionForExtentInternal=function(t,r){var i=r||this.getViewportSizeMinusPadding_(),o=Cs(t)/i[0],a=Ec(t)/i[1];return Math.max(o,a)},e.prototype.getResolutionForValueFunction=function(t){var r=t||2,i=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,a=Math.log(i/o)/Math.log(r);return function(s){var d=i/Math.pow(r,s*a);return d}},e.prototype.getRotation=function(){return this.get(bh.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var r=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,a=Math.log(i/o)/r;return function(s){var d=Math.log(i/s)/r/a;return d}},e.prototype.getViewportSizeMinusPadding_=function(t){var r=this.getViewportSize_(t),i=this.padding_;return i&&(r=[r[0]-i[1]-i[3],r[1]-i[0]-i[2]]),r},e.prototype.getState=function(){var t=this.getProjection(),r=this.getResolution(),i=this.getRotation(),o=this.getCenterInternal(),a=this.padding_;if(a){var s=this.getViewportSizeMinusPadding_();o=NS(o,this.getViewportSize_(),[s[0]/2+a[3],s[1]/2+a[0]],r,i)}return{center:o.slice(0),projection:t!==void 0?t:null,resolution:r,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,r=this.getResolution();return r!==void 0&&(t=this.getZoomForResolution(r)),t},e.prototype.getZoomForResolution=function(t){var r=this.minZoom_||0,i,o;if(this.resolutions_){var a=g8(this.resolutions_,t,1);r=a,i=this.resolutions_[a],a==this.resolutions_.length-1?o=2:o=i/this.resolutions_[a+1]}else i=this.maxResolution_,o=this.zoomFactor_;return r+Math.log(i/t)/Math.log(o)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var r=Ll(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[r]/this.resolutions_[r+1];return this.resolutions_[r]/Math.pow(i,Ll(t-r,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,r){var i;if(co(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){co(!b8(t),25);var o=c1(t,this.getProjection());i=yK(o)}else if(t.getType()==="Circle"){var o=c1(t.getExtent(),this.getProjection());i=yK(o),i.rotate(this.getRotation(),c0(o))}else{var a=rae();a?i=t.clone().transform(a,this.getProjection()):i=t}this.fitInternal(i,r)},e.prototype.rotatedExtentForGeometry=function(t){for(var r=this.getRotation(),i=Math.cos(r),o=Math.sin(-r),a=t.getFlatCoordinates(),s=t.getStride(),d=1/0,f=1/0,C=-1/0,O=-1/0,E=0,P=a.length;E<P;E+=s){var D=a[E]*i-a[E+1]*o,$=a[E]*o+a[E+1]*i;d=Math.min(d,D),f=Math.min(f,$),C=Math.max(C,D),O=Math.max(O,$)}return[d,f,C,O]},e.prototype.fitInternal=function(t,r){var i=r||{},o=i.size;o||(o=this.getViewportSizeMinusPadding_());var a=i.padding!==void 0?i.padding:[0,0,0,0],s=i.nearest!==void 0?i.nearest:!1,d;i.minResolution!==void 0?d=i.minResolution:i.maxZoom!==void 0?d=this.getResolutionForZoom(i.maxZoom):d=0;var f=this.rotatedExtentForGeometry(t),C=this.getResolutionForExtentInternal(f,[o[0]-a[1]-a[3],o[1]-a[0]-a[2]]);C=isNaN(C)?d:Math.max(C,d),C=this.getConstrainedResolution(C,s?0:1);var O=this.getRotation(),E=Math.sin(O),P=Math.cos(O),D=c0(f);D[0]+=(a[1]-a[3])/2*C,D[1]+=(a[0]-a[2])/2*C;var $=D[0]*P-D[1]*E,H=D[1]*P+D[0]*E,Q=this.getConstrainedCenter([$,H],C),N=i.callback?i.callback:L1;i.duration!==void 0?this.animateInternal({resolution:C,center:Q,duration:i.duration,easing:i.easing},N):(this.targetResolution_=C,this.targetCenter_=Q,this.applyTargetState_(!1,!0),K2(N,!0))},e.prototype.centerOn=function(t,r,i){this.centerOnInternal(Op(t,this.getProjection()),r,i)},e.prototype.centerOnInternal=function(t,r,i){this.setCenterInternal(NS(t,r,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,r,i,o){var a,s=this.padding_;if(s&&t){var d=this.getViewportSizeMinusPadding_(-i),f=NS(t,o,[d[0]/2+s[3],d[1]/2+s[0]],r,i);a=[t[0]-f[0],t[1]-f[1]]}return a},e.prototype.isDef=function(){return!!this.getCenterInternal()&&this.getResolution()!==void 0},e.prototype.adjustCenter=function(t){var r=OO(this.targetCenter_,this.getProjection());this.setCenter([r[0]+t[0],r[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var r=this.targetCenter_;this.setCenterInternal([r[0]+t[0],r[1]+t[1]])},e.prototype.adjustResolution=function(t,r){var i=r&&Op(r,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,r){var i=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),a=this.constraints_.resolution(this.targetResolution_*t,0,o,i);r&&(this.targetCenter_=this.calculateCenterZoom(a,r)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,r){this.adjustResolution(Math.pow(this.zoomFactor_,-t),r)},e.prototype.adjustRotation=function(t,r){r&&(r=Op(r,this.getProjection())),this.adjustRotationInternal(t,r)},e.prototype.adjustRotationInternal=function(t,r){var i=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+t,i);r&&(this.targetCenter_=this.calculateCenterRotate(o,r)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t&&Op(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,r){return this.hints_[t]+=r,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,r){var i=this.getAnimating()||this.getInteracting()||r,o=this.constraints_.rotation(this.targetRotation_,i),a=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,0,a,i),d=this.constraints_.center(this.targetCenter_,s,a,i,this.calculateCenterShift(this.targetCenter_,s,o,a));this.get(bh.ROTATION)!==o&&this.set(bh.ROTATION,o),this.get(bh.RESOLUTION)!==s&&(this.set(bh.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!d||!this.get(bh.CENTER)||!B4(this.get(bh.CENTER),d))&&this.set(bh.CENTER,d),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,r,i){var o=t!==void 0?t:200,a=r||0,s=this.constraints_.rotation(this.targetRotation_),d=this.getViewportSize_(s),f=this.constraints_.resolution(this.targetResolution_,a,d),C=this.constraints_.center(this.targetCenter_,f,d,!1,this.calculateCenterShift(this.targetCenter_,f,s,d));if(o===0&&!this.cancelAnchor_){this.targetResolution_=f,this.targetRotation_=s,this.targetCenter_=C,this.applyTargetState_();return}var O=i||(o===0?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,(this.getResolution()!==f||this.getRotation()!==s||!this.getCenterInternal()||!B4(this.getCenterInternal(),C))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:C,resolution:f,duration:o,easing:Tv,anchor:O}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(sl.INTERACTING,1)},e.prototype.endInteraction=function(t,r,i){var o=i&&Op(i,this.getProjection());this.endInteractionInternal(t,r,o)},e.prototype.endInteractionInternal=function(t,r,i){this.setHint(sl.INTERACTING,-1),this.resolveConstraints(t,r,i)},e.prototype.getConstrainedCenter=function(t,r){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,r||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,r){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,r))},e.prototype.getConstrainedResolution=function(t,r){var i=r||0,o=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,o)},e}(Fh);function K2(n,e){setTimeout(function(){n(e)},0)}function Ile(n){if(n.extent!==void 0){var e=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return IK(n.extent,n.constrainOnlyCenter,e)}var t=E8(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&t.isGlobal()){var r=t.getExtent().slice();return r[0]=-1/0,r[2]=1/0,IK(r,!1,!1)}return ble}function kle(n){var e,t,r,i=28,o=2,a=n.minZoom!==void 0?n.minZoom:jS,s=n.maxZoom!==void 0?n.maxZoom:i,d=n.zoomFactor!==void 0?n.zoomFactor:o,f=n.multiWorld!==void 0?n.multiWorld:!1,C=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,O=n.showFullExtent!==void 0?n.showFullExtent:!1,E=E8(n.projection,"EPSG:3857"),P=E.getExtent(),D=n.constrainOnlyCenter,$=n.extent;if(!f&&!$&&E.isGlobal()&&(D=!1,$=P),n.resolutions!==void 0){var H=n.resolutions;t=H[a],r=H[s]!==void 0?H[s]:H[H.length-1],n.constrainResolution?e=xle(H,C,!D&&$,O):e=kK(t,r,C,!D&&$,O)}else{var Q=P?Math.max(Cs(P),Ec(P)):360*Wf[GA.DEGREES]/E.getMetersPerUnit(),N=Q/N8/Math.pow(o,jS),Z=N/Math.pow(o,i-jS);t=n.maxResolution,t!==void 0?a=0:t=N/Math.pow(d,a),r=n.minResolution,r===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?r=t/Math.pow(d,s):r=N/Math.pow(d,s):r=Z),s=a+Math.floor(Math.log(t/r)/Math.log(d)),r=t/Math.pow(d,s-a),n.constrainResolution?e=wle(d,t,r,C,!D&&$,O):e=kK(t,r,C,!D&&$,O)}return{constraint:e,maxResolution:t,minResolution:r,minZoom:a,zoomFactor:d}}function Tle(n){var e=n.enableRotation!==void 0?n.enableRotation:!0;if(e){var t=n.constrainRotation;return t===void 0||t===!0?Sle():t===!1?TK:typeof t=="number"?Mle(t):TK}else return $8}function Kle(n){return!(n.sourceCenter&&n.targetCenter&&!B4(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function NS(n,e,t,r,i){var o=Math.cos(-i),a=Math.sin(-i),s=n[0]*o-n[1]*a,d=n[1]*o+n[0]*a;s+=(e[0]/2-t[0])*r,d+=(t[1]-e[1]/2)*r,a=-a;var f=s*o-d*a,C=d*o+s*a;return[f,C]}function KK(n){return n[0]>0&&n[1]>0}function Ple(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function jA(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}var Dle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();function _N(n){if(n instanceof ww){n.setMapInternal(null);return}n instanceof Sw&&n.getLayers().forEach(_N)}function bN(n,e){if(n instanceof ww){n.setMapInternal(e);return}if(n instanceof Sw)for(var t=n.getLayers().getArray(),r=0,i=t.length;r<i;++r)bN(t[r],e)}var Lle=function(n){Dle(e,n);function e(t){var r=n.call(this)||this;r.on,r.once,r.un;var i=Fle(t);r.renderComplete_,r.loaded_=!0,r.boundHandleBrowserEvent_=r.handleBrowserEvent.bind(r),r.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,r.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Tj,r.postRenderTimeoutHandle_,r.animationDelayKey_,r.animationDelay_=(function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}).bind(r),r.coordinateToPixelTransform_=jd(),r.pixelToCoordinateTransform_=jd(),r.frameIndex_=0,r.frameState_=null,r.previousExtent_=null,r.viewPropertyListenerKey_=null,r.viewChangeListenerKey_=null,r.layerGroupPropertyListenerKeys_=null,r.viewport_=document.createElement("div"),r.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),r.viewport_.style.position="relative",r.viewport_.style.overflow="hidden",r.viewport_.style.width="100%",r.viewport_.style.height="100%",r.overlayContainer_=document.createElement("div"),r.overlayContainer_.style.position="absolute",r.overlayContainer_.style.zIndex="0",r.overlayContainer_.style.width="100%",r.overlayContainer_.style.height="100%",r.overlayContainer_.style.pointerEvents="none",r.overlayContainer_.className="ol-overlaycontainer",r.viewport_.appendChild(r.overlayContainer_),r.overlayContainerStopEvent_=document.createElement("div"),r.overlayContainerStopEvent_.style.position="absolute",r.overlayContainerStopEvent_.style.zIndex="0",r.overlayContainerStopEvent_.style.width="100%",r.overlayContainerStopEvent_.style.height="100%",r.overlayContainerStopEvent_.style.pointerEvents="none",r.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",r.viewport_.appendChild(r.overlayContainerStopEvent_),r.mapBrowserEventHandler_=null,r.moveTolerance_=t.moveTolerance,r.keyboardEventTarget_=i.keyboardEventTarget,r.targetChangeHandlerKeys_=null,r.controls=i.controls||new Rd,r.interactions=i.interactions||new Rd,r.overlays_=i.overlays,r.overlayIdIndex_={},r.renderer_=null,r.postRenderFunctions_=[],r.tileQueue_=new Cle(r.getTilePriority.bind(r),r.handleTileChange_.bind(r)),r.addChangeListener(fA.LAYERGROUP,r.handleLayerGroupChanged_),r.addChangeListener(fA.VIEW,r.handleViewChanged_),r.addChangeListener(fA.SIZE,r.handleSizeChanged_),r.addChangeListener(fA.TARGET,r.handleTargetChanged_),r.setProperties(i.values);var o=r;return t.view&&!(t.view instanceof Fp)&&t.view.then(function(a){o.setView(new Fp(a))}),r.controls.addEventListener(bc.ADD,(function(a){a.element.setMap(this)}).bind(r)),r.controls.addEventListener(bc.REMOVE,(function(a){a.element.setMap(null)}).bind(r)),r.interactions.addEventListener(bc.ADD,(function(a){a.element.setMap(this)}).bind(r)),r.interactions.addEventListener(bc.REMOVE,(function(a){a.element.setMap(null)}).bind(r)),r.overlays_.addEventListener(bc.ADD,(function(a){this.addOverlayInternal_(a.element)}).bind(r)),r.overlays_.addEventListener(bc.REMOVE,(function(a){var s=a.element,d=s.getId();d!==void 0&&delete this.overlayIdIndex_[d.toString()],a.element.setMap(null)}).bind(r)),r.controls.forEach((function(a){a.setMap(this)}).bind(r)),r.interactions.forEach((function(a){a.setMap(this)}).bind(r)),r.overlays_.forEach(r.addOverlayInternal_.bind(r)),r}return e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){var r=this.getLayerGroup().getLayers();r.push(t)},e.prototype.handleLayerAdd_=function(t){bN(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var r=t.getId();r!==void 0&&(this.overlayIdIndex_[r.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),n.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,r,i){if(!(!this.frameState_||!this.renderer_)){var o=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};var a=i.hitTolerance!==void 0?i.hitTolerance:0,s=i.layerFilter!==void 0?i.layerFilter:Ry,d=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(o,this.frameState_,a,d,r,null,s,null)}},e.prototype.getFeaturesAtPixel=function(t,r){var i=[];return this.forEachFeatureAtPixel(t,function(o){i.push(o)},r),i},e.prototype.getAllLayers=function(){var t=[];function r(i){i.forEach(function(o){o instanceof Sw?r(o.getLayers()):t.push(o)})}return r(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,r,i){if(!(!this.frameState_||!this.renderer_)){var o=i||{},a=o.hitTolerance!==void 0?o.hitTolerance:0,s=o.layerFilter||Ry;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,a,r,s)}},e.prototype.hasFeatureAtPixel=function(t,r){if(!this.frameState_||!this.renderer_)return!1;var i=this.getCoordinateFromPixelInternal(t);r=r!==void 0?r:{};var o=r.layerFilter!==void 0?r.layerFilter:Ry,a=r.hitTolerance!==void 0?r.hitTolerance:0,s=r.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,a,s,o,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var r=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-r.left,i.clientY-r.top]},e.prototype.getTarget=function(){return this.get(fA.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return OO(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var r=this.frameState_;return r?Cl(r.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var r=this.overlayIdIndex_[t.toString()];return r!==void 0?r:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(fA.LAYERGROUP)},e.prototype.setLayers=function(t){var r=this.getLayerGroup();if(t instanceof Rd){r.setLayers(t);return}var i=r.getLayers();i.clear(),i.extend(t)},e.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),r=0,i=t.length;r<i;++r){var o=t[r];if(o.visible){var a=o.layer.getRenderer();if(a&&!a.ready)return!0;var s=o.layer.getSource();if(s&&s.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var r=Op(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(r)},e.prototype.getPixelFromCoordinateInternal=function(t){var r=this.frameState_;return r?Cl(r.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(fA.SIZE)},e.prototype.getView=function(){return this.get(fA.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,r,i,o){return _le(this.frameState_,t,r,i,o)},e.prototype.handleBrowserEvent=function(t,r){var i=r||t.type,o=new Em(i,this,t);this.handleMapBrowserEvent(o)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var r=t.originalEvent,i=r.type;if(i===RO.POINTERDOWN||i===Wi.WHEEL||i===Wi.KEYDOWN){var o=this.getOwnerDocument(),a=this.viewport_.getRootNode?this.viewport_.getRootNode():o,s=r.target;if(this.overlayContainerStopEvent_.contains(s)||!(a===o?o.documentElement:a).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1)for(var d=this.getInteractions().getArray().slice(),f=d.length-1;f>=0;f--){var C=d[f];if(!(C.getMap()!==this||!C.getActive()||!this.getTargetElement())){var O=C.handleEvent(t);if(!O||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,r=this.tileQueue_;if(!r.isEmpty()){var i=this.maxTilesLoading_,o=i;if(t){var a=t.viewHints;if(a[sl.ANIMATING]||a[sl.INTERACTING]){var s=Date.now()-t.time>8;i=s?0:8,o=s?0:2}}r.getTilesLoading()<i&&(r.reprioritize(),r.loadMoreTiles(i,o))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(o0.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(o0.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Xg(kp.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Xg(kp.LOADSTART,this,t))));for(var d=this.postRenderFunctions_,f=0,C=d.length;f<C;++f)d[f](this,t);d.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,r=this.targetChangeHandlerKeys_.length;t<r;++t)rs(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(Wi.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Wi.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,L4(this.viewport_)}var i=this.getTargetElement();if(!i)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{i.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new ple(this,this.moveTolerance_);for(var o in ol)this.mapBrowserEventHandler_.addEventListener(ol[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(Wi.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Wi.WHEEL,this.boundHandleBrowserEvent_,Kj?{passive:!1}:!1);var a=this.getOwnerDocument().defaultView,s=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[Oo(s,Wi.KEYDOWN,this.handleBrowserEvent,this),Oo(s,Wi.KEYPRESS,this.handleBrowserEvent,this),Oo(a,Wi.RESIZE,this.updateSize,this)]}this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(rs(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(rs(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=Oo(t,hv.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Oo(t,Wi.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(rs),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new km("addlayer",t)),this.layerGroupPropertyListenerKeys_=[Oo(t,hv.PROPERTYCHANGE,this.render,this),Oo(t,Wi.CHANGE,this.render,this),Oo(t,"addlayer",this.handleLayerAdd_,this),Oo(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),r=0,i=t.length;r<i;++r){var o=t[r].layer;o.hasRenderer()&&o.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){var r=this.getLayerGroup().getLayers();return r.remove(t)},e.prototype.handleLayerRemove_=function(t){_N(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var r=this,i=this.getSize(),o=this.getView(),a=this.frameState_,s=null;if(i!==void 0&&KK(i)&&o&&o.isDef()){var d=o.getHints(this.frameState_?this.frameState_.viewHints:void 0),f=o.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:xO(f.center,f.resolution,f.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:f,viewHints:d,wantedTiles:{},mapId:qi(this),renderTargets:{}},f.nextCenter&&f.nextResolution){var C=isNaN(f.nextRotation)?f.rotation:f.nextRotation;s.nextExtent=xO(f.nextCenter,f.nextResolution,C,i)}}if(this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),a){var O=!this.previousExtent_||!b8(this.previousExtent_)&&!fv(s.extent,this.previousExtent_);O&&(this.dispatchEvent(new Xg(kp.MOVESTART,this,a)),this.previousExtent_=Nb(this.previousExtent_))}var E=this.previousExtent_&&!s.viewHints[sl.ANIMATING]&&!s.viewHints[sl.INTERACTING]&&!fv(s.extent,this.previousExtent_);E&&(this.dispatchEvent(new Xg(kp.MOVEEND,this,s)),Lj(s.extent,this.previousExtent_))}this.dispatchEvent(new Xg(kp.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(kp.LOADSTART)||this.hasListener(kp.LOADEND)||this.hasListener(o0.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){r.postRenderTimeoutHandle_=void 0,r.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){var r=this.getLayerGroup();r&&this.handleLayerRemove_(new km("removelayer",r)),this.set(fA.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(fA.SIZE,t)},e.prototype.setTarget=function(t){this.set(fA.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof Fp){this.set(fA.VIEW,t);return}this.set(fA.VIEW,new Fp);var r=this;t.then(function(i){r.setView(new Fp(i))})},e.prototype.updateSize=function(){var t=this.getTargetElement(),r=void 0;if(t){var i=getComputedStyle(t),o=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),a=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(o)&&!isNaN(a)&&(r=[o,a],!KK(r)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(r),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var r=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(r=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(r)}},e}(Fh);function Fle(n){var e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);var t={},r=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new Sw({layers:n.layers});t[fA.LAYERGROUP]=r,t[fA.TARGET]=n.target,t[fA.VIEW]=n.view instanceof Fp?n.view:new Fp;var i;n.controls!==void 0&&(Array.isArray(n.controls)?i=new Rd(n.controls.slice()):(co(typeof n.controls.getArray=="function",47),i=n.controls));var o;n.interactions!==void 0&&(Array.isArray(n.interactions)?o=new Rd(n.interactions.slice()):(co(typeof n.interactions.getArray=="function",48),o=n.interactions));var a;return n.overlays!==void 0?Array.isArray(n.overlays)?a=new Rd(n.overlays.slice()):(co(typeof n.overlays.getArray=="function",49),a=n.overlays):a=new Rd,{controls:i,interactions:o,keyboardEventTarget:e,overlays:a,values:t}}const Ule=Lle;var Rle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),zle=function(n){Rle(e,n);function e(t){var r=n.call(this)||this,i=t.element;return i&&!t.target&&!i.style.pointerEvents&&(i.style.pointerEvents="auto"),r.element=i||null,r.target_=null,r.map_=null,r.listenerKeys=[],t.render&&(r.render=t.render),t.target&&r.setTarget(t.target),r}return e.prototype.disposeInternal=function(){L4(this.element),n.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&L4(this.element);for(var r=0,i=this.listenerKeys.length;r<i;++r)rs(this.listenerKeys[r]);if(this.listenerKeys.length=0,this.map_=t,t){var o=this.target_?this.target_:t.getOverlayContainerStopEvent();o.appendChild(this.element),this.render!==L1&&this.listenerKeys.push(Oo(t,kp.POSTRENDER,this.render,this)),t.render()}},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_=typeof t=="string"?document.getElementById(t):t},e}(Fh);const Q8=zle;var jle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Nle=function(n){jle(e,n);function e(t){var r=this,i=t||{};r=n.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,r.ulElement_=document.createElement("ul"),r.collapsed_=i.collapsed!==void 0?i.collapsed:!0,r.userCollapsed_=r.collapsed_,r.overrideCollapsible_=i.collapsible!==void 0,r.collapsible_=i.collapsible!==void 0?i.collapsible:!0,r.collapsible_||(r.collapsed_=!1);var o=i.className!==void 0?i.className:"ol-attribution",a=i.tipLabel!==void 0?i.tipLabel:"Attributions",s=i.expandClassName!==void 0?i.expandClassName:o+"-expand",d=i.collapseLabel!==void 0?i.collapseLabel:"›",f=i.collapseClassName!==void 0?i.collapseClassName:o+"-collapse";typeof d=="string"?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=d,r.collapseLabel_.className=f):r.collapseLabel_=d;var C=i.label!==void 0?i.label:"i";typeof C=="string"?(r.label_=document.createElement("span"),r.label_.textContent=C,r.label_.className=s):r.label_=C;var O=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_;r.toggleButton_=document.createElement("button"),r.toggleButton_.setAttribute("type","button"),r.toggleButton_.setAttribute("aria-expanded",String(!r.collapsed_)),r.toggleButton_.title=a,r.toggleButton_.appendChild(O),r.toggleButton_.addEventListener(Wi.CLICK,r.handleClick_.bind(r),!1);var E=o+" "+Mw+" "+z8+(r.collapsed_&&r.collapsible_?" "+MK:"")+(r.collapsible_?"":" ol-uncollapsible"),P=r.element;return P.className=E,P.appendChild(r.toggleButton_),P.appendChild(r.ulElement_),r.renderedAttributions_=[],r.renderedVisible_=!0,r}return e.prototype.collectSourceAttributions_=function(t){for(var r={},i=[],o=!0,a=t.layerStatesArray,s=0,d=a.length;s<d;++s){var f=a[s];if(D4(f,t.viewState)){var C=f.layer.getSource();if(C){var O=C.getAttributions();if(O){var E=O(t);if(E)if(o=o&&C.getAttributionsCollapsible()!==!1,Array.isArray(E))for(var P=0,D=E.length;P<D;++P)E[P]in r||(i.push(E[P]),r[E[P]]=!0);else E in r||(i.push(E),r[E]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(o),i},e.prototype.updateElement_=function(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var r=this.collectSourceAttributions_(t),i=r.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Q1(r,this.renderedAttributions_)){fN(this.ulElement_);for(var o=0,a=r.length;o<a;++o){var s=document.createElement("li");s.innerHTML=r[o],this.ulElement_.appendChild(s)}this.renderedAttributions_=r}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(MK),this.collapsed_?EK(this.collapseLabel_,this.label_):EK(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(Q8);const Wle=Nle;var Gle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),$le=function(n){Gle(e,n);function e(t){var r=this,i=t||{};r=n.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var o=i.className!==void 0?i.className:"ol-rotate",a=i.label!==void 0?i.label:"⇧",s=i.compassClassName!==void 0?i.compassClassName:"ol-compass";r.label_=null,typeof a=="string"?(r.label_=document.createElement("span"),r.label_.className=s,r.label_.textContent=a):(r.label_=a,r.label_.classList.add(s));var d=i.tipLabel?i.tipLabel:"Reset rotation",f=document.createElement("button");f.className=o+"-reset",f.setAttribute("type","button"),f.title=d,f.appendChild(r.label_),f.addEventListener(Wi.CLICK,r.handleClick_.bind(r),!1);var C=o+" "+Mw+" "+z8,O=r.element;return O.className=C,O.appendChild(f),r.callResetNorth_=i.resetNorth?i.resetNorth:void 0,r.duration_=i.duration!==void 0?i.duration:250,r.autoHide_=i.autoHide!==void 0?i.autoHide:!0,r.rotation_=void 0,r.autoHide_&&r.element.classList.add(k2),r}return e.prototype.handleClick_=function(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap(),r=t.getView();if(r){var i=r.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?r.animate({rotation:0,duration:this.duration_,easing:Tv}):r.setRotation(0))}},e.prototype.render=function(t){var r=t.frameState;if(r){var i=r.viewState.rotation;if(i!=this.rotation_){var o="rotate("+i+"rad)";if(this.autoHide_){var a=this.element.classList.contains(k2);!a&&i===0?this.element.classList.add(k2):a&&i!==0&&this.element.classList.remove(k2)}this.label_.style.transform=o}this.rotation_=i}},e}(Q8);const Qle=$le;var Yle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),qle=function(n){Yle(e,n);function e(t){var r=this,i=t||{};r=n.call(this,{element:document.createElement("div"),target:i.target})||this;var o=i.className!==void 0?i.className:"ol-zoom",a=i.delta!==void 0?i.delta:1,s=i.zoomInClassName!==void 0?i.zoomInClassName:o+"-in",d=i.zoomOutClassName!==void 0?i.zoomOutClassName:o+"-out",f=i.zoomInLabel!==void 0?i.zoomInLabel:"+",C=i.zoomOutLabel!==void 0?i.zoomOutLabel:"–",O=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",E=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",P=document.createElement("button");P.className=s,P.setAttribute("type","button"),P.title=O,P.appendChild(typeof f=="string"?document.createTextNode(f):f),P.addEventListener(Wi.CLICK,r.handleClick_.bind(r,a),!1);var D=document.createElement("button");D.className=d,D.setAttribute("type","button"),D.title=E,D.appendChild(typeof C=="string"?document.createTextNode(C):C),D.addEventListener(Wi.CLICK,r.handleClick_.bind(r,-a),!1);var $=o+" "+Mw+" "+z8,H=r.element;return H.className=$,H.appendChild(P),H.appendChild(D),r.duration_=i.duration!==void 0?i.duration:250,r}return e.prototype.handleClick_=function(t,r){r.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var r=this.getMap(),i=r.getView();if(i){var o=i.getZoom();if(o!==void 0){var a=i.getConstrainedZoom(o+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:a,duration:this.duration_,easing:Tv})):i.setZoom(a)}}},e}(Q8);const Vle=qle;var Hle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),hA={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},Zle=function(n){Hle(e,n);function e(t){var r=n.call(this)||this;r.on,r.once,r.un,r.options=t,r.id=t.id,r.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,r.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,r.element=document.createElement("div"),r.element.className=t.className!==void 0?t.className:"ol-overlay-container "+Zse,r.element.style.position="absolute",r.element.style.pointerEvents="auto";var i=t.autoPan;return i&&typeof i!="object"&&(i={animation:t.autoPanAnimation,margin:t.autoPanMargin}),r.autoPan=i||!1,r.rendered={transform_:"",visible:!0},r.mapPostrenderListenerKey=null,r.addChangeListener(hA.ELEMENT,r.handleElementChanged),r.addChangeListener(hA.MAP,r.handleMapChanged),r.addChangeListener(hA.OFFSET,r.handleOffsetChanged),r.addChangeListener(hA.POSITION,r.handlePositionChanged),r.addChangeListener(hA.POSITIONING,r.handlePositioningChanged),t.element!==void 0&&r.setElement(t.element),r.setOffset(t.offset!==void 0?t.offset:[0,0]),r.setPositioning(t.positioning||"top-left"),t.position!==void 0&&r.setPosition(t.position),r}return e.prototype.getElement=function(){return this.get(hA.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(hA.MAP)||null},e.prototype.getOffset=function(){return this.get(hA.OFFSET)},e.prototype.getPosition=function(){return this.get(hA.POSITION)},e.prototype.getPositioning=function(){return this.get(hA.POSITIONING)},e.prototype.handleElementChanged=function(){fN(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(L4(this.element),rs(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Oo(t,kp.POSTRENDER,this.render,this),this.updatePixelPosition();var r=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?r.insertBefore(this.element,r.childNodes[0]||null):r.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(hA.ELEMENT,t)},e.prototype.setMap=function(t){this.set(hA.MAP,t)},e.prototype.setOffset=function(t){this.set(hA.OFFSET,t)},e.prototype.setPosition=function(t){this.set(hA.POSITION,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var r=this.getMap();if(!(!r||!r.getTargetElement()||!this.get(hA.POSITION))){var i=this.getRect(r.getTargetElement(),r.getSize()),o=this.getElement(),a=this.getRect(o,[Jse(o),ele(o)]),s=t||{},d=s.margin===void 0?20:s.margin;if(!zm(i,a)){var f=a[0]-i[0],C=i[2]-a[2],O=a[1]-i[1],E=i[3]-a[3],P=[0,0];if(f<0?P[0]=f-d:C<0&&(P[0]=Math.abs(C)+d),O<0?P[1]=O-d:E<0&&(P[1]=Math.abs(E)+d),P[0]!==0||P[1]!==0){var D=r.getView().getCenterInternal(),$=r.getPixelFromCoordinateInternal(D);if(!$)return;var H=[$[0]+P[0],$[1]+P[1]],Q=s.animation||{};r.getView().animateInternal({center:r.getCoordinateFromPixelInternal(H),duration:Q.duration,easing:Q.easing})}}}},e.prototype.getRect=function(t,r){var i=t.getBoundingClientRect(),o=i.left+window.pageXOffset,a=i.top+window.pageYOffset;return[o,a,o+r[0],a+r[1]]},e.prototype.setPositioning=function(t){this.set(hA.POSITIONING,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),r=this.getPosition();if(!t||!t.isRendered()||!r){this.setVisible(!1);return}var i=t.getPixelFromCoordinate(r),o=t.getSize();this.updateRenderedPosition(i,o)},e.prototype.updateRenderedPosition=function(t,r){var i=this.element.style,o=this.getOffset(),a=this.getPositioning();this.setVisible(!0);var s=Math.round(t[0]+o[0])+"px",d=Math.round(t[1]+o[1])+"px",f="0%",C="0%";a=="bottom-right"||a=="center-right"||a=="top-right"?f="-100%":(a=="bottom-center"||a=="center-center"||a=="top-center")&&(f="-50%"),a=="bottom-left"||a=="bottom-center"||a=="bottom-right"?C="-100%":(a=="center-left"||a=="center-center"||a=="center-right")&&(C="-50%");var O="translate(".concat(f,", ").concat(C,") translate(").concat(s,", ").concat(d,")");this.rendered.transform_!=O&&(this.rendered.transform_=O,i.transform=O,i.msTransform=O)},e.prototype.getOptions=function(){return this.options},e}(Fh);function Xle(n){var e=n||{},t=new Rd,r=e.zoom!==void 0?e.zoom:!0;r&&t.push(new Vle(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new Qle(e.rotateOptions));var o=e.attribution!==void 0?e.attribution:!0;return o&&t.push(new Wle(e.attributionOptions)),t}const PK={ACTIVE:"active"};var Jle=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),eue=function(n){Jle(e,n);function e(t){var r=n.call(this)||this;return r.on,r.once,r.un,t&&t.handleEvent&&(r.handleEvent=t.handleEvent),r.map_=null,r.setActive(!0),r}return e.prototype.getActive=function(){return this.get(PK.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(PK.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(Fh);function tue(n,e,t){var r=n.getCenterInternal();if(r){var i=[r[0]+e[0],r[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:Ole,center:n.getConstrainedCenter(i)})}}function Y8(n,e,t,r){var i=n.getZoom();if(i!==void 0){var o=n.getConstrainedZoom(i+e),a=n.getResolutionForZoom(o);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:a,anchor:t,duration:r!==void 0?r:250,easing:Tv})}}const Gb=eue;var nue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),rue=function(n){nue(e,n);function e(t){var r=n.call(this)||this,i=t||{};return r.delta_=i.delta?i.delta:1,r.duration_=i.duration!==void 0?i.duration:250,r}return e.prototype.handleEvent=function(t){var r=!1;if(t.type==ol.DBLCLICK){var i=t.originalEvent,o=t.map,a=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,d=o.getView();Y8(d,s,a,this.duration_),i.preventDefault(),r=!0}return!r},e}(Gb);const iue=rue;var oue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),aue=function(n){oue(e,n);function e(t){var r=this,i=t||{};return r=n.call(this,i)||this,i.handleDownEvent&&(r.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(r.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(r.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(r.handleUpEvent=i.handleUpEvent),i.stopDown&&(r.stopDown=i.stopDown),r.handlingDownUpSequence=!1,r.targetPointers=[],r}return e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var r=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==ol.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==ol.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==ol.POINTERDOWN){var o=this.handleDownEvent(t);this.handlingDownUpSequence=o,r=this.stopDown(o)}else t.type==ol.POINTERMOVE&&this.handleMoveEvent(t);return!r},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},e}(Gb);function q8(n){for(var e=n.length,t=0,r=0,i=0;i<e;i++)t+=n[i].clientX,r+=n[i].clientY;return[t/e,r/e]}const $b=aue;function zO(n){var e=arguments;return function(t){for(var r=!0,i=0,o=e.length;i<o&&(r=r&&e[i](t),!!r);++i);return r}}var sue=function(n){var e=n.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},lue=function(n){var e=n.map.getTargetElement(),t=n.map.getOwnerDocument().activeElement;return e.contains(t)},xN=function(n){return n.map.getTargetElement().hasAttribute("tabindex")?lue(n):!0},uue=Ry,wN=function(n){var e=n.originalEvent;return e.button==0&&!(voe&&Coe&&e.ctrlKey)},MN=function(n){var e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Aue=function(n){var e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},SN=function(n){var e=n.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"&&!e.target.isContentEditable},WS=function(n){var e=n.originalEvent;return co(e!==void 0,56),e.pointerType=="mouse"},cue=function(n){var e=n.originalEvent;return co(e!==void 0,56),e.isPrimary&&e.button===0},due=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),hue=function(n){due(e,n);function e(t){var r=n.call(this,{stopDown:fw})||this,i=t||{};r.kinetic_=i.kinetic,r.lastCentroid=null,r.lastPointersCount_,r.panning_=!1;var o=i.condition?i.condition:zO(MN,cue);return r.condition_=i.onFocusOnly?zO(xN,o):o,r.noKinetic_=!1,r}return e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var r=this.targetPointers,i=q8(r);if(r.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var o=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],a=t.map,s=a.getView();Hoe(o,s.getResolution()),w8(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=r.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var r=t.map,i=r.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var o=this.kinetic_.getDistance(),a=this.kinetic_.getAngle(),s=i.getCenterInternal(),d=r.getPixelFromCoordinateInternal(s),f=r.getCoordinateFromPixelInternal([d[0]-o*Math.cos(a),d[1]-o*Math.sin(a)]);i.animateInternal({center:i.getConstrainedCenter(f),duration:500,easing:Tv})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var r=t.map,i=r.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1},e}($b);const fue=hue;var pue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),mue=function(n){pue(e,n);function e(t){var r=this,i=t||{};return r=n.call(this,{stopDown:fw})||this,r.condition_=i.condition?i.condition:sue,r.lastAngle_=void 0,r.duration_=i.duration!==void 0?i.duration:250,r}return e.prototype.handleDragEvent=function(t){if(WS(t)){var r=t.map,i=r.getView();if(i.getConstraints().rotation!==$8){var o=r.getSize(),a=t.pixel,s=Math.atan2(o[1]/2-a[1],a[0]-o[0]/2);if(this.lastAngle_!==void 0){var d=s-this.lastAngle_;i.adjustRotationInternal(-d)}this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){if(!WS(t))return!0;var r=t.map,i=r.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!WS(t))return!1;if(wN(t)&&this.condition_(t)){var r=t.map;return r.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}($b),gue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),yue=function(n){gue(e,n);function e(t){var r=n.call(this)||this;return r.geometry_=null,r.element_=document.createElement("div"),r.element_.style.position="absolute",r.element_.style.pointerEvents="auto",r.element_.className="ol-box "+t,r.map_=null,r.startPixel_=null,r.endPixel_=null,r}return e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,r=this.endPixel_,i="px",o=this.element_.style;o.left=Math.min(t[0],r[0])+i,o.top=Math.min(t[1],r[1])+i,o.width=Math.abs(r[0]-t[0])+i,o.height=Math.abs(r[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var r=this.element_.style;r.left="inherit",r.top="inherit",r.width="inherit",r.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,r){this.startPixel_=t,this.endPixel_=r,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,r=this.endPixel_,i=[t,[t[0],r[1]],r,[r[0],t[1]]],o=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);o[4]=o[0].slice(),this.geometry_?this.geometry_.setCoordinates([o]):this.geometry_=new Ab([o])},e.prototype.getGeometry=function(){return this.geometry_},e}(m8);const vue=yue;var EN=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),P2={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},GS=function(n){EN(e,n);function e(t,r,i){var o=n.call(this,t)||this;return o.coordinate=r,o.mapBrowserEvent=i,o}return e}(Xp),Cue=function(n){EN(e,n);function e(t){var r=n.call(this)||this;r.on,r.once,r.un;var i=t||{};return r.box_=new vue(i.className||"ol-dragbox"),r.minArea_=i.minArea!==void 0?i.minArea:64,i.onBoxEnd&&(r.onBoxEnd=i.onBoxEnd),r.startPixel_=null,r.condition_=i.condition?i.condition:wN,r.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:r.defaultBoxEndCondition,r}return e.prototype.defaultBoxEndCondition=function(t,r,i){var o=i[0]-r[0],a=i[1]-r[1];return o*o+a*a>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new GS(P2.BOXDRAG,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var r=this.boxEndCondition_(t,this.startPixel_,t.pixel);return r&&this.onBoxEnd(t),this.dispatchEvent(new GS(r?P2.BOXEND:P2.BOXCANCEL,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new GS(P2.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}($b);const _ue=Cue;var bue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),xue=function(n){bue(e,n);function e(t){var r=this,i=t||{},o=i.condition?i.condition:Aue;return r=n.call(this,{condition:o,className:i.className||"ol-dragzoom",minArea:i.minArea})||this,r.duration_=i.duration!==void 0?i.duration:200,r.out_=i.out!==void 0?i.out:!1,r}return e.prototype.onBoxEnd=function(t){var r=this.getMap(),i=r.getView(),o=this.getGeometry();if(this.out_){var a=i.rotatedExtentForGeometry(o),s=i.getResolutionForExtentInternal(a),d=i.getResolution()/s;o=o.clone(),o.scale(d*d)}i.fitInternal(o,{duration:this.duration_,easing:Tv})},e}(_ue);const wue=xue,N0={LEFT:37,UP:38,RIGHT:39,DOWN:40};var Mue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Sue=function(n){Mue(e,n);function e(t){var r=n.call(this)||this,i=t||{};return r.defaultCondition_=function(o){return MN(o)&&SN(o)},r.condition_=i.condition!==void 0?i.condition:r.defaultCondition_,r.duration_=i.duration!==void 0?i.duration:100,r.pixelDelta_=i.pixelDelta!==void 0?i.pixelDelta:128,r}return e.prototype.handleEvent=function(t){var r=!1;if(t.type==Wi.KEYDOWN){var i=t.originalEvent,o=i.keyCode;if(this.condition_(t)&&(o==N0.DOWN||o==N0.LEFT||o==N0.RIGHT||o==N0.UP)){var a=t.map,s=a.getView(),d=s.getResolution()*this.pixelDelta_,f=0,C=0;o==N0.DOWN?C=-d:o==N0.LEFT?f=-d:o==N0.RIGHT?f=d:C=d;var O=[f,C];w8(O,s.getRotation()),tue(s,O,this.duration_),i.preventDefault(),r=!0}}return!r},e}(Gb),Eue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Oue=function(n){Eue(e,n);function e(t){var r=n.call(this)||this,i=t||{};return r.condition_=i.condition?i.condition:SN,r.delta_=i.delta?i.delta:1,r.duration_=i.duration!==void 0?i.duration:100,r}return e.prototype.handleEvent=function(t){var r=!1;if(t.type==Wi.KEYDOWN||t.type==Wi.KEYPRESS){var i=t.originalEvent,o=i.charCode;if(this.condition_(t)&&(o==43||o==45)){var a=t.map,s=o==43?this.delta_:-this.delta_,d=a.getView();Y8(d,s,void 0,this.duration_),i.preventDefault(),r=!0}}return!r},e}(Gb);const Bue=Oue;var Iue=function(){function n(e,t,r){this.decay_=e,this.minVelocity_=t,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}return n.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},n.prototype.update=function(e,t){this.points_.push(e,t,Date.now())},n.prototype.end=function(){if(this.points_.length<6)return!1;var e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;for(var r=t-3;r>0&&this.points_[r+2]>e;)r-=3;var i=this.points_[t+2]-this.points_[r+2];if(i<1e3/60)return!1;var o=this.points_[t]-this.points_[r],a=this.points_[t+1]-this.points_[r+1];return this.angle_=Math.atan2(a,o),this.initialVelocity_=Math.sqrt(o*o+a*a)/i,this.initialVelocity_>this.minVelocity_},n.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},n.prototype.getAngle=function(){return this.angle_},n}(),kue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),$S={TRACKPAD:"trackpad",WHEEL:"wheel"},Tue=function(n){kue(e,n);function e(t){var r=this,i=t||{};r=n.call(this,i)||this,r.totalDelta_=0,r.lastDelta_=0,r.maxDelta_=i.maxDelta!==void 0?i.maxDelta:1,r.duration_=i.duration!==void 0?i.duration:250,r.timeout_=i.timeout!==void 0?i.timeout:80,r.useAnchor_=i.useAnchor!==void 0?i.useAnchor:!0,r.constrainResolution_=i.constrainResolution!==void 0?i.constrainResolution:!1;var o=i.condition?i.condition:uue;return r.condition_=i.onFocusOnly?zO(xN,o):o,r.lastAnchor_=null,r.startTime_=void 0,r.timeoutId_,r.mode_=void 0,r.trackpadEventGap_=400,r.trackpadTimeoutId_,r.deltaPerZoom_=300,r}return e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();if(t){var r=t.getView();r.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var r=t.type;if(r!==Wi.WHEEL)return!0;var i=t.map,o=t.originalEvent;o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var a;if(t.type==Wi.WHEEL&&(a=o.deltaY,goe&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(a/=Tj),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(a*=40)),a===0)return!1;this.lastDelta_=a;var s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(a)<4?$S.TRACKPAD:$S.WHEEL);var d=i.getView();if(this.mode_===$S.TRACKPAD&&!(d.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(d.getAnimating()&&d.cancelAnimations(),d.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),d.adjustZoom(-a/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=a;var f=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),f),!1},e.prototype.handleWheelZoom_=function(t){var r=t.getView();r.getAnimating()&&r.cancelAnimations();var i=-Ll(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(r.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Y8(r,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Gb);const Kue=Tue;var Pue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Due=function(n){Pue(e,n);function e(t){var r=this,i=t||{},o=i;return o.stopDown||(o.stopDown=fw),r=n.call(this,o)||this,r.anchor_=null,r.lastAngle_=void 0,r.rotating_=!1,r.rotationDelta_=0,r.threshold_=i.threshold!==void 0?i.threshold:.3,r.duration_=i.duration!==void 0?i.duration:250,r}return e.prototype.handleDragEvent=function(t){var r=0,i=this.targetPointers[0],o=this.targetPointers[1],a=Math.atan2(o.clientY-i.clientY,o.clientX-i.clientX);if(this.lastAngle_!==void 0){var s=a-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),r=s}this.lastAngle_=a;var d=t.map,f=d.getView();if(f.getConstraints().rotation!==$8){var C=d.getViewport().getBoundingClientRect(),O=q8(this.targetPointers);O[0]-=C.left,O[1]-=C.top,this.anchor_=d.getCoordinateFromPixelInternal(O),this.rotating_&&(d.render(),f.adjustRotationInternal(r,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var r=t.map,i=r.getView();return i.endInteraction(this.duration_),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var r=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||r.getView().beginInteraction(),!0}else return!1},e}($b),Lue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Fue=function(n){Lue(e,n);function e(t){var r=this,i=t||{},o=i;return o.stopDown||(o.stopDown=fw),r=n.call(this,o)||this,r.anchor_=null,r.duration_=i.duration!==void 0?i.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return e.prototype.handleDragEvent=function(t){var r=1,i=this.targetPointers[0],o=this.targetPointers[1],a=i.clientX-o.clientX,s=i.clientY-o.clientY,d=Math.sqrt(a*a+s*s);this.lastDistance_!==void 0&&(r=this.lastDistance_/d),this.lastDistance_=d;var f=t.map,C=f.getView();r!=1&&(this.lastScaleDelta_=r);var O=f.getViewport().getBoundingClientRect(),E=q8(this.targetPointers);E[0]-=O.left,E[1]-=O.top,this.anchor_=f.getCoordinateFromPixelInternal(E),f.render(),C.adjustResolutionInternal(r,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var r=t.map,i=r.getView(),o=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,o),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var r=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||r.getView().beginInteraction(),!0}else return!1},e}($b);const Uue=Fue;function Rue(n,e,t,r,i){ON(n,e,t||0,r||n.length-1,i||zue)}function ON(n,e,t,r,i){for(;r>t;){if(r-t>600){var o=r-t+1,a=e-t+1,s=Math.log(o),d=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*d*(o-d)/o)*(a-o/2<0?-1:1),C=Math.max(t,Math.floor(e-a*d/o+f)),O=Math.min(r,Math.floor(e+(o-a)*d/o+f));ON(n,e,C,O,i)}var E=n[e],P=t,D=r;for(TC(n,t,e),i(n[r],E)>0&&TC(n,t,r);P<D;){for(TC(n,P,D),P++,D--;i(n[P],E)<0;)P++;for(;i(n[D],E)>0;)D--}i(n[t],E)===0?TC(n,t,D):(D++,TC(n,D,r)),D<=e&&(t=D+1),e<=D&&(r=D-1)}}function TC(n,e,t){var r=n[e];n[e]=n[t],n[t]=r}function zue(n,e){return n<e?-1:n>e?1:0}let BN=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const r=[];if(!L2(e,t))return r;const i=this.toBBox,o=[];for(;t;){for(let a=0;a<t.children.length;a++){const s=t.children[a],d=t.leaf?i(s):s;L2(e,d)&&(t.leaf?r.push(s):YS(e,d)?this._all(s,r):o.push(s))}t=o.pop()}return r}collides(e){let t=this.data;if(!L2(e,t))return!1;const r=[];for(;t;){for(let i=0;i<t.children.length;i++){const o=t.children[i],a=t.leaf?this.toBBox(o):o;if(L2(e,a)){if(t.leaf||YS(e,a))return!0;r.push(o)}}t=r.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let r=0;r<e.length;r++)this.insert(e[r]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const r=this.data;this.data=t,t=r}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=Jg([]),this}remove(e,t){if(!e)return this;let r=this.data;const i=this.toBBox(e),o=[],a=[];let s,d,f;for(;r||o.length;){if(r||(r=o.pop(),d=o[o.length-1],s=a.pop(),f=!0),r.leaf){const C=jue(e,r.children,t);if(C!==-1)return r.children.splice(C,1),o.push(r),this._condense(o),this}!f&&!r.leaf&&YS(r,i)?(o.push(r),a.push(s),s=0,d=r,r=r.children[0]):d?(s++,r=d.children[s],f=!1):r=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const r=[];for(;e;)e.leaf?t.push(...e.children):r.push(...e.children),e=r.pop();return t}_build(e,t,r,i){const o=r-t+1;let a=this._maxEntries,s;if(o<=a)return s=Jg(e.slice(t,r+1)),Fg(s,this.toBBox),s;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),s=Jg([]),s.leaf=!1,s.height=i;const d=Math.ceil(o/a),f=d*Math.ceil(Math.sqrt(a));DK(e,t,r,f,this.compareMinX);for(let C=t;C<=r;C+=f){const O=Math.min(C+f-1,r);DK(e,C,O,d,this.compareMinY);for(let E=C;E<=O;E+=d){const P=Math.min(E+d-1,O);s.children.push(this._build(e,E,P,i-1))}}return Fg(s,this.toBBox),s}_chooseSubtree(e,t,r,i){for(;i.push(t),!(t.leaf||i.length-1===r);){let o=1/0,a=1/0,s;for(let d=0;d<t.children.length;d++){const f=t.children[d],C=QS(f),O=Gue(e,f)-C;O<a?(a=O,o=C<o?C:o,s=f):O===a&&C<o&&(o=C,s=f)}t=s||t.children[0]}return t}_insert(e,t,r){const i=r?e:this.toBBox(e),o=[],a=this._chooseSubtree(i,this.data,t,o);for(a.children.push(e),e_(a,i);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)}_split(e,t){const r=e[t],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const a=this._chooseSplitIndex(r,o,i),s=Jg(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,Fg(r,this.toBBox),Fg(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(r,s)}_splitRoot(e,t){this.data=Jg([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Fg(this.data,this.toBBox)}_chooseSplitIndex(e,t,r){let i,o=1/0,a=1/0;for(let s=t;s<=r-t;s++){const d=JC(e,0,s,this.toBBox),f=JC(e,s,r,this.toBBox),C=$ue(d,f),O=QS(d)+QS(f);C<o?(o=C,i=s,a=O<a?O:a):C===o&&O<a&&(a=O,i=s)}return i||r-t}_chooseSplitAxis(e,t,r){const i=e.leaf?this.compareMinX:Nue,o=e.leaf?this.compareMinY:Wue,a=this._allDistMargin(e,t,r,i),s=this._allDistMargin(e,t,r,o);a<s&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);const o=this.toBBox,a=JC(e,0,t,o),s=JC(e,r-t,r,o);let d=D2(a)+D2(s);for(let f=t;f<r-t;f++){const C=e.children[f];e_(a,e.leaf?o(C):C),d+=D2(a)}for(let f=r-t-1;f>=t;f--){const C=e.children[f];e_(s,e.leaf?o(C):C),d+=D2(s)}return d}_adjustParentBBoxes(e,t,r){for(let i=r;i>=0;i--)e_(t[i],e)}_condense(e){for(let t=e.length-1,r;t>=0;t--)e[t].children.length===0?t>0?(r=e[t-1].children,r.splice(r.indexOf(e[t]),1)):this.clear():Fg(e[t],this.toBBox)}};function jue(n,e,t){if(!t)return e.indexOf(n);for(let r=0;r<e.length;r++)if(t(n,e[r]))return r;return-1}function Fg(n,e){JC(n,0,n.children.length,e,n)}function JC(n,e,t,r,i){i||(i=Jg(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=e;o<t;o++){const a=n.children[o];e_(i,n.leaf?r(a):a)}return i}function e_(n,e){return n.minX=Math.min(n.minX,e.minX),n.minY=Math.min(n.minY,e.minY),n.maxX=Math.max(n.maxX,e.maxX),n.maxY=Math.max(n.maxY,e.maxY),n}function Nue(n,e){return n.minX-e.minX}function Wue(n,e){return n.minY-e.minY}function QS(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function D2(n){return n.maxX-n.minX+(n.maxY-n.minY)}function Gue(n,e){return(Math.max(e.maxX,n.maxX)-Math.min(e.minX,n.minX))*(Math.max(e.maxY,n.maxY)-Math.min(e.minY,n.minY))}function $ue(n,e){const t=Math.max(n.minX,e.minX),r=Math.max(n.minY,e.minY),i=Math.min(n.maxX,e.maxX),o=Math.min(n.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,o-r)}function YS(n,e){return n.minX<=e.minX&&n.minY<=e.minY&&e.maxX<=n.maxX&&e.maxY<=n.maxY}function L2(n,e){return e.minX<=n.maxX&&e.minY<=n.maxY&&e.maxX>=n.minX&&e.maxY>=n.minY}function Jg(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function DK(n,e,t,r,i){const o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=r)continue;const a=e+Math.ceil((t-e)/r/2)*r;Rue(n,a,e,t,i),o.push(e,a,a,t)}}const ts={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var Que=function(){function n(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=jA(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}return n.prototype.clone=function(){var e=this.getScale();return new n({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},n.prototype.getOpacity=function(){return this.opacity_},n.prototype.getRotateWithView=function(){return this.rotateWithView_},n.prototype.getRotation=function(){return this.rotation_},n.prototype.getScale=function(){return this.scale_},n.prototype.getScaleArray=function(){return this.scaleArray_},n.prototype.getDisplacement=function(){return this.displacement_},n.prototype.getDeclutterMode=function(){return this.declutterMode_},n.prototype.getAnchor=function(){return Ci()},n.prototype.getImage=function(e){return Ci()},n.prototype.getHitDetectionImage=function(){return Ci()},n.prototype.getPixelRatio=function(e){return 1},n.prototype.getImageState=function(){return Ci()},n.prototype.getImageSize=function(){return Ci()},n.prototype.getOrigin=function(){return Ci()},n.prototype.getSize=function(){return Ci()},n.prototype.setDisplacement=function(e){this.displacement_=e},n.prototype.setOpacity=function(e){this.opacity_=e},n.prototype.setRotateWithView=function(e){this.rotateWithView_=e},n.prototype.setRotation=function(e){this.rotation_=e},n.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=jA(e)},n.prototype.listenImageChange=function(e){Ci()},n.prototype.load=function(){Ci()},n.prototype.unlistenImageChange=function(e){Ci()},n}();const IN=Que;function Lf(n){return Array.isArray(n)?AN(n):n}var Yue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),que=function(n){Yue(e,n);function e(t){var r=this,i=t.rotateWithView!==void 0?t.rotateWithView:!1;return r=n.call(this,{opacity:1,rotateWithView:i,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})||this,r.canvas_=void 0,r.hitDetectionCanvas_=null,r.fill_=t.fill!==void 0?t.fill:null,r.origin_=[0,0],r.points_=t.points,r.radius_=t.radius!==void 0?t.radius:t.radius1,r.radius2_=t.radius2,r.angle_=t.angle!==void 0?t.angle:0,r.stroke_=t.stroke!==void 0?t.stroke:null,r.size_=null,r.renderOptions_=null,r.render(),r}return e.prototype.clone=function(){var t=this.getScale(),r=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return r.setOpacity(this.getOpacity()),r},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var r=this.getDisplacement();return[t[0]/2-r[0],t[1]/2+r[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.setFill=function(t){this.fill_=t,this.render()},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var r=this.canvas_[t];if(!r){var i=this.renderOptions_,o=Oc(i.size*t,i.size*t);this.draw_(i,o,t),r=o.canvas,this.canvas_[t]=r}return r},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return ts.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.setStroke=function(t){this.stroke_=t,this.render()},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,r,i){if(r===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return r;var o=this.radius_,a=this.radius2_===void 0?o:this.radius2_;if(o<a){var s=o;o=a,a=s}var d=this.radius2_===void 0?this.points_:this.points_*2,f=2*Math.PI/d,C=a*Math.sin(f),O=Math.sqrt(a*a-C*C),E=o-O,P=Math.sqrt(C*C+E*E),D=P/C;if(t==="miter"&&D<=i)return D*r;var $=r/2/D,H=r/2*(E/P),Q=Math.sqrt((o+$)*(o+$)+H*H),N=Q-o;if(this.radius2_===void 0||t==="bevel")return N*2;var Z=o*Math.sin(f),ae=Math.sqrt(o*o-Z*Z),pe=a-ae,fe=Math.sqrt(Z*Z+pe*pe),X=fe/Z;if(X<=i){var oe=X*r/2-a-o;return 2*Math.max(N,oe)}return N*2},e.prototype.createRenderOptions=function(){var t=pv,r=0,i=null,o=0,a,s=0;this.stroke_&&(a=this.stroke_.getColor(),a===null&&(a=pb),a=Lf(a),s=this.stroke_.getWidth(),s===void 0&&(s=gb),i=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=pv),r=this.stroke_.getMiterLimit(),r===void 0&&(r=fb));var d=this.calculateLineJoinSize_(t,s,r),f=Math.max(this.radius_,this.radius2_||0),C=Math.ceil(2*f+d);return{strokeStyle:a,strokeWidth:s,size:C,lineDash:i,lineDashOffset:o,lineJoin:t,miterLimit:r}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,r,i){if(r.scale(i,i),r.translate(t.size/2,t.size/2),this.createPath_(r),this.fill_){var o=this.fill_.getColor();o===null&&(o=Wp),r.fillStyle=Lf(o),r.fill()}this.stroke_&&(r.strokeStyle=t.strokeStyle,r.lineWidth=t.strokeWidth,r.setLineDash&&t.lineDash&&(r.setLineDash(t.lineDash),r.lineDashOffset=t.lineDashOffset),r.lineJoin=t.lineJoin,r.miterLimit=t.miterLimit,r.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var r=this.fill_.getColor(),i=0;if(typeof r=="string"&&(r=K4(r)),r===null?i=1:Array.isArray(r)&&(i=r.length===4?r[3]:1),i===0){var o=Oc(t.size,t.size);this.hitDetectionCanvas_=o.canvas,this.drawHitDetectionCanvas_(t,o)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var r=this.points_,i=this.radius_;if(r===1/0)t.arc(0,0,i,0,2*Math.PI);else{var o=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(r*=2);for(var a=this.angle_-Math.PI/2,s=2*Math.PI/r,d=0;d<r;d++){var f=a+d*s,C=d%2===0?i:o;t.lineTo(C*Math.cos(f),C*Math.sin(f))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,r){r.translate(t.size/2,t.size/2),this.createPath_(r),r.fillStyle=Wp,r.fill(),this.stroke_&&(r.strokeStyle=t.strokeStyle,r.lineWidth=t.strokeWidth,t.lineDash&&(r.setLineDash(t.lineDash),r.lineDashOffset=t.lineDashOffset),r.lineJoin=t.lineJoin,r.miterLimit=t.miterLimit,r.stroke())},e}(IN);const Vue=que;var Hue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),kN=function(n){Hue(e,n);function e(t){var r=t||{};return n.call(this,{points:1/0,fill:r.fill,radius:r.radius,stroke:r.stroke,scale:r.scale!==void 0?r.scale:1,rotation:r.rotation!==void 0?r.rotation:0,rotateWithView:r.rotateWithView!==void 0?r.rotateWithView:!1,displacement:r.displacement!==void 0?r.displacement:[0,0],declutterMode:r.declutterMode})||this}return e.prototype.clone=function(){var t=this.getScale(),r=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return r.setOpacity(this.getOpacity()),r},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Vue),vy=function(){function n(e){var t=e||{};this.color_=t.color!==void 0?t.color:null}return n.prototype.clone=function(){var e=this.getColor();return new n({color:Array.isArray(e)?e.slice():e||void 0})},n.prototype.getColor=function(){return this.color_},n.prototype.setColor=function(e){this.color_=e},n}(),t_=function(){function n(e){var t=e||{};this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}return n.prototype.clone=function(){var e=this.getColor();return new n({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},n.prototype.getColor=function(){return this.color_},n.prototype.getLineCap=function(){return this.lineCap_},n.prototype.getLineDash=function(){return this.lineDash_},n.prototype.getLineDashOffset=function(){return this.lineDashOffset_},n.prototype.getLineJoin=function(){return this.lineJoin_},n.prototype.getMiterLimit=function(){return this.miterLimit_},n.prototype.getWidth=function(){return this.width_},n.prototype.setColor=function(e){this.color_=e},n.prototype.setLineCap=function(e){this.lineCap_=e},n.prototype.setLineDash=function(e){this.lineDash_=e},n.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e},n.prototype.setLineJoin=function(e){this.lineJoin_=e},n.prototype.setMiterLimit=function(e){this.miterLimit_=e},n.prototype.setWidth=function(e){this.width_=e},n}(),X0=function(){function n(e){var t=e||{};this.geometry_=null,this.geometryFunction_=LK,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}return n.prototype.clone=function(){var e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new n({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},n.prototype.getRenderer=function(){return this.renderer_},n.prototype.setRenderer=function(e){this.renderer_=e},n.prototype.setHitDetectionRenderer=function(e){this.hitDetectionRenderer_=e},n.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},n.prototype.getGeometry=function(){return this.geometry_},n.prototype.getGeometryFunction=function(){return this.geometryFunction_},n.prototype.getFill=function(){return this.fill_},n.prototype.setFill=function(e){this.fill_=e},n.prototype.getImage=function(){return this.image_},n.prototype.setImage=function(e){this.image_=e},n.prototype.getStroke=function(){return this.stroke_},n.prototype.setStroke=function(e){this.stroke_=e},n.prototype.getText=function(){return this.text_},n.prototype.setText=function(e){this.text_=e},n.prototype.getZIndex=function(){return this.zIndex_},n.prototype.setGeometry=function(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=LK,this.geometry_=e},n.prototype.setZIndex=function(e){this.zIndex_=e},n}();function Zue(n){var e;if(typeof n=="function")e=n;else{var t;if(Array.isArray(n))t=n;else{co(typeof n.getZIndex=="function",41);var r=n;t=[r]}e=function(){return t}}return e}var qS=null;function Xue(n,e){if(!qS){var t=new vy({color:"rgba(255,255,255,0.4)"}),r=new t_({color:"#3399CC",width:1.25});qS=[new X0({image:new kN({fill:t,stroke:r,radius:5}),fill:t,stroke:r})]}return qS}function LK(n){return n.getGeometry()}var Jue=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),FK={RENDER_ORDER:"renderOrder"},eAe=function(n){Jue(e,n);function e(t){var r=this,i=t||{},o=xl({},i);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,r=n.call(this,o)||this,r.declutter_=i.declutter!==void 0?i.declutter:!1,r.renderBuffer_=i.renderBuffer!==void 0?i.renderBuffer:100,r.style_=null,r.styleFunction_=void 0,r.setStyle(i.style),r.updateWhileAnimating_=i.updateWhileAnimating!==void 0?i.updateWhileAnimating:!1,r.updateWhileInteracting_=i.updateWhileInteracting!==void 0?i.updateWhileInteracting:!1,r}return e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(t){return n.prototype.getFeatures.call(this,t)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(FK.RENDER_ORDER)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new BN(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(FK.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:Xue,this.styleFunction_=t===null?void 0:Zue(this.style_),this.changed()},e}(ww);const TN=eAe;var ci={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},F2=[ci.FILL],Nm=[ci.STROKE],f1=[ci.BEGIN_PATH],UK=[ci.CLOSE_PATH],tAe=function(){function n(){}return n.prototype.drawCustom=function(e,t,r,i){},n.prototype.drawGeometry=function(e){},n.prototype.setStyle=function(e){},n.prototype.drawCircle=function(e,t){},n.prototype.drawFeature=function(e,t){},n.prototype.drawGeometryCollection=function(e,t){},n.prototype.drawLineString=function(e,t){},n.prototype.drawMultiLineString=function(e,t){},n.prototype.drawMultiPoint=function(e,t){},n.prototype.drawMultiPolygon=function(e,t){},n.prototype.drawPoint=function(e,t){},n.prototype.drawPolygon=function(e,t){},n.prototype.drawText=function(e,t){},n.prototype.setFillStrokeStyle=function(e,t){},n.prototype.setImageStyle=function(e,t){},n.prototype.setTextStyle=function(e,t){},n}();const KN=tAe;var nAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),rAe=function(n){nAe(e,n);function e(t,r,i,o){var a=n.call(this)||this;return a.tolerance=t,a.maxExtent=r,a.pixelRatio=o,a.maxLineWidth=0,a.resolution=i,a.beginGeometryInstruction1_=null,a.beginGeometryInstruction2_=null,a.bufferedMaxExtent_=null,a.instructions=[],a.coordinates=[],a.tmpCoordinate_=[],a.hitDetectionInstructions=[],a.state={},a}return e.prototype.applyPixelRatio=function(t){var r=this.pixelRatio;return r==1?t:t.map(function(i){return i*r})},e.prototype.appendFlatPointCoordinates=function(t,r){for(var i=this.getBufferedMaxExtent(),o=this.tmpCoordinate_,a=this.coordinates,s=a.length,d=0,f=t.length;d<f;d+=r)o[0]=t[d],o[1]=t[d+1],jb(i,o)&&(a[s++]=o[0],a[s++]=o[1]);return s},e.prototype.appendFlatLineCoordinates=function(t,r,i,o,a,s){var d=this.coordinates,f=d.length,C=this.getBufferedMaxExtent();s&&(r+=o);var O=t[r],E=t[r+1],P=this.tmpCoordinate_,D=!0,$,H,Q;for($=r+o;$<i;$+=o)P[0]=t[$],P[1]=t[$+1],Q=_O(C,P),Q!==H?(D&&(d[f++]=O,d[f++]=E,D=!1),d[f++]=P[0],d[f++]=P[1]):Q===vu.INTERSECTING?(d[f++]=P[0],d[f++]=P[1],D=!1):D=!0,O=P[0],E=P[1],H=Q;return(a&&D||$===r+o)&&(d[f++]=O,d[f++]=E),f},e.prototype.drawCustomCoordinates_=function(t,r,i,o,a){for(var s=0,d=i.length;s<d;++s){var f=i[s],C=this.appendFlatLineCoordinates(t,r,f,o,!1,!1);a.push(C),r=f}return r},e.prototype.drawCustom=function(t,r,i,o){this.beginGeometry(t,r);var a=t.getType(),s=t.getStride(),d=this.coordinates.length,f,C,O,E,P;switch(a){case"MultiPolygon":f=t.getOrientedFlatCoordinates(),E=[];var D=t.getEndss();P=0;for(var $=0,H=D.length;$<H;++$){var Q=[];P=this.drawCustomCoordinates_(f,P,D[$],s,Q),E.push(Q)}this.instructions.push([ci.CUSTOM,d,E,t,i,BO]),this.hitDetectionInstructions.push([ci.CUSTOM,d,E,t,o||i,BO]);break;case"Polygon":case"MultiLineString":O=[],f=a=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),P=this.drawCustomCoordinates_(f,0,t.getEnds(),s,O),this.instructions.push([ci.CUSTOM,d,O,t,i,lb]),this.hitDetectionInstructions.push([ci.CUSTOM,d,O,t,o||i,lb]);break;case"LineString":case"Circle":f=t.getFlatCoordinates(),C=this.appendFlatLineCoordinates(f,0,f.length,s,!1,!1),this.instructions.push([ci.CUSTOM,d,C,t,i,jm]),this.hitDetectionInstructions.push([ci.CUSTOM,d,C,t,o||i,jm]);break;case"MultiPoint":f=t.getFlatCoordinates(),C=this.appendFlatPointCoordinates(f,s),C>d&&(this.instructions.push([ci.CUSTOM,d,C,t,i,jm]),this.hitDetectionInstructions.push([ci.CUSTOM,d,C,t,o||i,jm]));break;case"Point":f=t.getFlatCoordinates(),this.coordinates.push(f[0],f[1]),C=this.coordinates.length,this.instructions.push([ci.CUSTOM,d,C,t,i]),this.hitDetectionInstructions.push([ci.CUSTOM,d,C,t,o||i]);break}this.endGeometry(r)},e.prototype.beginGeometry=function(t,r){this.beginGeometryInstruction1_=[ci.BEGIN_GEOMETRY,r,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ci.BEGIN_GEOMETRY,r,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var r,i=t.length,o,a,s=-1;for(r=0;r<i;++r)o=t[r],a=o[0],a==ci.END_GEOMETRY?s=r:a==ci.BEGIN_GEOMETRY&&(o[2]=r,ioe(this.hitDetectionInstructions,s,r),s=-1)},e.prototype.setFillStrokeStyle=function(t,r){var i=this.state;if(t){var o=t.getColor();i.fillStyle=Lf(o||Wp)}else i.fillStyle=void 0;if(r){var a=r.getColor();i.strokeStyle=Lf(a||pb);var s=r.getLineCap();i.lineCap=s!==void 0?s:F4;var d=r.getLineDash();i.lineDash=d?d.slice():db;var f=r.getLineDashOffset();i.lineDashOffset=f||hb;var C=r.getLineJoin();i.lineJoin=C!==void 0?C:pv;var O=r.getWidth();i.lineWidth=O!==void 0?O:gb;var E=r.getMiterLimit();i.miterLimit=E!==void 0?E:fb,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var r=t.fillStyle,i=[ci.SET_FILL_STYLE,r];return typeof r!="string"&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[ci.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,r){var i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(r.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,r){var i=t.strokeStyle,o=t.lineCap,a=t.lineDash,s=t.lineDashOffset,d=t.lineJoin,f=t.lineWidth,C=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=o||a!=t.currentLineDash&&!Q1(t.currentLineDash,a)||t.currentLineDashOffset!=s||t.currentLineJoin!=d||t.currentLineWidth!=f||t.currentMiterLimit!=C)&&(i!==void 0&&r.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=o,t.currentLineDash=a,t.currentLineDashOffset=s,t.currentLineJoin=d,t.currentLineWidth=f,t.currentMiterLimit=C)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var r=[ci.END_GEOMETRY,t];this.instructions.push(r),this.hitDetectionInstructions.push(r)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Lj(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;r0(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(KN);const Qb=rAe;var iAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),oAe=function(n){iAe(e,n);function e(t,r,i,o){var a=n.call(this,t,r,i,o)||this;return a.hitDetectionImage_=null,a.image_=null,a.imagePixelRatio_=void 0,a.anchorX_=void 0,a.anchorY_=void 0,a.height_=void 0,a.opacity_=void 0,a.originX_=void 0,a.originY_=void 0,a.rotateWithView_=void 0,a.rotation_=void 0,a.scale_=void 0,a.width_=void 0,a.declutterMode_=void 0,a.declutterImageWithText_=void 0,a}return e.prototype.drawPoint=function(t,r){if(this.image_){this.beginGeometry(t,r);var i=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,s=this.appendFlatPointCoordinates(i,o);this.instructions.push([ci.DRAW_IMAGE,a,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ci.DRAW_IMAGE,a,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(r)}},e.prototype.drawMultiPoint=function(t,r){if(this.image_){this.beginGeometry(t,r);var i=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,s=this.appendFlatPointCoordinates(i,o);this.instructions.push([ci.DRAW_IMAGE,a,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ci.DRAW_IMAGE,a,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(r)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,n.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,r){var i=t.getAnchor(),o=t.getSize(),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=o[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=r},e}(Qb);const aAe=oAe;var sAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),lAe=function(n){sAe(e,n);function e(t,r,i,o){return n.call(this,t,r,i,o)||this}return e.prototype.drawFlatCoordinates_=function(t,r,i,o){var a=this.coordinates.length,s=this.appendFlatLineCoordinates(t,r,i,o,!1,!1),d=[ci.MOVE_TO_LINE_TO,a,s];return this.instructions.push(d),this.hitDetectionInstructions.push(d),i},e.prototype.drawLineString=function(t,r){var i=this.state,o=i.strokeStyle,a=i.lineWidth;if(!(o===void 0||a===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,r),this.hitDetectionInstructions.push([ci.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,db,hb],f1);var s=t.getFlatCoordinates(),d=t.getStride();this.drawFlatCoordinates_(s,0,s.length,d),this.hitDetectionInstructions.push(Nm),this.endGeometry(r)}},e.prototype.drawMultiLineString=function(t,r){var i=this.state,o=i.strokeStyle,a=i.lineWidth;if(!(o===void 0||a===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,r),this.hitDetectionInstructions.push([ci.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],f1);for(var s=t.getEnds(),d=t.getFlatCoordinates(),f=t.getStride(),C=0,O=0,E=s.length;O<E;++O)C=this.drawFlatCoordinates_(d,C,s[O],f);this.hitDetectionInstructions.push(Nm),this.endGeometry(r)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Nm),this.reverseHitDetectionInstructions(),this.state=null,n.prototype.finish.call(this)},e.prototype.applyStroke=function(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Nm),t.lastStroke=this.coordinates.length),t.lastStroke=0,n.prototype.applyStroke.call(this,t),this.instructions.push(f1)},e}(Qb);const uAe=lAe;var AAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),cAe=function(n){AAe(e,n);function e(t,r,i,o){return n.call(this,t,r,i,o)||this}return e.prototype.drawFlatCoordinatess_=function(t,r,i,o){var a=this.state,s=a.fillStyle!==void 0,d=a.strokeStyle!==void 0,f=i.length;this.instructions.push(f1),this.hitDetectionInstructions.push(f1);for(var C=0;C<f;++C){var O=i[C],E=this.coordinates.length,P=this.appendFlatLineCoordinates(t,r,O,o,!0,!d),D=[ci.MOVE_TO_LINE_TO,E,P];this.instructions.push(D),this.hitDetectionInstructions.push(D),d&&(this.instructions.push(UK),this.hitDetectionInstructions.push(UK)),r=O}return s&&(this.instructions.push(F2),this.hitDetectionInstructions.push(F2)),d&&(this.instructions.push(Nm),this.hitDetectionInstructions.push(Nm)),r},e.prototype.drawCircle=function(t,r){var i=this.state,o=i.fillStyle,a=i.strokeStyle;if(!(o===void 0&&a===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([ci.SET_FILL_STYLE,Wp]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ci.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var s=t.getFlatCoordinates(),d=t.getStride(),f=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,d,!1,!1);var C=[ci.CIRCLE,f];this.instructions.push(f1,C),this.hitDetectionInstructions.push(f1,C),i.fillStyle!==void 0&&(this.instructions.push(F2),this.hitDetectionInstructions.push(F2)),i.strokeStyle!==void 0&&(this.instructions.push(Nm),this.hitDetectionInstructions.push(Nm)),this.endGeometry(r)}},e.prototype.drawPolygon=function(t,r){var i=this.state,o=i.fillStyle,a=i.strokeStyle;if(!(o===void 0&&a===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([ci.SET_FILL_STYLE,Wp]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ci.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var s=t.getEnds(),d=t.getOrientedFlatCoordinates(),f=t.getStride();this.drawFlatCoordinatess_(d,0,s,f),this.endGeometry(r)}},e.prototype.drawMultiPolygon=function(t,r){var i=this.state,o=i.fillStyle,a=i.strokeStyle;if(!(o===void 0&&a===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([ci.SET_FILL_STYLE,Wp]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ci.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var s=t.getEndss(),d=t.getOrientedFlatCoordinates(),f=t.getStride(),C=0,O=0,E=s.length;O<E;++O)C=this.drawFlatCoordinatess_(d,C,s[O],f);this.endGeometry(r)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(t!==0)for(var r=this.coordinates,i=0,o=r.length;i<o;++i)r[i]=Z0(r[i],t);return n.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state,r=t.fillStyle;r!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)},e}(Qb);const RK=cAe,PN={POINT:"point",LINE:"line"};function dAe(n,e,t,r,i){var o=t,a=t,s=0,d=0,f=t,C,O,E,P,D,$,H,Q,N,Z;for(O=t;O<r;O+=i){var ae=e[O],pe=e[O+1];D!==void 0&&(N=ae-D,Z=pe-$,P=Math.sqrt(N*N+Z*Z),H!==void 0&&(d+=E,C=Math.acos((H*N+Q*Z)/(E*P)),C>n&&(d>s&&(s=d,o=f,a=O),d=0,f=O-i)),E=P,H=N,Q=Z),D=ae,$=pe}return d+=P,d>s?[f,O]:[o,a]}var hAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),x_={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},fAe=function(n){hAe(e,n);function e(t,r,i,o){var a=n.call(this,t,r,i,o)||this;return a.labels_=null,a.text_="",a.textOffsetX_=0,a.textOffsetY_=0,a.textRotateWithView_=void 0,a.textRotation_=0,a.textFillState_=null,a.fillStates={},a.textStrokeState_=null,a.strokeStates={},a.textState_={},a.textStates={},a.textKey_="",a.fillKey_="",a.strokeKey_="",a.declutterImageWithText_=void 0,a}return e.prototype.finish=function(){var t=n.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},e.prototype.drawText=function(t,r){var i=this.textFillState_,o=this.textStrokeState_,a=this.textState_;if(!(this.text_===""||!a||!i&&!o)){var s=this.coordinates,d=s.length,f=t.getType(),C=null,O=t.getStride();if(a.placement===PN.LINE&&(f=="LineString"||f=="MultiLineString"||f=="Polygon"||f=="MultiPolygon")){if(!bl(this.getBufferedMaxExtent(),t.getExtent()))return;var E=void 0;if(C=t.getFlatCoordinates(),f=="LineString")E=[C.length];else if(f=="MultiLineString")E=t.getEnds();else if(f=="Polygon")E=t.getEnds().slice(0,1);else if(f=="MultiPolygon"){var P=t.getEndss();E=[];for(var D=0,$=P.length;D<$;++D)E.push(P[D][0])}this.beginGeometry(t,r);for(var H=a.textAlign,Q=0,N=void 0,Z=0,ae=E.length;Z<ae;++Z){if(H==null){var pe=dAe(a.maxAngle,C,Q,E[Z],O);Q=pe[0],N=pe[1]}else N=E[Z];for(var D=Q;D<N;D+=O)s.push(C[D],C[D+1]);var fe=s.length;Q=E[Z],this.drawChars_(d,fe),d=fe}this.endGeometry(r)}else{var X=a.overflow?null:[];switch(f){case"Point":case"MultiPoint":C=t.getFlatCoordinates();break;case"LineString":C=t.getFlatMidpoint();break;case"Circle":C=t.getCenter();break;case"MultiLineString":C=t.getFlatMidpoints(),O=2;break;case"Polygon":C=t.getFlatInteriorPoint(),a.overflow||X.push(C[2]/this.resolution),O=3;break;case"MultiPolygon":var oe=t.getFlatInteriorPoints();C=[];for(var D=0,$=oe.length;D<$;D+=3)a.overflow||X.push(oe[D+2]/this.resolution),C.push(oe[D],oe[D+1]);if(C.length===0)return;O=2;break}var fe=this.appendFlatPointCoordinates(C,O);if(fe===d)return;if(X&&(fe-d)/2!==C.length/O){var Ce=d/2;X=X.filter(function(st,ft){var Re=s[(Ce+ft)*2]===C[ft*O]&&s[(Ce+ft)*2+1]===C[ft*O+1];return Re||--Ce,Re})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,r);var we=a.padding;if(we!=h1&&(a.scale[0]<0||a.scale[1]<0)){var Te=a.padding[0],Pe=a.padding[1],he=a.padding[2],$e=a.padding[3];a.scale[0]<0&&(Pe=-Pe,$e=-$e),a.scale[1]<0&&(Te=-Te,he=-he),we=[Te,Pe,he,$e]}var ye=this.pixelRatio;this.instructions.push([ci.DRAW_IMAGE,d,fe,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,we==h1?h1:we.map(function(st){return st*ye}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,X]);var gt=1/ye;this.hitDetectionInstructions.push([ci.DRAW_IMAGE,d,fe,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[gt,gt],NaN,void 0,this.declutterImageWithText_,we,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,X]),this.endGeometry(r)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,r=this.textState_,i=this.textFillState_,o=this.strokeKey_;t&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var a=this.textKey_;a in this.textStates||(this.textStates[a]={font:r.font,textAlign:r.textAlign||mb,justify:r.justify,textBaseline:r.textBaseline||U4,scale:r.scale});var s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,r){var i=this.textStrokeState_,o=this.textState_,a=this.strokeKey_,s=this.textKey_,d=this.fillKey_;this.saveTextStates_();var f=this.pixelRatio,C=x_[o.textBaseline],O=this.textOffsetY_*f,E=this.text_,P=i?i.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([ci.DRAW_CHARS,t,r,C,o.overflow,d,o.maxAngle,f,O,a,P*f,E,s,1]),this.hitDetectionInstructions.push([ci.DRAW_CHARS,t,r,C,o.overflow,d,o.maxAngle,1,O,a,P,E,s,1/f])},e.prototype.setTextStyle=function(t,r){var i,o,a;if(!t)this.text_="";else{var s=t.getFill();s?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=Lf(s.getColor()||Wp)):(o=null,this.textFillState_=o);var d=t.getStroke();if(!d)a=null,this.textStrokeState_=a;else{a=this.textStrokeState_,a||(a={},this.textStrokeState_=a);var f=d.getLineDash(),C=d.getLineDashOffset(),O=d.getWidth(),E=d.getMiterLimit();a.lineCap=d.getLineCap()||F4,a.lineDash=f?f.slice():db,a.lineDashOffset=C===void 0?hb:C,a.lineJoin=d.getLineJoin()||pv,a.lineWidth=O===void 0?gb:O,a.miterLimit=E===void 0?fb:E,a.strokeStyle=Lf(d.getColor()||pb)}i=this.textState_;var P=t.getFont()||pN;nle(P);var D=t.getScaleArray();i.overflow=t.getOverflow(),i.font=P,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||U4,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||h1,i.scale=D===void 0?[1,1]:D;var $=t.getOffsetX(),H=t.getOffsetY(),Q=t.getRotateWithView(),N=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=$===void 0?0:$,this.textOffsetY_=H===void 0?0:H,this.textRotateWithView_=Q===void 0?!1:Q,this.textRotation_=N===void 0?0:N,this.strokeKey_=a?(typeof a.strokeStyle=="string"?a.strokeStyle:qi(a.strokeStyle))+a.lineCap+a.lineDashOffset+"|"+a.lineWidth+a.lineJoin+a.miterLimit+"["+a.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=o?typeof o.fillStyle=="string"?o.fillStyle:"|"+qi(o.fillStyle):""}this.declutterImageWithText_=r},e}(Qb),pAe={Circle:RK,Default:Qb,Image:aAe,LineString:uAe,Polygon:RK,Text:fAe},j4=function(){function n(e,t,r,i){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=i,this.resolution_=r,this.buildersByZIndex_={}}return n.prototype.finish=function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var r=this.buildersByZIndex_[t];for(var i in r){var o=r[i].finish();e[t][i]=o}}return e},n.prototype.getBuilder=function(e,t){var r=e!==void 0?e.toString():"0",i=this.buildersByZIndex_[r];i===void 0&&(i={},this.buildersByZIndex_[r]=i);var o=i[t];if(o===void 0){var a=pAe[t];o=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=o}return o},n}(),mAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),gAe=function(n){mAe(e,n);function e(t){var r=n.call(this)||this;return r.ready=!0,r.boundHandleImageChange_=r.handleImageChange_.bind(r),r.layer_=t,r.declutterExecutorGroup=null,r}return e.prototype.getFeatures=function(t){return Ci()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return Ci()},e.prototype.renderFrame=function(t,r){return Ci()},e.prototype.loadedTileCallback=function(t,r,i){t[r]||(t[r]={}),t[r][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,r,i){return(function(o,a){var s=this.loadedTileCallback.bind(this,i,o);return t.forEachLoadedTile(r,o,a,s)}).bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,r,i,o,a){},e.prototype.getDataAtPixel=function(t,r,i){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){var r=t.target;r.getState()===ts.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var r=t.getState();return r!=ts.LOADED&&r!=ts.ERROR&&t.addEventListener(Wi.CHANGE,this.boundHandleImageChange_),r==ts.IDLE&&(t.load(),r=t.getState()),r==ts.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,n.prototype.disposeInternal.call(this)},e}(Bj);const yAe=gAe;var vAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),zK=[],ey=null;function CAe(){var n=document.createElement("canvas");n.width=1,n.height=1,ey=n.getContext("2d")}var _Ae=function(n){vAe(e,n);function e(t){var r=n.call(this,t)||this;return r.container=null,r.renderedResolution,r.tempTransform=jd(),r.pixelTransform=jd(),r.inversePixelTransform=jd(),r.context=null,r.containerReused=!1,r.pixelContext_=null,r.frameState=null,r}return e.prototype.getImageData=function(t,r,i){ey||CAe(),ey.clearRect(0,0,1,1);var o;try{ey.drawImage(t,r,i,1,1,0,0,1,1),o=ey.getImageData(0,0,1,1).data}catch{return ey=null,null}return o},e.prototype.getBackground=function(t){var r=this.getLayer(),i=r.getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0},e.prototype.useContainer=function(t,r,i){var o=this.getLayer().getClassName(),a,s;if(t&&t.className===o&&(!i||t&&t.style.backgroundColor&&Q1(K4(t.style.backgroundColor),K4(i)))){var d=t.firstElementChild;d instanceof HTMLCanvasElement&&(s=d.getContext("2d"))}if(s&&s.canvas.style.transform===r?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){a=document.createElement("div"),a.className=o;var f=a.style;f.position="absolute",f.width="100%",f.height="100%",s=Oc();var d=s.canvas;a.appendChild(d),f=d.style,f.position="absolute",f.left="0",f.transformOrigin="top left",this.container=a,this.context=s}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)},e.prototype.clipUnrotated=function(t,r,i){var o=m0(i),a=Cw(i),s=vw(i),d=yw(i);Cl(r.coordinateToPixelTransform,o),Cl(r.coordinateToPixelTransform,a),Cl(r.coordinateToPixelTransform,s),Cl(r.coordinateToPixelTransform,d);var f=this.inversePixelTransform;Cl(f,o),Cl(f,a),Cl(f,s),Cl(f,d),t.save(),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(d[0]),Math.round(d[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,r,i){var o=this.getLayer();if(o.hasListener(t)){var a=new dN(t,this.inversePixelTransform,i,r);o.dispatchEvent(a)}},e.prototype.preRender=function(t,r){this.frameState=r,this.dispatchRenderEvent_(o0.PRERENDER,t,r)},e.prototype.postRender=function(t,r){this.dispatchRenderEvent_(o0.POSTRENDER,t,r)},e.prototype.getRenderTransform=function(t,r,i,o,a,s,d){var f=a/2,C=s/2,O=o/r,E=-O,P=-t[0]+d,D=-t[1];return Gf(this.tempTransform,f,C,O,E,-i,P,D)},e.prototype.getDataAtPixel=function(t,r,i){var o=Cl(this.inversePixelTransform,t.slice()),a=this.context,s=this.getLayer(),d=s.getExtent();if(d){var f=Cl(r.pixelToCoordinateTransform,t.slice());if(!jb(d,f))return null}var C=Math.round(o[0]),O=Math.round(o[1]),E=this.pixelContext_;if(!E){var P=document.createElement("canvas");P.width=1,P.height=1,E=P.getContext("2d"),this.pixelContext_=E}E.clearRect(0,0,1,1);var D;try{E.drawImage(a.canvas,C,O,1,1,0,0,1,1),D=E.getImageData(0,0,1,1).data}catch($){return $.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):D}return D[3]===0?null:D},e.prototype.disposeInternal=function(){delete this.frameState,n.prototype.disposeInternal.call(this)},e}(yAe);const DN=_Ae;function bAe(n,e,t,r,i,o,a,s,d,f,C,O){var E=n[e],P=n[e+1],D=0,$=0,H=0,Q=0;function N(){D=E,$=P,e+=r,E=n[e],P=n[e+1],Q+=H,H=Math.sqrt((E-D)*(E-D)+(P-$)*(P-$))}do N();while(e<t-r&&Q+H<o);for(var Z=H===0?0:(o-Q)/H,ae=Pp(D,E,Z),pe=Pp($,P,Z),fe=e-r,X=Q,oe=o+s*d(f,i,C);e<t-r&&Q+H<oe;)N();Z=H===0?0:(oe-Q)/H;var Ce=Pp(D,E,Z),we=Pp($,P,Z),Te;if(O){var Pe=[ae,pe,Ce,we];Qj(Pe,0,4,2,O,Pe,Pe),Te=Pe[0]>Pe[2]}else Te=ae>Ce;var he=Math.PI,$e=[],ye=fe+r===e;e=fe,H=0,Q=X,E=n[e],P=n[e+1];var gt;if(ye){N(),gt=Math.atan2(P-$,E-D),Te&&(gt+=gt>0?-he:he);var yt=(Ce+ae)/2,st=(we+pe)/2;return $e[0]=[yt,st,(oe-o)/2,gt,i],$e}i=i.replace(/\n/g," ");for(var ft=0,Re=i.length;ft<Re;){N();var Ve=Math.atan2(P-$,E-D);if(Te&&(Ve+=Ve>0?-he:he),gt!==void 0){var Xe=Ve-gt;if(Xe+=Xe>he?-2*he:Xe<-he?2*he:0,Math.abs(Xe)>a)return null}gt=Ve;for(var Jt=ft,Ht=0;ft<Re;++ft){var bt=Te?Re-ft-1:ft,Qt=s*d(f,i[bt],C);if(e+r<t&&Q+H<o+Ht+Qt/2)break;Ht+=Qt}if(ft!==Jt){var Yt=Te?i.substring(Re-Jt,Re-ft):i.substring(Jt,ft);Z=H===0?0:(o+Ht/2-Q)/H;var yt=Pp(D,E,Z),st=Pp($,P,Z);$e.push([yt,st,Ht/2,Ve,Yt]),o+=Ht}}return $e}var Ug=$d(),_m=[],wp=[],Mp=[],bm=[];function jK(n){return n[3].declutterBox}var xAe=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ-࿿-]");function NK(n,e){return(e==="start"||e==="end")&&!xAe.test(n)&&(e=e==="start"?"left":"right"),x_[e]}function wAe(n,e,t){return t>0&&n.push(`
`,""),n.push(e,""),n}var MAe=function(){function n(e,t,r,i){this.overlaps=r,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=jd(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return n.prototype.createLabel=function(e,t,r,i){var o=e+t+r+i;if(this.labels_[o])return this.labels_[o];var a=i?this.strokeStates[i]:null,s=r?this.fillStates[r]:null,d=this.textStates[t],f=this.pixelRatio,C=[d.scale[0]*f,d.scale[1]*f],O=Array.isArray(e),E=d.justify?x_[d.justify]:NK(Array.isArray(e)?e[0]:e,d.textAlign||mb),P=i&&a.lineWidth?a.lineWidth:0,D=O?e:e.split(`
`).reduce(wAe,[]),$=ile(d,D),H=$.width,Q=$.height,N=$.widths,Z=$.heights,ae=$.lineWidths,pe=H+P,fe=[],X=(pe+2)*C[0],oe=(Q+P)*C[1],Ce={width:X<0?Math.floor(X):Math.ceil(X),height:oe<0?Math.floor(oe):Math.ceil(oe),contextInstructions:fe};if((C[0]!=1||C[1]!=1)&&fe.push("scale",C),i){fe.push("strokeStyle",a.strokeStyle),fe.push("lineWidth",P),fe.push("lineCap",a.lineCap),fe.push("lineJoin",a.lineJoin),fe.push("miterLimit",a.miterLimit);var we=mw?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;we.prototype.setLineDash&&(fe.push("setLineDash",[a.lineDash]),fe.push("lineDashOffset",a.lineDashOffset))}r&&fe.push("fillStyle",s.fillStyle),fe.push("textBaseline","middle"),fe.push("textAlign","center");for(var Te=.5-E,Pe=E*pe+Te*P,he=[],$e=[],ye=0,gt=0,yt=0,st=0,ft,Re=0,Ve=D.length;Re<Ve;Re+=2){var Xe=D[Re];if(Xe===`
`){gt+=ye,ye=0,Pe=E*pe+Te*P,++st;continue}var Jt=D[Re+1]||d.font;Jt!==ft&&(i&&he.push("font",Jt),r&&$e.push("font",Jt),ft=Jt),ye=Math.max(ye,Z[yt]);var Ht=[Xe,Pe+Te*N[yt]+E*(N[yt]-ae[st]),.5*(P+ye)+gt];Pe+=N[yt],i&&he.push("strokeText",Ht),r&&$e.push("fillText",Ht),++yt}return Array.prototype.push.apply(fe,he),Array.prototype.push.apply(fe,$e),this.labels_[o]=Ce,Ce},n.prototype.replayTextBackground_=function(e,t,r,i,o,a,s){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,o),e.lineTo.apply(e,t),a&&(this.alignFill_=a[2],this.fill_(e)),s&&(this.setStrokeStyle_(e,s),e.stroke())},n.prototype.calculateImageOrLabelDimensions_=function(e,t,r,i,o,a,s,d,f,C,O,E,P,D,$,H){s*=E[0],d*=E[1];var Q=r-s,N=i-d,Z=o+f>e?e-f:o,ae=a+C>t?t-C:a,pe=D[3]+Z*E[0]+D[1],fe=D[0]+ae*E[1]+D[2],X=Q-D[3],oe=N-D[0];($||O!==0)&&(_m[0]=X,bm[0]=X,_m[1]=oe,wp[1]=oe,wp[0]=X+pe,Mp[0]=wp[0],Mp[1]=oe+fe,bm[1]=Mp[1]);var Ce;return O!==0?(Ce=Gf(jd(),r,i,1,1,O,-r,-i),Cl(Ce,_m),Cl(Ce,wp),Cl(Ce,Mp),Cl(Ce,bm),$f(Math.min(_m[0],wp[0],Mp[0],bm[0]),Math.min(_m[1],wp[1],Mp[1],bm[1]),Math.max(_m[0],wp[0],Mp[0],bm[0]),Math.max(_m[1],wp[1],Mp[1],bm[1]),Ug)):$f(Math.min(X,X+pe),Math.min(oe,oe+fe),Math.max(X,X+pe),Math.max(oe,oe+fe),Ug),P&&(Q=Math.round(Q),N=Math.round(N)),{drawImageX:Q,drawImageY:N,drawImageW:Z,drawImageH:ae,originX:f,originY:C,declutterBox:{minX:Ug[0],minY:Ug[1],maxX:Ug[2],maxY:Ug[3],value:H},canvasTransform:Ce,scale:E}},n.prototype.replayImageOrLabel_=function(e,t,r,i,o,a,s){var d=!!(a||s),f=i.declutterBox,C=e.canvas,O=s?s[2]*i.scale[0]/2:0,E=f.minX-O<=C.width/t&&f.maxX+O>=0&&f.minY-O<=C.height/t&&f.maxY+O>=0;return E&&(d&&this.replayTextBackground_(e,_m,wp,Mp,bm,a,s),ole(e,i.canvasTransform,o,r,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},n.prototype.fill_=function(e){if(this.alignFill_){var t=Cl(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;e.save(),e.translate(t[0]%r,t[1]%r),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()},n.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.setLineDash&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},n.prototype.drawLabelWithPointPlacement_=function(e,t,r,i){var o=this.textStates[t],a=this.createLabel(e,t,i,r),s=this.strokeStates[r],d=this.pixelRatio,f=NK(Array.isArray(e)?e[0]:e,o.textAlign||mb),C=x_[o.textBaseline||U4],O=s&&s.lineWidth?s.lineWidth:0,E=a.width/d-2*o.scale[0],P=f*E+2*(.5-f)*O,D=C*a.height/d+2*(.5-C)*O;return{label:a,anchorX:P,anchorY:D}},n.prototype.execute_=function(e,t,r,i,o,a,s,d){var f;this.pixelCoordinates_&&Q1(r,this.renderedTransform_)?f=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),f=i0(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),boe(this.renderedTransform_,r));for(var C=0,O=i.length,E=0,P,D,$,H,Q,N,Z,ae,pe,fe,X,oe,Ce=0,we=0,Te=null,Pe=null,he=this.coordinateCache_,$e=this.viewRotation_,ye=Math.round(Math.atan2(-r[1],r[0])*1e12)/1e12,gt={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:$e},yt=this.instructions!=i||this.overlaps?0:200,st,ft,Re,Ve;C<O;){var Xe=i[C],Jt=Xe[0];switch(Jt){case ci.BEGIN_GEOMETRY:st=Xe[1],Ve=Xe[3],st.getGeometry()?s!==void 0&&!bl(s,Ve.getExtent())?C=Xe[2]+1:++C:C=Xe[2];break;case ci.BEGIN_PATH:Ce>yt&&(this.fill_(e),Ce=0),we>yt&&(e.stroke(),we=0),!Ce&&!we&&(e.beginPath(),H=NaN,Q=NaN),++C;break;case ci.CIRCLE:E=Xe[1];var Ht=f[E],bt=f[E+1],Qt=f[E+2],Yt=f[E+3],ke=Qt-Ht,ge=Yt-bt,Se=Math.sqrt(ke*ke+ge*ge);e.moveTo(Ht+Se,bt),e.arc(Ht,bt,Se,0,2*Math.PI,!0),++C;break;case ci.CLOSE_PATH:e.closePath(),++C;break;case ci.CUSTOM:E=Xe[1],P=Xe[2];var ze=Xe[3],it=Xe[4],ot=Xe.length==6?Xe[5]:void 0;gt.geometry=ze,gt.feature=st,C in he||(he[C]=[]);var St=he[C];ot?ot(f,E,P,2,St):(St[0]=f[E],St[1]=f[E+1],St.length=2),it(St,gt),++C;break;case ci.DRAW_IMAGE:E=Xe[1],P=Xe[2],ae=Xe[3],D=Xe[4],$=Xe[5];var Rt=Xe[6],zt=Xe[7],mt=Xe[8],or=Xe[9],gn=Xe[10],yn=Xe[11],tr=Xe[12],dr=Xe[13],Sr=Xe[14],Nr=Xe[15];if(!ae&&Xe.length>=20){pe=Xe[19],fe=Xe[20],X=Xe[21],oe=Xe[22];var yr=this.drawLabelWithPointPlacement_(pe,fe,X,oe);ae=yr.label,Xe[3]=ae;var _i=Xe[23];D=(yr.anchorX-_i)*this.pixelRatio,Xe[4]=D;var Ee=Xe[24];$=(yr.anchorY-Ee)*this.pixelRatio,Xe[5]=$,Rt=ae.height,Xe[6]=Rt,dr=ae.width,Xe[13]=dr}var ee=void 0;Xe.length>25&&(ee=Xe[25]);var V=void 0,Ke=void 0,At=void 0;Xe.length>17?(V=Xe[16],Ke=Xe[17],At=Xe[18]):(V=h1,Ke=!1,At=!1),gn&&ye?yn+=$e:!gn&&!ye&&(yn-=$e);for(var Bt=0;E<P;E+=2)if(!(ee&&ee[Bt++]<dr/this.pixelRatio)){var kt=this.calculateImageOrLabelDimensions_(ae.width,ae.height,f[E],f[E+1],dr,Rt,D,$,mt,or,yn,tr,o,V,Ke||At,st),Lt=[e,t,ae,kt,zt,Ke?Te:null,At?Pe:null];if(d){if(Sr==="none")continue;if(Sr==="obstacle"){d.insert(kt.declutterBox);continue}else{var fn=void 0,Pn=void 0;if(Nr){var On=P-E;if(!Nr[On]){Nr[On]=Lt;continue}if(fn=Nr[On],delete Nr[On],Pn=jK(fn),d.collides(Pn))continue}if(d.collides(kt.declutterBox))continue;fn&&(d.insert(Pn),this.replayImageOrLabel_.apply(this,fn)),d.insert(kt.declutterBox)}}this.replayImageOrLabel_.apply(this,Lt)}++C;break;case ci.DRAW_CHARS:var g=Xe[1],Kt=Xe[2],Pr=Xe[3],rr=Xe[4];oe=Xe[5];var Le=Xe[6],ce=Xe[7],xe=Xe[8];X=Xe[9];var Ie=Xe[10];pe=Xe[11],fe=Xe[12];var je=[Xe[13],Xe[13]],rt=this.textStates[fe],lt=rt.font,pt=[rt.scale[0]*ce,rt.scale[1]*ce],et=void 0;lt in this.widths_?et=this.widths_[lt]:(et={},this.widths_[lt]=et);var Mt=Jj(f,g,Kt,2),tn=Math.abs(pt[0])*OK(lt,pe,et);if(rr||tn<=Mt){var qt=this.textStates[fe].textAlign,en=(Mt-tn)*x_[qt],Fn=bAe(f,g,Kt,2,pe,en,Le,Math.abs(pt[0]),OK,lt,et,ye?0:this.viewRotation_);e:if(Fn){var Bn=[],Hn=void 0,Or=void 0,cr=void 0,Qr=void 0,Br=void 0;if(X)for(Hn=0,Or=Fn.length;Hn<Or;++Hn){Br=Fn[Hn],cr=Br[4],Qr=this.createLabel(cr,fe,"",X),D=Br[2]+(pt[0]<0?-Ie:Ie),$=Pr*Qr.height+(.5-Pr)*2*Ie*pt[1]/pt[0]-xe;var kt=this.calculateImageOrLabelDimensions_(Qr.width,Qr.height,Br[0],Br[1],Qr.width,Qr.height,D,$,0,0,Br[3],je,!1,h1,!1,st);if(d&&d.collides(kt.declutterBox))break e;Bn.push([e,t,Qr,kt,1,null,null])}if(oe)for(Hn=0,Or=Fn.length;Hn<Or;++Hn){Br=Fn[Hn],cr=Br[4],Qr=this.createLabel(cr,fe,oe,""),D=Br[2],$=Pr*Qr.height-xe;var kt=this.calculateImageOrLabelDimensions_(Qr.width,Qr.height,Br[0],Br[1],Qr.width,Qr.height,D,$,0,0,Br[3],je,!1,h1,!1,st);if(d&&d.collides(kt.declutterBox))break e;Bn.push([e,t,Qr,kt,1,null,null])}d&&d.load(Bn.map(jK));for(var Fr=0,ar=Bn.length;Fr<ar;++Fr)this.replayImageOrLabel_.apply(this,Bn[Fr])}}++C;break;case ci.END_GEOMETRY:if(a!==void 0){st=Xe[1];var di=a(st,Ve);if(di)return di}++C;break;case ci.FILL:yt?Ce++:this.fill_(e),++C;break;case ci.MOVE_TO_LINE_TO:for(E=Xe[1],P=Xe[2],ft=f[E],Re=f[E+1],N=ft+.5|0,Z=Re+.5|0,(N!==H||Z!==Q)&&(e.moveTo(ft,Re),H=N,Q=Z),E+=2;E<P;E+=2)ft=f[E],Re=f[E+1],N=ft+.5|0,Z=Re+.5|0,(E==P-2||N!==H||Z!==Q)&&(e.lineTo(ft,Re),H=N,Q=Z);++C;break;case ci.SET_FILL_STYLE:Te=Xe,this.alignFill_=Xe[2],Ce&&(this.fill_(e),Ce=0,we&&(e.stroke(),we=0)),e.fillStyle=Xe[1],++C;break;case ci.SET_STROKE_STYLE:Pe=Xe,we&&(e.stroke(),we=0),this.setStrokeStyle_(e,Xe),++C;break;case ci.STROKE:yt?we++:e.stroke(),++C;break;default:++C;break}}Ce&&this.fill_(e),we&&e.stroke()},n.prototype.execute=function(e,t,r,i,o,a){this.viewRotation_=i,this.execute_(e,t,r,this.instructions,o,void 0,void 0,a)},n.prototype.executeHitDetection=function(e,t,r,i,o){return this.viewRotation_=r,this.execute_(e,1,t,this.hitDetectionInstructions,!0,i,o)},n}();const SAe=MAe;var VS=["Polygon","Circle","LineString","Image","Text","Default"],EAe=function(){function n(e,t,r,i,o,a){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=t,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=jd(),this.createExecutors_(o)}return n.prototype.clip=function(e,t){var r=this.getClipCoords(t);e.beginPath(),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3]),e.lineTo(r[4],r[5]),e.lineTo(r[6],r[7]),e.clip()},n.prototype.createExecutors_=function(e){for(var t in e){var r=this.executorsByZIndex_[t];r===void 0&&(r={},this.executorsByZIndex_[t]=r);var i=e[t];for(var o in i){var a=i[o];r[o]=new SAe(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}},n.prototype.hasExecutors=function(e){for(var t in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[t],i=0,o=e.length;i<o;++i)if(e[i]in r)return!0;return!1},n.prototype.forEachFeatureAtCoordinate=function(e,t,r,i,o,a){i=Math.round(i);var s=i*2+1,d=Gf(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-r,-e[0],-e[1]),f=!this.hitDetectionContext_;f&&(this.hitDetectionContext_=Oc(s,s));var C=this.hitDetectionContext_;C.canvas.width!==s||C.canvas.height!==s?(C.canvas.width=s,C.canvas.height=s):f||C.clearRect(0,0,s,s);var O;this.renderBuffer_!==void 0&&(O=$d(),b_(O,e),r0(O,t*(this.renderBuffer_+i),O));var E=OAe(i),P;function D(fe,X){for(var oe=C.getImageData(0,0,s,s).data,Ce=0,we=E.length;Ce<we;Ce++)if(oe[E[Ce]]>0){if(!a||P!=="Image"&&P!=="Text"||a.indexOf(fe)!==-1){var Te=(E[Ce]-3)/4,Pe=i-Te%s,he=i-(Te/s|0),$e=o(fe,X,Pe*Pe+he*he);if($e)return $e}C.clearRect(0,0,s,s);break}}var $=Object.keys(this.executorsByZIndex_).map(Number);$.sort(D1);var H,Q,N,Z,ae;for(H=$.length-1;H>=0;--H){var pe=$[H].toString();for(N=this.executorsByZIndex_[pe],Q=VS.length-1;Q>=0;--Q)if(P=VS[Q],Z=N[P],Z!==void 0&&(ae=Z.executeHitDetection(C,d,r,D,O),ae))return ae}},n.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var r=t[0],i=t[1],o=t[2],a=t[3],s=[r,i,r,a,o,a,o,i];return i0(s,0,8,2,e,s),s},n.prototype.isEmpty=function(){return F1(this.executorsByZIndex_)},n.prototype.execute=function(e,t,r,i,o,a,s){var d=Object.keys(this.executorsByZIndex_).map(Number);d.sort(D1),this.maxExtent_&&(e.save(),this.clip(e,r));var f=a||VS,C,O,E,P,D,$;for(s&&d.reverse(),C=0,O=d.length;C<O;++C){var H=d[C].toString();for(D=this.executorsByZIndex_[H],E=0,P=f.length;E<P;++E){var Q=f[E];$=D[Q],$!==void 0&&$.execute(e,t,r,i,o,s)}}this.maxExtent_&&e.restore()},n}(),HS={};function OAe(n){if(HS[n]!==void 0)return HS[n];for(var e=n*2+1,t=n*n,r=new Array(t+1),i=0;i<=n;++i)for(var o=0;o<=n;++o){var a=i*i+o*o;if(a>t)break;var s=r[a];s||(s=[],r[a]=s),s.push(((n+i)*e+(n+o))*4+3),i>0&&s.push(((n-i)*e+(n+o))*4+3),o>0&&(s.push(((n+i)*e+(n-o))*4+3),i>0&&s.push(((n-i)*e+(n-o))*4+3))}for(var d=[],i=0,f=r.length;i<f;++i)r[i]&&d.push.apply(d,r[i]);return HS[n]=d,d}const N4=EAe;var BAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),IAe=function(n){BAe(e,n);function e(t,r,i,o,a,s,d){var f=n.call(this)||this;return f.context_=t,f.pixelRatio_=r,f.extent_=i,f.transform_=o,f.viewRotation_=a,f.squaredTolerance_=s,f.userTransform_=d,f.contextFillState_=null,f.contextStrokeState_=null,f.contextTextState_=null,f.fillState_=null,f.strokeState_=null,f.image_=null,f.imageAnchorX_=0,f.imageAnchorY_=0,f.imageHeight_=0,f.imageOpacity_=0,f.imageOriginX_=0,f.imageOriginY_=0,f.imageRotateWithView_=!1,f.imageRotation_=0,f.imageScale_=[0,0],f.imageWidth_=0,f.text_="",f.textOffsetX_=0,f.textOffsetY_=0,f.textRotateWithView_=!1,f.textRotation_=0,f.textScale_=[0,0],f.textFillState_=null,f.textStrokeState_=null,f.textState_=null,f.pixelCoordinates_=[],f.tmpLocalTransform_=jd(),f}return e.prototype.drawImages_=function(t,r,i,o){if(this.image_){var a=i0(t,r,i,o,this.transform_,this.pixelCoordinates_),s=this.context_,d=this.tmpLocalTransform_,f=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=f*this.imageOpacity_);var C=this.imageRotation_;this.imageRotateWithView_&&(C+=this.viewRotation_);for(var O=0,E=a.length;O<E;O+=2){var P=a[O]-this.imageAnchorX_,D=a[O+1]-this.imageAnchorY_;if(C!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var $=P+this.imageAnchorX_,H=D+this.imageAnchorY_;Gf(d,$,H,1,1,C,-$,-H),s.setTransform.apply(s,d),s.translate($,H),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,P,D,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=f)}},e.prototype.drawText_=function(t,r,i,o){if(!(!this.textState_||this.text_==="")){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var a=i0(t,r,i,o,this.transform_,this.pixelCoordinates_),s=this.context_,d=this.textRotation_;for(this.textRotateWithView_&&(d+=this.viewRotation_);r<i;r+=o){var f=a[r]+this.textOffsetX_,C=a[r+1]+this.textOffsetY_;if(d!==0||this.textScale_[0]!=1||this.textScale_[1]!=1){var O=Gf(this.tmpLocalTransform_,f,C,1,1,d,-f,-C);s.setTransform.apply(s,O),s.translate(f,C),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&s.strokeText(this.text_,f,C),this.textFillState_&&s.fillText(this.text_,f,C)}}},e.prototype.moveToLineTo_=function(t,r,i,o,a){var s=this.context_,d=i0(t,r,i,o,this.transform_,this.pixelCoordinates_);s.moveTo(d[0],d[1]);var f=d.length;a&&(f-=2);for(var C=2;C<f;C+=2)s.lineTo(d[C],d[C+1]);return a&&s.closePath(),i},e.prototype.drawRings_=function(t,r,i,o){for(var a=0,s=i.length;a<s;++a)r=this.moveToLineTo_(t,r,i[a],o,!0);return r},e.prototype.drawCircle=function(t){if(bl(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var r=yae(t,this.transform_,this.pixelCoordinates_),i=r[2]-r[0],o=r[3]-r[1],a=Math.sqrt(i*i+o*o),s=this.context_;s.beginPath(),s.arc(r[0],r[1],a,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){var r=t.getType();switch(r){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}},e.prototype.drawFeature=function(t,r){var i=r.getGeometryFunction()(t);!i||!bl(this.extent_,i.getExtent())||(this.setStyle(r),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var r=t.getGeometriesArray(),i=0,o=r.length;i<o;++i)this.drawGeometry(r[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var r=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(r,0,r.length,i),this.text_!==""&&this.drawText_(r,0,r.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var r=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(r,0,r.length,i),this.text_!==""&&this.drawText_(r,0,r.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!bl(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var r=this.context_,i=t.getFlatCoordinates();r.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),r.stroke()}if(this.text_!==""){var o=t.getFlatMidpoint();this.drawText_(o,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var r=t.getExtent();if(bl(this.extent_,r)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,o=t.getFlatCoordinates(),a=0,s=t.getEnds(),d=t.getStride();i.beginPath();for(var f=0,C=s.length;f<C;++f)a=this.moveToLineTo_(o,a,s[f],d,!1);i.stroke()}if(this.text_!==""){var O=t.getFlatMidpoints();this.drawText_(O,0,O.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!bl(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var r=this.context_;r.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}if(this.text_!==""){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!bl(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var r=this.context_,i=t.getOrientedFlatCoordinates(),o=0,a=t.getEndss(),s=t.getStride();r.beginPath();for(var d=0,f=a.length;d<f;++d){var C=a[d];o=this.drawRings_(i,o,C,s)}this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}if(this.text_!==""){var O=t.getFlatInteriorPoints();this.drawText_(O,0,O.length,2)}}},e.prototype.setContextFillState_=function(t){var r=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,r.fillStyle=t.fillStyle):(r.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var r=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,r.lineCap=t.lineCap),r.setLineDash&&(Q1(i.lineDash,t.lineDash)||r.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,r.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,r.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,r.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,r.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,r.strokeStyle=t.strokeStyle)):(r.lineCap=t.lineCap,r.setLineDash&&(r.setLineDash(t.lineDash),r.lineDashOffset=t.lineDashOffset),r.lineJoin=t.lineJoin,r.lineWidth=t.lineWidth,r.miterLimit=t.miterLimit,r.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var r=this.context_,i=this.contextTextState_,o=t.textAlign?t.textAlign:mb;i?(i.font!=t.font&&(i.font=t.font,r.font=t.font),i.textAlign!=o&&(i.textAlign=o,r.textAlign=o),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,r.textBaseline=t.textBaseline)):(r.font=t.font,r.textAlign=o,r.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:o,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,r){var i=this;if(!t)this.fillState_=null;else{var o=t.getColor();this.fillState_={fillStyle:Lf(o||Wp)}}if(!r)this.strokeState_=null;else{var a=r.getColor(),s=r.getLineCap(),d=r.getLineDash(),f=r.getLineDashOffset(),C=r.getLineJoin(),O=r.getWidth(),E=r.getMiterLimit(),P=d||db;this.strokeState_={lineCap:s!==void 0?s:F4,lineDash:this.pixelRatio_===1?P:P.map(function(D){return D*i.pixelRatio_}),lineDashOffset:(f||hb)*this.pixelRatio_,lineJoin:C!==void 0?C:pv,lineWidth:(O!==void 0?O:gb)*this.pixelRatio_,miterLimit:E!==void 0?E:fb,strokeStyle:Lf(a||pb)}}},e.prototype.setImageStyle=function(t){var r;if(!t||!(r=t.getSize())){this.image_=null;return}var i=t.getAnchor(),o=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=r[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=r[0]*this.pixelRatio_},e.prototype.setTextStyle=function(t){if(!t)this.text_="";else{var r=t.getFill();if(!r)this.textFillState_=null;else{var i=r.getColor();this.textFillState_={fillStyle:Lf(i||Wp)}}var o=t.getStroke();if(!o)this.textStrokeState_=null;else{var a=o.getColor(),s=o.getLineCap(),d=o.getLineDash(),f=o.getLineDashOffset(),C=o.getLineJoin(),O=o.getWidth(),E=o.getMiterLimit();this.textStrokeState_={lineCap:s!==void 0?s:F4,lineDash:d||db,lineDashOffset:f||hb,lineJoin:C!==void 0?C:pv,lineWidth:O!==void 0?O:gb,miterLimit:E!==void 0?E:fb,strokeStyle:Lf(a||pb)}}var P=t.getFont(),D=t.getOffsetX(),$=t.getOffsetY(),H=t.getRotateWithView(),Q=t.getRotation(),N=t.getScaleArray(),Z=t.getText(),ae=t.getTextAlign(),pe=t.getTextBaseline();this.textState_={font:P!==void 0?P:pN,textAlign:ae!==void 0?ae:mb,textBaseline:pe!==void 0?pe:U4},this.text_=Z!==void 0?Array.isArray(Z)?Z.reduce(function(fe,X,oe){return fe+=oe%2?" ":X},""):Z:"",this.textOffsetX_=D!==void 0?this.pixelRatio_*D:0,this.textOffsetY_=$!==void 0?this.pixelRatio_*$:0,this.textRotateWithView_=H!==void 0?H:!1,this.textRotation_=Q!==void 0?Q:0,this.textScale_=[this.pixelRatio_*N[0],this.pixelRatio_*N[1]]}},e}(KN);const Tm={FRACTION:"fraction",PIXELS:"pixels"},Bd={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var kAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),TAe=function(n){kAe(e,n);function e(t,r,i,o){var a=n.call(this)||this;return a.extent=t,a.pixelRatio_=i,a.resolution=r,a.state=o,a}return e.prototype.changed=function(){this.dispatchEvent(Wi.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Ci()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){Ci()},e}(kv);const KAe=TAe;var PAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();(function(n){PAe(e,n);function e(t,r,i,o,a,s){var d=n.call(this,t,r,i,ts.IDLE)||this;return d.src_=o,d.image_=new Image,a!==null&&(d.image_.crossOrigin=a),d.unlisten_=null,d.state=ts.IDLE,d.imageLoadFunction_=s,d}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=ts.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=Ec(this.extent)/this.image_.height),this.state=ts.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==ts.IDLE||this.state==ts.ERROR)&&(this.state=ts.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=V8(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Ec(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e})(KAe);function V8(n,e,t){var r=n,i=!0,o=!1,a=!1,s=[E4(r,Wi.LOAD,function(){a=!0,o||e()})];return r.src&&_oe?(o=!0,r.decode().then(function(){i&&e()}).catch(function(d){i&&(a?e():t())})):s.push(E4(r,Wi.ERROR,t)),function(){i=!1,s.forEach(rs)}}var DAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),KC=null,LAe=function(n){DAe(e,n);function e(t,r,i,o,a,s){var d=n.call(this)||this;return d.hitDetectionImage_=null,d.image_=t||new Image,o!==null&&(d.image_.crossOrigin=o),d.canvas_={},d.color_=s,d.unlisten_=null,d.imageState_=a,d.size_=i,d.src_=r,d.tainted_,d}return e.prototype.isTainted_=function(){if(this.tainted_===void 0&&this.imageState_===ts.LOADED){KC||(KC=Oc(1,1)),KC.drawImage(this.image_,0,0);try{KC.getImageData(0,0,1,1),this.tainted_=!1}catch{KC=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(Wi.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=ts.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=ts.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],r=this.size_[1],i=Oc(t,r);i.fillRect(0,0,t,r),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==ts.IDLE){this.imageState_=ts.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=V8(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==ts.LOADED)){var r=document.createElement("canvas");this.canvas_[t]=r,r.width=Math.ceil(this.image_.width*t),r.height=Math.ceil(this.image_.height*t);var i=r.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply",i.globalCompositeOperation==="multiply"||this.isTainted_())i.fillStyle=uN(this.color_),i.fillRect(0,0,r.width/t,r.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var o=i.getImageData(0,0,r.width,r.height),a=o.data,s=this.color_[0]/255,d=this.color_[1]/255,f=this.color_[2]/255,C=this.color_[3],O=0,E=a.length;O<E;O+=4)a[O]*=s,a[O+1]*=d,a[O+2]*=f,a[O+3]*=C;i.putImageData(o,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(kv);function FAe(n,e,t,r,i,o){var a=P4.get(e,r,o);return a||(a=new LAe(n,e,t,r,i,o),P4.set(e,r,o,a)),a}var UAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),RAe=function(n){UAe(e,n);function e(t){var r=this,i=t||{},o=i.opacity!==void 0?i.opacity:1,a=i.rotation!==void 0?i.rotation:0,s=i.scale!==void 0?i.scale:1,d=i.rotateWithView!==void 0?i.rotateWithView:!1;r=n.call(this,{opacity:o,rotation:a,scale:s,displacement:i.displacement!==void 0?i.displacement:[0,0],rotateWithView:d,declutterMode:i.declutterMode})||this,r.anchor_=i.anchor!==void 0?i.anchor:[.5,.5],r.normalizedAnchor_=null,r.anchorOrigin_=i.anchorOrigin!==void 0?i.anchorOrigin:Bd.TOP_LEFT,r.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:Tm.FRACTION,r.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:Tm.FRACTION,r.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null;var f=i.img!==void 0?i.img:null;r.imgSize_=i.imgSize;var C=i.src;co(!(C!==void 0&&f),4),co(!f||f&&r.imgSize_,5),(C===void 0||C.length===0)&&f&&(C=f.src||qi(f)),co(C!==void 0&&C.length>0,6);var O=i.src!==void 0?ts.IDLE:ts.LOADED;return r.color_=i.color!==void 0?K4(i.color):null,r.iconImage_=FAe(f,C,r.imgSize_!==void 0?r.imgSize_:null,r.crossOrigin_,O,r.color_),r.offset_=i.offset!==void 0?i.offset:[0,0],r.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:Bd.TOP_LEFT,r.origin_=null,r.size_=i.size!==void 0?i.size:null,r}return e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var r=this.getSize();if(this.anchorXUnits_==Tm.FRACTION||this.anchorYUnits_==Tm.FRACTION){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_==Tm.FRACTION&&(t[0]*=r[0]),this.anchorYUnits_==Tm.FRACTION&&(t[1]*=r[1])}if(this.anchorOrigin_!=Bd.TOP_LEFT){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==Bd.TOP_RIGHT||this.anchorOrigin_==Bd.BOTTOM_RIGHT)&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_==Bd.BOTTOM_LEFT||this.anchorOrigin_==Bd.BOTTOM_RIGHT)&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Bd.TOP_LEFT){var r=this.getSize(),i=this.iconImage_.getSize();if(!r||!i)return null;t=t.slice(),(this.offsetOrigin_==Bd.TOP_RIGHT||this.offsetOrigin_==Bd.BOTTOM_RIGHT)&&(t[0]=i[0]-r[0]-t[0]),(this.offsetOrigin_==Bd.BOTTOM_LEFT||this.offsetOrigin_==Bd.BOTTOM_RIGHT)&&(t[1]=i[1]-r[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(Wi.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(Wi.CHANGE,t)},e}(IN);const LN=RAe;var zAe="#333",jAe=function(){function n(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=jA(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new vy({color:zAe}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:PN.POINT,this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}return n.prototype.clone=function(){var e=this.getScale();return new n({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},n.prototype.getOverflow=function(){return this.overflow_},n.prototype.getFont=function(){return this.font_},n.prototype.getMaxAngle=function(){return this.maxAngle_},n.prototype.getPlacement=function(){return this.placement_},n.prototype.getOffsetX=function(){return this.offsetX_},n.prototype.getOffsetY=function(){return this.offsetY_},n.prototype.getFill=function(){return this.fill_},n.prototype.getRotateWithView=function(){return this.rotateWithView_},n.prototype.getRotation=function(){return this.rotation_},n.prototype.getScale=function(){return this.scale_},n.prototype.getScaleArray=function(){return this.scaleArray_},n.prototype.getStroke=function(){return this.stroke_},n.prototype.getText=function(){return this.text_},n.prototype.getTextAlign=function(){return this.textAlign_},n.prototype.getJustify=function(){return this.justify_},n.prototype.getTextBaseline=function(){return this.textBaseline_},n.prototype.getBackgroundFill=function(){return this.backgroundFill_},n.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},n.prototype.getPadding=function(){return this.padding_},n.prototype.setOverflow=function(e){this.overflow_=e},n.prototype.setFont=function(e){this.font_=e},n.prototype.setMaxAngle=function(e){this.maxAngle_=e},n.prototype.setOffsetX=function(e){this.offsetX_=e},n.prototype.setOffsetY=function(e){this.offsetY_=e},n.prototype.setPlacement=function(e){this.placement_=e},n.prototype.setRotateWithView=function(e){this.rotateWithView_=e},n.prototype.setFill=function(e){this.fill_=e},n.prototype.setRotation=function(e){this.rotation_=e},n.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=jA(e!==void 0?e:1)},n.prototype.setStroke=function(e){this.stroke_=e},n.prototype.setText=function(e){this.text_=e},n.prototype.setTextAlign=function(e){this.textAlign_=e},n.prototype.setJustify=function(e){this.justify_=e},n.prototype.setTextBaseline=function(e){this.textBaseline_=e},n.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},n.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},n.prototype.setPadding=function(e){this.padding_=e},n}(),Zc=.5;function FN(n,e,t,r,i,o,a){var s=n[0]*Zc,d=n[1]*Zc,f=Oc(s,d);f.imageSmoothingEnabled=!1;for(var C=f.canvas,O=new IAe(f,Zc,i,null,a),E=t.length,P=Math.floor((256*256*256-1)/E),D={},$=1;$<=E;++$){var H=t[$-1],Q=H.getStyleFunction()||r;if(r){var N=Q(H,o);if(N){Array.isArray(N)||(N=[N]);for(var Z=$*P,ae="#"+("000000"+Z.toString(16)).slice(-6),pe=0,fe=N.length;pe<fe;++pe){var X=N[pe],oe=X.getGeometryFunction()(H);if(!(!oe||!bl(i,oe.getExtent()))){var Ce=X.clone(),we=Ce.getFill();we&&we.setColor(ae);var Te=Ce.getStroke();Te&&(Te.setColor(ae),Te.setLineDash(null)),Ce.setText(void 0);var Pe=X.getImage();if(Pe&&Pe.getOpacity()!==0){var he=Pe.getImageSize();if(!he)continue;var $e=Oc(he[0],he[1],void 0,{alpha:!1}),ye=$e.canvas;$e.fillStyle=ae,$e.fillRect(0,0,ye.width,ye.height),Ce.setImage(new LN({img:ye,imgSize:he,anchor:Pe.getAnchor(),anchorXUnits:Tm.PIXELS,anchorYUnits:Tm.PIXELS,offset:Pe.getOrigin(),opacity:1,size:Pe.getSize(),scale:Pe.getScale(),rotation:Pe.getRotation(),rotateWithView:Pe.getRotateWithView()}))}var gt=Ce.getZIndex()||0,yt=D[gt];yt||(yt={},D[gt]=yt,yt.Polygon=[],yt.Circle=[],yt.LineString=[],yt.Point=[]),yt[oe.getType().replace("Multi","")].push(oe,Ce)}}}}}for(var st=Object.keys(D).map(Number).sort(D1),$=0,ft=st.length;$<ft;++$){var yt=D[st[$]];for(var Re in yt)for(var Ve=yt[Re],pe=0,fe=Ve.length;pe<fe;pe+=2){O.setStyle(Ve[pe+1]);for(var Xe=0,Jt=e.length;Xe<Jt;++Xe)O.setTransform(e[Xe]),O.drawGeometry(Ve[pe])}}return f.getImageData(0,0,C.width,C.height)}function UN(n,e,t){var r=[];if(t){var i=Math.floor(Math.round(n[0])*Zc),o=Math.floor(Math.round(n[1])*Zc),a=(Ll(i,0,t.width-1)+Ll(o,0,t.height-1)*t.width)*4,s=t.data[a],d=t.data[a+1],f=t.data[a+2],C=f+256*(d+256*s),O=Math.floor((256*256*256-1)/e.length);C&&C%O===0&&r.push(e[C/O-1])}return r}var NAe=.5,RN={Point:HAe,LineString:YAe,Polygon:XAe,MultiPoint:ZAe,MultiLineString:qAe,MultiPolygon:VAe,GeometryCollection:QAe,Circle:GAe};function WAe(n,e){return parseInt(qi(n),10)-parseInt(qi(e),10)}function zN(n,e){var t=jO(n,e);return t*t}function jO(n,e){return NAe*n/e}function GAe(n,e,t,r,i){var o=t.getFill(),a=t.getStroke();if(o||a){var s=n.getBuilder(t.getZIndex(),"Circle");s.setFillStrokeStyle(o,a),s.drawCircle(e,r)}var d=t.getText();if(d&&d.getText()){var f=(i||n).getBuilder(t.getZIndex(),"Text");f.setTextStyle(d),f.drawText(e,r)}}function W4(n,e,t,r,i,o,a){var s=!1,d=t.getImage();if(d){var f=d.getImageState();f==ts.LOADED||f==ts.ERROR?d.unlistenImageChange(i):(f==ts.IDLE&&d.load(),d.listenImageChange(i),s=!0)}return $Ae(n,e,t,r,o,a),s}function $Ae(n,e,t,r,i,o){var a=t.getGeometryFunction()(e);if(a){var s=a.simplifyTransformed(r,i),d=t.getRenderer();if(d)jN(n,s,t,e);else{var f=RN[s.getType()];f(n,s,t,e,o)}}}function jN(n,e,t,r){if(e.getType()=="GeometryCollection"){for(var i=e.getGeometries(),o=0,a=i.length;o<a;++o)jN(n,i[o],t,r);return}var s=n.getBuilder(t.getZIndex(),"Default");s.drawCustom(e,r,t.getRenderer(),t.getHitDetectionRenderer())}function QAe(n,e,t,r,i){var o=e.getGeometriesArray(),a,s;for(a=0,s=o.length;a<s;++a){var d=RN[o[a].getType()];d(n,o[a],t,r,i)}}function YAe(n,e,t,r,i){var o=t.getStroke();if(o){var a=n.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawLineString(e,r)}var s=t.getText();if(s&&s.getText()){var d=(i||n).getBuilder(t.getZIndex(),"Text");d.setTextStyle(s),d.drawText(e,r)}}function qAe(n,e,t,r,i){var o=t.getStroke();if(o){var a=n.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawMultiLineString(e,r)}var s=t.getText();if(s&&s.getText()){var d=(i||n).getBuilder(t.getZIndex(),"Text");d.setTextStyle(s),d.drawText(e,r)}}function VAe(n,e,t,r,i){var o=t.getFill(),a=t.getStroke();if(a||o){var s=n.getBuilder(t.getZIndex(),"Polygon");s.setFillStrokeStyle(o,a),s.drawMultiPolygon(e,r)}var d=t.getText();if(d&&d.getText()){var f=(i||n).getBuilder(t.getZIndex(),"Text");f.setTextStyle(d),f.drawText(e,r)}}function HAe(n,e,t,r,i){var o=t.getImage(),a=t.getText(),s;if(o){if(o.getImageState()!=ts.LOADED)return;var d=n;if(i){var f=o.getDeclutterMode();if(f!=="none")if(d=i,f==="obstacle"){var C=n.getBuilder(t.getZIndex(),"Image");C.setImageStyle(o,s),C.drawPoint(e,r)}else a&&a.getText()&&(s={})}var O=d.getBuilder(t.getZIndex(),"Image");O.setImageStyle(o,s),O.drawPoint(e,r)}if(a&&a.getText()){var E=n;i&&(E=i);var P=E.getBuilder(t.getZIndex(),"Text");P.setTextStyle(a,s),P.drawText(e,r)}}function ZAe(n,e,t,r,i){var o=t.getImage(),a=t.getText(),s;if(o){if(o.getImageState()!=ts.LOADED)return;var d=n;if(i){var f=o.getDeclutterMode();if(f!=="none")if(d=i,f==="obstacle"){var C=n.getBuilder(t.getZIndex(),"Image");C.setImageStyle(o,s),C.drawMultiPoint(e,r)}else a&&a.getText()&&(s={})}var O=d.getBuilder(t.getZIndex(),"Image");O.setImageStyle(o,s),O.drawMultiPoint(e,r)}if(a&&a.getText()){var E=n;i&&(E=i);var P=E.getBuilder(t.getZIndex(),"Text");P.setTextStyle(a,s),P.drawText(e,r)}}function XAe(n,e,t,r,i){var o=t.getFill(),a=t.getStroke();if(o||a){var s=n.getBuilder(t.getZIndex(),"Polygon");s.setFillStrokeStyle(o,a),s.drawPolygon(e,r)}var d=t.getText();if(d&&d.getText()){var f=(i||n).getBuilder(t.getZIndex(),"Text");f.setTextStyle(d),f.drawText(e,r)}}var JAe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ece=function(n){JAe(e,n);function e(t){var r=n.call(this,t)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.animatingOrInteracting_,r.hitDetectionImageData_=null,r.renderedFeatures_=null,r.renderedRevision_=-1,r.renderedResolution_=NaN,r.renderedExtent_=$d(),r.wrappedRenderedExtent_=$d(),r.renderedRotation_,r.renderedCenter_=null,r.renderedProjection_=null,r.renderedRenderOrder_=null,r.replayGroup_=null,r.replayGroupChanged=!0,r.declutterExecutorGroup=null,r.clipping=!0,r.compositionContext_=null,r.opacity_=1,r}return e.prototype.renderWorlds=function(t,r,i){var o=r.extent,a=r.viewState,s=a.center,d=a.resolution,f=a.projection,C=a.rotation,O=f.getExtent(),E=this.getLayer().getSource(),P=r.pixelRatio,D=r.viewHints,$=!(D[sl.ANIMATING]||D[sl.INTERACTING]),H=this.compositionContext_,Q=Math.round(r.size[0]*P),N=Math.round(r.size[1]*P),Z=E.getWrapX()&&f.canWrapX(),ae=Z?Cs(O):null,pe=Z?Math.ceil((o[2]-O[2])/ae)+1:1,fe=Z?Math.floor((o[0]-O[0])/ae):0;do{var X=this.getRenderTransform(s,d,C,P,Q,N,fe*ae);t.execute(H,1,X,C,$,void 0,i)}while(++fe<pe)},e.prototype.setupCompositionContext_=function(){if(this.opacity_!==1){var t=Oc(this.context.canvas.width,this.context.canvas.height,zK);this.compositionContext_=t}else this.compositionContext_=this.context},e.prototype.releaseCompositionContext_=function(){if(this.opacity_!==1){var t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,j8(this.compositionContext_),zK.push(this.compositionContext_.canvas),this.compositionContext_=null}},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())},e.prototype.renderFrame=function(t,r){var i=t.pixelRatio,o=t.layerStatesArray[t.layerIndex];xoe(this.pixelTransform,1/i,1/i),v8(this.inversePixelTransform,this.pixelTransform);var a=Dj(this.pixelTransform);this.useContainer(r,a,this.getBackground(t));var s=this.context,d=s.canvas,f=this.replayGroup_,C=this.declutterExecutorGroup;if((!f||f.isEmpty())&&(!C||C.isEmpty()))return null;var O=Math.round(t.size[0]*i),E=Math.round(t.size[1]*i);d.width!=O||d.height!=E?(d.width=O,d.height=E,d.style.transform!==a&&(d.style.transform=a)):this.containerReused||s.clearRect(0,0,O,E),this.preRender(s,t);var P=t.viewState;P.projection,this.opacity_=o.opacity,this.setupCompositionContext_();var D=!1,$=!0;if(o.extent&&this.clipping){var H=c1(o.extent);$=bl(H,t.extent),D=$&&!zm(H,t.extent),D&&this.clipUnrotated(this.compositionContext_,t,H)}return $&&this.renderWorlds(f,t),D&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==P.rotation&&(this.renderedRotation_=P.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise((function(r){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];Cl(this.pixelTransform,i);var o=this.renderedCenter_,a=this.renderedResolution_,s=this.renderedRotation_,d=this.renderedProjection_,f=this.wrappedRenderedExtent_,C=this.getLayer(),O=[],E=i[0]*Zc,P=i[1]*Zc;O.push(this.getRenderTransform(o,a,s,Zc,E,P,0).slice());var D=C.getSource(),$=d.getExtent();if(D.getWrapX()&&d.canWrapX()&&!zm($,f)){for(var H=f[0],Q=Cs($),N=0,Z=void 0;H<$[0];)--N,Z=Q*N,O.push(this.getRenderTransform(o,a,s,Zc,E,P,Z).slice()),H+=Q;for(N=0,H=f[2];H>$[2];)++N,Z=Q*N,O.push(this.getRenderTransform(o,a,s,Zc,E,P,Z).slice()),H-=Q}this.hitDetectionImageData_=FN(i,O,this.renderedFeatures_,C.getStyleFunction(),f,a,s)}r(UN(t,this.renderedFeatures_,this.hitDetectionImageData_))}).bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,r,i,o,a){var s=this;if(this.replayGroup_){var d=r.viewState.resolution,f=r.viewState.rotation,C=this.getLayer(),O={},E=function($,H,Q){var N=qi($),Z=O[N];if(Z){if(Z!==!0&&Q<Z.distanceSq){if(Q===0)return O[N]=!0,a.splice(a.lastIndexOf(Z),1),o($,C,H);Z.geometry=H,Z.distanceSq=Q}}else{if(Q===0)return O[N]=!0,o($,C,H);a.push(O[N]={feature:$,layer:C,geometry:H,distanceSq:Q,callback:o})}},P,D=[this.replayGroup_];return this.declutterExecutorGroup&&D.push(this.declutterExecutorGroup),D.some(function($){return P=$.forEachFeatureAtCoordinate(t,d,f,i,E,$===s.declutterExecutorGroup&&r.declutterTree?r.declutterTree.all().map(function(H){return H.value}):null)}),P}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var r=this.getLayer(),i=r.getSource();if(!i)return!1;var o=t.viewHints[sl.ANIMATING],a=t.viewHints[sl.INTERACTING],s=r.getUpdateWhileAnimating(),d=r.getUpdateWhileInteracting();if(this.ready&&!s&&o||!d&&a)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var f=t.extent,C=t.viewState,O=C.projection,E=C.resolution,P=t.pixelRatio,D=r.getRevision(),$=r.getRenderBuffer(),H=r.getRenderOrder();H===void 0&&(H=WAe);var Q=C.center.slice(),N=r0(f,$*E),Z=N.slice(),ae=[N.slice()],pe=O.getExtent();if(i.getWrapX()&&O.canWrapX()&&!zm(pe,t.extent)){var fe=Cs(pe),X=Math.max(Cs(N)/2,fe);N[0]=pe[0]-X,N[2]=pe[2]+X,M8(Q,O);var oe=jj(ae[0],O);oe[0]<pe[0]&&oe[2]<pe[2]?ae.push([oe[0]+fe,oe[1],oe[2]+fe,oe[3]]):oe[0]>pe[0]&&oe[2]>pe[2]&&ae.push([oe[0]-fe,oe[1],oe[2]-fe,oe[3]])}if(this.ready&&this.renderedResolution_==E&&this.renderedRevision_==D&&this.renderedRenderOrder_==H&&zm(this.wrappedRenderedExtent_,N))return Q1(this.renderedExtent_,Z)||(this.hitDetectionImageData_=null,this.renderedExtent_=Z),this.renderedCenter_=Q,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var Ce=new j4(jO(E,P),N,E,P),we;this.getLayer().getDeclutter()&&(we=new j4(jO(E,P),N,E,P));for(var Te,Pe,he,Pe=0,he=ae.length;Pe<he;++Pe)i.loadFeatures(ae[Pe],E,O);var $e=zN(E,P),ye=!0,gt=(function(Ve){var Xe,Jt=Ve.getStyleFunction()||r.getStyleFunction();if(Jt&&(Xe=Jt(Ve,E)),Xe){var Ht=this.renderFeature(Ve,$e,Xe,Ce,Te,we);ye=ye&&!Ht}}).bind(this),yt=$j(N),st=i.getFeaturesInExtent(yt);H&&st.sort(H);for(var Pe=0,he=st.length;Pe<he;++Pe)gt(st[Pe]);this.renderedFeatures_=st,this.ready=ye;var ft=Ce.finish(),Re=new N4(N,E,P,i.getOverlaps(),ft,r.getRenderBuffer());return we&&(this.declutterExecutorGroup=new N4(N,E,P,i.getOverlaps(),we.finish(),r.getRenderBuffer())),this.renderedResolution_=E,this.renderedRevision_=D,this.renderedRenderOrder_=H,this.renderedExtent_=Z,this.wrappedRenderedExtent_=N,this.renderedCenter_=Q,this.renderedProjection_=O,this.replayGroup_=Re,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,r,i,o,a,s){if(!i)return!1;var d=!1;if(Array.isArray(i))for(var f=0,C=i.length;f<C;++f)d=W4(o,t,i[f],r,this.boundHandleStyleImageChange_,a,s)||d;else d=W4(o,t,i,r,this.boundHandleStyleImageChange_,a,s);return d},e}(DN);const tce=ece;var nce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),rce=function(n){nce(e,n);function e(t){return n.call(this,t)||this}return e.prototype.createRenderer=function(){return new tce(this)},e}(TN);const NN=rce;var WK=function(){function n(e){this.rbush_=new BN(e),this.items_={}}return n.prototype.insert=function(e,t){var r={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(r),this.items_[qi(t)]=r},n.prototype.load=function(e,t){for(var r=new Array(t.length),i=0,o=t.length;i<o;i++){var a=e[i],s=t[i],d={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:s};r[i]=d,this.items_[qi(s)]=d}this.rbush_.load(r)},n.prototype.remove=function(e){var t=qi(e),r=this.items_[t];return delete this.items_[t],this.rbush_.remove(r)!==null},n.prototype.update=function(e,t){var r=this.items_[qi(t)],i=[r.minX,r.minY,r.maxX,r.maxY];fv(i,e)||(this.remove(t),this.insert(e,t))},n.prototype.getAll=function(){var e=this.rbush_.all();return e.map(function(t){return t.value})},n.prototype.getInExtent=function(e){var t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]},r=this.rbush_.search(t);return r.map(function(i){return i.value})},n.prototype.forEach=function(e){return this.forEach_(this.getAll(),e)},n.prototype.forEachInExtent=function(e,t){return this.forEach_(this.getInExtent(e),t)},n.prototype.forEach_=function(e,t){for(var r,i=0,o=e.length;i<o;i++)if(r=t(e[i]),r)return r;return r},n.prototype.isEmpty=function(){return F1(this.items_)},n.prototype.clear=function(){this.rbush_.clear(),this.items_={}},n.prototype.getExtent=function(e){var t=this.rbush_.toJSON();return $f(t.minX,t.minY,t.maxX,t.maxY,e)},n.prototype.concat=function(e){this.rbush_.load(e.rbush_.all());for(var t in e.items_)this.items_[t]=e.items_[t]},n}(),ice=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),oce=function(n){ice(e,n);function e(t){var r=n.call(this)||this;r.projection=Vs(t.projection),r.attributions_=GK(t.attributions),r.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,r.loading=!1,r.state_=t.state!==void 0?t.state:"ready",r.wrapX_=t.wrapX!==void 0?t.wrapX:!1,r.interpolate_=!!t.interpolate,r.viewResolver=null,r.viewRejector=null;var i=r;return r.viewPromise_=new Promise(function(o,a){i.viewResolver=o,i.viewRejector=a}),r}return e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Ci()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=GK(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Fh);function GK(n){return n?Array.isArray(n)?function(e){return n}:typeof n=="function"?n:function(e){return[n]}:null}const WN=oce,xh={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function ace(n,e){return[[-1/0,-1/0,1/0,1/0]]}var sce=!1;function GN(n,e,t,r,i,o,a){var s=new XMLHttpRequest;s.open("GET",typeof n=="function"?n(t,r,i):n,!0),e.getType()=="arraybuffer"&&(s.responseType="arraybuffer"),s.withCredentials=sce,s.onload=function(d){if(!s.status||s.status>=200&&s.status<300){var f=e.getType(),C=void 0;f=="json"||f=="text"?C=s.responseText:f=="xml"?(C=s.responseXML,C||(C=new DOMParser().parseFromString(s.responseText,"application/xml"))):f=="arraybuffer"&&(C=s.response),C?o(e.readFeatures(C,{extent:t,featureProjection:i}),e.readProjection(C)):a()}else a()},s.onerror=a,s.send()}function $K(n,e){return function(t,r,i,o,a){var s=this;GN(n,e,t,r,i,function(d,f){s.addFeatures(d),o!==void 0&&o(d)},a||L1)}}var $N=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),xm=function(n){$N(e,n);function e(t,r,i){var o=n.call(this,t)||this;return o.feature=r,o.features=i,o}return e}(Xp),lce=function(n){$N(e,n);function e(t){var r=this,i=t||{};r=n.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,r.on,r.once,r.un,r.loader_=L1,r.format_=i.format,r.overlaps_=i.overlaps===void 0?!0:i.overlaps,r.url_=i.url,i.loader!==void 0?r.loader_=i.loader:r.url_!==void 0&&(co(r.format_,7),r.loader_=$K(r.url_,r.format_)),r.strategy_=i.strategy!==void 0?i.strategy:ace;var o=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;r.featuresRtree_=o?new WK:null,r.loadedExtentsRtree_=new WK,r.loadingExtentsCount_=0,r.nullGeometryFeatures_={},r.idIndex_={},r.uidIndex_={},r.featureChangeKeys_={},r.featuresCollection_=null;var a,s;return Array.isArray(i.features)?s=i.features:i.features&&(a=i.features,s=a.getArray()),!o&&a===void 0&&(a=new Rd(s)),s!==void 0&&r.addFeaturesInternal(s),a!==void 0&&r.bindFeaturesCollection_(a),r}return e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var r=qi(t);if(!this.addToIndex_(r,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(r,t);var i=t.getGeometry();if(i){var o=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[r]=t;this.dispatchEvent(new xm(xh.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,r){this.featureChangeKeys_[t]=[Oo(r,Wi.CHANGE,this.handleFeatureChange_,this),Oo(r,hv.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,r){var i=!0,o=r.getId();return o!==void 0&&(o.toString()in this.idIndex_?i=!1:this.idIndex_[o.toString()]=r),i&&(co(!(t in this.uidIndex_),30),this.uidIndex_[t]=r),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var r=[],i=[],o=[],a=0,s=t.length;a<s;a++){var d=t[a],f=qi(d);this.addToIndex_(f,d)&&i.push(d)}for(var a=0,C=i.length;a<C;a++){var d=i[a],f=qi(d);this.setupChangeEvents_(f,d);var O=d.getGeometry();if(O){var E=O.getExtent();r.push(E),o.push(d)}else this.nullGeometryFeatures_[f]=d}if(this.featuresRtree_&&this.featuresRtree_.load(r,o),this.hasListener(xh.ADDFEATURE))for(var a=0,P=i.length;a<P;a++)this.dispatchEvent(new xm(xh.ADDFEATURE,i[a]))},e.prototype.bindFeaturesCollection_=function(t){var r=!1;this.addEventListener(xh.ADDFEATURE,function(i){r||(r=!0,t.push(i.feature),r=!1)}),this.addEventListener(xh.REMOVEFEATURE,function(i){r||(r=!0,t.remove(i.feature),r=!1)}),t.addEventListener(bc.ADD,(function(i){r||(r=!0,this.addFeature(i.element),r=!1)}).bind(this)),t.addEventListener(bc.REMOVE,(function(i){r||(r=!0,this.removeFeature(i.element),r=!1)}).bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var r in this.featureChangeKeys_){var i=this.featureChangeKeys_[r];i.forEach(rs)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var o=(function(d){this.removeFeatureInternal(d)}).bind(this);this.featuresRtree_.forEach(o);for(var a in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[a])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var s=new xm(xh.CLEAR);this.dispatchEvent(s),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,r){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(o){var a=o.getGeometry();if(a.intersectsCoordinate(t))return r(o)})},e.prototype.forEachFeatureInExtent=function(t,r){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,r);this.featuresCollection_&&this.featuresCollection_.forEach(r)},e.prototype.forEachFeatureIntersectingExtent=function(t,r){return this.forEachFeatureInExtent(t,function(i){var o=i.getGeometry();if(o.intersectsExtent(t)){var a=r(i);if(a)return a}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),F1(this.nullGeometryFeatures_)||jf(t,Oj(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var r=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){r.push(i)}),r},e.prototype.getFeaturesInExtent=function(t,r){var i=this;if(this.featuresRtree_){var o=r&&r.canWrapX()&&this.getWrapX();if(!o)return this.featuresRtree_.getInExtent(t);var a=Toe(t,r);return[].concat.apply([],a.map(function(s){return i.featuresRtree_.getInExtent(s)}))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,r){var i=t[0],o=t[1],a=null,s=[NaN,NaN],d=1/0,f=[-1/0,-1/0,1/0,1/0],C=r||Ry;return this.featuresRtree_.forEachInExtent(f,function(O){if(C(O)){var E=O.getGeometry(),P=d;if(d=E.closestPointXY(i,o,s,d),d<P){a=O;var D=Math.sqrt(d);f[0]=i-D,f[1]=o-D,f[2]=i+D,f[3]=o+D}}}),a},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var r=this.idIndex_[t.toString()];return r!==void 0?r:null},e.prototype.getFeatureByUid=function(t){var r=this.uidIndex_[t];return r!==void 0?r:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var r=t.target,i=qi(r),o=r.getGeometry();if(!o)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(r),this.nullGeometryFeatures_[i]=r);else{var a=o.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(a,r)):this.featuresRtree_&&this.featuresRtree_.update(a,r)}var s=r.getId();if(s!==void 0){var d=s.toString();this.idIndex_[d]!==r&&(this.removeFromIdIndex_(r),this.idIndex_[d]=r)}else this.removeFromIdIndex_(r),this.uidIndex_[i]=r;this.changed(),this.dispatchEvent(new xm(xh.CHANGEFEATURE,r))},e.prototype.hasFeature=function(t){var r=t.getId();return r!==void 0?r in this.idIndex_:qi(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&F1(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0},e.prototype.loadFeatures=function(t,r,i){for(var o=this.loadedExtentsRtree_,a=this.strategy_(t,r,i),s=function(O,E){var P=a[O],D=o.forEachInExtent(P,function($){return zm($.extent,P)});D||(++d.loadingExtentsCount_,d.dispatchEvent(new xm(xh.FEATURESLOADSTART)),d.loader_.call(d,P,r,i,(function($){--this.loadingExtentsCount_,this.dispatchEvent(new xm(xh.FEATURESLOADEND,void 0,$))}).bind(d),(function(){--this.loadingExtentsCount_,this.dispatchEvent(new xm(xh.FEATURESLOADERROR))}).bind(d)),o.insert(P,{extent:P.slice()}))},d=this,f=0,C=a.length;f<C;++f)s(f);this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),n.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var r=this.loadedExtentsRtree_,i;r.forEachInExtent(t,function(o){if(fv(o.extent,t))return i=o,!0}),i&&r.remove(i)},e.prototype.removeFeature=function(t){if(t){var r=qi(t);r in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[r]:this.featuresRtree_&&this.featuresRtree_.remove(t);var i=this.removeFeatureInternal(t);i&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var r=qi(t),i=this.featureChangeKeys_[r];if(i){i.forEach(rs),delete this.featureChangeKeys_[r];var o=t.getId();return o!==void 0&&delete this.idIndex_[o.toString()],delete this.uidIndex_[r],this.dispatchEvent(new xm(xh.REMOVEFEATURE,t)),t}},e.prototype.removeFromIdIndex_=function(t){var r=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],r=!0;break}return r},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){co(this.format_,7),this.url_=t,this.setLoader($K(t,this.format_))},e}(WN);const QN=lce;function uce(n){var e=n||{},t=new Rd,r=new Iue(-.005,.05,100),i=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;i&&t.push(new mue);var o=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;o&&t.push(new iue({delta:e.zoomDelta,duration:e.zoomDuration}));var a=e.dragPan!==void 0?e.dragPan:!0;a&&t.push(new fue({onFocusOnly:e.onFocusOnly,kinetic:r}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new Due);var d=e.pinchZoom!==void 0?e.pinchZoom:!0;d&&t.push(new Uue({duration:e.zoomDuration}));var f=e.keyboard!==void 0?e.keyboard:!0;f&&(t.push(new Sue),t.push(new Bue({delta:e.zoomDelta,duration:e.zoomDuration})));var C=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;C&&t.push(new Kue({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var O=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return O&&t.push(new wue({duration:e.zoomDuration})),t}var Ace=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),H8=function(n){Ace(e,n);function e(t){return t=xl({},t),t.controls||(t.controls=Xle()),t.interactions||(t.interactions=uce({onFocusOnly:!0})),n.call(this,t)||this}return e.prototype.createRenderer=function(){return new ule(this)},e}(Ule),YN=function(){function n(e,t,r,i){this.minX=e,this.maxX=t,this.minY=r,this.maxY=i}return n.prototype.contains=function(e){return this.containsXY(e[1],e[2])},n.prototype.containsTileRange=function(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY},n.prototype.containsXY=function(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY},n.prototype.equals=function(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY},n.prototype.extend=function(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)},n.prototype.getHeight=function(){return this.maxY-this.minY+1},n.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},n.prototype.getWidth=function(){return this.maxX-this.minX+1},n.prototype.intersects=function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY},n}();function Rg(n,e,t,r,i){return i!==void 0?(i.minX=n,i.maxX=e,i.minY=t,i.maxY=r,i):new YN(n,e,t,r)}const qN=YN;function QK(n,e,t,r){return r!==void 0?(r[0]=n,r[1]=e,r[2]=t,r):[n,e,t]}function Kv(n,e,t){return n+"/"+e+"/"+t}function VN(n){return Kv(n[0],n[1],n[2])}function cce(n){var e=n.substring(n.lastIndexOf("/")+1,n.length).split(",").map(Number),t=e[0],r=e[1],i=e[2];return Kv(t,r,i)}function HN(n){return n.split("/").map(Number)}function dce(n){return(n[1]<<n[0])+n[2]}function hce(n,e){var t=n[0],r=n[1],i=n[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;var o=e.getFullTileRange(t);return o?o.containsXY(r,i):!0}var fce=[0,0,0],wm=5,pce=function(){function n(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,co(ooe(this.resolutions_,function(a,s){return s-a},!0),17);var t;if(!e.origins){for(var r=0,i=this.resolutions_.length-1;r<i;++r)if(!t)t=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,co(this.origins_.length==this.resolutions_.length,20));var o=e.extent;o!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=m0(o)),co(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,co(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:N8,co(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=o!==void 0?o:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map(function(a,s){var d=new qN(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1));if(o){var f=this.getTileRangeForExtentAndZ(o,s);d.minX=Math.max(f.minX,d.minX),d.maxX=Math.min(f.maxX,d.maxX),d.minY=Math.max(f.minY,d.minY),d.maxY=Math.min(f.maxY,d.maxY)}return d},this):o&&this.calculateTileRanges_(o)}return n.prototype.forEachTileCoord=function(e,t,r){for(var i=this.getTileRangeForExtentAndZ(e,t),o=i.minX,a=i.maxX;o<=a;++o)for(var s=i.minY,d=i.maxY;s<=d;++s)r([t,o,s])},n.prototype.forEachTileCoordParentTileRange=function(e,t,r,i){var o,a,s,d=null,f=e[0]-1;for(this.zoomFactor_===2?(a=e[1],s=e[2]):d=this.getTileCoordExtent(e,i);f>=this.minZoom;){if(this.zoomFactor_===2?(a=Math.floor(a/2),s=Math.floor(s/2),o=Rg(a,a,s,s,r)):o=this.getTileRangeForExtentAndZ(d,f,r),t(f,o))return!0;--f}return!1},n.prototype.getExtent=function(){return this.extent_},n.prototype.getMaxZoom=function(){return this.maxZoom},n.prototype.getMinZoom=function(){return this.minZoom},n.prototype.getOrigin=function(e){return this.origin_?this.origin_:this.origins_[e]},n.prototype.getResolution=function(e){return this.resolutions_[e]},n.prototype.getResolutions=function(){return this.resolutions_},n.prototype.getTileCoordChildTileRange=function(e,t,r){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){var i=e[1]*2,o=e[2]*2;return Rg(i,i+1,o,o+1,t)}var a=this.getTileCoordExtent(e,r||this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e[0]+1,t)}return null},n.prototype.getTileRangeForTileCoordAndZ=function(e,t,r){if(t>this.maxZoom||t<this.minZoom)return null;var i=e[0],o=e[1],a=e[2];if(t===i)return Rg(o,a,o,a,r);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,t-i),d=Math.floor(o*s),f=Math.floor(a*s);if(t<i)return Rg(d,d,f,f,r);var C=Math.floor(s*(o+1))-1,O=Math.floor(s*(a+1))-1;return Rg(d,C,f,O,r)}var E=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(E,t,r)},n.prototype.getTileRangeExtent=function(e,t,r){var i=this.getOrigin(e),o=this.getResolution(e),a=jA(this.getTileSize(e),this.tmpSize_),s=i[0]+t.minX*a[0]*o,d=i[0]+(t.maxX+1)*a[0]*o,f=i[1]+t.minY*a[1]*o,C=i[1]+(t.maxY+1)*a[1]*o;return $f(s,f,d,C,r)},n.prototype.getTileRangeForExtentAndZ=function(e,t,r){var i=fce;this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,i);var o=i[1],a=i[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,i),Rg(o,i[1],a,i[2],r)},n.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),r=this.getResolution(e[0]),i=jA(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*i[0]*r,t[1]-(e[2]+.5)*i[1]*r]},n.prototype.getTileCoordExtent=function(e,t){var r=this.getOrigin(e[0]),i=this.getResolution(e[0]),o=jA(this.getTileSize(e[0]),this.tmpSize_),a=r[0]+e[1]*o[0]*i,s=r[1]-(e[2]+1)*o[1]*i,d=a+o[0]*i,f=s+o[1]*i;return $f(a,s,d,f,t)},n.prototype.getTileCoordForCoordAndResolution=function(e,t,r){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,r)},n.prototype.getTileCoordForXYAndResolution_=function(e,t,r,i,o){var a=this.getZForResolution(r),s=r/this.getResolution(a),d=this.getOrigin(a),f=jA(this.getTileSize(a),this.tmpSize_),C=s*(e-d[0])/r/f[0],O=s*(d[1]-t)/r/f[1];return i?(C=S2(C,wm)-1,O=S2(O,wm)-1):(C=M2(C,wm),O=M2(O,wm)),QK(a,C,O,o)},n.prototype.getTileCoordForXYAndZ_=function(e,t,r,i,o){var a=this.getOrigin(r),s=this.getResolution(r),d=jA(this.getTileSize(r),this.tmpSize_),f=(e-a[0])/s/d[0],C=(a[1]-t)/s/d[1];return i?(f=S2(f,wm)-1,C=S2(C,wm)-1):(f=M2(f,wm),C=M2(C,wm)),QK(r,f,C,o)},n.prototype.getTileCoordForCoordAndZ=function(e,t,r){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,r)},n.prototype.getTileCoordResolution=function(e){return this.resolutions_[e[0]]},n.prototype.getTileSize=function(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]},n.prototype.getFullTileRange=function(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null},n.prototype.getZForResolution=function(e,t){var r=g8(this.resolutions_,e,t||0);return Ll(r,this.minZoom,this.maxZoom)},n.prototype.tileCoordIntersectsViewport=function(e,t){return Zj(t,0,t.length,2,this.getTileCoordExtent(e))},n.prototype.calculateTileRanges_=function(e){for(var t=this.resolutions_.length,r=new Array(t),i=this.minZoom;i<t;++i)r[i]=this.getTileRangeForExtentAndZ(e,i);this.fullTileRanges_=r},n}();const Yb=pce;var mce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),gce=function(n){mce(e,n);function e(t,r,i){var o=n.call(this)||this,a=i||{};return o.tileCoord=t,o.state=r,o.interimTile=null,o.key="",o.transition_=a.transition===void 0?250:a.transition,o.transitionStarts_={},o.interpolate=!!a.interpolate,o}return e.prototype.changed=function(){this.dispatchEvent(Wi.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==gr.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,r=this;do{if(t.getState()==gr.LOADED){t.interimTile=null;break}else t.getState()==gr.LOADING?r=t:t.getState()==gr.IDLE?r.interimTile=t.interimTile:r=t;t=r.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==gr.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Ci()},e.prototype.getAlpha=function(t,r){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(!i)i=r,this.transitionStarts_[t]=i;else if(i===-1)return 1;var o=r-i+1e3/60;return o>=this.transition_?1:CN(o/this.transition_)},e.prototype.inTransition=function(t){return this.transition_?this.transitionStarts_[t]!==-1:!1},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(kv);const Ew=gce;var yce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),vce=function(n){yce(e,n);function e(t,r,i,o,a,s){var d=n.call(this,t,r,s)||this;return d.crossOrigin_=o,d.src_=i,d.key=i,d.image_=new Image,o!==null&&(d.image_.crossOrigin=o),d.unlisten_=null,d.tileLoadFunction_=a,d}return e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=gr.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=gr.ERROR,this.unlistenImage_(),this.image_=Cce(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=gr.LOADED:this.state=gr.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==gr.ERROR&&(this.state=gr.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==gr.IDLE&&(this.state=gr.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=V8(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Ew);function Cce(){var n=Oc(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const ZN=vce;var _ce=.5,bce=10,YK=.25,xce=function(){function n(e,t,r,i,o,a){this.sourceProj_=e,this.targetProj_=t;var s={},d=I4(this.targetProj_,this.sourceProj_);this.transformInv_=function(Z){var ae=Z[0]+"/"+Z[1];return s[ae]||(s[ae]=d(Z)),s[ae]},this.maxSourceExtent_=i,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Cs(i)==Cs(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Cs(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Cs(this.targetProj_.getExtent()):null;var f=m0(r),C=Cw(r),O=vw(r),E=yw(r),P=this.transformInv_(f),D=this.transformInv_(C),$=this.transformInv_(O),H=this.transformInv_(E),Q=bce+(a?Math.max(0,Math.ceil(Doe(bO(r)/(a*a*256*256)))):0);if(this.addQuad_(f,C,O,E,P,D,$,H,Q),this.wrapsXInSource_){var N=1/0;this.triangles_.forEach(function(Z,ae,pe){N=Math.min(N,Z.source[0][0],Z.source[1][0],Z.source[2][0])}),this.triangles_.forEach((function(Z){if(Math.max(Z.source[0][0],Z.source[1][0],Z.source[2][0])-N>this.sourceWorldWidth_/2){var ae=[[Z.source[0][0],Z.source[0][1]],[Z.source[1][0],Z.source[1][1]],[Z.source[2][0],Z.source[2][1]]];ae[0][0]-N>this.sourceWorldWidth_/2&&(ae[0][0]-=this.sourceWorldWidth_),ae[1][0]-N>this.sourceWorldWidth_/2&&(ae[1][0]-=this.sourceWorldWidth_),ae[2][0]-N>this.sourceWorldWidth_/2&&(ae[2][0]-=this.sourceWorldWidth_);var pe=Math.min(ae[0][0],ae[1][0],ae[2][0]),fe=Math.max(ae[0][0],ae[1][0],ae[2][0]);fe-pe<this.sourceWorldWidth_/2&&(Z.source=ae)}}).bind(this))}s={}}return n.prototype.addTriangle_=function(e,t,r,i,o,a){this.triangles_.push({source:[i,o,a],target:[e,t,r]})},n.prototype.addQuad_=function(e,t,r,i,o,a,s,d,f){var C=CO([o,a,s,d]),O=this.sourceWorldWidth_?Cs(C)/this.sourceWorldWidth_:null,E=this.sourceWorldWidth_,P=this.sourceProj_.canWrapX()&&O>.5&&O<1,D=!1;if(f>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var $=CO([e,t,r,i]),H=Cs($)/this.targetWorldWidth_;D=H>YK||D}!P&&this.sourceProj_.isGlobal()&&O&&(D=O>YK||D)}if(!(!D&&this.maxSourceExtent_&&isFinite(C[0])&&isFinite(C[1])&&isFinite(C[2])&&isFinite(C[3])&&!bl(C,this.maxSourceExtent_))){var Q=0;if(!D&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(d[0])||!isFinite(d[1]))){if(f>0)D=!0;else if(Q=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(s[0])||!isFinite(s[1])?2:0)+(!isFinite(d[0])||!isFinite(d[1])?1:0),Q!=1&&Q!=2&&Q!=4&&Q!=8)return}if(f>0){if(!D){var N=[(e[0]+r[0])/2,(e[1]+r[1])/2],Z=this.transformInv_(N),ae=void 0;if(P){var pe=(x1(o[0],E)+x1(s[0],E))/2;ae=pe-x1(Z[0],E)}else ae=(o[0]+s[0])/2-Z[0];var fe=(o[1]+s[1])/2-Z[1],X=ae*ae+fe*fe;D=X>this.errorThresholdSquared_}if(D){if(Math.abs(e[0]-r[0])<=Math.abs(e[1]-r[1])){var oe=[(t[0]+r[0])/2,(t[1]+r[1])/2],Ce=this.transformInv_(oe),we=[(i[0]+e[0])/2,(i[1]+e[1])/2],Te=this.transformInv_(we);this.addQuad_(e,t,oe,we,o,a,Ce,Te,f-1),this.addQuad_(we,oe,r,i,Te,Ce,s,d,f-1)}else{var Pe=[(e[0]+t[0])/2,(e[1]+t[1])/2],he=this.transformInv_(Pe),$e=[(r[0]+i[0])/2,(r[1]+i[1])/2],ye=this.transformInv_($e);this.addQuad_(e,Pe,$e,i,o,he,ye,d,f-1),this.addQuad_(Pe,t,r,$e,he,a,s,ye,f-1)}return}}if(P){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}Q&11||this.addTriangle_(e,r,i,o,s,d),Q&14||this.addTriangle_(e,r,t,o,s,a),Q&&(Q&13||this.addTriangle_(t,i,e,a,d,o),Q&7||this.addTriangle_(t,i,r,a,d,s))}},n.prototype.calculateSourceExtent=function(){var e=$d();return this.triangles_.forEach(function(t,r,i){var o=t.source;b_(e,o[0]),b_(e,o[1]),b_(e,o[2])}),e},n.prototype.getTriangles=function(){return this.triangles_},n}(),NO={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},wce={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},ZS,XN=[];function qK(n,e,t,r,i){n.beginPath(),n.moveTo(0,0),n.lineTo(e,t),n.lineTo(r,i),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(e,r)+1,Math.max(t,i)),n.restore()}function XS(n,e){return Math.abs(n[e*4]-210)>2||Math.abs(n[e*4+3]-.75*255)>2}function Mce(){if(ZS===void 0){var n=document.createElement("canvas").getContext("2d");n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",qK(n,4,5,4,0),qK(n,4,5,0,5);var e=n.getImageData(0,0,3,3).data;ZS=XS(e,0)||XS(e,4)||XS(e,8)}return ZS}function VK(n,e,t,r){var i=O8(t,e,n),o=AK(e,r,t),a=e.getMetersPerUnit();a!==void 0&&(o*=a);var s=n.getMetersPerUnit();s!==void 0&&(o/=s);var d=n.getExtent();if(!d||jb(d,i)){var f=AK(n,o,i)/o;isFinite(f)&&f>0&&(o/=f)}return o}function Sce(n,e,t,r){var i=c0(t),o=VK(n,e,i,r);return(!isFinite(o)||o<=0)&&zj(t,function(a){return o=VK(n,e,a,r),isFinite(o)&&o>0}),o}function Ece(n,e,t,r,i,o,a,s,d,f,C,O){var E=Oc(Math.round(t*n),Math.round(t*e),XN);if(O||xl(E,NO),d.length===0)return E.canvas;E.scale(t,t);function P(ae){return Math.round(ae*t)/t}E.globalCompositeOperation="lighter";var D=$d();d.forEach(function(ae,pe,fe){Uj(D,ae.extent)});var $=Cs(D),H=Ec(D),Q=Oc(Math.round(t*$/r),Math.round(t*H/r));O||xl(Q,NO);var N=t/r;d.forEach(function(ae,pe,fe){var X=ae.extent[0]-D[0],oe=-(ae.extent[3]-D[3]),Ce=Cs(ae.extent),we=Ec(ae.extent);ae.image.width>0&&ae.image.height>0&&Q.drawImage(ae.image,f,f,ae.image.width-2*f,ae.image.height-2*f,X*N,oe*N,Ce*N,we*N)});var Z=m0(a);return s.getTriangles().forEach(function(ae,pe,fe){var X=ae.source,oe=ae.target,Ce=X[0][0],we=X[0][1],Te=X[1][0],Pe=X[1][1],he=X[2][0],$e=X[2][1],ye=P((oe[0][0]-Z[0])/o),gt=P(-(oe[0][1]-Z[1])/o),yt=P((oe[1][0]-Z[0])/o),st=P(-(oe[1][1]-Z[1])/o),ft=P((oe[2][0]-Z[0])/o),Re=P(-(oe[2][1]-Z[1])/o),Ve=Ce,Xe=we;Ce=0,we=0,Te-=Ve,Pe-=Xe,he-=Ve,$e-=Xe;var Jt=[[Te,Pe,0,0,yt-ye],[he,$e,0,0,ft-ye],[0,0,Te,Pe,st-gt],[0,0,he,$e,Re-gt]],Ht=Foe(Jt);if(Ht){if(E.save(),E.beginPath(),Mce()||!O){E.moveTo(yt,st);for(var bt=4,Qt=ye-yt,Yt=gt-st,ke=0;ke<bt;ke++)E.lineTo(yt+P((ke+1)*Qt/bt),st+P(ke*Yt/(bt-1))),ke!=bt-1&&E.lineTo(yt+P((ke+1)*Qt/bt),st+P((ke+1)*Yt/(bt-1)));E.lineTo(ft,Re)}else E.moveTo(yt,st),E.lineTo(ye,gt),E.lineTo(ft,Re);E.clip(),E.transform(Ht[0],Ht[2],Ht[1],Ht[3],ye,gt),E.translate(D[0]-Ve,D[3]-Xe),E.scale(r/t,-r/t),E.drawImage(Q.canvas,0,0),E.restore()}}),C&&(E.save(),E.globalCompositeOperation="source-over",E.strokeStyle="black",E.lineWidth=1,s.getTriangles().forEach(function(ae,pe,fe){var X=ae.target,oe=(X[0][0]-Z[0])/o,Ce=-(X[0][1]-Z[1])/o,we=(X[1][0]-Z[0])/o,Te=-(X[1][1]-Z[1])/o,Pe=(X[2][0]-Z[0])/o,he=-(X[2][1]-Z[1])/o;E.beginPath(),E.moveTo(we,Te),E.lineTo(oe,Ce),E.lineTo(Pe,he),E.closePath(),E.stroke()}),E.restore()),E.canvas}var Oce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Bce=function(n){Oce(e,n);function e(t,r,i,o,a,s,d,f,C,O,E,P){var D=n.call(this,a,gr.IDLE,{interpolate:!!P})||this;D.renderEdges_=E!==void 0?E:!1,D.pixelRatio_=d,D.gutter_=f,D.canvas_=null,D.sourceTileGrid_=r,D.targetTileGrid_=o,D.wrappedTileCoord_=s||a,D.sourceTiles_=[],D.sourcesListenerKeys_=null,D.sourceZ_=0;var $=o.getTileCoordExtent(D.wrappedTileCoord_),H=D.targetTileGrid_.getExtent(),Q=D.sourceTileGrid_.getExtent(),N=H?_1($,H):$;if(bO(N)===0)return D.state=gr.EMPTY,D;var Z=t.getExtent();Z&&(Q?Q=_1(Q,Z):Q=Z);var ae=o.getResolution(D.wrappedTileCoord_[0]),pe=Sce(t,i,N,ae);if(!isFinite(pe)||pe<=0)return D.state=gr.EMPTY,D;var fe=O!==void 0?O:_ce;if(D.triangulation_=new xce(t,i,N,Q,pe*fe,ae),D.triangulation_.getTriangles().length===0)return D.state=gr.EMPTY,D;D.sourceZ_=r.getZForResolution(pe);var X=D.triangulation_.calculateSourceExtent();if(Q&&(t.canWrapX()?(X[1]=Ll(X[1],Q[1],Q[3]),X[3]=Ll(X[3],Q[1],Q[3])):X=_1(X,Q)),!bO(X))D.state=gr.EMPTY;else{for(var oe=r.getTileRangeForExtentAndZ(X,D.sourceZ_),Ce=oe.minX;Ce<=oe.maxX;Ce++)for(var we=oe.minY;we<=oe.maxY;we++){var Te=C(D.sourceZ_,Ce,we,d);Te&&D.sourceTiles_.push(Te)}D.sourceTiles_.length===0&&(D.state=gr.EMPTY)}return D}return e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach((function(C,O,E){C&&C.getState()==gr.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(C.tileCoord),image:C.getImage()})}).bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=gr.ERROR;else{var r=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(r),o=typeof i=="number"?i:i[0],a=typeof i=="number"?i:i[1],s=this.targetTileGrid_.getResolution(r),d=this.sourceTileGrid_.getResolution(this.sourceZ_),f=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Ece(o,a,this.pixelRatio_,d,this.sourceTileGrid_.getExtent(),s,f,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=gr.LOADED}this.changed()},e.prototype.load=function(){if(this.state==gr.IDLE){this.state=gr.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((function(r,i,o){var a=r.getState();if(a==gr.IDLE||a==gr.LOADING){t++;var s=Oo(r,Wi.CHANGE,function(d){var f=r.getState();(f==gr.LOADED||f==gr.ERROR||f==gr.EMPTY)&&(rs(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}).bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(r,i,o){var a=r.getState();a==gr.IDLE&&r.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(rs),this.sourcesListenerKeys_=null},e.prototype.release=function(){this.canvas_&&(j8(this.canvas_.getContext("2d")),XN.push(this.canvas_),this.canvas_=null),n.prototype.release.call(this)},e}(Ew);const JN=Bce;var Ice=function(){function n(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return n.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},n.prototype.expireCache=function(e){for(;this.canExpireCache();)this.pop()},n.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},n.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},n.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},n.prototype.get=function(e,t){var r=this.entries_[e];return co(r!==void 0,15),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_},n.prototype.remove=function(e){var t=this.entries_[e];return co(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},n.prototype.getCount=function(){return this.count_},n.prototype.getKeys=function(){var e=new Array(this.count_),t=0,r;for(r=this.newest_;r;r=r.older)e[t++]=r.key_;return e},n.prototype.getValues=function(){var e=new Array(this.count_),t=0,r;for(r=this.newest_;r;r=r.older)e[t++]=r.value_;return e},n.prototype.peekLast=function(){return this.oldest_.value_},n.prototype.peekLastKey=function(){return this.oldest_.key_},n.prototype.peekFirstKey=function(){return this.newest_.key_},n.prototype.peek=function(e){if(this.containsKey(e))return this.entries_[e].value_},n.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},n.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},n.prototype.set=function(e,t){co(!(e in this.entries_),16);var r={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[e]=r,++this.count_},n.prototype.setSize=function(e){this.highWaterMark=e},n}();const kce=Ice;var Tce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Kce=function(n){Tce(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.expireCache=function(t){for(;this.canExpireCache();){var r=this.peekLast();if(r.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(this.getCount()!==0){var t=this.peekFirstKey(),r=HN(t),i=r[0];this.forEach((function(o){o.tileCoord[0]!==i&&(this.remove(VN(o.tileCoord)),o.release())}).bind(this))}},e}(kce);const Z8=Kce,JS={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function eW(n){var e=n.getDefaultTileGrid();return e||(e=Lce(n),n.setDefaultTileGrid(e)),e}function Pce(n,e,t){var r=e[0],i=n.getTileCoordCenter(e),o=Ow(t);if(jb(o,i))return e;var a=Cs(o),s=Math.ceil((o[0]-i[0])/a);return i[0]+=a*s,n.getTileCoordForCoordAndZ(i,r)}function Dce(n,e,t,r){var i=r!==void 0?r:"top-left",o=tW(n,e,t);return new Yb({extent:n,origin:Ooe(n,i),resolutions:o,tileSize:t})}function X8(n){var e=n||{},t=e.extent||Vs("EPSG:3857").getExtent(),r={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:tW(t,e.maxZoom,e.tileSize,e.maxResolution)};return new Yb(r)}function tW(n,e,t,r){for(var i=e!==void 0?e:vN,o=Ec(n),a=Cs(n),s=jA(t!==void 0?t:N8),d=r>0?r:Math.max(a/s[0],o/s[1]),f=i+1,C=new Array(f),O=0;O<f;++O)C[O]=d/Math.pow(2,O);return C}function Lce(n,e,t,r){var i=Ow(n);return Dce(i,e,t,r)}function Ow(n){n=Vs(n);var e=n.getExtent();if(!e){var t=180*Wf[GA.DEGREES]/n.getMetersPerUnit();e=$f(-t,-t,t,t)}return e}var nW=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Fce=function(n){nW(e,n);function e(t){var r=n.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate})||this;r.on,r.once,r.un,r.opaque_=t.opaque!==void 0?t.opaque:!1,r.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,r.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;var i=[256,256];return r.tileGrid&&jA(r.tileGrid.getTileSize(r.tileGrid.getMinZoom()),i),r.tileCache=new Z8(t.cacheSize||0),r.tmpSize=[0,0],r.key_=t.key||"",r.tileOptions={transition:t.transition,interpolate:t.interpolate},r.zDirection=t.zDirection?t.zDirection:0,r}return e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,r){var i=this.getTileCacheForProjection(t);i&&i.expireCache(r)},e.prototype.forEachLoadedTile=function(t,r,i,o){var a=this.getTileCacheForProjection(t);if(!a)return!1;for(var s=!0,d,f,C,O=i.minX;O<=i.maxX;++O)for(var E=i.minY;E<=i.maxY;++E)f=Kv(r,O,E),C=!1,a.containsKey(f)&&(d=a.get(f),C=d.getState()===gr.LOADED,C&&(C=o(d)!==!1)),C||(s=!1);return s},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,r,i,o,a){return Ci()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:eW(t)},e.prototype.getTileCacheForProjection=function(t){var r=this.getProjection();return co(r===null||n1(r,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,r,i){var o=this.getTileGridForProjection(i),a=this.getTilePixelRatio(r),s=jA(o.getTileSize(t),this.tmpSize);return a==1?s:Ple(s,a,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,r){var i=r!==void 0?r:this.getProjection(),o=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=Pce(o,t,i)),hce(t,o)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),n.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,r){var i=this.getTileCacheForProjection(r);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,r,i,o){},e}(WN),Uce=function(n){nW(e,n);function e(t,r){var i=n.call(this,t)||this;return i.tile=r,i}return e}(Xp);const Rce=Fce;function zce(n,e){var t=/\{z\}/g,r=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(a,s,d){if(a)return n.replace(t,a[0].toString()).replace(r,a[1].toString()).replace(i,a[2].toString()).replace(o,function(){var f=a[0],C=e.getFullTileRange(f);co(C,55);var O=C.getHeight()-a[2]-1;return O.toString()})}}function rW(n,e){for(var t=n.length,r=new Array(t),i=0;i<t;++i)r[i]=zce(n[i],e);return jce(r)}function jce(n){return n.length===1?n[0]:function(e,t,r){if(e){var i=dce(e),o=x1(i,n.length);return n[o](e,t,r)}else return}}function Nce(n){var e=[],t=/\{([a-z])-([a-z])\}/.exec(n);if(t){var r=t[1].charCodeAt(0),i=t[2].charCodeAt(0),o=void 0;for(o=r;o<=i;++o)e.push(n.replace(t[0],String.fromCharCode(o)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(n),t){for(var a=parseInt(t[2],10),s=parseInt(t[1],10);s<=a;s++)e.push(n.replace(t[0],s.toString()));return e}return e.push(n),e}var Wce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Gce=function(n){Wce(e,n);function e(t){var r=n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(r.tileUrlFunction=t.tileUrlFunction),r.urls=null,t.urls?r.setUrls(t.urls):t.url&&r.setUrl(t.url),r.tileLoadingKeys_={},r}return e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var r=t.target,i=qi(r),o=r.getState(),a;o==gr.LOADING?(this.tileLoadingKeys_[i]=!0,a=JS.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],a=o==gr.ERROR?JS.TILELOADERROR:o==gr.LOADED?JS.TILELOADEND:void 0),a!=null&&this.dispatchEvent(new Uce(a,r))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,r){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof r<"u"?this.setKey(r):this.changed()},e.prototype.setUrl=function(t){var r=Nce(t);this.urls=r,this.setUrls(r)},e.prototype.setUrls=function(t){this.urls=t;var r=t.join(`
`);this.generateTileUrlFunction_?this.setTileUrlFunction(rW(t,this.tileGrid),r):this.setKey(r)},e.prototype.tileUrlFunction=function(t,r,i){},e.prototype.useTile=function(t,r,i){var o=Kv(t,r,i);this.tileCache.containsKey(o)&&this.tileCache.get(o)},e}(Rce);const iW=Gce;var $ce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Qce=function(n){$ce(e,n);function e(t){var r=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(i=t.interpolate),r=n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Yce,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:i,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this,r.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,r.tileClass=t.tileClass!==void 0?t.tileClass:ZN,r.tileCacheForProjection={},r.tileGridForProjection={},r.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,r.renderReprojectionEdges_=!1,r}return e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,r){var i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?r:{});for(var o in this.tileCacheForProjection){var a=this.tileCacheForProjection[o];a.expireCache(a==i?r:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!n1(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var t=n.prototype.getKey.call(this);return this.getInterpolate()||(t+=":disable-interpolation"),t},e.prototype.getOpaque=function(t){return this.getProjection()&&t&&!n1(this.getProjection(),t)?!1:n.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){var r=this.getProjection();if(this.tileGrid&&(!r||n1(r,t)))return this.tileGrid;var i=qi(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=eW(t)),this.tileGridForProjection[i]},e.prototype.getTileCacheForProjection=function(t){var r=this.getProjection();if(!r||n1(r,t))return this.tileCache;var i=qi(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Z8(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,r,i,o,a,s){var d=[t,r,i],f=this.getTileCoordForTileUrlFunction(d,a),C=f?this.tileUrlFunction(f,o,a):void 0,O=new this.tileClass(d,C!==void 0?gr.IDLE:gr.EMPTY,C!==void 0?C:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return O.key=s,O.addEventListener(Wi.CHANGE,this.handleTileChange.bind(this)),O},e.prototype.getTile=function(t,r,i,o,a){var s=this.getProjection();if(!s||!a||n1(s,a))return this.getTileInternal(t,r,i,o,s||a);var d=this.getTileCacheForProjection(a),f=[t,r,i],C=void 0,O=VN(f);d.containsKey(O)&&(C=d.get(O));var E=this.getKey();if(C&&C.key==E)return C;var P=this.getTileGridForProjection(s),D=this.getTileGridForProjection(a),$=this.getTileCoordForTileUrlFunction(f,a),H=new JN(s,P,a,D,f,$,this.getTilePixelRatio(o),this.getGutter(),(function(Q,N,Z,ae){return this.getTileInternal(Q,N,Z,ae,s)}).bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return H.key=E,C?(H.interimTile=C,H.refreshInterimChain(),d.replace(O,H)):d.set(O,H),H},e.prototype.getTileInternal=function(t,r,i,o,a){var s=null,d=Kv(t,r,i),f=this.getKey();if(!this.tileCache.containsKey(d))s=this.createTile_(t,r,i,o,a,f),this.tileCache.set(d,s);else if(s=this.tileCache.get(d),s.key!=f){var C=s;s=this.createTile_(t,r,i,o,a,f),C.getState()==gr.IDLE?s.interimTile=C.interimTile:s.interimTile=C,s.refreshInterimChain(),this.tileCache.replace(d,s)}return s},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(var r in this.tileCacheForProjection)this.tileCacheForProjection[r].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,r){{var i=Vs(t);if(i){var o=qi(i);o in this.tileGridForProjection||(this.tileGridForProjection[o]=r)}}},e}(iW);function Yce(n,e){n.getImage().src=e}const qce=Qce;var oW=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();function Vce(n,e,t,r){var i=document.createElement("script"),o="olc_"+qi(e);function a(){delete window[o],i.parentNode.removeChild(i)}i.async=!0,i.src=n+(n.indexOf("?")==-1?"?":"&")+(r||"callback")+"="+o;var s=setTimeout(function(){a(),t&&t()},1e4);window[o]=function(d){clearTimeout(s),a(),e(d)},document.head.appendChild(i)}(function(n){oW(e,n);function e(t){var r=this,i="Unexpected response status: "+t.status;return r=n.call(this,i)||this,r.name="ResponseError",r.response=t,r}return e})(Error);(function(n){oW(e,n);function e(t){var r=n.call(this,"Failed to issue request")||this;return r.name="ClientError",r.client=t,r}return e})(Error);var Hce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Zce=function(n){Hce(e,n);function e(t){var r=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;if(t.interpolate!==void 0&&(i=t.interpolate),r=n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:i,projection:Vs("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection})||this,r.tileJSON_=null,r.tileSize_=t.tileSize,t.url)if(t.jsonp)Vce(t.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var o=new XMLHttpRequest;o.addEventListener("load",r.onXHRLoad_.bind(r)),o.addEventListener("error",r.onXHRError_.bind(r)),o.open("GET",t.url),o.send()}else t.tileJSON?r.handleTileJSONResponse(t.tileJSON):co(!1,51);return r}return e.prototype.onXHRLoad_=function(t){var r=t.target;if(!r.status||r.status>=200&&r.status<300){var i=void 0;try{i=JSON.parse(r.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var r=Vs("EPSG:4326"),i=this.getProjection(),o;if(t.bounds!==void 0){var a=_w(r,i);o=koe(t.bounds,a)}var s=Ow(i),d=t.minzoom||0,f=t.maxzoom||22,C=X8({extent:s,maxZoom:f,minZoom:d,tileSize:this.tileSize_});if(this.tileGrid=C,this.tileUrlFunction=rW(t.tiles,C),t.attribution!==void 0&&!this.getAttributions()){var O=o!==void 0?o:s;this.setAttributions(function(E){return bl(O,E.extent)?[t.attribution]:null})}this.tileJSON_=t,this.setState("ready")},e.prototype.handleTileJSONError=function(){this.setState("error")},e}(qce);const aW=Zce,Wm={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};var Xce=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Jce=function(n){Xce(e,n);function e(t){var r=this,i=t||{},o=xl({},i);return delete o.preload,delete o.useInterimTilesOnError,r=n.call(this,o)||this,r.on,r.once,r.un,r.setPreload(i.preload!==void 0?i.preload:0),r.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),r}return e.prototype.getPreload=function(){return this.get(Wm.PRELOAD)},e.prototype.setPreload=function(t){this.set(Wm.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Wm.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Wm.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(t){return n.prototype.getData.call(this,t)},e}(ww);const ede=Jce;var tde=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),nde=function(n){tde(e,n);function e(t){var r=n.call(this,t)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=$d(),r.tmpTileRange_=new qN(0,0,0,0),r}return e.prototype.isDrawableTile=function(t){var r=this.getLayer(),i=t.getState(),o=r.getUseInterimTilesOnError();return i==gr.LOADED||i==gr.EMPTY||i==gr.ERROR&&!o},e.prototype.getTile=function(t,r,i,o){var a=o.pixelRatio,s=o.viewState.projection,d=this.getLayer(),f=d.getSource(),C=f.getTile(t,r,i,a,s);return C.getState()==gr.ERROR&&(d.getUseInterimTilesOnError()?d.getPreload()>0&&(this.newTiles_=!0):C.setState(gr.LOADED)),this.isDrawableTile(C)||(C=C.getInterimTile()),C},e.prototype.getData=function(t){var r=this.frameState;if(!r)return null;var i=this.getLayer(),o=Cl(r.pixelToCoordinateTransform,t.slice()),a=i.getExtent();if(a&&!jb(a,o))return null;for(var s=r.pixelRatio,d=r.viewState.projection,f=r.viewState,C=i.getRenderSource(),O=C.getTileGridForProjection(f.projection),E=C.getTilePixelRatio(r.pixelRatio),P=O.getZForResolution(f.resolution);P>=O.getMinZoom();--P){var D=O.getTileCoordForCoordAndZ(o,P),$=C.getTile(P,D[1],D[2],s,d);if(!($ instanceof ZN||$ instanceof JN))return null;if($.getState()===gr.LOADED){var H=O.getOrigin(P),Q=jA(O.getTileSize(P)),N=O.getResolution(P),Z=Math.floor(E*((o[0]-H[0])/N-D[1]*Q[0])),ae=Math.floor(E*((H[1]-o[1])/N-D[2]*Q[1])),pe=Math.round(E*C.getGutterForProjection(f.projection));return this.getImageData($.getImage(),Z+pe,ae+pe)}}return null},e.prototype.loadedTileCallback=function(t,r,i){return this.isDrawableTile(i)?n.prototype.loadedTileCallback.call(this,t,r,i):!1},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,r){var i=t.layerStatesArray[t.layerIndex],o=t.viewState,a=o.projection,s=o.resolution,d=o.center,f=o.rotation,C=t.pixelRatio,O=this.getLayer(),E=O.getSource(),P=E.getRevision(),D=E.getTileGridForProjection(a),$=D.getZForResolution(s,E.zDirection),H=D.getResolution($),Q=t.extent,N=t.viewState.resolution,Z=E.getTilePixelRatio(C),ae=Math.round(Cs(Q)/N*C),pe=Math.round(Ec(Q)/N*C),fe=i.extent&&c1(i.extent);fe&&(Q=_1(Q,c1(i.extent)));var X=H*ae/2/Z,oe=H*pe/2/Z,Ce=[d[0]-X,d[1]-oe,d[0]+X,d[1]+oe],we=D.getTileRangeForExtentAndZ(Q,$),Te={};Te[$]={};var Pe=this.createLoadedTileFinder(E,a,Te),he=this.tmpExtent,$e=this.tmpTileRange_;this.newTiles_=!1;for(var ye=f?wO(o.center,N,f,t.size):void 0,gt=we.minX;gt<=we.maxX;++gt)for(var yt=we.minY;yt<=we.maxY;++yt)if(!(f&&!D.tileCoordIntersectsViewport([$,gt,yt],ye))){var st=this.getTile($,gt,yt,t);if(this.isDrawableTile(st)){var ft=qi(this);if(st.getState()==gr.LOADED){Te[$][st.tileCoord.toString()]=st;var Re=st.inTransition(ft);Re&&i.opacity!==1&&(st.endTransition(ft),Re=!1),!this.newTiles_&&(Re||this.renderedTiles.indexOf(st)===-1)&&(this.newTiles_=!0)}if(st.getAlpha(ft,t.time)===1)continue}var Ve=D.getTileCoordChildTileRange(st.tileCoord,$e,he),Xe=!1;Ve&&(Xe=Pe($+1,Ve)),Xe||D.forEachTileCoordParentTileRange(st.tileCoord,Pe,$e,he)}var Jt=H/s*C/Z;Gf(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/C,1/C,f,-ae/2,-pe/2);var Ht=Dj(this.pixelTransform);this.useContainer(r,Ht,this.getBackground(t));var bt=this.context,Qt=bt.canvas;v8(this.inversePixelTransform,this.pixelTransform),Gf(this.tempTransform,ae/2,pe/2,Jt,Jt,0,-ae/2,-pe/2),Qt.width!=ae||Qt.height!=pe?(Qt.width=ae,Qt.height=pe):this.containerReused||bt.clearRect(0,0,ae,pe),fe&&this.clipUnrotated(bt,t,fe),E.getInterpolate()||xl(bt,NO),this.preRender(bt,t),this.renderedTiles.length=0;var Yt=Object.keys(Te).map(Number);Yt.sort(D1);var ke,ge,Se;i.opacity===1&&(!this.containerReused||E.getOpaque(t.viewState.projection))?Yt=Yt.reverse():(ke=[],ge=[]);for(var ze=Yt.length-1;ze>=0;--ze){var it=Yt[ze],ot=E.getTilePixelSize(it,C,a),St=D.getResolution(it),Rt=St/H,zt=ot[0]*Rt*Jt,mt=ot[1]*Rt*Jt,or=D.getTileCoordForCoordAndZ(m0(Ce),it),gn=D.getTileCoordExtent(or),yn=Cl(this.tempTransform,[Z*(gn[0]-Ce[0])/H,Z*(Ce[3]-gn[3])/H]),tr=Z*E.getGutterForProjection(a),dr=Te[it];for(var Sr in dr){var st=dr[Sr],Nr=st.tileCoord,yr=or[1]-Nr[1],_i=Math.round(yn[0]-(yr-1)*zt),Ee=or[2]-Nr[2],ee=Math.round(yn[1]-(Ee-1)*mt),gt=Math.round(yn[0]-yr*zt),yt=Math.round(yn[1]-Ee*mt),V=_i-gt,Ke=ee-yt,At=$===it,Re=At&&st.getAlpha(qi(this),t.time)!==1,Bt=!1;if(!Re)if(ke){Se=[gt,yt,gt+V,yt,gt+V,yt+Ke,gt,yt+Ke];for(var kt=0,Lt=ke.length;kt<Lt;++kt)if($!==it&&it<ge[kt]){var fn=ke[kt];bl([gt,yt,gt+V,yt+Ke],[fn[0],fn[3],fn[4],fn[7]])&&(Bt||(bt.save(),Bt=!0),bt.beginPath(),bt.moveTo(Se[0],Se[1]),bt.lineTo(Se[2],Se[3]),bt.lineTo(Se[4],Se[5]),bt.lineTo(Se[6],Se[7]),bt.moveTo(fn[6],fn[7]),bt.lineTo(fn[4],fn[5]),bt.lineTo(fn[2],fn[3]),bt.lineTo(fn[0],fn[1]),bt.clip())}ke.push(Se),ge.push(it)}else bt.clearRect(gt,yt,V,Ke);this.drawTileImage(st,t,gt,yt,V,Ke,tr,At),ke&&!Re?(Bt&&bt.restore(),this.renderedTiles.unshift(st)):this.renderedTiles.push(st),this.updateUsedTiles(t.usedTiles,E,st)}}return this.renderedRevision=P,this.renderedResolution=H,this.extentChanged=!this.renderedExtent_||!fv(this.renderedExtent_,Ce),this.renderedExtent_=Ce,this.renderedPixelRatio=C,this.renderedProjection=a,this.manageTilePyramid(t,E,D,C,a,Q,$,O.getPreload()),this.scheduleExpireCache(t,E),this.postRender(bt,t),i.extent&&bt.restore(),xl(bt,wce),Ht!==Qt.style.transform&&(Qt.style.transform=Ht),this.container},e.prototype.drawTileImage=function(t,r,i,o,a,s,d,f){var C=this.getTileImage(t);if(C){var O=qi(this),E=r.layerStatesArray[r.layerIndex],P=E.opacity*(f?t.getAlpha(O,r.time):1),D=P!==this.context.globalAlpha;D&&(this.context.save(),this.context.globalAlpha=P),this.context.drawImage(C,d,d,C.width-2*d,C.height-2*d,i,o,a,s),D&&this.context.restore(),P!==E.opacity?r.animate=!0:f&&t.endTransition(O)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,r){if(r.canExpireCache()){var i=(function(o,a,s){var d=qi(o);d in s.usedTiles&&o.expireCache(s.viewState.projection,s.usedTiles[d])}).bind(null,r);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,r,i){var o=qi(r);o in t||(t[o]={}),t[o][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,r,i,o,a,s,d,f,C){var O=qi(r);O in t.wantedTiles||(t.wantedTiles[O]={});var E=t.wantedTiles[O],P=t.tileQueue,D=i.getMinZoom(),$=t.viewState.rotation,H=$?wO(t.viewState.center,t.viewState.resolution,$,t.size):void 0,Q=0,N,Z,ae,pe,fe,X;for(X=D;X<=d;++X)for(Z=i.getTileRangeForExtentAndZ(s,X,Z),ae=i.getResolution(X),pe=Z.minX;pe<=Z.maxX;++pe)for(fe=Z.minY;fe<=Z.maxY;++fe)$&&!i.tileCoordIntersectsViewport([X,pe,fe],H)||(d-X<=f?(++Q,N=r.getTile(X,pe,fe,o,a),N.getState()==gr.IDLE&&(E[N.getKey()]=!0,P.isKeyQueued(N.getKey())||P.enqueue([N,O,i.getTileCoordCenter(N.tileCoord),ae])),C!==void 0&&C(N)):r.useTile(X,pe,fe,a));r.updateCacheSize(Q,a)},e}(DN);const sW=nde;var rde=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ide=function(n){rde(e,n);function e(t){return n.call(this,t)||this}return e.prototype.createRenderer=function(){return new sW(this)},e}(ede);const Gm={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"};var ode=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ade={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},sde={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},lde=function(n){ode(e,n);function e(t){var r=n.call(this,t)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.renderedLayerRevision_,r.renderedPixelToCoordinateTransform_=null,r.renderedRotation_,r.tmpTransform_=jd(),r}return e.prototype.prepareTile=function(t,r,i){var o,a=t.getState();return(a===gr.LOADED||a===gr.ERROR)&&(this.updateExecutorGroup_(t,r,i),this.tileImageNeedsRender_(t)&&(o=!0)),o},e.prototype.getTile=function(t,r,i,o){var a=o.pixelRatio,s=o.viewState,d=s.resolution,f=s.projection,C=this.getLayer(),O=C.getSource().getTile(t,r,i,a,f),E=o.viewHints,P=!(E[sl.ANIMATING]||E[sl.INTERACTING]);(P||!O.wantedResolution)&&(O.wantedResolution=d);var D=this.prepareTile(O,a,f);return D&&(P||Date.now()-o.time<8)&&C.getRenderMode()!==Gm.VECTOR&&this.renderTileImage_(O,o),n.prototype.getTile.call(this,t,r,i,o)},e.prototype.isDrawableTile=function(t){var r=this.getLayer();return n.prototype.isDrawableTile.call(this,t)&&(r.getRenderMode()===Gm.VECTOR?qi(r)in t.executorGroups:t.hasContext(r))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(t){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!==r&&(this.renderedLayerRevision_=r,this.renderedTiles.length=0),n.prototype.prepareFrame.call(this,t)},e.prototype.updateExecutorGroup_=function(t,r,i){var o=this.getLayer(),a=o.getRevision(),s=o.getRenderOrder()||null,d=t.wantedResolution,f=t.getReplayState(o);if(!(!f.dirty&&f.renderedResolution===d&&f.renderedRevision==a&&f.renderedRenderOrder==s)){var C=o.getSource(),O=o.getDeclutter(),E=C.getTileGrid(),P=C.getTileGridForProjection(i),D=P.getTileCoordExtent(t.wrappedTileCoord),$=C.getSourceTiles(r,i,t),H=qi(o);delete t.hitDetectionImageData[H],t.executorGroups[H]=[],O&&(t.declutterExecutorGroups[H]=[]),f.dirty=!1;for(var Q=function(pe,fe){var X=$[pe];if(X.getState()!=gr.LOADED)return"continue";var oe=X.tileCoord,Ce=E.getTileCoordExtent(oe),we=_1(D,Ce),Te=r0(we,o.getRenderBuffer()*d,N.tmpExtent),Pe=fv(Ce,we)?null:Te,he=new j4(0,Te,d,r),$e=O?new j4(0,we,d,r):void 0,ye=zN(d,r),gt=function(bt){var Qt,Yt=bt.getStyleFunction()||o.getStyleFunction();if(Yt&&(Qt=Yt(bt,d)),Qt){var ke=this.renderFeature(bt,ye,Qt,he,$e);f.dirty=f.dirty||ke}},yt=X.getFeatures();s&&s!==f.renderedRenderOrder&&yt.sort(s);for(var st=0,ft=yt.length;st<ft;++st){var Re=yt[st];(!Pe||bl(Pe,Re.getGeometry().getExtent()))&&gt.call(N,Re)}var Ve=he.finish(),Xe=o.getRenderMode()!==Gm.VECTOR&&O&&$.length===1?null:we,Jt=new N4(Xe,d,r,C.getOverlaps(),Ve,o.getRenderBuffer());if(t.executorGroups[H].push(Jt),$e){var Ht=new N4(null,d,r,C.getOverlaps(),$e.finish(),o.getRenderBuffer());t.declutterExecutorGroups[H].push(Ht)}},N=this,Z=0,ae=$.length;Z<ae;++Z)Q(Z);f.renderedRevision=a,f.renderedRenderOrder=s,f.renderedResolution=d}},e.prototype.forEachFeatureAtCoordinate=function(t,r,i,o,a){var s=r.viewState.resolution,d=r.viewState.rotation;i=i??0;var f=this.getLayer(),C=f.getSource(),O=C.getTileGridForProjection(r.viewState.projection),E=CO([t]);r0(E,s*i,E);for(var P={},D=function(ae,pe,fe){var X=ae.getId();X===void 0&&(X=qi(ae));var oe=P[X];if(oe){if(oe!==!0&&fe<oe.distanceSq){if(fe===0)return P[X]=!0,a.splice(a.lastIndexOf(oe),1),o(ae,f,pe);oe.geometry=pe,oe.distanceSq=fe}}else{if(fe===0)return P[X]=!0,o(ae,f,pe);a.push(P[X]={feature:ae,layer:f,geometry:pe,distanceSq:fe,callback:o})}},$=this.renderedTiles,H,Q=function(ae,pe){var fe=$[ae],X=O.getTileCoordExtent(fe.wrappedTileCoord);if(!bl(X,E))return"continue";var oe=qi(f),Ce=[fe.executorGroups[oe]],we=fe.declutterExecutorGroups[oe];we&&Ce.push(we),Ce.some(function(Te){for(var Pe=Te===we?r.declutterTree.all().map(function(gt){return gt.value}):null,he=0,$e=Te.length;he<$e;++he){var ye=Te[he];if(H=ye.forEachFeatureAtCoordinate(t,s,d,i,D,Pe),H)return!0}})},N=0,Z=$.length;!H&&N<Z;++N)Q(N);return H},e.prototype.getFeatures=function(t){return new Promise((function(r,i){for(var o=this.getLayer(),a=qi(o),s=o.getSource(),d=this.renderedProjection,f=d.getExtent(),C=this.renderedResolution,O=s.getTileGridForProjection(d),E=Cl(this.renderedPixelToCoordinateTransform_,t.slice()),P=O.getTileCoordForCoordAndResolution(E,C),D,$=0,H=this.renderedTiles.length;$<H;++$)if(P.toString()===this.renderedTiles[$].tileCoord.toString()){if(D=this.renderedTiles[$],D.getState()===gr.LOADED){var Q=O.getTileCoordExtent(D.tileCoord);s.getWrapX()&&d.canWrapX()&&!zm(f,Q)&&M8(E,d);break}D=void 0}if(!D||D.loadingSourceTiles>0){r([]);return}var N=O.getTileCoordExtent(D.wrappedTileCoord),Z=m0(N),ae=[(E[0]-Z[0])/C,(Z[1]-E[1])/C],pe=D.getSourceTiles().reduce(function(we,Te){return we.concat(Te.getFeatures())},[]),fe=D.hitDetectionImageData[a];if(!fe&&!this.animatingOrInteracting_){var X=jA(O.getTileSize(O.getZForResolution(C,s.zDirection))),oe=this.renderedRotation_,Ce=[this.getRenderTransform(O.getTileCoordCenter(D.wrappedTileCoord),C,0,Zc,X[0]*Zc,X[1]*Zc,0)];fe=FN(X,Ce,pe,o.getStyleFunction(),O.getTileCoordExtent(D.wrappedTileCoord),D.getReplayState(o).renderedResolution,oe),D.hitDetectionImageData[a]=fe}r(UN(ae,pe,fe))}).bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var r=this.context,i=r.globalAlpha;r.globalAlpha=this.getLayer().getOpacity();for(var o=t.viewHints,a=!(o[sl.ANIMATING]||o[sl.INTERACTING]),s=this.renderedTiles,d=0,f=s.length;d<f;++d){var C=s[d],O=C.declutterExecutorGroups[qi(this.getLayer())];if(O)for(var E=O.length-1;E>=0;--E)O[E].execute(this.context,1,this.getTileRenderTransform(C,t),t.viewState.rotation,a,void 0,t.declutterTree)}r.globalAlpha=i},e.prototype.getTileRenderTransform=function(t,r){var i=r.pixelRatio,o=r.viewState,a=o.center,s=o.resolution,d=o.rotation,f=r.size,C=Math.round(f[0]*i),O=Math.round(f[1]*i),E=this.getLayer().getSource(),P=E.getTileGridForProjection(r.viewState.projection),D=t.tileCoord,$=P.getTileCoordExtent(t.wrappedTileCoord),H=P.getTileCoordExtent(D,this.tmpExtent)[0]-$[0],Q=y8(US(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(a,s,d,i,C,O,H));return Q},e.prototype.renderFrame=function(t,r){var i=t.viewHints,o=!(i[sl.ANIMATING]||i[sl.INTERACTING]);n.prototype.renderFrame.call(this,t,r),this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;var a=this.getLayer(),s=a.getRenderMode(),d=this.context,f=d.globalAlpha;d.globalAlpha=a.getOpacity();for(var C=sde[s],O=t.viewState,E=O.rotation,P=a.getSource(),D=P.getTileGridForProjection(O.projection),$=D.getZForResolution(O.resolution,P.zDirection),H=this.renderedTiles,Q=[],N=[],Z=!0,ae=H.length-1;ae>=0;--ae){var pe=H[ae];Z=Z&&!pe.getReplayState(a).dirty;var fe=pe.executorGroups[qi(a)].filter(function(yt){return yt.hasExecutors(C)});if(fe.length!==0){var X=this.getTileRenderTransform(pe,t),oe=pe.tileCoord[0],Ce=!1,we=fe[0].getClipCoords(X);if(we){for(var Te=0,Pe=Q.length;Te<Pe;++Te)if($!==oe&&oe<N[Te]){var he=Q[Te];bl([we[0],we[3],we[4],we[7]],[he[0],he[3],he[4],he[7]])&&(Ce||(d.save(),Ce=!0),d.beginPath(),d.moveTo(we[0],we[1]),d.lineTo(we[2],we[3]),d.lineTo(we[4],we[5]),d.lineTo(we[6],we[7]),d.moveTo(he[6],he[7]),d.lineTo(he[4],he[5]),d.lineTo(he[2],he[3]),d.lineTo(he[0],he[1]),d.clip())}Q.push(we),N.push(oe)}for(var $e=0,ye=fe.length;$e<ye;++$e){var gt=fe[$e];gt.execute(d,1,X,E,o,C)}Ce&&d.restore()}}return d.globalAlpha=f,this.ready=Z,this.container},e.prototype.renderFeature=function(t,r,i,o,a){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var d=0,f=i.length;d<f;++d)s=W4(o,t,i[d],r,this.boundHandleStyleImageChange_,void 0,a)||s;else s=W4(o,t,i,r,this.boundHandleStyleImageChange_,void 0,a);return s},e.prototype.tileImageNeedsRender_=function(t){var r=this.getLayer();if(r.getRenderMode()===Gm.VECTOR)return!1;var i=t.getReplayState(r),o=r.getRevision(),a=t.wantedResolution;return i.renderedTileResolution!==a||i.renderedTileRevision!==o},e.prototype.renderTileImage_=function(t,r){var i=this.getLayer(),o=t.getReplayState(i),a=i.getRevision(),s=t.executorGroups[qi(i)];o.renderedTileRevision=a;var d=t.wrappedTileCoord,f=d[0],C=i.getSource(),O=r.pixelRatio,E=r.viewState,P=E.projection,D=C.getTileGridForProjection(P),$=D.getResolution(t.tileCoord[0]),H=r.pixelRatio/t.wantedResolution*$,Q=D.getResolution(f),N=t.getContext(i);O=Math.round(Math.max(O,H/O));var Z=C.getTilePixelSize(f,O,P);N.canvas.width=Z[0],N.canvas.height=Z[1];var ae=O/H;if(ae!==1){var pe=iK(this.tmpTransform_);US(pe,ae,ae),N.setTransform.apply(N,pe)}var fe=D.getTileCoordExtent(d,this.tmpExtent),X=H/Q,oe=iK(this.tmpTransform_);US(oe,X,-X),woe(oe,-fe[0],-fe[3]);for(var Ce=0,we=s.length;Ce<we;++Ce){var Te=s[Ce];Te.execute(N,ae,oe,0,!0,ade[i.getRenderMode()])}o.renderedTileResolution=t.wantedResolution},e}(sW);const ude=lde;var Ade=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),lW=function(n){Ade(e,n);function e(t){var r=this,i=t||{},o=xl({},i);delete o.preload,delete o.useInterimTilesOnError,r=n.call(this,o)||this,r.on,r.once,r.un,i.renderMode===Gm.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var a=i.renderMode||Gm.HYBRID;return co(a==Gm.HYBRID||a==Gm.VECTOR,28),r.renderMode_=a,r.setPreload(i.preload?i.preload:0),r.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),r.getBackground,r.setBackground,r}return e.prototype.createRenderer=function(){return new ude(this)},e.prototype.getFeatures=function(t){return n.prototype.getFeatures.call(this,t)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(Wm.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Wm.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(Wm.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Wm.USE_INTERIM_TILES_ON_ERROR,t)},e}(TN),cde=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),dde=function(n){cde(e,n);function e(t,r,i,o,a,s){var d=n.call(this,t,r,s)||this;return d.extent=null,d.format_=o,d.features_=null,d.loader_,d.projection=null,d.resolution,d.tileLoadFunction_=a,d.url_=i,d.key=i,d}return e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==gr.IDLE&&(this.setState(gr.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,r){this.setFeatures(t)},e.prototype.onError=function(){this.setState(gr.ERROR)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(gr.LOADED)},e.prototype.setLoader=function(t){this.loader_=t},e}(Ew);const hde=dde;var fde=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),HK=[],pde=function(n){fde(e,n);function e(t,r,i,o){var a=n.call(this,t,r,{transition:0})||this;return a.context_={},a.executorGroups={},a.declutterExecutorGroups={},a.loadingSourceTiles=0,a.hitDetectionImageData={},a.replayState_={},a.sourceTiles=[],a.errorTileKeys={},a.wantedResolution,a.getSourceTiles=o.bind(void 0,a),a.wrappedTileCoord=i,a}return e.prototype.getContext=function(t){var r=qi(t);return r in this.context_||(this.context_[r]=Oc(1,1,HK)),this.context_[r]},e.prototype.hasContext=function(t){return qi(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var r=qi(t);return r in this.replayState_||(this.replayState_[r]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[r]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var t in this.context_){var r=this.context_[t];j8(r),HK.push(r.canvas),delete this.context_[t]}n.prototype.release.call(this)},e}(Ew);const mde=pde;var gde=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),yde=function(n){gde(e,n);function e(t){var r=this,i=t.projection||"EPSG:3857",o=t.extent||Ow(i),a=t.tileGrid||X8({extent:o,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});return r=n.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:i,state:t.state,tileGrid:a,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:vde,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection})||this,r.format_=t.format?t.format:null,r.sourceTileCache=new Z8(r.tileCache.highWaterMark),r.overlaps_=t.overlaps==null?!0:t.overlaps,r.tileClass=t.tileClass?t.tileClass:hde,r.tileGrids_={},r}return e.prototype.getFeaturesInExtent=function(t){var r=[],i=this.tileCache;if(i.getCount()===0)return r;var o=HN(i.peekFirstKey())[0],a=this.tileGrid;return i.forEach(function(s){if(!(s.tileCoord[0]!==o||s.getState()!==gr.LOADED))for(var d=s.getSourceTiles(),f=0,C=d.length;f<C;++f){var O=d[f],E=O.tileCoord;if(bl(t,a.getTileCoordExtent(E))){var P=O.getFeatures();if(P)for(var D=0,$=P.length;D<$;++D){var H=P[D],Q=H.getGeometry();bl(t,Q.getExtent())&&r.push(H)}}}}),r},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(t,r){var i=this.getTileCacheForProjection(t),o=Object.keys(r).reduce(function(a,s){var d=cce(s),f=i.peek(d);if(f)for(var C=f.sourceTiles,O=0,E=C.length;O<E;++O)a[C[O].getKey()]=!0;return a},{});n.prototype.expireCache.call(this,t,r),this.sourceTileCache.expireCache(o)},e.prototype.getSourceTiles=function(t,r,i){var o=this;if(i.getState()===gr.IDLE){i.setState(gr.LOADING);var a=i.wrappedTileCoord,s=this.getTileGridForProjection(r),d=s.getTileCoordExtent(a),f=a[0],C=s.getResolution(f);r0(d,-C,d);var O=this.tileGrid,E=O.getExtent();E&&_1(d,E,d);var P=O.getZForResolution(C,this.zDirection);O.forEachTileCoord(d,P,function(D){var $=o.tileUrlFunction(D,t,r),H=o.sourceTileCache.containsKey($)?o.sourceTileCache.get($):new o.tileClass(D,$?gr.IDLE:gr.EMPTY,$,o.format_,o.tileLoadFunction);i.sourceTiles.push(H);var Q=H.getState();if(Q<gr.LOADED){var N=function(Z){o.handleTileChange(Z);var ae=H.getState();if(ae===gr.LOADED||ae===gr.ERROR){var pe=H.getKey();pe in i.errorTileKeys?H.getState()===gr.LOADED&&delete i.errorTileKeys[pe]:i.loadingSourceTiles--,ae===gr.ERROR?i.errorTileKeys[pe]=!0:H.removeEventListener(Wi.CHANGE,N),i.loadingSourceTiles===0&&i.setState(F1(i.errorTileKeys)?gr.LOADED:gr.ERROR)}};H.addEventListener(Wi.CHANGE,N),i.loadingSourceTiles++}Q===gr.IDLE&&(H.extent=O.getTileCoordExtent(D),H.projection=r,H.resolution=O.getResolution(D[0]),o.sourceTileCache.set($,H),H.load())}),i.loadingSourceTiles||i.setState(i.sourceTiles.some(function(D){return D.getState()===gr.ERROR})?gr.ERROR:gr.LOADED)}return i.sourceTiles},e.prototype.getTile=function(t,r,i,o,a){var s=Kv(t,r,i),d=this.getKey(),f;if(this.tileCache.containsKey(s)&&(f=this.tileCache.get(s),f.key===d))return f;var C=[t,r,i],O=this.getTileCoordForTileUrlFunction(C,a),E=this.getTileGrid().getExtent(),P=this.getTileGridForProjection(a);if(O&&E){var D=P.getTileCoordExtent(O);r0(D,-P.getResolution(t),D),bl(E,D)||(O=null)}var $=!0;if(O!==null){var H=this.tileGrid,Q=P.getResolution(t),N=H.getZForResolution(Q,1),Z=P.getTileCoordExtent(O);r0(Z,-Q,Z),H.forEachTileCoord(Z,N,(function(pe){$=$&&!this.tileUrlFunction(pe,o,a)}).bind(this))}var ae=new mde(C,$?gr.EMPTY:gr.IDLE,O,this.getSourceTiles.bind(this,o,a));return ae.key=d,f?(ae.interimTile=f,ae.refreshInterimChain(),this.tileCache.replace(s,ae)):this.tileCache.set(s,ae),ae},e.prototype.getTileGridForProjection=function(t){var r=t.getCode(),i=this.tileGrids_[r];if(!i){for(var o=this.tileGrid,a=o.getResolutions().slice(),s=a.map(function(O,E){return o.getOrigin(E)}),d=a.map(function(O,E){return o.getTileSize(E)}),f=vN+1,C=a.length;C<f;++C)a.push(a[C-1]/2),s.push(s[C-1]),d.push(d[C-1]);i=new Yb({extent:o.getExtent(),origins:s,resolutions:a,tileSizes:d}),this.tileGrids_[r]=i}return i},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,r,i){var o=this.getTileGridForProjection(i),a=jA(o.getTileSize(t),this.tmpSize);return[Math.round(a[0]*r),Math.round(a[1]*r)]},e.prototype.updateCacheSize=function(t,r){n.prototype.updateCacheSize.call(this,t*2,r),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(r).highWaterMark},e}(iW);const uW=yde;function vde(n,e){n.setLoader(function(t,r,i){GN(e,n.getFormat(),t,r,i,n.onLoad.bind(n),n.onError.bind(n))})}var ZK={thin:100,hairline:100,"ultra-light":200,"extra-light":200,light:300,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,heavy:900,black:900,"heavy-black":900,fat:900,poster:900,"ultra-black":950,"extra-black":950},PC=" ",XK=/(italic|oblique)$/i,JK={},Cde=function(n,e,t){var r=JK[n];if(!r){Array.isArray(n)||(n=[n]);for(var i=400,o="normal",a=[],s,d,f=0,C=n.length;f<C;++f){var O=n[f],E=O.split(" "),P=E[E.length-1].toLowerCase();P=="normal"||P=="italic"||P=="oblique"?(o=d?o:P,d=!0,E.pop(),P=E[E.length-1].toLowerCase()):XK.test(P)&&(P=P.replace(XK,""),o=d?o:E[E.length-1].replace(P,""),d=!0);for(var D in ZK){var $=E.length>1?E[E.length-2].toLowerCase():"";if(P==D||P==D.replace("-","")||$+"-"+P==D){i=s?i:ZK[D],E.pop(),$&&D.startsWith($)&&E.pop();break}}!s&&typeof P=="number"&&(i=P,s=!0);var H=E.join(PC).replace("Klokantech Noto Sans","Noto Sans");H.indexOf(PC)!==-1&&(H='"'+H+'"'),a.push(H)}r=JK[n]=[o,i,a]}return r[0]+PC+r[1]+PC+e+"px"+(t?"/"+t:"")+PC+r[2]};const WO=Ba(Cde);var _de=8,bde={version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},projection:{type:"projection",doc:"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.",example:{name:"albers",center:[-154,50],parallels:[55,65]}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},xde={"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},wde=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Mde={type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Sde={type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Ede={type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Ode={type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},Bde={type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},Ide={type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},kde={id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:'An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `["feature-state", ...]` expression is not supported in filter expressions.  The `["pitch"]` and `["distance-from-center"]` expressions are supported only for filter expressions on the symbol layer.'},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},Tde=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],Kde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},Pde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},Dde={"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},Lde={"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},Fde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},Ude={"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},Rde={"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},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",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. SDF images are not supported in formatted text and will be ignored.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0",android:"10.0.0",ios:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},zde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},jde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},Nde={type:"array",value:"*",doc:"A filter selects specific features from a layer."},Wde={type:"boolean",doc:'Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},Gde={type:"boolean",doc:'Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},$de={type:"boolean",doc:'Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},Qde={type:"boolean",doc:'Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},Yde={type:"boolean",doc:'Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},qde={type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},Vde={type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},Hde={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},Zde={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},Xde={doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.0.0",ios:"10.0.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.0.0",ios:"10.0.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `'image'` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a [`boolean`](#types-boolean), the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a [`color`](#color), it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns `null` if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Returns the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Returns the feature properties object.  Note that in some cases, it may be more efficient to use `["get", "property_name"]` directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns `null` if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0",android:"10.0.0",ios:"10.0.0"}}},"geometry-type":{doc:"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Returns the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Returns the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Camera","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pitch:{doc:'Returns the current pitch in degrees. `["pitch"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0",android:"10.9.0",ios:"10.9.0"}}},"distance-from-center":{doc:'Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `["distance-from-center"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0",android:"10.9.0",ios:"10.9.0"}}},"heatmap-density":{doc:"Returns the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0",ios:"4.1.0",macos:"0.8.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},Jde={range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}}},ehe={anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},the={name:{type:"enum",values:{albers:{doc:"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},equalEarth:{doc:"An Equal Earth projection."},equirectangular:{doc:"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},lambertConformalConic:{doc:"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},mercator:{doc:"The Mercator projection is the default projection."},naturalEarth:{doc:"A Natural Earth projection."},winkelTripel:{doc:"A Winkel Tripel projection."},globe:{doc:"A globe projection."}},default:"mercator",doc:"The name of the projection to be used for rendering the map.",required:!0,"sdk-support":{"basic functionality":{js:"2.6.0"}}},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,doc:"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].",example:[-96,37.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,doc:"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).",example:[29.5,45.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}}},nhe={source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.",requires:["source"],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},rhe=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],ihe={"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},ohe={"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",doc:"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"2.9.0",android:"10.5.0",ios:"10.5.0",macos:"10.5.0"}},"property-type":"constant"}},ahe={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},she={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},lhe={"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},uhe={"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Ahe={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},che={"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},dhe={"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},hhe={duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},fhe={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},AW={$version:_de,$root:bde,sources:xde,source:wde,source_vector:Mde,source_raster:Sde,source_raster_dem:Ede,source_geojson:Ode,source_video:Bde,source_image:Ide,layer:kde,layout:Tde,layout_background:Kde,layout_sky:Pde,layout_fill:Dde,layout_circle:Lde,layout_heatmap:Fde,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,doc:"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.","sdk-support":{"basic functionality":{js:"v2.10.0",android:"10.7.0",ios:"10.7.0"}},"property-type":"constant"}},layout_line:Ude,layout_symbol:Rde,layout_raster:zde,layout_hillshade:jde,filter:Nde,filter_symbol:Wde,filter_fill:Gde,filter_line:$de,filter_circle:Qde,"filter_fill-extrusion":{type:"boolean",doc:'Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:Yde,filter_operator:qde,geometry_type:Vde,function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:`A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:
* In categorical functions, when the feature value does not match any of the stop domain values.
* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a \`circle-color\` property but the feature property value is not a string or not a valid color).
* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
If no default is provided, the style property's default is used in these circumstances.`}},function_stop:Hde,expression:Zde,expression_name:Xde,fog:Jde,light:ehe,projection:the,terrain:nhe,paint:rhe,paint_fill:ihe,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.","sdk-support":{"basic functionality":{js:"2.10.0",android:"10.7.0",ios:"10.7.0"}}},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.",requires:["fill-extrusion-edge-radius"],"sdk-support":{"basic functionality":{js:"2.10.0",android:"10.7.0",ios:"10.7.0"}}}},paint_line:ohe,paint_circle:ahe,paint_heatmap:she,paint_symbol:lhe,paint_raster:uhe,paint_hillshade:Ahe,paint_background:che,paint_sky:dhe,transition:hhe,"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:fhe},eE=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{},GO={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */(function(n,e){(function(t){var r=e&&!e.nodeType&&e,i=n&&!n.nodeType&&n,o=typeof eE=="object"&&eE;(o.global===o||o.window===o||o.self===o)&&(t=o);var a,s=2147483647,d=36,f=1,C=26,O=38,E=700,P=72,D=128,$="-",H=/^xn--/,Q=/[^\x20-\x7E]/,N=/[\x2E\u3002\uFF0E\uFF61]/g,Z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ae=d-f,pe=Math.floor,fe=String.fromCharCode,X;function oe(Re){throw RangeError(Z[Re])}function Ce(Re,Ve){for(var Xe=Re.length,Jt=[];Xe--;)Jt[Xe]=Ve(Re[Xe]);return Jt}function we(Re,Ve){var Xe=Re.split("@"),Jt="";Xe.length>1&&(Jt=Xe[0]+"@",Re=Xe[1]),Re=Re.replace(N,".");var Ht=Re.split("."),bt=Ce(Ht,Ve).join(".");return Jt+bt}function Te(Re){for(var Ve=[],Xe=0,Jt=Re.length,Ht,bt;Xe<Jt;)Ht=Re.charCodeAt(Xe++),Ht>=55296&&Ht<=56319&&Xe<Jt?(bt=Re.charCodeAt(Xe++),(bt&64512)==56320?Ve.push(((Ht&1023)<<10)+(bt&1023)+65536):(Ve.push(Ht),Xe--)):Ve.push(Ht);return Ve}function Pe(Re){return Ce(Re,function(Ve){var Xe="";return Ve>65535&&(Ve-=65536,Xe+=fe(Ve>>>10&1023|55296),Ve=56320|Ve&1023),Xe+=fe(Ve),Xe}).join("")}function he(Re){return Re-48<10?Re-22:Re-65<26?Re-65:Re-97<26?Re-97:d}function $e(Re,Ve){return Re+22+75*(Re<26)-((Ve!=0)<<5)}function ye(Re,Ve,Xe){var Jt=0;for(Re=Xe?pe(Re/E):Re>>1,Re+=pe(Re/Ve);Re>ae*C>>1;Jt+=d)Re=pe(Re/ae);return pe(Jt+(ae+1)*Re/(Re+O))}function gt(Re){var Ve=[],Xe=Re.length,Jt,Ht=0,bt=D,Qt=P,Yt,ke,ge,Se,ze,it,ot,St,Rt;for(Yt=Re.lastIndexOf($),Yt<0&&(Yt=0),ke=0;ke<Yt;++ke)Re.charCodeAt(ke)>=128&&oe("not-basic"),Ve.push(Re.charCodeAt(ke));for(ge=Yt>0?Yt+1:0;ge<Xe;){for(Se=Ht,ze=1,it=d;ge>=Xe&&oe("invalid-input"),ot=he(Re.charCodeAt(ge++)),(ot>=d||ot>pe((s-Ht)/ze))&&oe("overflow"),Ht+=ot*ze,St=it<=Qt?f:it>=Qt+C?C:it-Qt,!(ot<St);it+=d)Rt=d-St,ze>pe(s/Rt)&&oe("overflow"),ze*=Rt;Jt=Ve.length+1,Qt=ye(Ht-Se,Jt,Se==0),pe(Ht/Jt)>s-bt&&oe("overflow"),bt+=pe(Ht/Jt),Ht%=Jt,Ve.splice(Ht++,0,bt)}return Pe(Ve)}function yt(Re){var Ve,Xe,Jt,Ht,bt,Qt,Yt,ke,ge,Se,ze,it=[],ot,St,Rt,zt;for(Re=Te(Re),ot=Re.length,Ve=D,Xe=0,bt=P,Qt=0;Qt<ot;++Qt)ze=Re[Qt],ze<128&&it.push(fe(ze));for(Jt=Ht=it.length,Ht&&it.push($);Jt<ot;){for(Yt=s,Qt=0;Qt<ot;++Qt)ze=Re[Qt],ze>=Ve&&ze<Yt&&(Yt=ze);for(St=Jt+1,Yt-Ve>pe((s-Xe)/St)&&oe("overflow"),Xe+=(Yt-Ve)*St,Ve=Yt,Qt=0;Qt<ot;++Qt)if(ze=Re[Qt],ze<Ve&&++Xe>s&&oe("overflow"),ze==Ve){for(ke=Xe,ge=d;Se=ge<=bt?f:ge>=bt+C?C:ge-bt,!(ke<Se);ge+=d)zt=ke-Se,Rt=d-Se,it.push(fe($e(Se+zt%Rt,0))),ke=pe(zt/Rt);it.push(fe($e(ke,0))),bt=ye(Xe,St,Jt==Ht),Xe=0,++Jt}++Xe,++Ve}return it.join("")}function st(Re){return we(Re,function(Ve){return H.test(Ve)?gt(Ve.slice(4).toLowerCase()):Ve})}function ft(Re){return we(Re,function(Ve){return Q.test(Ve)?"xn--"+yt(Ve):Ve})}if(a={version:"1.3.2",ucs2:{decode:Te,encode:Pe},decode:gt,encode:yt,toASCII:ft,toUnicode:st},r&&i)if(n.exports==r)i.exports=a;else for(X in a)a.hasOwnProperty(X)&&(r[X]=a[X]);else t.punycode=a})(eE)})(GO,GO.exports);var phe={isString:function(n){return typeof n=="string"},isObject:function(n){return typeof n=="object"&&n!==null},isNull:function(n){return n===null},isNullOrUndefined:function(n){return n==null}},yb={};function mhe(n,e){return Object.prototype.hasOwnProperty.call(n,e)}var ghe=function(n,e,t,r){e=e||"&",t=t||"=";var i={};if(typeof n!="string"||n.length===0)return i;var o=/\+/g;n=n.split(e);var a=1e3;r&&typeof r.maxKeys=="number"&&(a=r.maxKeys);var s=n.length;a>0&&s>a&&(s=a);for(var d=0;d<s;++d){var f=n[d].replace(o,"%20"),C=f.indexOf(t),O,E,P,D;C>=0?(O=f.substr(0,C),E=f.substr(C+1)):(O=f,E=""),P=decodeURIComponent(O),D=decodeURIComponent(E),mhe(i,P)?Array.isArray(i[P])?i[P].push(D):i[P]=[i[P],D]:i[P]=D}return i},DC=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}},yhe=function(n,e,t,r){return e=e||"&",t=t||"=",n===null&&(n=void 0),typeof n=="object"?Object.keys(n).map(function(i){var o=encodeURIComponent(DC(i))+t;return Array.isArray(n[i])?n[i].map(function(a){return o+encodeURIComponent(DC(a))}).join(e):o+encodeURIComponent(DC(n[i]))}).join(e):r?encodeURIComponent(DC(r))+t+encodeURIComponent(DC(n)):""};yb.decode=yb.parse=ghe;yb.encode=yb.stringify=yhe;var vhe=GO.exports,Dp=phe;function Gp(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Che=/^([a-z0-9.+-]+:)/i,_he=/:[0-9]*$/,bhe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xhe=["<",">",'"',"`"," ","\r",`
`,"	"],whe=["{","}","|","\\","^","`"].concat(xhe),$O=["'"].concat(whe),eP=["%","/","?",";","#"].concat($O),tP=["/","?","#"],Mhe=255,nP=/^[+a-z0-9A-Z_-]{0,63}$/,She=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ehe={javascript:!0,"javascript:":!0},QO={javascript:!0,"javascript:":!0},jy={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},YO=yb;function Ohe(n,e,t){if(n&&Dp.isObject(n)&&n instanceof Gp)return n;var r=new Gp;return r.parse(n,e,t),r}Gp.prototype.parse=function(n,e,t){if(!Dp.isString(n))throw new TypeError("Parameter 'url' must be a string, not "+typeof n);var r=n.indexOf("?"),i=r!==-1&&r<n.indexOf("#")?"?":"#",o=n.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),n=o.join(i);var s=n;if(s=s.trim(),!t&&n.split("#").length===1){var d=bhe.exec(s);if(d)return this.path=s,this.href=s,this.pathname=d[1],d[2]?(this.search=d[2],e?this.query=YO.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var f=Che.exec(s);if(f){f=f[0];var C=f.toLowerCase();this.protocol=C,s=s.substr(f.length)}if(t||f||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var O=s.substr(0,2)==="//";O&&!(f&&QO[f])&&(s=s.substr(2),this.slashes=!0)}if(!QO[f]&&(O||f&&!jy[f])){for(var E=-1,P=0;P<tP.length;P++){var D=s.indexOf(tP[P]);D!==-1&&(E===-1||D<E)&&(E=D)}var $,H;E===-1?H=s.lastIndexOf("@"):H=s.lastIndexOf("@",E),H!==-1&&($=s.slice(0,H),s=s.slice(H+1),this.auth=decodeURIComponent($)),E=-1;for(var P=0;P<eP.length;P++){var D=s.indexOf(eP[P]);D!==-1&&(E===-1||D<E)&&(E=D)}E===-1&&(E=s.length),this.host=s.slice(0,E),s=s.slice(E),this.parseHost(),this.hostname=this.hostname||"";var Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var N=this.hostname.split(/\./),P=0,Z=N.length;P<Z;P++){var ae=N[P];if(ae&&!ae.match(nP)){for(var pe="",fe=0,X=ae.length;fe<X;fe++)ae.charCodeAt(fe)>127?pe+="x":pe+=ae[fe];if(!pe.match(nP)){var oe=N.slice(0,P),Ce=N.slice(P+1),we=ae.match(She);we&&(oe.push(we[1]),Ce.unshift(we[2])),Ce.length&&(s="/"+Ce.join(".")+s),this.hostname=oe.join(".");break}}}this.hostname.length>Mhe?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=vhe.toASCII(this.hostname));var Te=this.port?":"+this.port:"",Pe=this.hostname||"";this.host=Pe+Te,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!Ehe[C])for(var P=0,Z=$O.length;P<Z;P++){var he=$O[P];if(s.indexOf(he)!==-1){var $e=encodeURIComponent(he);$e===he&&($e=escape(he)),s=s.split(he).join($e)}}var ye=s.indexOf("#");ye!==-1&&(this.hash=s.substr(ye),s=s.slice(0,ye));var gt=s.indexOf("?");if(gt!==-1?(this.search=s.substr(gt),this.query=s.substr(gt+1),e&&(this.query=YO.parse(this.query)),s=s.slice(0,gt)):e&&(this.search="",this.query={}),s&&(this.pathname=s),jy[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Te=this.pathname||"",yt=this.search||"";this.path=Te+yt}return this.href=this.format(),this};Gp.prototype.format=function(){var n=this.auth||"";n&&(n=encodeURIComponent(n),n=n.replace(/%3A/i,":"),n+="@");var e=this.protocol||"",t=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=n+this.host:this.hostname&&(i=n+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&Dp.isObject(this.query)&&Object.keys(this.query).length&&(o=YO.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||jy[e])&&i!==!1?(i="//"+(i||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):i||(i=""),r&&r.charAt(0)!=="#"&&(r="#"+r),a&&a.charAt(0)!=="?"&&(a="?"+a),t=t.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),a=a.replace("#","%23"),e+i+t+a+r};Gp.prototype.resolve=function(n){return this.resolveObject(Ohe(n,!1,!0)).format()};Gp.prototype.resolveObject=function(n){if(Dp.isString(n)){var e=new Gp;e.parse(n,!1,!0),n=e}for(var t=new Gp,r=Object.keys(this),i=0;i<r.length;i++){var o=r[i];t[o]=this[o]}if(t.hash=n.hash,n.href==="")return t.href=t.format(),t;if(n.slashes&&!n.protocol){for(var a=Object.keys(n),s=0;s<a.length;s++){var d=a[s];d!=="protocol"&&(t[d]=n[d])}return jy[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(n.protocol&&n.protocol!==t.protocol){if(!jy[n.protocol]){for(var f=Object.keys(n),C=0;C<f.length;C++){var O=f[C];t[O]=n[O]}return t.href=t.format(),t}if(t.protocol=n.protocol,!n.host&&!QO[n.protocol]){for(var Z=(n.pathname||"").split("/");Z.length&&!(n.host=Z.shift()););n.host||(n.host=""),n.hostname||(n.hostname=""),Z[0]!==""&&Z.unshift(""),Z.length<2&&Z.unshift(""),t.pathname=Z.join("/")}else t.pathname=n.pathname;if(t.search=n.search,t.query=n.query,t.host=n.host||"",t.auth=n.auth,t.hostname=n.hostname||n.host,t.port=n.port,t.pathname||t.search){var E=t.pathname||"",P=t.search||"";t.path=E+P}return t.slashes=t.slashes||n.slashes,t.href=t.format(),t}var D=t.pathname&&t.pathname.charAt(0)==="/",$=n.host||n.pathname&&n.pathname.charAt(0)==="/",H=$||D||t.host&&n.pathname,Q=H,N=t.pathname&&t.pathname.split("/")||[],Z=n.pathname&&n.pathname.split("/")||[],ae=t.protocol&&!jy[t.protocol];if(ae&&(t.hostname="",t.port=null,t.host&&(N[0]===""?N[0]=t.host:N.unshift(t.host)),t.host="",n.protocol&&(n.hostname=null,n.port=null,n.host&&(Z[0]===""?Z[0]=n.host:Z.unshift(n.host)),n.host=null),H=H&&(Z[0]===""||N[0]==="")),$)t.host=n.host||n.host===""?n.host:t.host,t.hostname=n.hostname||n.hostname===""?n.hostname:t.hostname,t.search=n.search,t.query=n.query,N=Z;else if(Z.length)N||(N=[]),N.pop(),N=N.concat(Z),t.search=n.search,t.query=n.query;else if(!Dp.isNullOrUndefined(n.search)){if(ae){t.hostname=t.host=N.shift();var pe=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;pe&&(t.auth=pe.shift(),t.host=t.hostname=pe.shift())}return t.search=n.search,t.query=n.query,(!Dp.isNull(t.pathname)||!Dp.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!N.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var fe=N.slice(-1)[0],X=(t.host||n.host||N.length>1)&&(fe==="."||fe==="..")||fe==="",oe=0,Ce=N.length;Ce>=0;Ce--)fe=N[Ce],fe==="."?N.splice(Ce,1):fe===".."?(N.splice(Ce,1),oe++):oe&&(N.splice(Ce,1),oe--);if(!H&&!Q)for(;oe--;oe)N.unshift("..");H&&N[0]!==""&&(!N[0]||N[0].charAt(0)!=="/")&&N.unshift(""),X&&N.join("/").substr(-1)!=="/"&&N.push("");var we=N[0]===""||N[0]&&N[0].charAt(0)==="/";if(ae){t.hostname=t.host=we?"":N.length?N.shift():"";var pe=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;pe&&(t.auth=pe.shift(),t.host=t.hostname=pe.shift())}return H=H||t.host&&N.length,H&&!we&&N.unshift(""),N.length?t.pathname=N.join("/"):(t.pathname=null,t.path=null),(!Dp.isNull(t.pathname)||!Dp.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=n.auth||t.auth,t.slashes=t.slashes||n.slashes,t.href=t.format(),t};Gp.prototype.parseHost=function(){var n=this.host,e=_he.exec(n);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),n=n.substr(0,n.length-e.length)),n&&(this.hostname=n)};function cW(n,...e){for(const t of e)for(const r in t)n[r]=t[r];return n}class Bhe extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}var Pf=Bhe;class J8{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[r,i]of t)this.bindings[r]=i}concat(e){return new J8(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}}var Ihe=J8;const Bw={kind:"null"},nr={kind:"number"},Ao={kind:"string"},Xi={kind:"boolean"},$p={kind:"color"},Ny={kind:"object"},eo={kind:"value"},khe={kind:"error"},Iw={kind:"collator"},kw={kind:"formatted"},qb={kind:"resolvedImage"};function Ld(n,e){return{kind:"array",itemType:n,N:e}}function Ds(n){if(n.kind==="array"){const e=Ds(n.itemType);return typeof n.N=="number"?`array<${e}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const The=[Bw,nr,Ao,Xi,$p,kw,Ny,Ld(eo),qb];function vb(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!vb(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of The)if(!vb(t,e))return null}}return`Expected ${Ds(n)} but found ${Ds(e)} instead.`}function eI(n,e){return e.some(t=>t.kind===n.kind)}function Cb(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}var Khe={},dW,rP={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function w_(n){return n=Math.round(n),n<0?0:n>255?255:n}function iP(n){return n<0?0:n>1?1:n}function tE(n){return n[n.length-1]==="%"?w_(parseFloat(n)/100*255):w_(parseInt(n))}function U2(n){return n[n.length-1]==="%"?iP(parseFloat(n)/100):iP(parseFloat(n))}function nE(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function Phe(n){var e=n.replace(/ /g,"").toLowerCase();if(e in rP)return rP[e].slice();if(e[0]==="#"){if(e.length===4){var t=parseInt(e.substr(1),16);return t>=0&&t<=4095?[(t&3840)>>4|(t&3840)>>8,t&240|(t&240)>>4,t&15|(t&15)<<4,1]:null}else if(e.length===7){var t=parseInt(e.substr(1),16);return t>=0&&t<=16777215?[(t&16711680)>>16,(t&65280)>>8,t&255,1]:null}return null}var r=e.indexOf("("),i=e.indexOf(")");if(r!==-1&&i+1===e.length){var o=e.substr(0,r),a=e.substr(r+1,i-(r+1)).split(","),s=1;switch(o){case"rgba":if(a.length!==4)return null;s=U2(a.pop());case"rgb":return a.length!==3?null:[tE(a[0]),tE(a[1]),tE(a[2]),s];case"hsla":if(a.length!==4)return null;s=U2(a.pop());case"hsl":if(a.length!==3)return null;var d=(parseFloat(a[0])%360+360)%360/360,f=U2(a[1]),C=U2(a[2]),O=C<=.5?C*(f+1):C+f-C*f,E=C*2-O;return[w_(nE(E,O,d+1/3)*255),w_(nE(E,O,d)*255),w_(nE(E,O,d-1/3)*255),s];default:return null}}return null}try{dW=Khe.parseCSSColor=Phe}catch{}class Bc{constructor(e,t,r,i=1){this.r=e,this.g=t,this.b=r,this.a=i}static parse(e){if(!e)return;if(e instanceof Bc)return e;if(typeof e!="string")return;const t=dW(e);if(t)return new Bc(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}toString(){const[e,t,r,i]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(r)},${i})`}toArray(){const{r:e,g:t,b:r,a:i}=this;return i===0?[0,0,0,0]:[e*255/i,t*255/i,r*255/i,i]}toArray01(){const{r:e,g:t,b:r,a:i}=this;return i===0?[0,0,0,0]:[e/i,t/i,r/i,i]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:r,a:i}=this;return[e,t,r,i]}}Bc.black=new Bc(0,0,0,1);Bc.white=new Bc(1,1,1,1);Bc.transparent=new Bc(0,0,0,0);Bc.red=new Bc(1,0,0,1);Bc.blue=new Bc(0,0,1,1);var tu=Bc;class tI{constructor(e,t,r){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class qO{constructor(e,t,r,i,o){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=o}}class Ph{constructor(e){this.sections=e}static fromString(e){return new Ph([new qO(e,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof Ph?e:Ph.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const r={};t.fontStack&&(r["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(r["font-scale"]=t.scale),t.textColor&&(r["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(r)}return e}}class Jp{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Jp({name:e,available:!1}):null}serialize(){return["image",this.name]}}function hW(n,e,t,r){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof r>"u"||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[n,e,t,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[n,e,t,r]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function G4(n){if(n===null)return!0;if(typeof n=="string")return!0;if(typeof n=="boolean")return!0;if(typeof n=="number")return!0;if(n instanceof tu)return!0;if(n instanceof tI)return!0;if(n instanceof Ph)return!0;if(n instanceof Jp)return!0;if(Array.isArray(n)){for(const e of n)if(!G4(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!G4(n[e]))return!1;return!0}else return!1}function eu(n){if(n===null)return Bw;if(typeof n=="string")return Ao;if(typeof n=="boolean")return Xi;if(typeof n=="number")return nr;if(n instanceof tu)return $p;if(n instanceof tI)return Iw;if(n instanceof Ph)return kw;if(n instanceof Jp)return qb;if(Array.isArray(n)){const e=n.length;let t;for(const r of n){const i=eu(r);if(!t)t=i;else{if(t===i)continue;t=eo;break}}return Ld(t||eo,e)}else return Ny}function M_(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof tu||n instanceof Ph||n instanceof Jp?n.toString():JSON.stringify(n)}class nI{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!G4(e[1]))return t.error("invalid value");const r=e[1];let i=eu(r);const o=t.expectedType;return i.kind==="array"&&i.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(i=o),new nI(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof tu?["rgba"].concat(this.value.toArray()):this.value instanceof Ph?this.value.serialize():this.value}}var $4=nI;class Dhe{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}var ju=Dhe;const rE={string:Ao,number:nr,boolean:Xi,object:Ny};class rI{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=1,i;const o=e[0];if(o==="array"){let s;if(e.length>2){const f=e[1];if(typeof f!="string"||!(f in rE)||f==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);s=rE[f],r++}else s=eo;let d;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);d=e[2],r++}i=Ld(s,d)}else i=rE[o];const a=[];for(;r<e.length;r++){const s=t.parse(e[r],r,eo);if(!s)return null;a.push(s)}return new rI(i,a)}evaluate(e){for(let t=0;t<this.args.length;t++){const r=this.args[t].evaluate(e);if(vb(this.type,eu(r))){if(t===this.args.length-1)throw new ju(`Expected value to be of type ${Ds(this.type)}, but found ${Ds(eu(r))} instead.`)}else return r}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,t=[e.kind];if(e.kind==="array"){const r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){t.push(r.kind);const i=e.N;(typeof i=="number"||this.args.length>1)&&t.push(i)}}return t.concat(this.args.map(r=>r.serialize()))}}var Up=rI;class Tw{constructor(e){this.type=kw,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return t.error("First argument must be an image or text section.");const i=[];let o=!1;for(let a=1;a<=e.length-1;++a){const s=e[a];if(o&&typeof s=="object"&&!Array.isArray(s)){o=!1;let d=null;if(s["font-scale"]&&(d=t.parse(s["font-scale"],1,nr),!d))return null;let f=null;if(s["text-font"]&&(f=t.parse(s["text-font"],1,Ld(Ao)),!f))return null;let C=null;if(s["text-color"]&&(C=t.parse(s["text-color"],1,$p),!C))return null;const O=i[i.length-1];O.scale=d,O.font=f,O.textColor=C}else{const d=t.parse(e[a],1,eo);if(!d)return null;const f=d.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:d,scale:null,font:null,textColor:null})}}return new Tw(i)}evaluate(e){const t=r=>{const i=r.content.evaluate(e);return eu(i)===qb?new qO("",i,null,null,null):new qO(M_(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)};return new Ph(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const r={};t.scale&&(r["font-scale"]=t.scale.serialize()),t.font&&(r["text-font"]=t.font.serialize()),t.textColor&&(r["text-color"]=t.textColor.serialize()),e.push(r)}return e}}class Kw{constructor(e){this.type=qb,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const r=t.parse(e[1],1,Ao);return r?new Kw(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=Jp.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Lhe={"to-boolean":Xi,"to-color":$p,"to-number":nr,"to-string":Ao};class iI{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if((r==="to-boolean"||r==="to-string")&&e.length!==2)return t.error("Expected one argument.");const i=Lhe[r],o=[];for(let a=1;a<e.length;a++){const s=t.parse(e[a],a,eo);if(!s)return null;o.push(s)}return new iI(i,o)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let t,r;for(const i of this.args){if(t=i.evaluate(e),r=null,t instanceof tu)return t;if(typeof t=="string"){const o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&(t.length<3||t.length>4?r=`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:r=hW(t[0],t[1],t[2],t[3]),!r))return new tu(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new ju(r||`Could not parse color from value '${typeof t=="string"?t:String(JSON.stringify(t))}'`)}else if(this.type.kind==="number"){let t=null;for(const r of this.args){if(t=r.evaluate(e),t===null)return 0;const i=Number(t);if(!isNaN(i))return i}throw new ju(`Could not convert ${JSON.stringify(t)} to number.`)}else return this.type.kind==="formatted"?Ph.fromString(M_(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Jp.fromString(M_(this.args[0].evaluate(e))):M_(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new Tw([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Kw(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Cy=iI;const Fhe=["Unknown","Point","LineString","Polygon"];class Uhe{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Fhe[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:r,y:i}=this.featureTileCoord,o=r*t-e[0],a=i*t-e[1],s=this.featureDistanceData.bearing[0],d=this.featureDistanceData.bearing[1];return s*o+d*a}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=tu.parse(e)),t}}var fW=Uhe;class _y{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,t){const r=e[0],i=_y.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter(([f])=>!Array.isArray(f)||f.length===e.length-1);let d=null;for(const[f,C]of s){d=new vW(t.registry,t.path,null,t.scope);const O=[];let E=!1;for(let P=1;P<e.length;P++){const D=e[P],$=Array.isArray(f)?f[P-1]:f.type,H=d.parse(D,1+O.length,$);if(!H){E=!0;break}O.push(H)}if(!E){if(Array.isArray(f)&&f.length!==O.length){d.error(`Expected ${f.length} arguments, but found ${O.length} instead.`);continue}for(let P=0;P<O.length;P++){const D=Array.isArray(f)?f[P]:f.type,$=O[P];d.concat(P+1).checkSubtype(D,$.type)}if(d.errors.length===0)return new _y(r,o,C,O)}}if(s.length===1)t.errors.push(...d.errors);else{const C=(s.length?s:a).map(([E])=>Rhe(E)).join(" | "),O=[];for(let E=1;E<e.length;E++){const P=t.parse(e[E],1+O.length);if(!P)return null;O.push(Ds(P.type))}t.error(`Expected arguments of type ${C}, but found (${O.join(", ")}) instead.`)}return null}static register(e,t){_y.definitions=t;for(const r in t)e[r]=_y}}function Rhe(n){return Array.isArray(n)?`(${n.map(Ds).join(", ")})`:`(${Ds(n.type)}...)`}var Pv=_y;class Pw{constructor(e,t,r){this.type=Iw,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(e.length!==2)return t.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return t.error("Collator options argument must be an object.");const i=t.parse(r["case-sensitive"]===void 0?!1:r["case-sensitive"],1,Xi);if(!i)return null;const o=t.parse(r["diacritic-sensitive"]===void 0?!1:r["diacritic-sensitive"],1,Xi);if(!o)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,Ao),!a)?null:new Pw(i,o,a)}evaluate(e){return new tI(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}const a0=8192;function oI(n,e){n[0]=Math.min(n[0],e[0]),n[1]=Math.min(n[1],e[1]),n[2]=Math.max(n[2],e[0]),n[3]=Math.max(n[3],e[1])}function zhe(n){return(180+n)/360}function jhe(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function Q4(n,e){return!(n[0]<=e[0]||n[2]>=e[2]||n[1]<=e[1]||n[3]>=e[3])}function Nhe(n,e){const t=zhe(n[0]),r=jhe(n[1]),i=Math.pow(2,e.z);return[Math.round(t*i*a0),Math.round(r*i*a0)]}function Whe(n,e,t){const r=n[0]-e[0],i=n[1]-e[1],o=n[0]-t[0],a=n[1]-t[1];return r*a-o*i===0&&r*o<=0&&i*a<=0}function Ghe(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function aI(n,e){let t=!1;for(let r=0,i=e.length;r<i;r++){const o=e[r];for(let a=0,s=o.length;a<s-1;a++){if(Whe(n,o[a],o[a+1]))return!1;Ghe(n,o[a],o[a+1])&&(t=!t)}}return t}function $he(n,e){for(let t=0;t<e.length;t++)if(aI(n,e[t]))return!0;return!1}function Qhe(n,e){return n[0]*e[1]-n[1]*e[0]}function oP(n,e,t,r){const i=n[0]-t[0],o=n[1]-t[1],a=e[0]-t[0],s=e[1]-t[1],d=r[0]-t[0],f=r[1]-t[1],C=i*f-d*o,O=a*f-d*s;return C>0&&O<0||C<0&&O>0}function Yhe(n,e,t,r){const i=[e[0]-n[0],e[1]-n[1]],o=[r[0]-t[0],r[1]-t[1]];return Qhe(o,i)===0?!1:!!(oP(n,e,t,r)&&oP(t,r,n,e))}function qhe(n,e,t){for(const r of t)for(let i=0;i<r.length-1;++i)if(Yhe(n,e,r[i],r[i+1]))return!0;return!1}function pW(n,e){for(let t=0;t<n.length;++t)if(!aI(n[t],e))return!1;for(let t=0;t<n.length-1;++t)if(qhe(n[t],n[t+1],e))return!1;return!0}function Vhe(n,e){for(let t=0;t<e.length;t++)if(pW(n,e[t]))return!0;return!1}function sI(n,e,t){const r=[];for(let i=0;i<n.length;i++){const o=[];for(let a=0;a<n[i].length;a++){const s=Nhe(n[i][a],t);oI(e,s),o.push(s)}r.push(o)}return r}function mW(n,e,t){const r=[];for(let i=0;i<n.length;i++){const o=sI(n[i],e,t);r.push(o)}return r}function gW(n,e,t,r){if(n[0]<t[0]||n[0]>t[2]){const i=r*.5;let o=n[0]-t[0]>i?-r:t[0]-n[0]>i?r:0;o===0&&(o=n[0]-t[2]>i?-r:t[2]-n[0]>i?r:0),n[0]+=o}oI(e,n)}function Hhe(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function aP(n,e,t,r){const i=Math.pow(2,r.z)*a0,o=[r.x*a0,r.y*a0],a=[];if(!n)return a;for(const s of n)for(const d of s){const f=[d.x+o[0],d.y+o[1]];gW(f,e,t,i),a.push(f)}return a}function sP(n,e,t,r){const i=Math.pow(2,r.z)*a0,o=[r.x*a0,r.y*a0],a=[];if(!n)return a;for(const s of n){const d=[];for(const f of s){const C=[f.x+o[0],f.y+o[1]];oI(e,C),d.push(C)}a.push(d)}if(e[2]-e[0]<=i/2){Hhe(e);for(const s of a)for(const d of s)gW(d,e,t,i)}return a}function Zhe(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const o=sI(e.coordinates,r,i),a=aP(n.geometry(),t,r,i);if(!Q4(t,r))return!1;for(const s of a)if(!aI(s,o))return!1}if(e.type==="MultiPolygon"){const o=mW(e.coordinates,r,i),a=aP(n.geometry(),t,r,i);if(!Q4(t,r))return!1;for(const s of a)if(!$he(s,o))return!1}return!0}function Xhe(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const o=sI(e.coordinates,r,i),a=sP(n.geometry(),t,r,i);if(!Q4(t,r))return!1;for(const s of a)if(!pW(s,o))return!1}if(e.type==="MultiPolygon"){const o=mW(e.coordinates,r,i),a=sP(n.geometry(),t,r,i);if(!Q4(t,r))return!1;for(const s of a)if(!Vhe(s,o))return!1}return!0}class S_{constructor(e,t){this.type=Xi,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(G4(e[1])){const r=e[1];if(r.type==="FeatureCollection")for(let i=0;i<r.features.length;++i){const o=r.features[i].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new S_(r,r.features[i].geometry)}else if(r.type==="Feature"){const i=r.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new S_(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new S_(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return Zhe(e,this.geometries);if(e.geometryType()==="LineString")return Xhe(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var lI=S_;function Dw(n){if(n instanceof Pv){if(n.name==="get"&&n.args.length===1)return!1;if(n.name==="feature-state")return!1;if(n.name==="has"&&n.args.length===1)return!1;if(n.name==="properties"||n.name==="geometry-type"||n.name==="id")return!1;if(/^filter-/.test(n.name))return!1}if(n instanceof lI)return!1;let e=!0;return n.eachChild(t=>{e&&!Dw(t)&&(e=!1)}),e}function uI(n){if(n instanceof Pv&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!uI(t)&&(e=!1)}),e}function AI(n,e){if(n instanceof Pv&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(r=>{t&&!AI(r,e)&&(t=!1)}),t}class cI{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new cI(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var yW=cI;class dI{constructor(e,t=[],r,i=new Ihe,o=[]){this.registry=e,this.path=t,this.key=t.map(a=>`[${a}]`).join(""),this.scope=i,this.errors=o,this.expectedType=r}parse(e,t,r,i,o={}){return t?this.concat(t,r,i)._parse(e,o):this._parse(e,o)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function r(i,o,a){return a==="assert"?new Up(o,[i]):a==="coerce"?new Cy(o,[i]):i}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if(typeof i!="string")return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[i];if(o){let a=o.parse(e,this);if(!a)return null;if(this.expectedType){const s=this.expectedType,d=a.type;if((s.kind==="string"||s.kind==="number"||s.kind==="boolean"||s.kind==="object"||s.kind==="array")&&d.kind==="value")a=r(a,s,t.typeAnnotation||"assert");else if((s.kind==="color"||s.kind==="formatted"||s.kind==="resolvedImage")&&(d.kind==="value"||d.kind==="string"))a=r(a,s,t.typeAnnotation||"coerce");else if(this.checkSubtype(s,d))return null}if(!(a instanceof $4)&&a.type.kind!=="resolvedImage"&&VO(a)){const s=new fW;try{a=new $4(a.type,a.evaluate(s))}catch(d){return this.error(d.message),null}}return a}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const i=typeof e=="number"?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new dI(this.registry,i,t||null,o,this.errors)}error(e,...t){const r=`${this.key}${t.map(i=>`[${i}]`).join("")}`;this.errors.push(new Pf(r,e))}checkSubtype(e,t){const r=vb(e,t);return r&&this.error(r),r}}var vW=dI;function VO(n){if(n instanceof yW)return VO(n.boundExpression);if(n instanceof Pv&&n.name==="error")return!1;if(n instanceof Pw)return!1;if(n instanceof lI)return!1;const e=n instanceof Cy||n instanceof Up;let t=!0;return n.eachChild(r=>{e?t=t&&VO(r):t=t&&r instanceof $4}),t?Dw(n)&&AI(n,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function Lw(n,e){const t=n.length-1;let r=0,i=t,o=0,a,s;for(;r<=i;)if(o=Math.floor((r+i)/2),a=n[o],s=n[o+1],a<=e){if(o===t||e<s)return o;r=o+1}else if(a>e)i=o-1;else throw new ju("Input is not a number.");return 0}class hI{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[i,o]of r)this.labels.push(i),this.outputs.push(o)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,nr);if(!r)return null;const i=[];let o=null;t.expectedType&&t.expectedType.kind!=="value"&&(o=t.expectedType);for(let a=1;a<e.length;a+=2){const s=a===1?-1/0:e[a],d=e[a+1],f=a,C=a+1;if(typeof s!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(i.length&&i[i.length-1][0]>=s)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',f);const O=t.parse(d,C,o);if(!O)return null;o=o||O.type,i.push([s,O])}return new hI(o,r,i)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const o=t.length;if(i>=t[o-1])return r[o-1].evaluate(e);const a=Lw(t,i);return r[a].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var CW=hI,Jhe=_W;function _W(n,e,t,r){this.cx=3*n,this.bx=3*(t-n)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=n,this.p1y=e,this.p2x=t,this.p2y=r}_W.prototype={sampleCurveX:function(n){return((this.ax*n+this.bx)*n+this.cx)*n},sampleCurveY:function(n){return((this.ay*n+this.by)*n+this.cy)*n},sampleCurveDerivativeX:function(n){return(3*this.ax*n+2*this.bx)*n+this.cx},solveCurveX:function(n,e){if(e===void 0&&(e=1e-6),n<0)return 0;if(n>1)return 1;for(var t=n,r=0;r<8;r++){var i=this.sampleCurveX(t)-n;if(Math.abs(i)<e)return t;var o=this.sampleCurveDerivativeX(t);if(Math.abs(o)<1e-6)break;t=t-i/o}var a=0,s=1;for(t=n,r=0;r<20&&(i=this.sampleCurveX(t),!(Math.abs(i-n)<e));r++)n>i?a=t:s=t,t=(s-a)*.5+a;return t},solve:function(n,e){return this.sampleCurveY(this.solveCurveX(n,e))}};function ed(n,e,t){return n*(1-t)+e*t}function efe(n,e,t){return new tu(ed(n.r,e.r,t),ed(n.g,e.g,t),ed(n.b,e.b,t),ed(n.a,e.a,t))}function tfe(n,e,t){return n.map((r,i)=>ed(r,e[i],t))}var bW=Object.freeze({__proto__:null,number:ed,color:efe,array:tfe});const xW=.95047,wW=1,MW=1.08883,SW=4/29,Wy=6/29,EW=3*Wy*Wy,nfe=Wy*Wy*Wy,rfe=Math.PI/180,ife=180/Math.PI;function iE(n){return n>nfe?Math.pow(n,1/3):n/EW+SW}function oE(n){return n>Wy?n*n*n:EW*(n-SW)}function aE(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function sE(n){return n/=255,n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function OW(n){const e=sE(n.r),t=sE(n.g),r=sE(n.b),i=iE((.4124564*e+.3575761*t+.1804375*r)/xW),o=iE((.2126729*e+.7151522*t+.072175*r)/wW),a=iE((.0193339*e+.119192*t+.9503041*r)/MW);return{l:116*o-16,a:500*(i-o),b:200*(o-a),alpha:n.a}}function BW(n){let e=(n.l+16)/116,t=isNaN(n.a)?e:e+n.a/500,r=isNaN(n.b)?e:e-n.b/200;return e=wW*oE(e),t=xW*oE(t),r=MW*oE(r),new tu(aE(3.2404542*t-1.5371385*e-.4985314*r),aE(-.969266*t+1.8760108*e+.041556*r),aE(.0556434*t-.2040259*e+1.0572252*r),n.alpha)}function ofe(n,e,t){return{l:ed(n.l,e.l,t),a:ed(n.a,e.a,t),b:ed(n.b,e.b,t),alpha:ed(n.alpha,e.alpha,t)}}function afe(n){const{l:e,a:t,b:r}=OW(n),i=Math.atan2(r,t)*ife;return{h:i<0?i+360:i,c:Math.sqrt(t*t+r*r),l:e,alpha:n.a}}function sfe(n){const e=n.h*rfe,t=n.c,r=n.l;return BW({l:r,a:Math.cos(e)*t,b:Math.sin(e)*t,alpha:n.alpha})}function lfe(n,e,t){const r=e-n;return n+t*(r>180||r<-180?r-360*Math.round(r/360):r)}function ufe(n,e,t){return{h:lfe(n.h,e.h,t),c:ed(n.c,e.c,t),l:ed(n.l,e.l,t),alpha:ed(n.alpha,e.alpha,t)}}const n_={forward:OW,reverse:BW,interpolate:ofe},r_={forward:afe,reverse:sfe,interpolate:ufe};var IW=Object.freeze({__proto__:null,lab:n_,hcl:r_});class Y4{constructor(e,t,r,i,o){this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(const[a,s]of o)this.labels.push(a),this.outputs.push(s)}static interpolationFactor(e,t,r,i){let o=0;if(e.name==="exponential")o=lE(t,e.base,r,i);else if(e.name==="linear")o=lE(t,1,r,i);else if(e.name==="cubic-bezier"){const a=e.controlPoints;o=new Jhe(a[0],a[1],a[2],a[3]).solve(lE(t,1,r,i))}return o}static parse(e,t){let[r,i,o,...a]=e;if(!Array.isArray(i)||i.length===0)return t.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const f=i[1];if(typeof f!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:f}}else if(i[0]==="cubic-bezier"){const f=i.slice(1);if(f.length!==4||f.some(C=>typeof C!="number"||C<0||C>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:f}}else return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,nr),!o)return null;const s=[];let d=null;r==="interpolate-hcl"||r==="interpolate-lab"?d=$p:t.expectedType&&t.expectedType.kind!=="value"&&(d=t.expectedType);for(let f=0;f<a.length;f+=2){const C=a[f],O=a[f+1],E=f+3,P=f+4;if(typeof C!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',E);if(s.length&&s[s.length-1][0]>=C)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',E);const D=t.parse(O,P,d);if(!D)return null;d=d||D.type,s.push([C,D])}return d.kind!=="number"&&d.kind!=="color"&&!(d.kind==="array"&&d.itemType.kind==="number"&&typeof d.N=="number")?t.error(`Type ${Ds(d)} is not interpolatable.`):new Y4(d,r,i,o,s)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const o=t.length;if(i>=t[o-1])return r[o-1].evaluate(e);const a=Lw(t,i),s=t[a],d=t[a+1],f=Y4.interpolationFactor(this.interpolation,i,s,d),C=r[a].evaluate(e),O=r[a+1].evaluate(e);return this.operator==="interpolate"?bW[this.type.kind.toLowerCase()](C,O,f):this.operator==="interpolate-hcl"?r_.reverse(r_.interpolate(r_.forward(C),r_.forward(O),f)):n_.reverse(n_.interpolate(n_.forward(C),n_.forward(O),f))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let r=0;r<this.labels.length;r++)t.push(this.labels[r],this.outputs[r].serialize());return t}}function lE(n,e,t,r){const i=r-t,o=n-t;return i===0?0:e===1?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}var Qp=Y4;class q4{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let r=null;const i=t.expectedType;i&&i.kind!=="value"&&(r=i);const o=[];for(const s of e.slice(1)){const d=t.parse(s,1+o.length,r,void 0,{typeAnnotation:"omit"});if(!d)return null;r=r||d.type,o.push(d)}return i&&o.some(s=>vb(i,s.type))?new q4(eo,o):new q4(r,o)}evaluate(e){let t=null,r=0,i;for(const o of this.args){if(r++,t=o.evaluate(e),t&&t instanceof Jp&&!t.available&&(i||(i=t),t=null,r===this.args.length))return i;if(t!==null)break}return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var kW=q4;class fI{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let o=1;o<e.length-1;o+=2){const a=e[o];if(typeof a!="string")return t.error(`Expected string, but found ${typeof a} instead.`,o);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",o);const s=t.parse(e[o+1],o+1);if(!s)return null;r.push([a,s])}const i=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return i?new fI(r,i):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[t,r]of this.bindings)e.push(t,r.serialize());return e.push(this.result.serialize()),e}}var TW=fI;class pI{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,nr),i=t.parse(e[2],2,Ld(t.expectedType||eo));if(!r||!i)return null;const o=i.type;return new pI(o.itemType,r,i)}evaluate(e){const t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new ju(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new ju(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new ju(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Afe=pI;class mI{constructor(e,t){this.type=Xi,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,eo),i=t.parse(e[2],2,eo);return!r||!i?null:eI(r.type,[Xi,Ao,nr,Bw,eo])?new mI(r,i):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ds(r.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(r==null)return!1;if(!Cb(t,["boolean","string","number","null"]))throw new ju(`Expected first argument to be of type boolean, string, number or null, but found ${Ds(eu(t))} instead.`);if(!Cb(r,["string","array"]))throw new ju(`Expected second argument to be of type array or string, but found ${Ds(eu(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var cfe=mI;class V4{constructor(e,t,r){this.type=nr,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,eo),i=t.parse(e[2],2,eo);if(!r||!i)return null;if(!eI(r.type,[Xi,Ao,nr,Bw,eo]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ds(r.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,nr);return o?new V4(r,i,o):null}else return new V4(r,i)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!Cb(t,["boolean","string","number","null"]))throw new ju(`Expected first argument to be of type boolean, string, number or null, but found ${Ds(eu(t))} instead.`);if(!Cb(r,["string","array"]))throw new ju(`Expected second argument to be of type array or string, but found ${Ds(eu(r))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(e);return r.indexOf(t,i)}return r.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var dfe=V4;class gI{constructor(e,t,r,i,o,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=o,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let r,i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const o={},a=[];for(let f=2;f<e.length-1;f+=2){let C=e[f];const O=e[f+1];Array.isArray(C)||(C=[C]);const E=t.concat(f);if(C.length===0)return E.error("Expected at least one branch label.");for(const D of C){if(typeof D!="number"&&typeof D!="string")return E.error("Branch labels must be numbers or strings.");if(typeof D=="number"&&Math.abs(D)>Number.MAX_SAFE_INTEGER)return E.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof D=="number"&&Math.floor(D)!==D)return E.error("Numeric branch labels must be integer values.");if(!r)r=eu(D);else if(E.checkSubtype(r,eu(D)))return null;if(typeof o[String(D)]<"u")return E.error("Branch labels must be unique.");o[String(D)]=a.length}const P=t.parse(O,f,i);if(!P)return null;i=i||P.type,a.push(P)}const s=t.parse(e[1],1,eo);if(!s)return null;const d=t.parse(e[e.length-1],e.length-1,i);return!d||s.type.kind!=="value"&&t.concat(1).checkSubtype(r,s.type)?null:new gI(r,i,s,o,a,d)}evaluate(e){const t=this.input.evaluate(e);return(eu(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),r=[],i={};for(const a of t){const s=i[this.cases[a]];s===void 0?(i[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[s][1].push(a)}const o=a=>this.inputType.kind==="number"?Number(a):a;for(const[a,s]of r)s.length===1?e.push(o(s[0])):e.push(s.map(o)),e.push(this.outputs[a].serialize());return e.push(this.otherwise.serialize()),e}}var hfe=gI;class yI{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const i=[];for(let a=1;a<e.length-1;a+=2){const s=t.parse(e[a],a,Xi);if(!s)return null;const d=t.parse(e[a+1],a+1,r);if(!d)return null;i.push([s,d]),r=r||d.type}const o=t.parse(e[e.length-1],e.length-1,r);return o?new yI(r,i,o):null}evaluate(e){for(const[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var ffe=yI;class H4{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,eo),i=t.parse(e[2],2,nr);if(!r||!i)return null;if(!eI(r.type,[Ld(eo),Ao,eo]))return t.error(`Expected first argument to be of type array or string, but found ${Ds(r.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,nr);return o?new H4(r.type,r,i,o):null}else return new H4(r.type,r,i)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!Cb(t,["string","array"]))throw new ju(`Expected first argument to be of type array or string, but found ${Ds(eu(t))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(e);return t.slice(r,i)}return t.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var pfe=H4;function lP(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function mfe(n,e,t){return e===t}function gfe(n,e,t){return e!==t}function yfe(n,e,t){return e<t}function vfe(n,e,t){return e>t}function Cfe(n,e,t){return e<=t}function _fe(n,e,t){return e>=t}function KW(n,e,t,r){return r.compare(e,t)===0}function bfe(n,e,t,r){return!KW(n,e,t,r)}function xfe(n,e,t,r){return r.compare(e,t)<0}function wfe(n,e,t,r){return r.compare(e,t)>0}function Mfe(n,e,t,r){return r.compare(e,t)<=0}function Sfe(n,e,t,r){return r.compare(e,t)>=0}function Dv(n,e,t){const r=n!=="=="&&n!=="!=";return class PW{constructor(o,a,s){this.type=Xi,this.lhs=o,this.rhs=a,this.collator=s,this.hasUntypedArgument=o.type.kind==="value"||a.type.kind==="value"}static parse(o,a){if(o.length!==3&&o.length!==4)return a.error("Expected two or three arguments.");const s=o[0];let d=a.parse(o[1],1,eo);if(!d)return null;if(!lP(s,d.type))return a.concat(1).error(`"${s}" comparisons are not supported for type '${Ds(d.type)}'.`);let f=a.parse(o[2],2,eo);if(!f)return null;if(!lP(s,f.type))return a.concat(2).error(`"${s}" comparisons are not supported for type '${Ds(f.type)}'.`);if(d.type.kind!==f.type.kind&&d.type.kind!=="value"&&f.type.kind!=="value")return a.error(`Cannot compare types '${Ds(d.type)}' and '${Ds(f.type)}'.`);r&&(d.type.kind==="value"&&f.type.kind!=="value"?d=new Up(f.type,[d]):d.type.kind!=="value"&&f.type.kind==="value"&&(f=new Up(d.type,[f])));let C=null;if(o.length===4){if(d.type.kind!=="string"&&f.type.kind!=="string"&&d.type.kind!=="value"&&f.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(C=a.parse(o[3],3,Iw),!C)return null}return new PW(d,f,C)}evaluate(o){const a=this.lhs.evaluate(o),s=this.rhs.evaluate(o);if(r&&this.hasUntypedArgument){const d=eu(a),f=eu(s);if(d.kind!==f.kind||!(d.kind==="string"||d.kind==="number"))throw new ju(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${d.kind}, ${f.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const d=eu(a),f=eu(s);if(d.kind!=="string"||f.kind!=="string")return e(o,a,s)}return this.collator?t(o,a,s,this.collator.evaluate(o)):e(o,a,s)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}serialize(){const o=[n];return this.eachChild(a=>{o.push(a.serialize())}),o}}}const Efe=Dv("==",mfe,KW),Ofe=Dv("!=",gfe,bfe),Bfe=Dv("<",yfe,xfe),Ife=Dv(">",vfe,wfe),kfe=Dv("<=",Cfe,Mfe),Tfe=Dv(">=",_fe,Sfe);class vI{constructor(e,t,r,i,o,a){this.type=Ao,this.number=e,this.locale=t,this.currency=r,this.unit=i,this.minFractionDigits=o,this.maxFractionDigits=a}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const r=t.parse(e[1],1,nr);if(!r)return null;const i=e[2];if(typeof i!="object"||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=t.parse(i.locale,1,Ao),!o))return null;let a=null;if(i.currency&&(a=t.parse(i.currency,1,Ao),!a))return null;let s=null;if(i.unit&&(s=t.parse(i.unit,1,Ao),!s))return null;let d=null;if(i["min-fraction-digits"]&&(d=t.parse(i["min-fraction-digits"],1,nr),!d))return null;let f=null;return i["max-fraction-digits"]&&(f=t.parse(i["max-fraction-digits"],1,nr),!f)?null:new vI(r,o,a,s,d,f)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class CI{constructor(e){this.type=nr,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${Ds(r.type)} instead.`):new CI(r):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return t.length;if(Array.isArray(t))return t.length;throw new ju(`Expected value to be of type string or array, but found ${Ds(eu(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Kfe=CI;const DW={"==":Efe,"!=":Ofe,">":Ife,"<":Bfe,">=":Tfe,"<=":kfe,array:Up,at:Afe,boolean:Up,case:ffe,coalesce:kW,collator:Pw,format:Tw,image:Kw,in:cfe,"index-of":dfe,interpolate:Qp,"interpolate-hcl":Qp,"interpolate-lab":Qp,length:Kfe,let:TW,literal:$4,match:hfe,number:Up,"number-format":vI,object:Up,slice:pfe,step:CW,string:Up,"to-boolean":Cy,"to-color":Cy,"to-number":Cy,"to-string":Cy,var:yW,within:lI};function uP(n,[e,t,r,i]){e=e.evaluate(n),t=t.evaluate(n),r=r.evaluate(n);const o=i?i.evaluate(n):1,a=hW(e,t,r,o);if(a)throw new ju(a);return new tu(e/255*o,t/255*o,r/255*o,o)}function AP(n,e){return n in e}function uE(n,e){const t=e[n];return typeof t>"u"?null:t}function Pfe(n,e,t,r){for(;t<=r;){const i=t+r>>1;if(e[i]===n)return!0;e[i]>n?r=i-1:t=i+1}return!1}function W0(n){return{type:n}}Pv.register(DW,{error:[khe,[Ao],(n,[e])=>{throw new ju(e.evaluate(n))}],typeof:[Ao,[eo],(n,[e])=>Ds(eu(e.evaluate(n)))],"to-rgba":[Ld(nr,4),[$p],(n,[e])=>e.evaluate(n).toArray()],rgb:[$p,[nr,nr,nr],uP],rgba:[$p,[nr,nr,nr,nr],uP],has:{type:Xi,overloads:[[[Ao],(n,[e])=>AP(e.evaluate(n),n.properties())],[[Ao,Ny],(n,[e,t])=>AP(e.evaluate(n),t.evaluate(n))]]},get:{type:eo,overloads:[[[Ao],(n,[e])=>uE(e.evaluate(n),n.properties())],[[Ao,Ny],(n,[e,t])=>uE(e.evaluate(n),t.evaluate(n))]]},"feature-state":[eo,[Ao],(n,[e])=>uE(e.evaluate(n),n.featureState||{})],properties:[Ny,[],n=>n.properties()],"geometry-type":[Ao,[],n=>n.geometryType()],id:[eo,[],n=>n.id()],zoom:[nr,[],n=>n.globals.zoom],pitch:[nr,[],n=>n.globals.pitch||0],"distance-from-center":[nr,[],n=>n.distanceFromCenter()],"heatmap-density":[nr,[],n=>n.globals.heatmapDensity||0],"line-progress":[nr,[],n=>n.globals.lineProgress||0],"sky-radial-progress":[nr,[],n=>n.globals.skyRadialProgress||0],accumulated:[eo,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[nr,W0(nr),(n,e)=>{let t=0;for(const r of e)t+=r.evaluate(n);return t}],"*":[nr,W0(nr),(n,e)=>{let t=1;for(const r of e)t*=r.evaluate(n);return t}],"-":{type:nr,overloads:[[[nr,nr],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[nr],(n,[e])=>-e.evaluate(n)]]},"/":[nr,[nr,nr],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[nr,[nr,nr],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[nr,[],()=>Math.LN2],pi:[nr,[],()=>Math.PI],e:[nr,[],()=>Math.E],"^":[nr,[nr,nr],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[nr,[nr],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[nr,[nr],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[nr,[nr],(n,[e])=>Math.log(e.evaluate(n))],log2:[nr,[nr],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[nr,[nr],(n,[e])=>Math.sin(e.evaluate(n))],cos:[nr,[nr],(n,[e])=>Math.cos(e.evaluate(n))],tan:[nr,[nr],(n,[e])=>Math.tan(e.evaluate(n))],asin:[nr,[nr],(n,[e])=>Math.asin(e.evaluate(n))],acos:[nr,[nr],(n,[e])=>Math.acos(e.evaluate(n))],atan:[nr,[nr],(n,[e])=>Math.atan(e.evaluate(n))],min:[nr,W0(nr),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[nr,W0(nr),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[nr,[nr],(n,[e])=>Math.abs(e.evaluate(n))],round:[nr,[nr],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[nr,[nr],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[nr,[nr],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[Xi,[Ao,eo],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[Xi,[eo],(n,[e])=>n.id()===e.value],"filter-type-==":[Xi,[Ao],(n,[e])=>n.geometryType()===e.value],"filter-<":[Xi,[Ao,eo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<i}],"filter-id-<":[Xi,[eo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<r}],"filter->":[Xi,[Ao,eo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>i}],"filter-id->":[Xi,[eo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>r}],"filter-<=":[Xi,[Ao,eo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[Xi,[eo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<=r}],"filter->=":[Xi,[Ao,eo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[Xi,[eo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>=r}],"filter-has":[Xi,[eo],(n,[e])=>e.value in n.properties()],"filter-has-id":[Xi,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Xi,[Ld(Ao)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[Xi,[Ld(eo)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[Xi,[Ao,Ld(eo)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[Xi,[Ao,Ld(eo)],(n,[e,t])=>Pfe(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:Xi,overloads:[[[Xi,Xi],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[W0(Xi),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:Xi,overloads:[[[Xi,Xi],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[W0(Xi),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[Xi,[Xi],(n,[e])=>!e.evaluate(n)],"is-supported-script":[Xi,[Ao],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[Ao,[Ao],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[Ao,[Ao],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[Ao,W0(eo),(n,e)=>e.map(t=>M_(t.evaluate(n))).join("")],"resolved-locale":[Ao,[Iw],(n,[e])=>e.evaluate(n).resolvedLocale()]});var LW=DW;function HO(n){return{result:"success",value:n}}function ty(n){return{result:"error",value:n}}function Dfe(n){return n["property-type"]==="data-driven"}function Lfe(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function FW(n){return!!n.expression&&n.expression.interpolated}function _I(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function bI(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Ffe(n){return n}function xI(n,e){const t=e.type==="color",r=n.stops&&typeof n.stops[0][0]=="object",i=r||n.property!==void 0,o=r||!i,a=n.type||(FW(e)?"exponential":"interval");if(t&&(n=cW({},n),n.stops&&(n.stops=n.stops.map(C=>[C[0],tu.parse(C[1])])),n.default?n.default=tu.parse(n.default):n.default=tu.parse(e.default)),n.colorSpace&&n.colorSpace!=="rgb"&&!IW[n.colorSpace])throw new Error(`Unknown color space: ${n.colorSpace}`);let s,d,f;if(a==="exponential")s=cP;else if(a==="interval")s=Rfe;else if(a==="categorical"){s=Ufe,d=Object.create(null);for(const C of n.stops)d[C[0]]=C[1];f=typeof n.stops[0][0]}else if(a==="identity")s=zfe;else throw new Error(`Unknown function type "${a}"`);if(r){const C={},O=[];for(let D=0;D<n.stops.length;D++){const $=n.stops[D],H=$[0].zoom;C[H]===void 0&&(C[H]={zoom:H,type:n.type,property:n.property,default:n.default,stops:[]},O.push(H)),C[H].stops.push([$[0].value,$[1]])}const E=[];for(const D of O)E.push([C[D].zoom,xI(C[D],e)]);const P={name:"linear"};return{kind:"composite",interpolationType:P,interpolationFactor:Qp.interpolationFactor.bind(void 0,P),zoomStops:E.map(D=>D[0]),evaluate({zoom:D},$){return cP({stops:E,base:n.base},e,D).evaluate(D,$)}}}else if(o){const C=a==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:C,interpolationFactor:Qp.interpolationFactor.bind(void 0,C),zoomStops:n.stops.map(O=>O[0]),evaluate:({zoom:O})=>s(n,e,O,d,f)}}else return{kind:"source",evaluate(C,O){const E=O&&O.properties?O.properties[n.property]:void 0;return E===void 0?Vb(n.default,e.default):s(n,e,E,d,f)}}}function Vb(n,e,t){if(n!==void 0)return n;if(e!==void 0)return e;if(t!==void 0)return t}function Ufe(n,e,t,r,i){const o=typeof t===i?r[t]:void 0;return Vb(o,n.default,e.default)}function Rfe(n,e,t){if(_I(t)!=="number")return Vb(n.default,e.default);const r=n.stops.length;if(r===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[r-1][0])return n.stops[r-1][1];const i=Lw(n.stops.map(o=>o[0]),t);return n.stops[i][1]}function cP(n,e,t){const r=n.base!==void 0?n.base:1;if(_I(t)!=="number")return Vb(n.default,e.default);const i=n.stops.length;if(i===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[i-1][0])return n.stops[i-1][1];const o=Lw(n.stops.map(C=>C[0]),t),a=jfe(t,r,n.stops[o][0],n.stops[o+1][0]),s=n.stops[o][1],d=n.stops[o+1][1];let f=bW[e.type]||Ffe;if(n.colorSpace&&n.colorSpace!=="rgb"){const C=IW[n.colorSpace];f=(O,E)=>C.reverse(C.interpolate(C.forward(O),C.forward(E),a))}return typeof s.evaluate=="function"?{evaluate(...C){const O=s.evaluate.apply(void 0,C),E=d.evaluate.apply(void 0,C);if(!(O===void 0||E===void 0))return f(O,E,a)}}:f(s,d,a)}function zfe(n,e,t){return e.type==="color"?t=tu.parse(t):e.type==="formatted"?t=Ph.fromString(t.toString()):e.type==="resolvedImage"?t=Jp.fromString(t.toString()):_I(t)!==e.type&&(e.type!=="enum"||!e.values[t])&&(t=void 0),Vb(t,n.default,e.default)}function jfe(n,e,t,r){const i=r-t,o=n-t;return i===0?0:e===1?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}class UW{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new fW,this._defaultValue=t?Gfe(t):null,this._enumValues=t&&t.type==="enum"?t.values:null}evaluateWithoutErrorHandling(e,t,r,i,o,a,s,d){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=d||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,o,a,s,d){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=d||null;try{const f=this.expression.evaluate(this._evaluator);if(f==null||typeof f=="number"&&f!==f)return this._defaultValue;if(this._enumValues&&!(f in this._enumValues))throw new ju(`Expected value to be one of ${Object.keys(this._enumValues).map(C=>JSON.stringify(C)).join(", ")}, but found ${JSON.stringify(f)} instead.`);return f}catch(f){return this._warningHistory[f.message]||(this._warningHistory[f.message]=!0,typeof console<"u"&&console.warn(f.message)),this._defaultValue}}}function RW(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in LW}function Z4(n,e){const t=new vW(LW,[],e?Wfe(e):void 0),r=t.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return r?HO(new UW(r,e)):ty(t.errors)}class ZO{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!uI(t.expression)}evaluateWithoutErrorHandling(e,t,r,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,o,a)}evaluate(e,t,r,i,o,a){return this._styleExpression.evaluate(e,t,r,i,o,a)}}class XO{constructor(e,t,r,i){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!uI(t.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,t,r,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,o,a)}evaluate(e,t,r,i,o,a){return this._styleExpression.evaluate(e,t,r,i,o,a)}interpolationFactor(e,t,r){return this.interpolationType?Qp.interpolationFactor(this.interpolationType,e,t,r):0}}function zW(n,e){if(n=Z4(n,e),n.result==="error")return n;const t=n.value.expression,r=Dw(t);if(!r&&!Dfe(e))return ty([new Pf("","data expressions not supported")]);const i=AI(t,["zoom","pitch","distance-from-center"]);if(!i&&!Lfe(e))return ty([new Pf("","zoom expressions not supported")]);const o=w3(t);if(!o&&!i)return ty([new Pf("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof Pf)return ty([o]);if(o instanceof Qp&&!FW(e))return ty([new Pf("",'"interpolate" expressions cannot be used with this property')]);if(!o)return HO(r?new ZO("constant",n.value):new ZO("source",n.value));const a=o instanceof Qp?o.interpolation:void 0;return HO(r?new XO("camera",n.value,o.labels,a):new XO("composite",n.value,o.labels,a))}class Fw{constructor(e,t){this._parameters=e,this._specification=t,cW(this,xI(this._parameters,this._specification))}static deserialize(e){return new Fw(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Nfe(n,e){if(bI(n))return new Fw(n,e);if(RW(n)){const t=zW(n,e);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return t.value}else{let t=n;return typeof n=="string"&&e.type==="color"&&(t=tu.parse(n)),{kind:"constant",evaluate:()=>t}}}function w3(n){let e=null;if(n instanceof TW)e=w3(n.result);else if(n instanceof kW){for(const t of n.args)if(e=w3(t),e)break}else(n instanceof CW||n instanceof Qp)&&n.input instanceof Pv&&n.input.name==="zoom"&&(e=n);return e instanceof Pf||n.eachChild(t=>{const r=w3(t);r instanceof Pf?e=r:!e&&r?e=new Pf("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Pf("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function Wfe(n){const e={color:$p,string:Ao,number:nr,enum:Ao,boolean:Xi,formatted:kw,resolvedImage:qb};return n.type==="array"?Ld(e[n.value]||eo,n.length):e[n.type]}function Gfe(n){return n.type==="color"&&(bI(n.default)||Array.isArray(n.default))?new tu(0,0,0,0):n.type==="color"?tu.parse(n.default)||null:n.default===void 0?null:n.default}function _b(n){return typeof n=="object"?["literal",n]:n}function $fe(n,e){let t=n.stops;if(!t)return Qfe(n,e);const r=t&&typeof t[0][0]=="object",i=r||n.property!==void 0,o=r||!i;return t=t.map(a=>!i&&e.tokens&&typeof a[1]=="string"?[a[0],Hfe(a[1])]:[a[0],_b(a[1])]),r?Yfe(n,e,t):o?Vfe(n,e,t):JO(n,e,t)}function Qfe(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const r=[e.type==="color"?"to-color":e.type,t,_b(n.default)];return e.type==="array"&&r.splice(1,0,e.value,e.length||null),r}}function wI(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Yfe(n,e,t){const r={},i={},o=[];for(let s=0;s<t.length;s++){const d=t[s],f=d[0].zoom;r[f]===void 0&&(r[f]={zoom:f,type:n.type,property:n.property,default:n.default},i[f]=[],o.push(f)),i[f].push([d[0].value,d[1]])}if(SI({},e)==="exponential"){const s=[wI(n),["linear"],["zoom"]];for(const d of o){const f=JO(r[d],e,i[d]);Gy(s,d,f,!1)}return s}else{const s=["step",["zoom"]];for(const d of o){const f=JO(r[d],e,i[d]);Gy(s,d,f,!0)}return MI(s),s}}function qfe(n,e){if(n!==void 0)return n;if(e!==void 0)return e}function dP(n,e){const t=_b(qfe(n.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function JO(n,e,t){const r=SI(n,e),i=["get",n.property];if(r==="categorical"&&typeof t[0][0]=="boolean"){const o=["case"];for(const a of t)o.push(["==",i,a[0]],a[1]);return o.push(dP(n,e)),o}else if(r==="categorical"){const o=["match",i];for(const a of t)Gy(o,a[0],a[1],!1);return o.push(dP(n,e)),o}else if(r==="interval"){const o=["step",["number",i]];for(const a of t)Gy(o,a[0],a[1],!0);return MI(o),n.default===void 0?o:["case",["==",["typeof",i],"number"],o,_b(n.default)]}else if(r==="exponential"){const o=n.base!==void 0?n.base:1,a=[wI(n),o===1?["linear"]:["exponential",o],["number",i]];for(const s of t)Gy(a,s[0],s[1],!1);return n.default===void 0?a:["case",["==",["typeof",i],"number"],a,_b(n.default)]}else throw new Error(`Unknown property function type ${r}`)}function Vfe(n,e,t,r=["zoom"]){const i=SI(n,e);let o,a=!1;if(i==="interval")o=["step",r],a=!0;else if(i==="exponential"){const s=n.base!==void 0?n.base:1;o=[wI(n),s===1?["linear"]:["exponential",s],r]}else throw new Error(`Unknown zoom function type "${i}"`);for(const s of t)Gy(o,s[0],s[1],a);return MI(o),o}function MI(n){n[0]==="step"&&n.length===3&&(n.push(0),n.push(n[3]))}function Gy(n,e,t,r){n.length>3&&e===n[n.length-2]||(r&&n.length===2||n.push(e),n.push(t))}function SI(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function Hfe(n){const e=["concat"],t=/{([^{}]+)}/g;let r=0;for(let i=t.exec(n);i!==null;i=t.exec(n)){const o=n.slice(r,t.lastIndex-i[0].length);r=t.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(e.length===1)return n;if(r<n.length)e.push(n.slice(r));else if(e.length===2)return["to-string",e[1]];return e}function Zfe(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function eB(n){if(Array.isArray(n))return n.map(eB);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const e={};for(const t in n)e[t]=eB(n[t]);return e}return Zfe(n)}function EI(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const e of n.slice(1))if(!EI(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function Xfe(n,e="fill"){if(n==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};EI(n)||(n=X4(n));const t=n;let r=!0;try{r=Jfe(t)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
and paste the contents of this message in the report.
Thank you!
Filter Expression:
${JSON.stringify(t,null,2)}
        `)}const i=AW[`filter_${e}`],o=Z4(r,i);let a=null;if(o.result==="error")throw new Error(o.value.map(C=>`${C.key}: ${C.message}`).join(", "));a=(C,O,E)=>o.value.evaluate(C,O,{},E);let s=null,d=null;if(r!==t){const C=Z4(t,i);if(C.result==="error")throw new Error(C.value.map(O=>`${O.key}: ${O.message}`).join(", "));s=(O,E,P,D,$)=>C.value.evaluate(O,E,{},P,void 0,void 0,D,$),d=!Dw(C.value.expression)}a=a;const f=WW(r);return{filter:a,dynamicFilter:s||void 0,needGeometry:f,needFeature:!!d}}function Jfe(n){if(!$y(n))return n;let e=eB(n);return NW(e),e=jW(e),e}function jW(n){if(!Array.isArray(n))return n;const e=npe(n);return e===!0?e:e.map(t=>jW(t))}function NW(n){let e=!1;const t=[];if(n[0]==="case"){for(let r=1;r<n.length-1;r+=2)e=e||$y(n[r]),t.push(n[r+1]);t.push(n[n.length-1])}else if(n[0]==="match"){e=e||$y(n[1]);for(let r=2;r<n.length-1;r+=2)t.push(n[r+1]);t.push(n[n.length-1])}else if(n[0]==="step"){e=e||$y(n[1]);for(let r=1;r<n.length-1;r+=2)t.push(n[r+1])}e&&(n.length=0,n.push("any",...t));for(let r=1;r<n.length;r++)NW(n[r])}function $y(n){if(!Array.isArray(n))return!1;if(epe(n[0]))return!0;for(let e=1;e<n.length;e++){const t=n[e];if($y(t))return!0}return!1}function epe(n){return n==="pitch"||n==="distance-from-center"}const tpe=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function npe(n){if(tpe.has(n[0]))for(let e=1;e<n.length;e++){const t=n[e];if($y(t))return!0}return n}function rpe(n,e){return n<e?-1:n>e?1:0}function WW(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(let e=1;e<n.length;e++)if(WW(n[e]))return!0;return!1}function X4(n){if(!n)return!0;const e=n[0];return n.length<=1?e!=="any":e==="=="?AE(n[1],n[2],"=="):e==="!="?R2(AE(n[1],n[2],"==")):e==="<"||e===">"||e==="<="||e===">="?AE(n[1],n[2],e):e==="any"?ipe(n.slice(1)):e==="all"?["all"].concat(n.slice(1).map(X4)):e==="none"?["all"].concat(n.slice(1).map(X4).map(R2)):e==="in"?hP(n[1],n.slice(2)):e==="!in"?R2(hP(n[1],n.slice(2))):e==="has"?fP(n[1]):e==="!has"?R2(fP(n[1])):e==="within"?n:!0}function AE(n,e,t){switch(n){case"$type":return[`filter-type-${t}`,e];case"$id":return[`filter-id-${t}`,e];default:return[`filter-${t}`,n,e]}}function ipe(n){return["any"].concat(n.map(X4))}function hP(n,e){if(e.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(t=>typeof t!=typeof e[0])?["filter-in-large",n,["literal",e.sort(rpe)]]:["filter-in-small",n,["literal",e]]}}function fP(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function R2(n){return["!",n]}var ope=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ape(n,e){const t={};for(const r in n)r!=="ref"&&(t[r]=n[r]);return ope.forEach(r=>{r in e&&(t[r]=e[r])}),t}function spe(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=ape(n[t],e[n[t].ref]));return n}function lpe(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var upe={};(function(n){var e=function(){var t=function(H,Q,N,Z){for(N=N||{},Z=H.length;Z--;N[H[Z]]=Q);return N},r=[1,12],i=[1,13],o=[1,9],a=[1,10],s=[1,11],d=[1,14],f=[1,15],C=[14,18,22,24],O=[18,22],E=[22,24],P={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(Q,N,Z,ae,pe,fe,X){var oe=fe.length-1;switch(pe){case 1:this.$=new String(Q.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
`).replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(Q),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=fe[oe-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=fe[oe-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[fe[oe-2],fe[oe]];break;case 16:this.$={},this.$[fe[oe][0]]=fe[oe][1];break;case 17:this.$=fe[oe-2],fe[oe-2][fe[oe][0]]=fe[oe][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[fe[oe]];break;case 21:this.$=fe[oe-2],fe[oe-2].push(fe[oe]);break}},table:[{3:5,4:r,5:6,6:i,7:3,8:o,9:4,10:a,11:s,12:1,13:2,15:7,16:8,17:d,23:f},{1:[3]},{14:[1,16]},t(C,[2,7]),t(C,[2,8]),t(C,[2,9]),t(C,[2,10]),t(C,[2,11]),t(C,[2,12]),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t([14,18,21,22,24],[2,1]),t(C,[2,2]),{3:20,4:r,18:[1,17],19:18,20:19},{3:5,4:r,5:6,6:i,7:3,8:o,9:4,10:a,11:s,13:23,15:7,16:8,17:d,23:f,24:[1,21],25:22},{1:[2,6]},t(C,[2,13]),{18:[1,24],22:[1,25]},t(O,[2,16]),{21:[1,26]},t(C,[2,18]),{22:[1,28],24:[1,27]},t(E,[2,20]),t(C,[2,14]),{3:20,4:r,20:29},{3:5,4:r,5:6,6:i,7:3,8:o,9:4,10:a,11:s,13:30,15:7,16:8,17:d,23:f},t(C,[2,19]),{3:5,4:r,5:6,6:i,7:3,8:o,9:4,10:a,11:s,13:31,15:7,16:8,17:d,23:f},t(O,[2,17]),t(O,[2,15]),t(E,[2,21])],defaultActions:{16:[2,6]},parseError:function(Q,N){if(N.recoverable)this.trace(Q);else throw new Error(Q)},parse:function(Q){var N=this,Z=[0],ae=[null],pe=[],fe=this.table,X="",oe=0,Ce=0,we=2,Te=1,Pe=pe.slice.call(arguments,1),he=Object.create(this.lexer),$e={yy:{}};for(var ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ye)&&($e.yy[ye]=this.yy[ye]);he.setInput(Q,$e.yy),$e.yy.lexer=he,$e.yy.parser=this,typeof he.yylloc>"u"&&(he.yylloc={});var gt=he.yylloc;pe.push(gt);var yt=he.options&&he.options.ranges;typeof $e.yy.parseError=="function"?this.parseError=$e.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ge;return ge=he.lex()||Te,typeof ge!="number"&&(ge=N.symbols_[ge]||ge),ge}for(var ft,Re,Ve,Xe,Jt={},Ht,bt,Qt,Yt;;){if(Re=Z[Z.length-1],this.defaultActions[Re]?Ve=this.defaultActions[Re]:((ft===null||typeof ft>"u")&&(ft=st()),Ve=fe[Re]&&fe[Re][ft]),typeof Ve>"u"||!Ve.length||!Ve[0]){var ke="";Yt=[];for(Ht in fe[Re])this.terminals_[Ht]&&Ht>we&&Yt.push("'"+this.terminals_[Ht]+"'");he.showPosition?ke="Parse error on line "+(oe+1)+`:
`+he.showPosition()+`
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[ft]||ft)+"'":ke="Parse error on line "+(oe+1)+": Unexpected "+(ft==Te?"end of input":"'"+(this.terminals_[ft]||ft)+"'"),this.parseError(ke,{text:he.match,token:this.terminals_[ft]||ft,line:he.yylineno,loc:gt,expected:Yt})}if(Ve[0]instanceof Array&&Ve.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Re+", token: "+ft);switch(Ve[0]){case 1:Z.push(ft),ae.push(he.yytext),pe.push(he.yylloc),Z.push(Ve[1]),ft=null,Ce=he.yyleng,X=he.yytext,oe=he.yylineno,gt=he.yylloc;break;case 2:if(bt=this.productions_[Ve[1]][1],Jt.$=ae[ae.length-bt],Jt._$={first_line:pe[pe.length-(bt||1)].first_line,last_line:pe[pe.length-1].last_line,first_column:pe[pe.length-(bt||1)].first_column,last_column:pe[pe.length-1].last_column},yt&&(Jt._$.range=[pe[pe.length-(bt||1)].range[0],pe[pe.length-1].range[1]]),Xe=this.performAction.apply(Jt,[X,Ce,oe,$e.yy,Ve[1],ae,pe].concat(Pe)),typeof Xe<"u")return Xe;bt&&(Z=Z.slice(0,-1*bt*2),ae=ae.slice(0,-1*bt),pe=pe.slice(0,-1*bt)),Z.push(this.productions_[Ve[1]][0]),ae.push(Jt.$),pe.push(Jt._$),Qt=fe[Z[Z.length-2]][Z[Z.length-1]],Z.push(Qt);break;case 3:return!0}}return!0}},D=function(){var H={EOF:1,parseError:function(N,Z){if(this.yy.parser)this.yy.parser.parseError(N,Z);else throw new Error(N)},setInput:function(Q,N){return this.yy=N||this.yy||{},this._input=Q,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Q=this._input[0];this.yytext+=Q,this.yyleng++,this.offset++,this.match+=Q,this.matched+=Q;var N=Q.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Q},unput:function(Q){var N=Q.length,Z=Q.split(/(?:\r\n?|\n)/g);this._input=Q+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var ae=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Z.length-1&&(this.yylineno-=Z.length-1);var pe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Z?(Z.length===ae.length?this.yylloc.first_column:0)+ae[ae.length-Z.length].length-Z[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[pe[0],pe[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Q){this.unput(this.match.slice(Q))},pastInput:function(){var Q=this.matched.substr(0,this.matched.length-this.match.length);return(Q.length>20?"...":"")+Q.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Q=this.match;return Q.length<20&&(Q+=this._input.substr(0,20-Q.length)),(Q.substr(0,20)+(Q.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Q=this.pastInput(),N=new Array(Q.length+1).join("-");return Q+this.upcomingInput()+`
`+N+"^"},test_match:function(Q,N){var Z,ae,pe;if(this.options.backtrack_lexer&&(pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pe.yylloc.range=this.yylloc.range.slice(0))),ae=Q[0].match(/(?:\r\n?|\n).*/g),ae&&(this.yylineno+=ae.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ae?ae[ae.length-1].length-ae[ae.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Q[0].length},this.yytext+=Q[0],this.match+=Q[0],this.matches=Q,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Q[0].length),this.matched+=Q[0],Z=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Z)return Z;if(this._backtrack){for(var fe in pe)this[fe]=pe[fe];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Q,N,Z,ae;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),fe=0;fe<pe.length;fe++)if(Z=this._input.match(this.rules[pe[fe]]),Z&&(!N||Z[0].length>N[0].length)){if(N=Z,ae=fe,this.options.backtrack_lexer){if(Q=this.test_match(Z,pe[fe]),Q!==!1)return Q;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(Q=this.test_match(N,pe[ae]),Q!==!1?Q:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var N=this.next();return N||this.lex()},begin:function(N){this.conditionStack.push(N)},popState:function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},pushState:function(N){this.begin(N)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(N,Z,ae,pe){switch(ae){case 0:break;case 1:return 6;case 2:return Z.yytext=Z.yytext.substr(1,Z.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return H}();P.lexer=D;function $(){this.yy={}}return $.prototype=P,P.Parser=$,new $}();typeof lpe<"u"&&(n.parser=e,n.Parser=e.Parser,n.parse=function(){return e.parse.apply(e,arguments)})})(upe);const GW={StyleExpression:UW,isExpression:RW,isExpressionFilter:EI,createExpression:Z4,createPropertyExpression:zW,normalizePropertyExpression:Nfe,ZoomConstantExpression:ZO,ZoomDependentExpression:XO,StylePropertyFunction:Fw},$W={convertFunction:$fe,createFunction:xI,isFunction:bI};var QW=typeof Object.assign=="function"?Object.assign:function(n,e){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(o!=null)for(var a in o)o.hasOwnProperty(a)&&(t[a]=o[a])}return t};function cE(n){return n*Math.PI/180}var mv=function(){for(var n=[],e=78271.51696402048;n.length<=24;e/=2)n.push(e);return n}();function YW(n,e){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(n,e);var t=document.createElement("canvas");return t.width=n,t.height=e,t}function Ape(n,e){for(var t=0,r=e.length;t<r;++t){var i=e[t];if(i<n&&t+1<r){var o=e[t]/e[t+1];return t+Math.log(e[t]/n)/Math.log(o)}}return r-1}var cpe=Array(256).join(" ");function tB(n,e){if(e>=.05){for(var t="",r=n.split(`
`),i=cpe.slice(0,Math.round(e/.1)),o=0,a=r.length;o<a;++o)o>0&&(t+=`
`),t+=r[o].split("").join(i);return t}return n}var dE;function qW(){return dE||(dE=YW(1,1).getContext("2d")),dE}function G0(n,e){return qW().measureText(n).width+(n.length-1)*e}var nB={};LO&&Oo(LO,Wi.CLEAR,function(){nB={}});function rB(n,e,t,r){if(n.indexOf(`
`)!==-1){for(var i=n.split(`
`),o=[],a=0,s=i.length;a<s;++a)o.push(rB(i[a],e,t,r));return o.join(`
`)}var d=t+","+e+","+n+","+r,f=nB[d];if(!f){var C=n.split(" ");if(C.length>1){var O=qW();O.font=e;for(var E=O.measureText("M").width,P=E*t,D="",o=[],a=0,s=C.length;a<s;++a){var $=C[a],H=D+(D?" ":"")+$;G0(H,r)<=P?D=H:(D&&o.push(D),D=$)}D&&o.push(D);for(var a=0,s=o.length;a<s&&s>1;++a){var Q=o[a];if(G0(Q,r)<P*.35){var N=a>0?G0(o[a-1],r):1/0,Z=a<s-1?G0(o[a+1],r):1/0;o.splice(a,1),s-=1,N<Z?(o[a-1]+=" "+Q,a-=1):o[a]=Q+" "+o[a]}}for(var a=0,s=o.length-1;a<s;++a){var ae=o[a],pe=o[a+1];if(G0(ae,r)>P*.7&&G0(pe,r)<P*.6){var fe=ae.split(" "),X=fe.pop();G0(X,r)<P*.2&&(o[a]=fe.join(" "),o[a+1]=X+" "+pe),s-=1}}f=o.join(`
`)}else f=n;f=tB(f,r),nB[d]=f}return f}var dpe=$W.isFunction,hpe=$W.convertFunction,fpe=GW.isExpression,ppe=GW.createPropertyExpression,mpe={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},gpe={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},ype=function(n,e){var t=ppe(n,e);if(t.result==="error")throw new Error(t.value.map(function(r){return"".concat(r.key,": ").concat(r.message)}).join(", "));return t.value},iB={},J4={zoom:0},z2,hE;function Li(n,e,t,r,i,o){var a=n.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[a]||(o[a]={});var s=o[a];if(!s[t]){var d=(n[e]||iB)[t],f=AW["".concat(e,"_").concat(n.type)][t];d===void 0&&(d=f.default);var C=fpe(d);if(!C&&dpe(d)&&(d=hpe(d,f),C=!0),C){var O=ype(d,f);s[t]=O.evaluate.bind(O)}else f.type=="color"&&(d=tu.parse(d)),s[t]=function(){return d}}return J4.zoom=r,s[t](J4,i)}function vpe(n,e,t,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),n in i||(i[n]=Xfe(e).filter),J4.zoom=r,i[n](J4,t)}function Om(n,e){if(n){if(n.a===0||e===0)return;var t=n.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(n.r*255/t)+","+Math.round(n.g*255/t)+","+Math.round(n.b*255/t)+","+t*e+")"}return n}var Cpe=/^([^]*)\{(.*)\}([^]*)$/;function fE(n,e){var t;do if(t=n.match(Cpe),t){var r=e[t[2]]||"";n=t[1]+r+t[3]}while(t);return n}function _pe(n,e,t,r,i,o,a){if(r===void 0&&(r=mv),typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");var s,d;if(o){if(typeof Image<"u"){var f=new Image;f.crossOrigin="anonymous",f.onload=function(){s=f,d=[f.width,f.height],n.changed(),f.onload=null},f.src=o}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var C=self;C.postMessage({action:"loadImage",src:o}),C.addEventListener("message",function(gt){gt.data.action==="imageLoaded"&&gt.data.src===o&&(s=gt.data.image,d=[s.width,s.height])})}}for(var O=spe(e.layers),E={},P=[],D={},$={},H={},Q={},N,Z=0,ae=O.length;Z<ae;++Z){var pe=O[Z],fe=pe.id;if(typeof t=="string"&&pe.source==t||t.indexOf(fe)!==-1){var X=pe["source-layer"];if(!N){N=pe.source;var oe=e.sources[N];if(!oe)throw new Error('Source "'.concat(N,'" is not defined'));var Ce=oe.type;if(Ce!=="vector"&&Ce!=="geojson")throw new Error('Source "'.concat(N,'" is not of type "vector" or "geojson", but "').concat(Ce,'"'))}var we=E[X];we||(we=[],E[X]=we),we.push({layer:pe,index:Z}),P.push(fe)}}var Te=new t_,Pe=new vy,he=[],$e=function(ye,gt){var yt=ye.getProperties(),st=E[yt.layer];if(st){var ft=r.indexOf(gt);ft==-1&&(ft=Ape(gt,r));for(var Re=mpe[ye.getGeometry().getType()],Ve={properties:yt,type:Re},Xe=-1,Jt=function(Qt,Yt){var ke=st[Qt],ge=ke.layer,Se=ge.id,ze=ge.layout||iB,it=ge.paint||iB;if(ze.visibility==="none"||"minzoom"in ge&&ft<ge.minzoom||"maxzoom"in ge&&ft>=ge.maxzoom)return"continue";var ot=ge.filter;if(!ot||vpe(Se,ot,Ve,ft,Q)){var St=void 0,Rt=void 0,zt=void 0,mt=void 0,or=void 0,gn=void 0,yn=ke.index;if(Re==3&&(ge.type=="fill"||ge.type=="fill-extrusion"))if(Rt=Li(ge,"paint",ge.type+"-opacity",ft,Ve,H),ge.type+"-pattern"in it){var tr=Li(ge,"paint",ge.type+"-pattern",ft,Ve,H);if(tr){var dr=typeof tr=="string"?fE(tr,yt):tr.toString();if(s&&i&&i[dr]){++Xe,gn=he[Xe],(!gn||!gn.getFill()||gn.getStroke()||gn.getText())&&(gn=new X0({fill:new vy}),he[Xe]=gn),zt=gn.getFill(),gn.setZIndex(yn);var Sr=dr+"."+Rt,Nr=$[Sr];if(!Nr){var yr=i[dr],_i=YW(yr.width,yr.height),Ee=_i.getContext("2d");Ee.globalAlpha=Rt,Ee.drawImage(s,yr.x,yr.y,yr.width,yr.height,0,0,yr.width,yr.height),Nr=Ee.createPattern(_i,"repeat"),$[Sr]=Nr}zt.setColor(Nr)}}}else St=Om(Li(ge,"paint",ge.type+"-color",ft,Ve,H),Rt),ge.type+"-outline-color"in it&&(or=Om(Li(ge,"paint",ge.type+"-outline-color",ft,Ve,H),Rt)),or||(or=St),(St||or)&&(++Xe,gn=he[Xe],(!gn||St&&!gn.getFill()||!St&&gn.getFill()||or&&!gn.getStroke()||!or&&gn.getStroke()||gn.getText())&&(gn=new X0({fill:St?new vy:void 0,stroke:or?new t_:void 0}),he[Xe]=gn),St&&(zt=gn.getFill(),zt.setColor(St)),or&&(mt=gn.getStroke(),mt.setColor(or),mt.setWidth(.5)),gn.setZIndex(yn));if(Re!=1&&ge.type=="line"){St=!("line-pattern"in it)&&"line-color"in it?Om(Li(ge,"paint","line-color",ft,Ve,H),Li(ge,"paint","line-opacity",ft,Ve,H)):void 0;var ee=Li(ge,"paint","line-width",ft,Ve,H);St&&ee>0&&(++Xe,gn=he[Xe],(!gn||!gn.getStroke()||gn.getFill()||gn.getText())&&(gn=new X0({stroke:new t_}),he[Xe]=gn),mt=gn.getStroke(),mt.setLineCap(Li(ge,"layout","line-cap",ft,Ve,H)),mt.setLineJoin(Li(ge,"layout","line-join",ft,Ve,H)),mt.setMiterLimit(Li(ge,"layout","line-miter-limit",ft,Ve,H)),mt.setColor(St),mt.setWidth(ee),mt.setLineDash(it["line-dasharray"]?Li(ge,"paint","line-dasharray",ft,Ve,H).map(function(ii){return ii*ee}):null),gn.setZIndex(yn))}var V=!1,Ke=null,At=0,Bt=void 0,kt=void 0,Lt=void 0;if((Re==1||Re==2)&&"icon-image"in ze){var fn=Li(ge,"layout","icon-image",ft,Ve,H);if(fn){Bt=typeof fn=="string"?fE(fn,yt):fn.toString();var Pn=void 0;if(s&&i&&i[Bt]){var On=Li(ge,"layout","icon-rotation-alignment",ft,Ve,H);if(Re==2){var g=ye.getGeometry();if(g.getFlatMidpoint||g.getFlatMidpoints){var Kt=g.getExtent(),Pr=Math.sqrt(Math.max(Math.pow((Kt[2]-Kt[0])/gt,2),Math.pow((Kt[3]-Kt[1])/gt,2)));if(Pr>150){var rr=g.getType()==="MultiLineString"?g.getFlatMidpoints():g.getFlatMidpoint();hE||(z2=[NaN,NaN],hE=new DO("Point",z2,[],{},null)),Pn=hE,z2[0]=rr[0],z2[1]=rr[1];var Le=Li(ge,"layout","symbol-placement",ft,Ve,H);if(Le==="line"&&On==="map")for(var ce=g.getStride(),xe=g.getFlatCoordinates(),Ie=0,je=xe.length-ce;Ie<je;Ie+=ce){var rt=xe[Ie],lt=xe[Ie+1],pt=xe[Ie+ce],et=xe[Ie+ce+1],Mt=Math.min(rt,pt),tn=Math.min(lt,et),qt=Math.max(rt,pt),en=Math.max(lt,et);if(rr[0]>=Mt&&rr[0]<=qt&&rr[1]>=tn&&rr[1]<=en){At=Math.atan2(lt-et,pt-rt);break}}}}}if(Re!==2||Pn){var Fn=Li(ge,"layout","icon-size",ft,Ve,H),Bn=it["icon-color"]!==void 0?Li(ge,"paint","icon-color",ft,Ve,H):null;if(!Bn||Bn.a!==0){var Sr=Bt+"."+Fn;if(Bn!==null&&(Sr+="."+Bn),kt=D[Sr],!kt){var Hn=i[Bt];kt=new LN({color:Bn?[Bn.r*255,Bn.g*255,Bn.b*255,Bn.a]:void 0,img:s,imgSize:d,size:[Hn.width,Hn.height],offset:[Hn.x,Hn.y],rotateWithView:On==="map",scale:Fn/Hn.pixelRatio,displacement:"icon-offset"in ze?Li(ge,"layout","icon-offset",ft,Ve,H).map(function(li){return-li*Hn.pixelRatio}):void 0}),D[Sr]=kt}}kt&&(++Xe,gn=he[Xe],(!gn||!gn.getImage()||gn.getFill()||gn.getStroke())&&(gn=new X0,he[Xe]=gn),gn.setGeometry(Pn),kt.setRotation(At+cE(Li(ge,"layout","icon-rotate",ft,Ve,H))),kt.setOpacity(Li(ge,"paint","icon-opacity",ft,Ve,H)),kt.setAnchor(gpe[Li(ge,"layout","icon-anchor",ft,Ve,H)]),gn.setImage(kt),Ke=gn.getText(),gn.setText(void 0),gn.setZIndex(yn),V=!0,Lt=!1)}else Lt=!0}}}if(Re==1&&ge.type==="circle"){++Xe,gn=he[Xe],(!gn||!gn.getImage()||gn.getFill()||gn.getStroke())&&(gn=new X0,he[Xe]=gn);var Or="circle-radius"in it?Li(ge,"paint","circle-radius",ft,Ve,H):5,cr=Om(Li(ge,"paint","circle-stroke-color",ft,Ve,H),Li(ge,"paint","circle-stroke-opacity",ft,Ve,H)),Qr=Om(Li(ge,"paint","circle-color",ft,Ve,H),Li(ge,"paint","circle-opacity",ft,Ve,H)),Br=Li(ge,"paint","circle-stroke-width",ft,Ve,H),Fr=Or+"."+cr+"."+Qr+"."+Br;kt=D[Fr],kt||(kt=new kN({radius:Or,stroke:cr&&Br>0?new t_({width:Br,color:cr}):void 0,fill:Qr?new vy({color:Qr}):void 0}),D[Fr]=kt),gn.setImage(kt),Ke=gn.getText(),gn.setText(void 0),gn.setGeometry(void 0),gn.setZIndex(yn),V=!0}var ar=void 0,di=void 0,Ui,to,ho,si;if("text-field"in ze){to=Math.round(Li(ge,"layout","text-size",ft,Ve,H));var fo=Li(ge,"layout","text-font",ft,Ve,H);Ui=Li(ge,"layout","text-line-height",ft,Ve,H),di=WO(a?a(fo):fo,to,Ui),ho=Li(ge,"layout","text-letter-spacing",ft,Ve,H),si=Li(ge,"layout","text-max-width",ft,Ve,H);var Na=Li(ge,"layout","text-field",ft,Ve,H);typeof Na=="object"&&Na.sections?Na.sections.length===1?ar=Na.toString():ar=Na.sections.reduce(function(ii,li,Jo){var Ka=li.fontStack?li.fontStack.split(","):fo,Dr=WO(a?a(Ka):Ka,to*(li.scale||1),Ui),Wa=li.text;if(Wa===`
`)return ii.push(`
`,""),ii;if(Re==2){ii.push(tB(Wa,ho),Dr);return}Wa=rB(Wa,Dr,si,ho).split(`
`);for(var vi=0,Ga=Wa.length;vi<Ga;++vi)vi>0&&ii.push(`
`,""),ii.push(Wa[vi],Dr);return ii},[]):ar=fE(Na,yt).trim(),Rt=Li(ge,"paint","text-opacity",ft,Ve,H)}if(ar&&Rt&&!Lt){V||(++Xe,gn=he[Xe],(!gn||!gn.getText()||gn.getFill()||gn.getStroke())&&(gn=new X0,he[Xe]=gn),gn.setImage(void 0),gn.setGeometry(void 0)),gn.getText()||gn.setText(Ke||new jAe({padding:[2,2,2,2]})),Ke=gn.getText();var Ia=ze["text-transform"];Ia=="uppercase"?ar=Array.isArray(ar)?ar.map(function(li,Jo){return Jo%2?li:li.toUpperCase()}):ar.toUpperCase():Ia=="lowercase"&&(ar=Array.isArray(ar)?ar.map(function(li,Jo){return Jo%2?li:li.toLowerCase()}):ar.toLowerCase());var Ei=Array.isArray(ar)?ar:Re==2?tB(ar,ho):rB(ar,di,si,ho);Ke.setText(Ei),Ke.setFont(di),Ke.setRotation(cE(Li(ge,"layout","text-rotate",ft,Ve,H)));var os=Li(ge,"layout","text-anchor",ft,Ve,H),Le=V||Re==1?"point":Li(ge,"layout","symbol-placement",ft,Ve,H);Ke.setPlacement(Le),Ke.setOverflow(Le==="point");var yi=Li(ge,"paint","text-halo-width",ft,Ve,H),Gn=Li(ge,"layout","text-offset",ft,Ve,H),ro=Li(ge,"paint","text-translate",ft,Ve,H),Co=0,Ri=0;if(Le=="point"){var _e="center";os.indexOf("left")!==-1?(_e="left",Ri=yi):os.indexOf("right")!==-1&&(_e="right",Ri=-yi),Ke.setTextAlign(_e);var Je=Li(ge,"layout","text-rotation-alignment",ft,Ve,H);Ke.setRotateWithView(Je=="map")}else Ke.setMaxAngle(cE(Li(ge,"layout","text-max-angle",ft,Ve,H))*ar.length/Ei.length),Ke.setTextAlign(),Ke.setRotateWithView(!1);var Zt="middle";os.indexOf("bottom")==0?(Zt="bottom",Co=-yi-.5*(Ui-1)*to):os.indexOf("top")==0&&(Zt="top",Co=yi+.5*(Ui-1)*to),Ke.setTextBaseline(Zt),Ke.setOffsetX(Gn[0]*to+Ri+ro[0]),Ke.setOffsetY(Gn[1]*to+Co+ro[1]),Pe.setColor(Om(Li(ge,"paint","text-color",ft,Ve,H),Rt)),Ke.setFill(Pe);var ln=Om(Li(ge,"paint","text-halo-color",ft,Ve,H),Rt);if(ln){Te.setColor(ln),yi*=2;var Ft=.5*to;Te.setWidth(yi<=Ft?yi:Ft),Ke.setStroke(Te)}else Ke.setStroke(void 0);var wn=Li(ge,"layout","text-padding",ft,Ve,H),hr=Ke.getPadding();wn!==hr[0]&&(hr[0]=wn,hr[1]=wn,hr[2]=wn,hr[3]=wn),gn.setZIndex(yn)}}},Ht=0,bt=st.length;Ht<bt;++Ht)Jt(Ht);if(Xe>-1)return he.length=Xe+1,he}};return n.setStyle($e),n.set("mapbox-source",N),n.set("mapbox-layers",P),$e}var VW={exports:{}};(function(){var n;VW.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return n},getLink:function(e){return"https://fonts.google.com/specimen/"+e.replace(/( )/g,"+")},normalizeName:function(e){return e}},n=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(Vf);var bpe=VW.exports;const xpe=Ba(bpe);var pP={},wpe=/font-family: ?([^;]*);/,Mpe=/("|')/g,j2;function Spe(n){if(!j2){j2={};for(var e=document.styleSheets,t=0,r=e.length;t<r;++t){var i=e[t];try{var o=i.rules||i.cssRules;if(o)for(var a=0,s=o.length;a<s;++a){var d=o[a];if(d.type==5){var f=d.cssText.match(wpe);j2[f[1].replace(Mpe,"")]=!0}}}catch{}}}return n in j2}var mP={},Epe=xpe.getNames();function Ope(n){var e=n.toString();if(e in mP)return n;for(var t=n.map(function(f){var C=WO(f,1).split(" ");return[C.slice(3).join(" ").replace(/"/g,""),C[1]+C[0]]}),r=0,i=t.length;r<i;++r){var o=t[r],a=o[0];if(!Spe(a)&&Epe.indexOf(a)!==-1){var s="https://fonts.googleapis.com/css?family="+a.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+s+'"]')){var d=document.createElement("link");d.href=s,d.rel="stylesheet",document.head.appendChild(d)}}}return mP[e]=!0,n}var HW=/^(.*)(\?.*)$/;function e5(n,e){return e&&n.indexOf(".")===0&&(n=e+n),n}function pE(n,e,t){n=e5(n,e);var r=n.match(HW);return r?r[1]+t+(r.length>2?r[2]:""):n+t}function Bpe(n,e,t,r,i){return new Promise(function(o,a){if(typeof e!="object"&&(e=JSON.parse(e)),e.version!=8)return a(new Error("glStyle version 8 required."));if(!(n instanceof NN||n instanceof lW))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,d,f,C;function O(){!C&&(!e.sprite||d)?(C=_pe(n,e,t,i,d,f,Ope),n.getStyle()?o():a(new Error("Nothing to show for source [".concat(t,"]")))):C?(n.setStyle(C),o()):a(new Error("Something went wrong trying to apply style."))}if(e.sprite){s=window.devicePixelRatio>=1.5?.5:1;var E=s==.5?"@2x":"",P=pE(e.sprite,r,E+".json");fetch(P,{credentials:"same-origin"}).then(function(D){return!D.ok&&E!==""?(P=pE(e.sprite,r,".json"),fetch(P,{credentials:"same-origin"})):D}).then(function(D){if(D.ok)return D.json();a(new Error("Problem fetching sprite from ".concat(P,": ").concat(D.statusText)))}).then(function(D){if(D===void 0)return a(new Error("No sprites found."));d=D,f=pE(e.sprite,r,E+".png"),O()}).catch(function(D){a(new Error("Sprites cannot be loaded: ".concat(P,": ").concat(D.message)))})}else O()})}var oB={};function Ipe(n,e){var t={id:e.id,type:e.type},r={};function i(o){var a=e.layout||{},s=e.paint||{};t.paint=s;var d=typeof n.getSource=="function"?n.getSource().getTileGrid().getZForResolution(o):n.getView().getZoom(),f=typeof n.getTargetElement=="function"?n.getTargetElement():void 0,C,O;if(s["background-color"]!==void 0&&(C=Li(t,"paint","background-color",d,oB,r),f&&(f.style.background=tu.parse(C).toString())),s["background-opacity"]!==void 0&&(O=Li(t,"paint","background-opacity",d,oB,r),f&&(f.style.opacity=O)),a.visibility=="none"){f&&(f.style.backgroundColor="",f.style.opacity="");return}return Om(C,O)}if(typeof n.getTargetElement=="function")n.getTargetElement()&&i(),n.on(["change:resolution","change:target"],i);else if(typeof n.setBackground=="function")n.setBackground(i);else throw new Error("Unable to apply background.")}function kpe(n,e){var t;return n.some(function(r){if(r.id==e)return t=r.source,!0}),t}function ZW(n){var e=n.bounds;if(e){var t=EO([e[0],e[1]]),r=EO([e[2],e[3]]);return[t[0],t[1],r[0],r[1]]}}function Tpe(n,e){n=QW({},n);var t=[e,JSON.stringify(n)].toString(),r=pP[t];return r||(r=new aW({url:n.tiles?void 0:e,tileJSON:n.tiles?n:void 0}),pP[t]=r),new Promise(function(i){var o=r.on("change",function(){var a=r.getState();if(a==="ready"){var s=r.getTileJSON(),d=Array.isArray(s.tiles)?s.tiles:[s.tiles];if(e)for(var f=0,C=d.length;f<C;++f)d[f]=decodeURI(new URL(d[f],e).href);var O=r.getTileGrid(),E=ZW(s),P=s.minzoom||0,D=s.maxzoom||22,$=r.get("ol-source");$===void 0&&($=new uW({attributions:r.getAttributions(),format:new Lse,tileGrid:new Yb({origin:O.getOrigin(0),extent:E||O.getExtent(),minZoom:P,resolutions:mv.slice(0,D+1),tileSize:512}),urls:d}),r.set("ol-source",$)),sb(o),i($)}else a==="error"&&(r.set("ol-source",null),sb(o),i(void 0))});r.getState()==="ready"&&r.changed()})}function Kpe(n,e){var t=new lW({declutter:!0,visible:!1});return Tpe(n,e).then(function(r){t.setSource(r)}),t}function Ppe(n,e){var t=new ide,r=new aW({transition:0,url:n.tiles?void 0:e,tileJSON:n.tiles?n:void 0,crossOrigin:"anonymous"}),i=r.on("change",function(){var o=r.getState();if(o==="ready"){sb(i);var a=r.getTileJSON(),s=ZW(a),d=r.getTileGrid(),f=n.tileSize||a.tileSize||512,C=a.minzoom||0,O=a.maxzoom||22;r.tileGrid=new Yb({origin:d.getOrigin(0),extent:s||d.getExtent(),minZoom:C,resolutions:X8({maxZoom:O,tileSize:f}).getResolutions(),tileSize:f}),t.setSource(r)}else o==="error"&&(sb(i),t.setSource(void 0))});return r.setTileLoadFunction(function(o,a){if(a.indexOf("{bbox-epsg-3857}")!=-1){var s=r.getTileGrid().getTileCoordExtent(o.getTileCoord());a=a.replace("{bbox-epsg-3857}",s.toString())}var d=o.getImage();d.src=a}),t}var gP=new Vae;function Dpe(n,e){var t=n.data,r,i;return typeof t=="string"?i=e5(t,e):r=gP.readFeatures(t,{featureProjection:"EPSG:3857"}),new NN({declutter:!0,source:new QN({attributions:n.attribution,features:r,format:gP,url:i}),visible:!1})}function yP(n,e,t,r){var i=t.getZoom(),o=Li(n,"paint","raster-opacity",i,oB,r);e.setOpacity(o)}function vP(n,e,t,r,i,o){o===void 0&&(o="");var a=[],s=e.getView();!s.isDef()&&!s.getRotation()&&!s.getResolutions()&&(s=new Fp(QW(s.getProperties(),{maxResolution:mv[0]})),e.setView(s)),"center"in n&&!s.getCenter()&&s.setCenter(EO(n.center)),"zoom"in n&&s.getZoom()===void 0&&s.setResolution(mv[0]/Math.pow(2,n.zoom)),(!s.getCenter()||s.getZoom()===void 0)&&s.fit(s.getProjection().getExtent(),{nearest:!0,size:e.getSize()}),n.sprite&&(n.sprite.indexOf("mapbox://")==0?n.sprite=t+"/sprite"+o:n.sprite.indexOf("http")!=0&&(n.sprite=(r?r+i:"")+n.sprite+o));for(var d=n.layers,f=[],C,O,E,P,D,$,H=function(ae,pe){C=d[ae];var fe=C.type;if(!(fe=="heatmap"||fe=="hillshade"))if(fe=="background")Ipe(e,C);else{if(P=C.source||kpe(d,C.ref),P!=E){if(f.length&&(a.push(CP(D,f,n,i,e)),f=[]),O=n.sources[P],$=O.url,$)if($=e5($,i),$.indexOf("mapbox://")==0){var X=$.replace("mapbox://","");O.tiles=["a","b","c","d"].map(function(Ce){return"https://"+Ce+".tiles.mapbox.com/v4/"+X+"/{z}/{x}/{y}."+(O.type=="vector"?"vector.pbf":"png")+o})}else $.indexOf("/")===0&&r.indexOf("http")===0&&($=r+$);if(O.tiles&&(O.tiles=O.tiles.map(function(Ce){return e5(Ce,i)})),O.type=="vector")D=Kpe(O,$);else if(O.type=="raster"){D=Ppe(O,$),D.setVisible(C.layout?C.layout.visibility!=="none":!0);var oe={};s.on("change:resolution",yP.bind(Q,C,D,s,oe)),yP(C,D,s,oe)}else O.type=="geojson"&&(D=Dpe(O,i));E=P,D&&D.set("mapbox-source",E)}f.push(C.id)}},Q=this,N=0,Z=d.length;N<Z;++N)H(N);return a.push(CP(D,f,n,i,e)),e.set("mapbox-style",n),Promise.all(a)}function Lpe(n,e){var t,r="",i="",o="",a="";if((typeof n=="string"||n instanceof HTMLElement)&&(n=new H8({target:n})),typeof e=="string"){var s=e.match(HW);s&&(i=s[1],r=s.length>2?s[2]:""),t=new Promise(function(d,f){fetch(e,{credentials:"same-origin"}).then(function(C){return C.json()}).then(function(C){var O=document.createElement("A");O.href=e;var E=O.href;a=O.pathname.split("/").slice(0,-1).join("/")+"/",o=E.substr(0,E.indexOf(a)),vP(C,n,i,o,a,r).then(function(){d(n)}).catch(f)}).catch(function(C){f(new Error("Could not load ".concat(e,": ").concat(C.message)))})})}else t=new Promise(function(d,f){vP(e,n).then(function(){d(n)}).catch(f)});return t}function Fpe(n,e){return(typeof n=="string"||n instanceof HTMLElement)&&(n=new H8({target:n})),setTimeout(function(){Lpe(n,e)},0),n}function CP(n,e,t,r,i){for(var o=24,a=0,s=t.layers,d=0,f=s.length;d<f;++d){var C=s[d];e.indexOf(C.id)!==-1&&(o=Math.min("minzoom"in C?C.minzoom:0,o),a=Math.max("maxzoom"in C?C.maxzoom:24,a))}return new Promise(function(O,E){var P=function(){var D=n.getSource();if(!D||D.getState()==="error"){E(new Error("Error accessing data for source "+n.get("mapbox-source")));return}if("getTileGrid"in D){var $=D.getTileGrid();if($){var H=$.getMinZoom();(o>0||H>0)&&n.setMaxResolution(Math.min(mv[o],$.getResolution(H))+1e-9),a<24&&n.setMinResolution(mv[a]+1e-9)}}D instanceof QN||D instanceof uW?Bpe(n,t,e,r).then(function(){n.setVisible(!0),O()},function(Q){E(Q)}):O()};n.set("mapbox-layers",e),i.getLayers().getArray().indexOf(n)===-1&&i.addLayer(n),n.getSource()?P():n.once("change:source",P)})}function Er(){var n="/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",e="407d95dd38e8ccb117e5c61045008b6caf0c7392",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",statementMap:{0:{start:{line:11,column:2},end:{line:15,column:3}},1:{start:{line:12,column:4},end:{line:12,column:16}},2:{start:{line:14,column:4},end:{line:14,column:149}},3:{start:{line:14,column:103},end:{line:14,column:133}},4:{start:{line:18,column:24},end:{line:25,column:3}},5:{start:{line:28,column:14},end:{line:28,column:18}},6:{start:{line:30,column:19},end:{line:30,column:23}},7:{start:{line:32,column:4},end:{line:32,column:17}},8:{start:{line:33,column:4},end:{line:38,column:6}},9:{start:{line:39,column:4},end:{line:39,column:67}},10:{start:{line:42,column:4},end:{line:43,column:13}},11:{start:{line:43,column:6},end:{line:43,column:13}},12:{start:{line:44,column:4},end:{line:44,column:33}},13:{start:{line:45,column:4},end:{line:45,column:33}},14:{start:{line:48,column:4},end:{line:52,column:5}},15:{start:{line:49,column:6},end:{line:51,column:8}},16:{start:{line:55,column:4},end:{line:61,column:7}},17:{start:{line:62,column:16},end:{line:69,column:6}},18:{start:{line:70,column:4},end:{line:78,column:7}},19:{start:{line:71,column:21},end:{line:71,column:45}},20:{start:{line:72,column:6},end:{line:77,column:9}},21:{start:{line:79,column:22},end:{line:89,column:5}},22:{start:{line:80,column:19},end:{line:80,column:42}},23:{start:{line:81,column:21},end:{line:81,column:56}},24:{start:{line:82,column:6},end:{line:88,column:9}},25:{start:{line:90,column:4},end:{line:90,column:16}},26:{start:{line:91,column:4},end:{line:91,column:33}},27:{start:{line:92,column:4},end:{line:102,column:7}},28:{start:{line:93,column:21},end:{line:93,column:56}},29:{start:{line:94,column:6},end:{line:101,column:9}},30:{start:{line:103,column:4},end:{line:103,column:19}},31:{start:{line:104,column:4},end:{line:106,column:6}},32:{start:{line:108,column:17},end:{line:111,column:3}},33:{start:{line:109,column:4},end:{line:109,column:20}},34:{start:{line:110,column:4},end:{line:110,column:37}},35:{start:{line:113,column:14},end:{line:113,column:26}},36:{start:{line:114,column:4},end:{line:181,column:9}},37:{start:{line:118,column:22},end:{line:118,column:45}},38:{start:{line:173,column:22},end:{line:173,column:40}},39:{start:{line:184,column:22},end:{line:184,column:62}}},fnMap:{0:{name:"renderCoords",decl:{start:{line:10,column:9},end:{line:10,column:21}},loc:{start:{line:10,column:30},end:{line:16,column:1}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:14,column:92},end:{line:14,column:93}},loc:{start:{line:14,column:103},end:{line:14,column:133}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:19,column:17},end:{line:19,column:18}},loc:{start:{line:19,column:23},end:{line:20,column:5}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:21,column:18},end:{line:21,column:19}},loc:{start:{line:21,column:24},end:{line:22,column:5}},line:21},4:{name:"(anonymous_4)",decl:{start:{line:23,column:19},end:{line:23,column:20}},loc:{start:{line:23,column:25},end:{line:24,column:5}},line:23},5:{name:"(anonymous_5)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:21},end:{line:40,column:3}},line:31},6:{name:"(anonymous_6)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:28},end:{line:46,column:3}},line:41},7:{name:"(anonymous_7)",decl:{start:{line:47,column:2},end:{line:47,column:3}},loc:{start:{line:47,column:32},end:{line:53,column:3}},line:47},8:{name:"(anonymous_8)",decl:{start:{line:54,column:2},end:{line:54,column:3}},loc:{start:{line:54,column:22},end:{line:107,column:3}},line:54},9:{name:"(anonymous_9)",decl:{start:{line:70,column:26},end:{line:70,column:27}},loc:{start:{line:70,column:35},end:{line:78,column:5}},line:70},10:{name:"(anonymous_10)",decl:{start:{line:79,column:22},end:{line:79,column:23}},loc:{start:{line:79,column:28},end:{line:89,column:5}},line:79},11:{name:"(anonymous_11)",decl:{start:{line:92,column:25},end:{line:92,column:26}},loc:{start:{line:92,column:33},end:{line:102,column:5}},line:92},12:{name:"(anonymous_12)",decl:{start:{line:108,column:17},end:{line:108,column:18}},loc:{start:{line:108,column:24},end:{line:111,column:3}},line:108},13:{name:"(anonymous_13)",decl:{start:{line:112,column:2},end:{line:112,column:3}},loc:{start:{line:112,column:11},end:{line:182,column:3}},line:112},14:{name:"(anonymous_14)",decl:{start:{line:118,column:15},end:{line:118,column:16}},loc:{start:{line:118,column:22},end:{line:118,column:45}},line:118},15:{name:"(anonymous_15)",decl:{start:{line:173,column:15},end:{line:173,column:16}},loc:{start:{line:173,column:22},end:{line:173,column:40}},line:173}},branchMap:{0:{loc:{start:{line:11,column:2},end:{line:15,column:3}},type:"if",locations:[{start:{line:11,column:2},end:{line:15,column:3}},{start:{line:13,column:9},end:{line:15,column:3}}],line:11},1:{loc:{start:{line:11,column:6},end:{line:11,column:34}},type:"binary-expr",locations:[{start:{line:11,column:6},end:{line:11,column:13}},{start:{line:11,column:17},end:{line:11,column:34}}],line:11},2:{loc:{start:{line:42,column:4},end:{line:43,column:13}},type:"if",locations:[{start:{line:42,column:4},end:{line:43,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},3:{loc:{start:{line:48,column:4},end:{line:52,column:5}},type:"if",locations:[{start:{line:48,column:4},end:{line:52,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},4:{loc:{start:{line:134,column:26},end:{line:134,column:59}},type:"binary-expr",locations:[{start:{line:134,column:26},end:{line:134,column:53}},{start:{line:134,column:57},end:{line:134,column:59}}],line:134},5:{loc:{start:{line:146,column:6},end:{line:168,column:10}},type:"binary-expr",locations:[{start:{line:146,column:6},end:{line:146,column:29}},{start:{line:146,column:49},end:{line:168,column:10}}],line:146}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx"],names:[],mappings:"AAoBW,cAwIL,YAxIK;AApBX,OAAO,WAAW;AAClB,SAAQ,gBAAe;AACvB,SAA0B,uBAAuB;AAEjD,OAAO,6BAA6B;AAEpC,OAAO;AAEP,SAAQ,aAAY;AACpB,SAAQ,KAAK,MAAM,eAAc;AAEjC,SAAQ,gBAAe;AAIvB,SAAS,aAAc,QAAkB;AACvC,MAAI,CAAC,UAAU,OAAO,SAAS,GAAG;AAChC,WAAO;AAAA,EACT,OACK;AACH,WAAO,oBAAC,UAAK,WAAU,mBACpB,iBAAO,IAAI,CAAC,UAAU,OAAO,KAAK,EAAE,SAAS,GAAG,GAAQ,CAAC,EAAE,KAAK,IAAI,GACvE;AAAA,EACF;AACF;AAqBA,MAAM,8BAA8B,MAAM,UAA0D;AAAA,EAClG,OAAO,eAAe;AAAA,IACpB,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAmC;AAAA,EACnC;AAAA,EACA,iBAAqC;AAAA,EAErC,YAAY,OAAmC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ,CAAC;AAAA,MACT,QAAQ,CAAC;AAAA,IACX;AACA,SAAK,cAAc,SAAS,KAAK,aAAa,KAAK,IAAI,GAAG,GAAG;AAAA,EAC/D;AAAA,EAEA,aAAa,aAAiC;AAC5C,QAAG,CAAC,KAAK;AAAK;AAGd,SAAK,IAAI,UAAU,EAAE,MAAM;AAC3B,UAAM,KAAK,KAAK,WAAW;AAAA,EAC7B;AAAA,EAEA,mBAAmB,WAAuC;AACxD,QAAI,KAAK,MAAM,aAAa,UAAU,UAAU;AAC9C,WAAK;AAAA,QACH,KAAK,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAoB;AAClB,SAAK,UAAU,IAAI,QAAQ;AAAA,MACzB,SAAS,KAAK;AAAA,MACd,SAAS;AAAA,MACT,kBAAkB;AAAA,QAChB,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAED,UAAM,MAAM,IAAI,IAAI;AAAA,MAClB,QAAQ,KAAK;AAAA,MACb,UAAU,CAAC,KAAK,OAAO;AAAA,MACvB,MAAM,IAAI,KAAK;AAAA,QACb,MAAM;AAAA,QACN,QAAQ,CAAC,KAAK,GAAG;AAAA,MACnB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,eAAe,CAAC,QAAQ;AAC7B,YAAM,SAAS,SAAS,IAAI,UAAU;AACtC,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,UACN,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,UACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAED,UAAM,YAAY,MAAM;AACtB,YAAM,OAAO,IAAI,QAAQ,EAAE,QAAQ;AACnC,YAAM,SAAS,SAAS,IAAI,QAAQ,EAAE,UAAU,CAAE;AAElD,WAAK,MAAM,SAAS;AAAA,QAClB;AAAA,QACA,QAAQ;AAAA,UACN,KAAK,OAAO,CAAC;AAAA,UACb,KAAK,OAAO,CAAC;AAAA,QACf;AAAA,MACF,CAAC;AAAA,IACH;AAEA,cAAU;AACV,QAAI,GAAG,WAAW,SAAS;AAE3B,QAAI,GAAG,cAAc,CAAC,OAAO;AAC3B,YAAM,SAAS,SAAS,IAAI,QAAQ,EAAE,UAAU,CAAE;AAClD,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,UACN,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,UACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,QACrB;AAAA,QACA,UAAU,IAAI,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC;AAAA,QAC/C,MAAM,IAAI,QAAQ,EAAE,QAAQ,EAAG,QAAQ,CAAC;AAAA,MAC1C,CAAC;AAAA,IACH,CAAC;AAID,SAAK,MAAM;AACX,SAAK;AAAA,MACH,KAAK,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,IACpD;AAAA,EACF;AAAA,EAEA,eAAe,CAAC,MAAW;AACzB,MAAE,OAAO,KAAK;AACd,SAAK,QAAS,YAAY,MAAS;AAAA,EACrC;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,yBACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,OAAK,KAAK,iBAAiB;AAAA,UAChC,OAAO,EAAC,YAAY,QAAO;AAAA,UAC3B,WAAU;AAAA,UAEV;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,KAAK;AAAA,gBACd,cAAY,EAAE,aAAa;AAAA,gBAC5B;AAAA;AAAA,YAED;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU,KAAK,MAAM,oBAAoB,CAAC;AAAA,gBAC1C,eAAe,KAAK,MAAM;AAAA;AAAA,YAC5B;AAAA;AAAA;AAAA,MACF;AAAA,MACA,qBAAC,SAAI,WAAU,oBACZ;AAAA,UAAE,OAAO;AAAA,QAAE;AAAA,QAAE,KAAK,MAAM;AAAA,SAC3B;AAAA,MACC,KAAK,MAAM,gBACV,qBAAC,SAAI,WAAU,qBACb;AAAA,6BAAC,SACC;AAAA,+BAAC,WAAO;AAAA,cAAE,SAAS;AAAA,YAAE;AAAA,aAAC;AAAA,UACtB,oBAAC,UAAM,uBAAa,KAAK,MAAM,MAAM,GAAE;AAAA,WACzC;AAAA,QACA,qBAAC,SACC;AAAA,+BAAC,WAAO;AAAA,cAAE,SAAS;AAAA,YAAE;AAAA,aAAC;AAAA,UACtB,oBAAC,UAAM,uBAAa,KAAK,MAAM,MAAM,GAAE;AAAA,WACzC;AAAA,QACA,qBAAC,SACC;AAAA,+BAAC,WAAO;AAAA,cAAE,WAAW;AAAA,YAAE;AAAA,aAAC;AAAA,UACxB,oBAAC,UAAM,eAAK,MAAM,UAAS;AAAA,WAC7B;AAAA,SACF;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,KAAK,OAAK,KAAK,YAAY;AAAA,UAC3B,MAAK;AAAA,UACL,cAAY,EAAE,UAAU;AAAA,UACxB,OAAO;AAAA,YACL,GAAG,KAAK,MAAM;AAAA,UAChB;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EACF;AACF;AAEA,MAAM,gBAAgB,gBAAgB,EAAE,qBAAqB;AAC7D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"407d95dd38e8ccb117e5c61045008b6caf0c7392"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Er=function(){return a},a}Er();function _P(n){return Er().f[0]++,Er().s[0]++,Er().b[1][0]++,!n||(Er().b[1][1]++,n.length<2)?(Er().b[0][0]++,Er().s[1]++,null):(Er().b[0][1]++,Er().s[2]++,G.jsx("span",{className:"maputnik-coords",children:n.map(e=>(Er().f[1]++,Er().s[3]++,String(e).padStart(7," "))).join(", ")}))}class XW extends Mn.Component{constructor(t){Er().f[5]++,Er().s[7]++;super(t);sn(this,"updateStyle");sn(this,"map");sn(this,"container",(Er().s[5]++,null));sn(this,"overlay");sn(this,"popupContainer",(Er().s[6]++,null));sn(this,"closeOverlay",(Er().s[32]++,t=>{Er().f[12]++,Er().s[33]++,t.target.blur(),Er().s[34]++,this.overlay.setPosition(void 0)}));Er().s[8]++,this.state={zoom:"0",rotation:"0",cursor:[],center:[]},Er().s[9]++,this.updateStyle=nw.throttle(this._updateStyle.bind(this),200)}_updateStyle(t){if(Er().f[6]++,Er().s[10]++,this.map)Er().b[2][1]++;else{Er().b[2][0]++,Er().s[11]++;return}Er().s[12]++,this.map.getLayers().clear(),Er().s[13]++,Fpe(this.map,t)}componentDidUpdate(t){Er().f[7]++,Er().s[14]++,this.props.mapStyle!==t.mapStyle?(Er().b[3][0]++,Er().s[15]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))):Er().b[3][1]++}componentDidMount(){Er().f[8]++,Er().s[16]++,this.overlay=new Zle({element:this.popupContainer,autoPan:!0,autoPanAnimation:{duration:250}});const t=(Er().s[17]++,new H8({target:this.container,overlays:[this.overlay],view:new Fp({zoom:1,center:[180,-90]})}));Er().s[18]++,t.on("pointermove",i=>{Er().f[9]++;const o=(Er().s[19]++,RS(i.coordinate));Er().s[20]++,this.setState({cursor:[o[0].toFixed(2),o[1].toFixed(2)]})}),Er().s[21]++;const r=()=>{Er().f[10]++;const i=(Er().s[22]++,t.getView().getZoom()),o=(Er().s[23]++,RS(t.getView().getCenter()));Er().s[24]++,this.props.onChange({zoom:i,center:{lng:o[0],lat:o[1]}})};Er().s[25]++,r(),Er().s[26]++,t.on("moveend",r),Er().s[27]++,t.on("postrender",i=>{Er().f[11]++;const o=(Er().s[28]++,RS(t.getView().getCenter()));Er().s[29]++,this.setState({center:[o[0].toFixed(2),o[1].toFixed(2)],rotation:t.getView().getRotation().toFixed(2),zoom:t.getView().getZoom().toFixed(2)})}),Er().s[30]++,this.map=t,Er().s[31]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))}render(){Er().f[13]++;const t=(Er().s[35]++,this.props.t);return Er().s[36]++,G.jsxs("div",{className:"maputnik-ol-container",children:[G.jsxs("div",{ref:r=>(Er().f[14]++,Er().s[37]++,this.popupContainer=r),style:{background:"black"},className:"maputnik-popup",children:[G.jsx("button",{className:"maplibregl-popup-close-button",onClick:this.closeOverlay,"aria-label":t("Close popup"),children:"×"}),G.jsx(aj,{features:(Er().b[4][0]++,this.state.selectedFeatures||(Er().b[4][1]++,[])),onLayerSelect:this.props.onLayerSelect})]}),G.jsxs("div",{className:"maputnik-ol-zoom",children:[t("Zoom:")," ",this.state.zoom]}),(Er().b[5][0]++,this.props.debugToolbox&&(Er().b[5][1]++,G.jsxs("div",{className:"maputnik-ol-debug",children:[G.jsxs("div",{children:[G.jsxs("label",{children:[t("cursor:")," "]}),G.jsx("span",{children:_P(this.state.cursor)})]}),G.jsxs("div",{children:[G.jsxs("label",{children:[t("center:")," "]}),G.jsx("span",{children:_P(this.state.center)})]}),G.jsxs("div",{children:[G.jsxs("label",{children:[t("rotation:")," "]}),G.jsx("span",{children:this.state.rotation})]})]}))),G.jsx("div",{className:"maputnik-ol",ref:r=>(Er().f[15]++,Er().s[38]++,this.container=r),role:"region","aria-label":t("Map view"),style:{...this.props.style}})]})}}sn(XW,"defaultProps",(Er().s[4]++,{onMapLoaded:()=>{Er().f[2]++},onDataChange:()=>{Er().f[3]++},onLayerSelect:()=>{Er().f[4]++}}));const Upe=(Er().s[39]++,No()(XW));var JW={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)e.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(JW);var Rpe=JW.exports;const Qf=Ba(Rpe);function r1(){var n="/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",e="e73e8fb606fcd7318a8222b2e50c576ed3ad8702",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",statementMap:{0:{start:{line:6,column:22},end:{line:10,column:5}},1:{start:{line:11,column:4},end:{line:11,column:154}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:12,column:3}},line:5}},branchMap:{0:{loc:{start:{line:11,column:11},end:{line:11,column:153}},type:"cond-expr",locations:[{start:{line:11,column:52},end:{line:11,column:92}},{start:{line:11,column:111},end:{line:11,column:153}}],line:11}},s:{0:0,1:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx"],names:[],mappings:"AAeoC;AAfpC,OAAO,WAAW;AAClB,SAAQ,iBAAiB,qBAAoB;AAO7C,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK,MAAM;AAAA,IAChB;AACA,WAAO,KAAK,MAAM,cAAc,oBAAC,iBAAc,OAAO,WAAU,IAAK,oBAAC,mBAAgB,OAAO,WAAW;AAAA,EAC1G;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e73e8fb606fcd7318a8222b2e50c576ed3ad8702"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return r1=function(){return a},a}r1();class zpe extends Mn.Component{render(){r1().f[0]++;const e=(r1().s[0]++,{width:20,height:20,...this.props.style});return r1().s[1]++,this.props.isCollapsed?(r1().b[0][0]++,G.jsx(Pre,{style:e})):(r1().b[0][1]++,G.jsx(Kre,{style:e}))}}function by(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",e="b04bfec534013c327fd210571832bbd2813a944a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:32,column:9}},1:{start:{line:11,column:25},end:{line:11,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:33,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:25},end:{line:11,column:72}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx"],names:[],mappings:"AAcM,SAIE,KAJF;AAdN,OAAO,WAAW;AAClB,OAAO,eAAe;AAUtB,qBAAqB,uBAAuB,MAAM,UAA+B;AAAA,EAC/E,SAAS;AACP,WAAO,oBAAC,QAAG,WAAU,6BACnB;AAAA,MAAC;AAAA;AAAA,QAAI,WAAU;AAAA,QACb,eAAa,sBAAoB,KAAK,MAAM,aAAa;AAAA,QACzD,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,QAE7D;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,iBAAe,KAAK,MAAM,eAAe;AAAA,cACzC,iBAAe,KAAK,MAAM;AAAA,cAEzB,eAAK,MAAM;AAAA;AAAA,UACd;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ,IAAI,OAAO,GAAG;AAAA,cAC/B,aAAa,KAAK,MAAM;AAAA;AAAA,UAC1B;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b04bfec534013c327fd210571832bbd2813a944a"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return by=function(){return a},a}by();class jpe extends Mn.Component{render(){return by().f[0]++,by().s[0]++,G.jsx("li",{className:"maputnik-layer-list-group",children:G.jsxs("div",{className:"maputnik-layer-list-group-header","data-wd-key":"layer-list-group:"+this.props["data-wd-key"],onClick:e=>(by().f[1]++,by().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:[G.jsx("button",{className:"maputnik-layer-list-group-title","aria-controls":this.props["aria-controls"],"aria-expanded":this.props.isActive,children:this.props.title}),G.jsx("span",{className:"maputnik-space"}),G.jsx(zpe,{style:{height:14,width:14},isCollapsed:this.props.isActive})]})})}}function bb(){return bb=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},bb.apply(null,arguments)}function Npe(n){if(Array.isArray(n))return n}function Wpe(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],d=!0,f=!1;try{if(o=(t=t.call(n)).next,e===0){if(Object(t)!==t)return;d=!1}else for(;!(d=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);d=!0);}catch(C){f=!0,i=C}finally{try{if(!d&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}function aB(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function eG(n,e){if(n){if(typeof n=="string")return aB(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?aB(n,e):void 0}}function Gpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tG(n,e){return Npe(n)||Wpe(n,e)||eG(n,e)||Gpe()}function gv(n){"@babel/helpers - typeof";return gv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gv(n)}function $pe(n,e){if(gv(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(gv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function nG(n){var e=$pe(n,"string");return gv(e)=="symbol"?e:e+""}function Sa(n,e,t){return(e=nG(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function mE(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(t).filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.forEach(function(i){Sa(n,i,t[i])})}return n}function Hb(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function bP(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,nG(r.key),r)}}function Zb(n,e,t){return e&&bP(n.prototype,e),t&&bP(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function go(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function OI(n,e){if(e&&(gv(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return go(n)}function xb(n){return xb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xb(n)}function sB(n,e){return sB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},sB(n,e)}function BI(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&sB(n,e)}var Qpe=function(n,e,t,r,i,o,a,s){if(!n){var d;if(e===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[t,r,i,o,a,s],C=0;d=new Error(e.replace(/%s/g,function(){return f[C++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},Ype=Qpe;const U1=Ba(Ype);function qpe(n){if(Array.isArray(n))return aB(n)}function Vpe(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Hpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zpe(n){return qpe(n)||Vpe(n)||eG(n)||Hpe()}var Xpe=function(){function n(){Hb(this,n),Sa(this,"refs",{})}return Zb(n,[{key:"add",value:function(t,r){this.refs[t]||(this.refs[t]=[]),this.refs[t].push(r)}},{key:"remove",value:function(t,r){var i=this.getIndex(t,r);i!==-1&&this.refs[t].splice(i,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var t=this;return this.refs[this.active.collection].find(function(r){var i=r.node;return i.sortableInfo.index==t.active.index})}},{key:"getIndex",value:function(t,r){return this.refs[t].indexOf(r)}},{key:"getOrderedRefs",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.active.collection;return this.refs[t].sort(Jpe)}}]),n}();function Jpe(n,e){var t=n.node.sortableInfo.index,r=e.node.sortableInfo.index;return t-r}function rG(n,e){return Object.keys(n).reduce(function(t,r){return e.indexOf(r)===-1&&(t[r]=n[r]),t},{})}var zg={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},iG=function(){if(typeof window>"u"||typeof document>"u")return"";var n=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(n).join("").match(/-(moz|webkit|ms)-/)||n.OLink===""&&["","o"])[1];switch(e){case"ms":return"ms";default:return e&&e.length?e[0].toUpperCase()+e.substr(1):""}}();function N2(n,e){Object.keys(e).forEach(function(t){n.style[t]=e[t]})}function W2(n,e){n.style["".concat(iG,"Transform")]=e==null?"":"translate3d(".concat(e.x,"px,").concat(e.y,"px,0)")}function gE(n,e){n.style["".concat(iG,"TransitionDuration")]=e==null?"":"".concat(e,"ms")}function i_(n,e){for(;n;){if(e(n))return n;n=n.parentNode}return null}function xP(n,e,t){return Math.max(n,Math.min(t,e))}function xy(n){return n.substr(-2)==="px"?parseFloat(n):0}function eme(n){var e=window.getComputedStyle(n);return{bottom:xy(e.marginBottom),left:xy(e.marginLeft),right:xy(e.marginRight),top:xy(e.marginTop)}}function II(n,e){var t=e.displayName||e.name;return t?"".concat(n,"(").concat(t,")"):n}function yE(n,e){var t=n.getBoundingClientRect();return{top:t.top+e.top,left:t.left+e.left}}function LC(n){return n.touches&&n.touches.length?{x:n.touches[0].pageX,y:n.touches[0].pageY}:n.changedTouches&&n.changedTouches.length?{x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY}:{x:n.pageX,y:n.pageY}}function tme(n){return n.touches&&n.touches.length||n.changedTouches&&n.changedTouches.length}function M3(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0};if(n){var r={left:t.left+n.offsetLeft,top:t.top+n.offsetTop};return n.parentNode===e?r:M3(n.parentNode,e,r)}}function nme(n,e,t){return n<t&&n>e?n-1:n>t&&n<e?n+1:n}function wP(n){var e=n.lockOffset,t=n.width,r=n.height,i=e,o=e,a="px";if(typeof e=="string"){var s=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(e);U1(s!==null,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',e),i=parseFloat(e),o=parseFloat(e),a=s[1]}return U1(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",e),a==="%"&&(i=i*t/100,o=o*r/100),{x:i,y:o}}function rme(n){var e=n.height,t=n.width,r=n.lockOffset,i=Array.isArray(r)?r:[r,r];U1(i.length===2,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var o=tG(i,2),a=o[0],s=o[1];return[wP({height:e,lockOffset:a,width:t}),wP({height:e,lockOffset:s,width:t})]}function ime(n){var e=window.getComputedStyle(n),t=/(auto|scroll)/,r=["overflow","overflowX","overflowY"];return r.find(function(i){return t.test(e[i])})}function oG(n){return n instanceof HTMLElement?ime(n)?n:oG(n.parentNode):null}function ome(n){var e=window.getComputedStyle(n);return e.display==="grid"?{x:xy(e.gridColumnGap),y:xy(e.gridRowGap)}:{x:0,y:0}}var $0={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},i1={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function ame(n){var e="input, textarea, select, canvas, [contenteditable]",t=n.querySelectorAll(e),r=n.cloneNode(!0),i=Zpe(r.querySelectorAll(e));return i.forEach(function(o,a){if(o.type!=="file"&&(o.value=t[a].value),o.type==="radio"&&o.name&&(o.name="__sortableClone__".concat(o.name)),o.tagName===i1.Canvas&&t[a].width>0&&t[a].height>0){var s=o.getContext("2d");s.drawImage(t[a],0,0)}}),r}function sme(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){BI(o,i);function o(){var a,s;Hb(this,o);for(var d=arguments.length,f=new Array(d),C=0;C<d;C++)f[C]=arguments[C];return s=OI(this,(a=xb(o)).call.apply(a,[this].concat(f))),Sa(go(go(s)),"wrappedInstance",Wn.createRef()),s}return Zb(o,[{key:"componentDidMount",value:function(){var s=p0.findDOMNode(this);s.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return U1(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var s=r.withRef?this.wrappedInstance:null;return Wn.createElement(n,bb({ref:s},this.props))}}]),o}(Wn.Component),Sa(e,"displayName",II("sortableHandle",n)),t}function MP(n){return n.sortableHandle!=null}var lme=function(){function n(e,t){Hb(this,n),this.container=e,this.onScrollCallback=t}return Zb(n,[{key:"clear",value:function(){this.interval!=null&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(t){var r=this,i=t.translate,o=t.minTranslate,a=t.maxTranslate,s=t.width,d=t.height,f={x:0,y:0},C={x:1,y:1},O={x:10,y:10},E=this.container,P=E.scrollTop,D=E.scrollLeft,$=E.scrollHeight,H=E.scrollWidth,Q=E.clientHeight,N=E.clientWidth,Z=P===0,ae=$-P-Q===0,pe=D===0,fe=H-D-N===0;i.y>=a.y-d/2&&!ae?(f.y=1,C.y=O.y*Math.abs((a.y-d/2-i.y)/d)):i.x>=a.x-s/2&&!fe?(f.x=1,C.x=O.x*Math.abs((a.x-s/2-i.x)/s)):i.y<=o.y+d/2&&!Z?(f.y=-1,C.y=O.y*Math.abs((i.y-d/2-o.y)/d)):i.x<=o.x+s/2&&!pe&&(f.x=-1,C.x=O.x*Math.abs((i.x-s/2-o.x)/s)),this.interval&&(this.clear(),this.isAutoScrolling=!1),(f.x!==0||f.y!==0)&&(this.interval=setInterval(function(){r.isAutoScrolling=!0;var X={left:C.x*f.x,top:C.y*f.y};r.container.scrollTop+=X.top,r.container.scrollLeft+=X.left,r.onScrollCallback(X)},5))}}]),n}();function ume(n){var e=n.node;return{height:e.offsetHeight,width:e.offsetWidth}}function Ame(n){var e=[i1.Input,i1.Textarea,i1.Select,i1.Option,i1.Button];return!!(e.indexOf(n.target.tagName)!==-1||i_(n.target,function(t){return t.contentEditable==="true"}))}var aG={axis:Rr.oneOf(["x","y","xy"]),contentWindow:Rr.any,disableAutoscroll:Rr.bool,distance:Rr.number,getContainer:Rr.func,getHelperDimensions:Rr.func,helperClass:Rr.string,helperContainer:Rr.oneOfType([Rr.func,typeof HTMLElement>"u"?Rr.any:Rr.instanceOf(HTMLElement)]),hideSortableGhost:Rr.bool,keyboardSortingTransitionDuration:Rr.number,lockAxis:Rr.string,lockOffset:Rr.oneOfType([Rr.number,Rr.string,Rr.arrayOf(Rr.oneOfType([Rr.number,Rr.string]))]),lockToContainerEdges:Rr.bool,onSortEnd:Rr.func,onSortMove:Rr.func,onSortOver:Rr.func,onSortStart:Rr.func,pressDelay:Rr.number,pressThreshold:Rr.number,keyCodes:Rr.shape({lift:Rr.arrayOf(Rr.number),drop:Rr.arrayOf(Rr.number),cancel:Rr.arrayOf(Rr.number),up:Rr.arrayOf(Rr.number),down:Rr.arrayOf(Rr.number)}),shouldCancelStart:Rr.func,transitionDuration:Rr.number,updateBeforeSortStart:Rr.func,useDragHandle:Rr.bool,useWindowAsScrollContainer:Rr.bool},sG={lift:[$0.SPACE],drop:[$0.SPACE],cancel:[$0.ESC],up:[$0.UP,$0.LEFT],down:[$0.DOWN,$0.RIGHT]},cme={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:ume,hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:sG,shouldCancelStart:Ame,transitionDuration:300,useWindowAsScrollContainer:!1},dme=Object.keys(aG);function hme(n){U1(!(n.distance&&n.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function fme(n,e){try{var t=n()}catch(r){return e(!0,r)}return t&&t.then?t.then(e.bind(null,!1),e.bind(null,!0)):e(!1,value)}var lG=Wn.createContext({manager:{}});function pme(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){BI(o,i);function o(a){var s;Hb(this,o),s=OI(this,xb(o).call(this,a)),Sa(go(go(s)),"state",{}),Sa(go(go(s)),"handleStart",function(f){var C=s.props,O=C.distance,E=C.shouldCancelStart;if(!(f.button===2||E(f))){s.touched=!0,s.position=LC(f);var P=i_(f.target,function(Z){return Z.sortableInfo!=null});if(P&&P.sortableInfo&&s.nodeIsChild(P)&&!s.state.sorting){var D=s.props.useDragHandle,$=P.sortableInfo,H=$.index,Q=$.collection,N=$.disabled;if(N||D&&!i_(f.target,MP))return;s.manager.active={collection:Q,index:H},!tme(f)&&f.target.tagName===i1.Anchor&&f.preventDefault(),O||(s.props.pressDelay===0?s.handlePress(f):s.pressTimer=setTimeout(function(){return s.handlePress(f)},s.props.pressDelay))}}}),Sa(go(go(s)),"nodeIsChild",function(f){return f.sortableInfo.manager===s.manager}),Sa(go(go(s)),"handleMove",function(f){var C=s.props,O=C.distance,E=C.pressThreshold;if(!s.state.sorting&&s.touched&&!s._awaitingUpdateBeforeSortStart){var P=LC(f),D={x:s.position.x-P.x,y:s.position.y-P.y},$=Math.abs(D.x)+Math.abs(D.y);s.delta=D,!O&&(!E||$>=E)?(clearTimeout(s.cancelTimer),s.cancelTimer=setTimeout(s.cancel,0)):O&&$>=O&&s.manager.isActive()&&s.handlePress(f)}}),Sa(go(go(s)),"handleEnd",function(){s.touched=!1,s.cancel()}),Sa(go(go(s)),"cancel",function(){var f=s.props.distance,C=s.state.sorting;C||(f||clearTimeout(s.pressTimer),s.manager.active=null)}),Sa(go(go(s)),"handlePress",function(f){try{var C=s.manager.getActive(),O=function(){if(C){var E=function(){var we=pe.sortableInfo.index,Te=eme(pe),Pe=ome(s.container),he=s.scrollContainer.getBoundingClientRect(),$e=$({index:we,node:pe,collection:fe});if(s.node=pe,s.margin=Te,s.gridGap=Pe,s.width=$e.width,s.height=$e.height,s.marginOffset={x:s.margin.left+s.margin.right+s.gridGap.x,y:Math.max(s.margin.top,s.margin.bottom,s.gridGap.y)},s.boundingClientRect=pe.getBoundingClientRect(),s.containerBoundingRect=he,s.index=we,s.newIndex=we,s.axis={x:D.indexOf("x")>=0,y:D.indexOf("y")>=0},s.offsetEdge=M3(pe,s.container),X?s.initialOffset=LC(mE({},f,{pageX:s.boundingClientRect.left,pageY:s.boundingClientRect.top})):s.initialOffset=LC(f),s.initialScroll={left:s.scrollContainer.scrollLeft,top:s.scrollContainer.scrollTop},s.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},s.helper=s.helperContainer.appendChild(ame(pe)),N2(s.helper,{boxSizing:"border-box",height:"".concat(s.height,"px"),left:"".concat(s.boundingClientRect.left-Te.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(s.boundingClientRect.top-Te.top,"px"),width:"".concat(s.width,"px")}),X&&s.helper.focus(),Q&&(s.sortableGhost=pe,N2(pe,{opacity:0,visibility:"hidden"})),s.minTranslate={},s.maxTranslate={},X){var ye=ae?{top:0,left:0,width:s.contentWindow.innerWidth,height:s.contentWindow.innerHeight}:s.containerBoundingRect,gt=ye.top,yt=ye.left,st=ye.width,ft=ye.height,Re=gt+ft,Ve=yt+st;s.axis.x&&(s.minTranslate.x=yt-s.boundingClientRect.left,s.maxTranslate.x=Ve-(s.boundingClientRect.left+s.width)),s.axis.y&&(s.minTranslate.y=gt-s.boundingClientRect.top,s.maxTranslate.y=Re-(s.boundingClientRect.top+s.height))}else s.axis.x&&(s.minTranslate.x=(ae?0:he.left)-s.boundingClientRect.left-s.width/2,s.maxTranslate.x=(ae?s.contentWindow.innerWidth:he.left+he.width)-s.boundingClientRect.left-s.width/2),s.axis.y&&(s.minTranslate.y=(ae?0:he.top)-s.boundingClientRect.top-s.height/2,s.maxTranslate.y=(ae?s.contentWindow.innerHeight:he.top+he.height)-s.boundingClientRect.top-s.height/2);H&&H.split(" ").forEach(function(Xe){return s.helper.classList.add(Xe)}),s.listenerNode=f.touches?f.target:s.contentWindow,X?(s.listenerNode.addEventListener("wheel",s.handleKeyEnd,!0),s.listenerNode.addEventListener("mousedown",s.handleKeyEnd,!0),s.listenerNode.addEventListener("keydown",s.handleKeyDown)):(zg.move.forEach(function(Xe){return s.listenerNode.addEventListener(Xe,s.handleSortMove,!1)}),zg.end.forEach(function(Xe){return s.listenerNode.addEventListener(Xe,s.handleSortEnd,!1)})),s.setState({sorting:!0,sortingIndex:we}),Z&&Z({node:pe,index:we,collection:fe,isKeySorting:X,nodes:s.manager.getOrderedRefs(),helper:s.helper},f),X&&s.keyMove(0)},P=s.props,D=P.axis,$=P.getHelperDimensions,H=P.helperClass,Q=P.hideSortableGhost,N=P.updateBeforeSortStart,Z=P.onSortStart,ae=P.useWindowAsScrollContainer,pe=C.node,fe=C.collection,X=s.manager.isKeySorting,oe=function(){if(typeof N=="function"){s._awaitingUpdateBeforeSortStart=!0;var Ce=fme(function(){var we=pe.sortableInfo.index;return Promise.resolve(N({collection:fe,index:we,node:pe,isKeySorting:X},f)).then(function(){})},function(we,Te){if(s._awaitingUpdateBeforeSortStart=!1,we)throw Te;return Te});if(Ce&&Ce.then)return Ce.then(function(){})}}();return oe&&oe.then?oe.then(E):E(oe)}}();return Promise.resolve(O&&O.then?O.then(function(){}):void 0)}catch(E){return Promise.reject(E)}}),Sa(go(go(s)),"handleSortMove",function(f){var C=s.props.onSortMove;typeof f.preventDefault=="function"&&f.cancelable&&f.preventDefault(),s.updateHelperPosition(f),s.animateNodes(),s.autoscroll(),C&&C(f)}),Sa(go(go(s)),"handleSortEnd",function(f){var C=s.props,O=C.hideSortableGhost,E=C.onSortEnd,P=s.manager,D=P.active.collection,$=P.isKeySorting,H=s.manager.getOrderedRefs();s.listenerNode&&($?(s.listenerNode.removeEventListener("wheel",s.handleKeyEnd,!0),s.listenerNode.removeEventListener("mousedown",s.handleKeyEnd,!0),s.listenerNode.removeEventListener("keydown",s.handleKeyDown)):(zg.move.forEach(function(pe){return s.listenerNode.removeEventListener(pe,s.handleSortMove)}),zg.end.forEach(function(pe){return s.listenerNode.removeEventListener(pe,s.handleSortEnd)}))),s.helper.parentNode.removeChild(s.helper),O&&s.sortableGhost&&N2(s.sortableGhost,{opacity:"",visibility:""});for(var Q=0,N=H.length;Q<N;Q++){var Z=H[Q],ae=Z.node;Z.edgeOffset=null,Z.boundingClientRect=null,W2(ae,null),gE(ae,null),Z.translate=null}s.autoScroller.clear(),s.manager.active=null,s.manager.isKeySorting=!1,s.setState({sorting:!1,sortingIndex:null}),typeof E=="function"&&E({collection:D,newIndex:s.newIndex,oldIndex:s.index,isKeySorting:$,nodes:H},f),s.touched=!1}),Sa(go(go(s)),"autoscroll",function(){var f=s.props.disableAutoscroll,C=s.manager.isKeySorting;if(f){s.autoScroller.clear();return}if(C){var O=mE({},s.translate),E=0,P=0;s.axis.x&&(O.x=Math.min(s.maxTranslate.x,Math.max(s.minTranslate.x,s.translate.x)),E=s.translate.x-O.x),s.axis.y&&(O.y=Math.min(s.maxTranslate.y,Math.max(s.minTranslate.y,s.translate.y)),P=s.translate.y-O.y),s.translate=O,W2(s.helper,s.translate),s.scrollContainer.scrollLeft+=E,s.scrollContainer.scrollTop+=P;return}s.autoScroller.update({height:s.height,maxTranslate:s.maxTranslate,minTranslate:s.minTranslate,translate:s.translate,width:s.width})}),Sa(go(go(s)),"onAutoScroll",function(f){s.translate.x+=f.left,s.translate.y+=f.top,s.animateNodes()}),Sa(go(go(s)),"handleKeyDown",function(f){var C=f.keyCode,O=s.props,E=O.shouldCancelStart,P=O.keyCodes,D=P===void 0?{}:P,$=mE({},sG,D);s.manager.active&&!s.manager.isKeySorting||!s.manager.active&&(!$.lift.includes(C)||E(f)||!s.isValidSortingTarget(f))||(f.stopPropagation(),f.preventDefault(),$.lift.includes(C)&&!s.manager.active?s.keyLift(f):$.drop.includes(C)&&s.manager.active?s.keyDrop(f):$.cancel.includes(C)?(s.newIndex=s.manager.active.index,s.keyDrop(f)):$.up.includes(C)?s.keyMove(-1):$.down.includes(C)&&s.keyMove(1))}),Sa(go(go(s)),"keyLift",function(f){var C=f.target,O=i_(C,function($){return $.sortableInfo!=null}),E=O.sortableInfo,P=E.index,D=E.collection;s.initialFocusedNode=C,s.manager.isKeySorting=!0,s.manager.active={index:P,collection:D},s.handlePress(f)}),Sa(go(go(s)),"keyMove",function(f){var C=s.manager.getOrderedRefs(),O=C[C.length-1].node.sortableInfo.index,E=s.newIndex+f,P=s.newIndex;if(!(E<0||E>O)){s.prevIndex=P,s.newIndex=E;var D=nme(s.newIndex,s.prevIndex,s.index),$=C.find(function(X){var oe=X.node;return oe.sortableInfo.index===D}),H=$.node,Q=s.containerScrollDelta,N=$.boundingClientRect||yE(H,Q),Z=$.translate||{x:0,y:0},ae={top:N.top+Z.y-Q.top,left:N.left+Z.x-Q.left},pe=P<E,fe={x:pe&&s.axis.x?H.offsetWidth-s.width:0,y:pe&&s.axis.y?H.offsetHeight-s.height:0};s.handleSortMove({pageX:ae.left+fe.x,pageY:ae.top+fe.y,ignoreTransition:f===0})}}),Sa(go(go(s)),"keyDrop",function(f){s.handleSortEnd(f),s.initialFocusedNode&&s.initialFocusedNode.focus()}),Sa(go(go(s)),"handleKeyEnd",function(f){s.manager.active&&s.keyDrop(f)}),Sa(go(go(s)),"isValidSortingTarget",function(f){var C=s.props.useDragHandle,O=f.target,E=i_(O,function(P){return P.sortableInfo!=null});return E&&E.sortableInfo&&!E.sortableInfo.disabled&&(C?MP(O):O.sortableInfo)});var d=new Xpe;return hme(a),s.manager=d,s.wrappedInstance=Wn.createRef(),s.sortableContextValue={manager:d},s.events={end:s.handleEnd,move:s.handleMove,start:s.handleStart},s}return Zb(o,[{key:"componentDidMount",value:function(){var s=this,d=this.props.useWindowAsScrollContainer,f=this.getContainer();Promise.resolve(f).then(function(C){s.container=C,s.document=s.container.ownerDocument||document;var O=s.props.contentWindow||s.document.defaultView||window;s.contentWindow=typeof O=="function"?O():O,s.scrollContainer=d?s.document.scrollingElement||s.document.documentElement:oG(s.container)||s.container,s.autoScroller=new lme(s.scrollContainer,s.onAutoScroll),Object.keys(s.events).forEach(function(E){return zg[E].forEach(function(P){return s.container.addEventListener(P,s.events[E],!1)})}),s.container.addEventListener("keydown",s.handleKeyDown)})}},{key:"componentWillUnmount",value:function(){var s=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach(function(d){return zg[d].forEach(function(f){return s.container.removeEventListener(f,s.events[d])})}),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(s){var d=this.props,f=d.lockAxis,C=d.lockOffset,O=d.lockToContainerEdges,E=d.transitionDuration,P=d.keyboardSortingTransitionDuration,D=P===void 0?E:P,$=this.manager.isKeySorting,H=s.ignoreTransition,Q=LC(s),N={x:Q.x-this.initialOffset.x,y:Q.y-this.initialOffset.y};if(N.y-=window.pageYOffset-this.initialWindowScroll.top,N.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=N,O){var Z=rme({height:this.height,lockOffset:C,width:this.width}),ae=tG(Z,2),pe=ae[0],fe=ae[1],X={x:this.width/2-pe.x,y:this.height/2-pe.y},oe={x:this.width/2-fe.x,y:this.height/2-fe.y};N.x=xP(this.minTranslate.x+X.x,this.maxTranslate.x-oe.x,N.x),N.y=xP(this.minTranslate.y+X.y,this.maxTranslate.y-oe.y,N.y)}f==="x"?N.y=0:f==="y"&&(N.x=0),$&&D&&!H&&gE(this.helper,D),W2(this.helper,N)}},{key:"animateNodes",value:function(){var s=this.props,d=s.transitionDuration,f=s.hideSortableGhost,C=s.onSortOver,O=this.containerScrollDelta,E=this.windowScrollDelta,P=this.manager.getOrderedRefs(),D={left:this.offsetEdge.left+this.translate.x+O.left,top:this.offsetEdge.top+this.translate.y+O.top},$=this.manager.isKeySorting,H=this.newIndex;this.newIndex=null;for(var Q=0,N=P.length;Q<N;Q++){var Z=P[Q].node,ae=Z.sortableInfo.index,pe=Z.offsetWidth,fe=Z.offsetHeight,X={height:this.height>fe?fe/2:this.height/2,width:this.width>pe?pe/2:this.width/2},oe=$&&ae>this.index&&ae<=H,Ce=$&&ae<this.index&&ae>=H,we={x:0,y:0},Te=P[Q].edgeOffset;Te||(Te=M3(Z,this.container),P[Q].edgeOffset=Te,$&&(P[Q].boundingClientRect=yE(Z,O)));var Pe=Q<P.length-1&&P[Q+1],he=Q>0&&P[Q-1];if(Pe&&!Pe.edgeOffset&&(Pe.edgeOffset=M3(Pe.node,this.container),$&&(Pe.boundingClientRect=yE(Pe.node,O))),ae===this.index){f&&(this.sortableGhost=Z,N2(Z,{opacity:0,visibility:"hidden"}));continue}d&&gE(Z,d),this.axis.x?this.axis.y?Ce||ae<this.index&&(D.left+E.left-X.width<=Te.left&&D.top+E.top<=Te.top+X.height||D.top+E.top+X.height<=Te.top)?(we.x=this.width+this.marginOffset.x,Te.left+we.x>this.containerBoundingRect.width-X.width&&Pe&&(we.x=Pe.edgeOffset.left-Te.left,we.y=Pe.edgeOffset.top-Te.top),this.newIndex===null&&(this.newIndex=ae)):(oe||ae>this.index&&(D.left+E.left+X.width>=Te.left&&D.top+E.top+X.height>=Te.top||D.top+E.top+X.height>=Te.top+fe))&&(we.x=-(this.width+this.marginOffset.x),Te.left+we.x<this.containerBoundingRect.left+X.width&&he&&(we.x=he.edgeOffset.left-Te.left,we.y=he.edgeOffset.top-Te.top),this.newIndex=ae):oe||ae>this.index&&D.left+E.left+X.width>=Te.left?(we.x=-(this.width+this.marginOffset.x),this.newIndex=ae):(Ce||ae<this.index&&D.left+E.left<=Te.left+X.width)&&(we.x=this.width+this.marginOffset.x,this.newIndex==null&&(this.newIndex=ae)):this.axis.y&&(oe||ae>this.index&&D.top+E.top+X.height>=Te.top?(we.y=-(this.height+this.marginOffset.y),this.newIndex=ae):(Ce||ae<this.index&&D.top+E.top<=Te.top+X.height)&&(we.y=this.height+this.marginOffset.y,this.newIndex==null&&(this.newIndex=ae))),W2(Z,we),P[Q].translate=we}this.newIndex==null&&(this.newIndex=this.index),$&&(this.newIndex=H);var $e=$?this.prevIndex:H;C&&this.newIndex!==$e&&C({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:$e,isKeySorting:$,nodes:P,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return U1(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var s=this.props.getContainer;return typeof s!="function"?p0.findDOMNode(this):s(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var s=r.withRef?this.wrappedInstance:null;return Wn.createElement(lG.Provider,{value:this.sortableContextValue},Wn.createElement(n,bb({ref:s},rG(this.props,dme))))}},{key:"helperContainer",get:function(){var s=this.props.helperContainer;return typeof s=="function"?s():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){var s=this.props.useWindowAsScrollContainer;return s?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),o}(Wn.Component),Sa(e,"displayName",II("sortableList",n)),Sa(e,"defaultProps",cme),Sa(e,"propTypes",aG),t}var uG={index:Rr.number.isRequired,collection:Rr.oneOfType([Rr.number,Rr.string]),disabled:Rr.bool},mme=Object.keys(uG);function gme(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){BI(o,i);function o(){var a,s;Hb(this,o);for(var d=arguments.length,f=new Array(d),C=0;C<d;C++)f[C]=arguments[C];return s=OI(this,(a=xb(o)).call.apply(a,[this].concat(f))),Sa(go(go(s)),"wrappedInstance",Wn.createRef()),s}return Zb(o,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(s){this.node&&(s.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),s.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),s.collection!==this.props.collection&&(this.unregister(s.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var s=this.props,d=s.collection,f=s.disabled,C=s.index,O=p0.findDOMNode(this);O.sortableInfo={collection:d,disabled:f,index:C,manager:this.context.manager},this.node=O,this.ref={node:O},this.context.manager.add(d,this.ref)}},{key:"unregister",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.collection;this.context.manager.remove(s,this.ref)}},{key:"getWrappedInstance",value:function(){return U1(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var s=r.withRef?this.wrappedInstance:null;return Wn.createElement(n,bb({ref:s},rG(this.props,mme)))}}]),o}(Wn.Component),Sa(e,"displayName",II("sortableElement",n)),Sa(e,"contextType",lG),Sa(e,"propTypes",uG),Sa(e,"defaultProps",{collection:0}),t}function Si(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",e="c4894131c5d7f6ef28da960f43f4c830425a38cb",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",statementMap:{0:{start:{line:8,column:23},end:{line:19,column:2}},1:{start:{line:9,column:2},end:{line:18,column:7}},2:{start:{line:22,column:4},end:{line:31,column:5}},3:{start:{line:24,column:8},end:{line:24,column:54}},4:{start:{line:26,column:8},end:{line:26,column:53}},5:{start:{line:28,column:8},end:{line:28,column:56}},6:{start:{line:30,column:8},end:{line:30,column:49}},7:{start:{line:34,column:51},end:{line:34,column:61}},8:{start:{line:35,column:25},end:{line:35,column:27}},9:{start:{line:36,column:4},end:{line:41,column:5}},10:{start:{line:37,column:6},end:{line:37,column:76}},11:{start:{line:38,column:6},end:{line:40,column:7}},12:{start:{line:39,column:8},end:{line:39,column:103}},13:{start:{line:42,column:4},end:{line:53,column:6}},14:{start:{line:57,column:24},end:{line:66,column:3}},15:{start:{line:67,column:29},end:{line:69,column:3}},16:{start:{line:71,column:4},end:{line:73,column:6}},17:{start:{line:76,column:29},end:{line:76,column:82}},18:{start:{line:77,column:4},end:{line:122,column:6}},19:{start:{line:81,column:25},end:{line:81,column:72}},20:{start:{line:97,column:31},end:{line:97,column:79}},21:{start:{line:106,column:31},end:{line:106,column:76}},22:{start:{line:116,column:31},end:{line:116,column:88}},23:{start:{line:125,column:30},end:{line:125,column:106}},24:{start:{line:125,column:73},end:{line:125,column:105}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:38},end:{line:8,column:39}},loc:{start:{line:8,column:49},end:{line:19,column:1}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:21,column:2},end:{line:21,column:3}},loc:{start:{line:21,column:15},end:{line:32,column:3}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:33,column:2},end:{line:33,column:3}},loc:{start:{line:33,column:11},end:{line:54,column:3}},line:33},3:{name:"(anonymous_3)",decl:{start:{line:60,column:17},end:{line:60,column:18}},loc:{start:{line:60,column:23},end:{line:61,column:5}},line:60},4:{name:"(anonymous_4)",decl:{start:{line:62,column:20},end:{line:62,column:21}},loc:{start:{line:62,column:26},end:{line:63,column:5}},line:62},5:{name:"(anonymous_5)",decl:{start:{line:64,column:29},end:{line:64,column:30}},loc:{start:{line:64,column:35},end:{line:65,column:5}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:70,column:2},end:{line:70,column:3}},loc:{start:{line:70,column:20},end:{line:74,column:3}},line:70},7:{name:"(anonymous_7)",decl:{start:{line:75,column:2},end:{line:75,column:3}},loc:{start:{line:75,column:11},end:{line:123,column:3}},line:75},8:{name:"(anonymous_8)",decl:{start:{line:81,column:17},end:{line:81,column:18}},loc:{start:{line:81,column:25},end:{line:81,column:72}},line:81},9:{name:"(anonymous_9)",decl:{start:{line:97,column:23},end:{line:97,column:24}},loc:{start:{line:97,column:31},end:{line:97,column:79}},line:97},10:{name:"(anonymous_10)",decl:{start:{line:106,column:23},end:{line:106,column:24}},loc:{start:{line:106,column:31},end:{line:106,column:76}},line:106},11:{name:"(anonymous_11)",decl:{start:{line:116,column:23},end:{line:116,column:24}},loc:{start:{line:116,column:31},end:{line:116,column:88}},line:116},12:{name:"(anonymous_12)",decl:{start:{line:125,column:46},end:{line:125,column:47}},loc:{start:{line:125,column:73},end:{line:125,column:105}},line:125}},branchMap:{0:{loc:{start:{line:22,column:4},end:{line:31,column:5}},type:"switch",locations:[{start:{line:23,column:6},end:{line:24,column:54}},{start:{line:25,column:6},end:{line:26,column:53}},{start:{line:27,column:6},end:{line:28,column:56}},{start:{line:29,column:6},end:{line:30,column:49}}],line:22},1:{loc:{start:{line:36,column:4},end:{line:41,column:5}},type:"if",locations:[{start:{line:36,column:4},end:{line:41,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:36},2:{loc:{start:{line:38,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:38,column:6},end:{line:40,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},3:{loc:{start:{line:76,column:29},end:{line:76,column:82}},type:"cond-expr",locations:[{start:{line:76,column:67},end:{line:76,column:73}},{start:{line:76,column:76},end:{line:76,column:82}}],line:76}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},b:{0:[0,0,0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx"],names:[],mappings:"AAgBS,SACL,KADK;AAhBT,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAEvB,SAAQ,eAAe,cAAc,iBAAiB,gBAAe;AAErE,OAAO,eAAe;AACtB,SAAQ,iBAAiB,sBAAqB;AAQ9C,MAAM,iBAAiB,eAAe,CAAC,UAA+B;AACpE,SAAO,qBAAC,SAAI,WAAU,mCACpB;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAM,MAAM;AAAA;AAAA,IACd;AAAA,IACA,oBAAC,YAAO,WAAU,+BACf,gBAAM,SACT;AAAA,KACF;AACF,CAAC;AAUD,MAAM,mBAAmB,MAAM,UAA2B;AAAA,EACxD,aAAa;AACX,YAAO,KAAK,MAAM,QAAQ;AAAA,MAC1B,KAAK;AAAa,eAAO,oBAAC,iBAAc;AAAA,MACxC,KAAK;AAAQ,eAAO,oBAAC,gBAAa;AAAA,MAClC,KAAK;AAAQ,eAAO,oBAAC,mBAAgB;AAAA,MACrC,KAAK;AAAU,eAAO,oBAAC,YAAS;AAAA,IAChC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,gBAAgB,mBAAkB,IAAI,KAAK;AAElD,QAAI,iBAAiB;AACrB,QAAI,gBAAgB;AAClB,uBAAiB,oCAAoC,cAAc;AAEnE,UAAI,oBAAoB;AACtB,0BAAkB,qCAAqC,cAAc,KAAK,kBAAkB;AAAA,MAC9F;AAAA,IACF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,UAAU;AAAA,QACV,OAAO,KAAK,MAAM;AAAA,QAClB,WAAW,mCAAmC,cAAc;AAAA,QAC5D,eAAa,KAAK,MAAM;AAAA,QACxB,SAAS,KAAK,MAAM;AAAA,QACpB,eAAY;AAAA,QAEX,eAAK,WAAW;AAAA;AAAA,IACnB;AAAA,EACF;AACF;AAgBA,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,OAAO,eAAe;AAAA,IACpB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,yBAAyB,MAAM;AAAA,IAAC;AAAA,EAClC;AAAA,EAEA,OAAO,oBAAoB;AAAA,IACzB,eAAe,UAAU;AAAA,EAC3B;AAAA,EAEA,kBAAkB;AAChB,WAAO;AAAA,MACL,eAAe,EAAE,MAAM,GAAG;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,mBAAmB,KAAK,MAAM,eAAe,YAAY,SAAS;AAExE,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,IAAI,KAAK,MAAM;AAAA,QAEf,SAAS,QAAM,KAAK,MAAM,cAAc,KAAK,MAAM,UAAU;AAAA,QAC7D,eAAa,qBAAmB,KAAK,MAAM;AAAA,QAC3C,WAAW,WAAW;AAAA,UACpB,4BAA4B;AAAA,UAC5B,qCAAqC,KAAK,MAAM;AAAA,UAChD,CAAC,KAAK,MAAM,SAAU,GAAG;AAAA,QAC3B,CAAC;AAAA,QACD;AAAA,8BAAC,kBAAgB,GAAG,KAAK,OAAO;AAAA,UAChC,oBAAC,UAAK,OAAO,EAAC,UAAU,EAAC,GAAG;AAAA,UAC5B;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,qBAAmB,KAAK,MAAM,UAAQ;AAAA,cAC7C,QAAQ;AAAA,cACR,gBAAe;AAAA,cACf,SAAS,QAAM,KAAK,MAAM,eAAgB,KAAK,MAAM,UAAU;AAAA;AAAA,UACjE;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,qBAAmB,KAAK,MAAM,UAAQ;AAAA,cAC7C,QAAQ;AAAA,cACR,gBAAe;AAAA,cACf,SAAS,QAAM,KAAK,MAAM,YAAa,KAAK,MAAM,UAAU;AAAA;AAAA,UAC9D;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,qBAAmB,KAAK,MAAM,UAAQ;AAAA,cAC7C,QAAQ;AAAA,cACR,gBAAe;AAAA,cACf,oBAAoB;AAAA,cACpB,SAAS,QAAM,KAAK,MAAM,wBAAyB,KAAK,MAAM,UAAU;AAAA;AAAA,UAC1E;AAAA;AAAA;AAAA,MA5BK,KAAK,MAAM;AAAA,IA6BlB;AAAA,EACF;AACF;AAEA,MAAM,wBAAwB,gBAAoC,CAAC,UAA8B,oBAAC,iBAAe,GAAG,OAAO,CAAE;AAE7H,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c4894131c5d7f6ef28da960f43f4c830425a38cb"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Si=function(){return a},a}Si();const yme=(Si().s[0]++,sme(n=>(Si().f[0]++,Si().s[1]++,G.jsxs("div",{className:"maputnik-layer-list-item-handle",children:[G.jsx(oj,{className:"layer-handle__icon",type:n.layerType}),G.jsx("button",{className:"maputnik-layer-list-item-id",children:n.layerId})]}))));class vE extends Mn.Component{renderIcon(){switch(Si().f[1]++,Si().s[2]++,this.props.action){case"duplicate":return Si().b[0][0]++,Si().s[3]++,G.jsx(Ere,{});case"show":return Si().b[0][1]++,Si().s[4]++,G.jsx(Sre,{});case"hide":return Si().b[0][2]++,Si().s[5]++,G.jsx(Mre,{});case"delete":return Si().b[0][3]++,Si().s[6]++,G.jsx(Iv,{})}}render(){Si().f[2]++;const{classBlockName:e,classBlockModifier:t}=(Si().s[7]++,this.props);let r=(Si().s[8]++,"");return Si().s[9]++,e?(Si().b[1][0]++,Si().s[10]++,r=`maputnik-layer-list-icon-action__${e}`,Si().s[11]++,t?(Si().b[2][0]++,Si().s[12]++,r+=` maputnik-layer-list-icon-action__${e}--${t}`):Si().b[2][1]++):Si().b[1][1]++,Si().s[13]++,G.jsx("button",{tabIndex:-1,title:this.props.action,className:`maputnik-layer-list-icon-action ${r}`,"data-wd-key":this.props.wdKey,onClick:this.props.onClick,"aria-hidden":"true",children:this.renderIcon()})}}class lB extends Mn.Component{getChildContext(){return Si().f[6]++,Si().s[16]++,{reactIconBase:{size:14}}}render(){Si().f[7]++;const e=(Si().s[17]++,this.props.visibility==="visible"?(Si().b[3][0]++,"show"):(Si().b[3][1]++,"hide"));return Si().s[18]++,G.jsxs("li",{id:this.props.id,onClick:t=>(Si().f[8]++,Si().s[19]++,this.props.onLayerSelect(this.props.layerIndex)),"data-wd-key":"layer-list-item:"+this.props.layerId,className:Qf({"maputnik-layer-list-item":!0,"maputnik-layer-list-item-selected":this.props.isSelected,[this.props.className]:!0}),children:[G.jsx(yme,{...this.props}),G.jsx("span",{style:{flexGrow:1}}),G.jsx(vE,{wdKey:"layer-list-item:"+this.props.layerId+":delete",action:"delete",classBlockName:"delete",onClick:t=>(Si().f[9]++,Si().s[20]++,this.props.onLayerDestroy(this.props.layerIndex))}),G.jsx(vE,{wdKey:"layer-list-item:"+this.props.layerId+":copy",action:"duplicate",classBlockName:"duplicate",onClick:t=>(Si().f[10]++,Si().s[21]++,this.props.onLayerCopy(this.props.layerIndex))}),G.jsx(vE,{wdKey:"layer-list-item:"+this.props.layerId+":toggle-visibility",action:e,classBlockName:"visibility",classBlockModifier:e,onClick:t=>(Si().f[11]++,Si().s[22]++,this.props.onLayerVisibilityToggle(this.props.layerIndex))})]},this.props.layerId)}}sn(lB,"defaultProps",(Si().s[14]++,{isSelected:!1,visibility:"visible",onLayerCopy:()=>{Si().f[3]++},onLayerDestroy:()=>{Si().f[4]++},onLayerVisibilityToggle:()=>{Si().f[5]++}})),sn(lB,"childContextTypes",(Si().s[15]++,{reactIconBase:Rr.object}));const vme=(Si().s[23]++,gme(n=>(Si().f[12]++,Si().s[24]++,G.jsx(lB,{...n}))));function t5(){var n="/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",e="522bfc6b8aacbfd03b55d947af2897dc69beb570",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:20,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:21,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx"],names:[],mappings:"AAkBW;AAlBX,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAevB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,IAAI,KAAK,MAAM;AAAA,QACf,OAAO,KAAK,MAAM;AAAA,QAClB,MAAM,KAAK,MAAM;AAAA,QACjB,SAAS,KAAK,MAAM;AAAA,QACpB,UAAU,KAAK,MAAM;AAAA,QACrB,cAAY,KAAK,MAAM,YAAY;AAAA,QACnC,WAAW,WAAW,mBAAmB,KAAK,MAAM,SAAS;AAAA,QAC7D,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,OAAO,KAAK,MAAM;AAAA,QAEjB,eAAK,MAAM;AAAA;AAAA,IACd;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"522bfc6b8aacbfd03b55d947af2897dc69beb570"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return t5=function(){return a},a}t5();class is extends Mn.Component{render(){return t5().f[0]++,t5().s[0]++,G.jsx("button",{id:this.props.id,title:this.props.title,type:this.props.type,onClick:this.props.onClick,disabled:this.props.disabled,"aria-label":this.props["aria-label"],className:Qf("maputnik-button",this.props.className),"data-wd-key":this.props["data-wd-key"],style:this.props.style,children:this.props.children})}}/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var AG=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n5=AG.join(","),cG=typeof Element>"u",R1=cG?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r5=!cG&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n==null?void 0:n.ownerDocument},i5=function n(e,t){var r;t===void 0&&(t=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=i===""||i==="true",a=o||t&&e&&n(e.parentNode);return a},Cme=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},dG=function(e,t,r){if(i5(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(n5));return t&&R1.call(e,n5)&&i.unshift(e),i=i.filter(r),i},hG=function n(e,t,r){for(var i=[],o=Array.from(e);o.length;){var a=o.shift();if(!i5(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),d=s.length?s:a.children,f=n(d,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var C=R1.call(a,n5);C&&r.filter(a)&&(t||!e.includes(a))&&i.push(a);var O=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),E=!i5(O,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(O&&E){var P=n(O===!0?a.children:O.children,!0,r);r.flatten?i.push.apply(i,P):i.push({scopeParent:a,candidates:P})}else o.unshift.apply(o,a.children)}}return i},fG=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Lm=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Cme(e))&&!fG(e)?0:e.tabIndex},_me=function(e,t){var r=Lm(e);return r<0&&t&&!fG(e)?0:r},bme=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},pG=function(e){return e.tagName==="INPUT"},xme=function(e){return pG(e)&&e.type==="hidden"},wme=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Mme=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Sme=function(e){if(!e.name)return!0;var t=e.form||r5(e),r=function(s){return t.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=Mme(i,e.form);return!o||o===e},Eme=function(e){return pG(e)&&e.type==="radio"},Ome=function(e){return Eme(e)&&!Sme(e)},Bme=function(e){var t,r=e&&r5(e),i=(t=r)===null||t===void 0?void 0:t.host,o=!1;if(r&&r!==e){var a,s,d;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||e!=null&&(d=e.ownerDocument)!==null&&d!==void 0&&d.contains(e));!o&&i;){var f,C,O;r=r5(i),i=(f=r)===null||f===void 0?void 0:f.host,o=!!((C=i)!==null&&C!==void 0&&(O=C.ownerDocument)!==null&&O!==void 0&&O.contains(i))}}return o},SP=function(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;return r===0&&i===0},Ime=function(e,t){var r=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=R1.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(R1.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=e;e;){var d=e.parentElement,f=r5(e);if(d&&!d.shadowRoot&&i(d)===!0)return SP(e);e.assignedSlot?e=e.assignedSlot:!d&&f!==e.ownerDocument?e=f.host:e=d}e=s}if(Bme(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return SP(e);return!1},kme=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var i=t.children.item(r);if(i.tagName==="LEGEND")return R1.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},o5=function(e,t){return!(t.disabled||i5(t)||xme(t)||Ime(t,e)||wme(t)||kme(t))},uB=function(e,t){return!(Ome(t)||Lm(t)<0||!o5(e,t))},Tme=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Kme=function n(e){var t=[],r=[];return e.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,d=_me(s,a),f=a?n(i.candidates):s;d===0?a?t.push.apply(t,f):t.push(s):r.push({documentOrder:o,tabIndex:d,item:i,isScope:a,content:f})}),r.sort(bme).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(t)},mG=function(e,t){t=t||{};var r;return t.getShadowRoot?r=hG([e],t.includeContainer,{filter:uB.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Tme}):r=dG(e,t.includeContainer,uB.bind(null,t)),Kme(r)},gG=function(e,t){t=t||{};var r;return t.getShadowRoot?r=hG([e],t.includeContainer,{filter:o5.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=dG(e,t.includeContainer,o5.bind(null,t)),r},J0=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return R1.call(e,n5)===!1?!1:uB(t,e)},Pme=AG.concat("iframe").join(","),S3=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return R1.call(e,Pme)===!1?!1:o5(t,e)};const Dme=Object.freeze(Object.defineProperty({__proto__:null,focusable:gG,getTabIndex:Lm,isFocusable:S3,isTabbable:J0,tabbable:mG},Symbol.toStringTag,{value:"Module"}));/*!
* focus-trap 7.5.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/function EP(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function OP(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?EP(Object(t),!0).forEach(function(r){Lme(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):EP(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Lme(n,e,t){return e=Ume(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Fme(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Ume(n){var e=Fme(n,"string");return typeof e=="symbol"?e:String(e)}var BP={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r.pause()}var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Rme=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},zme=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},E_=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},jme=function(e){return E_(e)&&!e.shiftKey},Nme=function(e){return E_(e)&&e.shiftKey},IP=function(e){return setTimeout(e,0)},kP=function(e,t){var r=-1;return e.every(function(i,o){return t(i)?(r=o,!1):!0}),r},FC=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},G2=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Wme=[],Gme=function(e,t){var r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||Wme,o=OP({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:jme,isKeyBackward:Nme},t),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,d=function(Pe,he,$e){return Pe&&Pe[he]!==void 0?Pe[he]:o[$e||he]},f=function(Pe,he){var $e=typeof(he==null?void 0:he.composedPath)=="function"?he.composedPath():void 0;return a.containerGroups.findIndex(function(ye){var gt=ye.container,yt=ye.tabbableNodes;return gt.contains(Pe)||($e==null?void 0:$e.includes(gt))||yt.find(function(st){return st===Pe})})},C=function(Pe){var he=o[Pe];if(typeof he=="function"){for(var $e=arguments.length,ye=new Array($e>1?$e-1:0),gt=1;gt<$e;gt++)ye[gt-1]=arguments[gt];he=he.apply(void 0,ye)}if(he===!0&&(he=void 0),!he){if(he===void 0||he===!1)return he;throw new Error("`".concat(Pe,"` was specified but was not a node, or did not return a node"))}var yt=he;if(typeof he=="string"&&(yt=r.querySelector(he),!yt))throw new Error("`".concat(Pe,"` as selector refers to no known node"));return yt},O=function(){var Pe=C("initialFocus");if(Pe===!1)return!1;if(Pe===void 0||!S3(Pe,o.tabbableOptions))if(f(r.activeElement)>=0)Pe=r.activeElement;else{var he=a.tabbableGroups[0],$e=he&&he.firstTabbableNode;Pe=$e||C("fallbackFocus")}if(!Pe)throw new Error("Your focus-trap needs to have at least one focusable element");return Pe},E=function(){if(a.containerGroups=a.containers.map(function(Pe){var he=mG(Pe,o.tabbableOptions),$e=gG(Pe,o.tabbableOptions),ye=he.length>0?he[0]:void 0,gt=he.length>0?he[he.length-1]:void 0,yt=$e.find(function(Re){return J0(Re)}),st=$e.slice().reverse().find(function(Re){return J0(Re)}),ft=!!he.find(function(Re){return Lm(Re)>0});return{container:Pe,tabbableNodes:he,focusableNodes:$e,posTabIndexesFound:ft,firstTabbableNode:ye,lastTabbableNode:gt,firstDomTabbableNode:yt,lastDomTabbableNode:st,nextTabbableNode:function(Ve){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Jt=he.indexOf(Ve);return Jt<0?Xe?$e.slice($e.indexOf(Ve)+1).find(function(Ht){return J0(Ht)}):$e.slice(0,$e.indexOf(Ve)).reverse().find(function(Ht){return J0(Ht)}):he[Jt+(Xe?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(Pe){return Pe.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!C("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(Pe){return Pe.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},P=function Te(Pe){var he=Pe.activeElement;if(he)return he.shadowRoot&&he.shadowRoot.activeElement!==null?Te(he.shadowRoot):he},D=function Te(Pe){if(Pe!==!1&&Pe!==P(document)){if(!Pe||!Pe.focus){Te(O());return}Pe.focus({preventScroll:!!o.preventScroll}),a.mostRecentlyFocusedNode=Pe,Rme(Pe)&&Pe.select()}},$=function(Pe){var he=C("setReturnFocus",Pe);return he||(he===!1?!1:Pe)},H=function(Pe){var he=Pe.target,$e=Pe.event,ye=Pe.isBackward,gt=ye===void 0?!1:ye;he=he||G2($e),E();var yt=null;if(a.tabbableGroups.length>0){var st=f(he,$e),ft=st>=0?a.containerGroups[st]:void 0;if(st<0)gt?yt=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:yt=a.tabbableGroups[0].firstTabbableNode;else if(gt){var Re=kP(a.tabbableGroups,function(Qt){var Yt=Qt.firstTabbableNode;return he===Yt});if(Re<0&&(ft.container===he||S3(he,o.tabbableOptions)&&!J0(he,o.tabbableOptions)&&!ft.nextTabbableNode(he,!1))&&(Re=st),Re>=0){var Ve=Re===0?a.tabbableGroups.length-1:Re-1,Xe=a.tabbableGroups[Ve];yt=Lm(he)>=0?Xe.lastTabbableNode:Xe.lastDomTabbableNode}else E_($e)||(yt=ft.nextTabbableNode(he,!1))}else{var Jt=kP(a.tabbableGroups,function(Qt){var Yt=Qt.lastTabbableNode;return he===Yt});if(Jt<0&&(ft.container===he||S3(he,o.tabbableOptions)&&!J0(he,o.tabbableOptions)&&!ft.nextTabbableNode(he))&&(Jt=st),Jt>=0){var Ht=Jt===a.tabbableGroups.length-1?0:Jt+1,bt=a.tabbableGroups[Ht];yt=Lm(he)>=0?bt.firstTabbableNode:bt.firstDomTabbableNode}else E_($e)||(yt=ft.nextTabbableNode(he))}}else yt=C("fallbackFocus");return yt},Q=function(Pe){var he=G2(Pe);if(!(f(he,Pe)>=0)){if(FC(o.clickOutsideDeactivates,Pe)){s.deactivate({returnFocus:o.returnFocusOnDeactivate});return}FC(o.allowOutsideClick,Pe)||Pe.preventDefault()}},N=function(Pe){var he=G2(Pe),$e=f(he,Pe)>=0;if($e||he instanceof Document)$e&&(a.mostRecentlyFocusedNode=he);else{Pe.stopImmediatePropagation();var ye,gt=!0;if(a.mostRecentlyFocusedNode)if(Lm(a.mostRecentlyFocusedNode)>0){var yt=f(a.mostRecentlyFocusedNode),st=a.containerGroups[yt].tabbableNodes;if(st.length>0){var ft=st.findIndex(function(Re){return Re===a.mostRecentlyFocusedNode});ft>=0&&(o.isKeyForward(a.recentNavEvent)?ft+1<st.length&&(ye=st[ft+1],gt=!1):ft-1>=0&&(ye=st[ft-1],gt=!1))}}else a.containerGroups.some(function(Re){return Re.tabbableNodes.some(function(Ve){return Lm(Ve)>0})})||(gt=!1);else gt=!1;gt&&(ye=H({target:a.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(a.recentNavEvent)})),D(ye||a.mostRecentlyFocusedNode||O())}a.recentNavEvent=void 0},Z=function(Pe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=Pe;var $e=H({event:Pe,isBackward:he});$e&&(E_(Pe)&&Pe.preventDefault(),D($e))},ae=function(Pe){if(zme(Pe)&&FC(o.escapeDeactivates,Pe)!==!1){Pe.preventDefault(),s.deactivate();return}(o.isKeyForward(Pe)||o.isKeyBackward(Pe))&&Z(Pe,o.isKeyBackward(Pe))},pe=function(Pe){var he=G2(Pe);f(he,Pe)>=0||FC(o.clickOutsideDeactivates,Pe)||FC(o.allowOutsideClick,Pe)||(Pe.preventDefault(),Pe.stopImmediatePropagation())},fe=function(){if(a.active)return BP.activateTrap(i,s),a.delayInitialFocusTimer=o.delayInitialFocus?IP(function(){D(O())}):D(O()),r.addEventListener("focusin",N,!0),r.addEventListener("mousedown",Q,{capture:!0,passive:!1}),r.addEventListener("touchstart",Q,{capture:!0,passive:!1}),r.addEventListener("click",pe,{capture:!0,passive:!1}),r.addEventListener("keydown",ae,{capture:!0,passive:!1}),s},X=function(){if(a.active)return r.removeEventListener("focusin",N,!0),r.removeEventListener("mousedown",Q,!0),r.removeEventListener("touchstart",Q,!0),r.removeEventListener("click",pe,!0),r.removeEventListener("keydown",ae,!0),s},oe=function(Pe){var he=Pe.some(function($e){var ye=Array.from($e.removedNodes);return ye.some(function(gt){return gt===a.mostRecentlyFocusedNode})});he&&D(O())},Ce=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(oe):void 0,we=function(){Ce&&(Ce.disconnect(),a.active&&!a.paused&&a.containers.map(function(Pe){Ce.observe(Pe,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(Pe){if(a.active)return this;var he=d(Pe,"onActivate"),$e=d(Pe,"onPostActivate"),ye=d(Pe,"checkCanFocusTrap");ye||E(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,he==null||he();var gt=function(){ye&&E(),fe(),we(),$e==null||$e()};return ye?(ye(a.containers.concat()).then(gt,gt),this):(gt(),this)},deactivate:function(Pe){if(!a.active)return this;var he=OP({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},Pe);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,X(),a.active=!1,a.paused=!1,we(),BP.deactivateTrap(i,s);var $e=d(he,"onDeactivate"),ye=d(he,"onPostDeactivate"),gt=d(he,"checkCanReturnFocus"),yt=d(he,"returnFocus","returnFocusOnDeactivate");$e==null||$e();var st=function(){IP(function(){yt&&D($(a.nodeFocusedBeforeActivation)),ye==null||ye()})};return yt&&gt?(gt($(a.nodeFocusedBeforeActivation)).then(st,st),this):(st(),this)},pause:function(Pe){if(a.paused||!a.active)return this;var he=d(Pe,"onPause"),$e=d(Pe,"onPostPause");return a.paused=!0,he==null||he(),X(),we(),$e==null||$e(),this},unpause:function(Pe){if(!a.paused||!a.active)return this;var he=d(Pe,"onUnpause"),$e=d(Pe,"onPostUnpause");return a.paused=!1,he==null||he(),E(),fe(),we(),$e==null||$e(),this},updateContainerElements:function(Pe){var he=[].concat(Pe).filter(Boolean);return a.containers=he.map(function($e){return typeof $e=="string"?r.querySelector($e):$e}),a.active&&E(),we(),this}},s.updateContainerElements(e),s};const $me=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:Gme},Symbol.toStringTag,{value:"Module"})),Qme=VB($me),Yme=VB(Dme);function yv(n){"@babel/helpers - typeof";return yv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yv(n)}function qme(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function TP(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,yG(r.key),r)}}function Vme(n,e,t){return e&&TP(n.prototype,e),t&&TP(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function Hme(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&AB(n,e)}function AB(n,e){return AB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AB(n,e)}function Zme(n){var e=Jme();return function(){var r=a5(n),i;if(e){var o=a5(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Xme(this,i)}}function Xme(n,e){if(e&&(yv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o_(n)}function o_(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Jme(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function a5(n){return a5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a5(n)}function e0e(n,e,t){return e=yG(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yG(n){var e=t0e(n,"string");return yv(e)==="symbol"?e:String(e)}function t0e(n,e){if(yv(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(yv(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var $2=Wn,mi=Lh,n0e=Qme,r0e=n0e.createFocusTrap,i0e=Yme,o0e=i0e.isFocusable,kI=function(n){Hme(t,n);var e=Zme(t);function t(r){var i;qme(this,t),i=e.call(this,r),e0e(o_(i),"getNodeForOption",function(s){var d,f=(d=this.internalOptions[s])!==null&&d!==void 0?d:this.originalOptions[s];if(typeof f=="function"){for(var C=arguments.length,O=new Array(C>1?C-1:0),E=1;E<C;E++)O[E-1]=arguments[E];f=f.apply(void 0,O)}if(f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(s,"` was specified but was not a node, or did not return a node"))}var P=f;if(typeof f=="string"){var D;if(P=(D=this.getDocument())===null||D===void 0?void 0:D.querySelector(f),!P)throw new Error("`".concat(s,"` as selector refers to no known node"))}return P}),i.handleDeactivate=i.handleDeactivate.bind(o_(i)),i.handlePostDeactivate=i.handlePostDeactivate.bind(o_(i)),i.handleClickOutsideDeactivates=i.handleClickOutsideDeactivates.bind(o_(i)),i.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:i.handleDeactivate,onPostDeactivate:i.handlePostDeactivate,clickOutsideDeactivates:i.handleClickOutsideDeactivates},i.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var o=r.focusTrapOptions;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){if(a==="returnFocusOnDeactivate"||a==="onDeactivate"||a==="onPostDeactivate"||a==="checkCanReturnFocus"||a==="clickOutsideDeactivates"){i.originalOptions[a]=o[a];continue}i.internalOptions[a]=o[a]}return i.outsideClick=null,i.focusTrapElements=r.containerElements||[],i.updatePreviousElement(),i}return Vme(t,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var i=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return i||(i===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var i=this.getDocument();i&&(this.previouslyFocusedElement=i.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(i){var o=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,i):this.originalOptions.clickOutsideDeactivates;return o&&(this.outsideClick={target:i.target,allowDeactivation:o}),o}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var i=this,o=function(){var s=i.getReturnFocusNode(),d=!!(i.originalOptions.returnFocusOnDeactivate&&s!==null&&s!==void 0&&s.focus&&(!i.outsideClick||i.outsideClick.allowDeactivation&&!o0e(i.outsideClick.target,i.internalOptions.tabbableOptions))),f=i.internalOptions.preventScroll,C=f===void 0?!1:f;d&&s.focus({preventScroll:C}),i.originalOptions.onPostDeactivate&&i.originalOptions.onPostDeactivate.call(null),i.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(o,o):o()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var i=this.focusTrapElements.some(Boolean);i&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(i){if(this.focusTrap){i.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var o=!i.active&&this.props.active,a=i.active&&!this.props.active,s=!i.paused&&this.props.paused,d=i.paused&&!this.props.paused;if(o&&(this.updatePreviousElement(),this.focusTrap.activate()),a){this.deactivateTrap();return}s&&this.focusTrap.pause(),d&&this.focusTrap.unpause()}else i.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var i=this,o=this.props.children?$2.Children.only(this.props.children):void 0;if(o){if(o.type&&o.type===$2.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var a=function(f){var C=i.props.containerElements;o&&(typeof o.ref=="function"?o.ref(f):o.ref&&(o.ref.current=f)),i.focusTrapElements=C||[f]},s=$2.cloneElement(o,{ref:a});return s}return null}}]),t}($2.Component),UC=typeof Element>"u"?Function:Element;kI.propTypes={active:mi.bool,paused:mi.bool,focusTrapOptions:mi.shape({document:mi.object,onActivate:mi.func,onPostActivate:mi.func,checkCanFocusTrap:mi.func,onPause:mi.func,onPostPause:mi.func,onUnpause:mi.func,onPostUnpause:mi.func,onDeactivate:mi.func,onPostDeactivate:mi.func,checkCanReturnFocus:mi.func,initialFocus:mi.oneOfType([mi.instanceOf(UC),mi.string,mi.bool,mi.func]),fallbackFocus:mi.oneOfType([mi.instanceOf(UC),mi.string,mi.func]),escapeDeactivates:mi.oneOfType([mi.bool,mi.func]),clickOutsideDeactivates:mi.oneOfType([mi.bool,mi.func]),returnFocusOnDeactivate:mi.bool,setReturnFocus:mi.oneOfType([mi.instanceOf(UC),mi.string,mi.bool,mi.func]),allowOutsideClick:mi.oneOfType([mi.bool,mi.func]),preventScroll:mi.bool,tabbableOptions:mi.shape({displayCheck:mi.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:mi.oneOfType([mi.bool,mi.func])}),trapStack:mi.array,isKeyForward:mi.func,isKeyBackward:mi.func}),containerElements:mi.arrayOf(mi.instanceOf(UC)),children:mi.oneOfType([mi.element,mi.instanceOf(UC)])};kI.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:r0e};var a0e=kI,vG={exports:{}};(function(n){(function(e){var t=!1,r,i;function o(){if(typeof r<"u")return r;var O=document.documentElement,E=document.createElement("div");return E.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),O.appendChild(E),r=E.offsetWidth-E.clientWidth,O.removeChild(E),r}function a(){return document.documentElement.scrollHeight>window.innerHeight}function s(O){if(!(typeof document>"u"||t)){var E=document.documentElement;i=window.pageYOffset,a()?E.style.width="calc(100% - "+o()+"px)":E.style.width="100%",E.style.position="fixed",E.style.top=-i+"px",E.style.overflow="hidden",t=!0}}function d(){if(!(typeof document>"u"||!t)){var O=document.documentElement;O.style.width="",O.style.position="",O.style.top="",O.style.overflow="",window.scroll(0,i),t=!1}}function f(){if(t){d();return}s()}var C={on:s,off:d,toggle:f};n.exports=C})()})(vG);var s0e=vG.exports;function cB(n){"@babel/helpers - typeof";return cB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cB(n)}function CG(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function KP(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function _G(n,e,t){return e&&KP(n.prototype,e),t&&KP(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function bG(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&dB(n,e)}function dB(n,e){return dB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dB(n,e)}function xG(n){var e=u0e();return function(){var r=s5(n),i;if(e){var o=s5(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0e(this,i)}}function l0e(n,e){if(e&&(cB(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wy(n)}function wy(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function u0e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function s5(n){return s5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s5(n)}function p1(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var o1=Wn,A0e=p0,c0e=a0e,Q2=s0e,TI=function(n){bG(t,n);var e=xG(t);function t(r){var i;if(CG(this,t),i=e.call(this,r),p1(wy(i),"getApplicationNode",function(){return i.props.getApplicationNode?i.props.getApplicationNode():i.props.applicationNode}),p1(wy(i),"checkUnderlayClick",function(o){i.dialogNode&&i.dialogNode.contains(o.target)||o.pageX>o.target.ownerDocument.documentElement.offsetWidth||o.pageY>o.target.ownerDocument.documentElement.offsetHeight||i.exit(o)}),p1(wy(i),"checkDocumentKeyDown",function(o){i.props.escapeExits&&(o.key==="Escape"||o.key==="Esc"||o.keyCode===27)&&i.exit(o)}),p1(wy(i),"exit",function(o){i.props.onExit&&i.props.onExit(o)}),!r.titleText&&!r.titleId)throw new Error("react-aria-modal instances should have a `titleText` or `titleId`");return i}return _G(t,[{key:"componentDidMount",value:function(){this.props.onEnter&&this.props.onEnter();var i=this.getApplicationNode();setTimeout(function(){i&&i.setAttribute("aria-hidden","true")},0),this.props.escapeExits&&this.addKeyDownListener(),this.props.scrollDisabled&&Q2.on()}},{key:"componentDidUpdate",value:function(i){i.scrollDisabled&&!this.props.scrollDisabled?Q2.off():!i.scrollDisabled&&this.props.scrollDisabled&&Q2.on(),this.props.escapeExits&&!i.escapeExits?this.addKeyDownListener():!this.props.escapeExits&&i.escapeExits&&this.removeKeyDownListener()}},{key:"componentWillUnmount",value:function(){this.props.scrollDisabled&&Q2.off();var i=this.getApplicationNode();i&&i.setAttribute("aria-hidden","false"),this.removeKeyDownListener()}},{key:"addKeyDownListener",value:function(){var i=this;setTimeout(function(){document.addEventListener("keydown",i.checkDocumentKeyDown)})}},{key:"removeKeyDownListener",value:function(){var i=this;setTimeout(function(){document.removeEventListener("keydown",i.checkDocumentKeyDown)})}},{key:"render",value:function(){var i=this.props,o={};if(i.includeDefaultStyles&&(o={position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1050,overflowX:"hidden",overflowY:"auto",WebkitOverflowScrolling:"touch",textAlign:"center"},i.underlayColor&&(o.background=i.underlayColor),i.underlayClickExits&&(o.cursor="pointer")),i.underlayStyle)for(var a in i.underlayStyle)i.underlayStyle.hasOwnProperty(a)&&(o[a]=i.underlayStyle[a]);var s={className:i.underlayClass,style:o};i.underlayClickExits&&(s.onMouseDown=this.checkUnderlayClick);for(var d in this.props.underlayProps)s[d]=this.props.underlayProps[d];var f={};i.includeDefaultStyles&&(f={display:"inline-block",height:"100%",verticalAlign:"middle"});var C={key:"a",style:f},O={};if(i.includeDefaultStyles&&(O={display:"inline-block",textAlign:"left",top:0,maxWidth:"100%",cursor:"auto",outline:i.focusDialog?0:null},i.verticallyCenter&&(O.verticalAlign="middle",O.top=0)),i.dialogStyle)for(var E in i.dialogStyle)i.dialogStyle.hasOwnProperty(E)&&(O[E]=i.dialogStyle[E]);var P={key:"b",ref:(function(Q){this.dialogNode=Q}).bind(this),role:i.alert?"alertdialog":"dialog",id:i.dialogId,className:i.dialogClass,style:O};i.titleId?P["aria-labelledby"]=i.titleId:i.titleText&&(P["aria-label"]=i.titleText),i.focusDialog&&(P.tabIndex="-1");for(var D in i)/^(data-|aria-)/.test(D)&&(P[D]=i[D]);var $=[o1.createElement("div",P,i.children)];i.verticallyCenter&&$.unshift(o1.createElement("div",C));var H=i.focusTrapOptions||{};return(i.focusDialog||i.initialFocus)&&(H.initialFocus=i.focusDialog?"#".concat(this.props.dialogId):i.initialFocus),H.escapeDeactivates=i.escapeExits,o1.createElement(c0e,{focusTrapOptions:H,paused:i.focusTrapPaused},o1.createElement("div",s,$))}}]),t}(o1.Component);p1(TI,"defaultProps",{underlayProps:{},dialogId:"react-aria-modal-dialog",underlayClickExits:!0,escapeExits:!0,underlayColor:"rgba(0,0,0,0.5)",includeDefaultStyles:!0,focusTrapPaused:!1,scrollDisabled:!0});function wG(n,e){if(!window.document)return function(){return null};e=e||{};var t=function(r){bG(o,r);var i=xG(o);function o(){var a;CG(this,o);for(var s=arguments.length,d=new Array(s),f=0;f<s;f++)d[f]=arguments[f];return a=i.call.apply(i,[this].concat(d)),p1(wy(a),"container",null),a}return _G(o,[{key:"componentDidMount",value:function(){e.renderTo?this.container=typeof e.renderTo=="string"?document.querySelector(e.renderTo):e.renderTo:(this.container=document.createElement("div"),document.body.appendChild(this.container)),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){e.renderTo||this.container.parentNode.removeChild(this.container)}},{key:"render",value:function(){return this.container===null||!this.props.mounted?null:A0e.createPortal(o1.createElement(n,this.props,this.props.children),this.container)}}]),o}(o1.Component);return p1(t,"defaultProps",{mounted:!0}),t}var MG=wG(TI);MG.renderTo=function(n){return wG(TI,{renderTo:n})};var d0e=MG;const h0e=Ba(d0e);function Pl(){var n="/home/runner/work/maputnik/maputnik/src/components/Modal.tsx",e="55b511200efca707daa3ccb304d63dc159a8f390",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Modal.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:10,column:3}},1:{start:{line:12,column:12},end:{line:19,column:3}},2:{start:{line:13,column:4},end:{line:15,column:5}},3:{start:{line:14,column:6},end:{line:14,column:36}},4:{start:{line:16,column:4},end:{line:18,column:10}},5:{start:{line:17,column:6},end:{line:17,column:37}},6:{start:{line:21,column:14},end:{line:21,column:26}},7:{start:{line:22,column:4},end:{line:60,column:5}},8:{start:{line:23,column:6},end:{line:57,column:8}},9:{start:{line:59,column:6},end:{line:59,column:19}},10:{start:{line:63,column:14},end:{line:63,column:46}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:12},end:{line:12,column:13}},loc:{start:{line:12,column:18},end:{line:19,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:16,column:15},end:{line:16,column:16}},loc:{start:{line:16,column:21},end:{line:18,column:5}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:61,column:3}},line:20}},branchMap:{0:{loc:{start:{line:13,column:4},end:{line:15,column:5}},type:"if",locations:[{start:{line:13,column:4},end:{line:15,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:13},1:{loc:{start:{line:22,column:4},end:{line:60,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:60,column:5}},{start:{line:58,column:11},end:{line:60,column:5}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Modal.tsx"],names:[],mappings:"AAgDU,SACE,KADF;AAhDV,OAAO,WAAkC;AACzC,SAAQ,eAAc;AACtB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAA0B,uBAAuB;AAajD,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,OAAO,eAAe;AAAA,IACpB,oBAAoB;AAAA,EACtB;AAAA;AAAA,EAGA,UAAU,MAAM;AACd,QAAI,SAAS,eAAe;AAC1B,MAAC,SAAS,cAA8B,KAAK;AAAA,IAC/C;AAEA,eAAW,MAAM;AACf,WAAK,MAAM,aAAa,KAAK;AAAA,IAC/B,GAAG,CAAC;AAAA,EACN;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,QAAG,KAAK,MAAM,QAAQ;AACpB,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,WAAW,KAAK,MAAM;AAAA,UACtB,oBAAoB,KAAK,MAAM;AAAA,UAE/B,eAAe,KAAK,MAAM;AAAA,UAC1B,eAAa,KAAK,MAAM,aAAa;AAAA,UACrC,kBAAkB;AAAA,UAClB,QAAQ,KAAK;AAAA,UAEb;AAAA,YAAC;AAAA;AAAA,cAAI,WAAW,WAAW,kBAAkB,KAAK,MAAM,SAAS;AAAA,cAC/D,eAAa,KAAK,MAAM,aAAa;AAAA,cAErC;AAAA,qCAAC,YAAO,WAAU,yBAChB;AAAA,sCAAC,QAAG,WAAU,+BAA+B,eAAK,MAAM,OAAM;AAAA,kBAC9D,oBAAC,UAAK,WAAU,+BAA8B;AAAA,kBAC9C;AAAA,oBAAC;AAAA;AAAA,sBAAO,WAAU;AAAA,sBAChB,OAAO,EAAE,aAAa;AAAA,sBACtB,SAAS,KAAK;AAAA,sBACd,eAAa,KAAK,MAAM,aAAa,IAAE;AAAA,sBAEvC,8BAAC,WAAQ;AAAA;AAAA,kBACX;AAAA,mBACF;AAAA,gBACA,oBAAC,SAAI,WAAU,2BACb,8BAAC,SAAI,WAAU,0BAA0B,eAAK,MAAM,UAAS,GAC/D;AAAA;AAAA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,IACF,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,QAAQ,gBAAgB,EAAE,aAAa;AAC7C,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"55b511200efca707daa3ccb304d63dc159a8f390"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Pl=function(){return a},a}Pl();class SG extends Mn.Component{constructor(){super(...arguments);sn(this,"onClose",(Pl().s[1]++,()=>{Pl().f[0]++,Pl().s[2]++,document.activeElement?(Pl().b[0][0]++,Pl().s[3]++,document.activeElement.blur()):Pl().b[0][1]++,Pl().s[4]++,setTimeout(()=>{Pl().f[1]++,Pl().s[5]++,this.props.onOpenToggle(!1)},0)}))}render(){Pl().f[2]++;const t=(Pl().s[6]++,this.props.t);return Pl().s[7]++,this.props.isOpen?(Pl().b[1][0]++,Pl().s[8]++,G.jsx(h0e,{titleText:this.props.title,underlayClickExits:this.props.underlayClickExits,underlayProps:this.props.underlayProps,"data-wd-key":this.props["data-wd-key"],verticallyCenter:!0,onExit:this.onClose,children:G.jsxs("div",{className:Qf("maputnik-modal",this.props.className),"data-wd-key":this.props["data-wd-key"],children:[G.jsxs("header",{className:"maputnik-modal-header",children:[G.jsx("h1",{className:"maputnik-modal-header-title",children:this.props.title}),G.jsx("span",{className:"maputnik-modal-header-space"}),G.jsx("button",{className:"maputnik-modal-header-toggle",title:t("Close modal"),onClick:this.onClose,"data-wd-key":this.props["data-wd-key"]+".close-modal",children:G.jsx(Dre,{})})]}),G.jsx("div",{className:"maputnik-modal-scroller",children:G.jsx("div",{className:"maputnik-modal-content",children:this.props.children})})]})})):(Pl().b[1][1]++,Pl().s[9]++,!1)}}sn(SG,"defaultProps",(Pl().s[0]++,{underlayClickExits:!0}));const g0=(Pl().s[10]++,No()(SG)),f0e=8,p0e={version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",example:{"styleeditor:slimmode":!0,"styleeditor:comment":"Style generated 1677776383","styleeditor:version":"3.14.159265","example:object":{String:"one",Number:2,Boolean:!1}}},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sky:{type:"sky",doc:"The map's sky configuration.",example:{"sky-color":"#199EF3","fog-color":"#00ff00","horizon-blend":.5,"fog-blend":.6}},terrain:{type:"terrain",doc:"The terrain configuration.",example:{source:"raster-dem-source",exaggeration:.5}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"maplibre-demotiles":{type:"vector",url:"https://demotiles.maplibre.org/tiles/tiles.json"}}},sprite:{type:"sprite",doc:"An array of `{id: 'my-sprite', url: 'https://example.com/sprite'}` objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.",example:"https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"coastline",source:"maplibre","source-layer":"contries",type:"line",paint:{"line-color":"#198EC8"}}]}},m0e={"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},g0e=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],y0e={type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},v0e={type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},C0e={type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."},custom:{doc:"Decodes tiles using the redFactor, blueFactor, greenFactor, baseShift parameters."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default."},redFactor:{type:"number",default:1,doc:"Value that will be multiplied by the red channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4"}}},blueFactor:{type:"number",default:1,doc:"Value that will be multiplied by the blue channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4"}}},greenFactor:{type:"number",default:1,doc:"Value that will be multiplied by the green channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4"}}},baseShift:{type:"number",default:0,doc:"Value that will be added to the encoding mix when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4"}}},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},_0e={type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{required:!0,type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://maplibre.org/maplibre-gl-js-docs/api/sources/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},b0e={type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},x0e={type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},w0e={id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",example:{"source:comment":"Hydrology FCCODE 460 - Narrow wash"}},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},M0e=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],S0e={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},E0e={"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},O0e={"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},B0e={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},I0e={"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},k0e={"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image",{"!":"icon-overlap"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{doc:"The icon will be hidden if it collides with any other previously drawn symbol."},always:{doc:"The icon will be visible even if it collides with any other previously drawn symbol."},cooperative:{doc:"If the icon collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new icon is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new icon is visible."}},doc:"Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"2.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},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",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",doc:"Size of additional area round the icon bounding box used for detecting symbol collisions. Values are declared using CSS margin shorthand syntax: a single value applies to all four sides; two values apply to [top/bottom, left/right]; three values apply to [top, left/right, bottom]; four values apply to [top, right, bottom, left]. For backwards compatibility, a single bare number is accepted, and treated the same as a one-element array - padding applied to all sides.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.2.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},"viewport-glyph":{doc:"When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"},"`viewport-glyph` value":{js:"2.1.8"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],doc:'To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position. \n\n The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor. \n\n When present, this property takes precedence over `text-anchor`, `text-variable-anchor`, `text-offset`, and `text-radial-offset`. \n\n ```json \n { "text-variable-anchor-offset": ["top", [0, 4], "left", [3,0], "bottom", [1, 1]] } \n ``` \n\n When the renderer chooses the `top` anchor, `[0, 4]` will be used for `text-offset`; the text will be shifted down by 4 ems. \n\n When the renderer chooses the `left` anchor, `[3, 0]` will be used for `text-offset`; the text will be shifted right by 3 ems.',"sdk-support":{"basic functionality":{js:"3.3.0"},"data-driven styling":{js:"3.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field",{"!":"text-overlap"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{doc:"The text will be hidden if it collides with any other previously drawn symbol."},always:{doc:"The text will be visible even if it collides with any other previously drawn symbol."},cooperative:{doc:"If the text collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new text is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new text is visible."}},doc:"Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead",requires:["text-field"],"sdk-support":{"basic functionality":{js:"2.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},T0e={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},K0e={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},P0e={type:"array",value:"*",doc:"A filter selects specific features from a layer."},D0e={type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},L0e={type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},F0e={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},U0e={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},R0e={doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",ios:"6.0.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",ios:"6.0.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `["get", "building_type"]`). Each label must be either:\n - a single literal value; or\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `["c", "b"]`). The input matches if any of the values in the array matches, similar to the `"in"` operator.\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`, or an expression returning one of those types: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},z0e={anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},j0e={"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the sky."},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the fog."},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the fog over the 3D terrain. A value between 0 and 1. Where 0 is the map center and 1 is the horizon"},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the fog and sky color at the horizon. A value between 0 and 1. Where 0 is the horizon and 1 is map-height / 2"}},N0e={source:{type:"string",doc:"The source for the terrain data.",required:!0,"sdk-support":{"basic functionality":{js:"2.2.0"}}},exaggeration:{type:"number",minimum:0,doc:"The exaggeration of the terrain - how high it will look.",default:1,"sdk-support":{"basic functionality":{js:"2.2.0"}}}},W0e=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],G0e={"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},$0e={"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Q0e={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Y0e={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},q0e={"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},V0e={"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added, or when a video is started or its coordinates are updated.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},H0e={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Z0e={"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},X0e={duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},J0e={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},no={$version:f0e,$root:p0e,sources:m0e,source:g0e,source_vector:y0e,source_raster:v0e,source_raster_dem:C0e,source_geojson:_0e,source_video:b0e,source_image:x0e,layer:w0e,layout:M0e,layout_background:S0e,layout_fill:E0e,layout_circle:O0e,layout_heatmap:B0e,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:I0e,layout_symbol:k0e,layout_raster:T0e,layout_hillshade:K0e,filter:P0e,filter_operator:D0e,geometry_type:L0e,function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:`A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:
* In categorical functions, when the feature value does not match any of the stop domain values.
* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a \`circle-color\` property but the feature property value is not a string or not a valid color).
* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
If no default is provided, the style property's default is used in these circumstances.`}},function_stop:F0e,expression:U0e,expression_name:R0e,light:z0e,sky:j0e,terrain:N0e,paint:W0e,paint_fill:G0e,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:$0e,paint_circle:Q0e,paint_heatmap:Y0e,paint_symbol:q0e,paint_raster:V0e,paint_hillshade:H0e,paint_background:Z0e,transition:X0e,"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:J0e};function Lo(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",e="3158bd93bbefd1bd0e63d26617da070781685c25",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:17}},1:{start:{line:7,column:4},end:{line:9,column:6}},2:{start:{line:11,column:16},end:{line:19,column:3}},3:{start:{line:12,column:4},end:{line:18,column:7}},4:{start:{line:15,column:6},end:{line:17,column:7}},5:{start:{line:16,column:8},end:{line:16,column:48}},6:{start:{line:21,column:33},end:{line:21,column:43}},7:{start:{line:22,column:20},end:{line:22,column:35}},8:{start:{line:23,column:4},end:{line:42,column:5}},9:{start:{line:24,column:6},end:{line:37,column:14}},10:{start:{line:32,column:27},end:{line:32,column:61}},11:{start:{line:38,column:11},end:{line:42,column:5}},12:{start:{line:39,column:6},end:{line:39,column:174}},13:{start:{line:41,column:22},end:{line:41,column:37}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:21},end:{line:10,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:16},end:{line:11,column:17}},loc:{start:{line:11,column:26},end:{line:19,column:3}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:14,column:7},end:{line:14,column:8}},loc:{start:{line:14,column:13},end:{line:18,column:5}},line:14},3:{name:"(anonymous_3)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:43,column:3}},line:20},4:{name:"(anonymous_4)",decl:{start:{line:32,column:21},end:{line:32,column:22}},loc:{start:{line:32,column:27},end:{line:32,column:61}},line:32}},branchMap:{0:{loc:{start:{line:15,column:6},end:{line:17,column:7}},type:"if",locations:[{start:{line:15,column:6},end:{line:17,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},1:{loc:{start:{line:22,column:20},end:{line:22,column:35}},type:"binary-expr",locations:[{start:{line:22,column:20},end:{line:22,column:29}},{start:{line:22,column:33},end:{line:22,column:35}}],line:22},2:{loc:{start:{line:23,column:4},end:{line:42,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:42,column:5}},{start:{line:38,column:11},end:{line:42,column:5}}],line:23},3:{loc:{start:{line:30,column:26},end:{line:30,column:106}},type:"cond-expr",locations:[{start:{line:30,column:44},end:{line:30,column:74}},{start:{line:30,column:77},end:{line:30,column:106}}],line:30},4:{loc:{start:{line:31,column:67},end:{line:31,column:102}},type:"cond-expr",locations:[{start:{line:31,column:85},end:{line:31,column:91}},{start:{line:31,column:94},end:{line:31,column:102}}],line:31},5:{loc:{start:{line:34,column:22},end:{line:34,column:120}},type:"cond-expr",locations:[{start:{line:34,column:56},end:{line:34,column:79}},{start:{line:34,column:98},end:{line:34,column:120}}],line:34},6:{loc:{start:{line:38,column:11},end:{line:42,column:5}},type:"if",locations:[{start:{line:38,column:11},end:{line:42,column:5}},{start:{line:40,column:11},end:{line:42,column:5}}],line:38}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx"],names:[],mappings:"AAuCQ,SASuB,KATvB;AAvCR,OAAO,WAAW;AAClB,SAAQ,eAAe,sBAAqB;AAc5C,qBAAqB,sBAAsB,MAAM,UAAkD;AAAA,EACjG,YAAa,OAA2B;AACtC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,cAAc,CAAC,SAAkB;AAC/B,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,GAAG,MAAM;AACP,UAAI,KAAK,MAAM,aAAa;AAC1B,aAAK,MAAM,YAAY,KAAK,MAAM,IAAI;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAChC,UAAM,EAAC,IAAG,IAAI,aAAa,CAAC;AAE5B,QAAI,KAAK;AACP,aAAO,oBAAC,WAAM,WAAU,wBACtB,+BAAC,SAAI,WAAU,uBACZ;AAAA;AAAA,QACA;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,cAAY,KAAK,MAAM,OAAO,iCAAiC;AAAA,YAC/D,WAAW,4CAA4C,KAAK,MAAM,OAAO,SAAS,QAAQ;AAAA,YAC1F,SAAS,MAAM,KAAK,YAAY,CAAC,KAAK,MAAM,IAAI;AAAA,YAChD,eAAa,sBAAoB;AAAA,YAEhC,eAAK,MAAM,OAAO,oBAAC,kBAAe,IAAK,oBAAC,iBAAc;AAAA;AAAA,QACzD;AAAA,SACF,GACF;AAAA,IACF,WACS,OAAO;AACd,aAAO,oBAAC,WAAM,WAAU,wBACtB,8BAAC,SAAI,WAAU,uBACZ,iBACH,GACF;AAAA,IACF,OACK;AACH,0BAAC,SAAI;AAAA,IACP;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3158bd93bbefd1bd0e63d26617da070781685c25"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Lo=function(){return a},a}Lo();class KI extends Mn.Component{constructor(t){Lo().f[0]++,Lo().s[0]++;super(t);sn(this,"onToggleDoc",(Lo().s[2]++,t=>{Lo().f[1]++,Lo().s[3]++,this.setState({open:t},()=>{Lo().f[2]++,Lo().s[4]++,this.props.onToggleDoc?(Lo().b[0][0]++,Lo().s[5]++,this.props.onToggleDoc(this.state.open)):Lo().b[0][1]++})}));Lo().s[1]++,this.state={open:!1}}render(){Lo().f[3]++;const{label:t,fieldSpec:r}=(Lo().s[6]++,this.props),{doc:i}=(Lo().s[7]++,Lo().b[1][0]++,r||(Lo().b[1][1]++,{}));if(Lo().s[8]++,i)return Lo().b[2][0]++,Lo().s[9]++,G.jsx("label",{className:"maputnik-doc-wrapper",children:G.jsxs("div",{className:"maputnik-doc-target",children:[t," ",G.jsx("button",{"aria-label":this.state.open?(Lo().b[3][0]++,"close property documentation"):(Lo().b[3][1]++,"open property documentation"),className:`maputnik-doc-button maputnik-doc-button--${this.state.open?(Lo().b[4][0]++,"open"):(Lo().b[4][1]++,"closed")}`,onClick:()=>(Lo().f[4]++,Lo().s[10]++,this.onToggleDoc(!this.state.open)),"data-wd-key":"field-doc-button-"+t,children:this.state.open?(Lo().b[5][0]++,G.jsx(Cre,{})):(Lo().b[5][1]++,G.jsx(_re,{}))})]})});if(Lo().b[2][1]++,Lo().s[11]++,t)return Lo().b[6][0]++,Lo().s[12]++,G.jsx("label",{className:"maputnik-doc-wrapper",children:G.jsx("div",{className:"maputnik-doc-target",children:t})});Lo().b[6][1]++,Lo().s[13]++}}function wa(){var n="/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",e="17184511a0ae3c272ec6d16762ac334920d5242e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",statementMap:{0:{start:{line:3,column:16},end:{line:8,column:1}},1:{start:{line:11,column:26},end:{line:11,column:36}},2:{start:{line:12,column:28},end:{line:12,column:37}},3:{start:{line:13,column:23},end:{line:13,column:47}},4:{start:{line:14,column:25},end:{line:16,column:26}},5:{start:{line:17,column:4},end:{line:47,column:9}},6:{start:{line:21,column:10},end:{line:24,column:20}},7:{start:{line:31,column:12},end:{line:31,column:75}},8:{start:{line:35,column:10},end:{line:44,column:20}},9:{start:{line:38,column:14},end:{line:42,column:15}},10:{start:{line:39,column:16},end:{line:39,column:81}},11:{start:{line:41,column:16},end:{line:41,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:48,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:20,column:119},end:{line:20,column:120}},loc:{start:{line:20,column:137},end:{line:25,column:9}},line:20},2:{name:"(anonymous_2)",decl:{start:{line:30,column:37},end:{line:30,column:38}},loc:{start:{line:30,column:49},end:{line:32,column:11}},line:30},3:{name:"(anonymous_3)",decl:{start:{line:34,column:80},end:{line:34,column:81}},loc:{start:{line:34,column:103},end:{line:45,column:9}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:37,column:37},end:{line:37,column:38}},loc:{start:{line:37,column:44},end:{line:43,column:13}},line:37}},branchMap:{0:{loc:{start:{line:14,column:25},end:{line:16,column:26}},type:"binary-expr",locations:[{start:{line:14,column:25},end:{line:14,column:33}},{start:{line:16,column:4},end:{line:16,column:26}}],line:14},1:{loc:{start:{line:18,column:6},end:{line:26,column:10}},type:"binary-expr",locations:[{start:{line:18,column:6},end:{line:18,column:9}},{start:{line:18,column:29},end:{line:26,column:10}}],line:18},2:{loc:{start:{line:20,column:8},end:{line:25,column:13}},type:"binary-expr",locations:[{start:{line:20,column:8},end:{line:20,column:20}},{start:{line:20,column:40},end:{line:25,column:13}}],line:20},3:{loc:{start:{line:27,column:6},end:{line:46,column:13}},type:"binary-expr",locations:[{start:{line:27,column:6},end:{line:27,column:16}},{start:{line:27,column:36},end:{line:46,column:13}}],line:27},4:{loc:{start:{line:38,column:14},end:{line:42,column:15}},type:"if",locations:[{start:{line:38,column:14},end:{line:42,column:15}},{start:{line:40,column:21},end:{line:42,column:15}}],line:38}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Doc.tsx"],names:[],mappings:"AAsCM,mBAGM,KAKQ,YARd;AAtCN,OAAO,WAAW;AAElB,MAAM,UAAU;AAAA,EACd,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AACT;AAgBA,qBAAqB,YAAY,MAAM,UAAoB;AAAA,EACzD,SAAU;AACR,UAAM,EAAC,UAAS,IAAI,KAAK;AAEzB,UAAM,EAAC,KAAK,OAAM,IAAI;AACtB,UAAM,aAAa,UAAU,aAAa;AAE1C,UAAM,eACJ,CAAC,CAAC;AAAA;AAAA,IAGF,CAAC,MAAM,QAAQ,MAAM;AAGvB,WACE,iCACG;AAAA,aACC,qBAAC,SAAI,WAAU,WACb;AAAA,4BAAC,SAAI,WAAU,gBAAe,eAAY,kBAAkB,eAAI;AAAA,QAC/D,gBACC,oBAAC,QAAG,WAAU,mBACX,iBAAO,QAAQ,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AAC5C,iBACE,qBAAC,QACC;AAAA,gCAAC,UAAM,eAAK,UAAU,GAAG,GAAE;AAAA,YAC3B,oBAAC,SAAK,gBAAM,KAAI;AAAA,eAFT,GAGT;AAAA,QAEJ,CAAC,GACH;AAAA,SAEJ;AAAA,MAED,cACC,oBAAC,SAAI,WAAU,wBACb,+BAAC,WAAM,WAAU,+BACf;AAAA,4BAAC,WACC,+BAAC,QACC;AAAA,8BAAC,QAAG;AAAA,UACH,OAAO,OAAO,OAAO,EAAE,IAAI,YAAU;AACpC,mBAAO,oBAAC,QAAiB,oBAAT,MAAgB;AAAA,UAClC,CAAC;AAAA,WACH,GACF;AAAA,QACA,oBAAC,WACE,iBAAO,QAAQ,UAAU,EAAE,IAAI,CAAC,CAAC,KAAK,UAAU,MAAM;AACrD,iBACE,qBAAC,QACC;AAAA,gCAAC,QAAI,eAAI;AAAA,YACR,OAAO,KAAK,OAAO,EAAE,IAAI,CAAC,MAAM;AAC/B,kBAAI,OAAO,UAAU,eAAe,KAAK,YAAY,CAAC,GAAG;AACvD,uBAAO,oBAAC,QAAY,qBAAW,CAAyB,KAAxC,CAA0C;AAAA,cAC5D,OACK;AACH,uBAAO,oBAAC,QAAW,kBAAH,CAAK;AAAA,cACvB;AAAA,YACF,CAAC;AAAA,eATM,GAUT;AAAA,QAEJ,CAAC,GACH;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"17184511a0ae3c272ec6d16762ac334920d5242e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return wa=function(){return a},a}wa();const PP=(wa().s[0]++,{js:"JS",android:"Android",ios:"iOS",macos:"macOS"});class PI extends Mn.Component{render(){wa().f[0]++;const{fieldSpec:e}=(wa().s[1]++,this.props),{doc:t,values:r}=(wa().s[2]++,e),i=(wa().s[3]++,e["sdk-support"]),o=(wa().s[4]++,wa().b[0][0]++,!!r&&(wa().b[0][1]++,!Array.isArray(r)));return wa().s[5]++,G.jsxs(G.Fragment,{children:[(wa().b[1][0]++,t&&(wa().b[1][1]++,G.jsxs("div",{className:"SpecDoc",children:[G.jsx("div",{className:"SpecDoc__doc","data-wd-key":"spec-field-doc",children:t}),(wa().b[2][0]++,o&&(wa().b[2][1]++,G.jsx("ul",{className:"SpecDoc__values",children:Object.entries(r).map(([a,s])=>(wa().f[1]++,wa().s[6]++,G.jsxs("li",{children:[G.jsx("code",{children:JSON.stringify(a)}),G.jsx("div",{children:s.doc})]},a)))})))]}))),(wa().b[3][0]++,i&&(wa().b[3][1]++,G.jsx("div",{className:"SpecDoc__sdk-support",children:G.jsxs("table",{className:"SpecDoc__sdk-support__table",children:[G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{}),Object.values(PP).map(a=>(wa().f[2]++,wa().s[7]++,G.jsx("th",{children:a},a)))]})}),G.jsx("tbody",{children:Object.entries(i).map(([a,s])=>(wa().f[3]++,wa().s[8]++,G.jsxs("tr",{children:[G.jsx("td",{children:a}),Object.keys(PP).map(d=>(wa().f[4]++,wa().s[9]++,Object.prototype.hasOwnProperty.call(s,d)?(wa().b[4][0]++,wa().s[10]++,G.jsx("td",{children:s[d]},d)):(wa().b[4][1]++,wa().s[11]++,G.jsx("td",{children:"no"},d))))]},a)))})]})})))]})}}function uo(){var n="/home/runner/work/maputnik/maputnik/src/components/Block.tsx",e="48ac53a19fbb7fbd4fa4e9374748c221d8264cc9",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Block.tsx",statementMap:{0:{start:{line:7,column:13},end:{line:7,column:17}},1:{start:{line:9,column:4},end:{line:9,column:17}},2:{start:{line:10,column:4},end:{line:12,column:6}},3:{start:{line:15,column:18},end:{line:15,column:32}},4:{start:{line:16,column:4},end:{line:18,column:5}},5:{start:{line:17,column:6},end:{line:17,column:64}},6:{start:{line:20,column:16},end:{line:24,column:3}},7:{start:{line:21,column:4},end:{line:23,column:7}},8:{start:{line:31,column:17},end:{line:38,column:3}},9:{start:{line:32,column:15},end:{line:32,column:39}},10:{start:{line:33,column:21},end:{line:33,column:48}},11:{start:{line:34,column:4},end:{line:36,column:5}},12:{start:{line:35,column:6},end:{line:35,column:30}},13:{start:{line:37,column:4},end:{line:37,column:27}},14:{start:{line:40,column:4},end:{line:73,column:6}},15:{start:{line:62,column:95},end:{line:62,column:113}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:21},end:{line:13,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:14},end:{line:19,column:3}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:20,column:16},end:{line:20,column:17}},loc:{start:{line:20,column:25},end:{line:24,column:3}},line:20},3:{name:"(anonymous_3)",decl:{start:{line:31,column:17},end:{line:31,column:18}},loc:{start:{line:31,column:28},end:{line:38,column:3}},line:31},4:{name:"(anonymous_4)",decl:{start:{line:39,column:2},end:{line:39,column:3}},loc:{start:{line:39,column:11},end:{line:74,column:3}},line:39},5:{name:"(anonymous_5)",decl:{start:{line:62,column:87},end:{line:62,column:88}},loc:{start:{line:62,column:95},end:{line:62,column:113}},line:62}},branchMap:{0:{loc:{start:{line:16,column:4},end:{line:18,column:5}},type:"if",locations:[{start:{line:16,column:4},end:{line:18,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:17,column:33},end:{line:17,column:62}},type:"cond-expr",locations:[{start:{line:17,column:48},end:{line:17,column:54}},{start:{line:17,column:57},end:{line:17,column:62}}],line:17},2:{loc:{start:{line:34,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:34,column:4},end:{line:36,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:34},3:{loc:{start:{line:34,column:8},end:{line:34,column:66}},type:"binary-expr",locations:[{start:{line:34,column:8},end:{line:34,column:53}},{start:{line:34,column:57},end:{line:34,column:66}}],line:34},4:{loc:{start:{line:52,column:10},end:{line:59,column:14}},type:"binary-expr",locations:[{start:{line:52,column:10},end:{line:52,column:30}},{start:{line:52,column:50},end:{line:59,column:14}}],line:52},5:{loc:{start:{line:60,column:10},end:{line:60,column:134}},type:"binary-expr",locations:[{start:{line:60,column:10},end:{line:60,column:31}},{start:{line:60,column:51},end:{line:60,column:134}}],line:60},6:{loc:{start:{line:63,column:10},end:{line:70,column:11}},type:"binary-expr",locations:[{start:{line:63,column:10},end:{line:63,column:30}},{start:{line:63,column:50},end:{line:70,column:11}}],line:63},7:{loc:{start:{line:67,column:32},end:{line:67,column:64}},type:"cond-expr",locations:[{start:{line:67,column:53},end:{line:67,column:55}},{start:{line:67,column:58},end:{line:67,column:64}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Block.tsx"],names:[],mappings:"AA8DW,SAWD,KAXC;AA9DX,OAAO,WAAgD;AACvD,OAAO,gBAAgB;AACvB,OAAO,mBAAmB;AAC1B,OAAO,SAAS;AAmBhB,qBAAqB,cAAc,MAAM,UAAkC;AAAA,EACzE,WAAkC;AAAA,EAElC,YAAa,OAAmB;AAC9B,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,SAAS,GAAwE;AAC/E,UAAM,QAAQ,EAAE,OAAO;AACvB,QAAI,KAAK,MAAM,UAAU;AACvB,aAAO,KAAK,MAAM,SAAS,UAAU,KAAK,SAAY,KAAK;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAe,CAAC,UAAoC;AAClD,UAAM,KAAK,MAAM,YAAY;AAC7B,UAAM,WAAW,KAAK,UAAU,SAAS,EAAE;AAE3C,QAAI,MAAM,YAAY,OAAO,aAAa,WAAW,CAAC,UAAU;AAC9D,YAAM,gBAAgB;AAAA,IACxB;AACA,UAAM,eAAe;AAAA,EACvB;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,KAAK,MAAM;AAAA,QAC9B,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,WAAW,WAAW;AAAA,UACpB,wBAAwB;AAAA,UACxB,8BAA8B,KAAK,MAAM;AAAA,UACzC,yBAAyB,KAAK,MAAM;AAAA,QACtC,CAAC;AAAA,QACD,SAAS,KAAK;AAAA,QAEb;AAAA,eAAK,MAAM,aACV,oBAAC,SAAI,WAAU,8BACb;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,aAAa,KAAK;AAAA,cAClB,WAAW,KAAK,MAAM;AAAA;AAAA,UACxB,GACF;AAAA,UAED,CAAC,KAAK,MAAM,aACX,oBAAC,SAAI,WAAU,8BACZ,eAAK,MAAM,OACd;AAAA,UAEF,oBAAC,SAAI,WAAU,+BACZ,eAAK,MAAM,QACd;AAAA,UACA,oBAAC,SAAI,WAAU,gCAA+B,KAAK,QAAM,KAAK,WAAW,IACtE,eAAK,MAAM,UACd;AAAA,UACC,KAAK,MAAM,aACV;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,cAEjD,8BAAC,OAAI,WAAW,KAAK,MAAM,WAAW;AAAA;AAAA,UACxC;AAAA;AAAA;AAAA,IAEJ;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"48ac53a19fbb7fbd4fa4e9374748c221d8264cc9"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return uo=function(){return a},a}uo();class la extends Mn.Component{constructor(t){uo().f[0]++,uo().s[1]++;super(t);sn(this,"_blockEl",(uo().s[0]++,null));sn(this,"onToggleDoc",(uo().s[6]++,t=>{uo().f[2]++,uo().s[7]++,this.setState({showDoc:t})}));sn(this,"onLabelClick",(uo().s[8]++,t=>{var o;uo().f[3]++;const r=(uo().s[9]++,t.nativeEvent.target),i=(uo().s[10]++,(o=this._blockEl)==null?void 0:o.contains(r));uo().s[11]++,uo().b[3][0]++,t.nativeEvent.target.nodeName!=="INPUT"&&(uo().b[3][1]++,!i)?(uo().b[2][0]++,uo().s[12]++,t.stopPropagation()):uo().b[2][1]++,uo().s[13]++,t.preventDefault()}));uo().s[2]++,this.state={showDoc:!1}}onChange(t){uo().f[1]++;const r=(uo().s[3]++,t.target.value);if(uo().s[4]++,this.props.onChange)return uo().b[0][0]++,uo().s[5]++,this.props.onChange(r===""?(uo().b[1][0]++,void 0):(uo().b[1][1]++,r));uo().b[0][1]++}render(){return uo().f[4]++,uo().s[14]++,G.jsxs("label",{style:this.props.style,"data-wd-key":this.props["data-wd-key"],className:Qf({"maputnik-input-block":!0,"maputnik-input-block--wide":this.props.wideMode,"maputnik-action-block":this.props.action}),onClick:this.onLabelClick,children:[(uo().b[4][0]++,this.props.fieldSpec&&(uo().b[4][1]++,G.jsx("div",{className:"maputnik-input-block-label",children:G.jsx(KI,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(uo().b[5][0]++,!this.props.fieldSpec&&(uo().b[5][1]++,G.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),G.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),G.jsx("div",{className:"maputnik-input-block-content",ref:t=>(uo().f[5]++,uo().s[15]++,this._blockEl=t),children:this.props.children}),(uo().b[6][0]++,this.props.fieldSpec&&(uo().b[6][1]++,G.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(uo().b[7][0]++,""):(uo().b[7][1]++,"none")},children:G.jsx(PI,{fieldSpec:this.props.fieldSpec})})))]})}}function Fu(){var n="/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",e="1b99a181d4a9dd7b629113889cbb71c3a4bb4d42",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",statementMap:{0:{start:{line:5,column:18},end:{line:5,column:36}},1:{start:{line:6,column:4},end:{line:8,column:5}},2:{start:{line:7,column:6},end:{line:7,column:43}},3:{start:{line:7,column:35},end:{line:7,column:41}},4:{start:{line:9,column:4},end:{line:21,column:6}},5:{start:{line:17,column:25},end:{line:17,column:60}},6:{start:{line:19,column:64},end:{line:19,column:115}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:11},end:{line:22,column:3}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:28},end:{line:7,column:29}},loc:{start:{line:7,column:35},end:{line:7,column:41}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:25},end:{line:17,column:60}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:19,column:30},end:{line:19,column:31}},loc:{start:{line:19,column:64},end:{line:19,column:115}},line:19}},branchMap:{0:{loc:{start:{line:6,column:4},end:{line:8,column:5}},type:"if",locations:[{start:{line:6,column:4},end:{line:8,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},1:{loc:{start:{line:6,column:8},end:{line:6,column:56}},type:"binary-expr",locations:[{start:{line:6,column:8},end:{line:6,column:26}},{start:{line:6,column:30},end:{line:6,column:56}}],line:6}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx"],names:[],mappings:"AA4BsC;AA5BtC,OAAO,WAAW;AAYlB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,QAAI,UAAU,KAAK,MAAM;AACzB,QAAG,QAAQ,SAAS,KAAK,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,GAAG;AACnD,gBAAU,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAAA,IACrC;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,OAAO,KAAK,MAAM;AAAA,QAClB,OAAO,KAAK,MAAM;AAAA,QAClB,OAAO,KAAK,MAAM;AAAA,QAClB,UAAU,OAAK,KAAK,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,QACjD,cAAY,KAAK,MAAM,YAAY;AAAA,QAEjC,kBAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,oBAAC,YAAiB,OAAO,KAAM,mBAAlB,GAAwB,CAAS;AAAA;AAAA,IAChF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1b99a181d4a9dd7b629113889cbb71c3a4bb4d42"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Fu=function(){return a},a}Fu();class V1 extends Mn.Component{render(){Fu().f[0]++;let e=(Fu().s[0]++,this.props.options);return Fu().s[1]++,Fu().b[1][0]++,e.length>0&&(Fu().b[1][1]++,!Array.isArray(e[0]))?(Fu().b[0][0]++,Fu().s[2]++,e=e.map(t=>(Fu().f[1]++,Fu().s[3]++,[t,t]))):Fu().b[0][1]++,Fu().s[4]++,G.jsx("select",{className:"maputnik-select","data-wd-key":this.props["data-wd-key"],style:this.props.style,title:this.props.title,value:this.props.value,onChange:t=>(Fu().f[2]++,Fu().s[5]++,this.props.onChange(t.target.value)),"aria-label":this.props["aria-label"],children:e.map(([t,r])=>(Fu().f[3]++,Fu().s[6]++,G.jsx("option",{value:t,children:r},t)))})}}function ti(){var n="/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",e="bb14c5e6f5eab5cd978d77958d9599f76f352059",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",statementMap:{0:{start:{line:3,column:24},end:{line:6,column:3}},1:{start:{line:8,column:4},end:{line:8,column:17}},2:{start:{line:9,column:4},end:{line:12,column:6}},3:{start:{line:15,column:4},end:{line:19,column:5}},4:{start:{line:16,column:6},end:{line:18,column:8}},5:{start:{line:20,column:4},end:{line:20,column:14}},6:{start:{line:25,column:4},end:{line:36,column:5}},7:{start:{line:26,column:6},end:{line:26,column:23}},8:{start:{line:27,column:6},end:{line:30,column:8}},9:{start:{line:32,column:6},end:{line:32,column:20}},10:{start:{line:33,column:6},end:{line:35,column:8}},11:{start:{line:37,column:4},end:{line:39,column:5}},12:{start:{line:38,column:6},end:{line:38,column:48}},13:{start:{line:40,column:4},end:{line:72,column:7}},14:{start:{line:51,column:8},end:{line:57,column:11}},15:{start:{line:55,column:10},end:{line:56,column:49}},16:{start:{line:56,column:12},end:{line:56,column:49}},17:{start:{line:60,column:8},end:{line:64,column:9}},18:{start:{line:61,column:10},end:{line:61,column:44}},19:{start:{line:62,column:10},end:{line:63,column:50}},20:{start:{line:63,column:12},end:{line:63,column:50}},21:{start:{line:67,column:8},end:{line:69,column:9}},22:{start:{line:68,column:10},end:{line:68,column:48}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:13},end:{line:4,column:14}},loc:{start:{line:4,column:19},end:{line:5,column:5}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:21},end:{line:13,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:48},end:{line:21,column:3}},line:14},3:{name:"(anonymous_3)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:11},end:{line:73,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:50,column:16},end:{line:50,column:17}},loc:{start:{line:50,column:23},end:{line:58,column:7}},line:50},5:{name:"(anonymous_5)",decl:{start:{line:54,column:11},end:{line:54,column:12}},loc:{start:{line:54,column:17},end:{line:57,column:9}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:59,column:14},end:{line:59,column:15}},loc:{start:{line:59,column:20},end:{line:65,column:7}},line:59},7:{name:"(anonymous_7)",decl:{start:{line:66,column:17},end:{line:66,column:18}},loc:{start:{line:66,column:24},end:{line:70,column:7}},line:66}},branchMap:{0:{loc:{start:{line:11,column:13},end:{line:11,column:30}},type:"binary-expr",locations:[{start:{line:11,column:13},end:{line:11,column:24}},{start:{line:11,column:28},end:{line:11,column:30}}],line:11},1:{loc:{start:{line:15,column:4},end:{line:19,column:5}},type:"if",locations:[{start:{line:15,column:4},end:{line:19,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:25,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:25,column:4},end:{line:36,column:5}},{start:{line:31,column:11},end:{line:36,column:5}}],line:25},3:{loc:{start:{line:37,column:4},end:{line:39,column:5}},type:"if",locations:[{start:{line:37,column:4},end:{line:39,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},4:{loc:{start:{line:43,column:18},end:{line:43,column:125}},type:"cond-expr",locations:[{start:{line:43,column:83},end:{line:43,column:104}},{start:{line:43,column:107},end:{line:43,column:125}}],line:43},5:{loc:{start:{line:47,column:13},end:{line:47,column:64}},type:"cond-expr",locations:[{start:{line:47,column:43},end:{line:47,column:45}},{start:{line:47,column:48},end:{line:47,column:64}}],line:47},6:{loc:{start:{line:55,column:10},end:{line:56,column:49}},type:"if",locations:[{start:{line:55,column:10},end:{line:56,column:49}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},7:{loc:{start:{line:60,column:8},end:{line:64,column:9}},type:"if",locations:[{start:{line:60,column:8},end:{line:64,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:60},8:{loc:{start:{line:62,column:10},end:{line:63,column:50}},type:"if",locations:[{start:{line:62,column:10},end:{line:63,column:50}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},9:{loc:{start:{line:67,column:8},end:{line:69,column:9}},type:"if",locations:[{start:{line:67,column:8},end:{line:69,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:67},10:{loc:{start:{line:67,column:12},end:{line:67,column:51}},type:"binary-expr",locations:[{start:{line:67,column:12},end:{line:67,column:28}},{start:{line:67,column:32},end:{line:67,column:51}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputString.tsx"],names:[],mappings:"AAAA,OAAO,WAAW;AAsBlB,qBAAqB,oBAAoB,MAAM,UAA8C;AAAA,EAC3F,OAAO,eAAe;AAAA,IACpB,SAAS,MAAM;AAAA,IAAC;AAAA,EAClB;AAAA,EAEA,YAAY,OAAyB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,OAAO,MAAM,SAAS;AAAA,IACxB;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAmC,OAAyB;AAC1F,QAAI,CAAC,MAAM,SAAS;AAClB,aAAO;AAAA,QACL,OAAO,MAAM;AAAA,MACf;AAAA,IACF;AACA,WAAO,CAAC;AAAA,EACV;AAAA,EAEA,SAAS;AACP,QAAI;AACJ,QAAI;AAEJ,QAAG,KAAK,MAAM,OAAO;AACnB,YAAM;AACN,gBAAU;AAAA,QACR;AAAA,QACA;AAAA,MACF;AAAA,IACF,OACK;AACH,YAAM;AACN,gBAAU;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,QAAG,KAAK,MAAM,UAAU;AACtB,cAAQ,KAAK,2BAA2B;AAAA,IAC1C;AAEA,WAAO,MAAM,cAAc,KAAK;AAAA,MAC9B,cAAc,KAAK,MAAM,YAAY;AAAA,MACrC,eAAe,KAAK,MAAM,aAAa;AAAA,MACvC,YAAY,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,YAAY,IAAI,KAAK,MAAM,aAAa,EAAE,QAAQ;AAAA,MAC/G,UAAU,KAAK,MAAM;AAAA,MACrB,WAAW,QAAQ,KAAK,GAAG;AAAA,MAC3B,OAAO,KAAK,MAAM;AAAA,MAClB,OAAO,KAAK,MAAM,UAAU,SAAY,KAAK,KAAK,MAAM;AAAA,MACxD,aAAa,KAAK,MAAM;AAAA,MACxB,OAAO,KAAK,MAAM;AAAA,MAClB,UAAU,CAAC,MAA2E;AACpF,aAAK,SAAS;AAAA,UACZ,SAAS;AAAA,UACT,OAAO,EAAE,OAAO;AAAA,QAClB,GAAG,MAAM;AACP,cAAI,KAAK,MAAM;AAAS,iBAAK,MAAM,QAAQ,KAAK,MAAM,KAAK;AAAA,QAC7D,CAAC;AAAA,MACH;AAAA,MACA,QAAQ,MAAM;AACZ,YAAG,KAAK,MAAM,UAAQ,KAAK,MAAM,OAAO;AACtC,eAAK,SAAS,EAAC,SAAS,MAAK,CAAC;AAC9B,cAAI,KAAK,MAAM;AAAU,iBAAK,MAAM,SAAS,KAAK,MAAM,KAAK;AAAA,QAC/D;AAAA,MACF;AAAA,MACA,WAAW,CAAC,MAAM;AAChB,YAAI,EAAE,YAAY,MAAM,KAAK,MAAM,UAAU;AAC3C,eAAK,MAAM,SAAS,KAAK,MAAM,KAAK;AAAA,QACtC;AAAA,MACF;AAAA,MACA,UAAU,KAAK,MAAM;AAAA,IACvB,CAAC;AAAA,EACH;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bb14c5e6f5eab5cd978d77958d9599f76f352059"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ti=function(){return a},a}ti();class Qd extends Mn.Component{constructor(e){ti().f[1]++,ti().s[1]++,super(e),ti().s[2]++,this.state={editing:!1,value:(ti().b[0][0]++,e.value||(ti().b[0][1]++,""))}}static getDerivedStateFromProps(e,t){if(ti().f[2]++,ti().s[3]++,t.editing)ti().b[1][1]++;else return ti().b[1][0]++,ti().s[4]++,{value:e.value};return ti().s[5]++,{}}render(){ti().f[3]++;let e,t;return ti().s[6]++,this.props.multi?(ti().b[2][0]++,ti().s[7]++,e="textarea",ti().s[8]++,t=["maputnik-string","maputnik-string--multi"]):(ti().b[2][1]++,ti().s[9]++,e="input",ti().s[10]++,t=["maputnik-string"]),ti().s[11]++,this.props.disabled?(ti().b[3][0]++,ti().s[12]++,t.push("maputnik-string--disabled")):ti().b[3][1]++,ti().s[13]++,Mn.createElement(e,{"aria-label":this.props["aria-label"],"data-wd-key":this.props["data-wd-key"],spellCheck:Object.prototype.hasOwnProperty.call(this.props,"spellCheck")?(ti().b[4][0]++,this.props.spellCheck):(ti().b[4][1]++,e!=="input"),disabled:this.props.disabled,className:t.join(" "),style:this.props.style,value:this.state.value===void 0?(ti().b[5][0]++,""):(ti().b[5][1]++,this.state.value),placeholder:this.props.default,title:this.props.title,onChange:r=>{ti().f[4]++,ti().s[14]++,this.setState({editing:!0,value:r.target.value},()=>{ti().f[5]++,ti().s[15]++,this.props.onInput?(ti().b[6][0]++,ti().s[16]++,this.props.onInput(this.state.value)):ti().b[6][1]++})},onBlur:()=>{ti().f[6]++,ti().s[17]++,this.state.value!==this.props.value?(ti().b[7][0]++,ti().s[18]++,this.setState({editing:!1}),ti().s[19]++,this.props.onChange?(ti().b[8][0]++,ti().s[20]++,this.props.onChange(this.state.value)):ti().b[8][1]++):ti().b[7][1]++},onKeyDown:r=>{ti().f[7]++,ti().s[21]++,ti().b[10][0]++,r.keyCode===13&&(ti().b[10][1]++,this.props.onChange)?(ti().b[9][0]++,ti().s[22]++,this.props.onChange(this.state.value)):ti().b[9][1]++},required:this.props.required})}}sn(Qd,"defaultProps",(ti().s[0]++,{onInput:()=>{ti().f[0]++}}));function Sh(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",e="7881723dfc9d5af5c18468677e4f429a5a061179",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",statementMap:{0:{start:{line:9,column:24},end:{line:11,column:3}},1:{start:{line:13,column:14},end:{line:13,column:26}},2:{start:{line:14,column:4},end:{line:50,column:6}},3:{start:{line:53,column:18},end:{line:53,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:11},end:{line:51,column:3}},line:12}},branchMap:{0:{loc:{start:{line:22,column:10},end:{line:28,column:11}},type:"binary-expr",locations:[{start:{line:22,column:10},end:{line:22,column:29}},{start:{line:22,column:49},end:{line:28,column:11}}],line:22},1:{loc:{start:{line:29,column:10},end:{line:47,column:11}},type:"binary-expr",locations:[{start:{line:29,column:10},end:{line:29,column:30}},{start:{line:29,column:50},end:{line:47,column:11}}],line:29}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx"],names:[],mappings:"AAuBW,SAKH,KALG;AAvBX,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAUjD,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,OAAO,eAAe;AAAA,IACpB,UAAU;AAAA,EACZ;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,EAAE,MAAM;AAAA,QAAG,WAAW,OAAO,MAAM;AAAA,QACtD,eAAa,KAAK,MAAM;AAAA,QACxB,OAAO,KAAK,MAAM;AAAA,QAEjB;AAAA,eAAK,MAAM,YACV;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,UAAU;AAAA;AAAA,UACZ;AAAA,UAED,CAAC,KAAK,MAAM,YACX;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,gBACP,CAAC,cAAc,YAAY;AAAA,gBAC3B,CAAC,QAAQ,MAAM;AAAA,gBACf,CAAC,QAAQ,MAAM;AAAA,gBACf,CAAC,UAAU,QAAQ;AAAA,gBACnB,CAAC,UAAU,QAAQ;AAAA,gBACnB,CAAC,UAAU,QAAQ;AAAA,gBACnB,CAAC,kBAAkB,gBAAgB;AAAA,gBACnC,CAAC,aAAa,WAAW;AAAA,gBACzB,CAAC,WAAW,SAAS;AAAA,cACvB;AAAA,cACA,UAAU,KAAK,MAAM;AAAA,cACrB,OAAO,KAAK,MAAM;AAAA,cAClB,eAAa,KAAK,MAAM,QAAQ;AAAA;AAAA,UAClC;AAAA;AAAA;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7881723dfc9d5af5c18468677e4f429a5a061179"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Sh=function(){return a},a}Sh();class EG extends Mn.Component{render(){Sh().f[0]++;const e=(Sh().s[1]++,this.props.t);return Sh().s[2]++,G.jsxs(la,{label:e("Type"),fieldSpec:no.layer.type,"data-wd-key":this.props.wdKey,error:this.props.error,children:[(Sh().b[0][0]++,this.props.disabled&&(Sh().b[0][1]++,G.jsx(Qd,{value:this.props.value,disabled:!0}))),(Sh().b[1][0]++,!this.props.disabled&&(Sh().b[1][1]++,G.jsx(V1,{options:[["background","Background"],["fill","Fill"],["line","Line"],["symbol","Symbol"],["raster","Raster"],["circle","Circle"],["fill-extrusion","Fill Extrusion"],["hillshade","Hillshade"],["heatmap","Heatmap"]],onChange:this.props.onChange,value:this.props.value,"data-wd-key":this.props.wdKey+".select"})))]})}}sn(EG,"defaultProps",(Sh().s[0]++,{disabled:!1}));const OG=(Sh().s[3]++,No()(EG));function l5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",e="f6ac2bd12dbef0198dd96da668f75e4659321d69",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",statementMap:{0:{start:{line:8,column:4},end:{line:24,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:25,column:3}},line:7}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AASxB,qBAAqB,gBAAgB,MAAM,UAAwB;AAAA,EACjE,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAM;AAAA,QAAK,WAAW,OAAO,MAAM;AAAA,QAE/C,eAAa,KAAK,MAAM;AAAA,QACxB,OAAO,KAAK,MAAM;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,KAAK,MAAM;AAAA,YAClB,SAAS,KAAK,MAAM;AAAA,YACpB,eAAa,KAAK,MAAM,QAAQ;AAAA;AAAA,QAClC;AAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f6ac2bd12dbef0198dd96da668f75e4659321d69"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return l5=function(){return a},a}l5();class BG extends Mn.Component{render(){return l5().f[0]++,l5().s[0]++,G.jsx(la,{label:"ID",fieldSpec:no.layer.id,"data-wd-key":this.props.wdKey,error:this.props.error,children:G.jsx(Qd,{value:this.props.value,onInput:this.props.onChange,"data-wd-key":this.props.wdKey+".input"})})}}var IG={exports:{}},e1e=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;function t1e(n){var e,t,r,i=n.ownerDocument,o=i.body,a=i&&i.documentElement;return e=n.getBoundingClientRect(),t=e.left,r=e.top,t-=a.clientLeft||o.clientLeft||0,r-=a.clientTop||o.clientTop||0,{left:t,top:r}}function kG(n,e){var t=n["page"+(e?"Y":"X")+"Offset"],r="scroll"+(e?"Top":"Left");if(typeof t!="number"){var i=n.document;t=i.documentElement[r],typeof t!="number"&&(t=i.body[r])}return t}function hB(n){return kG(n)}function fB(n){return kG(n,!0)}function TG(n){var e=t1e(n),t=n.ownerDocument,r=t.defaultView||t.parentWindow;return e.left+=hB(r),e.top+=fB(r),e}function n1e(n,e,t){var r="",i=n.ownerDocument;return(t=t||i.defaultView.getComputedStyle(n,null))&&(r=t.getPropertyValue(e)||t[e]),r}var r1e=new RegExp("^("+e1e+")(?!px)[a-z%]+$","i"),i1e=/^(top|right|bottom|left)$/,CE="currentStyle",_E="runtimeStyle",Q0="left",o1e="px";function a1e(n,e){var t=n[CE]&&n[CE][e];if(r1e.test(t)&&!i1e.test(e)){var r=n.style,i=r[Q0],o=n[_E][Q0];n[_E][Q0]=n[CE][Q0],r[Q0]=e==="fontSize"?"1em":t||0,t=r.pixelLeft+o1e,r[Q0]=i,n[_E][Q0]=o}return t===""?"auto":t}var z1;typeof window<"u"&&(z1=window.getComputedStyle?n1e:a1e);function s1e(n,e){Qy(n,"position")==="static"&&(n.style.position="relative");var t=TG(n),r={},i,o;for(o in e)i=parseFloat(Qy(n,o))||0,r[o]=i+e[o]-t[o];Qy(n,r)}function DI(n,e){for(var t=0;t<n.length;t++)e(n[t])}function KG(n){return z1(n,"boxSizing")==="border-box"}var l1e=["margin","border","padding"],pB=-1,u1e=2,mB=1,A1e=0;function c1e(n,e,t){var r={},i=n.style,o;for(o in e)r[o]=i[o],i[o]=e[o];t.call(n);for(o in e)i[o]=r[o]}function a_(n,e,t){var r=0,i,o,a;for(o=0;o<e.length;o++)if(i=e[o],i)for(a=0;a<t.length;a++){var s;i==="border"?s=i+t[a]+"Width":s=i+t[a],r+=parseFloat(z1(n,s))||0}return r}function E3(n){return n!=null&&n==n.window}var Ff={};DI(["Width","Height"],function(n){Ff["doc"+n]=function(e){var t=e.document;return Math.max(t.documentElement["scroll"+n],t.body["scroll"+n],Ff["viewport"+n](t))},Ff["viewport"+n]=function(e){var t="client"+n,r=e.document,i=r.body,o=r.documentElement,a=o[t];return r.compatMode==="CSS1Compat"&&a||i&&i[t]||a}});function DP(n,e,t){if(E3(n))return e==="width"?Ff.viewportWidth(n):Ff.viewportHeight(n);if(n.nodeType===9)return e==="width"?Ff.docWidth(n):Ff.docHeight(n);var r=e==="width"?["Left","Right"]:["Top","Bottom"],i=e==="width"?n.offsetWidth:n.offsetHeight;z1(n);var o=KG(n),a=0;(i==null||i<=0)&&(i=void 0,a=z1(n,e),(a==null||Number(a)<0)&&(a=n.style[e]||0),a=parseFloat(a)||0),t===void 0&&(t=o?mB:pB);var s=i!==void 0||o,d=i||a;return t===pB?s?d-a_(n,["border","padding"],r):a:s?d+(t===mB?0:t===u1e?-a_(n,["border"],r):a_(n,["margin"],r)):a+a_(n,l1e.slice(t),r)}var d1e={position:"absolute",visibility:"hidden",display:"block"};function LP(n){var e,t=arguments;return n.offsetWidth!==0?e=DP.apply(void 0,t):c1e(n,d1e,function(){e=DP.apply(void 0,t)}),e}DI(["width","height"],function(n){var e=n.charAt(0).toUpperCase()+n.slice(1);Ff["outer"+e]=function(r,i){return r&&LP(r,n,i?A1e:mB)};var t=n==="width"?["Left","Right"]:["Top","Bottom"];Ff[n]=function(r,i){if(i!==void 0){if(r){z1(r);var o=KG(r);return o&&(i+=a_(r,["padding","border"],t)),Qy(r,n,i)}return}return r&&LP(r,n,pB)}});function Qy(n,e,t){if(typeof e=="object"){for(var r in e)Qy(n,r,e[r]);return}if(typeof t<"u")typeof t=="number"&&(t=t+"px"),n.style[e]=t;else return z1(n,e)}function PG(n,e){for(var t in e)n[t]=e[t];return n}var DG=IG.exports={getWindow:function(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow},offset:function(n,e){if(typeof e<"u")s1e(n,e);else return TG(n)},isWindow:E3,each:DI,css:Qy,clone:function(n){var e={};for(var t in n)e[t]=n[t];var r=n.overflow;if(r)for(t in n)e.overflow[t]=n.overflow[t];return e},mix:PG,scrollLeft:function(n,e){if(E3(n)){if(e===void 0)return hB(n);window.scrollTo(e,fB(n))}else{if(e===void 0)return n.scrollLeft;n.scrollLeft=e}},scrollTop:function(n,e){if(E3(n)){if(e===void 0)return fB(n);window.scrollTo(hB(n),e)}else{if(e===void 0)return n.scrollTop;n.scrollTop=e}},merge:function(){for(var n={},e=0;e<arguments.length;e++)DG.mix(n,arguments[e]);return n},viewportWidth:0,viewportHeight:0};PG(DG,Ff);var h1e=IG.exports,Za=h1e;function f1e(n,e,t){t=t||{},e.nodeType===9&&(e=Za.getWindow(e));var r=t.allowHorizontalScroll,i=t.onlyScrollIfNeeded,o=t.alignWithTop,a=t.alignWithLeft;r=r===void 0?!0:r;var s=Za.isWindow(e),d=Za.offset(n),f=Za.outerHeight(n),C=Za.outerWidth(n),O,E,P,D,$,H,Q,N,Z,ae;s?(Q=e,ae=Za.height(Q),Z=Za.width(Q),N={left:Za.scrollLeft(Q),top:Za.scrollTop(Q)},$={left:d.left-N.left,top:d.top-N.top},H={left:d.left+C-(N.left+Z),top:d.top+f-(N.top+ae)},D=N):(O=Za.offset(e),E=e.clientHeight,P=e.clientWidth,D={left:e.scrollLeft,top:e.scrollTop},$={left:d.left-(O.left+(parseFloat(Za.css(e,"borderLeftWidth"))||0)),top:d.top-(O.top+(parseFloat(Za.css(e,"borderTopWidth"))||0))},H={left:d.left+C-(O.left+P+(parseFloat(Za.css(e,"borderRightWidth"))||0)),top:d.top+f-(O.top+E+(parseFloat(Za.css(e,"borderBottomWidth"))||0))}),$.top<0||H.top>0?o===!0?Za.scrollTop(e,D.top+$.top):o===!1?Za.scrollTop(e,D.top+H.top):$.top<0?Za.scrollTop(e,D.top+$.top):Za.scrollTop(e,D.top+H.top):i||(o=o===void 0?!0:!!o,o?Za.scrollTop(e,D.top+$.top):Za.scrollTop(e,D.top+H.top)),r&&($.left<0||H.left>0?a===!0?Za.scrollLeft(e,D.left+$.left):a===!1?Za.scrollLeft(e,D.left+H.left):$.left<0?Za.scrollLeft(e,D.left+$.left):Za.scrollLeft(e,D.left+H.left):i||(a=a===void 0?!0:!!a,a?Za.scrollLeft(e,D.left+$.left):Za.scrollLeft(e,D.left+H.left)))}var p1e=f1e,m1e=p1e,O3=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},g1e=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}();function y1e(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function v1e(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function C1e(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var a1=Wn,Kl=Lh,_1e=p0,FP=_1e.findDOMNode,b1e=m1e,x1e=["blur","checkValidity","click","focus","select","setCustomValidity","setSelectionRange","setRangeText"];function w1e(){return{x:window.pageXOffset!==void 0?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}}var Uw=function(n){C1e(e,n);function e(t){y1e(this,e);var r=v1e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.state={isOpen:!1,highlightedIndex:null},r._debugStates=[],r.ensureHighlightedIndex=r.ensureHighlightedIndex.bind(r),r.exposeAPI=r.exposeAPI.bind(r),r.handleInputFocus=r.handleInputFocus.bind(r),r.handleInputBlur=r.handleInputBlur.bind(r),r.handleChange=r.handleChange.bind(r),r.handleKeyDown=r.handleKeyDown.bind(r),r.handleInputClick=r.handleInputClick.bind(r),r.maybeAutoCompleteText=r.maybeAutoCompleteText.bind(r),r}return g1e(e,[{key:"componentWillMount",value:function(){this.refs={},this._ignoreBlur=!1,this._ignoreFocus=!1,this._scrollOffset=null,this._scrollTimer=null}},{key:"componentWillUnmount",value:function(){clearTimeout(this._scrollTimer),this._scrollTimer=null}},{key:"componentWillReceiveProps",value:function(r){this.state.highlightedIndex!==null&&this.setState(this.ensureHighlightedIndex),r.autoHighlight&&(this.props.value!==r.value||this.state.highlightedIndex===null)&&this.setState(this.maybeAutoCompleteText)}},{key:"componentDidMount",value:function(){this.isOpen()&&this.setMenuPositions()}},{key:"componentDidUpdate",value:function(r,i){(this.state.isOpen&&!i.isOpen||"open"in this.props&&this.props.open&&!r.open)&&this.setMenuPositions(),this.maybeScrollItemIntoView(),i.isOpen!==this.state.isOpen&&this.props.onMenuVisibilityChange(this.state.isOpen)}},{key:"exposeAPI",value:function(r){var i=this;this.refs.input=r,x1e.forEach(function(o){return i[o]=r&&r[o]&&r[o].bind(r)})}},{key:"maybeScrollItemIntoView",value:function(){if(this.isOpen()&&this.state.highlightedIndex!==null){var r=this.refs["item-"+this.state.highlightedIndex],i=this.refs.menu;b1e(FP(r),FP(i),{onlyScrollIfNeeded:!0})}}},{key:"handleKeyDown",value:function(r){e.keyDownHandlers[r.key]?e.keyDownHandlers[r.key].call(this,r):this.isOpen()||this.setState({isOpen:!0})}},{key:"handleChange",value:function(r){this.props.onChange(r,r.target.value)}},{key:"getFilteredItems",value:function(r){var i=r.items;return r.shouldItemRender&&(i=i.filter(function(o){return r.shouldItemRender(o,r.value)})),r.sortItems&&i.sort(function(o,a){return r.sortItems(o,a,r.value)}),i}},{key:"maybeAutoCompleteText",value:function(r,i){for(var o=r.highlightedIndex,a=i.value,s=i.getItemValue,d=o===null?0:o,f=this.getFilteredItems(i),C=0;C<f.length&&!i.isItemSelectable(f[d]);C++)d=(d+1)%f.length;var O=f[d]&&i.isItemSelectable(f[d])?f[d]:null;if(a!==""&&O){var E=s(O),P=E.toLowerCase().indexOf(a.toLowerCase())===0;if(P)return{highlightedIndex:d}}return{highlightedIndex:null}}},{key:"ensureHighlightedIndex",value:function(r,i){if(r.highlightedIndex>=this.getFilteredItems(i).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var r=this.refs.input,i=r.getBoundingClientRect(),o=window.window.getComputedStyle(r),a=parseInt(o.marginBottom,10)||0,s=parseInt(o.marginLeft,10)||0,d=parseInt(o.marginRight,10)||0;this.setState({menuTop:i.bottom+a,menuLeft:i.left+s,menuWidth:i.width+s+d})}},{key:"highlightItemFromMouse",value:function(r){this.setState({highlightedIndex:r})}},{key:"selectItemFromMouse",value:function(r){var i=this,o=this.props.getItemValue(r);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},function(){i.props.onSelect(o,r)})}},{key:"setIgnoreBlur",value:function(r){this._ignoreBlur=r}},{key:"renderMenu",value:function(){var r=this,i=this.getFilteredItems(this.props).map(function(s,d){var f=r.props.renderItem(s,r.state.highlightedIndex===d,{cursor:"default"});return a1.cloneElement(f,{onMouseEnter:r.props.isItemSelectable(s)?function(){return r.highlightItemFromMouse(d)}:null,onClick:r.props.isItemSelectable(s)?function(){return r.selectItemFromMouse(s)}:null,ref:function(O){return r.refs["item-"+d]=O}})}),o={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},a=this.props.renderMenu(i,this.props.value,o);return a1.cloneElement(a,{ref:function(d){return r.refs.menu=d},onTouchStart:function(){return r.setIgnoreBlur(!0)},onMouseEnter:function(){return r.setIgnoreBlur(!0)},onMouseLeave:function(){return r.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(r){var i=this;if(this._ignoreBlur){this._ignoreFocus=!0,this._scrollOffset=w1e(),this.refs.input.focus();return}var o=void 0,a=this.state.highlightedIndex;if(this.props.selectOnBlur&&a!==null){var s=this.getFilteredItems(this.props),d=s[a],f=this.props.getItemValue(d);o=function(){return i.props.onSelect(f,d)}}this.setState({isOpen:!1,highlightedIndex:null},o);var C=this.props.inputProps.onBlur;C&&C(r)}},{key:"handleInputFocus",value:function(r){var i=this;if(this._ignoreFocus){this._ignoreFocus=!1;var o=this._scrollOffset,a=o.x,s=o.y;this._scrollOffset=null,window.scrollTo(a,s),clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(function(){i._scrollTimer=null,window.scrollTo(a,s)},0);return}this.setState({isOpen:!0});var d=this.props.inputProps.onFocus;d&&d(r)}},{key:"isInputFocused",value:function(){var r=this.refs.input;return r.ownerDocument&&r===r.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(r,i){return i?function(o){r(o),i(o)}:r}},{key:"isOpen",value:function(){return"open"in this.props?this.props.open:this.state.isOpen}},{key:"render",value:function(){this.props.debug&&this._debugStates.push({id:this._debugStates.length,state:this.state});var r=this.props.inputProps,i=this.isOpen();return a1.createElement("div",O3({style:O3({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(O3({},r,{role:"combobox","aria-autocomplete":"list","aria-expanded":i,autoComplete:"off",ref:this.exposeAPI,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleChange,onKeyDown:this.composeEventHandlers(this.handleKeyDown,r.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,r.onClick),value:this.props.value})),i&&this.renderMenu(),this.props.debug&&a1.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),e}(a1.Component);Uw.propTypes={items:Kl.array.isRequired,value:Kl.any,onChange:Kl.func,onSelect:Kl.func,shouldItemRender:Kl.func,isItemSelectable:Kl.func,sortItems:Kl.func,getItemValue:Kl.func.isRequired,renderItem:Kl.func.isRequired,renderMenu:Kl.func,menuStyle:Kl.object,renderInput:Kl.func,inputProps:Kl.object,wrapperProps:Kl.object,wrapperStyle:Kl.object,autoHighlight:Kl.bool,selectOnBlur:Kl.bool,onMenuVisibilityChange:Kl.func,open:Kl.bool,debug:Kl.bool};Uw.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(e){return a1.createElement("input",e)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(e,t,r){return a1.createElement("div",{style:O3({},r,this.menuStyle),children:e})},menuStyle:{borderRadius:"3px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",background:"rgba(255, 255, 255, 0.9)",padding:"2px 0",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"50%"},autoHighlight:!0,selectOnBlur:!1,onMenuVisibilityChange:function(){}};Uw.keyDownHandlers={ArrowDown:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var r=this.state.highlightedIndex,i=r===null?-1:r,o=0;o<t.length;o++){var a=(i+o+1)%t.length;if(this.props.isItemSelectable(t[a])){i=a;break}}i>-1&&i!==r&&this.setState({highlightedIndex:i,isOpen:!0})}},ArrowUp:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var r=this.state.highlightedIndex,i=r===null?t.length:r,o=0;o<t.length;o++){var a=(i-(1+o)+t.length)%t.length;if(this.props.isItemSelectable(t[a])){i=a;break}}i!==t.length&&this.setState({highlightedIndex:i,isOpen:!0})}},Enter:function(e){var t=this;if(e.keyCode===13)if(this.setIgnoreBlur(!1),this.isOpen())if(this.state.highlightedIndex==null)this.setState({isOpen:!1},function(){t.refs.input.select()});else{e.preventDefault();var r=this.getFilteredItems(this.props)[this.state.highlightedIndex],i=this.props.getItemValue(r);this.setState({isOpen:!1,highlightedIndex:null},function(){t.refs.input.setSelectionRange(i.length,i.length),t.props.onSelect(i,r)})}else return},Escape:function(){this.setIgnoreBlur(!1),this.setState({highlightedIndex:null,isOpen:!1})},Tab:function(){this.setIgnoreBlur(!1)}};var M1e=Uw;const S1e=Ba(M1e);function Yi(){var n="/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",e="6ef9facf9aeabdae687b5aca973710969d826d60",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",statementMap:{0:{start:{line:5,column:19},end:{line:5,column:22}},1:{start:{line:7,column:10},end:{line:9,column:3}},2:{start:{line:10,column:23},end:{line:10,column:27}},3:{start:{line:11,column:24},end:{line:15,column:3}},4:{start:{line:17,column:4},end:{line:25,column:5}},5:{start:{line:18,column:24},end:{line:18,column:96}},6:{start:{line:19,column:31},end:{line:19,column:62}},7:{start:{line:20,column:6},end:{line:24,column:7}},8:{start:{line:21,column:8},end:{line:23,column:11}},9:{start:{line:28,column:4},end:{line:28,column:25}},10:{start:{line:31,column:4},end:{line:31,column:25}},11:{start:{line:34,column:4},end:{line:34,column:47}},12:{start:{line:37,column:4},end:{line:86,column:6}},13:{start:{line:41,column:10},end:{line:41,column:39}},14:{start:{line:63,column:36},end:{line:63,column:43}},15:{start:{line:64,column:29},end:{line:64,column:45}},16:{start:{line:65,column:33},end:{line:65,column:49}},17:{start:{line:67,column:14},end:{line:69,column:15}},18:{start:{line:68,column:16},end:{line:68,column:79}},19:{start:{line:70,column:14},end:{line:70,column:27}},20:{start:{line:72,column:65},end:{line:82,column:13}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:14},end:{line:12,column:15}},loc:{start:{line:12,column:20},end:{line:13,column:5}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:18},end:{line:26,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:22},end:{line:29,column:3}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:30,column:2},end:{line:30,column:3}},loc:{start:{line:30,column:23},end:{line:32,column:3}},line:30},4:{name:"(anonymous_4)",decl:{start:{line:33,column:2},end:{line:33,column:3}},loc:{start:{line:33,column:14},end:{line:35,column:3}},line:33},5:{name:"(anonymous_5)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:11},end:{line:87,column:3}},line:36},6:{name:"(anonymous_6)",decl:{start:{line:40,column:13},end:{line:40,column:14}},loc:{start:{line:40,column:21},end:{line:42,column:9}},line:40},7:{name:"(anonymous_7)",decl:{start:{line:63,column:26},end:{line:63,column:27}},loc:{start:{line:63,column:36},end:{line:63,column:43}},line:63},8:{name:"(anonymous_8)",decl:{start:{line:64,column:22},end:{line:64,column:23}},loc:{start:{line:64,column:29},end:{line:64,column:45}},line:64},9:{name:"(anonymous_9)",decl:{start:{line:65,column:22},end:{line:65,column:23}},loc:{start:{line:65,column:33},end:{line:65,column:49}},line:65},10:{name:"(anonymous_10)",decl:{start:{line:66,column:30},end:{line:66,column:31}},loc:{start:{line:66,column:52},end:{line:71,column:13}},line:66},11:{name:"(anonymous_11)",decl:{start:{line:72,column:24},end:{line:72,column:25}},loc:{start:{line:72,column:65},end:{line:82,column:13}},line:72}},branchMap:{0:{loc:{start:{line:17,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:17,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:20,column:6},end:{line:24,column:7}},type:"if",locations:[{start:{line:20,column:6},end:{line:24,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},2:{loc:{start:{line:34,column:24},end:{line:34,column:45}},type:"cond-expr",locations:[{start:{line:34,column:35},end:{line:34,column:41}},{start:{line:34,column:44},end:{line:34,column:45}}],line:34},3:{loc:{start:{line:66,column:37},end:{line:66,column:47}},type:"default-arg",locations:[{start:{line:66,column:45},end:{line:66,column:47}}],line:66},4:{loc:{start:{line:67,column:14},end:{line:69,column:15}},type:"if",locations:[{start:{line:67,column:14},end:{line:69,column:15}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx"],names:[],mappings:"AAsFU;AAtFV,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AAGzB,MAAM,aAAa;AAUnB,qBAAqB,0BAA0B,MAAM,UAAkC;AAAA,EACrF,QAAQ;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EAEA,qBAA4C;AAAA,EAE5C,OAAO,eAAe;AAAA,IACpB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,SAAS,CAAC;AAAA,EACZ;AAAA,EAEA,gBAAgB;AACd,QAAG,KAAK,MAAM,4BAA4B;AACxC,YAAM,YAAY,OAAO,cAAc,KAAK,mBAAoB,sBAAsB,EAAE;AACxF,YAAM,mBAAmB,KAAK,IAAI,WAAW,UAAU;AAEvD,UAAG,oBAAoB,KAAK,MAAM,WAAW;AAC3C,aAAK,SAAS;AAAA,UACZ,WAAW;AAAA,QACb,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAoB;AAClB,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,qBAAqB;AACnB,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,SAAS,GAAW;AAClB,SAAK,MAAM,SAAS,MAAM,KAAK,SAAY,CAAC;AAAA,EAC9C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,KAAK,CAAC,OAAO;AACX,eAAK,qBAAqB;AAAA,QAC5B;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,UAAU;AAAA,cACV,UAAU;AAAA,cACV,WAAW,KAAK,MAAM;AAAA,cACtB,QAAQ;AAAA,YACV;AAAA,YACA,cAAc;AAAA,cACZ,WAAW;AAAA,cACX,OAAO,CAAC;AAAA,YACV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,KAAK,MAAM,YAAY;AAAA,cACrC,WAAW;AAAA,cACX,YAAY;AAAA,YACd;AAAA,YACA,OAAO,KAAK,MAAM;AAAA,YAClB,OAAO,KAAK,MAAM;AAAA,YAClB,cAAc,CAAC,SAAS,KAAK,CAAC;AAAA,YAC9B,UAAU,OAAK,KAAK,SAAS,CAAC;AAAA,YAC9B,UAAU,CAAC,IAAI,MAAM,KAAK,SAAS,CAAC;AAAA,YACpC,kBAAkB,CAAC,MAAM,QAAM,OAAO;AACpC,kBAAI,OAAO,UAAW,UAAU;AAC9B,uBAAO,KAAK,CAAC,EAAE,YAAY,EAAE,QAAQ,MAAM,YAAY,CAAC,IAAI;AAAA,cAC9D;AACA,qBAAO;AAAA,YACT;AAAA,YACA,YAAY,CAAC,MAAM,kBACjB;AAAA,cAAC;AAAA;AAAA,gBAEC,WAAW,WAAW;AAAA,kBACpB,mCAAmC;AAAA,kBACnC,4CAA4C;AAAA,gBAC9C,CAAC;AAAA,gBAEA,eAAK,CAAC;AAAA;AAAA,cANF,KAAK,CAAC;AAAA,YAOb;AAAA;AAAA,QAEJ;AAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6ef9facf9aeabdae687b5aca973710969d826d60"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Yi=function(){return a},a}Yi();const UP=(Yi().s[0]++,140);class Lv extends Mn.Component{constructor(){super(...arguments);sn(this,"state",(Yi().s[1]++,{maxHeight:UP}));sn(this,"autocompleteMenuEl",(Yi().s[2]++,null))}calcMaxHeight(){if(Yi().f[1]++,Yi().s[4]++,this.props.keepMenuWithinWindowBounds){Yi().b[0][0]++;const t=(Yi().s[5]++,window.innerHeight-this.autocompleteMenuEl.getBoundingClientRect().top),r=(Yi().s[6]++,Math.min(t,UP));Yi().s[7]++,r!=this.state.maxHeight?(Yi().b[1][0]++,Yi().s[8]++,this.setState({maxHeight:r})):Yi().b[1][1]++}else Yi().b[0][1]++}componentDidMount(){Yi().f[2]++,Yi().s[9]++,this.calcMaxHeight()}componentDidUpdate(){Yi().f[3]++,Yi().s[10]++,this.calcMaxHeight()}onChange(t){Yi().f[4]++,Yi().s[11]++,this.props.onChange(t===""?(Yi().b[2][0]++,void 0):(Yi().b[2][1]++,t))}render(){return Yi().f[5]++,Yi().s[12]++,G.jsx("div",{ref:t=>{Yi().f[6]++,Yi().s[13]++,this.autocompleteMenuEl=t},children:G.jsx(S1e,{menuStyle:{position:"fixed",overflow:"auto",maxHeight:this.state.maxHeight,zIndex:"998"},wrapperProps:{className:"maputnik-autocomplete",style:{}},inputProps:{"aria-label":this.props["aria-label"],className:"maputnik-string",spellCheck:!1},value:this.props.value,items:this.props.options,getItemValue:t=>(Yi().f[7]++,Yi().s[14]++,t[0]),onSelect:t=>(Yi().f[8]++,Yi().s[15]++,this.onChange(t)),onChange:(t,r)=>(Yi().f[9]++,Yi().s[16]++,this.onChange(r)),shouldItemRender:(t,r=(Yi().b[3][0]++,""))=>(Yi().f[10]++,Yi().s[17]++,typeof r=="string"?(Yi().b[4][0]++,Yi().s[18]++,t[0].toLowerCase().indexOf(r.toLowerCase())>-1):(Yi().b[4][1]++,Yi().s[19]++,!1)),renderItem:(t,r)=>(Yi().f[11]++,Yi().s[20]++,G.jsx("div",{className:Qf({"maputnik-autocomplete-menu-item":!0,"maputnik-autocomplete-menu-item-selected":r}),children:t[1]},t[0]))})})}}sn(Lv,"defaultProps",(Yi().s[3]++,{onChange:()=>{Yi().f[0]++},options:[]}));function Ef(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",e="ab049bb75b4ddccd0f9bdd2bba8785d564ca92f6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:12,column:3}},1:{start:{line:14,column:14},end:{line:14,column:26}},2:{start:{line:15,column:4},end:{line:31,column:6}},3:{start:{line:27,column:56},end:{line:27,column:66}},4:{start:{line:34,column:20},end:{line:34,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:14},end:{line:9,column:15}},loc:{start:{line:9,column:20},end:{line:10,column:5}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:32,column:3}},line:13},2:{name:"(anonymous_2)",decl:{start:{line:27,column:47},end:{line:27,column:48}},loc:{start:{line:27,column:56},end:{line:27,column:66}},line:27}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx"],names:[],mappings:"AA6BM;AA7BN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,SAA0B,uBAAuB;AAUjD,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAC1E,OAAO,eAAe;AAAA,IACpB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,WAAW,CAAC;AAAA,EACd;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,QAAQ;AAAA,QACjB,WAAW,OAAO,MAAM;AAAA,QACxB,OAAO,KAAK,MAAM;AAAA,QAClB,eAAa,KAAK,MAAM;AAAA,QAExB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,SAAS,KAAK,MAAM,WAAW,IAAI,SAAO,CAAC,KAAK,GAAG,CAAC;AAAA;AAAA,QACtD;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ab049bb75b4ddccd0f9bdd2bba8785d564ca92f6"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ef=function(){return a},a}Ef();class LG extends Mn.Component{render(){var t;Ef().f[1]++;const e=(Ef().s[1]++,this.props.t);return Ef().s[2]++,G.jsx(la,{label:e("Source"),fieldSpec:no.layer.source,error:this.props.error,"data-wd-key":this.props.wdKey,children:G.jsx(Lv,{value:this.props.value,onChange:this.props.onChange,options:(t=this.props.sourceIds)==null?void 0:t.map(r=>(Ef().f[2]++,Ef().s[3]++,[r,r]))})})}}sn(LG,"defaultProps",(Ef().s[0]++,{onChange:()=>{Ef().f[0]++},sourceIds:[]}));const FG=(Ef().s[4]++,No()(LG));function Of(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",e="d17faa4f03faf23184e12eb0563d322067d1f63d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:13,column:3}},1:{start:{line:15,column:14},end:{line:15,column:26}},2:{start:{line:16,column:4},end:{line:33,column:6}},3:{start:{line:29,column:59},end:{line:29,column:65}},4:{start:{line:36,column:25},end:{line:36,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:14},end:{line:9,column:15}},loc:{start:{line:9,column:20},end:{line:10,column:5}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:11},end:{line:34,column:3}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:29,column:52},end:{line:29,column:53}},loc:{start:{line:29,column:59},end:{line:29,column:65}},line:29}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx"],names:[],mappings:"AA8BM;AA9BN,OAAO,WAAW;AAElB,SAAQ,cAAa;AACrB,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,SAA0B,uBAAuB;AAUjD,MAAM,iCAAiC,MAAM,UAAyC;AAAA,EACpF,OAAO,eAAe;AAAA,IACpB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,gBAAgB,CAAC;AAAA,IACjB,SAAS;AAAA,EACX;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,cAAc;AAAA,QACvB,WAAW,OAAO,MAAM,cAAc;AAAA,QACtC,eAAY;AAAA,QACZ,OAAO,KAAK,MAAM;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,4BAA4B,CAAC,CAAC,KAAK,MAAM;AAAA,YACzC,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,SAAS,KAAK,MAAM,gBAAgB,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA;AAAA,QACrD;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d17faa4f03faf23184e12eb0563d322067d1f63d"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Of=function(){return a},a}Of();class UG extends Mn.Component{render(){var t;Of().f[1]++;const e=(Of().s[1]++,this.props.t);return Of().s[2]++,G.jsx(la,{label:e("Source Layer"),fieldSpec:Ea.layer["source-layer"],"data-wd-key":"layer-source-layer",error:this.props.error,children:G.jsx(Lv,{keepMenuWithinWindowBounds:!!this.props.isFixed,value:this.props.value,onChange:this.props.onChange,options:(t=this.props.sourceLayerIds)==null?void 0:t.map(r=>(Of().f[2]++,Of().s[3]++,[r,r]))})})}}sn(UG,"defaultProps",(Of().s[0]++,{onChange:()=>{Of().f[0]++},sourceLayerIds:[],isFixed:!1}));const RG=(Of().s[4]++,No()(UG));function Ar(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx",e="7a9f0314912c2a2e8e47cddf3aaf5469476531e0",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx",statementMap:{0:{start:{line:11,column:13},end:{line:26,column:3}},1:{start:{line:12,column:26},end:{line:12,column:52}},2:{start:{line:13,column:18},end:{line:16,column:5}},3:{start:{line:17,column:4},end:{line:22,column:5}},4:{start:{line:18,column:6},end:{line:18,column:39}},5:{start:{line:19,column:6},end:{line:21,column:7}},6:{start:{line:20,column:8},end:{line:20,column:59}},7:{start:{line:23,column:4},end:{line:23,column:30}},8:{start:{line:24,column:4},end:{line:24,column:45}},9:{start:{line:25,column:4},end:{line:25,column:35}},10:{start:{line:28,column:4},end:{line:28,column:17}},11:{start:{line:29,column:18},end:{line:32,column:5}},12:{start:{line:33,column:4},end:{line:36,column:5}},13:{start:{line:34,column:6},end:{line:34,column:56}},14:{start:{line:35,column:6},end:{line:35,column:66}},15:{start:{line:37,column:4},end:{line:37,column:23}},16:{start:{line:40,column:20},end:{line:40,column:34}},17:{start:{line:41,column:20},end:{line:41,column:35}},18:{start:{line:42,column:32},end:{line:42,column:56}},19:{start:{line:43,column:32},end:{line:43,column:56}},20:{start:{line:44,column:4},end:{line:51,column:5}},21:{start:{line:48,column:6},end:{line:50,column:9}},22:{start:{line:54,column:22},end:{line:54,column:54}},23:{start:{line:55,column:4},end:{line:55,column:34}},24:{start:{line:58,column:20},end:{line:58,column:22}},25:{start:{line:59,column:18},end:{line:79,column:5}},26:{start:{line:80,column:4},end:{line:85,column:5}},27:{start:{line:81,column:22},end:{line:81,column:30}},28:{start:{line:82,column:6},end:{line:84,column:7}},29:{start:{line:83,column:8},end:{line:83,column:26}},30:{start:{line:86,column:4},end:{line:86,column:19}},31:{start:{line:89,column:14},end:{line:89,column:26}},32:{start:{line:90,column:20},end:{line:90,column:52}},33:{start:{line:91,column:19},end:{line:91,column:61}},34:{start:{line:92,column:4},end:{line:148,column:6}},35:{start:{line:107,column:16},end:{line:107,column:41}},36:{start:{line:116,column:31},end:{line:116,column:57}},37:{start:{line:125,column:31},end:{line:125,column:59}},38:{start:{line:134,column:31},end:{line:134,column:67}},39:{start:{line:151,column:17},end:{line:151,column:52}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:11,column:13},end:{line:11,column:14}},loc:{start:{line:11,column:19},end:{line:26,column:3}},line:11},1:{name:"(anonymous_1)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:21},end:{line:38,column:3}},line:27},2:{name:"(anonymous_2)",decl:{start:{line:39,column:2},end:{line:39,column:3}},loc:{start:{line:39,column:44},end:{line:52,column:3}},line:39},3:{name:"(anonymous_3)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:29},end:{line:56,column:3}},line:53},4:{name:"(anonymous_4)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:19},end:{line:87,column:3}},line:57},5:{name:"(anonymous_5)",decl:{start:{line:88,column:2},end:{line:88,column:3}},loc:{start:{line:88,column:11},end:{line:149,column:3}},line:88},6:{name:"(anonymous_6)",decl:{start:{line:106,column:24},end:{line:106,column:25}},loc:{start:{line:106,column:31},end:{line:108,column:15}},line:106},7:{name:"(anonymous_7)",decl:{start:{line:116,column:24},end:{line:116,column:25}},loc:{start:{line:116,column:31},end:{line:116,column:57}},line:116},8:{name:"(anonymous_8)",decl:{start:{line:125,column:24},end:{line:125,column:25}},loc:{start:{line:125,column:31},end:{line:125,column:59}},line:125},9:{name:"(anonymous_9)",decl:{start:{line:134,column:24},end:{line:134,column:25}},loc:{start:{line:134,column:31},end:{line:134,column:67}},line:134}},branchMap:{0:{loc:{start:{line:17,column:4},end:{line:22,column:5}},type:"if",locations:[{start:{line:17,column:4},end:{line:22,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:19,column:6},end:{line:21,column:7}},type:"if",locations:[{start:{line:19,column:6},end:{line:21,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},2:{loc:{start:{line:19,column:10},end:{line:19,column:68}},type:"binary-expr",locations:[{start:{line:19,column:10},end:{line:19,column:38}},{start:{line:19,column:42},end:{line:19,column:68}}],line:19},3:{loc:{start:{line:33,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:33,column:4},end:{line:36,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:33},4:{loc:{start:{line:44,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:51,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},5:{loc:{start:{line:46,column:6},end:{line:46,column:160}},type:"binary-expr",locations:[{start:{line:46,column:6},end:{line:46,column:25}},{start:{line:46,column:29},end:{line:46,column:52}},{start:{line:46,column:56},end:{line:46,column:106}},{start:{line:46,column:110},end:{line:46,column:160}}],line:46},6:{loc:{start:{line:54,column:22},end:{line:54,column:54}},type:"binary-expr",locations:[{start:{line:54,column:22},end:{line:54,column:48}},{start:{line:54,column:52},end:{line:54,column:54}}],line:54},7:{loc:{start:{line:55,column:11},end:{line:55,column:33}},type:"binary-expr",locations:[{start:{line:55,column:11},end:{line:55,column:27}},{start:{line:55,column:31},end:{line:55,column:33}}],line:55},8:{loc:{start:{line:82,column:6},end:{line:84,column:7}},type:"if",locations:[{start:{line:82,column:6},end:{line:84,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:82},9:{loc:{start:{line:82,column:10},end:{line:82,column:61}},type:"binary-expr",locations:[{start:{line:82,column:10},end:{line:82,column:24}},{start:{line:82,column:28},end:{line:82,column:61}}],line:82},10:{loc:{start:{line:119,column:10},end:{line:127,column:11}},type:"binary-expr",locations:[{start:{line:119,column:10},end:{line:119,column:42}},{start:{line:119,column:62},end:{line:127,column:11}}],line:119},11:{loc:{start:{line:128,column:10},end:{line:136,column:11}},type:"binary-expr",locations:[{start:{line:128,column:10},end:{line:128,column:87}},{start:{line:128,column:107},end:{line:136,column:11}}],line:128}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0,0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx"],names:[],mappings:"AA2IM,SACE,KADF;AA3IN,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAE7B,SAA0B,uBAAuB;AAkBjD,MAAM,yBAAyB,MAAM,UAAgD;AAAA,EACnF,WAAW,MAAM;AACf,UAAM,gBAAgB,KAAK,MAAM,OAAO,MAAM,CAAC;AAC/C,UAAM,QAAuB;AAAA,MAC3B,IAAI,KAAK,MAAM;AAAA,MACf,MAAM,KAAK,MAAM;AAAA,IACnB;AAEA,QAAG,KAAK,MAAM,SAAS,cAAc;AACnC,YAAM,SAAS,KAAK,MAAM;AAC1B,UAAG,KAAK,MAAM,SAAS,YAAY,KAAK,MAAM,cAAc,GAAG;AAC7D,cAAM,cAAc,IAAI,KAAK,MAAM,cAAc;AAAA,MACnD;AAAA,IACF;AAEA,kBAAc,KAAK,KAA2B;AAE9C,SAAK,MAAM,eAAe,aAAa;AACvC,SAAK,MAAM,aAAa,KAAK;AAAA,EAC/B;AAAA,EAEA,YAAY,OAA8B;AACxC,UAAM,KAAK;AACX,UAAM,QAAuB;AAAA,MAC3B,MAAM;AAAA,MACN,IAAI;AAAA,IACN;AAEA,QAAG,MAAM,QAAQ,SAAS,GAAG;AAC3B,YAAM,SAAS,OAAO,KAAK,KAAK,MAAM,OAAO,EAAE,CAAC;AAChD,YAAM,cAAc,IAAI,KAAK,MAAM,QAAQ,MAAM,MAAgD,EAAE,CAAC;AAAA,IACtG;AACA,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,mBAAmB,YAAmC,WAA0B;AAE9E,UAAM,UAAU,UAAU;AAC1B,UAAM,UAAU,KAAK,MAAM;AAE3B,UAAM,sBAAsB,KAAK,WAAW,OAAO;AACnD,UAAM,sBAAsB,KAAK,WAAW,OAAO;AAEnD;AAAA;AAAA,MAEE,YAAY,WACT,UAAU,WAAW,MAErB,oBAAoB,QAAQ,UAAU,MAAO,IAAI,MAEjD,oBAAoB,QAAQ,KAAK,MAAM,MAAO,IAAI;AAAA,MACrD;AAEA,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,mBAAmB,QAAgB;AACjC,UAAM,YAAY,KAAK,MAAM,QAAQ,MAAM,KAAK,CAAC;AACjD,WAAO,UAAU,UAAU,CAAC;AAAA,EAC9B;AAAA,EAEA,WAAW,MAAc;AACvB,UAAM,UAAU,CAAC;AAEjB,UAAM,QAAQ;AAAA,MACZ,QAAQ;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,QAAQ;AAAA,QACN;AAAA,MACF;AAAA,MACA,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,eAAU,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,KAAK,MAAM,OAAO,GAAU;AACjE,YAAM,UAAU,IAAI;AACpB,UAAG,MAAM,OAAO,KAAK,MAAM,OAAO,EAAE,QAAQ,IAAI,IAAI,IAAI;AACtD,gBAAQ,KAAK,GAAG;AAAA,MAClB;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA,EAGA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,UAAU,KAAK,WAAW,KAAK,MAAM,IAAI;AAC/C,UAAM,SAAS,KAAK,mBAAmB,KAAK,MAAM,MAAO;AAEzD,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,WAAW;AAAA,QACpB,eAAY;AAAA,QACZ,WAAU;AAAA,QAEV,+BAAC,SAAI,WAAU,sBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,OAAM;AAAA,cACN,UAAU,CAAC,MAAc;AACvB,qBAAK,SAAS,EAAE,IAAI,EAAE,CAAC;AAAA,cACzB;AAAA;AAAA,UACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,OAAM;AAAA,cACN,UAAU,CAAC,MAAkC,KAAK,SAAS,EAAE,MAAM,EAAE,CAAC;AAAA;AAAA,UACxE;AAAA,UACC,KAAK,MAAM,SAAS,gBACvB;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,cACX,OAAM;AAAA,cACN,OAAO,KAAK,MAAM;AAAA,cAClB,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,QAAQ,EAAE,CAAC;AAAA;AAAA,UACtD;AAAA,UAEG,CAAC,cAAc,UAAU,aAAa,SAAS,EAAE,QAAQ,KAAK,MAAM,IAAI,IAAI,KAC/E;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,cACT,gBAAgB;AAAA,cAChB,OAAO,KAAK,MAAM,cAAc;AAAA,cAChC,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAAA;AAAA,UAC9D;AAAA,UAEE;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK;AAAA,cACd,eAAY;AAAA,cAEX,YAAE,WAAW;AAAA;AAAA,UAChB;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,WAAW,gBAAgB,EAAE,gBAAgB;AACnD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7a9f0314912c2a2e8e47cddf3aaf5469476531e0"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ar=function(){return a},a}Ar();class E1e extends Mn.Component{constructor(t){Ar().f[1]++,Ar().s[10]++;super(t);sn(this,"addLayer",(Ar().s[0]++,()=>{Ar().f[0]++;const t=(Ar().s[1]++,this.props.layers.slice(0)),r=(Ar().s[2]++,{id:this.state.id,type:this.state.type});Ar().s[3]++,this.state.type!=="background"?(Ar().b[0][0]++,Ar().s[4]++,r.source=this.state.source,Ar().s[5]++,Ar().b[2][0]++,this.state.type!=="raster"&&(Ar().b[2][1]++,this.state["source-layer"])?(Ar().b[1][0]++,Ar().s[6]++,r["source-layer"]=this.state["source-layer"]):Ar().b[1][1]++):Ar().b[0][1]++,Ar().s[7]++,t.push(r),Ar().s[8]++,this.props.onLayersChange(t),Ar().s[9]++,this.props.onOpenToggle(!1)}));const r=(Ar().s[11]++,{type:"fill",id:""});Ar().s[12]++,t.sources.length>0?(Ar().b[3][0]++,Ar().s[13]++,r.source=Object.keys(this.props.sources)[0],Ar().s[14]++,r["source-layer"]=this.props.sources[r.source][0]):Ar().b[3][1]++,Ar().s[15]++,this.state=r}componentDidUpdate(t,r){Ar().f[2]++;const i=(Ar().s[16]++,r.type),o=(Ar().s[17]++,this.state.type),a=(Ar().s[18]++,this.getSources(i)),s=(Ar().s[19]++,this.getSources(o));Ar().s[20]++,Ar().b[5][0]++,i!==o&&(Ar().b[5][1]++,r.source!=="")&&(Ar().b[5][2]++,a.indexOf(r.source)>-1)&&(Ar().b[5][3]++,s.indexOf(this.state.source)<0)?(Ar().b[4][0]++,Ar().s[21]++,this.setState({source:""})):Ar().b[4][1]++}getLayersForSource(t){Ar().f[3]++;const r=(Ar().s[22]++,Ar().b[6][0]++,this.props.sources[t]||(Ar().b[6][1]++,{}));return Ar().s[23]++,Ar().b[7][0]++,r.layers||(Ar().b[7][1]++,[])}getSources(t){Ar().f[4]++;const r=(Ar().s[24]++,[]),i=(Ar().s[25]++,{vector:["fill","line","symbol","circle","fill-extrusion","heatmap"],raster:["raster"],geojson:["fill","line","symbol","circle","fill-extrusion","heatmap"]});Ar().s[26]++;for(const[o,a]of Object.entries(this.props.sources)){const s=(Ar().s[27]++,a.type);Ar().s[28]++,Ar().b[9][0]++,i[s]&&(Ar().b[9][1]++,i[s].indexOf(t)>-1)?(Ar().b[8][0]++,Ar().s[29]++,r.push(o)):Ar().b[8][1]++}return Ar().s[30]++,r}render(){Ar().f[5]++;const t=(Ar().s[31]++,this.props.t),r=(Ar().s[32]++,this.getSources(this.state.type)),i=(Ar().s[33]++,this.getLayersForSource(this.state.source));return Ar().s[34]++,G.jsx(g0,{isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Add Layer"),"data-wd-key":"modal:add-layer",className:"maputnik-add-modal",children:G.jsxs("div",{className:"maputnik-add-layer",children:[G.jsx(BG,{value:this.state.id,wdKey:"add-layer.layer-id",onChange:o=>{Ar().f[6]++,Ar().s[35]++,this.setState({id:o})}}),G.jsx(OG,{value:this.state.type,wdKey:"add-layer.layer-type",onChange:o=>(Ar().f[7]++,Ar().s[36]++,this.setState({type:o}))}),(Ar().b[10][0]++,this.state.type!=="background"&&(Ar().b[10][1]++,G.jsx(FG,{sourceIds:r,wdKey:"add-layer.layer-source-block",value:this.state.source,onChange:o=>(Ar().f[8]++,Ar().s[37]++,this.setState({source:o}))}))),(Ar().b[11][0]++,["background","raster","hillshade","heatmap"].indexOf(this.state.type)<0&&(Ar().b[11][1]++,G.jsx(RG,{isFixed:!0,sourceLayerIds:i,value:this.state["source-layer"],onChange:o=>(Ar().f[9]++,Ar().s[38]++,this.setState({"source-layer":o}))}))),G.jsx(is,{className:"maputnik-add-layer-button",onClick:this.addLayer,"data-wd-key":"add-layer",children:t("Add Layer")})]})})}}const O1e=(Ar().s[39]++,No()(E1e));function m1(){var n="/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",e="a991ed6da2a27b46f1adbb88a645aa2ee0df375e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",statementMap:{0:{start:{line:1,column:10},end:{line:1,column:11}},1:{start:{line:3,column:2},end:{line:3,column:8}},2:{start:{line:4,column:2},end:{line:4,column:22}}},fnMap:{0:{name:"generateUniqueId",decl:{start:{line:2,column:24},end:{line:2,column:40}},loc:{start:{line:2,column:54},end:{line:5,column:1}},line:2}},branchMap:{0:{loc:{start:{line:2,column:41},end:{line:2,column:52}},type:"default-arg",locations:[{start:{line:2,column:50},end:{line:2,column:52}}],line:2}},s:{0:0,1:0,2:0},f:{0:0},b:{0:[0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts"],names:[],mappings:"AAGA,IAAI,MAAM;AAEV,wBAAwB,iBAAiB,SAAO,IAAI;AAClD;AACA,SAAO,SAAO;AAChB;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a991ed6da2a27b46f1adbb88a645aa2ee0df375e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return m1=function(){return a},a}m1();let RP=(m1().s[0]++,0);function vv(n=(m1().b[0][0]++,"")){return m1().f[0]++,m1().s[1]++,RP++,m1().s[2]++,n+RP}function ai(){var n="/home/runner/work/maputnik/maputnik/src/libs/layer.ts",e="8d7d71e3a97c0e4b8cc5fd0ca26b8fdf4aa2aa36",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/layer.ts",statementMap:{0:{start:{line:3,column:28},end:{line:3,column:46}},1:{start:{line:4,column:2},end:{line:8,column:5}},2:{start:{line:5,column:4},end:{line:7,column:5}},3:{start:{line:6,column:6},end:{line:6,column:45}},4:{start:{line:9,column:29},end:{line:9,column:48}},5:{start:{line:10,column:2},end:{line:14,column:5}},6:{start:{line:11,column:4},end:{line:13,column:5}},7:{start:{line:12,column:6},end:{line:12,column:46}},8:{start:{line:15,column:2},end:{line:20,column:4}},9:{start:{line:23,column:2},end:{line:59,column:3}},10:{start:{line:24,column:4},end:{line:43,column:5}},11:{start:{line:25,column:23},end:{line:31,column:7}},12:{start:{line:32,column:6},end:{line:32,column:39}},13:{start:{line:33,column:6},end:{line:35,column:7}},14:{start:{line:34,column:8},end:{line:34,column:31}},15:{start:{line:36,column:6},end:{line:36,column:22}},16:{start:{line:38,column:23},end:{line:40,column:7}},17:{start:{line:41,column:6},end:{line:41,column:32}},18:{start:{line:42,column:6},end:{line:42,column:22}},19:{start:{line:45,column:4},end:{line:58,column:5}},20:{start:{line:46,column:6},end:{line:52,column:8}},21:{start:{line:54,column:6},end:{line:57,column:8}},22:{start:{line:62,column:2},end:{line:62,column:64}},23:{start:{line:65,column:29},end:{line:65,column:56}},24:{start:{line:66,column:19},end:{line:66,column:22}},25:{start:{line:67,column:2},end:{line:74,column:3}},26:{start:{line:67,column:15},end:{line:67,column:18}},27:{start:{line:68,column:32},end:{line:68,column:61}},28:{start:{line:69,column:4},end:{line:73,column:5}},29:{start:{line:70,column:6},end:{line:70,column:25}},30:{start:{line:72,column:6},end:{line:72,column:24}},31:{start:{line:75,column:2},end:{line:75,column:20}}},fnMap:{0:{name:"changeType",decl:{start:{line:2,column:16},end:{line:2,column:26}},loc:{start:{line:2,column:43},end:{line:21,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:4,column:41},end:{line:4,column:42}},loc:{start:{line:4,column:59},end:{line:8,column:3}},line:4},2:{name:"(anonymous_2)",decl:{start:{line:10,column:42},end:{line:10,column:43}},loc:{start:{line:10,column:60},end:{line:14,column:3}},line:10},3:{name:"changeProperty",decl:{start:{line:22,column:16},end:{line:22,column:30}},loc:{start:{line:22,column:65},end:{line:60,column:1}},line:22},4:{name:"layerPrefix",decl:{start:{line:61,column:16},end:{line:61,column:27}},loc:{start:{line:61,column:34},end:{line:63,column:1}},line:61},5:{name:"findClosestCommonPrefix",decl:{start:{line:64,column:16},end:{line:64,column:39}},loc:{start:{line:64,column:53},end:{line:76,column:1}},line:64}},branchMap:{0:{loc:{start:{line:5,column:4},end:{line:7,column:5}},type:"if",locations:[{start:{line:5,column:4},end:{line:7,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5},1:{loc:{start:{line:11,column:4},end:{line:13,column:5}},type:"if",locations:[{start:{line:11,column:4},end:{line:13,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:11},2:{loc:{start:{line:23,column:2},end:{line:59,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:59,column:3}},{start:{line:44,column:9},end:{line:59,column:3}}],line:23},3:{loc:{start:{line:24,column:4},end:{line:43,column:5}},type:"if",locations:[{start:{line:24,column:4},end:{line:43,column:5}},{start:{line:37,column:11},end:{line:43,column:5}}],line:24},4:{loc:{start:{line:33,column:6},end:{line:35,column:7}},type:"if",locations:[{start:{line:33,column:6},end:{line:35,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:33},5:{loc:{start:{line:45,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:58,column:5}},{start:{line:53,column:11},end:{line:58,column:5}}],line:45},6:{loc:{start:{line:69,column:4},end:{line:73,column:5}},type:"if",locations:[{start:{line:69,column:4},end:{line:73,column:5}},{start:{line:71,column:11},end:{line:73,column:5}}],line:69}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/layer.ts"],names:[],mappings:"AAAA,SAAQ,cAAa;AAGd,gBAAS,WAAW,OAA2B,SAAiB;AACrE,QAAM,oBAAiD,EAAE,GAAG,MAAM,MAAM;AACxE,SAAO,KAAK,iBAAiB,EAAE,QAAQ,kBAAgB;AACrD,QAAG,EAAE,gBAAgB,OAAO,WAAW,OAAO,IAAI;AAChD,aAAO,kBAAkB,YAAiD;AAAA,IAC5E;AAAA,EACF,CAAC;AAED,QAAM,qBAAmD,EAAE,GAAG,MAAM,OAAO;AAC3E,SAAO,KAAK,kBAAkB,EAAE,QAAQ,kBAAgB;AACtD,QAAG,EAAE,gBAAgB,OAAO,YAAY,OAAO,IAAI;AACjD,aAAO,mBAAmB,YAAkD;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAKO,gBAAS,eAAe,OAA2B,OAAwC,UAAkB,UAAe;AAEjI,MAAG,aAAa,QAAW;AACzB,QAAG,OAAO;AACR,YAAM,WAAgB;AAAA,QACpB,GAAG;AAAA;AAAA,QAEH,CAAC,KAAK,GAAG;AAAA,UACP,GAAG,MAAM,KAAK;AAAA,QAChB;AAAA,MACF;AACA,aAAO,SAAS,KAAK,EAAE,QAAQ;AAG/B,UAAG,OAAO,KAAK,SAAS,KAAK,CAAC,EAAE,SAAS,GAAG;AAC1C,eAAO,SAAS,KAAK;AAAA,MACvB;AACA,aAAO;AAAA,IACT,OAAO;AACL,YAAM,WAAgB;AAAA,QACpB,GAAG;AAAA,MACL;AACA,aAAO,SAAS,QAAQ;AACxB,aAAO;AAAA,IACT;AAAA,EACF,OACK;AACH,QAAG,OAAO;AACR,aAAO;AAAA,QACL,GAAG;AAAA,QACH,CAAC,KAAK,GAAG;AAAA,UACP,GAAG,MAAM,KAAK;AAAA,UACd,CAAC,QAAQ,GAAG;AAAA,QACd;AAAA,MACF;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QACL,GAAG;AAAA,QACH,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF;AAEO,gBAAS,YAAY,MAAc;AACxC,SAAO,KAAK,QAAQ,KAAK,GAAG,EAAE,QAAQ,KAAK,GAAG,EAAE,MAAM,GAAG,EAAE,CAAC;AAC9D;AAEO,gBAAS,wBAAwB,QAA8B,KAAa;AACjF,QAAM,qBAAqB,YAAY,OAAO,GAAG,EAAE,EAAE;AACrD,MAAI,aAAa;AACjB,WAAS,IAAI,KAAK,IAAI,GAAG,KAAK;AAC5B,UAAM,sBAAsB,YAAY,OAAO,IAAE,CAAC,EAAE,EAAE;AACtD,QAAG,wBAAwB,oBAAoB;AAC7C,mBAAa,IAAI;AAAA,IACnB,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8d7d71e3a97c0e4b8cc5fd0ca26b8fdf4aa2aa36"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ai=function(){return a},a}ai();function B1e(n,e){ai().f[0]++;const t=(ai().s[0]++,{...n.paint});ai().s[1]++,Object.keys(t).forEach(i=>{ai().f[1]++,ai().s[2]++,i in Ea["paint_"+e]?ai().b[0][1]++:(ai().b[0][0]++,ai().s[3]++,delete t[i])});const r=(ai().s[4]++,{...n.layout});return ai().s[5]++,Object.keys(r).forEach(i=>{ai().f[2]++,ai().s[6]++,i in Ea["layout_"+e]?ai().b[1][1]++:(ai().b[1][0]++,ai().s[7]++,delete r[i])}),ai().s[8]++,{...n,paint:t,layout:r,type:e}}function I1e(n,e,t,r){if(ai().f[3]++,ai().s[9]++,r===void 0)if(ai().b[2][0]++,ai().s[10]++,e){ai().b[3][0]++;const i=(ai().s[11]++,{...n,[e]:{...n[e]}});return ai().s[12]++,delete i[e][t],ai().s[13]++,Object.keys(i[e]).length<1?(ai().b[4][0]++,ai().s[14]++,delete i[e]):ai().b[4][1]++,ai().s[15]++,i}else{ai().b[3][1]++;const i=(ai().s[16]++,{...n});return ai().s[17]++,delete i[t],ai().s[18]++,i}else return ai().b[2][1]++,ai().s[19]++,e?(ai().b[5][0]++,ai().s[20]++,{...n,[e]:{...n[e],[t]:r}}):(ai().b[5][1]++,ai().s[21]++,{...n,[t]:r})}function My(n){return ai().f[4]++,ai().s[22]++,n.replace(" ","-").replace("_","-").split("-")[0]}function k1e(n,e){ai().f[5]++;const t=(ai().s[23]++,My(n[e].id));let r=(ai().s[24]++,e);ai().s[25]++;for(let i=(ai().s[26]++,e);i>0;i--){const o=(ai().s[27]++,My(n[i-1].id));if(ai().s[28]++,o===t)ai().b[6][0]++,ai().s[29]++,r=i-1;else return ai().b[6][1]++,ai().s[30]++,r}return ai().s[31]++,r}function $t(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",e="e544c04a7b56f1c8f5a1b9c28e156fb038263492",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",statementMap:{0:{start:{line:13,column:24},end:{line:16,column:3}},1:{start:{line:20,column:4},end:{line:20,column:17}},2:{start:{line:21,column:4},end:{line:21,column:45}},3:{start:{line:22,column:4},end:{line:22,column:48}},4:{start:{line:23,column:4},end:{line:32,column:6}},5:{start:{line:35,column:4},end:{line:44,column:7}},6:{start:{line:46,column:17},end:{line:63,column:3}},7:{start:{line:47,column:14},end:{line:47,column:15}},8:{start:{line:48,column:22},end:{line:48,column:24}},9:{start:{line:49,column:4},end:{line:58,column:7}},10:{start:{line:50,column:26},end:{line:50,column:51}},11:{start:{line:51,column:24},end:{line:51,column:52}},12:{start:{line:52,column:6},end:{line:54,column:7}},13:{start:{line:53,column:8},end:{line:53,column:63}},14:{start:{line:55,column:6},end:{line:57,column:9}},15:{start:{line:56,column:8},end:{line:56,column:17}},16:{start:{line:59,column:4},end:{line:62,column:7}},17:{start:{line:65,column:19},end:{line:65,column:21}},18:{start:{line:66,column:41},end:{line:66,column:50}},19:{start:{line:67,column:4},end:{line:84,column:5}},20:{start:{line:67,column:17},end:{line:67,column:18}},21:{start:{line:68,column:24},end:{line:68,column:44}},22:{start:{line:69,column:28},end:{line:69,column:52}},23:{start:{line:70,column:6},end:{line:73,column:8}},24:{start:{line:74,column:20},end:{line:77,column:7}},25:{start:{line:78,column:6},end:{line:83,column:7}},26:{start:{line:79,column:26},end:{line:79,column:51}},27:{start:{line:80,column:8},end:{line:80,column:30}},28:{start:{line:82,column:8},end:{line:82,column:29}},29:{start:{line:85,column:4},end:{line:85,column:18}},30:{start:{line:88,column:22},end:{line:88,column:50}},31:{start:{line:89,column:22},end:{line:89,column:55}},32:{start:{line:90,column:4},end:{line:94,column:5}},33:{start:{line:91,column:6},end:{line:91,column:68}},34:{start:{line:93,column:6},end:{line:93,column:35}},35:{start:{line:95,column:4},end:{line:97,column:7}},36:{start:{line:100,column:22},end:{line:100,column:78}},37:{start:{line:101,column:4},end:{line:101,column:51}},38:{start:{line:104,column:4},end:{line:106,column:5}},39:{start:{line:105,column:6},end:{line:105,column:18}},40:{start:{line:108,column:18},end:{line:110,column:7}},41:{start:{line:111,column:6},end:{line:115,column:7}},42:{start:{line:112,column:8},end:{line:114,column:10}},43:{start:{line:116,column:6},end:{line:116,column:17}},44:{start:{line:118,column:24},end:{line:121,column:5}},45:{start:{line:123,column:18},end:{line:125,column:7}},46:{start:{line:126,column:6},end:{line:126,column:27}},47:{start:{line:127,column:6},end:{line:127,column:17}},48:{start:{line:129,column:23},end:{line:132,column:5}},49:{start:{line:133,column:25},end:{line:133,column:53}},50:{start:{line:134,column:4},end:{line:134,column:24}},51:{start:{line:137,column:4},end:{line:153,column:5}},52:{start:{line:138,column:31},end:{line:138,column:59}},53:{start:{line:139,column:6},end:{line:152,column:7}},54:{start:{line:140,column:23},end:{line:140,column:44}},55:{start:{line:141,column:24},end:{line:144,column:9}},56:{start:{line:145,column:25},end:{line:150,column:19}},57:{start:{line:146,column:10},end:{line:146,column:37}},58:{start:{line:147,column:10},end:{line:149,column:11}},59:{start:{line:148,column:12},end:{line:148,column:36}},60:{start:{line:151,column:8},end:{line:151,column:33}},61:{start:{line:156,column:22},end:{line:156,column:24}},62:{start:{line:157,column:14},end:{line:157,column:15}},63:{start:{line:158,column:26},end:{line:158,column:46}},64:{start:{line:159,column:4},end:{line:210,column:7}},65:{start:{line:160,column:26},end:{line:160,column:51}},66:{start:{line:161,column:6},end:{line:174,column:7}},67:{start:{line:162,column:36},end:{line:172,column:9}},68:{start:{line:166,column:47},end:{line:166,column:52}},69:{start:{line:173,column:8},end:{line:173,column:28}},70:{start:{line:175,column:6},end:{line:209,column:9}},71:{start:{line:176,column:25},end:{line:176,column:72}},72:{start:{line:177,column:27},end:{line:179,column:10}},73:{start:{line:178,column:10},end:{line:178,column:97}},74:{start:{line:180,column:32},end:{line:180,column:34}},75:{start:{line:181,column:8},end:{line:183,column:9}},76:{start:{line:182,column:10},end:{line:182,column:53}},77:{start:{line:184,column:41},end:{line:206,column:9}},78:{start:{line:207,column:8},end:{line:207,column:33}},79:{start:{line:208,column:8},end:{line:208,column:17}},80:{start:{line:211,column:14},end:{line:211,column:26}},81:{start:{line:212,column:4},end:{line:264,column:6}},82:{start:{line:267,column:27},end:{line:267,column:72}},83:{start:{line:268,column:35},end:{line:268,column:118}},84:{start:{line:268,column:80},end:{line:268,column:117}},85:{start:{line:271,column:4},end:{line:280,column:6}},86:{start:{line:278,column:33},end:{line:278,column:38}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:19},end:{line:14,column:20}},loc:{start:{line:14,column:25},end:{line:15,column:5}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:21},end:{line:33,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:25},end:{line:45,column:3}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:46,column:17},end:{line:46,column:18}},loc:{start:{line:46,column:23},end:{line:63,column:3}},line:46},4:{name:"(anonymous_4)",decl:{start:{line:49,column:33},end:{line:49,column:34}},loc:{start:{line:49,column:45},end:{line:58,column:5}},line:49},5:{name:"(anonymous_5)",decl:{start:{line:55,column:21},end:{line:55,column:22}},loc:{start:{line:55,column:33},end:{line:57,column:7}},line:55},6:{name:"(anonymous_6)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:18},end:{line:86,column:3}},line:64},7:{name:"(anonymous_7)",decl:{start:{line:87,column:2},end:{line:87,column:3}},loc:{start:{line:87,column:37},end:{line:98,column:3}},line:87},8:{name:"(anonymous_8)",decl:{start:{line:99,column:2},end:{line:99,column:3}},loc:{start:{line:99,column:32},end:{line:102,column:3}},line:99},9:{name:"(anonymous_9)",decl:{start:{line:103,column:2},end:{line:103,column:3}},loc:{start:{line:103,column:46},end:{line:135,column:3}},line:103},10:{name:"getRequiredProps",decl:{start:{line:107,column:13},end:{line:107,column:29}},loc:{start:{line:107,column:37},end:{line:117,column:5}},line:107},11:{name:"withoutLayers",decl:{start:{line:122,column:13},end:{line:122,column:26}},loc:{start:{line:122,column:34},end:{line:128,column:5}},line:122},12:{name:"(anonymous_12)",decl:{start:{line:136,column:2},end:{line:136,column:3}},loc:{start:{line:136,column:32},end:{line:154,column:3}},line:136},13:{name:"(anonymous_13)",decl:{start:{line:145,column:50},end:{line:145,column:51}},loc:{start:{line:145,column:63},end:{line:150,column:9}},line:145},14:{name:"(anonymous_14)",decl:{start:{line:155,column:2},end:{line:155,column:3}},loc:{start:{line:155,column:11},end:{line:265,column:3}},line:155},15:{name:"(anonymous_15)",decl:{start:{line:159,column:26},end:{line:159,column:27}},loc:{start:{line:159,column:38},end:{line:210,column:5}},line:159},16:{name:"(anonymous_16)",decl:{start:{line:166,column:40},end:{line:166,column:41}},loc:{start:{line:166,column:47},end:{line:166,column:52}},line:166},17:{name:"(anonymous_17)",decl:{start:{line:175,column:21},end:{line:175,column:22}},loc:{start:{line:175,column:44},end:{line:209,column:7}},line:175},18:{name:"(anonymous_18)",decl:{start:{line:177,column:50},end:{line:177,column:51}},loc:{start:{line:177,column:61},end:{line:179,column:9}},line:177},19:{name:"(anonymous_19)",decl:{start:{line:268,column:53},end:{line:268,column:54}},loc:{start:{line:268,column:80},end:{line:268,column:117}},line:268},20:{name:"(anonymous_20)",decl:{start:{line:270,column:2},end:{line:270,column:3}},loc:{start:{line:270,column:11},end:{line:281,column:3}},line:270},21:{name:"(anonymous_21)",decl:{start:{line:278,column:27},end:{line:278,column:28}},loc:{start:{line:278,column:33},end:{line:278,column:38}},line:278}},branchMap:{0:{loc:{start:{line:52,column:6},end:{line:54,column:7}},type:"if",locations:[{start:{line:52,column:6},end:{line:54,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:52},1:{loc:{start:{line:72,column:8},end:{line:72,column:79}},type:"cond-expr",locations:[{start:{line:72,column:41},end:{line:72,column:75}},{start:{line:72,column:78},end:{line:72,column:79}}],line:72},2:{loc:{start:{line:78,column:6},end:{line:83,column:7}},type:"if",locations:[{start:{line:78,column:6},end:{line:83,column:7}},{start:{line:81,column:13},end:{line:83,column:7}}],line:78},3:{loc:{start:{line:78,column:10},end:{line:78,column:81}},type:"binary-expr",locations:[{start:{line:78,column:10},end:{line:78,column:23}},{start:{line:78,column:27},end:{line:78,column:81}}],line:78},4:{loc:{start:{line:90,column:4},end:{line:94,column:5}},type:"if",locations:[{start:{line:90,column:4},end:{line:94,column:5}},{start:{line:92,column:11},end:{line:94,column:5}}],line:90},5:{loc:{start:{line:101,column:11},end:{line:101,column:50}},type:"cond-expr",locations:[{start:{line:101,column:34},end:{line:101,column:38}},{start:{line:101,column:41},end:{line:101,column:50}}],line:101},6:{loc:{start:{line:104,column:4},end:{line:106,column:5}},type:"if",locations:[{start:{line:104,column:4},end:{line:106,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:104},7:{loc:{start:{line:111,column:6},end:{line:115,column:7}},type:"if",locations:[{start:{line:111,column:6},end:{line:115,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:111},8:{loc:{start:{line:133,column:27},end:{line:133,column:52}},type:"binary-expr",locations:[{start:{line:133,column:27},end:{line:133,column:38}},{start:{line:133,column:42},end:{line:133,column:52}}],line:133},9:{loc:{start:{line:137,column:4},end:{line:153,column:5}},type:"if",locations:[{start:{line:137,column:4},end:{line:153,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:137},10:{loc:{start:{line:139,column:6},end:{line:152,column:7}},type:"if",locations:[{start:{line:139,column:6},end:{line:152,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:139},11:{loc:{start:{line:139,column:10},end:{line:139,column:51}},type:"binary-expr",locations:[{start:{line:139,column:10},end:{line:139,column:26}},{start:{line:139,column:30},end:{line:139,column:51}}],line:139},12:{loc:{start:{line:147,column:10},end:{line:149,column:11}},type:"if",locations:[{start:{line:147,column:10},end:{line:149,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:147},13:{loc:{start:{line:147,column:14},end:{line:147,column:68}},type:"binary-expr",locations:[{start:{line:147,column:14},end:{line:147,column:32}},{start:{line:147,column:36},end:{line:147,column:68}}],line:147},14:{loc:{start:{line:161,column:6},end:{line:174,column:7}},type:"if",locations:[{start:{line:161,column:6},end:{line:174,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:161},15:{loc:{start:{line:168,column:22},end:{line:168,column:98}},type:"binary-expr",locations:[{start:{line:168,column:22},end:{line:168,column:57}},{start:{line:168,column:61},end:{line:168,column:98}}],line:168},16:{loc:{start:{line:178,column:17},end:{line:178,column:96}},type:"binary-expr",locations:[{start:{line:178,column:17},end:{line:178,column:29}},{start:{line:178,column:33},end:{line:178,column:62}},{start:{line:178,column:66},end:{line:178,column:96}}],line:178},17:{loc:{start:{line:181,column:8},end:{line:183,column:9}},type:"if",locations:[{start:{line:181,column:8},end:{line:183,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:181},18:{loc:{start:{line:188,column:52},end:{line:188,column:153}},type:"binary-expr",locations:[{start:{line:188,column:52},end:{line:188,column:69}},{start:{line:188,column:73},end:{line:188,column:112}},{start:{line:188,column:116},end:{line:188,column:153}}],line:188},19:{loc:{start:{line:189,column:53},end:{line:189,column:105}},type:"binary-expr",locations:[{start:{line:189,column:53},end:{line:189,column:84}},{start:{line:189,column:88},end:{line:189,column:105}}],line:189},20:{loc:{start:{line:197,column:25},end:{line:197,column:43}},type:"binary-expr",locations:[{start:{line:197,column:25},end:{line:197,column:37}},{start:{line:197,column:41},end:{line:197,column:43}}],line:197},21:{loc:{start:{line:241,column:26},end:{line:241,column:96}},type:"cond-expr",locations:[{start:{line:241,column:69},end:{line:241,column:82}},{start:{line:241,column:85},end:{line:241,column:96}}],line:241}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0,0],17:[0,0],18:[0,0,0],19:[0,0],20:[0,0],21:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx"],names:[],mappings:"AAmNoB,cAoEd,YApEc;AAnNpB,OAAO,WAAuB;AAC9B,OAAO,gBAAgB;AACvB,OAAO,YAAY;AAEnB,OAAO,oBAAoB;AAC3B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AAErB,SAAwB,yBAAwB;AAEhD,OAAO,sBAAsB;AAC7B,SAAS,yBAAyB,mBAAmB;AACrD,SAA0B,uBAAuB;AAuBjD,MAAM,mCAAmC,MAAM,UAAoE;AAAA,EACjH,OAAO,eAAe;AAAA,IACpB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAAwC;AAClD,UAAM,KAAK;AACX,SAAK,kBAAkB,MAAM,UAAU;AACvC,SAAK,qBAAqB,MAAM,UAAU;AAC1C,SAAK,QAAQ;AAAA,MACX,iBAAiB,CAAC;AAAA,MAClB,sBAAsB;AAAA,MACtB,MAAM;AAAA,QACJ,KAAK,CAAC,iBAAiB;AAAA,MACzB;AAAA,MACA,QAAQ;AAAA,QACN,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAY,WAAmB;AAC7B,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,QACJ,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG,CAAC,iBAAiB;AAAA,MACjC;AAAA,MACA,QAAQ;AAAA,QACN,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG,CAAC,KAAK,MAAM,OAAO,SAAS;AAAA,MAC3C;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,eAAe,MAAM;AACnB,QAAI,MAAM;AAEV,UAAM,YAAqC,CAAC;AAE5C,SAAK,cAAc,EAAE,QAAQ,YAAU;AACrC,YAAM,cAAc,YAAY,OAAO,CAAC,EAAE,EAAE;AAC5C,YAAM,YAAY,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAG7C,UAAI,OAAO,SAAS,GAAG;AACrB,kBAAU,SAAS,IAAI,KAAK,MAAM;AAAA,MACpC;AAEA,aAAO,QAAQ,CAAC,WAAW;AACzB,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,SAAK,SAAS;AAAA,MACZ,iBAAiB;AAAA,MACjB,sBAAsB,CAAC,KAAK,MAAM;AAAA,IACpC,CAAC;AAAA,EACH;AAAA,EAEA,gBAA0D;AACxD,UAAM,SAAS,CAAC;AAChB,UAAM,eAAe,oBAAI,IAAI;AAE7B,aAAS,IAAI,GAAG,IAAI,KAAK,MAAM,OAAO,QAAQ,KAAK;AACjD,YAAM,YAAY,KAAK,MAAM,OAAO,CAAC;AACrC,YAAM,gBAAgB,KAAK,MAAM,OAAO,IAAE,CAAC;AAC3C,mBAAa;AAAA,QAAI,UAAU;AAAA,QACzB,aAAa,IAAI,UAAU,EAAE,IAAI,aAAa,IAAI,UAAU,EAAE,IAAI,IAAI;AAAA,MACxE;AACA,YAAM,QAAQ;AAAA,QACZ,GAAG;AAAA,QACH,KAAK,eAAe,UAAU,EAAE,IAAI,aAAa,IAAI,UAAU,EAAE,CAAC;AAAA,MACpE;AACA,UAAG,iBAAiB,YAAY,cAAc,EAAE,KAAK,YAAY,MAAM,EAAE,GAAG;AAC1E,cAAM,YAAY,OAAO,OAAO,SAAS,CAAC;AAC1C,kBAAU,KAAK,KAAK;AAAA,MACtB,OAAO;AACL,eAAO,KAAK,CAAC,KAAK,CAAC;AAAA,MACrB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,iBAAiB,aAAqB,KAAa;AACjD,UAAM,YAAY,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAC7C,UAAM,YAAY,EAAE,GAAG,KAAK,MAAM,gBAAgB;AAClD,QAAG,aAAa,KAAK,MAAM,iBAAiB;AAC1C,gBAAU,SAAS,IAAI,CAAC,KAAK,MAAM,gBAAgB,SAAS;AAAA,IAC9D,OAAO;AACL,gBAAU,SAAS,IAAI;AAAA,IACzB;AACA,SAAK,SAAS;AAAA,MACZ,iBAAiB;AAAA,IACnB,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,aAAqB,KAAa;AAC5C,UAAM,YAAY,KAAK,MAAM,gBAAgB,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG,CAAC;AACzE,WAAO,cAAc,SAAY,OAAO;AAAA,EAC1C;AAAA,EAEA,sBAAuB,WAAoC,WAAoC;AAE7F,QAAI,KAAK,UAAU,WAAW;AAC5B,aAAO;AAAA,IACT;AAIA,aAAS,iBAAiB,OAA2B;AACnD,YAAM,MAAiD;AAAA,QACrD,IAAI,MAAM;AAAA,MACZ;AAEA,UAAI,MAAM,QAAQ;AAChB,YAAI,SAAS;AAAA,UACX,YAAY,MAAM,OAAO;AAAA,QAC3B;AAAA,MACF;AACA,aAAO;AAAA,IACT;AACA,UAAM,cAAc,OAAO;AAAA,MACzB,UAAU,OAAO,IAAI,gBAAgB;AAAA,MACrC,KAAK,MAAM,OAAO,IAAI,gBAAgB;AAAA,IACxC;AAEA,aAAS,cAAc,OAAgC;AACrD,YAAM,MAAM;AAAA,QACV,GAAG;AAAA,MACL;AACA,aAAO,IAAI,QAAQ;AACnB,aAAO;AAAA,IACT;AAIA,UAAM,aAAa,OAAO;AAAA,MACxB,cAAc,KAAK,KAAK;AAAA,MACxB,cAAc,SAAS;AAAA,IACzB;AAEA,UAAM,eAAe,EAAE,eAAe;AACtC,WAAO;AAAA,EACT;AAAA,EAEA,mBAAoB,WAAoC;AACtD,QAAI,UAAU,uBAAuB,KAAK,MAAM,oBAAoB;AAClE,YAAM,mBAAmB,KAAK,gBAAgB;AAC9C,UAAI,oBAAoB,iBAAiB,MAAM;AAC7C,cAAM,SAAS,iBAAiB;AAChC,cAAM,UAAU;AAAA,UACd,MAAM,KAAK,mBAAmB;AAAA,UAC9B,WAAW;AAAA,QACb;AACA,cAAM,WAAW,IAAI,qBAAqB,aAAW;AACnD,mBAAS,UAAU,MAAM;AACzB,cAAI,QAAQ,SAAS,KAAK,QAAQ,CAAC,EAAE,oBAAoB,GAAG;AAC1D,mBAAO,eAAe;AAAA,UACxB;AAAA,QACF,GAAG,OAAO;AAEV,iBAAS,QAAQ,MAAM;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AAEP,UAAM,YAA2B,CAAC;AAClC,QAAI,MAAM;AACV,UAAM,gBAAgB,KAAK,cAAc;AACzC,kBAAc,QAAQ,YAAU;AAC9B,YAAM,cAAc,YAAY,OAAO,CAAC,EAAE,EAAE;AAC5C,UAAG,OAAO,SAAS,GAAG;AACpB,cAAM,MAAM;AAAA,UAAC;AAAA;AAAA,YACX,eAAa,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAAA,YACxC,iBAAe,OAAO,IAAI,OAAK,EAAE,GAAG,EAAE,KAAK,GAAG;AAAA,YAE9C,OAAO;AAAA,YACP,UAAU,CAAC,KAAK,YAAY,aAAa,GAAG,KAAK,QAAQ,KAAK,MAAM;AAAA,YACpE,gBAAgB,KAAK,iBAAiB,KAAK,MAAM,aAAa,GAAG;AAAA;AAAA,UAH5D,SAAS,WAAW,IAAI,GAAG;AAAA,QAIlC;AACA,kBAAU,KAAK,GAAG;AAAA,MACpB;AAEA,aAAO,QAAQ,CAAC,OAAO,eAAe;AACpC,cAAM,WAAW,wBAAwB,KAAK,MAAM,QAAQ,GAAG;AAE/D,cAAM,aAAa,KAAK,MAAM,OAAO,KAAK,WAAS;AACjD,iBACE,MAAM,UACN,MAAM,OAAO,SAAS,WACtB,MAAM,OAAO,KAAK,SAAS;AAAA,QAE/B,CAAC;AAED,cAAM,kBAAgD,CAAC;AACvD,YAAI,QAAQ,KAAK,MAAM,oBAAoB;AACzC,0BAAgB,MAAM,KAAK;AAAA,QAC7B;AAEA,cAAM,WAAW;AAAA,UAAC;AAAA;AAAA,YAChB,WAAW,WAAW;AAAA,cACpB,sCAAsC,OAAO,SAAS,KAAK,KAAK,YAAY,aAAa,QAAQ,KAAK,QAAQ,KAAK,MAAM;AAAA,cACzH,uCAAuC,cAAc,OAAO,SAAS,KAAK,OAAO,SAAS;AAAA,cAC1F,mCAAmC,CAAC,CAAC;AAAA,YACvC,CAAC;AAAA,YACD,OAAO;AAAA,YAEP,IAAI,MAAM;AAAA,YACV,SAAS,MAAM;AAAA,YACf,YAAY;AAAA,YACZ,WAAW,MAAM;AAAA,YACjB,aAAa,MAAM,UAAU,CAAC,GAAG;AAAA,YACjC,YAAY,QAAQ,KAAK,MAAM;AAAA,YAC/B,eAAe,KAAK,MAAM;AAAA,YAC1B,gBAAgB,KAAK,MAAM,gBAAgB,KAAK,IAAI;AAAA,YACpD,aAAa,KAAK,MAAM,YAAY,KAAK,IAAI;AAAA,YAC7C,yBAAyB,KAAK,MAAM,wBAAwB,KAAK,IAAI;AAAA,YACpE,GAAG;AAAA;AAAA,UAXC,MAAM;AAAA,QAYb;AACA,kBAAU,KAAK,QAAQ;AACvB,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,UAAM,IAAI,KAAK,MAAM;AAErB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAY,EAAE,aAAa;AAAA,QAC3B,KAAK,KAAK;AAAA,QAEV;AAAA;AAAA,YAAC;AAAA;AAAA,cAEC,QAAQ,KAAK,MAAM;AAAA,cACnB,SAAS,KAAK,MAAM;AAAA,cACpB,QAAQ,KAAK,MAAM,OAAO;AAAA,cAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,KAAK;AAAA,cAC/C,gBAAgB,KAAK,MAAM;AAAA;AAAA,YALtB,KAAK,MAAM,KAAK;AAAA,UAMvB;AAAA,UACA,qBAAC,YAAO,WAAU,8BAChB;AAAA,gCAAC,UAAK,WAAU,oCAAoC,YAAE,QAAQ,GAAE;AAAA,YAChE,oBAAC,UAAK,WAAU,kBAAiB;AAAA,YACjC,oBAAC,SAAI,WAAU,6BACb,8BAAC,SAAI,WAAU,wBACb;AAAA,cAAC;AAAA;AAAA,gBACC,IAAG;AAAA,gBACH,eAAY;AAAA,gBACZ,SAAS,KAAK;AAAA,gBACd,WAAU;AAAA,gBACT,eAAK,MAAM,yBAAyB,OACnC,EAAE,UAAU,IAEZ,EAAE,QAAQ;AAAA;AAAA,YAEd,GACF,GACF;AAAA,YACA,oBAAC,SAAI,WAAU,6BACb,8BAAC,SAAI,WAAU,wBACb;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS,KAAK,YAAY,KAAK,MAAM,KAAK;AAAA,gBAC1C,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACT,YAAE,WAAW;AAAA;AAAA,YAChB,GACF,GACF;AAAA,aACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAY,EAAE,aAAa;AAAA,cAE3B,8BAAC,QAAG,WAAU,iCACX,qBACH;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAQA,MAAM,qBAAqB,gBAAgB,EAAE,0BAA0B;AAEvE,MAAM,6BAA6B,kBAAkB,CAAC,UAAmC,oBAAC,sBAAoB,GAAG,OAAO,CAAE;AAM1H,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACL,GAAG,KAAK;AAAA,QACT,aAAY;AAAA,QACZ,WAAW,KAAK,MAAM,YAAY,KAAK,IAAI;AAAA,QAC3C,eAAe;AAAA,QACf,mBAAmB,MAAM;AAAA;AAAA,IAC3B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e544c04a7b56f1c8f5a1b9c28e156fb038263492"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return $t=function(){return a},a}$t();class zG extends Mn.Component{constructor(t){$t().f[1]++,$t().s[1]++;super(t);sn(this,"selectedItemRef");sn(this,"scrollContainerRef");sn(this,"toggleLayers",($t().s[6]++,()=>{$t().f[3]++;let t=($t().s[7]++,0);const r=($t().s[8]++,{});$t().s[9]++,this.groupedLayers().forEach(i=>{$t().f[4]++;const o=($t().s[10]++,My(i[0].id)),a=($t().s[11]++,[o,t].join("-"));$t().s[12]++,i.length>1?($t().b[0][0]++,$t().s[13]++,r[a]=this.state.areAllGroupsExpanded):$t().b[0][1]++,$t().s[14]++,i.forEach(s=>{$t().f[5]++,$t().s[15]++,t+=1})}),$t().s[16]++,this.setState({collapsedGroups:r,areAllGroupsExpanded:!this.state.areAllGroupsExpanded})}));$t().s[2]++,this.selectedItemRef=Mn.createRef(),$t().s[3]++,this.scrollContainerRef=Mn.createRef(),$t().s[4]++,this.state={collapsedGroups:{},areAllGroupsExpanded:!1,keys:{add:+vv()},isOpen:{add:!1}}}toggleModal(t){$t().f[2]++,$t().s[5]++,this.setState({keys:{...this.state.keys,[t]:+vv()},isOpen:{...this.state.isOpen,[t]:!this.state.isOpen[t]}})}groupedLayers(){$t().f[6]++;const t=($t().s[17]++,[]),r=($t().s[18]++,new Map);$t().s[19]++;for(let i=($t().s[20]++,0);i<this.props.layers.length;i++){const o=($t().s[21]++,this.props.layers[i]),a=($t().s[22]++,this.props.layers[i-1]);$t().s[23]++,r.set(o.id,r.has(o.id)?($t().b[1][0]++,r.get(o.id)+1):($t().b[1][1]++,0));const s=($t().s[24]++,{...o,key:`layers-list-${o.id}-${r.get(o.id)}`});if($t().s[25]++,$t().b[3][0]++,a&&($t().b[3][1]++,My(a.id)==My(s.id))){$t().b[2][0]++;const d=($t().s[26]++,t[t.length-1]);$t().s[27]++,d.push(s)}else $t().b[2][1]++,$t().s[28]++,t.push([s])}return $t().s[29]++,t}toggleLayerGroup(t,r){$t().f[7]++;const i=($t().s[30]++,[t,r].join("-")),o=($t().s[31]++,{...this.state.collapsedGroups});$t().s[32]++,i in this.state.collapsedGroups?($t().b[4][0]++,$t().s[33]++,o[i]=!this.state.collapsedGroups[i]):($t().b[4][1]++,$t().s[34]++,o[i]=!1),$t().s[35]++,this.setState({collapsedGroups:o})}isCollapsed(t,r){$t().f[8]++;const i=($t().s[36]++,this.state.collapsedGroups[[t,r].join("-")]);return $t().s[37]++,i===void 0?($t().b[5][0]++,!0):($t().b[5][1]++,i)}shouldComponentUpdate(t,r){if($t().f[9]++,$t().s[38]++,this.state!==r)return $t().b[6][0]++,$t().s[39]++,!0;$t().b[6][1]++;function i(f){$t().f[10]++;const C=($t().s[40]++,{id:f.id});return $t().s[41]++,f.layout?($t().b[7][0]++,$t().s[42]++,C.layout={visibility:f.layout.visibility}):$t().b[7][1]++,$t().s[43]++,C}const o=($t().s[44]++,q6.isEqual(t.layers.map(i),this.props.layers.map(i)));function a(f){$t().f[11]++;const C=($t().s[45]++,{...f});return $t().s[46]++,delete C.layers,$t().s[47]++,C}const s=($t().s[48]++,q6.isEqual(a(this.props),a(t))),d=($t().s[49]++,$t().b[8][0]++,!(o&&($t().b[8][1]++,s)));return $t().s[50]++,d}componentDidUpdate(t){if($t().f[12]++,$t().s[51]++,t.selectedLayerIndex!==this.props.selectedLayerIndex){$t().b[9][0]++;const r=($t().s[52]++,this.selectedItemRef.current);if($t().s[53]++,$t().b[11][0]++,r&&($t().b[11][1]++,r.node)){$t().b[10][0]++;const i=($t().s[54]++,r.node),o=($t().s[55]++,{root:this.scrollContainerRef.current,threshold:1}),a=($t().s[56]++,new IntersectionObserver(s=>{$t().f[13]++,$t().s[57]++,a.unobserve(i),$t().s[58]++,$t().b[13][0]++,s.length>0&&($t().b[13][1]++,s[0].intersectionRatio<1)?($t().b[12][0]++,$t().s[59]++,i.scrollIntoView()):$t().b[12][1]++},o));$t().s[60]++,a.observe(i)}else $t().b[10][1]++}else $t().b[9][1]++}render(){$t().f[14]++;const t=($t().s[61]++,[]);let r=($t().s[62]++,0);const i=($t().s[63]++,this.groupedLayers());$t().s[64]++,i.forEach(a=>{$t().f[15]++;const s=($t().s[65]++,My(a[0].id));if($t().s[66]++,a.length>1){$t().b[14][0]++;const d=($t().s[67]++,G.jsx(jpe,{"data-wd-key":[s,r].join("-"),"aria-controls":a.map(f=>($t().f[16]++,$t().s[68]++,f.key)).join(" "),title:s,isActive:($t().b[15][0]++,!this.isCollapsed(s,r)||($t().b[15][1]++,r===this.props.selectedLayerIndex)),onActiveToggle:this.toggleLayerGroup.bind(this,s,r)},`group-${s}-${r}`));$t().s[69]++,t.push(d)}else $t().b[14][1]++;$t().s[70]++,a.forEach((d,f)=>{var D;$t().f[17]++;const C=($t().s[71]++,k1e(this.props.layers,r)),O=($t().s[72]++,this.props.errors.find($=>($t().f[18]++,$t().s[73]++,$t().b[16][0]++,$.parsed&&($t().b[16][1]++,$.parsed.type==="layer")&&($t().b[16][2]++,$.parsed.data.index==r)))),E=($t().s[74]++,{});$t().s[75]++,r===this.props.selectedLayerIndex?($t().b[17][0]++,$t().s[76]++,E.ref=this.selectedItemRef):$t().b[17][1]++;const P=($t().s[77]++,G.jsx(vme,{className:Qf({"maputnik-layer-list-item-collapsed":($t().b[18][0]++,a.length>1&&($t().b[18][1]++,this.isCollapsed(s,C))&&($t().b[18][2]++,r!==this.props.selectedLayerIndex)),"maputnik-layer-list-item-group-last":($t().b[19][0]++,f==a.length-1&&($t().b[19][1]++,a.length>1)),"maputnik-layer-list-item--error":!!O}),index:r,id:d.key,layerId:d.id,layerIndex:r,layerType:d.type,visibility:($t().b[20][0]++,d.layout||($t().b[20][1]++,{})).visibility,isSelected:r===this.props.selectedLayerIndex,onLayerSelect:this.props.onLayerSelect,onLayerDestroy:(D=this.props.onLayerDestroy)==null?void 0:D.bind(this),onLayerCopy:this.props.onLayerCopy.bind(this),onLayerVisibilityToggle:this.props.onLayerVisibilityToggle.bind(this),...E},d.key));$t().s[78]++,t.push(P),$t().s[79]++,r+=1})});const o=($t().s[80]++,this.props.t);return $t().s[81]++,G.jsxs("section",{className:"maputnik-layer-list",role:"complementary","aria-label":o("Layers list"),ref:this.scrollContainerRef,children:[G.jsx(O1e,{layers:this.props.layers,sources:this.props.sources,isOpen:this.state.isOpen.add,onOpenToggle:this.toggleModal.bind(this,"add"),onLayersChange:this.props.onLayersChange},this.state.keys.add),G.jsxs("header",{className:"maputnik-layer-list-header",children:[G.jsx("span",{className:"maputnik-layer-list-header-title",children:o("Layers")}),G.jsx("span",{className:"maputnik-space"}),G.jsx("div",{className:"maputnik-default-property",children:G.jsx("div",{className:"maputnik-multibutton",children:G.jsx("button",{id:"skip-target-layer-list","data-wd-key":"skip-target-layer-list",onClick:this.toggleLayers,className:"maputnik-button",children:this.state.areAllGroupsExpanded===!0?($t().b[21][0]++,o("Collapse")):($t().b[21][1]++,o("Expand"))})})}),G.jsx("div",{className:"maputnik-default-property",children:G.jsx("div",{className:"maputnik-multibutton",children:G.jsx("button",{onClick:this.toggleModal.bind(this,"add"),"data-wd-key":"layer-list:add-layer",className:"maputnik-button maputnik-button-selected",children:o("Add Layer")})})})]}),G.jsx("div",{role:"navigation","aria-label":o("Layers list"),children:G.jsx("ul",{className:"maputnik-layer-list-container",children:t})})]})}}sn(zG,"defaultProps",($t().s[0]++,{onLayerSelect:()=>{$t().f[0]++}}));const T1e=($t().s[82]++,No()(zG)),K1e=($t().s[83]++,pme(n=>($t().f[19]++,$t().s[84]++,G.jsx(T1e,{...n}))));class P1e extends Mn.Component{render(){return $t().f[20]++,$t().s[85]++,G.jsx(K1e,{...this.props,helperClass:"sortableHelper",onSortEnd:this.props.onMoveLayer.bind(this),useDragHandle:!0,shouldCancelStart:()=>($t().f[21]++,$t().s[86]++,!1)})}}var Rw={},jG="a menu outside a mounted Wrapper with an id, or a menu that does not exist";function D1e(n,e){Rw[n]=e}function L1e(n){delete Rw[n]}function F1e(n,e){var t=Rw[n];if(!t)throw new Error("Cannot open "+jG);t.openMenu(e)}function U1e(n,e){var t=Rw[n];if(!t)throw new Error("Cannot close "+jG);t.closeMenu(e)}var NG={registerManager:D1e,unregisterManager:L1e,openMenu:F1e,closeMenu:U1e};function Fs(n){n=n||{};var e=n.keybindings||{};this._settings={keybindings:{next:e.next||{keyCode:40},prev:e.prev||{keyCode:38},first:e.first,last:e.last},wrap:n.wrap,stringSearch:n.stringSearch,stringSearchDelay:800},this._keybindingsLookup=[];var t,r;for(t in this._settings.keybindings)r=this._settings.keybindings[t],r&&[].concat(r).forEach((function(i){i.metaKey=i.metaKey||!1,i.ctrlKey=i.ctrlKey||!1,i.altKey=i.altKey||!1,i.shiftKey=i.shiftKey||!1,this._keybindingsLookup.push({action:t,eventMatcher:i})}).bind(this));this._searchString="",this._members=[],n.members&&this.setMembers(n.members),this._boundHandleKeydownEvent=this._handleKeydownEvent.bind(this)}Fs.prototype.activate=function(){return document.addEventListener("keydown",this._boundHandleKeydownEvent,!0),this};Fs.prototype.deactivate=function(){return document.removeEventListener("keydown",this._boundHandleKeydownEvent,!0),this._clearSearchStringRefreshTimer(),this};Fs.prototype._handleKeydownEvent=function(n){var e=this._getActiveElementIndex();if(e!==-1){var t=!1;this._keybindingsLookup.forEach((function(r){if(R1e(r.eventMatcher,n))switch(t=!0,n.preventDefault(),r.action){case"next":this.moveFocusForward();break;case"prev":this.moveFocusBack();break;case"first":this.moveFocusToFirst();break;case"last":this.moveFocusToLast();break;default:return}}).bind(this)),t||this._handleUnboundKey(n)}};Fs.prototype.moveFocusForward=function(){var n=this._getActiveElementIndex(),e;return n<this._members.length-1?e=n+1:this._settings.wrap?e=0:e=n,this.focusNodeAtIndex(e),e};Fs.prototype.moveFocusBack=function(){var n=this._getActiveElementIndex(),e;return n>0?e=n-1:this._settings.wrap?e=this._members.length-1:e=n,this.focusNodeAtIndex(e),e};Fs.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)};Fs.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)};Fs.prototype._handleUnboundKey=function(n){if(this._settings.stringSearch){if(this._searchString!==""&&(n.key===" "||n.keyCode===32))return n.preventDefault(),-1;if(!z1e(n.keyCode)||n.ctrlKey||n.metaKey||n.altKey)return-1;n.preventDefault(),this._addToSearchString(String.fromCharCode(n.keyCode)),this._runStringSearch()}};Fs.prototype._clearSearchString=function(){this._searchString=""};Fs.prototype._addToSearchString=function(n){this._searchString+=n.toLowerCase()};Fs.prototype._startSearchStringRefreshTimer=function(){var n=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout(function(){n._clearSearchString()},this._settings.stringSearchDelay)};Fs.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)};Fs.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)};Fs.prototype.moveFocusByString=function(n){for(var e,t=0,r=this._members.length;t<r;t++)if(e=this._members[t],!!e.text&&e.text.indexOf(n)===0)return WG(e.node)};Fs.prototype._findIndexOfNode=function(n){for(var e=0,t=this._members.length;e<t;e++)if(this._members[e].node===n)return e;return-1};Fs.prototype._getActiveElementIndex=function(){return this._findIndexOfNode(document.activeElement)};Fs.prototype.focusNodeAtIndex=function(n){var e=this._members[n];return e&&WG(e.node),this};Fs.prototype.addMember=function(n,e){var t=n.node||n,r=n.text||t.getAttribute("data-focus-group-text")||t.textContent||"";this._checkNode(t);var i=r.replace(/[\W_]/g,"").toLowerCase(),o={node:t,text:i};return e!=null?this._members.splice(e,0,o):this._members.push(o),this};Fs.prototype.removeMember=function(n){var e=typeof n=="number"?n:this._findIndexOfNode(n);if(e!==-1)return this._members.splice(e,1),this};Fs.prototype.clearMembers=function(){return this._members=[],this};Fs.prototype.setMembers=function(n){this.clearMembers();for(var e=0,t=n.length;e<t;e++)this.addMember(n[e]);return this};Fs.prototype.getMembers=function(){return this._members};Fs.prototype._checkNode=function(n){if(!n.nodeType||n.nodeType!==window.Node.ELEMENT_NODE)throw new Error("focus-group: only DOM nodes allowed");return n};function R1e(n,e){for(var t in n)if(e[t]!==void 0&&n[t]!==e[t])return!1;return!0}function z1e(n){return n>=65&&n<=90}function WG(n){!n||!n.focus||(n.focus(),n.tagName.toLowerCase()==="input"&&n.select())}var j1e=function(e){return new Fs(e)},N1e=j1e,zP=NG,W1e={wrap:!0,stringSearch:!0},G1e={init:function(e){this.updateOptions(e),this.handleBlur=$1e.bind(this),this.handleSelection=Q1e.bind(this),this.handleMenuKey=Y1e.bind(this),this.focusGroup=N1e(W1e),this.button=null,this.menu=null,this.isOpen=!1},updateOptions:function(e){var t=this.options;this.options=e||this.options||{},typeof this.options.closeOnSelection>"u"&&(this.options.closeOnSelection=!0),typeof this.options.closeOnBlur>"u"&&(this.options.closeOnBlur=!0),this.options.id&&zP.registerManager(this.options.id,this),t&&t.id&&t.id!==this.options.id&&zP.unregisterManager(this.options.id,this)},focusItem:function(e){this.focusGroup.focusNodeAtIndex(e)},addItem:function(e){this.focusGroup.addMember(e)},clearItems:function(){this.focusGroup.clearMembers()},handleButtonNonArrowKey:function(e){this.focusGroup._handleUnboundKey(e)},destroy:function(){this.button=null,this.menu=null,this.focusGroup.deactivate(),clearTimeout(this.blurTimer),clearTimeout(this.moveFocusTimer)},update:function(){this.menu.setState({isOpen:this.isOpen}),this.button.setState({menuOpen:this.isOpen}),this.options.onMenuToggle&&this.options.onMenuToggle({isOpen:this.isOpen})},openMenu:function(e){if(!this.isOpen&&(e=e||{},e.focusMenu===void 0&&(e.focusMenu=!0),this.isOpen=!0,this.update(),this.focusGroup.activate(),e.focusMenu)){var t=this;this.moveFocusTimer=setTimeout(function(){t.focusItem(0)},0)}},closeMenu:function(e){this.isOpen&&(e=e||{},this.isOpen=!1,this.update(),e.focusButton&&this.button.ref.current.focus())},toggleMenu:function(e,t){e=e||{},t=t||{},this.isOpen?this.closeMenu(e):this.openMenu(t)}};function $1e(){var n=this;n.blurTimer=setTimeout(function(){if(n.button){var e=n.button.ref.current;if(e){var t=e.ownerDocument.activeElement;if(!(e&&t===e)){var r=n.menu.ref.current;if(r===t){n.focusItem(0);return}r&&r.contains(t)||n.isOpen&&n.closeMenu({focusButton:!1})}}}},0)}function Q1e(n,e){this.options.closeOnSelection&&this.closeMenu({focusButton:!0}),this.options.onSelection&&this.options.onSelection(n,e)}function Y1e(n){if(this.isOpen)switch(n.key){case"Escape":n.preventDefault(),this.closeMenu({focusButton:!0});break;case"Home":n.preventDefault(),this.focusGroup.moveFocusToFirst();break;case"End":n.preventDefault(),this.focusGroup.moveFocusToLast();break}}var q1e=function(n){var e=Object.create(G1e);return e.init(n),e},V1e=Wn,H1e=V1e.createContext(),zw=H1e,Y2=Lh,jw={refType:Y2.oneOfType([Y2.func,Y2.shape({current:Y2.elementType})])},Nw=function(n,e,t){t=t||{};for(var r in e)e.hasOwnProperty(r)&&(t[r]||(n[r]=e[r]))};function Z1e(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function X1e(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function J1e(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var O_=Wn,jg=Lh,ege=q1e,tge=zw,nge=jw,rge=nge.refType,gB=Nw,u5={children:jg.node.isRequired,forwardedRef:rge,onMenuToggle:jg.func,onSelection:jg.func,closeOnSelection:jg.bool,closeOnBlur:jg.bool,tag:jg.string},jP=function(e){return{onMenuToggle:e.onMenuToggle,onSelection:e.onSelection,closeOnSelection:e.closeOnSelection,closeOnBlur:e.closeOnBlur,id:e.id}},LI=function(n){J1e(e,n);function e(t){Z1e(this,e);var r=X1e(this,n.call(this,t));return r.manager=ege(jP(t)),r}return e.prototype.componentDidUpdate=function(){this.manager.updateOptions(jP(this.props))},e.prototype.render=function(){var r={};return gB(r,this.props,u5),O_.createElement(tge.Provider,{value:this.manager},O_.createElement(this.props.tag,r,this.props.children))},e}(O_.Component);LI.propTypes=u5;LI.defaultProps={tag:"div"};var ige=O_.forwardRef(function(n,e){var t={forwardedRef:e};return gB(t,n,{children:u5.children,forwardedRef:u5.forwardedRef}),gB(t,{forwardedRef:e}),O_.createElement(LI,t,n.children)});function oge(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function NP(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function age(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var Yy=Wn,q2=Lh,sge=zw,lge=jw,uge=lge.refType,B3=Nw,B_={ambManager:q2.object.isRequired,children:q2.node.isRequired,disabled:q2.bool,forwardedRef:uge,tag:q2.string},Age=function(){return["button","fieldset","input","optgroup","option","select","textarea"]},FI=function(n){age(e,n);function e(){var t,r,i;oge(this,e);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=(t=(r=NP(this,n.call.apply(n,[this].concat(a))),r),r.ref=Yy.createRef(),r.handleKeyDown=function(d){if(!r.props.disabled){var f=r.props.ambManager;switch(d.key){case"ArrowDown":d.preventDefault(),f.isOpen?f.focusItem(0):f.openMenu();break;case"Enter":case" ":d.preventDefault(),f.toggleMenu();break;case"Escape":f.handleMenuKey(d);break;default:f.handleButtonNonArrowKey(d)}}},r.handleClick=function(){r.props.disabled||r.props.ambManager.toggleMenu({},{focusMenu:!1})},r.setRef=function(d){r.ref.current=d,typeof r.props.forwardedRef=="function"?r.props.forwardedRef(d):r.props.forwardedRef&&(r.props.forwardedRef.current=d)},t),NP(r,i)}return e.prototype.componentDidMount=function(){this.props.ambManager.button=this},e.prototype.componentWillUnmount=function(){this.props.ambManager.destroy()},e.prototype.render=function(){var r=this.props,i=this.props.ambManager,o={role:"button",tabIndex:r.disabled?"":"0","aria-haspopup":!0,"aria-expanded":i.isOpen,"aria-disabled":r.disabled,onKeyDown:this.handleKeyDown,onClick:this.handleClick},a={};return B3(a,B_),Age().indexOf(r.tag)>=0&&delete a.disabled,i.options.closeOnBlur&&(o.onBlur=i.handleBlur),B3(o,r,a),B3(o,{ref:this.setRef}),Yy.createElement(r.tag,o,r.children)},e}(Yy.Component);FI.propTypes=B_;FI.defaultProps={tag:"span"};var cge=Yy.forwardRef(function(n,e){return Yy.createElement(sge.Consumer,null,function(t){var r={ambManager:t,forwardedRef:e};return B3(r,n,{ambManager:B_.ambManager,children:B_.children,forwardedRef:B_.forwardedRef}),Yy.createElement(FI,r,n.children)})}),dge=function(e,t,r){var i=0,o=0,a=!1,s=!1,d=!1;e.addEventListener("click",f,r),e.addEventListener("touchstart",C,r);function f(H){d||t(H)}function C(H){d=!0,!a&&(a=!0,e.addEventListener("touchmove",O,r),e.addEventListener("touchend",E,r),e.addEventListener("touchcancel",P,r),s=!1,i=H.touches[0].clientX,o=H.touches[0].clientY)}function O(H){s||Math.abs(H.touches[0].clientX-i)<=10&&Math.abs(H.touches[0].clientY-o)<=10||(s=!0)}function E(H){a=!1,D(),s||t(H)}function P(){a=!1,s=!1,i=0,o=0}function D(){e.removeEventListener("touchmove",O,r),e.removeEventListener("touchend",E,r),e.removeEventListener("touchcancel",P,r)}function $(){e.removeEventListener("click",f,r),e.removeEventListener("touchstart",C,r),D()}return{remove:$}};function hge(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function WP(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function fge(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var qy=Wn,RC=Lh,pge=dge,mge=zw,gge=jw,yge=gge.refType,yB=Nw,I_={ambManager:RC.object.isRequired,children:RC.oneOfType([RC.func,RC.node]).isRequired,forwardedRef:yge,tag:RC.string},UI=function(n){fge(e,n);function e(){var t,r,i;hge(this,e);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=(t=(r=WP(this,n.call.apply(n,[this].concat(a))),r),r.ref=qy.createRef(),r.addTapListener=function(){var d=r.ref.current;if(d){var f=d.ownerDocument;f&&(r.tapListener=pge(f.documentElement,r.handleTap))}},r.handleTap=function(d){r.ref.current.contains(d.target)||r.props.ambManager.button.ref.current.contains(d.target)||r.props.ambManager.closeMenu()},r.setRef=function(d){r.ref.current=d,typeof r.props.forwardedRef=="function"?r.props.forwardedRef(d):r.props.forwardedRef&&(r.props.forwardedRef.current=d)},t),WP(r,i)}return e.prototype.componentDidMount=function(){this.props.ambManager.menu=this},e.prototype.componentDidUpdate=function(){var r=this.props.ambManager;r.options.closeOnBlur&&(r.isOpen&&!this.tapListener?this.addTapListener():!r.isOpen&&this.tapListener&&(this.tapListener.remove(),delete this.tapListener),r.isOpen||r.clearItems())},e.prototype.componentWillUnmount=function(){this.tapListener&&this.tapListener.remove(),this.props.ambManager.destroy()},e.prototype.render=function(){var r=this.props,i=this.props.ambManager,o=function(){return typeof r.children=="function"?r.children({isOpen:i.isOpen}):i.isOpen?r.children:!1}();if(!o)return!1;var a={onKeyDown:i.handleMenuKey,role:"menu",tabIndex:-1};return i.options.closeOnBlur&&(a.onBlur=i.handleBlur),yB(a,r,I_),yB(a,{ref:this.setRef}),qy.createElement(r.tag,a,o)},e}(qy.Component);UI.propTypes=I_;UI.defaultProps={tag:"div"};var vge=qy.forwardRef(function(n,e){return qy.createElement(mge.Consumer,null,function(t){var r={ambManager:t,forwardedRef:e};return yB(r,n,{ambManager:I_.ambManager,children:I_.children,forwardedRef:I_.forwardedRef}),qy.createElement(UI,r,n.children)})});function Cge(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function GP(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function _ge(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var Vy=Wn,zC=Lh,bge=zw,xge=jw,wge=xge.refType,GG=Nw,k_={ambManager:zC.object.isRequired,children:zC.node.isRequired,forwardedRef:wge,tag:zC.string,text:zC.string,value:zC.any},RI=function(n){_ge(e,n);function e(){var t,r,i;Cge(this,e);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=(t=(r=GP(this,n.call.apply(n,[this].concat(a))),r),r.ref=Vy.createRef(),r.handleKeyDown=function(d){d.key!=="Enter"&&d.key!==" "||r.props.tag==="a"&&r.props.href||(d.preventDefault(),r.selectItem(d))},r.selectItem=function(d){var f=typeof r.props.value<"u"?r.props.value:r.props.children;r.props.ambManager.handleSelection(f,d)},r.setRef=function(d){r.ref.current=d,typeof r.props.forwardedRef=="function"?r.props.forwardedRef(d):r.props.forwardedRef&&(r.props.forwardedRef.current=d)},t),GP(r,i)}return e.prototype.componentDidMount=function(){this.props.ambManager.addItem({node:this.ref.current,text:this.props.text})},e.prototype.render=function(){var r={onClick:this.selectItem,onKeyDown:this.handleKeyDown,role:"menuitem",tabIndex:"-1",ref:this.setRef};return GG(r,this.props,k_),Vy.createElement(this.props.tag,r,this.props.children)},e}(Vy.Component);RI.propTypes=k_;RI.defaultProps={tag:"div"};var Mge=Vy.forwardRef(function(n,e){return Vy.createElement(bge.Consumer,null,function(t){var r={ambManager:t,forwardedRef:e};return GG(r,n,{ambManager:k_.ambManager,children:k_.children,forwardedRef:k_.forwardedRef}),Vy.createElement(RI,r,n.children)})}),$P=NG,V2={Wrapper:ige,Button:cge,Menu:vge,MenuItem:Mge,openMenu:$P.openMenu,closeMenu:$P.closeMenu};function QP(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function vB(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?QP(Object(t),!0).forEach(function(r){vs(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):QP(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Ww(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function YP(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function Gw(n,e,t){return e&&YP(n.prototype,e),t&&YP(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function vs(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yf(){return Yf=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Yf.apply(this,arguments)}function zI(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&CB(n,e)}function A5(n){return A5=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A5(n)}function CB(n,e){return CB=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},CB(n,e)}function Sge(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ege(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function $w(n,e){if(n==null)return{};var t=Ege(n,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function Bh(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Oge(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bh(n)}function jI(n){var e=Sge();return function(){var r=A5(n),i;if(e){var o=A5(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Oge(this,i)}}function Bge(n,e){return Tge(n)||Pge(n,e)||$G(n,e)||Lge()}function Ige(n){return kge(n)||Kge(n)||$G(n)||Dge()}function kge(n){if(Array.isArray(n))return _B(n)}function Tge(n){if(Array.isArray(n))return n}function Kge(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Pge(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r=[],i=!0,o=!1,a,s;try{for(t=t.call(n);!(i=(a=t.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(d){o=!0,s=d}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return r}}function $G(n,e){if(n){if(typeof n=="string")return _B(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _B(n,e)}}function _B(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function Dge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Fge=Gw(function n(e){var t=this,r=e.expanded,i=r===void 0?[]:r,o=e.allowMultipleExpanded,a=o===void 0?!1:o,s=e.allowZeroExpanded,d=s===void 0?!1:s;Ww(this,n),vs(this,"expanded",void 0),vs(this,"allowMultipleExpanded",void 0),vs(this,"allowZeroExpanded",void 0),vs(this,"toggleExpanded",function(f){if(t.isItemDisabled(f))return t;var C=t.isItemExpanded(f);return C?t.augment({expanded:t.expanded.filter(function(O){return O!==f})}):t.augment({expanded:t.allowMultipleExpanded?[].concat(Ige(t.expanded),[f]):[f]})}),vs(this,"isItemDisabled",function(f){var C=t.isItemExpanded(f),O=t.expanded.length===1;return!!(C&&!t.allowZeroExpanded&&O)}),vs(this,"isItemExpanded",function(f){return t.expanded.indexOf(f)!==-1}),vs(this,"getPanelAttributes",function(f,C){var O=C??t.isItemExpanded(f);return{role:t.allowMultipleExpanded?void 0:"region","aria-hidden":t.allowMultipleExpanded?!O:void 0,"aria-labelledby":t.getButtonId(f),id:t.getPanelId(f),hidden:O?void 0:!0}}),vs(this,"getHeadingAttributes",function(){return{role:"heading"}}),vs(this,"getButtonAttributes",function(f,C){var O=C??t.isItemExpanded(f),E=t.isItemDisabled(f);return{id:t.getButtonId(f),"aria-disabled":E,"aria-expanded":O,"aria-controls":t.getPanelId(f),role:"button",tabIndex:0}}),vs(this,"getPanelId",function(f){return"accordion__panel-".concat(f)}),vs(this,"getButtonId",function(f){return"accordion__heading-".concat(f)}),vs(this,"augment",function(f){return new n(vB({expanded:t.expanded,allowMultipleExpanded:t.allowMultipleExpanded,allowZeroExpanded:t.allowZeroExpanded},f))}),this.expanded=i,this.allowMultipleExpanded=a,this.allowZeroExpanded=d}),QG=Wn.createContext(null),YG=function(n){zI(t,n);var e=jI(t);function t(){var r;Ww(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o)),vs(Bh(r),"state",new Fge({expanded:r.props.preExpanded,allowMultipleExpanded:r.props.allowMultipleExpanded,allowZeroExpanded:r.props.allowZeroExpanded})),vs(Bh(r),"toggleExpanded",function(s){r.setState(function(d){return d.toggleExpanded(s)},function(){r.props.onChange&&r.props.onChange(r.state.expanded)})}),vs(Bh(r),"isItemDisabled",function(s){return r.state.isItemDisabled(s)}),vs(Bh(r),"isItemExpanded",function(s){return r.state.isItemExpanded(s)}),vs(Bh(r),"getPanelAttributes",function(s,d){return r.state.getPanelAttributes(s,d)}),vs(Bh(r),"getHeadingAttributes",function(){return r.state.getHeadingAttributes()}),vs(Bh(r),"getButtonAttributes",function(s,d){return r.state.getButtonAttributes(s,d)}),r}return Gw(t,[{key:"render",value:function(){var i=this.state,o=i.allowZeroExpanded,a=i.allowMultipleExpanded;return Wn.createElement(QG.Provider,{value:{allowMultipleExpanded:a,allowZeroExpanded:o,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),t}(Wn.PureComponent);vs(YG,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var qG=function(n){zI(t,n);var e=jI(t);function t(){var r;Ww(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o)),vs(Bh(r),"renderChildren",function(s){return s?r.props.children(s):null}),r}return Gw(t,[{key:"render",value:function(){return Wn.createElement(QG.Consumer,null,this.renderChildren)}}]),t}(Wn.PureComponent),Uge=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],Rge=function(e){var t=e.className,r=t===void 0?"accordion":t,i=e.allowMultipleExpanded,o=e.allowZeroExpanded,a=e.onChange,s=e.preExpanded,d=$w(e,Uge);return Wn.createElement(YG,{preExpanded:s,allowMultipleExpanded:i,allowZeroExpanded:o,onChange:a},Wn.createElement("div",Yf({"data-accordion-component":"Accordion",className:r},d)))},bB;(function(n){n.Accordion="Accordion",n.AccordionItem="AccordionItem",n.AccordionItemButton="AccordionItemButton",n.AccordionItemHeading="AccordionItemHeading",n.AccordionItemPanel="AccordionItemPanel"})(bB||(bB={}));var VG=bB,bE=0;function zge(){var n=bE;return bE=bE+1,"raa-".concat(n)}var jge=Wn.useId||zge,Nge=/[\u0009\u000a\u000c\u000d\u0020]/g;function wb(n){return n===""||Nge.test(n)?(console.error('uuid must be a valid HTML5 id but was given "'.concat(n,'", ASCII whitespaces are forbidden')),!1):!0}var HG=Wn.createContext(null),Wge=function(e){var t=e.children,r=e.uuid,i=e.accordionContext,o=e.dangerouslySetExpanded,a=function(){i.toggleExpanded(r)},s=function(f){var C=o??f.isItemExpanded(r),O=f.isItemDisabled(r),E=f.getPanelAttributes(r,o),P=f.getHeadingAttributes(r),D=f.getButtonAttributes(r,o);return Wn.createElement(HG.Provider,{value:{uuid:r,expanded:C,disabled:O,toggleExpanded:a,panelAttributes:E,headingAttributes:P,buttonAttributes:D}},t)};return Wn.createElement(qG,null,s)},Gge=function(e){return Wn.createElement(qG,null,function(t){return Wn.createElement(Wge,Yf({},e,{accordionContext:t}))})},Qw=function(e){var t=e.children,r=function(o){return o?t(o):null};return Wn.createElement(HG.Consumer,null,r)},$ge=["uuid","dangerouslySetExpanded","className","activeClassName"],ZG=function(e){var t=e.uuid,r=e.dangerouslySetExpanded,i=e.className,o=i===void 0?"accordion__item":i,a=e.activeClassName,s=$w(e,$ge),d=Wn.useState(jge()),f=Bge(d,1),C=f[0],O=t??C,E=function(D){var $=D.expanded,H=$&&a?a:o;return Wn.createElement("div",Yf({"data-accordion-component":"AccordionItem",className:H},s))};return wb(O.toString()),s.id&&wb(s.id),Wn.createElement(Gge,{uuid:O,dangerouslySetExpanded:r},Wn.createElement(Qw,null,E))};ZG.displayName=VG.AccordionItem;function XG(n){return n&&(n.matches('[data-accordion-component="Accordion"]')?n:XG(n.parentElement))}function Yw(n){var e=XG(n);return e&&Array.from(e.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}function Qge(n){var e=Yw(n)||[],t=e[0];t&&t.focus()}function Yge(n){var e=Yw(n)||[],t=e[e.length-1];t&&t.focus()}function qge(n){var e=Yw(n)||[],t=e.indexOf(n);if(t!==-1){var r=e[t+1];r&&r.focus()}}function Vge(n){var e=Yw(n)||[],t=e.indexOf(n);if(t!==-1){var r=e[t-1];r&&r.focus()}}var Sp={END:"End",ENTER:"Enter",HOME:"Home",SPACE:" ",SPACE_DEPRECATED:"Spacebar",UP:"ArrowUp",DOWN:"ArrowDown",LEFT:"ArrowLeft",RIGHT:"ArrowRight"},Hge=["toggleExpanded","className"],Zge=function(e){var t=e.toggleExpanded,r=e.className,i=r===void 0?"accordion__button":r,o=$w(e,Hge),a=function(d){var f=d.key;if((f===Sp.ENTER||f===Sp.SPACE||f===Sp.SPACE_DEPRECATED)&&(d.preventDefault(),t()),d.target instanceof HTMLElement)switch(f){case Sp.HOME:{d.preventDefault(),Qge(d.target);break}case Sp.END:{d.preventDefault(),Yge(d.target);break}case Sp.LEFT:case Sp.UP:{d.preventDefault(),Vge(d.target);break}case Sp.RIGHT:case Sp.DOWN:{d.preventDefault(),qge(d.target);break}}};return o.id&&wb(o.id),Wn.createElement("div",Yf({className:i},o,{role:"button",tabIndex:0,onClick:t,onKeyDown:a,"data-accordion-component":"AccordionItemButton"}))},Xge=function(e){return Wn.createElement(Qw,null,function(t){var r=t.toggleExpanded,i=t.buttonAttributes;return Wn.createElement(Zge,Yf({toggleExpanded:r},e,i))})},Jge={className:"accordion__heading","aria-level":3},eye=`AccordionItemButton may contain only one child element, which must be an instance of AccordionItemButton.

From the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):

“The button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.”

`,JG=function(n){zI(t,n);var e=jI(t);function t(){var r;Ww(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o)),vs(Bh(r),"ref",void 0),vs(Bh(r),"setRef",function(s){r.ref=s}),r}return Gw(t,[{key:"componentDidUpdate",value:function(){t.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){t.VALIDATE(this.ref)}},{key:"render",value:function(){return Wn.createElement("div",Yf({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(i){if(i===void 0)throw new Error("ref is undefined");if(!(i.childElementCount===1&&i.firstElementChild&&i.firstElementChild.getAttribute("data-accordion-component")==="AccordionItemButton"))throw new Error(eye)}}]),t}(Wn.PureComponent);vs(JG,"defaultProps",Jge);var e$=function(e){return Wn.createElement(Qw,null,function(t){var r=t.headingAttributes;return e.id&&wb(e.id),Wn.createElement(JG,Yf({},e,r))})};e$.displayName=VG.AccordionItemHeading;var tye=["className","region","id"],nye=function(e){var t=e.className,r=t===void 0?"accordion__panel":t,i=e.region,o=e.id,a=$w(e,tye),s=function(f){var C=f.panelAttributes;o&&wb(o);var O=vB(vB({},C),{},{"aria-labelledby":i?C["aria-labelledby"]:void 0});return Wn.createElement("div",Yf({"data-accordion-component":"AccordionItemPanel",className:r},a,O,{role:i?"region":void 0}))};return Wn.createElement(Qw,null,s)},xE={exports:{}},qP;function qw(){return qP||(qP=1,function(n,e){(function(t,r){n.exports=r()})(Vf,function(){var t=navigator.userAgent,r=navigator.platform,i=/gecko\/\d/i.test(t),o=/MSIE \d/.test(t),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),s=/Edge\/(\d+)/.exec(t),d=o||a||s,f=d&&(o?document.documentMode||6:+(s||a)[1]),C=!s&&/WebKit\//.test(t),O=C&&/Qt\/\d+\.\d+/.test(t),E=!s&&/Chrome\/(\d+)/.exec(t),P=E&&+E[1],D=/Opera\//.test(t),$=/Apple Computer/.test(navigator.vendor),H=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),Q=/PhantomJS/.test(t),N=$&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),Z=/Android/.test(t),ae=N||Z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),pe=N||/Mac/.test(r),fe=/\bCrOS\b/.test(t),X=/win/i.test(r),oe=D&&t.match(/Version\/(\d*\.\d*)/);oe&&(oe=Number(oe[1])),oe&&oe>=15&&(D=!1,C=!0);var Ce=pe&&(O||D&&(oe==null||oe<12.11)),we=i||d&&f>=9;function Te(A){return new RegExp("(^|\\s)"+A+"(?:$|\\s)\\s*")}var Pe=function(A,p){var x=A.className,b=Te(p).exec(x);if(b){var B=x.slice(b.index+b[0].length);A.className=x.slice(0,b.index)+(B?b[1]+B:"")}};function he(A){for(var p=A.childNodes.length;p>0;--p)A.removeChild(A.firstChild);return A}function $e(A,p){return he(A).appendChild(p)}function ye(A,p,x,b){var B=document.createElement(A);if(x&&(B.className=x),b&&(B.style.cssText=b),typeof p=="string")B.appendChild(document.createTextNode(p));else if(p)for(var U=0;U<p.length;++U)B.appendChild(p[U]);return B}function gt(A,p,x,b){var B=ye(A,p,x,b);return B.setAttribute("role","presentation"),B}var yt;document.createRange?yt=function(A,p,x,b){var B=document.createRange();return B.setEnd(b||A,x),B.setStart(A,p),B}:yt=function(A,p,x){var b=document.body.createTextRange();try{b.moveToElementText(A.parentNode)}catch{return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",p),b};function st(A,p){if(p.nodeType==3&&(p=p.parentNode),A.contains)return A.contains(p);do if(p.nodeType==11&&(p=p.host),p==A)return!0;while(p=p.parentNode)}function ft(A){var p=A.ownerDocument||A,x;try{x=A.activeElement}catch{x=p.body||null}for(;x&&x.shadowRoot&&x.shadowRoot.activeElement;)x=x.shadowRoot.activeElement;return x}function Re(A,p){var x=A.className;Te(p).test(x)||(A.className+=(x?" ":"")+p)}function Ve(A,p){for(var x=A.split(" "),b=0;b<x.length;b++)x[b]&&!Te(x[b]).test(p)&&(p+=" "+x[b]);return p}var Xe=function(A){A.select()};N?Xe=function(A){A.selectionStart=0,A.selectionEnd=A.value.length}:d&&(Xe=function(A){try{A.select()}catch{}});function Jt(A){return A.display.wrapper.ownerDocument}function Ht(A){return bt(A.display.wrapper)}function bt(A){return A.getRootNode?A.getRootNode():A.ownerDocument}function Qt(A){return Jt(A).defaultView}function Yt(A){var p=Array.prototype.slice.call(arguments,1);return function(){return A.apply(null,p)}}function ke(A,p,x){p||(p={});for(var b in A)A.hasOwnProperty(b)&&(x!==!1||!p.hasOwnProperty(b))&&(p[b]=A[b]);return p}function ge(A,p,x,b,B){p==null&&(p=A.search(/[^\s\u00a0]/),p==-1&&(p=A.length));for(var U=b||0,q=B||0;;){var ne=A.indexOf("	",U);if(ne<0||ne>=p)return q+(p-U);q+=ne-U,q+=x-q%x,U=ne+1}}var Se=function(){this.id=null,this.f=null,this.time=0,this.handler=Yt(this.onTimeout,this)};Se.prototype.onTimeout=function(A){A.id=0,A.time<=+new Date?A.f():setTimeout(A.handler,A.time-+new Date)},Se.prototype.set=function(A,p){this.f=p;var x=+new Date+A;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,A),this.time=x)};function ze(A,p){for(var x=0;x<A.length;++x)if(A[x]==p)return x;return-1}var it=50,ot={toString:function(){return"CodeMirror.Pass"}},St={scroll:!1},Rt={origin:"*mouse"},zt={origin:"+move"};function mt(A,p,x){for(var b=0,B=0;;){var U=A.indexOf("	",b);U==-1&&(U=A.length);var q=U-b;if(U==A.length||B+q>=p)return b+Math.min(q,p-B);if(B+=U-b,B+=x-B%x,b=U+1,B>=p)return b}}var or=[""];function gn(A){for(;or.length<=A;)or.push(yn(or)+" ");return or[A]}function yn(A){return A[A.length-1]}function tr(A,p){for(var x=[],b=0;b<A.length;b++)x[b]=p(A[b],b);return x}function dr(A,p,x){for(var b=0,B=x(p);b<A.length&&x(A[b])<=B;)b++;A.splice(b,0,p)}function Sr(){}function Nr(A,p){var x;return Object.create?x=Object.create(A):(Sr.prototype=A,x=new Sr),p&&ke(p,x),x}var yr=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function _i(A){return/\w/.test(A)||A>""&&(A.toUpperCase()!=A.toLowerCase()||yr.test(A))}function Ee(A,p){return p?p.source.indexOf("\\w")>-1&&_i(A)?!0:p.test(A):_i(A)}function ee(A){for(var p in A)if(A.hasOwnProperty(p)&&A[p])return!1;return!0}var V=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ke(A){return A.charCodeAt(0)>=768&&V.test(A)}function At(A,p,x){for(;(x<0?p>0:p<A.length)&&Ke(A.charAt(p));)p+=x;return p}function Bt(A,p,x){for(var b=p>x?-1:1;;){if(p==x)return p;var B=(p+x)/2,U=b<0?Math.ceil(B):Math.floor(B);if(U==p)return A(U)?p:x;A(U)?x=U:p=U+b}}function kt(A,p,x,b){if(!A)return b(p,x,"ltr",0);for(var B=!1,U=0;U<A.length;++U){var q=A[U];(q.from<x&&q.to>p||p==x&&q.to==p)&&(b(Math.max(q.from,p),Math.min(q.to,x),q.level==1?"rtl":"ltr",U),B=!0)}B||b(p,x,"ltr")}var Lt=null;function fn(A,p,x){var b;Lt=null;for(var B=0;B<A.length;++B){var U=A[B];if(U.from<p&&U.to>p)return B;U.to==p&&(U.from!=U.to&&x=="before"?b=B:Lt=B),U.from==p&&(U.from!=U.to&&x!="before"?b=B:Lt=B)}return b??Lt}var Pn=function(){var A="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",p="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ve){return ve<=247?A.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?p.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,B=/[stwN]/,U=/[LRr]/,q=/[Lb1n]/,ne=/[1n]/;function ue(ve,Qe,nt){this.level=ve,this.from=Qe,this.to=nt}return function(ve,Qe){var nt=Qe=="ltr"?"L":"R";if(ve.length==0||Qe=="ltr"&&!b.test(ve))return!1;for(var Ot=ve.length,Ct=[],Nt=0;Nt<Ot;++Nt)Ct.push(x(ve.charCodeAt(Nt)));for(var cn=0,kn=nt;cn<Ot;++cn){var Vn=Ct[cn];Vn=="m"?Ct[cn]=kn:kn=Vn}for(var bn=0,Rn=nt;bn<Ot;++bn){var lr=Ct[bn];lr=="1"&&Rn=="r"?Ct[bn]="n":U.test(lr)&&(Rn=lr,lr=="r"&&(Ct[bn]="R"))}for(var Tr=1,_r=Ct[0];Tr<Ot-1;++Tr){var fi=Ct[Tr];fi=="+"&&_r=="1"&&Ct[Tr+1]=="1"?Ct[Tr]="1":fi==","&&_r==Ct[Tr+1]&&(_r=="1"||_r=="n")&&(Ct[Tr]=_r),_r=fi}for(var Ro=0;Ro<Ot;++Ro){var qa=Ct[Ro];if(qa==",")Ct[Ro]="N";else if(qa=="%"){var xa=void 0;for(xa=Ro+1;xa<Ot&&Ct[xa]=="%";++xa);for(var Fa=Ro&&Ct[Ro-1]=="!"||xa<Ot&&Ct[xa]=="1"?"1":"N",As=Ro;As<xa;++As)Ct[As]=Fa;Ro=xa-1}}for(var cs=0,Ol=nt;cs<Ot;++cs){var tl=Ct[cs];Ol=="L"&&tl=="1"?Ct[cs]="L":U.test(tl)&&(Ol=tl)}for(var Bs=0;Bs<Ot;++Bs)if(B.test(Ct[Bs])){var ds=void 0;for(ds=Bs+1;ds<Ot&&B.test(Ct[ds]);++ds);for(var ha=(Bs?Ct[Bs-1]:nt)=="L",Is=(ds<Ot?Ct[ds]:nt)=="L",fh=ha==Is?ha?"L":"R":nt,dc=Bs;dc<ds;++dc)Ct[dc]=fh;Bs=ds-1}for(var js=[],hc,Ns=0;Ns<Ot;)if(q.test(Ct[Ns])){var K0=Ns;for(++Ns;Ns<Ot&&q.test(Ct[Ns]);++Ns);js.push(new ue(0,K0,Ns))}else{var TA=Ns,Nc=js.length,Va=Qe=="rtl"?1:0;for(++Ns;Ns<Ot&&Ct[Ns]!="L";++Ns);for(var nl=TA;nl<Ns;)if(ne.test(Ct[nl])){TA<nl&&(js.splice(Nc,0,new ue(1,TA,nl)),Nc+=Va);var ph=nl;for(++nl;nl<Ns&&ne.test(Ct[nl]);++nl);js.splice(Nc,0,new ue(2,ph,nl)),Nc+=Va,TA=nl}else++nl;TA<Ns&&js.splice(Nc,0,new ue(1,TA,Ns))}return Qe=="ltr"&&(js[0].level==1&&(hc=ve.match(/^\s+/))&&(js[0].from=hc[0].length,js.unshift(new ue(0,0,hc[0].length))),yn(js).level==1&&(hc=ve.match(/\s+$/))&&(yn(js).to-=hc[0].length,js.push(new ue(0,Ot-hc[0].length,Ot)))),Qe=="rtl"?js.reverse():js}}();function On(A,p){var x=A.order;return x==null&&(x=A.order=Pn(A.text,p)),x}var g=[],Kt=function(A,p,x){if(A.addEventListener)A.addEventListener(p,x,!1);else if(A.attachEvent)A.attachEvent("on"+p,x);else{var b=A._handlers||(A._handlers={});b[p]=(b[p]||g).concat(x)}};function Pr(A,p){return A._handlers&&A._handlers[p]||g}function rr(A,p,x){if(A.removeEventListener)A.removeEventListener(p,x,!1);else if(A.detachEvent)A.detachEvent("on"+p,x);else{var b=A._handlers,B=b&&b[p];if(B){var U=ze(B,x);U>-1&&(b[p]=B.slice(0,U).concat(B.slice(U+1)))}}}function Le(A,p){var x=Pr(A,p);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),B=0;B<x.length;++B)x[B].apply(null,b)}function ce(A,p,x){return typeof p=="string"&&(p={type:p,preventDefault:function(){this.defaultPrevented=!0}}),Le(A,x||p.type,A,p),pt(p)||p.codemirrorIgnore}function xe(A){var p=A._handlers&&A._handlers.cursorActivity;if(p)for(var x=A.curOp.cursorActivityHandlers||(A.curOp.cursorActivityHandlers=[]),b=0;b<p.length;++b)ze(x,p[b])==-1&&x.push(p[b])}function Ie(A,p){return Pr(A,p).length>0}function je(A){A.prototype.on=function(p,x){Kt(this,p,x)},A.prototype.off=function(p,x){rr(this,p,x)}}function rt(A){A.preventDefault?A.preventDefault():A.returnValue=!1}function lt(A){A.stopPropagation?A.stopPropagation():A.cancelBubble=!0}function pt(A){return A.defaultPrevented!=null?A.defaultPrevented:A.returnValue==!1}function et(A){rt(A),lt(A)}function Mt(A){return A.target||A.srcElement}function tn(A){var p=A.which;return p==null&&(A.button&1?p=1:A.button&2?p=3:A.button&4&&(p=2)),pe&&A.ctrlKey&&p==1&&(p=3),p}var qt=function(){if(d&&f<9)return!1;var A=ye("div");return"draggable"in A||"dragDrop"in A}(),en;function Fn(A){if(en==null){var p=ye("span","​");$e(A,ye("span",[p,document.createTextNode("x")])),A.firstChild.offsetHeight!=0&&(en=p.offsetWidth<=1&&p.offsetHeight>2&&!(d&&f<8))}var x=en?ye("span","​"):ye("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Bn;function Hn(A){if(Bn!=null)return Bn;var p=$e(A,document.createTextNode("AخA")),x=yt(p,0,1).getBoundingClientRect(),b=yt(p,1,2).getBoundingClientRect();return he(A),!x||x.left==x.right?!1:Bn=b.right-x.right<3}var Or=`

b`.split(/\n/).length!=3?function(A){for(var p=0,x=[],b=A.length;p<=b;){var B=A.indexOf(`
`,p);B==-1&&(B=A.length);var U=A.slice(p,A.charAt(B-1)=="\r"?B-1:B),q=U.indexOf("\r");q!=-1?(x.push(U.slice(0,q)),p+=q+1):(x.push(U),p=B+1)}return x}:function(A){return A.split(/\r\n?|\n/)},cr=window.getSelection?function(A){try{return A.selectionStart!=A.selectionEnd}catch{return!1}}:function(A){var p;try{p=A.ownerDocument.selection.createRange()}catch{}return!p||p.parentElement()!=A?!1:p.compareEndPoints("StartToEnd",p)!=0},Qr=function(){var A=ye("div");return"oncopy"in A?!0:(A.setAttribute("oncopy","return;"),typeof A.oncopy=="function")}(),Br=null;function Fr(A){if(Br!=null)return Br;var p=$e(A,ye("span","x")),x=p.getBoundingClientRect(),b=yt(p,0,1).getBoundingClientRect();return Br=Math.abs(x.left-b.left)>1}var ar={},di={};function Ui(A,p){arguments.length>2&&(p.dependencies=Array.prototype.slice.call(arguments,2)),ar[A]=p}function to(A,p){di[A]=p}function ho(A){if(typeof A=="string"&&di.hasOwnProperty(A))A=di[A];else if(A&&typeof A.name=="string"&&di.hasOwnProperty(A.name)){var p=di[A.name];typeof p=="string"&&(p={name:p}),A=Nr(p,A),A.name=p.name}else{if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(A))return ho("application/xml");if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(A))return ho("application/json")}return typeof A=="string"?{name:A}:A||{name:"null"}}function si(A,p){p=ho(p);var x=ar[p.name];if(!x)return si(A,"text/plain");var b=x(A,p);if(fo.hasOwnProperty(p.name)){var B=fo[p.name];for(var U in B)B.hasOwnProperty(U)&&(b.hasOwnProperty(U)&&(b["_"+U]=b[U]),b[U]=B[U])}if(b.name=p.name,p.helperType&&(b.helperType=p.helperType),p.modeProps)for(var q in p.modeProps)b[q]=p.modeProps[q];return b}var fo={};function Na(A,p){var x=fo.hasOwnProperty(A)?fo[A]:fo[A]={};ke(p,x)}function Ia(A,p){if(p===!0)return p;if(A.copyState)return A.copyState(p);var x={};for(var b in p){var B=p[b];B instanceof Array&&(B=B.concat([])),x[b]=B}return x}function Ei(A,p){for(var x;A.innerMode&&(x=A.innerMode(p),!(!x||x.mode==A));)p=x.state,A=x.mode;return x||{mode:A,state:p}}function os(A,p,x){return A.startState?A.startState(p,x):!0}var yi=function(A,p,x){this.pos=this.start=0,this.string=A,this.tabSize=p||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};yi.prototype.eol=function(){return this.pos>=this.string.length},yi.prototype.sol=function(){return this.pos==this.lineStart},yi.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},yi.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},yi.prototype.eat=function(A){var p=this.string.charAt(this.pos),x;if(typeof A=="string"?x=p==A:x=p&&(A.test?A.test(p):A(p)),x)return++this.pos,p},yi.prototype.eatWhile=function(A){for(var p=this.pos;this.eat(A););return this.pos>p},yi.prototype.eatSpace=function(){for(var A=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>A},yi.prototype.skipToEnd=function(){this.pos=this.string.length},yi.prototype.skipTo=function(A){var p=this.string.indexOf(A,this.pos);if(p>-1)return this.pos=p,!0},yi.prototype.backUp=function(A){this.pos-=A},yi.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},yi.prototype.indentation=function(){return ge(this.string,null,this.tabSize)-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},yi.prototype.match=function(A,p,x){if(typeof A=="string"){var b=function(q){return x?q.toLowerCase():q},B=this.string.substr(this.pos,A.length);if(b(B)==b(A))return p!==!1&&(this.pos+=A.length),!0}else{var U=this.string.slice(this.pos).match(A);return U&&U.index>0?null:(U&&p!==!1&&(this.pos+=U[0].length),U)}},yi.prototype.current=function(){return this.string.slice(this.start,this.pos)},yi.prototype.hideFirstChars=function(A,p){this.lineStart+=A;try{return p()}finally{this.lineStart-=A}},yi.prototype.lookAhead=function(A){var p=this.lineOracle;return p&&p.lookAhead(A)},yi.prototype.baseToken=function(){var A=this.lineOracle;return A&&A.baseToken(this.pos)};function Gn(A,p){if(p-=A.first,p<0||p>=A.size)throw new Error("There is no line "+(p+A.first)+" in the document.");for(var x=A;!x.lines;)for(var b=0;;++b){var B=x.children[b],U=B.chunkSize();if(p<U){x=B;break}p-=U}return x.lines[p]}function ro(A,p,x){var b=[],B=p.line;return A.iter(p.line,x.line+1,function(U){var q=U.text;B==x.line&&(q=q.slice(0,x.ch)),B==p.line&&(q=q.slice(p.ch)),b.push(q),++B}),b}function Co(A,p,x){var b=[];return A.iter(p,x,function(B){b.push(B.text)}),b}function Ri(A,p){var x=p-A.height;if(x)for(var b=A;b;b=b.parent)b.height+=x}function _e(A){if(A.parent==null)return null;for(var p=A.parent,x=ze(p.lines,A),b=p.parent;b;p=b,b=b.parent)for(var B=0;b.children[B]!=p;++B)x+=b.children[B].chunkSize();return x+p.first}function Je(A,p){var x=A.first;e:do{for(var b=0;b<A.children.length;++b){var B=A.children[b],U=B.height;if(p<U){A=B;continue e}p-=U,x+=B.chunkSize()}return x}while(!A.lines);for(var q=0;q<A.lines.length;++q){var ne=A.lines[q],ue=ne.height;if(p<ue)break;p-=ue}return x+q}function Zt(A,p){return p>=A.first&&p<A.first+A.size}function ln(A,p){return String(A.lineNumberFormatter(p+A.firstLineNumber))}function Ft(A,p,x){if(x===void 0&&(x=null),!(this instanceof Ft))return new Ft(A,p,x);this.line=A,this.ch=p,this.sticky=x}function wn(A,p){return A.line-p.line||A.ch-p.ch}function hr(A,p){return A.sticky==p.sticky&&wn(A,p)==0}function ii(A){return Ft(A.line,A.ch)}function li(A,p){return wn(A,p)<0?p:A}function Jo(A,p){return wn(A,p)<0?A:p}function Ka(A,p){return Math.max(A.first,Math.min(p,A.first+A.size-1))}function Dr(A,p){if(p.line<A.first)return Ft(A.first,0);var x=A.first+A.size-1;return p.line>x?Ft(x,Gn(A,x).text.length):Wa(p,Gn(A,p.line).text.length)}function Wa(A,p){var x=A.ch;return x==null||x>p?Ft(A.line,p):x<0?Ft(A.line,0):A}function vi(A,p){for(var x=[],b=0;b<p.length;b++)x[b]=Dr(A,p[b]);return x}var Ga=function(A,p){this.state=A,this.lookAhead=p},ea=function(A,p,x,b){this.state=p,this.doc=A,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};ea.prototype.lookAhead=function(A){var p=this.doc.getLine(this.line+A);return p!=null&&A>this.maxLookAhead&&(this.maxLookAhead=A),p},ea.prototype.baseToken=function(A){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=A;)this.baseTokenPos+=2;var p=this.baseTokens[this.baseTokenPos+1];return{type:p&&p.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-A}},ea.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ea.fromSaved=function(A,p,x){return p instanceof Ga?new ea(A,Ia(A.mode,p.state),x,p.lookAhead):new ea(A,Ia(A.mode,p),x)},ea.prototype.save=function(A){var p=A!==!1?Ia(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ga(p,this.maxLookAhead):p};function xu(A,p,x,b){var B=[A.state.modeGen],U={};bA(A,p.text,A.doc.mode,x,function(ve,Qe){return B.push(ve,Qe)},U,b);for(var q=x.state,ne=function(ve){x.baseTokens=B;var Qe=A.state.overlays[ve],nt=1,Ot=0;x.state=!0,bA(A,p.text,Qe.mode,x,function(Ct,Nt){for(var cn=nt;Ot<Ct;){var kn=B[nt];kn>Ct&&B.splice(nt,1,Ct,B[nt+1],kn),nt+=2,Ot=Math.min(Ct,kn)}if(Nt)if(Qe.opaque)B.splice(cn,nt-cn,Ct,"overlay "+Nt),nt=cn+2;else for(;cn<nt;cn+=2){var Vn=B[cn+1];B[cn+1]=(Vn?Vn+" ":"")+"overlay "+Nt}},U),x.state=q,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<A.state.overlays.length;++ue)ne(ue);return{styles:B,classes:U.bgClass||U.textClass?U:null}}function as(A,p,x){if(!p.styles||p.styles[0]!=A.state.modeGen){var b=ta(A,_e(p)),B=p.text.length>A.options.maxHighlightLength&&Ia(A.doc.mode,b.state),U=xu(A,p,b);B&&(b.state=B),p.stateAfter=b.save(!B),p.styles=U.styles,U.classes?p.styleClasses=U.classes:p.styleClasses&&(p.styleClasses=null),x===A.doc.highlightFrontier&&(A.doc.modeFrontier=Math.max(A.doc.modeFrontier,++A.doc.highlightFrontier))}return p.styles}function ta(A,p,x){var b=A.doc,B=A.display;if(!b.mode.startState)return new ea(b,!0,p);var U=Mu(A,p,x),q=U>b.first&&Gn(b,U-1).stateAfter,ne=q?ea.fromSaved(b,q,U):new ea(b,os(b.mode),U);return b.iter(U,p,function(ue){na(A,ue.text,ne);var ve=ne.line;ue.stateAfter=ve==p-1||ve%5==0||ve>=B.viewFrom&&ve<B.viewTo?ne.save():null,ne.nextLine()}),x&&(b.modeFrontier=ne.line),ne}function na(A,p,x,b){var B=A.doc.mode,U=new yi(p,A.options.tabSize,x);for(U.start=U.pos=b||0,p==""&&bs(B,x.state);!U.eol();)wu(B,U,x.state),U.start=U.pos}function bs(A,p){if(A.blankLine)return A.blankLine(p);if(A.innerMode){var x=Ei(A,p);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function wu(A,p,x,b){for(var B=0;B<10;B++){b&&(b[0]=Ei(A,x).mode);var U=A.token(p,x);if(p.pos>p.start)return U}throw new Error("Mode "+A.name+" failed to advance stream.")}var ma=function(A,p,x){this.start=A.start,this.end=A.pos,this.string=A.current(),this.type=p||null,this.state=x};function _A(A,p,x,b){var B=A.doc,U=B.mode,q;p=Dr(B,p);var ne=Gn(B,p.line),ue=ta(A,p.line,x),ve=new yi(ne.text,A.options.tabSize,ue),Qe;for(b&&(Qe=[]);(b||ve.pos<p.ch)&&!ve.eol();)ve.start=ve.pos,q=wu(U,ve,ue.state),b&&Qe.push(new ma(ve,q,Ia(B.mode,ue.state)));return b?Qe:new ma(ve,q,ue.state)}function Wu(A,p){if(A)for(;;){var x=A.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;A=A.slice(0,x.index)+A.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";p[b]==null?p[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(p[b])||(p[b]+=" "+x[2])}return A}function bA(A,p,x,b,B,U,q){var ne=x.flattenSpans;ne==null&&(ne=A.options.flattenSpans);var ue=0,ve=null,Qe=new yi(p,A.options.tabSize,b),nt,Ot=A.options.addModeClass&&[null];for(p==""&&Wu(bs(x,b.state),U);!Qe.eol();){if(Qe.pos>A.options.maxHighlightLength?(ne=!1,q&&na(A,p,b,Qe.pos),Qe.pos=p.length,nt=null):nt=Wu(wu(x,Qe,b.state,Ot),U),Ot){var Ct=Ot[0].name;Ct&&(nt="m-"+(nt?Ct+" "+nt:Ct))}if(!ne||ve!=nt){for(;ue<Qe.start;)ue=Math.min(Qe.start,ue+5e3),B(ue,ve);ve=nt}Qe.start=Qe.pos}for(;ue<Qe.pos;){var Nt=Math.min(Qe.pos,ue+5e3);B(Nt,ve),ue=Nt}}function Mu(A,p,x){for(var b,B,U=A.doc,q=x?-1:p-(A.doc.mode.innerMode?1e3:100),ne=p;ne>q;--ne){if(ne<=U.first)return U.first;var ue=Gn(U,ne-1),ve=ue.stateAfter;if(ve&&(!x||ne+(ve instanceof Ga?ve.lookAhead:0)<=U.modeFrontier))return ne;var Qe=ge(ue.text,null,A.options.tabSize);(B==null||b>Qe)&&(B=ne-1,b=Qe)}return B}function Gu(A,p){if(A.modeFrontier=Math.min(A.modeFrontier,p),!(A.highlightFrontier<p-10)){for(var x=A.first,b=p-1;b>x;b--){var B=Gn(A,b).stateAfter;if(B&&(!(B instanceof Ga)||b+B.lookAhead<p)){x=b+1;break}}A.highlightFrontier=Math.min(A.highlightFrontier,x)}}var Wo=!1,xs=!1;function nu(){Wo=!0}function ss(){xs=!0}function ul(A,p,x){this.marker=A,this.from=p,this.to=x}function Go(A,p){if(A)for(var x=0;x<A.length;++x){var b=A[x];if(b.marker==p)return b}}function Su(A,p){for(var x,b=0;b<A.length;++b)A[b]!=p&&(x||(x=[])).push(A[b]);return x}function Al(A,p,x){var b=x&&window.WeakSet&&(x.markedSpans||(x.markedSpans=new WeakSet));b&&A.markedSpans&&b.has(A.markedSpans)?A.markedSpans.push(p):(A.markedSpans=A.markedSpans?A.markedSpans.concat([p]):[p],b&&b.add(A.markedSpans)),p.marker.attachLine(A)}function Ml(A,p,x){var b;if(A)for(var B=0;B<A.length;++B){var U=A[B],q=U.marker,ne=U.from==null||(q.inclusiveLeft?U.from<=p:U.from<p);if(ne||U.from==p&&q.type=="bookmark"&&(!x||!U.marker.insertLeft)){var ue=U.to==null||(q.inclusiveRight?U.to>=p:U.to>p);(b||(b=[])).push(new ul(q,U.from,ue?null:U.to))}}return b}function ru(A,p,x){var b;if(A)for(var B=0;B<A.length;++B){var U=A[B],q=U.marker,ne=U.to==null||(q.inclusiveRight?U.to>=p:U.to>p);if(ne||U.from==p&&q.type=="bookmark"&&(!x||U.marker.insertLeft)){var ue=U.from==null||(q.inclusiveLeft?U.from<=p:U.from<p);(b||(b=[])).push(new ul(q,ue?null:U.from-p,U.to==null?null:U.to-p))}}return b}function ua(A,p){if(p.full)return null;var x=Zt(A,p.from.line)&&Gn(A,p.from.line).markedSpans,b=Zt(A,p.to.line)&&Gn(A,p.to.line).markedSpans;if(!x&&!b)return null;var B=p.from.ch,U=p.to.ch,q=wn(p.from,p.to)==0,ne=Ml(x,B,q),ue=ru(b,U,q),ve=p.text.length==1,Qe=yn(p.text).length+(ve?B:0);if(ne)for(var nt=0;nt<ne.length;++nt){var Ot=ne[nt];if(Ot.to==null){var Ct=Go(ue,Ot.marker);Ct?ve&&(Ot.to=Ct.to==null?null:Ct.to+Qe):Ot.to=B}}if(ue)for(var Nt=0;Nt<ue.length;++Nt){var cn=ue[Nt];if(cn.to!=null&&(cn.to+=Qe),cn.from==null){var kn=Go(ne,cn.marker);kn||(cn.from=Qe,ve&&(ne||(ne=[])).push(cn))}else cn.from+=Qe,ve&&(ne||(ne=[])).push(cn)}ne&&(ne=cl(ne)),ue&&ue!=ne&&(ue=cl(ue));var Vn=[ne];if(!ve){var bn=p.text.length-2,Rn;if(bn>0&&ne)for(var lr=0;lr<ne.length;++lr)ne[lr].to==null&&(Rn||(Rn=[])).push(new ul(ne[lr].marker,null,null));for(var Tr=0;Tr<bn;++Tr)Vn.push(Rn);Vn.push(ue)}return Vn}function cl(A){for(var p=0;p<A.length;++p){var x=A[p];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&A.splice(p--,1)}return A.length?A:null}function xA(A,p,x){var b=null;if(A.iter(p.line,x.line+1,function(Ct){if(Ct.markedSpans)for(var Nt=0;Nt<Ct.markedSpans.length;++Nt){var cn=Ct.markedSpans[Nt].marker;cn.readOnly&&(!b||ze(b,cn)==-1)&&(b||(b=[])).push(cn)}}),!b)return null;for(var B=[{from:p,to:x}],U=0;U<b.length;++U)for(var q=b[U],ne=q.find(0),ue=0;ue<B.length;++ue){var ve=B[ue];if(!(wn(ve.to,ne.from)<0||wn(ve.from,ne.to)>0)){var Qe=[ue,1],nt=wn(ve.from,ne.from),Ot=wn(ve.to,ne.to);(nt<0||!q.inclusiveLeft&&!nt)&&Qe.push({from:ve.from,to:ne.from}),(Ot>0||!q.inclusiveRight&&!Ot)&&Qe.push({from:ne.to,to:ve.to}),B.splice.apply(B,Qe),ue+=Qe.length-3}}return B}function vo(A){var p=A.markedSpans;if(p){for(var x=0;x<p.length;++x)p[x].marker.detachLine(A);A.markedSpans=null}}function io(A,p){if(p){for(var x=0;x<p.length;++x)p[x].marker.attachLine(A);A.markedSpans=p}}function z(A){return A.inclusiveLeft?-1:0}function le(A){return A.inclusiveRight?1:0}function Ue(A,p){var x=A.lines.length-p.lines.length;if(x!=0)return x;var b=A.find(),B=p.find(),U=wn(b.from,B.from)||z(A)-z(p);if(U)return-U;var q=wn(b.to,B.to)||le(A)-le(p);return q||p.id-A.id}function vt(A,p){var x=xs&&A.markedSpans,b;if(x)for(var B=void 0,U=0;U<x.length;++U)B=x[U],B.marker.collapsed&&(p?B.from:B.to)==null&&(!b||Ue(b,B.marker)<0)&&(b=B.marker);return b}function $n(A){return vt(A,!0)}function vn(A){return vt(A,!1)}function Kn(A,p){var x=xs&&A.markedSpans,b;if(x)for(var B=0;B<x.length;++B){var U=x[B];U.marker.collapsed&&(U.from==null||U.from<p)&&(U.to==null||U.to>p)&&(!b||Ue(b,U.marker)<0)&&(b=U.marker)}return b}function Ur(A,p,x,b,B){var U=Gn(A,p),q=xs&&U.markedSpans;if(q)for(var ne=0;ne<q.length;++ne){var ue=q[ne];if(ue.marker.collapsed){var ve=ue.marker.find(0),Qe=wn(ve.from,x)||z(ue.marker)-z(B),nt=wn(ve.to,b)||le(ue.marker)-le(B);if(!(Qe>=0&&nt<=0||Qe<=0&&nt>=0)&&(Qe<=0&&(ue.marker.inclusiveRight&&B.inclusiveLeft?wn(ve.to,x)>=0:wn(ve.to,x)>0)||Qe>=0&&(ue.marker.inclusiveRight&&B.inclusiveLeft?wn(ve.from,b)<=0:wn(ve.from,b)<0)))return!0}}}function vr(A){for(var p;p=$n(A);)A=p.find(-1,!0).line;return A}function kr(A){for(var p;p=vn(A);)A=p.find(1,!0).line;return A}function Ti(A){for(var p,x;p=vn(A);)A=p.find(1,!0).line,(x||(x=[])).push(A);return x}function po(A,p){var x=Gn(A,p),b=vr(x);return x==b?p:_e(b)}function Oi(A,p){if(p>A.lastLine())return p;var x=Gn(A,p),b;if(!Zr(A,x))return p;for(;b=vn(x);)x=b.find(1,!0).line;return _e(x)+1}function Zr(A,p){var x=xs&&p.markedSpans;if(x){for(var b=void 0,B=0;B<x.length;++B)if(b=x[B],!!b.marker.collapsed){if(b.from==null)return!0;if(!b.marker.widgetNode&&b.from==0&&b.marker.inclusiveLeft&&Vi(A,p,b))return!0}}}function Vi(A,p,x){if(x.to==null){var b=x.marker.find(1,!0);return Vi(A,b.line,Go(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==p.text.length)return!0;for(var B=void 0,U=0;U<p.markedSpans.length;++U)if(B=p.markedSpans[U],B.marker.collapsed&&!B.marker.widgetNode&&B.from==x.to&&(B.to==null||B.to!=x.from)&&(B.marker.inclusiveLeft||x.marker.inclusiveRight)&&Vi(A,p,B))return!0}function Io(A){A=vr(A);for(var p=0,x=A.parent,b=0;b<x.lines.length;++b){var B=x.lines[b];if(B==A)break;p+=B.height}for(var U=x.parent;U;x=U,U=x.parent)for(var q=0;q<U.children.length;++q){var ne=U.children[q];if(ne==x)break;p+=ne.height}return p}function wo(A){if(A.height==0)return 0;for(var p=A.text.length,x,b=A;x=$n(b);){var B=x.find(0,!0);b=B.from.line,p+=B.from.ch-B.to.ch}for(b=A;x=vn(b);){var U=x.find(0,!0);p-=b.text.length-U.from.ch,b=U.to.line,p+=b.text.length-U.to.ch}return p}function $a(A){var p=A.display,x=A.doc;p.maxLine=Gn(x,x.first),p.maxLineLength=wo(p.maxLine),p.maxLineChanged=!0,x.iter(function(b){var B=wo(b);B>p.maxLineLength&&(p.maxLineLength=B,p.maxLine=b)})}var Fl=function(A,p,x){this.text=A,io(this,p),this.height=x?x(this):1};Fl.prototype.lineNo=function(){return _e(this)},je(Fl);function iu(A,p,x,b){A.text=p,A.stateAfter&&(A.stateAfter=null),A.styles&&(A.styles=null),A.order!=null&&(A.order=null),vo(A),io(A,x);var B=b?b(A):1;B!=A.height&&Ri(A,B)}function ga(A){A.parent=null,vo(A)}var v0={},ou={};function Rh(A,p){if(!A||/^\s*$/.test(A))return null;var x=p.addModeClass?ou:v0;return x[A]||(x[A]=A.replace(/\S+/g,"cm-$&"))}function ld(A,p){var x=gt("span",null,null,C?"padding-right: .1px":null),b={pre:gt("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:A,trailingSpace:!1,splitSpaces:A.getOption("lineWrapping")};p.measure={};for(var B=0;B<=(p.rest?p.rest.length:0);B++){var U=B?p.rest[B-1]:p.line,q=void 0;b.pos=0,b.addToken=ud,Hn(A.display.measure)&&(q=On(U,A.doc.direction))&&(b.addToken=ra(b.addToken,q)),b.map=[];var ne=p!=A.display.externalMeasured&&_e(U);Vd(U,b,as(A,U,ne)),U.styleClasses&&(U.styleClasses.bgClass&&(b.bgClass=Ve(U.styleClasses.bgClass,b.bgClass||"")),U.styleClasses.textClass&&(b.textClass=Ve(U.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(Fn(A.display.measure))),B==0?(p.measure.map=b.map,p.measure.cache={}):((p.measure.maps||(p.measure.maps=[])).push(b.map),(p.measure.caches||(p.measure.caches=[])).push({}))}if(C){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Le(A,"renderLine",A,p.line,b.pre),b.pre.className&&(b.textClass=Ve(b.pre.className,b.textClass||"")),b}function $u(A){var p=ye("span","•","cm-invalidchar");return p.title="\\u"+A.charCodeAt(0).toString(16),p.setAttribute("aria-label",p.title),p}function ud(A,p,x,b,B,U,q){if(p){var ne=A.splitSpaces?YA(p,A.trailingSpace):p,ue=A.cm.state.specialChars,ve=!1,Qe;if(!ue.test(p))A.col+=p.length,Qe=document.createTextNode(ne),A.map.push(A.pos,A.pos+p.length,Qe),d&&f<9&&(ve=!0),A.pos+=p.length;else{Qe=document.createDocumentFragment();for(var nt=0;;){ue.lastIndex=nt;var Ot=ue.exec(p),Ct=Ot?Ot.index-nt:p.length-nt;if(Ct){var Nt=document.createTextNode(ne.slice(nt,nt+Ct));d&&f<9?Qe.appendChild(ye("span",[Nt])):Qe.appendChild(Nt),A.map.push(A.pos,A.pos+Ct,Nt),A.col+=Ct,A.pos+=Ct}if(!Ot)break;nt+=Ct+1;var cn=void 0;if(Ot[0]=="	"){var kn=A.cm.options.tabSize,Vn=kn-A.col%kn;cn=Qe.appendChild(ye("span",gn(Vn),"cm-tab")),cn.setAttribute("role","presentation"),cn.setAttribute("cm-text","	"),A.col+=Vn}else Ot[0]=="\r"||Ot[0]==`
`?(cn=Qe.appendChild(ye("span",Ot[0]=="\r"?"␍":"␤","cm-invalidchar")),cn.setAttribute("cm-text",Ot[0]),A.col+=1):(cn=A.cm.options.specialCharPlaceholder(Ot[0]),cn.setAttribute("cm-text",Ot[0]),d&&f<9?Qe.appendChild(ye("span",[cn])):Qe.appendChild(cn),A.col+=1);A.map.push(A.pos,A.pos+1,cn),A.pos++}}if(A.trailingSpace=ne.charCodeAt(p.length-1)==32,x||b||B||ve||U||q){var bn=x||"";b&&(bn+=b),B&&(bn+=B);var Rn=ye("span",[Qe],bn,U);if(q)for(var lr in q)q.hasOwnProperty(lr)&&lr!="style"&&lr!="class"&&Rn.setAttribute(lr,q[lr]);return A.content.appendChild(Rn)}A.content.appendChild(Qe)}}function YA(A,p){if(A.length>1&&!/  /.test(A))return A;for(var x=p,b="",B=0;B<A.length;B++){var U=A.charAt(B);U==" "&&x&&(B==A.length-1||A.charCodeAt(B+1)==32)&&(U=" "),b+=U,x=U==" "}return b}function ra(A,p){return function(x,b,B,U,q,ne,ue){B=B?B+" cm-force-border":"cm-force-border";for(var ve=x.pos,Qe=ve+b.length;;){for(var nt=void 0,Ot=0;Ot<p.length&&(nt=p[Ot],!(nt.to>ve&&nt.from<=ve));Ot++);if(nt.to>=Qe)return A(x,b,B,U,q,ne,ue);A(x,b.slice(0,nt.to-ve),B,U,null,ne,ue),U=null,b=b.slice(nt.to-ve),ve=nt.to}}}function Qu(A,p,x,b){var B=!b&&x.widgetNode;B&&A.map.push(A.pos,A.pos+p,B),!b&&A.cm.display.input.needsContentAttribute&&(B||(B=A.content.appendChild(document.createElement("span"))),B.setAttribute("cm-marker",x.id)),B&&(A.cm.display.input.setUneditable(B),A.content.appendChild(B)),A.pos+=p,A.trailingSpace=!1}function Vd(A,p,x){var b=A.markedSpans,B=A.text,U=0;if(!b){for(var q=1;q<x.length;q+=2)p.addToken(p,B.slice(U,U=x[q]),Rh(x[q+1],p.cm.options));return}for(var ne=B.length,ue=0,ve=1,Qe="",nt,Ot,Ct=0,Nt,cn,kn,Vn,bn;;){if(Ct==ue){Nt=cn=kn=Ot="",bn=null,Vn=null,Ct=1/0;for(var Rn=[],lr=void 0,Tr=0;Tr<b.length;++Tr){var _r=b[Tr],fi=_r.marker;if(fi.type=="bookmark"&&_r.from==ue&&fi.widgetNode)Rn.push(fi);else if(_r.from<=ue&&(_r.to==null||_r.to>ue||fi.collapsed&&_r.to==ue&&_r.from==ue)){if(_r.to!=null&&_r.to!=ue&&Ct>_r.to&&(Ct=_r.to,cn=""),fi.className&&(Nt+=" "+fi.className),fi.css&&(Ot=(Ot?Ot+";":"")+fi.css),fi.startStyle&&_r.from==ue&&(kn+=" "+fi.startStyle),fi.endStyle&&_r.to==Ct&&(lr||(lr=[])).push(fi.endStyle,_r.to),fi.title&&((bn||(bn={})).title=fi.title),fi.attributes)for(var Ro in fi.attributes)(bn||(bn={}))[Ro]=fi.attributes[Ro];fi.collapsed&&(!Vn||Ue(Vn.marker,fi)<0)&&(Vn=_r)}else _r.from>ue&&Ct>_r.from&&(Ct=_r.from)}if(lr)for(var qa=0;qa<lr.length;qa+=2)lr[qa+1]==Ct&&(cn+=" "+lr[qa]);if(!Vn||Vn.from==ue)for(var xa=0;xa<Rn.length;++xa)Qu(p,0,Rn[xa]);if(Vn&&(Vn.from||0)==ue){if(Qu(p,(Vn.to==null?ne+1:Vn.to)-ue,Vn.marker,Vn.from==null),Vn.to==null)return;Vn.to==ue&&(Vn=!1)}}if(ue>=ne)break;for(var Fa=Math.min(ne,Ct);;){if(Qe){var As=ue+Qe.length;if(!Vn){var cs=As>Fa?Qe.slice(0,Fa-ue):Qe;p.addToken(p,cs,nt?nt+Nt:Nt,kn,ue+cs.length==Ct?cn:"",Ot,bn)}if(As>=Fa){Qe=Qe.slice(Fa-ue),ue=Fa;break}ue=As,kn=""}Qe=B.slice(U,U=x[ve++]),nt=Rh(x[ve++],p.cm.options)}}}function qA(A,p,x){this.line=p,this.rest=Ti(p),this.size=this.rest?_e(yn(this.rest))-x+1:1,this.node=this.text=null,this.hidden=Zr(A,p)}function kc(A,p,x){for(var b=[],B,U=p;U<x;U=B){var q=new qA(A.doc,Gn(A.doc,U),U);B=U+q.size,b.push(q)}return b}var Eu=null;function Ad(A){Eu?Eu.ops.push(A):A.ownsGroup=Eu={ops:[A],delayedCallbacks:[]}}function em(A){var p=A.delayedCallbacks,x=0;do{for(;x<p.length;x++)p[x].call(null);for(var b=0;b<A.ops.length;b++){var B=A.ops[b];if(B.cursorActivityHandlers)for(;B.cursorActivityCalled<B.cursorActivityHandlers.length;)B.cursorActivityHandlers[B.cursorActivityCalled++].call(null,B.cm)}}while(x<p.length)}function zh(A,p){var x=A.ownsGroup;if(x)try{em(x)}finally{Eu=null,p(x)}}var Ki=null;function ko(A,p){var x=Pr(A,p);if(x.length){var b=Array.prototype.slice.call(arguments,2),B;Eu?B=Eu.delayedCallbacks:Ki?B=Ki:(B=Ki=[],setTimeout(C0,0));for(var U=function(ne){B.push(function(){return x[ne].apply(null,b)})},q=0;q<x.length;++q)U(q)}}function C0(){var A=Ki;Ki=null;for(var p=0;p<A.length;++p)A[p]()}function jh(A,p,x,b){for(var B=0;B<p.changes.length;B++){var U=p.changes[B];U=="text"?ep(A,p):U=="gutter"?VA(A,p,x,b):U=="class"?Gi(A,p):U=="widget"&&To(A,p,b)}p.changes=null}function Yu(A){return A.node==A.text&&(A.node=ye("div",null,null,"position: relative"),A.text.parentNode&&A.text.parentNode.replaceChild(A.node,A.text),A.node.appendChild(A.text),d&&f<8&&(A.node.style.zIndex=2)),A.node}function Jf(A,p){var x=p.bgClass?p.bgClass+" "+(p.line.bgClass||""):p.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),p.background)x?p.background.className=x:(p.background.parentNode.removeChild(p.background),p.background=null);else if(x){var b=Yu(p);p.background=b.insertBefore(ye("div",null,x),b.firstChild),A.display.input.setUneditable(p.background)}}function Aa(A,p){var x=A.display.externalMeasured;return x&&x.line==p.line?(A.display.externalMeasured=null,p.measure=x.measure,x.built):ld(A,p)}function ep(A,p){var x=p.text.className,b=Aa(A,p);p.text==p.node&&(p.node=b.pre),p.text.parentNode.replaceChild(b.pre,p.text),p.text=b.pre,b.bgClass!=p.bgClass||b.textClass!=p.textClass?(p.bgClass=b.bgClass,p.textClass=b.textClass,Gi(A,p)):x&&(p.text.className=x)}function Gi(A,p){Jf(A,p),p.line.wrapClass?Yu(p).className=p.line.wrapClass:p.node!=p.text&&(p.node.className="");var x=p.textClass?p.textClass+" "+(p.line.textClass||""):p.line.textClass;p.text.className=x||""}function VA(A,p,x,b){if(p.gutter&&(p.node.removeChild(p.gutter),p.gutter=null),p.gutterBackground&&(p.node.removeChild(p.gutterBackground),p.gutterBackground=null),p.line.gutterClass){var B=Yu(p);p.gutterBackground=ye("div",null,"CodeMirror-gutter-background "+p.line.gutterClass,"left: "+(A.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),A.display.input.setUneditable(p.gutterBackground),B.insertBefore(p.gutterBackground,p.text)}var U=p.line.gutterMarkers;if(A.options.lineNumbers||U){var q=Yu(p),ne=p.gutter=ye("div",null,"CodeMirror-gutter-wrapper","left: "+(A.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(ne.setAttribute("aria-hidden","true"),A.display.input.setUneditable(ne),q.insertBefore(ne,p.text),p.line.gutterClass&&(ne.className+=" "+p.line.gutterClass),A.options.lineNumbers&&(!U||!U["CodeMirror-linenumbers"])&&(p.lineNumber=ne.appendChild(ye("div",ln(A.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+A.display.lineNumInnerWidth+"px"))),U)for(var ue=0;ue<A.display.gutterSpecs.length;++ue){var ve=A.display.gutterSpecs[ue].className,Qe=U.hasOwnProperty(ve)&&U[ve];Qe&&ne.appendChild(ye("div",[Qe],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ve]+"px; width: "+b.gutterWidth[ve]+"px"))}}}function To(A,p,x){p.alignable&&(p.alignable=null);for(var b=Te("CodeMirror-linewidget"),B=p.node.firstChild,U=void 0;B;B=U)U=B.nextSibling,b.test(B.className)&&p.node.removeChild(B);HA(A,p,x)}function Fo(A,p,x,b){var B=Aa(A,p);return p.text=p.node=B.pre,B.bgClass&&(p.bgClass=B.bgClass),B.textClass&&(p.textClass=B.textClass),Gi(A,p),VA(A,p,x,b),HA(A,p,b),p.node}function HA(A,p,x){if(Us(A,p.line,p,x,!0),p.rest)for(var b=0;b<p.rest.length;b++)Us(A,p.rest[b],p,x,!1)}function Us(A,p,x,b,B){if(p.widgets)for(var U=Yu(x),q=0,ne=p.widgets;q<ne.length;++q){var ue=ne[q],ve=ye("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Nh(ue,ve,x,b),A.display.input.setUneditable(ve),B&&ue.above?U.insertBefore(ve,x.gutter||x.text):U.appendChild(ve),ko(ue,"redraw")}}function Nh(A,p,x,b){if(A.noHScroll){(x.alignable||(x.alignable=[])).push(p);var B=b.wrapperWidth;p.style.left=b.fixedPos+"px",A.coverGutter||(B-=b.gutterTotalWidth,p.style.paddingLeft=b.gutterTotalWidth+"px"),p.style.width=B+"px"}A.coverGutter&&(p.style.zIndex=5,p.style.position="relative",A.noHScroll||(p.style.marginLeft=-b.gutterTotalWidth+"px"))}function au(A){if(A.height!=null)return A.height;var p=A.doc.cm;if(!p)return 0;if(!st(document.body,A.node)){var x="position: relative;";A.coverGutter&&(x+="margin-left: -"+p.display.gutters.offsetWidth+"px;"),A.noHScroll&&(x+="width: "+p.display.wrapper.clientWidth+"px;"),$e(p.display.measure,ye("div",[A.node],null,x))}return A.height=A.node.parentNode.offsetHeight}function Ul(A,p){for(var x=Mt(p);x!=A.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==A.sizer&&x!=A.mover)return!0}function Tc(A){return A.lineSpace.offsetTop}function Wh(A){return A.mover.offsetHeight-A.lineSpace.offsetHeight}function Hd(A){if(A.cachedPaddingH)return A.cachedPaddingH;var p=$e(A.measure,ye("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(p):p.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(A.cachedPaddingH=b),b}function Ou(A){return it-A.display.nativeBarWidth}function wA(A){return A.display.scroller.clientWidth-Ou(A)-A.display.barWidth}function ZA(A){return A.display.scroller.clientHeight-Ou(A)-A.display.barHeight}function XA(A,p,x){var b=A.options.lineWrapping,B=b&&wA(A);if(!p.measure.heights||b&&p.measure.width!=B){var U=p.measure.heights=[];if(b){p.measure.width=B;for(var q=p.text.firstChild.getClientRects(),ne=0;ne<q.length-1;ne++){var ue=q[ne],ve=q[ne+1];Math.abs(ue.bottom-ve.bottom)>2&&U.push((ue.bottom+ve.top)/2-x.top)}}U.push(x.bottom-x.top)}}function tp(A,p,x){if(A.line==p)return{map:A.measure.map,cache:A.measure.cache};if(A.rest){for(var b=0;b<A.rest.length;b++)if(A.rest[b]==p)return{map:A.measure.maps[b],cache:A.measure.caches[b]};for(var B=0;B<A.rest.length;B++)if(_e(A.rest[B])>x)return{map:A.measure.maps[B],cache:A.measure.caches[B],before:!0}}}function tm(A,p){p=vr(p);var x=_e(p),b=A.display.externalMeasured=new qA(A.doc,p,x);b.lineN=x;var B=b.built=ld(A,b);return b.text=B.pre,$e(A.display.lineMeasure,B.pre),b}function Kc(A,p,x,b){return Sl(A,Rl(A,p),x,b)}function cd(A,p){if(p>=A.display.viewFrom&&p<A.display.viewTo)return A.display.view[JA(A,p)];var x=A.display.externalMeasured;if(x&&p>=x.lineN&&p<x.lineN+x.size)return x}function Rl(A,p){var x=_e(p),b=cd(A,x);b&&!b.text?b=null:b&&b.changes&&(jh(A,b,x,ls(A)),A.curOp.forceUpdate=!0),b||(b=tm(A,p));var B=tp(b,p,x);return{line:p,view:b,rect:null,map:B.map,cache:B.cache,before:B.before,hasHeights:!1}}function Sl(A,p,x,b,B){p.before&&(x=-1);var U=x+(b||""),q;return p.cache.hasOwnProperty(U)?q=p.cache[U]:(p.rect||(p.rect=p.view.text.getBoundingClientRect()),p.hasHeights||(XA(A,p.view,p.rect),p.hasHeights=!0),q=Bu(A,p,x,b),q.bogus||(p.cache[U]=q)),{left:q.left,right:q.right,top:B?q.rtop:q.top,bottom:B?q.rbottom:q.bottom}}var ya={left:0,right:0,top:0,bottom:0};function MA(A,p,x){for(var b,B,U,q,ne,ue,ve=0;ve<A.length;ve+=3)if(ne=A[ve],ue=A[ve+1],p<ne?(B=0,U=1,q="left"):p<ue?(B=p-ne,U=B+1):(ve==A.length-3||p==ue&&A[ve+3]>p)&&(U=ue-ne,B=U-1,p>=ue&&(q="right")),B!=null){if(b=A[ve+2],ne==ue&&x==(b.insertLeft?"left":"right")&&(q=x),x=="left"&&B==0)for(;ve&&A[ve-2]==A[ve-3]&&A[ve-1].insertLeft;)b=A[(ve-=3)+2],q="left";if(x=="right"&&B==ue-ne)for(;ve<A.length-3&&A[ve+3]==A[ve+4]&&!A[ve+5].insertLeft;)b=A[(ve+=3)+2],q="right";break}return{node:b,start:B,end:U,collapse:q,coverStart:ne,coverEnd:ue}}function zl(A,p){var x=ya;if(p=="left")for(var b=0;b<A.length&&(x=A[b]).left==x.right;b++);else for(var B=A.length-1;B>=0&&(x=A[B]).left==x.right;B--);return x}function Bu(A,p,x,b){var B=MA(p.map,x,b),U=B.node,q=B.start,ne=B.end,ue=B.collapse,ve;if(U.nodeType==3){for(var Qe=0;Qe<4;Qe++){for(;q&&Ke(p.line.text.charAt(B.coverStart+q));)--q;for(;B.coverStart+ne<B.coverEnd&&Ke(p.line.text.charAt(B.coverStart+ne));)++ne;if(d&&f<9&&q==0&&ne==B.coverEnd-B.coverStart?ve=U.parentNode.getBoundingClientRect():ve=zl(yt(U,q,ne).getClientRects(),b),ve.left||ve.right||q==0)break;ne=q,q=q-1,ue="right"}d&&f<11&&(ve=jl(A.display.measure,ve))}else{q>0&&(ue=b="right");var nt;A.options.lineWrapping&&(nt=U.getClientRects()).length>1?ve=nt[b=="right"?nt.length-1:0]:ve=U.getBoundingClientRect()}if(d&&f<9&&!q&&(!ve||!ve.left&&!ve.right)){var Ot=U.parentNode.getClientRects()[0];Ot?ve={left:Ot.left,right:Ot.left+qu(A.display),top:Ot.top,bottom:Ot.bottom}:ve=ya}for(var Ct=ve.top-p.rect.top,Nt=ve.bottom-p.rect.top,cn=(Ct+Nt)/2,kn=p.view.measure.heights,Vn=0;Vn<kn.length-1&&!(cn<kn[Vn]);Vn++);var bn=Vn?kn[Vn-1]:0,Rn=kn[Vn],lr={left:(ue=="right"?ve.right:ve.left)-p.rect.left,right:(ue=="left"?ve.left:ve.right)-p.rect.left,top:bn,bottom:Rn};return!ve.left&&!ve.right&&(lr.bogus=!0),A.options.singleCursorHeightPerLine||(lr.rtop=Ct,lr.rbottom=Nt),lr}function jl(A,p){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fr(A))return p;var x=screen.logicalXDPI/screen.deviceXDPI,b=screen.logicalYDPI/screen.deviceYDPI;return{left:p.left*x,right:p.right*x,top:p.top*b,bottom:p.bottom*b}}function Zd(A){if(A.measure&&(A.measure.cache={},A.measure.heights=null,A.rest))for(var p=0;p<A.rest.length;p++)A.measure.caches[p]={}}function Pc(A){A.display.externalMeasure=null,he(A.display.lineMeasure);for(var p=0;p<A.display.view.length;p++)Zd(A.display.view[p])}function Iu(A){Pc(A),A.display.cachedCharWidth=A.display.cachedTextHeight=A.display.cachedPaddingH=null,A.options.lineWrapping||(A.display.maxLineChanged=!0),A.display.lineNumChars=null}function Dc(A){return E&&Z?-(A.body.getBoundingClientRect().left-parseInt(getComputedStyle(A.body).marginLeft)):A.defaultView.pageXOffset||(A.documentElement||A.body).scrollLeft}function dd(A){return E&&Z?-(A.body.getBoundingClientRect().top-parseInt(getComputedStyle(A.body).marginTop)):A.defaultView.pageYOffset||(A.documentElement||A.body).scrollTop}function Xd(A){var p=vr(A),x=p.widgets,b=0;if(x)for(var B=0;B<x.length;++B)x[B].above&&(b+=au(x[B]));return b}function su(A,p,x,b,B){if(!B){var U=Xd(p);x.top+=U,x.bottom+=U}if(b=="line")return x;b||(b="local");var q=Io(p);if(b=="local"?q+=Tc(A.display):q-=A.display.viewOffset,b=="page"||b=="window"){var ne=A.display.lineSpace.getBoundingClientRect();q+=ne.top+(b=="window"?0:dd(Jt(A)));var ue=ne.left+(b=="window"?0:Dc(Jt(A)));x.left+=ue,x.right+=ue}return x.top+=q,x.bottom+=q,x}function Et(A,p,x){if(x=="div")return p;var b=p.left,B=p.top;if(x=="page")b-=Dc(Jt(A)),B-=dd(Jt(A));else if(x=="local"||!x){var U=A.display.sizer.getBoundingClientRect();b+=U.left,B+=U.top}var q=A.display.lineSpace.getBoundingClientRect();return{left:b-q.left,top:B-q.top}}function an(A,p,x,b,B){return b||(b=Gn(A.doc,p.line)),su(A,b,Kc(A,b,p.ch,B),x)}function jt(A,p,x,b,B,U){b=b||Gn(A.doc,p.line),B||(B=Rl(A,b));function q(Nt,cn){var kn=Sl(A,B,Nt,cn?"right":"left",U);return cn?kn.left=kn.right:kn.right=kn.left,su(A,b,kn,x)}var ne=On(b,A.doc.direction),ue=p.ch,ve=p.sticky;if(ue>=b.text.length?(ue=b.text.length,ve="before"):ue<=0&&(ue=0,ve="after"),!ne)return q(ve=="before"?ue-1:ue,ve=="before");function Qe(Nt,cn,kn){var Vn=ne[cn],bn=Vn.level==1;return q(kn?Nt-1:Nt,bn!=kn)}var nt=fn(ne,ue,ve),Ot=Lt,Ct=Qe(ue,nt,ve=="before");return Ot!=null&&(Ct.other=Qe(ue,Ot,ve!="before")),Ct}function fr(A,p){var x=0;p=Dr(A.doc,p),A.options.lineWrapping||(x=qu(A.display)*p.ch);var b=Gn(A.doc,p.line),B=Io(b)+Tc(A.display);return{left:x,right:x,top:B,bottom:B+b.height}}function ui(A,p,x,b,B){var U=Ft(A,p,x);return U.xRel=B,b&&(U.outside=b),U}function oo(A,p,x){var b=A.doc;if(x+=A.display.viewOffset,x<0)return ui(b.first,0,null,-1,-1);var B=Je(b,x),U=b.first+b.size-1;if(B>U)return ui(b.first+b.size-1,Gn(b,U).text.length,null,1,1);p<0&&(p=0);for(var q=Gn(b,B);;){var ne=Jd(A,q,B,p,x),ue=Kn(q,ne.ch+(ne.xRel>0||ne.outside>0?1:0));if(!ue)return ne;var ve=ue.find(1);if(ve.line==B)return ve;q=Gn(b,B=ve.line)}}function Pa(A,p,x,b){b-=Xd(p);var B=p.text.length,U=Bt(function(q){return Sl(A,x,q-1).bottom<=b},B,0);return B=Bt(function(q){return Sl(A,x,q).top>b},U,B),{begin:U,end:B}}function Ko(A,p,x,b){x||(x=Rl(A,p));var B=su(A,p,Sl(A,x,b),"line").top;return Pa(A,p,x,B)}function SA(A,p,x,b){return A.bottom<=x?!1:A.top>x?!0:(b?A.left:A.right)>p}function Jd(A,p,x,b,B){B-=Io(p);var U=Rl(A,p),q=Xd(p),ne=0,ue=p.text.length,ve=!0,Qe=On(p,A.doc.direction);if(Qe){var nt=(A.options.lineWrapping?EA:Po)(A,p,x,U,Qe,b,B);ve=nt.level!=1,ne=ve?nt.from:nt.to-1,ue=ve?nt.to:nt.from-1}var Ot=null,Ct=null,Nt=Bt(function(Tr){var _r=Sl(A,U,Tr);return _r.top+=q,_r.bottom+=q,SA(_r,b,B,!1)?(_r.top<=B&&_r.left<=b&&(Ot=Tr,Ct=_r),!0):!1},ne,ue),cn,kn,Vn=!1;if(Ct){var bn=b-Ct.left<Ct.right-b,Rn=bn==ve;Nt=Ot+(Rn?0:1),kn=Rn?"after":"before",cn=bn?Ct.left:Ct.right}else{!ve&&(Nt==ue||Nt==ne)&&Nt++,kn=Nt==0?"after":Nt==p.text.length?"before":Sl(A,U,Nt-(ve?1:0)).bottom+q<=B==ve?"after":"before";var lr=jt(A,Ft(x,Nt,kn),"line",p,U);cn=lr.left,Vn=B<lr.top?-1:B>=lr.bottom?1:0}return Nt=At(p.text,Nt,1),ui(x,Nt,kn,Vn,b-cn)}function Po(A,p,x,b,B,U,q){var ne=Bt(function(nt){var Ot=B[nt],Ct=Ot.level!=1;return SA(jt(A,Ft(x,Ct?Ot.to:Ot.from,Ct?"before":"after"),"line",p,b),U,q,!0)},0,B.length-1),ue=B[ne];if(ne>0){var ve=ue.level!=1,Qe=jt(A,Ft(x,ve?ue.from:ue.to,ve?"after":"before"),"line",p,b);SA(Qe,U,q,!0)&&Qe.top>q&&(ue=B[ne-1])}return ue}function EA(A,p,x,b,B,U,q){var ne=Pa(A,p,b,q),ue=ne.begin,ve=ne.end;/\s/.test(p.text.charAt(ve-1))&&ve--;for(var Qe=null,nt=null,Ot=0;Ot<B.length;Ot++){var Ct=B[Ot];if(!(Ct.from>=ve||Ct.to<=ue)){var Nt=Ct.level!=1,cn=Sl(A,b,Nt?Math.min(ve,Ct.to)-1:Math.max(ue,Ct.from)).right,kn=cn<U?U-cn+1e9:cn-U;(!Qe||nt>kn)&&(Qe=Ct,nt=kn)}}return Qe||(Qe=B[B.length-1]),Qe.from<ue&&(Qe={from:ue,to:Qe.to,level:Qe.level}),Qe.to>ve&&(Qe={from:Qe.from,to:ve,level:Qe.level}),Qe}var ws;function Qa(A){if(A.cachedTextHeight!=null)return A.cachedTextHeight;if(ws==null){ws=ye("pre",null,"CodeMirror-line-like");for(var p=0;p<49;++p)ws.appendChild(document.createTextNode("x")),ws.appendChild(ye("br"));ws.appendChild(document.createTextNode("x"))}$e(A.measure,ws);var x=ws.offsetHeight/50;return x>3&&(A.cachedTextHeight=x),he(A.measure),x||1}function qu(A){if(A.cachedCharWidth!=null)return A.cachedCharWidth;var p=ye("span","xxxxxxxxxx"),x=ye("pre",[p],"CodeMirror-line-like");$e(A.measure,x);var b=p.getBoundingClientRect(),B=(b.right-b.left)/10;return B>2&&(A.cachedCharWidth=B),B||10}function ls(A){for(var p=A.display,x={},b={},B=p.gutters.clientLeft,U=p.gutters.firstChild,q=0;U;U=U.nextSibling,++q){var ne=A.display.gutterSpecs[q].className;x[ne]=U.offsetLeft+U.clientLeft+B,b[ne]=U.clientWidth}return{fixedPos:Hi(p),gutterTotalWidth:p.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:p.wrapper.clientWidth}}function Hi(A){return A.scroller.getBoundingClientRect().left-A.sizer.getBoundingClientRect().left}function Gh(A){var p=Qa(A.display),x=A.options.lineWrapping,b=x&&Math.max(5,A.display.scroller.clientWidth/qu(A.display)-3);return function(B){if(Zr(A.doc,B))return 0;var U=0;if(B.widgets)for(var q=0;q<B.widgets.length;q++)B.widgets[q].height&&(U+=B.widgets[q].height);return x?U+(Math.ceil(B.text.length/b)||1)*p:U+p}}function $h(A){var p=A.doc,x=Gh(A);p.iter(function(b){var B=x(b);B!=b.height&&Ri(b,B)})}function lu(A,p,x,b){var B=A.display;if(!x&&Mt(p).getAttribute("cm-not-content")=="true")return null;var U,q,ne=B.lineSpace.getBoundingClientRect();try{U=p.clientX-ne.left,q=p.clientY-ne.top}catch{return null}var ue=oo(A,U,q),ve;if(b&&ue.xRel>0&&(ve=Gn(A.doc,ue.line).text).length==ue.ch){var Qe=ge(ve,ve.length,A.options.tabSize)-ve.length;ue=Ft(ue.line,Math.max(0,Math.round((U-Hd(A.display).left)/qu(A.display))-Qe))}return ue}function JA(A,p){if(p>=A.display.viewTo||(p-=A.display.viewFrom,p<0))return null;for(var x=A.display.view,b=0;b<x.length;b++)if(p-=x[b].size,p<0)return b}function va(A,p,x,b){p==null&&(p=A.doc.first),x==null&&(x=A.doc.first+A.doc.size),b||(b=0);var B=A.display;if(b&&x<B.viewTo&&(B.updateLineNumbers==null||B.updateLineNumbers>p)&&(B.updateLineNumbers=p),A.curOp.viewChanged=!0,p>=B.viewTo)xs&&po(A.doc,p)<B.viewTo&&Qn(A);else if(x<=B.viewFrom)xs&&Oi(A.doc,x+b)>B.viewFrom?Qn(A):(B.viewFrom+=b,B.viewTo+=b);else if(p<=B.viewFrom&&x>=B.viewTo)Qn(A);else if(p<=B.viewFrom){var U=Nl(A,x,x+b,1);U?(B.view=B.view.slice(U.index),B.viewFrom=U.lineN,B.viewTo+=b):Qn(A)}else if(x>=B.viewTo){var q=Nl(A,p,p,-1);q?(B.view=B.view.slice(0,q.index),B.viewTo=q.lineN):Qn(A)}else{var ne=Nl(A,p,p,-1),ue=Nl(A,x,x+b,1);ne&&ue?(B.view=B.view.slice(0,ne.index).concat(kc(A,ne.lineN,ue.lineN)).concat(B.view.slice(ue.index)),B.viewTo+=b):Qn(A)}var ve=B.externalMeasured;ve&&(x<ve.lineN?ve.lineN+=b:p<ve.lineN+ve.size&&(B.externalMeasured=null))}function dl(A,p,x){A.curOp.viewChanged=!0;var b=A.display,B=A.display.externalMeasured;if(B&&p>=B.lineN&&p<B.lineN+B.size&&(b.externalMeasured=null),!(p<b.viewFrom||p>=b.viewTo)){var U=b.view[JA(A,p)];if(U.node!=null){var q=U.changes||(U.changes=[]);ze(q,x)==-1&&q.push(x)}}}function Qn(A){A.display.viewFrom=A.display.viewTo=A.doc.first,A.display.view=[],A.display.viewOffset=0}function Nl(A,p,x,b){var B=JA(A,p),U,q=A.display.view;if(!xs||x==A.doc.first+A.doc.size)return{index:B,lineN:x};for(var ne=A.display.viewFrom,ue=0;ue<B;ue++)ne+=q[ue].size;if(ne!=p){if(b>0){if(B==q.length-1)return null;U=ne+q[B].size-p,B++}else U=ne-p;p+=U,x+=U}for(;po(A.doc,x)!=x;){if(B==(b<0?0:q.length-1))return null;x+=b*q[B-(b<0?1:0)].size,B+=b}return{index:B,lineN:x}}function Vu(A,p,x){var b=A.display,B=b.view;B.length==0||p>=b.viewTo||x<=b.viewFrom?(b.view=kc(A,p,x),b.viewFrom=p):(b.viewFrom>p?b.view=kc(A,p,b.viewFrom).concat(b.view):b.viewFrom<p&&(b.view=b.view.slice(JA(A,p))),b.viewFrom=p,b.viewTo<x?b.view=b.view.concat(kc(A,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,JA(A,x)))),b.viewTo=x}function ec(A){for(var p=A.display.view,x=0,b=0;b<p.length;b++){var B=p[b];!B.hidden&&(!B.node||B.changes)&&++x}return x}function Hu(A){A.display.input.showSelection(A.display.input.prepareSelection())}function Jn(A,p){p===void 0&&(p=!0);var x=A.doc,b={},B=b.cursors=document.createDocumentFragment(),U=b.selection=document.createDocumentFragment(),q=A.options.$customCursor;q&&(p=!0);for(var ne=0;ne<x.sel.ranges.length;ne++)if(!(!p&&ne==x.sel.primIndex)){var ue=x.sel.ranges[ne];if(!(ue.from().line>=A.display.viewTo||ue.to().line<A.display.viewFrom)){var ve=ue.empty();if(q){var Qe=q(A,ue);Qe&&tc(A,Qe,B)}else(ve||A.options.showCursorWhenSelecting)&&tc(A,ue.head,B);ve||np(A,ue,U)}}return b}function tc(A,p,x){var b=jt(A,p,"div",null,null,!A.options.singleCursorHeightPerLine),B=x.appendChild(ye("div"," ","CodeMirror-cursor"));if(B.style.left=b.left+"px",B.style.top=b.top+"px",B.style.height=Math.max(0,b.bottom-b.top)*A.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(A.getWrapperElement().className)){var U=an(A,p,"div",null,null),q=U.right-U.left;B.style.width=(q>0?q:A.defaultCharWidth())+"px"}if(b.other){var ne=x.appendChild(ye("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));ne.style.display="",ne.style.left=b.other.left+"px",ne.style.top=b.other.top+"px",ne.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Zu(A,p){return A.top-p.top||A.left-p.left}function np(A,p,x){var b=A.display,B=A.doc,U=document.createDocumentFragment(),q=Hd(A.display),ne=q.left,ue=Math.max(b.sizerWidth,wA(A)-b.sizer.offsetLeft)-q.right,ve=B.direction=="ltr";function Qe(Rn,lr,Tr,_r){lr<0&&(lr=0),lr=Math.round(lr),_r=Math.round(_r),U.appendChild(ye("div",null,"CodeMirror-selected","position: absolute; left: "+Rn+`px;
                             top: `+lr+"px; width: "+(Tr??ue-Rn)+`px;
                             height: `+(_r-lr)+"px"))}function nt(Rn,lr,Tr){var _r=Gn(B,Rn),fi=_r.text.length,Ro,qa;function xa(cs,Ol){return an(A,Ft(Rn,cs),"div",_r,Ol)}function Fa(cs,Ol,tl){var Bs=Ko(A,_r,null,cs),ds=Ol=="ltr"==(tl=="after")?"left":"right",ha=tl=="after"?Bs.begin:Bs.end-(/\s/.test(_r.text.charAt(Bs.end-1))?2:1);return xa(ha,ds)[ds]}var As=On(_r,B.direction);return kt(As,lr||0,Tr??fi,function(cs,Ol,tl,Bs){var ds=tl=="ltr",ha=xa(cs,ds?"left":"right"),Is=xa(Ol-1,ds?"right":"left"),fh=lr==null&&cs==0,dc=Tr==null&&Ol==fi,js=Bs==0,hc=!As||Bs==As.length-1;if(Is.top-ha.top<=3){var Ns=(ve?fh:dc)&&js,K0=(ve?dc:fh)&&hc,TA=Ns?ne:(ds?ha:Is).left,Nc=K0?ue:(ds?Is:ha).right;Qe(TA,ha.top,Nc-TA,ha.bottom)}else{var Va,nl,ph,fc;ds?(Va=ve&&fh&&js?ne:ha.left,nl=ve?ue:Fa(cs,tl,"before"),ph=ve?ne:Fa(Ol,tl,"after"),fc=ve&&dc&&hc?ue:Is.right):(Va=ve?Fa(cs,tl,"before"):ne,nl=!ve&&fh&&js?ue:ha.right,ph=!ve&&dc&&hc?ne:Is.left,fc=ve?Fa(Ol,tl,"after"):ue),Qe(Va,ha.top,nl-Va,ha.bottom),ha.bottom<Is.top&&Qe(ne,ha.bottom,null,Is.top),Qe(ph,Is.top,fc-ph,Is.bottom)}(!Ro||Zu(ha,Ro)<0)&&(Ro=ha),Zu(Is,Ro)<0&&(Ro=Is),(!qa||Zu(ha,qa)<0)&&(qa=ha),Zu(Is,qa)<0&&(qa=Is)}),{start:Ro,end:qa}}var Ot=p.from(),Ct=p.to();if(Ot.line==Ct.line)nt(Ot.line,Ot.ch,Ct.ch);else{var Nt=Gn(B,Ot.line),cn=Gn(B,Ct.line),kn=vr(Nt)==vr(cn),Vn=nt(Ot.line,Ot.ch,kn?Nt.text.length+1:null).end,bn=nt(Ct.line,kn?0:null,Ct.ch).start;kn&&(Vn.top<bn.top-2?(Qe(Vn.right,Vn.top,null,Vn.bottom),Qe(ne,bn.top,bn.left,bn.bottom)):Qe(Vn.right,Vn.top,bn.left-Vn.right,Vn.bottom)),Vn.bottom<bn.top&&Qe(ne,Vn.bottom,null,bn.top)}x.appendChild(U)}function Xu(A){if(A.state.focused){var p=A.display;clearInterval(p.blinker);var x=!0;p.cursorDiv.style.visibility="",A.options.cursorBlinkRate>0?p.blinker=setInterval(function(){A.hasFocus()||Lc(A),p.cursorDiv.style.visibility=(x=!x)?"":"hidden"},A.options.cursorBlinkRate):A.options.cursorBlinkRate<0&&(p.cursorDiv.style.visibility="hidden")}}function Ju(A){A.hasFocus()||(A.display.input.focus(),A.state.focused||eh(A))}function nc(A){A.state.delayingBlurEvent=!0,setTimeout(function(){A.state.delayingBlurEvent&&(A.state.delayingBlurEvent=!1,A.state.focused&&Lc(A))},100)}function eh(A,p){A.state.delayingBlurEvent&&!A.state.draggingText&&(A.state.delayingBlurEvent=!1),A.options.readOnly!="nocursor"&&(A.state.focused||(Le(A,"focus",A,p),A.state.focused=!0,Re(A.display.wrapper,"CodeMirror-focused"),!A.curOp&&A.display.selForContextMenu!=A.doc.sel&&(A.display.input.reset(),C&&setTimeout(function(){return A.display.input.reset(!0)},20)),A.display.input.receivedFocus()),Xu(A))}function Lc(A,p){A.state.delayingBlurEvent||(A.state.focused&&(Le(A,"blur",A,p),A.state.focused=!1,Pe(A.display.wrapper,"CodeMirror-focused")),clearInterval(A.display.blinker),setTimeout(function(){A.state.focused||(A.display.shift=!1)},150))}function eA(A){for(var p=A.display,x=p.lineDiv.offsetTop,b=Math.max(0,p.scroller.getBoundingClientRect().top),B=p.lineDiv.getBoundingClientRect().top,U=0,q=0;q<p.view.length;q++){var ne=p.view[q],ue=A.options.lineWrapping,ve=void 0,Qe=0;if(!ne.hidden){if(B+=ne.line.height,d&&f<8){var nt=ne.node.offsetTop+ne.node.offsetHeight;ve=nt-x,x=nt}else{var Ot=ne.node.getBoundingClientRect();ve=Ot.bottom-Ot.top,!ue&&ne.text.firstChild&&(Qe=ne.text.firstChild.getBoundingClientRect().right-Ot.left-1)}var Ct=ne.line.height-ve;if((Ct>.005||Ct<-.005)&&(B<b&&(U-=Ct),Ri(ne.line,ve),Mo(ne.line),ne.rest))for(var Nt=0;Nt<ne.rest.length;Nt++)Mo(ne.rest[Nt]);if(Qe>A.display.sizerWidth){var cn=Math.ceil(Qe/qu(A.display));cn>A.display.maxLineLength&&(A.display.maxLineLength=cn,A.display.maxLine=ne.line,A.display.maxLineChanged=!0)}}}Math.abs(U)>2&&(p.scroller.scrollTop+=U)}function Mo(A){if(A.widgets)for(var p=0;p<A.widgets.length;++p){var x=A.widgets[p],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function tA(A,p,x){var b=x&&x.top!=null?Math.max(0,x.top):A.scroller.scrollTop;b=Math.floor(b-Tc(A));var B=x&&x.bottom!=null?x.bottom:b+A.wrapper.clientHeight,U=Je(p,b),q=Je(p,B);if(x&&x.ensure){var ne=x.ensure.from.line,ue=x.ensure.to.line;ne<U?(U=ne,q=Je(p,Io(Gn(p,ne))+A.wrapper.clientHeight)):Math.min(ue,p.lastLine())>=q&&(U=Je(p,Io(Gn(p,ue))-A.wrapper.clientHeight),q=ue)}return{from:U,to:Math.max(q,U+1)}}function hd(A,p){if(!ce(A,"scrollCursorIntoView")){var x=A.display,b=x.sizer.getBoundingClientRect(),B=null,U=x.wrapper.ownerDocument;if(p.top+b.top<0?B=!0:p.bottom+b.top>(U.defaultView.innerHeight||U.documentElement.clientHeight)&&(B=!1),B!=null&&!Q){var q=ye("div","​",null,`position: absolute;
                         top: `+(p.top-x.viewOffset-Tc(A.display))+`px;
                         height: `+(p.bottom-p.top+Ou(A)+x.barHeight)+`px;
                         left: `+p.left+"px; width: "+Math.max(2,p.right-p.left)+"px;");A.display.lineSpace.appendChild(q),q.scrollIntoView(B),A.display.lineSpace.removeChild(q)}}}function rp(A,p,x,b){b==null&&(b=0);var B;!A.options.lineWrapping&&p==x&&(x=p.sticky=="before"?Ft(p.line,p.ch+1,"before"):p,p=p.ch?Ft(p.line,p.sticky=="before"?p.ch-1:p.ch,"after"):p);for(var U=0;U<5;U++){var q=!1,ne=jt(A,p),ue=!x||x==p?ne:jt(A,x);B={left:Math.min(ne.left,ue.left),top:Math.min(ne.top,ue.top)-b,right:Math.max(ne.left,ue.left),bottom:Math.max(ne.bottom,ue.bottom)+b};var ve=Yh(A,B),Qe=A.doc.scrollTop,nt=A.doc.scrollLeft;if(ve.scrollTop!=null&&(Fc(A,ve.scrollTop),Math.abs(A.doc.scrollTop-Qe)>1&&(q=!0)),ve.scrollLeft!=null&&(da(A,ve.scrollLeft),Math.abs(A.doc.scrollLeft-nt)>1&&(q=!0)),!q)break}return B}function Qh(A,p){var x=Yh(A,p);x.scrollTop!=null&&Fc(A,x.scrollTop),x.scrollLeft!=null&&da(A,x.scrollLeft)}function Yh(A,p){var x=A.display,b=Qa(A.display);p.top<0&&(p.top=0);var B=A.curOp&&A.curOp.scrollTop!=null?A.curOp.scrollTop:x.scroller.scrollTop,U=ZA(A),q={};p.bottom-p.top>U&&(p.bottom=p.top+U);var ne=A.doc.height+Wh(x),ue=p.top<b,ve=p.bottom>ne-b;if(p.top<B)q.scrollTop=ue?0:p.top;else if(p.bottom>B+U){var Qe=Math.min(p.top,(ve?ne:p.bottom)-U);Qe!=B&&(q.scrollTop=Qe)}var nt=A.options.fixedGutter?0:x.gutters.offsetWidth,Ot=A.curOp&&A.curOp.scrollLeft!=null?A.curOp.scrollLeft:x.scroller.scrollLeft-nt,Ct=wA(A)-x.gutters.offsetWidth,Nt=p.right-p.left>Ct;return Nt&&(p.right=p.left+Ct),p.left<10?q.scrollLeft=0:p.left<Ot?q.scrollLeft=Math.max(0,p.left+nt-(Nt?0:10)):p.right>Ct+Ot-3&&(q.scrollLeft=p.right+(Nt?0:10)-Ct),q}function ip(A,p){p!=null&&(Ir(A),A.curOp.scrollTop=(A.curOp.scrollTop==null?A.doc.scrollTop:A.curOp.scrollTop)+p)}function ao(A){Ir(A);var p=A.getCursor();A.curOp.scrollToPos={from:p,to:p,margin:A.options.cursorScrollMargin}}function ca(A,p,x){(p!=null||x!=null)&&Ir(A),p!=null&&(A.curOp.scrollLeft=p),x!=null&&(A.curOp.scrollTop=x)}function xr(A,p){Ir(A),A.curOp.scrollToPos=p}function Ir(A){var p=A.curOp.scrollToPos;if(p){A.curOp.scrollToPos=null;var x=fr(A,p.from),b=fr(A,p.to);OA(A,x,b,p.margin)}}function OA(A,p,x,b){var B=Yh(A,{left:Math.min(p.left,x.left),top:Math.min(p.top,x.top)-b,right:Math.max(p.right,x.right),bottom:Math.max(p.bottom,x.bottom)+b});ca(A,B.scrollLeft,B.scrollTop)}function Fc(A,p){Math.abs(A.doc.scrollTop-p)<2||(i||Wl(A,{top:p}),rc(A,p,!0),i&&Wl(A),ac(A,100))}function rc(A,p,x){p=Math.max(0,Math.min(A.display.scroller.scrollHeight-A.display.scroller.clientHeight,p)),!(A.display.scroller.scrollTop==p&&!x)&&(A.doc.scrollTop=p,A.display.scrollbars.setScrollTop(p),A.display.scroller.scrollTop!=p&&(A.display.scroller.scrollTop=p))}function da(A,p,x,b){p=Math.max(0,Math.min(p,A.display.scroller.scrollWidth-A.display.scroller.clientWidth)),!((x?p==A.doc.scrollLeft:Math.abs(A.doc.scrollLeft-p)<2)&&!b)&&(A.doc.scrollLeft=p,I(A),A.display.scroller.scrollLeft!=p&&(A.display.scroller.scrollLeft=p),A.display.scrollbars.setScrollLeft(p))}function ic(A){var p=A.display,x=p.gutters.offsetWidth,b=Math.round(A.doc.height+Wh(A.display));return{clientHeight:p.scroller.clientHeight,viewHeight:p.wrapper.clientHeight,scrollWidth:p.scroller.scrollWidth,clientWidth:p.scroller.clientWidth,viewWidth:p.wrapper.clientWidth,barLeft:A.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Ou(A)+p.barHeight,nativeBarWidth:p.nativeBarWidth,gutterWidth:x}}var ka=function(A,p,x){this.cm=x;var b=this.vert=ye("div",[ye("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),B=this.horiz=ye("div",[ye("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=B.tabIndex=-1,A(b),A(B),Kt(b,"scroll",function(){b.clientHeight&&p(b.scrollTop,"vertical")}),Kt(B,"scroll",function(){B.clientWidth&&p(B.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&f<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ka.prototype.update=function(A){var p=A.scrollWidth>A.clientWidth+1,x=A.scrollHeight>A.clientHeight+1,b=A.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=p?b+"px":"0";var B=A.viewHeight-(p?b:0);this.vert.firstChild.style.height=Math.max(0,A.scrollHeight-A.clientHeight+B)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(p){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=A.barLeft+"px";var U=A.viewWidth-A.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,A.scrollWidth-A.clientWidth+U)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&A.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:p?b:0}},ka.prototype.setScrollLeft=function(A){this.horiz.scrollLeft!=A&&(this.horiz.scrollLeft=A),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ka.prototype.setScrollTop=function(A){this.vert.scrollTop!=A&&(this.vert.scrollTop=A),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ka.prototype.zeroWidthHack=function(){var A=pe&&!H?"12px":"18px";this.horiz.style.height=this.vert.style.width=A,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Se,this.disableVert=new Se},ka.prototype.enableZeroWidthBar=function(A,p,x){A.style.visibility="";function b(){var B=A.getBoundingClientRect(),U=x=="vert"?document.elementFromPoint(B.right-1,(B.top+B.bottom)/2):document.elementFromPoint((B.right+B.left)/2,B.bottom-1);U!=A?A.style.visibility="hidden":p.set(1e3,b)}p.set(1e3,b)},ka.prototype.clear=function(){var A=this.horiz.parentNode;A.removeChild(this.horiz),A.removeChild(this.vert)};var nA=function(){};nA.prototype.update=function(){return{bottom:0,right:0}},nA.prototype.setScrollLeft=function(){},nA.prototype.setScrollTop=function(){},nA.prototype.clear=function(){};function hl(A,p){p||(p=ic(A));var x=A.display.barWidth,b=A.display.barHeight;$o(A,p);for(var B=0;B<4&&x!=A.display.barWidth||b!=A.display.barHeight;B++)x!=A.display.barWidth&&A.options.lineWrapping&&eA(A),$o(A,ic(A)),x=A.display.barWidth,b=A.display.barHeight}function $o(A,p){var x=A.display,b=x.scrollbars.update(p);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&A.options.coverGutterNextToScrollbar&&A.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=p.gutterWidth+"px"):x.gutterFiller.style.display=""}var Qo={native:ka,null:nA};function op(A){A.display.scrollbars&&(A.display.scrollbars.clear(),A.display.scrollbars.addClass&&Pe(A.display.wrapper,A.display.scrollbars.addClass)),A.display.scrollbars=new Qo[A.options.scrollbarStyle](function(p){A.display.wrapper.insertBefore(p,A.display.scrollbarFiller),Kt(p,"mousedown",function(){A.state.focused&&setTimeout(function(){return A.display.input.focus()},0)}),p.setAttribute("cm-not-content","true")},function(p,x){x=="horizontal"?da(A,p):Fc(A,p)},A),A.display.scrollbars.addClass&&Re(A.display.wrapper,A.display.scrollbars.addClass)}var th=0;function rA(A){A.curOp={cm:A,viewChanged:!1,startHeight:A.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++th,markArrays:null},Ad(A.curOp)}function El(A){var p=A.curOp;p&&zh(p,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;ap(x)})}function ap(A){for(var p=A.ops,x=0;x<p.length;x++)fd(p[x]);for(var b=0;b<p.length;b++)BA(p[b]);for(var B=0;B<p.length;B++)qh(p[B]);for(var U=0;U<p.length;U++)Fe(p[U]);for(var q=0;q<p.length;q++)oc(p[q])}function fd(A){var p=A.cm,x=p.display;md(p),A.updateMaxLine&&$a(p),A.mustUpdate=A.viewChanged||A.forceUpdate||A.scrollTop!=null||A.scrollToPos&&(A.scrollToPos.from.line<x.viewFrom||A.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&p.options.lineWrapping,A.update=A.mustUpdate&&new uu(p,A.mustUpdate&&{top:A.scrollTop,ensure:A.scrollToPos},A.forceUpdate)}function BA(A){A.updatedDisplay=A.mustUpdate&&gd(A.cm,A.update)}function qh(A){var p=A.cm,x=p.display;A.updatedDisplay&&eA(p),A.barMeasure=ic(p),x.maxLineChanged&&!p.options.lineWrapping&&(A.adjustWidthTo=Kc(p,x.maxLine,x.maxLine.text.length).left+3,p.display.sizerWidth=A.adjustWidthTo,A.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+A.adjustWidthTo+Ou(p)+p.display.barWidth),A.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+A.adjustWidthTo-wA(p))),(A.updatedDisplay||A.selectionChanged)&&(A.preparedSelection=x.input.prepareSelection())}function Fe(A){var p=A.cm;A.adjustWidthTo!=null&&(p.display.sizer.style.minWidth=A.adjustWidthTo+"px",A.maxScrollLeft<p.doc.scrollLeft&&da(p,Math.min(p.display.scroller.scrollLeft,A.maxScrollLeft),!0),p.display.maxLineChanged=!1);var x=A.focus&&A.focus==ft(Ht(p));A.preparedSelection&&p.display.input.showSelection(A.preparedSelection,x),(A.updatedDisplay||A.startHeight!=p.doc.height)&&hl(p,A.barMeasure),A.updatedDisplay&&Vh(p,A.barMeasure),A.selectionChanged&&Xu(p),p.state.focused&&A.updateInput&&p.display.input.reset(A.typing),x&&Ju(A.cm)}function oc(A){var p=A.cm,x=p.display,b=p.doc;if(A.updatedDisplay&&lc(p,A.update),x.wheelStartX!=null&&(A.scrollTop!=null||A.scrollLeft!=null||A.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),A.scrollTop!=null&&rc(p,A.scrollTop,A.forceScroll),A.scrollLeft!=null&&da(p,A.scrollLeft,!0,!0),A.scrollToPos){var B=rp(p,Dr(b,A.scrollToPos.from),Dr(b,A.scrollToPos.to),A.scrollToPos.margin);hd(p,B)}var U=A.maybeHiddenMarkers,q=A.maybeUnhiddenMarkers;if(U)for(var ne=0;ne<U.length;++ne)U[ne].lines.length||Le(U[ne],"hide");if(q)for(var ue=0;ue<q.length;++ue)q[ue].lines.length&&Le(q[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=p.display.scroller.scrollTop),A.changeObjs&&Le(p,"changes",p,A.changeObjs),A.update&&A.update.finish()}function us(A,p){if(A.curOp)return p();rA(A);try{return p()}finally{El(A)}}function $i(A,p){return function(){if(A.curOp)return p.apply(A,arguments);rA(A);try{return p.apply(A,arguments)}finally{El(A)}}}function Yr(A){return function(){if(this.curOp)return A.apply(this,arguments);rA(this);try{return A.apply(this,arguments)}finally{El(this)}}}function Ca(A){return function(){var p=this.cm;if(!p||p.curOp)return A.apply(this,arguments);rA(p);try{return A.apply(this,arguments)}finally{El(p)}}}function ac(A,p){A.doc.highlightFrontier<A.display.viewTo&&A.state.highlight.set(p,Yt(pd,A))}function pd(A){var p=A.doc;if(!(p.highlightFrontier>=A.display.viewTo)){var x=+new Date+A.options.workTime,b=ta(A,p.highlightFrontier),B=[];p.iter(b.line,Math.min(p.first+p.size,A.display.viewTo+500),function(U){if(b.line>=A.display.viewFrom){var q=U.styles,ne=U.text.length>A.options.maxHighlightLength?Ia(p.mode,b.state):null,ue=xu(A,U,b,!0);ne&&(b.state=ne),U.styles=ue.styles;var ve=U.styleClasses,Qe=ue.classes;Qe?U.styleClasses=Qe:ve&&(U.styleClasses=null);for(var nt=!q||q.length!=U.styles.length||ve!=Qe&&(!ve||!Qe||ve.bgClass!=Qe.bgClass||ve.textClass!=Qe.textClass),Ot=0;!nt&&Ot<q.length;++Ot)nt=q[Ot]!=U.styles[Ot];nt&&B.push(b.line),U.stateAfter=b.save(),b.nextLine()}else U.text.length<=A.options.maxHighlightLength&&na(A,U.text,b),U.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return ac(A,A.options.workDelay),!0}),p.highlightFrontier=b.line,p.modeFrontier=Math.max(p.modeFrontier,b.line),B.length&&us(A,function(){for(var U=0;U<B.length;U++)dl(A,B[U],"text")})}}var uu=function(A,p,x){var b=A.display;this.viewport=p,this.visible=tA(b,A.doc,p),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=wA(A),this.force=x,this.dims=ls(A),this.events=[]};uu.prototype.signal=function(A,p){Ie(A,p)&&this.events.push(arguments)},uu.prototype.finish=function(){for(var A=0;A<this.events.length;A++)Le.apply(null,this.events[A])};function md(A){var p=A.display;!p.scrollbarsClipped&&p.scroller.offsetWidth&&(p.nativeBarWidth=p.scroller.offsetWidth-p.scroller.clientWidth,p.heightForcer.style.height=Ou(A)+"px",p.sizer.style.marginBottom=-p.nativeBarWidth+"px",p.sizer.style.borderRightWidth=Ou(A)+"px",p.scrollbarsClipped=!0)}function sc(A){if(A.hasFocus())return null;var p=ft(Ht(A));if(!p||!st(A.display.lineDiv,p))return null;var x={activeElt:p};if(window.getSelection){var b=Qt(A).getSelection();b.anchorNode&&b.extend&&st(A.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function sp(A){if(!(!A||!A.activeElt||A.activeElt==ft(bt(A.activeElt)))&&(A.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(A.activeElt.nodeName)&&A.anchorNode&&st(document.body,A.anchorNode)&&st(document.body,A.focusNode))){var p=A.activeElt.ownerDocument,x=p.defaultView.getSelection(),b=p.createRange();b.setEnd(A.anchorNode,A.anchorOffset),b.collapse(!1),x.removeAllRanges(),x.addRange(b),x.extend(A.focusNode,A.focusOffset)}}function gd(A,p){var x=A.display,b=A.doc;if(p.editorIsHidden)return Qn(A),!1;if(!p.force&&p.visible.from>=x.viewFrom&&p.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&ec(A)==0)return!1;u(A)&&(Qn(A),p.dims=ls(A));var B=b.first+b.size,U=Math.max(p.visible.from-A.options.viewportMargin,b.first),q=Math.min(B,p.visible.to+A.options.viewportMargin);x.viewFrom<U&&U-x.viewFrom<20&&(U=Math.max(b.first,x.viewFrom)),x.viewTo>q&&x.viewTo-q<20&&(q=Math.min(B,x.viewTo)),xs&&(U=po(A.doc,U),q=Oi(A.doc,q));var ne=U!=x.viewFrom||q!=x.viewTo||x.lastWrapHeight!=p.wrapperHeight||x.lastWrapWidth!=p.wrapperWidth;Vu(A,U,q),x.viewOffset=Io(Gn(A.doc,x.viewFrom)),A.display.mover.style.top=x.viewOffset+"px";var ue=ec(A);if(!ne&&ue==0&&!p.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ve=sc(A);return ue>4&&(x.lineDiv.style.display="none"),lp(A,x.updateLineNumbers,p.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,sp(ve),he(x.cursorDiv),he(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ne&&(x.lastWrapHeight=p.wrapperHeight,x.lastWrapWidth=p.wrapperWidth,ac(A,400)),x.updateLineNumbers=null,!0}function lc(A,p){for(var x=p.viewport,b=!0;;b=!1){if(!b||!A.options.lineWrapping||p.oldDisplayWidth==wA(A)){if(x&&x.top!=null&&(x={top:Math.min(A.doc.height+Wh(A.display)-ZA(A),x.top)}),p.visible=tA(A.display,A.doc,x),p.visible.from>=A.display.viewFrom&&p.visible.to<=A.display.viewTo)break}else b&&(p.visible=tA(A.display,A.doc,x));if(!gd(A,p))break;eA(A);var B=ic(A);Hu(A),hl(A,B),Vh(A,B),p.force=!1}p.signal(A,"update",A),(A.display.viewFrom!=A.display.reportedViewFrom||A.display.viewTo!=A.display.reportedViewTo)&&(p.signal(A,"viewportChange",A,A.display.viewFrom,A.display.viewTo),A.display.reportedViewFrom=A.display.viewFrom,A.display.reportedViewTo=A.display.viewTo)}function Wl(A,p){var x=new uu(A,p);if(gd(A,x)){eA(A),lc(A,x);var b=ic(A);Hu(A),hl(A,b),Vh(A,b),x.finish()}}function lp(A,p,x){var b=A.display,B=A.options.lineNumbers,U=b.lineDiv,q=U.firstChild;function ne(Nt){var cn=Nt.nextSibling;return C&&pe&&A.display.currentWheelTarget==Nt?Nt.style.display="none":Nt.parentNode.removeChild(Nt),cn}for(var ue=b.view,ve=b.viewFrom,Qe=0;Qe<ue.length;Qe++){var nt=ue[Qe];if(!nt.hidden)if(!nt.node||nt.node.parentNode!=U){var Ot=Fo(A,nt,ve,x);U.insertBefore(Ot,q)}else{for(;q!=nt.node;)q=ne(q);var Ct=B&&p!=null&&p<=ve&&nt.lineNumber;nt.changes&&(ze(nt.changes,"gutter")>-1&&(Ct=!1),jh(A,nt,ve,x)),Ct&&(he(nt.lineNumber),nt.lineNumber.appendChild(document.createTextNode(ln(A.options,ve)))),q=nt.node.nextSibling}ve+=nt.size}for(;q;)q=ne(q)}function nh(A){var p=A.gutters.offsetWidth;A.sizer.style.marginLeft=p+"px",ko(A,"gutterChanged",A)}function Vh(A,p){A.display.sizer.style.minHeight=p.docHeight+"px",A.display.heightForcer.style.top=p.docHeight+"px",A.display.gutters.style.height=p.docHeight+A.display.barHeight+Ou(A)+"px"}function I(A){var p=A.display,x=p.view;if(!(!p.alignWidgets&&(!p.gutters.firstChild||!A.options.fixedGutter))){for(var b=Hi(p)-p.scroller.scrollLeft+A.doc.scrollLeft,B=p.gutters.offsetWidth,U=b+"px",q=0;q<x.length;q++)if(!x[q].hidden){A.options.fixedGutter&&(x[q].gutter&&(x[q].gutter.style.left=U),x[q].gutterBackground&&(x[q].gutterBackground.style.left=U));var ne=x[q].alignable;if(ne)for(var ue=0;ue<ne.length;ue++)ne[ue].style.left=U}A.options.fixedGutter&&(p.gutters.style.left=b+B+"px")}}function u(A){if(!A.options.lineNumbers)return!1;var p=A.doc,x=ln(A.options,p.first+p.size-1),b=A.display;if(x.length!=b.lineNumChars){var B=b.measure.appendChild(ye("div",[ye("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),U=B.firstChild.offsetWidth,q=B.offsetWidth-U;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(U,b.lineGutter.offsetWidth-q)+1,b.lineNumWidth=b.lineNumInnerWidth+q,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",nh(A.display),!0}return!1}function m(A,p){for(var x=[],b=!1,B=0;B<A.length;B++){var U=A[B],q=null;if(typeof U!="string"&&(q=U.style,U=U.className),U=="CodeMirror-linenumbers")if(p)b=!0;else continue;x.push({className:U,style:q})}return p&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function _(A){var p=A.gutters,x=A.gutterSpecs;he(p),A.lineGutter=null;for(var b=0;b<x.length;++b){var B=x[b],U=B.className,q=B.style,ne=p.appendChild(ye("div",null,"CodeMirror-gutter "+U));q&&(ne.style.cssText=q),U=="CodeMirror-linenumbers"&&(A.lineGutter=ne,ne.style.width=(A.lineNumWidth||1)+"px")}p.style.display=x.length?"":"none",nh(A)}function w(A){_(A.display),va(A),I(A)}function k(A,p,x,b){var B=this;this.input=x,B.scrollbarFiller=ye("div",null,"CodeMirror-scrollbar-filler"),B.scrollbarFiller.setAttribute("cm-not-content","true"),B.gutterFiller=ye("div",null,"CodeMirror-gutter-filler"),B.gutterFiller.setAttribute("cm-not-content","true"),B.lineDiv=gt("div",null,"CodeMirror-code"),B.selectionDiv=ye("div",null,null,"position: relative; z-index: 1"),B.cursorDiv=ye("div",null,"CodeMirror-cursors"),B.measure=ye("div",null,"CodeMirror-measure"),B.lineMeasure=ye("div",null,"CodeMirror-measure"),B.lineSpace=gt("div",[B.measure,B.lineMeasure,B.selectionDiv,B.cursorDiv,B.lineDiv],null,"position: relative; outline: none");var U=gt("div",[B.lineSpace],"CodeMirror-lines");B.mover=ye("div",[U],null,"position: relative"),B.sizer=ye("div",[B.mover],"CodeMirror-sizer"),B.sizerWidth=null,B.heightForcer=ye("div",null,null,"position: absolute; height: "+it+"px; width: 1px;"),B.gutters=ye("div",null,"CodeMirror-gutters"),B.lineGutter=null,B.scroller=ye("div",[B.sizer,B.heightForcer,B.gutters],"CodeMirror-scroll"),B.scroller.setAttribute("tabIndex","-1"),B.wrapper=ye("div",[B.scrollbarFiller,B.gutterFiller,B.scroller],"CodeMirror"),E&&P>=105&&(B.wrapper.style.clipPath="inset(0px)"),B.wrapper.setAttribute("translate","no"),d&&f<8&&(B.gutters.style.zIndex=-1,B.scroller.style.paddingRight=0),!C&&!(i&&ae)&&(B.scroller.draggable=!0),A&&(A.appendChild?A.appendChild(B.wrapper):A(B.wrapper)),B.viewFrom=B.viewTo=p.first,B.reportedViewFrom=B.reportedViewTo=p.first,B.view=[],B.renderedView=null,B.externalMeasured=null,B.viewOffset=0,B.lastWrapHeight=B.lastWrapWidth=0,B.updateLineNumbers=null,B.nativeBarWidth=B.barHeight=B.barWidth=0,B.scrollbarsClipped=!1,B.lineNumWidth=B.lineNumInnerWidth=B.lineNumChars=null,B.alignWidgets=!1,B.cachedCharWidth=B.cachedTextHeight=B.cachedPaddingH=null,B.maxLine=null,B.maxLineLength=0,B.maxLineChanged=!1,B.wheelDX=B.wheelDY=B.wheelStartX=B.wheelStartY=null,B.shift=!1,B.selForContextMenu=null,B.activeTouch=null,B.gutterSpecs=m(b.gutters,b.lineNumbers),_(B),x.init(B)}var R=0,j=null;d?j=-.53:i?j=15:E?j=-.7:$&&(j=-1/3);function Y(A){var p=A.wheelDeltaX,x=A.wheelDeltaY;return p==null&&A.detail&&A.axis==A.HORIZONTAL_AXIS&&(p=A.detail),x==null&&A.detail&&A.axis==A.VERTICAL_AXIS?x=A.detail:x==null&&(x=A.wheelDelta),{x:p,y:x}}function ie(A){var p=Y(A);return p.x*=j,p.y*=j,p}function de(A,p){E&&P==102&&(A.display.chromeScrollHack==null?A.display.sizer.style.pointerEvents="none":clearTimeout(A.display.chromeScrollHack),A.display.chromeScrollHack=setTimeout(function(){A.display.chromeScrollHack=null,A.display.sizer.style.pointerEvents=""},100));var x=Y(p),b=x.x,B=x.y,U=j;p.deltaMode===0&&(b=p.deltaX,B=p.deltaY,U=1);var q=A.display,ne=q.scroller,ue=ne.scrollWidth>ne.clientWidth,ve=ne.scrollHeight>ne.clientHeight;if(b&&ue||B&&ve){if(B&&pe&&C){e:for(var Qe=p.target,nt=q.view;Qe!=ne;Qe=Qe.parentNode)for(var Ot=0;Ot<nt.length;Ot++)if(nt[Ot].node==Qe){A.display.currentWheelTarget=Qe;break e}}if(b&&!i&&!D&&U!=null){B&&ve&&Fc(A,Math.max(0,ne.scrollTop+B*U)),da(A,Math.max(0,ne.scrollLeft+b*U)),(!B||B&&ve)&&rt(p),q.wheelStartX=null;return}if(B&&U!=null){var Ct=B*U,Nt=A.doc.scrollTop,cn=Nt+q.wrapper.clientHeight;Ct<0?Nt=Math.max(0,Nt+Ct-50):cn=Math.min(A.doc.height,cn+Ct+50),Wl(A,{top:Nt,bottom:cn})}R<20&&p.deltaMode!==0&&(q.wheelStartX==null?(q.wheelStartX=ne.scrollLeft,q.wheelStartY=ne.scrollTop,q.wheelDX=b,q.wheelDY=B,setTimeout(function(){if(q.wheelStartX!=null){var kn=ne.scrollLeft-q.wheelStartX,Vn=ne.scrollTop-q.wheelStartY,bn=Vn&&q.wheelDY&&Vn/q.wheelDY||kn&&q.wheelDX&&kn/q.wheelDX;q.wheelStartX=q.wheelStartY=null,bn&&(j=(j*R+bn)/(R+1),++R)}},200)):(q.wheelDX+=b,q.wheelDY+=B))}}var me=function(A,p){this.ranges=A,this.primIndex=p};me.prototype.primary=function(){return this.ranges[this.primIndex]},me.prototype.equals=function(A){if(A==this)return!0;if(A.primIndex!=this.primIndex||A.ranges.length!=this.ranges.length)return!1;for(var p=0;p<this.ranges.length;p++){var x=this.ranges[p],b=A.ranges[p];if(!hr(x.anchor,b.anchor)||!hr(x.head,b.head))return!1}return!0},me.prototype.deepCopy=function(){for(var A=[],p=0;p<this.ranges.length;p++)A[p]=new Oe(ii(this.ranges[p].anchor),ii(this.ranges[p].head));return new me(A,this.primIndex)},me.prototype.somethingSelected=function(){for(var A=0;A<this.ranges.length;A++)if(!this.ranges[A].empty())return!0;return!1},me.prototype.contains=function(A,p){p||(p=A);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(wn(p,b.from())>=0&&wn(A,b.to())<=0)return x}return-1};var Oe=function(A,p){this.anchor=A,this.head=p};Oe.prototype.from=function(){return Jo(this.anchor,this.head)},Oe.prototype.to=function(){return li(this.anchor,this.head)},Oe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function qe(A,p,x){var b=A&&A.options.selectionsMayTouch,B=p[x];p.sort(function(Ot,Ct){return wn(Ot.from(),Ct.from())}),x=ze(p,B);for(var U=1;U<p.length;U++){var q=p[U],ne=p[U-1],ue=wn(ne.to(),q.from());if(b&&!q.empty()?ue>0:ue>=0){var ve=Jo(ne.from(),q.from()),Qe=li(ne.to(),q.to()),nt=ne.empty()?q.from()==q.head:ne.from()==ne.head;U<=x&&--x,p.splice(--U,2,new Oe(nt?Qe:ve,nt?ve:Qe))}}return new me(p,x)}function Ye(A,p){return new me([new Oe(A,p||A)],0)}function He(A){return A.text?Ft(A.from.line+A.text.length-1,yn(A.text).length+(A.text.length==1?A.from.ch:0)):A.to}function Ne(A,p){if(wn(A,p.from)<0)return A;if(wn(A,p.to)<=0)return He(p);var x=A.line+p.text.length-(p.to.line-p.from.line)-1,b=A.ch;return A.line==p.to.line&&(b+=He(p).ch-p.to.ch),Ft(x,b)}function ht(A,p){for(var x=[],b=0;b<A.sel.ranges.length;b++){var B=A.sel.ranges[b];x.push(new Oe(Ne(B.anchor,p),Ne(B.head,p)))}return qe(A.cm,x,A.sel.primIndex)}function Dt(A,p,x){return A.line==p.line?Ft(x.line,A.ch-p.ch+x.ch):Ft(x.line+(A.line-p.line),A.ch)}function tt(A,p,x){for(var b=[],B=Ft(A.first,0),U=B,q=0;q<p.length;q++){var ne=p[q],ue=Dt(ne.from,B,U),ve=Dt(He(ne),B,U);if(B=ne.to,U=ve,x=="around"){var Qe=A.sel.ranges[q],nt=wn(Qe.head,Qe.anchor)<0;b[q]=new Oe(nt?ve:ue,nt?ue:ve)}else b[q]=new Oe(ue,ue)}return new me(b,A.sel.primIndex)}function xt(A){A.doc.mode=si(A.options,A.doc.modeOption),Pt(A)}function Pt(A){A.doc.iter(function(p){p.stateAfter&&(p.stateAfter=null),p.styles&&(p.styles=null)}),A.doc.modeFrontier=A.doc.highlightFrontier=A.doc.first,ac(A,100),A.state.modeGen++,A.curOp&&va(A)}function Ut(A,p){return p.from.ch==0&&p.to.ch==0&&yn(p.text)==""&&(!A.cm||A.cm.options.wholeLineUpdateBefore)}function Xt(A,p,x,b){function B(bn){return x?x[bn]:null}function U(bn,Rn,lr){iu(bn,Rn,lr,b),ko(bn,"change",bn,p)}function q(bn,Rn){for(var lr=[],Tr=bn;Tr<Rn;++Tr)lr.push(new Fl(ve[Tr],B(Tr),b));return lr}var ne=p.from,ue=p.to,ve=p.text,Qe=Gn(A,ne.line),nt=Gn(A,ue.line),Ot=yn(ve),Ct=B(ve.length-1),Nt=ue.line-ne.line;if(p.full)A.insert(0,q(0,ve.length)),A.remove(ve.length,A.size-ve.length);else if(Ut(A,p)){var cn=q(0,ve.length-1);U(nt,nt.text,Ct),Nt&&A.remove(ne.line,Nt),cn.length&&A.insert(ne.line,cn)}else if(Qe==nt)if(ve.length==1)U(Qe,Qe.text.slice(0,ne.ch)+Ot+Qe.text.slice(ue.ch),Ct);else{var kn=q(1,ve.length-1);kn.push(new Fl(Ot+Qe.text.slice(ue.ch),Ct,b)),U(Qe,Qe.text.slice(0,ne.ch)+ve[0],B(0)),A.insert(ne.line+1,kn)}else if(ve.length==1)U(Qe,Qe.text.slice(0,ne.ch)+ve[0]+nt.text.slice(ue.ch),B(0)),A.remove(ne.line+1,Nt);else{U(Qe,Qe.text.slice(0,ne.ch)+ve[0],B(0)),U(nt,Ot+nt.text.slice(ue.ch),Ct);var Vn=q(1,ve.length-1);Nt>1&&A.remove(ne.line+1,Nt-1),A.insert(ne.line+1,Vn)}ko(A,"change",A,p)}function hn(A,p,x){function b(B,U,q){if(B.linked)for(var ne=0;ne<B.linked.length;++ne){var ue=B.linked[ne];if(ue.doc!=U){var ve=q&&ue.sharedHist;x&&!ve||(p(ue.doc,ve),b(ue.doc,B,ve))}}}b(A,null,!0)}function un(A,p){if(p.cm)throw new Error("This document is already in use.");A.doc=p,p.cm=A,$h(A),xt(A),pn(A),A.options.direction=p.direction,A.options.lineWrapping||$a(A),A.options.mode=p.modeOption,va(A)}function pn(A){(A.doc.direction=="rtl"?Re:Pe)(A.display.lineDiv,"CodeMirror-rtl")}function qn(A){us(A,function(){pn(A),va(A)})}function qr(A){this.done=[],this.undone=[],this.undoDepth=A?A.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=A?A.maxGeneration:1}function In(A,p){var x={from:ii(p.from),to:He(p),text:ro(A,p.from,p.to)};return Ho(A,x,p.from.line,p.to.line+1),hn(A,function(b){return Ho(b,x,p.from.line,p.to.line+1)},!0),x}function Cr(A){for(;A.length;){var p=yn(A);if(p.ranges)A.pop();else break}}function hi(A,p){if(p)return Cr(A.done),yn(A.done);if(A.done.length&&!yn(A.done).ranges)return yn(A.done);if(A.done.length>1&&!A.done[A.done.length-2].ranges)return A.done.pop(),yn(A.done)}function Pi(A,p,x,b){var B=A.history;B.undone.length=0;var U=+new Date,q,ne;if((B.lastOp==b||B.lastOrigin==p.origin&&p.origin&&(p.origin.charAt(0)=="+"&&B.lastModTime>U-(A.cm?A.cm.options.historyEventDelay:500)||p.origin.charAt(0)=="*"))&&(q=hi(B,B.lastOp==b)))ne=yn(q.changes),wn(p.from,p.to)==0&&wn(p.from,ne.to)==0?ne.to=He(p):q.changes.push(In(A,p));else{var ue=yn(B.done);for((!ue||!ue.ranges)&&Wr(A.sel,B.done),q={changes:[In(A,p)],generation:B.generation},B.done.push(q);B.done.length>B.undoDepth;)B.done.shift(),B.done[0].ranges||B.done.shift()}B.done.push(x),B.generation=++B.maxGeneration,B.lastModTime=B.lastSelTime=U,B.lastOp=B.lastSelOp=b,B.lastOrigin=B.lastSelOrigin=p.origin,ne||Le(A,"historyAdded")}function Vr(A,p,x,b){var B=p.charAt(0);return B=="*"||B=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-A.history.lastSelTime<=(A.cm?A.cm.options.historyEventDelay:500)}function ei(A,p,x,b){var B=A.history,U=b&&b.origin;x==B.lastSelOp||U&&B.lastSelOrigin==U&&(B.lastModTime==B.lastSelTime&&B.lastOrigin==U||Vr(A,U,yn(B.done),p))?B.done[B.done.length-1]=p:Wr(p,B.done),B.lastSelTime=+new Date,B.lastSelOrigin=U,B.lastSelOp=x,b&&b.clearRedo!==!1&&Cr(B.undone)}function Wr(A,p){var x=yn(p);x&&x.ranges&&x.equals(A)||p.push(A)}function Ho(A,p,x,b){var B=p["spans_"+A.id],U=0;A.iter(Math.max(A.first,x),Math.min(A.first+A.size,b),function(q){q.markedSpans&&((B||(B=p["spans_"+A.id]={}))[U]=q.markedSpans),++U})}function Uo(A){if(!A)return null;for(var p,x=0;x<A.length;++x)A[x].marker.explicitlyCleared?p||(p=A.slice(0,x)):p&&p.push(A[x]);return p?p.length?p:null:A}function Rs(A,p){var x=p["spans_"+A.id];if(!x)return null;for(var b=[],B=0;B<p.text.length;++B)b.push(Uo(x[B]));return b}function Da(A,p){var x=Rs(A,p),b=ua(A,p);if(!x)return b;if(!b)return x;for(var B=0;B<x.length;++B){var U=x[B],q=b[B];if(U&&q)e:for(var ne=0;ne<q.length;++ne){for(var ue=q[ne],ve=0;ve<U.length;++ve)if(U[ve].marker==ue.marker)continue e;U.push(ue)}else q&&(x[B]=q)}return x}function mo(A,p,x){for(var b=[],B=0;B<A.length;++B){var U=A[B];if(U.ranges){b.push(x?me.prototype.deepCopy.call(U):U);continue}var q=U.changes,ne=[];b.push({changes:ne});for(var ue=0;ue<q.length;++ue){var ve=q[ue],Qe=void 0;if(ne.push({from:ve.from,to:ve.to,text:ve.text}),p)for(var nt in ve)(Qe=nt.match(/^spans_(\d+)$/))&&ze(p,Number(Qe[1]))>-1&&(yn(ne)[nt]=ve[nt],delete ve[nt])}}return b}function so(A,p,x,b){if(b){var B=A.anchor;if(x){var U=wn(p,B)<0;U!=wn(x,B)<0?(B=p,p=x):U!=wn(p,x)<0&&(p=x)}return new Oe(B,p)}else return new Oe(x||p,p)}function Js(A,p,x,b,B){B==null&&(B=A.cm&&(A.cm.display.shift||A.extend)),zi(A,new me([so(A.sel.primary(),p,x,B)],0),b)}function Au(A,p,x){for(var b=[],B=A.cm&&(A.cm.display.shift||A.extend),U=0;U<A.sel.ranges.length;U++)b[U]=so(A.sel.ranges[U],p[U],null,B);var q=qe(A.cm,b,A.sel.primIndex);zi(A,q,x)}function Ms(A,p,x,b){var B=A.sel.ranges.slice(0);B[p]=x,zi(A,qe(A.cm,B,A.sel.primIndex),b)}function iA(A,p,x,b){zi(A,Ye(p,x),b)}function Gl(A,p,x){var b={ranges:p.ranges,update:function(B){this.ranges=[];for(var U=0;U<B.length;U++)this.ranges[U]=new Oe(Dr(A,B[U].anchor),Dr(A,B[U].head))},origin:x&&x.origin};return Le(A,"beforeSelectionChange",A,b),A.cm&&Le(A.cm,"beforeSelectionChange",A.cm,b),b.ranges!=p.ranges?qe(A.cm,b.ranges,b.ranges.length-1):p}function Ss(A,p,x){var b=A.history.done,B=yn(b);B&&B.ranges?(b[b.length-1]=p,Bi(A,p,x)):zi(A,p,x)}function zi(A,p,x){Bi(A,p,x),ei(A,A.sel,A.cm?A.cm.curOp.id:NaN,x)}function Bi(A,p,x){(Ie(A,"beforeSelectionChange")||A.cm&&Ie(A.cm,"beforeSelectionChange"))&&(p=Gl(A,p,x));var b=x&&x.bias||(wn(p.primary().head,A.sel.primary().head)<0?-1:1);ia(A,Zo(A,p,b,!0)),!(x&&x.scroll===!1)&&A.cm&&A.cm.getOption("readOnly")!="nocursor"&&ao(A.cm)}function ia(A,p){p.equals(A.sel)||(A.sel=p,A.cm&&(A.cm.curOp.updateInput=1,A.cm.curOp.selectionChanged=!0,xe(A.cm)),ko(A,"cursorActivity",A))}function Uc(A){ia(A,Zo(A,A.sel,null,!1))}function Zo(A,p,x,b){for(var B,U=0;U<p.ranges.length;U++){var q=p.ranges[U],ne=p.ranges.length==A.sel.ranges.length&&A.sel.ranges[U],ue=Es(A,q.anchor,ne&&ne.anchor,x,b),ve=q.head==q.anchor?ue:Es(A,q.head,ne&&ne.head,x,b);(B||ue!=q.anchor||ve!=q.head)&&(B||(B=p.ranges.slice(0,U)),B[U]=new Oe(ue,ve))}return B?qe(A.cm,B,p.primIndex):p}function _a(A,p,x,b,B){var U=Gn(A,p.line);if(U.markedSpans)for(var q=0;q<U.markedSpans.length;++q){var ne=U.markedSpans[q],ue=ne.marker,ve="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Qe="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((ne.from==null||(ve?ne.from<=p.ch:ne.from<p.ch))&&(ne.to==null||(Qe?ne.to>=p.ch:ne.to>p.ch))){if(B&&(Le(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(U.markedSpans){--q;continue}else break;if(!ue.atomic)continue;if(x){var nt=ue.find(b<0?1:-1),Ot=void 0;if((b<0?Qe:ve)&&(nt=Di(A,nt,-b,nt&&nt.line==p.line?U:null)),nt&&nt.line==p.line&&(Ot=wn(nt,x))&&(b<0?Ot<0:Ot>0))return _a(A,nt,p,b,B)}var Ct=ue.find(b<0?-1:1);return(b<0?ve:Qe)&&(Ct=Di(A,Ct,b,Ct.line==p.line?U:null)),Ct?_a(A,Ct,p,b,B):null}}return p}function Es(A,p,x,b,B){var U=b||1,q=_a(A,p,x,U,B)||!B&&_a(A,p,x,U,!0)||_a(A,p,x,-U,B)||!B&&_a(A,p,x,-U,!0);return q||(A.cantEdit=!0,Ft(A.first,0))}function Di(A,p,x,b){return x<0&&p.ch==0?p.line>A.first?Dr(A,Ft(p.line-1)):null:x>0&&p.ch==(b||Gn(A,p.line)).text.length?p.line<A.first+A.size-1?Ft(p.line+1,0):null:new Ft(p.line,p.ch+x)}function uc(A){A.setSelection(Ft(A.firstLine(),0),Ft(A.lastLine()),St)}function Hh(A,p,x){var b={canceled:!1,from:p.from,to:p.to,text:p.text,origin:p.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(B,U,q,ne){B&&(b.from=Dr(A,B)),U&&(b.to=Dr(A,U)),q&&(b.text=q),ne!==void 0&&(b.origin=ne)}),Le(A,"beforeChange",A,b),A.cm&&Le(A.cm,"beforeChange",A.cm,b),b.canceled?(A.cm&&(A.cm.curOp.updateInput=2),null):{from:b.from,to:b.to,text:b.text,origin:b.origin}}function cu(A,p,x){if(A.cm){if(!A.cm.curOp)return $i(A.cm,cu)(A,p,x);if(A.cm.state.suppressEdits)return}if(!((Ie(A,"beforeChange")||A.cm&&Ie(A.cm,"beforeChange"))&&(p=Hh(A,p,!0),!p))){var b=Wo&&!x&&xA(A,p.from,p.to);if(b)for(var B=b.length-1;B>=0;--B)Ac(A,{from:b[B].from,to:b[B].to,text:B?[""]:p.text,origin:p.origin});else Ac(A,p)}}function Ac(A,p){if(!(p.text.length==1&&p.text[0]==""&&wn(p.from,p.to)==0)){var x=ht(A,p);Pi(A,p,x,A.cm?A.cm.curOp.id:NaN),Tu(A,p,x,ua(A,p));var b=[];hn(A,function(B,U){!U&&ze(b,B.history)==-1&&(Ap(B.history,p),b.push(B.history)),Tu(B,p,null,ua(B,p))})}}function ku(A,p,x){var b=A.cm&&A.cm.state.suppressEdits;if(!(b&&!x)){for(var B=A.history,U,q=A.sel,ne=p=="undo"?B.done:B.undone,ue=p=="undo"?B.undone:B.done,ve=0;ve<ne.length&&(U=ne[ve],!(x?U.ranges&&!U.equals(A.sel):!U.ranges));ve++);if(ve!=ne.length){for(B.lastOrigin=B.lastSelOrigin=null;;)if(U=ne.pop(),U.ranges){if(Wr(U,ue),x&&!U.equals(A.sel)){zi(A,U,{clearRedo:!1});return}q=U}else if(b){ne.push(U);return}else break;var Qe=[];Wr(q,ue),ue.push({changes:Qe,generation:B.generation}),B.generation=U.generation||++B.maxGeneration;for(var nt=Ie(A,"beforeChange")||A.cm&&Ie(A.cm,"beforeChange"),Ot=function(cn){var kn=U.changes[cn];if(kn.origin=p,nt&&!Hh(A,kn,!1))return ne.length=0,{};Qe.push(In(A,kn));var Vn=cn?ht(A,kn):yn(ne);Tu(A,kn,Vn,Da(A,kn)),!cn&&A.cm&&A.cm.scrollIntoView({from:kn.from,to:He(kn)});var bn=[];hn(A,function(Rn,lr){!lr&&ze(bn,Rn.history)==-1&&(Ap(Rn.history,kn),bn.push(Rn.history)),Tu(Rn,kn,null,Da(Rn,kn))})},Ct=U.changes.length-1;Ct>=0;--Ct){var Nt=Ot(Ct);if(Nt)return Nt.v}}}}function Zh(A,p){if(p!=0&&(A.first+=p,A.sel=new me(tr(A.sel.ranges,function(B){return new Oe(Ft(B.anchor.line+p,B.anchor.ch),Ft(B.head.line+p,B.head.ch))}),A.sel.primIndex),A.cm)){va(A.cm,A.first,A.first-p,p);for(var x=A.cm.display,b=x.viewFrom;b<x.viewTo;b++)dl(A.cm,b,"gutter")}}function Tu(A,p,x,b){if(A.cm&&!A.cm.curOp)return $i(A.cm,Tu)(A,p,x,b);if(p.to.line<A.first){Zh(A,p.text.length-1-(p.to.line-p.from.line));return}if(!(p.from.line>A.lastLine())){if(p.from.line<A.first){var B=p.text.length-1-(A.first-p.from.line);Zh(A,B),p={from:Ft(A.first,0),to:Ft(p.to.line+B,p.to.ch),text:[yn(p.text)],origin:p.origin}}var U=A.lastLine();p.to.line>U&&(p={from:p.from,to:Ft(U,Gn(A,U).text.length),text:[p.text[0]],origin:p.origin}),p.removed=ro(A,p.from,p.to),x||(x=ht(A,p)),A.cm?Xh(A.cm,p,b):Xt(A,p,b),Bi(A,x,St),A.cantEdit&&Es(A,Ft(A.firstLine(),0))&&(A.cantEdit=!1)}}function Xh(A,p,x){var b=A.doc,B=A.display,U=p.from,q=p.to,ne=!1,ue=U.line;A.options.lineWrapping||(ue=_e(vr(Gn(b,U.line))),b.iter(ue,q.line+1,function(Ct){if(Ct==B.maxLine)return ne=!0,!0})),b.sel.contains(p.from,p.to)>-1&&xe(A),Xt(b,p,x,Gh(A)),A.options.lineWrapping||(b.iter(ue,U.line+p.text.length,function(Ct){var Nt=wo(Ct);Nt>B.maxLineLength&&(B.maxLine=Ct,B.maxLineLength=Nt,B.maxLineChanged=!0,ne=!1)}),ne&&(A.curOp.updateMaxLine=!0)),Gu(b,U.line),ac(A,400);var ve=p.text.length-(q.line-U.line)-1;p.full?va(A):U.line==q.line&&p.text.length==1&&!Ut(A.doc,p)?dl(A,U.line,"text"):va(A,U.line,q.line+1,ve);var Qe=Ie(A,"changes"),nt=Ie(A,"change");if(nt||Qe){var Ot={from:U,to:q,text:p.text,removed:p.removed,origin:p.origin};nt&&ko(A,"change",A,Ot),Qe&&(A.curOp.changeObjs||(A.curOp.changeObjs=[])).push(Ot)}A.display.selForContextMenu=null}function IA(A,p,x,b,B){var U;b||(b=x),wn(b,x)<0&&(U=[b,x],x=U[0],b=U[1]),typeof p=="string"&&(p=A.splitLines(p)),cu(A,{from:x,to:b,text:p,origin:B})}function up(A,p,x,b){x<A.line?A.line+=b:p<A.line&&(A.line=p,A.ch=0)}function yd(A,p,x,b){for(var B=0;B<A.length;++B){var U=A[B],q=!0;if(U.ranges){U.copied||(U=A[B]=U.deepCopy(),U.copied=!0);for(var ne=0;ne<U.ranges.length;ne++)up(U.ranges[ne].anchor,p,x,b),up(U.ranges[ne].head,p,x,b);continue}for(var ue=0;ue<U.changes.length;++ue){var ve=U.changes[ue];if(x<ve.from.line)ve.from=Ft(ve.from.line+b,ve.from.ch),ve.to=Ft(ve.to.line+b,ve.to.ch);else if(p<=ve.to.line){q=!1;break}}q||(A.splice(0,B+1),B=0)}}function Ap(A,p){var x=p.from.line,b=p.to.line,B=p.text.length-(b-x)-1;yd(A.done,x,b,B),yd(A.undone,x,b,B)}function oA(A,p,x,b){var B=p,U=p;return typeof p=="number"?U=Gn(A,Ka(A,p)):B=_e(p),B==null?null:(b(U,B)&&A.cm&&dl(A.cm,B,x),U)}function vd(A){this.lines=A,this.parent=null;for(var p=0,x=0;x<A.length;++x)A[x].parent=this,p+=A[x].height;this.height=p}vd.prototype={chunkSize:function(){return this.lines.length},removeInner:function(A,p){for(var x=A,b=A+p;x<b;++x){var B=this.lines[x];this.height-=B.height,ga(B),ko(B,"delete")}this.lines.splice(A,p)},collapse:function(A){A.push.apply(A,this.lines)},insertInner:function(A,p,x){this.height+=x,this.lines=this.lines.slice(0,A).concat(p).concat(this.lines.slice(A));for(var b=0;b<p.length;++b)p[b].parent=this},iterN:function(A,p,x){for(var b=A+p;A<b;++A)if(x(this.lines[A]))return!0}};function Jh(A){this.children=A;for(var p=0,x=0,b=0;b<A.length;++b){var B=A[b];p+=B.chunkSize(),x+=B.height,B.parent=this}this.size=p,this.height=x,this.parent=null}Jh.prototype={chunkSize:function(){return this.size},removeInner:function(A,p){this.size-=p;for(var x=0;x<this.children.length;++x){var b=this.children[x],B=b.chunkSize();if(A<B){var U=Math.min(p,B-A),q=b.height;if(b.removeInner(A,U),this.height-=q-b.height,B==U&&(this.children.splice(x--,1),b.parent=null),(p-=U)==0)break;A=0}else A-=B}if(this.size-p<25&&(this.children.length>1||!(this.children[0]instanceof vd))){var ne=[];this.collapse(ne),this.children=[new vd(ne)],this.children[0].parent=this}},collapse:function(A){for(var p=0;p<this.children.length;++p)this.children[p].collapse(A)},insertInner:function(A,p,x){this.size+=p.length,this.height+=x;for(var b=0;b<this.children.length;++b){var B=this.children[b],U=B.chunkSize();if(A<=U){if(B.insertInner(A,p,x),B.lines&&B.lines.length>50){for(var q=B.lines.length%25+25,ne=q;ne<B.lines.length;){var ue=new vd(B.lines.slice(ne,ne+=25));B.height-=ue.height,this.children.splice(++b,0,ue),ue.parent=this}B.lines=B.lines.slice(0,q),this.maybeSpill()}break}A-=U}},maybeSpill:function(){if(!(this.children.length<=10)){var A=this;do{var p=A.children.splice(A.children.length-5,5),x=new Jh(p);if(A.parent){A.size-=x.size,A.height-=x.height;var B=ze(A.parent.children,A);A.parent.children.splice(B+1,0,x)}else{var b=new Jh(A.children);b.parent=A,A.children=[b,x],A=b}x.parent=A.parent}while(A.children.length>10);A.parent.maybeSpill()}},iterN:function(A,p,x){for(var b=0;b<this.children.length;++b){var B=this.children[b],U=B.chunkSize();if(A<U){var q=Math.min(p,U-A);if(B.iterN(A,q,x))return!0;if((p-=q)==0)break;A=0}else A-=U}}};var aA=function(A,p,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=A,this.node=p};aA.prototype.clear=function(){var A=this.doc.cm,p=this.line.widgets,x=this.line,b=_e(x);if(!(b==null||!p)){for(var B=0;B<p.length;++B)p[B]==this&&p.splice(B--,1);p.length||(x.widgets=null);var U=au(this);Ri(x,Math.max(0,x.height-U)),A&&(us(A,function(){_0(A,x,-U),dl(A,b,"widget")}),ko(A,"lineWidgetCleared",A,this,b))}},aA.prototype.changed=function(){var A=this,p=this.height,x=this.doc.cm,b=this.line;this.height=null;var B=au(this)-p;B&&(Zr(this.doc,b)||Ri(b,b.height+B),x&&us(x,function(){x.curOp.forceUpdate=!0,_0(x,b,B),ko(x,"lineWidgetChanged",x,A,_e(b))}))},je(aA);function _0(A,p,x){Io(p)<(A.curOp&&A.curOp.scrollTop||A.doc.scrollTop)&&ip(A,x)}function ef(A,p,x,b){var B=new aA(A,x,b),U=A.cm;return U&&B.noHScroll&&(U.display.alignWidgets=!0),oA(A,p,"widget",function(q){var ne=q.widgets||(q.widgets=[]);if(B.insertAt==null?ne.push(B):ne.splice(Math.min(ne.length,Math.max(0,B.insertAt)),0,B),B.line=q,U&&!Zr(A,q)){var ue=Io(q)<A.scrollTop;Ri(q,q.height+au(B)),ue&&ip(U,B.height),U.curOp.forceUpdate=!0}return!0}),U&&ko(U,"lineWidgetAdded",U,B,typeof p=="number"?p:_e(p)),B}var tf=0,du=function(A,p){this.lines=[],this.type=p,this.doc=A,this.id=++tf};du.prototype.clear=function(){if(!this.explicitlyCleared){var A=this.doc.cm,p=A&&!A.curOp;if(p&&rA(A),Ie(this,"clear")){var x=this.find();x&&ko(this,"clear",x.from,x.to)}for(var b=null,B=null,U=0;U<this.lines.length;++U){var q=this.lines[U],ne=Go(q.markedSpans,this);A&&!this.collapsed?dl(A,_e(q),"text"):A&&(ne.to!=null&&(B=_e(q)),ne.from!=null&&(b=_e(q))),q.markedSpans=Su(q.markedSpans,ne),ne.from==null&&this.collapsed&&!Zr(this.doc,q)&&A&&Ri(q,Qa(A.display))}if(A&&this.collapsed&&!A.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ve=vr(this.lines[ue]),Qe=wo(ve);Qe>A.display.maxLineLength&&(A.display.maxLine=ve,A.display.maxLineLength=Qe,A.display.maxLineChanged=!0)}b!=null&&A&&this.collapsed&&va(A,b,B+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,A&&Uc(A.doc)),A&&ko(A,"markerCleared",A,this,b,B),p&&El(A),this.parent&&this.parent.clear()}},du.prototype.find=function(A,p){A==null&&this.type=="bookmark"&&(A=1);for(var x,b,B=0;B<this.lines.length;++B){var U=this.lines[B],q=Go(U.markedSpans,this);if(q.from!=null&&(x=Ft(p?U:_e(U),q.from),A==-1))return x;if(q.to!=null&&(b=Ft(p?U:_e(U),q.to),A==1))return b}return x&&{from:x,to:b}},du.prototype.changed=function(){var A=this,p=this.find(-1,!0),x=this,b=this.doc.cm;!p||!b||us(b,function(){var B=p.line,U=_e(p.line),q=cd(b,U);if(q&&(Zd(q),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!Zr(x.doc,B)&&x.height!=null){var ne=x.height;x.height=null;var ue=au(x)-ne;ue&&Ri(B,B.height+ue)}ko(b,"markerChanged",b,A)})},du.prototype.attachLine=function(A){if(!this.lines.length&&this.doc.cm){var p=this.doc.cm.curOp;(!p.maybeHiddenMarkers||ze(p.maybeHiddenMarkers,this)==-1)&&(p.maybeUnhiddenMarkers||(p.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(A)},du.prototype.detachLine=function(A){if(this.lines.splice(ze(this.lines,A),1),!this.lines.length&&this.doc.cm){var p=this.doc.cm.curOp;(p.maybeHiddenMarkers||(p.maybeHiddenMarkers=[])).push(this)}},je(du);function rh(A,p,x,b,B){if(b&&b.shared)return eg(A,p,x,b,B);if(A.cm&&!A.cm.curOp)return $i(A.cm,rh)(A,p,x,b,B);var U=new du(A,B),q=wn(p,x);if(b&&ke(b,U,!1),q>0||q==0&&U.clearWhenEmpty!==!1)return U;if(U.replacedWith&&(U.collapsed=!0,U.widgetNode=gt("span",[U.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||U.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(U.widgetNode.insertLeft=!0)),U.collapsed){if(Ur(A,p.line,p,x,U)||p.line!=x.line&&Ur(A,x.line,p,x,U))throw new Error("Inserting collapsed marker partially overlapping an existing one");ss()}U.addToHistory&&Pi(A,{from:p,to:x,origin:"markText"},A.sel,NaN);var ne=p.line,ue=A.cm,ve;if(A.iter(ne,x.line+1,function(nt){ue&&U.collapsed&&!ue.options.lineWrapping&&vr(nt)==ue.display.maxLine&&(ve=!0),U.collapsed&&ne!=p.line&&Ri(nt,0),Al(nt,new ul(U,ne==p.line?p.ch:null,ne==x.line?x.ch:null),A.cm&&A.cm.curOp),++ne}),U.collapsed&&A.iter(p.line,x.line+1,function(nt){Zr(A,nt)&&Ri(nt,0)}),U.clearOnEnter&&Kt(U,"beforeCursorEnter",function(){return U.clear()}),U.readOnly&&(nu(),(A.history.done.length||A.history.undone.length)&&A.clearHistory()),U.collapsed&&(U.id=++tf,U.atomic=!0),ue){if(ve&&(ue.curOp.updateMaxLine=!0),U.collapsed)va(ue,p.line,x.line+1);else if(U.className||U.startStyle||U.endStyle||U.css||U.attributes||U.title)for(var Qe=p.line;Qe<=x.line;Qe++)dl(ue,Qe,"text");U.atomic&&Uc(ue.doc),ko(ue,"markerAdded",ue,U)}return U}var ih=function(A,p){this.markers=A,this.primary=p;for(var x=0;x<A.length;++x)A[x].parent=this};ih.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var A=0;A<this.markers.length;++A)this.markers[A].clear();ko(this,"clear")}},ih.prototype.find=function(A,p){return this.primary.find(A,p)},je(ih);function eg(A,p,x,b,B){b=ke(b),b.shared=!1;var U=[rh(A,p,x,b,B)],q=U[0],ne=b.widgetNode;return hn(A,function(ue){ne&&(b.widgetNode=ne.cloneNode(!0)),U.push(rh(ue,Dr(ue,p),Dr(ue,x),b,B));for(var ve=0;ve<ue.linked.length;++ve)if(ue.linked[ve].isParent)return;q=yn(U)}),new ih(U,q)}function fl(A){return A.findMarks(Ft(A.first,0),A.clipPos(Ft(A.lastLine())),function(p){return p.parent})}function oh(A,p){for(var x=0;x<p.length;x++){var b=p[x],B=b.find(),U=A.clipPos(B.from),q=A.clipPos(B.to);if(wn(U,q)){var ne=rh(A,U,q,b.primary,b.primary.type);b.markers.push(ne),ne.parent=b}}}function b0(A){for(var p=function(b){var B=A[b],U=[B.primary.doc];hn(B.primary.doc,function(ue){return U.push(ue)});for(var q=0;q<B.markers.length;q++){var ne=B.markers[q];ze(U,ne.doc)==-1&&(ne.parent=null,B.markers.splice(q--,1))}},x=0;x<A.length;x++)p(x)}var nm=0,Os=function(A,p,x,b,B){if(!(this instanceof Os))return new Os(A,p,x,b,B);x==null&&(x=0),Jh.call(this,[new vd([new Fl("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var U=Ft(x,0);this.sel=Ye(U),this.history=new qr(null),this.id=++nm,this.modeOption=p,this.lineSep=b,this.direction=B=="rtl"?"rtl":"ltr",this.extend=!1,typeof A=="string"&&(A=this.splitLines(A)),Xt(this,{from:U,to:U,text:A}),zi(this,Ye(U),St)};Os.prototype=Nr(Jh.prototype,{constructor:Os,iter:function(A,p,x){x?this.iterN(A-this.first,p-A,x):this.iterN(this.first,this.first+this.size,A)},insert:function(A,p){for(var x=0,b=0;b<p.length;++b)x+=p[b].height;this.insertInner(A-this.first,p,x)},remove:function(A,p){this.removeInner(A-this.first,p)},getValue:function(A){var p=Co(this,this.first,this.first+this.size);return A===!1?p:p.join(A||this.lineSeparator())},setValue:Ca(function(A){var p=Ft(this.first,0),x=this.first+this.size-1;cu(this,{from:p,to:Ft(x,Gn(this,x).text.length),text:this.splitLines(A),origin:"setValue",full:!0},!0),this.cm&&ca(this.cm,0,0),zi(this,Ye(p),St)}),replaceRange:function(A,p,x,b){p=Dr(this,p),x=x?Dr(this,x):p,IA(this,A,p,x,b)},getRange:function(A,p,x){var b=ro(this,Dr(this,A),Dr(this,p));return x===!1?b:x===""?b.join(""):b.join(x||this.lineSeparator())},getLine:function(A){var p=this.getLineHandle(A);return p&&p.text},getLineHandle:function(A){if(Zt(this,A))return Gn(this,A)},getLineNumber:function(A){return _e(A)},getLineHandleVisualStart:function(A){return typeof A=="number"&&(A=Gn(this,A)),vr(A)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(A){return Dr(this,A)},getCursor:function(A){var p=this.sel.primary(),x;return A==null||A=="head"?x=p.head:A=="anchor"?x=p.anchor:A=="end"||A=="to"||A===!1?x=p.to():x=p.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ca(function(A,p,x){iA(this,Dr(this,typeof A=="number"?Ft(A,p||0):A),null,x)}),setSelection:Ca(function(A,p,x){iA(this,Dr(this,A),Dr(this,p||A),x)}),extendSelection:Ca(function(A,p,x){Js(this,Dr(this,A),p&&Dr(this,p),x)}),extendSelections:Ca(function(A,p){Au(this,vi(this,A),p)}),extendSelectionsBy:Ca(function(A,p){var x=tr(this.sel.ranges,A);Au(this,vi(this,x),p)}),setSelections:Ca(function(A,p,x){if(A.length){for(var b=[],B=0;B<A.length;B++)b[B]=new Oe(Dr(this,A[B].anchor),Dr(this,A[B].head||A[B].anchor));p==null&&(p=Math.min(A.length-1,this.sel.primIndex)),zi(this,qe(this.cm,b,p),x)}}),addSelection:Ca(function(A,p,x){var b=this.sel.ranges.slice(0);b.push(new Oe(Dr(this,A),Dr(this,p||A))),zi(this,qe(this.cm,b,b.length-1),x)}),getSelection:function(A){for(var p=this.sel.ranges,x,b=0;b<p.length;b++){var B=ro(this,p[b].from(),p[b].to());x=x?x.concat(B):B}return A===!1?x:x.join(A||this.lineSeparator())},getSelections:function(A){for(var p=[],x=this.sel.ranges,b=0;b<x.length;b++){var B=ro(this,x[b].from(),x[b].to());A!==!1&&(B=B.join(A||this.lineSeparator())),p[b]=B}return p},replaceSelection:function(A,p,x){for(var b=[],B=0;B<this.sel.ranges.length;B++)b[B]=A;this.replaceSelections(b,p,x||"+input")},replaceSelections:Ca(function(A,p,x){for(var b=[],B=this.sel,U=0;U<B.ranges.length;U++){var q=B.ranges[U];b[U]={from:q.from(),to:q.to(),text:this.splitLines(A[U]),origin:x}}for(var ne=p&&p!="end"&&tt(this,b,p),ue=b.length-1;ue>=0;ue--)cu(this,b[ue]);ne?Ss(this,ne):this.cm&&ao(this.cm)}),undo:Ca(function(){ku(this,"undo")}),redo:Ca(function(){ku(this,"redo")}),undoSelection:Ca(function(){ku(this,"undo",!0)}),redoSelection:Ca(function(){ku(this,"redo",!0)}),setExtending:function(A){this.extend=A},getExtending:function(){return this.extend},historySize:function(){for(var A=this.history,p=0,x=0,b=0;b<A.done.length;b++)A.done[b].ranges||++p;for(var B=0;B<A.undone.length;B++)A.undone[B].ranges||++x;return{undo:p,redo:x}},clearHistory:function(){var A=this;this.history=new qr(this.history),hn(this,function(p){return p.history=A.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(A){return A&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(A){return this.history.generation==(A||this.cleanGeneration)},getHistory:function(){return{done:mo(this.history.done),undone:mo(this.history.undone)}},setHistory:function(A){var p=this.history=new qr(this.history);p.done=mo(A.done.slice(0),null,!0),p.undone=mo(A.undone.slice(0),null,!0)},setGutterMarker:Ca(function(A,p,x){return oA(this,A,"gutter",function(b){var B=b.gutterMarkers||(b.gutterMarkers={});return B[p]=x,!x&&ee(B)&&(b.gutterMarkers=null),!0})}),clearGutter:Ca(function(A){var p=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[A]&&oA(p,x,"gutter",function(){return x.gutterMarkers[A]=null,ee(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(A){var p;if(typeof A=="number"){if(!Zt(this,A)||(p=A,A=Gn(this,A),!A))return null}else if(p=_e(A),p==null)return null;return{line:p,handle:A,text:A.text,gutterMarkers:A.gutterMarkers,textClass:A.textClass,bgClass:A.bgClass,wrapClass:A.wrapClass,widgets:A.widgets}},addLineClass:Ca(function(A,p,x){return oA(this,A,p=="gutter"?"gutter":"class",function(b){var B=p=="text"?"textClass":p=="background"?"bgClass":p=="gutter"?"gutterClass":"wrapClass";if(!b[B])b[B]=x;else{if(Te(x).test(b[B]))return!1;b[B]+=" "+x}return!0})}),removeLineClass:Ca(function(A,p,x){return oA(this,A,p=="gutter"?"gutter":"class",function(b){var B=p=="text"?"textClass":p=="background"?"bgClass":p=="gutter"?"gutterClass":"wrapClass",U=b[B];if(U)if(x==null)b[B]=null;else{var q=U.match(Te(x));if(!q)return!1;var ne=q.index+q[0].length;b[B]=U.slice(0,q.index)+(!q.index||ne==U.length?"":" ")+U.slice(ne)||null}else return!1;return!0})}),addLineWidget:Ca(function(A,p,x){return ef(this,A,p,x)}),removeLineWidget:function(A){A.clear()},markText:function(A,p,x){return rh(this,Dr(this,A),Dr(this,p),x,x&&x.type||"range")},setBookmark:function(A,p){var x={replacedWith:p&&(p.nodeType==null?p.widget:p),insertLeft:p&&p.insertLeft,clearWhenEmpty:!1,shared:p&&p.shared,handleMouseEvents:p&&p.handleMouseEvents};return A=Dr(this,A),rh(this,A,A,x,"bookmark")},findMarksAt:function(A){A=Dr(this,A);var p=[],x=Gn(this,A.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var B=x[b];(B.from==null||B.from<=A.ch)&&(B.to==null||B.to>=A.ch)&&p.push(B.marker.parent||B.marker)}return p},findMarks:function(A,p,x){A=Dr(this,A),p=Dr(this,p);var b=[],B=A.line;return this.iter(A.line,p.line+1,function(U){var q=U.markedSpans;if(q)for(var ne=0;ne<q.length;ne++){var ue=q[ne];!(ue.to!=null&&B==A.line&&A.ch>=ue.to||ue.from==null&&B!=A.line||ue.from!=null&&B==p.line&&ue.from>=p.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.marker)}++B}),b},getAllMarks:function(){var A=[];return this.iter(function(p){var x=p.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&A.push(x[b].marker)}),A},posFromIndex:function(A){var p,x=this.first,b=this.lineSeparator().length;return this.iter(function(B){var U=B.text.length+b;if(U>A)return p=A,!0;A-=U,++x}),Dr(this,Ft(x,p))},indexFromPos:function(A){A=Dr(this,A);var p=A.ch;if(A.line<this.first||A.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,A.line,function(b){p+=b.text.length+x}),p},copy:function(A){var p=new Os(Co(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return p.scrollTop=this.scrollTop,p.scrollLeft=this.scrollLeft,p.sel=this.sel,p.extend=!1,A&&(p.history.undoDepth=this.history.undoDepth,p.setHistory(this.getHistory())),p},linkedDoc:function(A){A||(A={});var p=this.first,x=this.first+this.size;A.from!=null&&A.from>p&&(p=A.from),A.to!=null&&A.to<x&&(x=A.to);var b=new Os(Co(this,p,x),A.mode||this.modeOption,p,this.lineSep,this.direction);return A.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:A.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:A.sharedHist}],oh(b,fl(this)),b},unlinkDoc:function(A){if(A instanceof _o&&(A=A.doc),this.linked)for(var p=0;p<this.linked.length;++p){var x=this.linked[p];if(x.doc==A){this.linked.splice(p,1),A.unlinkDoc(this),b0(fl(this));break}}if(A.history==this.history){var b=[A.id];hn(A,function(B){return b.push(B.id)},!0),A.history=new qr(null),A.history.done=mo(this.history.done,b),A.history.undone=mo(this.history.undone,b)}},iterLinkedDocs:function(A){hn(this,A)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(A){return this.lineSep?A.split(this.lineSep):Or(A)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Ca(function(A){A!="rtl"&&(A="ltr"),A!=this.direction&&(this.direction=A,this.iter(function(p){return p.order=null}),this.cm&&qn(this.cm))})}),Os.prototype.eachLine=Os.prototype.iter;var rm=0;function im(A){var p=this;if(w0(p),!(ce(p,A)||Ul(p.display,A))){rt(A),d&&(rm=+new Date);var x=lu(p,A,!0),b=A.dataTransfer.files;if(!(!x||p.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var B=b.length,U=Array(B),q=0,ne=function(){++q==B&&$i(p,function(){x=Dr(p.doc,x);var Ct={from:x,to:x,text:p.doc.splitLines(U.filter(function(Nt){return Nt!=null}).join(p.doc.lineSeparator())),origin:"paste"};cu(p.doc,Ct),Ss(p.doc,Ye(Dr(p.doc,x),Dr(p.doc,He(Ct))))})()},ue=function(Ct,Nt){if(p.options.allowDropFileTypes&&ze(p.options.allowDropFileTypes,Ct.type)==-1){ne();return}var cn=new FileReader;cn.onerror=function(){return ne()},cn.onload=function(){var kn=cn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(kn)){ne();return}U[Nt]=kn,ne()},cn.readAsText(Ct)},ve=0;ve<b.length;ve++)ue(b[ve],ve);else{if(p.state.draggingText&&p.doc.sel.contains(x)>-1){p.state.draggingText(A),setTimeout(function(){return p.display.input.focus()},20);return}try{var Qe=A.dataTransfer.getData("Text");if(Qe){var nt;if(p.state.draggingText&&!p.state.draggingText.copy&&(nt=p.listSelections()),Bi(p.doc,Ye(x,x)),nt)for(var Ot=0;Ot<nt.length;++Ot)IA(p.doc,"",nt[Ot].anchor,nt[Ot].head,"drag");p.replaceSelection(Qe,"around","paste"),p.display.input.focus()}}catch{}}}}function x0(A,p){if(d&&(!A.state.draggingText||+new Date-rm<100)){et(p);return}if(!(ce(A,p)||Ul(A.display,p))&&(p.dataTransfer.setData("Text",A.getSelection()),p.dataTransfer.effectAllowed="copyMove",p.dataTransfer.setDragImage&&!$)){var x=ye("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",D&&(x.width=x.height=1,A.display.wrapper.appendChild(x),x._top=x.offsetTop),p.dataTransfer.setDragImage(x,0,0),D&&x.parentNode.removeChild(x)}}function Qi(A,p){var x=lu(A,p);if(x){var b=document.createDocumentFragment();tc(A,x,b),A.display.dragCursor||(A.display.dragCursor=ye("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),A.display.lineSpace.insertBefore(A.display.dragCursor,A.display.cursorDiv)),$e(A.display.dragCursor,b)}}function w0(A){A.display.dragCursor&&(A.display.lineSpace.removeChild(A.display.dragCursor),A.display.dragCursor=null)}function M0(A){if(document.getElementsByClassName){for(var p=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<p.length;b++){var B=p[b].CodeMirror;B&&x.push(B)}x.length&&x[0].operation(function(){for(var U=0;U<x.length;U++)A(x[U])})}}var nf=!1;function om(){nf||(tg(),nf=!0)}function tg(){var A;Kt(window,"resize",function(){A==null&&(A=setTimeout(function(){A=null,M0(S0)},100))}),Kt(window,"blur",function(){return M0(Lc)})}function S0(A){var p=A.display;p.cachedCharWidth=p.cachedTextHeight=p.cachedPaddingH=null,p.scrollbarsClipped=!1,A.setSize()}for(var La={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},pl=0;pl<10;pl++)La[pl+48]=La[pl+96]=String(pl);for(var Cd=65;Cd<=90;Cd++)La[Cd]=String.fromCharCode(Cd);for(var ah=1;ah<=12;ah++)La[ah+111]=La[ah+63235]="F"+ah;var kA={};kA.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},kA.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},kA.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},kA.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},kA.default=pe?kA.macDefault:kA.pcDefault;function ng(A){var p=A.split(/-(?!$)/);A=p[p.length-1];for(var x,b,B,U,q=0;q<p.length-1;q++){var ne=p[q];if(/^(cmd|meta|m)$/i.test(ne))U=!0;else if(/^a(lt)?$/i.test(ne))x=!0;else if(/^(c|ctrl|control)$/i.test(ne))b=!0;else if(/^s(hift)?$/i.test(ne))B=!0;else throw new Error("Unrecognized modifier name: "+ne)}return x&&(A="Alt-"+A),b&&(A="Ctrl-"+A),U&&(A="Cmd-"+A),B&&(A="Shift-"+A),A}function Ku(A){var p={};for(var x in A)if(A.hasOwnProperty(x)){var b=A[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete A[x];continue}for(var B=tr(x.split(" "),ng),U=0;U<B.length;U++){var q=void 0,ne=void 0;U==B.length-1?(ne=B.join(" "),q=b):(ne=B.slice(0,U+1).join(" "),q="...");var ue=p[ne];if(!ue)p[ne]=q;else if(ue!=q)throw new Error("Inconsistent bindings for "+ne)}delete A[x]}for(var ve in p)A[ve]=p[ve];return A}function Pu(A,p,x,b){p=rf(p);var B=p.call?p.call(A,b):p[A];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&x(B))return"handled";if(p.fallthrough){if(Object.prototype.toString.call(p.fallthrough)!="[object Array]")return Pu(A,p.fallthrough,x,b);for(var U=0;U<p.fallthrough.length;U++){var q=Pu(A,p.fallthrough[U],x,b);if(q)return q}}}function am(A){var p=typeof A=="string"?A:La[A.keyCode];return p=="Ctrl"||p=="Alt"||p=="Shift"||p=="Mod"}function cp(A,p,x){var b=A;return p.altKey&&b!="Alt"&&(A="Alt-"+A),(Ce?p.metaKey:p.ctrlKey)&&b!="Ctrl"&&(A="Ctrl-"+A),(Ce?p.ctrlKey:p.metaKey)&&b!="Mod"&&(A="Cmd-"+A),!x&&p.shiftKey&&b!="Shift"&&(A="Shift-"+A),A}function _d(A,p){if(D&&A.keyCode==34&&A.char)return!1;var x=La[A.keyCode];return x==null||A.altGraphKey?!1:(A.keyCode==3&&A.code&&(x=A.code),cp(x,A,p))}function rf(A){return typeof A=="string"?kA[A]:A}function hu(A,p){for(var x=A.doc.sel.ranges,b=[],B=0;B<x.length;B++){for(var U=p(x[B]);b.length&&wn(U.from,yn(b).to)<=0;){var q=b.pop();if(wn(q.from,U.from)<0){U.from=q.from;break}}b.push(U)}us(A,function(){for(var ne=b.length-1;ne>=0;ne--)IA(A.doc,"",b[ne].from,b[ne].to,"+delete");ao(A)})}function bd(A,p,x){var b=At(A.text,p+x,x);return b<0||b>A.text.length?null:b}function dp(A,p,x){var b=bd(A,p.ch,x);return b==null?null:new Ft(p.line,b,x<0?"after":"before")}function hp(A,p,x,b,B){if(A){p.doc.direction=="rtl"&&(B=-B);var U=On(x,p.doc.direction);if(U){var q=B<0?yn(U):U[0],ne=B<0==(q.level==1),ue=ne?"after":"before",ve;if(q.level>0||p.doc.direction=="rtl"){var Qe=Rl(p,x);ve=B<0?x.text.length-1:0;var nt=Sl(p,Qe,ve).top;ve=Bt(function(Ot){return Sl(p,Qe,Ot).top==nt},B<0==(q.level==1)?q.from:q.to-1,ve),ue=="before"&&(ve=bd(x,ve,1))}else ve=B<0?q.to:q.from;return new Ft(b,ve,ue)}}return new Ft(b,B<0?x.text.length:0,B<0?"before":"after")}function xd(A,p,x,b){var B=On(p,A.doc.direction);if(!B)return dp(p,x,b);x.ch>=p.text.length?(x.ch=p.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var U=fn(B,x.ch,x.sticky),q=B[U];if(A.doc.direction=="ltr"&&q.level%2==0&&(b>0?q.to>x.ch:q.from<x.ch))return dp(p,x,b);var ne=function(Vn,bn){return bd(p,Vn instanceof Ft?Vn.ch:Vn,bn)},ue,ve=function(Vn){return A.options.lineWrapping?(ue=ue||Rl(A,p),Ko(A,p,ue,Vn)):{begin:0,end:p.text.length}},Qe=ve(x.sticky=="before"?ne(x,-1):x.ch);if(A.doc.direction=="rtl"||q.level==1){var nt=q.level==1==b<0,Ot=ne(x,nt?1:-1);if(Ot!=null&&(nt?Ot<=q.to&&Ot<=Qe.end:Ot>=q.from&&Ot>=Qe.begin)){var Ct=nt?"before":"after";return new Ft(x.line,Ot,Ct)}}var Nt=function(Vn,bn,Rn){for(var lr=function(Ro,qa){return qa?new Ft(x.line,ne(Ro,1),"before"):new Ft(x.line,Ro,"after")};Vn>=0&&Vn<B.length;Vn+=bn){var Tr=B[Vn],_r=bn>0==(Tr.level!=1),fi=_r?Rn.begin:ne(Rn.end,-1);if(Tr.from<=fi&&fi<Tr.to||(fi=_r?Tr.from:ne(Tr.to,-1),Rn.begin<=fi&&fi<Rn.end))return lr(fi,_r)}},cn=Nt(U+b,b,Qe);if(cn)return cn;var kn=b>0?Qe.end:ne(Qe.begin,-1);return kn!=null&&!(b>0&&kn==p.text.length)&&(cn=Nt(b>0?0:B.length-1,b,ve(kn)),cn)?cn:null}var fp={selectAll:uc,singleSelection:function(A){return A.setSelection(A.getCursor("anchor"),A.getCursor("head"),St)},killLine:function(A){return hu(A,function(p){if(p.empty()){var x=Gn(A.doc,p.head.line).text.length;return p.head.ch==x&&p.head.line<A.lastLine()?{from:p.head,to:Ft(p.head.line+1,0)}:{from:p.head,to:Ft(p.head.line,x)}}else return{from:p.from(),to:p.to()}})},deleteLine:function(A){return hu(A,function(p){return{from:Ft(p.from().line,0),to:Dr(A.doc,Ft(p.to().line+1,0))}})},delLineLeft:function(A){return hu(A,function(p){return{from:Ft(p.from().line,0),to:p.from()}})},delWrappedLineLeft:function(A){return hu(A,function(p){var x=A.charCoords(p.head,"div").top+5,b=A.coordsChar({left:0,top:x},"div");return{from:b,to:p.from()}})},delWrappedLineRight:function(A){return hu(A,function(p){var x=A.charCoords(p.head,"div").top+5,b=A.coordsChar({left:A.display.lineDiv.offsetWidth+100,top:x},"div");return{from:p.from(),to:b}})},undo:function(A){return A.undo()},redo:function(A){return A.redo()},undoSelection:function(A){return A.undoSelection()},redoSelection:function(A){return A.redoSelection()},goDocStart:function(A){return A.extendSelection(Ft(A.firstLine(),0))},goDocEnd:function(A){return A.extendSelection(Ft(A.lastLine()))},goLineStart:function(A){return A.extendSelectionsBy(function(p){return Rc(A,p.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(A){return A.extendSelectionsBy(function(p){return E0(A,p.head)},{origin:"+move",bias:1})},goLineEnd:function(A){return A.extendSelectionsBy(function(p){return rg(A,p.head.line)},{origin:"+move",bias:-1})},goLineRight:function(A){return A.extendSelectionsBy(function(p){var x=A.cursorCoords(p.head,"div").top+5;return A.coordsChar({left:A.display.lineDiv.offsetWidth+100,top:x},"div")},zt)},goLineLeft:function(A){return A.extendSelectionsBy(function(p){var x=A.cursorCoords(p.head,"div").top+5;return A.coordsChar({left:0,top:x},"div")},zt)},goLineLeftSmart:function(A){return A.extendSelectionsBy(function(p){var x=A.cursorCoords(p.head,"div").top+5,b=A.coordsChar({left:0,top:x},"div");return b.ch<A.getLine(b.line).search(/\S/)?E0(A,p.head):b},zt)},goLineUp:function(A){return A.moveV(-1,"line")},goLineDown:function(A){return A.moveV(1,"line")},goPageUp:function(A){return A.moveV(-1,"page")},goPageDown:function(A){return A.moveV(1,"page")},goCharLeft:function(A){return A.moveH(-1,"char")},goCharRight:function(A){return A.moveH(1,"char")},goColumnLeft:function(A){return A.moveH(-1,"column")},goColumnRight:function(A){return A.moveH(1,"column")},goWordLeft:function(A){return A.moveH(-1,"word")},goGroupRight:function(A){return A.moveH(1,"group")},goGroupLeft:function(A){return A.moveH(-1,"group")},goWordRight:function(A){return A.moveH(1,"word")},delCharBefore:function(A){return A.deleteH(-1,"codepoint")},delCharAfter:function(A){return A.deleteH(1,"char")},delWordBefore:function(A){return A.deleteH(-1,"word")},delWordAfter:function(A){return A.deleteH(1,"word")},delGroupBefore:function(A){return A.deleteH(-1,"group")},delGroupAfter:function(A){return A.deleteH(1,"group")},indentAuto:function(A){return A.indentSelection("smart")},indentMore:function(A){return A.indentSelection("add")},indentLess:function(A){return A.indentSelection("subtract")},insertTab:function(A){return A.replaceSelection("	")},insertSoftTab:function(A){for(var p=[],x=A.listSelections(),b=A.options.tabSize,B=0;B<x.length;B++){var U=x[B].from(),q=ge(A.getLine(U.line),U.ch,b);p.push(gn(b-q%b))}A.replaceSelections(p)},defaultTab:function(A){A.somethingSelected()?A.indentSelection("add"):A.execCommand("insertTab")},transposeChars:function(A){return us(A,function(){for(var p=A.listSelections(),x=[],b=0;b<p.length;b++)if(p[b].empty()){var B=p[b].head,U=Gn(A.doc,B.line).text;if(U){if(B.ch==U.length&&(B=new Ft(B.line,B.ch-1)),B.ch>0)B=new Ft(B.line,B.ch+1),A.replaceRange(U.charAt(B.ch-1)+U.charAt(B.ch-2),Ft(B.line,B.ch-2),B,"+transpose");else if(B.line>A.doc.first){var q=Gn(A.doc,B.line-1).text;q&&(B=new Ft(B.line,1),A.replaceRange(U.charAt(0)+A.doc.lineSeparator()+q.charAt(q.length-1),Ft(B.line-1,q.length-1),B,"+transpose"))}}x.push(new Oe(B,B))}A.setSelections(x)})},newlineAndIndent:function(A){return us(A,function(){for(var p=A.listSelections(),x=p.length-1;x>=0;x--)A.replaceRange(A.doc.lineSeparator(),p[x].anchor,p[x].head,"+input");p=A.listSelections();for(var b=0;b<p.length;b++)A.indentLine(p[b].from().line,null,!0);ao(A)})},openLine:function(A){return A.replaceSelection(`
`,"start")},toggleOverwrite:function(A){return A.toggleOverwrite()}};function Rc(A,p){var x=Gn(A.doc,p),b=vr(x);return b!=x&&(p=_e(b)),hp(!0,A,b,p,1)}function rg(A,p){var x=Gn(A.doc,p),b=kr(x);return b!=x&&(p=_e(b)),hp(!0,A,x,p,-1)}function E0(A,p){var x=Rc(A,p.line),b=Gn(A.doc,x.line),B=On(b,A.doc.direction);if(!B||B[0].level==0){var U=Math.max(x.ch,b.text.search(/\S/)),q=p.line==x.line&&p.ch<=U&&p.ch;return Ft(x.line,q?0:U,x.sticky)}return x}function wd(A,p,x){if(typeof p=="string"&&(p=fp[p],!p))return!1;A.display.input.ensurePolled();var b=A.display.shift,B=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),x&&(A.display.shift=!1),B=p(A)!=ot}finally{A.display.shift=b,A.state.suppressEdits=!1}return B}function Qv(A,p,x){for(var b=0;b<A.state.keyMaps.length;b++){var B=Pu(p,A.state.keyMaps[b],x,A);if(B)return B}return A.options.extraKeys&&Pu(p,A.options.extraKeys,x,A)||Pu(p,A.options.keyMap,x,A)}var of=new Se;function pp(A,p,x,b){var B=A.state.keySeq;if(B){if(am(p))return"handled";if(/\'$/.test(p)?A.state.keySeq=null:of.set(50,function(){A.state.keySeq==B&&(A.state.keySeq=null,A.display.input.reset())}),ba(A,B+" "+p,x,b))return!0}return ba(A,p,x,b)}function ba(A,p,x,b){var B=Qv(A,p,b);return B=="multi"&&(A.state.keySeq=p),B=="handled"&&ko(A,"keyHandled",A,p,x),(B=="handled"||B=="multi")&&(rt(x),Xu(A)),!!B}function af(A,p){var x=_d(p,!0);return x?p.shiftKey&&!A.state.keySeq?pp(A,"Shift-"+x,p,function(b){return wd(A,b,!0)})||pp(A,x,p,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return wd(A,b)}):pp(A,x,p,function(b){return wd(A,b)}):!1}function ig(A,p,x){return pp(A,"'"+x+"'",p,function(b){return wd(A,b,!0)})}var sh=null;function sf(A){var p=this;if(!(A.target&&A.target!=p.display.input.getField())&&(p.curOp.focus=ft(Ht(p)),!ce(p,A))){d&&f<11&&A.keyCode==27&&(A.returnValue=!1);var x=A.keyCode;p.display.shift=x==16||A.shiftKey;var b=af(p,A);D&&(sh=b?x:null,!b&&x==88&&!Qr&&(pe?A.metaKey:A.ctrlKey)&&p.replaceSelection("",null,"cut")),i&&!pe&&!b&&x==46&&A.shiftKey&&!A.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(p.display.lineDiv.className)&&el(p)}}function el(A){var p=A.display.lineDiv;Re(p,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(Pe(p,"CodeMirror-crosshair"),rr(document,"keyup",x),rr(document,"mouseover",x))}Kt(document,"keyup",x),Kt(document,"mouseover",x)}function sA(A){A.keyCode==16&&(this.doc.sel.shift=!1),ce(this,A)}function O0(A){var p=this;if(!(A.target&&A.target!=p.display.input.getField())&&!(Ul(p.display,A)||ce(p,A)||A.ctrlKey&&!A.altKey||pe&&A.metaKey)){var x=A.keyCode,b=A.charCode;if(D&&x==sh){sh=null,rt(A);return}if(!(D&&(!A.which||A.which<10)&&af(p,A))){var B=String.fromCharCode(b??x);B!="\b"&&(ig(p,A,B)||p.display.input.onKeyPress(A))}}}var mp=400,Md=function(A,p,x){this.time=A,this.pos=p,this.button=x};Md.prototype.compare=function(A,p,x){return this.time+mp>A&&wn(p,this.pos)==0&&x==this.button};var lA,lh;function og(A,p){var x=+new Date;return lh&&lh.compare(x,A,p)?(lA=lh=null,"triple"):lA&&lA.compare(x,A,p)?(lh=new Md(x,A,p),lA=null,"double"):(lA=new Md(x,A,p),lh=null,"single")}function B0(A){var p=this,x=p.display;if(!(ce(p,A)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=A.shiftKey,Ul(x,A)){C||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!Ah(p,A)){var b=lu(p,A),B=tn(A),U=b?og(b,B):"single";Qt(p).focus(),B==1&&p.state.selectingText&&p.state.selectingText(A),!(b&&lf(p,B,b,U,A))&&(B==1?b?uh(p,b,U,A):Mt(A)==x.scroller&&rt(A):B==2?(b&&Js(p.doc,b),setTimeout(function(){return x.input.focus()},20)):B==3&&(we?p.display.input.onContextMenu(A):nc(p)))}}}function lf(A,p,x,b,B){var U="Click";return b=="double"?U="Double"+U:b=="triple"&&(U="Triple"+U),U=(p==1?"Left":p==2?"Middle":"Right")+U,pp(A,cp(U,B),B,function(q){if(typeof q=="string"&&(q=fp[q]),!q)return!1;var ne=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),ne=q(A,x)!=ot}finally{A.state.suppressEdits=!1}return ne})}function uf(A,p,x){var b=A.getOption("configureMouse"),B=b?b(A,p,x):{};if(B.unit==null){var U=fe?x.shiftKey&&x.metaKey:x.altKey;B.unit=U?"rectangle":p=="single"?"char":p=="double"?"word":"line"}return(B.extend==null||A.doc.extend)&&(B.extend=A.doc.extend||x.shiftKey),B.addNew==null&&(B.addNew=pe?x.metaKey:x.ctrlKey),B.moveOnDrag==null&&(B.moveOnDrag=!(pe?x.altKey:x.ctrlKey)),B}function uh(A,p,x,b){d?setTimeout(Yt(Ju,A),0):A.curOp.focus=ft(Ht(A));var B=uf(A,x,b),U=A.doc.sel,q;A.options.dragDrop&&qt&&!A.isReadOnly()&&x=="single"&&(q=U.contains(p))>-1&&(wn((q=U.ranges[q]).from(),p)<0||p.xRel>0)&&(wn(q.to(),p)>0||p.xRel<0)?Yv(A,b,p,B):sm(A,b,p,B)}function Yv(A,p,x,b){var B=A.display,U=!1,q=$i(A,function(ve){C&&(B.scroller.draggable=!1),A.state.draggingText=!1,A.state.delayingBlurEvent&&(A.hasFocus()?A.state.delayingBlurEvent=!1:nc(A)),rr(B.wrapper.ownerDocument,"mouseup",q),rr(B.wrapper.ownerDocument,"mousemove",ne),rr(B.scroller,"dragstart",ue),rr(B.scroller,"drop",q),U||(rt(ve),b.addNew||Js(A.doc,x,null,null,b.extend),C&&!$||d&&f==9?setTimeout(function(){B.wrapper.ownerDocument.body.focus({preventScroll:!0}),B.input.focus()},20):B.input.focus())}),ne=function(ve){U=U||Math.abs(p.clientX-ve.clientX)+Math.abs(p.clientY-ve.clientY)>=10},ue=function(){return U=!0};C&&(B.scroller.draggable=!0),A.state.draggingText=q,q.copy=!b.moveOnDrag,Kt(B.wrapper.ownerDocument,"mouseup",q),Kt(B.wrapper.ownerDocument,"mousemove",ne),Kt(B.scroller,"dragstart",ue),Kt(B.scroller,"drop",q),A.state.delayingBlurEvent=!0,setTimeout(function(){return B.input.focus()},20),B.scroller.dragDrop&&B.scroller.dragDrop()}function gp(A,p,x){if(x=="char")return new Oe(p,p);if(x=="word")return A.findWordAt(p);if(x=="line")return new Oe(Ft(p.line,0),Dr(A.doc,Ft(p.line+1,0)));var b=x(A,p);return new Oe(b.from,b.to)}function sm(A,p,x,b){d&&nc(A);var B=A.display,U=A.doc;rt(p);var q,ne,ue=U.sel,ve=ue.ranges;if(b.addNew&&!b.extend?(ne=U.sel.contains(x),ne>-1?q=ve[ne]:q=new Oe(x,x)):(q=U.sel.primary(),ne=U.sel.primIndex),b.unit=="rectangle")b.addNew||(q=new Oe(x,x)),x=lu(A,p,!0,!0),ne=-1;else{var Qe=gp(A,x,b.unit);b.extend?q=so(q,Qe.anchor,Qe.head,b.extend):q=Qe}b.addNew?ne==-1?(ne=ve.length,zi(U,qe(A,ve.concat([q]),ne),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[ne].empty()&&b.unit=="char"&&!b.extend?(zi(U,qe(A,ve.slice(0,ne).concat(ve.slice(ne+1)),0),{scroll:!1,origin:"*mouse"}),ue=U.sel):Ms(U,ne,q,Rt):(ne=0,zi(U,new me([q],0),Rt),ue=U.sel);var nt=x;function Ot(Rn){if(wn(nt,Rn)!=0)if(nt=Rn,b.unit=="rectangle"){for(var lr=[],Tr=A.options.tabSize,_r=ge(Gn(U,x.line).text,x.ch,Tr),fi=ge(Gn(U,Rn.line).text,Rn.ch,Tr),Ro=Math.min(_r,fi),qa=Math.max(_r,fi),xa=Math.min(x.line,Rn.line),Fa=Math.min(A.lastLine(),Math.max(x.line,Rn.line));xa<=Fa;xa++){var As=Gn(U,xa).text,cs=mt(As,Ro,Tr);Ro==qa?lr.push(new Oe(Ft(xa,cs),Ft(xa,cs))):As.length>cs&&lr.push(new Oe(Ft(xa,cs),Ft(xa,mt(As,qa,Tr))))}lr.length||lr.push(new Oe(x,x)),zi(U,qe(A,ue.ranges.slice(0,ne).concat(lr),ne),{origin:"*mouse",scroll:!1}),A.scrollIntoView(Rn)}else{var Ol=q,tl=gp(A,Rn,b.unit),Bs=Ol.anchor,ds;wn(tl.anchor,Bs)>0?(ds=tl.head,Bs=Jo(Ol.from(),tl.anchor)):(ds=tl.anchor,Bs=li(Ol.to(),tl.head));var ha=ue.ranges.slice(0);ha[ne]=Af(A,new Oe(Dr(U,Bs),ds)),zi(U,qe(A,ha,ne),Rt)}}var Ct=B.wrapper.getBoundingClientRect(),Nt=0;function cn(Rn){var lr=++Nt,Tr=lu(A,Rn,!0,b.unit=="rectangle");if(Tr)if(wn(Tr,nt)!=0){A.curOp.focus=ft(Ht(A)),Ot(Tr);var _r=tA(B,U);(Tr.line>=_r.to||Tr.line<_r.from)&&setTimeout($i(A,function(){Nt==lr&&cn(Rn)}),150)}else{var fi=Rn.clientY<Ct.top?-20:Rn.clientY>Ct.bottom?20:0;fi&&setTimeout($i(A,function(){Nt==lr&&(B.scroller.scrollTop+=fi,cn(Rn))}),50)}}function kn(Rn){A.state.selectingText=!1,Nt=1/0,Rn&&(rt(Rn),B.input.focus()),rr(B.wrapper.ownerDocument,"mousemove",Vn),rr(B.wrapper.ownerDocument,"mouseup",bn),U.history.lastSelOrigin=null}var Vn=$i(A,function(Rn){Rn.buttons===0||!tn(Rn)?kn(Rn):cn(Rn)}),bn=$i(A,kn);A.state.selectingText=bn,Kt(B.wrapper.ownerDocument,"mousemove",Vn),Kt(B.wrapper.ownerDocument,"mouseup",bn)}function Af(A,p){var x=p.anchor,b=p.head,B=Gn(A.doc,x.line);if(wn(x,b)==0&&x.sticky==b.sticky)return p;var U=On(B);if(!U)return p;var q=fn(U,x.ch,x.sticky),ne=U[q];if(ne.from!=x.ch&&ne.to!=x.ch)return p;var ue=q+(ne.from==x.ch==(ne.level!=1)?0:1);if(ue==0||ue==U.length)return p;var ve;if(b.line!=x.line)ve=(b.line-x.line)*(A.doc.direction=="ltr"?1:-1)>0;else{var Qe=fn(U,b.ch,b.sticky),nt=Qe-q||(b.ch-x.ch)*(ne.level==1?-1:1);Qe==ue-1||Qe==ue?ve=nt<0:ve=nt>0}var Ot=U[ue+(ve?-1:0)],Ct=ve==(Ot.level==1),Nt=Ct?Ot.from:Ot.to,cn=Ct?"after":"before";return x.ch==Nt&&x.sticky==cn?p:new Oe(new Ft(x.line,Nt,cn),b)}function lm(A,p,x,b){var B,U;if(p.touches)B=p.touches[0].clientX,U=p.touches[0].clientY;else try{B=p.clientX,U=p.clientY}catch{return!1}if(B>=Math.floor(A.display.gutters.getBoundingClientRect().right))return!1;b&&rt(p);var q=A.display,ne=q.lineDiv.getBoundingClientRect();if(U>ne.bottom||!Ie(A,x))return pt(p);U-=ne.top-q.viewOffset;for(var ue=0;ue<A.display.gutterSpecs.length;++ue){var ve=q.gutters.childNodes[ue];if(ve&&ve.getBoundingClientRect().right>=B){var Qe=Je(A.doc,U),nt=A.display.gutterSpecs[ue];return Le(A,x,A,Qe,nt.className,p),pt(p)}}}function Ah(A,p){return lm(A,p,"gutterClick",!0)}function um(A,p){Ul(A.display,p)||Am(A,p)||ce(A,p,"contextmenu")||we||A.display.input.onContextMenu(p)}function Am(A,p){return Ie(A,"gutterContextMenu")?lm(A,p,"gutterContextMenu",!1):!1}function ag(A){A.display.wrapper.className=A.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+A.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Iu(A)}var ch={toString:function(){return"CodeMirror.Init"}},yp={},uA={};function I0(A){var p=A.optionHandlers;function x(b,B,U,q){A.defaults[b]=B,U&&(p[b]=q?function(ne,ue,ve){ve!=ch&&U(ne,ue,ve)}:U)}A.defineOption=x,A.Init=ch,x("value","",function(b,B){return b.setValue(B)},!0),x("mode",null,function(b,B){b.doc.modeOption=B,xt(b)},!0),x("indentUnit",2,xt,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){Pt(b),Iu(b),va(b)},!0),x("lineSeparator",null,function(b,B){if(b.doc.lineSep=B,!!B){var U=[],q=b.doc.first;b.doc.iter(function(ue){for(var ve=0;;){var Qe=ue.text.indexOf(B,ve);if(Qe==-1)break;ve=Qe+B.length,U.push(Ft(q,Qe))}q++});for(var ne=U.length-1;ne>=0;ne--)IA(b.doc,B,U[ne],Ft(U[ne].line,U[ne].ch+B.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(b,B,U){b.state.specialChars=new RegExp(B.source+(B.test("	")?"":"|	"),"g"),U!=ch&&b.refresh()}),x("specialCharPlaceholder",$u,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",ae?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,B){return b.getInputField().spellcheck=B},!0),x("autocorrect",!1,function(b,B){return b.getInputField().autocorrect=B},!0),x("autocapitalize",!1,function(b,B){return b.getInputField().autocapitalize=B},!0),x("rtlMoveVisually",!X),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){ag(b),w(b)},!0),x("keyMap","default",function(b,B,U){var q=rf(B),ne=U!=ch&&rf(U);ne&&ne.detach&&ne.detach(b,q),q.attach&&q.attach(b,ne||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,dh,!0),x("gutters",[],function(b,B){b.display.gutterSpecs=m(B,b.options.lineNumbers),w(b)},!0),x("fixedGutter",!0,function(b,B){b.display.gutters.style.left=B?Hi(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return hl(b)},!0),x("scrollbarStyle","native",function(b){op(b),hl(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,B){b.display.gutterSpecs=m(b.options.gutters,B),w(b)},!0),x("firstLineNumber",1,w,!0),x("lineNumberFormatter",function(b){return b},w,!0),x("showCursorWhenSelecting",!1,Hu,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,B){B=="nocursor"&&(Lc(b),b.display.input.blur()),b.display.input.readOnlyChanged(B)}),x("screenReaderLabel",null,function(b,B){B=B===""?null:B,b.display.input.screenReaderLabelChanged(B)}),x("disableInput",!1,function(b,B){B||b.display.input.reset()},!0),x("dragDrop",!0,sg),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Hu,!0),x("singleCursorHeightPerLine",!0,Hu,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,Pt,!0),x("addModeClass",!1,Pt,!0),x("pollInterval",100),x("undoDepth",200,function(b,B){return b.doc.history.undoDepth=B}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,Pt,!0),x("moveInputWithCursor",!0,function(b,B){B||b.display.input.resetPosition()}),x("tabindex",null,function(b,B){return b.display.input.getField().tabIndex=B||""}),x("autofocus",null),x("direction","ltr",function(b,B){return b.doc.setDirection(B)},!0),x("phrases",null)}function sg(A,p,x){var b=x&&x!=ch;if(!p!=!b){var B=A.display.dragFunctions,U=p?Kt:rr;U(A.display.scroller,"dragstart",B.start),U(A.display.scroller,"dragenter",B.enter),U(A.display.scroller,"dragover",B.over),U(A.display.scroller,"dragleave",B.leave),U(A.display.scroller,"drop",B.drop)}}function dh(A){A.options.lineWrapping?(Re(A.display.wrapper,"CodeMirror-wrap"),A.display.sizer.style.minWidth="",A.display.sizerWidth=null):(Pe(A.display.wrapper,"CodeMirror-wrap"),$a(A)),$h(A),va(A),Iu(A),setTimeout(function(){return hl(A)},100)}function _o(A,p){var x=this;if(!(this instanceof _o))return new _o(A,p);this.options=p=p?ke(p):{},ke(yp,p,!1);var b=p.value;typeof b=="string"?b=new Os(b,p.mode,null,p.lineSeparator,p.direction):p.mode&&(b.modeOption=p.mode),this.doc=b;var B=new _o.inputStyles[p.inputStyle](this),U=this.display=new k(A,b,B,p);U.wrapper.CodeMirror=this,ag(this),p.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),op(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Se,keySeq:null,specialChars:null},p.autofocus&&!ae&&U.input.focus(),d&&f<11&&setTimeout(function(){return x.display.input.reset(!0)},20),lg(this),om(),rA(this),this.curOp.forceUpdate=!0,un(this,b),p.autofocus&&!ae||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&eh(x)},20):Lc(this);for(var q in uA)uA.hasOwnProperty(q)&&uA[q](this,p[q],ch);u(this),p.finishInit&&p.finishInit(this);for(var ne=0;ne<cm.length;++ne)cm[ne](this);El(this),C&&p.lineWrapping&&getComputedStyle(U.lineDiv).textRendering=="optimizelegibility"&&(U.lineDiv.style.textRendering="auto")}_o.defaults=yp,_o.optionHandlers=uA;function lg(A){var p=A.display;Kt(p.scroller,"mousedown",$i(A,B0)),d&&f<11?Kt(p.scroller,"dblclick",$i(A,function(ue){if(!ce(A,ue)){var ve=lu(A,ue);if(!(!ve||Ah(A,ue)||Ul(A.display,ue))){rt(ue);var Qe=A.findWordAt(ve);Js(A.doc,Qe.anchor,Qe.head)}}})):Kt(p.scroller,"dblclick",function(ue){return ce(A,ue)||rt(ue)}),Kt(p.scroller,"contextmenu",function(ue){return um(A,ue)}),Kt(p.input.getField(),"contextmenu",function(ue){p.scroller.contains(ue.target)||um(A,ue)});var x,b={end:0};function B(){p.activeTouch&&(x=setTimeout(function(){return p.activeTouch=null},1e3),b=p.activeTouch,b.end=+new Date)}function U(ue){if(ue.touches.length!=1)return!1;var ve=ue.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function q(ue,ve){if(ve.left==null)return!0;var Qe=ve.left-ue.left,nt=ve.top-ue.top;return Qe*Qe+nt*nt>20*20}Kt(p.scroller,"touchstart",function(ue){if(!ce(A,ue)&&!U(ue)&&!Ah(A,ue)){p.input.ensurePolled(),clearTimeout(x);var ve=+new Date;p.activeTouch={start:ve,moved:!1,prev:ve-b.end<=300?b:null},ue.touches.length==1&&(p.activeTouch.left=ue.touches[0].pageX,p.activeTouch.top=ue.touches[0].pageY)}}),Kt(p.scroller,"touchmove",function(){p.activeTouch&&(p.activeTouch.moved=!0)}),Kt(p.scroller,"touchend",function(ue){var ve=p.activeTouch;if(ve&&!Ul(p,ue)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Qe=A.coordsChar(p.activeTouch,"page"),nt;!ve.prev||q(ve,ve.prev)?nt=new Oe(Qe,Qe):!ve.prev.prev||q(ve,ve.prev.prev)?nt=A.findWordAt(Qe):nt=new Oe(Ft(Qe.line,0),Dr(A.doc,Ft(Qe.line+1,0))),A.setSelection(nt.anchor,nt.head),A.focus(),rt(ue)}B()}),Kt(p.scroller,"touchcancel",B),Kt(p.scroller,"scroll",function(){p.scroller.clientHeight&&(Fc(A,p.scroller.scrollTop),da(A,p.scroller.scrollLeft,!0),Le(A,"scroll",A))}),Kt(p.scroller,"mousewheel",function(ue){return de(A,ue)}),Kt(p.scroller,"DOMMouseScroll",function(ue){return de(A,ue)}),Kt(p.wrapper,"scroll",function(){return p.wrapper.scrollTop=p.wrapper.scrollLeft=0}),p.dragFunctions={enter:function(ue){ce(A,ue)||et(ue)},over:function(ue){ce(A,ue)||(Qi(A,ue),et(ue))},start:function(ue){return x0(A,ue)},drop:$i(A,im),leave:function(ue){ce(A,ue)||w0(A)}};var ne=p.input.getField();Kt(ne,"keyup",function(ue){return sA.call(A,ue)}),Kt(ne,"keydown",$i(A,sf)),Kt(ne,"keypress",$i(A,O0)),Kt(ne,"focus",function(ue){return eh(A,ue)}),Kt(ne,"blur",function(ue){return Lc(A,ue)})}var cm=[];_o.defineInitHook=function(A){return cm.push(A)};function cf(A,p,x,b){var B=A.doc,U;x==null&&(x="add"),x=="smart"&&(B.mode.indent?U=ta(A,p).state:x="prev");var q=A.options.tabSize,ne=Gn(B,p),ue=ge(ne.text,null,q);ne.stateAfter&&(ne.stateAfter=null);var ve=ne.text.match(/^\s*/)[0],Qe;if(!b&&!/\S/.test(ne.text))Qe=0,x="not";else if(x=="smart"&&(Qe=B.mode.indent(U,ne.text.slice(ve.length),ne.text),Qe==ot||Qe>150)){if(!b)return;x="prev"}x=="prev"?p>B.first?Qe=ge(Gn(B,p-1).text,null,q):Qe=0:x=="add"?Qe=ue+A.options.indentUnit:x=="subtract"?Qe=ue-A.options.indentUnit:typeof x=="number"&&(Qe=ue+x),Qe=Math.max(0,Qe);var nt="",Ot=0;if(A.options.indentWithTabs)for(var Ct=Math.floor(Qe/q);Ct;--Ct)Ot+=q,nt+="	";if(Ot<Qe&&(nt+=gn(Qe-Ot)),nt!=ve)return IA(B,nt,Ft(p,0),Ft(p,ve.length),"+input"),ne.stateAfter=null,!0;for(var Nt=0;Nt<B.sel.ranges.length;Nt++){var cn=B.sel.ranges[Nt];if(cn.head.line==p&&cn.head.ch<ve.length){var kn=Ft(p,ve.length);Ms(B,Nt,new Oe(kn,kn));break}}}var Du=null;function dm(A){Du=A}function k0(A,p,x,b,B){var U=A.doc;A.display.shift=!1,b||(b=U.sel);var q=+new Date-200,ne=B=="paste"||A.state.pasteIncoming>q,ue=Or(p),ve=null;if(ne&&b.ranges.length>1)if(Du&&Du.text.join(`
`)==p){if(b.ranges.length%Du.text.length==0){ve=[];for(var Qe=0;Qe<Du.text.length;Qe++)ve.push(U.splitLines(Du.text[Qe]))}}else ue.length==b.ranges.length&&A.options.pasteLinesPerSelection&&(ve=tr(ue,function(Vn){return[Vn]}));for(var nt=A.curOp.updateInput,Ot=b.ranges.length-1;Ot>=0;Ot--){var Ct=b.ranges[Ot],Nt=Ct.from(),cn=Ct.to();Ct.empty()&&(x&&x>0?Nt=Ft(Nt.line,Nt.ch-x):A.state.overwrite&&!ne?cn=Ft(cn.line,Math.min(Gn(U,cn.line).text.length,cn.ch+yn(ue).length)):ne&&Du&&Du.lineWise&&Du.text.join(`
`)==ue.join(`
`)&&(Nt=cn=Ft(Nt.line,0)));var kn={from:Nt,to:cn,text:ve?ve[Ot%ve.length]:ue,origin:B||(ne?"paste":A.state.cutIncoming>q?"cut":"+input")};cu(A.doc,kn),ko(A,"inputRead",A,kn)}p&&!ne&&hm(A,p),ao(A),A.curOp.updateInput<2&&(A.curOp.updateInput=nt),A.curOp.typing=!0,A.state.pasteIncoming=A.state.cutIncoming=-1}function cc(A,p){var x=A.clipboardData&&A.clipboardData.getData("Text");if(x)return A.preventDefault(),!p.isReadOnly()&&!p.options.disableInput&&p.hasFocus()&&us(p,function(){return k0(p,x,0,null,"paste")}),!0}function hm(A,p){if(!(!A.options.electricChars||!A.options.smartIndent))for(var x=A.doc.sel,b=x.ranges.length-1;b>=0;b--){var B=x.ranges[b];if(!(B.head.ch>100||b&&x.ranges[b-1].head.line==B.head.line)){var U=A.getModeAt(B.head),q=!1;if(U.electricChars){for(var ne=0;ne<U.electricChars.length;ne++)if(p.indexOf(U.electricChars.charAt(ne))>-1){q=cf(A,B.head.line,"smart");break}}else U.electricInput&&U.electricInput.test(Gn(A.doc,B.head.line).text.slice(0,B.head.ch))&&(q=cf(A,B.head.line,"smart"));q&&ko(A,"electricInput",A,B.head.line)}}}function df(A){for(var p=[],x=[],b=0;b<A.doc.sel.ranges.length;b++){var B=A.doc.sel.ranges[b].head.line,U={anchor:Ft(B,0),head:Ft(B+1,0)};x.push(U),p.push(A.getRange(U.anchor,U.head))}return{text:p,ranges:x}}function zc(A,p,x,b){A.setAttribute("autocorrect",x?"on":"off"),A.setAttribute("autocapitalize",b?"on":"off"),A.setAttribute("spellcheck",!!p)}function hh(){var A=ye("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),p=ye("div",[A],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return C?A.style.width="1000px":A.setAttribute("wrap","off"),N&&(A.style.border="1px solid black"),p}function hf(A){var p=A.optionHandlers,x=A.helpers={};A.prototype={constructor:A,focus:function(){Qt(this).focus(),this.display.input.focus()},setOption:function(b,B){var U=this.options,q=U[b];U[b]==B&&b!="mode"||(U[b]=B,p.hasOwnProperty(b)&&$i(this,p[b])(this,B,q),Le(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,B){this.state.keyMaps[B?"push":"unshift"](rf(b))},removeKeyMap:function(b){for(var B=this.state.keyMaps,U=0;U<B.length;++U)if(B[U]==b||B[U].name==b)return B.splice(U,1),!0},addOverlay:Yr(function(b,B){var U=b.token?b:A.getMode(this.options,b);if(U.startState)throw new Error("Overlays may not be stateful.");dr(this.state.overlays,{mode:U,modeSpec:b,opaque:B&&B.opaque,priority:B&&B.priority||0},function(q){return q.priority}),this.state.modeGen++,va(this)}),removeOverlay:Yr(function(b){for(var B=this.state.overlays,U=0;U<B.length;++U){var q=B[U].modeSpec;if(q==b||typeof b=="string"&&q.name==b){B.splice(U,1),this.state.modeGen++,va(this);return}}}),indentLine:Yr(function(b,B,U){typeof B!="string"&&typeof B!="number"&&(B==null?B=this.options.smartIndent?"smart":"prev":B=B?"add":"subtract"),Zt(this.doc,b)&&cf(this,b,B,U)}),indentSelection:Yr(function(b){for(var B=this.doc.sel.ranges,U=-1,q=0;q<B.length;q++){var ne=B[q];if(ne.empty())ne.head.line>U&&(cf(this,ne.head.line,b,!0),U=ne.head.line,q==this.doc.sel.primIndex&&ao(this));else{var ue=ne.from(),ve=ne.to(),Qe=Math.max(U,ue.line);U=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var nt=Qe;nt<U;++nt)cf(this,nt,b);var Ot=this.doc.sel.ranges;ue.ch==0&&B.length==Ot.length&&Ot[q].from().ch>0&&Ms(this.doc,q,new Oe(ue,Ot[q].to()),St)}}}),getTokenAt:function(b,B){return _A(this,b,B)},getLineTokens:function(b,B){return _A(this,Ft(b),B,!0)},getTokenTypeAt:function(b){b=Dr(this.doc,b);var B=as(this,Gn(this.doc,b.line)),U=0,q=(B.length-1)/2,ne=b.ch,ue;if(ne==0)ue=B[2];else for(;;){var ve=U+q>>1;if((ve?B[ve*2-1]:0)>=ne)q=ve;else if(B[ve*2+1]<ne)U=ve+1;else{ue=B[ve*2+2];break}}var Qe=ue?ue.indexOf("overlay "):-1;return Qe<0?ue:Qe==0?null:ue.slice(0,Qe-1)},getModeAt:function(b){var B=this.doc.mode;return B.innerMode?A.innerMode(B,this.getTokenAt(b).state).mode:B},getHelper:function(b,B){return this.getHelpers(b,B)[0]},getHelpers:function(b,B){var U=[];if(!x.hasOwnProperty(B))return U;var q=x[B],ne=this.getModeAt(b);if(typeof ne[B]=="string")q[ne[B]]&&U.push(q[ne[B]]);else if(ne[B])for(var ue=0;ue<ne[B].length;ue++){var ve=q[ne[B][ue]];ve&&U.push(ve)}else ne.helperType&&q[ne.helperType]?U.push(q[ne.helperType]):q[ne.name]&&U.push(q[ne.name]);for(var Qe=0;Qe<q._global.length;Qe++){var nt=q._global[Qe];nt.pred(ne,this)&&ze(U,nt.val)==-1&&U.push(nt.val)}return U},getStateAfter:function(b,B){var U=this.doc;return b=Ka(U,b??U.first+U.size-1),ta(this,b+1,B).state},cursorCoords:function(b,B){var U,q=this.doc.sel.primary();return b==null?U=q.head:typeof b=="object"?U=Dr(this.doc,b):U=b?q.from():q.to(),jt(this,U,B||"page")},charCoords:function(b,B){return an(this,Dr(this.doc,b),B||"page")},coordsChar:function(b,B){return b=Et(this,b,B||"page"),oo(this,b.left,b.top)},lineAtHeight:function(b,B){return b=Et(this,{top:b,left:0},B||"page").top,Je(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,B,U){var q=!1,ne;if(typeof b=="number"){var ue=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ue&&(b=ue,q=!0),ne=Gn(this.doc,b)}else ne=b;return su(this,ne,{top:0,left:0},B||"page",U||q).top+(q?this.doc.height-Io(ne):0)},defaultTextHeight:function(){return Qa(this.display)},defaultCharWidth:function(){return qu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,B,U,q,ne){var ue=this.display;b=jt(this,Dr(this.doc,b));var ve=b.bottom,Qe=b.left;if(B.style.position="absolute",B.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(B),ue.sizer.appendChild(B),q=="over")ve=b.top;else if(q=="above"||q=="near"){var nt=Math.max(ue.wrapper.clientHeight,this.doc.height),Ot=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(q=="above"||b.bottom+B.offsetHeight>nt)&&b.top>B.offsetHeight?ve=b.top-B.offsetHeight:b.bottom+B.offsetHeight<=nt&&(ve=b.bottom),Qe+B.offsetWidth>Ot&&(Qe=Ot-B.offsetWidth)}B.style.top=ve+"px",B.style.left=B.style.right="",ne=="right"?(Qe=ue.sizer.clientWidth-B.offsetWidth,B.style.right="0px"):(ne=="left"?Qe=0:ne=="middle"&&(Qe=(ue.sizer.clientWidth-B.offsetWidth)/2),B.style.left=Qe+"px"),U&&Qh(this,{left:Qe,top:ve,right:Qe+B.offsetWidth,bottom:ve+B.offsetHeight})},triggerOnKeyDown:Yr(sf),triggerOnKeyPress:Yr(O0),triggerOnKeyUp:sA,triggerOnMouseDown:Yr(B0),execCommand:function(b){if(fp.hasOwnProperty(b))return fp[b].call(null,this)},triggerElectric:Yr(function(b){hm(this,b)}),findPosH:function(b,B,U,q){var ne=1;B<0&&(ne=-1,B=-B);for(var ue=Dr(this.doc,b),ve=0;ve<B&&(ue=Xr(this.doc,ue,ne,U,q),!ue.hitSide);++ve);return ue},moveH:Yr(function(b,B){var U=this;this.extendSelectionsBy(function(q){return U.display.shift||U.doc.extend||q.empty()?Xr(U.doc,q.head,b,B,U.options.rtlMoveVisually):b<0?q.from():q.to()},zt)}),deleteH:Yr(function(b,B){var U=this.doc.sel,q=this.doc;U.somethingSelected()?q.replaceSelection("",null,"+delete"):hu(this,function(ne){var ue=Xr(q,ne.head,b,B,!1);return b<0?{from:ue,to:ne.head}:{from:ne.head,to:ue}})}),findPosV:function(b,B,U,q){var ne=1,ue=q;B<0&&(ne=-1,B=-B);for(var ve=Dr(this.doc,b),Qe=0;Qe<B;++Qe){var nt=jt(this,ve,"div");if(ue==null?ue=nt.left:nt.left=ue,ve=ff(this,nt,ne,U),ve.hitSide)break}return ve},moveV:Yr(function(b,B){var U=this,q=this.doc,ne=[],ue=!this.display.shift&&!q.extend&&q.sel.somethingSelected();if(q.extendSelectionsBy(function(Qe){if(ue)return b<0?Qe.from():Qe.to();var nt=jt(U,Qe.head,"div");Qe.goalColumn!=null&&(nt.left=Qe.goalColumn),ne.push(nt.left);var Ot=ff(U,nt,b,B);return B=="page"&&Qe==q.sel.primary()&&ip(U,an(U,Ot,"div").top-nt.top),Ot},zt),ne.length)for(var ve=0;ve<q.sel.ranges.length;ve++)q.sel.ranges[ve].goalColumn=ne[ve]}),findWordAt:function(b){var B=this.doc,U=Gn(B,b.line).text,q=b.ch,ne=b.ch;if(U){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||ne==U.length)&&q?--q:++ne;for(var ve=U.charAt(q),Qe=Ee(ve,ue)?function(nt){return Ee(nt,ue)}:/\s/.test(ve)?function(nt){return/\s/.test(nt)}:function(nt){return!/\s/.test(nt)&&!Ee(nt)};q>0&&Qe(U.charAt(q-1));)--q;for(;ne<U.length&&Qe(U.charAt(ne));)++ne}return new Oe(Ft(b.line,q),Ft(b.line,ne))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Re(this.display.cursorDiv,"CodeMirror-overwrite"):Pe(this.display.cursorDiv,"CodeMirror-overwrite"),Le(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ft(Ht(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yr(function(b,B){ca(this,b,B)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Ou(this)-this.display.barHeight,width:b.scrollWidth-Ou(this)-this.display.barWidth,clientHeight:ZA(this),clientWidth:wA(this)}},scrollIntoView:Yr(function(b,B){b==null?(b={from:this.doc.sel.primary().head,to:null},B==null&&(B=this.options.cursorScrollMargin)):typeof b=="number"?b={from:Ft(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=B||0,b.from.line!=null?xr(this,b):OA(this,b.from,b.to,b.margin)}),setSize:Yr(function(b,B){var U=this,q=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};b!=null&&(this.display.wrapper.style.width=q(b)),B!=null&&(this.display.wrapper.style.height=q(B)),this.options.lineWrapping&&Pc(this);var ne=this.display.viewFrom;this.doc.iter(ne,this.display.viewTo,function(ue){if(ue.widgets){for(var ve=0;ve<ue.widgets.length;ve++)if(ue.widgets[ve].noHScroll){dl(U,ne,"widget");break}}++ne}),this.curOp.forceUpdate=!0,Le(this,"refresh",this)}),operation:function(b){return us(this,b)},startOperation:function(){return rA(this)},endOperation:function(){return El(this)},refresh:Yr(function(){var b=this.display.cachedTextHeight;va(this),this.curOp.forceUpdate=!0,Iu(this),ca(this,this.doc.scrollLeft,this.doc.scrollTop),nh(this.display),(b==null||Math.abs(b-Qa(this.display))>.5||this.options.lineWrapping)&&$h(this),Le(this,"refresh",this)}),swapDoc:Yr(function(b){var B=this.doc;return B.cm=null,this.state.selectingText&&this.state.selectingText(),un(this,b),Iu(this),this.display.input.reset(),ca(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,ko(this,"swapDoc",this,B),B}),phrase:function(b){var B=this.options.phrases;return B&&Object.prototype.hasOwnProperty.call(B,b)?B[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},je(A),A.registerHelper=function(b,B,U){x.hasOwnProperty(b)||(x[b]=A[b]={_global:[]}),x[b][B]=U},A.registerGlobalHelper=function(b,B,U,q){A.registerHelper(b,B,q),x[b]._global.push({pred:U,val:q})}}function Xr(A,p,x,b,B){var U=p,q=x,ne=Gn(A,p.line),ue=B&&A.direction=="rtl"?-x:x;function ve(){var bn=p.line+ue;return bn<A.first||bn>=A.first+A.size?!1:(p=new Ft(bn,p.ch,p.sticky),ne=Gn(A,bn))}function Qe(bn){var Rn;if(b=="codepoint"){var lr=ne.text.charCodeAt(p.ch+(x>0?0:-1));if(isNaN(lr))Rn=null;else{var Tr=x>0?lr>=55296&&lr<56320:lr>=56320&&lr<57343;Rn=new Ft(p.line,Math.max(0,Math.min(ne.text.length,p.ch+x*(Tr?2:1))),-x)}}else B?Rn=xd(A.cm,ne,p,x):Rn=dp(ne,p,x);if(Rn==null)if(!bn&&ve())p=hp(B,A.cm,ne,p.line,ue);else return!1;else p=Rn;return!0}if(b=="char"||b=="codepoint")Qe();else if(b=="column")Qe(!0);else if(b=="word"||b=="group")for(var nt=null,Ot=b=="group",Ct=A.cm&&A.cm.getHelper(p,"wordChars"),Nt=!0;!(x<0&&!Qe(!Nt));Nt=!1){var cn=ne.text.charAt(p.ch)||`
`,kn=Ee(cn,Ct)?"w":Ot&&cn==`
`?"n":!Ot||/\s/.test(cn)?null:"p";if(Ot&&!Nt&&!kn&&(kn="s"),nt&&nt!=kn){x<0&&(x=1,Qe(),p.sticky="after");break}if(kn&&(nt=kn),x>0&&!Qe(!Nt))break}var Vn=Es(A,p,U,q,!0);return hr(U,Vn)&&(Vn.hitSide=!0),Vn}function ff(A,p,x,b){var B=A.doc,U=p.left,q;if(b=="page"){var ne=Math.min(A.display.wrapper.clientHeight,Qt(A).innerHeight||B(A).documentElement.clientHeight),ue=Math.max(ne-.5*Qa(A.display),3);q=(x>0?p.bottom:p.top)+x*ue}else b=="line"&&(q=x>0?p.bottom+3:p.top-3);for(var ve;ve=oo(A,U,q),!!ve.outside;){if(x<0?q<=0:q>=B.height){ve.hitSide=!0;break}q+=x*5}return ve}var So=function(A){this.cm=A,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};So.prototype.init=function(A){var p=this,x=this,b=x.cm,B=x.div=A.lineDiv;B.contentEditable=!0,zc(B,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function U(ne){for(var ue=ne.target;ue;ue=ue.parentNode){if(ue==B)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Kt(B,"paste",function(ne){!U(ne)||ce(b,ne)||cc(ne,b)||f<=11&&setTimeout($i(b,function(){return p.updateFromDOM()}),20)}),Kt(B,"compositionstart",function(ne){p.composing={data:ne.data,done:!1}}),Kt(B,"compositionupdate",function(ne){p.composing||(p.composing={data:ne.data,done:!1})}),Kt(B,"compositionend",function(ne){p.composing&&(ne.data!=p.composing.data&&p.readFromDOMSoon(),p.composing.done=!0)}),Kt(B,"touchstart",function(){return x.forceCompositionEnd()}),Kt(B,"input",function(){p.composing||p.readFromDOMSoon()});function q(ne){if(!(!U(ne)||ce(b,ne))){if(b.somethingSelected())dm({lineWise:!1,text:b.getSelections()}),ne.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=df(b);dm({lineWise:!0,text:ue.text}),ne.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,St),b.replaceSelection("",null,"cut")})}else return;if(ne.clipboardData){ne.clipboardData.clearData();var ve=Du.text.join(`
`);if(ne.clipboardData.setData("Text",ve),ne.clipboardData.getData("Text")==ve){ne.preventDefault();return}}var Qe=hh(),nt=Qe.firstChild;zc(nt),b.display.lineSpace.insertBefore(Qe,b.display.lineSpace.firstChild),nt.value=Du.text.join(`
`);var Ot=ft(bt(B));Xe(nt),setTimeout(function(){b.display.lineSpace.removeChild(Qe),Ot.focus(),Ot==B&&x.showPrimarySelection()},50)}}Kt(B,"copy",q),Kt(B,"cut",q)},So.prototype.screenReaderLabelChanged=function(A){A?this.div.setAttribute("aria-label",A):this.div.removeAttribute("aria-label")},So.prototype.prepareSelection=function(){var A=Jn(this.cm,!1);return A.focus=ft(bt(this.div))==this.div,A},So.prototype.showSelection=function(A,p){!A||!this.cm.display.view.length||((A.focus||p)&&this.showPrimarySelection(),this.showMultipleSelections(A))},So.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},So.prototype.showPrimarySelection=function(){var A=this.getSelection(),p=this.cm,x=p.doc.sel.primary(),b=x.from(),B=x.to();if(p.display.viewTo==p.display.viewFrom||b.line>=p.display.viewTo||B.line<p.display.viewFrom){A.removeAllRanges();return}var U=zs(p,A.anchorNode,A.anchorOffset),q=zs(p,A.focusNode,A.focusOffset);if(!(U&&!U.bad&&q&&!q.bad&&wn(Jo(U,q),b)==0&&wn(li(U,q),B)==0)){var ne=p.display.view,ue=b.line>=p.display.viewFrom&&Sd(p,b)||{node:ne[0].measure.map[2],offset:0},ve=B.line<p.display.viewTo&&Sd(p,B);if(!ve){var Qe=ne[ne.length-1].measure,nt=Qe.maps?Qe.maps[Qe.maps.length-1]:Qe.map;ve={node:nt[nt.length-1],offset:nt[nt.length-2]-nt[nt.length-3]}}if(!ue||!ve){A.removeAllRanges();return}var Ot=A.rangeCount&&A.getRangeAt(0),Ct;try{Ct=yt(ue.node,ue.offset,ve.offset,ve.node)}catch{}Ct&&(!i&&p.state.focused?(A.collapse(ue.node,ue.offset),Ct.collapsed||(A.removeAllRanges(),A.addRange(Ct))):(A.removeAllRanges(),A.addRange(Ct)),Ot&&A.anchorNode==null?A.addRange(Ot):i&&this.startGracePeriod()),this.rememberSelection()}},So.prototype.startGracePeriod=function(){var A=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){A.gracePeriod=!1,A.selectionChanged()&&A.cm.operation(function(){return A.cm.curOp.selectionChanged=!0})},20)},So.prototype.showMultipleSelections=function(A){$e(this.cm.display.cursorDiv,A.cursors),$e(this.cm.display.selectionDiv,A.selection)},So.prototype.rememberSelection=function(){var A=this.getSelection();this.lastAnchorNode=A.anchorNode,this.lastAnchorOffset=A.anchorOffset,this.lastFocusNode=A.focusNode,this.lastFocusOffset=A.focusOffset},So.prototype.selectionInEditor=function(){var A=this.getSelection();if(!A.rangeCount)return!1;var p=A.getRangeAt(0).commonAncestorContainer;return st(this.div,p)},So.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ft(bt(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},So.prototype.blur=function(){this.div.blur()},So.prototype.getField=function(){return this.div},So.prototype.supportsTouch=function(){return!0},So.prototype.receivedFocus=function(){var A=this,p=this;this.selectionInEditor()?setTimeout(function(){return A.pollSelection()},20):us(this.cm,function(){return p.cm.curOp.selectionChanged=!0});function x(){p.cm.state.focused&&(p.pollSelection(),p.polling.set(p.cm.options.pollInterval,x))}this.polling.set(this.cm.options.pollInterval,x)},So.prototype.selectionChanged=function(){var A=this.getSelection();return A.anchorNode!=this.lastAnchorNode||A.anchorOffset!=this.lastAnchorOffset||A.focusNode!=this.lastFocusNode||A.focusOffset!=this.lastFocusOffset},So.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var A=this.getSelection(),p=this.cm;if(Z&&E&&this.cm.display.gutterSpecs.length&&vp(A.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=zs(p,A.anchorNode,A.anchorOffset),b=zs(p,A.focusNode,A.focusOffset);x&&b&&us(p,function(){zi(p.doc,Ye(x,b),St),(x.bad||b.bad)&&(p.curOp.selectionChanged=!0)})}}},So.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var A=this.cm,p=A.display,x=A.doc.sel.primary(),b=x.from(),B=x.to();if(b.ch==0&&b.line>A.firstLine()&&(b=Ft(b.line-1,Gn(A.doc,b.line-1).length)),B.ch==Gn(A.doc,B.line).text.length&&B.line<A.lastLine()&&(B=Ft(B.line+1,0)),b.line<p.viewFrom||B.line>p.viewTo-1)return!1;var U,q,ne;b.line==p.viewFrom||(U=JA(A,b.line))==0?(q=_e(p.view[0].line),ne=p.view[0].node):(q=_e(p.view[U].line),ne=p.view[U-1].node.nextSibling);var ue=JA(A,B.line),ve,Qe;if(ue==p.view.length-1?(ve=p.viewTo-1,Qe=p.lineDiv.lastChild):(ve=_e(p.view[ue+1].line)-1,Qe=p.view[ue+1].node.previousSibling),!ne)return!1;for(var nt=A.doc.splitLines(ug(A,ne,Qe,q,ve)),Ot=ro(A.doc,Ft(q,0),Ft(ve,Gn(A.doc,ve).text.length));nt.length>1&&Ot.length>1;)if(yn(nt)==yn(Ot))nt.pop(),Ot.pop(),ve--;else if(nt[0]==Ot[0])nt.shift(),Ot.shift(),q++;else break;for(var Ct=0,Nt=0,cn=nt[0],kn=Ot[0],Vn=Math.min(cn.length,kn.length);Ct<Vn&&cn.charCodeAt(Ct)==kn.charCodeAt(Ct);)++Ct;for(var bn=yn(nt),Rn=yn(Ot),lr=Math.min(bn.length-(nt.length==1?Ct:0),Rn.length-(Ot.length==1?Ct:0));Nt<lr&&bn.charCodeAt(bn.length-Nt-1)==Rn.charCodeAt(Rn.length-Nt-1);)++Nt;if(nt.length==1&&Ot.length==1&&q==b.line)for(;Ct&&Ct>b.ch&&bn.charCodeAt(bn.length-Nt-1)==Rn.charCodeAt(Rn.length-Nt-1);)Ct--,Nt++;nt[nt.length-1]=bn.slice(0,bn.length-Nt).replace(/^\u200b+/,""),nt[0]=nt[0].slice(Ct).replace(/\u200b+$/,"");var Tr=Ft(q,Ct),_r=Ft(ve,Ot.length?yn(Ot).length-Nt:0);if(nt.length>1||nt[0]||wn(Tr,_r))return IA(A.doc,nt,Tr,_r,"+input"),!0},So.prototype.ensurePolled=function(){this.forceCompositionEnd()},So.prototype.reset=function(){this.forceCompositionEnd()},So.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},So.prototype.readFromDOMSoon=function(){var A=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(A.readDOMTimeout=null,A.composing)if(A.composing.done)A.composing=null;else return;A.updateFromDOM()},80))},So.prototype.updateFromDOM=function(){var A=this;(this.cm.isReadOnly()||!this.pollContent())&&us(this.cm,function(){return va(A.cm)})},So.prototype.setUneditable=function(A){A.contentEditable="false"},So.prototype.onKeyPress=function(A){A.charCode==0||this.composing||(A.preventDefault(),this.cm.isReadOnly()||$i(this.cm,k0)(this.cm,String.fromCharCode(A.charCode==null?A.keyCode:A.charCode),0))},So.prototype.readOnlyChanged=function(A){this.div.contentEditable=String(A!="nocursor")},So.prototype.onContextMenu=function(){},So.prototype.resetPosition=function(){},So.prototype.needsContentAttribute=!0;function Sd(A,p){var x=cd(A,p.line);if(!x||x.hidden)return null;var b=Gn(A.doc,p.line),B=tp(x,b,p.line),U=On(b,A.doc.direction),q="left";if(U){var ne=fn(U,p.ch);q=ne%2?"right":"left"}var ue=MA(B.map,p.ch,q);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function vp(A){for(var p=A;p;p=p.parentNode)if(/CodeMirror-gutter-wrapper/.test(p.className))return!0;return!1}function jc(A,p){return p&&(A.bad=!0),A}function ug(A,p,x,b,B){var U="",q=!1,ne=A.doc.lineSeparator(),ue=!1;function ve(Ct){return function(Nt){return Nt.id==Ct}}function Qe(){q&&(U+=ne,ue&&(U+=ne),q=ue=!1)}function nt(Ct){Ct&&(Qe(),U+=Ct)}function Ot(Ct){if(Ct.nodeType==1){var Nt=Ct.getAttribute("cm-text");if(Nt){nt(Nt);return}var cn=Ct.getAttribute("cm-marker"),kn;if(cn){var Vn=A.findMarks(Ft(b,0),Ft(B+1,0),ve(+cn));Vn.length&&(kn=Vn[0].find(0))&&nt(ro(A.doc,kn.from,kn.to).join(ne));return}if(Ct.getAttribute("contenteditable")=="false")return;var bn=/^(pre|div|p|li|table|br)$/i.test(Ct.nodeName);if(!/^br$/i.test(Ct.nodeName)&&Ct.textContent.length==0)return;bn&&Qe();for(var Rn=0;Rn<Ct.childNodes.length;Rn++)Ot(Ct.childNodes[Rn]);/^(pre|p)$/i.test(Ct.nodeName)&&(ue=!0),bn&&(q=!0)}else Ct.nodeType==3&&nt(Ct.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ot(p),p!=x;)p=p.nextSibling,ue=!1;return U}function zs(A,p,x){var b;if(p==A.display.lineDiv){if(b=A.display.lineDiv.childNodes[x],!b)return jc(A.clipPos(Ft(A.display.viewTo-1)),!0);p=null,x=0}else for(b=p;;b=b.parentNode){if(!b||b==A.display.lineDiv)return null;if(b.parentNode&&b.parentNode==A.display.lineDiv)break}for(var B=0;B<A.display.view.length;B++){var U=A.display.view[B];if(U.node==b)return qv(U,p,x)}}function qv(A,p,x){var b=A.text.firstChild,B=!1;if(!p||!st(b,p))return jc(Ft(_e(A.line),0),!0);if(p==b&&(B=!0,p=b.childNodes[x],x=0,!p)){var U=A.rest?yn(A.rest):A.line;return jc(Ft(_e(U),U.text.length),B)}var q=p.nodeType==3?p:null,ne=p;for(!q&&p.childNodes.length==1&&p.firstChild.nodeType==3&&(q=p.firstChild,x&&(x=q.nodeValue.length));ne.parentNode!=b;)ne=ne.parentNode;var ue=A.measure,ve=ue.maps;function Qe(kn,Vn,bn){for(var Rn=-1;Rn<(ve?ve.length:0);Rn++)for(var lr=Rn<0?ue.map:ve[Rn],Tr=0;Tr<lr.length;Tr+=3){var _r=lr[Tr+2];if(_r==kn||_r==Vn){var fi=_e(Rn<0?A.line:A.rest[Rn]),Ro=lr[Tr]+bn;return(bn<0||_r!=kn)&&(Ro=lr[Tr+(bn?1:0)]),Ft(fi,Ro)}}}var nt=Qe(q,ne,x);if(nt)return jc(nt,B);for(var Ot=ne.nextSibling,Ct=q?q.nodeValue.length-x:0;Ot;Ot=Ot.nextSibling){if(nt=Qe(Ot,Ot.firstChild,0),nt)return jc(Ft(nt.line,nt.ch-Ct),B);Ct+=Ot.textContent.length}for(var Nt=ne.previousSibling,cn=x;Nt;Nt=Nt.previousSibling){if(nt=Qe(Nt,Nt.firstChild,-1),nt)return jc(Ft(nt.line,nt.ch+cn),B);cn+=Nt.textContent.length}}var Ya=function(A){this.cm=A,this.prevInput="",this.pollingFast=!1,this.polling=new Se,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ya.prototype.init=function(A){var p=this,x=this,b=this.cm;this.createField(A);var B=this.textarea;A.wrapper.insertBefore(this.wrapper,A.wrapper.firstChild),N&&(B.style.width="0px"),Kt(B,"input",function(){d&&f>=9&&p.hasSelection&&(p.hasSelection=null),x.poll()}),Kt(B,"paste",function(q){ce(b,q)||cc(q,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function U(q){if(!ce(b,q)){if(b.somethingSelected())dm({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ne=df(b);dm({lineWise:!0,text:ne.text}),q.type=="cut"?b.setSelections(ne.ranges,null,St):(x.prevInput="",B.value=ne.text.join(`
`),Xe(B))}else return;q.type=="cut"&&(b.state.cutIncoming=+new Date)}}Kt(B,"cut",U),Kt(B,"copy",U),Kt(A.scroller,"paste",function(q){if(!(Ul(A,q)||ce(b,q))){if(!B.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ne=new Event("paste");ne.clipboardData=q.clipboardData,B.dispatchEvent(ne)}}),Kt(A.lineSpace,"selectstart",function(q){Ul(A,q)||rt(q)}),Kt(B,"compositionstart",function(){var q=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:q,range:b.markText(q,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Kt(B,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Ya.prototype.createField=function(A){this.wrapper=hh(),this.textarea=this.wrapper.firstChild;var p=this.cm.options;zc(this.textarea,p.spellcheck,p.autocorrect,p.autocapitalize)},Ya.prototype.screenReaderLabelChanged=function(A){A?this.textarea.setAttribute("aria-label",A):this.textarea.removeAttribute("aria-label")},Ya.prototype.prepareSelection=function(){var A=this.cm,p=A.display,x=A.doc,b=Jn(A);if(A.options.moveInputWithCursor){var B=jt(A,x.sel.primary().head,"div"),U=p.wrapper.getBoundingClientRect(),q=p.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(p.wrapper.clientHeight-10,B.top+q.top-U.top)),b.teLeft=Math.max(0,Math.min(p.wrapper.clientWidth-10,B.left+q.left-U.left))}return b},Ya.prototype.showSelection=function(A){var p=this.cm,x=p.display;$e(x.cursorDiv,A.cursors),$e(x.selectionDiv,A.selection),A.teTop!=null&&(this.wrapper.style.top=A.teTop+"px",this.wrapper.style.left=A.teLeft+"px")},Ya.prototype.reset=function(A){if(!(this.contextMenuPending||this.composing&&A)){var p=this.cm;if(this.resetting=!0,p.somethingSelected()){this.prevInput="";var x=p.getSelection();this.textarea.value=x,p.state.focused&&Xe(this.textarea),d&&f>=9&&(this.hasSelection=x)}else A||(this.prevInput=this.textarea.value="",d&&f>=9&&(this.hasSelection=null));this.resetting=!1}},Ya.prototype.getField=function(){return this.textarea},Ya.prototype.supportsTouch=function(){return!1},Ya.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ae||ft(bt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Ya.prototype.blur=function(){this.textarea.blur()},Ya.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ya.prototype.receivedFocus=function(){this.slowPoll()},Ya.prototype.slowPoll=function(){var A=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){A.poll(),A.cm.state.focused&&A.slowPoll()})},Ya.prototype.fastPoll=function(){var A=!1,p=this;p.pollingFast=!0;function x(){var b=p.poll();!b&&!A?(A=!0,p.polling.set(60,x)):(p.pollingFast=!1,p.slowPoll())}p.polling.set(20,x)},Ya.prototype.poll=function(){var A=this,p=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||this.resetting||!p.state.focused||cr(x)&&!b&&!this.composing||p.isReadOnly()||p.options.disableInput||p.state.keySeq)return!1;var B=x.value;if(B==b&&!p.somethingSelected())return!1;if(d&&f>=9&&this.hasSelection===B||pe&&/[\uf700-\uf7ff]/.test(B))return p.display.input.reset(),!1;if(p.doc.sel==p.display.selForContextMenu){var U=B.charCodeAt(0);if(U==8203&&!b&&(b="​"),U==8666)return this.reset(),this.cm.execCommand("undo")}for(var q=0,ne=Math.min(b.length,B.length);q<ne&&b.charCodeAt(q)==B.charCodeAt(q);)++q;return us(p,function(){k0(p,B.slice(q),b.length-q,null,A.composing?"*compose":null),B.length>1e3||B.indexOf(`
`)>-1?x.value=A.prevInput="":A.prevInput=B,A.composing&&(A.composing.range.clear(),A.composing.range=p.markText(A.composing.start,p.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ya.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ya.prototype.onKeyPress=function(){d&&f>=9&&(this.hasSelection=null),this.fastPoll()},Ya.prototype.onContextMenu=function(A){var p=this,x=p.cm,b=x.display,B=p.textarea;p.contextMenuPending&&p.contextMenuPending();var U=lu(x,A),q=b.scroller.scrollTop;if(!U||D)return;var ne=x.options.resetSelectionOnContextMenu;ne&&x.doc.sel.contains(U)==-1&&$i(x,zi)(x.doc,Ye(U),St);var ue=B.style.cssText,ve=p.wrapper.style.cssText,Qe=p.wrapper.offsetParent.getBoundingClientRect();p.wrapper.style.cssText="position: static",B.style.cssText=`position: absolute; width: 30px; height: 30px;
      top: `+(A.clientY-Qe.top-5)+"px; left: "+(A.clientX-Qe.left-5)+`px;
      z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`;
      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var nt;C&&(nt=B.ownerDocument.defaultView.scrollY),b.input.focus(),C&&B.ownerDocument.defaultView.scrollTo(null,nt),b.input.reset(),x.somethingSelected()||(B.value=p.prevInput=" "),p.contextMenuPending=Ct,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Ot(){if(B.selectionStart!=null){var cn=x.somethingSelected(),kn="​"+(cn?B.value:"");B.value="⇚",B.value=kn,p.prevInput=cn?"":"​",B.selectionStart=1,B.selectionEnd=kn.length,b.selForContextMenu=x.doc.sel}}function Ct(){if(p.contextMenuPending==Ct&&(p.contextMenuPending=!1,p.wrapper.style.cssText=ve,B.style.cssText=ue,d&&f<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=q),B.selectionStart!=null)){(!d||d&&f<9)&&Ot();var cn=0,kn=function(){b.selForContextMenu==x.doc.sel&&B.selectionStart==0&&B.selectionEnd>0&&p.prevInput=="​"?$i(x,uc)(x):cn++<10?b.detectingSelectAll=setTimeout(kn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(kn,200)}}if(d&&f>=9&&Ot(),we){et(A);var Nt=function(){rr(window,"mouseup",Nt),setTimeout(Ct,20)};Kt(window,"mouseup",Nt)}else setTimeout(Ct,50)},Ya.prototype.readOnlyChanged=function(A){A||this.reset(),this.textarea.disabled=A=="nocursor",this.textarea.readOnly=!!A},Ya.prototype.setUneditable=function(){},Ya.prototype.needsContentAttribute=!1;function Ag(A,p){if(p=p?ke(p):{},p.value=A.value,!p.tabindex&&A.tabIndex&&(p.tabindex=A.tabIndex),!p.placeholder&&A.placeholder&&(p.placeholder=A.placeholder),p.autofocus==null){var x=ft(bt(A));p.autofocus=x==A||A.getAttribute("autofocus")!=null&&x==document.body}function b(){A.value=ne.getValue()}var B;if(A.form&&(Kt(A.form,"submit",b),!p.leaveSubmitMethodAlone)){var U=A.form;B=U.submit;try{var q=U.submit=function(){b(),U.submit=B,U.submit(),U.submit=q}}catch{}}p.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return A},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),A.parentNode.removeChild(ue.getWrapperElement()),A.style.display="",A.form&&(rr(A.form,"submit",b),!p.leaveSubmitMethodAlone&&typeof A.form.submit=="function"&&(A.form.submit=B))}},A.style.display="none";var ne=_o(function(ue){return A.parentNode.insertBefore(ue,A.nextSibling)},p);return ne}function Vv(A){A.off=rr,A.on=Kt,A.wheelEventPixels=ie,A.Doc=Os,A.splitLines=Or,A.countColumn=ge,A.findColumn=mt,A.isWordChar=_i,A.Pass=ot,A.signal=Le,A.Line=Fl,A.changeEnd=He,A.scrollbarModel=Qo,A.Pos=Ft,A.cmpPos=wn,A.modes=ar,A.mimeModes=di,A.resolveMode=ho,A.getMode=si,A.modeExtensions=fo,A.extendMode=Na,A.copyState=Ia,A.startState=os,A.innerMode=Ei,A.commands=fp,A.keyMap=kA,A.keyName=_d,A.isModifierKey=am,A.lookupKey=Pu,A.normalizeKeyMap=Ku,A.StringStream=yi,A.SharedTextMarker=ih,A.TextMarker=du,A.LineWidget=aA,A.e_preventDefault=rt,A.e_stopPropagation=lt,A.e_stop=et,A.addClass=Re,A.contains=st,A.rmClass=Pe,A.keyNames=La}I0(_o),hf(_o);var T0="iter insert remove copy getEditor constructor".split(" ");for(var pf in Os.prototype)Os.prototype.hasOwnProperty(pf)&&ze(T0,pf)<0&&(_o.prototype[pf]=function(A){return function(){return A.apply(this.doc,arguments)}}(Os.prototype[pf]));return je(Os),_o.inputStyles={textarea:Ya,contenteditable:So},_o.defineMode=function(A){!_o.defaults.mode&&A!="null"&&(_o.defaults.mode=A),Ui.apply(this,arguments)},_o.defineMIME=to,_o.defineMode("null",function(){return{token:function(A){return A.skipToEnd()}}}),_o.defineMIME("text/plain","null"),_o.defineExtension=function(A,p){_o.prototype[A]=p},_o.defineDocExtension=function(A,p){Os.prototype[A]=p},_o.fromTextArea=Ag,Vv(_o),_o.version="5.65.16",_o})}(xE)),xE.exports}var rye=qw();const qc=Ba(rye);(function(n,e){(function(t){t(qw())})(function(t){t.defineMode("javascript",function(r,i){var o=r.indentUnit,a=i.statementIndent,s=i.jsonld,d=i.json||s,f=i.trackScope!==!1,C=i.typescript,O=i.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function _e(ii){return{type:ii,style:"keyword"}}var Je=_e("keyword a"),Zt=_e("keyword b"),ln=_e("keyword c"),Ft=_e("keyword d"),wn=_e("operator"),hr={type:"atom",style:"atom"};return{if:_e("if"),while:Je,with:Je,else:Zt,do:Zt,try:Zt,finally:Zt,return:Ft,break:Ft,continue:Ft,new:_e("new"),delete:ln,void:ln,throw:ln,debugger:_e("debugger"),var:_e("var"),const:_e("var"),let:_e("var"),function:_e("function"),catch:_e("catch"),for:_e("for"),switch:_e("switch"),case:_e("case"),default:_e("default"),in:wn,typeof:wn,instanceof:wn,true:hr,false:hr,null:hr,undefined:hr,NaN:hr,Infinity:hr,this:_e("this"),class:_e("class"),super:_e("atom"),yield:ln,export:_e("export"),import:_e("import"),extends:ln,await:ln}}(),P=/[+\-*&%=<>!?|~^@]/,D=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function $(_e){for(var Je=!1,Zt,ln=!1;(Zt=_e.next())!=null;){if(!Je){if(Zt=="/"&&!ln)return;Zt=="["?ln=!0:ln&&Zt=="]"&&(ln=!1)}Je=!Je&&Zt=="\\"}}var H,Q;function N(_e,Je,Zt){return H=_e,Q=Zt,Je}function Z(_e,Je){var Zt=_e.next();if(Zt=='"'||Zt=="'")return Je.tokenize=ae(Zt),Je.tokenize(_e,Je);if(Zt=="."&&_e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return N("number","number");if(Zt=="."&&_e.match(".."))return N("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Zt))return N(Zt);if(Zt=="="&&_e.eat(">"))return N("=>","operator");if(Zt=="0"&&_e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return N("number","number");if(/\d/.test(Zt))return _e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),N("number","number");if(Zt=="/")return _e.eat("*")?(Je.tokenize=pe,pe(_e,Je)):_e.eat("/")?(_e.skipToEnd(),N("comment","comment")):Ri(_e,Je,1)?($(_e),_e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),N("regexp","string-2")):(_e.eat("="),N("operator","operator",_e.current()));if(Zt=="`")return Je.tokenize=fe,fe(_e,Je);if(Zt=="#"&&_e.peek()=="!")return _e.skipToEnd(),N("meta","meta");if(Zt=="#"&&_e.eatWhile(O))return N("variable","property");if(Zt=="<"&&_e.match("!--")||Zt=="-"&&_e.match("->")&&!/\S/.test(_e.string.slice(0,_e.start)))return _e.skipToEnd(),N("comment","comment");if(P.test(Zt))return(Zt!=">"||!Je.lexical||Je.lexical.type!=">")&&(_e.eat("=")?(Zt=="!"||Zt=="=")&&_e.eat("="):/[<>*+\-|&?]/.test(Zt)&&(_e.eat(Zt),Zt==">"&&_e.eat(Zt))),Zt=="?"&&_e.eat(".")?N("."):N("operator","operator",_e.current());if(O.test(Zt)){_e.eatWhile(O);var ln=_e.current();if(Je.lastType!="."){if(E.propertyIsEnumerable(ln)){var Ft=E[ln];return N(Ft.type,Ft.style,ln)}if(ln=="async"&&_e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return N("async","keyword",ln)}return N("variable","variable",ln)}}function ae(_e){return function(Je,Zt){var ln=!1,Ft;if(s&&Je.peek()=="@"&&Je.match(D))return Zt.tokenize=Z,N("jsonld-keyword","meta");for(;(Ft=Je.next())!=null&&!(Ft==_e&&!ln);)ln=!ln&&Ft=="\\";return ln||(Zt.tokenize=Z),N("string","string")}}function pe(_e,Je){for(var Zt=!1,ln;ln=_e.next();){if(ln=="/"&&Zt){Je.tokenize=Z;break}Zt=ln=="*"}return N("comment","comment")}function fe(_e,Je){for(var Zt=!1,ln;(ln=_e.next())!=null;){if(!Zt&&(ln=="`"||ln=="$"&&_e.eat("{"))){Je.tokenize=Z;break}Zt=!Zt&&ln=="\\"}return N("quasi","string-2",_e.current())}var X="([{}])";function oe(_e,Je){Je.fatArrowAt&&(Je.fatArrowAt=null);var Zt=_e.string.indexOf("=>",_e.start);if(!(Zt<0)){if(C){var ln=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(_e.string.slice(_e.start,Zt));ln&&(Zt=ln.index)}for(var Ft=0,wn=!1,hr=Zt-1;hr>=0;--hr){var ii=_e.string.charAt(hr),li=X.indexOf(ii);if(li>=0&&li<3){if(!Ft){++hr;break}if(--Ft==0){ii=="("&&(wn=!0);break}}else if(li>=3&&li<6)++Ft;else if(O.test(ii))wn=!0;else if(/["'\/`]/.test(ii))for(;;--hr){if(hr==0)return;var Jo=_e.string.charAt(hr-1);if(Jo==ii&&_e.string.charAt(hr-2)!="\\"){hr--;break}}else if(wn&&!Ft){++hr;break}}wn&&!Ft&&(Je.fatArrowAt=hr)}}var Ce={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function we(_e,Je,Zt,ln,Ft,wn){this.indented=_e,this.column=Je,this.type=Zt,this.prev=Ft,this.info=wn,ln!=null&&(this.align=ln)}function Te(_e,Je){if(!f)return!1;for(var Zt=_e.localVars;Zt;Zt=Zt.next)if(Zt.name==Je)return!0;for(var ln=_e.context;ln;ln=ln.prev)for(var Zt=ln.vars;Zt;Zt=Zt.next)if(Zt.name==Je)return!0}function Pe(_e,Je,Zt,ln,Ft){var wn=_e.cc;for(he.state=_e,he.stream=Ft,he.marked=null,he.cc=wn,he.style=Je,_e.lexical.hasOwnProperty("align")||(_e.lexical.align=!0);;){var hr=wn.length?wn.pop():d?ze:ge;if(hr(Zt,ln)){for(;wn.length&&wn[wn.length-1].lex;)wn.pop()();return he.marked?he.marked:Zt=="variable"&&Te(_e,ln)?"variable-2":Je}}}var he={state:null,column:null,marked:null,cc:null};function $e(){for(var _e=arguments.length-1;_e>=0;_e--)he.cc.push(arguments[_e])}function ye(){return $e.apply(null,arguments),!0}function gt(_e,Je){for(var Zt=Je;Zt;Zt=Zt.next)if(Zt.name==_e)return!0;return!1}function yt(_e){var Je=he.state;if(he.marked="def",!!f){if(Je.context){if(Je.lexical.info=="var"&&Je.context&&Je.context.block){var Zt=st(_e,Je.context);if(Zt!=null){Je.context=Zt;return}}else if(!gt(_e,Je.localVars)){Je.localVars=new Ve(_e,Je.localVars);return}}i.globalVars&&!gt(_e,Je.globalVars)&&(Je.globalVars=new Ve(_e,Je.globalVars))}}function st(_e,Je){if(Je)if(Je.block){var Zt=st(_e,Je.prev);return Zt?Zt==Je.prev?Je:new Re(Zt,Je.vars,!0):null}else return gt(_e,Je.vars)?Je:new Re(Je.prev,new Ve(_e,Je.vars),!1);else return null}function ft(_e){return _e=="public"||_e=="private"||_e=="protected"||_e=="abstract"||_e=="readonly"}function Re(_e,Je,Zt){this.prev=_e,this.vars=Je,this.block=Zt}function Ve(_e,Je){this.name=_e,this.next=Je}var Xe=new Ve("this",new Ve("arguments",null));function Jt(){he.state.context=new Re(he.state.context,he.state.localVars,!1),he.state.localVars=Xe}function Ht(){he.state.context=new Re(he.state.context,he.state.localVars,!0),he.state.localVars=null}Jt.lex=Ht.lex=!0;function bt(){he.state.localVars=he.state.context.vars,he.state.context=he.state.context.prev}bt.lex=!0;function Qt(_e,Je){var Zt=function(){var ln=he.state,Ft=ln.indented;if(ln.lexical.type=="stat")Ft=ln.lexical.indented;else for(var wn=ln.lexical;wn&&wn.type==")"&&wn.align;wn=wn.prev)Ft=wn.indented;ln.lexical=new we(Ft,he.stream.column(),_e,null,ln.lexical,Je)};return Zt.lex=!0,Zt}function Yt(){var _e=he.state;_e.lexical.prev&&(_e.lexical.type==")"&&(_e.indented=_e.lexical.indented),_e.lexical=_e.lexical.prev)}Yt.lex=!0;function ke(_e){function Je(Zt){return Zt==_e?ye():_e==";"||Zt=="}"||Zt==")"||Zt=="]"?$e():ye(Je)}return Je}function ge(_e,Je){return _e=="var"?ye(Qt("vardef",Je),lt,ke(";"),Yt):_e=="keyword a"?ye(Qt("form"),ot,ge,Yt):_e=="keyword b"?ye(Qt("form"),ge,Yt):_e=="keyword d"?he.stream.match(/^\s*$/,!1)?ye():ye(Qt("stat"),Rt,ke(";"),Yt):_e=="debugger"?ye(ke(";")):_e=="{"?ye(Qt("}"),Ht,Bt,Yt,bt):_e==";"?ye():_e=="if"?(he.state.lexical.info=="else"&&he.state.cc[he.state.cc.length-1]==Yt&&he.state.cc.pop()(),ye(Qt("form"),ot,ge,Yt,en)):_e=="function"?ye(Or):_e=="for"?ye(Qt("form"),Ht,Fn,ge,bt,Yt):_e=="class"||C&&Je=="interface"?(he.marked="keyword",ye(Qt("form",_e=="class"?_e:Je),ar,Yt)):_e=="variable"?C&&Je=="declare"?(he.marked="keyword",ye(ge)):C&&(Je=="module"||Je=="enum"||Je=="type")&&he.stream.match(/^\s*\w/,!1)?(he.marked="keyword",Je=="enum"?ye(Gn):Je=="type"?ye(Qr,ke("operator"),On,ke(";")):ye(Qt("form"),pt,ke("{"),Qt("}"),Bt,Yt,Yt)):C&&Je=="namespace"?(he.marked="keyword",ye(Qt("form"),ze,ge,Yt)):C&&Je=="abstract"?(he.marked="keyword",ye(ge)):ye(Qt("stat"),yr):_e=="switch"?ye(Qt("form"),ot,ke("{"),Qt("}","switch"),Ht,Bt,Yt,Yt,bt):_e=="case"?ye(ze,ke(":")):_e=="default"?ye(ke(":")):_e=="catch"?ye(Qt("form"),Jt,Se,ge,Yt,bt):_e=="export"?ye(Qt("stat"),ho,Yt):_e=="import"?ye(Qt("stat"),fo,Yt):_e=="async"?ye(ge):Je=="@"?ye(ze,ge):$e(Qt("stat"),ze,ke(";"),Yt)}function Se(_e){if(_e=="(")return ye(Br,ke(")"))}function ze(_e,Je){return St(_e,Je,!1)}function it(_e,Je){return St(_e,Je,!0)}function ot(_e){return _e!="("?$e():ye(Qt(")"),Rt,ke(")"),Yt)}function St(_e,Je,Zt){if(he.state.fatArrowAt==he.stream.start){var ln=Zt?tr:yn;if(_e=="(")return ye(Jt,Qt(")"),Ke(Br,")"),Yt,ke("=>"),ln,bt);if(_e=="variable")return $e(Jt,pt,ke("=>"),ln,bt)}var Ft=Zt?mt:zt;return Ce.hasOwnProperty(_e)?ye(Ft):_e=="function"?ye(Or,Ft):_e=="class"||C&&Je=="interface"?(he.marked="keyword",ye(Qt("form"),Fr,Yt)):_e=="keyword c"||_e=="async"?ye(Zt?it:ze):_e=="("?ye(Qt(")"),Rt,ke(")"),Yt,Ft):_e=="operator"||_e=="spread"?ye(Zt?it:ze):_e=="["?ye(Qt("]"),yi,Yt,Ft):_e=="{"?At(Ee,"}",null,Ft):_e=="quasi"?$e(or,Ft):_e=="new"?ye(dr(Zt)):ye()}function Rt(_e){return _e.match(/[;\}\)\],]/)?$e():$e(ze)}function zt(_e,Je){return _e==","?ye(Rt):mt(_e,Je,!1)}function mt(_e,Je,Zt){var ln=Zt==!1?zt:mt,Ft=Zt==!1?ze:it;if(_e=="=>")return ye(Jt,Zt?tr:yn,bt);if(_e=="operator")return/\+\+|--/.test(Je)||C&&Je=="!"?ye(ln):C&&Je=="<"&&he.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ye(Qt(">"),Ke(On,">"),Yt,ln):Je=="?"?ye(ze,ke(":"),Ft):ye(Ft);if(_e=="quasi")return $e(or,ln);if(_e!=";"){if(_e=="(")return At(it,")","call",ln);if(_e==".")return ye(_i,ln);if(_e=="[")return ye(Qt("]"),Rt,ke("]"),Yt,ln);if(C&&Je=="as")return he.marked="keyword",ye(On,ln);if(_e=="regexp")return he.state.lastType=he.marked="operator",he.stream.backUp(he.stream.pos-he.stream.start-1),ye(Ft)}}function or(_e,Je){return _e!="quasi"?$e():Je.slice(Je.length-2)!="${"?ye(or):ye(Rt,gn)}function gn(_e){if(_e=="}")return he.marked="string-2",he.state.tokenize=fe,ye(or)}function yn(_e){return oe(he.stream,he.state),$e(_e=="{"?ge:ze)}function tr(_e){return oe(he.stream,he.state),$e(_e=="{"?ge:it)}function dr(_e){return function(Je){return Je=="."?ye(_e?Nr:Sr):Je=="variable"&&C?ye(Ie,_e?mt:zt):$e(_e?it:ze)}}function Sr(_e,Je){if(Je=="target")return he.marked="keyword",ye(zt)}function Nr(_e,Je){if(Je=="target")return he.marked="keyword",ye(mt)}function yr(_e){return _e==":"?ye(Yt,ge):$e(zt,ke(";"),Yt)}function _i(_e){if(_e=="variable")return he.marked="property",ye()}function Ee(_e,Je){if(_e=="async")return he.marked="property",ye(Ee);if(_e=="variable"||he.style=="keyword"){if(he.marked="property",Je=="get"||Je=="set")return ye(ee);var Zt;return C&&he.state.fatArrowAt==he.stream.start&&(Zt=he.stream.match(/^\s*:\s*/,!1))&&(he.state.fatArrowAt=he.stream.pos+Zt[0].length),ye(V)}else{if(_e=="number"||_e=="string")return he.marked=s?"property":he.style+" property",ye(V);if(_e=="jsonld-keyword")return ye(V);if(C&&ft(Je))return he.marked="keyword",ye(Ee);if(_e=="[")return ye(ze,kt,ke("]"),V);if(_e=="spread")return ye(it,V);if(Je=="*")return he.marked="keyword",ye(Ee);if(_e==":")return $e(V)}}function ee(_e){return _e!="variable"?$e(V):(he.marked="property",ye(Or))}function V(_e){if(_e==":")return ye(it);if(_e=="(")return $e(Or)}function Ke(_e,Je,Zt){function ln(Ft,wn){if(Zt?Zt.indexOf(Ft)>-1:Ft==","){var hr=he.state.lexical;return hr.info=="call"&&(hr.pos=(hr.pos||0)+1),ye(function(ii,li){return ii==Je||li==Je?$e():$e(_e)},ln)}return Ft==Je||wn==Je?ye():Zt&&Zt.indexOf(";")>-1?$e(_e):ye(ke(Je))}return function(Ft,wn){return Ft==Je||wn==Je?ye():$e(_e,ln)}}function At(_e,Je,Zt){for(var ln=3;ln<arguments.length;ln++)he.cc.push(arguments[ln]);return ye(Qt(Je,Zt),Ke(_e,Je),Yt)}function Bt(_e){return _e=="}"?ye():$e(ge,Bt)}function kt(_e,Je){if(C){if(_e==":")return ye(On);if(Je=="?")return ye(kt)}}function Lt(_e,Je){if(C&&(_e==":"||Je=="in"))return ye(On)}function fn(_e){if(C&&_e==":")return he.stream.match(/^\s*\w+\s+is\b/,!1)?ye(ze,Pn,On):ye(On)}function Pn(_e,Je){if(Je=="is")return he.marked="keyword",ye()}function On(_e,Je){if(Je=="keyof"||Je=="typeof"||Je=="infer"||Je=="readonly")return he.marked="keyword",ye(Je=="typeof"?it:On);if(_e=="variable"||Je=="void")return he.marked="type",ye(xe);if(Je=="|"||Je=="&")return ye(On);if(_e=="string"||_e=="number"||_e=="atom")return ye(xe);if(_e=="[")return ye(Qt("]"),Ke(On,"]",","),Yt,xe);if(_e=="{")return ye(Qt("}"),Kt,Yt,xe);if(_e=="(")return ye(Ke(ce,")"),g,xe);if(_e=="<")return ye(Ke(On,">"),On);if(_e=="quasi")return $e(rr,xe)}function g(_e){if(_e=="=>")return ye(On)}function Kt(_e){return _e.match(/[\}\)\]]/)?ye():_e==","||_e==";"?ye(Kt):$e(Pr,Kt)}function Pr(_e,Je){if(_e=="variable"||he.style=="keyword")return he.marked="property",ye(Pr);if(Je=="?"||_e=="number"||_e=="string")return ye(Pr);if(_e==":")return ye(On);if(_e=="[")return ye(ke("variable"),Lt,ke("]"),Pr);if(_e=="(")return $e(cr,Pr);if(!_e.match(/[;\}\)\],]/))return ye()}function rr(_e,Je){return _e!="quasi"?$e():Je.slice(Je.length-2)!="${"?ye(rr):ye(On,Le)}function Le(_e){if(_e=="}")return he.marked="string-2",he.state.tokenize=fe,ye(rr)}function ce(_e,Je){return _e=="variable"&&he.stream.match(/^\s*[?:]/,!1)||Je=="?"?ye(ce):_e==":"?ye(On):_e=="spread"?ye(ce):$e(On)}function xe(_e,Je){if(Je=="<")return ye(Qt(">"),Ke(On,">"),Yt,xe);if(Je=="|"||_e=="."||Je=="&")return ye(On);if(_e=="[")return ye(On,ke("]"),xe);if(Je=="extends"||Je=="implements")return he.marked="keyword",ye(On);if(Je=="?")return ye(On,ke(":"),On)}function Ie(_e,Je){if(Je=="<")return ye(Qt(">"),Ke(On,">"),Yt,xe)}function je(){return $e(On,rt)}function rt(_e,Je){if(Je=="=")return ye(On)}function lt(_e,Je){return Je=="enum"?(he.marked="keyword",ye(Gn)):$e(pt,kt,tn,qt)}function pt(_e,Je){if(C&&ft(Je))return he.marked="keyword",ye(pt);if(_e=="variable")return yt(Je),ye();if(_e=="spread")return ye(pt);if(_e=="[")return At(Mt,"]");if(_e=="{")return At(et,"}")}function et(_e,Je){return _e=="variable"&&!he.stream.match(/^\s*:/,!1)?(yt(Je),ye(tn)):(_e=="variable"&&(he.marked="property"),_e=="spread"?ye(pt):_e=="}"?$e():_e=="["?ye(ze,ke("]"),ke(":"),et):ye(ke(":"),pt,tn))}function Mt(){return $e(pt,tn)}function tn(_e,Je){if(Je=="=")return ye(it)}function qt(_e){if(_e==",")return ye(lt)}function en(_e,Je){if(_e=="keyword b"&&Je=="else")return ye(Qt("form","else"),ge,Yt)}function Fn(_e,Je){if(Je=="await")return ye(Fn);if(_e=="(")return ye(Qt(")"),Bn,Yt)}function Bn(_e){return _e=="var"?ye(lt,Hn):_e=="variable"?ye(Hn):$e(Hn)}function Hn(_e,Je){return _e==")"?ye():_e==";"?ye(Hn):Je=="in"||Je=="of"?(he.marked="keyword",ye(ze,Hn)):$e(ze,Hn)}function Or(_e,Je){if(Je=="*")return he.marked="keyword",ye(Or);if(_e=="variable")return yt(Je),ye(Or);if(_e=="(")return ye(Jt,Qt(")"),Ke(Br,")"),Yt,fn,ge,bt);if(C&&Je=="<")return ye(Qt(">"),Ke(je,">"),Yt,Or)}function cr(_e,Je){if(Je=="*")return he.marked="keyword",ye(cr);if(_e=="variable")return yt(Je),ye(cr);if(_e=="(")return ye(Jt,Qt(")"),Ke(Br,")"),Yt,fn,bt);if(C&&Je=="<")return ye(Qt(">"),Ke(je,">"),Yt,cr)}function Qr(_e,Je){if(_e=="keyword"||_e=="variable")return he.marked="type",ye(Qr);if(Je=="<")return ye(Qt(">"),Ke(je,">"),Yt)}function Br(_e,Je){return Je=="@"&&ye(ze,Br),_e=="spread"?ye(Br):C&&ft(Je)?(he.marked="keyword",ye(Br)):C&&_e=="this"?ye(kt,tn):$e(pt,kt,tn)}function Fr(_e,Je){return _e=="variable"?ar(_e,Je):di(_e,Je)}function ar(_e,Je){if(_e=="variable")return yt(Je),ye(di)}function di(_e,Je){if(Je=="<")return ye(Qt(">"),Ke(je,">"),Yt,di);if(Je=="extends"||Je=="implements"||C&&_e==",")return Je=="implements"&&(he.marked="keyword"),ye(C?On:ze,di);if(_e=="{")return ye(Qt("}"),Ui,Yt)}function Ui(_e,Je){if(_e=="async"||_e=="variable"&&(Je=="static"||Je=="get"||Je=="set"||C&&ft(Je))&&he.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return he.marked="keyword",ye(Ui);if(_e=="variable"||he.style=="keyword")return he.marked="property",ye(to,Ui);if(_e=="number"||_e=="string")return ye(to,Ui);if(_e=="[")return ye(ze,kt,ke("]"),to,Ui);if(Je=="*")return he.marked="keyword",ye(Ui);if(C&&_e=="(")return $e(cr,Ui);if(_e==";"||_e==",")return ye(Ui);if(_e=="}")return ye();if(Je=="@")return ye(ze,Ui)}function to(_e,Je){if(Je=="!"||Je=="?")return ye(to);if(_e==":")return ye(On,tn);if(Je=="=")return ye(it);var Zt=he.state.lexical.prev,ln=Zt&&Zt.info=="interface";return $e(ln?cr:Or)}function ho(_e,Je){return Je=="*"?(he.marked="keyword",ye(os,ke(";"))):Je=="default"?(he.marked="keyword",ye(ze,ke(";"))):_e=="{"?ye(Ke(si,"}"),os,ke(";")):$e(ge)}function si(_e,Je){if(Je=="as")return he.marked="keyword",ye(ke("variable"));if(_e=="variable")return $e(it,si)}function fo(_e){return _e=="string"?ye():_e=="("?$e(ze):_e=="."?$e(zt):$e(Na,Ia,os)}function Na(_e,Je){return _e=="{"?At(Na,"}"):(_e=="variable"&&yt(Je),Je=="*"&&(he.marked="keyword"),ye(Ei))}function Ia(_e){if(_e==",")return ye(Na,Ia)}function Ei(_e,Je){if(Je=="as")return he.marked="keyword",ye(Na)}function os(_e,Je){if(Je=="from")return he.marked="keyword",ye(ze)}function yi(_e){return _e=="]"?ye():$e(Ke(it,"]"))}function Gn(){return $e(Qt("form"),pt,ke("{"),Qt("}"),Ke(ro,"}"),Yt,Yt)}function ro(){return $e(pt,tn)}function Co(_e,Je){return _e.lastType=="operator"||_e.lastType==","||P.test(Je.charAt(0))||/[,.]/.test(Je.charAt(0))}function Ri(_e,Je,Zt){return Je.tokenize==Z&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(Je.lastType)||Je.lastType=="quasi"&&/\{\s*$/.test(_e.string.slice(0,_e.pos-(Zt||0)))}return{startState:function(_e){var Je={tokenize:Z,lastType:"sof",cc:[],lexical:new we((_e||0)-o,0,"block",!1),localVars:i.localVars,context:i.localVars&&new Re(null,null,!1),indented:_e||0};return i.globalVars&&typeof i.globalVars=="object"&&(Je.globalVars=i.globalVars),Je},token:function(_e,Je){if(_e.sol()&&(Je.lexical.hasOwnProperty("align")||(Je.lexical.align=!1),Je.indented=_e.indentation(),oe(_e,Je)),Je.tokenize!=pe&&_e.eatSpace())return null;var Zt=Je.tokenize(_e,Je);return H=="comment"?Zt:(Je.lastType=H=="operator"&&(Q=="++"||Q=="--")?"incdec":H,Pe(Je,Zt,H,Q,_e))},indent:function(_e,Je){if(_e.tokenize==pe||_e.tokenize==fe)return t.Pass;if(_e.tokenize!=Z)return 0;var Zt=Je&&Je.charAt(0),ln=_e.lexical,Ft;if(!/^\s*else\b/.test(Je))for(var wn=_e.cc.length-1;wn>=0;--wn){var hr=_e.cc[wn];if(hr==Yt)ln=ln.prev;else if(hr!=en&&hr!=bt)break}for(;(ln.type=="stat"||ln.type=="form")&&(Zt=="}"||(Ft=_e.cc[_e.cc.length-1])&&(Ft==zt||Ft==mt)&&!/^[,\.=+\-*:?[\(]/.test(Je));)ln=ln.prev;a&&ln.type==")"&&ln.prev.type=="stat"&&(ln=ln.prev);var ii=ln.type,li=Zt==ii;return ii=="vardef"?ln.indented+(_e.lastType=="operator"||_e.lastType==","?ln.info.length+1:0):ii=="form"&&Zt=="{"?ln.indented:ii=="form"?ln.indented+o:ii=="stat"?ln.indented+(Co(_e,Je)?a||o:0):ln.info=="switch"&&!li&&i.doubleIndentSwitch!=!1?ln.indented+(/^(?:case|default)\b/.test(Je)?o:2*o):ln.align?ln.column+(li?0:1):ln.indented+(li?0:o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:s,jsonMode:d,expressionAllowed:Ri,skipExpression:function(_e){Pe(_e,"atom","atom","true",new t.StringStream("",2,null))}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();(function(n,e){(function(t){t(qw())})(function(t){var r="CodeMirror-lint-markers",i="CodeMirror-lint-line-";function o(X,oe,Ce){var we=document.createElement("div");we.className="CodeMirror-lint-tooltip cm-s-"+X.options.theme,we.appendChild(Ce.cloneNode(!0)),X.state.lint.options.selfContain?X.getWrapperElement().appendChild(we):document.body.appendChild(we);function Te(Pe){if(!we.parentNode)return t.off(document,"mousemove",Te);var he=Math.max(0,Pe.clientY-we.offsetHeight-5),$e=Math.max(0,Math.min(Pe.clientX+5,we.ownerDocument.defaultView.innerWidth-we.offsetWidth));we.style.top=he+"px",we.style.left=$e+"px"}return t.on(document,"mousemove",Te),Te(oe),we.style.opacity!=null&&(we.style.opacity=1),we}function a(X){X.parentNode&&X.parentNode.removeChild(X)}function s(X){X.parentNode&&(X.style.opacity==null&&a(X),X.style.opacity=0,setTimeout(function(){a(X)},600))}function d(X,oe,Ce,we){var Te=o(X,oe,Ce);function Pe(){t.off(we,"mouseout",Pe),Te&&(s(Te),Te=null)}var he=setInterval(function(){if(Te)for(var $e=we;;$e=$e.parentNode){if($e&&$e.nodeType==11&&($e=$e.host),$e==document.body)return;if(!$e){Pe();break}}if(!Te)return clearInterval(he)},400);t.on(we,"mouseout",Pe)}function f(X,oe,Ce){this.marked=[],oe instanceof Function&&(oe={getAnnotations:oe}),(!oe||oe===!0)&&(oe={}),this.options={},this.linterOptions=oe.options||{};for(var we in C)this.options[we]=C[we];for(var we in oe)C.hasOwnProperty(we)?oe[we]!=null&&(this.options[we]=oe[we]):oe.options||(this.linterOptions[we]=oe[we]);this.timeout=null,this.hasGutter=Ce,this.onMouseOver=function(Te){fe(X,Te)},this.waitingFor=0}var C={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function O(X){var oe=X.state.lint;oe.hasGutter&&X.clearGutter(r),oe.options.highlightLines&&E(X);for(var Ce=0;Ce<oe.marked.length;++Ce)oe.marked[Ce].clear();oe.marked.length=0}function E(X){X.eachLine(function(oe){var Ce=oe.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(oe.wrapClass);Ce&&X.removeLineClass(oe,"wrap",Ce[0])})}function P(X,oe,Ce,we,Te){var Pe=document.createElement("div"),he=Pe;return Pe.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+Ce,we&&(he=Pe.appendChild(document.createElement("div")),he.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),Te!=!1&&t.on(he,"mouseover",function($e){d(X,$e,oe,he)}),Pe}function D(X,oe){return X=="error"?X:oe}function $(X){for(var oe=[],Ce=0;Ce<X.length;++Ce){var we=X[Ce],Te=we.from.line;(oe[Te]||(oe[Te]=[])).push(we)}return oe}function H(X){var oe=X.severity;oe||(oe="error");var Ce=document.createElement("div");return Ce.className="CodeMirror-lint-message CodeMirror-lint-message-"+oe,typeof X.messageHTML<"u"?Ce.innerHTML=X.messageHTML:Ce.appendChild(document.createTextNode(X.message)),Ce}function Q(X,oe){var Ce=X.state.lint,we=++Ce.waitingFor;function Te(){we=-1,X.off("change",Te)}X.on("change",Te),oe(X.getValue(),function(Pe,he){X.off("change",Te),Ce.waitingFor==we&&(he&&Pe instanceof t&&(Pe=he),X.operation(function(){Z(X,Pe)}))},Ce.linterOptions,X)}function N(X){var oe=X.state.lint;if(oe){var Ce=oe.options,we=Ce.getAnnotations||X.getHelper(t.Pos(0,0),"lint");if(we)if(Ce.async||we.async)Q(X,we);else{var Te=we(X.getValue(),oe.linterOptions,X);if(!Te)return;Te.then?Te.then(function(Pe){X.operation(function(){Z(X,Pe)})}):X.operation(function(){Z(X,Te)})}}}function Z(X,oe){var Ce=X.state.lint;if(Ce){var we=Ce.options;O(X);for(var Te=$(oe),Pe=0;Pe<Te.length;++Pe){var he=Te[Pe];if(he){for(var $e=null,ye=Ce.hasGutter&&document.createDocumentFragment(),gt=0;gt<he.length;++gt){var yt=he[gt],st=yt.severity;st||(st="error"),$e=D($e,st),we.formatAnnotation&&(yt=we.formatAnnotation(yt)),Ce.hasGutter&&ye.appendChild(H(yt)),yt.to&&Ce.marked.push(X.markText(yt.from,yt.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+st,__annotation:yt}))}Ce.hasGutter&&X.setGutterMarker(Pe,r,P(X,ye,$e,he.length>1,we.tooltips)),we.highlightLines&&X.addLineClass(Pe,"wrap",i+$e)}}we.onUpdateLinting&&we.onUpdateLinting(oe,Te,X)}}function ae(X){var oe=X.state.lint;oe&&(clearTimeout(oe.timeout),oe.timeout=setTimeout(function(){N(X)},oe.options.delay))}function pe(X,oe,Ce){for(var we=Ce.target||Ce.srcElement,Te=document.createDocumentFragment(),Pe=0;Pe<oe.length;Pe++){var he=oe[Pe];Te.appendChild(H(he))}d(X,Ce,Te,we)}function fe(X,oe){var Ce=oe.target||oe.srcElement;if(/\bCodeMirror-lint-mark-/.test(Ce.className)){for(var we=Ce.getBoundingClientRect(),Te=(we.left+we.right)/2,Pe=(we.top+we.bottom)/2,he=X.findMarksAt(X.coordsChar({left:Te,top:Pe},"client")),$e=[],ye=0;ye<he.length;++ye){var gt=he[ye].__annotation;gt&&$e.push(gt)}$e.length&&pe(X,$e,oe)}}t.defineOption("lint",!1,function(X,oe,Ce){if(Ce&&Ce!=t.Init&&(O(X),X.state.lint.options.lintOnChange!==!1&&X.off("change",ae),t.off(X.getWrapperElement(),"mouseover",X.state.lint.onMouseOver),clearTimeout(X.state.lint.timeout),delete X.state.lint),oe){for(var we=X.getOption("gutters"),Te=!1,Pe=0;Pe<we.length;++Pe)we[Pe]==r&&(Te=!0);var he=X.state.lint=new f(X,oe,Te);he.options.lintOnChange&&X.on("change",ae),he.options.tooltips!=!1&&he.options.tooltips!="gutter"&&t.on(X.getWrapperElement(),"mouseover",he.onMouseOver),N(X)}}),t.defineExtension("performLint",function(){N(this)})})})();(function(n,e){(function(t){t(qw())})(function(t){var r=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),i=t.Pos,o={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function a(E){return E&&E.bracketRegex||/[(){}[\]]/}function s(E,P,D){var $=E.getLineHandle(P.line),H=P.ch-1,Q=D&&D.afterCursor;Q==null&&(Q=/(^| )cm-fat-cursor($| )/.test(E.getWrapperElement().className));var N=a(D),Z=!Q&&H>=0&&N.test($.text.charAt(H))&&o[$.text.charAt(H)]||N.test($.text.charAt(H+1))&&o[$.text.charAt(++H)];if(!Z)return null;var ae=Z.charAt(1)==">"?1:-1;if(D&&D.strict&&ae>0!=(H==P.ch))return null;var pe=E.getTokenTypeAt(i(P.line,H+1)),fe=d(E,i(P.line,H+(ae>0?1:0)),ae,pe,D);return fe==null?null:{from:i(P.line,H),to:fe&&fe.pos,match:fe&&fe.ch==Z.charAt(0),forward:ae>0}}function d(E,P,D,$,H){for(var Q=H&&H.maxScanLineLength||1e4,N=H&&H.maxScanLines||1e3,Z=[],ae=a(H),pe=D>0?Math.min(P.line+N,E.lastLine()+1):Math.max(E.firstLine()-1,P.line-N),fe=P.line;fe!=pe;fe+=D){var X=E.getLine(fe);if(X){var oe=D>0?0:X.length-1,Ce=D>0?X.length:-1;if(!(X.length>Q))for(fe==P.line&&(oe=P.ch-(D<0?1:0));oe!=Ce;oe+=D){var we=X.charAt(oe);if(ae.test(we)&&($===void 0||(E.getTokenTypeAt(i(fe,oe+1))||"")==($||""))){var Te=o[we];if(Te&&Te.charAt(1)==">"==D>0)Z.push(we);else if(Z.length)Z.pop();else return{pos:i(fe,oe),ch:we}}}}}return fe-D==(D>0?E.lastLine():E.firstLine())?!1:null}function f(E,P,D){for(var $=E.state.matchBrackets.maxHighlightLineLength||1e3,H=D&&D.highlightNonMatching,Q=[],N=E.listSelections(),Z=0;Z<N.length;Z++){var ae=N[Z].empty()&&s(E,N[Z].head,D);if(ae&&(ae.match||H!==!1)&&E.getLine(ae.from.line).length<=$){var pe=ae.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";Q.push(E.markText(ae.from,i(ae.from.line,ae.from.ch+1),{className:pe})),ae.to&&E.getLine(ae.to.line).length<=$&&Q.push(E.markText(ae.to,i(ae.to.line,ae.to.ch+1),{className:pe}))}}if(Q.length){r&&E.state.focused&&E.focus();var fe=function(){E.operation(function(){for(var X=0;X<Q.length;X++)Q[X].clear()})};if(P)setTimeout(fe,800);else return fe}}function C(E){E.operation(function(){E.state.matchBrackets.currentlyHighlighted&&(E.state.matchBrackets.currentlyHighlighted(),E.state.matchBrackets.currentlyHighlighted=null),E.state.matchBrackets.currentlyHighlighted=f(E,!1,E.state.matchBrackets)})}function O(E){E.state.matchBrackets&&E.state.matchBrackets.currentlyHighlighted&&(E.state.matchBrackets.currentlyHighlighted(),E.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,function(E,P,D){D&&D!=t.Init&&(E.off("cursorActivity",C),E.off("focus",C),E.off("blur",O),O(E)),P&&(E.state.matchBrackets=typeof P=="object"?P:{},E.on("cursorActivity",C),E.on("focus",C),E.on("blur",O))}),t.defineExtension("matchBrackets",function(){f(this,!0)}),t.defineExtension("findMatchingBracket",function(E,P,D){return(D||typeof P=="boolean")&&(D?(D.strict=P,P=D):P=P?{strict:!0}:null),s(this,E,P)}),t.defineExtension("scanForBracket",function(E,P,D,$){return d(this,E,P,D,$)})})})();const iye=/("(?:[^\\"]|\\.)*")|[:,]/g;function t$(n,e={}){const t=JSON.stringify([1],void 0,e.indent===void 0?2:e.indent).slice(2,-3),r=t===""?1/0:e.maxLength===void 0?80:e.maxLength;let{replacer:i}=e;return function o(a,s,d){a&&typeof a.toJSON=="function"&&(a=a.toJSON());const f=JSON.stringify(a,i);if(f===void 0)return f;const C=r-s.length-d;if(f.length<=C){const O=f.replace(iye,(E,P)=>P||`${E} `);if(O.length<=C)return O}if(i!=null&&(a=JSON.parse(f),i=void 0),typeof a=="object"&&a!==null){const O=s+t,E=[];let P=0,D,$;if(Array.isArray(a)){D="[",$="]";const{length:H}=a;for(;P<H;P++)E.push(o(a[P],O,P===H-1?0:1)||"null")}else{D="{",$="}";const H=Object.keys(a),{length:Q}=H;for(;P<Q;P++){const N=H[P],Z=`${JSON.stringify(N)}: `,ae=o(a[N],O,Z.length+(P===Q-1?0:1));ae!==void 0&&E.push(Z+ae)}}if(E.length>0)return[D,t+E.join(`,
${O}`),$].join(`
${s}`)}return f}(n,"",0)}function oye(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var n$={};(function(n){var e=function(){var t={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(o,a,s,d,f,C,O){var E=C.length-1;switch(f){case 1:this.$=o.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
`).replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(o);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=C[E-1];case 13:this.$={};break;case 14:this.$=C[E-1];break;case 15:this.$=[C[E-2],C[E]];break;case 16:this.$={},this.$[C[E][0]]=C[E][1];break;case 17:this.$=C[E-2],C[E-2][C[E][0]]=C[E][1];break;case 18:this.$=[];break;case 19:this.$=C[E-1];break;case 20:this.$=[C[E]];break;case 21:this.$=C[E-2],C[E-2].push(C[E]);break}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(o,a){throw new Error(o)},parse:function(o){var a=this,s=[0],d=[null],f=[],C=this.table,O="",E=0,P=0,D=0,$=2,H=1;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var Q=this.lexer.yylloc;f.push(Q),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function N(ye){s.length=s.length-2*ye,d.length=d.length-ye,f.length=f.length-ye}function Z(){var ye;return ye=a.lexer.lex()||1,typeof ye!="number"&&(ye=a.symbols_[ye]||ye),ye}for(var ae,pe,fe,X,oe,Ce={},we,Te,Pe,he;;){if(fe=s[s.length-1],this.defaultActions[fe]?X=this.defaultActions[fe]:(ae==null&&(ae=Z()),X=C[fe]&&C[fe][ae]),typeof X>"u"||!X.length||!X[0]){if(!D){he=[];for(we in C[fe])this.terminals_[we]&&we>2&&he.push("'"+this.terminals_[we]+"'");var $e="";this.lexer.showPosition?$e="Parse error on line "+(E+1)+`:
`+this.lexer.showPosition()+`
Expecting `+he.join(", ")+", got '"+this.terminals_[ae]+"'":$e="Parse error on line "+(E+1)+": Unexpected "+(ae==1?"end of input":"'"+(this.terminals_[ae]||ae)+"'"),this.parseError($e,{text:this.lexer.match,token:this.terminals_[ae]||ae,line:this.lexer.yylineno,loc:Q,expected:he})}if(D==3){if(ae==H)throw new Error($e||"Parsing halted.");P=this.lexer.yyleng,O=this.lexer.yytext,E=this.lexer.yylineno,Q=this.lexer.yylloc,ae=Z()}for(;!($.toString()in C[fe]);){if(fe==0)throw new Error($e||"Parsing halted.");N(1),fe=s[s.length-1]}pe=ae,ae=$,fe=s[s.length-1],X=C[fe]&&C[fe][$],D=3}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fe+", token: "+ae);switch(X[0]){case 1:s.push(ae),d.push(this.lexer.yytext),f.push(this.lexer.yylloc),s.push(X[1]),ae=null,pe?(ae=pe,pe=null):(P=this.lexer.yyleng,O=this.lexer.yytext,E=this.lexer.yylineno,Q=this.lexer.yylloc,D>0&&D--);break;case 2:if(Te=this.productions_[X[1]][1],Ce.$=d[d.length-Te],Ce._$={first_line:f[f.length-(Te||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(Te||1)].first_column,last_column:f[f.length-1].last_column},oe=this.performAction.call(Ce,O,P,E,this.yy,X[1],d,f),typeof oe<"u")return oe;Te&&(s=s.slice(0,-1*Te*2),d=d.slice(0,-1*Te),f=f.slice(0,-1*Te)),s.push(this.productions_[X[1]][0]),d.push(Ce.$),f.push(Ce._$),Pe=C[s[s.length-2]][s[s.length-1]],s.push(Pe);break;case 3:return!0}}return!0}},r=function(){var i={EOF:1,parseError:function(a,s){if(this.yy.parseError)this.yy.parseError(a,s);else throw new Error(a)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.match+=o,this.matched+=o;var a=o.match(/\n/);return a&&this.yylineno++,this._input=this._input.slice(1),o},unput:function(o){return this._input=o+this._input,this},more:function(){return this._more=!0,this},less:function(o){this._input=this.match.slice(o)+this._input},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
`+a+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,a,s,d,f;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),O=0;O<C.length&&(s=this._input.match(this.rules[C[O]]),!(s&&(!a||s[0].length>a[0].length)&&(a=s,d=O,!this.options.flex)));O++);if(a)return f=a[0].match(/\n.*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-1:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],o=this.performAction.call(this,this.yy,this,C[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0;if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return typeof a<"u"?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return i.options={},i.performAction=function(a,s,d,f){switch(d){case 0:break;case 1:return 6;case 2:return s.yytext=s.yytext.substr(1,s.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},i.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],i.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},i}();return t.lexer=r,t}();typeof oye<"u"&&(n.parser=e,n.parse=e.parse.bind(e))})(n$);const xB=Ba(n$);var r$={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Vf,function(){var t=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function r(ge,Se){return Se={exports:{}},ge(Se,Se.exports),Se.exports}var i=r(function(ge){function Se(){var ze=0,it=1,ot=2,St=3,Rt=4,zt=5,mt=6,or=7,gn=8,yn=9,tr=10,dr=11,Sr=12,Nr=13,yr=14,_i=15,Ee=16,ee=17,V=0,Ke=1,At=2,Bt=3,kt=4;function Lt(g,Kt){return 55296<=g.charCodeAt(Kt)&&g.charCodeAt(Kt)<=56319&&56320<=g.charCodeAt(Kt+1)&&g.charCodeAt(Kt+1)<=57343}function fn(g,Kt){Kt===void 0&&(Kt=0);var Pr=g.charCodeAt(Kt);if(55296<=Pr&&Pr<=56319&&Kt<g.length-1){var rr=Pr,Le=g.charCodeAt(Kt+1);return 56320<=Le&&Le<=57343?(rr-55296)*1024+(Le-56320)+65536:rr}if(56320<=Pr&&Pr<=57343&&Kt>=1){var rr=g.charCodeAt(Kt-1),Le=Pr;return 55296<=rr&&rr<=56319?(rr-55296)*1024+(Le-56320)+65536:Le}return Pr}function Pn(g,Kt,Pr){var rr=[g].concat(Kt).concat([Pr]),Le=rr[rr.length-2],ce=Pr,xe=rr.lastIndexOf(yr);if(xe>1&&rr.slice(1,xe).every(function(rt){return rt==St})&&[St,Nr,ee].indexOf(g)==-1)return At;var Ie=rr.lastIndexOf(Rt);if(Ie>0&&rr.slice(1,Ie).every(function(rt){return rt==Rt})&&[Sr,Rt].indexOf(Le)==-1)return rr.filter(function(rt){return rt==Rt}).length%2==1?Bt:kt;if(Le==ze&&ce==it)return V;if(Le==ot||Le==ze||Le==it)return ce==yr&&Kt.every(function(rt){return rt==St})?At:Ke;if(ce==ot||ce==ze||ce==it)return Ke;if(Le==mt&&(ce==mt||ce==or||ce==yn||ce==tr))return V;if((Le==yn||Le==or)&&(ce==or||ce==gn))return V;if((Le==tr||Le==gn)&&ce==gn)return V;if(ce==St||ce==_i)return V;if(ce==zt)return V;if(Le==Sr)return V;var je=rr.indexOf(St)!=-1?rr.lastIndexOf(St)-1:rr.length-2;return[Nr,ee].indexOf(rr[je])!=-1&&rr.slice(je+1,-1).every(function(rt){return rt==St})&&ce==yr||Le==_i&&[Ee,ee].indexOf(ce)!=-1?V:Kt.indexOf(Rt)!=-1?At:Le==Rt&&ce==Rt?V:Ke}this.nextBreak=function(g,Kt){if(Kt===void 0&&(Kt=0),Kt<0)return 0;if(Kt>=g.length-1)return g.length;for(var Pr=On(fn(g,Kt)),rr=[],Le=Kt+1;Le<g.length;Le++)if(!Lt(g,Le-1)){var ce=On(fn(g,Le));if(Pn(Pr,rr,ce))return Le;rr.push(ce)}return g.length},this.splitGraphemes=function(g){for(var Kt=[],Pr=0,rr;(rr=this.nextBreak(g,Pr))<g.length;)Kt.push(g.slice(Pr,rr)),Pr=rr;return Pr<g.length&&Kt.push(g.slice(Pr)),Kt},this.iterateGraphemes=function(g){var Kt=0,Pr={next:(function(){var rr,Le;return(Le=this.nextBreak(g,Kt))<g.length?(rr=g.slice(Kt,Le),Kt=Le,{value:rr,done:!1}):Kt<g.length?(rr=g.slice(Kt),Kt=g.length,{value:rr,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Pr[Symbol.iterator]=function(){return Pr}),Pr},this.countGraphemes=function(g){for(var Kt=0,Pr=0,rr;(rr=this.nextBreak(g,Pr))<g.length;)Pr=rr,Kt++;return Pr<g.length&&Kt++,Kt};function On(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?Sr:g==13?ze:g==10?it:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?ot:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?St:127462<=g&&g<=127487?Rt:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?zt:4352<=g&&g<=4447||43360<=g&&g<=43388?mt:4448<=g&&g<=4519||55216<=g&&g<=55238?or:4520<=g&&g<=4607||55243<=g&&g<=55291?gn:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?yn:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?tr:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?Nr:127995<=g&&g<=127999?yr:g==8205?_i:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?Ee:128102<=g&&g<=128105?ee:dr}return this}ge.exports&&(ge.exports=Se)}),o=new i,a=function(Se,ze,it){for(var ot=o.iterateGraphemes(Se.substring(ze)),St="",Rt=0;Rt<it-ze;Rt++){var zt=ot.next();if(St+=zt.value,zt.done)break}return St},s=function(ge,Se,ze,it,ot,St,Rt){return{start:{line:ge,column:Se,offset:ze},end:{line:it,column:ot,offset:St},source:Rt||null}},d=r(function(ge,Se){(function(ze,it){ge.exports=it()})(t,function(){var ze="",it,ot=St;function St(tr,dr){if(typeof tr!="string")throw new TypeError("expected a string");if(dr===1)return tr;if(dr===2)return tr+tr;var Sr=tr.length*dr;if(it!==tr||typeof it>"u")it=tr,ze="";else if(ze.length>=Sr)return ze.substr(0,Sr);for(;Sr>ze.length&&dr>1;)dr&1&&(ze+=tr),dr>>=1,tr+=tr;return ze+=tr,ze=ze.substr(0,Sr),ze}var Rt=function(dr,Sr,Nr){if(dr==null||Sr==null)return dr;var yr=String(dr),_i=typeof Sr=="number"?Sr:parseInt(Sr,10);if(isNaN(_i)||!isFinite(_i))return yr;var Ee=yr.length;if(Ee>=_i)return yr;var ee=Nr==null?"":String(Nr);ee===""&&(ee=" ");for(var V=_i-Ee;ee.length<V;)ee+=ee;var Ke=ee.length>V?ee.substr(0,V):ee;return Ke+yr},zt=Object.assign||function(tr){for(var dr=1;dr<arguments.length;dr++){var Sr=arguments[dr];for(var Nr in Sr)Object.prototype.hasOwnProperty.call(Sr,Nr)&&(tr[Nr]=Sr[Nr])}return tr};function mt(tr,dr,Sr,Nr){var yr=String(dr),_i=Rt(yr,Sr," "),Ee=ot(" ",Nr.tabSize);return _i+" | "+tr.replace(/\t/g,Ee)}function or(tr,dr,Sr,Nr,yr){return tr.slice(dr,Sr).map(function(_i,Ee){return mt(_i,dr+Ee+1,Nr,yr)}).join(`
`)}var gn={extraLines:2,tabSize:4},yn=function(dr,Sr,Nr,yr){yr=zt({},gn,yr);var _i=dr.split(/\r\n?|\n|\f/),Ee=Math.max(1,Sr-yr.extraLines)-1,ee=Math.min(Sr+yr.extraLines,_i.length),V=String(ee).length,Ke=or(_i,Ee,Sr,V,yr),At=mt(_i[Sr-1].substring(0,Nr-1),Sr,V,yr),Bt=ot(" ",At.length)+"^",kt=or(_i,Sr,ee,V,yr);return[Ke,Bt,kt].filter(Boolean).join(`
`)};return yn})}),f=new Error().stack,C=function(ge){var Se=Object.create(SyntaxError.prototype);return Object.assign(Se,ge,{name:"SyntaxError"}),Object.defineProperty(Se,"stack",{get:function(){return f?f.replace(/^(.+\n){1,3}/,String(Se)+`
`):""}}),Se},O=function(ge,Se,ze,it,ot){throw C({message:it?ge+`
`+d(Se,it,ot):ge,rawMessage:ge,source:ze,line:it,column:ot})},E={unexpectedEnd:function(){return"Unexpected end of input"},unexpectedToken:function(Se){for(var ze=arguments.length,it=Array(ze>1?ze-1:0),ot=1;ot<ze;ot++)it[ot-1]=arguments[ot];return"Unexpected token <"+Se+"> at "+it.filter(Boolean).join(":")}},P={unexpectedSymbol:function(Se){for(var ze=arguments.length,it=Array(ze>1?ze-1:0),ot=1;ot<ze;ot++)it[ot-1]=arguments[ot];return"Unexpected symbol <"+Se+"> at "+it.filter(Boolean).join(":")}},D={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10},$={"{":D.LEFT_BRACE,"}":D.RIGHT_BRACE,"[":D.LEFT_BRACKET,"]":D.RIGHT_BRACKET,":":D.COLON,",":D.COMMA},H={true:D.TRUE,false:D.FALSE,null:D.NULL},Q={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},N={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},Z={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function ae(ge){return ge>="1"&&ge<="9"}function pe(ge){return ge>="0"&&ge<="9"}function fe(ge){return pe(ge)||ge>="a"&&ge<="f"||ge>="A"&&ge<="F"}function X(ge){return ge==="e"||ge==="E"}function oe(ge,Se,ze,it){var ot=ge.charAt(Se);if(ot==="\r")Se++,ze++,it=1,ge.charAt(Se)===`
`&&Se++;else if(ot===`
`)Se++,ze++,it=1;else if(ot==="	"||ot===" ")Se++,it++;else return null;return{index:Se,line:ze,column:it}}function Ce(ge,Se,ze,it){var ot=ge.charAt(Se);return ot in $?{type:$[ot],line:ze,column:it+1,index:Se+1,value:null}:null}function we(ge,Se,ze,it){for(var ot in H)if(H.hasOwnProperty(ot)&&ge.substr(Se,ot.length)===ot)return{type:H[ot],line:ze,column:it+ot.length,index:Se+ot.length,value:ot};return null}function Te(ge,Se,ze,it){for(var ot=Se,St=Q._START_;Se<ge.length;){var Rt=ge.charAt(Se);switch(St){case Q._START_:{if(Rt==='"')Se++,St=Q.START_QUOTE_OR_CHAR;else return null;break}case Q.START_QUOTE_OR_CHAR:{if(Rt==="\\")Se++,St=Q.ESCAPE;else{if(Rt==='"')return Se++,{type:D.STRING,line:ze,column:it+Se-ot,index:Se,value:ge.slice(ot,Se)};Se++}break}case Q.ESCAPE:{if(Rt in N){if(Se++,Rt==="u")for(var zt=0;zt<4;zt++){var mt=ge.charAt(Se);if(mt&&fe(mt))Se++;else return null}St=Q.START_QUOTE_OR_CHAR}else return null;break}}}}function Pe(ge,Se,ze,it){var ot=Se,St=Se,Rt=Z._START_;e:for(;Se<ge.length;){var zt=ge.charAt(Se);switch(Rt){case Z._START_:{if(zt==="-")Rt=Z.MINUS;else if(zt==="0")St=Se+1,Rt=Z.ZERO;else if(ae(zt))St=Se+1,Rt=Z.DIGIT;else return null;break}case Z.MINUS:{if(zt==="0")St=Se+1,Rt=Z.ZERO;else if(ae(zt))St=Se+1,Rt=Z.DIGIT;else return null;break}case Z.ZERO:{if(zt===".")Rt=Z.POINT;else if(X(zt))Rt=Z.EXP;else break e;break}case Z.DIGIT:{if(pe(zt))St=Se+1;else if(zt===".")Rt=Z.POINT;else if(X(zt))Rt=Z.EXP;else break e;break}case Z.POINT:{if(pe(zt))St=Se+1,Rt=Z.DIGIT_FRACTION;else break e;break}case Z.DIGIT_FRACTION:{if(pe(zt))St=Se+1;else if(X(zt))Rt=Z.EXP;else break e;break}case Z.EXP:{if(zt==="+"||zt==="-")Rt=Z.EXP_DIGIT_OR_SIGN;else if(pe(zt))St=Se+1,Rt=Z.EXP_DIGIT_OR_SIGN;else break e;break}case Z.EXP_DIGIT_OR_SIGN:{if(pe(zt))St=Se+1;else break e;break}}Se++}return St>0?{type:D.NUMBER,line:ze,column:it+St-ot,index:St,value:ge.slice(ot,St)}:null}var he=function(Se,ze){for(var it=1,ot=1,St=0,Rt=[];St<Se.length;){var zt=[Se,St,it,ot],mt=oe.apply(void 0,zt);if(mt){St=mt.index,it=mt.line,ot=mt.column;continue}var or=Ce.apply(void 0,zt)||we.apply(void 0,zt)||Te.apply(void 0,zt)||Pe.apply(void 0,zt);if(or){var gn={type:or.type,value:or.value,loc:s(it,ot,St,or.line,or.column,or.index,ze.source)};Rt.push(gn),St=or.index,it=or.line,ot=or.column}else O(P.unexpectedSymbol(a(Se,St,St+1),ze.source,it,ot),Se,ze.source,it,ot)}return Rt},$e={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},ye={_START_:0,KEY:1,COLON:2},gt={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},yt={loc:!0,source:null};function st(ge,Se,ze){var it=Se.length>0?Se[Se.length-1].loc.end:{line:1,column:1};O(E.unexpectedEnd(),ge,ze.source,it.line,it.column)}function ft(ge){for(var Se=0,ze=0;ze<4;ze++)Se=Se*16+parseInt(ge[ze],16);return String.fromCharCode(Se)}var Re={b:"\b",f:"\f",n:`
`,r:"\r",t:"	"},Ve=['"',"\\","/"];function Xe(ge){for(var Se="",ze=0;ze<ge.length;ze++){var it=ge.charAt(ze);if(it==="\\"){ze++;var ot=ge.charAt(ze);if(ot==="u")Se+=ft(ge.substr(ze+1,4)),ze+=4;else if(Ve.indexOf(ot)!==-1)Se+=ot;else if(ot in Re)Se+=Re[ot];else break}else Se+=it}return Se}function Jt(ge,Se,ze,it){for(var ot=void 0,St={type:"Object",children:[]},Rt=$e._START_;ze<Se.length;){var zt=Se[ze];switch(Rt){case $e._START_:{if(zt.type===D.LEFT_BRACE)ot=zt,Rt=$e.OPEN_OBJECT,ze++;else return null;break}case $e.OPEN_OBJECT:{if(zt.type===D.RIGHT_BRACE)return it.loc&&(St.loc=s(ot.loc.start.line,ot.loc.start.column,ot.loc.start.offset,zt.loc.end.line,zt.loc.end.column,zt.loc.end.offset,it.source)),{value:St,index:ze+1};var mt=Ht(ge,Se,ze,it);St.children.push(mt.value),Rt=$e.PROPERTY,ze=mt.index;break}case $e.PROPERTY:{if(zt.type===D.RIGHT_BRACE)return it.loc&&(St.loc=s(ot.loc.start.line,ot.loc.start.column,ot.loc.start.offset,zt.loc.end.line,zt.loc.end.column,zt.loc.end.offset,it.source)),{value:St,index:ze+1};zt.type===D.COMMA?(Rt=$e.COMMA,ze++):O(E.unexpectedToken(a(ge,zt.loc.start.offset,zt.loc.end.offset),it.source,zt.loc.start.line,zt.loc.start.column),ge,it.source,zt.loc.start.line,zt.loc.start.column);break}case $e.COMMA:{var or=Ht(ge,Se,ze,it);or?(ze=or.index,St.children.push(or.value),Rt=$e.PROPERTY):O(E.unexpectedToken(a(ge,zt.loc.start.offset,zt.loc.end.offset),it.source,zt.loc.start.line,zt.loc.start.column),ge,it.source,zt.loc.start.line,zt.loc.start.column);break}}}st(ge,Se,it)}function Ht(ge,Se,ze,it){for(var ot=void 0,St={type:"Property",key:null,value:null},Rt=ye._START_;ze<Se.length;){var zt=Se[ze];switch(Rt){case ye._START_:{if(zt.type===D.STRING){var mt={type:"Identifier",value:Xe(ge.slice(zt.loc.start.offset+1,zt.loc.end.offset-1)),raw:zt.value};it.loc&&(mt.loc=zt.loc),ot=zt,St.key=mt,Rt=ye.KEY,ze++}else return null;break}case ye.KEY:{zt.type===D.COLON?(Rt=ye.COLON,ze++):O(E.unexpectedToken(a(ge,zt.loc.start.offset,zt.loc.end.offset),it.source,zt.loc.start.line,zt.loc.start.column),ge,it.source,zt.loc.start.line,zt.loc.start.column);break}case ye.COLON:{var or=Yt(ge,Se,ze,it);return St.value=or.value,it.loc&&(St.loc=s(ot.loc.start.line,ot.loc.start.column,ot.loc.start.offset,or.value.loc.end.line,or.value.loc.end.column,or.value.loc.end.offset,it.source)),{value:St,index:or.index}}}}}function bt(ge,Se,ze,it){for(var ot=void 0,St={type:"Array",children:[]},Rt=gt._START_,zt=void 0;ze<Se.length;)switch(zt=Se[ze],Rt){case gt._START_:{if(zt.type===D.LEFT_BRACKET)ot=zt,Rt=gt.OPEN_ARRAY,ze++;else return null;break}case gt.OPEN_ARRAY:{if(zt.type===D.RIGHT_BRACKET)return it.loc&&(St.loc=s(ot.loc.start.line,ot.loc.start.column,ot.loc.start.offset,zt.loc.end.line,zt.loc.end.column,zt.loc.end.offset,it.source)),{value:St,index:ze+1};var mt=Yt(ge,Se,ze,it);ze=mt.index,St.children.push(mt.value),Rt=gt.VALUE;break}case gt.VALUE:{if(zt.type===D.RIGHT_BRACKET)return it.loc&&(St.loc=s(ot.loc.start.line,ot.loc.start.column,ot.loc.start.offset,zt.loc.end.line,zt.loc.end.column,zt.loc.end.offset,it.source)),{value:St,index:ze+1};zt.type===D.COMMA?(Rt=gt.COMMA,ze++):O(E.unexpectedToken(a(ge,zt.loc.start.offset,zt.loc.end.offset),it.source,zt.loc.start.line,zt.loc.start.column),ge,it.source,zt.loc.start.line,zt.loc.start.column);break}case gt.COMMA:{var or=Yt(ge,Se,ze,it);ze=or.index,St.children.push(or.value),Rt=gt.VALUE;break}}st(ge,Se,it)}function Qt(ge,Se,ze,it){var ot=Se[ze],St=null;switch(ot.type){case D.STRING:{St=Xe(ge.slice(ot.loc.start.offset+1,ot.loc.end.offset-1));break}case D.NUMBER:{St=Number(ot.value);break}case D.TRUE:{St=!0;break}case D.FALSE:{St=!1;break}case D.NULL:{St=null;break}default:return null}var Rt={type:"Literal",value:St,raw:ot.value};return it.loc&&(Rt.loc=ot.loc),{value:Rt,index:ze+1}}function Yt(ge,Se,ze,it){var ot=Se[ze],St=Qt.apply(void 0,arguments)||Jt.apply(void 0,arguments)||bt.apply(void 0,arguments);if(St)return St;O(E.unexpectedToken(a(ge,ot.loc.start.offset,ot.loc.end.offset),it.source,ot.loc.start.line,ot.loc.start.column),ge,it.source,ot.loc.start.line,ot.loc.start.column)}var ke=function(ge,Se){Se=Object.assign({},yt,Se);var ze=he(ge,Se);ze.length===0&&st(ge,ze,Se);var it=Yt(ge,ze,0,Se);if(it.index===ze.length)return it.value;var ot=ze[it.index];O(E.unexpectedToken(a(ge,ot.loc.start.offset,ot.loc.end.offset),Se.source,ot.loc.start.line,ot.loc.start.column),ge,Se.source,ot.loc.start.line,ot.loc.start.column)};return ke})})(r$);var aye=r$.exports;const sye=Ba(aye);function En(){var n="/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",e="a994e12e3e6547813b669a430e6cb42da5d99bba",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",statementMap:{0:{start:{line:5,column:0},end:{line:10,column:3}},1:{start:{line:6,column:2},end:{line:9,column:4}},2:{start:{line:11,column:0},end:{line:26,column:3}},3:{start:{line:12,column:16},end:{line:12,column:18}},4:{start:{line:13,column:2},end:{line:20,column:4}},5:{start:{line:14,column:16},end:{line:14,column:24}},6:{start:{line:15,column:4},end:{line:19,column:7}},7:{start:{line:21,column:2},end:{line:24,column:3}},8:{start:{line:22,column:4},end:{line:22,column:25}},9:{start:{line:25,column:2},end:{line:25,column:15}},10:{start:{line:27,column:0},end:{line:134,column:3}},11:{start:{line:28,column:16},end:{line:28,column:18}},12:{start:{line:29,column:21},end:{line:29,column:29}},13:{start:{line:30,column:22},end:{line:30,column:26}},14:{start:{line:31,column:2},end:{line:38,column:4}},15:{start:{line:32,column:16},end:{line:32,column:24}},16:{start:{line:33,column:4},end:{line:37,column:7}},17:{start:{line:39,column:2},end:{line:42,column:3}},18:{start:{line:40,column:4},end:{line:40,column:23}},19:{start:{line:43,column:2},end:{line:45,column:3}},20:{start:{line:44,column:4},end:{line:44,column:17}},21:{start:{line:46,column:14},end:{line:46,column:29}},22:{start:{line:47,column:16},end:{line:47,column:32}},23:{start:{line:49,column:4},end:{line:69,column:5}},24:{start:{line:50,column:6},end:{line:50,column:20}},25:{start:{line:51,column:11},end:{line:69,column:5}},26:{start:{line:52,column:6},end:{line:52,column:18}},27:{start:{line:53,column:11},end:{line:69,column:5}},28:{start:{line:54,column:6},end:{line:54,column:20}},29:{start:{line:56,column:18},end:{line:56,column:25}},30:{start:{line:58,column:6},end:{line:67,column:7}},31:{start:{line:59,column:8},end:{line:59,column:41}},32:{start:{line:61,column:8},end:{line:63,column:11}},33:{start:{line:62,column:10},end:{line:62,column:101}},34:{start:{line:64,column:8},end:{line:66,column:9}},35:{start:{line:65,column:10},end:{line:65,column:34}},36:{start:{line:68,column:6},end:{line:68,column:63}},37:{start:{line:71,column:12},end:{line:71,column:16}},38:{start:{line:72,column:2},end:{line:103,column:3}},39:{start:{line:73,column:19},end:{line:83,column:6}},40:{start:{line:84,column:4},end:{line:98,column:5}},41:{start:{line:85,column:6},end:{line:97,column:8}},42:{start:{line:88,column:10},end:{line:88,column:76}},43:{start:{line:90,column:34},end:{line:90,column:85}},44:{start:{line:91,column:10},end:{line:95,column:12}},45:{start:{line:99,column:9},end:{line:103,column:3}},46:{start:{line:100,column:4},end:{line:100,column:56}},47:{start:{line:102,column:4},end:{line:102,column:50}},48:{start:{line:104,column:2},end:{line:132,column:3}},49:{start:{line:105,column:19},end:{line:105,column:28}},50:{start:{line:106,column:4},end:{line:131,column:7}},51:{start:{line:107,column:31},end:{line:107,column:36}},52:{start:{line:108,column:6},end:{line:130,column:7}},53:{start:{line:109,column:31},end:{line:109,column:64}},54:{start:{line:110,column:20},end:{line:114,column:9}},55:{start:{line:115,column:8},end:{line:115,column:24}},56:{start:{line:116,column:13},end:{line:130,column:7}},57:{start:{line:117,column:21},end:{line:117,column:83}},58:{start:{line:118,column:28},end:{line:118,column:64}},59:{start:{line:119,column:8},end:{line:122,column:9}},60:{start:{line:120,column:10},end:{line:120,column:69}},61:{start:{line:121,column:10},end:{line:121,column:17}},62:{start:{line:123,column:24},end:{line:123,column:35}},63:{start:{line:124,column:31},end:{line:124,column:34}},64:{start:{line:125,column:8},end:{line:129,column:11}},65:{start:{line:133,column:2},end:{line:133,column:15}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:29},end:{line:5,column:30}},loc:{start:{line:5,column:55},end:{line:10,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:42},end:{line:11,column:43}},loc:{start:{line:11,column:52},end:{line:26,column:1}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:13,column:31},end:{line:13,column:32}},loc:{start:{line:13,column:46},end:{line:20,column:3}},line:13},3:{name:"(anonymous_3)",decl:{start:{line:27,column:41},end:{line:27,column:42}},loc:{start:{line:27,column:62},end:{line:134,column:1}},line:27},4:{name:"(anonymous_4)",decl:{start:{line:31,column:22},end:{line:31,column:23}},loc:{start:{line:31,column:37},end:{line:38,column:3}},line:31},5:{name:"getArrayPositionalFromAst",decl:{start:{line:48,column:11},end:{line:48,column:36}},loc:{start:{line:48,column:49},end:{line:70,column:3}},line:48},6:{name:"(anonymous_6)",decl:{start:{line:61,column:37},end:{line:61,column:38}},loc:{start:{line:61,column:52},end:{line:63,column:9}},line:61},7:{name:"(anonymous_7)",decl:{start:{line:87,column:29},end:{line:87,column:30}},loc:{start:{line:87,column:38},end:{line:89,column:9}},line:87},8:{name:"(anonymous_8)",decl:{start:{line:89,column:15},end:{line:89,column:16}},loc:{start:{line:89,column:24},end:{line:96,column:9}},line:89},9:{name:"(anonymous_9)",decl:{start:{line:106,column:19},end:{line:106,column:20}},loc:{start:{line:106,column:30},end:{line:131,column:5}},line:106}},branchMap:{0:{loc:{start:{line:43,column:2},end:{line:45,column:3}},type:"if",locations:[{start:{line:43,column:2},end:{line:45,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:43},1:{loc:{start:{line:49,column:4},end:{line:69,column:5}},type:"if",locations:[{start:{line:49,column:4},end:{line:69,column:5}},{start:{line:51,column:11},end:{line:69,column:5}}],line:49},2:{loc:{start:{line:51,column:11},end:{line:69,column:5}},type:"if",locations:[{start:{line:51,column:11},end:{line:69,column:5}},{start:{line:53,column:11},end:{line:69,column:5}}],line:51},3:{loc:{start:{line:53,column:11},end:{line:69,column:5}},type:"if",locations:[{start:{line:53,column:11},end:{line:69,column:5}},{start:{line:55,column:11},end:{line:69,column:5}}],line:53},4:{loc:{start:{line:58,column:6},end:{line:67,column:7}},type:"if",locations:[{start:{line:58,column:6},end:{line:67,column:7}},{start:{line:60,column:13},end:{line:67,column:7}}],line:58},5:{loc:{start:{line:62,column:17},end:{line:62,column:100}},type:"binary-expr",locations:[{start:{line:62,column:17},end:{line:62,column:30}},{start:{line:62,column:34},end:{line:62,column:69}},{start:{line:62,column:73},end:{line:62,column:100}}],line:62},6:{loc:{start:{line:64,column:8},end:{line:66,column:9}},type:"if",locations:[{start:{line:64,column:8},end:{line:66,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:64},7:{loc:{start:{line:72,column:2},end:{line:103,column:3}},type:"if",locations:[{start:{line:72,column:2},end:{line:103,column:3}},{start:{line:99,column:9},end:{line:103,column:3}}],line:72},8:{loc:{start:{line:84,column:4},end:{line:98,column:5}},type:"if",locations:[{start:{line:84,column:4},end:{line:98,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:84},9:{loc:{start:{line:99,column:9},end:{line:103,column:3}},type:"if",locations:[{start:{line:99,column:9},end:{line:103,column:3}},{start:{line:101,column:9},end:{line:103,column:3}}],line:99},10:{loc:{start:{line:104,column:2},end:{line:132,column:3}},type:"if",locations:[{start:{line:104,column:2},end:{line:132,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:104},11:{loc:{start:{line:108,column:6},end:{line:130,column:7}},type:"if",locations:[{start:{line:108,column:6},end:{line:130,column:7}},{start:{line:116,column:13},end:{line:130,column:7}}],line:108},12:{loc:{start:{line:116,column:13},end:{line:130,column:7}},type:"if",locations:[{start:{line:116,column:13},end:{line:130,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:116},13:{loc:{start:{line:119,column:8},end:{line:122,column:9}},type:"if",locations:[{start:{line:119,column:8},end:{line:122,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:119}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts"],names:[],mappings:"AACA,OAAO,cAAc;AACrB,OAAO,gBAAiC;AACxC,OAAO,eAAe;AACtB,SAAQ,YAAY,wBAAuB;AAK3C,WAAW,WAAW,OAAO,CAAC,QAAQ,iBAAiB;AAErD,SAAO,WAAW,MAAM;AAAA,IACtB,EAAC,GAAG,QAAQ,MAAM,KAAI;AAAA,IACtB;AAAA,EACF;AACF,CAAC;AAED,WAAW,eAAe,QAAQ,QAAQ,CAAC,SAAiB;AAC1D,QAAM,QAAkC,CAAC;AAKzC,EAAC,SAAiB,OAAO,aAAa,CAAC,KAAa,SAAc;AAChE,UAAM,MAAM,KAAK;AACjB,UAAM,KAAK;AAAA,MACT,MAAS,WAAW,IAAI,IAAI,aAAa,GAAG,IAAI,YAAY;AAAA,MAC5D,IAAS,WAAW,IAAI,IAAI,YAAa,GAAG,IAAI,WAAW;AAAA,MAC3D,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAEA,MAAI;AACF,aAAS,MAAM,IAAI;AAAA,EACrB,SACM,GAAG;AAAA,EAET;AACA,SAAO;AACT,CAAC;AAED,WAAW,eAAe,QAAQ,OAAO,CAAC,MAAc,MAAW,QAAa;AAC9E,QAAM,QAAkC,CAAC;AACzC,QAAM,EAAC,OAAM,IAAI;AACjB,QAAM,EAAC,QAAO,IAAI;AAElB,SAAO,aAAa,CAAC,KAAa,SAAc;AAC9C,UAAM,MAAM,KAAK;AACjB,UAAM,KAAK;AAAA,MACT,MAAM,WAAW,IAAI,IAAI,aAAa,GAAG,IAAI,YAAY;AAAA,MACzD,IAAI,WAAW,IAAI,IAAI,YAAY,GAAG,IAAI,WAAW;AAAA,MACrD,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACA,MAAI;AACF,WAAO,MAAM,IAAI;AAAA,EACnB,SACO,GAAG;AAAA,EAEV;AAEA,MAAI,MAAM,SAAS,GAAG;AAEpB,WAAO;AAAA,EACT;AAEA,QAAM,MAAM,UAAU,IAAI;AAC1B,QAAM,QAAQ,KAAK,MAAM,IAAI;AAE7B,WAAS,0BAA0B,MAAW,MAAgB;AAC5D,QAAI,CAAC,MAAM;AACT,aAAO;AAAA,IACT,WACS,KAAK,SAAS,GAAG;AACxB,aAAO;AAAA,IACT,WACS,CAAC,KAAK,UAAU;AACvB,aAAO;AAAA,IACT,OACK;AACH,YAAM,MAAM,KAAK,CAAC;AAClB,UAAI;AACJ,UAAI,IAAI,MAAM,UAAU,GAAG;AACzB,kBAAU,KAAK,SAAS,KAAK,CAAC,CAAC;AAAA,MACjC,OACK;AACH,kBAAU,KAAK,SAAS,KAAK,CAAC,cAAmB;AAC/C,iBACE,UAAU,OACV,UAAU,IAAI,SAAS,gBACvB,UAAU,IAAI,UAAU;AAAA,QAE5B,CAAC;AACD,YAAI,SAAS;AACX,oBAAU,QAAQ;AAAA,QACpB;AAAA,MACF;AACA,aAAO,0BAA0B,SAAS,KAAK,MAAM,CAAC,CAAC;AAAA,IACzD;AAAA,EACF;AAEA,MAAI,MAA6D;AACjE,MAAI,YAAY,SAAS;AAEvB,UAAM,SAAS,iBAAiB;AAAA,MAC9B,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,YAAY,CAAC;AAAA,MACb,WAAW,CAAC;AAAA,MACZ,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,QACR;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI,QAAQ;AACV,YAAM;AAAA,QACJ,QAAQ;AAAA,QACR,OAAO,OACJ,OAAO,SAAO;AAEb,iBAAO,CAAC,IAAI,QAAQ,MAAM,sCAAsC;AAAA,QAClE,CAAC,EACA,IAAI,SAAO;AAEV,gBAAM,kBAAkB,IAAI,QAAQ,QAAQ,iBAAiB,EAAE,EAAE,MAAM,GAAG;AAC1E,iBAAO;AAAA,YACL,MAAM;AAAA,YACN,KAAK,gBAAgB,CAAC;AAAA,YACtB,SAAS,gBAAgB,CAAC;AAAA,UAC5B;AAAA,QACF,CAAC;AAAA,MACL;AAAA,IACF;AAAA,EACF,WACS,YAAY,cAAc;AACjC,UAAM,WAAW,iBAAiB,OAAO,KAAK,IAAI;AAAA,EACpD,OACK;AACH,UAAM,IAAI,MAAM,mBAAmB,OAAO,EAAE;AAAA,EAC9C;AAEA,MAAI,KAAK,WAAW,SAAS;AAC3B,UAAM,SAAS,IAAI;AACnB,WAAO,QAAQ,WAAS;AACtB,YAAM,EAAC,KAAK,QAAO,IAAI;AAEvB,UAAI,CAAC,KAAK;AACR,cAAM,iBAAiB,IAAI,cAAc,IAAI,SAAS,CAAC;AACvD,cAAM,MAAM;AAAA,UACV,MAAM,WAAW,IAAI,IAAI,UAAU,GAAG,CAAC;AAAA,UACvC,IAAI,WAAW,IAAI,IAAI,SAAS,GAAG,eAAe,KAAK,MAAM;AAAA,UAC7D;AAAA,QACF;AACA,cAAM,KAAK,GAAG;AAAA,MAChB,WACS,KAAK;AACZ,cAAM,OAAO,IAAI,QAAQ,YAAY,EAAE,EAAE,MAAM,WAAW,EAAE,OAAO,OAAO;AAC1E,cAAM,cAAc,0BAA0B,KAAK,IAAI;AACvD,YAAI,CAAC,aAAa;AAChB,kBAAQ,KAAK,uCAAuC,KAAK;AACzD;AAAA,QACF;AAEA,cAAM,EAAC,IAAG,IAAI;AACd,cAAM,EAAC,OAAO,IAAG,IAAI;AAErB,cAAM,KAAK;AAAA,UACT,MAAM,WAAW,IAAI,MAAM,OAAO,GAAG,MAAM,MAAM;AAAA,UACjD,IAAI,WAAW,IAAI,IAAI,OAAO,GAAG,IAAI,MAAM;AAAA,UAC3C;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT,CAAC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a994e12e3e6547813b669a430e6cb42da5d99bba"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return En=function(){return a},a}En();En().s[0]++;qc.defineMode("mgl",(n,e)=>(En().f[0]++,En().s[1]++,qc.modes.javascript({...n,json:!0},e)));En().s[2]++;qc.registerHelper("lint","json",n=>{En().f[1]++;const e=(En().s[3]++,[]);En().s[4]++,xB.parser.parseError=(t,r)=>{En().f[2]++;const i=(En().s[5]++,r.loc);En().s[6]++,e.push({from:qc.Pos(i.first_line-1,i.first_column),to:qc.Pos(i.last_line-1,i.last_column),message:t})},En().s[7]++;try{En().s[8]++,xB.parse(n)}catch{}return En().s[9]++,e});En().s[10]++;qc.registerHelper("lint","mgl",(n,e,t)=>{En().f[3]++;const r=(En().s[11]++,[]),{parser:i}=(En().s[12]++,xB),{context:o}=(En().s[13]++,e);En().s[14]++,i.parseError=(C,O)=>{En().f[4]++;const E=(En().s[15]++,O.loc);En().s[16]++,r.push({from:qc.Pos(E.first_line-1,E.first_column),to:qc.Pos(E.last_line-1,E.last_column),message:C})},En().s[17]++;try{En().s[18]++,i.parse(n)}catch{}if(En().s[19]++,r.length>0)return En().b[0][0]++,En().s[20]++,r;En().b[0][1]++;const a=(En().s[21]++,sye(n)),s=(En().s[22]++,JSON.parse(n));function d(C,O){if(En().f[5]++,En().s[23]++,C){if(En().b[1][1]++,En().s[25]++,O.length<1)return En().b[2][0]++,En().s[26]++,C;if(En().b[2][1]++,En().s[27]++,C.children){En().b[3][1]++;const E=(En().s[29]++,O[0]);let P;return En().s[30]++,E.match(/^[0-9]+$/)?(En().b[4][0]++,En().s[31]++,P=C.children[O[0]]):(En().b[4][1]++,En().s[32]++,P=C.children.find(D=>(En().f[6]++,En().s[33]++,En().b[5][0]++,D.key&&(En().b[5][1]++,D.key.type==="Identifier")&&(En().b[5][2]++,D.key.value===E))),En().s[34]++,P?(En().b[6][0]++,En().s[35]++,P=P.value):En().b[6][1]++),En().s[36]++,d(P,O.slice(1))}else{En().b[3][0]++,En().s[28]++;return}}else{En().b[1][0]++,En().s[24]++;return}}let f=(En().s[37]++,null);if(En().s[38]++,o==="layer"){En().b[7][0]++;const C=(En().s[39]++,Yd({version:8,name:"Empty Style",metadata:{},sources:{},sprite:"",glyphs:"https://example.com/glyphs/{fontstack}/{range}.pbf",layers:[s]}));En().s[40]++,C?(En().b[8][0]++,En().s[41]++,f={result:"error",value:C.filter(O=>(En().f[7]++,En().s[42]++,!O.message.match(/^layers\[0\]: source ".*" not found$/))).map(O=>{En().f[8]++;const E=(En().s[43]++,O.message.replace(/^layers\[0\]./,"").split(":"));return En().s[44]++,{name:"",key:E[0],message:E[1]}})}):En().b[8][1]++}else if(En().b[7][1]++,En().s[45]++,o==="expression")En().b[9][0]++,En().s[46]++,f=Nne.createExpression(s,e.spec);else throw En().b[9][1]++,En().s[47]++,new Error(`Invalid context ${o}`);if(En().s[48]++,(f==null?void 0:f.result)==="error"){En().b[10][0]++;const C=(En().s[49]++,f.value);En().s[50]++,C.forEach(O=>{En().f[9]++;const{key:E,message:P}=(En().s[51]++,O);if(En().s[52]++,E)if(En().b[11][1]++,En().s[56]++,E){En().b[12][0]++;const D=(En().s[57]++,E.replace(/^\[|\]$/g,"").split(/\.|[[\]]+/).filter(Boolean)),$=(En().s[58]++,d(a,D));if(En().s[59]++,$)En().b[13][1]++;else{En().b[13][0]++,En().s[60]++,console.warn("Something went wrong parsing error:",O),En().s[61]++;return}const{loc:H}=(En().s[62]++,$),{start:Q,end:N}=(En().s[63]++,H);En().s[64]++,r.push({from:qc.Pos(Q.line-1,Q.column),to:qc.Pos(N.line-1,N.column),message:P})}else En().b[12][1]++;else{En().b[11][0]++;const D=(En().s[53]++,t.getLineHandle(t.lastLine())),$=(En().s[54]++,{from:qc.Pos(t.firstLine(),0),to:qc.Pos(t.lastLine(),D.text.length),message:P});En().s[55]++,r.push($)}})}else En().b[10][1]++;return En().s[65]++,r});function Ln(){var n="/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",e="fb1cbc919841a2885e835e18970f33486d0e1ea8",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",statementMap:{0:{start:{line:14,column:24},end:{line:29,column:3}},1:{start:{line:19,column:6},end:{line:19,column:65}},2:{start:{line:32,column:8},end:{line:32,column:12}},3:{start:{line:33,column:22},end:{line:33,column:27}},4:{start:{line:35,column:4},end:{line:35,column:17}},5:{start:{line:36,column:4},end:{line:36,column:32}},6:{start:{line:37,column:4},end:{line:41,column:6}},7:{start:{line:44,column:4},end:{line:60,column:7}},8:{start:{line:61,column:4},end:{line:61,column:42}},9:{start:{line:62,column:4},end:{line:62,column:40}},10:{start:{line:63,column:4},end:{line:63,column:38}},11:{start:{line:65,column:18},end:{line:67,column:3}},12:{start:{line:66,column:4},end:{line:66,column:31}},13:{start:{line:68,column:12},end:{line:75,column:3}},14:{start:{line:69,column:4},end:{line:70,column:27}},15:{start:{line:70,column:6},end:{line:70,column:27}},16:{start:{line:71,column:4},end:{line:74,column:7}},17:{start:{line:76,column:11},end:{line:84,column:3}},18:{start:{line:77,column:4},end:{line:77,column:32}},19:{start:{line:78,column:4},end:{line:79,column:26}},20:{start:{line:79,column:6},end:{line:79,column:26}},21:{start:{line:80,column:4},end:{line:83,column:7}},22:{start:{line:86,column:4},end:{line:86,column:43}},23:{start:{line:87,column:4},end:{line:87,column:41}},24:{start:{line:88,column:4},end:{line:88,column:39}},25:{start:{line:91,column:4},end:{line:96,column:5}},26:{start:{line:92,column:6},end:{line:92,column:36}},27:{start:{line:93,column:6},end:{line:95,column:8}},28:{start:{line:98,column:13},end:{line:127,column:3}},29:{start:{line:99,column:4},end:{line:105,column:5}},30:{start:{line:100,column:6},end:{line:100,column:37}},31:{start:{line:101,column:6},end:{line:103,column:9}},32:{start:{line:104,column:6},end:{line:104,column:13}},33:{start:{line:106,column:20},end:{line:106,column:40}},34:{start:{line:107,column:4},end:{line:123,column:5}},35:{start:{line:109,column:6},end:{line:114,column:7}},36:{start:{line:110,column:8},end:{line:110,column:42}},37:{start:{line:112,column:8},end:{line:112,column:19}},38:{start:{line:113,column:8},end:{line:113,column:27}},39:{start:{line:115,column:6},end:{line:122,column:7}},40:{start:{line:116,column:8},end:{line:116,column:35}},41:{start:{line:118,column:8},end:{line:119,column:43}},42:{start:{line:119,column:10},end:{line:119,column:43}},43:{start:{line:120,column:8},end:{line:121,column:35}},44:{start:{line:121,column:10},end:{line:121,column:35}},45:{start:{line:124,column:4},end:{line:126,column:7}},46:{start:{line:129,column:14},end:{line:129,column:26}},47:{start:{line:130,column:28},end:{line:130,column:38}},48:{start:{line:131,column:18},end:{line:131,column:20}},49:{start:{line:132,column:4},end:{line:134,column:5}},50:{start:{line:133,column:6},end:{line:133,column:45}},51:{start:{line:135,column:4},end:{line:149,column:9}},52:{start:{line:145,column:23},end:{line:145,column:36}},53:{start:{line:152,column:18},end:{line:152,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:18,column:14},end:{line:18,column:15}},loc:{start:{line:18,column:24},end:{line:20,column:5}},line:18},1:{name:"(anonymous_1)",decl:{start:{line:21,column:13},end:{line:21,column:14}},loc:{start:{line:21,column:19},end:{line:22,column:5}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:23,column:12},end:{line:23,column:13}},loc:{start:{line:23,column:18},end:{line:24,column:5}},line:23},3:{name:"(anonymous_3)",decl:{start:{line:25,column:19},end:{line:25,column:20}},loc:{start:{line:25,column:25},end:{line:26,column:5}},line:25},4:{name:"(anonymous_4)",decl:{start:{line:27,column:17},end:{line:27,column:18}},loc:{start:{line:27,column:23},end:{line:28,column:5}},line:27},5:{name:"(anonymous_5)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:21},end:{line:42,column:3}},line:34},6:{name:"(anonymous_6)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:22},end:{line:64,column:3}},line:43},7:{name:"(anonymous_7)",decl:{start:{line:65,column:18},end:{line:65,column:19}},loc:{start:{line:65,column:24},end:{line:67,column:3}},line:65},8:{name:"(anonymous_8)",decl:{start:{line:68,column:12},end:{line:68,column:13}},loc:{start:{line:68,column:18},end:{line:75,column:3}},line:68},9:{name:"(anonymous_9)",decl:{start:{line:76,column:11},end:{line:76,column:12}},loc:{start:{line:76,column:17},end:{line:84,column:3}},line:76},10:{name:"(anonymous_10)",decl:{start:{line:85,column:2},end:{line:85,column:3}},loc:{start:{line:85,column:25},end:{line:89,column:3}},line:85},11:{name:"(anonymous_11)",decl:{start:{line:90,column:2},end:{line:90,column:3}},loc:{start:{line:90,column:32},end:{line:97,column:3}},line:90},12:{name:"(anonymous_12)",decl:{start:{line:98,column:13},end:{line:98,column:14}},loc:{start:{line:98,column:21},end:{line:127,column:3}},line:98},13:{name:"(anonymous_13)",decl:{start:{line:128,column:2},end:{line:128,column:3}},loc:{start:{line:128,column:11},end:{line:150,column:3}},line:128},14:{name:"(anonymous_14)",decl:{start:{line:145,column:15},end:{line:145,column:16}},loc:{start:{line:145,column:23},end:{line:145,column:36}},line:145}},branchMap:{0:{loc:{start:{line:46,column:12},end:{line:48,column:7}},type:"binary-expr",locations:[{start:{line:46,column:12},end:{line:46,column:27}},{start:{line:46,column:31},end:{line:48,column:7}}],line:46},1:{loc:{start:{line:54,column:12},end:{line:56,column:7}},type:"binary-expr",locations:[{start:{line:54,column:12},end:{line:54,column:27}},{start:{line:54,column:31},end:{line:56,column:7}}],line:54},2:{loc:{start:{line:69,column:4},end:{line:70,column:27}},type:"if",locations:[{start:{line:69,column:4},end:{line:70,column:27}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:69},3:{loc:{start:{line:78,column:4},end:{line:79,column:26}},type:"if",locations:[{start:{line:78,column:4},end:{line:79,column:26}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:78},4:{loc:{start:{line:91,column:4},end:{line:96,column:5}},type:"if",locations:[{start:{line:91,column:4},end:{line:96,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:91},5:{loc:{start:{line:91,column:8},end:{line:91,column:69}},type:"binary-expr",locations:[{start:{line:91,column:8},end:{line:91,column:29}},{start:{line:91,column:33},end:{line:91,column:69}}],line:91},6:{loc:{start:{line:99,column:4},end:{line:105,column:5}},type:"if",locations:[{start:{line:99,column:4},end:{line:105,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:99},7:{loc:{start:{line:107,column:4},end:{line:123,column:5}},type:"if",locations:[{start:{line:107,column:4},end:{line:123,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:107},8:{loc:{start:{line:115,column:6},end:{line:122,column:7}},type:"if",locations:[{start:{line:115,column:6},end:{line:122,column:7}},{start:{line:117,column:13},end:{line:122,column:7}}],line:115},9:{loc:{start:{line:115,column:10},end:{line:115,column:41}},type:"binary-expr",locations:[{start:{line:115,column:10},end:{line:115,column:13}},{start:{line:115,column:17},end:{line:115,column:41}}],line:115},10:{loc:{start:{line:118,column:8},end:{line:119,column:43}},type:"if",locations:[{start:{line:118,column:8},end:{line:119,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:118},11:{loc:{start:{line:120,column:8},end:{line:121,column:35}},type:"if",locations:[{start:{line:120,column:8},end:{line:121,column:35}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:120},12:{loc:{start:{line:132,column:4},end:{line:134,column:5}},type:"if",locations:[{start:{line:132,column:4},end:{line:134,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:132}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx"],names:[],mappings:"AAyKQ,SACQ,KADR;AAzKR,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,gBAA8B;AACrC,SAAS,OAAwB,uBAAuB;AAExD,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,qBAAqB;AAC5B,OAAO;AA2BP,MAAM,0BAA0B,MAAM,UAAkD;AAAA,EACtF,OAAO,eAAe;AAAA,IACpB,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS,CAAC,yBAAyB;AAAA,IACnC,UAAU,CAAC,SAAc;AACvB,aAAO,gBAAgB,MAAM,EAAC,QAAQ,GAAG,WAAW,GAAE,CAAC;AAAA,IACzD;AAAA,IACA,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,QAAQ,MAAM;AAAA,IAAC;AAAA,IACf,eAAe,MAAM;AAAA,IAAC;AAAA,IACtB,aAAa,MAAM;AAAA,IAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAA6B;AAAA,EAC7B,oBAA6B;AAAA,EAE7B,YAAY,OAA+B;AACzC,UAAM,KAAK;AACX,SAAK,YAAY;AACjB,SAAK,QAAQ;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,WAAW,KAAK,MAAM,SAAU,KAAK,MAAM,KAAK;AAAA,IAClD;AAAA,EACF;AAAA,EAEA,oBAAqB;AACnB,SAAK,OAAO,WAAW,KAAK,KAAM;AAAA,MAChC,OAAO,KAAK,MAAM,SAAU,KAAK,MAAM,KAAK;AAAA,MAC5C,MAAM,KAAK,MAAM,QAAQ;AAAA,QACvB,MAAM;AAAA,MACR;AAAA,MACA,cAAc,KAAK,MAAM;AAAA,MACzB,SAAS;AAAA,MACT,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,aAAa,KAAK,MAAM;AAAA,MACxB,MAAM,KAAK,MAAM,QAAQ;AAAA,QACvB,SAAS;AAAA,MACX;AAAA,MACA,eAAe;AAAA,MACf,SAAS,KAAK,MAAM;AAAA,MACpB,gBAAgB;AAAA,IAClB,CAAC;AAED,SAAK,KAAK,GAAG,UAAU,KAAK,QAAQ;AACpC,SAAK,KAAK,GAAG,SAAS,KAAK,OAAO;AAClC,SAAK,KAAK,GAAG,QAAQ,KAAK,MAAM;AAAA,EAClC;AAAA,EAEA,gBAAgB,MAAM;AACpB,SAAK,YAAY;AAAA,EACnB;AAAA,EAEA,UAAU,MAAM;AACd,QAAI,KAAK,MAAM;AAAS,WAAK,MAAM,QAAQ;AAC3C,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,MACX,aAAc,KAAK,cAAc;AAAA,IACnC,CAAC;AAAA,EACH;AAAA,EAEA,SAAS,MAAM;AACb,SAAK,YAAY;AACjB,QAAI,KAAK,MAAM;AAAQ,WAAK,MAAM,OAAO;AACzC,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,MACX,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AAAA,EAEA,uBAAwB;AACtB,SAAK,KAAM,IAAI,UAAU,KAAK,QAAQ;AACtC,SAAK,KAAM,IAAI,SAAS,KAAK,OAAO;AACpC,SAAK,KAAM,IAAI,QAAQ,KAAK,MAAM;AAAA,EACpC;AAAA,EAEA,mBAAmB,WAA2B;AAC5C,QAAI,CAAC,KAAK,MAAM,aAAa,UAAU,UAAU,KAAK,MAAM,OAAO;AACjE,WAAK,oBAAoB;AACzB,WAAK,KAAM;AAAA,QACT,KAAK,MAAM,SAAU,KAAK,MAAM,KAAK;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,CAAC,OAAgB;AAC1B,QAAI,KAAK,mBAAmB;AAC1B,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAAA,QACZ,WAAW,KAAK,KAAM,SAAS;AAAA,MACjC,CAAC;AACD;AAAA,IACF;AACA,UAAM,UAAU,KAAK,KAAM,SAAS;AAEpC,QAAI,KAAK,MAAM,cAAc,SAAS;AACpC,UAAI,aAAa;AACjB,UAAI;AACF,sBAAc,KAAK,MAAM,OAAO;AAAA,MAClC,SAAQ,MAAM;AACZ,cAAM;AACN,gBAAQ,KAAK,IAAI;AAAA,MACnB;AAEA,UAAI,OAAO,KAAK,MAAM,eAAe;AACnC,aAAK,MAAM,cAAc;AAAA,MAC3B,OACK;AACH,YAAI,KAAK,MAAM;AAAU,eAAK,MAAM,SAAS,WAAW;AACxD,YAAI,KAAK,MAAM;AAAa,eAAK,MAAM,YAAY;AAAA,MACrD;AAAA,IACF;AAEA,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,EAAC,YAAW,IAAI,KAAK;AAC3B,UAAM,QAAQ,CAAC;AACf,QAAI,KAAK,MAAM,WAAW;AACxB,YAAM,YAAY,KAAK,MAAM;AAAA,IAC/B;AAEA,WAAO,qBAAC,SAAI,WAAU,cAAa,eAAe,KAAK,eAAe,eAAY,QAChF;AAAA,0BAAC,SAAI,WAAW,WAAW,uBAAuB,EAAC,2BAA2B,YAAW,CAAC,GACxF,+BAAC,SAAM,GAAM;AAAA;AAAA,QACL,oBAAC,SAAI,iBAAG;AAAA,QAAM;AAAA,SACtB,GACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,WAAW,wBAAwB,KAAK,MAAM,SAAS;AAAA,UAClE,KAAK,CAAC,OAAO,KAAK,MAAM;AAAA,UACxB;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"fb1cbc919841a2885e835e18970f33486d0e1ea8"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ln=function(){return a},a}Ln();class i$ extends Mn.Component{constructor(t){Ln().f[5]++,Ln().s[4]++;super(t);sn(this,"_keyEvent");sn(this,"_doc");sn(this,"_el",(Ln().s[2]++,null));sn(this,"_cancelNextChange",(Ln().s[3]++,!1));sn(this,"onPointerDown",(Ln().s[11]++,()=>{Ln().f[7]++,Ln().s[12]++,this._keyEvent="pointer"}));sn(this,"onFocus",(Ln().s[13]++,()=>{Ln().f[8]++,Ln().s[14]++,this.props.onFocus?(Ln().b[2][0]++,Ln().s[15]++,this.props.onFocus()):Ln().b[2][1]++,Ln().s[16]++,this.setState({isEditing:!0,showMessage:this._keyEvent==="keyboard"})}));sn(this,"onBlur",(Ln().s[17]++,()=>{Ln().f[9]++,Ln().s[18]++,this._keyEvent="keyboard",Ln().s[19]++,this.props.onBlur?(Ln().b[3][0]++,Ln().s[20]++,this.props.onBlur()):Ln().b[3][1]++,Ln().s[21]++,this.setState({isEditing:!1,showMessage:!1})}));sn(this,"onChange",(Ln().s[28]++,t=>{if(Ln().f[12]++,Ln().s[29]++,this._cancelNextChange){Ln().b[6][0]++,Ln().s[30]++,this._cancelNextChange=!1,Ln().s[31]++,this.setState({prevValue:this._doc.getValue()}),Ln().s[32]++;return}else Ln().b[6][1]++;const r=(Ln().s[33]++,this._doc.getValue());if(Ln().s[34]++,this.state.prevValue!==r){Ln().b[7][0]++;let i,o;Ln().s[35]++;try{Ln().s[36]++,i=JSON.parse(r)}catch(a){Ln().s[37]++,o=a,Ln().s[38]++,console.warn(a)}Ln().s[39]++,Ln().b[9][0]++,o&&(Ln().b[9][1]++,this.props.onJSONInvalid)?(Ln().b[8][0]++,Ln().s[40]++,this.props.onJSONInvalid()):(Ln().b[8][1]++,Ln().s[41]++,this.props.onChange?(Ln().b[10][0]++,Ln().s[42]++,this.props.onChange(i)):Ln().b[10][1]++,Ln().s[43]++,this.props.onJSONValid?(Ln().b[11][0]++,Ln().s[44]++,this.props.onJSONValid()):Ln().b[11][1]++)}else Ln().b[7][1]++;Ln().s[45]++,this.setState({prevValue:r})}));Ln().s[5]++,this._keyEvent="keyboard",Ln().s[6]++,this.state={isEditing:!1,showMessage:!1,prevValue:this.props.getValue(this.props.layer)}}componentDidMount(){Ln().f[6]++,Ln().s[7]++,this._doc=qc(this._el,{value:this.props.getValue(this.props.layer),mode:(Ln().b[0][0]++,this.props.mode||(Ln().b[0][1]++,{name:"mgl"})),lineWrapping:this.props.lineWrapping,tabSize:2,theme:"maputnik",viewportMargin:1/0,lineNumbers:this.props.lineNumbers,lint:(Ln().b[1][0]++,this.props.lint||(Ln().b[1][1]++,{context:"layer"})),matchBrackets:!0,gutters:this.props.gutters,scrollbarStyle:"null"}),Ln().s[8]++,this._doc.on("change",this.onChange),Ln().s[9]++,this._doc.on("focus",this.onFocus),Ln().s[10]++,this._doc.on("blur",this.onBlur)}componentWillUnMount(){Ln().f[10]++,Ln().s[22]++,this._doc.off("change",this.onChange),Ln().s[23]++,this._doc.off("focus",this.onFocus),Ln().s[24]++,this._doc.off("blur",this.onBlur)}componentDidUpdate(t){Ln().f[11]++,Ln().s[25]++,Ln().b[5][0]++,!this.state.isEditing&&(Ln().b[5][1]++,t.layer!==this.props.layer)?(Ln().b[4][0]++,Ln().s[26]++,this._cancelNextChange=!0,Ln().s[27]++,this._doc.setValue(this.props.getValue(this.props.layer))):Ln().b[4][1]++}render(){Ln().f[13]++;const t=(Ln().s[46]++,this.props.t),{showMessage:r}=(Ln().s[47]++,this.state),i=(Ln().s[48]++,{});return Ln().s[49]++,this.props.maxHeight?(Ln().b[12][0]++,Ln().s[50]++,i.maxHeight=this.props.maxHeight):Ln().b[12][1]++,Ln().s[51]++,G.jsxs("div",{className:"JSONEditor",onPointerDown:this.onPointerDown,"aria-hidden":"true",children:[G.jsx("div",{className:Qf("JSONEditor__message",{"JSONEditor__message--on":r}),children:G.jsxs(e0,{t,children:["Press ",G.jsx("kbd",{children:"ESC"})," to lose focus"]})}),G.jsx("div",{className:Qf("codemirror-container",this.props.className),ref:o=>(Ln().f[14]++,Ln().s[52]++,this._el=o),style:i})]})}}sn(i$,"defaultProps",(Ln().s[0]++,{lineNumbers:!0,lineWrapping:!1,gutters:["CodeMirror-lint-markers"],getValue:t=>(Ln().f[0]++,Ln().s[1]++,t$(t,{indent:2,maxLength:40})),onFocus:()=>{Ln().f[1]++},onBlur:()=>{Ln().f[2]++},onJSONInvalid:()=>{Ln().f[3]++},onJSONValid:()=>{Ln().f[4]++}}));const lye=(Ln().s[53]++,No()(i$));function c5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",e="60f4cd40e505c4a9f8de1078b77716b10a4a4264",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:61}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx"],names:[],mappings:"AASW;AATX,OAAO,WAAW;AAClB,OAAO,eAAiC;AAMxC,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,WAAO,oBAAC,aAAW,GAAG,KAAK,OAAO;AAAA,EACpC;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"60f4cd40e505c4a9f8de1078b77716b10a4a4264"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return c5=function(){return a},a}c5();class NI extends Mn.Component{render(){return c5().f[0]++,c5().s[0]++,G.jsx(lye,{...this.props})}}var Mb="M12.42,5.29C11.32,5.19 10.35,6 10.25,7.11L10,10H12.82V12H9.82L9.38,17.07C9.18,19.27 7.24,20.9 5.04,20.7C3.79,20.59 2.66,19.9 2,18.83L3.5,17.33C3.83,18.38 4.96,18.97 6,18.63C6.78,18.39 7.33,17.7 7.4,16.89L7.82,12H4.82V10H8L8.27,6.93C8.46,4.73 10.39,3.1 12.6,3.28C13.86,3.39 15,4.09 15.66,5.17L14.16,6.67C13.91,5.9 13.23,5.36 12.42,5.29M22,13.65L20.59,12.24L17.76,15.07L14.93,12.24L13.5,13.65L16.35,16.5L13.5,19.31L14.93,20.72L17.76,17.89L20.59,20.72L22,19.31L19.17,16.5L22,13.65Z",uye="M7,10L12,15L17,10H7Z",Aye="M7,15L12,10L17,15H7Z",WI="M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z";function w1(){var n="/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",e="99dad9631fbee5fc23be2dafaf7c7eea92c38eac",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",statementMap:{0:{start:{line:2,column:34},end:{line:2,column:56}},1:{start:{line:3,column:28},end:{line:3,column:41}},2:{start:{line:4,column:30},end:{line:4,column:123}},3:{start:{line:4,column:88},end:{line:4,column:122}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:80},end:{line:4,column:81}},loc:{start:{line:4,column:88},end:{line:4,column:122}},line:4}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/filterops.ts"],names:[],mappings:"AAAA,OAAO,YAAY;AAEZ,aAAM,qBAAqB,CAAC,OAAO,OAAO,MAAM;AAChD,aAAM,eAAe,CAAC,MAAM,KAAK;AACjC,aAAM,iBAAiB,OAC3B,KAAK,OAAO,gBAAgB,MAAM,EAClC,OAAO,QAAM,mBAAmB,QAAQ,EAAE,IAAI,CAAC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"99dad9631fbee5fc23be2dafaf7c7eea92c38eac"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return w1=function(){return a},a}w1();const GI=(w1().s[0]++,["all","any","none"]);w1().s[1]++;const cye=(w1().s[2]++,Object.keys(no.filter_operator.values).filter(n=>(w1().f[0]++,w1().s[3]++,GI.indexOf(n)<0)));function Gr(){var n="/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",e="3d8bcd70e58647712bf929f9e6ef3e13fde3cd73",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",statementMap:{0:{start:{line:8,column:2},end:{line:9,column:13}},1:{start:{line:9,column:4},end:{line:9,column:13}},2:{start:{line:10,column:2},end:{line:11,column:13}},3:{start:{line:11,column:4},end:{line:11,column:13}},4:{start:{line:12,column:2},end:{line:12,column:23}},5:{start:{line:15,column:19},end:{line:15,column:40}},6:{start:{line:16,column:2},end:{line:18,column:3}},7:{start:{line:17,column:4},end:{line:17,column:13}},8:{start:{line:19,column:2},end:{line:25,column:3}},9:{start:{line:20,column:4},end:{line:20,column:16}},10:{start:{line:21,column:9},end:{line:25,column:3}},11:{start:{line:22,column:4},end:{line:22,column:17}},12:{start:{line:24,column:4},end:{line:24,column:13}},13:{start:{line:28,column:2},end:{line:28,column:21}},14:{start:{line:29,column:2},end:{line:29,column:22}},15:{start:{line:30,column:2},end:{line:30,column:11}},16:{start:{line:33,column:24},end:{line:35,column:3}},17:{start:{line:37,column:20},end:{line:37,column:76}},18:{start:{line:38,column:4},end:{line:42,column:5}},19:{start:{line:39,column:6},end:{line:39,column:43}},20:{start:{line:40,column:11},end:{line:42,column:5}},21:{start:{line:41,column:6},end:{line:41,column:47}},22:{start:{line:43,column:4},end:{line:43,column:35}},23:{start:{line:46,column:14},end:{line:46,column:31}},24:{start:{line:47,column:21},end:{line:47,column:25}},25:{start:{line:48,column:25},end:{line:48,column:29}},26:{start:{line:49,column:23},end:{line:49,column:33}},27:{start:{line:50,column:4},end:{line:77,column:9}},28:{start:{line:56,column:72},end:{line:56,column:92}},29:{start:{line:57,column:41},end:{line:57,column:104}},30:{start:{line:65,column:37},end:{line:65,column:100}},31:{start:{line:74,column:27},end:{line:74,column:89}}},fnMap:{0:{name:"tryParseInt",decl:{start:{line:7,column:9},end:{line:7,column:20}},loc:{start:{line:7,column:24},end:{line:13,column:1}},line:7},1:{name:"tryParseBool",decl:{start:{line:14,column:9},end:{line:14,column:21}},loc:{start:{line:14,column:25},end:{line:26,column:1}},line:14},2:{name:"parseFilter",decl:{start:{line:27,column:9},end:{line:27,column:20}},loc:{start:{line:27,column:24},end:{line:31,column:1}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:58},end:{line:44,column:3}},line:36},4:{name:"(anonymous_4)",decl:{start:{line:45,column:2},end:{line:45,column:3}},loc:{start:{line:45,column:11},end:{line:78,column:3}},line:45},5:{name:"(anonymous_5)",decl:{start:{line:56,column:58},end:{line:56,column:59}},loc:{start:{line:56,column:72},end:{line:56,column:92}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:57,column:20},end:{line:57,column:21}},loc:{start:{line:57,column:41},end:{line:57,column:104}},line:57},7:{name:"(anonymous_7)",decl:{start:{line:65,column:20},end:{line:65,column:21}},loc:{start:{line:65,column:37},end:{line:65,column:100}},line:65},8:{name:"(anonymous_8)",decl:{start:{line:74,column:20},end:{line:74,column:21}},loc:{start:{line:74,column:27},end:{line:74,column:89}},line:74}},branchMap:{0:{loc:{start:{line:8,column:2},end:{line:9,column:13}},type:"if",locations:[{start:{line:8,column:2},end:{line:9,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:8},1:{loc:{start:{line:10,column:2},end:{line:11,column:13}},type:"if",locations:[{start:{line:10,column:2},end:{line:11,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:10},2:{loc:{start:{line:16,column:2},end:{line:18,column:3}},type:"if",locations:[{start:{line:16,column:2},end:{line:18,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},3:{loc:{start:{line:19,column:2},end:{line:25,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:25,column:3}},{start:{line:21,column:9},end:{line:25,column:3}}],line:19},4:{loc:{start:{line:21,column:9},end:{line:25,column:3}},type:"if",locations:[{start:{line:21,column:9},end:{line:25,column:3}},{start:{line:23,column:9},end:{line:25,column:3}}],line:21},5:{loc:{start:{line:38,column:4},end:{line:42,column:5}},type:"if",locations:[{start:{line:38,column:4},end:{line:42,column:5}},{start:{line:40,column:11},end:{line:42,column:5}}],line:38},6:{loc:{start:{line:38,column:8},end:{line:38,column:49}},type:"binary-expr",locations:[{start:{line:38,column:8},end:{line:38,column:26}},{start:{line:38,column:30},end:{line:38,column:49}}],line:38},7:{loc:{start:{line:40,column:11},end:{line:42,column:5}},type:"if",locations:[{start:{line:40,column:11},end:{line:42,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:40},8:{loc:{start:{line:69,column:6},end:{line:76,column:10}},type:"binary-expr",locations:[{start:{line:69,column:6},end:{line:69,column:27}},{start:{line:69,column:47},end:{line:76,column:10}}],line:69}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx"],names:[],mappings:"AA+DW,SAEH,KAFG;AA/DX,OAAO,WAAW;AAElB,SAAQ,sBAAqB;AAC7B,OAAO,iBAAiB;AACxB,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AAExB,SAAS,YAAY,GAAoB;AACvC,MAAI,MAAM;AAAI,WAAO;AACrB,MAAI,MAAM,CAAW;AAAG,WAAO;AAC/B,SAAO,WAAW,CAAW;AAC/B;AAEA,SAAS,aAAa,GAAqB;AACzC,QAAM,WAAY,OAAO,MAAO;AAChC,MAAG,CAAC,UAAU;AACZ,WAAO;AAAA,EACT;AAEA,MAAG,EAAE,MAAM,cAAc,GAAG;AAC1B,WAAO;AAAA,EACT,WACQ,EAAE,MAAM,eAAe,GAAG;AAChC,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;AAEA,SAAS,YAAY,GAA8B;AACjD,MAAI,YAAY,CAAQ;AACxB,MAAI,aAAa,CAAQ;AACzB,SAAO;AACT;AAQA,qBAAqB,2BAA2B,MAAM,UAAmC;AAAA,EACvF,OAAO,eAAe;AAAA,IACpB,YAAY,CAAC;AAAA,EACf;AAAA,EAEA,oBAAoB,UAAkB,cAAsB,YAAsB;AAChF,QAAI,YAAY,CAAC,UAAU,cAAc,GAAG,WAAW,IAAI,WAAW,CAAC;AACvE,QAAG,aAAa,SAAS,aAAa,QAAQ;AAC5C,kBAAY,CAAC,UAAU,YAAY;AAAA,IACrC,WAAU,WAAW,WAAW,GAAG;AACjC,kBAAY,CAAC,UAAU,cAAc,EAAE;AAAA,IACzC;AACA,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,WAAW,EAAE,CAAC;AACpB,UAAM,eAAe,EAAE,CAAC;AACxB,UAAM,aAAa,EAAE,MAAM,CAAC;AAE5B,WAAO,qBAAC,SAAI,WAAU,iCACpB;AAAA,0BAAC,SAAI,WAAU,mCACb;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,OAAO;AAAA,UACP,SAAS,OAAO,KAAK,KAAK,MAAM,UAAW,EAAE,IAAI,cAAY,CAAC,UAAU,QAAQ,CAAC;AAAA,UACjF,UAAU,CAAC,oBAA4B,KAAK,oBAAoB,UAAU,iBAAiB,UAAU;AAAA;AAAA,MACvG,GACF;AAAA,MACA,oBAAC,SAAI,WAAU,mCACb;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,OAAO;AAAA,UACP,UAAU,CAAC,gBAAwB,KAAK,oBAAoB,aAAa,cAAc,UAAU;AAAA,UACjG,SAAS;AAAA;AAAA,MACX,GACF;AAAA,MACC,WAAW,SAAS,KACrB,oBAAC,SAAI,WAAU,+BACb;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,OAAO,WAAW,KAAK,GAAG;AAAA,UAC1B,UAAU,CAAC,MAAc,KAAK,oBAAoB,UAAU,cAAc,EAAE,MAAM,GAAG,CAAC;AAAA;AAAA,MACxF,GACF;AAAA,OAEF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3d8bcd70e58647712bf929f9e6ef3e13fde3cd73"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Gr=function(){return a},a}Gr();function dye(n){return Gr().f[0]++,Gr().s[0]++,n===""?(Gr().b[0][0]++,Gr().s[1]++,n):(Gr().b[0][1]++,Gr().s[2]++,isNaN(n)?(Gr().b[1][0]++,Gr().s[3]++,n):(Gr().b[1][1]++,Gr().s[4]++,parseFloat(n)))}function hye(n){Gr().f[1]++;const e=(Gr().s[5]++,typeof n=="string");if(Gr().s[6]++,e)Gr().b[2][1]++;else return Gr().b[2][0]++,Gr().s[7]++,n;return Gr().s[8]++,n.match(/^\s*true\s*$/)?(Gr().b[3][0]++,Gr().s[9]++,!0):(Gr().b[3][1]++,Gr().s[10]++,n.match(/^\s*false\s*$/)?(Gr().b[4][0]++,Gr().s[11]++,!1):(Gr().b[4][1]++,Gr().s[12]++,n))}function fye(n){return Gr().f[2]++,Gr().s[13]++,n=dye(n),Gr().s[14]++,n=hye(n),Gr().s[15]++,n}class o$ extends Mn.Component{onFilterPartChanged(e,t,r){Gr().f[3]++;let i=(Gr().s[17]++,[e,t,...r.map(fye)]);Gr().s[18]++,Gr().b[6][0]++,e==="has"||(Gr().b[6][1]++,e==="!has")?(Gr().b[5][0]++,Gr().s[19]++,i=[e,t]):(Gr().b[5][1]++,Gr().s[20]++,r.length===0?(Gr().b[7][0]++,Gr().s[21]++,i=[e,t,""]):Gr().b[7][1]++),Gr().s[22]++,this.props.onChange(i)}render(){Gr().f[4]++;const e=(Gr().s[23]++,this.props.filter),t=(Gr().s[24]++,e[0]),r=(Gr().s[25]++,e[1]),i=(Gr().s[26]++,e.slice(2));return Gr().s[27]++,G.jsxs("div",{className:"maputnik-filter-editor-single",children:[G.jsx("div",{className:"maputnik-filter-editor-property",children:G.jsx(Lv,{"aria-label":"key",value:r,options:Object.keys(this.props.properties).map(o=>(Gr().f[5]++,Gr().s[28]++,[o,o])),onChange:o=>(Gr().f[6]++,Gr().s[29]++,this.onFilterPartChanged(t,o,i))})}),G.jsx("div",{className:"maputnik-filter-editor-operator",children:G.jsx(V1,{"aria-label":"function",value:t,onChange:o=>(Gr().f[7]++,Gr().s[30]++,this.onFilterPartChanged(o,r,i)),options:cye})}),(Gr().b[8][0]++,i.length>0&&(Gr().b[8][1]++,G.jsx("div",{className:"maputnik-filter-editor-args",children:G.jsx(Qd,{"aria-label":"value",value:i.join(","),onChange:o=>(Gr().f[8]++,Gr().s[31]++,this.onFilterPartChanged(t,r,o.split(",")))})})))]})}}sn(o$,"defaultProps",(Gr().s[16]++,{properties:{}}));function Hy(){var n="/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",e="cef1671f65ba48cf49a518a548a597faa051d67d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:20,column:9}},2:{start:{line:23,column:26},end:{line:23,column:70}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:21,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx"],names:[],mappings:"AAYW,SAOD,KAPC;AAZX,OAAO,WAAkC;AACzC,OAAO,iBAAiB;AACxB,SAAQ,gBAAe;AACvB,SAA0B,uBAAuB;AAMjD,MAAM,kCAAkC,MAAM,UAA0C;AAAA,EACtF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,gCACpB;AAAA,0BAAC,SAAI,WAAU,uCACb;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,qBAAqB;AAAA,UAE9B,8BAAC,YAAS;AAAA;AAAA,MACZ,GACF;AAAA,MACA,oBAAC,SAAI,WAAU,wCACZ,eAAK,MAAM,UACd;AAAA,OACF;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB,gBAAgB,EAAE,yBAAyB;AACrE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cef1671f65ba48cf49a518a548a597faa051d67d"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Hy=function(){return a},a}Hy();class pye extends Mn.Component{render(){Hy().f[0]++;const e=(Hy().s[0]++,this.props.t);return Hy().s[1]++,G.jsxs("div",{className:"maputnik-filter-editor-block",children:[G.jsx("div",{className:"maputnik-filter-editor-block-action",children:G.jsx(is,{className:"maputnik-delete-filter",onClick:this.props.onDelete,title:e("Delete filter block"),children:G.jsx(Iv,{})})}),G.jsx("div",{className:"maputnik-filter-editor-block-content",children:this.props.children})]})}}const mye=(Hy().s[2]++,No()(pye));var gye=1/0,yye="[object Symbol]",$I="\\ud800-\\udfff",a$="\\u0300-\\u036f\\ufe20-\\ufe23",s$="\\u20d0-\\u20f0",l$="\\ufe0e\\ufe0f",vye="["+$I+"]",wB="["+a$+s$+"]",MB="\\ud83c[\\udffb-\\udfff]",Cye="(?:"+wB+"|"+MB+")",u$="[^"+$I+"]",A$="(?:\\ud83c[\\udde6-\\uddff]){2}",c$="[\\ud800-\\udbff][\\udc00-\\udfff]",d$="\\u200d",h$=Cye+"?",f$="["+l$+"]?",_ye="(?:"+d$+"(?:"+[u$,A$,c$].join("|")+")"+f$+h$+")*",bye=f$+h$+_ye,xye="(?:"+[u$+wB+"?",wB,A$,c$,vye].join("|")+")",wye=RegExp(MB+"(?="+MB+")|"+xye+bye,"g"),Mye=RegExp("["+d$+$I+a$+s$+l$+"]"),Sye=typeof window=="object"&&window&&window.Object===Object&&window,Eye=typeof self=="object"&&self&&self.Object===Object&&self,Oye=Sye||Eye||Function("return this")();function Bye(n){return n.split("")}function p$(n){return Mye.test(n)}function Iye(n){return p$(n)?kye(n):Bye(n)}function kye(n){return n.match(wye)||[]}var Tye=Object.prototype,Kye=Tye.toString,VP=Oye.Symbol,HP=VP?VP.prototype:void 0,ZP=HP?HP.toString:void 0;function Pye(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=n[r+e];return o}function Dye(n){if(typeof n=="string")return n;if(Rye(n))return ZP?ZP.call(n):"";var e=n+"";return e=="0"&&1/n==-gye?"-0":e}function Lye(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:Pye(n,e,t)}function Fye(n){return function(e){e=m$(e);var t=p$(e)?Iye(e):void 0,r=t?t[0]:e.charAt(0),i=t?Lye(t,1).join(""):e.slice(1);return r[n]()+i}}function Uye(n){return!!n&&typeof n=="object"}function Rye(n){return typeof n=="symbol"||Uye(n)&&Kye.call(n)==yye}function m$(n){return n==null?"":Dye(n)}function zye(n){return jye(m$(n).toLowerCase())}var jye=Fye("toUpperCase"),Nye=zye;const QI=Ba(Nye);function wf(){var n="/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",e="8b86d889d32efa9a6cc667b2fa3579002dfb58fc",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",statementMap:{0:{start:{line:4,column:16},end:{line:4,column:36}},1:{start:{line:5,column:2},end:{line:9,column:3}},2:{start:{line:6,column:4},end:{line:6,column:52}},3:{start:{line:8,column:4},end:{line:8,column:22}},4:{start:{line:10,column:2},end:{line:10,column:27}}},fnMap:{0:{name:"labelFromFieldName",decl:{start:{line:2,column:24},end:{line:2,column:42}},loc:{start:{line:2,column:54},end:{line:11,column:1}},line:2}},branchMap:{0:{loc:{start:{line:5,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:9,column:3}},{start:{line:7,column:9},end:{line:9,column:3}}],line:5}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts"],names:[],mappings:"AAAA,OAAO,gBAAgB;AAEvB,wBAAwB,mBAAmB,WAAmB;AAC5D,MAAI;AACJ,QAAM,QAAQ,UAAU,MAAM,GAAG;AACjC,MAAI,MAAM,SAAS,GAAG;AACpB,YAAQ,UAAU,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG;AAAA,EAChD,OACK;AACH,YAAQ;AAAA,EACV;AACA,SAAO,WAAW,KAAK;AACzB;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8b86d889d32efa9a6cc667b2fa3579002dfb58fc"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return wf=function(){return a},a}wf();function Vw(n){wf().f[0]++;let e;const t=(wf().s[0]++,n.split("-"));return wf().s[1]++,t.length>1?(wf().b[0][0]++,wf().s[2]++,e=n.split("-").slice(1).join(" ")):(wf().b[0][1]++,wf().s[3]++,e=n),wf().s[4]++,QI(e)}function Ni(){var n="/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",e="550aede3b5713892add5bda71ec153770e1b1129",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",statementMap:{0:{start:{line:11,column:24},end:{line:17,column:3}},1:{start:{line:19,column:4},end:{line:19,column:17}},2:{start:{line:20,column:4},end:{line:22,column:6}},3:{start:{line:24,column:18},end:{line:28,column:3}},4:{start:{line:25,column:4},end:{line:27,column:7}},5:{start:{line:29,column:16},end:{line:33,column:3}},6:{start:{line:30,column:4},end:{line:32,column:7}},7:{start:{line:35,column:64},end:{line:35,column:74}},8:{start:{line:36,column:26},end:{line:36,column:36}},9:{start:{line:37,column:25},end:{line:37,column:52}},10:{start:{line:38,column:42},end:{line:60,column:8}},11:{start:{line:61,column:21},end:{line:61,column:83}},12:{start:{line:62,column:23},end:{line:62,column:39}},13:{start:{line:63,column:26},end:{line:63,column:40}},14:{start:{line:64,column:24},end:{line:64,column:26}},15:{start:{line:66,column:6},end:{line:66,column:65}},16:{start:{line:68,column:4},end:{line:79,column:5}},17:{start:{line:69,column:6},end:{line:69,column:52}},18:{start:{line:71,column:6},end:{line:75,column:9}},19:{start:{line:72,column:8},end:{line:72,column:45}},20:{start:{line:74,column:8},end:{line:74,column:39}},21:{start:{line:76,column:6},end:{line:78,column:7}},22:{start:{line:77,column:8},end:{line:77,column:37}},23:{start:{line:80,column:4},end:{line:110,column:6}},24:{start:{line:113,column:27},end:{line:113,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:13},end:{line:13,column:14}},loc:{start:{line:13,column:19},end:{line:14,column:5}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:15,column:12},end:{line:15,column:13}},loc:{start:{line:15,column:18},end:{line:16,column:5}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:21},end:{line:23,column:3}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:24,column:18},end:{line:24,column:19}},loc:{start:{line:24,column:28},end:{line:28,column:3}},line:24},4:{name:"(anonymous_4)",decl:{start:{line:29,column:16},end:{line:29,column:17}},loc:{start:{line:29,column:22},end:{line:33,column:3}},line:29},5:{name:"(anonymous_5)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:11},end:{line:111,column:3}},line:34},6:{name:"getValue",decl:{start:{line:65,column:13},end:{line:65,column:21}},loc:{start:{line:65,column:28},end:{line:67,column:5}},line:65},7:{name:"(anonymous_7)",decl:{start:{line:71,column:36},end:{line:71,column:37}},loc:{start:{line:71,column:55},end:{line:73,column:7}},line:71},8:{name:"(anonymous_8)",decl:{start:{line:73,column:17},end:{line:73,column:18}},loc:{start:{line:73,column:36},end:{line:75,column:7}},line:73}},branchMap:{0:{loc:{start:{line:37,column:25},end:{line:37,column:52}},type:"cond-expr",locations:[{start:{line:37,column:35},end:{line:37,column:45}},{start:{line:37,column:48},end:{line:37,column:52}}],line:37},1:{loc:{start:{line:39,column:6},end:{line:49,column:7}},type:"binary-expr",locations:[{start:{line:39,column:6},end:{line:39,column:23}},{start:{line:39,column:43},end:{line:49,column:7}}],line:39},2:{loc:{start:{line:61,column:21},end:{line:61,column:83}},type:"cond-expr",locations:[{start:{line:61,column:44},end:{line:61,column:53}},{start:{line:61,column:56},end:{line:61,column:83}}],line:61},3:{loc:{start:{line:68,column:4},end:{line:79,column:5}},type:"if",locations:[{start:{line:68,column:4},end:{line:79,column:5}},{start:{line:70,column:11},end:{line:79,column:5}}],line:68},4:{loc:{start:{line:76,column:6},end:{line:78,column:7}},type:"if",locations:[{start:{line:76,column:6},end:{line:78,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:76}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx"],names:[],mappings:"AA6DM,mBASM,KATN;AA7DN,OAAO,WAAW;AAClB,SAAQ,UAAU,cAAa;AAC/B,OAAO,qBAAqB;AAC5B,SAA0B,uBAAuB;AAEjD,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,wBAAwB;AAC/B,OAAO,eAAe;AAqBtB,MAAM,mCAAmC,MAAM,UAAoE;AAAA,EACjH,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,IACT,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,QAAQ,MAAM;AAAA,IAAC;AAAA,EACjB;AAAA,EAEA,YAAY,OAAwC;AAClD,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,SAAgB;AAC/B,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,MAAM;AAClB,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,QAAQ,WAAW,WAAW,OAAO,QAAO,IAAI,KAAK;AAC/D,UAAM,EAAC,UAAS,IAAI,KAAK;AACzB,UAAM,eAAe,UAAU,CAAC,QAAQ,IAAI;AAE5C,UAAM,gBACJ,iCACG;AAAA,WAAK,MAAM,UACV;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,KAAK,MAAM;AAAA,UACpB,UAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,wBAAwB;AAAA,UAEjC,8BAAC,UAAO;AAAA;AAAA,QANJ;AAAA,MAON;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,KAAK,MAAM;AAAA,UACpB,WAAU;AAAA,UACV,OAAO,EAAE,mBAAmB;AAAA,UAE5B,8BAAC,YAAS;AAAA;AAAA,QALN;AAAA,MAMN;AAAA,OACF;AAGF,UAAM,WAAW,cAAc,SAAY,YAAY,GAAG,SAAS,IAAI,SAAS;AAEhF,UAAM,aAAa,OAAQ,QAAQ;AACnC,UAAM,gBAAgB,GAAG,QAAQ;AACjC,UAAM,cAAc,CAAC;AAErB,aAAS,SAAS,MAAW;AAC3B,aAAO,gBAAgB,MAAM,EAAC,QAAQ,GAAG,WAAW,GAAE,CAAC;AAAA,IACzD;AAEA,QAAI,WAAW;AACb,kBAAY,KAAK,EAAC,SAAS,eAAc,CAAC;AAAA,IAC5C,OACK;AACH,aAAO,QAAQ,MAAO,EACnB,OAAO,CAAC,CAAC,KAAK,MAAM,MAAM;AACzB,eAAO,IAAI,WAAW,aAAa;AAAA,MACrC,CAAC,EACA,QAAQ,CAAC,CAAC,MAAM,KAAK,MAAM;AAC1B,eAAO,YAAY,KAAK,KAAK;AAAA,MAC/B,CAAC;AAEH,UAAI,YAAY;AACd,oBAAY,KAAK,UAAU;AAAA,MAC7B;AAAA,IACF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QAEN,OAAO;AAAA,QACP,WAAW,KAAK,MAAM;AAAA,QACtB,OAAO,EAAE,mBAAmB,KAAK,MAAM,SAAS,CAAC;AAAA,QACjD,QAAQ;AAAA,QACR,UAAU;AAAA,QAEV;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,EAAC,MAAM,MAAK;AAAA,YAClB,MAAM;AAAA,cACJ,SAAS;AAAA,cACT,MAAM,KAAK,MAAM;AAAA,YACnB;AAAA,YACA,WAAU;AAAA,YACV,SAAS,KAAK,MAAM;AAAA,YACpB,QAAQ,KAAK,MAAM;AAAA,YACnB,eAAe,KAAK;AAAA,YACpB,aAAa,KAAK;AAAA,YAClB,OAAO;AAAA,YACP,aAAa;AAAA,YACb,WAAW;AAAA,YACX,cAAc;AAAA,YACd;AAAA,YACA,UAAU,KAAK,MAAM;AAAA;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,qBAAqB,gBAAgB,EAAE,0BAA0B;AACvE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"550aede3b5713892add5bda71ec153770e1b1129"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ni=function(){return a},a}Ni();class g$ extends Mn.Component{constructor(t){Ni().f[2]++,Ni().s[1]++;super(t);sn(this,"onJSONInvalid",(Ni().s[3]++,t=>{Ni().f[3]++,Ni().s[4]++,this.setState({jsonError:!0})}));sn(this,"onJSONValid",(Ni().s[5]++,()=>{Ni().f[4]++,Ni().s[6]++,this.setState({jsonError:!1})}));Ni().s[2]++,this.state={jsonError:!1}}render(){Ni().f[5]++;const{t,errors:r,fieldName:i,fieldType:o,value:a,canUndo:s}=(Ni().s[7]++,this.props),{jsonError:d}=(Ni().s[8]++,this.state),f=(Ni().s[9]++,s?(Ni().b[0][0]++,!s()):(Ni().b[0][1]++,!0)),C=(Ni().s[10]++,G.jsxs(G.Fragment,{children:[(Ni().b[1][0]++,this.props.onUndo&&(Ni().b[1][1]++,G.jsx(is,{onClick:this.props.onUndo,disabled:f,className:"maputnik-delete-stop",title:t("Revert from expression"),children:G.jsx(Ore,{})},"undo_action"))),G.jsx(is,{onClick:this.props.onDelete,className:"maputnik-delete-stop",title:t("Delete expression"),children:G.jsx(Iv,{})},"delete_action")]})),O=(Ni().s[11]++,o===void 0?(Ni().b[2][0]++,i):(Ni().b[2][1]++,`${o}.${i}`)),E=(Ni().s[12]++,r[O]),P=(Ni().s[13]++,`${O}[`),D=(Ni().s[14]++,[]);function $(H){return Ni().f[6]++,Ni().s[15]++,t$(H,{indent:2,maxLength:38})}return Ni().s[16]++,d?(Ni().b[3][0]++,Ni().s[17]++,D.push({message:"Invalid JSON"})):(Ni().b[3][1]++,Ni().s[18]++,Object.entries(r).filter(([H,Q])=>(Ni().f[7]++,Ni().s[19]++,H.startsWith(P))).forEach(([H,Q])=>(Ni().f[8]++,Ni().s[20]++,D.push(Q))),Ni().s[21]++,E?(Ni().b[4][0]++,Ni().s[22]++,D.push(E)):Ni().b[4][1]++),Ni().s[23]++,G.jsx(la,{error:D,fieldSpec:this.props.fieldSpec,label:t(Vw(this.props.fieldName)),action:C,wideMode:!0,children:G.jsx(NI,{mode:{name:"mgl"},lint:{context:"expression",spec:this.props.fieldSpec},className:"maputnik-expression-editor",onFocus:this.props.onFocus,onBlur:this.props.onBlur,onJSONInvalid:this.onJSONInvalid,onJSONValid:this.onJSONValid,layer:a,lineNumbers:!1,maxHeight:200,lineWrapping:!0,getValue:$,onChange:this.props.onChange})})}}sn(g$,"defaultProps",(Ni().s[0]++,{errors:{},onFocus:()=>{Ni().f[0]++},onBlur:()=>{Ni().f[1]++}}));const y$=(Ni().s[24]++,No()(g$));function dn(){var n="/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",e="10bf63b3f71adfa5066d0aecd6eaecbe45ada76f",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",statementMap:{0:{start:{line:17,column:17},end:{line:17,column:40}},1:{start:{line:18,column:2},end:{line:20,column:3}},2:{start:{line:19,column:4},end:{line:19,column:18}},3:{start:{line:21,column:20},end:{line:21,column:29}},4:{start:{line:22,column:16},end:{line:22,column:31}},5:{start:{line:23,column:2},end:{line:26,column:3}},6:{start:{line:24,column:4},end:{line:24,column:24}},7:{start:{line:25,column:4},end:{line:25,column:32}},8:{start:{line:27,column:2},end:{line:27,column:35}},9:{start:{line:30,column:2},end:{line:30,column:65}},10:{start:{line:33,column:2},end:{line:54,column:4}},11:{start:{line:56,column:19},end:{line:60,column:1}},12:{start:{line:62,column:2},end:{line:64,column:3}},13:{start:{line:63,column:4},end:{line:63,column:16}},14:{start:{line:65,column:21},end:{line:65,column:42}},15:{start:{line:66,column:2},end:{line:66,column:38}},16:{start:{line:69,column:2},end:{line:69,column:52}},17:{start:{line:72,column:2},end:{line:74,column:3}},18:{start:{line:73,column:4},end:{line:73,column:97}},19:{start:{line:73,column:38},end:{line:73,column:59}},20:{start:{line:73,column:75},end:{line:73,column:84}},21:{start:{line:75,column:2},end:{line:75,column:15}},22:{start:{line:78,column:24},end:{line:80,column:3}},23:{start:{line:82,column:4},end:{line:82,column:17}},24:{start:{line:83,column:4},end:{line:86,column:6}},25:{start:{line:90,column:22},end:{line:90,column:58}},26:{start:{line:91,column:4},end:{line:91,column:35}},27:{start:{line:92,column:4},end:{line:92,column:35}},28:{start:{line:95,column:22},end:{line:95,column:58}},29:{start:{line:96,column:4},end:{line:96,column:39}},30:{start:{line:97,column:4},end:{line:97,column:35}},31:{start:{line:99,column:18},end:{line:103,column:3}},32:{start:{line:100,column:26},end:{line:100,column:62}},33:{start:{line:101,column:4},end:{line:101,column:43}},34:{start:{line:102,column:4},end:{line:102,column:39}},35:{start:{line:104,column:16},end:{line:108,column:3}},36:{start:{line:105,column:4},end:{line:107,column:7}},37:{start:{line:109,column:15},end:{line:113,column:3}},38:{start:{line:110,column:4},end:{line:112,column:7}},39:{start:{line:114,column:19},end:{line:120,column:3}},40:{start:{line:115,column:19},end:{line:115,column:46}},41:{start:{line:116,column:4},end:{line:116,column:47}},42:{start:{line:117,column:4},end:{line:119,column:7}},43:{start:{line:122,column:32},end:{line:122,column:75}},44:{start:{line:123,column:4},end:{line:136,column:5}},45:{start:{line:124,column:6},end:{line:127,column:8}},46:{start:{line:128,column:11},end:{line:136,column:5}},47:{start:{line:129,column:6},end:{line:131,column:8}},48:{start:{line:133,column:6},end:{line:135,column:8}},49:{start:{line:139,column:26},end:{line:139,column:36}},50:{start:{line:140,column:36},end:{line:140,column:46}},51:{start:{line:141,column:22},end:{line:143,column:5}},52:{start:{line:144,column:26},end:{line:144,column:33}},53:{start:{line:145,column:36},end:{line:145,column:112}},54:{start:{line:146,column:4},end:{line:271,column:5}},55:{start:{line:147,column:6},end:{line:160,column:11}},56:{start:{line:161,column:11},end:{line:271,column:5}},57:{start:{line:162,column:21},end:{line:162,column:48}},58:{start:{line:163,column:26},end:{line:163,column:35}},59:{start:{line:164,column:22},end:{line:164,column:37}},60:{start:{line:165,column:38},end:{line:173,column:10}},61:{start:{line:174,column:27},end:{line:187,column:8}},62:{start:{line:175,column:22},end:{line:175,column:50}},63:{start:{line:176,column:8},end:{line:186,column:29}},64:{start:{line:188,column:6},end:{line:240,column:11}},65:{start:{line:199,column:33},end:{line:199,column:63}},66:{start:{line:242,column:25},end:{line:242,column:35}},67:{start:{line:243,column:6},end:{line:270,column:11}},68:{start:{line:248,column:14},end:{line:248,column:59}},69:{start:{line:249,column:14},end:{line:249,column:49}},70:{start:{line:274,column:21},end:{line:274,column:60}}},fnMap:{0:{name:"combiningFilter",decl:{start:{line:16,column:9},end:{line:16,column:24}},loc:{start:{line:16,column:32},end:{line:28,column:1}},line:16},1:{name:"migrateFilter",decl:{start:{line:29,column:9},end:{line:29,column:22}},loc:{start:{line:29,column:31},end:{line:31,column:1}},line:29},2:{name:"createStyleFromFilter",decl:{start:{line:32,column:9},end:{line:32,column:30}},loc:{start:{line:32,column:39},end:{line:55,column:1}},line:32},3:{name:"checkIfSimpleFilter",decl:{start:{line:61,column:9},end:{line:61,column:28}},loc:{start:{line:61,column:37},end:{line:67,column:1}},line:61},4:{name:"hasCombiningFilter",decl:{start:{line:68,column:9},end:{line:68,column:27}},loc:{start:{line:68,column:36},end:{line:70,column:1}},line:68},5:{name:"hasNestedCombiningFilter",decl:{start:{line:71,column:9},end:{line:71,column:33}},loc:{start:{line:71,column:42},end:{line:76,column:1}},line:71},6:{name:"(anonymous_6)",decl:{start:{line:73,column:31},end:{line:73,column:32}},loc:{start:{line:73,column:38},end:{line:73,column:59}},line:73},7:{name:"(anonymous_7)",decl:{start:{line:73,column:68},end:{line:73,column:69}},loc:{start:{line:73,column:75},end:{line:73,column:84}},line:73},8:{name:"(anonymous_8)",decl:{start:{line:81,column:2},end:{line:81,column:3}},loc:{start:{line:81,column:21},end:{line:87,column:3}},line:81},9:{name:"(anonymous_9)",decl:{start:{line:89,column:2},end:{line:89,column:3}},loc:{start:{line:89,column:42},end:{line:93,column:3}},line:89},10:{name:"(anonymous_10)",decl:{start:{line:94,column:2},end:{line:94,column:3}},loc:{start:{line:94,column:30},end:{line:98,column:3}},line:94},11:{name:"(anonymous_11)",decl:{start:{line:99,column:18},end:{line:99,column:19}},loc:{start:{line:99,column:24},end:{line:103,column:3}},line:99},12:{name:"(anonymous_12)",decl:{start:{line:104,column:16},end:{line:104,column:17}},loc:{start:{line:104,column:25},end:{line:108,column:3}},line:104},13:{name:"(anonymous_13)",decl:{start:{line:109,column:15},end:{line:109,column:16}},loc:{start:{line:109,column:21},end:{line:113,column:3}},line:109},14:{name:"(anonymous_14)",decl:{start:{line:114,column:19},end:{line:114,column:20}},loc:{start:{line:114,column:25},end:{line:120,column:3}},line:114},15:{name:"(anonymous_15)",decl:{start:{line:121,column:2},end:{line:121,column:3}},loc:{start:{line:121,column:48},end:{line:137,column:3}},line:121},16:{name:"(anonymous_16)",decl:{start:{line:138,column:2},end:{line:138,column:3}},loc:{start:{line:138,column:11},end:{line:272,column:3}},line:138},17:{name:"(anonymous_17)",decl:{start:{line:174,column:39},end:{line:174,column:40}},loc:{start:{line:174,column:51},end:{line:187,column:7}},line:174},18:{name:"(anonymous_18)",decl:{start:{line:199,column:26},end:{line:199,column:27}},loc:{start:{line:199,column:33},end:{line:199,column:63}},line:199},19:{name:"(anonymous_19)",decl:{start:{line:247,column:22},end:{line:247,column:23}},loc:{start:{line:247,column:28},end:{line:250,column:13}},line:247}},branchMap:{0:{loc:{start:{line:17,column:17},end:{line:17,column:40}},type:"binary-expr",locations:[{start:{line:17,column:17},end:{line:17,column:29}},{start:{line:17,column:33},end:{line:17,column:40}}],line:17},1:{loc:{start:{line:18,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:18,column:2},end:{line:20,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},2:{loc:{start:{line:23,column:2},end:{line:26,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:26,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},3:{loc:{start:{line:62,column:2},end:{line:64,column:3}},type:"if",locations:[{start:{line:62,column:2},end:{line:64,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},4:{loc:{start:{line:62,column:6},end:{line:62,column:59}},type:"binary-expr",locations:[{start:{line:62,column:6},end:{line:62,column:25}},{start:{line:62,column:29},end:{line:62,column:59}}],line:62},5:{loc:{start:{line:72,column:2},end:{line:74,column:3}},type:"if",locations:[{start:{line:72,column:2},end:{line:74,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:72},6:{loc:{start:{line:123,column:4},end:{line:136,column:5}},type:"if",locations:[{start:{line:123,column:4},end:{line:136,column:5}},{start:{line:128,column:11},end:{line:136,column:5}}],line:123},7:{loc:{start:{line:123,column:8},end:{line:123,column:66}},type:"binary-expr",locations:[{start:{line:123,column:8},end:{line:123,column:28}},{start:{line:123,column:32},end:{line:123,column:66}}],line:123},8:{loc:{start:{line:128,column:11},end:{line:136,column:5}},type:"if",locations:[{start:{line:128,column:11},end:{line:136,column:5}},{start:{line:132,column:11},end:{line:136,column:5}}],line:128},9:{loc:{start:{line:128,column:15},end:{line:128,column:73}},type:"binary-expr",locations:[{start:{line:128,column:15},end:{line:128,column:34}},{start:{line:128,column:38},end:{line:128,column:73}}],line:128},10:{loc:{start:{line:145,column:36},end:{line:145,column:112}},type:"binary-expr",locations:[{start:{line:145,column:36},end:{line:145,column:55}},{start:{line:145,column:59},end:{line:145,column:112}}],line:145},11:{loc:{start:{line:146,column:4},end:{line:271,column:5}},type:"if",locations:[{start:{line:146,column:4},end:{line:271,column:5}},{start:{line:161,column:11},end:{line:271,column:5}}],line:146},12:{loc:{start:{line:161,column:11},end:{line:271,column:5}},type:"if",locations:[{start:{line:161,column:11},end:{line:271,column:5}},{start:{line:241,column:11},end:{line:271,column:5}}],line:161},13:{loc:{start:{line:185,column:10},end:{line:185,column:119}},type:"binary-expr",locations:[{start:{line:185,column:10},end:{line:185,column:15}},{start:{line:185,column:35},end:{line:185,column:119}}],line:185},14:{loc:{start:{line:235,column:30},end:{line:235,column:62}},type:"cond-expr",locations:[{start:{line:235,column:51},end:{line:235,column:53}},{start:{line:235,column:56},end:{line:235,column:62}}],line:235},15:{loc:{start:{line:258,column:8},end:{line:269,column:12}},type:"binary-expr",locations:[{start:{line:258,column:8},end:{line:258,column:38}},{start:{line:258,column:58},end:{line:269,column:12}}],line:258}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx"],names:[],mappings:"AAgMQ,SAsDA,UAtDA,KAGA,YAHA;AAhMR,OAAO,WAAW;AAClB,SAAQ,4BAA2B;AACnC,SAAQ,eAAc;AAEtB,SAAQ,QAAQ,SAAS,qBAAoB;AAC7C,SAAQ,0BAAyB;AAEjC,SAAQ,0BAAyB;AACjC,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,wBAAwB;AAC/B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,SAAS;AAChB,OAAO,wBAAwB;AAC/B,SAA0B,uBAAuB;AAGjD,SAAS,gBAAgB,OAAuF;AAC9G,QAAM,SAAS,MAAM,UAAU,CAAC,KAAK;AAErC,MAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;AAC1B,WAAO;AAAA,EACT;AAEA,MAAI,cAAc,OAAO,CAAC;AAC1B,MAAI,UAAU,OAAO,MAAM,CAAC;AAE5B,MAAG,mBAAmB,QAAQ,WAAW,IAAI,GAAG;AAC9C,kBAAc;AACd,cAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAAA,EAC5B;AAEA,SAAO,CAAC,aAAa,GAAG,OAAO;AACjC;AAEA,SAAS,cAAc,QAA6D;AAElF,SAAQ,QAAQ,sBAAsB,MAAM,CAAQ,EAAE,OAAO,CAAC,EAAU;AAC1E;AAEA,SAAS,sBAAsB,QAAgG;AAC7H,SAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY,EAAC,qBAAqB,SAAQ;AAAA,IAC1C,WAAW;AAAA,MACT,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF;AAGA,SAAS,oBAAqB,QAA6D;AACzF,MAAI,OAAO,WAAW,KAAK,WAAW,SAAS,OAAO,CAAC,CAAC,GAAG;AACzD,WAAO;AAAA,EACT;AACA,QAAM,aAAa,cAAc,MAAM;AACvC,SAAO,CAAC,QAAQ,YAAY,MAAM;AACpC;AAEA,SAAS,mBAAmB,QAA6D;AACvF,SAAO,mBAAmB,QAAQ,OAAO,CAAC,CAAC,KAAK;AAClD;AAEA,SAAS,yBAAyB,QAA6D;AAC7F,MAAG,mBAAmB,MAAM,GAAG;AAC7B,WAAO,OAAO,MAAM,CAAC,EAAE,IAAI,OAAK,mBAAmB,CAAQ,CAAC,EAAE,OAAO,OAAK,KAAK,IAAI,EAAE,SAAS;AAAA,EAChG;AACA,SAAO;AACT;AAgBA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC,KAAK;AAAA,EAChB;AAAA,EAEA,YAAa,OAAkC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,qBAAqB,oBAAoB,gBAAgB,KAAK,CAAC;AAAA,IACjE;AAAA,EACF;AAAA;AAAA,EAGA,oBAAoB,WAAmB,SAAgB;AACrD,UAAM,YAAY,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACrD,cAAU,SAAS,IAAI;AACvB,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,iBAAiB,WAAmB;AAClC,UAAM,YAAY,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACrD,cAAU,OAAO,YAAY,GAAG,CAAC;AACjC,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,gBAAgB,MAAM;AACpB,UAAM,gBAAgB,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACzD,IAAC,cAAwB,KAAK,CAAC,MAAM,QAAQ,EAAE,CAAC;AAChD,SAAK,MAAM,SAAS,aAAa;AAAA,EACnC;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAEA,aAAa,MAAM;AACjB,SAAK,SAAS;AAAA,MACZ,qBAAqB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,SAAS,gBAAgB,KAAK,KAAK;AACzC,SAAK,MAAM,SAAS,cAAc,MAAM,CAAC;AACzC,SAAK,SAAS;AAAA,MACZ,qBAAqB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,sBAAsB,oBAAoB,gBAAgB,KAAK,CAAC;AAGtE,QAAI,CAAC,uBAAuB,MAAM,wBAAwB,MAAM;AAC9D,aAAO;AAAA,QACL,qBAAqB;AAAA,QACrB,qBAAqB;AAAA,MACvB;AAAA,IACF,WACS,uBAAuB,MAAM,wBAAwB,OAAO;AACnE,aAAO;AAAA,QACL,qBAAqB;AAAA,MACvB;AAAA,IACF,OACK;AACH,aAAO;AAAA,QACL,qBAAqB;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,QAAQ,EAAC,IAAI,KAAK;AACzB,UAAM,EAAC,oBAAmB,IAAI,KAAK;AACnC,UAAM,YAAU;AAAA,MACd,KAAK,OAAO,MAAM,OAAO,MAAM;AAAA,IACjC;AACA,UAAM,gBAAgB,CAAC,KAAK;AAE5B,UAAM,0BAA0B,uBAAuB,yBAAyB,gBAAgB,KAAK,KAAK,CAAC;AAE3G,QAAI,yBAAyB;AAC3B,aAAO,qBAAC,SAAI,WAAU,sCACpB;AAAA,4BAAC,OACE,YAAE,mCAAmC,GACxC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,KAAK;AAAA,YACd,OAAO,EAAE,uBAAuB;AAAA,YAEhC;AAAA,kCAAC,SAAI,OAAO,EAAC,aAAa,SAAS,OAAM,QAAQ,QAAO,QAAQ,eAAe,SAAQ,GAAG,SAAQ,aAChG,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA,cACC,EAAE,uBAAuB;AAAA;AAAA;AAAA,QAC5B;AAAA,SACF;AAAA,IACF,WACS,qBAAqB;AAC5B,YAAM,SAAS,gBAAgB,KAAK,KAAK;AACzC,YAAM,cAAc,OAAO,CAAC;AAC5B,YAAM,UAAU,OAAO,MAAM,CAAC;AAE9B,YAAM,UACJ,oBAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,KAAK;AAAA,UACd,OAAO,EAAE,uBAAuB;AAAA,UAChC,WAAU;AAAA,UAEV,8BAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,SAAQ,GAAG,SAAQ,aAC1E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA;AAAA,MACF,GACF;AAGF,YAAM,eAAe,QAAQ,IAAI,CAAC,GAAG,QAAQ;AAC3C,cAAM,QAAQ,OAAQ,UAAU,MAAI,CAAC,GAAG;AAExC,eACE,qBAAC,SACC;AAAA,8BAAC,qBAA4B,UAAU,KAAK,iBAAiB,KAAK,MAAM,GAAG,GACzE;AAAA,YAAC;AAAA;AAAA,cACC,YAAY,KAAK,MAAM;AAAA,cACvB,QAAQ;AAAA,cACR,UAAU,KAAK,oBAAoB,KAAK,MAAM,MAAM,CAAC;AAAA;AAAA,UACvD,KALsB,GAMxB;AAAA,UACC,SACC,oBAAC,SAAgB,WAAU,yBAAyB,gBAAM,WAAjD,OAAyD;AAAA,aAT5D,SAAS,GAAG,EAWtB;AAAA,MAEJ,CAAC;AAGD,aACE,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,OAAO,EAAE,QAAQ;AAAA,YACjB,QAAQ;AAAA,YAER;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,CAAC,MAAqB,KAAK,oBAAoB,GAAG,CAAC;AAAA,gBAC7D,SAAS;AAAA,kBACP,CAAC,OAAO,EAAE,sBAAsB,CAAC;AAAA,kBACjC,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AAAA,kBAC/B,CAAC,OAAO,EAAE,oBAAoB,CAAC;AAAA,gBACjC;AAAA;AAAA,YACF;AAAA;AAAA,UAbI;AAAA,QAcN;AAAA,QACC;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,KAAK;AAAA,gBAEd;AAAA,sCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,sBAAsB,GACrD;AAAA,kBAAM;AAAA,kBAAE,EAAE,YAAY;AAAA;AAAA;AAAA,YACxB;AAAA;AAAA,UAXI;AAAA,QAYN;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,YAEjD,8BAAC,OAAI,WAAsB;AAAA;AAAA,UAJvB;AAAA,QAKN;AAAA,SACF;AAAA,IAEJ,OACK;AACH,YAAM,EAAC,OAAM,IAAI,KAAK;AAEtB,aACE,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,MAAM;AACd,mBAAK,SAAS,EAAC,qBAAqB,KAAI,CAAC;AACzC,mBAAK,MAAM,SAAS,aAAa;AAAA,YACnC;AAAA,YACA,WAAU;AAAA,YACV;AAAA,YACA,OAAO;AAAA,YACP;AAAA,YACA,UAAU,KAAK,MAAM;AAAA;AAAA,QACvB;AAAA,QACC,KAAK,MAAM,uBACV,qBAAC,SAAI,WAAU,yBACZ;AAAA,YAAE,qCAAqC;AAAA,UACvC;AAAA,UACD;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,KAAK;AAAA,cACd,WAAU;AAAA,cAET,YAAE,0BAA0B;AAAA;AAAA,UAC/B;AAAA,WACF;AAAA,SAEJ;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"10bf63b3f71adfa5066d0aecd6eaecbe45ada76f"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return dn=function(){return a},a}dn();function Mm(n){dn().f[0]++;const e=(dn().s[0]++,dn().b[0][0]++,n.filter||(dn().b[0][1]++,["all"]));if(dn().s[1]++,Array.isArray(e))dn().b[1][1]++;else return dn().b[1][0]++,dn().s[2]++,e;let t=(dn().s[3]++,e[0]),r=(dn().s[4]++,e.slice(1));return dn().s[5]++,GI.indexOf(t)<0?(dn().b[2][0]++,dn().s[6]++,t="all",dn().s[7]++,r=[e.slice(0)]):dn().b[2][1]++,dn().s[8]++,[t,...r]}function Wye(n){return dn().f[1]++,dn().s[9]++,jne(Gye(n)).layers[0].filter}function Gye(n){return dn().f[2]++,dn().s[10]++,{id:"tmp",version:8,name:"Empty Style",metadata:{"maputnik:renderer":"mlgljs"},sources:{tmp:{type:"geojson",data:""}},sprite:"",glyphs:"https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",layers:[{id:"tmp",type:"fill",source:"tmp",filter:n}]}}const $ye=(dn().s[11]++,["all","any","none"]);function XP(n){if(dn().f[3]++,dn().s[12]++,dn().b[4][0]++,n.length===1&&(dn().b[4][1]++,$ye.includes(n[0])))return dn().b[3][0]++,dn().s[13]++,!0;dn().b[3][1]++;const e=(dn().s[14]++,v_(n));return dn().s[15]++,!nw.isEqual(e,n)}function JP(n){return dn().f[4]++,dn().s[16]++,GI.indexOf(n[0])>=0}function Qye(n){return dn().f[5]++,dn().s[17]++,JP(n)?(dn().b[5][0]++,dn().s[18]++,n.slice(1).map(e=>(dn().f[6]++,dn().s[19]++,JP(e))).filter(e=>(dn().f[7]++,dn().s[20]++,e==!0)).length>0):(dn().b[5][1]++,dn().s[21]++,!1)}class v$ extends Mn.Component{constructor(t){dn().f[8]++,dn().s[23]++;super(t);sn(this,"addFilterItem",(dn().s[31]++,()=>{dn().f[11]++;const t=(dn().s[32]++,Mm(this.props).slice(0));dn().s[33]++,t.push(["==","name",""]),dn().s[34]++,this.props.onChange(t)}));sn(this,"onToggleDoc",(dn().s[35]++,t=>{dn().f[12]++,dn().s[36]++,this.setState({showDoc:t})}));sn(this,"makeFilter",(dn().s[37]++,()=>{dn().f[13]++,dn().s[38]++,this.setState({displaySimpleFilter:!0})}));sn(this,"makeExpression",(dn().s[39]++,()=>{dn().f[14]++;const t=(dn().s[40]++,Mm(this.props));dn().s[41]++,this.props.onChange(Wye(t)),dn().s[42]++,this.setState({displaySimpleFilter:!1})}));dn().s[24]++,this.state={showDoc:!1,displaySimpleFilter:XP(Mm(t))}}onFilterPartChanged(t,r){dn().f[9]++;const i=(dn().s[25]++,Mm(this.props).slice(0));dn().s[26]++,i[t]=r,dn().s[27]++,this.props.onChange(i)}deleteFilterItem(t){dn().f[10]++;const r=(dn().s[28]++,Mm(this.props).slice(0));dn().s[29]++,r.splice(t+1,1),dn().s[30]++,this.props.onChange(r)}static getDerivedStateFromProps(t,r){dn().f[15]++;const i=(dn().s[43]++,XP(Mm(t)));return dn().s[44]++,dn().b[7][0]++,!i&&(dn().b[7][1]++,r.displaySimpleFilter===!0)?(dn().b[6][0]++,dn().s[45]++,{displaySimpleFilter:!1,valueIsSimpleFilter:!1}):(dn().b[6][1]++,dn().s[46]++,dn().b[9][0]++,i&&(dn().b[9][1]++,r.displaySimpleFilter===!1)?(dn().b[8][0]++,dn().s[47]++,{valueIsSimpleFilter:!0}):(dn().b[8][1]++,dn().s[48]++,{valueIsSimpleFilter:!1}))}render(){dn().f[16]++;const{errors:t,t:r}=(dn().s[49]++,this.props),{displaySimpleFilter:i}=(dn().s[50]++,this.state),o=(dn().s[51]++,{doc:Ea.layer.filter.doc+" Combine multiple filters together by using a compound filter."}),a=(dn().s[52]++,["all"]),s=(dn().s[53]++,dn().b[10][0]++,i&&(dn().b[10][1]++,Qye(Mm(this.props))));if(dn().s[54]++,s)return dn().b[11][0]++,dn().s[55]++,G.jsxs("div",{className:"maputnik-filter-editor-unsupported",children:[G.jsx("p",{children:r("Nested filters are not supported.")}),G.jsxs(is,{onClick:this.makeExpression,title:r("Convert to expression"),children:[G.jsx("svg",{style:{marginRight:"0.2em",width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:Mb})}),r("Upgrade to expression")]})]});if(dn().b[11][1]++,dn().s[56]++,i){dn().b[12][0]++;const d=(dn().s[57]++,Mm(this.props)),f=(dn().s[58]++,d[0]),C=(dn().s[59]++,d.slice(1)),O=(dn().s[60]++,G.jsx("div",{children:G.jsx(is,{onClick:this.makeExpression,title:r("Convert to expression"),className:"maputnik-make-zoom-function",children:G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:Mb})})})})),E=(dn().s[61]++,C.map((P,D)=>{dn().f[17]++;const $=(dn().s[62]++,t[`filter[${D+1}]`]);return dn().s[63]++,G.jsxs("div",{children:[G.jsx(mye,{onDelete:this.deleteFilterItem.bind(this,D),children:G.jsx(o$,{properties:this.props.properties,filter:P,onChange:this.onFilterPartChanged.bind(this,D+1)})},D),(dn().b[13][0]++,$&&(dn().b[13][1]++,G.jsx("div",{className:"maputnik-inline-error",children:$.message},"error")))]},`block-${D}`)}));return dn().s[64]++,G.jsxs(G.Fragment,{children:[G.jsx(la,{fieldSpec:o,label:r("Filter"),action:O,children:G.jsx(V1,{value:f,onChange:P=>(dn().f[18]++,dn().s[65]++,this.onFilterPartChanged(0,P)),options:[["all",r("every filter matches")],["none",r("no filter matches")],["any",r("any filter matches")]]})},"top"),E,G.jsx("div",{className:"maputnik-filter-editor-add-wrapper",children:G.jsxs(is,{"data-wd-key":"layer-filter-button",className:"maputnik-add-filter",onClick:this.addFilterItem,children:[G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:WI})})," ",r("Add filter")]})},"buttons"),G.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(dn().b[14][0]++,""):(dn().b[14][1]++,"none")},children:G.jsx(PI,{fieldSpec:o})},"doc")]})}else{dn().b[12][1]++;const{filter:d}=(dn().s[66]++,this.props);return dn().s[67]++,G.jsxs(G.Fragment,{children:[G.jsx(y$,{onDelete:()=>{dn().f[19]++,dn().s[68]++,this.setState({displaySimpleFilter:!0}),dn().s[69]++,this.props.onChange(a)},fieldName:"filter",fieldSpec:o,value:d,errors:t,onChange:this.props.onChange}),(dn().b[15][0]++,this.state.valueIsSimpleFilter&&(dn().b[15][1]++,G.jsxs("div",{className:"maputnik-expr-infobox",children:[r("You've entered an old style filter.")," ",G.jsx("button",{onClick:this.makeFilter,className:"maputnik-expr-infobox__button",children:r("Switch to filter editor.")})]})))]})}}}sn(v$,"defaultProps",(dn().s[22]++,{filter:["all"]}));const Yye=(dn().s[70]++,No()(v$));var Hw={},qs={},Xb={},qye=typeof window=="object"&&window&&window.Object===Object&&window,C$=qye,Vye=C$,Hye=typeof self=="object"&&self&&self.Object===Object&&self,Zye=Vye||Hye||Function("return this")(),Uh=Zye,Xye=Uh,Jye=Xye.Symbol,Jb=Jye,eD=Jb,_$=Object.prototype,eve=_$.hasOwnProperty,tve=_$.toString,jC=eD?eD.toStringTag:void 0;function nve(n){var e=eve.call(n,jC),t=n[jC];try{n[jC]=void 0;var r=!0}catch{}var i=tve.call(n);return r&&(e?n[jC]=t:delete n[jC]),i}var rve=nve,ive=Object.prototype,ove=ive.toString;function ave(n){return ove.call(n)}var sve=ave,tD=Jb,lve=rve,uve=sve,Ave="[object Null]",cve="[object Undefined]",nD=tD?tD.toStringTag:void 0;function dve(n){return n==null?n===void 0?cve:Ave:nD&&nD in Object(n)?lve(n):uve(n)}var H1=dve,hve=Array.isArray,sd=hve;function fve(n){return n!=null&&typeof n=="object"}var Xf=fve,pve=H1,mve=sd,gve=Xf,yve="[object String]";function vve(n){return typeof n=="string"||!mve(n)&&gve(n)&&pve(n)==yve}var Cve=vve;function _ve(n){return function(e,t,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var d=a[n?s:++i];if(t(o[d],d,o)===!1)break}return e}}var bve=_ve,xve=bve,wve=xve(),b$=wve;function Mve(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var Sve=Mve,Eve=H1,Ove=Xf,Bve="[object Arguments]";function Ive(n){return Ove(n)&&Eve(n)==Bve}var kve=Ive,rD=kve,Tve=Xf,x$=Object.prototype,Kve=x$.hasOwnProperty,Pve=x$.propertyIsEnumerable,Dve=rD(function(){return arguments}())?rD:function(n){return Tve(n)&&Kve.call(n,"callee")&&!Pve.call(n,"callee")},YI=Dve,d5={exports:{}};function Lve(){return!1}var Fve=Lve;d5.exports;(function(n,e){var t=Uh,r=Fve,i=e&&!e.nodeType&&e,o=i&&!0&&n&&!n.nodeType&&n,a=o&&o.exports===i,s=a?t.Buffer:void 0,d=s?s.isBuffer:void 0,f=d||r;n.exports=f})(d5,d5.exports);var Zw=d5.exports,Uve=9007199254740991,Rve=/^(?:0|[1-9]\d*)$/;function zve(n,e){var t=typeof n;return e=e??Uve,!!e&&(t=="number"||t!="symbol"&&Rve.test(n))&&n>-1&&n%1==0&&n<e}var qI=zve,jve=9007199254740991;function Nve(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=jve}var VI=Nve,Wve=H1,Gve=VI,$ve=Xf,Qve="[object Arguments]",Yve="[object Array]",qve="[object Boolean]",Vve="[object Date]",Hve="[object Error]",Zve="[object Function]",Xve="[object Map]",Jve="[object Number]",eCe="[object Object]",tCe="[object RegExp]",nCe="[object Set]",rCe="[object String]",iCe="[object WeakMap]",oCe="[object ArrayBuffer]",aCe="[object DataView]",sCe="[object Float32Array]",lCe="[object Float64Array]",uCe="[object Int8Array]",ACe="[object Int16Array]",cCe="[object Int32Array]",dCe="[object Uint8Array]",hCe="[object Uint8ClampedArray]",fCe="[object Uint16Array]",pCe="[object Uint32Array]",ys={};ys[sCe]=ys[lCe]=ys[uCe]=ys[ACe]=ys[cCe]=ys[dCe]=ys[hCe]=ys[fCe]=ys[pCe]=!0;ys[Qve]=ys[Yve]=ys[oCe]=ys[qve]=ys[aCe]=ys[Vve]=ys[Hve]=ys[Zve]=ys[Xve]=ys[Jve]=ys[eCe]=ys[tCe]=ys[nCe]=ys[rCe]=ys[iCe]=!1;function mCe(n){return $ve(n)&&Gve(n.length)&&!!ys[Wve(n)]}var gCe=mCe;function yCe(n){return function(e){return n(e)}}var HI=yCe,h5={exports:{}};h5.exports;(function(n,e){var t=C$,r=e&&!e.nodeType&&e,i=r&&!0&&n&&!n.nodeType&&n,o=i&&i.exports===r,a=o&&t.process,s=function(){try{var d=i&&i.require&&i.require("util").types;return d||a&&a.binding&&a.binding("util")}catch{}}();n.exports=s})(h5,h5.exports);var ZI=h5.exports,vCe=gCe,CCe=HI,iD=ZI,oD=iD&&iD.isTypedArray,_Ce=oD?CCe(oD):vCe,XI=_Ce,bCe=Sve,xCe=YI,wCe=sd,MCe=Zw,SCe=qI,ECe=XI,OCe=Object.prototype,BCe=OCe.hasOwnProperty;function ICe(n,e){var t=wCe(n),r=!t&&xCe(n),i=!t&&!r&&MCe(n),o=!t&&!r&&!i&&ECe(n),a=t||r||i||o,s=a?bCe(n.length,String):[],d=s.length;for(var f in n)(e||BCe.call(n,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||SCe(f,d)))&&s.push(f);return s}var w$=ICe,kCe=Object.prototype;function TCe(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||kCe;return n===t}var JI=TCe;function KCe(n,e){return function(t){return n(e(t))}}var M$=KCe,PCe=M$,DCe=PCe(Object.keys,Object),LCe=DCe,FCe=JI,UCe=LCe,RCe=Object.prototype,zCe=RCe.hasOwnProperty;function jCe(n){if(!FCe(n))return UCe(n);var e=[];for(var t in Object(n))zCe.call(n,t)&&t!="constructor"&&e.push(t);return e}var NCe=jCe;function WCe(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var qd=WCe,GCe=H1,$Ce=qd,QCe="[object AsyncFunction]",YCe="[object Function]",qCe="[object GeneratorFunction]",VCe="[object Proxy]";function HCe(n){if(!$Ce(n))return!1;var e=GCe(n);return e==YCe||e==qCe||e==QCe||e==VCe}var ek=HCe,ZCe=ek,XCe=VI;function JCe(n){return n!=null&&XCe(n.length)&&!ZCe(n)}var Fv=JCe,e_e=w$,t_e=NCe,n_e=Fv;function r_e(n){return n_e(n)?e_e(n):t_e(n)}var ex=r_e,i_e=b$,o_e=ex;function a_e(n,e){return n&&i_e(n,e,o_e)}var S$=a_e;function s_e(n){return n}var Xw=s_e,l_e=Xw;function u_e(n){return typeof n=="function"?n:l_e}var E$=u_e,A_e=S$,c_e=E$;function d_e(n,e){return n&&A_e(n,c_e(e))}var tk=d_e,h_e=M$,f_e=h_e(Object.getPrototypeOf,Object),nk=f_e,p_e=H1,m_e=nk,g_e=Xf,y_e="[object Object]",v_e=Function.prototype,C_e=Object.prototype,O$=v_e.toString,__e=C_e.hasOwnProperty,b_e=O$.call(Object);function x_e(n){if(!g_e(n)||p_e(n)!=y_e)return!1;var e=m_e(n);if(e===null)return!0;var t=__e.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&O$.call(t)==b_e}var B$=x_e;function w_e(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var I$=w_e;function M_e(){this.__data__=[],this.size=0}var S_e=M_e;function E_e(n,e){return n===e||n!==n&&e!==e}var tx=E_e,O_e=tx;function B_e(n,e){for(var t=n.length;t--;)if(O_e(n[t][0],e))return t;return-1}var Jw=B_e,I_e=Jw,k_e=Array.prototype,T_e=k_e.splice;function K_e(n){var e=this.__data__,t=I_e(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():T_e.call(e,t,1),--this.size,!0}var P_e=K_e,D_e=Jw;function L_e(n){var e=this.__data__,t=D_e(e,n);return t<0?void 0:e[t][1]}var F_e=L_e,U_e=Jw;function R_e(n){return U_e(this.__data__,n)>-1}var z_e=R_e,j_e=Jw;function N_e(n,e){var t=this.__data__,r=j_e(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}var W_e=N_e,G_e=S_e,$_e=P_e,Q_e=F_e,Y_e=z_e,q_e=W_e;function Uv(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Uv.prototype.clear=G_e;Uv.prototype.delete=$_e;Uv.prototype.get=Q_e;Uv.prototype.has=Y_e;Uv.prototype.set=q_e;var eM=Uv,V_e=eM;function H_e(){this.__data__=new V_e,this.size=0}var Z_e=H_e;function X_e(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}var J_e=X_e;function ebe(n){return this.__data__.get(n)}var tbe=ebe;function nbe(n){return this.__data__.has(n)}var rbe=nbe,ibe=Uh,obe=ibe["__core-js_shared__"],abe=obe,wE=abe,aD=function(){var n=/[^.]+$/.exec(wE&&wE.keys&&wE.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function sbe(n){return!!aD&&aD in n}var lbe=sbe,ube=Function.prototype,Abe=ube.toString;function cbe(n){if(n!=null){try{return Abe.call(n)}catch{}try{return n+""}catch{}}return""}var k$=cbe,dbe=ek,hbe=lbe,fbe=qd,pbe=k$,mbe=/[\\^$.*+?()[\]{}|]/g,gbe=/^\[object .+?Constructor\]$/,ybe=Function.prototype,vbe=Object.prototype,Cbe=ybe.toString,_be=vbe.hasOwnProperty,bbe=RegExp("^"+Cbe.call(_be).replace(mbe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xbe(n){if(!fbe(n)||hbe(n))return!1;var e=dbe(n)?bbe:gbe;return e.test(pbe(n))}var wbe=xbe;function Mbe(n,e){return n==null?void 0:n[e]}var Sbe=Mbe,Ebe=wbe,Obe=Sbe;function Bbe(n,e){var t=Obe(n,e);return Ebe(t)?t:void 0}var Z1=Bbe,Ibe=Z1,kbe=Uh,Tbe=Ibe(kbe,"Map"),rk=Tbe,Kbe=Z1,Pbe=Kbe(Object,"create"),tM=Pbe,sD=tM;function Dbe(){this.__data__=sD?sD(null):{},this.size=0}var Lbe=Dbe;function Fbe(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var Ube=Fbe,Rbe=tM,zbe="__lodash_hash_undefined__",jbe=Object.prototype,Nbe=jbe.hasOwnProperty;function Wbe(n){var e=this.__data__;if(Rbe){var t=e[n];return t===zbe?void 0:t}return Nbe.call(e,n)?e[n]:void 0}var Gbe=Wbe,$be=tM,Qbe=Object.prototype,Ybe=Qbe.hasOwnProperty;function qbe(n){var e=this.__data__;return $be?e[n]!==void 0:Ybe.call(e,n)}var Vbe=qbe,Hbe=tM,Zbe="__lodash_hash_undefined__";function Xbe(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Hbe&&e===void 0?Zbe:e,this}var Jbe=Xbe,exe=Lbe,txe=Ube,nxe=Gbe,rxe=Vbe,ixe=Jbe;function Rv(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Rv.prototype.clear=exe;Rv.prototype.delete=txe;Rv.prototype.get=nxe;Rv.prototype.has=rxe;Rv.prototype.set=ixe;var oxe=Rv,lD=oxe,axe=eM,sxe=rk;function lxe(){this.size=0,this.__data__={hash:new lD,map:new(sxe||axe),string:new lD}}var uxe=lxe;function Axe(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}var cxe=Axe,dxe=cxe;function hxe(n,e){var t=n.__data__;return dxe(e)?t[typeof e=="string"?"string":"hash"]:t.map}var nM=hxe,fxe=nM;function pxe(n){var e=fxe(this,n).delete(n);return this.size-=e?1:0,e}var mxe=pxe,gxe=nM;function yxe(n){return gxe(this,n).get(n)}var vxe=yxe,Cxe=nM;function _xe(n){return Cxe(this,n).has(n)}var bxe=_xe,xxe=nM;function wxe(n,e){var t=xxe(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}var Mxe=wxe,Sxe=uxe,Exe=mxe,Oxe=vxe,Bxe=bxe,Ixe=Mxe;function zv(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}zv.prototype.clear=Sxe;zv.prototype.delete=Exe;zv.prototype.get=Oxe;zv.prototype.has=Bxe;zv.prototype.set=Ixe;var ik=zv,kxe=eM,Txe=rk,Kxe=ik,Pxe=200;function Dxe(n,e){var t=this.__data__;if(t instanceof kxe){var r=t.__data__;if(!Txe||r.length<Pxe-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Kxe(r)}return t.set(n,e),this.size=t.size,this}var Lxe=Dxe,Fxe=eM,Uxe=Z_e,Rxe=J_e,zxe=tbe,jxe=rbe,Nxe=Lxe;function jv(n){var e=this.__data__=new Fxe(n);this.size=e.size}jv.prototype.clear=Uxe;jv.prototype.delete=Rxe;jv.prototype.get=zxe;jv.prototype.has=jxe;jv.prototype.set=Nxe;var rM=jv,Wxe="__lodash_hash_undefined__";function Gxe(n){return this.__data__.set(n,Wxe),this}var $xe=Gxe;function Qxe(n){return this.__data__.has(n)}var Yxe=Qxe,qxe=ik,Vxe=$xe,Hxe=Yxe;function f5(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new qxe;++e<t;)this.add(n[e])}f5.prototype.add=f5.prototype.push=Vxe;f5.prototype.has=Hxe;var Zxe=f5;function Xxe(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}var Jxe=Xxe;function e2e(n,e){return n.has(e)}var t2e=e2e,n2e=Zxe,r2e=Jxe,i2e=t2e,o2e=1,a2e=2;function s2e(n,e,t,r,i,o){var a=t&o2e,s=n.length,d=e.length;if(s!=d&&!(a&&d>s))return!1;var f=o.get(n),C=o.get(e);if(f&&C)return f==e&&C==n;var O=-1,E=!0,P=t&a2e?new n2e:void 0;for(o.set(n,e),o.set(e,n);++O<s;){var D=n[O],$=e[O];if(r)var H=a?r($,D,O,e,n,o):r(D,$,O,n,e,o);if(H!==void 0){if(H)continue;E=!1;break}if(P){if(!r2e(e,function(Q,N){if(!i2e(P,N)&&(D===Q||i(D,Q,t,r,o)))return P.push(N)})){E=!1;break}}else if(!(D===$||i(D,$,t,r,o))){E=!1;break}}return o.delete(n),o.delete(e),E}var T$=s2e,l2e=Uh,u2e=l2e.Uint8Array,K$=u2e;function A2e(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}var c2e=A2e;function d2e(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var h2e=d2e,uD=Jb,AD=K$,f2e=tx,p2e=T$,m2e=c2e,g2e=h2e,y2e=1,v2e=2,C2e="[object Boolean]",_2e="[object Date]",b2e="[object Error]",x2e="[object Map]",w2e="[object Number]",M2e="[object RegExp]",S2e="[object Set]",E2e="[object String]",O2e="[object Symbol]",B2e="[object ArrayBuffer]",I2e="[object DataView]",cD=uD?uD.prototype:void 0,ME=cD?cD.valueOf:void 0;function k2e(n,e,t,r,i,o,a){switch(t){case I2e:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case B2e:return!(n.byteLength!=e.byteLength||!o(new AD(n),new AD(e)));case C2e:case _2e:case w2e:return f2e(+n,+e);case b2e:return n.name==e.name&&n.message==e.message;case M2e:case E2e:return n==e+"";case x2e:var s=m2e;case S2e:var d=r&y2e;if(s||(s=g2e),n.size!=e.size&&!d)return!1;var f=a.get(n);if(f)return f==e;r|=v2e,a.set(n,e);var C=p2e(s(n),s(e),r,i,o,a);return a.delete(n),C;case O2e:if(ME)return ME.call(n)==ME.call(e)}return!1}var T2e=k2e;function K2e(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var P$=K2e,P2e=P$,D2e=sd;function L2e(n,e,t){var r=e(n);return D2e(n)?r:P2e(r,t(n))}var D$=L2e;function F2e(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var a=n[t];e(a,t,n)&&(o[i++]=a)}return o}var U2e=F2e;function R2e(){return[]}var L$=R2e,z2e=U2e,j2e=L$,N2e=Object.prototype,W2e=N2e.propertyIsEnumerable,dD=Object.getOwnPropertySymbols,G2e=dD?function(n){return n==null?[]:(n=Object(n),z2e(dD(n),function(e){return W2e.call(n,e)}))}:j2e,ok=G2e,$2e=D$,Q2e=ok,Y2e=ex;function q2e(n){return $2e(n,Y2e,Q2e)}var F$=q2e,hD=F$,V2e=1,H2e=Object.prototype,Z2e=H2e.hasOwnProperty;function X2e(n,e,t,r,i,o){var a=t&V2e,s=hD(n),d=s.length,f=hD(e),C=f.length;if(d!=C&&!a)return!1;for(var O=d;O--;){var E=s[O];if(!(a?E in e:Z2e.call(e,E)))return!1}var P=o.get(n),D=o.get(e);if(P&&D)return P==e&&D==n;var $=!0;o.set(n,e),o.set(e,n);for(var H=a;++O<d;){E=s[O];var Q=n[E],N=e[E];if(r)var Z=a?r(N,Q,E,e,n,o):r(Q,N,E,n,e,o);if(!(Z===void 0?Q===N||i(Q,N,t,r,o):Z)){$=!1;break}H||(H=E=="constructor")}if($&&!H){var ae=n.constructor,pe=e.constructor;ae!=pe&&"constructor"in n&&"constructor"in e&&!(typeof ae=="function"&&ae instanceof ae&&typeof pe=="function"&&pe instanceof pe)&&($=!1)}return o.delete(n),o.delete(e),$}var J2e=X2e,e3e=Z1,t3e=Uh,n3e=e3e(t3e,"DataView"),r3e=n3e,i3e=Z1,o3e=Uh,a3e=i3e(o3e,"Promise"),s3e=a3e,l3e=Z1,u3e=Uh,A3e=l3e(u3e,"Set"),c3e=A3e,d3e=Z1,h3e=Uh,f3e=d3e(h3e,"WeakMap"),p3e=f3e,SB=r3e,EB=rk,OB=s3e,BB=c3e,IB=p3e,U$=H1,Nv=k$,fD="[object Map]",m3e="[object Object]",pD="[object Promise]",mD="[object Set]",gD="[object WeakMap]",yD="[object DataView]",g3e=Nv(SB),y3e=Nv(EB),v3e=Nv(OB),C3e=Nv(BB),_3e=Nv(IB),e1=U$;(SB&&e1(new SB(new ArrayBuffer(1)))!=yD||EB&&e1(new EB)!=fD||OB&&e1(OB.resolve())!=pD||BB&&e1(new BB)!=mD||IB&&e1(new IB)!=gD)&&(e1=function(n){var e=U$(n),t=e==m3e?n.constructor:void 0,r=t?Nv(t):"";if(r)switch(r){case g3e:return yD;case y3e:return fD;case v3e:return pD;case C3e:return mD;case _3e:return gD}return e});var iM=e1,SE=rM,b3e=T$,x3e=T2e,w3e=J2e,vD=iM,CD=sd,_D=Zw,M3e=XI,S3e=1,bD="[object Arguments]",xD="[object Array]",H2="[object Object]",E3e=Object.prototype,wD=E3e.hasOwnProperty;function O3e(n,e,t,r,i,o){var a=CD(n),s=CD(e),d=a?xD:vD(n),f=s?xD:vD(e);d=d==bD?H2:d,f=f==bD?H2:f;var C=d==H2,O=f==H2,E=d==f;if(E&&_D(n)){if(!_D(e))return!1;a=!0,C=!1}if(E&&!C)return o||(o=new SE),a||M3e(n)?b3e(n,e,t,r,i,o):x3e(n,e,d,t,r,i,o);if(!(t&S3e)){var P=C&&wD.call(n,"__wrapped__"),D=O&&wD.call(e,"__wrapped__");if(P||D){var $=P?n.value():n,H=D?e.value():e;return o||(o=new SE),i($,H,t,r,o)}}return E?(o||(o=new SE),w3e(n,e,t,r,i,o)):!1}var B3e=O3e,I3e=B3e,MD=Xf;function R$(n,e,t,r,i){return n===e?!0:n==null||e==null||!MD(n)&&!MD(e)?n!==n&&e!==e:I3e(n,e,t,r,R$,i)}var z$=R$,k3e=rM,T3e=z$,K3e=1,P3e=2;function D3e(n,e,t,r){var i=t.length,o=i,a=!r;if(n==null)return!o;for(n=Object(n);i--;){var s=t[i];if(a&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<o;){s=t[i];var d=s[0],f=n[d],C=s[1];if(a&&s[2]){if(f===void 0&&!(d in n))return!1}else{var O=new k3e;if(r)var E=r(f,C,d,n,e,O);if(!(E===void 0?T3e(C,f,K3e|P3e,r,O):E))return!1}}return!0}var L3e=D3e,F3e=qd;function U3e(n){return n===n&&!F3e(n)}var j$=U3e,R3e=j$,z3e=ex;function j3e(n){for(var e=z3e(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,R3e(i)]}return e}var N3e=j3e;function W3e(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}var N$=W3e,G3e=L3e,$3e=N3e,Q3e=N$;function Y3e(n){var e=$3e(n);return e.length==1&&e[0][2]?Q3e(e[0][0],e[0][1]):function(t){return t===n||G3e(t,n,e)}}var q3e=Y3e,V3e=H1,H3e=Xf,Z3e="[object Symbol]";function X3e(n){return typeof n=="symbol"||H3e(n)&&V3e(n)==Z3e}var oM=X3e,J3e=sd,e4e=oM,t4e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n4e=/^\w*$/;function r4e(n,e){if(J3e(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||e4e(n)?!0:n4e.test(n)||!t4e.test(n)||e!=null&&n in Object(e)}var ak=r4e,W$=ik,i4e="Expected a function";function sk(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(i4e);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var a=n.apply(this,r);return t.cache=o.set(i,a)||o,a};return t.cache=new(sk.Cache||W$),t}sk.Cache=W$;var o4e=sk,a4e=o4e,s4e=500;function l4e(n){var e=a4e(n,function(r){return t.size===s4e&&t.clear(),r}),t=e.cache;return e}var u4e=l4e,A4e=u4e,c4e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d4e=/\\(\\)?/g,h4e=A4e(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(c4e,function(t,r,i,o){e.push(i?o.replace(d4e,"$1"):r||t)}),e}),f4e=h4e,SD=Jb,p4e=I$,m4e=sd,g4e=oM,y4e=1/0,ED=SD?SD.prototype:void 0,OD=ED?ED.toString:void 0;function G$(n){if(typeof n=="string")return n;if(m4e(n))return p4e(n,G$)+"";if(g4e(n))return OD?OD.call(n):"";var e=n+"";return e=="0"&&1/n==-y4e?"-0":e}var v4e=G$,C4e=v4e;function _4e(n){return n==null?"":C4e(n)}var b4e=_4e,x4e=sd,w4e=ak,M4e=f4e,S4e=b4e;function E4e(n,e){return x4e(n)?n:w4e(n,e)?[n]:M4e(S4e(n))}var $$=E4e,O4e=oM,B4e=1/0;function I4e(n){if(typeof n=="string"||O4e(n))return n;var e=n+"";return e=="0"&&1/n==-B4e?"-0":e}var aM=I4e,k4e=$$,T4e=aM;function K4e(n,e){e=k4e(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[T4e(e[t++])];return t&&t==r?n:void 0}var Q$=K4e,P4e=Q$;function D4e(n,e,t){var r=n==null?void 0:P4e(n,e);return r===void 0?t:r}var L4e=D4e;function F4e(n,e){return n!=null&&e in Object(n)}var U4e=F4e,R4e=$$,z4e=YI,j4e=sd,N4e=qI,W4e=VI,G4e=aM;function $4e(n,e,t){e=R4e(e,n);for(var r=-1,i=e.length,o=!1;++r<i;){var a=G4e(e[r]);if(!(o=n!=null&&t(n,a)))break;n=n[a]}return o||++r!=i?o:(i=n==null?0:n.length,!!i&&W4e(i)&&N4e(a,i)&&(j4e(n)||z4e(n)))}var Q4e=$4e,Y4e=U4e,q4e=Q4e;function V4e(n,e){return n!=null&&q4e(n,e,Y4e)}var H4e=V4e,Z4e=z$,X4e=L4e,J4e=H4e,e5e=ak,t5e=j$,n5e=N$,r5e=aM,i5e=1,o5e=2;function a5e(n,e){return e5e(n)&&t5e(e)?n5e(r5e(n),e):function(t){var r=X4e(t,n);return r===void 0&&r===e?J4e(t,n):Z4e(e,r,i5e|o5e)}}var s5e=a5e;function l5e(n){return function(e){return e==null?void 0:e[n]}}var u5e=l5e,A5e=Q$;function c5e(n){return function(e){return A5e(e,n)}}var d5e=c5e,h5e=u5e,f5e=d5e,p5e=ak,m5e=aM;function g5e(n){return p5e(n)?h5e(m5e(n)):f5e(n)}var y5e=g5e,v5e=q3e,C5e=s5e,_5e=Xw,b5e=sd,x5e=y5e;function w5e(n){return typeof n=="function"?n:n==null?_5e:typeof n=="object"?b5e(n)?C5e(n[0],n[1]):v5e(n):x5e(n)}var M5e=w5e,S5e=Fv;function E5e(n,e){return function(t,r){if(t==null)return t;if(!S5e(t))return n(t,r);for(var i=t.length,o=e?i:-1,a=Object(t);(e?o--:++o<i)&&r(a[o],o,a)!==!1;);return t}}var O5e=E5e,B5e=S$,I5e=O5e,k5e=I5e(B5e),Y$=k5e,T5e=Y$,K5e=Fv;function P5e(n,e){var t=-1,r=K5e(n)?Array(n.length):[];return T5e(n,function(i,o,a){r[++t]=e(i,o,a)}),r}var D5e=P5e,L5e=I$,F5e=M5e,U5e=D5e,R5e=sd;function z5e(n,e){var t=R5e(n)?L5e:U5e;return t(n,F5e(e))}var j5e=z5e;Object.defineProperty(Xb,"__esModule",{value:!0});Xb.flattenNames=void 0;var N5e=Cve,W5e=sM(N5e),G5e=tk,$5e=sM(G5e),Q5e=B$,Y5e=sM(Q5e),q5e=j5e,V5e=sM(q5e);function sM(n){return n&&n.__esModule?n:{default:n}}var H5e=Xb.flattenNames=function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return(0,V5e.default)(e,function(r){Array.isArray(r)?n(r).map(function(i){return t.push(i)}):(0,Y5e.default)(r)?(0,$5e.default)(r,function(i,o){i===!0&&t.push(o),t.push(o+"-"+i)}):(0,W5e.default)(r)&&t.push(r)}),t};Xb.default=H5e;var nx={};function Z5e(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var q$=Z5e,X5e=Z1,J5e=function(){try{var n=X5e(Object,"defineProperty");return n({},"",{}),n}catch{}}(),V$=J5e,BD=V$;function ewe(n,e,t){e=="__proto__"&&BD?BD(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}var lk=ewe,twe=lk,nwe=tx,rwe=Object.prototype,iwe=rwe.hasOwnProperty;function owe(n,e,t){var r=n[e];(!(iwe.call(n,e)&&nwe(r,t))||t===void 0&&!(e in n))&&twe(n,e,t)}var H$=owe,awe=H$,swe=lk;function lwe(n,e,t,r){var i=!t;t||(t={});for(var o=-1,a=e.length;++o<a;){var s=e[o],d=r?r(t[s],n[s],s,t,n):void 0;d===void 0&&(d=n[s]),i?swe(t,s,d):awe(t,s,d)}return t}var rx=lwe,uwe=rx,Awe=ex;function cwe(n,e){return n&&uwe(e,Awe(e),n)}var dwe=cwe;function hwe(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var fwe=hwe,pwe=qd,mwe=JI,gwe=fwe,ywe=Object.prototype,vwe=ywe.hasOwnProperty;function Cwe(n){if(!pwe(n))return gwe(n);var e=mwe(n),t=[];for(var r in n)r=="constructor"&&(e||!vwe.call(n,r))||t.push(r);return t}var _we=Cwe,bwe=w$,xwe=_we,wwe=Fv;function Mwe(n){return wwe(n)?bwe(n,!0):xwe(n)}var ix=Mwe,Swe=rx,Ewe=ix;function Owe(n,e){return n&&Swe(e,Ewe(e),n)}var Bwe=Owe,p5={exports:{}};p5.exports;(function(n,e){var t=Uh,r=e&&!e.nodeType&&e,i=r&&!0&&n&&!n.nodeType&&n,o=i&&i.exports===r,a=o?t.Buffer:void 0,s=a?a.allocUnsafe:void 0;function d(f,C){if(C)return f.slice();var O=f.length,E=s?s(O):new f.constructor(O);return f.copy(E),E}n.exports=d})(p5,p5.exports);var Z$=p5.exports;function Iwe(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var X$=Iwe,kwe=rx,Twe=ok;function Kwe(n,e){return kwe(n,Twe(n),e)}var Pwe=Kwe,Dwe=P$,Lwe=nk,Fwe=ok,Uwe=L$,Rwe=Object.getOwnPropertySymbols,zwe=Rwe?function(n){for(var e=[];n;)Dwe(e,Fwe(n)),n=Lwe(n);return e}:Uwe,J$=zwe,jwe=rx,Nwe=J$;function Wwe(n,e){return jwe(n,Nwe(n),e)}var Gwe=Wwe,$we=D$,Qwe=J$,Ywe=ix;function qwe(n){return $we(n,Ywe,Qwe)}var Vwe=qwe,Hwe=Object.prototype,Zwe=Hwe.hasOwnProperty;function Xwe(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&Zwe.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var Jwe=Xwe,ID=K$;function eMe(n){var e=new n.constructor(n.byteLength);return new ID(e).set(new ID(n)),e}var uk=eMe,tMe=uk;function nMe(n,e){var t=e?tMe(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var rMe=nMe,iMe=/\w*$/;function oMe(n){var e=new n.constructor(n.source,iMe.exec(n));return e.lastIndex=n.lastIndex,e}var aMe=oMe,kD=Jb,TD=kD?kD.prototype:void 0,KD=TD?TD.valueOf:void 0;function sMe(n){return KD?Object(KD.call(n)):{}}var lMe=sMe,uMe=uk;function AMe(n,e){var t=e?uMe(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var eQ=AMe,cMe=uk,dMe=rMe,hMe=aMe,fMe=lMe,pMe=eQ,mMe="[object Boolean]",gMe="[object Date]",yMe="[object Map]",vMe="[object Number]",CMe="[object RegExp]",_Me="[object Set]",bMe="[object String]",xMe="[object Symbol]",wMe="[object ArrayBuffer]",MMe="[object DataView]",SMe="[object Float32Array]",EMe="[object Float64Array]",OMe="[object Int8Array]",BMe="[object Int16Array]",IMe="[object Int32Array]",kMe="[object Uint8Array]",TMe="[object Uint8ClampedArray]",KMe="[object Uint16Array]",PMe="[object Uint32Array]";function DMe(n,e,t){var r=n.constructor;switch(e){case wMe:return cMe(n);case mMe:case gMe:return new r(+n);case MMe:return dMe(n,t);case SMe:case EMe:case OMe:case BMe:case IMe:case kMe:case TMe:case KMe:case PMe:return pMe(n,t);case yMe:return new r;case vMe:case bMe:return new r(n);case CMe:return hMe(n);case _Me:return new r;case xMe:return fMe(n)}}var LMe=DMe,FMe=qd,PD=Object.create,UMe=function(){function n(){}return function(e){if(!FMe(e))return{};if(PD)return PD(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}(),RMe=UMe,zMe=RMe,jMe=nk,NMe=JI;function WMe(n){return typeof n.constructor=="function"&&!NMe(n)?zMe(jMe(n)):{}}var tQ=WMe,GMe=iM,$Me=Xf,QMe="[object Map]";function YMe(n){return $Me(n)&&GMe(n)==QMe}var qMe=YMe,VMe=qMe,HMe=HI,DD=ZI,LD=DD&&DD.isMap,ZMe=LD?HMe(LD):VMe,XMe=ZMe,JMe=iM,eSe=Xf,tSe="[object Set]";function nSe(n){return eSe(n)&&JMe(n)==tSe}var rSe=nSe,iSe=rSe,oSe=HI,FD=ZI,UD=FD&&FD.isSet,aSe=UD?oSe(UD):iSe,sSe=aSe,lSe=rM,uSe=q$,ASe=H$,cSe=dwe,dSe=Bwe,hSe=Z$,fSe=X$,pSe=Pwe,mSe=Gwe,gSe=F$,ySe=Vwe,vSe=iM,CSe=Jwe,_Se=LMe,bSe=tQ,xSe=sd,wSe=Zw,MSe=XMe,SSe=qd,ESe=sSe,OSe=ex,BSe=ix,ISe=1,kSe=2,TSe=4,nQ="[object Arguments]",KSe="[object Array]",PSe="[object Boolean]",DSe="[object Date]",LSe="[object Error]",rQ="[object Function]",FSe="[object GeneratorFunction]",USe="[object Map]",RSe="[object Number]",iQ="[object Object]",zSe="[object RegExp]",jSe="[object Set]",NSe="[object String]",WSe="[object Symbol]",GSe="[object WeakMap]",$Se="[object ArrayBuffer]",QSe="[object DataView]",YSe="[object Float32Array]",qSe="[object Float64Array]",VSe="[object Int8Array]",HSe="[object Int16Array]",ZSe="[object Int32Array]",XSe="[object Uint8Array]",JSe="[object Uint8ClampedArray]",eEe="[object Uint16Array]",tEe="[object Uint32Array]",es={};es[nQ]=es[KSe]=es[$Se]=es[QSe]=es[PSe]=es[DSe]=es[YSe]=es[qSe]=es[VSe]=es[HSe]=es[ZSe]=es[USe]=es[RSe]=es[iQ]=es[zSe]=es[jSe]=es[NSe]=es[WSe]=es[XSe]=es[JSe]=es[eEe]=es[tEe]=!0;es[LSe]=es[rQ]=es[GSe]=!1;function I3(n,e,t,r,i,o){var a,s=e&ISe,d=e&kSe,f=e&TSe;if(t&&(a=i?t(n,r,i,o):t(n)),a!==void 0)return a;if(!SSe(n))return n;var C=xSe(n);if(C){if(a=CSe(n),!s)return fSe(n,a)}else{var O=vSe(n),E=O==rQ||O==FSe;if(wSe(n))return hSe(n,s);if(O==iQ||O==nQ||E&&!i){if(a=d||E?{}:bSe(n),!s)return d?mSe(n,dSe(a,n)):pSe(n,cSe(a,n))}else{if(!es[O])return i?n:{};a=_Se(n,O,s)}}o||(o=new lSe);var P=o.get(n);if(P)return P;o.set(n,a),ESe(n)?n.forEach(function(H){a.add(I3(H,e,t,H,n,o))}):MSe(n)&&n.forEach(function(H,Q){a.set(Q,I3(H,e,t,Q,n,o))});var D=f?d?ySe:gSe:d?BSe:OSe,$=C?void 0:D(n);return uSe($||n,function(H,Q){$&&(Q=H,H=n[Q]),ASe(a,Q,I3(H,e,t,Q,n,o))}),a}var nEe=I3,rEe=nEe,iEe=1,oEe=4;function aEe(n){return rEe(n,iEe|oEe)}var sEe=aEe;Object.defineProperty(nx,"__esModule",{value:!0});nx.mergeClasses=void 0;var lEe=tk,uEe=oQ(lEe),AEe=sEe,cEe=oQ(AEe),dEe=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n};function oQ(n){return n&&n.__esModule?n:{default:n}}var hEe=nx.mergeClasses=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,cEe.default)(e.default)||{};return t.map(function(i){var o=e[i];return o&&(0,uEe.default)(o,function(a,s){r[s]||(r[s]={}),r[s]=dEe({},r[s],o[s])}),i}),r};nx.default=hEe;var ox={};Object.defineProperty(ox,"__esModule",{value:!0});ox.autoprefix=void 0;var fEe=tk,RD=mEe(fEe),pEe=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n};function mEe(n){return n&&n.__esModule?n:{default:n}}var gEe={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var r=t[e];return r||{extend:e}}},yEe=ox.autoprefix=function(e){var t={};return(0,RD.default)(e,function(r,i){var o={};(0,RD.default)(r,function(a,s){var d=gEe[s];d?o=pEe({},o,d(a)):o[s]=a}),t[i]=o}),t};ox.default=yEe;var ax={};Object.defineProperty(ax,"__esModule",{value:!0});ax.hover=void 0;var vEe=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CEe=Wn,EE=_Ee(CEe);function _Ee(n){return n&&n.__esModule?n:{default:n}}function bEe(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function zD(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function xEe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var wEe=ax.hover=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){xEe(i,r);function i(){var o,a,s,d;bEe(this,i);for(var f=arguments.length,C=Array(f),O=0;O<f;O++)C[O]=arguments[O];return d=(a=(s=zD(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(C))),s),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return EE.default.createElement(t,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},EE.default.createElement(e,vEe({},s.props,s.state)))},a),zD(s,d)}return i}(EE.default.Component)};ax.default=wEe;var sx={};Object.defineProperty(sx,"__esModule",{value:!0});sx.active=void 0;var MEe=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SEe=Wn,OE=EEe(SEe);function EEe(n){return n&&n.__esModule?n:{default:n}}function OEe(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function jD(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function BEe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var IEe=sx.active=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){BEe(i,r);function i(){var o,a,s,d;OEe(this,i);for(var f=arguments.length,C=Array(f),O=0;O<f;O++)C[O]=arguments[O];return d=(a=(s=jD(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(C))),s),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return OE.default.createElement(t,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},OE.default.createElement(e,MEe({},s.props,s.state)))},a),jD(s,d)}return i}(OE.default.Component)};sx.default=IEe;var Ak={};Object.defineProperty(Ak,"__esModule",{value:!0});var kEe=function(e,t){var r={},i=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=s};return e===0&&i("first-child"),e===t-1&&i("last-child"),(e===0||e%2===0)&&i("even"),Math.abs(e%2)===1&&i("odd"),i("nth-child",e),r};Ak.default=kEe;Object.defineProperty(qs,"__esModule",{value:!0});qs.ReactCSS=qs.loop=qs.handleActive=qs.handleHover=qs.hover=void 0;var TEe=Xb,KEe=Wv(TEe),PEe=nx,DEe=Wv(PEe),LEe=ox,FEe=Wv(LEe),UEe=ax,aQ=Wv(UEe),REe=sx,zEe=Wv(REe),jEe=Ak,NEe=Wv(jEe);function Wv(n){return n&&n.__esModule?n:{default:n}}qs.hover=aQ.default;qs.handleHover=aQ.default;qs.handleActive=zEe.default;qs.loop=NEe.default;var WEe=qs.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var o=(0,KEe.default)(r),a=(0,DEe.default)(e,o);return(0,FEe.default)(a)};qs.default=WEe;var GEe=lk,$Ee=tx;function QEe(n,e,t){(t!==void 0&&!$Ee(n[e],t)||t===void 0&&!(e in n))&&GEe(n,e,t)}var sQ=QEe,YEe=Fv,qEe=Xf;function VEe(n){return qEe(n)&&YEe(n)}var HEe=VEe;function ZEe(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}var lQ=ZEe,XEe=rx,JEe=ix;function e6e(n){return XEe(n,JEe(n))}var t6e=e6e,ND=sQ,n6e=Z$,r6e=eQ,i6e=X$,o6e=tQ,WD=YI,GD=sd,a6e=HEe,s6e=Zw,l6e=ek,u6e=qd,A6e=B$,c6e=XI,$D=lQ,d6e=t6e;function h6e(n,e,t,r,i,o,a){var s=$D(n,t),d=$D(e,t),f=a.get(d);if(f){ND(n,t,f);return}var C=o?o(s,d,t+"",n,e,a):void 0,O=C===void 0;if(O){var E=GD(d),P=!E&&s6e(d),D=!E&&!P&&c6e(d);C=d,E||P||D?GD(s)?C=s:a6e(s)?C=i6e(s):P?(O=!1,C=n6e(d,!0)):D?(O=!1,C=r6e(d,!0)):C=[]:A6e(d)||WD(d)?(C=s,WD(s)?C=d6e(s):(!u6e(s)||l6e(s))&&(C=o6e(d))):O=!1}O&&(a.set(d,C),i(C,d,r,o,a),a.delete(d)),ND(n,t,C)}var f6e=h6e,p6e=rM,m6e=sQ,g6e=b$,y6e=f6e,v6e=qd,C6e=ix,_6e=lQ;function uQ(n,e,t,r,i){n!==e&&g6e(e,function(o,a){if(i||(i=new p6e),v6e(o))y6e(n,e,a,t,uQ,r,i);else{var s=r?r(_6e(n,a),o,a+"",n,e,i):void 0;s===void 0&&(s=o),m6e(n,a,s)}},C6e)}var b6e=uQ;function x6e(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}var w6e=x6e,M6e=w6e,QD=Math.max;function S6e(n,e,t){return e=QD(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=QD(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=t(a),M6e(n,this,s)}}var E6e=S6e;function O6e(n){return function(){return n}}var B6e=O6e,I6e=B6e,YD=V$,k6e=Xw,T6e=YD?function(n,e){return YD(n,"toString",{configurable:!0,enumerable:!1,value:I6e(e),writable:!0})}:k6e,K6e=T6e,P6e=800,D6e=16,L6e=Date.now;function F6e(n){var e=0,t=0;return function(){var r=L6e(),i=D6e-(r-t);if(t=r,i>0){if(++e>=P6e)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}var U6e=F6e,R6e=K6e,z6e=U6e,j6e=z6e(R6e),N6e=j6e,W6e=Xw,G6e=E6e,$6e=N6e;function Q6e(n,e){return $6e(G6e(n,e,W6e),n+"")}var Y6e=Q6e,q6e=tx,V6e=Fv,H6e=qI,Z6e=qd;function X6e(n,e,t){if(!Z6e(t))return!1;var r=typeof e;return(r=="number"?V6e(t)&&H6e(e,t.length):r=="string"&&e in t)?q6e(t[e],n):!1}var J6e=X6e,eOe=Y6e,tOe=J6e;function nOe(n){return eOe(function(e,t){var r=-1,i=t.length,o=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,a&&tOe(t[0],t[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=t[r];s&&n(e,s,r,o)}return e})}var rOe=nOe,iOe=b6e,oOe=rOe,aOe=oOe(function(n,e,t){iOe(n,e,t)}),AQ=aOe,ck={},lx={},dk={};Object.defineProperty(dk,"__esModule",{value:!0});dk.calculateChange=function(e,t,r,i,o){var a=o.clientWidth,s=o.clientHeight,d=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,f=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,C=d-(o.getBoundingClientRect().left+window.pageXOffset),O=f-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var E=void 0;if(O<0?E=0:O>s?E=1:E=Math.round(O*100/s)/100,t.a!==E)return{h:t.h,s:t.s,l:t.l,a:E,source:"rgb"}}else{var P=void 0;if(C<0?P=0:C>a?P=1:P=Math.round(C*100/a)/100,i!==P)return{h:t.h,s:t.s,l:t.l,a:P,source:"rgb"}}return null};var X1={},lM={};Object.defineProperty(lM,"__esModule",{value:!0});var BE={},sOe=lM.render=function(e,t,r,i){if(typeof document>"u"&&!i)return null;var o=i?new i:document.createElement("canvas");o.width=r*2,o.height=r*2;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null};lM.get=function(e,t,r,i){var o=e+"-"+t+"-"+r+(i?"-server":"");if(BE[o])return BE[o];var a=sOe(e,t,r,i);return BE[o]=a,a};Object.defineProperty(X1,"__esModule",{value:!0});X1.Checkboard=void 0;var qD=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},cQ=Wn,VD=dQ(cQ),lOe=qs,uOe=dQ(lOe),AOe=lM,cOe=dOe(AOe);function dOe(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function dQ(n){return n&&n.__esModule?n:{default:n}}var hQ=X1.Checkboard=function(e){var t=e.white,r=e.grey,i=e.size,o=e.renderers,a=e.borderRadius,s=e.boxShadow,d=e.children,f=(0,uOe.default)({default:{grid:{borderRadius:a,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+cOe.get(t,r,i,o.canvas)+") center left"}}});return(0,cQ.isValidElement)(d)?VD.default.cloneElement(d,qD({},d.props,{style:qD({},d.props.style,f.grid)})):VD.default.createElement("div",{style:f.grid})};hQ.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};X1.default=hQ;Object.defineProperty(lx,"__esModule",{value:!0});lx.Alpha=void 0;var hOe=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},fOe=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),kB=Wn,Sm=hk(kB),pOe=qs,mOe=hk(pOe),gOe=dk,yOe=_Oe(gOe),vOe=X1,COe=hk(vOe);function _Oe(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function hk(n){return n&&n.__esModule?n:{default:n}}function bOe(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function HD(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function xOe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var wOe=lx.Alpha=function(n){xOe(e,n);function e(){var t,r,i,o;bOe(this,e);for(var a=arguments.length,s=Array(a),d=0;d<a;d++)s[d]=arguments[d];return o=(r=(i=HD(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),i),i.handleChange=function(f){var C=yOe.calculateChange(f,i.props.hsl,i.props.direction,i.props.a,i.container);C&&typeof i.props.onChange=="function"&&i.props.onChange(C,f)},i.handleMouseDown=function(f){i.handleChange(f),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},i.unbindEventListeners=function(){window.removeEventListener("mousemove",i.handleChange),window.removeEventListener("mouseup",i.handleMouseUp)},r),HD(i,o)}return fOe(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,i=this.props.rgb,o=(0,mOe.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+i.r+","+i.g+","+i.b+`, 0) 0%,
           rgba(`+i.r+","+i.g+","+i.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:i.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+i.r+","+i.g+","+i.b+`, 0) 0%,
           rgba(`+i.r+","+i.g+","+i.b+", 1) 100%)"},pointer:{left:0,top:i.a*100+"%"}},overwrite:hOe({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return Sm.default.createElement("div",{style:o.alpha},Sm.default.createElement("div",{style:o.checkboard},Sm.default.createElement(COe.default,{renderers:this.props.renderers})),Sm.default.createElement("div",{style:o.gradient}),Sm.default.createElement("div",{style:o.container,ref:function(s){return r.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},Sm.default.createElement("div",{style:o.pointer},this.props.pointer?Sm.default.createElement(this.props.pointer,this.props):Sm.default.createElement("div",{style:o.slider}))))}}]),e}(kB.PureComponent||kB.Component);lx.default=wOe;var ux={};Object.defineProperty(ux,"__esModule",{value:!0});ux.EditableInput=void 0;var MOe=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),TB=Wn,IE=fQ(TB),SOe=qs,EOe=fQ(SOe);function fQ(n){return n&&n.__esModule?n:{default:n}}function OOe(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function BOe(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function IOe(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function kOe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var TOe=1,pQ=38,KOe=40,POe=[pQ,KOe],DOe=function(e){return POe.indexOf(e)>-1},LOe=function(e){return Number(String(e).replace(/%/g,""))},FOe=1,UOe=ux.EditableInput=function(n){kOe(e,n);function e(t){BOe(this,e);var r=IOe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(i){r.setUpdatedValue(i.target.value,i)},r.handleKeyDown=function(i){var o=LOe(i.target.value);if(!isNaN(o)&&DOe(i.keyCode)){var a=r.getArrowOffset(),s=i.keyCode===pQ?o+a:o-a;r.setUpdatedValue(s,i)}},r.handleDrag=function(i){if(r.props.dragLabel){var o=Math.round(r.props.value+i.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),i)}},r.handleMouseDown=function(i){r.props.dragLabel&&(i.preventDefault(),r.handleDrag(i),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},r.inputId="rc-editable-input-"+FOe++,r}return MOe(e,[{key:"componentDidUpdate",value:function(r,i){this.props.value!==this.state.value&&(r.value!==this.props.value||i.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return OOe({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||TOe}},{key:"setUpdatedValue",value:function(r,i){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,i),this.setState({value:r})}},{key:"render",value:function(){var r=this,i=(0,EOe.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return IE.default.createElement("div",{style:i.wrap},IE.default.createElement("input",{id:this.inputId,style:i.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?IE.default.createElement("label",{htmlFor:this.inputId,style:i.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(TB.PureComponent||TB.Component);ux.default=UOe;var Ax={},fk={};Object.defineProperty(fk,"__esModule",{value:!0});fk.calculateChange=function(e,t,r,i){var o=i.clientWidth,a=i.clientHeight,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,d=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,f=s-(i.getBoundingClientRect().left+window.pageXOffset),C=d-(i.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var O=void 0;if(C<0)O=359;else if(C>a)O=0;else{var E=-(C*100/a)+100;O=360*E/100}if(r.h!==O)return{h:O,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var P=void 0;if(f<0)P=0;else if(f>o)P=359;else{var D=f*100/o;P=360*D/100}if(r.h!==P)return{h:P,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null};Object.defineProperty(Ax,"__esModule",{value:!0});Ax.Hue=void 0;var ROe=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),KB=Wn,Ng=mQ(KB),zOe=qs,jOe=mQ(zOe),NOe=fk,WOe=GOe(NOe);function GOe(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function mQ(n){return n&&n.__esModule?n:{default:n}}function $Oe(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function ZD(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function QOe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var YOe=Ax.Hue=function(n){QOe(e,n);function e(){var t,r,i,o;$Oe(this,e);for(var a=arguments.length,s=Array(a),d=0;d<a;d++)s[d]=arguments[d];return o=(r=(i=ZD(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),i),i.handleChange=function(f){var C=WOe.calculateChange(f,i.props.direction,i.props.hsl,i.container);C&&typeof i.props.onChange=="function"&&i.props.onChange(C,f)},i.handleMouseDown=function(f){i.handleChange(f),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},r),ZD(i,o)}return ROe(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,i=this.props.direction,o=i===void 0?"horizontal":i,a=(0,jOe.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return Ng.default.createElement("div",{style:a.hue},Ng.default.createElement("div",{className:"hue-"+o,style:a.container,ref:function(d){return r.container=d},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},Ng.default.createElement("style",null,`
            .hue-horizontal {
              background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
                33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
              background: -webkit-linear-gradient(to right, #f00 0%, #ff0
                17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
            }

            .hue-vertical {
              background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
                #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
              background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
                #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
            }
          `),Ng.default.createElement("div",{style:a.pointer},this.props.pointer?Ng.default.createElement(this.props.pointer,this.props):Ng.default.createElement("div",{style:a.slider}))))}}]),e}(KB.PureComponent||KB.Component);Ax.default=YOe;var cx={};Object.defineProperty(cx,"__esModule",{value:!0});cx.Raised=void 0;var qOe=Wn,kE=uM(qOe),VOe=Lh,Z2=uM(VOe),HOe=qs,ZOe=uM(HOe),XOe=AQ,JOe=uM(XOe);function uM(n){return n&&n.__esModule?n:{default:n}}var pk=cx.Raised=function(e){var t=e.zDepth,r=e.radius,i=e.background,o=e.children,a=e.styles,s=a===void 0?{}:a,d=(0,ZOe.default)((0,JOe.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+t*4+"px rgba(0,0,0,.24)",borderRadius:r,background:i}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":t===1});return kE.default.createElement("div",{style:d.wrap},kE.default.createElement("div",{style:d.bg}),kE.default.createElement("div",{style:d.content},o))};pk.propTypes={background:Z2.default.string,zDepth:Z2.default.oneOf([0,1,2,3,4,5]),radius:Z2.default.number,styles:Z2.default.object};pk.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};cx.default=pk;var dx={},eBe=Uh,tBe=function(){return eBe.Date.now()},nBe=tBe,rBe=/\s/;function iBe(n){for(var e=n.length;e--&&rBe.test(n.charAt(e)););return e}var oBe=iBe,aBe=oBe,sBe=/^\s+/;function lBe(n){return n&&n.slice(0,aBe(n)+1).replace(sBe,"")}var uBe=lBe,ABe=uBe,XD=qd,cBe=oM,JD=NaN,dBe=/^[-+]0x[0-9a-f]+$/i,hBe=/^0b[01]+$/i,fBe=/^0o[0-7]+$/i,pBe=parseInt;function mBe(n){if(typeof n=="number")return n;if(cBe(n))return JD;if(XD(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=XD(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=ABe(n);var t=hBe.test(n);return t||fBe.test(n)?pBe(n.slice(2),t?2:8):dBe.test(n)?JD:+n}var gBe=mBe,yBe=qd,TE=nBe,eL=gBe,vBe="Expected a function",CBe=Math.max,_Be=Math.min;function bBe(n,e,t){var r,i,o,a,s,d,f=0,C=!1,O=!1,E=!0;if(typeof n!="function")throw new TypeError(vBe);e=eL(e)||0,yBe(t)&&(C=!!t.leading,O="maxWait"in t,o=O?CBe(eL(t.maxWait)||0,e):o,E="trailing"in t?!!t.trailing:E);function P(fe){var X=r,oe=i;return r=i=void 0,f=fe,a=n.apply(oe,X),a}function D(fe){return f=fe,s=setTimeout(Q,e),C?P(fe):a}function $(fe){var X=fe-d,oe=fe-f,Ce=e-X;return O?_Be(Ce,o-oe):Ce}function H(fe){var X=fe-d,oe=fe-f;return d===void 0||X>=e||X<0||O&&oe>=o}function Q(){var fe=TE();if(H(fe))return N(fe);s=setTimeout(Q,$(fe))}function N(fe){return s=void 0,E&&r?P(fe):(r=i=void 0,a)}function Z(){s!==void 0&&clearTimeout(s),f=0,r=d=i=s=void 0}function ae(){return s===void 0?a:N(TE())}function pe(){var fe=TE(),X=H(fe);if(r=arguments,i=this,d=fe,X){if(s===void 0)return D(d);if(O)return clearTimeout(s),s=setTimeout(Q,e),P(d)}return s===void 0&&(s=setTimeout(Q,e)),a}return pe.cancel=Z,pe.flush=ae,pe}var gQ=bBe,xBe=gQ,wBe=qd,MBe="Expected a function";function SBe(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(MBe);return wBe(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),xBe(n,e,{leading:r,maxWait:e,trailing:i})}var EBe=SBe,mk={};Object.defineProperty(mk,"__esModule",{value:!0});mk.calculateChange=function(e,t,r){var i=r.getBoundingClientRect(),o=i.width,a=i.height,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,d=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,f=s-(r.getBoundingClientRect().left+window.pageXOffset),C=d-(r.getBoundingClientRect().top+window.pageYOffset);f<0?f=0:f>o&&(f=o),C<0?C=0:C>a&&(C=a);var O=f/o,E=1-C/a;return{h:t.h,s:O,v:E,a:t.a,source:"hsv"}};Object.defineProperty(dx,"__esModule",{value:!0});dx.Saturation=void 0;var OBe=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),PB=Wn,Y0=gk(PB),BBe=qs,IBe=gk(BBe),kBe=EBe,TBe=gk(kBe),KBe=mk,PBe=DBe(KBe);function DBe(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function gk(n){return n&&n.__esModule?n:{default:n}}function LBe(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function FBe(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function UBe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var RBe=dx.Saturation=function(n){UBe(e,n);function e(t){LBe(this,e);var r=FBe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.handleChange=function(i){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,PBe.calculateChange(i,r.props.hsl,r.container),i)},r.handleMouseDown=function(i){r.handleChange(i);var o=r.getContainerRenderWindow();o.addEventListener("mousemove",r.handleChange),o.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=(0,TBe.default)(function(i,o,a){i(o,a)},50),r}return OBe(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,i=window;!i.document.contains(r)&&i.parent!==i;)i=i.parent;return i}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,i=this.props.style||{},o=i.color,a=i.white,s=i.black,d=i.pointer,f=i.circle,C=(0,IBe.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
            0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:o,white:a,black:s,pointer:d,circle:f}},{custom:!!this.props.style});return Y0.default.createElement("div",{style:C.color,ref:function(E){return r.container=E},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},Y0.default.createElement("style",null,`
          .saturation-white {
            background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
            background: linear-gradient(to right, #fff, rgba(255,255,255,0));
          }
          .saturation-black {
            background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
            background: linear-gradient(to top, #000, rgba(0,0,0,0));
          }
        `),Y0.default.createElement("div",{style:C.white,className:"saturation-white"},Y0.default.createElement("div",{style:C.black,className:"saturation-black"}),Y0.default.createElement("div",{style:C.pointer},this.props.pointer?Y0.default.createElement(this.props.pointer,this.props):Y0.default.createElement("div",{style:C.circle}))))}}]),e}(PB.PureComponent||PB.Component);dx.default=RBe;var hx={},zA={},zBe=q$,jBe=Y$,NBe=E$,WBe=sd;function GBe(n,e){var t=WBe(n)?zBe:jBe;return t(n,NBe(e))}var $Be=GBe,QBe=$Be,yQ={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Vf,function(){function t(ke){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ge){return typeof ge}:function(ge){return ge&&typeof Symbol=="function"&&ge.constructor===Symbol&&ge!==Symbol.prototype?"symbol":typeof ge},t(ke)}var r=/^\s+/,i=/\s+$/;function o(ke,ge){if(ke=ke||"",ge=ge||{},ke instanceof o)return ke;if(!(this instanceof o))return new o(ke,ge);var Se=a(ke);this._originalInput=ke,this._r=Se.r,this._g=Se.g,this._b=Se.b,this._a=Se.a,this._roundA=Math.round(100*this._a)/100,this._format=ge.format||Se.format,this._gradientType=ge.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=Se.ok}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ge=this.toRgb();return(ge.r*299+ge.g*587+ge.b*114)/1e3},getLuminance:function(){var ge=this.toRgb(),Se,ze,it,ot,St,Rt;return Se=ge.r/255,ze=ge.g/255,it=ge.b/255,Se<=.03928?ot=Se/12.92:ot=Math.pow((Se+.055)/1.055,2.4),ze<=.03928?St=ze/12.92:St=Math.pow((ze+.055)/1.055,2.4),it<=.03928?Rt=it/12.92:Rt=Math.pow((it+.055)/1.055,2.4),.2126*ot+.7152*St+.0722*Rt},setAlpha:function(ge){return this._a=$e(ge),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var ge=C(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,v:ge.v,a:this._a}},toHsvString:function(){var ge=C(this._r,this._g,this._b),Se=Math.round(ge.h*360),ze=Math.round(ge.s*100),it=Math.round(ge.v*100);return this._a==1?"hsv("+Se+", "+ze+"%, "+it+"%)":"hsva("+Se+", "+ze+"%, "+it+"%, "+this._roundA+")"},toHsl:function(){var ge=d(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,l:ge.l,a:this._a}},toHslString:function(){var ge=d(this._r,this._g,this._b),Se=Math.round(ge.h*360),ze=Math.round(ge.s*100),it=Math.round(ge.l*100);return this._a==1?"hsl("+Se+", "+ze+"%, "+it+"%)":"hsla("+Se+", "+ze+"%, "+it+"%, "+this._roundA+")"},toHex:function(ge){return E(this._r,this._g,this._b,ge)},toHexString:function(ge){return"#"+this.toHex(ge)},toHex8:function(ge){return P(this._r,this._g,this._b,this._a,ge)},toHex8String:function(ge){return"#"+this.toHex8(ge)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ye(this._r,255)*100)+"%",g:Math.round(ye(this._g,255)*100)+"%",b:Math.round(ye(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ye(this._r,255)*100)+"%, "+Math.round(ye(this._g,255)*100)+"%, "+Math.round(ye(this._b,255)*100)+"%)":"rgba("+Math.round(ye(this._r,255)*100)+"%, "+Math.round(ye(this._g,255)*100)+"%, "+Math.round(ye(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Pe[E(this._r,this._g,this._b,!0)]||!1},toFilter:function(ge){var Se="#"+D(this._r,this._g,this._b,this._a),ze=Se,it=this._gradientType?"GradientType = 1, ":"";if(ge){var ot=o(ge);ze="#"+D(ot._r,ot._g,ot._b,ot._a)}return"progid:DXImageTransform.Microsoft.gradient("+it+"startColorstr="+Se+",endColorstr="+ze+")"},toString:function(ge){var Se=!!ge;ge=ge||this._format;var ze=!1,it=this._a<1&&this._a>=0,ot=!Se&&it&&(ge==="hex"||ge==="hex6"||ge==="hex3"||ge==="hex4"||ge==="hex8"||ge==="name");return ot?ge==="name"&&this._a===0?this.toName():this.toRgbString():(ge==="rgb"&&(ze=this.toRgbString()),ge==="prgb"&&(ze=this.toPercentageRgbString()),(ge==="hex"||ge==="hex6")&&(ze=this.toHexString()),ge==="hex3"&&(ze=this.toHexString(!0)),ge==="hex4"&&(ze=this.toHex8String(!0)),ge==="hex8"&&(ze=this.toHex8String()),ge==="name"&&(ze=this.toName()),ge==="hsl"&&(ze=this.toHslString()),ge==="hsv"&&(ze=this.toHsvString()),ze||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(ge,Se){var ze=ge.apply(null,[this].concat([].slice.call(Se)));return this._r=ze._r,this._g=ze._g,this._b=ze._b,this.setAlpha(ze._a),this},lighten:function(){return this._applyModification(N,arguments)},brighten:function(){return this._applyModification(Z,arguments)},darken:function(){return this._applyModification(ae,arguments)},desaturate:function(){return this._applyModification($,arguments)},saturate:function(){return this._applyModification(H,arguments)},greyscale:function(){return this._applyModification(Q,arguments)},spin:function(){return this._applyModification(pe,arguments)},_applyCombination:function(ge,Se){return ge.apply(null,[this].concat([].slice.call(Se)))},analogous:function(){return this._applyCombination(Ce,arguments)},complement:function(){return this._applyCombination(fe,arguments)},monochromatic:function(){return this._applyCombination(we,arguments)},splitcomplement:function(){return this._applyCombination(oe,arguments)},triad:function(){return this._applyCombination(X,[3])},tetrad:function(){return this._applyCombination(X,[4])}},o.fromRatio=function(ke,ge){if(t(ke)=="object"){var Se={};for(var ze in ke)ke.hasOwnProperty(ze)&&(ze==="a"?Se[ze]=ke[ze]:Se[ze]=Ve(ke[ze]));ke=Se}return o(ke,ge)};function a(ke){var ge={r:0,g:0,b:0},Se=1,ze=null,it=null,ot=null,St=!1,Rt=!1;return typeof ke=="string"&&(ke=Qt(ke)),t(ke)=="object"&&(bt(ke.r)&&bt(ke.g)&&bt(ke.b)?(ge=s(ke.r,ke.g,ke.b),St=!0,Rt=String(ke.r).substr(-1)==="%"?"prgb":"rgb"):bt(ke.h)&&bt(ke.s)&&bt(ke.v)?(ze=Ve(ke.s),it=Ve(ke.v),ge=O(ke.h,ze,it),St=!0,Rt="hsv"):bt(ke.h)&&bt(ke.s)&&bt(ke.l)&&(ze=Ve(ke.s),ot=Ve(ke.l),ge=f(ke.h,ze,ot),St=!0,Rt="hsl"),ke.hasOwnProperty("a")&&(Se=ke.a)),Se=$e(Se),{ok:St,format:ke.format||Rt,r:Math.min(255,Math.max(ge.r,0)),g:Math.min(255,Math.max(ge.g,0)),b:Math.min(255,Math.max(ge.b,0)),a:Se}}function s(ke,ge,Se){return{r:ye(ke,255)*255,g:ye(ge,255)*255,b:ye(Se,255)*255}}function d(ke,ge,Se){ke=ye(ke,255),ge=ye(ge,255),Se=ye(Se,255);var ze=Math.max(ke,ge,Se),it=Math.min(ke,ge,Se),ot,St,Rt=(ze+it)/2;if(ze==it)ot=St=0;else{var zt=ze-it;switch(St=Rt>.5?zt/(2-ze-it):zt/(ze+it),ze){case ke:ot=(ge-Se)/zt+(ge<Se?6:0);break;case ge:ot=(Se-ke)/zt+2;break;case Se:ot=(ke-ge)/zt+4;break}ot/=6}return{h:ot,s:St,l:Rt}}function f(ke,ge,Se){var ze,it,ot;ke=ye(ke,360),ge=ye(ge,100),Se=ye(Se,100);function St(mt,or,gn){return gn<0&&(gn+=1),gn>1&&(gn-=1),gn<1/6?mt+(or-mt)*6*gn:gn<1/2?or:gn<2/3?mt+(or-mt)*(2/3-gn)*6:mt}if(ge===0)ze=it=ot=Se;else{var Rt=Se<.5?Se*(1+ge):Se+ge-Se*ge,zt=2*Se-Rt;ze=St(zt,Rt,ke+1/3),it=St(zt,Rt,ke),ot=St(zt,Rt,ke-1/3)}return{r:ze*255,g:it*255,b:ot*255}}function C(ke,ge,Se){ke=ye(ke,255),ge=ye(ge,255),Se=ye(Se,255);var ze=Math.max(ke,ge,Se),it=Math.min(ke,ge,Se),ot,St,Rt=ze,zt=ze-it;if(St=ze===0?0:zt/ze,ze==it)ot=0;else{switch(ze){case ke:ot=(ge-Se)/zt+(ge<Se?6:0);break;case ge:ot=(Se-ke)/zt+2;break;case Se:ot=(ke-ge)/zt+4;break}ot/=6}return{h:ot,s:St,v:Rt}}function O(ke,ge,Se){ke=ye(ke,360)*6,ge=ye(ge,100),Se=ye(Se,100);var ze=Math.floor(ke),it=ke-ze,ot=Se*(1-ge),St=Se*(1-it*ge),Rt=Se*(1-(1-it)*ge),zt=ze%6,mt=[Se,St,ot,ot,Rt,Se][zt],or=[Rt,Se,Se,St,ot,ot][zt],gn=[ot,ot,Rt,Se,Se,St][zt];return{r:mt*255,g:or*255,b:gn*255}}function E(ke,ge,Se,ze){var it=[Re(Math.round(ke).toString(16)),Re(Math.round(ge).toString(16)),Re(Math.round(Se).toString(16))];return ze&&it[0].charAt(0)==it[0].charAt(1)&&it[1].charAt(0)==it[1].charAt(1)&&it[2].charAt(0)==it[2].charAt(1)?it[0].charAt(0)+it[1].charAt(0)+it[2].charAt(0):it.join("")}function P(ke,ge,Se,ze,it){var ot=[Re(Math.round(ke).toString(16)),Re(Math.round(ge).toString(16)),Re(Math.round(Se).toString(16)),Re(Xe(ze))];return it&&ot[0].charAt(0)==ot[0].charAt(1)&&ot[1].charAt(0)==ot[1].charAt(1)&&ot[2].charAt(0)==ot[2].charAt(1)&&ot[3].charAt(0)==ot[3].charAt(1)?ot[0].charAt(0)+ot[1].charAt(0)+ot[2].charAt(0)+ot[3].charAt(0):ot.join("")}function D(ke,ge,Se,ze){var it=[Re(Xe(ze)),Re(Math.round(ke).toString(16)),Re(Math.round(ge).toString(16)),Re(Math.round(Se).toString(16))];return it.join("")}o.equals=function(ke,ge){return!ke||!ge?!1:o(ke).toRgbString()==o(ge).toRgbString()},o.random=function(){return o.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function $(ke,ge){ge=ge===0?0:ge||10;var Se=o(ke).toHsl();return Se.s-=ge/100,Se.s=gt(Se.s),o(Se)}function H(ke,ge){ge=ge===0?0:ge||10;var Se=o(ke).toHsl();return Se.s+=ge/100,Se.s=gt(Se.s),o(Se)}function Q(ke){return o(ke).desaturate(100)}function N(ke,ge){ge=ge===0?0:ge||10;var Se=o(ke).toHsl();return Se.l+=ge/100,Se.l=gt(Se.l),o(Se)}function Z(ke,ge){ge=ge===0?0:ge||10;var Se=o(ke).toRgb();return Se.r=Math.max(0,Math.min(255,Se.r-Math.round(255*-(ge/100)))),Se.g=Math.max(0,Math.min(255,Se.g-Math.round(255*-(ge/100)))),Se.b=Math.max(0,Math.min(255,Se.b-Math.round(255*-(ge/100)))),o(Se)}function ae(ke,ge){ge=ge===0?0:ge||10;var Se=o(ke).toHsl();return Se.l-=ge/100,Se.l=gt(Se.l),o(Se)}function pe(ke,ge){var Se=o(ke).toHsl(),ze=(Se.h+ge)%360;return Se.h=ze<0?360+ze:ze,o(Se)}function fe(ke){var ge=o(ke).toHsl();return ge.h=(ge.h+180)%360,o(ge)}function X(ke,ge){if(isNaN(ge)||ge<=0)throw new Error("Argument to polyad must be a positive number");for(var Se=o(ke).toHsl(),ze=[o(ke)],it=360/ge,ot=1;ot<ge;ot++)ze.push(o({h:(Se.h+ot*it)%360,s:Se.s,l:Se.l}));return ze}function oe(ke){var ge=o(ke).toHsl(),Se=ge.h;return[o(ke),o({h:(Se+72)%360,s:ge.s,l:ge.l}),o({h:(Se+216)%360,s:ge.s,l:ge.l})]}function Ce(ke,ge,Se){ge=ge||6,Se=Se||30;var ze=o(ke).toHsl(),it=360/Se,ot=[o(ke)];for(ze.h=(ze.h-(it*ge>>1)+720)%360;--ge;)ze.h=(ze.h+it)%360,ot.push(o(ze));return ot}function we(ke,ge){ge=ge||6;for(var Se=o(ke).toHsv(),ze=Se.h,it=Se.s,ot=Se.v,St=[],Rt=1/ge;ge--;)St.push(o({h:ze,s:it,v:ot})),ot=(ot+Rt)%1;return St}o.mix=function(ke,ge,Se){Se=Se===0?0:Se||50;var ze=o(ke).toRgb(),it=o(ge).toRgb(),ot=Se/100,St={r:(it.r-ze.r)*ot+ze.r,g:(it.g-ze.g)*ot+ze.g,b:(it.b-ze.b)*ot+ze.b,a:(it.a-ze.a)*ot+ze.a};return o(St)},o.readability=function(ke,ge){var Se=o(ke),ze=o(ge);return(Math.max(Se.getLuminance(),ze.getLuminance())+.05)/(Math.min(Se.getLuminance(),ze.getLuminance())+.05)},o.isReadable=function(ke,ge,Se){var ze=o.readability(ke,ge),it,ot;switch(ot=!1,it=Yt(Se),it.level+it.size){case"AAsmall":case"AAAlarge":ot=ze>=4.5;break;case"AAlarge":ot=ze>=3;break;case"AAAsmall":ot=ze>=7;break}return ot},o.mostReadable=function(ke,ge,Se){var ze=null,it=0,ot,St,Rt,zt;Se=Se||{},St=Se.includeFallbackColors,Rt=Se.level,zt=Se.size;for(var mt=0;mt<ge.length;mt++)ot=o.readability(ke,ge[mt]),ot>it&&(it=ot,ze=o(ge[mt]));return o.isReadable(ke,ze,{level:Rt,size:zt})||!St?ze:(Se.includeFallbackColors=!1,o.mostReadable(ke,["#fff","#000"],Se))};var Te=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Pe=o.hexNames=he(Te);function he(ke){var ge={};for(var Se in ke)ke.hasOwnProperty(Se)&&(ge[ke[Se]]=Se);return ge}function $e(ke){return ke=parseFloat(ke),(isNaN(ke)||ke<0||ke>1)&&(ke=1),ke}function ye(ke,ge){st(ke)&&(ke="100%");var Se=ft(ke);return ke=Math.min(ge,Math.max(0,parseFloat(ke))),Se&&(ke=parseInt(ke*ge,10)/100),Math.abs(ke-ge)<1e-6?1:ke%ge/parseFloat(ge)}function gt(ke){return Math.min(1,Math.max(0,ke))}function yt(ke){return parseInt(ke,16)}function st(ke){return typeof ke=="string"&&ke.indexOf(".")!=-1&&parseFloat(ke)===1}function ft(ke){return typeof ke=="string"&&ke.indexOf("%")!=-1}function Re(ke){return ke.length==1?"0"+ke:""+ke}function Ve(ke){return ke<=1&&(ke=ke*100+"%"),ke}function Xe(ke){return Math.round(parseFloat(ke)*255).toString(16)}function Jt(ke){return yt(ke)/255}var Ht=function(){var ke="[-\\+]?\\d+%?",ge="[-\\+]?\\d*\\.\\d+%?",Se="(?:"+ge+")|(?:"+ke+")",ze="[\\s|\\(]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")\\s*\\)?",it="[\\s|\\(]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")\\s*\\)?";return{CSS_UNIT:new RegExp(Se),rgb:new RegExp("rgb"+ze),rgba:new RegExp("rgba"+it),hsl:new RegExp("hsl"+ze),hsla:new RegExp("hsla"+it),hsv:new RegExp("hsv"+ze),hsva:new RegExp("hsva"+it),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function bt(ke){return!!Ht.CSS_UNIT.exec(ke)}function Qt(ke){ke=ke.replace(r,"").replace(i,"").toLowerCase();var ge=!1;if(Te[ke])ke=Te[ke],ge=!0;else if(ke=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Se;return(Se=Ht.rgb.exec(ke))?{r:Se[1],g:Se[2],b:Se[3]}:(Se=Ht.rgba.exec(ke))?{r:Se[1],g:Se[2],b:Se[3],a:Se[4]}:(Se=Ht.hsl.exec(ke))?{h:Se[1],s:Se[2],l:Se[3]}:(Se=Ht.hsla.exec(ke))?{h:Se[1],s:Se[2],l:Se[3],a:Se[4]}:(Se=Ht.hsv.exec(ke))?{h:Se[1],s:Se[2],v:Se[3]}:(Se=Ht.hsva.exec(ke))?{h:Se[1],s:Se[2],v:Se[3],a:Se[4]}:(Se=Ht.hex8.exec(ke))?{r:yt(Se[1]),g:yt(Se[2]),b:yt(Se[3]),a:Jt(Se[4]),format:ge?"name":"hex8"}:(Se=Ht.hex6.exec(ke))?{r:yt(Se[1]),g:yt(Se[2]),b:yt(Se[3]),format:ge?"name":"hex"}:(Se=Ht.hex4.exec(ke))?{r:yt(Se[1]+""+Se[1]),g:yt(Se[2]+""+Se[2]),b:yt(Se[3]+""+Se[3]),a:Jt(Se[4]+""+Se[4]),format:ge?"name":"hex8"}:(Se=Ht.hex3.exec(ke))?{r:yt(Se[1]+""+Se[1]),g:yt(Se[2]+""+Se[2]),b:yt(Se[3]+""+Se[3]),format:ge?"name":"hex"}:!1}function Yt(ke){var ge,Se;return ke=ke||{level:"AA",size:"small"},ge=(ke.level||"AA").toUpperCase(),Se=(ke.size||"small").toLowerCase(),ge!=="AA"&&ge!=="AAA"&&(ge="AA"),Se!=="small"&&Se!=="large"&&(Se="small"),{level:ge,size:Se}}return o})})(yQ);var YBe=yQ.exports;Object.defineProperty(zA,"__esModule",{value:!0});zA.isvalidColorString=zA.red=zA.getContrastingColor=zA.isValidHex=zA.toState=zA.simpleCheckForValidColor=void 0;var qBe=QBe,VBe=vQ(qBe),HBe=YBe,m5=vQ(HBe);function vQ(n){return n&&n.__esModule?n:{default:n}}zA.simpleCheckForValidColor=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,i=0;return(0,VBe.default)(t,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(i+=1),o==="s"||o==="l")){var a=/^\d+%$/;a.test(e[o])&&(i+=1)}}),r===i?e:!1};var ZBe=zA.toState=function(e,t){var r=e.hex?(0,m5.default)(e.hex):(0,m5.default)(e),i=r.toHsl(),o=r.toHsv(),a=r.toRgb(),s=r.toHex();i.s===0&&(i.h=t||0,o.h=t||0);var d=s==="000000"&&a.a===0;return{hsl:i,hex:d?"transparent":"#"+s,rgb:a,hsv:o,oldHue:e.h||t||i.h,source:e.source}};zA.isValidHex=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&(0,m5.default)(e).isValid()};zA.getContrastingColor=function(e){if(!e)return"#fff";var t=ZBe(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"};zA.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};zA.isvalidColorString=function(e,t){var r=e.replace("°","");return(0,m5.default)(t+" ("+r+")")._ok};Object.defineProperty(hx,"__esModule",{value:!0});hx.ColorWrap=void 0;var NC=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},XBe=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),DB=Wn,JBe=CQ(DB),e7e=gQ,t7e=CQ(e7e),n7e=zA,Wg=r7e(n7e);function r7e(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function CQ(n){return n&&n.__esModule?n:{default:n}}function i7e(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function o7e(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function a7e(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var s7e=hx.ColorWrap=function(e){var t=function(r){a7e(i,r);function i(o){i7e(this,i);var a=o7e(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return a.handleChange=function(s,d){var f=Wg.simpleCheckForValidColor(s);if(f){var C=Wg.toState(s,s.h||a.state.oldHue);a.setState(C),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,C,d),a.props.onChange&&a.props.onChange(C,d)}},a.handleSwatchHover=function(s,d){var f=Wg.simpleCheckForValidColor(s);if(f){var C=Wg.toState(s,s.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(C,d)}},a.state=NC({},Wg.toState(o.color,0)),a.debounce=(0,t7e.default)(function(s,d,f){s(d,f)},100),a}return XBe(i,[{key:"render",value:function(){var a={};return this.props.onSwatchHover&&(a.onSwatchHover=this.handleSwatchHover),JBe.default.createElement(e,NC({},this.props,this.state,{onChange:this.handleChange},a))}}],[{key:"getDerivedStateFromProps",value:function(a,s){return NC({},Wg.toState(a.color,s.oldHue))}}]),i}(DB.PureComponent||DB.Component);return t.propTypes=NC({},e.propTypes),t.defaultProps=NC({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};hx.default=s7e;var fx={},AM={};Object.defineProperty(AM,"__esModule",{value:!0});AM.handleFocus=void 0;var l7e=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},u7e=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),A7e=Wn,KE=c7e(A7e);function c7e(n){return n&&n.__esModule?n:{default:n}}function d7e(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function tL(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function h7e(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}AM.handleFocus=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){h7e(i,r);function i(){var o,a,s,d;d7e(this,i);for(var f=arguments.length,C=Array(f),O=0;O<f;O++)C[O]=arguments[O];return d=(a=(s=tL(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(C))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},a),tL(s,d)}return u7e(i,[{key:"render",value:function(){return KE.default.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},KE.default.createElement(e,l7e({},this.props,this.state)))}}]),i}(KE.default.Component)};Object.defineProperty(fx,"__esModule",{value:!0});fx.Swatch=void 0;var nL=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},f7e=Wn,rL=yk(f7e),p7e=qs,m7e=yk(p7e),g7e=AM,y7e=X1,v7e=yk(y7e);function yk(n){return n&&n.__esModule?n:{default:n}}var C7e=13,_7e=fx.Swatch=function(e){var t=e.color,r=e.style,i=e.onClick,o=i===void 0?function(){}:i,a=e.onHover,s=e.title,d=s===void 0?t:s,f=e.children,C=e.focus,O=e.focusStyle,E=O===void 0?{}:O,P=t==="transparent",D=(0,m7e.default)({default:{swatch:nL({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,C?E:{})}}),$=function(ae){return o(t,ae)},H=function(ae){return ae.keyCode===C7e&&o(t,ae)},Q=function(ae){return a(t,ae)},N={};return a&&(N.onMouseOver=Q),rL.default.createElement("div",nL({style:D.swatch,onClick:$,title:d,tabIndex:0,onKeyDown:H},N),f,P&&rL.default.createElement(v7e.default,{borderRadius:D.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};fx.default=(0,g7e.handleFocus)(_7e);(function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=lx;Object.defineProperty(n,"Alpha",{enumerable:!0,get:function(){return f(e).default}});var t=X1;Object.defineProperty(n,"Checkboard",{enumerable:!0,get:function(){return f(t).default}});var r=ux;Object.defineProperty(n,"EditableInput",{enumerable:!0,get:function(){return f(r).default}});var i=Ax;Object.defineProperty(n,"Hue",{enumerable:!0,get:function(){return f(i).default}});var o=cx;Object.defineProperty(n,"Raised",{enumerable:!0,get:function(){return f(o).default}});var a=dx;Object.defineProperty(n,"Saturation",{enumerable:!0,get:function(){return f(a).default}});var s=hx;Object.defineProperty(n,"ColorWrap",{enumerable:!0,get:function(){return f(s).default}});var d=fx;Object.defineProperty(n,"Swatch",{enumerable:!0,get:function(){return f(d).default}});function f(C){return C&&C.__esModule?C:{default:C}}})(ck);var px={};function b7e(n){return n===void 0}var x7e=b7e,vk={};Object.defineProperty(vk,"__esModule",{value:!0});var iL=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},w7e=Wn,oL=M7e(w7e);function M7e(n){return n&&n.__esModule?n:{default:n}}function S7e(n,e){var t={};for(var r in n)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var X2=24;vk.default=function(n){var e=n.fill,t=e===void 0?"currentColor":e,r=n.width,i=r===void 0?X2:r,o=n.height,a=o===void 0?X2:o,s=n.style,d=s===void 0?{}:s,f=S7e(n,["fill","width","height","style"]);return oL.default.createElement("svg",iL({viewBox:"0 0 "+X2+" "+X2,style:iL({fill:t,width:i,height:a},d)},f),oL.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))};Object.defineProperty(px,"__esModule",{value:!0});px.ChromeFields=void 0;var E7e=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),O7e=Wn,Xa=cM(O7e),B7e=qs,I7e=cM(B7e),k7e=zA,T7e=L7e(k7e),K7e=x7e,aL=cM(K7e),Ep=ck,P7e=vk,D7e=cM(P7e);function L7e(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function cM(n){return n&&n.__esModule?n:{default:n}}function F7e(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function U7e(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function R7e(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var _Q=px.ChromeFields=function(n){R7e(e,n);function e(t){F7e(this,e);var r=U7e(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(i,o){i.hex?T7e.isValidHex(i.hex)&&r.props.onChange({hex:i.hex,source:"hex"},o):i.r||i.g||i.b?r.props.onChange({r:i.r||r.props.rgb.r,g:i.g||r.props.rgb.g,b:i.b||r.props.rgb.b,source:"rgb"},o):i.a?(i.a<0?i.a=0:i.a>1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},o)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number((0,aL.default)(i.s)?r.props.hsl.s:i.s),l:Number((0,aL.default)(i.l)?r.props.hsl.l:i.l),source:"hsl"},o))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return E7e(e,[{key:"render",value:function(){var r=this,i=(0,I7e.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=Xa.default.createElement("div",{style:i.fields,className:"flexbox-fix"},Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=Xa.default.createElement("div",{style:i.fields,className:"flexbox-fix"},Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),Xa.default.createElement("div",{style:i.alpha},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=Xa.default.createElement("div",{style:i.fields,className:"flexbox-fix"},Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),Xa.default.createElement("div",{style:i.field},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),Xa.default.createElement("div",{style:i.alpha},Xa.default.createElement(Ep.EditableInput,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),Xa.default.createElement("div",{style:i.wrap,className:"flexbox-fix"},o,Xa.default.createElement("div",{style:i.toggle},Xa.default.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(s){return r.icon=s}},Xa.default.createElement(D7e.default,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(Xa.default.Component);_Q.defaultProps={view:"hex"};px.default=_Q;var mx={};Object.defineProperty(mx,"__esModule",{value:!0});mx.ChromePointer=void 0;var z7e=Wn,j7e=bQ(z7e),N7e=qs,W7e=bQ(N7e);function bQ(n){return n&&n.__esModule?n:{default:n}}var G7e=mx.ChromePointer=function(){var e=(0,W7e.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return j7e.default.createElement("div",{style:e.picker})};mx.default=G7e;var gx={};Object.defineProperty(gx,"__esModule",{value:!0});gx.ChromePointerCircle=void 0;var $7e=Wn,Q7e=xQ($7e),Y7e=qs,q7e=xQ(Y7e);function xQ(n){return n&&n.__esModule?n:{default:n}}var V7e=gx.ChromePointerCircle=function(){var e=(0,q7e.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return Q7e.default.createElement("div",{style:e.picker})};gx.default=V7e;Object.defineProperty(Hw,"__esModule",{value:!0});Hw.Chrome=void 0;var H7e=Wn,UA=J1(H7e),Z7e=Lh,Gg=J1(Z7e),X7e=qs,J7e=J1(X7e),e8e=AQ,t8e=J1(e8e),s_=ck,n8e=px,r8e=J1(n8e),i8e=mx,sL=J1(i8e),o8e=gx,a8e=J1(o8e);function J1(n){return n&&n.__esModule?n:{default:n}}var Ck=Hw.Chrome=function(e){var t=e.width,r=e.onChange,i=e.disableAlpha,o=e.rgb,a=e.hsl,s=e.hsv,d=e.hex,f=e.renderers,C=e.styles,O=C===void 0?{}:C,E=e.className,P=E===void 0?"":E,D=e.defaultView,$=(0,J7e.default)((0,t8e.default)({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},O),{disableAlpha:i});return UA.default.createElement("div",{style:$.picker,className:"chrome-picker "+P},UA.default.createElement("div",{style:$.saturation},UA.default.createElement(s_.Saturation,{style:$.Saturation,hsl:a,hsv:s,pointer:a8e.default,onChange:r})),UA.default.createElement("div",{style:$.body},UA.default.createElement("div",{style:$.controls,className:"flexbox-fix"},UA.default.createElement("div",{style:$.color},UA.default.createElement("div",{style:$.swatch},UA.default.createElement("div",{style:$.active}),UA.default.createElement(s_.Checkboard,{renderers:f}))),UA.default.createElement("div",{style:$.toggles},UA.default.createElement("div",{style:$.hue},UA.default.createElement(s_.Hue,{style:$.Hue,hsl:a,pointer:sL.default,onChange:r})),UA.default.createElement("div",{style:$.alpha},UA.default.createElement(s_.Alpha,{style:$.Alpha,rgb:o,hsl:a,pointer:sL.default,renderers:f,onChange:r})))),UA.default.createElement(r8e.default,{rgb:o,hsl:a,hex:d,view:D,onChange:r,disableAlpha:i})))};Ck.propTypes={width:Gg.default.oneOfType([Gg.default.string,Gg.default.number]),disableAlpha:Gg.default.bool,styles:Gg.default.object,defaultView:Gg.default.oneOf(["hex","rgb","hsl"])};Ck.defaultProps={width:225,disableAlpha:!1,styles:{}};var s8e=Hw.default=(0,s_.ColorWrap)(Ck);function wi(){var n="/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",e="cb6d03ea084207ffce2f89af246bc26074c13af7",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:23}},1:{start:{line:8,column:2},end:{line:8,column:56}},2:{start:{line:11,column:10},end:{line:13,column:3}},3:{start:{line:14,column:15},end:{line:14,column:19}},4:{start:{line:16,column:4},end:{line:16,column:17}},5:{start:{line:17,column:4},end:{line:17,column:75}},6:{start:{line:20,column:4},end:{line:20,column:27}},7:{start:{line:25,column:21},end:{line:39,column:3}},8:{start:{line:26,column:17},end:{line:26,column:32}},9:{start:{line:27,column:4},end:{line:38,column:5}},10:{start:{line:28,column:18},end:{line:28,column:46}},11:{start:{line:29,column:6},end:{line:32,column:8}},12:{start:{line:34,column:6},end:{line:37,column:8}},13:{start:{line:40,column:17},end:{line:42,column:3}},14:{start:{line:41,column:4},end:{line:41,column:62}},15:{start:{line:44,column:4},end:{line:49,column:5}},16:{start:{line:45,column:6},end:{line:45,column:43}},17:{start:{line:47,column:6},end:{line:47,column:49}},18:{start:{line:48,column:6},end:{line:48,column:39}},19:{start:{line:52,column:4},end:{line:52,column:47}},20:{start:{line:55,column:19},end:{line:55,column:42}},21:{start:{line:56,column:25},end:{line:56,column:44}},22:{start:{line:57,column:31},end:{line:63,column:5}},23:{start:{line:64,column:35},end:{line:99,column:5}},24:{start:{line:79,column:31},end:{line:79,column:67}},25:{start:{line:100,column:24},end:{line:102,column:5}},26:{start:{line:103,column:4},end:{line:122,column:9}},27:{start:{line:113,column:26},end:{line:113,column:49}},28:{start:{line:119,column:27},end:{line:119,column:56}}},fnMap:{0:{name:"formatColor",decl:{start:{line:6,column:9},end:{line:6,column:20}},loc:{start:{line:6,column:28},end:{line:9,column:1}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:21},end:{line:18,column:3}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:21},end:{line:21,column:3}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:25,column:21},end:{line:25,column:22}},loc:{start:{line:25,column:27},end:{line:39,column:3}},line:25},4:{name:"(anonymous_4)",decl:{start:{line:40,column:17},end:{line:40,column:18}},loc:{start:{line:40,column:23},end:{line:42,column:3}},line:40},5:{name:"(anonymous_5)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:14},end:{line:50,column:3}},line:43},6:{name:"(anonymous_6)",decl:{start:{line:51,column:2},end:{line:51,column:3}},loc:{start:{line:51,column:14},end:{line:53,column:3}},line:51},7:{name:"(anonymous_7)",decl:{start:{line:54,column:2},end:{line:54,column:3}},loc:{start:{line:54,column:11},end:{line:123,column:3}},line:54},8:{name:"(anonymous_8)",decl:{start:{line:79,column:24},end:{line:79,column:25}},loc:{start:{line:79,column:31},end:{line:79,column:67}},line:79},9:{name:"(anonymous_9)",decl:{start:{line:113,column:15},end:{line:113,column:16}},loc:{start:{line:113,column:26},end:{line:113,column:49}},line:113},10:{name:"(anonymous_10)",decl:{start:{line:119,column:20},end:{line:119,column:21}},loc:{start:{line:119,column:27},end:{line:119,column:56}},line:119}},branchMap:{0:{loc:{start:{line:27,column:4},end:{line:38,column:5}},type:"if",locations:[{start:{line:27,column:4},end:{line:38,column:5}},{start:{line:33,column:11},end:{line:38,column:5}}],line:27},1:{loc:{start:{line:52,column:24},end:{line:52,column:45}},type:"cond-expr",locations:[{start:{line:52,column:35},end:{line:52,column:41}},{start:{line:52,column:44},end:{line:52,column:45}}],line:52},2:{loc:{start:{line:104,column:6},end:{line:104,column:39}},type:"binary-expr",locations:[{start:{line:104,column:6},end:{line:104,column:29}},{start:{line:104,column:33},end:{line:104,column:39}}],line:104},3:{loc:{start:{line:118,column:17},end:{line:118,column:57}},type:"cond-expr",locations:[{start:{line:118,column:36},end:{line:118,column:52}},{start:{line:118,column:55},end:{line:118,column:57}}],line:118}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx"],names:[],mappings:"AAsFmB,SAQb,KARa;AAtFnB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,kBAAkB;AAEzB,OAAO,YAAY;AAEnB,SAAS,YAAY,OAA4B;AAC/C,QAAM,MAAM,MAAM;AAClB,SAAO,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC;AACpD;AAaA,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,QAAQ;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA,aAAsC;AAAA,EAEtC,YAAa,OAAwB;AACnC,UAAM,KAAK;AACX,SAAK,kBAAkB,OAAO,SAAS,KAAK,iBAAiB,MAAK,EAAE;AAAA,EACtE;AAAA,EAEA,gBAAgB,GAAW;AACzB,SAAK,MAAM,SAAS,CAAC;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,mBAAmB,MAAM;AACvB,UAAM,OAAO,KAAK;AAClB,QAAG,MAAM;AACP,YAAM,MAAM,KAAK,sBAAsB;AACvC,aAAO;AAAA,QACL,KAAK,IAAI;AAAA,QACT,MAAM,IAAI,OAAO;AAAA,MACnB;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe,MAAM;AACnB,SAAK,SAAS,EAAE,cAAc,CAAC,KAAK,MAAM,aAAa,CAAC;AAAA,EAC1D;AAAA,EAEA,IAAI,QAAQ;AAEV,QAAI;AACF,aAAO,MAAM,KAAK,MAAM,KAAK,EAAE,IAAI;AAAA,IACrC,SACM,KAAK;AACT,cAAQ,KAAK,yBAAyB,GAAG;AACzC,aAAO,MAAM,kBAAkB;AAAA,IACjC;AAAA,EACF;AAAA,EAEA,SAAU,GAAW;AACnB,SAAK,MAAM,SAAS,MAAM,KAAK,SAAY,CAAC;AAAA,EAC9C;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,iBAAiB;AACrC,UAAM,eAAe,KAAK,MAAM,OAAO;AACvC,UAAM,qBAAqB;AAAA,MACzB,GAAG,aAAa;AAAA,MAChB,GAAG,aAAa;AAAA,MAChB,GAAG,aAAa;AAAA;AAAA,MAEhB,GAAG,aAAa;AAAA,IAClB;AAEA,UAAM,SAAS;AAAA,MAAC;AAAA;AAAA,QACd,WAAU;AAAA,QACV,OAAO;AAAA,UACL,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,MAAM,OAAO;AAAA,UACb,KAAK,OAAO;AAAA,QACd;AAAA,QACA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO;AAAA,cACP,UAAU,OAAK,KAAK,gBAAgB,YAAY,CAAC,CAAC;AAAA;AAAA,UACpD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK;AAAA,cACd,OAAO;AAAA,gBACL,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,KAAK;AAAA,gBACL,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,MAAM;AAAA,cACR;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAEA,UAAM,cAAc;AAAA,MAClB,iBAAiB,KAAK,MAAM;AAAA,IAC9B;AAEA,WAAO,qBAAC,SAAI,WAAU,0BACnB;AAAA,WAAK,MAAM,gBAAgB;AAAA,MAC5B,oBAAC,SAAI,WAAU,yBAAwB,OAAO,aAAa;AAAA,MAC3D;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,KAAK,MAAM,YAAY;AAAA,UACnC,YAAW;AAAA,UACX,cAAa;AAAA,UACb,WAAU;AAAA,UACV,KAAK,CAAC,UAAU,KAAK,aAAa;AAAA,UAClC,SAAS,KAAK;AAAA,UACd,OAAO,KAAK,MAAM;AAAA,UAClB,MAAM,KAAK,MAAM;AAAA,UACjB,aAAa,KAAK,MAAM;AAAA,UACxB,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ;AAAA,UAC7C,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,OAAO,KAAK;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cb6d03ea084207ffce2f89af246bc26074c13af7"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return wi=function(){return a},a}wi();function l8e(n){wi().f[0]++;const e=(wi().s[0]++,n.rgb);return wi().s[1]++,`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}class wQ extends Mn.Component{constructor(t){wi().f[1]++,wi().s[4]++;super(t);sn(this,"state",(wi().s[2]++,{pickerOpened:!1}));sn(this,"colorInput",(wi().s[3]++,null));sn(this,"calcPickerOffset",(wi().s[7]++,()=>{wi().f[3]++;const t=(wi().s[8]++,this.colorInput);if(wi().s[9]++,t){wi().b[0][0]++;const r=(wi().s[10]++,t.getBoundingClientRect());return wi().s[11]++,{top:r.top,left:r.left+196}}else return wi().b[0][1]++,wi().s[12]++,{top:160,left:555}}));sn(this,"togglePicker",(wi().s[13]++,()=>{wi().f[4]++,wi().s[14]++,this.setState({pickerOpened:!this.state.pickerOpened})}));wi().s[5]++,this.onChangeNoCheck=q6.throttle(this.onChangeNoCheck,1e3/30)}onChangeNoCheck(t){wi().f[2]++,wi().s[6]++,this.props.onChange(t)}get color(){wi().f[5]++,wi().s[15]++;try{return wi().s[16]++,pO(this.props.value).rgb()}catch(t){return wi().s[17]++,console.warn("Error parsing color: ",t),wi().s[18]++,pO("rgb(255,255,255)")}}onChange(t){wi().f[6]++,wi().s[19]++,this.props.onChange(t===""?(wi().b[1][0]++,void 0):(wi().b[1][1]++,t))}render(){wi().f[7]++;const t=(wi().s[20]++,this.calcPickerOffset()),r=(wi().s[21]++,this.color.object()),i=(wi().s[22]++,{r:r.r,g:r.g,b:r.b,a:r.alpha}),o=(wi().s[23]++,G.jsxs("div",{className:"maputnik-color-picker-offset",style:{position:"fixed",zIndex:1,left:t.left,top:t.top},children:[G.jsx(s8e,{color:i,onChange:s=>(wi().f[8]++,wi().s[24]++,this.onChangeNoCheck(l8e(s)))}),G.jsx("div",{className:"maputnik-color-picker-offset",onClick:this.togglePicker,style:{zIndex:-1,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}})]})),a=(wi().s[25]++,{backgroundColor:this.props.value});return wi().s[26]++,G.jsxs("div",{className:"maputnik-color-wrapper",children:[(wi().b[2][0]++,this.state.pickerOpened&&(wi().b[2][1]++,o)),G.jsx("div",{className:"maputnik-color-swatch",style:a}),G.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",autoComplete:"off",className:"maputnik-color",ref:s=>(wi().f[9]++,wi().s[27]++,this.colorInput=s),onClick:this.togglePicker,style:this.props.style,name:this.props.name,placeholder:this.props.default,value:this.props.value?(wi().b[3][0]++,this.props.value):(wi().b[3][1]++,""),onChange:s=>(wi().f[10]++,wi().s[28]++,this.onChange(s.target.value))})]})}}function Gt(){var n="/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",e="a8a72b29c3a7524f03ed6e5256af9f8345da6b33",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",statementMap:{0:{start:{line:5,column:24},end:{line:7,column:3}},1:{start:{line:8,column:19},end:{line:8,column:24}},2:{start:{line:10,column:4},end:{line:10,column:17}},3:{start:{line:11,column:4},end:{line:16,column:6}},4:{start:{line:19,column:4},end:{line:24,column:5}},5:{start:{line:20,column:6},end:{line:23,column:8}},6:{start:{line:25,column:4},end:{line:25,column:16}},7:{start:{line:28,column:18},end:{line:28,column:77}},8:{start:{line:29,column:23},end:{line:29,column:49}},9:{start:{line:30,column:4},end:{line:40,column:5}},10:{start:{line:31,column:6},end:{line:32,column:35}},11:{start:{line:32,column:8},end:{line:32,column:35}},12:{start:{line:33,column:6},end:{line:35,column:9}},13:{start:{line:36,column:11},end:{line:40,column:5}},14:{start:{line:37,column:6},end:{line:39,column:9}},15:{start:{line:41,column:4},end:{line:43,column:7}},16:{start:{line:46,column:4},end:{line:48,column:5}},17:{start:{line:47,column:6},end:{line:47,column:18}},18:{start:{line:49,column:18},end:{line:49,column:20}},19:{start:{line:50,column:4},end:{line:52,column:5}},20:{start:{line:51,column:6},end:{line:51,column:19}},21:{start:{line:53,column:4},end:{line:55,column:5}},22:{start:{line:54,column:6},end:{line:54,column:19}},23:{start:{line:56,column:4},end:{line:58,column:5}},24:{start:{line:57,column:6},end:{line:57,column:19}},25:{start:{line:59,column:4},end:{line:59,column:16}},26:{start:{line:61,column:15},end:{line:75,column:3}},27:{start:{line:62,column:4},end:{line:62,column:38}},28:{start:{line:63,column:4},end:{line:65,column:5}},29:{start:{line:64,column:6},end:{line:64,column:13}},30:{start:{line:66,column:4},end:{line:74,column:5}},31:{start:{line:67,column:6},end:{line:73,column:7}},32:{start:{line:68,column:8},end:{line:68,column:43}},33:{start:{line:69,column:8},end:{line:69,column:56}},34:{start:{line:71,column:8},end:{line:71,column:33}},35:{start:{line:72,column:8},end:{line:72,column:46}},36:{start:{line:76,column:18},end:{line:102,column:3}},37:{start:{line:77,column:16},end:{line:77,column:42}},38:{start:{line:78,column:17},end:{line:78,column:37}},39:{start:{line:79,column:21},end:{line:79,column:26}},40:{start:{line:80,column:4},end:{line:96,column:5}},41:{start:{line:81,column:19},end:{line:81,column:31}},42:{start:{line:82,column:6},end:{line:95,column:7}},43:{start:{line:83,column:8},end:{line:87,column:9}},44:{start:{line:84,column:10},end:{line:84,column:42}},45:{start:{line:86,column:10},end:{line:86,column:42}},46:{start:{line:88,column:8},end:{line:88,column:27}},47:{start:{line:90,column:8},end:{line:94,column:9}},48:{start:{line:91,column:10},end:{line:91,column:31}},49:{start:{line:93,column:10},end:{line:93,column:40}},50:{start:{line:97,column:4},end:{line:97,column:32}},51:{start:{line:98,column:4},end:{line:98,column:70}},52:{start:{line:99,column:4},end:{line:99,column:41}},53:{start:{line:100,column:4},end:{line:101,column:33}},54:{start:{line:101,column:6},end:{line:101,column:33}},55:{start:{line:104,column:4},end:{line:187,column:5}},56:{start:{line:105,column:20},end:{line:105,column:81}},57:{start:{line:106,column:27},end:{line:106,column:82}},58:{start:{line:108,column:6},end:{line:112,column:7}},59:{start:{line:109,column:8},end:{line:109,column:38}},60:{start:{line:111,column:8},end:{line:111,column:27}},61:{start:{line:113,column:6},end:{line:167,column:11}},62:{start:{line:126,column:14},end:{line:126,column:41}},63:{start:{line:129,column:14},end:{line:129,column:67}},64:{start:{line:132,column:14},end:{line:132,column:69}},65:{start:{line:135,column:14},end:{line:139,column:17}},66:{start:{line:154,column:14},end:{line:154,column:47}},67:{start:{line:157,column:14},end:{line:157,column:47}},68:{start:{line:160,column:14},end:{line:160,column:48}},69:{start:{line:161,column:14},end:{line:161,column:32}},70:{start:{line:169,column:20},end:{line:169,column:81}},71:{start:{line:170,column:6},end:{line:186,column:8}},72:{start:{line:178,column:27},end:{line:178,column:59}},73:{start:{line:180,column:12},end:{line:180,column:45}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:21},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:48},end:{line:26,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:24},end:{line:44,column:3}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:45,column:2},end:{line:45,column:3}},loc:{start:{line:45,column:13},end:{line:60,column:3}},line:45},4:{name:"(anonymous_4)",decl:{start:{line:61,column:15},end:{line:61,column:16}},loc:{start:{line:61,column:21},end:{line:75,column:3}},line:61},5:{name:"(anonymous_5)",decl:{start:{line:76,column:18},end:{line:76,column:19}},loc:{start:{line:76,column:25},end:{line:102,column:3}},line:76},6:{name:"(anonymous_6)",decl:{start:{line:103,column:2},end:{line:103,column:3}},loc:{start:{line:103,column:11},end:{line:188,column:3}},line:103},7:{name:"(anonymous_7)",decl:{start:{line:125,column:23},end:{line:125,column:24}},loc:{start:{line:125,column:29},end:{line:127,column:13}},line:125},8:{name:"(anonymous_8)",decl:{start:{line:128,column:27},end:{line:128,column:28}},loc:{start:{line:128,column:33},end:{line:130,column:13}},line:128},9:{name:"(anonymous_9)",decl:{start:{line:131,column:25},end:{line:131,column:26}},loc:{start:{line:131,column:31},end:{line:133,column:13}},line:131},10:{name:"(anonymous_10)",decl:{start:{line:134,column:20},end:{line:134,column:21}},loc:{start:{line:134,column:26},end:{line:140,column:13}},line:134},11:{name:"(anonymous_11)",decl:{start:{line:153,column:21},end:{line:153,column:22}},loc:{start:{line:153,column:29},end:{line:155,column:13}},line:153},12:{name:"(anonymous_12)",decl:{start:{line:156,column:22},end:{line:156,column:23}},loc:{start:{line:156,column:29},end:{line:158,column:13}},line:156},13:{name:"(anonymous_13)",decl:{start:{line:159,column:20},end:{line:159,column:21}},loc:{start:{line:159,column:28},end:{line:162,column:13}},line:159},14:{name:"(anonymous_14)",decl:{start:{line:178,column:20},end:{line:178,column:21}},loc:{start:{line:178,column:27},end:{line:178,column:59}},line:178},15:{name:"(anonymous_15)",decl:{start:{line:179,column:19},end:{line:179,column:20}},loc:{start:{line:179,column:25},end:{line:181,column:11}},line:179}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:24,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:24,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},1:{loc:{start:{line:19,column:8},end:{line:19,column:53}},type:"binary-expr",locations:[{start:{line:19,column:8},end:{line:19,column:22}},{start:{line:19,column:26},end:{line:19,column:53}}],line:19},2:{loc:{start:{line:28,column:18},end:{line:28,column:77}},type:"cond-expr",locations:[{start:{line:28,column:59},end:{line:28,column:65}},{start:{line:28,column:68},end:{line:28,column:77}}],line:28},3:{loc:{start:{line:28,column:18},end:{line:28,column:56}},type:"binary-expr",locations:[{start:{line:28,column:18},end:{line:28,column:33}},{start:{line:28,column:37},end:{line:28,column:56}}],line:28},4:{loc:{start:{line:30,column:4},end:{line:40,column:5}},type:"if",locations:[{start:{line:30,column:4},end:{line:40,column:5}},{start:{line:36,column:11},end:{line:40,column:5}}],line:30},5:{loc:{start:{line:30,column:8},end:{line:30,column:41}},type:"binary-expr",locations:[{start:{line:30,column:8},end:{line:30,column:27}},{start:{line:30,column:31},end:{line:30,column:41}}],line:30},6:{loc:{start:{line:31,column:6},end:{line:32,column:35}},type:"if",locations:[{start:{line:31,column:6},end:{line:32,column:35}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},7:{loc:{start:{line:36,column:11},end:{line:40,column:5}},type:"if",locations:[{start:{line:36,column:11},end:{line:40,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:36},8:{loc:{start:{line:36,column:15},end:{line:36,column:49}},type:"binary-expr",locations:[{start:{line:36,column:15},end:{line:36,column:35}},{start:{line:36,column:39},end:{line:36,column:49}}],line:36},9:{loc:{start:{line:42,column:18},end:{line:42,column:53}},type:"cond-expr",locations:[{start:{line:42,column:36},end:{line:42,column:42}},{start:{line:42,column:45},end:{line:42,column:53}}],line:42},10:{loc:{start:{line:46,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:46,column:4},end:{line:48,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:46},11:{loc:{start:{line:50,column:4},end:{line:52,column:5}},type:"if",locations:[{start:{line:50,column:4},end:{line:52,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:50},12:{loc:{start:{line:53,column:4},end:{line:55,column:5}},type:"if",locations:[{start:{line:53,column:4},end:{line:55,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53},13:{loc:{start:{line:53,column:8},end:{line:53,column:56}},type:"binary-expr",locations:[{start:{line:53,column:8},end:{line:53,column:30}},{start:{line:53,column:34},end:{line:53,column:56}}],line:53},14:{loc:{start:{line:56,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:56,column:4},end:{line:58,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},15:{loc:{start:{line:56,column:8},end:{line:56,column:56}},type:"binary-expr",locations:[{start:{line:56,column:8},end:{line:56,column:30}},{start:{line:56,column:34},end:{line:56,column:56}}],line:56},16:{loc:{start:{line:63,column:4},end:{line:65,column:5}},type:"if",locations:[{start:{line:63,column:4},end:{line:65,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:63},17:{loc:{start:{line:66,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:66,column:4},end:{line:74,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:66},18:{loc:{start:{line:67,column:6},end:{line:73,column:7}},type:"if",locations:[{start:{line:67,column:6},end:{line:73,column:7}},{start:{line:70,column:13},end:{line:73,column:7}}],line:67},19:{loc:{start:{line:80,column:4},end:{line:96,column:5}},type:"if",locations:[{start:{line:80,column:4},end:{line:96,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:80},20:{loc:{start:{line:82,column:6},end:{line:95,column:7}},type:"if",locations:[{start:{line:82,column:6},end:{line:95,column:7}},{start:{line:89,column:13},end:{line:95,column:7}}],line:82},21:{loc:{start:{line:83,column:8},end:{line:87,column:9}},type:"if",locations:[{start:{line:83,column:8},end:{line:87,column:9}},{start:{line:85,column:15},end:{line:87,column:9}}],line:83},22:{loc:{start:{line:90,column:8},end:{line:94,column:9}},type:"if",locations:[{start:{line:90,column:8},end:{line:94,column:9}},{start:{line:92,column:15},end:{line:94,column:9}}],line:90},23:{loc:{start:{line:100,column:4},end:{line:101,column:33}},type:"if",locations:[{start:{line:100,column:4},end:{line:101,column:33}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:100},24:{loc:{start:{line:104,column:4},end:{line:187,column:5}},type:"if",locations:[{start:{line:104,column:4},end:{line:187,column:5}},{start:{line:168,column:11},end:{line:187,column:5}}],line:104},25:{loc:{start:{line:104,column:8},end:{line:104,column:205}},type:"binary-expr",locations:[{start:{line:104,column:8},end:{line:104,column:63}},{start:{line:104,column:67},end:{line:104,column:122}},{start:{line:104,column:126},end:{line:104,column:151}},{start:{line:104,column:155},end:{line:104,column:180}},{start:{line:104,column:184},end:{line:104,column:205}}],line:104},26:{loc:{start:{line:105,column:20},end:{line:105,column:81}},type:"cond-expr",locations:[{start:{line:105,column:41},end:{line:105,column:62}},{start:{line:105,column:65},end:{line:105,column:81}}],line:105},27:{loc:{start:{line:106,column:27},end:{line:106,column:82}},type:"cond-expr",locations:[{start:{line:106,column:59},end:{line:106,column:61}},{start:{line:106,column:64},end:{line:106,column:82}}],line:106},28:{loc:{start:{line:108,column:6},end:{line:112,column:7}},type:"if",locations:[{start:{line:108,column:6},end:{line:112,column:7}},{start:{line:110,column:13},end:{line:112,column:7}}],line:108},29:{loc:{start:{line:123,column:19},end:{line:123,column:58}},type:"cond-expr",locations:[{start:{line:123,column:38},end:{line:123,column:50}},{start:{line:123,column:53},end:{line:123,column:58}}],line:123},30:{loc:{start:{line:152,column:19},end:{line:152,column:58}},type:"cond-expr",locations:[{start:{line:152,column:43},end:{line:152,column:45}},{start:{line:152,column:48},end:{line:152,column:58}}],line:152},31:{loc:{start:{line:169,column:20},end:{line:169,column:81}},type:"cond-expr",locations:[{start:{line:169,column:41},end:{line:169,column:62}},{start:{line:169,column:65},end:{line:169,column:81}}],line:169},32:{loc:{start:{line:177,column:17},end:{line:177,column:46}},type:"cond-expr",locations:[{start:{line:177,column:36},end:{line:177,column:38}},{start:{line:177,column:41},end:{line:177,column:46}}],line:177}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0,0,0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx"],names:[],mappings:"AA8Ka,SACL,KADK;AA9Kb,OAAO,WAAmC;AAC1C,OAAO,sBAAsB;AA0B7B,qBAAqB,oBAAoB,MAAM,UAA8C;AAAA,EAC3F,OAAO,eAAe;AAAA,IACpB,WAAW;AAAA,EACb;AAAA,EACA,iBAA0B;AAAA,EAE1B,YAAY,OAAyB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM,CAAC,iBAAiB;AAAA,MACxB,SAAS;AAAA,MACT,OAAO,MAAM;AAAA,MACb,YAAY,MAAM;AAAA,IACpB;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAmC,OAAyB;AAC1F,QAAI,CAAC,MAAM,WAAW,MAAM,UAAU,MAAM,OAAO;AACjD,aAAO;AAAA,QACL,OAAO,MAAM;AAAA,QACb,YAAY,MAAM;AAAA,MACpB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,UAAuC;AACjD,UAAM,QAAS,aAAa,MAAM,aAAa,SAC7C,SAAY,CAAC;AAEf,UAAM,aAAa,KAAK,MAAM,UAAU;AACxC,QAAG,KAAK,QAAQ,KAAK,KAAK,YAAY;AACpC,UAAI,KAAK,MAAM;AAAU,aAAK,MAAM,SAAS,KAAK;AAClD,WAAK,SAAS;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACH,WACS,CAAC,KAAK,QAAQ,KAAK,KAAK,YAAY;AAC3C,WAAK,SAAS;AAAA,QACZ,OAAO;AAAA,MACT,CAAC;AAAA,IACH;AAEA,SAAK,SAAS;AAAA,MACZ,YAAY,aAAa,KAAK,SAAY;AAAA,IAC5C,CAAC;AAAA,EACH;AAAA,EAEA,QAAQ,GAAgC;AACtC,QAAI,MAAM,QAAW;AACnB,aAAO;AAAA,IACT;AAEA,UAAM,QAAQ,CAAC;AACf,QAAG,MAAM,KAAK,GAAG;AACf,aAAO;AAAA,IACT;AAEA,QAAG,CAAC,MAAM,KAAK,MAAM,GAAI,KAAK,QAAQ,KAAK,MAAM,KAAM;AACrD,aAAO;AAAA,IACT;AAEA,QAAG,CAAC,MAAM,KAAK,MAAM,GAAI,KAAK,QAAQ,KAAK,MAAM,KAAM;AACrD,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,aAAa,MAAM;AACjB,SAAK,SAAS,EAAC,SAAS,MAAK,CAAC;AAE9B,QAAG,CAAC,KAAK,MAAM,OAAO;AACpB;AAAA,IACF;AAGA,QAAI,CAAC,KAAK,QAAQ,KAAK,MAAM,KAAK,GAAG;AACnC,UAAG,KAAK,QAAQ,KAAK,MAAM,KAAK,GAAG;AACjC,aAAK,YAAY,KAAK,MAAM,KAAK;AACjC,aAAK,SAAS,EAAC,YAAY,KAAK,MAAM,MAAK,CAAC;AAAA,MAC9C,OAAO;AACL,aAAK,YAAY,MAAS;AAC1B,aAAK,SAAS,EAAC,YAAY,OAAS,CAAC;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,MAAqE;AACpF,QAAI,QAAQ,WAAW,EAAE,OAAO,KAAK;AACrC,UAAM,OAAO,KAAK,MAAM;AACxB,QAAI,aAAa;AAEjB,QAAG,MAAM;AAEP,YAAM,OAAO,QAAQ;AAGrB,UAAI,KAAK,gBAAgB;AAKvB,YAAI,QAAQ,CAAC,KAAK,MAAM,YAAa;AACnC,kBAAQ,KAAK,MAAM,QAAS;AAAA,QAC9B,OACK;AACH,kBAAQ,KAAK,MAAM,QAAS;AAAA,QAC9B;AACA,qBAAa;AAAA,MACf,OACK;AACH,YAAI,OAAO,OAAK,GAAG;AACjB,kBAAQ,QAAQ;AAAA,QAClB,OACK;AACH,kBAAQ,SAAS,OAAO;AAAA,QAC1B;AAAA,MACF;AAAA,IACF;AAEA,SAAK,iBAAiB;AAGtB,YAAQ,KAAK,IAAI,KAAK,MAAM,KAAM,KAAK,IAAI,KAAK,MAAM,KAAM,KAAK,CAAC;AAElE,SAAK,SAAS,EAAC,OAAO,WAAU,CAAC;AACjC,QAAI,KAAK,MAAM;AAAU,WAAK,MAAM,SAAS,KAAK;AAAA,EACpD;AAAA,EAEA,SAAS;AACP,QACE,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,KAAK,KACtD,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,KAAK,KACtD,KAAK,MAAM,QAAQ,UAAa,KAAK,MAAM,QAAQ,UACnD,KAAK,MAAM,YACX;AACA,YAAM,QAAQ,KAAK,MAAM,UAAU,KAAK,MAAM,aAAa,KAAK,MAAM;AACtE,YAAM,eAAe,KAAK,MAAM,YAAY,SAAY,KAAK,KAAK,MAAM;AACxE,UAAI;AACJ,UAAI,KAAK,MAAM,cAAc;AAC3B,qBAAa,KAAK,MAAM;AAAA,MAC1B,OACK;AACH,qBAAa;AAAA,MACf;AAEA,aAAO,qBAAC,SAAI,WAAU,6BACpB;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YAEV,MAAK;AAAA,YACL,KAAK,KAAK,MAAM;AAAA,YAChB,KAAK,KAAK,MAAM;AAAA,YAChB,MAAK;AAAA,YACL,YAAW;AAAA,YACX,OAAO,UAAU,SAAY,eAAe;AAAA,YAC5C,UAAU,KAAK;AAAA,YACf,WAAW,MAAM;AACf,mBAAK,iBAAiB;AAAA,YACxB;AAAA,YACA,eAAe,MAAM;AACnB,mBAAK,SAAS,EAAC,SAAS,MAAM,cAAc,KAAI,CAAC;AAAA,YACnD;AAAA,YACA,aAAa,MAAM;AAEjB,mBAAK,SAAS,EAAC,SAAS,OAAO,cAAc,MAAK,CAAC;AAAA,YACrD;AAAA,YACA,QAAQ,MAAM;AACZ,mBAAK,SAAS;AAAA,gBACZ,SAAS;AAAA,gBACT,cAAc;AAAA,gBACd,YAAY,KAAK,MAAM;AAAA,cACzB,CAAC;AAAA,YACH;AAAA,YACA,eAAa,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,UAzBrC;AAAA,QA0BN;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,YAAW;AAAA,YACX,WAAU;AAAA,YACV,aAAa,KAAK,MAAM,SAAS,SAAS;AAAA,YAC1C,OAAO,eAAe,SAAY,KAAK;AAAA,YACvC,SAAS,QAAM;AACb,mBAAK,SAAS,EAAC,SAAS,KAAI,CAAC;AAAA,YAC/B;AAAA,YACA,UAAU,OAAK;AACb,mBAAK,YAAY,EAAE,OAAO,KAAK;AAAA,YACjC;AAAA,YACA,QAAQ,QAAM;AACZ,mBAAK,SAAS,EAAC,SAAS,MAAK,CAAC;AAC9B,mBAAK,WAAW;AAAA,YAClB;AAAA,YACA,eAAa,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,UAhBrC;AAAA,QAkBN;AAAA,SACF;AAAA,IACF,OACK;AACH,YAAM,QAAQ,KAAK,MAAM,UAAU,KAAK,MAAM,aAAa,KAAK,MAAM;AAEtE,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,cAAY,KAAK,MAAM,YAAY;AAAA,UACnC,YAAW;AAAA,UACX,WAAU;AAAA,UACV,aAAa,KAAK,MAAM,SAAS,SAAS;AAAA,UAC1C,OAAO,UAAU,SAAY,KAAK;AAAA,UAClC,UAAU,OAAK,KAAK,YAAY,EAAE,OAAO,KAAK;AAAA,UAC9C,SAAS,MAAM;AACb,iBAAK,SAAS,EAAC,SAAS,KAAI,CAAC;AAAA,UAC/B;AAAA,UACA,QAAQ,KAAK;AAAA,UACb,UAAU,KAAK,MAAM;AAAA,UACrB,eAAa,KAAK,MAAM,aAAa;AAAA;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a8a72b29c3a7524f03ed6e5256af9f8345da6b33"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Gt=function(){return a},a}Gt();class qf extends Mn.Component{constructor(t){Gt().f[0]++,Gt().s[2]++;super(t);sn(this,"_keyboardEvent",(Gt().s[1]++,!1));sn(this,"resetValue",(Gt().s[26]++,()=>{if(Gt().f[4]++,Gt().s[27]++,this.setState({editing:!1}),Gt().s[28]++,this.state.value)Gt().b[16][1]++;else{Gt().b[16][0]++,Gt().s[29]++;return}Gt().s[30]++,this.isValid(this.state.value)?Gt().b[17][1]++:(Gt().b[17][0]++,Gt().s[31]++,this.isValid(this.props.value)?(Gt().b[18][0]++,Gt().s[32]++,this.changeValue(this.props.value),Gt().s[33]++,this.setState({dirtyValue:this.props.value})):(Gt().b[18][1]++,Gt().s[34]++,this.changeValue(void 0),Gt().s[35]++,this.setState({dirtyValue:void 0})))}));sn(this,"onChangeRange",(Gt().s[36]++,t=>{Gt().f[5]++;let r=(Gt().s[37]++,parseFloat(t.target.value));const i=(Gt().s[38]++,this.props.rangeStep);let o=(Gt().s[39]++,r);if(Gt().s[40]++,i){Gt().b[19][0]++;const a=(Gt().s[41]++,r%i);Gt().s[42]++,this._keyboardEvent?(Gt().b[20][0]++,Gt().s[43]++,r<+this.state.dirtyValue?(Gt().b[21][0]++,Gt().s[44]++,r=this.state.value-i):(Gt().b[21][1]++,Gt().s[45]++,r=this.state.value+i),Gt().s[46]++,o=r):(Gt().b[20][1]++,Gt().s[47]++,a<i/2?(Gt().b[22][0]++,Gt().s[48]++,r=r-a):(Gt().b[22][1]++,Gt().s[49]++,r=r+(i-a)))}else Gt().b[19][1]++;Gt().s[50]++,this._keyboardEvent=!1,Gt().s[51]++,r=Math.max(this.props.min,Math.min(this.props.max,r)),Gt().s[52]++,this.setState({value:r,dirtyValue:o}),Gt().s[53]++,this.props.onChange?(Gt().b[23][0]++,Gt().s[54]++,this.props.onChange(r)):Gt().b[23][1]++}));Gt().s[3]++,this.state={uuid:+vv(),editing:!1,value:t.value,dirtyValue:t.value}}static getDerivedStateFromProps(t,r){return Gt().f[1]++,Gt().s[4]++,Gt().b[1][0]++,!r.editing&&(Gt().b[1][1]++,t.value!==r.value)?(Gt().b[0][0]++,Gt().s[5]++,{value:t.value,dirtyValue:t.value}):(Gt().b[0][1]++,Gt().s[6]++,null)}changeValue(t){Gt().f[2]++;const r=(Gt().s[7]++,Gt().b[3][0]++,t===""||(Gt().b[3][1]++,t===void 0)?(Gt().b[2][0]++,void 0):(Gt().b[2][1]++,+t)),i=(Gt().s[8]++,this.props.value!==r);Gt().s[9]++,Gt().b[5][0]++,this.isValid(r)&&(Gt().b[5][1]++,i)?(Gt().b[4][0]++,Gt().s[10]++,this.props.onChange?(Gt().b[6][0]++,Gt().s[11]++,this.props.onChange(r)):Gt().b[6][1]++,Gt().s[12]++,this.setState({value:r})):(Gt().b[4][1]++,Gt().s[13]++,Gt().b[8][0]++,!this.isValid(r)&&(Gt().b[8][1]++,i)?(Gt().b[7][0]++,Gt().s[14]++,this.setState({value:void 0})):Gt().b[7][1]++),Gt().s[15]++,this.setState({dirtyValue:t===""?(Gt().b[9][0]++,void 0):(Gt().b[9][1]++,t)})}isValid(t){if(Gt().f[3]++,Gt().s[16]++,t===void 0)return Gt().b[10][0]++,Gt().s[17]++,!0;Gt().b[10][1]++;const r=(Gt().s[18]++,+t);return Gt().s[19]++,isNaN(r)?(Gt().b[11][0]++,Gt().s[20]++,!1):(Gt().b[11][1]++,Gt().s[21]++,Gt().b[13][0]++,!isNaN(this.props.min)&&(Gt().b[13][1]++,r<this.props.min)?(Gt().b[12][0]++,Gt().s[22]++,!1):(Gt().b[12][1]++,Gt().s[23]++,Gt().b[15][0]++,!isNaN(this.props.max)&&(Gt().b[15][1]++,r>this.props.max)?(Gt().b[14][0]++,Gt().s[24]++,!1):(Gt().b[14][1]++,Gt().s[25]++,!0)))}render(){var t,r;if(Gt().f[6]++,Gt().s[55]++,Gt().b[25][0]++,Object.prototype.hasOwnProperty.call(this.props,"min")&&(Gt().b[25][1]++,Object.prototype.hasOwnProperty.call(this.props,"max"))&&(Gt().b[25][2]++,this.props.min!==void 0)&&(Gt().b[25][3]++,this.props.max!==void 0)&&(Gt().b[25][4]++,this.props.allowRange)){Gt().b[24][0]++;const i=(Gt().s[56]++,this.state.editing?(Gt().b[26][0]++,this.state.dirtyValue):(Gt().b[26][1]++,this.state.value)),o=(Gt().s[57]++,this.props.default===void 0?(Gt().b[27][0]++,""):(Gt().b[27][1]++,this.props.default));let a;return Gt().s[58]++,this.state.editingRange?(Gt().b[28][0]++,Gt().s[59]++,a=this.state.value):(Gt().b[28][1]++,Gt().s[60]++,a=i),Gt().s[61]++,G.jsxs("div",{className:"maputnik-number-container",children:[G.jsx("input",{className:"maputnik-number-range",type:"range",max:this.props.max,min:this.props.min,step:"any",spellCheck:"false",value:i===void 0?(Gt().b[29][0]++,o):(Gt().b[29][1]++,i),onChange:this.onChangeRange,onKeyDown:()=>{Gt().f[7]++,Gt().s[62]++,this._keyboardEvent=!0},onPointerDown:()=>{Gt().f[8]++,Gt().s[63]++,this.setState({editing:!0,editingRange:!0})},onPointerUp:()=>{Gt().f[9]++,Gt().s[64]++,this.setState({editing:!1,editingRange:!1})},onBlur:()=>{Gt().f[10]++,Gt().s[65]++,this.setState({editing:!1,editingRange:!1,dirtyValue:this.state.value})},"data-wd-key":this.props["data-wd-key"]+"-range"},"range"),G.jsx("input",{type:"text",spellCheck:"false",className:"maputnik-number",placeholder:(t=this.props.default)==null?void 0:t.toString(),value:a===void 0?(Gt().b[30][0]++,""):(Gt().b[30][1]++,a),onFocus:s=>{Gt().f[11]++,Gt().s[66]++,this.setState({editing:!0})},onChange:s=>{Gt().f[12]++,Gt().s[67]++,this.changeValue(s.target.value)},onBlur:s=>{Gt().f[13]++,Gt().s[68]++,this.setState({editing:!1}),Gt().s[69]++,this.resetValue()},"data-wd-key":this.props["data-wd-key"]+"-text"},"text")]})}else{Gt().b[24][1]++;const i=(Gt().s[70]++,this.state.editing?(Gt().b[31][0]++,this.state.dirtyValue):(Gt().b[31][1]++,this.state.value));return Gt().s[71]++,G.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",className:"maputnik-number",placeholder:(r=this.props.default)==null?void 0:r.toString(),value:i===void 0?(Gt().b[32][0]++,""):(Gt().b[32][1]++,i),onChange:o=>(Gt().f[14]++,Gt().s[72]++,this.changeValue(o.target.value)),onFocus:()=>{Gt().f[15]++,Gt().s[73]++,this.setState({editing:!0})},onBlur:this.resetValue,required:this.props.required,"data-wd-key":this.props["data-wd-key"]})}}}sn(qf,"defaultProps",(Gt().s[0]++,{rangeStep:1}));function Mf(){var n="/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",e="e85f7924976070cbab7795bce9cf0e191e4a6b5e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",statementMap:{0:{start:{line:4,column:24},end:{line:6,column:3}},1:{start:{line:7,column:13},end:{line:9,column:3}},2:{start:{line:8,column:4},end:{line:8,column:43}},3:{start:{line:11,column:4},end:{line:26,column:9}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:13},end:{line:7,column:14}},loc:{start:{line:7,column:19},end:{line:9,column:3}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:27,column:3}},line:10}},branchMap:{0:{loc:{start:{line:24,column:17},end:{line:24,column:53}},type:"cond-expr",locations:[{start:{line:24,column:36},end:{line:24,column:44}},{start:{line:24,column:47},end:{line:24,column:53}}],line:24}},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx"],names:[],mappings:"AAkBW,SACL,KADK;AAlBX,OAAO,WAAW;AAQlB,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,OAAO,eAAe;AAAA,IACpB,OAAO;AAAA,EACT;AAAA,EAEA,WAAW,MAAM;AACf,SAAK,MAAM,SAAS,CAAC,KAAK,MAAM,KAAK;AAAA,EACvC;AAAA,EAEA,SAAS;AACP,WAAO,qBAAC,SAAI,WAAU,6BACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAK;AAAA,UACL,OAAO,KAAK,MAAM;AAAA,UAClB,UAAU,KAAK;AAAA,UACf,SAAS,KAAK;AAAA,UACd,SAAS,KAAK,MAAM;AAAA;AAAA,MACtB;AAAA,MACA,oBAAC,SAAI,WAAU,yBACb,8BAAC,SAAI,OAAO;AAAA,QACV,SAAS,KAAK,MAAM,QAAQ,WAAW;AAAA,MACzC,GAAG,WAAU,0BAAyB,SAAQ,aAC5C,8BAAC,UAAK,GAAE,2CAA0C,GACpD,GACF;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e85f7924976070cbab7795bce9cf0e191e4a6b5e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Mf=function(){return a},a}Mf();class _k extends Mn.Component{constructor(){super(...arguments);sn(this,"onChange",(Mf().s[1]++,()=>{Mf().f[0]++,Mf().s[2]++,this.props.onChange(!this.props.value)}))}render(){return Mf().f[1]++,Mf().s[3]++,G.jsxs("div",{className:"maputnik-checkbox-wrapper",children:[G.jsx("input",{className:"maputnik-checkbox",type:"checkbox",style:this.props.style,onChange:this.onChange,onClick:this.onChange,checked:this.props.value}),G.jsx("div",{className:"maputnik-checkbox-box",children:G.jsx("svg",{style:{display:this.props.value?(Mf().b[0][0]++,"inline"):(Mf().b[0][1]++,"none")},className:"maputnik-checkbox-icon",viewBox:"0 0 32 32",children:G.jsx("path",{d:"M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z"})})})]})}}sn(_k,"defaultProps",(Mf().s[0]++,{value:!1}));function mr(){var n="/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",e="9ed81d69001830f70ea45ac1502cde5125167d89",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",statementMap:{0:{start:{line:6,column:24},end:{line:9,column:3}},1:{start:{line:11,column:4},end:{line:11,column:17}},2:{start:{line:12,column:4},end:{line:16,column:6}},3:{start:{line:19,column:18},end:{line:19,column:20}},4:{start:{line:20,column:30},end:{line:20,column:62}},5:{start:{line:21,column:4},end:{line:28,column:7}},6:{start:{line:22,column:6},end:{line:27,column:7}},7:{start:{line:23,column:8},end:{line:23,column:34}},8:{start:{line:25,column:8},end:{line:25,column:34}},9:{start:{line:26,column:8},end:{line:26,column:46}},10:{start:{line:29,column:4},end:{line:32,column:6}},11:{start:{line:35,column:4},end:{line:38,column:7}},12:{start:{line:36,column:18},end:{line:36,column:26}},13:{start:{line:37,column:6},end:{line:37,column:45}},14:{start:{line:41,column:18},end:{line:41,column:43}},15:{start:{line:42,column:4},end:{line:42,column:26}},16:{start:{line:43,column:4},end:{line:51,column:7}},17:{start:{line:46,column:6},end:{line:50,column:7}},18:{start:{line:47,column:8},end:{line:47,column:35}},19:{start:{line:48,column:13},end:{line:50,column:7}},20:{start:{line:49,column:8},end:{line:49,column:36}},21:{start:{line:54,column:22},end:{line:54,column:32}},22:{start:{line:55,column:27},end:{line:57,column:6}},23:{start:{line:56,column:6},end:{line:56,column:42}},24:{start:{line:58,column:19},end:{line:84,column:6}},25:{start:{line:59,column:6},end:{line:83,column:7}},26:{start:{line:60,column:8},end:{line:70,column:10}},27:{start:{line:66,column:29},end:{line:66,column:51}},28:{start:{line:72,column:8},end:{line:82,column:10}},29:{start:{line:85,column:4},end:{line:85,column:89}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:21},end:{line:17,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:48},end:{line:33,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:21,column:39},end:{line:21,column:40}},loc:{start:{line:21,column:49},end:{line:28,column:5}},line:21},3:{name:"(anonymous_3)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:20},end:{line:39,column:3}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:35,column:53},end:{line:35,column:54}},loc:{start:{line:35,column:63},end:{line:38,column:5}},line:35},5:{name:"(anonymous_5)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:29},end:{line:52,column:3}},line:40},6:{name:"(anonymous_6)",decl:{start:{line:45,column:7},end:{line:45,column:8}},loc:{start:{line:45,column:13},end:{line:51,column:5}},line:45},7:{name:"(anonymous_7)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:86,column:3}},line:53},8:{name:"(anonymous_8)",decl:{start:{line:55,column:60},end:{line:55,column:61}},loc:{start:{line:55,column:69},end:{line:57,column:5}},line:55},9:{name:"(anonymous_9)",decl:{start:{line:58,column:59},end:{line:58,column:60}},loc:{start:{line:58,column:69},end:{line:84,column:5}},line:58},10:{name:"(anonymous_10)",decl:{start:{line:66,column:22},end:{line:66,column:23}},loc:{start:{line:66,column:29},end:{line:66,column:51}},line:66}},branchMap:{0:{loc:{start:{line:22,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:27,column:7}},{start:{line:24,column:13},end:{line:27,column:7}}],line:22},1:{loc:{start:{line:37,column:15},end:{line:37,column:43}},type:"binary-expr",locations:[{start:{line:37,column:15},end:{line:37,column:29}},{start:{line:37,column:33},end:{line:37,column:43}}],line:37},2:{loc:{start:{line:46,column:6},end:{line:50,column:7}},type:"if",locations:[{start:{line:46,column:6},end:{line:50,column:7}},{start:{line:48,column:13},end:{line:50,column:7}}],line:46},3:{loc:{start:{line:46,column:10},end:{line:46,column:55}},type:"binary-expr",locations:[{start:{line:46,column:10},end:{line:46,column:32}},{start:{line:46,column:36},end:{line:46,column:55}}],line:46},4:{loc:{start:{line:48,column:13},end:{line:50,column:7}},type:"if",locations:[{start:{line:48,column:13},end:{line:50,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},5:{loc:{start:{line:55,column:27},end:{line:57,column:6}},type:"binary-expr",locations:[{start:{line:55,column:27},end:{line:55,column:43}},{start:{line:55,column:47},end:{line:57,column:6}}],line:55},6:{loc:{start:{line:56,column:13},end:{line:56,column:41}},type:"binary-expr",locations:[{start:{line:56,column:13},end:{line:56,column:23}},{start:{line:56,column:27},end:{line:56,column:41}}],line:56},7:{loc:{start:{line:59,column:6},end:{line:83,column:7}},type:"if",locations:[{start:{line:59,column:6},end:{line:83,column:7}},{start:{line:71,column:13},end:{line:83,column:7}}],line:59},8:{loc:{start:{line:63,column:21},end:{line:63,column:91}},type:"cond-expr",locations:[{start:{line:63,column:61},end:{line:63,column:67}},{start:{line:63,column:70},end:{line:63,column:91}}],line:63},9:{loc:{start:{line:63,column:21},end:{line:63,column:58}},type:"binary-expr",locations:[{start:{line:63,column:21},end:{line:63,column:35}},{start:{line:63,column:39},end:{line:63,column:58}}],line:63},10:{loc:{start:{line:65,column:22},end:{line:65,column:51}},type:"cond-expr",locations:[{start:{line:65,column:39},end:{line:65,column:43}},{start:{line:65,column:46},end:{line:65,column:51}}],line:65},11:{loc:{start:{line:67,column:26},end:{line:67,column:70}},type:"binary-expr",locations:[{start:{line:67,column:26},end:{line:67,column:50}},{start:{line:67,column:54},end:{line:67,column:70}}],line:67},12:{loc:{start:{line:75,column:21},end:{line:75,column:91}},type:"cond-expr",locations:[{start:{line:75,column:61},end:{line:75,column:67}},{start:{line:75,column:70},end:{line:75,column:91}}],line:75},13:{loc:{start:{line:75,column:21},end:{line:75,column:58}},type:"binary-expr",locations:[{start:{line:75,column:21},end:{line:75,column:35}},{start:{line:75,column:39},end:{line:75,column:58}}],line:75},14:{loc:{start:{line:77,column:22},end:{line:77,column:51}},type:"cond-expr",locations:[{start:{line:77,column:39},end:{line:77,column:43}},{start:{line:77,column:46},end:{line:77,column:51}}],line:77},15:{loc:{start:{line:79,column:26},end:{line:79,column:70}},type:"binary-expr",locations:[{start:{line:79,column:26},end:{line:79,column:50}},{start:{line:79,column:54},end:{line:79,column:70}}],line:79}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx"],names:[],mappings:"AA0Fe;AA1Ff,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AAiBxB,qBAAqB,mBAAmB,MAAM,UAA4C;AAAA,EACxF,OAAO,eAAe;AAAA,IACpB,OAAO,CAAC;AAAA,IACR,SAAS,CAAC;AAAA,EACZ;AAAA,EAEA,YAAa,OAAwB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,KAAK,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA,MAE/B,mBAAmB,KAAK,MAAM,MAAM,MAAM,CAAC;AAAA,IAC7C;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAkC,OAAwB;AACxF,UAAM,QAAe,CAAC;AACtB,UAAM,oBAAoB,MAAM,kBAAkB,MAAM,CAAC;AAEzD,UAAM,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM;AAC3C,UAAI,MAAM,MAAM,CAAC,MAAM,MAAM,kBAAkB,CAAC,GAAG;AACjD,cAAM,CAAC,IAAI,MAAM,MAAM,CAAC;AAAA,MAC1B,OACK;AACH,cAAM,CAAC,IAAI,MAAM,MAAM,CAAC;AACxB,0BAAkB,CAAC,IAAI,MAAM,MAAM,CAAC;AAAA,MACtC;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,OAAkB;AAC3B,WAAO,MAAM,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM;AACzD,YAAM,MAAM,MAAM,CAAC;AACnB,aAAO,EAAE,QAAQ,UAAa,QAAQ;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,KAAa,UAAuC;AAC9D,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,CAAC;AACtC,UAAM,GAAG,IAAI;AAEb,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,GAAG,MAAM;AACP,UAAI,KAAK,WAAW,KAAK,KAAK,KAAK,MAAM,UAAU;AACjD,aAAK,MAAM,SAAS,KAAK;AAAA,MAC3B,WACS,KAAK,MAAM,UAAS;AAE3B,aAAK,MAAM,SAAS,MAAS;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,MAAK,IAAI,KAAK;AAErB,UAAM,iBACJ,MAAM,SAAS,KACf,CAAC,MAAM,MAAM,SAAO;AAClB,aAAQ,QAAQ,MAAM,QAAQ;AAAA,IAChC,CAAC;AAGH,UAAM,SAAS,MAAM,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM;AAC/D,UAAG,KAAK,MAAM,SAAS,UAAU;AAC/B,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,SAAS,kBAAkB,CAAC,KAAK,MAAM,UAAU,SAAY,KAAK,MAAM,QAAQ,CAAC;AAAA,YACjF,OAAO,MAAM,CAAC;AAAA,YACd,UAAU,iBAAiB,OAAO;AAAA,YAClC,UAAU,CAAC,MAAM,KAAK,YAAY,GAAG,CAAC;AAAA,YACtC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,UAL9C;AAAA,QAMP;AAAA,MACF,OAAO;AACL,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,SAAS,kBAAkB,CAAC,KAAK,MAAM,UAAU,SAAY,KAAK,MAAM,QAAQ,CAAC;AAAA,YACjF,OAAO,MAAM,CAAC;AAAA,YACd,UAAU,iBAAiB,OAAO;AAAA,YAClC,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,UAL9C;AAAA,QAMP;AAAA,MACF;AAAA,IACF,CAAC;AAED,WACE,oBAAC,SAAI,WAAU,kBACZ,kBACH;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9ed81d69001830f70ea45ac1502cde5125167d89"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return mr=function(){return a},a}mr();var ZE;let MQ=(ZE=class extends Mn.Component{constructor(e){mr().f[0]++,mr().s[1]++,super(e),mr().s[2]++,this.state={value:this.props.value.slice(0),initialPropsValue:this.props.value.slice(0)}}static getDerivedStateFromProps(e,t){mr().f[1]++;const r=(mr().s[3]++,[]),i=(mr().s[4]++,t.initialPropsValue.slice(0));return mr().s[5]++,Array(e.length).fill(null).map((o,a)=>{mr().f[2]++,mr().s[6]++,e.value[a]===t.initialPropsValue[a]?(mr().b[0][0]++,mr().s[7]++,r[a]=t.value[a]):(mr().b[0][1]++,mr().s[8]++,r[a]=t.value[a],mr().s[9]++,i[a]=t.value[a])}),mr().s[10]++,{value:r,initialPropsValue:i}}isComplete(e){return mr().f[3]++,mr().s[11]++,Array(this.props.length).fill(null).every((t,r)=>{mr().f[4]++;const i=(mr().s[12]++,e[r]);return mr().s[13]++,mr().b[1][0]++,!(i===void 0||(mr().b[1][1]++,i===""))})}changeValue(e,t){mr().f[5]++;const r=(mr().s[14]++,this.state.value.slice(0));mr().s[15]++,r[e]=t,mr().s[16]++,this.setState({value:r},()=>{mr().f[6]++,mr().s[17]++,mr().b[3][0]++,this.isComplete(r)&&(mr().b[3][1]++,this.props.onChange)?(mr().b[2][0]++,mr().s[18]++,this.props.onChange(r)):(mr().b[2][1]++,mr().s[19]++,this.props.onChange?(mr().b[4][0]++,mr().s[20]++,this.props.onChange(void 0)):mr().b[4][1]++)})}render(){mr().f[7]++;const{value:e}=(mr().s[21]++,this.state),t=(mr().s[22]++,mr().b[5][0]++,e.length>0&&(mr().b[5][1]++,!e.every(i=>(mr().f[8]++,mr().s[23]++,mr().b[6][0]++,i===""||(mr().b[6][1]++,i===void 0))))),r=(mr().s[24]++,Array(this.props.length).fill(null).map((i,o)=>(mr().f[9]++,mr().s[25]++,this.props.type==="number"?(mr().b[7][0]++,mr().s[26]++,G.jsx(qf,{default:(mr().b[9][0]++,t||(mr().b[9][1]++,!this.props.default)?(mr().b[8][0]++,void 0):(mr().b[8][1]++,this.props.default[o])),value:e[o],required:t?(mr().b[10][0]++,!0):(mr().b[10][1]++,!1),onChange:a=>(mr().f[10]++,mr().s[27]++,this.changeValue(o,a)),"aria-label":(mr().b[11][0]++,this.props["aria-label"]||(mr().b[11][1]++,this.props.label))},o)):(mr().b[7][1]++,mr().s[28]++,G.jsx(Qd,{default:(mr().b[13][0]++,t||(mr().b[13][1]++,!this.props.default)?(mr().b[12][0]++,void 0):(mr().b[12][1]++,this.props.default[o])),value:e[o],required:t?(mr().b[14][0]++,!0):(mr().b[14][1]++,!1),onChange:this.changeValue.bind(this,o),"aria-label":(mr().b[15][0]++,this.props["aria-label"]||(mr().b[15][1]++,this.props.label))},o)))));return mr().s[29]++,G.jsx("div",{className:"maputnik-array",children:r})}},sn(ZE,"defaultProps",(mr().s[0]++,{value:[],default:[]})),ZE);function gl(){var n="/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",e="c4660c9ecb80d9f1ce71e70441154e1e765b77ab",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",statementMap:{0:{start:{line:6,column:18},end:{line:6,column:36}},1:{start:{line:7,column:4},end:{line:9,column:5}},2:{start:{line:8,column:6},end:{line:8,column:43}},3:{start:{line:8,column:35},end:{line:8,column:41}},4:{start:{line:10,column:26},end:{line:10,column:59}},5:{start:{line:11,column:19},end:{line:32,column:6}},6:{start:{line:12,column:6},end:{line:31,column:8}},7:{start:{line:22,column:34},end:{line:22,column:58}},8:{start:{line:33,column:4},end:{line:33,column:140}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:34,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:8,column:28},end:{line:8,column:29}},loc:{start:{line:8,column:35},end:{line:8,column:41}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:11,column:31},end:{line:11,column:32}},loc:{start:{line:11,column:49},end:{line:32,column:5}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:22,column:26},end:{line:22,column:27}},loc:{start:{line:22,column:34},end:{line:22,column:58}},line:22}},branchMap:{0:{loc:{start:{line:7,column:4},end:{line:9,column:5}},type:"if",locations:[{start:{line:7,column:4},end:{line:9,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:7},1:{loc:{start:{line:7,column:8},end:{line:7,column:56}},type:"binary-expr",locations:[{start:{line:7,column:8},end:{line:7,column:26}},{start:{line:7,column:30},end:{line:7,column:56}}],line:7},2:{loc:{start:{line:10,column:26},end:{line:10,column:59}},type:"binary-expr",locations:[{start:{line:10,column:26},end:{line:10,column:42}},{start:{line:10,column:46},end:{line:10,column:59}}],line:10}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx"],names:[],mappings:"AAoBa,SAIL,KAJK;AApBb,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAUvB,qBAAqB,wBAAwB,MAAM,UAAgC;AAAA,EACjF,SAAS;AACP,QAAI,UAAU,KAAK,MAAM;AACzB,QAAG,QAAQ,SAAS,KAAK,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,GAAG;AACnD,gBAAU,QAAQ,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA,IACnC;AAEA,UAAM,gBAAgB,KAAK,MAAM,SAAS,QAAQ,CAAC,EAAE,CAAC;AACtD,UAAM,SAAS,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAK;AAC1C,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,WAAW,WAAW,4BAA4B,EAAC,4BAA4B,QAAQ,cAAa,CAAC;AAAA,UAErG;AAAA;AAAA,cAAC;AAAA;AAAA,gBAAM,MAAK;AAAA,gBACV,MAAM,KAAK,MAAM;AAAA,gBACjB,UAAU,QAAM,KAAK,MAAM,SAAS,GAAG;AAAA,gBACvC,OAAO;AAAA,gBACP,SAAS,QAAQ;AAAA;AAAA,YACnB;AAAA,YACC;AAAA;AAAA;AAAA,QATI;AAAA,MAUP;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,cAAS,WAAU,wBAAuB,cAAY,KAAK,MAAM,YAAY,GAClF,kBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c4660c9ecb80d9f1ce71e70441154e1e765b77ab"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return gl=function(){return a},a}gl();class u8e extends Mn.Component{render(){gl().f[0]++;let e=(gl().s[0]++,this.props.options);gl().s[1]++,gl().b[1][0]++,e.length>0&&(gl().b[1][1]++,!Array.isArray(e[0]))?(gl().b[0][0]++,gl().s[2]++,e=e.map(i=>(gl().f[1]++,gl().s[3]++,[i,i]))):gl().b[0][1]++;const t=(gl().s[4]++,gl().b[2][0]++,this.props.value||(gl().b[2][1]++,e[0][0])),r=(gl().s[5]++,e.map(([i,o])=>(gl().f[2]++,gl().s[6]++,G.jsxs("label",{className:Qf("maputnik-radio-as-button",{"maputnik-button-selected":i===t}),children:[G.jsx("input",{type:"radio",name:this.props.name,onChange:a=>(gl().f[3]++,gl().s[7]++,this.props.onChange(i)),value:i,checked:i===t}),o]},i))));return gl().s[8]++,G.jsx("fieldset",{className:"maputnik-multibutton","aria-label":this.props["aria-label"],children:r})}}function gs(){var n="/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",e="d905b5da4422f2b84d44f87b04fda3de421542f5",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",statementMap:{0:{start:{line:6,column:12},end:{line:6,column:13}},1:{start:{line:7,column:2},end:{line:9,column:5}},2:{start:{line:8,column:4},end:{line:8,column:24}},3:{start:{line:10,column:2},end:{line:10,column:13}},4:{start:{line:14,column:54},end:{line:14,column:64}},5:{start:{line:15,column:4},end:{line:36,column:5}},6:{start:{line:16,column:6},end:{line:25,column:8}},7:{start:{line:27,column:6},end:{line:35,column:8}}},fnMap:{0:{name:"optionsLabelLength",decl:{start:{line:5,column:9},end:{line:5,column:27}},loc:{start:{line:5,column:37},end:{line:11,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:7,column:18},end:{line:7,column:19}},loc:{start:{line:7,column:34},end:{line:9,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:37,column:3}},line:13}},branchMap:{0:{loc:{start:{line:15,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:15,column:4},end:{line:36,column:5}},{start:{line:26,column:11},end:{line:36,column:5}}],line:15},1:{loc:{start:{line:15,column:8},end:{line:15,column:64}},type:"binary-expr",locations:[{start:{line:15,column:8},end:{line:15,column:27}},{start:{line:15,column:31},end:{line:15,column:64}}],line:15},2:{loc:{start:{line:21,column:17},end:{line:21,column:44}},type:"binary-expr",locations:[{start:{line:21,column:17},end:{line:21,column:22}},{start:{line:21,column:26},end:{line:21,column:44}}],line:21},3:{loc:{start:{line:23,column:24},end:{line:23,column:57}},type:"binary-expr",locations:[{start:{line:23,column:24},end:{line:23,column:48}},{start:{line:23,column:52},end:{line:23,column:57}}],line:23},4:{loc:{start:{line:31,column:17},end:{line:31,column:44}},type:"binary-expr",locations:[{start:{line:31,column:17},end:{line:31,column:22}},{start:{line:31,column:26},end:{line:31,column:44}}],line:31},5:{loc:{start:{line:33,column:24},end:{line:33,column:57}},type:"binary-expr",locations:[{start:{line:33,column:24},end:{line:33,column:48}},{start:{line:33,column:52},end:{line:33,column:57}}],line:33}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx"],names:[],mappings:"AAgCa;AAhCb,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,qBAAqB;AAG5B,SAAS,mBAAmB,SAAgB;AAC1C,MAAI,MAAM;AACV,UAAQ,QAAQ,CAAC,CAAC,GAAG,KAAK,MAAM;AAC9B,WAAO,MAAM;AAAA,EACf,CAAC;AACD,SAAO;AACT;AAgBA,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,EAAC,SAAS,OAAO,UAAU,MAAM,MAAK,IAAI,KAAK;AAErD,QAAG,QAAQ,UAAU,KAAK,mBAAmB,OAAO,KAAK,IAAI;AAC3D,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA;AAAA,UACA,OAAQ,SAAS,KAAK,MAAM;AAAA,UAC5B;AAAA,UACA,cAAY,KAAK,MAAM,YAAY,KAAK;AAAA;AAAA,MAC1C;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA,OAAQ,SAAS,KAAK,MAAM;AAAA,UAC5B;AAAA,UACA,cAAY,KAAK,MAAM,YAAY,KAAK;AAAA;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d905b5da4422f2b84d44f87b04fda3de421542f5"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return gs=function(){return a},a}gs();function A8e(n){gs().f[0]++;let e=(gs().s[0]++,0);return gs().s[1]++,n.forEach(([t,r])=>{gs().f[1]++,gs().s[2]++,e+=r.length}),gs().s[3]++,e}class bk extends Mn.Component{render(){gs().f[2]++;const{options:e,value:t,onChange:r,name:i,label:o}=(gs().s[4]++,this.props);return gs().s[5]++,gs().b[1][0]++,e.length<=3&&(gs().b[1][1]++,A8e(e)<=20)?(gs().b[0][0]++,gs().s[6]++,G.jsx(u8e,{name:i,options:e,value:(gs().b[2][0]++,t||(gs().b[2][1]++,this.props.default)),onChange:r,"aria-label":(gs().b[3][0]++,this.props["aria-label"]||(gs().b[3][1]++,o))})):(gs().b[0][1]++,gs().s[7]++,G.jsx(V1,{options:e,value:(gs().b[4][0]++,t||(gs().b[4][1]++,this.props.default)),onChange:r,"aria-label":(gs().b[5][0]++,this.props["aria-label"]||(gs().b[5][1]++,o))}))}}function Zy(){var n="/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",e="d603f5ded455e8f3bb5709d22f215a115aa4ac65",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:26}},1:{start:{line:8,column:4},end:{line:12,column:9}},2:{start:{line:15,column:19},end:{line:15,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:13,column:3}},line:6}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx"],names:[],mappings:"AAaM;AAbN,OAAO,WAAW;AAClB,SAA0B,uBAAuB;AACjD,OAAO;AAOP,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,SAAU;AACR,UAAM,IAAI,KAAK,MAAM;AACrB,WACE,qBAAC,SAAI,WAAU,cACZ;AAAA,QAAE,QAAQ;AAAA,MAAE;AAAA,MAAE,KAAK,MAAM;AAAA,OAC5B;AAAA,EAEJ;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d603f5ded455e8f3bb5709d22f215a115aa4ac65"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Zy=function(){return a},a}Zy();class c8e extends Mn.Component{render(){Zy().f[0]++;const e=(Zy().s[0]++,this.props.t);return Zy().s[1]++,G.jsxs("div",{className:"SmallError",children:[e("Error:")," ",this.props.children]})}}const PE=(Zy().s[2]++,No()(c8e));function Mi(){var n="/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",e="241e6802bfa5d5d3e84310c296db0b7be078cb0a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",statementMap:{0:{start:{line:7,column:2},end:{line:9,column:3}},1:{start:{line:8,column:4},end:{line:8,column:11}},2:{start:{line:11,column:22},end:{line:18,column:3}},3:{start:{line:12,column:4},end:{line:17,column:5}},4:{start:{line:13,column:21},end:{line:13,column:34}},5:{start:{line:14,column:6},end:{line:14,column:29}},6:{start:{line:16,column:6},end:{line:16,column:20}},7:{start:{line:19,column:19},end:{line:19,column:35}},8:{start:{line:20,column:16},end:{line:20,column:53}},9:{start:{line:21,column:2},end:{line:41,column:3}},10:{start:{line:22,column:4},end:{line:34,column:5}},11:{start:{line:23,column:6},end:{line:26,column:14}},12:{start:{line:28,column:6},end:{line:33,column:14}},13:{start:{line:35,column:9},end:{line:41,column:3}},14:{start:{line:36,column:4},end:{line:40,column:12}},15:{start:{line:42,column:2},end:{line:42,column:15}},16:{start:{line:45,column:24},end:{line:48,column:3}},17:{start:{line:50,column:4},end:{line:50,column:17}},18:{start:{line:51,column:4},end:{line:53,column:6}},19:{start:{line:55,column:12},end:{line:61,column:3}},20:{start:{line:56,column:4},end:{line:58,column:7}},21:{start:{line:59,column:4},end:{line:60,column:30}},22:{start:{line:60,column:6},end:{line:60,column:30}},23:{start:{line:62,column:13},end:{line:67,column:3}},24:{start:{line:63,column:4},end:{line:65,column:7}},25:{start:{line:66,column:4},end:{line:66,column:29}},26:{start:{line:69,column:4},end:{line:80,column:9}},27:{start:{line:83,column:17},end:{line:83,column:52}}},fnMap:{0:{name:"validate",decl:{start:{line:6,column:9},end:{line:6,column:17}},loc:{start:{line:6,column:26},end:{line:43,column:1}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:11,column:22},end:{line:11,column:23}},loc:{start:{line:11,column:32},end:{line:18,column:3}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:46,column:13},end:{line:46,column:14}},loc:{start:{line:46,column:19},end:{line:47,column:5}},line:46},3:{name:"(anonymous_3)",decl:{start:{line:49,column:2},end:{line:49,column:3}},loc:{start:{line:49,column:21},end:{line:54,column:3}},line:49},4:{name:"(anonymous_4)",decl:{start:{line:55,column:12},end:{line:55,column:13}},loc:{start:{line:55,column:21},end:{line:61,column:3}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:62,column:13},end:{line:62,column:14}},loc:{start:{line:62,column:22},end:{line:67,column:3}},line:62},6:{name:"(anonymous_6)",decl:{start:{line:68,column:2},end:{line:68,column:3}},loc:{start:{line:68,column:11},end:{line:81,column:3}},line:68}},branchMap:{0:{loc:{start:{line:7,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:7,column:2},end:{line:9,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:7},1:{loc:{start:{line:21,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:41,column:3}},{start:{line:35,column:9},end:{line:41,column:3}}],line:21},2:{loc:{start:{line:22,column:4},end:{line:34,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:34,column:5}},{start:{line:27,column:11},end:{line:34,column:5}}],line:22},3:{loc:{start:{line:35,column:9},end:{line:41,column:3}},type:"if",locations:[{start:{line:35,column:9},end:{line:41,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},4:{loc:{start:{line:35,column:13},end:{line:35,column:86}},type:"binary-expr",locations:[{start:{line:35,column:13},end:{line:35,column:21}},{start:{line:35,column:25},end:{line:35,column:45}},{start:{line:35,column:49},end:{line:35,column:86}}],line:35},5:{loc:{start:{line:59,column:4},end:{line:60,column:30}},type:"if",locations:[{start:{line:59,column:4},end:{line:60,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:59}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx"],names:["url"],mappings:"AA4BU,SAAoC,KAApC;AA5BV,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,SAAS,OAAwB,uBAAuB;AAGxD,SAAS,SAAS,KAAa,GAAuC;AACpE,MAAI,QAAQ,IAAI;AACd;AAAA,EACF;AAEA,MAAI;AACJ,QAAM,cAAc,CAACA,SAAgB;AACnC,QAAI;AACF,YAAM,SAAS,IAAI,IAAIA,IAAG;AAC1B,aAAO,OAAO;AAAA,IAChB,SACO,KAAK;AACV,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,WAAW,YAAY,GAAG;AAChC,QAAM,QAAQ,OAAO,SAAS,aAAa;AAE3C,MAAI,CAAC,UAAU;AACb,QAAI,OAAO;AACT,cACE,oBAAC,cACC,+BAAC,SAAM,GAAM;AAAA;AAAA,QAAuB,oBAAC,UAAK,sBAAQ;AAAA,SAAO,GAC3D;AAAA,IAEJ,OAAO;AACL,cACE,oBAAC,cACC,+BAAC,SAAM,GAAM;AAAA;AAAA,QAAuB,oBAAC,UAAK,qBAAO;AAAA,QAAO;AAAA,QAAI,oBAAC,UAAK,sBAAQ;AAAA,SAAO,GACnF;AAAA,IAEJ;AAAA,EACF,WAEE,YACA,aAAa,WACb,OAAO,SAAS,aAAa,UAC7B;AACA,YACE,oBAAC,cACC,+BAAC,SAAM,GAAM;AAAA;AAAA,MACwE,oBAAC,UAAK,sBAAQ;AAAA,MAAO;AAAA,OAC1G,GACF;AAAA,EAEJ;AAEA,SAAO;AACT;AAsBA,MAAM,yBAAyB,MAAM,UAAgD;AAAA,EACnF,OAAO,eAAe;AAAA,IACpB,SAAS,MAAM;AAAA,IAAC;AAAA,EAClB;AAAA,EAEA,YAAa,OAA8B;AACzC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,SAAS,MAAM,OAAO,MAAM,CAAC;AAAA,IACtC;AAAA,EACF;AAAA,EAEA,UAAU,CAAC,QAAgB;AACzB,SAAK,SAAS;AAAA,MACZ,OAAO,SAAS,KAAK,KAAK,MAAM,CAAC;AAAA,IACnC,CAAC;AACD,QAAI,KAAK,MAAM;AAAS,WAAK,MAAM,QAAQ,GAAG;AAAA,EAChD;AAAA,EAEA,WAAW,CAAC,QAAgB;AAC1B,SAAK,SAAS;AAAA,MACZ,OAAO,SAAS,KAAK,KAAK,MAAM,CAAC;AAAA,IACnC,CAAC;AACD,SAAK,MAAM,SAAS,GAAG;AAAA,EACzB;AAAA,EAEA,SAAU;AACR,WACE,qBAAC,SACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG,KAAK;AAAA,UACT,SAAS,KAAK;AAAA,UACd,UAAU,KAAK;AAAA,UACf,cAAY,KAAK,MAAM,YAAY;AAAA;AAAA,MACrC;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EAEJ;AACF;AAEA,MAAM,WAAW,gBAAgB,EAAE,gBAAgB;AACnD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"241e6802bfa5d5d3e84310c296db0b7be078cb0a"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Mi=function(){return a},a}Mi();function DE(n,e){if(Mi().f[0]++,Mi().s[0]++,n===""){Mi().b[0][0]++,Mi().s[1]++;return}else Mi().b[0][1]++;let t;Mi().s[2]++;const r=a=>{Mi().f[1]++,Mi().s[3]++;try{const s=(Mi().s[4]++,new URL(a));return Mi().s[5]++,s.protocol}catch{Mi().s[6]++;return}},i=(Mi().s[7]++,r(n)),o=(Mi().s[8]++,window.location.protocol==="https:");return Mi().s[9]++,i?(Mi().b[1][1]++,Mi().s[13]++,Mi().b[4][0]++,i&&(Mi().b[4][1]++,i==="http:")&&(Mi().b[4][2]++,window.location.protocol==="https:")?(Mi().b[3][0]++,Mi().s[14]++,t=G.jsx(PE,{children:G.jsxs(e0,{t:e,children:["CORS policy won't allow fetching resources served over http from https, use a ",G.jsx("code",{children:"https://"})," domain"]})})):Mi().b[3][1]++):(Mi().b[1][0]++,Mi().s[10]++,o?(Mi().b[2][0]++,Mi().s[11]++,t=G.jsx(PE,{children:G.jsxs(e0,{t:e,children:["Must provide protocol: ",G.jsx("code",{children:"https://"})]})})):(Mi().b[2][1]++,Mi().s[12]++,t=G.jsx(PE,{children:G.jsxs(e0,{t:e,children:["Must provide protocol: ",G.jsx("code",{children:"http://"})," or ",G.jsx("code",{children:"https://"})]})}))),Mi().s[15]++,t}class SQ extends Mn.Component{constructor(t){Mi().f[3]++,Mi().s[17]++;super(t);sn(this,"onInput",(Mi().s[19]++,t=>{Mi().f[4]++,Mi().s[20]++,this.setState({error:DE(t,this.props.t)}),Mi().s[21]++,this.props.onInput?(Mi().b[5][0]++,Mi().s[22]++,this.props.onInput(t)):Mi().b[5][1]++}));sn(this,"onChange",(Mi().s[23]++,t=>{Mi().f[5]++,Mi().s[24]++,this.setState({error:DE(t,this.props.t)}),Mi().s[25]++,this.props.onChange(t)}));Mi().s[18]++,this.state={error:DE(t.value,t.t)}}render(){return Mi().f[6]++,Mi().s[26]++,G.jsxs("div",{children:[G.jsx(Qd,{...this.props,onInput:this.onInput,onChange:this.onChange,"aria-label":this.props["aria-label"]}),this.state.error]})}}sn(SQ,"defaultProps",(Mi().s[16]++,{onInput:()=>{Mi().f[2]++}}));const xk=(Mi().s[27]++,No()(SQ));function sr(){var n="/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",e="8212d527c6fa5f6d2cbf2bd7d7f4ce4719c4f3d4",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",statementMap:{0:{start:{line:14,column:19},end:{line:14,column:39}},1:{start:{line:15,column:4},end:{line:15,column:27}},2:{start:{line:16,column:4},end:{line:17,column:34}},3:{start:{line:17,column:6},end:{line:17,column:34}},4:{start:{line:20,column:4},end:{line:20,column:56}},5:{start:{line:22,column:13},end:{line:37,column:3}},6:{start:{line:23,column:19},end:{line:23,column:39}},7:{start:{line:24,column:4},end:{line:34,column:5}},8:{start:{line:25,column:6},end:{line:25,column:21}},9:{start:{line:26,column:11},end:{line:34,column:5}},10:{start:{line:27,column:6},end:{line:27,column:22}},11:{start:{line:28,column:11},end:{line:34,column:5}},12:{start:{line:29,column:28},end:{line:29,column:38}},13:{start:{line:30,column:27},end:{line:30,column:59}},14:{start:{line:31,column:6},end:{line:31,column:32}},15:{start:{line:33,column:6},end:{line:33,column:22}},16:{start:{line:35,column:4},end:{line:36,column:34}},17:{start:{line:36,column:6},end:{line:36,column:34}},18:{start:{line:39,column:19},end:{line:39,column:39}},19:{start:{line:40,column:4},end:{line:40,column:31}},20:{start:{line:41,column:4},end:{line:42,column:63}},21:{start:{line:42,column:6},end:{line:42,column:63}},22:{start:{line:45,column:14},end:{line:45,column:26}},23:{start:{line:46,column:22},end:{line:46,column:77}},24:{start:{line:47,column:19},end:{line:107,column:6}},25:{start:{line:48,column:45},end:{line:54,column:7}},26:{start:{line:56,column:6},end:{line:94,column:7}},27:{start:{line:57,column:8},end:{line:64,column:10}},28:{start:{line:65,column:13},end:{line:94,column:7}},29:{start:{line:66,column:8},end:{line:73,column:10}},30:{start:{line:74,column:13},end:{line:94,column:7}},31:{start:{line:75,column:24},end:{line:75,column:99}},32:{start:{line:75,column:78},end:{line:75,column:98}},33:{start:{line:76,column:8},end:{line:84,column:10}},34:{start:{line:86,column:8},end:{line:93,column:10}},35:{start:{line:95,column:6},end:{line:106,column:8}},36:{start:{line:108,column:4},end:{line:118,column:9}},37:{start:{line:121,column:26},end:{line:121,column:70}},38:{start:{line:125,column:14},end:{line:125,column:26}},39:{start:{line:126,column:4},end:{line:139,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:29},end:{line:18,column:3}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:15},end:{line:21,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:22,column:13},end:{line:22,column:14}},loc:{start:{line:22,column:19},end:{line:37,column:3}},line:22},3:{name:"(anonymous_3)",decl:{start:{line:38,column:2},end:{line:38,column:3}},loc:{start:{line:38,column:24},end:{line:43,column:3}},line:38},4:{name:"(anonymous_4)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:11},end:{line:119,column:3}},line:44},5:{name:"(anonymous_5)",decl:{start:{line:47,column:35},end:{line:47,column:36}},loc:{start:{line:47,column:45},end:{line:107,column:5}},line:47},6:{name:"(anonymous_6)",decl:{start:{line:75,column:70},end:{line:75,column:71}},loc:{start:{line:75,column:78},end:{line:75,column:98}},line:75},7:{name:"(anonymous_7)",decl:{start:{line:124,column:2},end:{line:124,column:3}},loc:{start:{line:124,column:11},end:{line:140,column:3}},line:124}},branchMap:{0:{loc:{start:{line:16,column:4},end:{line:17,column:34}},type:"if",locations:[{start:{line:16,column:4},end:{line:17,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:20,column:11},end:{line:20,column:55}},type:"binary-expr",locations:[{start:{line:20,column:11},end:{line:20,column:27}},{start:{line:20,column:31},end:{line:20,column:49}},{start:{line:20,column:53},end:{line:20,column:55}}],line:20},2:{loc:{start:{line:24,column:4},end:{line:34,column:5}},type:"if",locations:[{start:{line:24,column:4},end:{line:34,column:5}},{start:{line:26,column:11},end:{line:34,column:5}}],line:24},3:{loc:{start:{line:26,column:11},end:{line:34,column:5}},type:"if",locations:[{start:{line:26,column:11},end:{line:34,column:5}},{start:{line:28,column:11},end:{line:34,column:5}}],line:26},4:{loc:{start:{line:28,column:11},end:{line:34,column:5}},type:"if",locations:[{start:{line:28,column:11},end:{line:34,column:5}},{start:{line:32,column:11},end:{line:34,column:5}}],line:28},5:{loc:{start:{line:35,column:4},end:{line:36,column:34}},type:"if",locations:[{start:{line:35,column:4},end:{line:36,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},6:{loc:{start:{line:41,column:4},end:{line:42,column:63}},type:"if",locations:[{start:{line:41,column:4},end:{line:42,column:63}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},7:{loc:{start:{line:42,column:26},end:{line:42,column:61}},type:"cond-expr",locations:[{start:{line:42,column:46},end:{line:42,column:52}},{start:{line:42,column:55},end:{line:42,column:61}}],line:42},8:{loc:{start:{line:56,column:6},end:{line:94,column:7}},type:"if",locations:[{start:{line:56,column:6},end:{line:94,column:7}},{start:{line:65,column:13},end:{line:94,column:7}}],line:56},9:{loc:{start:{line:62,column:26},end:{line:62,column:70}},type:"binary-expr",locations:[{start:{line:62,column:26},end:{line:62,column:50}},{start:{line:62,column:54},end:{line:62,column:70}}],line:62},10:{loc:{start:{line:65,column:13},end:{line:94,column:7}},type:"if",locations:[{start:{line:65,column:13},end:{line:94,column:7}},{start:{line:74,column:13},end:{line:94,column:7}}],line:65},11:{loc:{start:{line:71,column:26},end:{line:71,column:70}},type:"binary-expr",locations:[{start:{line:71,column:26},end:{line:71,column:50}},{start:{line:71,column:54},end:{line:71,column:70}}],line:71},12:{loc:{start:{line:74,column:13},end:{line:94,column:7}},type:"if",locations:[{start:{line:74,column:13},end:{line:94,column:7}},{start:{line:85,column:13},end:{line:94,column:7}}],line:74},13:{loc:{start:{line:82,column:26},end:{line:82,column:70}},type:"binary-expr",locations:[{start:{line:82,column:26},end:{line:82,column:50}},{start:{line:82,column:54},end:{line:82,column:70}}],line:82},14:{loc:{start:{line:91,column:26},end:{line:91,column:70}},type:"binary-expr",locations:[{start:{line:91,column:26},end:{line:91,column:50}},{start:{line:91,column:54},end:{line:91,column:70}}],line:91}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx"],names:["v"],mappings:"AAqE4B,cAoCf,YApCe;AArE5B,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,gBAAe;AACvB,SAA0B,uBAAuB;AAEjD,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,OAAO,cAAc;AAkBrB,MAAM,kCAAkC,MAAM,UAA0C;AAAA,EACtF,YAAY,KAAa,UAAuC;AAC9D,UAAM,SAAS,KAAK,OAAO,MAAM,CAAC;AAClC,WAAO,GAAG,IAAI;AACd,QAAI,KAAK,MAAM;AAAU,WAAK,MAAM,SAAS,MAAM;AAAA,EACrD;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,CAAC;AAAA,EACpD;AAAA,EAEA,WAAW,MAAM;AACf,UAAM,SAAS,KAAK,OAAO,MAAM,CAAC;AAClC,QAAI,KAAK,MAAM,SAAS,UAAU;AAChC,aAAO,KAAK,CAAC;AAAA,IACf,WACS,KAAK,MAAM,SAAS,OAAO;AAClC,aAAO,KAAK,EAAE;AAAA,IAChB,WACS,KAAK,MAAM,SAAS,QAAQ;AACnC,YAAM,EAAC,UAAS,IAAI,KAAK;AACzB,YAAM,eAAe,OAAO,KAAK,UAAW,MAAM,EAAE,CAAC;AACrD,aAAO,KAAK,YAAY;AAAA,IAC1B,OAAO;AACL,aAAO,KAAK,EAAE;AAAA,IAChB;AAEA,QAAI,KAAK,MAAM;AAAU,WAAK,MAAM,SAAS,MAAM;AAAA,EACrD;AAAA,EAEA,YAAY,UAAkB;AAC5B,UAAM,SAAS,KAAK,OAAO,MAAM,CAAC;AAClC,WAAO,OAAO,UAAU,CAAC;AAEzB,QAAI,KAAK,MAAM;AAAU,WAAK,MAAM,SAAS,OAAO,SAAS,IAAI,SAAS,MAAS;AAAA,EACrF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,YAAY,EAAE,GAAG,MAAM,KAAK,MAAM,MAAM,QAAQ,KAAK,MAAM,OAAO;AACxE,UAAM,SAAS,KAAK,OAAO,IAAI,CAAC,GAAG,MAAM;AACvC,YAAM,iBAAgB;AAAA,QAAC;AAAA;AAAA,UACrB,SAAS,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,UACrC,GAAG;AAAA;AAAA,MACN;AACA,UAAI;AACJ,UAAG,KAAK,MAAM,SAAS,OAAO;AAC5B,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,WACS,KAAK,MAAM,SAAS,UAAU;AACrC,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,WACS,KAAK,MAAM,SAAS,QAAQ;AACnC,cAAM,UAAU,OAAO,KAAK,KAAK,MAAM,WAAW,MAAM,EAAE,IAAI,CAAAA,OAAK,CAACA,IAAG,WAAWA,EAAC,CAAC,CAAC;AACrF,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP;AAAA,YACA,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,OACK;AACH,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF;AAEA,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,OAAO,KAAK,MAAM;AAAA,UAElB,WAAU;AAAA,UAEV;AAAA,gCAAC,SAAI,WAAU,+BACZ,0BACH;AAAA,YACA,oBAAC,SAAI,WAAU,gCACZ,iBACH;AAAA;AAAA;AAAA,QARK;AAAA,MASP;AAAA,IACF,CAAC;AAED,WACE,qBAAC,SAAI,WAAU,kBACZ;AAAA;AAAA,MACD;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK;AAAA,UAEb,YAAE,WAAW;AAAA;AAAA,MAChB;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,MAAM,oBAAoB,gBAAgB,EAAE,yBAAyB;AACrE,eAAe;AAMf,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,SAAS,KAAK,MAAM;AAAA,QACpB,OAAO,EAAE,mBAAmB;AAAA,QAE5B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,oBAAC,YAAS;AAAA;AAAA,QACnB;AAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8212d527c6fa5f6d2cbf2bd7d7f4ce4719c4f3d4"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return sr=function(){return a},a}sr();class d8e extends Mn.Component{constructor(){super(...arguments);sn(this,"addValue",(sr().s[5]++,()=>{sr().f[2]++;const t=(sr().s[6]++,this.values.slice(0));if(sr().s[7]++,this.props.type==="number")sr().b[2][0]++,sr().s[8]++,t.push(0);else if(sr().b[2][1]++,sr().s[9]++,this.props.type==="url")sr().b[3][0]++,sr().s[10]++,t.push("");else if(sr().b[3][1]++,sr().s[11]++,this.props.type==="enum"){sr().b[4][0]++;const{fieldSpec:r}=(sr().s[12]++,this.props),i=(sr().s[13]++,Object.keys(r.values)[0]);sr().s[14]++,t.push(i)}else sr().b[4][1]++,sr().s[15]++,t.push("");sr().s[16]++,this.props.onChange?(sr().b[5][0]++,sr().s[17]++,this.props.onChange(t)):sr().b[5][1]++}))}changeValue(t,r){sr().f[0]++;const i=(sr().s[0]++,this.values.slice(0));sr().s[1]++,i[t]=r,sr().s[2]++,this.props.onChange?(sr().b[0][0]++,sr().s[3]++,this.props.onChange(i)):sr().b[0][1]++}get values(){return sr().f[1]++,sr().s[4]++,sr().b[1][0]++,this.props.value||(sr().b[1][1]++,this.props.default)||(sr().b[1][2]++,[])}deleteValue(t){sr().f[3]++;const r=(sr().s[18]++,this.values.slice(0));sr().s[19]++,r.splice(t,1),sr().s[20]++,this.props.onChange?(sr().b[6][0]++,sr().s[21]++,this.props.onChange(r.length>0?(sr().b[7][0]++,r):(sr().b[7][1]++,void 0))):sr().b[6][1]++}render(){sr().f[4]++;const t=(sr().s[22]++,this.props.t),r=(sr().s[23]++,{t,i18n:this.props.i18n,tReady:this.props.tReady}),i=(sr().s[24]++,this.values.map((o,a)=>{var f;sr().f[5]++;const s=(sr().s[25]++,G.jsx(h8e,{onClick:this.deleteValue.bind(this,a),...r}));let d;if(sr().s[26]++,this.props.type==="url")sr().b[8][0]++,sr().s[27]++,d=G.jsx(xk,{value:o,onChange:this.changeValue.bind(this,a),"aria-label":(sr().b[9][0]++,this.props["aria-label"]||(sr().b[9][1]++,this.props.label))});else if(sr().b[8][1]++,sr().s[28]++,this.props.type==="number")sr().b[10][0]++,sr().s[29]++,d=G.jsx(qf,{value:o,onChange:this.changeValue.bind(this,a),"aria-label":(sr().b[11][0]++,this.props["aria-label"]||(sr().b[11][1]++,this.props.label))});else if(sr().b[10][1]++,sr().s[30]++,this.props.type==="enum"){sr().b[12][0]++;const C=(sr().s[31]++,Object.keys((f=this.props.fieldSpec)==null?void 0:f.values).map(O=>(sr().f[6]++,sr().s[32]++,[O,QI(O)])));sr().s[33]++,d=G.jsx(bk,{options:C,value:o,onChange:this.changeValue.bind(this,a),"aria-label":(sr().b[13][0]++,this.props["aria-label"]||(sr().b[13][1]++,this.props.label))})}else sr().b[12][1]++,sr().s[34]++,d=G.jsx(Qd,{value:o,onChange:this.changeValue.bind(this,a),"aria-label":(sr().b[14][0]++,this.props["aria-label"]||(sr().b[14][1]++,this.props.label))});return sr().s[35]++,G.jsxs("div",{style:this.props.style,className:"maputnik-array-block",children:[G.jsx("div",{className:"maputnik-array-block-action",children:s}),G.jsx("div",{className:"maputnik-array-block-content",children:d})]},a)}));return sr().s[36]++,G.jsxs("div",{className:"maputnik-array",children:[i,G.jsx(is,{className:"maputnik-array-add-value",onClick:this.addValue,children:t("Add value")})]})}}const EQ=(sr().s[37]++,No()(d8e));class h8e extends Mn.Component{render(){sr().f[7]++;const e=(sr().s[38]++,this.props.t);return sr().s[39]++,G.jsx(is,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:e("Remove array item"),children:G.jsx(KI,{label:G.jsx(Iv,{})})})}}function aa(){var n="/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",e="cd16dc68fc42c219caf080518fd74984d4f8d81e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",statementMap:{0:{start:{line:5,column:24},end:{line:7,column:3}},1:{start:{line:9,column:16},end:{line:9,column:60}},2:{start:{line:10,column:4},end:{line:14,column:5}},3:{start:{line:11,column:6},end:{line:11,column:28}},4:{start:{line:13,column:6},end:{line:13,column:17}},5:{start:{line:17,column:26},end:{line:17,column:46}},6:{start:{line:18,column:4},end:{line:18,column:34}},7:{start:{line:19,column:27},end:{line:19,column:92}},8:{start:{line:19,column:55},end:{line:19,column:67}},9:{start:{line:19,column:83},end:{line:19,column:91}},10:{start:{line:20,column:4},end:{line:20,column:40}},11:{start:{line:23,column:19},end:{line:39,column:6}},12:{start:{line:24,column:6},end:{line:38,column:8}},13:{start:{line:32,column:52},end:{line:32,column:58}},14:{start:{line:40,column:4},end:{line:40,column:87}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:15},end:{line:15,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:28},end:{line:21,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:19,column:48},end:{line:19,column:49}},loc:{start:{line:19,column:55},end:{line:19,column:67}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:19,column:76},end:{line:19,column:77}},loc:{start:{line:19,column:83},end:{line:19,column:91}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:11},end:{line:41,column:3}},line:22},5:{name:"(anonymous_5)",decl:{start:{line:23,column:35},end:{line:23,column:36}},loc:{start:{line:23,column:49},end:{line:39,column:5}},line:23},6:{name:"(anonymous_6)",decl:{start:{line:32,column:45},end:{line:32,column:46}},loc:{start:{line:32,column:52},end:{line:32,column:58}},line:32}},branchMap:{0:{loc:{start:{line:9,column:16},end:{line:9,column:60}},type:"binary-expr",locations:[{start:{line:9,column:16},end:{line:9,column:32}},{start:{line:9,column:36},end:{line:9,column:54}},{start:{line:9,column:58},end:{line:9,column:60}}],line:9},1:{loc:{start:{line:10,column:4},end:{line:14,column:5}},type:"if",locations:[{start:{line:10,column:4},end:{line:14,column:5}},{start:{line:12,column:11},end:{line:14,column:5}}],line:10},2:{loc:{start:{line:30,column:28},end:{line:30,column:71}},type:"binary-expr",locations:[{start:{line:30,column:28},end:{line:30,column:52}},{start:{line:30,column:56},end:{line:30,column:71}}],line:30}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx"],names:[],mappings:"AA6CQ;AA7CR,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAY9B,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,OAAO,eAAe;AAAA,IACpB,OAAO,CAAC;AAAA,EACV;AAAA,EAEA,IAAI,SAAS;AACX,UAAM,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,CAAC;AAGvD,QAAI,IAAI,IAAI,SAAO,CAAC,MAAM,IAAG;AAC3B,aAAO,IAAI,OAAO,EAAE;AAAA,IACtB,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,WAAW,KAAa,UAAkB;AACxC,UAAM,gBAAgB,KAAK,OAAO,MAAM,CAAC;AACzC,kBAAc,GAAG,IAAI;AACrB,UAAM,iBAAiB,cACpB,OAAO,OAAK,MAAM,MAAS,EAC3B,OAAO,OAAK,MAAM,EAAE;AAEvB,SAAK,MAAM,SAAS,cAAc;AAAA,EACpC;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,OAAO,IAAI,CAAC,OAAO,MAAM;AAC3C,aAAO;AAAA,QAAC;AAAA;AAAA,UAGN;AAAA,YAAC;AAAA;AAAA,cACC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA,cACnD;AAAA,cACA,SAAS,KAAK,MAAM,OAAO,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA,cAC1C,UAAU,KAAK,WAAW,KAAK,MAAM,CAAC;AAAA;AAAA,UACxC;AAAA;AAAA,QAPK;AAAA,MAQP;AAAA,IACF,CAAC;AAED,WACE,oBAAC,QAAG,WAAU,iBACX,kBACH;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cd16dc68fc42c219caf080518fd74984d4f8d81e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return aa=function(){return a},a}aa();class OQ extends Mn.Component{get values(){aa().f[0]++;const e=(aa().s[1]++,aa().b[0][0]++,this.props.value||(aa().b[0][1]++,this.props.default)||(aa().b[0][2]++,[]));return aa().s[2]++,e[e.length-1]!==""?(aa().b[1][0]++,aa().s[3]++,e.concat("")):(aa().b[1][1]++,aa().s[4]++,e)}changeFont(e,t){aa().f[1]++;const r=(aa().s[5]++,this.values.slice(0));aa().s[6]++,r[e]=t;const i=(aa().s[7]++,r.filter(o=>(aa().f[2]++,aa().s[8]++,o!==void 0)).filter(o=>(aa().f[3]++,aa().s[9]++,o!=="")));aa().s[10]++,this.props.onChange(i)}render(){aa().f[4]++;const e=(aa().s[11]++,this.values.map((t,r)=>{var i;return aa().f[5]++,aa().s[12]++,G.jsx("li",{children:G.jsx(Lv,{"aria-label":(aa().b[2][0]++,this.props["aria-label"]||(aa().b[2][1]++,this.props.name)),value:t,options:(i=this.props.fonts)==null?void 0:i.map(o=>(aa().f[6]++,aa().s[13]++,[o,o])),onChange:this.changeFont.bind(this,r)})},r)}));return aa().s[14]++,G.jsx("ul",{className:"maputnik-font",children:e})}}sn(OQ,"defaultProps",(aa().s[0]++,{fonts:[]}));function Ii(){var n="/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",e="8a7e9c26497bbcdc9141a7bf10d3ed50f729d679",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",statementMap:{0:{start:{line:13,column:23},end:{line:13,column:117}},1:{start:{line:16,column:24},end:{line:28,column:5}},2:{start:{line:26,column:30},end:{line:26,column:81}},3:{start:{line:29,column:4},end:{line:115,column:5}},4:{start:{line:31,column:8},end:{line:38,column:10}},5:{start:{line:40,column:24},end:{line:40,column:101}},6:{start:{line:40,column:82},end:{line:40,column:100}},7:{start:{line:41,column:8},end:{line:47,column:10}},8:{start:{line:52,column:8},end:{line:68,column:9}},9:{start:{line:53,column:26},end:{line:53,column:59}},10:{start:{line:54,column:10},end:{line:60,column:12}},11:{start:{line:58,column:42},end:{line:58,column:48}},12:{start:{line:62,column:10},end:{line:67,column:12}},13:{start:{line:70,column:8},end:{line:75,column:10}},14:{start:{line:77,column:8},end:{line:82,column:10}},15:{start:{line:84,column:8},end:{line:112,column:9}},16:{start:{line:85,column:10},end:{line:91,column:12}},17:{start:{line:93,column:10},end:{line:111,column:11}},18:{start:{line:94,column:12},end:{line:101,column:14}},19:{start:{line:103,column:12},end:{line:110,column:14}},20:{start:{line:114,column:8},end:{line:114,column:20}},21:{start:{line:118,column:4},end:{line:118,column:124}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:15},end:{line:116,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:26,column:16},end:{line:26,column:17}},loc:{start:{line:26,column:30},end:{line:26,column:81}},line:26},2:{name:"(anonymous_2)",decl:{start:{line:40,column:75},end:{line:40,column:76}},loc:{start:{line:40,column:82},end:{line:40,column:100}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:58,column:35},end:{line:58,column:36}},loc:{start:{line:58,column:42},end:{line:58,column:48}},line:58},4:{name:"(anonymous_4)",decl:{start:{line:117,column:2},end:{line:117,column:3}},loc:{start:{line:117,column:11},end:{line:119,column:3}},line:117}},branchMap:{0:{loc:{start:{line:29,column:4},end:{line:115,column:5}},type:"switch",locations:[{start:{line:30,column:6},end:{line:38,column:10}},{start:{line:39,column:6},end:{line:48,column:7}},{start:{line:49,column:6},end:{line:49,column:27}},{start:{line:50,column:6},end:{line:50,column:23}},{start:{line:51,column:6},end:{line:68,column:9}},{start:{line:69,column:6},end:{line:75,column:10}},{start:{line:76,column:6},end:{line:82,column:10}},{start:{line:83,column:6},end:{line:112,column:9}},{start:{line:113,column:6},end:{line:114,column:20}}],line:29},1:{loc:{start:{line:40,column:36},end:{line:40,column:69}},type:"binary-expr",locations:[{start:{line:40,column:36},end:{line:40,column:63}},{start:{line:40,column:67},end:{line:40,column:69}}],line:40},2:{loc:{start:{line:52,column:8},end:{line:68,column:9}},type:"if",locations:[{start:{line:52,column:8},end:{line:68,column:9}},{start:{line:61,column:15},end:{line:68,column:9}}],line:52},3:{loc:{start:{line:53,column:26},end:{line:53,column:59}},type:"binary-expr",locations:[{start:{line:53,column:26},end:{line:53,column:53}},{start:{line:53,column:57},end:{line:53,column:59}}],line:53},4:{loc:{start:{line:84,column:8},end:{line:112,column:9}},type:"if",locations:[{start:{line:84,column:8},end:{line:112,column:9}},{start:{line:92,column:15},end:{line:112,column:9}}],line:84},5:{loc:{start:{line:93,column:10},end:{line:111,column:11}},type:"if",locations:[{start:{line:93,column:10},end:{line:111,column:11}},{start:{line:102,column:17},end:{line:111,column:11}}],line:93}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0,0,0,0,0,0,0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx"],names:[],mappings:"AAyDM;AAzDN,OAAO,WAA6B;AAEpC,OAAO,gBAAqC;AAC5C,OAAO,iBAAuC;AAC9C,OAAO,mBAA2C;AAClD,OAAO,iBAAuC;AAC9C,OAAO,gBAAqC;AAC5C,OAAO,uBAAmD;AAC1D,OAAO,eAAmC;AAC1C,OAAO,uBAAmD;AAC1D,OAAO,eAAmC;AAC1C,OAAO,gBAAgB;AAEvB,MAAM,iBAAiB,CAAC,sBAAsB,gBAAgB,gBAAgB,0BAA0B,YAAY;AA0BpH,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EAErE,aAAa;AACX,UAAM,cAAc;AAAA,MAClB,OAAO,KAAK,MAAM;AAAA,MAClB,WAAW,KAAK,MAAM;AAAA,MACtB,OAAO,KAAK,MAAM;AAAA,MAClB,QAAQ,KAAK,MAAM;AAAA,MACnB,OAAO,KAAK,MAAM;AAAA,MAClB,OAAO,KAAK,MAAM;AAAA,MAClB,SAAS,KAAK,MAAM,WAAW;AAAA,MAC/B,MAAM,KAAK,MAAM;AAAA,MACjB,eAAe,sBAAsB,KAAK,MAAM;AAAA,MAChD,UAAU,CAAC,aAAmE,KAAK,MAAM,SAAU,KAAK,MAAM,WAAW,QAAQ;AAAA,MACjI,cAAc,KAAK,MAAM,YAAY;AAAA,IACvC;AACA,YAAO,KAAK,MAAM,WAAW,MAAM;AAAA,MACnC,KAAK;AAAU,eACb;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,KAAK,KAAK,MAAM,UAAU;AAAA,YAC1B,KAAK,KAAK,MAAM,UAAU;AAAA;AAAA,QAC5B;AAAA,MAEF,KAAK,QAAQ;AACX,cAAM,UAAU,OAAO,KAAK,KAAK,MAAM,UAAU,UAAU,CAAC,CAAC,EAAE,IAAI,OAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;AAE1F,eAAO;AAAA,UAAC;AAAA;AAAA,YACL,GAAG;AAAA,YACJ;AAAA;AAAA,QACF;AAAA,MACF;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,YAAI,eAAe,QAAQ,KAAK,MAAM,SAAU,KAAK,GAAG;AACtD,gBAAM,UAAU,KAAK,MAAM,UAAU,UAAU,CAAC;AAChD,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA,cACJ,SAAS,QAAQ,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA;AAAA,UAClC;AAAA,QACF,OAAO;AACL,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA;AAAA,UACN;AAAA,QACF;AAAA,MACF,KAAK;AAAS,eACZ;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,MAEF,KAAK;AAAW,eACd;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,MAEF,KAAK;AACH,YAAG,KAAK,MAAM,cAAc,aAAa;AACvC,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA,cACJ,OAAO,KAAK,MAAM,UAAU;AAAA;AAAA,UAC9B;AAAA,QACF,OAAO;AACL,cAAI,KAAK,MAAM,UAAU,QAAQ;AAC/B,mBAAO;AAAA,cAAC;AAAA;AAAA,gBACL,GAAG;AAAA,gBACJ,MAAM,KAAK,MAAM,UAAU;AAAA,gBAC3B,QAAQ,KAAK,MAAM,UAAU;AAAA;AAAA,YAC/B;AAAA,UACF,OAAO;AACL,mBAAO;AAAA,cAAC;AAAA;AAAA,gBACL,GAAG;AAAA,gBACJ,WAAW,KAAK,MAAM;AAAA,gBACtB,MAAM,KAAK,MAAM,UAAU;AAAA;AAAA,YAC7B;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAS,eAAO;AAAA,IAChB;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WACE,oBAAC,SAAI,eAAa,gBAAc,KAAK,MAAM,WACxC,eAAK,WAAW,GACnB;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8a7e9c26497bbcdc9141a7bf10d3ed50f729d679"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ii=function(){return a},a}Ii();const f8e=(Ii().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);let Xy=class extends Mn.Component{childNodes(){var t,r;Ii().f[0]++;const e=(Ii().s[1]++,{error:this.props.error,fieldSpec:this.props.fieldSpec,label:this.props.label,action:this.props.action,style:this.props.style,value:this.props.value,default:(t=this.props.fieldSpec)==null?void 0:t.default,name:this.props.fieldName,"data-wd-key":"spec-field-input:"+this.props.fieldName,onChange:i=>(Ii().f[1]++,Ii().s[2]++,this.props.onChange(this.props.fieldName,i)),"aria-label":this.props["aria-label"]});switch(Ii().s[3]++,(r=this.props.fieldSpec)==null?void 0:r.type){case"number":return Ii().b[0][0]++,Ii().s[4]++,G.jsx(qf,{...e,min:this.props.fieldSpec.minimum,max:this.props.fieldSpec.maximum});case"enum":Ii().b[0][1]++;{const i=(Ii().s[5]++,Object.keys((Ii().b[1][0]++,this.props.fieldSpec.values||(Ii().b[1][1]++,[]))).map(o=>(Ii().f[2]++,Ii().s[6]++,[o,QI(o)])));return Ii().s[7]++,G.jsx(bk,{...e,options:i})}case"resolvedImage":Ii().b[0][2]++;case"formatted":Ii().b[0][3]++;case"string":if(Ii().b[0][4]++,Ii().s[8]++,f8e.indexOf(this.props.fieldName)>=0){Ii().b[2][0]++;const i=(Ii().s[9]++,Ii().b[3][0]++,this.props.fieldSpec.values||(Ii().b[3][1]++,[]));return Ii().s[10]++,G.jsx(Lv,{...e,options:i.map(o=>(Ii().f[3]++,Ii().s[11]++,[o,o]))})}else return Ii().b[2][1]++,Ii().s[12]++,G.jsx(Qd,{...e});case"color":return Ii().b[0][5]++,Ii().s[13]++,G.jsx(wQ,{...e});case"boolean":return Ii().b[0][6]++,Ii().s[14]++,G.jsx(_k,{...e});case"array":return Ii().b[0][7]++,Ii().s[15]++,this.props.fieldName==="text-font"?(Ii().b[4][0]++,Ii().s[16]++,G.jsx(OQ,{...e,fonts:this.props.fieldSpec.values})):(Ii().b[4][1]++,Ii().s[17]++,this.props.fieldSpec.length?(Ii().b[5][0]++,Ii().s[18]++,G.jsx(MQ,{...e,type:this.props.fieldSpec.value,length:this.props.fieldSpec.length})):(Ii().b[5][1]++,Ii().s[19]++,G.jsx(EQ,{...e,fieldSpec:this.props.fieldSpec,type:this.props.fieldSpec.value})));default:return Ii().b[0][8]++,Ii().s[20]++,null}}render(){return Ii().f[4]++,Ii().s[21]++,G.jsx("div",{"data-wd-key":"spec-field:"+this.props.fieldName,children:this.childNodes()})}};function ql(){var n="/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",e="81a841bc0059d656029a86501c08aa823d58e2d6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",statementMap:{0:{start:{line:9,column:4},end:{line:9,column:17}},1:{start:{line:10,column:4},end:{line:10,column:56}},2:{start:{line:11,column:4},end:{line:13,column:6}},3:{start:{line:15,column:16},end:{line:19,column:3}},4:{start:{line:16,column:4},end:{line:18,column:7}},5:{start:{line:21,column:4},end:{line:41,column:9}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:21},end:{line:14,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:15,column:16},end:{line:15,column:17}},loc:{start:{line:15,column:25},end:{line:19,column:3}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:42,column:3}},line:20}},branchMap:{0:{loc:{start:{line:22,column:6},end:{line:29,column:10}},type:"binary-expr",locations:[{start:{line:22,column:6},end:{line:22,column:26}},{start:{line:22,column:46},end:{line:29,column:10}}],line:22},1:{loc:{start:{line:30,column:6},end:{line:30,column:130}},type:"binary-expr",locations:[{start:{line:30,column:6},end:{line:30,column:27}},{start:{line:30,column:47},end:{line:30,column:130}}],line:30},2:{loc:{start:{line:33,column:6},end:{line:40,column:7}},type:"binary-expr",locations:[{start:{line:33,column:6},end:{line:33,column:26}},{start:{line:33,column:46},end:{line:40,column:7}}],line:33},3:{loc:{start:{line:37,column:28},end:{line:37,column:60}},type:"cond-expr",locations:[{start:{line:37,column:49},end:{line:37,column:51}},{start:{line:37,column:54},end:{line:37,column:60}}],line:37}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx"],names:[],mappings:"AAiCW,SAGD,KAHC;AAjCX,OAAO,WAAgD;AACvD,OAAO,mBAAmB;AAC1B,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAY7B,qBAAqB,iBAAiB,MAAM,UAAwC;AAAA,EAClF;AAAA,EAEA,YAAa,OAAsB;AACjC,UAAM,KAAK;AACX,SAAK,WAAW,iBAAiB,iBAAiB;AAClD,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAEA,SAAU;AACR,WAAO,qBAAC,SAAI,WAAU,wBAAuB,MAAK,SAAQ,mBAAiB,KAAK,UAC7E;AAAA,WAAK,MAAM,aACV,oBAAC,SAAI,WAAU,8BACb;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,KAAK,MAAM;AAAA,UAClB,aAAa,KAAK;AAAA,UAClB,WAAW,KAAK,MAAM;AAAA;AAAA,MACxB,GACF;AAAA,MAED,CAAC,KAAK,MAAM,aACX,oBAAC,SAAI,WAAU,8BACZ,eAAK,MAAM,OACd;AAAA,MAEF,oBAAC,SAAI,WAAU,+BACZ,eAAK,MAAM,QACd;AAAA,MACA,oBAAC,SAAI,WAAU,gCACZ,eAAK,MAAM,UACd;AAAA,MACC,KAAK,MAAM,aACV;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,UAEjD,8BAAC,OAAI,WAAW,KAAK,MAAM,WAAW;AAAA;AAAA,MACxC;AAAA,OAEJ;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"81a841bc0059d656029a86501c08aa823d58e2d6"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ql=function(){return a},a}ql();class Sb extends Mn.Component{constructor(t){ql().f[0]++,ql().s[0]++;super(t);sn(this,"_labelId");sn(this,"onToggleDoc",(ql().s[3]++,t=>{ql().f[1]++,ql().s[4]++,this.setState({showDoc:t})}));ql().s[1]++,this._labelId=vv("fieldset_label_"),ql().s[2]++,this.state={showDoc:!1}}render(){return ql().f[2]++,ql().s[5]++,G.jsxs("div",{className:"maputnik-input-block",role:"group","aria-labelledby":this._labelId,children:[(ql().b[0][0]++,this.props.fieldSpec&&(ql().b[0][1]++,G.jsx("div",{className:"maputnik-input-block-label",children:G.jsx(KI,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(ql().b[1][0]++,!this.props.fieldSpec&&(ql().b[1][1]++,G.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),G.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),G.jsx("div",{className:"maputnik-input-block-content",children:this.props.children}),(ql().b[2][0]++,this.props.fieldSpec&&(ql().b[2][1]++,G.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(ql().b[3][0]++,""):(ql().b[3][1]++,"none")},children:G.jsx(PI,{fieldSpec:this.props.fieldSpec})})))]})}}function Yo(){var n="/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx",e="adadf49dc291f98804cd53f74e320ed51f276886",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx",statementMap:{0:{start:{line:6,column:16},end:{line:16,column:1}},1:{start:{line:7,column:15},end:{line:7,column:20}},2:{start:{line:8,column:27},end:{line:8,column:87}},3:{start:{line:9,column:17},end:{line:9,column:22}},4:{start:{line:10,column:15},end:{line:10,column:23}},5:{start:{line:11,column:23},end:{line:11,column:28}},6:{start:{line:12,column:16},end:{line:12,column:21}},7:{start:{line:13,column:16},end:{line:13,column:21}},8:{start:{line:14,column:19},end:{line:14,column:24}},9:{start:{line:15,column:17},end:{line:15,column:22}},10:{start:{line:19,column:22},end:{line:19,column:48}},11:{start:{line:20,column:24},end:{line:20,column:42}},12:{start:{line:22,column:4},end:{line:27,column:5}},13:{start:{line:23,column:6},end:{line:23,column:42}},14:{start:{line:25,column:6},end:{line:25,column:55}},15:{start:{line:26,column:6},end:{line:26,column:24}},16:{start:{line:28,column:4},end:{line:36,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:9},end:{line:7,column:10}},loc:{start:{line:7,column:15},end:{line:7,column:20}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:8,column:8},end:{line:8,column:9}},loc:{start:{line:8,column:27},end:{line:8,column:87}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:9,column:11},end:{line:9,column:12}},loc:{start:{line:9,column:17},end:{line:9,column:22}},line:9},3:{name:"(anonymous_3)",decl:{start:{line:10,column:9},end:{line:10,column:10}},loc:{start:{line:10,column:15},end:{line:10,column:23}},line:10},4:{name:"(anonymous_4)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:23},end:{line:11,column:28}},line:11},5:{name:"(anonymous_5)",decl:{start:{line:12,column:10},end:{line:12,column:11}},loc:{start:{line:12,column:16},end:{line:12,column:21}},line:12},6:{name:"(anonymous_6)",decl:{start:{line:13,column:10},end:{line:13,column:11}},loc:{start:{line:13,column:16},end:{line:13,column:21}},line:13},7:{name:"(anonymous_7)",decl:{start:{line:14,column:13},end:{line:14,column:14}},loc:{start:{line:14,column:19},end:{line:14,column:24}},line:14},8:{name:"(anonymous_8)",decl:{start:{line:15,column:11},end:{line:15,column:12}},loc:{start:{line:15,column:17},end:{line:15,column:22}},line:15},9:{name:"(anonymous_9)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:11},end:{line:37,column:3}},line:18}},branchMap:{0:{loc:{start:{line:8,column:27},end:{line:8,column:87}},type:"cond-expr",locations:[{start:{line:8,column:71},end:{line:8,column:79}},{start:{line:8,column:82},end:{line:8,column:87}}],line:8},1:{loc:{start:{line:22,column:4},end:{line:27,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:27,column:5}},{start:{line:24,column:11},end:{line:27,column:5}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx"],names:[],mappings:"AA0CM;AA1CN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,eAA0D;AACjE,OAAO,cAAc;AAGrB,MAAM,UAAU;AAAA,EACd,OAAO,MAAM;AAAA,EACb,MAAM,CAAC,EAAC,UAAS,MAAY,OAAO,KAAK,UAAU,MAAM,EAAE,UAAU,IAAI,WAAW;AAAA,EACpF,SAAS,MAAM;AAAA,EACf,OAAO,MAAM;AAAA,EACb,eAAe,MAAM;AAAA,EACrB,QAAQ,MAAM;AAAA,EACd,QAAQ,MAAM;AAAA,EACd,WAAW,MAAM;AAAA,EACjB,SAAS,MAAM;AACjB;AAMA,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY,KAAK,MAAM,WAAW;AAExC,UAAM,cAAc,QAAQ,SAAU;AAEtC,QAAI;AACJ,QAAI,aAAa;AACf,kBAAY,YAAY,KAAK,KAAK;AAAA,IACpC,OACK;AACH,cAAQ,KAAK,yBAAyB,SAAS;AAC/C,kBAAY;AAAA,IACd;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,KAAK,MAAM;AAAA,QAClB,QAAQ,KAAK,MAAM;AAAA,QACnB,WAAW,KAAK,MAAM;AAAA,QAEtB,8BAAC,aAAW,GAAG,KAAK,OAAO;AAAA;AAAA,IAC7B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"adadf49dc291f98804cd53f74e320ed51f276886"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Yo=function(){return a},a}Yo();const p8e=(Yo().s[0]++,{color:()=>(Yo().f[0]++,Yo().s[1]++,la),enum:({fieldSpec:n})=>(Yo().f[1]++,Yo().s[2]++,Object.keys(n.values).length<=3?(Yo().b[0][0]++,Sb):(Yo().b[0][1]++,la)),boolean:()=>(Yo().f[2]++,Yo().s[3]++,la),array:()=>(Yo().f[3]++,Yo().s[4]++,Sb),resolvedImage:()=>(Yo().f[4]++,Yo().s[5]++,la),number:()=>(Yo().f[5]++,Yo().s[6]++,la),string:()=>(Yo().f[6]++,Yo().s[7]++,la),formatted:()=>(Yo().f[7]++,Yo().s[8]++,la),padding:()=>(Yo().f[8]++,Yo().s[9]++,la)});class m8e extends Mn.Component{render(){var i;Yo().f[9]++;const e=(Yo().s[10]++,(i=this.props.fieldSpec)==null?void 0:i.type),t=(Yo().s[11]++,p8e[e]);let r;return Yo().s[12]++,t?(Yo().b[1][0]++,Yo().s[13]++,r=t(this.props)):(Yo().b[1][1]++,Yo().s[14]++,console.warn("No such type for '%s'",e),Yo().s[15]++,r=la),Yo().s[16]++,G.jsx(r,{label:this.props.label,action:this.props.action,fieldSpec:this.props.fieldSpec,children:G.jsx(Xy,{...this.props})})}}function pA(){var n="/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",e="e12cc9e5c91261e7ee42544334f5ab56bdde4e3a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:11,column:4},end:{line:48,column:5}},2:{start:{line:12,column:6},end:{line:20,column:8}},3:{start:{line:21,column:6},end:{line:29,column:8}},4:{start:{line:30,column:6},end:{line:40,column:7}},5:{start:{line:31,column:8},end:{line:39,column:10}},6:{start:{line:41,column:6},end:{line:45,column:11}},7:{start:{line:47,column:6},end:{line:47,column:77}},8:{start:{line:51,column:29},end:{line:51,column:76}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:49,column:3}},line:8}},branchMap:{0:{loc:{start:{line:11,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:11,column:4},end:{line:48,column:5}},{start:{line:46,column:11},end:{line:48,column:5}}],line:11},1:{loc:{start:{line:30,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:40,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:30}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx"],names:[],mappings:"AA2BY,cAsBC,YAtBD;AA3BZ,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,SAAQ,aAAa,qBAAoB;AACzC,SAAQ,0BAAyB;AACjC,SAA0B,uBAAuB;AASjD,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,QAAI,qBAAqB,qBAAqB;AAE9C,QAAI,KAAK,MAAM,UAAU,WAAW,WAAW,SAAS,MAAM,GAAG;AAC/D,8BACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,uBAAuB;AAAA,UAEhC,8BAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,SAAQ,GAAG,SAAQ,aAC1E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA;AAAA,MACF;AAGF,4BAAsB;AAAA,QAAC;AAAA;AAAA,UACrB,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,uCAAuC;AAAA,UAEhD,8BAAC,eAAY;AAAA;AAAA,MACf;AAEA,UAAI,KAAK,MAAM,UAAU,eAAe,MAAM,eAAe;AAC3D,8BAAsB;AAAA,UAAC;AAAA;AAAA,YACrB,WAAU;AAAA,YACV,SAAS,KAAK,MAAM;AAAA,YACpB,OAAO,EAAE,mCAAmC;AAAA,YAE5C,8BAAC,iBAAc;AAAA;AAAA,QACjB;AAAA,MACF;AACA,aAAO,qBAAC,SACL;AAAA;AAAA,QACA;AAAA,QACA;AAAA,SACH;AAAA,IACF,OACK;AACH,aAAO,oBAAC,SAAK,iCAAsB;AAAA,IACrC;AAAA,EACF;AACF;AAEA,MAAM,uBAAuB,gBAAgB,EAAE,4BAA4B;AAC3E,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e12cc9e5c91261e7ee42544334f5ab56bdde4e3a"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return pA=function(){return a},a}pA();class g8e extends Mn.Component{render(){pA().f[0]++;const e=(pA().s[0]++,this.props.t);let t,r,i;return pA().s[1]++,this.props.fieldSpec.expression.parameters.includes("zoom")?(pA().b[0][0]++,pA().s[2]++,i=G.jsx(is,{className:"maputnik-make-zoom-function",onClick:this.props.onExpressionClick,title:e("Convert to expression"),children:G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:Mb})})}),pA().s[3]++,t=G.jsx(is,{className:"maputnik-make-zoom-function",onClick:this.props.onZoomClick,title:e("Convert property into a zoom function"),children:G.jsx(Bre,{})}),pA().s[4]++,this.props.fieldSpec["property-type"]==="data-driven"?(pA().b[1][0]++,pA().s[5]++,r=G.jsx(is,{className:"maputnik-make-data-function",onClick:this.props.onDataClick,title:e("Convert property to data function"),children:G.jsx(Ire,{})})):pA().b[1][1]++,pA().s[6]++,G.jsxs("div",{children:[i,r,t]})):(pA().b[0][1]++,pA().s[7]++,G.jsx("div",{children:i}))}}const y8e=(pA().s[8]++,No()(g8e));function Sf(){var n="/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",e="60f6f0f35f3e44d7e7f08e2966cfff09ee69557d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",statementMap:{0:{start:{line:7,column:24},end:{line:9,column:3}},1:{start:{line:11,column:45},end:{line:11,column:55}},2:{start:{line:12,column:40},end:{line:20,column:5}},3:{start:{line:21,column:18},end:{line:21,column:53}},4:{start:{line:22,column:4},end:{line:31,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:32,column:3}},line:10}},branchMap:{0:{loc:{start:{line:28,column:34},end:{line:28,column:60}},type:"binary-expr",locations:[{start:{line:28,column:34},end:{line:28,column:54}},{start:{line:28,column:58},end:{line:28,column:60}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx"],names:[],mappings:"AA4BwB;AA5BxB,OAAO,WAAW;AAElB,OAAO,eAAiC;AACxC,OAAO,qBAAqB;AAE5B,OAAO,wBAAwB;AAe/B,qBAAqB,qBAAqB,MAAM,UAA6B;AAAA,EAC3E,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,EACX;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,QAAQ,WAAW,UAAS,IAAI,KAAK;AAE5C,UAAM,cAAc;AAAA,MAAC;AAAA;AAAA,QACnB,WAAW,KAAK,MAAM;AAAA,QACtB,aAAa,KAAK,MAAM;AAAA,QACxB,aAAa,KAAK,MAAM;AAAA,QACxB,mBAAmB,KAAK,MAAM;AAAA;AAAA,IAChC;AAEA,UAAM,QAAQ,OAAQ,YAAU,MAAI,SAAgB;AAEpD,WAAO;AAAA,MAAC;AAAA;AAAA,QACL,GAAG,KAAK;AAAA,QACT;AAAA,QACA,WAAW,KAAK,MAAM;AAAA,QACtB,OAAO,mBAAmB,KAAK,MAAM,aAAa,EAAE;AAAA,QACpD,QAAQ;AAAA;AAAA,IACV;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"60f6f0f35f3e44d7e7f08e2966cfff09ee69557d"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Sf=function(){return a},a}Sf();class BQ extends Mn.Component{render(){Sf().f[0]++;const{errors:e,fieldName:t,fieldType:r}=(Sf().s[1]++,this.props),i=(Sf().s[2]++,G.jsx(y8e,{fieldSpec:this.props.fieldSpec,onZoomClick:this.props.onZoomClick,onDataClick:this.props.onDataClick,onExpressionClick:this.props.onExpressionClick})),o=(Sf().s[3]++,e[r+"."+t]);return Sf().s[4]++,G.jsx(m8e,{...this.props,error:o,fieldSpec:this.props.fieldSpec,label:Vw((Sf().b[0][0]++,this.props.fieldName||(Sf().b[0][1]++,""))),action:i})}}sn(BQ,"defaultProps",(Sf().s[0]++,{errors:{}}));function vc(){var n="/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",e="e8906f642b33ab7d7a780fc0db870f7e4872d29c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",statementMap:{0:{start:{line:2,column:12},end:{line:2,column:17}},1:{start:{line:3,column:12},end:{line:3,column:17}},2:{start:{line:4,column:2},end:{line:10,column:3}},3:{start:{line:5,column:4},end:{line:5,column:14}},4:{start:{line:6,column:9},end:{line:10,column:3}},5:{start:{line:7,column:4},end:{line:7,column:13}},6:{start:{line:9,column:4},end:{line:9,column:13}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:1,column:15},end:{line:1,column:16}},loc:{start:{line:1,column:36},end:{line:11,column:1}},line:1}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:10,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:10,column:3}},{start:{line:6,column:9},end:{line:10,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:10,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:10,column:3}},{start:{line:8,column:9},end:{line:10,column:3}}],line:6}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts"],names:[],mappings:"AAAA,wBAAwB,MAAuB,MAAsB;AACnE,QAAM,IAAI,CAAC;AACX,QAAM,IAAI,CAAC;AAEX,MAAG,IAAI,GAAG;AACR,WAAO;AAAA,EACT,WACQ,IAAI,GAAG;AACb,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e8906f642b33ab7d7a780fc0db870f7e4872d29c"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return vc=function(){return a},a}vc();function IQ(n,e){vc().f[0]++;const t=(vc().s[0]++,+n),r=(vc().s[1]++,+e);return vc().s[2]++,t<r?(vc().b[0][0]++,vc().s[3]++,-1):(vc().b[0][1]++,vc().s[4]++,t>r?(vc().b[1][0]++,vc().s[5]++,1):(vc().b[1][1]++,vc().s[6]++,0))}function wh(){var n="/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",e="2f98128f0f990b67a049c58486c1fab4310fbcfa",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",statementMap:{0:{start:{line:2,column:2},end:{line:4,column:3}},1:{start:{line:3,column:4},end:{line:3,column:24}},2:{start:{line:5,column:19},end:{line:11,column:3}},3:{start:{line:12,column:2},end:{line:12,column:35}}},fnMap:{0:{name:"findDefaultFromSpec",decl:{start:{line:1,column:16},end:{line:1,column:35}},loc:{start:{line:1,column:42},end:{line:13,column:1}},line:1}},branchMap:{0:{loc:{start:{line:2,column:2},end:{line:4,column:3}},type:"if",locations:[{start:{line:2,column:2},end:{line:4,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:2},1:{loc:{start:{line:12,column:9},end:{line:12,column:34}},type:"binary-expr",locations:[{start:{line:12,column:9},end:{line:12,column:28}},{start:{line:12,column:32},end:{line:12,column:34}}],line:12}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts"],names:[],mappings:"AAGO,gBAAS,oBAAoB,MAAyE;AAC3G,MAAI,OAAO,UAAU,eAAe,KAAK,MAAM,SAAS,GAAG;AACzD,WAAO,KAAK;AAAA,EACd;AAEA,QAAM,WAAW;AAAA,IACf,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,EACZ;AAEA,SAAO,SAAS,KAAK,IAAI,KAAK;AAChC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2f98128f0f990b67a049c58486c1fab4310fbcfa"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return wh=function(){return a},a}wh();function Id(n){if(wh().f[0]++,wh().s[0]++,Object.prototype.hasOwnProperty.call(n,"default"))return wh().b[0][0]++,wh().s[1]++,n.default;wh().b[0][1]++;const e=(wh().s[2]++,{color:"#000000",string:"",boolean:!1,number:0,array:[]});return wh().s[3]++,wh().b[1][0]++,e[n.type]||(wh().b[1][1]++,"")}function Jy(){var n="/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",e="04a32613b456a577be3ef20dcd48d43233f27837",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:17,column:6}},2:{start:{line:20,column:25},end:{line:20,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:18,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,SAAQ,gBAAe;AACvB,SAA0B,uBAAuB;AAQjD,MAAM,iCAAiC,MAAM,UAAyC;AAAA,EACpF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,SAAS,KAAK,MAAM;AAAA,QACpB,OAAO,EAAE,6BAA6B;AAAA,QAEtC,8BAAC,YAAS;AAAA;AAAA,IACZ;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"04a32613b456a577be3ef20dcd48d43233f27837"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Jy=function(){return a},a}Jy();class v8e extends Mn.Component{render(){Jy().f[0]++;const e=(Jy().s[0]++,this.props.t);return Jy().s[1]++,G.jsx(is,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:e("Remove zoom level from stop"),children:G.jsx(Iv,{})})}}const kQ=(Jy().s[2]++,No()(v8e));function Wt(){var n="/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",e="97b6de35ac4a8f739cf06eabc39facf249622fab",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",statementMap:{0:{start:{line:19,column:2},end:{line:28,column:3}},1:{start:{line:20,column:4},end:{line:27,column:7}},2:{start:{line:21,column:6},end:{line:26,column:7}},3:{start:{line:22,column:8},end:{line:24,column:9}},4:{start:{line:23,column:10},end:{line:23,column:33}},5:{start:{line:25,column:8},end:{line:25,column:39}},6:{start:{line:29,column:2},end:{line:29,column:17}},7:{start:{line:32,column:10},end:{line:34,column:3}},8:{start:{line:36,column:20},end:{line:36,column:55}},9:{start:{line:37,column:4},end:{line:41,column:5}},10:{start:{line:38,column:6},end:{line:40,column:9}},11:{start:{line:44,column:20},end:{line:44,column:45}},12:{start:{line:45,column:4},end:{line:49,column:5}},13:{start:{line:46,column:6},end:{line:48,column:8}},14:{start:{line:50,column:4},end:{line:50,column:16}},15:{start:{line:53,column:4},end:{line:55,column:5}},16:{start:{line:54,column:6},end:{line:54,column:27}},17:{start:{line:56,column:4},end:{line:58,column:5}},18:{start:{line:57,column:6},end:{line:57,column:24}},19:{start:{line:59,column:4},end:{line:59,column:25}},20:{start:{line:62,column:4},end:{line:66,column:5}},21:{start:{line:63,column:6},end:{line:63,column:83}},22:{start:{line:65,column:6},end:{line:65,column:53}},23:{start:{line:70,column:26},end:{line:75,column:70}},24:{start:{line:71,column:6},end:{line:74,column:8}},25:{start:{line:75,column:22},end:{line:75,column:69}},26:{start:{line:76,column:20},end:{line:76,column:22}},27:{start:{line:77,column:4},end:{line:79,column:7}},28:{start:{line:78,column:6},end:{line:78,column:30}},29:{start:{line:80,column:4},end:{line:82,column:7}},30:{start:{line:83,column:4},end:{line:83,column:50}},31:{start:{line:83,column:39},end:{line:83,column:48}},32:{start:{line:85,column:13},end:{line:105,column:3}},33:{start:{line:86,column:4},end:{line:103,column:5}},34:{start:{line:87,column:6},end:{line:90,column:8}},35:{start:{line:92,column:24},end:{line:92,column:61}},36:{start:{line:93,column:6},end:{line:102,column:8}},37:{start:{line:104,column:4},end:{line:104,column:42}},38:{start:{line:107,column:18},end:{line:107,column:56}},39:{start:{line:108,column:4},end:{line:114,column:6}},40:{start:{line:115,column:25},end:{line:115,column:53}},41:{start:{line:116,column:25},end:{line:119,column:5}},42:{start:{line:120,column:4},end:{line:120,column:54}},43:{start:{line:123,column:25},end:{line:126,column:5}},44:{start:{line:127,column:4},end:{line:129,column:5}},45:{start:{line:128,column:6},end:{line:128,column:34}},46:{start:{line:130,column:4},end:{line:130,column:60}},47:{start:{line:133,column:4},end:{line:140,column:5}},48:{start:{line:134,column:6},end:{line:134,column:42}},49:{start:{line:136,column:6},end:{line:139,column:9}},50:{start:{line:143,column:4},end:{line:147,column:5}},51:{start:{line:144,column:6},end:{line:144,column:43}},52:{start:{line:146,column:6},end:{line:146,column:40}},53:{start:{line:148,column:4},end:{line:148,column:58}},54:{start:{line:151,column:14},end:{line:151,column:26}},55:{start:{line:152,column:4},end:{line:154,column:5}},56:{start:{line:153,column:6},end:{line:153,column:78}},57:{start:{line:156,column:4},end:{line:204,column:5}},58:{start:{line:157,column:6},end:{line:203,column:9}},59:{start:{line:158,column:26},end:{line:158,column:77}},60:{start:{line:159,column:20},end:{line:159,column:40}},61:{start:{line:160,column:26},end:{line:160,column:79}},62:{start:{line:161,column:22},end:{line:161,column:29}},63:{start:{line:162,column:46},end:{line:162,column:122}},64:{start:{line:163,column:26},end:{line:168,column:9}},65:{start:{line:167,column:33},end:{line:167,column:97}},66:{start:{line:170,column:8},end:{line:174,column:9}},67:{start:{line:171,column:10},end:{line:171,column:73}},68:{start:{line:173,column:10},end:{line:173,column:73}},69:{start:{line:175,column:24},end:{line:175,column:28}},70:{start:{line:176,column:8},end:{line:187,column:9}},71:{start:{line:177,column:10},end:{line:186,column:15}},72:{start:{line:182,column:37},end:{line:182,column:101}},73:{start:{line:188,column:8},end:{line:202,column:18}},74:{start:{line:198,column:41},end:{line:198,column:110}},75:{start:{line:205,column:4},end:{line:307,column:12}},76:{start:{line:216,column:39},end:{line:216,column:67}},77:{start:{line:234,column:43},end:{line:234,column:68}},78:{start:{line:249,column:39},end:{line:249,column:83}},79:{start:{line:265,column:42},end:{line:265,column:85}},80:{start:{line:310,column:21},end:{line:310,column:60}}},fnMap:{0:{name:"setStopRefs",decl:{start:{line:17,column:9},end:{line:17,column:20}},loc:{start:{line:17,column:35},end:{line:30,column:1}},line:17},1:{name:"(anonymous_1)",decl:{start:{line:20,column:30},end:{line:20,column:31}},loc:{start:{line:20,column:45},end:{line:27,column:5}},line:20},2:{name:"(anonymous_2)",decl:{start:{line:35,column:2},end:{line:35,column:3}},loc:{start:{line:35,column:22},end:{line:42,column:3}},line:35},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:48},end:{line:51,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:52,column:2},end:{line:52,column:3}},loc:{start:{line:52,column:34},end:{line:60,column:3}},line:52},5:{name:"(anonymous_5)",decl:{start:{line:61,column:2},end:{line:61,column:3}},loc:{start:{line:61,column:34},end:{line:67,column:3}},line:61},6:{name:"(anonymous_6)",decl:{start:{line:69,column:2},end:{line:69,column:3}},loc:{start:{line:69,column:26},end:{line:84,column:3}},line:69},7:{name:"(anonymous_7)",decl:{start:{line:70,column:36},end:{line:70,column:37}},loc:{start:{line:70,column:51},end:{line:75,column:5}},line:70},8:{name:"(anonymous_8)",decl:{start:{line:75,column:12},end:{line:75,column:13}},loc:{start:{line:75,column:22},end:{line:75,column:69}},line:75},9:{name:"(anonymous_9)",decl:{start:{line:77,column:26},end:{line:77,column:27}},loc:{start:{line:77,column:41},end:{line:79,column:5}},line:77},10:{name:"(anonymous_10)",decl:{start:{line:83,column:29},end:{line:83,column:30}},loc:{start:{line:83,column:39},end:{line:83,column:48}},line:83},11:{name:"(anonymous_11)",decl:{start:{line:85,column:13},end:{line:85,column:14}},loc:{start:{line:85,column:35},end:{line:105,column:3}},line:85},12:{name:"(anonymous_12)",decl:{start:{line:106,column:2},end:{line:106,column:3}},loc:{start:{line:106,column:41},end:{line:121,column:3}},line:106},13:{name:"(anonymous_13)",decl:{start:{line:122,column:2},end:{line:122,column:3}},loc:{start:{line:122,column:23},end:{line:131,column:3}},line:122},14:{name:"(anonymous_14)",decl:{start:{line:132,column:2},end:{line:132,column:3}},loc:{start:{line:132,column:26},end:{line:141,column:3}},line:132},15:{name:"(anonymous_15)",decl:{start:{line:142,column:2},end:{line:142,column:3}},loc:{start:{line:142,column:40},end:{line:149,column:3}},line:142},16:{name:"(anonymous_16)",decl:{start:{line:150,column:2},end:{line:150,column:3}},loc:{start:{line:150,column:11},end:{line:308,column:3}},line:150},17:{name:"(anonymous_17)",decl:{start:{line:157,column:46},end:{line:157,column:47}},loc:{start:{line:157,column:61},end:{line:203,column:7}},line:157},18:{name:"(anonymous_18)",decl:{start:{line:167,column:20},end:{line:167,column:21}},loc:{start:{line:167,column:33},end:{line:167,column:97}},line:167},19:{name:"(anonymous_19)",decl:{start:{line:182,column:24},end:{line:182,column:25}},loc:{start:{line:182,column:37},end:{line:182,column:101}},line:182},20:{name:"(anonymous_20)",decl:{start:{line:198,column:24},end:{line:198,column:25}},loc:{start:{line:198,column:41},end:{line:198,column:110}},line:198},21:{name:"(anonymous_21)",decl:{start:{line:216,column:26},end:{line:216,column:27}},loc:{start:{line:216,column:39},end:{line:216,column:67}},line:216},22:{name:"(anonymous_22)",decl:{start:{line:234,column:26},end:{line:234,column:27}},loc:{start:{line:234,column:43},end:{line:234,column:68}},line:234},23:{name:"(anonymous_23)",decl:{start:{line:249,column:26},end:{line:249,column:27}},loc:{start:{line:249,column:39},end:{line:249,column:83}},line:249},24:{name:"(anonymous_24)",decl:{start:{line:265,column:26},end:{line:265,column:27}},loc:{start:{line:265,column:42},end:{line:265,column:85}},line:265}},branchMap:{0:{loc:{start:{line:19,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:28,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},1:{loc:{start:{line:19,column:6},end:{line:19,column:38}},type:"binary-expr",locations:[{start:{line:19,column:6},end:{line:19,column:17}},{start:{line:19,column:21},end:{line:19,column:38}}],line:19},2:{loc:{start:{line:21,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:21,column:6},end:{line:26,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:21},3:{loc:{start:{line:22,column:8},end:{line:24,column:9}},type:"if",locations:[{start:{line:22,column:8},end:{line:24,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},4:{loc:{start:{line:37,column:4},end:{line:41,column:5}},type:"if",locations:[{start:{line:37,column:4},end:{line:41,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},5:{loc:{start:{line:45,column:4},end:{line:49,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:49,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},6:{loc:{start:{line:53,column:4},end:{line:55,column:5}},type:"if",locations:[{start:{line:53,column:4},end:{line:55,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53},7:{loc:{start:{line:56,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:56,column:4},end:{line:58,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},8:{loc:{start:{line:62,column:4},end:{line:66,column:5}},type:"if",locations:[{start:{line:62,column:4},end:{line:66,column:5}},{start:{line:64,column:11},end:{line:66,column:5}}],line:62},9:{loc:{start:{line:86,column:4},end:{line:103,column:5}},type:"if",locations:[{start:{line:86,column:4},end:{line:103,column:5}},{start:{line:91,column:11},end:{line:103,column:5}}],line:86},10:{loc:{start:{line:92,column:24},end:{line:92,column:61}},type:"cond-expr",locations:[{start:{line:92,column:55},end:{line:92,column:57}},{start:{line:92,column:60},end:{line:92,column:61}}],line:92},11:{loc:{start:{line:107,column:18},end:{line:107,column:56}},type:"binary-expr",locations:[{start:{line:107,column:18},end:{line:107,column:50}},{start:{line:107,column:54},end:{line:107,column:56}}],line:107},12:{loc:{start:{line:111,column:14},end:{line:111,column:58}},type:"cond-expr",locations:[{start:{line:111,column:41},end:{line:111,column:42}},{start:{line:111,column:45},end:{line:111,column:58}}],line:111},13:{loc:{start:{line:127,column:4},end:{line:129,column:5}},type:"if",locations:[{start:{line:127,column:4},end:{line:129,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:127},14:{loc:{start:{line:133,column:4},end:{line:140,column:5}},type:"if",locations:[{start:{line:133,column:4},end:{line:140,column:5}},{start:{line:135,column:11},end:{line:140,column:5}}],line:133},15:{loc:{start:{line:133,column:8},end:{line:133,column:70}},type:"binary-expr",locations:[{start:{line:133,column:8},end:{line:133,column:33}},{start:{line:133,column:37},end:{line:133,column:70}}],line:133},16:{loc:{start:{line:143,column:4},end:{line:147,column:5}},type:"if",locations:[{start:{line:143,column:4},end:{line:147,column:5}},{start:{line:145,column:11},end:{line:147,column:5}}],line:143},17:{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:"if",locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:152},18:{loc:{start:{line:156,column:4},end:{line:204,column:5}},type:"if",locations:[{start:{line:156,column:4},end:{line:204,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:156},19:{loc:{start:{line:158,column:26},end:{line:158,column:77}},type:"cond-expr",locations:[{start:{line:158,column:56},end:{line:158,column:68}},{start:{line:158,column:71},end:{line:158,column:77}}],line:158},20:{loc:{start:{line:160,column:26},end:{line:160,column:79}},type:"cond-expr",locations:[{start:{line:160,column:56},end:{line:160,column:69}},{start:{line:160,column:72},end:{line:160,column:79}}],line:160},21:{loc:{start:{line:170,column:8},end:{line:174,column:9}},type:"if",locations:[{start:{line:170,column:8},end:{line:174,column:9}},{start:{line:172,column:15},end:{line:174,column:9}}],line:170},22:{loc:{start:{line:176,column:8},end:{line:187,column:9}},type:"if",locations:[{start:{line:176,column:8},end:{line:187,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:176},23:{loc:{start:{line:224,column:8},end:{line:239,column:9}},type:"binary-expr",locations:[{start:{line:224,column:8},end:{line:224,column:45}},{start:{line:224,column:65},end:{line:239,column:9}}],line:224},24:{loc:{start:{line:255,column:8},end:{line:270,column:9}},type:"binary-expr",locations:[{start:{line:255,column:8},end:{line:255,column:18}},{start:{line:255,column:38},end:{line:270,column:9}}],line:255},25:{loc:{start:{line:271,column:8},end:{line:279,column:15}},type:"binary-expr",locations:[{start:{line:271,column:8},end:{line:271,column:18}},{start:{line:271,column:38},end:{line:279,column:15}}],line:271},26:{loc:{start:{line:281,column:10},end:{line:292,column:11}},type:"binary-expr",locations:[{start:{line:281,column:10},end:{line:281,column:20}},{start:{line:281,column:40},end:{line:292,column:11}}],line:281}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx"],names:[],mappings:"AAqO8B,cA8Bf,YA9Be;AArO9B,OAAO,WAAW;AAClB,SAAQ,oBAAoB,4BAA2B;AACvD,OAAO,YAAY;AAEnB,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,qBAAqB;AAC5B,SAAQ,2BAA0B;AAClC,SAA0B,uBAAuB;AAEjD,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAI7B,SAAS,YAAY,OAAkC,OAA0B;AAE/E,MAAI;AAEJ,MAAG,MAAM,SAAS,MAAM,MAAM,OAAO;AACnC,UAAM,MAAM,MAAM,QAAQ,CAAC,MAAM,QAAQ;AACvC,UAAG,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,MAAM,GAAG,GAAG;AACzD,YAAG,CAAC,SAAS;AACX,oBAAU,EAAC,GAAG,MAAK;AAAA,QACrB;AACA,gBAAQ,GAAG,IAAI,OAAO,OAAO;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT;AAgCA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,QAAQ;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU,YAAY,KAAK,OAAO,KAAK,KAAK;AAElD,QAAG,SAAS;AACV,WAAK,SAAS;AAAA,QACZ,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,UAAU,YAAY,OAAO,KAAK;AACxC,QAAG,SAAS;AACV,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO;AAAA,IACT;AACA,QAAI,UAAU,SAAS,UAAU;AAC/B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO,CAAC,eAAe,eAAe,YAAY,eAAe,UAAU;AAAA,IAC7E,OACK;AACH,aAAO,CAAC,eAAe,YAAY,UAAU;AAAA,IAC/C;AAAA,EACF;AAAA;AAAA,EAGA,iBAAiB,OAAe;AAC9B,UAAM,gBAAgB,MACnB,IAAI,CAAC,MAAM,QAAQ;AAClB,aAAO;AAAA,QACL,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,QACxB,MAAM;AAAA,MACR;AAAA,IACF,CAAC,EAEA,KAAK,CAAC,GAAG,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC;AAGjE,UAAM,UAAU,CAAC;AACjB,kBACG,QAAQ,CAAC,MAAM,QAAO;AACrB,cAAQ,GAAG,IAAI,KAAK;AAAA,IACtB,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,IACR,CAAC;AAED,WAAO,cAAc,IAAI,CAAC,SAAS,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,WAAW,CAAC,WAAmB,UAAe;AAC5C,QAAI,MAAM,SAAS,YAAY;AAC7B,cAAQ;AAAA,QACN,MAAM,MAAM;AAAA,QACZ,UAAU,MAAM;AAAA,MAClB;AAAA,IACF,OACK;AACH,YAAM,YAAY,MAAM,SAAS,gBAAgB,KAAK;AACtD,cAAQ;AAAA,QACN,UAAU;AAAA,QACV,MAAM,MAAM;AAAA;AAAA,QAEZ,OAAO;AAAA,UACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAgB,CAAC;AAAA,UAC9E,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAgB,CAAC;AAAA,QACjF;AAAA,QACA,GAAG;AAAA,MACL;AAAA,IACF;AACA,SAAK,MAAM,SAAU,WAAW,KAAK;AAAA,EACvC;AAAA,EAEA,WAAW,WAAmB,UAAuD,OAAe;AAClG,UAAM,QAAQ,KAAK,MAAM,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC;AAEnD,UAAM,SAAS,IAAI;AAAA,MACjB;AAAA,QACE,OAAO,SAAS;AAAA,QAChB,MAAO,SAAS,SAAS,SAAa,IAAI,SAAS;AAAA,MACrD;AAAA,MACA;AAAA,IACF;AAEA,UAAM,eAAe,KAAK,iBAAiB,KAAK;AAEhD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,OAAO;AAAA,IACT;AACA,SAAK,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EAClD;AAAA,EAEA,WAAW,UAA8B;AACvC,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAW;AACnC,aAAO,aAAa,MAAM;AAAA,IAC5B;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,eAAe,SAAiB;AAC9B,QAAI,YAAY,iBAAiB,KAAK,MAAM,wBAAwB;AAClE,WAAK,MAAM,uBAAuB;AAAA,IACpC,OACK;AACH,WAAK,SAAS,KAAK,MAAM,WAAW;AAAA,QAClC,GAAG,KAAK,MAAM;AAAA,QACd,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,mBAAmB,UAAkC,SAAc;AACjE,QAAI,SAAS;AACX,WAAK,MAAM,MAAO,QAAQ,IAAI;AAAA,IAChC,OACK;AACH,aAAO,KAAK,MAAM,MAAO,QAAQ;AAAA,IACnC;AACA,SAAK,SAAS,KAAK,MAAM,WAAW,KAAK,MAAM,KAAK;AAAA,EACtD;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,QAAI,OAAO,KAAK,MAAM,OAAO,SAAS,aAAa;AACjD,WAAK,MAAM,MAAO,OAAO,KAAK,qBAAqB,KAAK,MAAM,SAAS;AAAA,IACzE;AAEA,QAAI;AACJ,QAAI,KAAK,MAAM,OAAO,OAAO;AAC3B,mBAAa,KAAK,MAAM,MAAM,MAAM,IAAI,CAAC,MAAM,QAAQ;AACrD,cAAM,YAAY,OAAO,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,EAAE,OAAO;AAC/D,cAAM,MAAO,KAAK,MAAM,KAAK,GAAG;AAChC,cAAM,YAAY,OAAO,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,EAAE,QAAQ,KAAK,CAAC;AACtE,cAAM,QAAQ,KAAK,CAAC;AACpB,cAAM,gBAAgB,oBAAC,oBAAiB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,GAAG,GAAG;AAE3F,cAAM,YAAY;AAAA,UAChB,cAAc,EAAE,aAAa;AAAA,UAC7B,OAAO,EAAE,YAAY;AAAA,UACrB,OAAO;AAAA,UACP,UAAU,CAAC,YAAyC,KAAK,WAAW,KAAK,EAAE,MAAM,WAAW,OAAO,QAAkB,GAAG,KAAK;AAAA,QAC/H;AAEA,YAAI;AACJ,YAAG,KAAK,MAAM,OAAO,SAAS,eAAe;AAC3C,sBAAY,oBAAC,eAAa,GAAG,WAAW;AAAA,QAC1C,OACK;AACH,sBAAY,oBAAC,eAAa,GAAG,WAAW;AAAA,QAC1C;AAEA,YAAI,YAAY;AAChB,YAAG,cAAc,QAAW;AAC1B,sBAAY,oBAAC,SACX;AAAA,YAAC;AAAA;AAAA,cACC,cAAW;AAAA,cACX,OAAO;AAAA,cACP,UAAU,aAAW,KAAK,WAAW,KAAK,EAAC,MAAM,SAAS,OAAO,UAAS,GAAG,KAAK;AAAA,cAClF,KAAK;AAAA,cACL,KAAK;AAAA;AAAA,UACP,GACF;AAAA,QACF;AAEA,eAAO,qBAAC,QACN;AAAA,8BAAC,QACE,qBACH;AAAA,UACA,oBAAC,QACE,qBACH;AAAA,UACA,oBAAC,QACC;AAAA,YAAC;AAAA;AAAA,cACC,cAAY,EAAE,cAAc;AAAA,cAC5B,WAAW,KAAK,MAAM;AAAA,cACtB,WAAW,KAAK,MAAM;AAAA,cACtB;AAAA,cACA,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,KAAK,EAAC,MAAM,WAAW,OAAO,UAAS,GAAG,QAAkB;AAAA;AAAA,UACzG,GACF;AAAA,UACA,oBAAC,QACE,yBACH;AAAA,aAlBc,GAmBhB;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,oBAAC,SAAI,WAAU,4BACpB,+BAAC,cAAS,WAAU,+BAClB;AAAA,0BAAC,YAAQ,6BAAmB,KAAK,MAAM,SAAS,GAAE;AAAA,MAClD,qBAAC,SAAI,WAAU,gCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YAGnB,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM,MAAO;AAAA,gBACzB,UAAU,CAAC,YAAoB,KAAK,eAAe,OAAO;AAAA,gBAC1D,OAAO,EAAE,yDAAyD;AAAA,gBAClE,SAAS,KAAK,qBAAqB,KAAK,MAAM,SAAS;AAAA;AAAA,YACzD,GACF;AAAA;AAAA,UATI;AAAA,QAUN;AAAA,QACC,KAAK,MAAM,OAAO,SAAS,cAC1B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,MAAM;AAAA,YAGf,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,WAAW,OAAO,SAAS;AAAA,gBAC3B,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,QAAkB;AAAA;AAAA,YAC/D,GACF;AAAA;AAAA,UATI;AAAA,QAUN;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YAGP,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,OAAO,EAAE,8CAA8C;AAAA,gBACvD,UAAU,aAAW,KAAK,mBAAmB,YAAY,OAAO;AAAA;AAAA,YAClE,GACF;AAAA;AAAA,UARI;AAAA,QASN;AAAA,QACC,cACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,SAAS;AAAA,YAGlB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,KAAK,MAAM;AAAA,gBACtB,WAAW,KAAK,MAAM;AAAA,gBACtB,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,YAAY,KAAK,mBAAmB,WAAW,OAAO;AAAA;AAAA,YACtE;AAAA;AAAA,UAPI;AAAA,QAQN;AAAA,QAED,cACC,oBAAC,SAAI,WAAU,0BACb,+BAAC,WAAM,WAAU,gCACf;AAAA,8BAAC,aAAS,YAAE,OAAO,GAAE;AAAA,UACrB,oBAAC,WACC,+BAAC,QACC;AAAA,gCAAC,QAAI,YAAE,MAAM,GAAE;AAAA,YACf,oBAAC,QAAI,YAAE,aAAa,GAAE;AAAA,YACtB,oBAAC,QAAG,SAAS,GAAI,YAAE,cAAc,GAAE;AAAA,aACrC,GACF;AAAA,UACA,oBAAC,WACE,sBACH;AAAA,WACF,GACF;AAAA,QAEF,qBAAC,SAAI,WAAU,oBACZ;AAAA,wBACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,WAAW,KAAK,IAAI;AAAA,cAExC;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,sBAAsB,GACrD;AAAA,gBAAM;AAAA,gBAAE,EAAE,UAAU;AAAA;AAAA;AAAA,UACtB;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,mBAAmB,KAAK,IAAI;AAAA,cAEhD;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA,gBAAM;AAAA,gBAAE,EAAE,uBAAuB;AAAA;AAAA;AAAA,UACnC;AAAA,WACF;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"97b6de35ac4a8f739cf06eabc39facf249622fab"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Wt=function(){return a},a}Wt();function lL(n,e){Wt().f[0]++;let t;return Wt().s[0]++,Wt().b[1][0]++,n.value&&(Wt().b[1][1]++,n.value.stops)?(Wt().b[0][0]++,Wt().s[1]++,n.value.stops.forEach((r,i)=>{Wt().f[1]++,Wt().s[2]++,Object.prototype.hasOwnProperty.call(e.refs,i)?Wt().b[2][1]++:(Wt().b[2][0]++,Wt().s[3]++,t?Wt().b[3][1]++:(Wt().b[3][0]++,Wt().s[4]++,t={...e}),Wt().s[5]++,t[i]=vv("stop-"))})):Wt().b[0][1]++,Wt().s[6]++,t}class C8e extends Mn.Component{constructor(){super(...arguments);sn(this,"state",(Wt().s[7]++,{refs:{}}));sn(this,"onChange",(Wt().s[32]++,(t,r)=>{if(Wt().f[11]++,Wt().s[33]++,r.type==="identity")Wt().b[9][0]++,Wt().s[34]++,r={type:r.type,property:r.property};else{Wt().b[9][1]++;const i=(Wt().s[35]++,r.type==="categorical"?(Wt().b[10][0]++,""):(Wt().b[10][1]++,0));Wt().s[36]++,r={property:"",type:r.type,stops:[[{zoom:6,value:i},Id(this.props.fieldSpec)],[{zoom:10,value:i},Id(this.props.fieldSpec)]],...r}}Wt().s[37]++,this.props.onChange(t,r)}))}componentDidMount(){Wt().f[2]++;const t=(Wt().s[8]++,lL(this.props,this.state));Wt().s[9]++,t?(Wt().b[4][0]++,Wt().s[10]++,this.setState({refs:t})):Wt().b[4][1]++}static getDerivedStateFromProps(t,r){Wt().f[3]++;const i=(Wt().s[11]++,lL(t,r));return Wt().s[12]++,i?(Wt().b[5][0]++,Wt().s[13]++,{refs:i}):(Wt().b[5][1]++,Wt().s[14]++,null)}getFieldFunctionType(t){return Wt().f[4]++,Wt().s[15]++,t.expression.interpolated?(Wt().b[6][0]++,Wt().s[16]++,"exponential"):(Wt().b[6][1]++,Wt().s[17]++,t.type==="number"?(Wt().b[7][0]++,Wt().s[18]++,"interval"):(Wt().b[7][1]++,Wt().s[19]++,"categorical"))}getDataFunctionTypes(t){return Wt().f[5]++,Wt().s[20]++,t.expression.interpolated?(Wt().b[8][0]++,Wt().s[21]++,["interpolate","categorical","interval","exponential","identity"]):(Wt().b[8][1]++,Wt().s[22]++,["categorical","interval","identity"])}orderStopsByZoom(t){Wt().f[6]++;const r=(Wt().s[23]++,t.map((o,a)=>(Wt().f[7]++,Wt().s[24]++,{ref:this.state.refs[a],data:o})).sort((o,a)=>(Wt().f[8]++,Wt().s[25]++,IQ(o.data[0].zoom,a.data[0].zoom)))),i=(Wt().s[26]++,{});return Wt().s[27]++,r.forEach((o,a)=>{Wt().f[9]++,Wt().s[28]++,i[a]=o.ref}),Wt().s[29]++,this.setState({refs:i}),Wt().s[30]++,r.map(o=>(Wt().f[10]++,Wt().s[31]++,o.data))}changeStop(t,r,i){var d;Wt().f[12]++;const o=(Wt().s[38]++,Wt().b[11][0]++,((d=this.props.value)==null?void 0:d.stops.slice(0))||(Wt().b[11][1]++,[]));Wt().s[39]++,o[t]=[{value:r.value,zoom:r.zoom===void 0?(Wt().b[12][0]++,0):(Wt().b[12][1]++,r.zoom)},i];const a=(Wt().s[40]++,this.orderStopsByZoom(o)),s=(Wt().s[41]++,{...this.props.value,stops:a});Wt().s[42]++,this.onChange(this.props.fieldName,s)}changeBase(t){Wt().f[13]++;const r=(Wt().s[43]++,{...this.props.value,base:t});Wt().s[44]++,r.base===void 0?(Wt().b[13][0]++,Wt().s[45]++,delete r.base):Wt().b[13][1]++,Wt().s[46]++,this.props.onChange(this.props.fieldName,r)}changeDataType(t){Wt().f[14]++,Wt().s[47]++,Wt().b[15][0]++,t==="interpolate"&&(Wt().b[15][1]++,this.props.onChangeToZoomFunction)?(Wt().b[14][0]++,Wt().s[48]++,this.props.onChangeToZoomFunction()):(Wt().b[14][1]++,Wt().s[49]++,this.onChange(this.props.fieldName,{...this.props.value,type:t}))}changeDataProperty(t,r){Wt().f[15]++,Wt().s[50]++,r?(Wt().b[16][0]++,Wt().s[51]++,this.props.value[t]=r):(Wt().b[16][1]++,Wt().s[52]++,delete this.props.value[t]),Wt().s[53]++,this.onChange(this.props.fieldName,this.props.value)}render(){var i,o,a,s,d,f,C,O;Wt().f[16]++;const t=(Wt().s[54]++,this.props.t);Wt().s[55]++,typeof((i=this.props.value)==null?void 0:i.type)>"u"?(Wt().b[17][0]++,Wt().s[56]++,this.props.value.type=this.getFieldFunctionType(this.props.fieldSpec)):Wt().b[17][1]++;let r;return Wt().s[57]++,(o=this.props.value)!=null&&o.stops?(Wt().b[18][0]++,Wt().s[58]++,r=this.props.value.stops.map((E,P)=>{var fe,X;Wt().f[17]++;const D=(Wt().s[59]++,typeof E[0]=="object"?(Wt().b[19][0]++,E[0].zoom):(Wt().b[19][1]++,void 0)),$=(Wt().s[60]++,this.state.refs[P]),H=(Wt().s[61]++,typeof E[0]=="object"?(Wt().b[20][0]++,E[0].value):(Wt().b[20][1]++,E[0])),Q=(Wt().s[62]++,E[1]),N=(Wt().s[63]++,G.jsx(kQ,{onClick:(fe=this.props.onDeleteStop)==null?void 0:fe.bind(this,P)})),Z=(Wt().s[64]++,{"aria-label":t("Input value"),label:t("Data value"),value:H,onChange:oe=>(Wt().f[18]++,Wt().s[65]++,this.changeStop(P,{zoom:D,value:oe},Q))});let ae;Wt().s[66]++,((X=this.props.value)==null?void 0:X.type)==="categorical"?(Wt().b[21][0]++,Wt().s[67]++,ae=G.jsx(Qd,{...Z})):(Wt().b[21][1]++,Wt().s[68]++,ae=G.jsx(qf,{...Z}));let pe=(Wt().s[69]++,null);return Wt().s[70]++,D!==void 0?(Wt().b[22][0]++,Wt().s[71]++,pe=G.jsx("div",{children:G.jsx(qf,{"aria-label":"Zoom",value:D,onChange:oe=>(Wt().f[19]++,Wt().s[72]++,this.changeStop(P,{zoom:oe,value:H},Q)),min:0,max:22})})):Wt().b[22][1]++,Wt().s[73]++,G.jsxs("tr",{children:[G.jsx("td",{children:pe}),G.jsx("td",{children:ae}),G.jsx("td",{children:G.jsx(Xy,{"aria-label":t("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:Q,onChange:(oe,Ce)=>(Wt().f[20]++,Wt().s[74]++,this.changeStop(P,{zoom:D,value:H},Ce))})}),G.jsx("td",{children:N})]},$)})):Wt().b[18][1]++,Wt().s[75]++,G.jsx("div",{className:"maputnik-data-spec-block",children:G.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[G.jsx("legend",{children:Vw(this.props.fieldName)}),G.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[G.jsx(la,{label:t("Function"),children:G.jsx("div",{className:"maputnik-data-spec-property-input",children:G.jsx(V1,{value:this.props.value.type,onChange:E=>(Wt().f[21]++,Wt().s[76]++,this.changeDataType(E)),title:t("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})},"function"),(Wt().b[23][0]++,((a=this.props.value)==null?void 0:a.type)!=="identity"&&(Wt().b[23][1]++,G.jsx(la,{label:t("Base"),children:G.jsx("div",{className:"maputnik-data-spec-property-input",children:G.jsx(Xy,{fieldName:"base",fieldSpec:no.function.base,value:(s=this.props.value)==null?void 0:s.base,onChange:(E,P)=>(Wt().f[22]++,Wt().s[77]++,this.changeBase(P))})})},"base"))),G.jsx(la,{label:"Property",children:G.jsx("div",{className:"maputnik-data-spec-property-input",children:G.jsx(Qd,{value:(d=this.props.value)==null?void 0:d.property,title:t("Input a data property to base styles off of."),onChange:E=>(Wt().f[23]++,Wt().s[78]++,this.changeDataProperty("property",E))})})},"property"),(Wt().b[24][0]++,r&&(Wt().b[24][1]++,G.jsx(la,{label:t("Default"),children:G.jsx(Xy,{fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:(f=this.props.value)==null?void 0:f.default,onChange:(E,P)=>(Wt().f[24]++,Wt().s[79]++,this.changeDataProperty("default",P))})},"default"))),(Wt().b[25][0]++,r&&(Wt().b[25][1]++,G.jsx("div",{className:"maputnik-function-stop",children:G.jsxs("table",{className:"maputnik-function-stop-table",children:[G.jsx("caption",{children:t("Stops")}),G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{children:t("Zoom")}),G.jsx("th",{children:t("Input value")}),G.jsx("th",{rowSpan:2,children:t("Output value")})]})}),G.jsx("tbody",{children:r})]})}))),G.jsxs("div",{className:"maputnik-toolbox",children:[(Wt().b[26][0]++,r&&(Wt().b[26][1]++,G.jsxs(is,{className:"maputnik-add-stop",onClick:(C=this.props.onAddStop)==null?void 0:C.bind(this),children:[G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:WI})})," ",t("Add stop")]}))),G.jsxs(is,{className:"maputnik-add-stop",onClick:(O=this.props.onExpressionClick)==null?void 0:O.bind(this),children:[G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:Mb})})," ",t("Convert to expression")]})]})]})]})})}}const _8e=(Wt().s[80]++,No()(C8e));function Un(){var n="/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",e="6a4c93b52ca21ec4b555a0d2906ee27fc49f34f8",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",statementMap:{0:{start:{line:16,column:16},end:{line:16,column:18}},1:{start:{line:17,column:2},end:{line:28,column:3}},2:{start:{line:18,column:4},end:{line:27,column:7}},3:{start:{line:19,column:6},end:{line:26,column:7}},4:{start:{line:20,column:8},end:{line:22,column:9}},5:{start:{line:21,column:10},end:{line:21,column:33}},6:{start:{line:23,column:8},end:{line:23,column:39}},7:{start:{line:25,column:8},end:{line:25,column:39}},8:{start:{line:29,column:2},end:{line:29,column:17}},9:{start:{line:32,column:24},end:{line:34,column:3}},10:{start:{line:35,column:10},end:{line:37,column:3}},11:{start:{line:39,column:20},end:{line:39,column:55}},12:{start:{line:40,column:4},end:{line:44,column:5}},13:{start:{line:41,column:6},end:{line:43,column:9}},14:{start:{line:47,column:20},end:{line:47,column:45}},15:{start:{line:48,column:4},end:{line:52,column:5}},16:{start:{line:49,column:6},end:{line:51,column:8}},17:{start:{line:53,column:4},end:{line:53,column:16}},18:{start:{line:57,column:26},end:{line:62,column:60}},19:{start:{line:58,column:6},end:{line:61,column:8}},20:{start:{line:62,column:22},end:{line:62,column:59}},21:{start:{line:63,column:20},end:{line:63,column:22}},22:{start:{line:64,column:4},end:{line:66,column:7}},23:{start:{line:65,column:6},end:{line:65,column:30}},24:{start:{line:67,column:4},end:{line:69,column:7}},25:{start:{line:70,column:4},end:{line:70,column:50}},26:{start:{line:70,column:39},end:{line:70,column:48}},27:{start:{line:73,column:18},end:{line:73,column:49}},28:{start:{line:74,column:4},end:{line:74,column:41}},29:{start:{line:75,column:25},end:{line:75,column:53}},30:{start:{line:76,column:25},end:{line:79,column:5}},31:{start:{line:80,column:4},end:{line:80,column:60}},32:{start:{line:83,column:25},end:{line:86,column:5}},33:{start:{line:87,column:4},end:{line:89,column:5}},34:{start:{line:88,column:6},end:{line:88,column:34}},35:{start:{line:90,column:4},end:{line:90,column:60}},36:{start:{line:92,column:19},end:{line:96,column:3}},37:{start:{line:93,column:4},end:{line:95,column:5}},38:{start:{line:94,column:6},end:{line:94,column:46}},39:{start:{line:98,column:14},end:{line:98,column:26}},40:{start:{line:99,column:23},end:{line:132,column:6}},41:{start:{line:100,column:24},end:{line:100,column:31}},42:{start:{line:101,column:20},end:{line:101,column:27}},43:{start:{line:102,column:44},end:{line:102,column:120}},44:{start:{line:103,column:6},end:{line:131,column:8}},45:{start:{line:112,column:43},end:{line:112,column:87}},46:{start:{line:124,column:43},end:{line:124,column:88}},47:{start:{line:133,column:4},end:{line:201,column:12}},48:{start:{line:144,column:39},end:{line:144,column:67}},49:{start:{line:161,column:43},end:{line:161,column:68}},50:{start:{line:204,column:4},end:{line:208,column:5}},51:{start:{line:205,column:6},end:{line:205,column:83}},52:{start:{line:207,column:6},end:{line:207,column:29}},53:{start:{line:211,column:21},end:{line:211,column:60}}},fnMap:{0:{name:"setStopRefs",decl:{start:{line:15,column:9},end:{line:15,column:20}},loc:{start:{line:15,column:35},end:{line:30,column:1}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:18,column:30},end:{line:18,column:31}},loc:{start:{line:18,column:45},end:{line:27,column:5}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:38,column:2},end:{line:38,column:3}},loc:{start:{line:38,column:22},end:{line:45,column:3}},line:38},3:{name:"(anonymous_3)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:48},end:{line:54,column:3}},line:46},4:{name:"(anonymous_4)",decl:{start:{line:56,column:2},end:{line:56,column:3}},loc:{start:{line:56,column:26},end:{line:71,column:3}},line:56},5:{name:"(anonymous_5)",decl:{start:{line:57,column:36},end:{line:57,column:37}},loc:{start:{line:57,column:51},end:{line:62,column:5}},line:57},6:{name:"(anonymous_6)",decl:{start:{line:62,column:12},end:{line:62,column:13}},loc:{start:{line:62,column:22},end:{line:62,column:59}},line:62},7:{name:"(anonymous_7)",decl:{start:{line:64,column:26},end:{line:64,column:27}},loc:{start:{line:64,column:41},end:{line:66,column:5}},line:64},8:{name:"(anonymous_8)",decl:{start:{line:70,column:29},end:{line:70,column:30}},loc:{start:{line:70,column:39},end:{line:70,column:48}},line:70},9:{name:"(anonymous_9)",decl:{start:{line:72,column:2},end:{line:72,column:3}},loc:{start:{line:72,column:45},end:{line:81,column:3}},line:72},10:{name:"(anonymous_10)",decl:{start:{line:82,column:2},end:{line:82,column:3}},loc:{start:{line:82,column:23},end:{line:91,column:3}},line:82},11:{name:"(anonymous_11)",decl:{start:{line:92,column:19},end:{line:92,column:20}},loc:{start:{line:92,column:29},end:{line:96,column:3}},line:92},12:{name:"(anonymous_12)",decl:{start:{line:97,column:2},end:{line:97,column:3}},loc:{start:{line:97,column:11},end:{line:202,column:3}},line:97},13:{name:"(anonymous_13)",decl:{start:{line:99,column:51},end:{line:99,column:52}},loc:{start:{line:99,column:66},end:{line:132,column:5}},line:99},14:{name:"(anonymous_14)",decl:{start:{line:112,column:26},end:{line:112,column:27}},loc:{start:{line:112,column:43},end:{line:112,column:87}},line:112},15:{name:"(anonymous_15)",decl:{start:{line:124,column:26},end:{line:124,column:27}},loc:{start:{line:124,column:43},end:{line:124,column:88}},line:124},16:{name:"(anonymous_16)",decl:{start:{line:144,column:26},end:{line:144,column:27}},loc:{start:{line:144,column:39},end:{line:144,column:67}},line:144},17:{name:"(anonymous_17)",decl:{start:{line:161,column:26},end:{line:161,column:27}},loc:{start:{line:161,column:43},end:{line:161,column:68}},line:161},18:{name:"(anonymous_18)",decl:{start:{line:203,column:2},end:{line:203,column:3}},loc:{start:{line:203,column:34},end:{line:209,column:3}},line:203}},branchMap:{0:{loc:{start:{line:17,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:28,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:17,column:6},end:{line:17,column:38}},type:"binary-expr",locations:[{start:{line:17,column:6},end:{line:17,column:17}},{start:{line:17,column:21},end:{line:17,column:38}}],line:17},2:{loc:{start:{line:19,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:19,column:6},end:{line:26,column:7}},{start:{line:24,column:13},end:{line:26,column:7}}],line:19},3:{loc:{start:{line:20,column:8},end:{line:22,column:9}},type:"if",locations:[{start:{line:20,column:8},end:{line:22,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},4:{loc:{start:{line:40,column:4},end:{line:44,column:5}},type:"if",locations:[{start:{line:40,column:4},end:{line:44,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:40},5:{loc:{start:{line:48,column:4},end:{line:52,column:5}},type:"if",locations:[{start:{line:48,column:4},end:{line:52,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},6:{loc:{start:{line:87,column:4},end:{line:89,column:5}},type:"if",locations:[{start:{line:87,column:4},end:{line:89,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:87},7:{loc:{start:{line:93,column:4},end:{line:95,column:5}},type:"if",locations:[{start:{line:93,column:4},end:{line:95,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:93},8:{loc:{start:{line:93,column:8},end:{line:93,column:67}},type:"binary-expr",locations:[{start:{line:93,column:8},end:{line:93,column:30}},{start:{line:93,column:34},end:{line:93,column:67}}],line:93},9:{loc:{start:{line:204,column:4},end:{line:208,column:5}},type:"if",locations:[{start:{line:204,column:4},end:{line:208,column:5}},{start:{line:206,column:11},end:{line:208,column:5}}],line:204}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx"],names:[],mappings:"AA+J4B,cACf,YADe;AA/J5B,OAAO,WAAW;AAClB,SAAQ,oBAAoB,4BAA2B;AACvD,OAAO,YAAY;AACnB,SAA0B,uBAAuB;AAEjD,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAElB,OAAO,sBAAsB;AAC7B,OAAO,wBAAwB;AAE/B,OAAO,YAAY;AACnB,OAAO,qBAAqB;AAQ5B,SAAS,YAAY,OAAkC,OAA0B;AAE/E,MAAI,UAAmC,CAAC;AAExC,MAAG,MAAM,SAAU,MAAM,MAAwB,OAAO;AACtD,IAAC,MAAM,MAAwB,MAAM,QAAQ,CAAC,MAAM,QAAgB;AAClE,UAAG,OAAO,UAAU,eAAe,KAAK,CAAC,MAAM,MAAM,GAAG,GAAG;AACzD,YAAG,CAAC,SAAS;AACX,oBAAU,EAAC,GAAG,MAAK;AAAA,QACrB;AACA,gBAAQ,GAAG,IAAI,OAAO,OAAO;AAAA,MAC/B,OAAO;AACL,gBAAQ,GAAG,IAAI,MAAM,KAAK,GAAG;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT;AA4BA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,EACX;AAAA,EAEA,QAAQ;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU,YAAY,KAAK,OAAO,KAAK,KAAK;AAElD,QAAG,SAAS;AACV,WAAK,SAAS;AAAA,QACZ,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,UAAU,YAAY,OAAO,KAAK;AACxC,QAAG,SAAS;AACV,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,iBAAiB,OAA+B;AAC9C,UAAM,gBAAgB,MACnB,IAAI,CAAC,MAAM,QAAQ;AAClB,aAAO;AAAA,QACL,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,QACxB,MAAM;AAAA,MACR;AAAA,IACF,CAAC,EAEA,KAAK,CAAC,GAAG,MAAM,gBAAgB,EAAE,KAAK,CAAC,GAAI,EAAE,KAAK,CAAC,CAAE,CAAC;AAGzD,UAAM,UAAkC,CAAC;AACzC,kBACG,QAAQ,CAAC,MAAM,QAAO;AACrB,cAAQ,GAAG,IAAI,KAAK;AAAA,IACtB,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,IACR,CAAC;AAED,WAAO,cAAc,IAAI,CAAC,SAAS,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,eAAe,WAAmB,UAA8B,OAAe;AAC7E,UAAM,QAAS,KAAK,MAAM,MAAwB,MAAM,MAAM,CAAC;AAC/D,UAAM,SAAS,IAAI,CAAC,UAAU,KAAK;AAEnC,UAAM,eAAe,KAAK,iBAAiB,KAAK;AAEhD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,OAAO;AAAA,IACT;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,WAAW,UAA8B;AACvC,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAW;AACnC,aAAO,aAAa,MAAM;AAAA,IAC5B;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,iBAAiB,CAAC,SAAiB;AACjC,QAAI,SAAS,iBAAiB,KAAK,MAAM,wBAAwB;AAC/D,WAAK,MAAM,uBAAuB,IAAI;AAAA,IACxC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,aAAa,KAAK,MAAM,OAAO,MAAM,IAAI,CAAC,MAAM,QAAQ;AAC5D,YAAM,YAAY,KAAK,CAAC;AACxB,YAAM,QAAQ,KAAK,CAAC;AACpB,YAAM,gBAAgB,oBAAC,oBAAiB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,GAAG,GAAG;AAC3F,aAAO;AAAA,QAAC;AAAA;AAAA,UAGN;AAAA,gCAAC,QACC;AAAA,cAAC;AAAA;AAAA,gBACC,cAAY,EAAE,MAAM;AAAA,gBACpB,OAAO;AAAA,gBACP,UAAU,iBAAe,KAAK,eAAe,KAAK,aAAa,KAAK;AAAA,gBACpE,KAAK;AAAA,gBACL,KAAK;AAAA;AAAA,YACP,GACF;AAAA,YACA,oBAAC,QACC;AAAA,cAAC;AAAA;AAAA,gBACC,cAAY,EAAE,cAAc;AAAA,gBAC5B,WAAW,KAAK,MAAM;AAAA,gBACtB,WAAW,KAAK,MAAM;AAAA,gBACtB;AAAA,gBACA,UAAU,CAAC,GAAG,aAAa,KAAK,eAAe,KAAK,WAAW,QAAkB;AAAA;AAAA,YACnF,GACF;AAAA,YACA,oBAAC,QACE,yBACH;AAAA;AAAA;AAAA,QAtBK,GAAG,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC;AAAA,MAuB5B;AAAA,IACF,CAAC;AAGD,WAAO,oBAAC,SAAI,WAAU,4BACpB,+BAAC,cAAS,WAAU,+BAClB;AAAA,0BAAC,YAAQ,6BAAmB,KAAK,MAAM,SAAS,GAAE;AAAA,MAClD,qBAAC,SAAI,WAAU,gCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YAEnB,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,CAAC,YAAoB,KAAK,eAAe,OAAO;AAAA,gBAC1D,OAAO,EAAE,yDAAyD;AAAA,gBAClE,SAAS,KAAK,qBAAqB,KAAK,MAAM,SAAU;AAAA;AAAA,YAC1D,GACF;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,MAAM;AAAA,YAEf,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,WAAW,OAAO,SAAS;AAAA,gBAC3B,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,QAA8B;AAAA;AAAA,YAC3E,GACF;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,SAAI,WAAU,0BACb,+BAAC,WAAM,WAAU,mEACf;AAAA,8BAAC,aAAS,YAAE,OAAO,GAAE;AAAA,UACrB,oBAAC,WACC,+BAAC,QACC;AAAA,gCAAC,QAAI,YAAE,MAAM,GAAE;AAAA,YACf,oBAAC,QAAG,SAAS,GAAI,YAAE,cAAc,GAAE;AAAA,aACrC,GACF;AAAA,UACA,oBAAC,WACE,sBACH;AAAA,WACF,GACF;AAAA,QACA,qBAAC,SAAI,WAAU,oBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,WAAW,KAAK,IAAI;AAAA,cAExC;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,sBAAsB,GACrD;AAAA,gBAAM;AAAA,gBAAE,EAAE,UAAU;AAAA;AAAA;AAAA,UACtB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,mBAAmB,KAAK,IAAI;AAAA,cAEhD;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA,gBAAM;AAAA,gBAAE,EAAE,uBAAuB;AAAA;AAAA;AAAA,UACnC;AAAA,WACF;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AAAA,EAEA,qBAAqB,WAGlB;AACD,QAAI,UAAU,eAAe,MAAM,eAAe;AAChD,aAAO,CAAC,eAAe,eAAe,YAAY,eAAe,UAAU;AAAA,IAC7E,OACK;AACH,aAAO,CAAC,aAAa;AAAA,IACvB;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6a4c93b52ca21ec4b555a0d2906ee27fc49f34f8"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Un=function(){return a},a}Un();function uL(n,e){Un().f[0]++;let t=(Un().s[0]++,{});return Un().s[1]++,Un().b[1][0]++,n.value&&(Un().b[1][1]++,n.value.stops)?(Un().b[0][0]++,Un().s[2]++,n.value.stops.forEach((r,i)=>{Un().f[1]++,Un().s[3]++,Object.prototype.hasOwnProperty.call(!e.refs,i)?(Un().b[2][0]++,Un().s[4]++,t?Un().b[3][1]++:(Un().b[3][0]++,Un().s[5]++,t={...e}),Un().s[6]++,t[i]=vv("stop-")):(Un().b[2][1]++,Un().s[7]++,t[i]=e.refs[i])})):Un().b[0][1]++,Un().s[8]++,t}class TQ extends Mn.Component{constructor(){super(...arguments);sn(this,"state",(Un().s[10]++,{refs:{}}));sn(this,"changeDataType",(Un().s[36]++,t=>{Un().f[11]++,Un().s[37]++,Un().b[8][0]++,t!=="interpolate"&&(Un().b[8][1]++,this.props.onChangeToDataFunction)?(Un().b[7][0]++,Un().s[38]++,this.props.onChangeToDataFunction(t)):Un().b[7][1]++}))}componentDidMount(){Un().f[2]++;const t=(Un().s[11]++,uL(this.props,this.state));Un().s[12]++,t?(Un().b[4][0]++,Un().s[13]++,this.setState({refs:t})):Un().b[4][1]++}static getDerivedStateFromProps(t,r){Un().f[3]++;const i=(Un().s[14]++,uL(t,r));return Un().s[15]++,i?(Un().b[5][0]++,Un().s[16]++,{refs:i}):(Un().b[5][1]++,Un().s[17]++,null)}orderStopsByZoom(t){Un().f[4]++;const r=(Un().s[18]++,t.map((o,a)=>(Un().f[5]++,Un().s[19]++,{ref:this.state.refs[a],data:o})).sort((o,a)=>(Un().f[6]++,Un().s[20]++,IQ(o.data[0],a.data[0])))),i=(Un().s[21]++,{});return Un().s[22]++,r.forEach((o,a)=>{Un().f[7]++,Un().s[23]++,i[a]=o.ref}),Un().s[24]++,this.setState({refs:i}),Un().s[25]++,r.map(o=>(Un().f[8]++,Un().s[26]++,o.data))}changeZoomStop(t,r,i){Un().f[9]++;const o=(Un().s[27]++,this.props.value.stops.slice(0));Un().s[28]++,o[t]=[r,i];const a=(Un().s[29]++,this.orderStopsByZoom(o)),s=(Un().s[30]++,{...this.props.value,stops:a});Un().s[31]++,this.props.onChange(this.props.fieldName,s)}changeBase(t){Un().f[10]++;const r=(Un().s[32]++,{...this.props.value,base:t});Un().s[33]++,r.base===void 0?(Un().b[6][0]++,Un().s[34]++,delete r.base):Un().b[6][1]++,Un().s[35]++,this.props.onChange(this.props.fieldName,r)}render(){var i,o,a,s;Un().f[12]++;const t=(Un().s[39]++,this.props.t),r=(Un().s[40]++,(i=this.props.value)==null?void 0:i.stops.map((d,f)=>{var P;Un().f[13]++;const C=(Un().s[41]++,d[0]),O=(Un().s[42]++,d[1]),E=(Un().s[43]++,G.jsx(kQ,{onClick:(P=this.props.onDeleteStop)==null?void 0:P.bind(this,f)}));return Un().s[44]++,G.jsxs("tr",{children:[G.jsx("td",{children:G.jsx(qf,{"aria-label":t("Zoom"),value:C,onChange:D=>(Un().f[14]++,Un().s[45]++,this.changeZoomStop(f,D,O)),min:0,max:22})}),G.jsx("td",{children:G.jsx(Xy,{"aria-label":t("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:O,onChange:(D,$)=>(Un().f[15]++,Un().s[46]++,this.changeZoomStop(f,C,$))})}),G.jsx("td",{children:E})]},`${d[0]}-${d[1]}`)}));return Un().s[47]++,G.jsx("div",{className:"maputnik-data-spec-block",children:G.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[G.jsx("legend",{children:Vw(this.props.fieldName)}),G.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[G.jsx(la,{label:t("Function"),children:G.jsx("div",{className:"maputnik-data-spec-property-input",children:G.jsx(V1,{value:"interpolate",onChange:d=>(Un().f[16]++,Un().s[48]++,this.changeDataType(d)),title:t("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})}),G.jsx(la,{label:t("Base"),children:G.jsx("div",{className:"maputnik-data-spec-property-input",children:G.jsx(Xy,{fieldName:"base",fieldSpec:no.function.base,value:(o=this.props.value)==null?void 0:o.base,onChange:(d,f)=>(Un().f[17]++,Un().s[49]++,this.changeBase(f))})})}),G.jsx("div",{className:"maputnik-function-stop",children:G.jsxs("table",{className:"maputnik-function-stop-table maputnik-function-stop-table--zoom",children:[G.jsx("caption",{children:t("Stops")}),G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{children:t("Zoom")}),G.jsx("th",{rowSpan:2,children:t("Output value")})]})}),G.jsx("tbody",{children:r})]})}),G.jsxs("div",{className:"maputnik-toolbox",children:[G.jsxs(is,{className:"maputnik-add-stop",onClick:(a=this.props.onAddStop)==null?void 0:a.bind(this),children:[G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:WI})})," ",t("Add stop")]}),G.jsxs(is,{className:"maputnik-add-stop",onClick:(s=this.props.onExpressionClick)==null?void 0:s.bind(this),children:[G.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:G.jsx("path",{fill:"currentColor",d:Mb})})," ",t("Convert to expression")]})]})]})]})})}getDataFunctionTypes(t){return Un().f[18]++,Un().s[50]++,t["property-type"]==="data-driven"?(Un().b[9][0]++,Un().s[51]++,["interpolate","categorical","interval","exponential","identity"]):(Un().b[9][1]++,Un().s[52]++,["interpolate"])}}sn(TQ,"defaultProps",(Un().s[9]++,{errors:{}}));const b8e=(Un().s[53]++,No()(TQ));function dt(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",e="36be9049018d9eb4ab6b3a8eeeb8db87a4e7a5ee",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",statementMap:{0:{start:{line:10,column:2},end:{line:10,column:78}},1:{start:{line:13,column:2},end:{line:13,column:74}},2:{start:{line:16,column:2},end:{line:18,column:5}},3:{start:{line:17,column:4},end:{line:17,column:52}},4:{start:{line:21,column:2},end:{line:21,column:123}},5:{start:{line:24,column:2},end:{line:26,column:5}},6:{start:{line:25,column:4},end:{line:25,column:83}},7:{start:{line:29,column:2},end:{line:29,column:64}},8:{start:{line:32,column:16},end:{line:32,column:47}},9:{start:{line:33,column:2},end:{line:33,column:38}},10:{start:{line:36,column:2},end:{line:38,column:3}},11:{start:{line:37,column:4},end:{line:37,column:37}},12:{start:{line:39,column:2},end:{line:39,column:15}},13:{start:{line:42,column:2},end:{line:54,column:3}},14:{start:{line:43,column:4},end:{line:43,column:19}},15:{start:{line:44,column:9},end:{line:54,column:3}},16:{start:{line:45,column:4},end:{line:45,column:19}},17:{start:{line:46,column:9},end:{line:54,column:3}},18:{start:{line:47,column:4},end:{line:47,column:19}},19:{start:{line:48,column:9},end:{line:54,column:3}},20:{start:{line:49,column:4},end:{line:49,column:27}},21:{start:{line:50,column:9},end:{line:54,column:3}},22:{start:{line:51,column:4},end:{line:51,column:27}},23:{start:{line:53,column:4},end:{line:53,column:24}},24:{start:{line:58,column:4},end:{line:58,column:17}},25:{start:{line:59,column:4},end:{line:62,column:6}},26:{start:{line:65,column:4},end:{line:72,column:5}},27:{start:{line:66,column:6},end:{line:66,column:16}},28:{start:{line:68,column:6},end:{line:71,column:8}},29:{start:{line:75,column:4},end:{line:77,column:5}},30:{start:{line:76,column:6},end:{line:76,column:27}},31:{start:{line:78,column:4},end:{line:80,column:5}},32:{start:{line:79,column:6},end:{line:79,column:24}},33:{start:{line:81,column:4},end:{line:81,column:25}},34:{start:{line:83,column:12},end:{line:99,column:3}},35:{start:{line:84,column:18},end:{line:84,column:49}},36:{start:{line:85,column:21},end:{line:85,column:44}},37:{start:{line:86,column:4},end:{line:93,column:5}},38:{start:{line:87,column:6},end:{line:90,column:9}},39:{start:{line:92,column:6},end:{line:92,column:49}},40:{start:{line:94,column:25},end:{line:97,column:5}},41:{start:{line:98,column:4},end:{line:98,column:60}},42:{start:{line:100,column:21},end:{line:106,column:3}},43:{start:{line:101,column:37},end:{line:101,column:47}},44:{start:{line:102,column:4},end:{line:102,column:54}},45:{start:{line:103,column:4},end:{line:105,column:7}},46:{start:{line:107,column:15},end:{line:118,column:3}},47:{start:{line:108,column:18},end:{line:108,column:49}},48:{start:{line:109,column:4},end:{line:109,column:29}},49:{start:{line:110,column:23},end:{line:113,column:5}},50:{start:{line:114,column:4},end:{line:116,column:5}},51:{start:{line:115,column:6},end:{line:115,column:33}},52:{start:{line:117,column:4},end:{line:117,column:60}},53:{start:{line:119,column:21},end:{line:148,column:3}},54:{start:{line:120,column:22},end:{line:120,column:32}},55:{start:{line:122,column:4},end:{line:146,column:5}},56:{start:{line:123,column:6},end:{line:138,column:7}},57:{start:{line:124,column:8},end:{line:129,column:10}},58:{start:{line:127,column:12},end:{line:127,column:88}},59:{start:{line:131,column:8},end:{line:137,column:10}},60:{start:{line:140,column:6},end:{line:145,column:8}},61:{start:{line:147,column:4},end:{line:147,column:56}},62:{start:{line:149,column:19},end:{line:165,column:3}},63:{start:{line:150,column:33},end:{line:150,column:43}},64:{start:{line:151,column:4},end:{line:164,column:5}},65:{start:{line:152,column:6},end:{line:155,column:9}},66:{start:{line:156,column:6},end:{line:158,column:9}},67:{start:{line:159,column:11},end:{line:164,column:5}},68:{start:{line:160,column:6},end:{line:160,column:47}},69:{start:{line:161,column:6},end:{line:163,column:9}},70:{start:{line:166,column:12},end:{line:169,column:3}},71:{start:{line:167,column:33},end:{line:167,column:43}},72:{start:{line:168,column:4},end:{line:168,column:140}},73:{start:{line:170,column:19},end:{line:181,column:3}},74:{start:{line:171,column:33},end:{line:171,column:43}},75:{start:{line:173,column:4},end:{line:179,column:5}},76:{start:{line:174,column:6},end:{line:174,column:67}},77:{start:{line:175,column:11},end:{line:179,column:5}},78:{start:{line:176,column:6},end:{line:176,column:43}},79:{start:{line:178,column:6},end:{line:178,column:70}},80:{start:{line:180,column:4},end:{line:180,column:58}},81:{start:{line:182,column:21},end:{line:220,column:3}},82:{start:{line:183,column:25},end:{line:183,column:72}},83:{start:{line:184,column:22},end:{line:184,column:61}},84:{start:{line:185,column:22},end:{line:185,column:32}},85:{start:{line:187,column:4},end:{line:218,column:5}},86:{start:{line:188,column:6},end:{line:207,column:7}},87:{start:{line:189,column:8},end:{line:196,column:10}},88:{start:{line:194,column:12},end:{line:194,column:111}},89:{start:{line:198,column:8},end:{line:206,column:10}},90:{start:{line:209,column:6},end:{line:217,column:8}},91:{start:{line:219,column:4},end:{line:219,column:56}},92:{start:{line:221,column:18},end:{line:223,column:3}},93:{start:{line:222,column:4},end:{line:222,column:39}},94:{start:{line:224,column:20},end:{line:226,column:3}},95:{start:{line:225,column:4},end:{line:225,column:40}},96:{start:{line:228,column:25},end:{line:228,column:35}},97:{start:{line:229,column:22},end:{line:229,column:132}},98:{start:{line:231,column:4},end:{line:295,column:5}},99:{start:{line:232,column:6},end:{line:247,column:8}},100:{start:{line:248,column:11},end:{line:295,column:5}},101:{start:{line:249,column:6},end:{line:263,column:8}},102:{start:{line:264,column:11},end:{line:295,column:5}},103:{start:{line:265,column:6},end:{line:279,column:8}},104:{start:{line:281,column:6},end:{line:294,column:8}},105:{start:{line:296,column:4},end:{line:296,column:148}}},fnMap:{0:{name:"isLiteralExpression",decl:{start:{line:9,column:9},end:{line:9,column:28}},loc:{start:{line:9,column:36},end:{line:11,column:1}},line:9},1:{name:"isGetExpression",decl:{start:{line:12,column:9},end:{line:12,column:24}},loc:{start:{line:12,column:32},end:{line:14,column:1}},line:12},2:{name:"isZoomField",decl:{start:{line:15,column:9},end:{line:15,column:20}},loc:{start:{line:15,column:28},end:{line:19,column:1}},line:15},3:{name:"(anonymous_3)",decl:{start:{line:16,column:168},end:{line:16,column:169}},loc:{start:{line:16,column:178},end:{line:18,column:3}},line:16},4:{name:"isIdentityProperty",decl:{start:{line:20,column:9},end:{line:20,column:27}},loc:{start:{line:20,column:35},end:{line:22,column:1}},line:20},5:{name:"isDataStopProperty",decl:{start:{line:23,column:9},end:{line:23,column:27}},loc:{start:{line:23,column:35},end:{line:27,column:1}},line:23},6:{name:"(anonymous_6)",decl:{start:{line:24,column:168},end:{line:24,column:169}},loc:{start:{line:24,column:178},end:{line:26,column:3}},line:24},7:{name:"isDataField",decl:{start:{line:28,column:9},end:{line:28,column:20}},loc:{start:{line:28,column:28},end:{line:30,column:1}},line:28},8:{name:"isPrimative",decl:{start:{line:31,column:9},end:{line:31,column:20}},loc:{start:{line:31,column:28},end:{line:34,column:1}},line:31},9:{name:"isArrayOfPrimatives",decl:{start:{line:35,column:9},end:{line:35,column:28}},loc:{start:{line:35,column:37},end:{line:40,column:1}},line:35},10:{name:"getDataType",decl:{start:{line:41,column:9},end:{line:41,column:20}},loc:{start:{line:41,column:44},end:{line:55,column:1}},line:41},11:{name:"(anonymous_11)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:21},end:{line:63,column:3}},line:57},12:{name:"(anonymous_12)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:48},end:{line:73,column:3}},line:64},13:{name:"(anonymous_13)",decl:{start:{line:74,column:2},end:{line:74,column:3}},loc:{start:{line:74,column:34},end:{line:82,column:3}},line:74},14:{name:"(anonymous_14)",decl:{start:{line:83,column:12},end:{line:83,column:13}},loc:{start:{line:83,column:18},end:{line:99,column:3}},line:83},15:{name:"(anonymous_15)",decl:{start:{line:100,column:21},end:{line:100,column:22}},loc:{start:{line:100,column:27},end:{line:106,column:3}},line:100},16:{name:"(anonymous_16)",decl:{start:{line:107,column:15},end:{line:107,column:16}},loc:{start:{line:107,column:28},end:{line:118,column:3}},line:107},17:{name:"(anonymous_17)",decl:{start:{line:119,column:21},end:{line:119,column:22}},loc:{start:{line:119,column:27},end:{line:148,column:3}},line:119},18:{name:"(anonymous_18)",decl:{start:{line:126,column:33},end:{line:126,column:34}},loc:{start:{line:126,column:43},end:{line:128,column:11}},line:126},19:{name:"(anonymous_19)",decl:{start:{line:149,column:19},end:{line:149,column:20}},loc:{start:{line:149,column:25},end:{line:165,column:3}},line:149},20:{name:"(anonymous_20)",decl:{start:{line:166,column:12},end:{line:166,column:13}},loc:{start:{line:166,column:18},end:{line:169,column:3}},line:166},21:{name:"(anonymous_21)",decl:{start:{line:170,column:19},end:{line:170,column:20}},loc:{start:{line:170,column:25},end:{line:181,column:3}},line:170},22:{name:"(anonymous_22)",decl:{start:{line:182,column:21},end:{line:182,column:22}},loc:{start:{line:182,column:27},end:{line:220,column:3}},line:182},23:{name:"(anonymous_23)",decl:{start:{line:193,column:33},end:{line:193,column:34}},loc:{start:{line:193,column:43},end:{line:195,column:11}},line:193},24:{name:"(anonymous_24)",decl:{start:{line:221,column:18},end:{line:221,column:19}},loc:{start:{line:221,column:24},end:{line:223,column:3}},line:221},25:{name:"(anonymous_25)",decl:{start:{line:224,column:20},end:{line:224,column:21}},loc:{start:{line:224,column:26},end:{line:226,column:3}},line:224},26:{name:"(anonymous_26)",decl:{start:{line:227,column:2},end:{line:227,column:3}},loc:{start:{line:227,column:11},end:{line:297,column:3}},line:227}},branchMap:{0:{loc:{start:{line:10,column:9},end:{line:10,column:77}},type:"binary-expr",locations:[{start:{line:10,column:9},end:{line:10,column:29}},{start:{line:10,column:33},end:{line:10,column:51}},{start:{line:10,column:55},end:{line:10,column:77}}],line:10},1:{loc:{start:{line:13,column:9},end:{line:13,column:73}},type:"binary-expr",locations:[{start:{line:13,column:9},end:{line:13,column:29}},{start:{line:13,column:33},end:{line:13,column:51}},{start:{line:13,column:55},end:{line:13,column:73}}],line:13},2:{loc:{start:{line:16,column:9},end:{line:18,column:4}},type:"binary-expr",locations:[{start:{line:16,column:9},end:{line:16,column:34}},{start:{line:16,column:38},end:{line:16,column:49}},{start:{line:16,column:53},end:{line:16,column:90}},{start:{line:16,column:94},end:{line:16,column:120}},{start:{line:16,column:124},end:{line:16,column:146}},{start:{line:16,column:150},end:{line:18,column:4}}],line:16},3:{loc:{start:{line:17,column:11},end:{line:17,column:51}},type:"binary-expr",locations:[{start:{line:17,column:11},end:{line:17,column:30}},{start:{line:17,column:34},end:{line:17,column:51}}],line:17},4:{loc:{start:{line:21,column:9},end:{line:21,column:122}},type:"binary-expr",locations:[{start:{line:21,column:9},end:{line:21,column:34}},{start:{line:21,column:38},end:{line:21,column:63}},{start:{line:21,column:67},end:{line:21,column:122}}],line:21},5:{loc:{start:{line:24,column:9},end:{line:26,column:4}},type:"binary-expr",locations:[{start:{line:24,column:9},end:{line:24,column:34}},{start:{line:24,column:38},end:{line:24,column:49}},{start:{line:24,column:53},end:{line:24,column:90}},{start:{line:24,column:94},end:{line:24,column:116}},{start:{line:24,column:120},end:{line:24,column:146}},{start:{line:24,column:150},end:{line:26,column:4}}],line:24},6:{loc:{start:{line:25,column:11},end:{line:25,column:82}},type:"binary-expr",locations:[{start:{line:25,column:11},end:{line:25,column:30}},{start:{line:25,column:34},end:{line:25,column:51}},{start:{line:25,column:55},end:{line:25,column:82}}],line:25},7:{loc:{start:{line:29,column:9},end:{line:29,column:63}},type:"binary-expr",locations:[{start:{line:29,column:9},end:{line:29,column:34}},{start:{line:29,column:38},end:{line:29,column:63}}],line:29},8:{loc:{start:{line:36,column:2},end:{line:38,column:3}},type:"if",locations:[{start:{line:36,column:2},end:{line:38,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:36},9:{loc:{start:{line:41,column:28},end:{line:41,column:42}},type:"default-arg",locations:[{start:{line:41,column:40},end:{line:41,column:42}}],line:41},10:{loc:{start:{line:42,column:2},end:{line:54,column:3}},type:"if",locations:[{start:{line:42,column:2},end:{line:54,column:3}},{start:{line:44,column:9},end:{line:54,column:3}}],line:42},11:{loc:{start:{line:44,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:44,column:9},end:{line:54,column:3}},{start:{line:46,column:9},end:{line:54,column:3}}],line:44},12:{loc:{start:{line:46,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:46,column:9},end:{line:54,column:3}},{start:{line:48,column:9},end:{line:54,column:3}}],line:46},13:{loc:{start:{line:46,column:13},end:{line:46,column:69}},type:"binary-expr",locations:[{start:{line:46,column:13},end:{line:46,column:39}},{start:{line:46,column:43},end:{line:46,column:69}}],line:46},14:{loc:{start:{line:48,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:48,column:9},end:{line:54,column:3}},{start:{line:50,column:9},end:{line:54,column:3}}],line:48},15:{loc:{start:{line:50,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:50,column:9},end:{line:54,column:3}},{start:{line:52,column:9},end:{line:54,column:3}}],line:50},16:{loc:{start:{line:65,column:4},end:{line:72,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:72,column:5}},{start:{line:67,column:11},end:{line:72,column:5}}],line:65},17:{loc:{start:{line:75,column:4},end:{line:77,column:5}},type:"if",locations:[{start:{line:75,column:4},end:{line:77,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:75},18:{loc:{start:{line:78,column:4},end:{line:80,column:5}},type:"if",locations:[{start:{line:78,column:4},end:{line:80,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:78},19:{loc:{start:{line:86,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:86,column:4},end:{line:93,column:5}},{start:{line:91,column:11},end:{line:93,column:5}}],line:86},20:{loc:{start:{line:114,column:4},end:{line:116,column:5}},type:"if",locations:[{start:{line:114,column:4},end:{line:116,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:114},21:{loc:{start:{line:122,column:4},end:{line:146,column:5}},type:"if",locations:[{start:{line:122,column:4},end:{line:146,column:5}},{start:{line:139,column:11},end:{line:146,column:5}}],line:122},22:{loc:{start:{line:123,column:6},end:{line:138,column:7}},type:"if",locations:[{start:{line:123,column:6},end:{line:138,column:7}},{start:{line:130,column:13},end:{line:138,column:7}}],line:123},23:{loc:{start:{line:127,column:34},end:{line:127,column:86}},type:"binary-expr",locations:[{start:{line:127,column:34},end:{line:127,column:41}},{start:{line:127,column:45},end:{line:127,column:86}}],line:127},24:{loc:{start:{line:142,column:14},end:{line:142,column:64}},type:"binary-expr",locations:[{start:{line:142,column:14},end:{line:142,column:19}},{start:{line:142,column:23},end:{line:142,column:64}}],line:142},25:{loc:{start:{line:143,column:15},end:{line:143,column:65}},type:"binary-expr",locations:[{start:{line:143,column:15},end:{line:143,column:20}},{start:{line:143,column:24},end:{line:143,column:65}}],line:143},26:{loc:{start:{line:151,column:4},end:{line:164,column:5}},type:"if",locations:[{start:{line:151,column:4},end:{line:164,column:5}},{start:{line:159,column:11},end:{line:164,column:5}}],line:151},27:{loc:{start:{line:159,column:11},end:{line:164,column:5}},type:"if",locations:[{start:{line:159,column:11},end:{line:164,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:159},28:{loc:{start:{line:168,column:11},end:{line:168,column:139}},type:"binary-expr",locations:[{start:{line:168,column:11},end:{line:168,column:33}},{start:{line:168,column:37},end:{line:168,column:63}},{start:{line:168,column:67},end:{line:168,column:85}},{start:{line:168,column:89},end:{line:168,column:109}},{start:{line:168,column:113},end:{line:168,column:139}}],line:168},29:{loc:{start:{line:173,column:4},end:{line:179,column:5}},type:"if",locations:[{start:{line:173,column:4},end:{line:179,column:5}},{start:{line:175,column:11},end:{line:179,column:5}}],line:173},30:{loc:{start:{line:173,column:8},end:{line:173,column:53}},type:"binary-expr",locations:[{start:{line:173,column:8},end:{line:173,column:33}},{start:{line:173,column:37},end:{line:173,column:53}}],line:173},31:{loc:{start:{line:175,column:11},end:{line:179,column:5}},type:"if",locations:[{start:{line:175,column:11},end:{line:179,column:5}},{start:{line:177,column:11},end:{line:179,column:5}}],line:175},32:{loc:{start:{line:178,column:31},end:{line:178,column:68}},type:"binary-expr",locations:[{start:{line:178,column:31},end:{line:178,column:36}},{start:{line:178,column:40},end:{line:178,column:68}}],line:178},33:{loc:{start:{line:184,column:22},end:{line:184,column:61}},type:"cond-expr",locations:[{start:{line:184,column:55},end:{line:184,column:57}},{start:{line:184,column:60},end:{line:184,column:61}}],line:184},34:{loc:{start:{line:187,column:4},end:{line:218,column:5}},type:"if",locations:[{start:{line:187,column:4},end:{line:218,column:5}},{start:{line:208,column:11},end:{line:218,column:5}}],line:187},35:{loc:{start:{line:188,column:6},end:{line:207,column:7}},type:"if",locations:[{start:{line:188,column:6},end:{line:207,column:7}},{start:{line:197,column:13},end:{line:207,column:7}}],line:188},36:{loc:{start:{line:194,column:57},end:{line:194,column:109}},type:"binary-expr",locations:[{start:{line:194,column:57},end:{line:194,column:64}},{start:{line:194,column:68},end:{line:194,column:109}}],line:194},37:{loc:{start:{line:214,column:42},end:{line:214,column:103}},type:"binary-expr",locations:[{start:{line:214,column:42},end:{line:214,column:58}},{start:{line:214,column:62},end:{line:214,column:103}}],line:214},38:{loc:{start:{line:215,column:43},end:{line:215,column:104}},type:"binary-expr",locations:[{start:{line:215,column:43},end:{line:215,column:59}},{start:{line:215,column:63},end:{line:215,column:104}}],line:215},39:{loc:{start:{line:229,column:22},end:{line:229,column:132}},type:"cond-expr",locations:[{start:{line:229,column:74},end:{line:229,column:101}},{start:{line:229,column:104},end:{line:229,column:132}}],line:229},40:{loc:{start:{line:231,column:4},end:{line:295,column:5}},type:"if",locations:[{start:{line:231,column:4},end:{line:295,column:5}},{start:{line:248,column:11},end:{line:295,column:5}}],line:231},41:{loc:{start:{line:248,column:11},end:{line:295,column:5}},type:"if",locations:[{start:{line:248,column:11},end:{line:295,column:5}},{start:{line:264,column:11},end:{line:295,column:5}}],line:248},42:{loc:{start:{line:264,column:11},end:{line:295,column:5}},type:"if",locations:[{start:{line:264,column:11},end:{line:295,column:5}},{start:{line:280,column:11},end:{line:295,column:5}}],line:264}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0},b:{0:[0,0,0],1:[0,0,0],2:[0,0,0,0,0,0],3:[0,0],4:[0,0,0],5:[0,0,0,0,0,0],6:[0,0,0],7:[0,0],8:[0,0],9:[0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0,0,0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0],33:[0,0],34:[0,0],35:[0,0],36:[0,0],37:[0,0],38:[0,0],39:[0,0],40:[0,0],41:[0,0],42:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx"],names:[],mappings:"AAkVQ;AAlVR,OAAO,WAAW;AAElB,OAAO,kBAAkB;AACzB,OAAO,kBAA4B;AACnC,OAAO,kBAAkB;AACzB,OAAO,wBAAwB;AAC/B,SAAQ,YAAY,qBAAoB;AACxC,SAAQ,2BAA0B;AAGlC,SAAS,oBAAoB,OAAY;AACvC,SAAQ,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,KAAK,MAAM,CAAC,MAAM;AACrE;AAEA,SAAS,gBAAgB,OAAY;AACnC,SACE,MAAM,QAAQ,KAAK,KACnB,MAAM,WAAW,KACjB,MAAM,CAAC,MAAM;AAEjB;AAEA,SAAS,YAAY,OAAY;AAC/B,SACE,OAAO,UAAW,YAClB,MAAM,SACN,OAAO,MAAM,aAAc,eAC3B,MAAM,QAAQ,MAAM,KAAK,KACzB,MAAM,MAAM,SAAS,KACrB,MAAM,MAAM,MAAM,CAAC,SAAe;AAChC,WACE,MAAM,QAAQ,IAAI,KAClB,KAAK,WAAW;AAAA,EAEpB,CAAC;AAEL;AAEA,SAAS,mBAAmB,OAAY;AACtC,SACE,OAAO,UAAW,YAClB,MAAM,SAAS,cACf,OAAO,UAAU,eAAe,KAAK,OAAO,UAAU;AAE1D;AAEA,SAAS,mBAAmB,OAAY;AACtC,SACE,OAAO,UAAW,YAClB,MAAM,SACN,OAAO,MAAM,aAAc,eAC3B,MAAM,MAAM,SAAS,KACrB,MAAM,QAAQ,MAAM,KAAK,KACzB,MAAM,MAAM,MAAM,CAAC,SAAe;AAChC,WACE,MAAM,QAAQ,IAAI,KAClB,KAAK,WAAW,KAChB,OAAO,KAAK,CAAC,MAAO;AAAA,EAExB,CAAC;AAEL;AAEA,SAAS,YAAY,OAAY;AAC/B,SACE,mBAAmB,KAAK,KACxB,mBAAmB,KAAK;AAE5B;AAEA,SAAS,YAAY,OAAgD;AACnE,QAAM,QAAQ,CAAC,UAAU,WAAW,QAAQ;AAC5C,SAAO,MAAM,SAAS,OAAO,KAAM;AACrC;AAEA,SAAS,oBAAoB,QAAyD;AACpF,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,OAAO,MAAM,WAAW;AAAA,EACjC;AACA,SAAO;AACT;AAEA,SAAS,YAAY,OAAY,YAAU,CAAC,GAAU;AACpD,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,WACS,UAAU,SAAS,WAAW,oBAAoB,KAAK,GAAG;AACjE,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;AAoBA,qBAAqB,sBAAsB,MAAM,UAAkD;AAAA,EACjG,YAAa,OAA2B;AACtC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,UAAU,YAAY,MAAM,OAAO,MAAM,SAAS;AAAA,MAClD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAqC,OAA2B;AAE9F,QAAI,MAAM,WAAW;AACnB,aAAO,CAAC;AAAA,IACV,OACK;AACH,aAAO;AAAA,QACL,WAAW;AAAA,QACX,UAAU,YAAY,MAAM,OAAO,MAAM,SAAS;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO;AAAA,IACT;AACA,QAAI,UAAU,SAAS,UAAU;AAC/B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,UAAU,MAAM;AACd,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC;AAC5C,UAAM,WAAW,MAAM,MAAM,SAAS,CAAC;AACvC,QAAI,OAAO,SAAS,CAAC,MAAM,UAAU;AACnC,YAAM,KAAK;AAAA,QACT,EAAC,MAAM,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,SAAS,CAAC,EAAE,MAAK;AAAA,QACrD,SAAS,CAAC;AAAA,MACZ,CAAC;AAAA,IACH,OACK;AACH,YAAM,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;AAAA,IAC3C;AAEA,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EACxD;AAAA,EAEA,mBAAmB,MAAM;AACvB,UAAM,EAAC,WAAW,UAAS,IAAI,KAAK;AACpC,SAAK,MAAM,SAAS,WAAW,UAAU,OAAO;AAChD,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,aAAa,CAAC,YAAoB;AAChC,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC;AAC5C,UAAM,OAAO,SAAS,CAAC;AAEvB,QAAI,eAAe;AAAA,MACjB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF;AAEA,QAAG,MAAM,WAAW,GAAG;AACrB,qBAAe,MAAM,CAAC,EAAE,CAAC;AAAA,IAC3B;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EACxD;AAAA,EAEA,mBAAmB,MAAM;AACvB,UAAM,EAAC,MAAK,IAAI,KAAK;AAErB,QAAI;AACJ,QAAI,OAAO,UAAW,UAAU;AAC9B,UAAI,MAAM,OAAO;AACf,mBAAW;AAAA,UACT,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,MAAM,IAAI,CAAC,SAAe;AACrC,mBAAO,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAC5E,CAAC;AAAA,QACH;AAAA,MACF,OACK;AACH,mBAAW;AAAA,UACT,MAAM,MAAM;AAAA,UACZ,OAAO;AAAA,YACL,CAAC,GAAG,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,YAC7C,CAAC,IAAI,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAChD;AAAA,QACF;AAAA,MACF;AAAA,IACF,OACK;AACH,iBAAW;AAAA,QACT,OAAO;AAAA,UACL,CAAC,GAAG,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UACtD,CAAC,IAAI,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,QAAQ;AAAA,EACpD;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAEhC,QAAI,gBAAgB,KAAK,GAAG;AAC1B,WAAK,MAAM,SAAS,WAAW;AAAA,QAC7B,QAAQ;AAAA,QACR,YAAY,MAAM,CAAC;AAAA,MACrB,CAAC;AACD,WAAK,SAAS;AAAA,QACZ,UAAU;AAAA,MACZ,CAAC;AAAA,IACH,WACS,oBAAoB,KAAK,GAAG;AACnC,WAAK,MAAM,SAAS,WAAW,MAAM,CAAC,CAAC;AACvC,WAAK,SAAS;AAAA,QACZ,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,UAAU,MAAM;AACd,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAChC,WACE,gBAAgB,KAAK,KACrB,oBAAoB,KAAK,KACzB,YAAY,KAAK,KAChB,MAAM,QAAQ,KAAK,KAAK,UAAU,SAAS;AAAA,EAEhD;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAChC,QAAI;AAEJ,QAAI,OAAO,UAAW,YAAY,WAAW,OAAO;AAClD,mBAAa,cAAc,gBAAgB,OAAO,SAAS;AAAA,IAC7D,WACS,mBAAmB,KAAK,GAAG;AAClC,mBAAa,CAAC,OAAO,MAAM,QAAQ;AAAA,IACrC,OACK;AACH,mBAAa,CAAC,WAAW,SAAS,KAAK,MAAM,UAAU,OAAO;AAAA,IAChE;AACA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,UAAU;AAAA,EACtD;AAAA,EAEA,mBAAmB,MAAM;AACvB,UAAM,eAAe,KAAK,qBAAqB,KAAK,MAAM,SAAS;AACnE,UAAM,YAAY,iBAAiB,gBAAgB,KAAK;AACxD,UAAM,EAAC,MAAK,IAAI,KAAK;AACrB,QAAI;AAEJ,QAAI,OAAO,UAAW,UAAU;AAC9B,UAAI,MAAM,OAAO;AACf,mBAAW;AAAA,UACT,UAAU;AAAA,UACV,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,MAAM,IAAI,CAAC,SAAe;AACrC,mBAAO,CAAC,EAAC,MAAM,KAAK,CAAC,GAAG,OAAO,UAAS,GAAG,KAAK,CAAC,KAAK,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UACjG,CAAC;AAAA,QACH;AAAA,MACF,OACK;AACH,mBAAW;AAAA,UACT,UAAU;AAAA,UACV,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,UACZ,OAAO;AAAA,YACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,YACvE,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAC1E;AAAA,QACF;AAAA,MACF;AAAA,IACF,OACK;AACH,iBAAW;AAAA,QACT,UAAU;AAAA,QACV,MAAM;AAAA,QACN,MAAM,MAAM;AAAA,QACZ,OAAO;AAAA,UACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,KAAK,MAAM,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAC3F,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,KAAK,MAAM,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,QAC9F;AAAA,MACF;AAAA,IACF;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,QAAQ;AAAA,EACpD;AAAA,EAEA,gBAAgB,MAAM;AACpB,SAAK,SAAS,EAAC,WAAW,KAAI,CAAC;AAAA,EACjC;AAAA,EAEA,kBAAkB,MAAM;AACtB,SAAK,SAAS,EAAC,WAAW,MAAK,CAAC;AAAA,EAClC;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,SAAQ,IAAI,KAAK;AACxB,UAAM,YAAY,KAAK,MAAM,UAAU,YAAY,KAAK,MAAM,QAAQ,8BAA8B;AACpG,QAAI;AAEJ,QAAI,aAAa,cAAc;AAC7B,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,MAAM,KAAK,MAAM,SAAS;AAAA,UAC7D,SAAS,KAAK;AAAA,UACd,QAAQ,KAAK;AAAA,UACb,UAAU,KAAK;AAAA,UACf,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,SAAS,KAAK;AAAA,UACd,QAAQ,KAAK;AAAA;AAAA,MACf;AAAA,IAEJ,WACS,aAAa,iBAAiB;AACrC,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,IAAI;AAAA,UACvC,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,cAAc,KAAK;AAAA,UACnB,WAAW,KAAK;AAAA,UAChB,wBAAwB,KAAK;AAAA,UAC7B,mBAAmB,KAAK;AAAA;AAAA,MAC1B;AAAA,IAEJ,WACS,aAAa,iBAAiB;AAErC,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,IAAI;AAAA,UACvC,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,cAAc,KAAK;AAAA,UACnB,WAAW,KAAK;AAAA,UAChB,wBAAwB,KAAK;AAAA,UAC7B,mBAAmB,KAAK;AAAA;AAAA,MAC1B;AAAA,IAEJ,OACK;AACH,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,IAAI;AAAA,UACvC,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,aAAa,KAAK;AAAA,UAClB,aAAa,KAAK;AAAA,UAClB,mBAAmB,KAAK;AAAA;AAAA,MAC1B;AAAA,IAEJ;AACA,WAAO,oBAAC,SAAI,WAAW,WAAW,eAAa,0BAAwB,KAAK,MAAM,WAC/E,qBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"36be9049018d9eb4ab6b3a8eeeb8db87a4e7a5ee"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return dt=function(){return a},a}dt();function AL(n){return dt().f[0]++,dt().s[0]++,dt().b[0][0]++,Array.isArray(n)&&(dt().b[0][1]++,n.length===2)&&(dt().b[0][2]++,n[0]==="literal")}function cL(n){return dt().f[1]++,dt().s[1]++,dt().b[1][0]++,Array.isArray(n)&&(dt().b[1][1]++,n.length===2)&&(dt().b[1][2]++,n[0]==="get")}function x8e(n){return dt().f[2]++,dt().s[2]++,dt().b[2][0]++,typeof n=="object"&&(dt().b[2][1]++,n.stops)&&(dt().b[2][2]++,typeof n.property>"u")&&(dt().b[2][3]++,Array.isArray(n.stops))&&(dt().b[2][4]++,n.stops.length>1)&&(dt().b[2][5]++,n.stops.every(e=>(dt().f[3]++,dt().s[3]++,dt().b[3][0]++,Array.isArray(e)&&(dt().b[3][1]++,e.length===2))))}function KQ(n){return dt().f[4]++,dt().s[4]++,dt().b[4][0]++,typeof n=="object"&&(dt().b[4][1]++,n.type==="identity")&&(dt().b[4][2]++,Object.prototype.hasOwnProperty.call(n,"property"))}function w8e(n){return dt().f[5]++,dt().s[5]++,dt().b[5][0]++,typeof n=="object"&&(dt().b[5][1]++,n.stops)&&(dt().b[5][2]++,typeof n.property<"u")&&(dt().b[5][3]++,n.stops.length>1)&&(dt().b[5][4]++,Array.isArray(n.stops))&&(dt().b[5][5]++,n.stops.every(e=>(dt().f[6]++,dt().s[6]++,dt().b[6][0]++,Array.isArray(e)&&(dt().b[6][1]++,e.length===2)&&(dt().b[6][2]++,typeof e[0]=="object"))))}function M8e(n){return dt().f[7]++,dt().s[7]++,dt().b[7][0]++,KQ(n)||(dt().b[7][1]++,w8e(n))}function wk(n){dt().f[8]++;const e=(dt().s[8]++,["string","boolean","number"]);return dt().s[9]++,e.includes(typeof n)}function S8e(n){return dt().f[9]++,dt().s[10]++,Array.isArray(n)?(dt().b[8][0]++,dt().s[11]++,n.every(wk)):(dt().b[8][1]++,dt().s[12]++,!1)}function dL(n,e=(dt().b[9][0]++,{})){return dt().f[10]++,dt().s[13]++,n===void 0?(dt().b[10][0]++,dt().s[14]++,"value"):(dt().b[10][1]++,dt().s[15]++,wk(n)?(dt().b[11][0]++,dt().s[16]++,"value"):(dt().b[11][1]++,dt().s[17]++,dt().b[13][0]++,e.type==="array"&&(dt().b[13][1]++,S8e(n))?(dt().b[12][0]++,dt().s[18]++,"value"):(dt().b[12][1]++,dt().s[19]++,x8e(n)?(dt().b[14][0]++,dt().s[20]++,"zoom_function"):(dt().b[14][1]++,dt().s[21]++,M8e(n)?(dt().b[15][0]++,dt().s[22]++,"data_function"):(dt().b[15][1]++,dt().s[23]++,"expression")))))}class E8e extends Mn.Component{constructor(t){dt().f[11]++,dt().s[24]++;super(t);sn(this,"addStop",(dt().s[34]++,()=>{dt().f[14]++;const t=(dt().s[35]++,this.props.value.stops.slice(0)),r=(dt().s[36]++,t[t.length-1]);dt().s[37]++,typeof r[0]=="object"?(dt().b[19][0]++,dt().s[38]++,t.push([{zoom:r[0].zoom+1,value:r[0].value},r[1]])):(dt().b[19][1]++,dt().s[39]++,t.push([r[0]+1,r[1]]));const i=(dt().s[40]++,{...this.props.value,stops:t});dt().s[41]++,this.props.onChange(this.props.fieldName,i)}));sn(this,"deleteExpression",(dt().s[42]++,()=>{dt().f[15]++;const{fieldSpec:t,fieldName:r}=(dt().s[43]++,this.props);dt().s[44]++,this.props.onChange(r,t.default),dt().s[45]++,this.setState({dataType:"value"})}));sn(this,"deleteStop",(dt().s[46]++,t=>{dt().f[16]++;const r=(dt().s[47]++,this.props.value.stops.slice(0));dt().s[48]++,r.splice(t,1);let i=(dt().s[49]++,{...this.props.value,stops:r});dt().s[50]++,r.length===1?(dt().b[20][0]++,dt().s[51]++,i=r[0][1]):dt().b[20][1]++,dt().s[52]++,this.props.onChange(this.props.fieldName,i)}));sn(this,"makeZoomFunction",(dt().s[53]++,()=>{dt().f[17]++;const{value:t}=(dt().s[54]++,this.props);let r;dt().s[55]++,typeof t=="object"?(dt().b[21][0]++,dt().s[56]++,t.stops?(dt().b[22][0]++,dt().s[57]++,r={base:t.base,stops:t.stops.map(i=>(dt().f[18]++,dt().s[58]++,[i[0].zoom,(dt().b[23][0]++,i[1]||(dt().b[23][1]++,Id(this.props.fieldSpec)))]))}):(dt().b[22][1]++,dt().s[59]++,r={base:t.base,stops:[[6,Id(this.props.fieldSpec)],[10,Id(this.props.fieldSpec)]]})):(dt().b[21][1]++,dt().s[60]++,r={stops:[[6,(dt().b[24][0]++,t||(dt().b[24][1]++,Id(this.props.fieldSpec)))],[10,(dt().b[25][0]++,t||(dt().b[25][1]++,Id(this.props.fieldSpec)))]]}),dt().s[61]++,this.props.onChange(this.props.fieldName,r)}));sn(this,"undoExpression",(dt().s[62]++,()=>{dt().f[19]++;const{value:t,fieldName:r}=(dt().s[63]++,this.props);dt().s[64]++,cL(t)?(dt().b[26][0]++,dt().s[65]++,this.props.onChange(r,{type:"identity",property:t[1]}),dt().s[66]++,this.setState({dataType:"value"})):(dt().b[26][1]++,dt().s[67]++,AL(t)?(dt().b[27][0]++,dt().s[68]++,this.props.onChange(r,t[1]),dt().s[69]++,this.setState({dataType:"value"})):dt().b[27][1]++)}));sn(this,"canUndo",(dt().s[70]++,()=>{dt().f[20]++;const{value:t,fieldSpec:r}=(dt().s[71]++,this.props);return dt().s[72]++,dt().b[28][0]++,cL(t)||(dt().b[28][1]++,AL(t))||(dt().b[28][2]++,wk(t))||(dt().b[28][3]++,Array.isArray(t)&&(dt().b[28][4]++,r.type==="array"))}));sn(this,"makeExpression",(dt().s[73]++,()=>{dt().f[21]++;const{value:t,fieldSpec:r}=(dt().s[74]++,this.props);let i;dt().s[75]++,dt().b[30][0]++,typeof t=="object"&&(dt().b[30][1]++,"stops"in t)?(dt().b[29][0]++,dt().s[76]++,i=Wne.convertFunction(t,r)):(dt().b[29][1]++,dt().s[77]++,KQ(t)?(dt().b[31][0]++,dt().s[78]++,i=["get",t.property]):(dt().b[31][1]++,dt().s[79]++,i=["literal",(dt().b[32][0]++,t||(dt().b[32][1]++,this.props.fieldSpec.default))])),dt().s[80]++,this.props.onChange(this.props.fieldName,i)}));sn(this,"makeDataFunction",(dt().s[81]++,()=>{dt().f[22]++;const t=(dt().s[82]++,this.getFieldFunctionType(this.props.fieldSpec)),r=(dt().s[83]++,t==="categorical"?(dt().b[33][0]++,""):(dt().b[33][1]++,0)),{value:i}=(dt().s[84]++,this.props);let o;dt().s[85]++,typeof i=="object"?(dt().b[34][0]++,dt().s[86]++,i.stops?(dt().b[35][0]++,dt().s[87]++,o={property:"",type:t,base:i.base,stops:i.stops.map(a=>(dt().f[23]++,dt().s[88]++,[{zoom:a[0],value:r},(dt().b[36][0]++,a[1]||(dt().b[36][1]++,Id(this.props.fieldSpec)))]))}):(dt().b[35][1]++,dt().s[89]++,o={property:"",type:t,base:i.base,stops:[[{zoom:6,value:r},Id(this.props.fieldSpec)],[{zoom:10,value:r},Id(this.props.fieldSpec)]]})):(dt().b[34][1]++,dt().s[90]++,o={property:"",type:t,base:i.base,stops:[[{zoom:6,value:r},(dt().b[37][0]++,this.props.value||(dt().b[37][1]++,Id(this.props.fieldSpec)))],[{zoom:10,value:r},(dt().b[38][0]++,this.props.value||(dt().b[38][1]++,Id(this.props.fieldSpec)))]]}),dt().s[91]++,this.props.onChange(this.props.fieldName,o)}));sn(this,"onMarkEditing",(dt().s[92]++,()=>{dt().f[24]++,dt().s[93]++,this.setState({isEditing:!0})}));sn(this,"onUnmarkEditing",(dt().s[94]++,()=>{dt().f[25]++,dt().s[95]++,this.setState({isEditing:!1})}));dt().s[25]++,this.state={dataType:dL(t.value,t.fieldSpec),isEditing:!1}}static getDerivedStateFromProps(t,r){return dt().f[12]++,dt().s[26]++,r.isEditing?(dt().b[16][0]++,dt().s[27]++,{}):(dt().b[16][1]++,dt().s[28]++,{isEditing:!1,dataType:dL(t.value,t.fieldSpec)})}getFieldFunctionType(t){return dt().f[13]++,dt().s[29]++,t.expression.interpolated?(dt().b[17][0]++,dt().s[30]++,"exponential"):(dt().b[17][1]++,dt().s[31]++,t.type==="number"?(dt().b[18][0]++,dt().s[32]++,"interval"):(dt().b[18][1]++,dt().s[33]++,"categorical"))}render(){dt().f[26]++;const{dataType:t}=(dt().s[96]++,this.state),r=(dt().s[97]++,this.props.fieldSpec.default===this.props.value?(dt().b[39][0]++,"maputnik-default-property"):(dt().b[39][1]++,"maputnik-modified-property"));let i;return dt().s[98]++,t==="expression"?(dt().b[40][0]++,dt().s[99]++,i=G.jsx(y$,{errors:this.props.errors,onChange:this.props.onChange.bind(this,this.props.fieldName),canUndo:this.canUndo,onUndo:this.undoExpression,onDelete:this.deleteExpression,fieldType:this.props.fieldType,fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:this.props.value,onFocus:this.onMarkEditing,onBlur:this.onUnmarkEditing})):(dt().b[40][1]++,dt().s[100]++,t==="zoom_function"?(dt().b[41][0]++,dt().s[101]++,i=G.jsx(b8e,{errors:this.props.errors,onChange:this.props.onChange.bind(this),fieldType:this.props.fieldType,fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:this.props.value,onDeleteStop:this.deleteStop,onAddStop:this.addStop,onChangeToDataFunction:this.makeDataFunction,onExpressionClick:this.makeExpression})):(dt().b[41][1]++,dt().s[102]++,t==="data_function"?(dt().b[42][0]++,dt().s[103]++,i=G.jsx(_8e,{errors:this.props.errors,onChange:this.props.onChange.bind(this),fieldType:this.props.fieldType,fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:this.props.value,onDeleteStop:this.deleteStop,onAddStop:this.addStop,onChangeToZoomFunction:this.makeZoomFunction,onExpressionClick:this.makeExpression})):(dt().b[42][1]++,dt().s[104]++,i=G.jsx(BQ,{errors:this.props.errors,onChange:this.props.onChange.bind(this),fieldType:this.props.fieldType,fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:this.props.value,onZoomClick:this.makeZoomFunction,onDataClick:this.makeDataFunction,onExpressionClick:this.makeExpression})))),dt().s[105]++,G.jsx("div",{className:r,"data-wd-key":"spec-field-container:"+this.props.fieldName,children:i})}}function ki(){var n="/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",e="411d3be261f729b266d6cb26884b34616b925c83",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",statementMap:{0:{start:{line:4,column:23},end:{line:4,column:117}},1:{start:{line:6,column:20},end:{line:6,column:60}},2:{start:{line:7,column:16},end:{line:7,column:49}},3:{start:{line:8,column:20},end:{line:8,column:36}},4:{start:{line:9,column:2},end:{line:14,column:3}},5:{start:{line:10,column:4},end:{line:13,column:6}},6:{start:{line:15,column:2},end:{line:20,column:3}},7:{start:{line:16,column:4},end:{line:19,column:6}},8:{start:{line:21,column:2},end:{line:21,column:19}},9:{start:{line:24,column:16},end:{line:24,column:48}},10:{start:{line:25,column:2},end:{line:29,column:3}},11:{start:{line:26,column:4},end:{line:26,column:19}},12:{start:{line:28,column:4},end:{line:28,column:20}},13:{start:{line:32,column:21},end:{line:35,column:3}},14:{start:{line:33,column:18},end:{line:33,column:80}},15:{start:{line:34,column:4},end:{line:34,column:51}},16:{start:{line:37,column:23},end:{line:37,column:33}},17:{start:{line:38,column:19},end:{line:56,column:6}},18:{start:{line:39,column:24},end:{line:39,column:87}},19:{start:{line:40,column:20},end:{line:40,column:48}},20:{start:{line:41,column:21},end:{line:41,column:50}},21:{start:{line:42,column:25},end:{line:42,column:82}},22:{start:{line:43,column:24},end:{line:43,column:63}},23:{start:{line:44,column:6},end:{line:55,column:8}},24:{start:{line:57,column:4},end:{line:57,column:98}}},fnMap:{0:{name:"getFieldSpec",decl:{start:{line:5,column:9},end:{line:5,column:21}},loc:{start:{line:5,column:50},end:{line:22,column:1}},line:5},1:{name:"getGroupName",decl:{start:{line:23,column:9},end:{line:23,column:21}},loc:{start:{line:23,column:50},end:{line:30,column:1}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:32,column:21},end:{line:32,column:22}},loc:{start:{line:32,column:45},end:{line:35,column:3}},line:32},3:{name:"(anonymous_3)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:11},end:{line:58,column:3}},line:36},4:{name:"(anonymous_4)",decl:{start:{line:38,column:46},end:{line:38,column:47}},loc:{start:{line:38,column:61},end:{line:56,column:5}},line:38}},branchMap:{0:{loc:{start:{line:9,column:2},end:{line:14,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:14,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:9},1:{loc:{start:{line:15,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:20,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:24,column:16},end:{line:24,column:48}},type:"binary-expr",locations:[{start:{line:24,column:16},end:{line:24,column:42}},{start:{line:24,column:46},end:{line:24,column:48}}],line:24},3:{loc:{start:{line:25,column:2},end:{line:29,column:3}},type:"if",locations:[{start:{line:25,column:2},end:{line:29,column:3}},{start:{line:27,column:9},end:{line:29,column:3}}],line:25},4:{loc:{start:{line:40,column:20},end:{line:40,column:48}},type:"binary-expr",locations:[{start:{line:40,column:20},end:{line:40,column:42}},{start:{line:40,column:46},end:{line:40,column:48}}],line:40},5:{loc:{start:{line:41,column:21},end:{line:41,column:50}},type:"binary-expr",locations:[{start:{line:41,column:21},end:{line:41,column:44}},{start:{line:41,column:48},end:{line:41,column:50}}],line:41},6:{loc:{start:{line:42,column:25},end:{line:42,column:82}},type:"cond-expr",locations:[{start:{line:42,column:46},end:{line:42,column:62}},{start:{line:42,column:65},end:{line:42,column:82}}],line:42},7:{loc:{start:{line:43,column:24},end:{line:43,column:63}},type:"cond-expr",locations:[{start:{line:43,column:45},end:{line:43,column:52}},{start:{line:43,column:55},end:{line:43,column:63}}],line:43}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx"],names:[],mappings:"AA+Da;AA/Db,OAAO,WAAW;AAElB,OAAO,mBAAmB;AAG1B,MAAM,iBAAiB,CAAC,sBAAsB,gBAAgB,gBAAgB,0BAA0B,YAAY;AAIpH,SAAS,aAAa,MAAW,WAAuC,WAAmB;AACzF,QAAM,YAAY,aAAa,MAAM,WAAW,SAAS;AACzD,QAAM,QAAQ,KAAK,YAAY,MAAM,SAAS;AAC9C,QAAM,YAAY,MAAM,SAAS;AACjC,MAAG,eAAe,QAAQ,SAAS,KAAK,GAAG;AACzC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,KAAK,MAAM,OAAO;AAAA,IAC5B;AAAA,EACF;AACA,MAAG,cAAc,aAAa;AAC5B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,KAAK,MAAM,OAAO;AAAA,IAC5B;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,aAAa,MAAW,WAAuC,WAAmB;AACzF,QAAM,QAAS,KAAK,WAAW,SAAS,KAAK,CAAC;AAC9C,MAAI,aAAa,OAAO;AACtB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAUA,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,mBAAmB,CAAC,UAAkB,aAAkB;AACtD,UAAM,QAAQ,aAAa,KAAK,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,QAAQ;AAC3E,SAAK,MAAM,SAAS,OAAO,UAAU,QAAQ;AAAA,EAC/C;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,OAAM,IAAI,KAAK;AACtB,UAAM,SAAS,KAAK,MAAM,YAAY,IAAI,eAAa;AACrD,YAAM,YAAY,aAAa,KAAK,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,SAAS;AAEhF,YAAM,QAAQ,KAAK,MAAM,MAAM,SAAS,CAAC;AACzC,YAAM,SAAS,KAAK,MAAM,MAAM,UAAU,CAAC;AAC3C,YAAM,aAAa,aAAa,QAC5B,MAAM,SAA+B,IACrC,OAAO,SAAgC;AAC3C,YAAM,YAAY,aAAa,QAAQ,UAAU;AAEjD,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA,UAAU,KAAK;AAAA,UAEf;AAAA,UACA,OAAO;AAAA,UACP;AAAA,UACA;AAAA;AAAA,QAJK;AAAA,MAKP;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,2BACnB,kBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"411d3be261f729b266d6cb26884b34616b925c83"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ki=function(){return a},a}ki();const O8e=(ki().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);function B8e(n,e,t){ki().f[0]++;const r=(ki().s[1]++,PQ(n,e,t)),i=(ki().s[2]++,n[r+"_"+e]),o=(ki().s[3]++,i[t]);return ki().s[4]++,O8e.indexOf(t)>=0?(ki().b[0][0]++,ki().s[5]++,{...o,values:n.$root.sprite.values}):(ki().b[0][1]++,ki().s[6]++,t==="text-font"?(ki().b[1][0]++,ki().s[7]++,{...o,values:n.$root.glyphs.values}):(ki().b[1][1]++,ki().s[8]++,o))}function PQ(n,e,t){ki().f[1]++;const r=(ki().s[9]++,ki().b[2][0]++,n["paint_"+e]||(ki().b[2][1]++,{}));return ki().s[10]++,t in r?(ki().b[3][0]++,ki().s[11]++,"paint"):(ki().b[3][1]++,ki().s[12]++,"layout")}class I8e extends Mn.Component{constructor(){super(...arguments);sn(this,"onPropertyChange",(ki().s[13]++,(t,r)=>{ki().f[2]++;const i=(ki().s[14]++,PQ(this.props.spec,this.props.layer.type,t));ki().s[15]++,this.props.onChange(i,t,r)}))}render(){ki().f[3]++;const{errors:t}=(ki().s[16]++,this.props),r=(ki().s[17]++,this.props.groupFields.map(i=>{ki().f[4]++;const o=(ki().s[18]++,B8e(this.props.spec,this.props.layer.type,i)),a=(ki().s[19]++,ki().b[4][0]++,this.props.layer.paint||(ki().b[4][1]++,{})),s=(ki().s[20]++,ki().b[5][0]++,this.props.layer.layout||(ki().b[5][1]++,{})),d=(ki().s[21]++,i in a?(ki().b[6][0]++,a[i]):(ki().b[6][1]++,s[i])),f=(ki().s[22]++,i in a?(ki().b[7][0]++,"paint"):(ki().b[7][1]++,"layout"));return ki().s[23]++,G.jsx(E8e,{errors:t,onChange:this.onPropertyChange,fieldName:i,value:d,fieldType:f,fieldSpec:o},i)}));return ki().s[24]++,G.jsx("div",{className:"maputnik-property-group",children:r})}}var k8e=function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.d=function(r,i,o){t.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},t.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,i){if(1&i&&(r=t(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)t.d(o,a,(function(s){return r[s]}).bind(null,a));return o},t.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(i,"a",i),i},t.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},t.p="",t(t.s=2)}([function(n,e){n.exports=Lh},function(n,e){n.exports=Wn},function(n,e,t){t.r(e);var r=t(1),i=t(0),o=function(){return(o=Object.assign||function(D){for(var $,H=1,Q=arguments.length;H<Q;H++)for(var N in $=arguments[H])Object.prototype.hasOwnProperty.call($,N)&&(D[N]=$[N]);return D}).apply(this,arguments)},a=function(D,$){var H={};for(var Q in D)Object.prototype.hasOwnProperty.call(D,Q)&&$.indexOf(Q)<0&&(H[Q]=D[Q]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function"){var N=0;for(Q=Object.getOwnPropertySymbols(D);N<Q.length;N++)$.indexOf(Q[N])<0&&Object.prototype.propertyIsEnumerable.call(D,Q[N])&&(H[Q[N]]=D[Q[N]])}return H},s=0,d=r.forwardRef(function(D,$){var H=D.title,Q=H===void 0?null:H,N=D.description,Z=N===void 0?null:N,ae=D.size,pe=ae===void 0?null:ae,fe=D.color,X=fe===void 0?"currentColor":fe,oe=D.horizontal,Ce=oe===void 0?null:oe,we=D.vertical,Te=we===void 0?null:we,Pe=D.rotate,he=Pe===void 0?null:Pe,$e=D.spin,ye=$e===void 0?null:$e,gt=D.style,yt=gt===void 0?{}:gt,st=D.children,ft=a(D,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);s++;var Re,Ve=ye!==null&&ye,Xe=r.Children.map(st,function(Qt){var Yt=Qt;Ve!==!0&&(Ve=(ye===null?Yt.props.spin:ye)===!0);var ke=Yt.props.size;typeof pe=="number"&&typeof Yt.props.size=="number"&&(ke=Yt.props.size/pe);var ge={size:ke,color:X===null?Yt.props.color:X,horizontal:Ce===null?Yt.props.horizontal:Ce,vertical:Te===null?Yt.props.vertical:Te,rotate:he===null?Yt.props.rotate:he,spin:ye===null?Yt.props.spin:ye,inStack:!0};return r.cloneElement(Yt,ge)});pe!==null&&(yt.width=typeof pe=="string"?pe:1.5*pe+"rem");var Jt,Ht="stack_labelledby_"+s,bt="stack_describedby_"+s;if(Q)Re=Z?Ht+" "+bt:Ht;else if(Jt="presentation",Z)throw new Error("title attribute required when description is set");return r.createElement("svg",o({ref:$,viewBox:"0 0 24 24",style:yt,role:Jt,"aria-labelledby":Re},ft),Q&&r.createElement("title",{id:Ht},Q),Z&&r.createElement("desc",{id:bt},Z),Ve&&r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),Xe)});d.displayName="Stack",d.propTypes={size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),children:i.oneOfType([i.arrayOf(i.node),i.node]).isRequired,className:i.string,style:i.object},d.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var f=d;t.d(e,"Icon",function(){return P}),t.d(e,"Stack",function(){return f});var C=function(){return(C=Object.assign||function(D){for(var $,H=1,Q=arguments.length;H<Q;H++)for(var N in $=arguments[H])Object.prototype.hasOwnProperty.call($,N)&&(D[N]=$[N]);return D}).apply(this,arguments)},O=function(D,$){var H={};for(var Q in D)Object.prototype.hasOwnProperty.call(D,Q)&&$.indexOf(Q)<0&&(H[Q]=D[Q]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function"){var N=0;for(Q=Object.getOwnPropertySymbols(D);N<Q.length;N++)$.indexOf(Q[N])<0&&Object.prototype.propertyIsEnumerable.call(D,Q[N])&&(H[Q[N]]=D[Q[N]])}return H},E=0,P=r.forwardRef(function(D,$){var H=D.path,Q=D.id,N=Q===void 0?++E:Q,Z=D.title,ae=Z===void 0?null:Z,pe=D.description,fe=pe===void 0?null:pe,X=D.size,oe=X===void 0?null:X,Ce=D.color,we=Ce===void 0?"currentColor":Ce,Te=D.horizontal,Pe=Te!==void 0&&Te,he=D.vertical,$e=he!==void 0&&he,ye=D.rotate,gt=ye===void 0?0:ye,yt=D.spin,st=yt!==void 0&&yt,ft=D.style,Re=ft===void 0?{}:ft,Ve=D.inStack,Xe=Ve!==void 0&&Ve,Jt=O(D,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),Ht={},bt=[];oe!==null&&(Xe?bt.push("scale("+oe+")"):(Re.width=typeof oe=="string"?oe:1.5*oe+"rem",Re.height=Re.width)),Pe&&bt.push("scaleX(-1)"),$e&&bt.push("scaleY(-1)"),gt!==0&&bt.push("rotate("+gt+"deg)"),we!==null&&(Ht.fill=we);var Qt=r.createElement("path",C({d:H,style:Ht},Xe?Jt:{})),Yt=Qt;bt.length>0&&(Re.transform=bt.join(" "),Re.transformOrigin="center",Xe&&(Yt=r.createElement("g",{style:Re},Qt,r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var ke,ge=Yt,Se=st===!0||typeof st!="number"?2:st,ze=!Xe&&(Pe||$e);if(Se<0&&(ze=!ze),st&&(ge=r.createElement("g",{style:{animation:"spin"+(ze?"-inverse":"")+" linear "+Math.abs(Se)+"s infinite",transformOrigin:"center"}},Yt,!(Pe||$e||gt!==0)&&r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),Xe)return ge;var it,ot="icon_labelledby_"+N,St="icon_describedby_"+N;if(ae)ke=fe?ot+" "+St:ot;else if(it="presentation",fe)throw new Error("title attribute required when description is set");return r.createElement("svg",C({ref:$,viewBox:"0 0 24 24",style:Re,role:it,"aria-labelledby":ke},Jt),ae&&r.createElement("title",{id:ot},ae),fe&&r.createElement("desc",{id:St},fe),!Xe&&st&&(ze?r.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),ge)});P.displayName="Icon",P.propTypes={path:i.string.isRequired,size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),style:i.object,inStack:i.bool,className:i.string},P.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},e.default=P}]);const hL=Ba(k8e);function Sy(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",e="2f1dde9b3c8e927b8e8868bcb310eb3d6a65eb08",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",statementMap:{0:{start:{line:16,column:4},end:{line:45,column:9}},1:{start:{line:22,column:27},end:{line:22,column:74}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:11},end:{line:46,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:22,column:19},end:{line:22,column:20}},loc:{start:{line:22,column:27},end:{line:22,column:74}},line:22}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx"],names:[],mappings:"AA+BQ,SACE,KADF;AA/BR,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,qBAAqB,yBAAyB,MAAM,UAAiC;AAAA,EACnF,SAAS;AACP,WAAO,qBAAC,iBAAc,MAAM,KAAK,MAAM,IACrC;AAAA;AAAA,QAAC;AAAA;AAAA,UAAqB,WAAU;AAAA,UAC9B,eAAa,wBAAsB,KAAK,MAAM,aAAa;AAAA,UAC3D,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,UAE7D,+BAAC,uBAAoB,WAAU,uCAC7B;AAAA,gCAAC,UAAK,OAAO,EAAC,UAAU,EAAC,GAAI,eAAK,MAAM,OAAM;AAAA,YAC9C;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,WAAU;AAAA;AAAA,YACZ;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,WAAU;AAAA;AAAA,YACZ;AAAA,aACF;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,sBACE,eAAK,MAAM,UACd;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2f1dde9b3c8e927b8e8868bcb310eb3d6a65eb08"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Sy=function(){return a},a}Sy();class T8e extends Mn.Component{render(){return Sy().f[0]++,Sy().s[0]++,G.jsxs(ZG,{uuid:this.props.id,children:[G.jsx(e$,{className:"maputnik-layer-editor-group","data-wd-key":"layer-editor-group:"+this.props["data-wd-key"],onClick:e=>(Sy().f[1]++,Sy().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:G.jsxs(Xge,{className:"maputnik-layer-editor-group__button",children:[G.jsx("span",{style:{flexGrow:1},children:this.props.title}),G.jsx(hL,{path:Aye,size:1,className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--up"}),G.jsx(hL,{path:uye,size:1,className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--down"})]})}),G.jsx(nye,{children:this.props.children})]})}}function ev(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",e="32f7af2e1a9dc4f673c1fba818006229f9fd6490",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:10,column:4},end:{line:30,column:6}},2:{start:{line:33,column:21},end:{line:33,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:31,column:3}},line:8}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAQjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,EAAE,UAAU;AAAA,QAAG,WAAW,OAAO,MAAM;AAAA,QAC1D,OAAO,KAAK,MAAM;AAAA,QAClB,eAAY;AAAA,QAEZ;AAAA,UAAC;AAAA;AAAA,YACC,YAAY;AAAA,YACZ,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,SAAS,OAAO,MAAM,QAAQ;AAAA,YAC9B,eAAY;AAAA;AAAA,QACd;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"32f7af2e1a9dc4f673c1fba818006229f9fd6490"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ev=function(){return a},a}ev();class K8e extends Mn.Component{render(){ev().f[0]++;const e=(ev().s[0]++,this.props.t);return ev().s[1]++,G.jsx(la,{label:e("Min Zoom"),fieldSpec:no.layer.minzoom,error:this.props.error,"data-wd-key":"min-zoom",children:G.jsx(qf,{allowRange:!0,value:this.props.value,onChange:this.props.onChange,min:no.layer.minzoom.minimum,max:no.layer.minzoom.maximum,default:no.layer.minzoom.minimum,"data-wd-key":"min-zoom.input"})})}}const P8e=(ev().s[2]++,No()(K8e));function tv(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",e="f706dc673f9397f2919007f4b702470461bf0f7c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:10,column:4},end:{line:30,column:6}},2:{start:{line:33,column:21},end:{line:33,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:31,column:3}},line:8}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAQjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,EAAE,UAAU;AAAA,QAAG,WAAW,OAAO,MAAM;AAAA,QAC1D,OAAO,KAAK,MAAM;AAAA,QAClB,eAAY;AAAA,QAEZ;AAAA,UAAC;AAAA;AAAA,YACC,YAAY;AAAA,YACZ,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,SAAS,OAAO,MAAM,QAAQ;AAAA,YAC9B,eAAY;AAAA;AAAA,QACd;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f706dc673f9397f2919007f4b702470461bf0f7c"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return tv=function(){return a},a}tv();class D8e extends Mn.Component{render(){tv().f[0]++;const e=(tv().s[0]++,this.props.t);return tv().s[1]++,G.jsx(la,{label:e("Max Zoom"),fieldSpec:no.layer.maxzoom,error:this.props.error,"data-wd-key":"max-zoom",children:G.jsx(qf,{allowRange:!0,value:this.props.value,onChange:this.props.onChange,min:no.layer.maxzoom.minimum,max:no.layer.maxzoom.maximum,default:no.layer.maxzoom.maximum,"data-wd-key":"max-zoom.input"})})}}const L8e=(tv().s[2]++,No()(D8e));function g1(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",e="875d9bef6002e38aa0b5bf03af99ab4fc2308047",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:22},end:{line:11,column:5}},2:{start:{line:12,column:4},end:{line:30,column:6}},3:{start:{line:33,column:21},end:{line:33,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:31,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx"],names:[],mappings:"AAyBM;AAzBN,OAAO,WAAW;AAElB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAQjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,YAAY;AAAA,MAChB,KAAK,EAAE,2EAA2E;AAAA,IACpF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,UAAU;AAAA,QACnB;AAAA,QACA,eAAY;AAAA,QACZ,OAAO,KAAK,MAAM;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,SAAS,EAAE,YAAY;AAAA,YACvB,eAAY;AAAA;AAAA,QACd;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"875d9bef6002e38aa0b5bf03af99ab4fc2308047"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return g1=function(){return a},a}g1();class F8e extends Mn.Component{render(){g1().f[0]++;const e=(g1().s[0]++,this.props.t),t=(g1().s[1]++,{doc:e("Comments for the current layer. This is non-standard and not in the spec.")});return g1().s[2]++,G.jsx(la,{label:e("Comments"),fieldSpec:t,"data-wd-key":"layer-comment",error:this.props.error,children:G.jsx(Qd,{multi:!0,value:this.props.value,onChange:this.props.onChange,default:e("Comment..."),"data-wd-key":"layer-comment.input"})})}}const U8e=(g1().s[3]++,No()(F8e)),R8e={groups:[{title:"Paint properties",type:"properties",fields:["line-opacity","line-color","line-width","line-offset","line-blur","line-dasharray","line-pattern","line-translate","line-translate-anchor","line-gap-width"]},{title:"Layout properties",type:"properties",fields:["line-cap","line-join","line-miter-limit","line-round-limit"]}]},z8e={groups:[{title:"Paint properties",type:"properties",fields:["background-color","background-pattern","background-opacity"]}]},j8e={groups:[{title:"Paint properties",type:"properties",fields:["fill-opacity","fill-color","fill-antialias","fill-outline-color","fill-pattern","fill-translate","fill-translate-anchor"]}]},N8e={groups:[{title:"Paint properties",type:"properties",fields:["circle-color","circle-opacity","circle-stroke-color","circle-stroke-opacity","circle-blur","circle-radius","circle-stroke-width","circle-pitch-scale","circle-translate","circle-translate-anchor","circle-pitch-alignment"]}]},W8e={groups:[{title:"General layout properties",type:"properties",fields:["symbol-placement","symbol-spacing","symbol-avoid-edges","symbol-z-order"]},{title:"Text layout properties",type:"properties",fields:["text-field","text-font","text-size","text-line-height","text-padding","text-allow-overlap","text-ignore-placement","text-pitch-alignment","text-rotation-alignment","text-max-width","text-letter-spacing","text-justify","text-anchor","text-max-angle","text-writing-mode","text-rotate","text-keep-upright","text-transform","text-offset","text-optional","text-variable-anchor","text-radial-offset"]},{title:"Icon layout properties",type:"properties",fields:["icon-image","icon-allow-overlap","icon-ignore-placement","icon-optional","icon-rotation-alignment","icon-size","icon-text-fit","icon-text-fit-padding","icon-rotate","icon-padding","icon-keep-upright","icon-offset","icon-anchor","icon-pitch-alignment"]},{title:"Text paint properties",type:"properties",fields:["text-color","text-opacity","text-halo-color","text-halo-width","text-halo-blur","text-translate","text-translate-anchor"]},{title:"Icon paint properties",type:"properties",fields:["icon-color","icon-opacity","icon-halo-color","icon-halo-width","icon-halo-blur","icon-translate","icon-translate-anchor"]}]},G8e={groups:[{title:"Paint properties",type:"properties",fields:["raster-opacity","raster-hue-rotate","raster-brightness-min","raster-brightness-max","raster-saturation","raster-contrast","raster-fade-duration","raster-resampling"]}]},$8e={groups:[{title:"Paint properties",type:"properties",fields:["hillshade-illumination-direction","hillshade-illumination-anchor","hillshade-exaggeration","hillshade-shadow-color","hillshade-highlight-color","hillshade-accent-color"]}]},Q8e={groups:[{title:"Paint properties",type:"properties",fields:["heatmap-radius","heatmap-weight","heatmap-intensity","heatmap-opacity"]}]},Y8e={groups:[]},J2={line:R8e,background:z8e,fill:j8e,"fill-extrusion":{groups:[{title:"Paint properties",type:"properties",fields:["fill-extrusion-opacity","fill-extrusion-color","fill-extrusion-translate","fill-extrusion-translate-anchor","fill-extrusion-pattern","fill-extrusion-height","fill-extrusion-base","fill-extrusion-vertical-gradient"]}]},circle:N8e,symbol:W8e,raster:G8e,hillshade:$8e,heatmap:Q8e,invalid:Y8e};function Ey(){var n="/home/runner/work/maputnik/maputnik/src/libs/format.ts",e="c45fbfac66e994b59070a295e5a7f219cd5d66ac",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/format.ts",statementMap:{0:{start:{line:2,column:2},end:{line:2,column:50}}},fnMap:{0:{name:"formatLayerId",decl:{start:{line:1,column:16},end:{line:1,column:29}},loc:{start:{line:1,column:34},end:{line:3,column:1}},line:1}},branchMap:{0:{loc:{start:{line:2,column:9},end:{line:2,column:49}},type:"cond-expr",locations:[{start:{line:2,column:21},end:{line:2,column:37}},{start:{line:2,column:40},end:{line:2,column:49}}],line:2}},s:{0:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/format.ts"],names:[],mappings:"AAAO,gBAAS,cAAe,IAAwB;AACrD,SAAO,OAAO,KAAK,mBAAmB,IAAI,EAAE;AAC9C;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c45fbfac66e994b59070a295e5a7f219cd5d66ac"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ey=function(){return a},a}Ey();function DQ(n){return Ey().f[0]++,Ey().s[0]++,n===""?(Ey().b[0][0]++,"[empty_string]"):(Ey().b[0][1]++,`'${n}'`)}function on(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",e="555ef41c8141fe537bdb43523a4ef7ec4c287394",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",statementMap:{0:{start:{line:23,column:2},end:{line:32,column:21}},1:{start:{line:26,column:6},end:{line:30,column:8}},2:{start:{line:35,column:21},end:{line:39,column:3}},3:{start:{line:40,column:22},end:{line:44,column:3}},4:{start:{line:45,column:22},end:{line:49,column:3}},5:{start:{line:50,column:2},end:{line:50,column:103}},6:{start:{line:53,column:24},end:{line:60,column:3}},7:{start:{line:61,column:29},end:{line:63,column:3}},8:{start:{line:65,column:4},end:{line:65,column:17}},9:{start:{line:66,column:25},end:{line:66,column:27}},10:{start:{line:67,column:4},end:{line:69,column:7}},11:{start:{line:68,column:6},end:{line:68,column:39}},12:{start:{line:70,column:4},end:{line:70,column:34}},13:{start:{line:73,column:29},end:{line:73,column:54}},14:{start:{line:74,column:4},end:{line:78,column:7}},15:{start:{line:75,column:6},end:{line:77,column:7}},16:{start:{line:76,column:8},end:{line:76,column:45}},17:{start:{line:79,column:4},end:{line:81,column:6}},18:{start:{line:84,column:4},end:{line:89,column:6}},19:{start:{line:92,column:4},end:{line:95,column:6}},20:{start:{line:98,column:32},end:{line:101,column:5}},21:{start:{line:102,column:4},end:{line:104,column:7}},22:{start:{line:107,column:18},end:{line:107,column:20}},23:{start:{line:108,column:4},end:{line:110,column:5}},24:{start:{line:109,column:6},end:{line:109,column:62}},25:{start:{line:111,column:35},end:{line:111,column:45}},26:{start:{line:112,column:22},end:{line:112,column:24}},27:{start:{line:113,column:4},end:{line:119,column:7}},28:{start:{line:114,column:6},end:{line:118,column:7}},29:{start:{line:115,column:8},end:{line:117,column:10}},30:{start:{line:121,column:18},end:{line:121,column:34}},31:{start:{line:122,column:4},end:{line:124,column:5}},32:{start:{line:123,column:6},end:{line:123,column:63}},33:{start:{line:125,column:4},end:{line:228,column:5}},34:{start:{line:127,column:8},end:{line:191,column:13}},35:{start:{line:134,column:35},end:{line:134,column:112}},36:{start:{line:143,column:37},end:{line:146,column:15}},37:{start:{line:155,column:31},end:{line:155,column:69}},38:{start:{line:164,column:31},end:{line:164,column:75}},39:{start:{line:172,column:31},end:{line:172,column:70}},40:{start:{line:180,column:31},end:{line:180,column:70}},41:{start:{line:188,column:31},end:{line:188,column:104}},42:{start:{line:193,column:8},end:{line:201,column:16}},43:{start:{line:199,column:29},end:{line:199,column:67}},44:{start:{line:203,column:8},end:{line:212,column:10}},45:{start:{line:214,column:8},end:{line:225,column:10}},46:{start:{line:219,column:14},end:{line:222,column:16}},47:{start:{line:227,column:8},end:{line:227,column:49}},48:{start:{line:231,column:4},end:{line:234,column:7}},49:{start:{line:237,column:14},end:{line:237,column:26}},50:{start:{line:238,column:21},end:{line:238,column:23}},51:{start:{line:239,column:22},end:{line:239,column:43}},52:{start:{line:240,column:19},end:{line:257,column:6}},53:{start:{line:241,column:6},end:{line:241,column:70}},54:{start:{line:243,column:22},end:{line:243,column:30}},55:{start:{line:244,column:6},end:{line:244,column:29}},56:{start:{line:245,column:6},end:{line:256,column:8}},57:{start:{line:258,column:20},end:{line:258,column:49}},58:{start:{line:259,column:18},end:{line:284,column:5}},59:{start:{line:262,column:23},end:{line:262,column:71}},60:{start:{line:266,column:23},end:{line:266,column:68}},61:{start:{line:270,column:23},end:{line:270,column:80}},62:{start:{line:276,column:23},end:{line:276,column:41}},63:{start:{line:282,column:23},end:{line:282,column:40}},64:{start:{line:286,column:6},end:{line:286,column:30}},65:{start:{line:287,column:6},end:{line:287,column:26}},66:{start:{line:289,column:4},end:{line:334,column:6}},67:{start:{line:316,column:33},end:{line:316,column:42}},68:{start:{line:317,column:20},end:{line:317,column:174}},69:{start:{line:337,column:20},end:{line:337,column:58}}},fnMap:{0:{name:"getLayoutForType",decl:{start:{line:22,column:9},end:{line:22,column:25}},loc:{start:{line:22,column:35},end:{line:33,column:1}},line:22},1:{name:"(anonymous_1)",decl:{start:{line:25,column:36},end:{line:25,column:37}},loc:{start:{line:25,column:47},end:{line:31,column:5}},line:25},2:{name:"layoutGroups",decl:{start:{line:34,column:9},end:{line:34,column:21}},loc:{start:{line:34,column:36},end:{line:51,column:1}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:54,column:20},end:{line:54,column:21}},loc:{start:{line:54,column:26},end:{line:55,column:5}},line:54},4:{name:"(anonymous_4)",decl:{start:{line:56,column:21},end:{line:56,column:22}},loc:{start:{line:56,column:27},end:{line:57,column:5}},line:56},5:{name:"(anonymous_5)",decl:{start:{line:58,column:22},end:{line:58,column:23}},loc:{start:{line:58,column:28},end:{line:59,column:5}},line:58},6:{name:"(anonymous_6)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:21},end:{line:71,column:3}},line:64},7:{name:"(anonymous_7)",decl:{start:{line:67,column:57},end:{line:67,column:58}},loc:{start:{line:67,column:68},end:{line:69,column:5}},line:67},8:{name:"(anonymous_8)",decl:{start:{line:72,column:2},end:{line:72,column:3}},loc:{start:{line:72,column:48},end:{line:82,column:3}},line:72},9:{name:"(anonymous_9)",decl:{start:{line:74,column:63},end:{line:74,column:64}},loc:{start:{line:74,column:74},end:{line:78,column:5}},line:74},10:{name:"(anonymous_10)",decl:{start:{line:83,column:2},end:{line:83,column:3}},loc:{start:{line:83,column:20},end:{line:90,column:3}},line:83},11:{name:"(anonymous_11)",decl:{start:{line:91,column:2},end:{line:91,column:3}},loc:{start:{line:91,column:44},end:{line:96,column:3}},line:91},12:{name:"(anonymous_12)",decl:{start:{line:97,column:2},end:{line:97,column:3}},loc:{start:{line:97,column:36},end:{line:105,column:3}},line:97},13:{name:"(anonymous_13)",decl:{start:{line:106,column:2},end:{line:106,column:3}},loc:{start:{line:106,column:32},end:{line:229,column:3}},line:106},14:{name:"(anonymous_14)",decl:{start:{line:113,column:19},end:{line:113,column:20}},loc:{start:{line:113,column:30},end:{line:119,column:5}},line:113},15:{name:"(anonymous_15)",decl:{start:{line:134,column:24},end:{line:134,column:25}},loc:{start:{line:134,column:35},end:{line:134,column:112}},line:134},16:{name:"(anonymous_16)",decl:{start:{line:143,column:24},end:{line:143,column:25}},loc:{start:{line:143,column:37},end:{line:146,column:15}},line:143},17:{name:"(anonymous_17)",decl:{start:{line:155,column:24},end:{line:155,column:25}},loc:{start:{line:155,column:31},end:{line:155,column:69}},line:155},18:{name:"(anonymous_18)",decl:{start:{line:164,column:24},end:{line:164,column:25}},loc:{start:{line:164,column:31},end:{line:164,column:75}},line:164},19:{name:"(anonymous_19)",decl:{start:{line:172,column:24},end:{line:172,column:25}},loc:{start:{line:172,column:31},end:{line:172,column:70}},line:172},20:{name:"(anonymous_20)",decl:{start:{line:180,column:24},end:{line:180,column:25}},loc:{start:{line:180,column:31},end:{line:180,column:70}},line:180},21:{name:"(anonymous_21)",decl:{start:{line:188,column:24},end:{line:188,column:25}},loc:{start:{line:188,column:31},end:{line:188,column:104}},line:188},22:{name:"(anonymous_22)",decl:{start:{line:199,column:22},end:{line:199,column:23}},loc:{start:{line:199,column:29},end:{line:199,column:67}},line:199},23:{name:"(anonymous_23)",decl:{start:{line:218,column:22},end:{line:218,column:23}},loc:{start:{line:218,column:34},end:{line:223,column:13}},line:218},24:{name:"(anonymous_24)",decl:{start:{line:230,column:2},end:{line:230,column:3}},loc:{start:{line:230,column:20},end:{line:235,column:3}},line:230},25:{name:"(anonymous_25)",decl:{start:{line:236,column:2},end:{line:236,column:3}},loc:{start:{line:236,column:11},end:{line:335,column:3}},line:236},26:{name:"(anonymous_26)",decl:{start:{line:240,column:53},end:{line:240,column:54}},loc:{start:{line:240,column:64},end:{line:242,column:5}},line:240},27:{name:"(anonymous_27)",decl:{start:{line:242,column:11},end:{line:242,column:12}},loc:{start:{line:242,column:22},end:{line:257,column:5}},line:242},28:{name:"(anonymous_28)",decl:{start:{line:262,column:17},end:{line:262,column:18}},loc:{start:{line:262,column:23},end:{line:262,column:71}},line:262},29:{name:"(anonymous_29)",decl:{start:{line:266,column:17},end:{line:266,column:18}},loc:{start:{line:266,column:23},end:{line:266,column:68}},line:266},30:{name:"(anonymous_30)",decl:{start:{line:270,column:17},end:{line:270,column:18}},loc:{start:{line:270,column:23},end:{line:270,column:80}},line:270},31:{name:"(anonymous_31)",decl:{start:{line:276,column:17},end:{line:276,column:18}},loc:{start:{line:276,column:23},end:{line:276,column:41}},line:276},32:{name:"(anonymous_32)",decl:{start:{line:282,column:17},end:{line:282,column:18}},loc:{start:{line:282,column:23},end:{line:282,column:40}},line:282},33:{name:"handleSelection",decl:{start:{line:285,column:13},end:{line:285,column:28}},loc:{start:{line:285,column:40},end:{line:288,column:5}},line:285},34:{name:"(anonymous_34)",decl:{start:{line:315,column:147},end:{line:315,column:148}},loc:{start:{line:315,column:155},end:{line:318,column:19}},line:315}},branchMap:{0:{loc:{start:{line:23,column:9},end:{line:32,column:20}},type:"cond-expr",locations:[{start:{line:23,column:24},end:{line:32,column:3}},{start:{line:32,column:6},end:{line:32,column:20}}],line:23},1:{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:"if",locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:75},2:{loc:{start:{line:108,column:4},end:{line:110,column:5}},type:"if",locations:[{start:{line:108,column:4},end:{line:110,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:108},3:{loc:{start:{line:114,column:6},end:{line:118,column:7}},type:"if",locations:[{start:{line:114,column:6},end:{line:118,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:114},4:{loc:{start:{line:114,column:10},end:{line:114,column:96}},type:"binary-expr",locations:[{start:{line:114,column:10},end:{line:114,column:22}},{start:{line:114,column:26},end:{line:114,column:55}},{start:{line:114,column:59},end:{line:114,column:96}}],line:114},5:{loc:{start:{line:122,column:4},end:{line:124,column:5}},type:"if",locations:[{start:{line:122,column:4},end:{line:124,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:122},6:{loc:{start:{line:125,column:4},end:{line:228,column:5}},type:"switch",locations:[{start:{line:126,column:6},end:{line:191,column:13}},{start:{line:192,column:6},end:{line:201,column:16}},{start:{line:202,column:6},end:{line:212,column:10}},{start:{line:213,column:6},end:{line:225,column:10}},{start:{line:226,column:6},end:{line:227,column:49}}],line:125},7:{loc:{start:{line:149,column:10},end:{line:157,column:11}},type:"binary-expr",locations:[{start:{line:149,column:10},end:{line:149,column:48}},{start:{line:149,column:68},end:{line:157,column:11}}],line:149},8:{loc:{start:{line:158,column:10},end:{line:166,column:11}},type:"binary-expr",locations:[{start:{line:158,column:10},end:{line:158,column:93}},{start:{line:158,column:113},end:{line:166,column:11}}],line:158},9:{loc:{start:{line:188,column:83},end:{line:188,column:103}},type:"cond-expr",locations:[{start:{line:188,column:93},end:{line:188,column:99}},{start:{line:188,column:102},end:{line:188,column:103}}],line:188},10:{loc:{start:{line:241,column:15},end:{line:241,column:68}},type:"binary-expr",locations:[{start:{line:241,column:15},end:{line:241,column:41}},{start:{line:241,column:45},end:{line:241,column:68}}],line:241},11:{loc:{start:{line:258,column:20},end:{line:258,column:49}},type:"binary-expr",locations:[{start:{line:258,column:20},end:{line:258,column:43}},{start:{line:258,column:47},end:{line:258,column:49}}],line:258},12:{loc:{start:{line:269,column:14},end:{line:269,column:67}},type:"cond-expr",locations:[{start:{line:269,column:46},end:{line:269,column:55}},{start:{line:269,column:58},end:{line:269,column:67}}],line:269}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0,0,0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx"],names:["layer","layout"],mappings:"AA2KyB,SA2EL,UA1Ed,KADmB;AA3KzB,OAAO,WAAuB;AAC9B,OAAO,eAAe;AACtB,SAAS,SAAS,QAAQ,MAAM,gBAAgB;AAChD,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAGzB,OAAO,eAAe;AACtB,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,SAAS,YAAY,sBAAsB;AAC3C,OAAO,YAAY;AACnB,SAAQ,qBAAoB;AAC5B,SAA0B,uBAAuB;AAIjD,SAAS,iBAAiB,MAAkC,GAAc;AACxE,SAAO,OAAO,IAAI,IAAI;AAAA,IACpB,GAAG,OAAO,IAAI;AAAA,IACd,QAAQ,OAAO,IAAI,EAAE,OAAO,IAAI,WAAS;AACvC,aAAO;AAAA,QACL,GAAG;AAAA,QACH,IAAI,MAAM,MAAM,QAAQ,MAAM,GAAG;AAAA,QACjC,OAAO,EAAE,MAAM,KAAK;AAAA,MACtB;AAAA,IACF,CAAC;AAAA,EACH,IAAI,OAAO;AACb;AAEA,SAAS,aAAa,WAAuC,GAA8E;AACzI,QAAM,aAAa;AAAA,IACjB,IAAI;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB,MAAM;AAAA,EACR;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO,EAAE,QAAQ;AAAA,IACjB,MAAM;AAAA,EACR;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO,EAAE,aAAa;AAAA,IACtB,MAAM;AAAA,EACR;AACA,SAAO,CAAC,YAAY,WAAW,EAC5B,OAAO,iBAAiB,WAAW,CAAC,EAAE,MAAM,EAC5C,OAAO,CAAC,WAAW,CAAC;AACzB;AAwBA,MAAM,4BAA4B,MAAM,UAAsD;AAAA,EAC5F,OAAO,eAAe;AAAA,IACpB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,iBAAiB,MAAM;AAAA,IAAC;AAAA,IACxB,kBAAkB,MAAM;AAAA,IAAC;AAAA,EAC3B;AAAA,EAEA,OAAO,oBAAoB;AAAA,IACzB,eAAe,UAAU;AAAA,EAC3B;AAAA,EAEA,YAAY,OAAiC;AAC3C,UAAM,KAAK;AAGX,UAAM,eAAyC,CAAC;AAChD,iBAAa,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC,EAAE,QAAQ,WAAS;AAC5D,mBAAa,MAAM,KAAK,IAAI;AAAA,IAC9B,CAAC;AAED,SAAK,QAAQ,EAAE,aAAa;AAAA,EAC9B;AAAA,EAEA,OAAO,yBAAyB,OAA2C,OAAyB;AAClG,UAAM,mBAAmB,EAAE,GAAG,MAAM,aAAa;AAEjD,qBAAiB,MAAM,MAAM,MAAM,MAAM,CAAC,EAAE,OAAO,QAAQ,WAAS;AAClE,UAAG,EAAE,MAAM,SAAS,mBAAmB;AACrC,yBAAiB,MAAM,KAAK,IAAI;AAAA,MAClC;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EAEA,kBAAmB;AACjB,WAAO;AAAA,MACL,eAAe;AAAA,QACb,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe,OAAwC,UAAkB,UAAe;AACtF,SAAK,MAAM;AAAA,MACT,KAAK,MAAM;AAAA,MACX,eAAe,KAAK,MAAM,OAAO,OAAO,UAAU,QAAQ;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,cAAc,YAAoB,QAAiB;AACjD,UAAM,sBAAsB;AAAA,MAC1B,GAAG,KAAK,MAAM;AAAA,MACd,CAAC,UAAU,GAAG;AAAA,IAChB;AACA,SAAK,SAAS;AAAA,MACZ,cAAc;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EAEA,gBAAgB,MAAc,QAAgC;AAC5D,QAAI,UAAU;AACd,QAAG,KAAK,MAAM,MAAM,UAAU;AAC5B,gBAAW,KAAK,MAAM,MAAM,SAAiB,kBAAkB;AAAA,IACjE;AACA,UAAM,EAAC,QAAQ,WAAU,IAAI,KAAK;AAElC,UAAM,YAAwE,CAAC;AAC/E,WAAQ,QAAQ,WAAS;AACvB,UACE,MAAM,UACN,MAAM,OAAO,SAAS,WACtB,MAAM,OAAO,KAAK,SAAS,YAC3B;AACA,kBAAU,MAAM,OAAO,KAAK,GAAG,IAAI;AAAA,UACjC,SAAS,MAAM,OAAO,KAAK;AAAA,QAC7B;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI;AACJ,UAAM,QAAQ,KAAK,MAAM;AACzB,QAAG,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG;AACzE,uBAAkB,KAAK,MAAM,QAAQ,MAAM,MAAM,EAAU;AAAA,IAC7D;AAEA,YAAO,MAAM;AAAA,MACb,KAAK;AAAS,eAAO,qBAAC,SACpB;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,OAAM;AAAA,cACN,OAAO,UAAU;AAAA,cACjB,UAAU,WAAS,KAAK,MAAM,gBAAgB,KAAK,MAAM,YAAY,KAAK,MAAM,MAAM,IAAI,KAAK;AAAA;AAAA,UACjG;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,aAAW,KAAK,MAAM;AAAA,gBAC9B,KAAK,MAAM;AAAA,gBACX,WAAW,KAAK,MAAM,OAAO,OAAO;AAAA,cACtC;AAAA;AAAA,UACF;AAAA,UACC,KAAK,MAAM,MAAM,SAAS,gBAAgB;AAAA,YAAC;AAAA;AAAA,cAC1C,OAAO,UAAU;AAAA,cACjB,WAAW,OAAO,KAAK,KAAK,MAAM,OAAQ;AAAA,cAC1C,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,UAAU,CAAC;AAAA;AAAA,UACtD;AAAA,UAEC,CAAC,cAAc,UAAU,aAAa,SAAS,EAAE,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,KACjF;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU,cAAc;AAAA,cAC/B;AAAA,cACA,OAAQ,KAAK,MAAM,MAAc,cAAc;AAAA,cAC/C,UAAU,OAAK,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAAA;AAAA,UAC5D;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,WAAW,CAAC;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,WAAW,CAAC;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO;AAAA,cACP,UAAU,OAAK,KAAK,eAAe,YAAY,oBAAoB,KAAK,KAAM,SAAY,CAAC;AAAA;AAAA,UAC7F;AAAA,WACF;AAAA,MACA,KAAK;AAAU,eAAO,oBAAC,SACrB,8BAAC,SAAI,WAAU,kCACb;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,QAAS,KAAK,MAAM,MAAc;AAAA,YAClC,YAAY,KAAK,MAAM,aAAc,KAAK,MAAM,MAAc,cAAc,CAAC;AAAA,YAC7E,UAAU,OAAK,KAAK,eAAe,MAAM,UAAU,CAAC;AAAA;AAAA,QACtD,GACF,GACF;AAAA,MACA,KAAK;AACH,eAAO;AAAA,UAAC;AAAA;AAAA,YACN,QAAQ;AAAA,YACR,OAAO,KAAK,MAAM;AAAA,YAClB,aAAa;AAAA,YACb,MAAM,KAAK,MAAM;AAAA,YACjB,UAAU,KAAK,eAAe,KAAK,IAAI;AAAA;AAAA,QACzC;AAAA,MACF,KAAK;AACH,eAAO;AAAA,UAAC;AAAA;AAAA,YACN,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,CAACA,WAAU;AACnB,mBAAK,MAAM;AAAA,gBACT,KAAK,MAAM;AAAA,gBACXA;AAAA,cACF;AAAA,YACF;AAAA;AAAA,QACF;AAAA,MACF;AAAS,eAAO,gCAAE;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,UAAU,QAAgB;AACxB,SAAK,MAAM,YAAY;AAAA,MACrB,UAAU,KAAK,MAAM;AAAA,MACrB,UAAU,KAAK,MAAM,aAAW;AAAA,IAClC,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,UAAM,WAAqB,CAAC;AAC5B,UAAM,YAAY,KAAK,MAAM,MAAM;AACnC,UAAM,SAAS,aAAa,WAAW,CAAC,EAAE,OAAO,WAAS;AACxD,aAAO,EAAE,cAAc,gBAAgB,MAAM,SAAS;AAAA,IACxD,CAAC,EAAE,IAAI,WAAS;AACd,YAAM,UAAU,MAAM;AACtB,eAAS,KAAK,OAAO;AACrB,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,eAAa,MAAM;AAAA,UACnB,IAAI;AAAA,UAEJ,OAAO,MAAM;AAAA,UACb,UAAU,KAAK,MAAM,aAAa,MAAM,KAAK;AAAA,UAC7C,gBAAgB,KAAK,cAAc,KAAK,MAAM,MAAM,KAAK;AAAA,UAExD,eAAK,gBAAgB,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,QALzC;AAAA,MAMP;AAAA,IACF,CAAC;AAED,UAAMC,UAAS,KAAK,MAAM,MAAM,UAAU,CAAC;AAE3C,UAAM,QAAkF;AAAA,MACtF,QAAQ;AAAA,QACN,MAAM,EAAE,QAAQ;AAAA,QAChB,SAAS,MAAM,KAAK,MAAM,eAAe,KAAK,MAAM,UAAU;AAAA,MAChE;AAAA,MACA,WAAW;AAAA,QACT,MAAM,EAAE,WAAW;AAAA,QACnB,SAAS,MAAM,KAAK,MAAM,YAAY,KAAK,MAAM,UAAU;AAAA,MAC7D;AAAA,MACA,MAAM;AAAA,QACJ,MAAOA,QAAO,eAAe,SAAU,EAAE,MAAM,IAAI,EAAE,MAAM;AAAA,QAC3D,SAAS,MAAM,KAAK,MAAM,wBAAwB,KAAK,MAAM,UAAU;AAAA,MACzE;AAAA,MACA,aAAa;AAAA,QACX,MAAM,EAAE,eAAe;AAAA;AAAA,QAEvB,UAAU,KAAK,MAAM;AAAA,QACrB,SAAS,MAAM,KAAK,UAAU,EAAE;AAAA,MAClC;AAAA,MACA,eAAe;AAAA,QACb,MAAM,EAAE,iBAAiB;AAAA;AAAA,QAEzB,UAAU,KAAK,MAAM;AAAA,QACrB,SAAS,MAAM,KAAK,UAAU,CAAE;AAAA,MAClC;AAAA,IACF;AAEA,aAAS,gBAAgB,IAAY,OAA6B;AAChE,YAAM,gBAAgB;AACtB,YAAM,EAAE,EAAE,QAAQ;AAAA,IACpB;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QAAQ,WAAU;AAAA,QACxB,MAAK;AAAA,QACL,cAAY,EAAE,cAAc;AAAA,QAE5B;AAAA,8BAAC,YACC,+BAAC,SAAI,WAAU,gBACb;AAAA,gCAAC,QAAG,WAAU,uBACX,YAAE,sBAAsB,EAAE,SAAS,cAAc,KAAK,MAAM,MAAM,EAAE,EAAE,CAAC,GAC1E;AAAA,YACA,oBAAC,SAAI,WAAU,sBACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,aAAa;AAAA,gBACb,kBAAkB;AAAA,gBAElB;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACC,IAAG;AAAA,sBACH,eAAY;AAAA,sBACZ,WAAU;AAAA,sBACV,OAAO;AAAA,sBACP,8BAAC,cAAW,WAAU,0BAAyB;AAAA;AAAA,kBACjD;AAAA,kBACA,oBAAC,QACC,8BAAC,QAAG,WAAU,mBACX,iBAAO,KAAK,KAAK,EAAE,IAAI,CAAC,OAAO;AAC9B,0BAAM,OAAO,MAAM,EAAE;AACrB,2BAAO,oBAAC,QACN,8BAAC,YAAS,OAAO,IAAI,WAAU,yBAC5B,eAAK,MACR,KAHc,EAIhB;AAAA,kBACF,CAAC,GACH,GACF;AAAA;AAAA;AAAA,YACF,GACF;AAAA,aACF,GAEF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,uBAAuB;AAAA,cACvB,mBAAmB;AAAA,cACnB,aAAa;AAAA,cAEZ;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"555ef41c8141fe537bdb43523a4ef7ec4c287394"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return on=function(){return a},a}on();function LQ(n,e){return on().f[0]++,on().s[0]++,J2[n]?(on().b[0][0]++,{...J2[n],groups:J2[n].groups.map(t=>(on().f[1]++,on().s[1]++,{...t,id:t.title.replace(/ /g,"_"),title:e(t.title)}))}):(on().b[0][1]++,J2.invalid)}function fL(n,e){on().f[2]++;const t=(on().s[2]++,{id:"layer",title:e("Layer"),type:"layer"}),r=(on().s[3]++,{id:"filter",title:e("Filter"),type:"filter"}),i=(on().s[4]++,{id:"jsoneditor",title:e("JSON Editor"),type:"jsoneditor"});return on().s[5]++,[t,r].concat(LQ(n,e).groups).concat([i])}class LB extends Mn.Component{constructor(e){on().f[6]++,on().s[8]++,super(e);const t=(on().s[9]++,{});on().s[10]++,fL(this.props.layer.type,e.t).forEach(r=>{on().f[7]++,on().s[11]++,t[r.title]=!0}),on().s[12]++,this.state={editorGroups:t}}static getDerivedStateFromProps(e,t){on().f[8]++;const r=(on().s[13]++,{...t.editorGroups});return on().s[14]++,LQ(e.layer.type,e.t).groups.forEach(i=>{on().f[9]++,on().s[15]++,i.title in r?on().b[1][1]++:(on().b[1][0]++,on().s[16]++,r[i.title]=!0)}),on().s[17]++,{editorGroups:r}}getChildContext(){return on().f[10]++,on().s[18]++,{reactIconBase:{size:14,color:"#8e8e8e"}}}changeProperty(e,t,r){on().f[11]++,on().s[19]++,this.props.onLayerChanged(this.props.layerIndex,I1e(this.props.layer,e,t,r))}onGroupToggle(e,t){on().f[12]++;const r=(on().s[20]++,{...this.state.editorGroups,[e]:t});on().s[21]++,this.setState({editorGroups:r})}renderGroupType(e,t){on().f[13]++;let r=(on().s[22]++,"");on().s[23]++,this.props.layer.metadata?(on().b[2][0]++,on().s[24]++,r=this.props.layer.metadata["maputnik:comment"]):on().b[2][1]++;const{errors:i,layerIndex:o}=(on().s[25]++,this.props),a=(on().s[26]++,{});on().s[27]++,i.forEach(f=>{on().f[14]++,on().s[28]++,on().b[4][0]++,f.parsed&&(on().b[4][1]++,f.parsed.type==="layer")&&(on().b[4][2]++,f.parsed.data.index==o)?(on().b[3][0]++,on().s[29]++,a[f.parsed.data.key]={message:f.parsed.data.message}):on().b[3][1]++});let s;const d=(on().s[30]++,this.props.layer);switch(on().s[31]++,Object.prototype.hasOwnProperty.call(this.props.sources,d.source)?(on().b[5][0]++,on().s[32]++,s=this.props.sources[d.source].layers):on().b[5][1]++,on().s[33]++,e){case"layer":return on().b[6][0]++,on().s[34]++,G.jsxs("div",{children:[G.jsx(BG,{value:this.props.layer.id,wdKey:"layer-editor.layer-id",error:a.id,onChange:f=>(on().f[15]++,on().s[35]++,this.props.onLayerIdChange(this.props.layerIndex,this.props.layer.id,f))}),G.jsx(OG,{disabled:!0,error:a.type,value:this.props.layer.type,onChange:f=>(on().f[16]++,on().s[36]++,this.props.onLayerChanged(this.props.layerIndex,B1e(this.props.layer,f)))}),(on().b[7][0]++,this.props.layer.type!=="background"&&(on().b[7][1]++,G.jsx(FG,{error:a.source,sourceIds:Object.keys(this.props.sources),value:this.props.layer.source,onChange:f=>(on().f[17]++,on().s[37]++,this.changeProperty(null,"source",f))}))),(on().b[8][0]++,["background","raster","hillshade","heatmap"].indexOf(this.props.layer.type)<0&&(on().b[8][1]++,G.jsx(RG,{error:a["source-layer"],sourceLayerIds:s,value:this.props.layer["source-layer"],onChange:f=>(on().f[18]++,on().s[38]++,this.changeProperty(null,"source-layer",f))}))),G.jsx(P8e,{error:a.minzoom,value:this.props.layer.minzoom,onChange:f=>(on().f[19]++,on().s[39]++,this.changeProperty(null,"minzoom",f))}),G.jsx(L8e,{error:a.maxzoom,value:this.props.layer.maxzoom,onChange:f=>(on().f[20]++,on().s[40]++,this.changeProperty(null,"maxzoom",f))}),G.jsx(U8e,{error:a.comment,value:r,onChange:f=>(on().f[21]++,on().s[41]++,this.changeProperty("metadata","maputnik:comment",f==""?(on().b[9][0]++,void 0):(on().b[9][1]++,f)))})]});case"filter":return on().b[6][1]++,on().s[42]++,G.jsx("div",{children:G.jsx("div",{className:"maputnik-filter-editor-wrapper",children:G.jsx(Yye,{errors:a,filter:this.props.layer.filter,properties:this.props.vectorLayers[this.props.layer["source-layer"]],onChange:f=>(on().f[22]++,on().s[43]++,this.changeProperty(null,"filter",f))})})});case"properties":return on().b[6][2]++,on().s[44]++,G.jsx(I8e,{errors:a,layer:this.props.layer,groupFields:t,spec:this.props.spec,onChange:this.changeProperty.bind(this)});case"jsoneditor":return on().b[6][3]++,on().s[45]++,G.jsx(NI,{layer:this.props.layer,onChange:f=>{on().f[23]++,on().s[46]++,this.props.onLayerChanged(this.props.layerIndex,f)}});default:return on().b[6][4]++,on().s[47]++,G.jsx(G.Fragment,{})}}moveLayer(e){on().f[24]++,on().s[48]++,this.props.onMoveLayer({oldIndex:this.props.layerIndex,newIndex:this.props.layerIndex+e})}render(){on().f[25]++;const e=(on().s[49]++,this.props.t),t=(on().s[50]++,[]),r=(on().s[51]++,this.props.layer.type),i=(on().s[52]++,fL(r,e).filter(d=>(on().f[26]++,on().s[53]++,on().b[10][0]++,!(r==="background"&&(on().b[10][1]++,d.type==="source")))).map(d=>{on().f[27]++;const f=(on().s[54]++,d.id);return on().s[55]++,t.push(f),on().s[56]++,G.jsx(T8e,{"data-wd-key":d.title,id:f,title:d.title,isActive:this.state.editorGroups[d.title],onActiveToggle:this.onGroupToggle.bind(this,d.title),children:this.renderGroupType(d.type,d.fields)},f)})),o=(on().s[57]++,on().b[11][0]++,this.props.layer.layout||(on().b[11][1]++,{})),a=(on().s[58]++,{delete:{text:e("Delete"),handler:()=>(on().f[28]++,on().s[59]++,this.props.onLayerDestroy(this.props.layerIndex))},duplicate:{text:e("Duplicate"),handler:()=>(on().f[29]++,on().s[60]++,this.props.onLayerCopy(this.props.layerIndex))},hide:{text:o.visibility==="none"?(on().b[12][0]++,e("Show")):(on().b[12][1]++,e("Hide")),handler:()=>(on().f[30]++,on().s[61]++,this.props.onLayerVisibilityToggle(this.props.layerIndex))},moveLayerUp:{text:e("Move layer up"),disabled:this.props.isFirstLayer,handler:()=>(on().f[31]++,on().s[62]++,this.moveLayer(-1))},moveLayerDown:{text:e("Move layer down"),disabled:this.props.isLastLayer,handler:()=>(on().f[32]++,on().s[63]++,this.moveLayer(1))}});function s(d,f){on().f[33]++,on().s[64]++,f.stopPropagation(),on().s[65]++,a[d].handler()}return on().s[66]++,G.jsxs("section",{className:"maputnik-layer-editor",role:"main","aria-label":e("Layer editor"),children:[G.jsx("header",{children:G.jsxs("div",{className:"layer-header",children:[G.jsx("h2",{className:"layer-header__title",children:e("Layer: {{layerId}}",{layerId:DQ(this.props.layer.id)})}),G.jsx("div",{className:"layer-header__info",children:G.jsxs(V2.Wrapper,{className:"more-menu",onSelection:s,closeOnSelection:!1,children:[G.jsx(V2.Button,{id:"skip-target-layer-editor","data-wd-key":"skip-target-layer-editor",className:"more-menu__button",title:"Layer options",children:G.jsx(Lre,{className:"more-menu__button__svg"})}),G.jsx(V2.Menu,{children:G.jsx("ul",{className:"more-menu__menu",children:Object.keys(a).map(d=>{on().f[34]++;const f=(on().s[67]++,a[d]);return on().s[68]++,G.jsx("li",{children:G.jsx(V2.MenuItem,{value:d,className:"more-menu__menu__item",children:f.text})},d)})})})]})})]})}),G.jsx(Rge,{allowMultipleExpanded:!0,allowZeroExpanded:!0,preExpanded:t,children:i})]})}}sn(LB,"defaultProps",(on().s[6]++,{onLayerChanged:()=>{on().f[3]++},onLayerIdChange:()=>{on().f[4]++},onLayerDestroyed:()=>{on().f[5]++}})),sn(LB,"childContextTypes",(on().s[7]++,{reactIconBase:Rr.object}));const q8e=(on().s[69]++,No()(LB));var pL=function(n,e,t){if(t||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return n.concat(o||Array.prototype.slice.call(e))},V8e=function(){function n(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"}return n}(),H8e=function(){function n(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return n}(),Z8e=function(){function n(e,t,r,i){this.name=e,this.version=t,this.os=r,this.bot=i,this.type="bot-device"}return n}(),X8e=function(){function n(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return n}(),J8e=function(){function n(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return n}(),eIe=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,tIe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,mL=3,nIe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",eIe]],gL=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function rIe(n){return n?yL(n):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new J8e:typeof navigator<"u"?yL(navigator.userAgent):aIe()}function iIe(n){return n!==""&&nIe.reduce(function(e,t){var r=t[0],i=t[1];if(e)return e;var o=i.exec(n);return!!o&&[r,o]},!1)}function yL(n){var e=iIe(n);if(!e)return null;var t=e[0],r=e[1];if(t==="searchbot")return new X8e;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<mL&&(i=pL(pL([],i,!0),sIe(mL-i.length),!0)):i=[];var o=i.join("."),a=oIe(n),s=tIe.exec(n);return s&&s[1]?new Z8e(t,o,a,s[1]):new V8e(t,o,a)}function oIe(n){for(var e=0,t=gL.length;e<t;e++){var r=gL[e],i=r[0],o=r[1],a=o.exec(n);if(a)return i}return null}function aIe(){var n=typeof process<"u"&&process.version;return n?new H8e(process.version.slice(1)):null}function sIe(n){for(var e=[],t=0;t<n;t++)e.push("0");return e}const lIe="maputnik",uIe="2.0.0",AIe="A MapLibre GL visual style editor",cIe="module",dIe="''",hIe={start:"vite",build:"tsc && vite build --base=/maputnik/","build-desktop":"tsc && vite build --base=/ && cd desktop && make","i18n:refresh":"i18next 'src/**/*.{ts,tsx,js,jsx}'",lint:"eslint ./src ./cypress --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",test:"cypress run","cy:open":"cypress open","lint-css":'stylelint "src/styles/*.scss"',"sort-styles":"jq 'sort_by(.id)' src/config/styles.json > tmp.json && mv tmp.json src/config/styles.json"},fIe={type:"git",url:"https://github.com/maplibre/maputnik"},pIe="Lukas Martinelli",mIe="MIT",gIe="https://github.com/maplibre/maputnik#readme",yIe={"@mapbox/mapbox-gl-rtl-text":"^0.2.3","@maplibre/maplibre-gl-geocoder":"^1.6.0","@maplibre/maplibre-gl-inspect":"^1.6.3","@maplibre/maplibre-gl-style-spec":"^20.1.1","@mdi/js":"^7.4.47","@mdi/react":"^1.6.1","@typescript-eslint/eslint-plugin":"^7.3.1","@typescript-eslint/parser":"^7.3.1","array-move":"^4.0.0",buffer:"^6.0.3",classnames:"^2.5.1",codemirror:"^5.65.2",color:"^4.2.3","cypress-plugin-tab":"^1.0.5","detect-browser":"^5.3.0",events:"^3.3.0","file-saver":"^2.0.5",i18next:"^23.12.2","i18next-browser-languagedetector":"^8.0.0","i18next-resources-to-backend":"^1.2.1","json-stringify-pretty-compact":"^4.0.0","json-to-ast":"^2.1.0",jsonlint:"github:josdejong/jsonlint#85a19d7",lodash:"^4.17.21","lodash.capitalize":"^4.2.1","lodash.clamp":"^4.0.3","lodash.clonedeep":"^4.5.0","lodash.get":"^4.4.2","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1","maplibre-gl":"^4.1.2","maputnik-design":"github:maputnik/design#172b06c",ol:"^6.14.1","ol-mapbox-style":"^7.1.1","prop-types":"^15.8.1",react:"^18.2.0","react-accessible-accordion":"^5.0.0","react-aria-menubutton":"^7.0.3","react-aria-modal":"^5.0.2","react-autobind":"^1.0.6","react-autocomplete":"^1.8.1","react-collapse":"^5.1.1","react-color":"^2.19.3","react-dom":"^18.2.0","react-file-reader-input":"^2.0.0","react-i18next":"^15.0.1","react-icon-base":"^2.1.2","react-icons":"^5.0.1","react-sortable-hoc":"^2.0.0","reconnecting-websocket":"^4.4.0",sass:"^1.72.0",slugify:"^1.6.6","string-hash":"^1.1.3",url:"^0.11.3"},vIe={esversion:6},CIe={extends:"stylelint-config-recommended-scss",rules:{"no-descending-specificity":null,"media-feature-name-no-unknown":[!0,{ignoreMediaFeatureNames:["prefers-reduced-motion"]}]}},_Ie={"@cypress/code-coverage":"^3.12.30","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-replace":"^5.0.5","@shellygo/cypress-test-utils":"^2.1.9","@types/codemirror":"^5.60.15","@types/color":"^3.0.6","@types/cors":"^2.8.17","@types/file-saver":"^2.0.7","@types/geojson":"^7946.0.14","@types/json-to-ast":"^2.1.4","@types/lodash.capitalize":"^4.2.9","@types/lodash.clamp":"^4.0.9","@types/lodash.clonedeep":"^4.5.9","@types/lodash.get":"^4.4.9","@types/lodash.isequal":"^4.5.8","@types/lodash.throttle":"^4.1.9","@types/mocha":"^10.0.6","@types/randomcolor":"^0.5.9","@types/react":"^18.2.67","@types/react-aria-menubutton":"^6.2.14","@types/react-aria-modal":"^4.0.10","@types/react-autocomplete":"^1.8.10","@types/react-collapse":"^5.0.4","@types/react-color":"^3.0.12","@types/react-dom":"^18.2.22","@types/react-file-reader-input":"^2.0.4","@types/react-icon-base":"^2.1.6","@types/string-hash":"^1.1.3","@types/uuid":"^9.0.8","@vitejs/plugin-react":"^4.2.1",cors:"^2.8.5",cypress:"^13.13.0",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6","i18next-parser":"^9.0.1",istanbul:"^0.4.5","istanbul-lib-coverage":"^3.2.2",mocha:"^10.3.0",postcss:"^8.4.38","react-hot-loader":"^4.13.1",stylelint:"^16.2.1","stylelint-config-recommended-scss":"^14.0.0","stylelint-scss":"^6.2.1",typescript:"^5.4.3",uuid:"^9.0.1",vite:"^5.2.6","vite-plugin-istanbul":"^6.0.0"},vL={name:lIe,version:uIe,description:AIe,type:cIe,main:dIe,scripts:hIe,repository:fIe,author:pIe,license:mIe,homepage:gIe,dependencies:yIe,jshintConfig:vIe,stylelint:CIe,devDependencies:_Ie},bIe="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='1200'%20height='1200'%20viewBox='0%200%20100%20100'%3e%3cg%20class='map'%20stroke='%23000'%3e%3cuse%20xlink:href='%23ref-1--map__main'%20fill='%234eba6f'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--map__line1'%20fill='none'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--map__line2'%20fill='none'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--map__line3'%20fill='none'%3e%3c/use%3e%3c/g%3e%3cg%20class='palette'%3e%3cuse%20xlink:href='%23ref-1--palette__main'%20fill='%23fff'%20stroke='%23000'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__inner'%20fill='none'%20stroke='%23000'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle5'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle4'%20fill='%234eba6f'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle3'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle2'%20fill='%234eba6f'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle1'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle0'%20fill='%234eba6f'%3e%3c/use%3e%3c/g%3e%3cg%20class='brush'%20stroke='%23000'%3e%3cuse%20xlink:href='%23ref-1--brush__bottom'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--brush__top'%20fill='%23fff'%3e%3c/use%3e%3c/g%3e%3cdefs%3e%3cpath%20id='ref-1--map__main'%20stroke-width='2.366'%20stroke-linejoin='round'%20d='M18.84%207.717l15.44%207.542%2015.75-7.762%2015.7%207.857L81.005%207.67%2096.31%2054.052%2073.598%2062.12%2050.93%2053.872l-25.1%208.066-22.668-8.066z'%3e%3c/path%3e%3cpath%20id='ref-1--map__line1'%20d='M65.556%2015.07l7.647%2046.838'%20stroke-width='1.104'%3e%3c/path%3e%3cpath%20id='ref-1--map__line2'%20d='M50.261%207.422l.717%2046.6'%20stroke-width='1.104'%3e%3c/path%3e%3cpath%20id='ref-1--map__line3'%20d='M34.011%2015.07l-8.603%2046.6'%20stroke-width='1.104'%3e%3c/path%3e%3cpath%20id='ref-1--palette__main'%20stroke-width='2.3'%20d='M47.352%2030.887c7.993.226%2016.934%209.725%2017.954%2015.25%201.02%205.527-.743%2011.125-4.298%2013.875-3.554%202.75-8.6%202.905-8.723%208.302-.097%204.237%208.457%208.5%208.088%2015.653-.406%207.857-15.508%2013.15-30.943%206.102-8.556-3.906-14.249-13.653-13.385-26.238C16.833%2052.334%2022.32%2043.658%2027.382%2039c5.977-5.503%2011.977-8.337%2019.97-8.112z'%3e%3c/path%3e%3ccircle%20id='ref-1--palette__inner'%20stroke-width='2.3'%20cx='41.873'%20cy='61.901'%20r='6.389'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle5'%20cy='44.56'%20cx='54.347'%20r='4.336'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle4'%20cx='40.443'%20cy='41.555'%20r='4.336'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle3'%20r='4.336'%20cy='51.102'%20cx='29.651'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle2'%20cx='25.293'%20cy='65.836'%20r='4.336'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle1'%20r='4.336'%20cy='79.326'%20cx='32.764'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle0'%20cx='46.669'%20cy='80.571'%20r='4.336'%3e%3c/circle%3e%3cpath%20id='ref-1--brush__bottom'%20d='M76.333%2089.333c-1.645-9.794-4.375-35.26-4.32-37.887.056-2.627%202.52-4.34%205.36-4.317%202.842.022%205.098%201.87%205.314%204.27.107%201.2-1.576%2028.06-2.318%2037.844-.332%204.374-3.31%204.413-4.036.09z'%20stroke-width='2.3'%20stroke-linejoin='round'%3e%3c/path%3e%3cpath%20id='ref-1--brush__top'%20stroke-linejoin='round'%20stroke-width='2.3'%20d='M77.184%2026.428s-5.621%207.02-5.621%2011.978c0%204.957%202.206%206.878%205.81%206.878%203.606%200%205.148-1.708%205.29-6.736.142-5.028-5.479-12.12-5.479-12.12z'%3e%3c/path%3e%3c/defs%3e%3c/svg%3e";function Ai(){var n="/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",e="9384aa48fdcd3e7e2c722d86823558f7514fd1ad",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",statementMap:{0:{start:{line:10,column:16},end:{line:10,column:24}},1:{start:{line:11,column:41},end:{line:11,column:89}},2:{start:{line:14,column:4},end:{line:14,column:107}},3:{start:{line:19,column:4},end:{line:29,column:6}},4:{start:{line:34,column:4},end:{line:41,column:6}},5:{start:{line:46,column:4},end:{line:54,column:6}},6:{start:{line:58,column:10},end:{line:66,column:3}},7:{start:{line:68,column:4},end:{line:68,column:34}},8:{start:{line:71,column:4},end:{line:71,column:40}},9:{start:{line:73,column:11},end:{line:80,column:3}},10:{start:{line:74,column:4},end:{line:79,column:5}},11:{start:{line:75,column:6},end:{line:75,column:59}},12:{start:{line:77,column:17},end:{line:77,column:65}},13:{start:{line:78,column:6},end:{line:78,column:17}},14:{start:{line:82,column:14},end:{line:82,column:26}},15:{start:{line:83,column:18},end:{line:119,column:5}},16:{start:{line:120,column:24},end:{line:122,column:6}},17:{start:{line:121,column:6},end:{line:121,column:45}},18:{start:{line:123,column:4},end:{line:241,column:12}},19:{start:{line:134,column:33},end:{line:134,column:58}},20:{start:{line:143,column:33},end:{line:143,column:60}},21:{start:{line:152,column:33},end:{line:152,column:51}},22:{start:{line:204,column:33},end:{line:204,column:69}},23:{start:{line:207,column:38},end:{line:207,column:59}},24:{start:{line:208,column:20},end:{line:208,column:157}},25:{start:{line:210,column:115},end:{line:210,column:148}},26:{start:{line:211,column:20},end:{line:211,column:133}},27:{start:{line:227,column:33},end:{line:227,column:74}},28:{start:{line:230,column:18},end:{line:230,column:94}},29:{start:{line:244,column:19},end:{line:244,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:15,column:3}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:11},end:{line:30,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:33,column:2},end:{line:33,column:3}},loc:{start:{line:33,column:11},end:{line:42,column:3}},line:33},3:{name:"(anonymous_3)",decl:{start:{line:45,column:2},end:{line:45,column:3}},loc:{start:{line:45,column:11},end:{line:55,column:3}},line:45},4:{name:"(anonymous_4)",decl:{start:{line:67,column:2},end:{line:67,column:3}},loc:{start:{line:67,column:23},end:{line:69,column:3}},line:67},5:{name:"(anonymous_5)",decl:{start:{line:70,column:2},end:{line:70,column:3}},loc:{start:{line:70,column:28},end:{line:72,column:3}},line:70},6:{name:"(anonymous_6)",decl:{start:{line:73,column:11},end:{line:73,column:12}},loc:{start:{line:73,column:23},end:{line:80,column:3}},line:73},7:{name:"(anonymous_7)",decl:{start:{line:81,column:2},end:{line:81,column:3}},loc:{start:{line:81,column:11},end:{line:242,column:3}},line:81},8:{name:"(anonymous_8)",decl:{start:{line:120,column:35},end:{line:120,column:36}},loc:{start:{line:120,column:45},end:{line:122,column:5}},line:120},9:{name:"(anonymous_9)",decl:{start:{line:134,column:25},end:{line:134,column:26}},loc:{start:{line:134,column:33},end:{line:134,column:58}},line:134},10:{name:"(anonymous_10)",decl:{start:{line:143,column:25},end:{line:143,column:26}},loc:{start:{line:143,column:33},end:{line:143,column:60}},line:143},11:{name:"(anonymous_11)",decl:{start:{line:152,column:25},end:{line:152,column:26}},loc:{start:{line:152,column:33},end:{line:152,column:51}},line:152},12:{name:"(anonymous_12)",decl:{start:{line:204,column:26},end:{line:204,column:27}},loc:{start:{line:204,column:33},end:{line:204,column:69}},line:204},13:{name:"(anonymous_13)",decl:{start:{line:207,column:31},end:{line:207,column:32}},loc:{start:{line:207,column:38},end:{line:207,column:59}},line:207},14:{name:"(anonymous_14)",decl:{start:{line:207,column:65},end:{line:207,column:66}},loc:{start:{line:207,column:75},end:{line:209,column:19}},line:207},15:{name:"(anonymous_15)",decl:{start:{line:210,column:108},end:{line:210,column:109}},loc:{start:{line:210,column:115},end:{line:210,column:148}},line:210},16:{name:"(anonymous_16)",decl:{start:{line:210,column:154},end:{line:210,column:155}},loc:{start:{line:210,column:164},end:{line:212,column:19}},line:210},17:{name:"(anonymous_17)",decl:{start:{line:227,column:26},end:{line:227,column:27}},loc:{start:{line:227,column:33},end:{line:227,column:74}},line:227},18:{name:"(anonymous_18)",decl:{start:{line:229,column:65},end:{line:229,column:66}},loc:{start:{line:229,column:83},end:{line:231,column:17}},line:229}},branchMap:{0:{loc:{start:{line:74,column:4},end:{line:79,column:5}},type:"if",locations:[{start:{line:74,column:4},end:{line:79,column:5}},{start:{line:76,column:11},end:{line:79,column:5}}],line:74}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx"],names:[],mappings:"AAuBW,cAyLG,YAzLH;AAvBX,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,cAAa;AAErB,SAAQ,gBAAgB,iBAAiB,YAAY,UAAU,eAAe,cAAc,kBAAiB;AAC7G,OAAO,aAAa;AAEpB,OAAO,kBAAkB;AACzB,SAAS,uBAAwC;AACjD,SAAS,0BAA0B;AAGnC,MAAM,UAAU,OAAO;AACvB,MAAM,mCAAmC,CAAC,UAAU,SAAS,EAAE,QAAQ,QAAS,IAAI,IAAI;AAQxF,MAAM,iBAAiB,MAAM,UAAyB;AAAA,EACpD,SAAS;AACP,WAAO,oBAAC,UAAK,WAAU,sBAAsB,eAAK,MAAM,UAAS;AAAA,EACnE;AACF;AASA,MAAM,oBAAoB,MAAM,UAA4B;AAAA,EAC1D,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAW,WAAW,yBAAyB,KAAK,MAAM,SAAS;AAAA,QACnE,MAAM,KAAK,MAAM;AAAA,QACjB,KAAI;AAAA,QACJ,QAAO;AAAA,QACP,eAAY;AAAA,QAEX,eAAK,MAAM;AAAA;AAAA,IACd;AAAA,EACF;AACF;AAOA,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM;AAAA,QAEvB,eAAK,MAAM;AAAA;AAAA,IACd;AAAA,EACF;AACF;AAQA,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM;AAAA,QACxB,SAAS,KAAK,MAAM;AAAA,QAEnB,eAAK,MAAM;AAAA;AAAA,IACd;AAAA,EACF;AACF;AAmBA,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,QAAQ;AAAA,IACN,QAAQ;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,MACT,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EAEA,gBAAgB,KAAe;AAC7B,SAAK,MAAM,cAAc,GAAG;AAAA,EAC9B;AAAA,EAEA,qBAAqB,KAAa;AAChC,SAAK,MAAM,KAAK,eAAe,GAAG;AAAA,EACpC;AAAA,EAEA,SAAS,CAAC,WAAmB;AAC3B,QAAI,WAAW,OAAO;AACpB,MAAC,SAAS,cAAc,oBAAoB,EAAwB,MAAM;AAAA,IAC5E,OACK;AACH,YAAM,KAAK,SAAS,cAAc,kBAAgB,MAAM;AACxD,SAAG,MAAM;AAAA,IACX;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,QAAQ;AAAA,MACZ;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,KAAK;AAAA,MAChB;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,SAAS;AAAA,QAClB,UAAU,KAAK,MAAM,aAAa;AAAA,MACpC;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,qBAAqB;AAAA,QAC9B,UAAU,CAAC;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,mBAAmB;AAAA,QAC5B,UAAU,CAAC;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,mBAAmB;AAAA,QAC5B,UAAU,CAAC;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,sBAAsB;AAAA,QAC/B,UAAU,CAAC;AAAA,MACb;AAAA,IACF;AAEA,UAAM,cAAc,MAAM,KAAK,CAAC,SAAS;AACvC,aAAO,KAAK,OAAO,KAAK,MAAM;AAAA,IAChC,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,oBACpB,+BAAC,SAAI,WAAU,2BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UAGV;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,QAAM,KAAK,OAAO,YAAY;AAAA,gBAEtC,YAAE,aAAa;AAAA;AAAA,YAClB;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,QAAM,KAAK,OAAO,cAAc;AAAA,gBAExC,YAAE,cAAc;AAAA;AAAA,YACnB;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,QAAM,KAAK,OAAO,KAAK;AAAA,gBAE/B,YAAE,UAAU;AAAA;AAAA,YACf;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,QAAO;AAAA,gBACP,KAAI;AAAA,gBACJ,MAAK;AAAA,gBAEL;AAAA,sCAAC,SAAI,KAAK,cAAc,KAAK,EAAE,oBAAoB,GAAG;AAAA,kBACtD,qBAAC,QACC;AAAA,wCAAC,UAAK,WAAU,yBAAyB,kBAAQ,MAAK;AAAA,oBACtD,qBAAC,UAAK,WAAU,4BAA2B;AAAA;AAAA,sBAAE,QAAQ;AAAA,uBAAQ;AAAA,qBAC/D;AAAA;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MACF;AAAA,MACA,qBAAC,SAAI,WAAU,6BAA4B,MAAK,cAAa,cAAW,WACtE;AAAA,6BAAC,iBAAc,OAAM,YAAW,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,MAAM,GACjF;AAAA,8BAAC,mBAAgB;AAAA,UACjB,oBAAC,YAAU,YAAE,MAAM,GAAE;AAAA,WACvB;AAAA,QACA,qBAAC,iBAAc,OAAM,cAAa,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,QAAQ,GACrF;AAAA,8BAAC,kBAAe;AAAA,UAChB,oBAAC,YAAU,YAAE,QAAQ,GAAE;AAAA,WACzB;AAAA,QACA,qBAAC,iBAAc,OAAM,eAAc,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,SAAS,GACvF;AAAA,8BAAC,YAAS;AAAA,UACV,oBAAC,YAAU,YAAE,cAAc,GAAE;AAAA,WAC/B;AAAA,QACA,qBAAC,iBAAc,OAAM,gBAAe,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,UAAU,GACzF;AAAA,8BAAC,cAAW;AAAA,UACZ,oBAAC,YAAU,YAAE,gBAAgB,GAAE;AAAA,WACjC;AAAA,QAEA,qBAAC,iBAAc,OAAM,eACnB;AAAA,8BAAC,gBAAa;AAAA,UACd,qBAAC,WAAO;AAAA,cAAE,MAAM;AAAA,YACd;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,eAAY;AAAA,gBACZ,UAAU,CAAC,MAAM,KAAK,gBAAgB,EAAE,OAAO,KAAiB;AAAA,gBAChE,OAAO,aAAa;AAAA,gBAEnB;AAAA,wBAAM,OAAO,OAAK,EAAE,UAAU,SAAS,EAAE,IAAI,CAAC,SAAS;AACtD,2BACE,oBAAC,YAAqB,OAAO,KAAK,IAAI,UAAU,KAAK,UAAU,eAAa,KAAK,IAC9E,eAAK,SADK,KAAK,EAElB;AAAA,kBAEJ,CAAC;AAAA,kBACD,oBAAC,cAAS,OAAO,EAAE,qBAAqB,GACrC,gBAAM,OAAO,OAAK,EAAE,UAAU,qBAAqB,EAAE,IAAI,CAAC,SAAS;AAClE,2BACE,oBAAC,YAAqB,OAAO,KAAK,IAAI,UAAU,KAAK,UAClD,eAAK,SADK,KAAK,EAElB;AAAA,kBAEJ,CAAC,GACH;AAAA;AAAA;AAAA,YACF;AAAA,aACF;AAAA,WACF;AAAA,QAEA,qBAAC,iBAAc,OAAM,gBACnB;AAAA,8BAAC,cAAW;AAAA,UACZ,qBAAC,WAAO;AAAA,cAAE,UAAU;AAAA,YAClB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,eAAY;AAAA,gBACZ,UAAU,CAAC,MAAM,KAAK,qBAAqB,EAAE,OAAO,KAAK;AAAA,gBACzD,OAAO,KAAK,MAAM,KAAK;AAAA,gBAEtB,iBAAO,QAAQ,kBAAkB,EAAE,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM;AACxD,yBACE,oBAAC,YAAkB,OAAO,MACvB,kBADU,IAEb;AAAA,gBAEJ,CAAC;AAAA;AAAA,YACH;AAAA,aACF;AAAA,WACF;AAAA,QAEA,qBAAC,eAAY,MAAM,6CACjB;AAAA,8BAAC,iBAAc;AAAA,UACf,oBAAC,YAAU,YAAE,MAAM,GAAE;AAAA,WACvB;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9384aa48fdcd3e7e2c722d86823558f7514fd1ad"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ai=function(){return a},a}Ai();const xIe=(Ai().s[0]++,rIe()),e3=(Ai().s[1]++,["chrome","firefox"].indexOf(xIe.name)>-1);class WC extends Mn.Component{render(){return Ai().f[0]++,Ai().s[2]++,G.jsx("span",{className:"maputnik-icon-text",children:this.props.children})}}class wIe extends Mn.Component{render(){return Ai().f[1]++,Ai().s[3]++,G.jsx("a",{className:Qf("maputnik-toolbar-link",this.props.className),href:this.props.href,rel:"noopener noreferrer",target:"_blank","data-wd-key":"toolbar:link",children:this.props.children})}}class CL extends Mn.Component{render(){return Ai().f[2]++,Ai().s[4]++,G.jsx("div",{className:"maputnik-toolbar-select","data-wd-key":this.props.wdKey,children:this.props.children})}}class t3 extends Mn.Component{render(){return Ai().f[3]++,Ai().s[5]++,G.jsx("button",{className:"maputnik-toolbar-action","data-wd-key":this.props.wdKey,onClick:this.props.onClick,children:this.props.children})}}class MIe extends Mn.Component{constructor(){super(...arguments);sn(this,"state",(Ai().s[6]++,{isOpen:{settings:!1,sources:!1,open:!1,add:!1,export:!1}}));sn(this,"onSkip",(Ai().s[9]++,t=>{if(Ai().f[6]++,Ai().s[10]++,t==="map")Ai().b[0][0]++,Ai().s[11]++,document.querySelector(".maplibregl-canvas").focus();else{Ai().b[0][1]++;const r=(Ai().s[12]++,document.querySelector("#skip-target-"+t));Ai().s[13]++,r.focus()}}))}handleSelection(t){Ai().f[4]++,Ai().s[7]++,this.props.onSetMapState(t)}handleLanguageChange(t){Ai().f[5]++,Ai().s[8]++,this.props.i18n.changeLanguage(t)}render(){Ai().f[7]++;const t=(Ai().s[14]++,this.props.t),r=(Ai().s[15]++,[{id:"map",group:"general",title:t("Map")},{id:"inspect",group:"general",title:t("Inspect"),disabled:this.props.renderer==="ol"},{id:"filter-deuteranopia",group:"color-accessibility",title:t("Deuteranopia filter"),disabled:!e3},{id:"filter-protanopia",group:"color-accessibility",title:t("Protanopia filter"),disabled:!e3},{id:"filter-tritanopia",group:"color-accessibility",title:t("Tritanopia filter"),disabled:!e3},{id:"filter-achromatopsia",group:"color-accessibility",title:t("Achromatopsia filter"),disabled:!e3}]),i=(Ai().s[16]++,r.find(o=>(Ai().f[8]++,Ai().s[17]++,o.id===this.props.mapState)));return Ai().s[18]++,G.jsx("nav",{className:"maputnik-toolbar",children:G.jsxs("div",{className:"maputnik-toolbar__inner",children:[G.jsxs("div",{className:"maputnik-toolbar-logo-container",children:[G.jsx("button",{"data-wd-key":"root:skip:layer-list",className:"maputnik-toolbar-skip",onClick:o=>(Ai().f[9]++,Ai().s[19]++,this.onSkip("layer-list")),children:t("Layers list")}),G.jsx("button",{"data-wd-key":"root:skip:layer-editor",className:"maputnik-toolbar-skip",onClick:o=>(Ai().f[10]++,Ai().s[20]++,this.onSkip("layer-editor")),children:t("Layer editor")}),G.jsx("button",{"data-wd-key":"root:skip:map-view",className:"maputnik-toolbar-skip",onClick:o=>(Ai().f[11]++,Ai().s[21]++,this.onSkip("map")),children:t("Map view")}),G.jsxs("a",{className:"maputnik-toolbar-logo",target:"blank",rel:"noreferrer noopener",href:"https://github.com/maplibre/maputnik",children:[G.jsx("img",{src:bIe,alt:t("Maputnik on GitHub")}),G.jsxs("h1",{children:[G.jsx("span",{className:"maputnik-toolbar-name",children:vL.name}),G.jsxs("span",{className:"maputnik-toolbar-version",children:["v",vL.version]})]})]})]}),G.jsxs("div",{className:"maputnik-toolbar__actions",role:"navigation","aria-label":"Toolbar",children:[G.jsxs(t3,{wdKey:"nav:open",onClick:this.props.onToggleModal.bind(this,"open"),children:[G.jsx(xre,{}),G.jsx(WC,{children:t("Open")})]}),G.jsxs(t3,{wdKey:"nav:export",onClick:this.props.onToggleModal.bind(this,"export"),children:[G.jsx(cO,{}),G.jsx(WC,{children:t("Export")})]}),G.jsxs(t3,{wdKey:"nav:sources",onClick:this.props.onToggleModal.bind(this,"sources"),children:[G.jsx(Tre,{}),G.jsx(WC,{children:t("Data Sources")})]}),G.jsxs(t3,{wdKey:"nav:settings",onClick:this.props.onToggleModal.bind(this,"settings"),children:[G.jsx(wre,{}),G.jsx(WC,{children:t("Style Settings")})]}),G.jsxs(CL,{wdKey:"nav:inspect",children:[G.jsx(yre,{}),G.jsxs("label",{children:[t("View"),G.jsxs("select",{className:"maputnik-select","data-wd-key":"maputnik-select",onChange:o=>(Ai().f[12]++,Ai().s[22]++,this.handleSelection(o.target.value)),value:i==null?void 0:i.id,children:[r.filter(o=>(Ai().f[13]++,Ai().s[23]++,o.group==="general")).map(o=>(Ai().f[14]++,Ai().s[24]++,G.jsx("option",{value:o.id,disabled:o.disabled,"data-wd-key":o.id,children:o.title},o.id))),G.jsx("optgroup",{label:t("Color accessibility"),children:r.filter(o=>(Ai().f[15]++,Ai().s[25]++,o.group==="color-accessibility")).map(o=>(Ai().f[16]++,Ai().s[26]++,G.jsx("option",{value:o.id,disabled:o.disabled,children:o.title},o.id)))})]})]})]}),G.jsxs(CL,{wdKey:"nav:language",children:[G.jsx(bre,{}),G.jsxs("label",{children:[t("Language"),G.jsx("select",{className:"maputnik-select","data-wd-key":"maputnik-lang-select",onChange:o=>(Ai().f[17]++,Ai().s[27]++,this.handleLanguageChange(o.target.value)),value:this.props.i18n.language,children:Object.entries(kR).map(([o,a])=>(Ai().f[18]++,Ai().s[28]++,G.jsx("option",{value:o,children:a},o)))})]})]}),G.jsxs(wIe,{href:"https://github.com/maplibre/maputnik/wiki",children:[G.jsx(vre,{}),G.jsx(WC,{children:t("Help")})]})]})]})})}}const SIe=(Ai().s[29]++,No()(MIe));function g5(){var n="/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",e="d17a642b15310eb6111b086bd920c67ec86a8271",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",statementMap:{0:{start:{line:5,column:4},end:{line:5,column:113}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:11},end:{line:6,column:3}},line:4}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx"],names:[],mappings:"AAQW;AARX,OAAO,WAAW;AAMlB,qBAAqB,wBAAwB,MAAM,UAAgC;AAAA,EACjF,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,6BACnB,eAAK,MAAM,UACd;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d17a642b15310eb6111b086bd920c67ec86a8271"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return g5=function(){return a},a}g5();class EIe extends Mn.Component{render(){return g5().f[0]++,g5().s[0]++,G.jsx("div",{className:"maputnik-scroll-container",children:this.props.children})}}function Eh(){var n="/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",e="1ee946cae22aef585acbff88e7256312e8bd0812",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",statementMap:{0:{start:{line:7,column:29},end:{line:9,column:3}},1:{start:{line:11,column:4},end:{line:13,column:6}},2:{start:{line:16,column:4},end:{line:16,column:46}},3:{start:{line:17,column:4},end:{line:26,column:9}},4:{start:{line:29,column:18},end:{line:29,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:20},end:{line:14,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:11},end:{line:27,column:3}},line:15}},branchMap:{0:{loc:{start:{line:24,column:6},end:{line:24,column:123}},type:"binary-expr",locations:[{start:{line:24,column:6},end:{line:24,column:23}},{start:{line:24,column:43},end:{line:24,column:123}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx"],names:[],mappings:"AA8BM,SACE,KADF;AA9BN,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,qBAAqB;AAC5B,SAA0B,uBAAuB;AAWjD,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,OAAO,oBAAoB;AAAA,IACzB,eAAe,UAAU;AAAA,EAC3B;AAAA,EAEA,kBAAkB;AAChB,WAAO;AAAA,MACL,eAAe,EAAE,MAAM,GAAG;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,SAAS;AACP,aAAS,KAAK,MAAM,KAAK,MAAM,KAAK,IAAI;AAExC,WAAO,qBAAC,SAAI,WAAU,mBACnB;AAAA,WAAK,MAAM;AAAA,MACZ,qBAAC,SAAI,WAAU,wBACb;AAAA,4BAAC,SAAI,WAAU,wBACZ,eAAK,MAAM,WACd;AAAA,QACA,oBAAC,SAAI,WAAU,0BACb,8BAAC,mBACE,eAAK,MAAM,aACd,GACF;AAAA,QACC,KAAK,MAAM;AAAA,SACd;AAAA,MACC,KAAK,MAAM,UAAU,oBAAC,SAAI,WAAU,0BAClC,eAAK,MAAM,QACd;AAAA,MAEC,KAAK,MAAM;AAAA,OACd;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1ee946cae22aef585acbff88e7256312e8bd0812"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Eh=function(){return a},a}Eh();class FQ extends Mn.Component{getChildContext(){return Eh().f[0]++,Eh().s[1]++,{reactIconBase:{size:14}}}render(){return Eh().f[1]++,Eh().s[2]++,document.body.dir=this.props.i18n.dir(),Eh().s[3]++,G.jsxs("div",{className:"maputnik-layout",children:[this.props.toolbar,G.jsxs("div",{className:"maputnik-layout-main",children:[G.jsx("div",{className:"maputnik-layout-list",children:this.props.layerList}),G.jsx("div",{className:"maputnik-layout-drawer",children:G.jsx(EIe,{children:this.props.layerEditor})}),this.props.map]}),(Eh().b[0][0]++,this.props.bottom&&(Eh().b[0][1]++,G.jsx("div",{className:"maputnik-layout-bottom",children:this.props.bottom}))),this.props.modals]})}}sn(FQ,"childContextTypes",(Eh().s[0]++,{reactIconBase:Rr.object}));const OIe=(Eh().s[4]++,No()(FQ));function Ra(){var n="/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",e="79207020c1a6a62db4f3db3338a49c0819045455",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",statementMap:{0:{start:{line:6,column:24},end:{line:9,column:3}},1:{start:{line:11,column:38},end:{line:11,column:48}},2:{start:{line:12,column:19},end:{line:40,column:6}},3:{start:{line:14,column:6},end:{line:38,column:7}},4:{start:{line:15,column:27},end:{line:15,column:32}},5:{start:{line:16,column:24},end:{line:16,column:73}},6:{start:{line:17,column:8},end:{line:35,column:13}},7:{start:{line:30,column:31},end:{line:30,column:74}},8:{start:{line:37,column:8},end:{line:37,column:32}},9:{start:{line:39,column:6},end:{line:39,column:120}},10:{start:{line:41,column:18},end:{line:43,column:6}},11:{start:{line:42,column:6},end:{line:42,column:68}},12:{start:{line:44,column:4},end:{line:47,column:9}},13:{start:{line:50,column:24},end:{line:50,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:25},end:{line:8,column:5}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:48,column:3}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:12,column:42},end:{line:12,column:43}},loc:{start:{line:12,column:58},end:{line:40,column:5}},line:12},3:{name:"(anonymous_3)",decl:{start:{line:30,column:25},end:{line:30,column:26}},loc:{start:{line:30,column:31},end:{line:30,column:74}},line:30},4:{name:"(anonymous_4)",decl:{start:{line:41,column:40},end:{line:41,column:41}},loc:{start:{line:41,column:50},end:{line:43,column:5}},line:41}},branchMap:{0:{loc:{start:{line:14,column:6},end:{line:38,column:7}},type:"if",locations:[{start:{line:14,column:6},end:{line:38,column:7}},{start:{line:36,column:13},end:{line:38,column:7}}],line:14},1:{loc:{start:{line:14,column:10},end:{line:14,column:55}},type:"binary-expr",locations:[{start:{line:14,column:10},end:{line:14,column:22}},{start:{line:14,column:26},end:{line:14,column:55}}],line:14},2:{loc:{start:{line:24,column:10},end:{line:34,column:14}},type:"binary-expr",locations:[{start:{line:24,column:10},end:{line:24,column:50}},{start:{line:24,column:70},end:{line:34,column:14}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx"],names:[],mappings:"AA4BY,SAIE,UAHM,KADR;AA5BZ,OAAO,WAAW;AAClB,SAAQ,qBAAoB;AAE5B,SAAS,OAAwB,uBAAuB;AAWxD,MAAM,gCAAgC,MAAM,UAAwC;AAAA,EAClF,OAAO,eAAe;AAAA,IACpB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,mBAAkB,IAAI,KAAK;AACrC,UAAM,SAAS,KAAK,MAAM,QAAQ,IAAI,CAAC,OAAY,QAAQ;AACzD,UAAI;AACJ,UAAI,MAAM,UAAU,MAAM,OAAO,SAAS,SAAS;AACjD,cAAM,EAAC,OAAM,IAAI;AACjB,cAAM,UAAU,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,KAAK,EAAE;AAC/D,kBACE,iCACE;AAAA,+BAAC,SAAM,GAAM;AAAA;AAAA,YACL,oBAAC,UAAM,wBAAc,OAAO,GAAE;AAAA,YAAO;AAAA,YAAG,OAAO,KAAK;AAAA,aAC5D;AAAA,UACC,uBAAuB,OAAO,KAAK,SAClC,iCAAE;AAAA;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,MAAM,KAAK,MAAM,cAAe,OAAO,KAAK,KAAK;AAAA,gBAEzD,YAAE,iBAAiB;AAAA;AAAA,YACtB;AAAA,aACF;AAAA,WAEJ;AAAA,MAEJ,OACK;AACH,kBAAU,MAAM;AAAA,MAClB;AACA,aAAO,oBAAC,OAAqB,WAAU,gCACpC,qBADY,WAAS,GAExB;AAAA,IACF,CAAC;AAED,UAAM,QAAQ,KAAK,MAAM,OAAO,IAAI,CAAC,GAAG,MAAM;AAC5C,aAAO,oBAAC,OAAmB,eAAZ,UAAQ,CAAM;AAAA,IAC/B,CAAC;AAED,WAAO,qBAAC,SAAI,WAAU,0BACnB;AAAA;AAAA,MACA;AAAA,OACH;AAAA,EACF;AACF;AAEA,MAAM,kBAAkB,gBAAgB,EAAE,uBAAuB;AACjE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"79207020c1a6a62db4f3db3338a49c0819045455"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ra=function(){return a},a}Ra();class UQ extends Mn.Component{render(){var o,a;Ra().f[1]++;const{t:e,selectedLayerIndex:t}=(Ra().s[1]++,this.props),r=(Ra().s[2]++,(o=this.props.errors)==null?void 0:o.map((s,d)=>{var C;Ra().f[2]++;let f;if(Ra().s[3]++,Ra().b[1][0]++,s.parsed&&(Ra().b[1][1]++,s.parsed.type==="layer")){Ra().b[0][0]++;const{parsed:O}=(Ra().s[4]++,s),E=(Ra().s[5]++,(C=this.props.mapStyle)==null?void 0:C.layers[O.data.index].id);Ra().s[6]++,f=G.jsxs(G.Fragment,{children:[G.jsxs(e0,{t:e,children:["Layer ",G.jsx("span",{children:DQ(E)}),": ",O.data.message]}),(Ra().b[2][0]++,t!==O.data.index&&(Ra().b[2][1]++,G.jsxs(G.Fragment,{children:[" — ",G.jsx("button",{className:"maputnik-message-panel__switch-button",onClick:()=>(Ra().f[3]++,Ra().s[7]++,this.props.onLayerSelect(O.data.index)),children:e("switch to layer")})]})))]})}else Ra().b[0][1]++,Ra().s[8]++,f=s.message;return Ra().s[9]++,G.jsx("p",{className:"maputnik-message-panel-error",children:f},"error-"+d)})),i=(Ra().s[10]++,(a=this.props.infos)==null?void 0:a.map((s,d)=>(Ra().f[4]++,Ra().s[11]++,G.jsx("p",{children:s},"info-"+d))));return Ra().s[12]++,G.jsxs("div",{className:"maputnik-message-panel",children:[r,i]})}}sn(UQ,"defaultProps",(Ra().s[0]++,{onLayerSelect:()=>{Ra().f[0]++}}));const BIe=(Ra().s[13]++,No()(UQ));function y5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",e="a416dfabb7eaa48bd0505cf98cb9c66326bca3ec",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:165}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx"],names:[],mappings:"AAcM;AAdN,OAAO,WAAW;AAClB,OAAO,gBAAwD;AAC/D,OAAO,cAAc;AASrB,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC9D,8BAAC,cAAY,GAAG,KAAK,OAAO,GAC9B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a416dfabb7eaa48bd0505cf98cb9c66326bca3ec"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return y5=function(){return a},a}y5();class v5 extends Mn.Component{render(){return y5().f[0]++,y5().s[0]++,G.jsx(Sb,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(MQ,{...this.props})})}}function C5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",e="4931f85d3ebf1a60a85ac9883e78e028b7a388d8",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:163}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,iBAAqC;AAC5C,OAAO,WAAW;AAWlB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,eAAa,GAAG,KAAK,OAAO,GAC/B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4931f85d3ebf1a60a85ac9883e78e028b7a388d8"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return C5=function(){return a},a}C5();class Tp extends Mn.Component{render(){return C5().f[0]++,C5().s[0]++,G.jsx(la,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(qf,{...this.props})})}}function _5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",e="37d7b9547efb8875177dbe7a186e7965cd9eb1c0",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:163}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,iBAAqC;AAU5C,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,eAAa,GAAG,KAAK,OAAO,GAC/B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"37d7b9547efb8875177dbe7a186e7965cd9eb1c0"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return _5=function(){return a},a}_5();class Fm extends Mn.Component{render(){return _5().f[0]++,_5().s[0]++,G.jsx(la,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(Qd,{...this.props})})}}function b5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",e="a176a83ddcea7ca7f45b0bf957355a9e0c40a3af",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:160}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx"],names:[],mappings:"AAiBQ;AAjBR,OAAO,WAAW;AAClB,OAAO,cAAgD;AACvD,OAAO,WAAW;AAWlB,qBAAqB,iBAAiB,MAAM,UAAyB;AAAA,EACnE,SAAU;AACR,WACE,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WACpD,8BAAC,YAAU,GAAG,KAAK,OAAO,GAC5B;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a176a83ddcea7ca7f45b0bf957355a9e0c40a3af"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return b5=function(){return a},a}b5();class Eb extends Mn.Component{render(){return b5().f[0]++,b5().s[0]++,G.jsx(la,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(xk,{...this.props})})}}function x5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",e="ed4136288b91381a6bd6755cdb2ea1dcf45e2f6b",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:163}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,iBAAqC;AAW5C,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,eAAa,GAAG,KAAK,OAAM,GAC9B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ed4136288b91381a6bd6755cdb2ea1dcf45e2f6b"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return x5=function(){return a},a}x5();class Mk extends Mn.Component{render(){return x5().f[0]++,x5().s[0]++,G.jsx(la,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(V1,{...this.props})})}}function w5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",e="5745e67ee75c0f352c022256ef8bf31e8fa7367f",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:164}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,eAAiC;AACxC,OAAO,cAAc;AAWrB,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC9D,8BAAC,aAAW,GAAG,KAAK,OAAO,GAC7B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"5745e67ee75c0f352c022256ef8bf31e8fa7367f"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return w5=function(){return a},a}w5();class IIe extends Mn.Component{render(){return w5().f[0]++,w5().s[0]++,G.jsx(Sb,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(bk,{...this.props})})}}function M5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",e="4d9e98bd5e7819496a7ef6b66981b81e318fe1bf",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:162}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,gBAAmC;AAW1C,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,cAAY,GAAG,KAAK,OAAO,GAC9B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4d9e98bd5e7819496a7ef6b66981b81e318fe1bf"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return M5=function(){return a},a}M5();class kIe extends Mn.Component{render(){return M5().f[0]++,M5().s[0]++,G.jsx(la,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:G.jsx(wQ,{...this.props})})}}function Ob(){var n="/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",e="27ec6e42b5e14b383174096337999dd77eadeea6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",statementMap:{0:{start:{line:1,column:13},end:{line:16,column:2}},1:{start:{line:1,column:21},end:{line:16,column:1}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:1,column:13},end:{line:1,column:14}},loc:{start:{line:1,column:21},end:{line:16,column:1}},line:1}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts"],names:[],mappings:"AAEA,MAAM,OAAO,CAAC,OAAkB;AAAA,EAC9B,UAAU;AAAA,IACR,uBAAuB;AAAA,MACrB,OAAO,EAAE,uBAAuB;AAAA,MAChC,KAAK,EAAE,yCAAyC;AAAA,IAClD;AAAA,IACA,4BAA4B;AAAA,MAC1B,OAAO,EAAE,4BAA4B;AAAA,MACrC,KAAK,EAAE,iDAAiD;AAAA,IAC1D;AAAA,IACA,gBAAgB;AAAA,MACd,OAAO,EAAE,gBAAgB;AAAA,MACzB,KAAK,EAAE,sDAAsD;AAAA,IAC/D;AAAA,EACF;AACF;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"27ec6e42b5e14b383174096337999dd77eadeea6"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ob=function(){return a},a}Ob();Ob().s[0]++;const RQ=n=>(Ob().f[0]++,Ob().s[1]++,{maputnik:{maptiler_access_token:{label:n("MapTiler Access Token"),doc:n("Public access token for MapTiler Cloud.")},thunderforest_access_token:{label:n("Thunderforest Access Token"),doc:n("Public access token for Thunderforest services.")},style_renderer:{label:n("Style Renderer"),doc:n("Choose the default Maputnik renderer for this style.")}}});function ri(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalSettings.tsx",e="7a3c8a4ddb7bad8d52f5078e725d4682919b2f8c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalSettings.tsx",statementMap:{0:{start:{line:16,column:23},end:{line:18,column:5}},1:{start:{line:19,column:4},end:{line:23,column:5}},2:{start:{line:20,column:6},end:{line:20,column:34}},3:{start:{line:22,column:6},end:{line:22,column:35}},4:{start:{line:24,column:4},end:{line:27,column:7}},5:{start:{line:30,column:18},end:{line:32,column:5}},6:{start:{line:33,column:4},end:{line:37,column:5}},7:{start:{line:34,column:6},end:{line:34,column:29}},8:{start:{line:36,column:6},end:{line:36,column:30}},9:{start:{line:38,column:4},end:{line:41,column:7}},10:{start:{line:44,column:20},end:{line:46,column:5}},11:{start:{line:47,column:4},end:{line:51,column:5}},12:{start:{line:48,column:6},end:{line:48,column:31}},13:{start:{line:50,column:6},end:{line:50,column:32}},14:{start:{line:52,column:4},end:{line:55,column:7}},15:{start:{line:58,column:25},end:{line:60,column:5}},16:{start:{line:61,column:4},end:{line:65,column:5}},17:{start:{line:62,column:6},end:{line:62,column:36}},18:{start:{line:64,column:6},end:{line:64,column:37}},19:{start:{line:66,column:4},end:{line:66,column:44}},20:{start:{line:69,column:21},end:{line:69,column:55}},21:{start:{line:70,column:54},end:{line:70,column:64}},22:{start:{line:71,column:16},end:{line:71,column:38}},23:{start:{line:72,column:18},end:{line:72,column:49}},24:{start:{line:73,column:23},end:{line:73,column:59}},25:{start:{line:74,column:20},end:{line:74,column:53}},26:{start:{line:75,column:4},end:{line:285,column:6}},27:{start:{line:288,column:22},end:{line:288,column:62}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:44},end:{line:28,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:29,column:2},end:{line:29,column:3}},loc:{start:{line:29,column:39},end:{line:42,column:3}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:41},end:{line:56,column:3}},line:43},3:{name:"(anonymous_3)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:39},end:{line:67,column:3}},line:57},4:{name:"(anonymous_4)",decl:{start:{line:68,column:2},end:{line:68,column:3}},loc:{start:{line:68,column:11},end:{line:286,column:3}},line:68}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:23,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:23,column:5}},{start:{line:21,column:11},end:{line:23,column:5}}],line:19},1:{loc:{start:{line:33,column:4},end:{line:37,column:5}},type:"if",locations:[{start:{line:33,column:4},end:{line:37,column:5}},{start:{line:35,column:11},end:{line:37,column:5}}],line:33},2:{loc:{start:{line:47,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:47,column:4},end:{line:51,column:5}},{start:{line:49,column:11},end:{line:51,column:5}}],line:47},3:{loc:{start:{line:61,column:4},end:{line:65,column:5}},type:"if",locations:[{start:{line:61,column:4},end:{line:65,column:5}},{start:{line:63,column:11},end:{line:65,column:5}}],line:61},4:{loc:{start:{line:69,column:21},end:{line:69,column:55}},type:"binary-expr",locations:[{start:{line:69,column:21},end:{line:69,column:49}},{start:{line:69,column:53},end:{line:69,column:55}}],line:69},5:{loc:{start:{line:72,column:18},end:{line:72,column:49}},type:"binary-expr",locations:[{start:{line:72,column:18},end:{line:72,column:43}},{start:{line:72,column:47},end:{line:72,column:49}}],line:72},6:{loc:{start:{line:73,column:23},end:{line:73,column:59}},type:"binary-expr",locations:[{start:{line:73,column:23},end:{line:73,column:53}},{start:{line:73,column:57},end:{line:73,column:59}}],line:73},7:{loc:{start:{line:74,column:20},end:{line:74,column:53}},type:"binary-expr",locations:[{start:{line:74,column:20},end:{line:74,column:47}},{start:{line:74,column:51},end:{line:74,column:53}}],line:74},8:{loc:{start:{line:150,column:21},end:{line:150,column:42}},type:"binary-expr",locations:[{start:{line:150,column:21},end:{line:150,column:36}},{start:{line:150,column:40},end:{line:150,column:42}}],line:150},9:{loc:{start:{line:279,column:21},end:{line:279,column:62}},type:"binary-expr",locations:[{start:{line:279,column:21},end:{line:279,column:50}},{start:{line:279,column:54},end:{line:279,column:62}}],line:279}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalSettings.tsx"],names:[],mappings:"AA+GM,SACE,KADF;AA/GN,OAAO,WAAW;AAClB,OAAO,YAAY;AAEnB,SAA0B,uBAAuB;AAEjD,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,OAAO,yBAAyB;AAUhC,MAAM,8BAA8B,MAAM,UAAsC;AAAA,EAC9E,yBAAyB,UAAyC,OAA2B;AAC3F,UAAM,aAAa;AAAA,MACjB,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,WAAW,QAAQ;AAAA,IAC5B,OACK;AACH,iBAAW,QAAQ,IAAI;AAAA,IACzB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,oBAAoB,UAAoC,OAAY;AAClE,UAAM,QAAQ;AAAA,MACZ,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,MAAM,QAAQ;AAAA,IACvB,OACK;AAEH,YAAM,QAAQ,IAAI;AAAA,IACpB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,sBAAsB,UAAsC,OAAY;AACtE,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,QAAQ,QAAQ;AAAA,IACzB,OACK;AAEH,cAAQ,QAAQ,IAAI;AAAA,IACtB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,oBAAoB,UAA8C,OAAY;AAC5E,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,IAChB;AAEA,QAAI,UAAU,QAAW;AAEvB,aAAO,aAAa,QAAQ;AAAA,IAC9B,OACK;AAEH,mBAAa,QAAQ,IAAI;AAAA,IAC3B;AACA,SAAK,MAAM,eAAe,YAAY;AAAA,EACxC;AAAA,EAEA,SAAS;AACP,UAAM,WAAW,KAAK,MAAM,SAAS,YAAY,CAAC;AAClD,UAAM,EAAC,GAAG,0BAA0B,SAAQ,IAAI,KAAK;AACrD,UAAM,MAAM,oBAAoB,CAAC;AAEjC,UAAM,QAAQ,KAAK,MAAM,SAAS,SAAS,CAAC;AAC5C,UAAM,aAAa,KAAK,MAAM,SAAS,cAAc,CAAC;AACtD,UAAM,UAAU,KAAK,MAAM,SAAS,WAAW,CAAC;AAEhD,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,gBAAgB;AAAA,QAEzB,+BAAC,SAAI,WAAU,kBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,MAAM;AAAA,cACf,WAAW,OAAO,MAAM;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,UAAU,KAAK,oBAAoB,KAAK,MAAM,MAAM;AAAA;AAAA,UACtD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,OAAO;AAAA,cAChB,WAAW,EAAC,KAAK,EAAE,6DAA6D,EAAC;AAAA,cACjF,eAAY;AAAA,cACZ,OAAQ,KAAK,MAAM,SAAiB;AAAA,cACpC,UAAU,KAAK,oBAAoB,KAAK,MAAM,OAAO;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,EAAE,YAAY;AAAA,cACrB,eAAY;AAAA,cACZ,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,UAAU,KAAK,oBAAoB,KAAK,MAAM,QAAQ;AAAA;AAAA,UACxD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,YAAY;AAAA,cACrB,WAAW,OAAO,MAAM;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,UAAU,KAAK,oBAAoB,KAAK,MAAM,QAAQ;AAAA;AAAA,UACxD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,sBAAsB;AAAA,cAC1C,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,oCAAoC;AAAA,cACpD,UAAU,yBAAyB,KAAK,MAAM,oCAAoC;AAAA;AAAA,UACpF;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,2BAA2B;AAAA,cAC/C,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,qCAAqC;AAAA,cACrD,UAAU,yBAAyB,KAAK,MAAM,qCAAqC;AAAA;AAAA,UACrF;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ;AAAA,cACjB,WAAW,OAAO,MAAM;AAAA,cACxB,QAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAO,SAAS,UAAU,CAAC;AAAA,cAC3B,SAAS,CAAC,GAAG,CAAC;AAAA,cACd,UAAU,KAAK,oBAAoB,KAAK,MAAM,QAAQ;AAAA;AAAA,UACxD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,MAAM;AAAA,cACf,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,SAAS;AAAA,cAChB,SAAS;AAAA,cACT,UAAU,KAAK,oBAAoB,KAAK,MAAM,MAAM;AAAA;AAAA,UACtD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,SAAS;AAAA,cAClB,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,SAAS;AAAA,cAChB,SAAS,OAAO,MAAM,QAAQ;AAAA,cAC9B,UAAU,KAAK,oBAAoB,KAAK,MAAM,SAAS;AAAA;AAAA,UACzD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,OAAO;AAAA,cAChB,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,SAAS;AAAA,cAChB,SAAS,OAAO,MAAM,MAAM;AAAA,cAC5B,UAAU,KAAK,oBAAoB,KAAK,MAAM,OAAO;AAAA;AAAA,UACvD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,cAAc;AAAA,cACvB,WAAW,OAAO,MAAM;AAAA,cACxB,MAAK;AAAA,cACL,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,KAAK,OAAO,MAAM,OAAO,MAAM;AAAA,cAC/C,SAAS,OAAO,MAAM,OAAO;AAAA,cAC7B,UAAU,KAAK,oBAAoB,KAAK,MAAM,QAAQ;AAAA;AAAA,UACxD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,aAAa;AAAA,cACtB,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,MAAM,MAAM;AAAA,cAC5B,UAAU,KAAK,oBAAoB,KAAK,MAAM,OAAO;AAAA;AAAA,UACvD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,iBAAiB;AAAA,cAC1B,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,MAAM,UAAU;AAAA,cAChC,UAAU,KAAK,oBAAoB,KAAK,MAAM,WAAW;AAAA;AAAA,UAC3D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,gBAAgB;AAAA,cACzB,WAAW,OAAO,MAAM;AAAA,cACxB,MAAK;AAAA,cACL,QAAQ,OAAO,MAAM,SAAS;AAAA,cAC9B,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,MAAM,SAAS;AAAA,cAC/B,UAAU,KAAK,oBAAoB,KAAK,MAAM,UAAU;AAAA;AAAA,UAC1D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,gBAAgB;AAAA,cACzB,WAAW,OAAO,QAAQ;AAAA,cAC1B,eAAY;AAAA,cACZ,OAAO,QAAQ;AAAA,cACf,UAAU,KAAK,sBAAsB,KAAK,MAAM,QAAQ;AAAA;AAAA,UAC1D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,sBAAsB;AAAA,cAC/B,WAAW,OAAO,QAAQ;AAAA,cAC1B,OAAO,QAAQ;AAAA,cACf,SAAS,OAAO,QAAQ,aAAa;AAAA,cACrC,UAAU,KAAK,sBAAsB,KAAK,MAAM,cAAc;AAAA;AAAA,UAChE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,kBAAkB;AAAA,cAC3B,WAAW,OAAO,WAAW;AAAA,cAC7B,OAAO,WAAW;AAAA,cAClB,SAAS,OAAO,WAAW,MAAM;AAAA,cACjC,UAAU,KAAK,yBAAyB,KAAK,MAAM,OAAO;AAAA;AAAA,UAC5D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,qBAAqB;AAAA,cAC9B,WAAW,OAAO,WAAW;AAAA,cAC7B,OAAO,WAAW;AAAA,cAClB,SAAS,OAAO,WAAW,SAAS;AAAA,cACpC,UAAU,KAAK,yBAAyB,KAAK,MAAM,UAAU;AAAA;AAAA,UAC/D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,eAAe;AAAA,cACnC,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,SAAS;AAAA,gBACP,CAAC,UAAU,eAAe;AAAA,gBAC1B,CAAC,MAAM,EAAE,4BAA4B,CAAC;AAAA,cACxC;AAAA,cACA,OAAO,SAAS,mBAAmB,KAAK;AAAA,cACxC,UAAU,yBAAyB,KAAK,MAAM,mBAAmB;AAAA;AAAA,UACnE;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,gBAAgB,gBAAgB,EAAE,qBAAqB;AAC7D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7a3c8a4ddb7bad8d52f5078e725d4682919b2f8c"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ri=function(){return a},a}ri();class TIe extends Mn.Component{changeTransitionProperty(e,t){ri().f[0]++;const r=(ri().s[0]++,{...this.props.mapStyle.transition});ri().s[1]++,t===void 0?(ri().b[0][0]++,ri().s[2]++,delete r[e]):(ri().b[0][1]++,ri().s[3]++,r[e]=t),ri().s[4]++,this.props.onStyleChanged({...this.props.mapStyle,transition:r})}changeLightProperty(e,t){ri().f[1]++;const r=(ri().s[5]++,{...this.props.mapStyle.light});ri().s[6]++,t===void 0?(ri().b[1][0]++,ri().s[7]++,delete r[e]):(ri().b[1][1]++,ri().s[8]++,r[e]=t),ri().s[9]++,this.props.onStyleChanged({...this.props.mapStyle,light:r})}changeTerrainProperty(e,t){ri().f[2]++;const r=(ri().s[10]++,{...this.props.mapStyle.terrain});ri().s[11]++,t===void 0?(ri().b[2][0]++,ri().s[12]++,delete r[e]):(ri().b[2][1]++,ri().s[13]++,r[e]=t),ri().s[14]++,this.props.onStyleChanged({...this.props.mapStyle,terrain:r})}changeStyleProperty(e,t){ri().f[3]++;const r=(ri().s[15]++,{...this.props.mapStyle});ri().s[16]++,t===void 0?(ri().b[3][0]++,ri().s[17]++,delete r[e]):(ri().b[3][1]++,ri().s[18]++,r[e]=t),ri().s[19]++,this.props.onStyleChanged(r)}render(){ri().f[4]++;const e=(ri().s[20]++,ri().b[4][0]++,this.props.mapStyle.metadata||(ri().b[4][1]++,{})),{t,onChangeMetadataProperty:r,mapStyle:i}=(ri().s[21]++,this.props),o=(ri().s[22]++,RQ(t)),a=(ri().s[23]++,ri().b[5][0]++,this.props.mapStyle.light||(ri().b[5][1]++,{})),s=(ri().s[24]++,ri().b[6][0]++,this.props.mapStyle.transition||(ri().b[6][1]++,{})),d=(ri().s[25]++,ri().b[7][0]++,this.props.mapStyle.terrain||(ri().b[7][1]++,{}));return ri().s[26]++,G.jsx(g0,{"data-wd-key":"modal:settings",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Style Settings"),children:G.jsxs("div",{className:"modal:settings",children:[G.jsx(Fm,{label:t("Name"),fieldSpec:no.$root.name,"data-wd-key":"modal:settings.name",value:this.props.mapStyle.name,onChange:this.changeStyleProperty.bind(this,"name")}),G.jsx(Fm,{label:t("Owner"),fieldSpec:{doc:t("Owner ID of the style. Used by Mapbox or future style APIs.")},"data-wd-key":"modal:settings.owner",value:this.props.mapStyle.owner,onChange:this.changeStyleProperty.bind(this,"owner")}),G.jsx(Eb,{fieldSpec:no.$root.sprite,label:t("Sprite URL"),"data-wd-key":"modal:settings.sprite",value:this.props.mapStyle.sprite,onChange:this.changeStyleProperty.bind(this,"sprite")}),G.jsx(Eb,{label:t("Glyphs URL"),fieldSpec:no.$root.glyphs,"data-wd-key":"modal:settings.glyphs",value:this.props.mapStyle.glyphs,onChange:this.changeStyleProperty.bind(this,"glyphs")}),G.jsx(Fm,{label:o.maputnik.maptiler_access_token.label,fieldSpec:o.maputnik.maptiler_access_token,"data-wd-key":"modal:settings.maputnik:openmaptiles_access_token",value:e["maputnik:openmaptiles_access_token"],onChange:r.bind(this,"maputnik:openmaptiles_access_token")}),G.jsx(Fm,{label:o.maputnik.thunderforest_access_token.label,fieldSpec:o.maputnik.thunderforest_access_token,"data-wd-key":"modal:settings.maputnik:thunderforest_access_token",value:e["maputnik:thunderforest_access_token"],onChange:r.bind(this,"maputnik:thunderforest_access_token")}),G.jsx(v5,{label:t("Center"),fieldSpec:no.$root.center,length:2,type:"number",value:(ri().b[8][0]++,i.center||(ri().b[8][1]++,[])),default:[0,0],onChange:this.changeStyleProperty.bind(this,"center")}),G.jsx(Tp,{label:t("Zoom"),fieldSpec:no.$root.zoom,value:i.zoom,default:0,onChange:this.changeStyleProperty.bind(this,"zoom")}),G.jsx(Tp,{label:t("Bearing"),fieldSpec:no.$root.bearing,value:i.bearing,default:no.$root.bearing.default,onChange:this.changeStyleProperty.bind(this,"bearing")}),G.jsx(Tp,{label:t("Pitch"),fieldSpec:no.$root.pitch,value:i.pitch,default:no.$root.pitch.default,onChange:this.changeStyleProperty.bind(this,"pitch")}),G.jsx(IIe,{label:t("Light anchor"),fieldSpec:no.light.anchor,name:"light-anchor",value:a.anchor,options:Object.keys(no.light.anchor.values),default:no.light.anchor.default,onChange:this.changeLightProperty.bind(this,"anchor")}),G.jsx(kIe,{label:t("Light color"),fieldSpec:no.light.color,value:a.color,default:no.light.color.default,onChange:this.changeLightProperty.bind(this,"color")}),G.jsx(Tp,{label:t("Light intensity"),fieldSpec:no.light.intensity,value:a.intensity,default:no.light.intensity.default,onChange:this.changeLightProperty.bind(this,"intensity")}),G.jsx(v5,{label:t("Light position"),fieldSpec:no.light.position,type:"number",length:no.light.position.length,value:a.position,default:no.light.position.default,onChange:this.changeLightProperty.bind(this,"position")}),G.jsx(Fm,{label:t("Terrain source"),fieldSpec:no.terrain.source,"data-wd-key":"modal:settings.maputnik:terrain_source",value:d.source,onChange:this.changeTerrainProperty.bind(this,"source")}),G.jsx(Tp,{label:t("Terrain exaggeration"),fieldSpec:no.terrain.exaggeration,value:d.exaggeration,default:no.terrain.exaggeration.default,onChange:this.changeTerrainProperty.bind(this,"exaggeration")}),G.jsx(Tp,{label:t("Transition delay"),fieldSpec:no.transition.delay,value:s.delay,default:no.transition.delay.default,onChange:this.changeTransitionProperty.bind(this,"delay")}),G.jsx(Tp,{label:t("Transition duration"),fieldSpec:no.transition.duration,value:s.duration,default:no.transition.duration.default,onChange:this.changeTransitionProperty.bind(this,"duration")}),G.jsx(Mk,{label:o.maputnik.style_renderer.label,fieldSpec:o.maputnik.style_renderer,"data-wd-key":"modal:settings.maputnik:renderer",options:[["mlgljs","MapLibreGL JS"],["ol",t("Open Layers (experimental)")]],value:(ri().b[9][0]++,e["maputnik:renderer"]||(ri().b[9][1]++,"mlgljs")),onChange:r.bind(this,"maputnik:renderer")})]})})}}const KIe=(ri().s[27]++,No()(TIe));var zQ={exports:{}};(function(n,e){(function(t,r,i){n.exports=i(),n.exports.default=i()})("slugify",Vf,function(){var t=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","ǈ":"LJ","ǉ":"lj","ǋ":"NJ","ǌ":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(o,a){if(typeof o!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var s=r[a.locale]||{},d=a.replacement===void 0?"-":a.replacement,f=a.trim===void 0?!0:a.trim,C=o.normalize().split("").reduce(function(O,E){var P=s[E];return P===void 0&&(P=t[E]),P===void 0&&(P=E),P===d&&(P=" "),O+P.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(C=C.replace(/[^A-Za-z0-9\s]/g,"")),f&&(C=C.trim()),C=C.replace(/\s+/g,d),a.lower&&(C=C.toLowerCase()),C}return i.extend=function(o){Object.assign(t,o)},i})})(zQ);var PIe=zQ.exports;const DIe=Ba(PIe);var jQ={exports:{}};(function(n,e){(function(t,r){r()})(Vf,function(){function t(f,C){return typeof C>"u"?C={autoBom:!1}:typeof C!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),C={autoBom:!C}),C.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(f.type)?new Blob(["\uFEFF",f],{type:f.type}):f}function r(f,C,O){var E=new XMLHttpRequest;E.open("GET",f),E.responseType="blob",E.onload=function(){d(E.response,C,O)},E.onerror=function(){console.error("could not download file")},E.send()}function i(f){var C=new XMLHttpRequest;C.open("HEAD",f,!1);try{C.send()}catch{}return 200<=C.status&&299>=C.status}function o(f){try{f.dispatchEvent(new MouseEvent("click"))}catch{var C=document.createEvent("MouseEvents");C.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),f.dispatchEvent(C)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof window=="object"&&window.global===window?window:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(f,C,O){var E=a.URL||a.webkitURL,P=document.createElement("a");C=C||f.name||"download",P.download=C,P.rel="noopener",typeof f=="string"?(P.href=f,P.origin===location.origin?o(P):i(P.href)?r(f,C,O):o(P,P.target="_blank")):(P.href=E.createObjectURL(f),setTimeout(function(){E.revokeObjectURL(P.href)},4e4),setTimeout(function(){o(P)},0))}:"msSaveOrOpenBlob"in navigator?function(f,C,O){if(C=C||f.name||"download",typeof f!="string")navigator.msSaveOrOpenBlob(t(f,O),C);else if(i(f))r(f,C,O);else{var E=document.createElement("a");E.href=f,E.target="_blank",setTimeout(function(){o(E)})}}:function(f,C,O,E){if(E=E||open("","_blank"),E&&(E.document.title=E.document.body.innerText="downloading..."),typeof f=="string")return r(f,C,O);var P=f.type==="application/octet-stream",D=/constructor/i.test(a.HTMLElement)||a.safari,$=/CriOS\/[\d]+/.test(navigator.userAgent);if(($||P&&D||s)&&typeof FileReader<"u"){var H=new FileReader;H.onloadend=function(){var Z=H.result;Z=$?Z:Z.replace(/^data:[^;]*;/,"data:attachment/file;"),E?E.location.href=Z:location=Z,E=null},H.readAsDataURL(f)}else{var Q=a.URL||a.webkitURL,N=Q.createObjectURL(f);E?E.location=N:location.href=N,E=null,setTimeout(function(){Q.revokeObjectURL(N)},4e4)}});a.saveAs=d.saveAs=d,n.exports=d})})(jQ);var _L=jQ.exports;const LIe="4.1.2",FIe="get_your_own_OpIi9ZULNHzrESv6T2vL",UIe="b71f7f0ba4064f5eb9e903859a9cf5c6",NQ={openmaptiles:FIe,thunderforest:UIe};function Nn(){var n="/home/runner/work/maputnik/maputnik/src/libs/style.ts",e="90dcc82dd58ae44e1faf5283c5a3a70c09f07bf2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/style.ts",statementMap:{0:{start:{line:3,column:19},end:{line:7,column:2}},1:{start:{line:9,column:2},end:{line:9,column:52}},2:{start:{line:12,column:2},end:{line:15,column:3}},3:{start:{line:13,column:4},end:{line:13,column:28}},4:{start:{line:14,column:4},end:{line:14,column:17}},5:{start:{line:16,column:2},end:{line:16,column:15}},6:{start:{line:19,column:24},end:{line:23,column:4}},7:{start:{line:20,column:25},end:{line:20,column:37}},8:{start:{line:21,column:4},end:{line:21,column:36}},9:{start:{line:22,column:4},end:{line:22,column:24}},10:{start:{line:24,column:2},end:{line:27,column:4}},11:{start:{line:30,column:2},end:{line:33,column:4}},12:{start:{line:36,column:2},end:{line:36,column:69}},13:{start:{line:39,column:2},end:{line:43,column:3}},14:{start:{line:39,column:15},end:{line:39,column:16}},15:{start:{line:40,column:4},end:{line:42,column:5}},16:{start:{line:41,column:6},end:{line:41,column:15}},17:{start:{line:44,column:2},end:{line:44,column:14}},18:{start:{line:47,column:2},end:{line:49,column:3}},19:{start:{line:48,column:4},end:{line:48,column:33}},20:{start:{line:50,column:19},end:{line:50,column:42}},21:{start:{line:51,column:20},end:{line:51,column:67}},22:{start:{line:52,column:2},end:{line:54,column:3}},23:{start:{line:53,column:4},end:{line:53,column:37}},24:{start:{line:55,column:2},end:{line:55,column:21}},25:{start:{line:58,column:17},end:{line:58,column:45}},26:{start:{line:59,column:2},end:{line:60,column:20}},27:{start:{line:60,column:4},end:{line:60,column:20}},28:{start:{line:61,column:2},end:{line:62,column:20}},29:{start:{line:62,column:4},end:{line:62,column:20}},30:{start:{line:63,column:22},end:{line:63,column:64}},31:{start:{line:64,column:2},end:{line:66,column:3}},32:{start:{line:65,column:4},end:{line:65,column:20}},33:{start:{line:67,column:25},end:{line:73,column:3}},34:{start:{line:74,column:23},end:{line:77,column:3}},35:{start:{line:78,column:2},end:{line:78,column:22}},36:{start:{line:81,column:21},end:{line:81,column:29}},37:{start:{line:82,column:2},end:{line:84,column:5}},38:{start:{line:83,column:4},end:{line:83,column:76}},39:{start:{line:85,column:2},end:{line:93,column:3}},40:{start:{line:86,column:27},end:{line:86,column:73}},41:{start:{line:87,column:4},end:{line:92,column:5}},42:{start:{line:88,column:6},end:{line:91,column:8}},43:{start:{line:94,column:2},end:{line:94,column:22}},44:{start:{line:97,column:26},end:{line:99,column:3}},45:{start:{line:100,column:2},end:{line:100,column:63}},46:{start:{line:101,column:2},end:{line:104,column:4}}},fnMap:{0:{name:"generateId",decl:{start:{line:8,column:9},end:{line:8,column:19}},loc:{start:{line:8,column:22},end:{line:10,column:1}},line:8},1:{name:"ensureHasId",decl:{start:{line:11,column:9},end:{line:11,column:20}},loc:{start:{line:11,column:28},end:{line:17,column:1}},line:11},2:{name:"ensureHasNoInteractive",decl:{start:{line:18,column:9},end:{line:18,column:31}},loc:{start:{line:18,column:39},end:{line:28,column:1}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:19,column:41},end:{line:19,column:42}},loc:{start:{line:19,column:52},end:{line:23,column:3}},line:19},4:{name:"ensureHasNoRefs",decl:{start:{line:29,column:9},end:{line:29,column:24}},loc:{start:{line:29,column:32},end:{line:34,column:1}},line:29},5:{name:"ensureStyleValidity",decl:{start:{line:35,column:9},end:{line:35,column:28}},loc:{start:{line:35,column:36},end:{line:37,column:1}},line:35},6:{name:"indexOfLayer",decl:{start:{line:38,column:9},end:{line:38,column:21}},loc:{start:{line:38,column:39},end:{line:45,column:1}},line:38},7:{name:"getAccessToken",decl:{start:{line:46,column:9},end:{line:46,column:23}},loc:{start:{line:46,column:52},end:{line:56,column:1}},line:46},8:{name:"replaceSourceAccessToken",decl:{start:{line:57,column:9},end:{line:57,column:33}},loc:{start:{line:57,column:67},end:{line:79,column:1}},line:57},9:{name:"replaceAccessTokens",decl:{start:{line:80,column:9},end:{line:80,column:28}},loc:{start:{line:80,column:50},end:{line:95,column:1}},line:80},10:{name:"(anonymous_10)",decl:{start:{line:82,column:40},end:{line:82,column:41}},loc:{start:{line:82,column:56},end:{line:84,column:3}},line:82},11:{name:"stripAccessTokens",decl:{start:{line:96,column:9},end:{line:96,column:26}},loc:{start:{line:96,column:37},end:{line:105,column:1}},line:96}},branchMap:{0:{loc:{start:{line:12,column:2},end:{line:15,column:3}},type:"if",locations:[{start:{line:12,column:2},end:{line:15,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:12},1:{loc:{start:{line:12,column:6},end:{line:12,column:35}},type:"binary-expr",locations:[{start:{line:12,column:6},end:{line:12,column:22}},{start:{line:12,column:26},end:{line:12,column:35}}],line:12},2:{loc:{start:{line:40,column:4},end:{line:42,column:5}},type:"if",locations:[{start:{line:40,column:4},end:{line:42,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:40},3:{loc:{start:{line:47,column:2},end:{line:49,column:3}},type:"if",locations:[{start:{line:47,column:2},end:{line:49,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:47},4:{loc:{start:{line:47,column:6},end:{line:47,column:89}},type:"binary-expr",locations:[{start:{line:47,column:6},end:{line:47,column:46}},{start:{line:47,column:50},end:{line:47,column:89}}],line:47},5:{loc:{start:{line:50,column:19},end:{line:50,column:42}},type:"binary-expr",locations:[{start:{line:50,column:19},end:{line:50,column:36}},{start:{line:50,column:40},end:{line:50,column:42}}],line:50},6:{loc:{start:{line:52,column:2},end:{line:54,column:3}},type:"if",locations:[{start:{line:52,column:2},end:{line:54,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:52},7:{loc:{start:{line:52,column:6},end:{line:52,column:40}},type:"binary-expr",locations:[{start:{line:52,column:6},end:{line:52,column:24}},{start:{line:52,column:28},end:{line:52,column:40}}],line:52},8:{loc:{start:{line:57,column:56},end:{line:57,column:65}},type:"default-arg",locations:[{start:{line:57,column:63},end:{line:57,column:65}}],line:57},9:{loc:{start:{line:59,column:2},end:{line:60,column:20}},type:"if",locations:[{start:{line:59,column:2},end:{line:60,column:20}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:59},10:{loc:{start:{line:61,column:2},end:{line:62,column:20}},type:"if",locations:[{start:{line:61,column:2},end:{line:62,column:20}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:61},11:{loc:{start:{line:61,column:6},end:{line:61,column:39}},type:"binary-expr",locations:[{start:{line:61,column:6},end:{line:61,column:24}},{start:{line:61,column:28},end:{line:61,column:39}}],line:61},12:{loc:{start:{line:64,column:2},end:{line:66,column:3}},type:"if",locations:[{start:{line:64,column:2},end:{line:66,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:64},13:{loc:{start:{line:80,column:39},end:{line:80,column:48}},type:"default-arg",locations:[{start:{line:80,column:46},end:{line:80,column:48}}],line:80},14:{loc:{start:{line:85,column:2},end:{line:93,column:3}},type:"if",locations:[{start:{line:85,column:2},end:{line:93,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:85},15:{loc:{start:{line:85,column:6},end:{line:85,column:114}},type:"binary-expr",locations:[{start:{line:85,column:6},end:{line:85,column:21}},{start:{line:85,column:26},end:{line:85,column:69}},{start:{line:85,column:73},end:{line:85,column:113}}],line:85},16:{loc:{start:{line:87,column:4},end:{line:92,column:5}},type:"if",locations:[{start:{line:87,column:4},end:{line:92,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:87}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0],14:[0,0],15:[0,0,0],16:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/style.ts"],names:[],mappings:"AAAA,SAAQ,mBAAkB;AAE1B,OAAO,YAAY;AAGnB,MAAM,aAAa,oBAAoB;AAAA,EACrC,SAAS;AAAA,EACT,SAAS,CAAC;AAAA,EACV,QAAQ,CAAC;AACX,CAAC;AAED,SAAS,aAAa;AACpB,SAAO,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC;AAClD;AAEA,SAAS,YAAY,OAAkF;AACrG,MAAG,EAAE,QAAQ,UAAU,CAAC,MAAM,IAAI;AAChC,UAAM,KAAK,WAAW;AACtB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,SAAS,uBAAuB,OAA0C;AACxE,QAAM,gBAAgB,MAAM,OAAO,IAAI,WAAS;AAC9C,UAAM,eAA2D,EAAE,GAAG,MAAM;AAC5E,WAAO,aAAa;AACpB,WAAO;AAAA,EACT,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,EACV;AACF;AAEA,SAAS,gBAAgB,OAA0C;AACjE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ,YAAY,MAAM,MAAM;AAAA,EAClC;AACF;AAEA,SAAS,oBAAoB,OAAgE;AAC3F,SAAO,uBAAuB,gBAAgB,YAAY,KAAK,CAAC,CAAC;AACnE;AAEA,SAAS,aAAa,QAA8B,SAAiB;AACnE,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,QAAG,OAAO,CAAC,EAAE,OAAO,SAAS;AAC3B,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,eAAe,YAAoB,UAA8B,MAAiC;AACzG,MAAG,eAAe,6BAA6B,eAAe,0BAA0B;AACtF,iBAAa;AAAA,EACf;AAEA,QAAM,WAAW,SAAS,YAAY,CAAC;AACvC,MAAI,cAAc,SAAS,YAAY,UAAU,eAAe;AAEhE,MAAG,KAAK,iBAAiB,CAAC,aAAa;AACrC,kBAAc,OAAO,UAAiC;AAAA,EACxD;AAEA,SAAO;AACT;AAEA,SAAS,yBAAyB,UAA8B,YAAoB,OAAK,CAAC,GAAG;AAC3F,QAAM,SAAS,SAAS,QAAQ,UAAU;AAC1C,MAAG,CAAC;AAAQ,WAAO;AACnB,MAAG,EAAE,SAAS,WAAW,CAAC,OAAO;AAAK,WAAO;AAE7C,QAAM,cAAc,eAAe,YAAY,UAAU,IAAI;AAE7D,MAAG,CAAC,aAAa;AAEf,WAAO;AAAA,EACT;AAEA,QAAM,iBAAiB;AAAA,IACrB,GAAG,SAAS;AAAA,IACZ,CAAC,UAAU,GAAG;AAAA,MACZ,GAAG;AAAA,MACH,KAAK,OAAO,IAAI,QAAQ,SAAS,WAAW;AAAA,IAC9C;AAAA,EACF;AACA,QAAM,eAAe;AAAA,IACnB,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACA,SAAO;AACT;AAEA,SAAS,oBAAoB,UAA8B,OAAK,CAAC,GAAG;AAClE,MAAI,eAAe;AAEnB,SAAO,KAAK,SAAS,OAAO,EAAE,QAAQ,CAAC,eAAe;AACpD,mBAAe,yBAAyB,cAAc,YAAY,IAAI;AAAA,EACxE,CAAC;AAED,MAAI,SAAS,WAAW,SAAS,OAAO,MAAM,oBAAoB,KAAK,SAAS,OAAO,MAAM,iBAAiB,IAAI;AAChH,UAAM,iBAAiB,eAAe,gBAAgB,UAAU,IAAI;AACpE,QAAI,gBAAgB;AAClB,qBAAe;AAAA,QACb,GAAG;AAAA,QACH,QAAQ,SAAS,OAAO,QAAQ,SAAS,cAAc;AAAA,MACzD;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,UAA8B;AACvD,QAAM,kBAAkB;AAAA,IACtB,GAAG,SAAS;AAAA,EACd;AACA,SAAO,gBAAgB,oCAAoC;AAC3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,UAAU;AAAA,EACZ;AACF;AAEA,eAAe;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"90dcc82dd58ae44e1faf5283c5a3a70c09f07bf2"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Nn=function(){return a},a}Nn();const RIe=(Nn().s[0]++,GQ({version:8,sources:{},layers:[]}));function WQ(){return Nn().f[0]++,Nn().s[1]++,Math.random().toString(36).substring(2,9)}function zIe(n){return Nn().f[1]++,Nn().s[2]++,Nn().b[1][0]++,!("id"in n)||(Nn().b[1][1]++,!n.id)?(Nn().b[0][0]++,Nn().s[3]++,n.id=WQ(),Nn().s[4]++,n):(Nn().b[0][1]++,Nn().s[5]++,n)}function jIe(n){Nn().f[2]++;const e=(Nn().s[6]++,n.layers.map(t=>{Nn().f[3]++;const r=(Nn().s[7]++,{...t});return Nn().s[8]++,delete r.interactive,Nn().s[9]++,r}));return Nn().s[10]++,{...n,layers:e}}function NIe(n){return Nn().f[4]++,Nn().s[11]++,{...n,layers:Vee(n.layers)}}function GQ(n){return Nn().f[5]++,Nn().s[12]++,jIe(NIe(zIe(n)))}function WIe(n,e){Nn().f[6]++,Nn().s[13]++;for(let t=(Nn().s[14]++,0);t<n.length;t++){if(Nn().s[15]++,n[t].id===e)return Nn().b[2][0]++,Nn().s[16]++,t;Nn().b[2][1]++}return Nn().s[17]++,null}function Sk(n,e,t){Nn().f[7]++,Nn().s[18]++,Nn().b[4][0]++,n==="thunderforest_transport"||(Nn().b[4][1]++,n==="thunderforest_outdoors")?(Nn().b[3][0]++,Nn().s[19]++,n="thunderforest"):Nn().b[3][1]++;const r=(Nn().s[20]++,Nn().b[5][0]++,e.metadata||(Nn().b[5][1]++,{}));let i=(Nn().s[21]++,r[`maputnik:${n}_access_token`]);return Nn().s[22]++,Nn().b[7][0]++,t.allowFallback&&(Nn().b[7][1]++,!i)?(Nn().b[6][0]++,Nn().s[23]++,i=NQ[n]):Nn().b[6][1]++,Nn().s[24]++,i}function GIe(n,e,t=(Nn().b[8][0]++,{})){Nn().f[8]++;const r=(Nn().s[25]++,n.sources[e]);if(Nn().s[26]++,r)Nn().b[9][1]++;else return Nn().b[9][0]++,Nn().s[27]++,n;if(Nn().s[28]++,Nn().b[11][0]++,!("url"in r)||(Nn().b[11][1]++,!r.url))return Nn().b[10][0]++,Nn().s[29]++,n;Nn().b[10][1]++;const i=(Nn().s[30]++,Sk(e,n,t));if(Nn().s[31]++,i)Nn().b[12][1]++;else return Nn().b[12][0]++,Nn().s[32]++,n;const o=(Nn().s[33]++,{...n.sources,[e]:{...r,url:r.url.replace("{key}",i)}}),a=(Nn().s[34]++,{...n,sources:o});return Nn().s[35]++,a}function $Ie(n,e=(Nn().b[13][0]++,{})){Nn().f[9]++;let t=(Nn().s[36]++,n);if(Nn().s[37]++,Object.keys(n.sources).forEach(r=>{Nn().f[10]++,Nn().s[38]++,t=GIe(t,r,e)}),Nn().s[39]++,Nn().b[15][0]++,n.glyphs&&(Nn().b[15][1]++,n.glyphs.match(/\.tilehosting\.com/)||(Nn().b[15][2]++,n.glyphs.match(/\.maptiler\.com/)))){Nn().b[14][0]++;const r=(Nn().s[40]++,Sk("openmaptiles",n,e));Nn().s[41]++,r?(Nn().b[16][0]++,Nn().s[42]++,t={...t,glyphs:n.glyphs.replace("{key}",r)}):Nn().b[16][1]++}else Nn().b[14][1]++;return Nn().s[43]++,t}function QIe(n){Nn().f[11]++;const e=(Nn().s[44]++,{...n.metadata});return Nn().s[45]++,delete e["maputnik:openmaptiles_access_token"],Nn().s[46]++,{...n,metadata:e}}const Ru={ensureStyleValidity:GQ,emptyStyle:RIe,indexOfLayer:WIe,generateId:WQ,getAccessToken:Sk,replaceAccessTokens:$Ie,stripAccessTokens:QIe};function xo(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalExport.tsx",e="4eb3df22bd75301f40b16c30b07d3874390eef1f",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalExport.tsx",statementMap:{0:{start:{line:14,column:28},end:{line:14,column:35}},1:{start:{line:17,column:4},end:{line:21,column:6}},2:{start:{line:24,column:4},end:{line:32,column:5}},3:{start:{line:25,column:6},end:{line:29,column:9}},4:{start:{line:31,column:6},end:{line:31,column:36}},5:{start:{line:35,column:23},end:{line:35,column:44}},6:{start:{line:36,column:22},end:{line:36,column:69}},7:{start:{line:37,column:17},end:{line:61,column:1}},8:{start:{line:62,column:17},end:{line:62,column:70}},9:{start:{line:63,column:23},end:{line:63,column:40}},10:{start:{line:64,column:4},end:{line:64,column:39}},11:{start:{line:67,column:23},end:{line:67,column:44}},12:{start:{line:68,column:17},end:{line:68,column:83}},13:{start:{line:69,column:23},end:{line:69,column:40}},14:{start:{line:70,column:4},end:{line:70,column:39}},15:{start:{line:73,column:25},end:{line:79,column:5}},16:{start:{line:80,column:4},end:{line:80,column:44}},17:{start:{line:83,column:14},end:{line:83,column:26}},18:{start:{line:84,column:16},end:{line:84,column:38}},19:{start:{line:85,column:4},end:{line:140,column:6}},20:{start:{line:143,column:20},end:{line:143,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:19},end:{line:22,column:3}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:23,column:2},end:{line:23,column:3}},loc:{start:{line:23,column:15},end:{line:33,column:3}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:17},end:{line:65,column:3}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:66,column:2},end:{line:66,column:3}},loc:{start:{line:66,column:18},end:{line:71,column:3}},line:66},4:{name:"(anonymous_4)",decl:{start:{line:72,column:2},end:{line:72,column:3}},loc:{start:{line:72,column:42},end:{line:81,column:3}},line:72},5:{name:"(anonymous_5)",decl:{start:{line:82,column:2},end:{line:82,column:3}},loc:{start:{line:82,column:11},end:{line:141,column:3}},line:82}},branchMap:{0:{loc:{start:{line:24,column:4},end:{line:32,column:5}},type:"if",locations:[{start:{line:24,column:4},end:{line:32,column:5}},{start:{line:30,column:11},end:{line:32,column:5}}],line:24},1:{loc:{start:{line:36,column:22},end:{line:36,column:69}},type:"binary-expr",locations:[{start:{line:36,column:22},end:{line:36,column:46}},{start:{line:36,column:50},end:{line:36,column:69}}],line:36},2:{loc:{start:{line:102,column:24},end:{line:102,column:58}},type:"binary-expr",locations:[{start:{line:102,column:24},end:{line:102,column:52}},{start:{line:102,column:56},end:{line:102,column:58}}],line:102},3:{loc:{start:{line:111,column:24},end:{line:111,column:58}},type:"binary-expr",locations:[{start:{line:111,column:24},end:{line:111,column:52}},{start:{line:111,column:56},end:{line:111,column:58}}],line:111}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalExport.tsx"],names:[],mappings:"AAkHQ,cAKA,YALA;AAlHR,OAAO,WAAW;AAClB,OAAO,aAAa;AACpB,SAAQ,cAAa;AACrB,SAAQ,eAAc;AACtB,SAAQ,cAAa;AAErB,SAAQ,sBAAqB;AAC7B,SAA0B,uBAAuB;AAEjD,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,yBAAyB;AAGhC,MAAM,sBAAsB;AAW5B,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAE1E,iBAAkB;AAChB,WAAO;AAAA,MACL,MAAM;AAAA,QACJ,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,MAC/C;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAc;AACZ,QAAG,KAAK,MAAM,SAAS,MAAM;AAC3B,aAAO,QAAQ,KAAK,MAAM,SAAS,MAAM;AAAA,QACvC,aAAa;AAAA,QACb,QAAQ;AAAA,QACR,OAAO;AAAA,MACT,CAAC;AAAA,IACH,OAAO;AACL,aAAO,KAAK,MAAM,SAAS;AAAA,IAC7B;AAAA,EACF;AAAA,EAEA,eAAe;AACb,UAAM,aAAa,KAAK,eAAe;AACvC,UAAM,YAAY,KAAK,MAAM,SAAS,QAAQ,KAAK,MAAM,EAAE,KAAK;AAChE,UAAM,OAAO;AAAA;AAAA;AAAA;AAAA,WAIN,SAAS;AAAA;AAAA,+CAE2B,mBAAmB;AAAA,8CACpB,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAW/C,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQxB,UAAM,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,EAAC,MAAM,0BAAyB,CAAC;AAC/D,UAAM,aAAa,KAAK,WAAW;AACnC,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC;AAAA,EAEA,gBAAgB;AACd,UAAM,aAAa,KAAK,eAAe;AACvC,UAAM,OAAO,IAAI,KAAK,CAAC,UAAU,GAAG,EAAC,MAAM,iCAAgC,CAAC;AAC5E,UAAM,aAAa,KAAK,WAAW;AACnC,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC;AAAA,EAEA,uBAAuB,UAAkB,OAAY;AACnD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,UAAU;AAAA,QACR,GAAG,KAAK,MAAM,SAAS;AAAA,QACvB,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AACA,SAAK,MAAM,eAAe,YAAY;AAAA,EACxC;AAAA,EAGA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,MAAM,oBAAoB,CAAC;AACjC,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,cAAc;AAAA,QACvB,WAAU;AAAA,QAGV,+BAAC,aAAQ,WAAU,0BACjB;AAAA,8BAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,UACzB,oBAAC,OACE,YAAE,yCAAyC,GAC9C;AAAA,UAEA,qBAAC,SACC;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,sBAAsB;AAAA,gBAC1C,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,oCAAoC;AAAA,gBACvF,UAAU,KAAK,uBAAuB,KAAK,MAAM,oCAAoC;AAAA;AAAA,YACvF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,2BAA2B;AAAA,gBAC/C,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,qCAAqC;AAAA,gBACxF,UAAU,KAAK,uBAAuB,KAAK,MAAM,qCAAqC;AAAA;AAAA,YACxF;AAAA,aACF;AAAA,UAEA,qBAAC,SAAI,WAAU,iCACb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS,KAAK,cAAc,KAAK,IAAI;AAAA,gBAErC;AAAA,sCAAC,kBAAe;AAAA,kBACf,EAAE,gBAAgB;AAAA;AAAA;AAAA,YACrB;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS,KAAK,aAAa,KAAK,IAAI;AAAA,gBAEpC;AAAA,sCAAC,kBAAe;AAAA,kBACf,EAAE,eAAe;AAAA;AAAA;AAAA,YACpB;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IAEF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4eb3df22bd75301f40b16c30b07d3874390eef1f"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return xo=function(){return a},a}xo();const bL=(xo().s[0]++,LIe);class YIe extends Mn.Component{tokenizedStyle(){return xo().f[0]++,xo().s[1]++,Hz(Ru.stripAccessTokens(Ru.replaceAccessTokens(this.props.mapStyle)))}exportName(){return xo().f[1]++,xo().s[2]++,this.props.mapStyle.name?(xo().b[0][0]++,xo().s[3]++,DIe(this.props.mapStyle.name,{replacement:"_",remove:/[*\-+~.()'"!:]/g,lower:!0})):(xo().b[0][1]++,xo().s[4]++,this.props.mapStyle.id)}downloadHtml(){xo().f[2]++;const e=(xo().s[5]++,this.tokenizedStyle()),t=(xo().s[6]++,xo().b[1][0]++,this.props.mapStyle.name||(xo().b[1][1]++,this.props.t("Map"))),r=(xo().s[7]++,`<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>${t}</title>
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
  <script src="https://unpkg.com/maplibre-gl@${bL}/dist/maplibre-gl.js"><\/script>
  <link href="https://unpkg.com/maplibre-gl@${bL}/dist/maplibre-gl.css" rel="stylesheet" />
  <style>
    body { margin: 0; padding: 0; }
    #map { position: absolute; top: 0; bottom: 0; width: 100%; }
  </style>
</head>
<body>
  <div id="map"></div>
  <script>
      const map = new maplibregl.Map({
         container: 'map',
         style: ${e},
      });
      map.addControl(new maplibregl.NavigationControl());
  <\/script>
</body>
</html>
`),i=(xo().s[8]++,new Blob([r],{type:"text/html;charset=utf-8"})),o=(xo().s[9]++,this.exportName());xo().s[10]++,_L.saveAs(i,o+".html")}downloadStyle(){xo().f[3]++;const e=(xo().s[11]++,this.tokenizedStyle()),t=(xo().s[12]++,new Blob([e],{type:"application/json;charset=utf-8"})),r=(xo().s[13]++,this.exportName());xo().s[14]++,_L.saveAs(t,r+".json")}changeMetadataProperty(e,t){xo().f[4]++;const r=(xo().s[15]++,{...this.props.mapStyle,metadata:{...this.props.mapStyle.metadata,[e]:t}});xo().s[16]++,this.props.onStyleChanged(r)}render(){xo().f[5]++;const e=(xo().s[17]++,this.props.t),t=(xo().s[18]++,RQ(e));return xo().s[19]++,G.jsx(g0,{"data-wd-key":"modal:export",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Export Style"),className:"maputnik-export-modal",children:G.jsxs("section",{className:"maputnik-modal-section",children:[G.jsx("h1",{children:e("Download Style")}),G.jsx("p",{children:e("Download a JSON style to your computer.")}),G.jsxs("div",{children:[G.jsx(Fm,{label:t.maputnik.maptiler_access_token.label,fieldSpec:t.maputnik.maptiler_access_token,value:(xo().b[2][0]++,this.props.mapStyle.metadata||(xo().b[2][1]++,{}))["maputnik:openmaptiles_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:openmaptiles_access_token")}),G.jsx(Fm,{label:t.maputnik.thunderforest_access_token.label,fieldSpec:t.maputnik.thunderforest_access_token,value:(xo().b[3][0]++,this.props.mapStyle.metadata||(xo().b[3][1]++,{}))["maputnik:thunderforest_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:thunderforest_access_token")})]}),G.jsxs("div",{className:"maputnik-modal-export-buttons",children:[G.jsxs(is,{onClick:this.downloadStyle.bind(this),children:[G.jsx(cO,{}),e("Download Style")]}),G.jsxs(is,{onClick:this.downloadHtml.bind(this),children:[G.jsx(cO,{}),e("Download HTML")]})]})]})})}}const qIe=(xo().s[20]++,No()(YIe));function S5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",e="950dd35e62562a3439b74678b95f406e749c6958",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:139}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx"],names:[],mappings:"AAWM;AAXN,OAAO,WAAW;AAClB,OAAO,uBAA2E;AAClF,OAAO,cAAc;AAMrB,qBAAqB,0BAA0B,MAAM,UAAkC;AAAA,EACrF,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OACjC,8BAAC,qBAAmB,GAAG,KAAK,OAAO,GACrC;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"950dd35e62562a3439b74678b95f406e749c6958"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return S5=function(){return a},a}S5();class $Q extends Mn.Component{render(){return S5().f[0]++,S5().s[0]++,G.jsx(Sb,{label:this.props.label,children:G.jsx(EQ,{...this.props})})}}function E5(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",e="a27c35e986d22656fa80c276efb67df518853ac2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:132}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx"],names:[],mappings:"AAaM;AAbN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,mBAAyC;AAQhD,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAC9B,8BAAC,iBAAe,GAAG,KAAK,OAAO,GACjC;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a27c35e986d22656fa80c276efb67df518853ac2"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return E5=function(){return a},a}E5();class VIe extends Mn.Component{render(){return E5().f[0]++,E5().s[0]++,G.jsx(la,{label:this.props.label,children:G.jsx(_k,{...this.props})})}}function Dn(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalSourcesTypeEditor.tsx",e="c3514fc0a8673e5905dc8e28539523e62bed5902",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalSourcesTypeEditor.tsx",statementMap:{0:{start:{line:15,column:14},end:{line:15,column:26}},1:{start:{line:16,column:4},end:{line:30,column:9}},2:{start:{line:23,column:29},end:{line:26,column:12}},3:{start:{line:35,column:4},end:{line:38,column:7}},4:{start:{line:41,column:18},end:{line:41,column:47}},5:{start:{line:42,column:4},end:{line:51,column:6}},6:{start:{line:54,column:14},end:{line:54,column:26}},7:{start:{line:55,column:4},end:{line:82,column:9}},8:{start:{line:63,column:33},end:{line:66,column:12}},9:{start:{line:75,column:33},end:{line:78,column:12}},10:{start:{line:85,column:27},end:{line:90,column:1}},11:{start:{line:85,column:34},end:{line:90,column:1}},12:{start:{line:93,column:14},end:{line:93,column:26}},13:{start:{line:94,column:24},end:{line:101,column:5}},14:{start:{line:95,column:26},end:{line:95,column:64}},15:{start:{line:96,column:6},end:{line:96,column:29}},16:{start:{line:97,column:6},end:{line:100,column:9}},17:{start:{line:102,column:4},end:{line:129,column:9}},18:{start:{line:109,column:29},end:{line:112,column:12}},19:{start:{line:116,column:8},end:{line:127,column:10}},20:{start:{line:124,column:31},end:{line:124,column:52}},21:{start:{line:134,column:14},end:{line:134,column:26}},22:{start:{line:135,column:24},end:{line:142,column:5}},23:{start:{line:136,column:26},end:{line:136,column:64}},24:{start:{line:137,column:6},end:{line:137,column:29}},25:{start:{line:138,column:6},end:{line:141,column:9}},26:{start:{line:143,column:23},end:{line:148,column:5}},27:{start:{line:144,column:6},end:{line:147,column:9}},28:{start:{line:149,column:4},end:{line:175,column:9}},29:{start:{line:162,column:8},end:{line:173,column:10}},30:{start:{line:170,column:31},end:{line:170,column:52}},31:{start:{line:180,column:14},end:{line:180,column:26}},32:{start:{line:181,column:4},end:{line:192,column:6}},33:{start:{line:187,column:28},end:{line:190,column:10}},34:{start:{line:197,column:14},end:{line:197,column:26}},35:{start:{line:198,column:4},end:{line:230,column:9}},36:{start:{line:210,column:12},end:{line:213,column:15}},37:{start:{line:223,column:12},end:{line:226,column:15}},38:{start:{line:235,column:14},end:{line:235,column:26}},39:{start:{line:236,column:24},end:{line:242,column:5}},40:{start:{line:243,column:4},end:{line:278,column:5}},41:{start:{line:245,column:8},end:{line:245,column:79}},42:{start:{line:247,column:8},end:{line:247,column:85}},43:{start:{line:249,column:8},end:{line:249,column:77}},44:{start:{line:251,column:8},end:{line:251,column:76}},45:{start:{line:253,column:8},end:{line:253,column:77}},46:{start:{line:255,column:8},end:{line:255,column:76}},47:{start:{line:257,column:8},end:{line:257,column:77}},48:{start:{line:259,column:8},end:{line:271,column:13}},49:{start:{line:265,column:36},end:{line:268,column:14}},50:{start:{line:273,column:8},end:{line:273,column:74}},51:{start:{line:275,column:8},end:{line:275,column:74}},52:{start:{line:277,column:8},end:{line:277,column:20}},53:{start:{line:281,column:31},end:{line:281,column:80}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:11},end:{line:31,column:3}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:23,column:20},end:{line:23,column:21}},loc:{start:{line:23,column:29},end:{line:26,column:12}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:24},end:{line:39,column:3}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:19},end:{line:52,column:3}},line:40},4:{name:"(anonymous_4)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:83,column:3}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:63,column:20},end:{line:63,column:21}},loc:{start:{line:63,column:33},end:{line:66,column:12}},line:63},6:{name:"(anonymous_6)",decl:{start:{line:75,column:20},end:{line:75,column:21}},loc:{start:{line:75,column:33},end:{line:78,column:12}},line:75},7:{name:"(anonymous_7)",decl:{start:{line:85,column:27},end:{line:85,column:28}},loc:{start:{line:85,column:34},end:{line:90,column:1}},line:85},8:{name:"(anonymous_8)",decl:{start:{line:92,column:2},end:{line:92,column:3}},loc:{start:{line:92,column:11},end:{line:130,column:3}},line:92},9:{name:"(anonymous_9)",decl:{start:{line:94,column:24},end:{line:94,column:25}},loc:{start:{line:94,column:38},end:{line:101,column:5}},line:94},10:{name:"(anonymous_10)",decl:{start:{line:109,column:20},end:{line:109,column:21}},loc:{start:{line:109,column:29},end:{line:112,column:12}},line:109},11:{name:"(anonymous_11)",decl:{start:{line:115,column:32},end:{line:115,column:33}},loc:{start:{line:115,column:57},end:{line:128,column:7}},line:115},12:{name:"(anonymous_12)",decl:{start:{line:124,column:22},end:{line:124,column:23}},loc:{start:{line:124,column:31},end:{line:124,column:52}},line:124},13:{name:"(anonymous_13)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:11},end:{line:176,column:3}},line:133},14:{name:"(anonymous_14)",decl:{start:{line:135,column:24},end:{line:135,column:25}},loc:{start:{line:135,column:38},end:{line:142,column:5}},line:135},15:{name:"(anonymous_15)",decl:{start:{line:143,column:23},end:{line:143,column:24}},loc:{start:{line:143,column:33},end:{line:148,column:5}},line:143},16:{name:"(anonymous_16)",decl:{start:{line:161,column:32},end:{line:161,column:33}},loc:{start:{line:161,column:57},end:{line:174,column:7}},line:161},17:{name:"(anonymous_17)",decl:{start:{line:170,column:22},end:{line:170,column:23}},loc:{start:{line:170,column:31},end:{line:170,column:52}},line:170},18:{name:"(anonymous_18)",decl:{start:{line:179,column:2},end:{line:179,column:3}},loc:{start:{line:179,column:11},end:{line:193,column:3}},line:179},19:{name:"(anonymous_19)",decl:{start:{line:187,column:18},end:{line:187,column:19}},loc:{start:{line:187,column:28},end:{line:190,column:10}},line:187},20:{name:"(anonymous_20)",decl:{start:{line:196,column:2},end:{line:196,column:3}},loc:{start:{line:196,column:11},end:{line:231,column:3}},line:196},21:{name:"(anonymous_21)",decl:{start:{line:209,column:20},end:{line:209,column:21}},loc:{start:{line:209,column:30},end:{line:214,column:11}},line:209},22:{name:"(anonymous_22)",decl:{start:{line:222,column:20},end:{line:222,column:21}},loc:{start:{line:222,column:33},end:{line:227,column:11}},line:222},23:{name:"(anonymous_23)",decl:{start:{line:234,column:2},end:{line:234,column:3}},loc:{start:{line:234,column:11},end:{line:279,column:3}},line:234},24:{name:"(anonymous_24)",decl:{start:{line:265,column:22},end:{line:265,column:23}},loc:{start:{line:265,column:36},end:{line:268,column:14}},line:265}},branchMap:{0:{loc:{start:{line:41,column:18},end:{line:41,column:47}},type:"binary-expr",locations:[{start:{line:41,column:18},end:{line:41,column:41}},{start:{line:41,column:45},end:{line:41,column:47}}],line:41},1:{loc:{start:{line:62,column:17},end:{line:62,column:47}},type:"binary-expr",locations:[{start:{line:62,column:17},end:{line:62,column:42}},{start:{line:62,column:46},end:{line:62,column:47}}],line:62},2:{loc:{start:{line:74,column:17},end:{line:74,column:48}},type:"binary-expr",locations:[{start:{line:74,column:17},end:{line:74,column:42}},{start:{line:74,column:46},end:{line:74,column:48}}],line:74},3:{loc:{start:{line:243,column:4},end:{line:278,column:5}},type:"switch",locations:[{start:{line:244,column:6},end:{line:245,column:79}},{start:{line:246,column:6},end:{line:247,column:85}},{start:{line:248,column:6},end:{line:249,column:77}},{start:{line:250,column:6},end:{line:251,column:76}},{start:{line:252,column:6},end:{line:253,column:77}},{start:{line:254,column:6},end:{line:255,column:76}},{start:{line:256,column:6},end:{line:257,column:77}},{start:{line:258,column:6},end:{line:271,column:13}},{start:{line:272,column:6},end:{line:273,column:74}},{start:{line:274,column:6},end:{line:275,column:74}},{start:{line:276,column:6},end:{line:277,column:20}}],line:243},4:{loc:{start:{line:269,column:19},end:{line:269,column:90}},type:"binary-expr",locations:[{start:{line:269,column:19},end:{line:269,column:45}},{start:{line:269,column:49},end:{line:269,column:90}}],line:269}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0,0,0,0,0,0,0,0,0,0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalSourcesTypeEditor.tsx"],names:[],mappings:"AA2BW,SACL,KADK;AA3BX,OAAO,WAAW;AAClB,SAAQ,cAAa;AACrB,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,uBAAuB;AAC9B,OAAO,gBAAgB;AACvB,OAAO,eAAe;AACtB,OAAO,mBAAmB;AAC1B,SAA0B,uBAAuB;AAcjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,cAAc;AAAA,UACvB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,UAAU,SAAO,KAAK,MAAM,SAAS;AAAA,YACnC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EACF;AACF;AAYA,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAC1E,eAAe,OAAiB;AAC9B,SAAK,MAAM,SAAS;AAAA,MAClB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB;AACf,UAAM,QAAQ,KAAK,MAAM,OAAO,SAAS,CAAC;AAC1C,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,KAAK,MAAM,EAAE,UAAU;AAAA,QAC9B,WAAW,OAAO,cAAc;AAAA,QAChC,MAAK;AAAA,QACL,OAAO;AAAA,QACP,UAAU,KAAK,eAAe,KAAK,IAAI;AAAA;AAAA,IACzC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACL;AAAA,WAAK,eAAe;AAAA,MACrB;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,UAAU;AAAA,UACnB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO,WAAW;AAAA,UACpC,UAAU,aAAW,KAAK,MAAM,SAAS;AAAA,YACvC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,UAAU;AAAA,UACnB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO,WAAW;AAAA,UACpC,UAAU,aAAW,KAAK,MAAM,SAAS;AAAA,YACvC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EAEF;AACF;AAEA,MAAM,qBAAyE,CAAC,MAAO;AAAA,EACrF,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,WAAW;AAAA,EAC9C,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,YAAY;AAAA,EAChD,EAAE,OAAO,EAAE,oBAAoB,GAAG,KAAK,eAAe;AAAA,EACtD,EAAE,OAAO,EAAE,mBAAmB,GAAG,KAAK,cAAc;AACtD;AAUA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,cAAc,CAAC,KAAa,QAA0B;AAC1D,YAAM,cAAc,KAAK,MAAM,OAAO,YAAY,MAAM,CAAC;AACzD,kBAAY,GAAG,IAAI;AAEnB,WAAK,MAAM,SAAS;AAAA,QAClB,GAAG,KAAK,MAAM;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,WAAW;AAAA,UACpB,WAAW,OAAO,aAAa;AAAA,UAC/B,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,UAAU,SAAO,KAAK,MAAM,SAAS;AAAA,YACnC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACC,mBAAmB,CAAC,EAAE,IAAI,CAAC,EAAC,OAAO,IAAG,GAAG,QAAQ;AAChD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YAEA,QAAQ;AAAA,YACR,MAAK;AAAA,YACL,OAAO,KAAK,MAAM,OAAO,YAAY,GAAG;AAAA,YACxC,SAAS,CAAC,GAAG,CAAC;AAAA,YACd,UAAU,CAAC,QAA0B,YAAY,KAAK,GAAG;AAAA;AAAA,UALpD;AAAA,QAMP;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,EACF;AACF;AAUA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,cAAc,CAAC,KAAa,QAA0B;AAC1D,YAAM,cAAc,KAAK,MAAM,OAAO,YAAY,MAAM,CAAC;AACzD,kBAAY,GAAG,IAAI;AAEnB,WAAK,MAAM,SAAS;AAAA,QAClB,GAAG,KAAK,MAAM;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH;AAEA,UAAM,aAAa,CAAC,SAAmB;AACrC,WAAK,MAAM,SAAS;AAAA,QAClB,GAAG,KAAK,MAAM;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,WAAW;AAAA,UACpB,WAAW,OAAO,aAAa;AAAA,UAC/B,MAAK;AAAA,UACL,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,SAAS,CAAC;AAAA,UACV,UAAU;AAAA;AAAA,MACZ;AAAA,MACC,mBAAmB,CAAC,EAAE,IAAI,CAAC,EAAC,OAAO,IAAG,GAAG,QAAQ;AAChD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YAEA,QAAQ;AAAA,YACR,MAAK;AAAA,YACL,OAAO,KAAK,MAAM,OAAO,YAAY,GAAG;AAAA,YACxC,SAAS,CAAC,GAAG,CAAC;AAAA,YACd,UAAU,CAAC,QAA0B,YAAY,KAAK,GAAG;AAAA;AAAA,UALpD;AAAA,QAMP;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,EACF;AACF;AASA,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,aAAa;AAAA,QACtB,WAAW,OAAO,eAAe;AAAA,QACjC,OAAO,KAAK,MAAM,OAAO;AAAA,QACzB,UAAU,UAAQ,KAAK,MAAM,SAAS;AAAA,UACpC,GAAG,KAAK,MAAM;AAAA,UACd;AAAA,QACF,CAAC;AAAA;AAAA,IACH;AAAA,EACF;AACF;AAUA,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACN;AAAA,0BAAC,SAAM,OAAO,EAAE,SAAS,GAAG,WAAW,OAAO,eAAe,MAC3D;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,WAAW;AAAA,UACX,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,MAAM;AAAA,UACR;AAAA,UACA,MAAM;AAAA,UACN,UAAU,UAAQ;AAChB,iBAAK,MAAM,SAAS;AAAA,cAClB,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,UACH;AAAA;AAAA,MACF,GACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,SAAS;AAAA,UAClB,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,UAAU,aAAW;AACnB,iBAAK,MAAM,SAAS;AAAA,cAClB,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,UACH;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EACF;AACF;AAQA,MAAM,uCAAuC,MAAM,UAA+C;AAAA,EAChG,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,cAAc;AAAA,MAClB,QAAQ,KAAK,MAAM;AAAA,MACnB,UAAU,KAAK,MAAM;AAAA,MACrB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM,KAAK,MAAM;AAAA,MACjB,QAAQ,KAAK,MAAM;AAAA,IACrB;AACA,YAAO,KAAK,MAAM,MAAM;AAAA,MACxB,KAAK;AAAe,eAAO,oBAAC,0BAAwB,GAAG,aAAa;AAAA,MACpE,KAAK;AAAgB,eAAO,oBAAC,gCAA8B,GAAG,aAAa;AAAA,MAC3E,KAAK;AAAmB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MACtE,KAAK;AAAkB,eAAO,oBAAC,uBAAqB,GAAG,aAAa;AAAA,MACpE,KAAK;AAAmB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MACtE,KAAK;AAAkB,eAAO,oBAAC,uBAAqB,GAAG,aAAa;AAAA,MACpE,KAAK;AAAuB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MAC1E,KAAK;AAAsB,eAAO,oBAAC,uBAAqB,GAAG,aACzD;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YACnB,WAAW,OAAO,kBAAkB;AAAA,YACpC,SAAS,OAAO,KAAK,OAAO,kBAAkB,SAAS,MAAM;AAAA,YAC7D,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,cACxC,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,YACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,kBAAkB,SAAS;AAAA;AAAA,QACzE,GACF;AAAA,MACA,KAAK;AAAS,eAAO,oBAAC,qBAAmB,GAAG,aAAa;AAAA,MACzD,KAAK;AAAS,eAAO,oBAAC,qBAAmB,GAAG,aAAa;AAAA,MACzD;AAAS,eAAO;AAAA,IAChB;AAAA,EACF;AACF;AAEA,MAAM,yBAAyB,gBAAgB,EAAE,8BAA8B;AAC/E,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c3514fc0a8673e5905dc8e28539523e62bed5902"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Dn=function(){return a},a}Dn();class LE extends Mn.Component{render(){Dn().f[0]++;const e=(Dn().s[0]++,this.props.t);return Dn().s[1]++,G.jsxs("div",{children:[G.jsx(Eb,{label:e("TileJSON URL"),fieldSpec:Ea.source_vector.url,value:this.props.source.url,onChange:t=>(Dn().f[1]++,Dn().s[2]++,this.props.onChange({...this.props.source,url:t}))}),this.props.children]})}}class FE extends Mn.Component{changeTileUrls(e){Dn().f[2]++,Dn().s[3]++,this.props.onChange({...this.props.source,tiles:e})}renderTileUrls(){Dn().f[3]++;const e=(Dn().s[4]++,Dn().b[0][0]++,this.props.source.tiles||(Dn().b[0][1]++,[]));return Dn().s[5]++,G.jsx($Q,{label:this.props.t("Tile URL"),fieldSpec:Ea.source_vector.tiles,type:"url",value:e,onChange:this.changeTileUrls.bind(this)})}render(){Dn().f[4]++;const e=(Dn().s[6]++,this.props.t);return Dn().s[7]++,G.jsxs("div",{children:[this.renderTileUrls(),G.jsx(Tp,{label:e("Min Zoom"),fieldSpec:Ea.source_vector.minzoom,value:(Dn().b[1][0]++,this.props.source.minzoom||(Dn().b[1][1]++,0)),onChange:t=>(Dn().f[5]++,Dn().s[8]++,this.props.onChange({...this.props.source,minzoom:t}))}),G.jsx(Tp,{label:e("Max Zoom"),fieldSpec:Ea.source_vector.maxzoom,value:(Dn().b[2][0]++,this.props.source.maxzoom||(Dn().b[2][1]++,22)),onChange:t=>(Dn().f[6]++,Dn().s[9]++,this.props.onChange({...this.props.source,maxzoom:t}))}),this.props.children]})}}Dn().s[10]++;const QQ=n=>(Dn().f[7]++,Dn().s[11]++,[{label:n("Coord top left"),key:"top left"},{label:n("Coord top right"),key:"top right"},{label:n("Coord bottom right"),key:"bottom right"},{label:n("Coord bottom left"),key:"bottom left"}]);class HIe extends Mn.Component{render(){Dn().f[8]++;const e=(Dn().s[12]++,this.props.t);Dn().s[13]++;const t=(r,i)=>{Dn().f[9]++;const o=(Dn().s[14]++,this.props.source.coordinates.slice(0));Dn().s[15]++,o[r]=i,Dn().s[16]++,this.props.onChange({...this.props.source,coordinates:o})};return Dn().s[17]++,G.jsxs("div",{children:[G.jsx(Eb,{label:e("Image URL"),fieldSpec:Ea.source_image.url,value:this.props.source.url,onChange:r=>(Dn().f[10]++,Dn().s[18]++,this.props.onChange({...this.props.source,url:r}))}),QQ(e).map(({label:r,key:i},o)=>(Dn().f[11]++,Dn().s[19]++,G.jsx(v5,{label:r,length:2,type:"number",value:this.props.source.coordinates[o],default:[0,0],onChange:a=>(Dn().f[12]++,Dn().s[20]++,t(o,a))},i)))]})}}class ZIe extends Mn.Component{render(){Dn().f[13]++;const e=(Dn().s[21]++,this.props.t);Dn().s[22]++;const t=(i,o)=>{Dn().f[14]++;const a=(Dn().s[23]++,this.props.source.coordinates.slice(0));Dn().s[24]++,a[i]=o,Dn().s[25]++,this.props.onChange({...this.props.source,coordinates:a})};Dn().s[26]++;const r=i=>{Dn().f[15]++,Dn().s[27]++,this.props.onChange({...this.props.source,urls:i})};return Dn().s[28]++,G.jsxs("div",{children:[G.jsx($Q,{label:e("Video URL"),fieldSpec:Ea.source_video.urls,type:"string",value:this.props.source.urls,default:[],onChange:r}),QQ(e).map(({label:i,key:o},a)=>(Dn().f[16]++,Dn().s[29]++,G.jsx(v5,{label:i,length:2,type:"number",value:this.props.source.coordinates[a],default:[0,0],onChange:s=>(Dn().f[17]++,Dn().s[30]++,t(a,s))},o)))]})}}class XIe extends Mn.Component{render(){Dn().f[18]++;const e=(Dn().s[31]++,this.props.t);return Dn().s[32]++,G.jsx(Eb,{label:e("GeoJSON URL"),fieldSpec:Ea.source_geojson.data,value:this.props.source.data,onChange:t=>(Dn().f[19]++,Dn().s[33]++,this.props.onChange({...this.props.source,data:t}))})}}class JIe extends Mn.Component{render(){Dn().f[20]++;const e=(Dn().s[34]++,this.props.t);return Dn().s[35]++,G.jsxs("div",{children:[G.jsx(la,{label:e("GeoJSON"),fieldSpec:Ea.source_geojson.data,children:G.jsx(NI,{layer:this.props.source.data,maxHeight:200,mode:{name:"javascript",json:!0},lint:!0,onChange:t=>{Dn().f[21]++,Dn().s[36]++,this.props.onChange({...this.props.source,data:t})}})}),G.jsx(VIe,{label:e("Cluster"),value:this.props.source.cluster,onChange:t=>{Dn().f[22]++,Dn().s[37]++,this.props.onChange({...this.props.source,cluster:t})}})]})}}class eke extends Mn.Component{render(){Dn().f[23]++;const e=(Dn().s[38]++,this.props.t),t=(Dn().s[39]++,{source:this.props.source,onChange:this.props.onChange,t:this.props.t,i18n:this.props.i18n,tReady:this.props.tReady});switch(Dn().s[40]++,this.props.mode){case"geojson_url":return Dn().b[3][0]++,Dn().s[41]++,G.jsx(XIe,{...t});case"geojson_json":return Dn().b[3][1]++,Dn().s[42]++,G.jsx(JIe,{...t});case"tilejson_vector":return Dn().b[3][2]++,Dn().s[43]++,G.jsx(LE,{...t});case"tilexyz_vector":return Dn().b[3][3]++,Dn().s[44]++,G.jsx(FE,{...t});case"tilejson_raster":return Dn().b[3][4]++,Dn().s[45]++,G.jsx(LE,{...t});case"tilexyz_raster":return Dn().b[3][5]++,Dn().s[46]++,G.jsx(FE,{...t});case"tilejson_raster-dem":return Dn().b[3][6]++,Dn().s[47]++,G.jsx(LE,{...t});case"tilexyz_raster-dem":return Dn().b[3][7]++,Dn().s[48]++,G.jsx(FE,{...t,children:G.jsx(Mk,{label:e("Encoding"),fieldSpec:Ea.source_raster_dem.encoding,options:Object.keys(Ea.source_raster_dem.encoding.values),onChange:r=>(Dn().f[24]++,Dn().s[49]++,this.props.onChange({...this.props.source,encoding:r})),value:(Dn().b[4][0]++,this.props.source.encoding||(Dn().b[4][1]++,Ea.source_raster_dem.encoding.default))})});case"image":return Dn().b[3][8]++,Dn().s[50]++,G.jsx(HIe,{...t});case"video":return Dn().b[3][9]++,Dn().s[51]++,G.jsx(ZIe,{...t});default:return Dn().b[3][10]++,Dn().s[52]++,null}}}const YQ=(Dn().s[53]++,No()(eke));function kh(){var n="/home/runner/work/maputnik/maputnik/src/libs/source.ts",e="315b9927ffd3b5bf51669bb9e53779783a451930",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/source.ts",statementMap:{0:{start:{line:2,column:27},end:{line:2,column:50}},1:{start:{line:3,column:2},end:{line:3,column:36}},2:{start:{line:4,column:2},end:{line:7,column:4}},3:{start:{line:10,column:2},end:{line:10,column:50}},4:{start:{line:13,column:25},end:{line:16,column:3}},5:{start:{line:17,column:2},end:{line:20,column:4}}},fnMap:{0:{name:"deleteSource",decl:{start:{line:1,column:16},end:{line:1,column:28}},loc:{start:{line:1,column:49},end:{line:8,column:1}},line:1},1:{name:"addSource",decl:{start:{line:9,column:16},end:{line:9,column:25}},loc:{start:{line:9,column:54},end:{line:11,column:1}},line:9},2:{name:"changeSource",decl:{start:{line:12,column:16},end:{line:12,column:28}},loc:{start:{line:12,column:57},end:{line:21,column:1}},line:12}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/source.ts"],names:[],mappings:"AAEO,gBAAS,aAAa,UAA8B,UAAkB;AAC3E,QAAM,mBAAmB,EAAE,GAAG,SAAS,QAAO;AAC9C,SAAO,iBAAiB,QAAQ;AAChC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACF;AAGO,gBAAS,UAAU,UAA8B,UAAkB,QAA6B;AACrG,SAAO,aAAa,UAAU,UAAU,MAAM;AAChD;AAEO,gBAAS,aAAa,UAA8B,UAAkB,QAA6B;AACxG,QAAM,iBAAiB;AAAA,IACrB,GAAG,SAAS;AAAA,IACZ,CAAC,QAAQ,GAAG;AAAA,EACd;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"315b9927ffd3b5bf51669bb9e53779783a451930"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return kh=function(){return a},a}kh();function tke(n,e){kh().f[0]++;const t=(kh().s[0]++,{...n.sources});return kh().s[1]++,delete t[e],kh().s[2]++,{...n,sources:t}}function xL(n,e,t){return kh().f[1]++,kh().s[3]++,qQ(n,e,t)}function qQ(n,e,t){kh().f[2]++;const r=(kh().s[4]++,{...n.sources,[e]:t});return kh().s[5]++,{...n,sources:r}}const nke={type:"vector",url:"https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key={key}",title:"OpenMapTiles v3"},rke={type:"vector",url:"https://tile.thunderforest.com/thunderforest.transport-v2.json?apikey={key}",title:"Thunderforest Transport v2"},ike={type:"vector",url:"https://tile.thunderforest.com/thunderforest.outdoors-v2.json?apikey={key}",title:"Thunderforest Outdoors v2"},oke={type:"vector",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/v2/data/vector/open-zoomstack/config.json",title:"OS Open Zoomstack v2"},wL={openmaptiles:nke,thunderforest_transport:rke,thunderforest_outdoors:ike,open_zoomstack:oke};function Vt(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalSources.tsx",e="15c540d7ac1d0046e843ce3c1d87b0e6c6ae74b6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalSources.tsx",statementMap:{0:{start:{line:16,column:4},end:{line:33,column:9}},1:{start:{line:20,column:23},end:{line:20,column:57}},2:{start:{line:37,column:2},end:{line:41,column:3}},3:{start:{line:38,column:4},end:{line:39,column:30}},4:{start:{line:39,column:6},end:{line:39,column:30}},5:{start:{line:40,column:4},end:{line:40,column:29}},6:{start:{line:42,column:2},end:{line:46,column:3}},7:{start:{line:43,column:4},end:{line:44,column:34}},8:{start:{line:44,column:6},end:{line:44,column:34}},9:{start:{line:45,column:4},end:{line:45,column:33}},10:{start:{line:47,column:2},end:{line:51,column:3}},11:{start:{line:48,column:4},end:{line:49,column:30}},12:{start:{line:49,column:6},end:{line:49,column:30}},13:{start:{line:50,column:4},end:{line:50,column:29}},14:{start:{line:52,column:2},end:{line:58,column:3}},15:{start:{line:53,column:4},end:{line:57,column:5}},16:{start:{line:54,column:6},end:{line:54,column:27}},17:{start:{line:56,column:6},end:{line:56,column:28}},18:{start:{line:59,column:2},end:{line:61,column:3}},19:{start:{line:60,column:4},end:{line:60,column:19}},20:{start:{line:62,column:2},end:{line:64,column:3}},21:{start:{line:63,column:4},end:{line:63,column:19}},22:{start:{line:65,column:2},end:{line:65,column:14}},23:{start:{line:69,column:14},end:{line:69,column:26}},24:{start:{line:70,column:4},end:{line:96,column:9}},25:{start:{line:82,column:27},end:{line:82,column:67}},26:{start:{line:101,column:4},end:{line:101,column:17}},27:{start:{line:102,column:4},end:{line:106,column:6}},28:{start:{line:109,column:19},end:{line:109,column:50}},29:{start:{line:110,column:25},end:{line:110,column:40}},30:{start:{line:111,column:4},end:{line:185,column:5}},31:{start:{line:113,column:8},end:{line:116,column:10}},32:{start:{line:118,column:8},end:{line:122,column:10}},33:{start:{line:124,column:8},end:{line:127,column:10}},34:{start:{line:129,column:8},end:{line:134,column:10}},35:{start:{line:136,column:8},end:{line:139,column:10}},36:{start:{line:141,column:8},end:{line:146,column:10}},37:{start:{line:148,column:8},end:{line:151,column:10}},38:{start:{line:153,column:8},end:{line:158,column:10}},39:{start:{line:160,column:8},end:{line:169,column:10}},40:{start:{line:171,column:8},end:{line:182,column:10}},41:{start:{line:184,column:8},end:{line:184,column:18}},42:{start:{line:187,column:10},end:{line:190,column:3}},43:{start:{line:188,column:33},end:{line:188,column:43}},44:{start:{line:189,column:4},end:{line:189,column:39}},45:{start:{line:191,column:19},end:{line:193,column:3}},46:{start:{line:192,column:4},end:{line:192,column:30}},47:{start:{line:195,column:14},end:{line:195,column:26}},48:{start:{line:196,column:32},end:{line:198,column:5}},49:{start:{line:199,column:4},end:{line:246,column:9}},50:{start:{line:206,column:27},end:{line:206,column:57}},51:{start:{line:226,column:30},end:{line:226,column:87}},52:{start:{line:251,column:27},end:{line:251,column:40}},53:{start:{line:252,column:4},end:{line:252,column:35}},54:{start:{line:253,column:4},end:{line:253,column:26}},55:{start:{line:256,column:28},end:{line:256,column:38}},56:{start:{line:257,column:22},end:{line:257,column:77}},57:{start:{line:258,column:26},end:{line:271,column:6}},58:{start:{line:259,column:21},end:{line:259,column:47}},59:{start:{line:260,column:6},end:{line:270,column:8}},60:{start:{line:265,column:29},end:{line:265,column:93}},61:{start:{line:266,column:26},end:{line:266,column:85}},62:{start:{line:272,column:27},end:{line:284,column:6}},63:{start:{line:272,column:75},end:{line:272,column:106}},64:{start:{line:273,column:21},end:{line:273,column:44}},65:{start:{line:274,column:6},end:{line:283,column:8}},66:{start:{line:280,column:26},end:{line:280,column:107}},67:{start:{line:285,column:4},end:{line:315,column:6}},68:{start:{line:308,column:45},end:{line:308,column:109}},69:{start:{line:318,column:21},end:{line:318,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:11},end:{line:34,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:20,column:17},end:{line:20,column:18}},loc:{start:{line:20,column:23},end:{line:20,column:57}},line:20},2:{name:"editorMode",decl:{start:{line:36,column:9},end:{line:36,column:19}},loc:{start:{line:36,column:28},end:{line:66,column:1}},line:36},3:{name:"(anonymous_3)",decl:{start:{line:68,column:2},end:{line:68,column:3}},loc:{start:{line:68,column:11},end:{line:97,column:3}},line:68},4:{name:"(anonymous_4)",decl:{start:{line:82,column:21},end:{line:82,column:22}},loc:{start:{line:82,column:27},end:{line:82,column:67}},line:82},5:{name:"(anonymous_5)",decl:{start:{line:100,column:2},end:{line:100,column:3}},loc:{start:{line:100,column:21},end:{line:107,column:3}},line:100},6:{name:"(anonymous_6)",decl:{start:{line:108,column:2},end:{line:108,column:3}},loc:{start:{line:108,column:22},end:{line:186,column:3}},line:108},7:{name:"(anonymous_7)",decl:{start:{line:187,column:10},end:{line:187,column:11}},loc:{start:{line:187,column:16},end:{line:190,column:3}},line:187},8:{name:"(anonymous_8)",decl:{start:{line:191,column:19},end:{line:191,column:20}},loc:{start:{line:191,column:31},end:{line:193,column:3}},line:191},9:{name:"(anonymous_9)",decl:{start:{line:194,column:2},end:{line:194,column:3}},loc:{start:{line:194,column:11},end:{line:247,column:3}},line:194},10:{name:"(anonymous_10)",decl:{start:{line:206,column:20},end:{line:206,column:21}},loc:{start:{line:206,column:27},end:{line:206,column:57}},line:206},11:{name:"(anonymous_11)",decl:{start:{line:226,column:20},end:{line:226,column:21}},loc:{start:{line:226,column:30},end:{line:226,column:87}},line:226},12:{name:"(anonymous_12)",decl:{start:{line:250,column:2},end:{line:250,column:3}},loc:{start:{line:250,column:21},end:{line:254,column:3}},line:250},13:{name:"(anonymous_13)",decl:{start:{line:255,column:2},end:{line:255,column:3}},loc:{start:{line:255,column:11},end:{line:316,column:3}},line:255},14:{name:"(anonymous_14)",decl:{start:{line:258,column:60},end:{line:258,column:61}},loc:{start:{line:258,column:74},end:{line:271,column:5}},line:258},15:{name:"(anonymous_15)",decl:{start:{line:265,column:20},end:{line:265,column:21}},loc:{start:{line:265,column:29},end:{line:265,column:93}},line:265},16:{name:"(anonymous_16)",decl:{start:{line:266,column:20},end:{line:266,column:21}},loc:{start:{line:266,column:26},end:{line:266,column:85}},line:266},17:{name:"(anonymous_17)",decl:{start:{line:272,column:61},end:{line:272,column:62}},loc:{start:{line:272,column:75},end:{line:272,column:106}},line:272},18:{name:"(anonymous_18)",decl:{start:{line:272,column:112},end:{line:272,column:113}},loc:{start:{line:272,column:126},end:{line:284,column:5}},line:272},19:{name:"(anonymous_19)",decl:{start:{line:280,column:20},end:{line:280,column:21}},loc:{start:{line:280,column:26},end:{line:280,column:107}},line:280},20:{name:"(anonymous_20)",decl:{start:{line:308,column:23},end:{line:308,column:24}},loc:{start:{line:308,column:45},end:{line:308,column:109}},line:308}},branchMap:{0:{loc:{start:{line:37,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:37,column:2},end:{line:41,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},1:{loc:{start:{line:38,column:4},end:{line:39,column:30}},type:"if",locations:[{start:{line:38,column:4},end:{line:39,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},2:{loc:{start:{line:42,column:2},end:{line:46,column:3}},type:"if",locations:[{start:{line:42,column:2},end:{line:46,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},3:{loc:{start:{line:43,column:4},end:{line:44,column:34}},type:"if",locations:[{start:{line:43,column:4},end:{line:44,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:43},4:{loc:{start:{line:47,column:2},end:{line:51,column:3}},type:"if",locations:[{start:{line:47,column:2},end:{line:51,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:47},5:{loc:{start:{line:48,column:4},end:{line:49,column:30}},type:"if",locations:[{start:{line:48,column:4},end:{line:49,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},6:{loc:{start:{line:52,column:2},end:{line:58,column:3}},type:"if",locations:[{start:{line:52,column:2},end:{line:58,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:52},7:{loc:{start:{line:53,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:53,column:4},end:{line:57,column:5}},{start:{line:55,column:11},end:{line:57,column:5}}],line:53},8:{loc:{start:{line:59,column:2},end:{line:61,column:3}},type:"if",locations:[{start:{line:59,column:2},end:{line:61,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:59},9:{loc:{start:{line:62,column:2},end:{line:64,column:3}},type:"if",locations:[{start:{line:62,column:2},end:{line:64,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},10:{loc:{start:{line:109,column:19},end:{line:109,column:50}},type:"binary-expr",locations:[{start:{line:109,column:19},end:{line:109,column:44}},{start:{line:109,column:48},end:{line:109,column:50}}],line:109},11:{loc:{start:{line:109,column:20},end:{line:109,column:36}},type:"binary-expr",locations:[{start:{line:109,column:20},end:{line:109,column:30}},{start:{line:109,column:34},end:{line:109,column:36}}],line:109},12:{loc:{start:{line:111,column:4},end:{line:185,column:5}},type:"switch",locations:[{start:{line:112,column:6},end:{line:116,column:10}},{start:{line:117,column:6},end:{line:122,column:10}},{start:{line:123,column:6},end:{line:127,column:10}},{start:{line:128,column:6},end:{line:134,column:10}},{start:{line:135,column:6},end:{line:139,column:10}},{start:{line:140,column:6},end:{line:146,column:10}},{start:{line:147,column:6},end:{line:151,column:10}},{start:{line:152,column:6},end:{line:158,column:10}},{start:{line:159,column:6},end:{line:169,column:10}},{start:{line:170,column:6},end:{line:182,column:10}},{start:{line:183,column:6},end:{line:184,column:18}}],line:111},13:{loc:{start:{line:120,column:19},end:{line:120,column:42}},type:"binary-expr",locations:[{start:{line:120,column:19},end:{line:120,column:33}},{start:{line:120,column:37},end:{line:120,column:42}}],line:120},14:{loc:{start:{line:126,column:15},end:{line:126,column:72}},type:"binary-expr",locations:[{start:{line:126,column:15},end:{line:126,column:25}},{start:{line:126,column:29},end:{line:126,column:72}}],line:126},15:{loc:{start:{line:131,column:17},end:{line:131,column:80}},type:"binary-expr",locations:[{start:{line:131,column:17},end:{line:131,column:29}},{start:{line:131,column:33},end:{line:131,column:80}}],line:131},16:{loc:{start:{line:132,column:19},end:{line:132,column:38}},type:"binary-expr",locations:[{start:{line:132,column:19},end:{line:132,column:33}},{start:{line:132,column:37},end:{line:132,column:38}}],line:132},17:{loc:{start:{line:133,column:19},end:{line:133,column:39}},type:"binary-expr",locations:[{start:{line:133,column:19},end:{line:133,column:33}},{start:{line:133,column:37},end:{line:133,column:39}}],line:133},18:{loc:{start:{line:138,column:15},end:{line:138,column:72}},type:"binary-expr",locations:[{start:{line:138,column:15},end:{line:138,column:25}},{start:{line:138,column:29},end:{line:138,column:72}}],line:138},19:{loc:{start:{line:143,column:17},end:{line:143,column:80}},type:"binary-expr",locations:[{start:{line:143,column:17},end:{line:143,column:29}},{start:{line:143,column:33},end:{line:143,column:80}}],line:143},20:{loc:{start:{line:144,column:19},end:{line:144,column:38}},type:"binary-expr",locations:[{start:{line:144,column:19},end:{line:144,column:33}},{start:{line:144,column:37},end:{line:144,column:38}}],line:144},21:{loc:{start:{line:145,column:19},end:{line:145,column:39}},type:"binary-expr",locations:[{start:{line:145,column:19},end:{line:145,column:33}},{start:{line:145,column:37},end:{line:145,column:39}}],line:145},22:{loc:{start:{line:150,column:15},end:{line:150,column:72}},type:"binary-expr",locations:[{start:{line:150,column:15},end:{line:150,column:25}},{start:{line:150,column:29},end:{line:150,column:72}}],line:150},23:{loc:{start:{line:155,column:17},end:{line:155,column:80}},type:"binary-expr",locations:[{start:{line:155,column:17},end:{line:155,column:29}},{start:{line:155,column:33},end:{line:155,column:80}}],line:155},24:{loc:{start:{line:156,column:19},end:{line:156,column:38}},type:"binary-expr",locations:[{start:{line:156,column:19},end:{line:156,column:33}},{start:{line:156,column:37},end:{line:156,column:38}}],line:156},25:{loc:{start:{line:157,column:19},end:{line:157,column:39}},type:"binary-expr",locations:[{start:{line:157,column:19},end:{line:157,column:33}},{start:{line:157,column:37},end:{line:157,column:39}}],line:157}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0,0,0,0,0,0,0,0,0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalSources.tsx"],names:[],mappings:"AAgCU,cACA,YADA;AAhCV,OAAO,WAAW;AAClB,SAAQ,oBAAoB,gBAAe;AAC3C,OAAO,YAAY;AAEnB,SAA0B,uBAAuB;AAEjD,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,4BAA4C;AAEnD,OAAO,WAAW;AAClB,SAAS,cAAc,WAAW,oBAAoB;AACtD,OAAO,mBAAmB;AAU1B,MAAM,qBAAqB,MAAM,UAA6B;AAAA,EAC5D,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,0BACpB;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,EAAE;AAAA,QAEhD;AAAA,+BAAC,SAAI,WAAU,+BACb;AAAA,gCAAC,OAAE,WAAU,+BAA+B,eAAK,MAAM,OAAM;AAAA,YAC7D,qBAAC,OAAE,WAAU,6BAA4B;AAAA;AAAA,cAAE,KAAK,MAAM;AAAA,eAAG;AAAA,aAC3D;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC,oBAAC,sBAAmB;AAAA;AAAA;AAAA,IACtB,GACF;AAAA,EACF;AACF;AAEA,SAAS,WAAW,QAA6B;AAC/C,MAAG,OAAO,SAAS,UAAU;AAC3B,QAAG,OAAO;AAAO,aAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,cAAc;AAC/B,QAAG,OAAO;AAAO,aAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,UAAU;AAC3B,QAAG,OAAO;AAAO,aAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,WAAW;AAC5B,QAAI,OAAO,OAAO,SAAU,UAAU;AACpC,aAAO;AAAA,IACT,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AACA,MAAG,OAAO,SAAS,SAAS;AAC1B,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,SAAS;AAC1B,WAAO;AAAA,EACT;AACA,SAAO;AACT;AASA,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,sCACpB;AAAA,2BAAC,SAAI,WAAU,6CACb;AAAA,6BAAC,UAAK,WAAU,gDAA+C;AAAA;AAAA,UAAE,KAAK,MAAM;AAAA,WAAS;AAAA,QACrF,oBAAC,UAAK,WAAU,kBAAiB;AAAA,QACjC;AAAA,UAAC;AAAA;AAAA,YACC,cAAY,EAAE,gCAAgC,EAAC,UAAU,KAAK,MAAM,SAAQ,CAAC;AAAA,YAC7E,WAAU;AAAA,YACV,SAAS,MAAK,KAAK,MAAM,SAAS,KAAK,MAAM,QAAQ;AAAA,YACrD,OAAO,EAAC,iBAAiB,cAAa;AAAA,YAEtC,8BAAC,YAAS;AAAA;AAAA,QACZ;AAAA,SACF;AAAA,MACA,oBAAC,SAAI,WAAU,8CACb;AAAA,QAAC;AAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,MAAM,WAAW,KAAK,MAAM,MAAM;AAAA,UAClC,QAAQ,KAAK,MAAM;AAAA;AAAA,MACrB,GACF;AAAA,OACF;AAAA,EACF;AACF;AAYA,MAAM,kBAAkB,MAAM,UAA0C;AAAA,EACtE,YAAY,OAAuB;AACjC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,MACN,UAAU,MAAM,WAAW;AAAA,MAC3B,QAAQ,KAAK,cAAc,iBAAiB;AAAA,IAC9C;AAAA,EACF;AAAA,EAEA,cAAc,MAAuC;AACnD,UAAM,UAAU,KAAK,SAAS,CAAC,GAAG,UAAU,CAAC;AAC7C,UAAM,EAAC,SAAQ,IAAI,OAAO;AAE1B,YAAO,MAAM;AAAA,MACb,KAAK;AAAe,eAAO;AAAA,UACzB,MAAM;AAAA,UACN,MAAM,GAAG,QAAQ;AAAA,QACnB;AAAA,MACA,KAAK;AAAgB,eAAO;AAAA,UAC1B,MAAM;AAAA,UACN,SAAU,OAAsC,WAAW;AAAA,UAC3D,MAAM;AAAA,QACR;AAAA,MACA,KAAK;AAAmB,eAAO;AAAA,UAC7B,MAAM;AAAA,UACN,KAAM,OAAqC,OAAO,GAAG,QAAQ;AAAA,QAC/D;AAAA,MACA,KAAK;AAAkB,eAAO;AAAA,UAC5B,MAAM;AAAA,UACN,OAAQ,OAAqC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACpG,SAAU,OAAqC,WAAW;AAAA,UAC1D,SAAU,OAAqC,WAAW;AAAA,QAC5D;AAAA,MACA,KAAK;AAAmB,eAAO;AAAA,UAC7B,MAAM;AAAA,UACN,KAAM,OAAqC,OAAO,GAAG,QAAQ;AAAA,QAC/D;AAAA,MACA,KAAK;AAAkB,eAAO;AAAA,UAC5B,MAAM;AAAA,UACN,OAAQ,OAAqC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACpG,SAAU,OAAqC,WAAW;AAAA,UAC1D,SAAU,OAAqC,WAAW;AAAA,QAC5D;AAAA,MACA,KAAK;AAAuB,eAAO;AAAA,UACjC,MAAM;AAAA,UACN,KAAM,OAAwC,OAAO,GAAG,QAAQ;AAAA,QAClE;AAAA,MACA,KAAK;AAAsB,eAAO;AAAA,UAChC,MAAM;AAAA,UACN,OAAQ,OAAwC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACvG,SAAU,OAAwC,WAAW;AAAA,UAC7D,SAAU,OAAwC,WAAW;AAAA,QAC/D;AAAA,MACA,KAAK;AAAS,eAAO;AAAA,UACnB,MAAM;AAAA,UACN,KAAK,GAAG,QAAQ;AAAA,UAChB,aAAa;AAAA,YACX,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,UACN;AAAA,QACF;AAAA,MACA,KAAK;AAAS,eAAO;AAAA,UACnB,MAAM;AAAA,UACN,MAAM;AAAA,YACJ,GAAG,QAAQ;AAAA,UACb;AAAA,UACA,aAAa;AAAA,YACX,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,UACN;AAAA,QACF;AAAA,MACA;AAAS,eAAO,CAAC;AAAA,IACjB;AAAA,EACF;AAAA,EAEA,QAAQ,MAAM;AACZ,UAAM,EAAC,QAAQ,SAAQ,IAAI,KAAK;AAChC,SAAK,MAAM,MAAM,UAAU,MAAM;AAAA,EACnC;AAAA,EAEA,iBAAiB,CAAC,WAAgC;AAChD,SAAK,SAAS,EAAC,OAAM,CAAC;AAAA,EACxB;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAQrB,UAAM,sBAAsB;AAAA,MAC1B,KAAK,OAAO,cAAc,KAAK;AAAA,IACjC;AAEA,WAAO,qBAAC,SAAI,WAAU,uBACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,WAAW;AAAA,UACpB,WAAW,EAAC,KAAK,EAAE,wFAAwF,EAAC;AAAA,UAC5G,OAAO,KAAK,MAAM;AAAA,UAClB,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,UAAU,EAAC,CAAC;AAAA;AAAA,MACvD;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,aAAa;AAAA,UACtB,WAAW;AAAA,UACX,SAAS;AAAA,YACP,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AAAA,YACpC,CAAC,eAAe,EAAE,eAAe,CAAC;AAAA,YAClC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AAAA,YAC9C,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;AAAA,YACzC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AAAA,YAC9C,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AAAA,YACxC,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;AAAA,YACtD,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;AAAA,YACjD,CAAC,SAAS,EAAE,OAAO,CAAC;AAAA,YACpB,CAAC,SAAS,EAAE,OAAO,CAAC;AAAA,UACtB;AAAA,UACA,UAAU,UAAQ,KAAK,SAAS,EAAC,MAA0B,QAAQ,KAAK,cAAc,IAAkB,EAAC,CAAC;AAAA,UAC1G,OAAO,KAAK,MAAM;AAAA;AAAA,MACpB;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU,KAAK;AAAA,UACf,MAAM,KAAK,MAAM;AAAA,UACjB,QAAQ,KAAK,MAAM;AAAA;AAAA,MACrB;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK;AAAA,UAEb,YAAE,YAAY;AAAA;AAAA,MACjB;AAAA,OACF;AAAA,EACF;AACF;AASA,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,WAAW,QAAqE;AAC9E,UAAM,iBAAiB,EAAC,GAAG,OAAM;AACjC,WAAO,eAAe,OAAO;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,SAAQ,IAAI,KAAK;AAC3B,UAAM,YAAY,EAAC,GAAG,MAAM,KAAK,MAAM,MAAM,QAAQ,KAAK,MAAM,OAAM;AACtE,UAAM,gBAAgB,OAAO,KAAK,SAAS,OAAO,EAAE,IAAI,cAAY;AAClE,YAAM,SAAS,SAAS,QAAQ,QAAQ;AACxC,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN;AAAA,UACA;AAAA,UACA,UAAU,CAAC,QAA6B,KAAK,MAAM,eAAe,aAAa,UAAU,UAAU,GAAG,CAAC;AAAA,UACvG,UAAU,MAAM,KAAK,MAAM,eAAe,aAAa,UAAU,QAAQ,CAAC;AAAA,UACzE,GAAG;AAAA;AAAA,QALC;AAAA,MAMP;AAAA,IACF,CAAC;AAED,UAAM,iBAAiB,OAAO,KAAK,aAAa,EAAE,OAAO,CAAC,aAAqB,EAAE,YAAY,SAAS,QAAQ,EAAE,IAAI,CAAC,aAAqB;AACxI,YAAM,SAAS,cAAc,QAAsC;AACnE,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,IAAI;AAAA,UACJ,MAAM,OAAO;AAAA,UACb,OAAO,OAAO;AAAA,UACd,UAAU,MAAM,KAAK,MAAM,eAAe,UAAU,UAAU,UAAU,KAAK,WAAW,MAAM,CAAC,CAAC;AAAA;AAAA,QAJ3F;AAAA,MAKP;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,SAAS;AAAA,QAElB;AAAA,+BAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,YACxB;AAAA,aACH;AAAA,UAEA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,sBAAsB,GAAE;AAAA,YAC/B,oBAAC,OACE,YAAE,0DAA0D,GAC/D;AAAA,YACA,oBAAC,SAAI,WAAU,2BAA0B,OAAO,EAAC,UAAU,IAAG,GAC3D,0BACH;AAAA,aACF;AAAA,UAEA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,YACzB,oBAAC,OAAG,YAAE,8FAA8F,GAAE;AAAA,YACtG;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,CAAC,UAAkB,WAAgC,KAAK,MAAM,eAAe,UAAU,UAAU,UAAU,MAAM,CAAC;AAAA,gBACxH,GAAG;AAAA;AAAA,YACN;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"15c540d7ac1d0046e843ce3c1d87b0e6c6ae74b6"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Vt=function(){return a},a}Vt();class ake extends Mn.Component{render(){return Vt().f[0]++,Vt().s[0]++,G.jsx("div",{className:"maputnik-public-source",children:G.jsxs(is,{className:"maputnik-public-source-select",onClick:()=>(Vt().f[1]++,Vt().s[1]++,this.props.onSelect(this.props.id)),children:[G.jsxs("div",{className:"maputnik-public-source-info",children:[G.jsx("p",{className:"maputnik-public-source-name",children:this.props.title}),G.jsxs("p",{className:"maputnik-public-source-id",children:["#",this.props.id]})]}),G.jsx("span",{className:"maputnik-space"}),G.jsx(ij,{})]})})}}function ske(n){return Vt().f[2]++,Vt().s[2]++,n.type==="raster"?(Vt().b[0][0]++,Vt().s[3]++,n.tiles?(Vt().b[1][0]++,Vt().s[4]++,"tilexyz_raster"):(Vt().b[1][1]++,Vt().s[5]++,"tilejson_raster")):(Vt().b[0][1]++,Vt().s[6]++,n.type==="raster-dem"?(Vt().b[2][0]++,Vt().s[7]++,n.tiles?(Vt().b[3][0]++,Vt().s[8]++,"tilexyz_raster-dem"):(Vt().b[3][1]++,Vt().s[9]++,"tilejson_raster-dem")):(Vt().b[2][1]++,Vt().s[10]++,n.type==="vector"?(Vt().b[4][0]++,Vt().s[11]++,n.tiles?(Vt().b[5][0]++,Vt().s[12]++,"tilexyz_vector"):(Vt().b[5][1]++,Vt().s[13]++,"tilejson_vector")):(Vt().b[4][1]++,Vt().s[14]++,n.type==="geojson"?(Vt().b[6][0]++,Vt().s[15]++,typeof n.data=="string"?(Vt().b[7][0]++,Vt().s[16]++,"geojson_url"):(Vt().b[7][1]++,Vt().s[17]++,"geojson_json")):(Vt().b[6][1]++,Vt().s[18]++,n.type==="image"?(Vt().b[8][0]++,Vt().s[19]++,"image"):(Vt().b[8][1]++,Vt().s[20]++,n.type==="video"?(Vt().b[9][0]++,Vt().s[21]++,"video"):(Vt().b[9][1]++,Vt().s[22]++,null))))))}class lke extends Mn.Component{render(){Vt().f[3]++;const e=(Vt().s[23]++,this.props.t);return Vt().s[24]++,G.jsxs("div",{className:"maputnik-active-source-type-editor",children:[G.jsxs("div",{className:"maputnik-active-source-type-editor-header",children:[G.jsxs("span",{className:"maputnik-active-source-type-editor-header-id",children:["#",this.props.sourceId]}),G.jsx("span",{className:"maputnik-space"}),G.jsx(is,{"aria-label":e("Remove '{{sourceId}}' source",{sourceId:this.props.sourceId}),className:"maputnik-active-source-type-editor-header-delete",onClick:()=>(Vt().f[4]++,Vt().s[25]++,this.props.onDelete(this.props.sourceId)),style:{backgroundColor:"transparent"},children:G.jsx(Iv,{})})]}),G.jsx("div",{className:"maputnik-active-source-type-editor-content",children:G.jsx(YQ,{onChange:this.props.onChange,mode:ske(this.props.source),source:this.props.source})})]})}}class uke extends Mn.Component{constructor(t){Vt().f[5]++,Vt().s[26]++;super(t);sn(this,"onAdd",(Vt().s[42]++,()=>{Vt().f[7]++;const{source:t,sourceId:r}=(Vt().s[43]++,this.state);Vt().s[44]++,this.props.onAdd(r,t)}));sn(this,"onChangeSource",(Vt().s[45]++,t=>{Vt().f[8]++,Vt().s[46]++,this.setState({source:t})}));Vt().s[27]++,this.state={mode:"tilejson_vector",sourceId:Ru.generateId(),source:this.defaultSource("tilejson_vector")}}defaultSource(t){Vt().f[6]++;const r=(Vt().s[28]++,Vt().b[10][0]++,(Vt().b[11][0]++,this.state||(Vt().b[11][1]++,{})).source||(Vt().b[10][1]++,{})),{protocol:i}=(Vt().s[29]++,window.location);switch(Vt().s[30]++,t){case"geojson_url":return Vt().b[12][0]++,Vt().s[31]++,{type:"geojson",data:`${i}//localhost:3000/geojson.json`};case"geojson_json":return Vt().b[12][1]++,Vt().s[32]++,{type:"geojson",cluster:(Vt().b[13][0]++,r.cluster||(Vt().b[13][1]++,!1)),data:""};case"tilejson_vector":return Vt().b[12][2]++,Vt().s[33]++,{type:"vector",url:(Vt().b[14][0]++,r.url||(Vt().b[14][1]++,`${i}//localhost:3000/tilejson.json`))};case"tilexyz_vector":return Vt().b[12][3]++,Vt().s[34]++,{type:"vector",tiles:(Vt().b[15][0]++,r.tiles||(Vt().b[15][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.pbf`])),minzoom:(Vt().b[16][0]++,r.minzoom||(Vt().b[16][1]++,0)),maxzoom:(Vt().b[17][0]++,r.maxzoom||(Vt().b[17][1]++,14))};case"tilejson_raster":return Vt().b[12][4]++,Vt().s[35]++,{type:"raster",url:(Vt().b[18][0]++,r.url||(Vt().b[18][1]++,`${i}//localhost:3000/tilejson.json`))};case"tilexyz_raster":return Vt().b[12][5]++,Vt().s[36]++,{type:"raster",tiles:(Vt().b[19][0]++,r.tiles||(Vt().b[19][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.pbf`])),minzoom:(Vt().b[20][0]++,r.minzoom||(Vt().b[20][1]++,0)),maxzoom:(Vt().b[21][0]++,r.maxzoom||(Vt().b[21][1]++,14))};case"tilejson_raster-dem":return Vt().b[12][6]++,Vt().s[37]++,{type:"raster-dem",url:(Vt().b[22][0]++,r.url||(Vt().b[22][1]++,`${i}//localhost:3000/tilejson.json`))};case"tilexyz_raster-dem":return Vt().b[12][7]++,Vt().s[38]++,{type:"raster-dem",tiles:(Vt().b[23][0]++,r.tiles||(Vt().b[23][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.pbf`])),minzoom:(Vt().b[24][0]++,r.minzoom||(Vt().b[24][1]++,0)),maxzoom:(Vt().b[25][0]++,r.maxzoom||(Vt().b[25][1]++,14))};case"image":return Vt().b[12][8]++,Vt().s[39]++,{type:"image",url:`${i}//localhost:3000/image.png`,coordinates:[[0,0],[0,0],[0,0],[0,0]]};case"video":return Vt().b[12][9]++,Vt().s[40]++,{type:"video",urls:[`${i}//localhost:3000/movie.mp4`],coordinates:[[0,0],[0,0],[0,0],[0,0]]};default:return Vt().b[12][10]++,Vt().s[41]++,{}}}render(){Vt().f[9]++;const t=(Vt().s[47]++,this.props.t),r=(Vt().s[48]++,{doc:no.source_vector.type.doc});return Vt().s[49]++,G.jsxs("div",{className:"maputnik-add-source",children:[G.jsx(Fm,{label:t("Source ID"),fieldSpec:{doc:t("Unique ID that identifies the source and is used in the layer to reference the source.")},value:this.state.sourceId,onChange:i=>(Vt().f[10]++,Vt().s[50]++,this.setState({sourceId:i}))}),G.jsx(Mk,{label:t("Source Type"),fieldSpec:r,options:[["geojson_json",t("GeoJSON (JSON)")],["geojson_url",t("GeoJSON (URL)")],["tilejson_vector",t("Vector (TileJSON URL)")],["tilexyz_vector",t("Vector (XYZ URLs)")],["tilejson_raster",t("Raster (TileJSON URL)")],["tilexyz_raster",t("Raster (XYZ URL)")],["tilejson_raster-dem",t("Raster DEM (TileJSON URL)")],["tilexyz_raster-dem",t("Raster DEM (XYZ URLs)")],["image",t("Image")],["video",t("Video")]],onChange:i=>(Vt().f[11]++,Vt().s[51]++,this.setState({mode:i,source:this.defaultSource(i)})),value:this.state.mode}),G.jsx(YQ,{onChange:this.onChangeSource,mode:this.state.mode,source:this.state.source}),G.jsx(is,{className:"maputnik-add-source-button",onClick:this.onAdd,children:t("Add Source")})]})}}class Ake extends Mn.Component{stripTitle(e){Vt().f[12]++;const t=(Vt().s[52]++,{...e});return Vt().s[53]++,delete t.title,Vt().s[54]++,t}render(){Vt().f[13]++;const{t:e,mapStyle:t}=(Vt().s[55]++,this.props),r=(Vt().s[56]++,{t:e,i18n:this.props.i18n,tReady:this.props.tReady}),i=(Vt().s[57]++,Object.keys(t.sources).map(a=>{Vt().f[14]++;const s=(Vt().s[58]++,t.sources[a]);return Vt().s[59]++,G.jsx(lke,{sourceId:a,source:s,onChange:d=>(Vt().f[15]++,Vt().s[60]++,this.props.onStyleChanged(qQ(t,a,d))),onDelete:()=>(Vt().f[16]++,Vt().s[61]++,this.props.onStyleChanged(tke(t,a))),...r},a)})),o=(Vt().s[62]++,Object.keys(wL).filter(a=>(Vt().f[17]++,Vt().s[63]++,!(a in t.sources))).map(a=>{Vt().f[18]++;const s=(Vt().s[64]++,wL[a]);return Vt().s[65]++,G.jsx(ake,{id:a,type:s.type,title:s.title,onSelect:()=>(Vt().f[19]++,Vt().s[66]++,this.props.onStyleChanged(xL(t,a,this.stripTitle(s))))},a)}));return Vt().s[67]++,G.jsxs(g0,{"data-wd-key":"modal:sources",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Sources"),children:[G.jsxs("section",{className:"maputnik-modal-section",children:[G.jsx("h1",{children:e("Active Sources")}),i]}),G.jsxs("section",{className:"maputnik-modal-section",children:[G.jsx("h1",{children:e("Choose Public Source")}),G.jsx("p",{children:e("Add one of the publicly available sources to your style.")}),G.jsx("div",{className:"maputnik-public-sources",style:{maxWidth:500},children:o})]}),G.jsxs("section",{className:"maputnik-modal-section",children:[G.jsx("h1",{children:e("Add New Source")}),G.jsx("p",{children:e("Add a new source to your style. You can only choose the source type and id at creation time!")}),G.jsx(uke,{onAdd:(a,s)=>(Vt().f[20]++,Vt().s[68]++,this.props.onStyleChanged(xL(t,a,s))),...r})]})]})}}const cke=(Vt().s[69]++,No()(Ake));var VQ={};Object.defineProperty(VQ,"__esModule",{value:!0});var dke=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},hke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fke=function(){function n(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),pke=Wn,UE=vke(pke),mke=p0,gke=yke(mke);function yke(n){return n&&n.__esModule?n:{default:n}}function vke(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function Cke(n,e){var t={};for(var r in n)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}function _ke(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function bke(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function xke(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var wke=function(n){xke(e,n);function e(t){_ke(this,e);var r=bke(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.handleChange=function(o){var a=Array.prototype.slice.call(o.target.files),s=(r.props.as||"url").toLowerCase();Promise.all(a.map(function(d){return new Promise(function(f,C){var O=new FileReader;switch(O.onload=function(E){f([E,d])},s){case"binary":{O.readAsBinaryString(d);break}case"buffer":{O.readAsArrayBuffer(d);break}case"text":{O.readAsText(d);break}case"url":{O.readAsDataURL(d);break}}})})).then(function(d){r.props.onChange(o,d)})},r.triggerInput=function(){var o=gke.default.findDOMNode(r._reactFileReaderInput);o&&o.click()};var i=(typeof window>"u"?"undefined":hke(window))==="object"?window:{};return(!i.File||!i.FileReader||!i.FileList||!i.Blob)&&console.warn("[react-file-reader-input] Some file APIs detected as not supported. File reader functionality may not fully work."),r}return fke(e,[{key:"render",value:function(){var r=this,i=this.props;i.as;var o=i.children,a=i.style,s=Cke(i,["as","children","style"]),d=o?{position:"absolute",top:"-9999px"}:{};return UE.createElement("div",{className:"_react-file-reader-input",onClick:this.triggerInput,style:a},UE.createElement("input",dke({},s,{type:"file",ref:function(C){r._reactFileReaderInput=C},onChange:this.handleChange,onClick:function(){r._reactFileReaderInput.value=null},style:d})),o)}}]),e}(UE.Component),Mke=VQ.default=wke;function Cc(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx",e="8092b056f21d597f3cd7d476fbebca118ff97879",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx",statementMap:{0:{start:{line:8,column:4},end:{line:8,column:24}},1:{start:{line:11,column:14},end:{line:11,column:26}},2:{start:{line:12,column:4},end:{line:29,column:6}},3:{start:{line:20,column:26},end:{line:20,column:42}},4:{start:{line:23,column:28},end:{line:23,column:49}},5:{start:{line:26,column:137},end:{line:26,column:159}},6:{start:{line:32,column:21},end:{line:32,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:21},end:{line:9,column:3}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:30,column:3}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:20,column:19},end:{line:20,column:20}},loc:{start:{line:20,column:26},end:{line:20,column:42}},line:20},3:{name:"(anonymous_3)",decl:{start:{line:23,column:22},end:{line:23,column:23}},loc:{start:{line:23,column:28},end:{line:23,column:49}},line:23},4:{name:"(anonymous_4)",decl:{start:{line:26,column:130},end:{line:26,column:131}},loc:{start:{line:26,column:137},end:{line:26,column:159}},line:26}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0,4:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx"],names:[],mappings:"AAuBW,SAWL,KAXK;AAvBX,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,SAA0B,uBAAuB;AAWjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,gBAAgB,GAAU;AAExB,MAAE,gBAAgB;AAAA,EACpB;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,oBAAoB;AAAA,QACpB,eAAe;AAAA;AAAA,UAEb,SAAS,CAAC,MAAa,cAAc,CAAC;AAAA,QACxC;AAAA,QACA,OAAO,KAAK,MAAM;AAAA,QAClB,cAAc,MAAM,KAAK,MAAM,SAAS;AAAA,QAExC;AAAA,8BAAC,OACE,eAAK,MAAM,SACd;AAAA,UACA,oBAAC,OAAE,WAAU,4BACX,8BAAC,eAAY,SAAS,CAAC,MAAM,KAAK,MAAM,SAAS,CAAC,GAC/C,YAAE,QAAQ,GACb,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8092b056f21d597f3cd7d476fbebca118ff97879"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Cc=function(){return a},a}Cc();class Ske extends Mn.Component{underlayOnClick(e){Cc().f[0]++,Cc().s[0]++,e.stopPropagation()}render(){Cc().f[1]++;const e=(Cc().s[1]++,this.props.t);return Cc().s[2]++,G.jsxs(g0,{"data-wd-key":"modal:loading",isOpen:this.props.isOpen,underlayClickExits:!1,underlayProps:{onClick:t=>(Cc().f[2]++,Cc().s[3]++,underlayProps(t))},title:this.props.title,onOpenToggle:()=>(Cc().f[3]++,Cc().s[4]++,this.props.onCancel()),children:[G.jsx("p",{children:this.props.message}),G.jsx("p",{className:"maputnik-dialog__buttons",children:G.jsx(is,{onClick:t=>(Cc().f[4]++,Cc().s[5]++,this.props.onCancel(t)),children:e("Cancel")})})]})}}const Eke=(Cc().s[6]++,No()(Ske)),HQ=[{id:"0-empty-style",title:"Empty Style",url:"https://cdn.jsdelivr.net/gh/maputnik/editor@9cf74ca405d2be0608b57db8109cf3a6af5b9f49/src/config/empty-style.json",thumbnail:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAQAAAAHDYbIAAAAEUlEQVR42mP8/58BDhiJ4wAA974H/U5Xe1oAAAAASUVORK5CYII="},{id:"dark-matter",title:"Dark Matter",url:"https://cdn.jsdelivr.net/gh/openmaptiles/dark-matter-gl-style@v1.9/style.json",thumbnail:"https://maputnik.github.io/thumbnails/dark-matter.png"},{id:"maptiler-basic-gl-style",title:"Maptiler Basic",url:"https://cdn.jsdelivr.net/gh/openmaptiles/klokantech-basic-gl-style@v1.10/style.json",thumbnail:"https://maputnik.github.io/thumbnails/klokantech-basic.png"},{id:"maptiler-toner-gl-style",title:"Toner",url:"https://cdn.jsdelivr.net/gh/openmaptiles/toner-gl-style@v1.0/style.json",thumbnail:"https://maputnik.github.io/thumbnails/toner.png"},{id:"os-zoomstack-light",title:"Zoomstack Light",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/v2/styles/open-zoomstack-light/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-light.png"},{id:"os-zoomstack-night",title:"Zoomstack Night",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/v2/styles/open-zoomstack-night/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-night.png"},{id:"os-zoomstack-outdoor",title:"Zoomstack Outdoor",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/v2/styles/open-zoomstack-outdoor/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-outdoor.png"},{id:"os-zoomstack-road",title:"Zoomstack Road",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/v2/styles/open-zoomstack-road/style.json",thumbnail:"https://maputnik.github.io/thumbnails/os-zoomstack-road.png"},{id:"osm-bright",title:"OSM Bright",url:"https://cdn.jsdelivr.net/gh/openmaptiles/osm-bright-gl-style@v1.11/style.json",thumbnail:"https://maputnik.github.io/thumbnails/osm-bright.png"},{id:"osm-liberty",title:"OSM Liberty",url:"https://maputnik.github.io/osm-liberty/style.json",thumbnail:"https://maputnik.github.io/thumbnails/osm-liberty.png"},{id:"positron",title:"Positron",url:"https://cdn.jsdelivr.net/gh/openmaptiles/positron-gl-style@v1.9/style.json",thumbnail:"https://maputnik.github.io/thumbnails/positron.png"},{id:"stadia-outdoors",title:"Stadia Outdoors",url:"https://tiles.stadiamaps.com/styles/outdoors.json",thumbnail:"https://tiles.stadiamaps.com/static/outdoors.png?size=480x320&center=47.350259,8.49035&zoom=16"},{id:"versatiles-colorful",title:"Versatiles Colorful",url:"https://tiles.versatiles.org/assets/styles/colorful.json",thumbnail:"https://github.com/maplibre/maputnik/assets/649392/6cd69818-c541-46e4-a920-65fb4f654931"}];function Zn(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalOpen.tsx",e="d4f8026b776b122e7b65ed69768690d48acd1cde",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalOpen.tsx",statementMap:{0:{start:{line:15,column:4},end:{line:38,column:9}},1:{start:{line:20,column:23},end:{line:20,column:58}},2:{start:{line:43,column:4},end:{line:43,column:17}},3:{start:{line:44,column:4},end:{line:46,column:6}},4:{start:{line:49,column:4},end:{line:51,column:7}},5:{start:{line:54,column:4},end:{line:55,column:26}},6:{start:{line:55,column:6},end:{line:55,column:26}},7:{start:{line:56,column:4},end:{line:62,column:5}},8:{start:{line:57,column:6},end:{line:57,column:39}},9:{start:{line:58,column:6},end:{line:61,column:9}},10:{start:{line:64,column:18},end:{line:101,column:3}},11:{start:{line:65,column:4},end:{line:65,column:22}},12:{start:{line:66,column:19},end:{line:66,column:24}},13:{start:{line:67,column:4},end:{line:92,column:7}},14:{start:{line:71,column:6},end:{line:71,column:29}},15:{start:{line:73,column:6},end:{line:75,column:7}},16:{start:{line:74,column:8},end:{line:74,column:15}},17:{start:{line:76,column:6},end:{line:79,column:9}},18:{start:{line:80,column:23},end:{line:80,column:54}},19:{start:{line:81,column:6},end:{line:81,column:48}},20:{start:{line:82,column:6},end:{line:82,column:39}},21:{start:{line:83,column:6},end:{line:83,column:26}},22:{start:{line:85,column:6},end:{line:89,column:9}},23:{start:{line:90,column:6},end:{line:90,column:25}},24:{start:{line:91,column:6},end:{line:91,column:61}},25:{start:{line:93,column:4},end:{line:100,column:7}},26:{start:{line:96,column:10},end:{line:96,column:26}},27:{start:{line:102,column:16},end:{line:105,column:3}},28:{start:{line:103,column:4},end:{line:103,column:23}},29:{start:{line:104,column:4},end:{line:104,column:44}},30:{start:{line:106,column:13},end:{line:126,column:3}},31:{start:{line:107,column:21},end:{line:107,column:29}},32:{start:{line:108,column:19},end:{line:108,column:35}},33:{start:{line:109,column:4},end:{line:109,column:22}},34:{start:{line:110,column:4},end:{line:110,column:37}},35:{start:{line:111,column:4},end:{line:124,column:6}},36:{start:{line:113,column:6},end:{line:120,column:7}},37:{start:{line:114,column:8},end:{line:114,column:48}},38:{start:{line:116,column:8},end:{line:118,column:11}},39:{start:{line:119,column:8},end:{line:119,column:15}},40:{start:{line:121,column:6},end:{line:121,column:53}},41:{start:{line:122,column:6},end:{line:122,column:39}},42:{start:{line:123,column:6},end:{line:123,column:26}},43:{start:{line:125,column:4},end:{line:125,column:50}},44:{start:{line:125,column:28},end:{line:125,column:49}},45:{start:{line:128,column:4},end:{line:130,column:7}},46:{start:{line:131,column:4},end:{line:131,column:22}},47:{start:{line:132,column:4},end:{line:132,column:30}},48:{start:{line:134,column:16},end:{line:138,column:3}},49:{start:{line:135,column:4},end:{line:137,column:7}},50:{start:{line:140,column:14},end:{line:140,column:26}},51:{start:{line:141,column:25},end:{line:152,column:6}},52:{start:{line:142,column:6},end:{line:151,column:8}},53:{start:{line:154,column:4},end:{line:159,column:5}},54:{start:{line:155,column:6},end:{line:158,column:11}},55:{start:{line:157,column:61},end:{line:157,column:78}},56:{start:{line:160,column:4},end:{line:227,column:9}},57:{start:{line:166,column:30},end:{line:166,column:49}},58:{start:{line:223,column:27},end:{line:223,column:56}},59:{start:{line:230,column:18},end:{line:230,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:11},end:{line:39,column:3}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:20,column:17},end:{line:20,column:18}},loc:{start:{line:20,column:23},end:{line:20,column:58}},line:20},2:{name:"(anonymous_2)",decl:{start:{line:42,column:2},end:{line:42,column:3}},loc:{start:{line:42,column:21},end:{line:47,column:3}},line:42},3:{name:"(anonymous_3)",decl:{start:{line:48,column:2},end:{line:48,column:3}},loc:{start:{line:48,column:15},end:{line:52,column:3}},line:48},4:{name:"(anonymous_4)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:27},end:{line:63,column:3}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:64,column:18},end:{line:64,column:19}},loc:{start:{line:64,column:32},end:{line:101,column:3}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:70,column:12},end:{line:70,column:13}},loc:{start:{line:70,column:31},end:{line:72,column:5}},line:70},7:{name:"(anonymous_7)",decl:{start:{line:72,column:12},end:{line:72,column:13}},loc:{start:{line:72,column:22},end:{line:84,column:5}},line:72},8:{name:"(anonymous_8)",decl:{start:{line:84,column:13},end:{line:84,column:14}},loc:{start:{line:84,column:22},end:{line:92,column:5}},line:84},9:{name:"(anonymous_9)",decl:{start:{line:95,column:15},end:{line:95,column:16}},loc:{start:{line:95,column:26},end:{line:97,column:9}},line:95},10:{name:"(anonymous_10)",decl:{start:{line:102,column:16},end:{line:102,column:17}},loc:{start:{line:102,column:23},end:{line:105,column:3}},line:102},11:{name:"(anonymous_11)",decl:{start:{line:106,column:13},end:{line:106,column:14}},loc:{start:{line:106,column:27},end:{line:126,column:3}},line:106},12:{name:"(anonymous_12)",decl:{start:{line:111,column:20},end:{line:111,column:21}},loc:{start:{line:111,column:27},end:{line:124,column:5}},line:111},13:{name:"(anonymous_13)",decl:{start:{line:125,column:21},end:{line:125,column:22}},loc:{start:{line:125,column:28},end:{line:125,column:49}},line:125},14:{name:"(anonymous_14)",decl:{start:{line:127,column:2},end:{line:127,column:3}},loc:{start:{line:127,column:17},end:{line:133,column:3}},line:127},15:{name:"(anonymous_15)",decl:{start:{line:134,column:16},end:{line:134,column:17}},loc:{start:{line:134,column:25},end:{line:138,column:3}},line:134},16:{name:"(anonymous_16)",decl:{start:{line:139,column:2},end:{line:139,column:3}},loc:{start:{line:139,column:11},end:{line:228,column:3}},line:139},17:{name:"(anonymous_17)",decl:{start:{line:141,column:42},end:{line:141,column:43}},loc:{start:{line:141,column:54},end:{line:152,column:5}},line:141},18:{name:"(anonymous_18)",decl:{start:{line:157,column:55},end:{line:157,column:56}},loc:{start:{line:157,column:61},end:{line:157,column:78}},line:157},19:{name:"(anonymous_19)",decl:{start:{line:166,column:24},end:{line:166,column:25}},loc:{start:{line:166,column:30},end:{line:166,column:49}},line:166},20:{name:"(anonymous_20)",decl:{start:{line:223,column:20},end:{line:223,column:21}},loc:{start:{line:223,column:27},end:{line:223,column:56}},line:223}},branchMap:{0:{loc:{start:{line:54,column:4},end:{line:55,column:26}},type:"if",locations:[{start:{line:54,column:4},end:{line:55,column:26}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:54},1:{loc:{start:{line:56,column:4},end:{line:62,column:5}},type:"if",locations:[{start:{line:56,column:4},end:{line:62,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},2:{loc:{start:{line:73,column:6},end:{line:75,column:7}},type:"if",locations:[{start:{line:73,column:6},end:{line:75,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:73},3:{loc:{start:{line:154,column:4},end:{line:159,column:5}},type:"if",locations:[{start:{line:154,column:4},end:{line:159,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:154}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalOpen.tsx"],names:["style"],mappings:"AA6BQ,SACE,KADF;AA7BR,OAAO,WAA0B;AACjC,SAAQ,oBAAmB;AAC3B,SAAQ,0BAAyB;AACjC,OAAO,qBAAiC;AACxC,SAAS,OAAwB,uBAAuB;AAExD,OAAO,kBAAkB;AACzB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,cAAc;AAErB,OAAO,WAAW;AAClB,OAAO,kBAAkB;AASzB,MAAM,oBAAoB,MAAM,UAA4B;AAAA,EAC1D,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,yBACpB;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,cAAY,KAAK,MAAM;AAAA,QACvB,SAAS,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,GAAG;AAAA,QAEjD;AAAA,+BAAC,SAAI,WAAU,gCACb;AAAA,gCAAC,SAAK,eAAK,MAAM,OAAM;AAAA,YACvB,oBAAC,UAAK,WAAU,kBAAiB;AAAA,YACjC,oBAAC,sBAAmB;AAAA,aACtB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,iBAAiB,OAAO,KAAK,MAAM,YAAY;AAAA,cACjD;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACH,GACF;AAAA,EACF;AACF;AAeA,MAAM,0BAA0B,MAAM,UAAkD;AAAA,EACtF,YAAY,OAA+B;AACzC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,aAAa;AACX,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EAEA,sBAAsB,GAAU;AAE9B,QAAG;AAAG,QAAE,gBAAgB;AAExB,QAAG,KAAK,MAAM,eAAe;AAC3B,WAAK,MAAM,cAAc,MAAM;AAC/B,WAAK,SAAS;AAAA,QACZ,eAAe;AAAA,QACf,kBAAkB;AAAA,MACpB,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,aAAqB;AACpC,SAAK,WAAW;AAEhB,QAAI,WAAoB;AAExB,UAAM,UAAU;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,IACf,CAAC,EACE,KAAK,SAAS,UAAU;AACvB,aAAO,SAAS,KAAK;AAAA,IACvB,CAAC,EACA,KAAK,CAAC,SAAS;AACd,UAAG,UAAU;AACX;AAAA,MACF;AAEA,WAAK,SAAS;AAAA,QACZ,eAAe;AAAA,QACf,kBAAkB;AAAA,MACpB,CAAC;AAED,YAAM,WAAW,MAAM,oBAAoB,IAAI;AAC/C,cAAQ,IAAI,iBAAiB,SAAS,EAAE;AACxC,WAAK,MAAM,YAAY,QAAQ;AAC/B,WAAK,aAAa;AAAA,IACpB,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,WAAK,SAAS;AAAA,QACZ,OAAO,oBAAoB,QAAQ;AAAA,QACnC,eAAe;AAAA,QACf,kBAAkB;AAAA,MACpB,CAAC;AACD,cAAQ,MAAM,GAAG;AACjB,cAAQ,KAAK,gCAAgC,QAAQ;AAAA,IACvD,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,eAAe;AAAA,QACb,OAAO,WAAW;AAChB,qBAAW;AAAA,QACb;AAAA,MACF;AAAA,MACA,kBAAkB;AAAA,IACpB,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,CAAC,MAAkC;AAC/C,MAAE,eAAe;AACjB,SAAK,cAAc,KAAK,MAAM,QAAQ;AAAA,EACxC;AAAA,EAEA,WAAW,CAAC,GAAQ,UAAoB;AACtC,UAAM,CAAC,EAAE,IAAI,IAAI,MAAM,CAAC;AACxB,UAAM,SAAS,IAAI,WAAW;AAE9B,SAAK,WAAW;AAEhB,WAAO,WAAW,MAAM,OAAO;AAC/B,WAAO,SAAS,OAAK;AACnB,UAAI;AACJ,UAAI;AACF,mBAAW,KAAK,MAAM,EAAE,QAAQ,MAAgB;AAAA,MAClD,SACM,KAAK;AACT,aAAK,SAAS;AAAA,UACZ,OAAQ,IAAc,SAAS;AAAA,QACjC,CAAC;AACD;AAAA,MACF;AACA,iBAAW,MAAM,oBAAoB,QAAQ;AAC7C,WAAK,MAAM,YAAY,QAAQ;AAC/B,WAAK,aAAa;AAAA,IACpB;AACA,WAAO,UAAU,OAAK,QAAQ,IAAI,EAAE,MAAM;AAAA,EAC5C;AAAA,EAEA,eAAe;AACb,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,CAAC;AACD,SAAK,WAAW;AAChB,SAAK,MAAM,aAAa;AAAA,EAC1B;AAAA,EAEA,cAAc,CAAC,QAAgB;AAC7B,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,eAAe,aAAa,IAAI,CAAAA,WAAS;AAC7C,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,KAAKA,OAAM;AAAA,UACX,OAAOA,OAAM;AAAA,UACb,cAAcA,OAAM;AAAA,UACpB,UAAU,KAAK;AAAA;AAAA,QAJVA,OAAM;AAAA,MAKb;AAAA,IACF,CAAC;AAED,QAAI;AACJ,QAAG,KAAK,MAAM,OAAO;AACnB,qBACE,qBAAC,SAAI,WAAU,wBACZ;AAAA,aAAK,MAAM;AAAA,QACZ,oBAAC,OAAE,MAAK,KAAI,SAAS,MAAM,KAAK,WAAW,GAAG,WAAU,8BAA6B,eAAC;AAAA,SACxF;AAAA,IAEJ;AAEA,WACE,qBAAC,SACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,eAAY;AAAA,UACZ,QAAQ,KAAK,MAAM;AAAA,UACnB,cAAc,MAAM,KAAK,aAAa;AAAA,UACtC,OAAO,EAAE,YAAY;AAAA,UAEpB;AAAA;AAAA,YACD,qBAAC,aAAQ,WAAU,0BACjB;AAAA,kCAAC,QAAI,YAAE,cAAc,GAAE;AAAA,cACvB,oBAAC,OAAG,YAAE,yCAAyC,GAAE;AAAA,cACjD,oBAAC,mBAAgB,UAAU,KAAK,UAAU,UAAU,IAAI,cAAY,EAAE,YAAY,GAChF,+BAAC,eAAY,WAAU,0BAAyB;AAAA,oCAAC,gBAAa;AAAA,gBAAE;AAAA,gBAAE,EAAE,QAAQ;AAAA,iBAAE,GAChF;AAAA,eACF;AAAA,YAEA,oBAAC,aAAQ,WAAU,0BACjB,+BAAC,UAAK,UAAU,KAAK,aACnB;AAAA,kCAAC,QAAI,YAAE,eAAe,GAAE;AAAA,cACxB,oBAAC,OACC,+BAAC,SAAM,GAAM;AAAA;AAAA,gBACkC,oBAAC,OAAE,MAAK,2BAA0B,QAAO,UAAS,KAAI,uBAAsB,0BAAY;AAAA,gBAAI;AAAA,iBAC3I,GACF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,cAAY,EAAE,WAAW;AAAA,kBACzB,eAAY;AAAA,kBACZ,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,SAAS,EAAE,cAAc;AAAA,kBACzB,OAAO,KAAK,MAAM;AAAA,kBAClB,SAAS,KAAK;AAAA,kBACd,UAAU,KAAK;AAAA;AAAA,cACjB;AAAA,cACA,oBAAC,SACC;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAY;AAAA,kBACZ,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,UAAU,KAAK,MAAM,SAAS,SAAS;AAAA,kBACxC;AAAA;AAAA,cAAa,GAChB;AAAA,eACF,GACF;AAAA,YAEA,qBAAC,aAAQ,WAAU,yDACjB;AAAA,kCAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,cACzB,oBAAC,OACE,YAAE,0DAA0D,GAC/D;AAAA,cACA,oBAAC,SAAI,WAAU,oCACZ,wBACH;AAAA,eACF;AAAA;AAAA;AAAA,MACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,CAAC,CAAC,KAAK,MAAM;AAAA,UACrB,OAAO,EAAE,eAAe;AAAA,UACxB,UAAU,CAAC,MAAa,KAAK,sBAAsB,CAAC;AAAA,UACpD,SAAS,EAAE,2BAA2B,EAAE,YAAY,KAAK,MAAM,iBAAiB,CAAC;AAAA;AAAA,MACnF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d4f8026b776b122e7b65ed69768690d48acd1cde"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Zn=function(){return a},a}Zn();class Oke extends Mn.Component{render(){return Zn().f[0]++,Zn().s[0]++,G.jsx("div",{className:"maputnik-public-style",children:G.jsxs(is,{className:"maputnik-public-style-button","aria-label":this.props.title,onClick:()=>(Zn().f[1]++,Zn().s[1]++,this.props.onSelect(this.props.url)),children:[G.jsxs("div",{className:"maputnik-public-style-header",children:[G.jsx("div",{children:this.props.title}),G.jsx("span",{className:"maputnik-space"}),G.jsx(ij,{})]}),G.jsx("div",{className:"maputnik-public-style-thumbnail",style:{backgroundImage:`url(${this.props.thumbnailUrl})`}})]})})}}class Bke extends Mn.Component{constructor(t){Zn().f[2]++,Zn().s[2]++;super(t);sn(this,"onStyleSelect",(Zn().s[10]++,t=>{Zn().f[5]++,Zn().s[11]++,this.clearError();let r=(Zn().s[12]++,!1);Zn().s[13]++,fetch(t,{mode:"cors",credentials:"same-origin"}).then(function(i){return Zn().f[6]++,Zn().s[14]++,i.json()}).then(i=>{if(Zn().f[7]++,Zn().s[15]++,r){Zn().b[2][0]++,Zn().s[16]++;return}else Zn().b[2][1]++;Zn().s[17]++,this.setState({activeRequest:null,activeRequestUrl:null});const o=(Zn().s[18]++,Ru.ensureStyleValidity(i));Zn().s[19]++,console.log("Loaded style ",o.id),Zn().s[20]++,this.props.onStyleOpen(o),Zn().s[21]++,this.onOpenToggle()}).catch(i=>{Zn().f[8]++,Zn().s[22]++,this.setState({error:`Failed to load: '${t}'`,activeRequest:null,activeRequestUrl:null}),Zn().s[23]++,console.error(i),Zn().s[24]++,console.warn("Could not open the style URL",t)}),Zn().s[25]++,this.setState({activeRequest:{abort:function(){Zn().f[9]++,Zn().s[26]++,r=!0}},activeRequestUrl:t})}));sn(this,"onSubmitUrl",(Zn().s[27]++,t=>{Zn().f[10]++,Zn().s[28]++,t.preventDefault(),Zn().s[29]++,this.onStyleSelect(this.state.styleUrl)}));sn(this,"onUpload",(Zn().s[30]++,(t,r)=>{Zn().f[11]++;const[,i]=(Zn().s[31]++,r[0]),o=(Zn().s[32]++,new FileReader);Zn().s[33]++,this.clearError(),Zn().s[34]++,o.readAsText(i,"UTF-8"),Zn().s[35]++,o.onload=a=>{var d;Zn().f[12]++;let s;Zn().s[36]++;try{Zn().s[37]++,s=JSON.parse((d=a.target)==null?void 0:d.result)}catch(f){Zn().s[38]++,this.setState({error:f.toString()}),Zn().s[39]++;return}Zn().s[40]++,s=Ru.ensureStyleValidity(s),Zn().s[41]++,this.props.onStyleOpen(s),Zn().s[42]++,this.onOpenToggle()},Zn().s[43]++,o.onerror=a=>(Zn().f[13]++,Zn().s[44]++,console.log(a.target))}));sn(this,"onChangeUrl",(Zn().s[48]++,t=>{Zn().f[15]++,Zn().s[49]++,this.setState({styleUrl:t})}));Zn().s[3]++,this.state={styleUrl:""}}clearError(){Zn().f[3]++,Zn().s[4]++,this.setState({error:null})}onCancelActiveRequest(t){Zn().f[4]++,Zn().s[5]++,t?(Zn().b[0][0]++,Zn().s[6]++,t.stopPropagation()):Zn().b[0][1]++,Zn().s[7]++,this.state.activeRequest?(Zn().b[1][0]++,Zn().s[8]++,this.state.activeRequest.abort(),Zn().s[9]++,this.setState({activeRequest:null,activeRequestUrl:null})):Zn().b[1][1]++}onOpenToggle(){Zn().f[14]++,Zn().s[45]++,this.setState({styleUrl:""}),Zn().s[46]++,this.clearError(),Zn().s[47]++,this.props.onOpenToggle()}render(){Zn().f[16]++;const t=(Zn().s[50]++,this.props.t),r=(Zn().s[51]++,HQ.map(o=>(Zn().f[17]++,Zn().s[52]++,G.jsx(Oke,{url:o.url,title:o.title,thumbnailUrl:o.thumbnail,onSelect:this.onStyleSelect},o.id))));let i;return Zn().s[53]++,this.state.error?(Zn().b[3][0]++,Zn().s[54]++,i=G.jsxs("div",{className:"maputnik-modal-error",children:[this.state.error,G.jsx("a",{href:"#",onClick:()=>(Zn().f[18]++,Zn().s[55]++,this.clearError()),className:"maputnik-modal-error-close",children:"×"})]})):Zn().b[3][1]++,Zn().s[56]++,G.jsxs("div",{children:[G.jsxs(g0,{"data-wd-key":"modal:open",isOpen:this.props.isOpen,onOpenToggle:()=>(Zn().f[19]++,Zn().s[57]++,this.onOpenToggle()),title:t("Open Style"),children:[i,G.jsxs("section",{className:"maputnik-modal-section",children:[G.jsx("h1",{children:t("Upload Style")}),G.jsx("p",{children:t("Upload a JSON style from your computer.")}),G.jsx(Mke,{onChange:this.onUpload,tabIndex:-1,"aria-label":t("Style file"),children:G.jsxs(is,{className:"maputnik-upload-button",children:[G.jsx(kre,{})," ",t("Upload")]})})]}),G.jsx("section",{className:"maputnik-modal-section",children:G.jsxs("form",{onSubmit:this.onSubmitUrl,children:[G.jsx("h1",{children:t("Load from URL")}),G.jsx("p",{children:G.jsxs(e0,{t,children:["Load from a URL. Note that the URL must have ",G.jsx("a",{href:"https://enable-cors.org",target:"_blank",rel:"noopener noreferrer",children:"CORS enabled"}),"."]})}),G.jsx(xk,{"aria-label":t("Style URL"),"data-wd-key":"modal:open.url.input",type:"text",className:"maputnik-input",default:t("Enter URL..."),value:this.state.styleUrl,onInput:this.onChangeUrl,onChange:this.onChangeUrl}),G.jsx("div",{children:G.jsx(is,{"data-wd-key":"modal:open.url.button",type:"submit",className:"maputnik-big-button",disabled:this.state.styleUrl.length<1,children:"Load from URL"})})]})}),G.jsxs("section",{className:"maputnik-modal-section maputnik-modal-section--shrink",children:[G.jsx("h1",{children:t("Gallery Styles")}),G.jsx("p",{children:t("Open one of the publicly available styles to start from.")}),G.jsx("div",{className:"maputnik-style-gallery-container",children:r})]})]}),G.jsx(Eke,{isOpen:!!this.state.activeRequest,title:t("Loading style"),onCancel:o=>(Zn().f[20]++,Zn().s[58]++,this.onCancelActiveRequest(o)),message:t("Loading: {{requestUrl}}",{requestUrl:this.state.activeRequestUrl})})]})}}const Ike=(Zn().s[59]++,No()(Bke));function Kd(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx",e="2fa0c1760625a188da3b2788fa0924b96bb7f3e1",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:26}},1:{start:{line:8,column:17},end:{line:41,column:5}},2:{start:{line:42,column:25},end:{line:115,column:5}},3:{start:{line:116,column:4},end:{line:145,column:6}},4:{start:{line:130,column:12},end:{line:133,column:22}},5:{start:{line:137,column:12},end:{line:141,column:22}},6:{start:{line:148,column:23},end:{line:148,column:64}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:146,column:3}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:129,column:57},end:{line:129,column:58}},loc:{start:{line:129,column:72},end:{line:134,column:11}},line:129},2:{name:"(anonymous_2)",decl:{start:{line:136,column:65},end:{line:136,column:66}},loc:{start:{line:136,column:80},end:{line:142,column:11}},line:136}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx"],names:[],mappings:"AAiBa,SAwCA,UAxCA,KAwCA,YAxCA;AAjBb,OAAO,WAAW;AAClB,SAAS,OAAwB,uBAAuB;AAExD,OAAO,WAAW;AASlB,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,OAAO;AAAA,MACX;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,gBAAgB;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,YAAY;AAAA,MACtB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,cAAc;AAAA,MACxB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,oBAAoB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,sBAAsB;AAAA,MAChC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,gBAAgB;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,WAAW;AAAA,MACrB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,aAAa;AAAA,MACvB;AAAA,IACF;AAGA,UAAM,eAAe;AAAA,MACnB;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,eAAC;AAAA,WAAM;AAAA,QACtC,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,eAAC;AAAA,WAAM;AAAA,QACtC,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,gBAAE;AAAA,QACZ,MAAM,EAAE,uBAAwB;AAAA,MAClC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,kBAAI;AAAA,QACd,MAAM,EAAE,yBAA0B;AAAA,MACpC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,kBAAI;AAAA,QACd,MAAM,EAAE,yBAA0B;AAAA,MACpC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,mBAAK;AAAA,QACf,MAAM,EAAE,0BAA2B;AAAA,MACrC;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,mBAAK;AAAA,WAAM;AAAA,QAC1C,MAAM,EAAE,sCAAuC;AAAA,MACjD;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,kBAAI;AAAA,WAAM;AAAA,QACzC,MAAM,EAAE,sCAAsC;AAAA,MAChD;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,gBAAE;AAAA,WAAM;AAAA,QACvC,MAAM,EAAE,mCAAmC;AAAA,MAC7C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,kBAAI;AAAA,WAAM;AAAA,QACzC,MAAM,EAAE,mCAAmC;AAAA,MAC7C;AAAA,IACF;AAGA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,WAAW;AAAA,QAEpB,+BAAC,aAAQ,WAAU,mDACjB;AAAA,8BAAC,OACC,+BAAC,SAAM,GAAM;AAAA;AAAA,YACL,oBAAC,UAAK,iBAAG;AAAA,YAAO;AAAA,aACxB,GACF;AAAA,UACA,oBAAC,QACE,eAAK,IAAI,CAAC,MAAM,QAAQ;AACvB,mBAAO,qBAAC,SAAc,WAAU,sCAC9B;AAAA,kCAAC,QAAmB,eAAK,OAAhB,OAAK,GAAe;AAAA,cAC7B,oBAAC,QAAmB,eAAK,QAAhB,OAAK,GAAgB;AAAA,iBAFf,GAGjB;AAAA,UACF,CAAC,GACH;AAAA,UACA,oBAAC,OAAG,YAAE,8DAA8D,GAAE;AAAA,UACtE,oBAAC,QACE,uBAAa,IAAI,CAAC,MAAM,QAAQ;AAC/B,mBAAO,qBAAC,QACN;AAAA,kCAAC,UAAM,eAAK,KAAI;AAAA,cAAO;AAAA,cAAE,KAAK;AAAA,iBADhB,GAEhB;AAAA,UACF,CAAC,GACH;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB,gBAAgB,EAAE,sBAAsB;AAC/D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2fa0c1760625a188da3b2788fa0924b96bb7f3e1"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Kd=function(){return a},a}Kd();class kke extends Mn.Component{render(){Kd().f[0]++;const e=(Kd().s[0]++,this.props.t),t=(Kd().s[1]++,[{key:G.jsx("kbd",{children:"?"}),text:e("Shortcuts menu")},{key:G.jsx("kbd",{children:"o"}),text:e("Open modal")},{key:G.jsx("kbd",{children:"e"}),text:e("Export modal")},{key:G.jsx("kbd",{children:"d"}),text:e("Data Sources modal")},{key:G.jsx("kbd",{children:"s"}),text:e("Style Settings modal")},{key:G.jsx("kbd",{children:"i"}),text:e("Toggle inspect")},{key:G.jsx("kbd",{children:"m"}),text:e("Focus map")},{key:G.jsx("kbd",{children:"!"}),text:e("Debug modal")}]),r=(Kd().s[2]++,[{key:G.jsx("kbd",{children:"+"}),text:e("Increase the zoom level by 1.")},{key:G.jsxs(G.Fragment,{children:[G.jsx("kbd",{children:"Shift"})," + ",G.jsx("kbd",{children:"+"})]}),text:e("Increase the zoom level by 2.")},{key:G.jsx("kbd",{children:"-"}),text:e("Decrease the zoom level by 1.")},{key:G.jsxs(G.Fragment,{children:[G.jsx("kbd",{children:"Shift"})," + ",G.jsx("kbd",{children:"-"})]}),text:e("Decrease the zoom level by 2.")},{key:G.jsx("kbd",{children:"Up"}),text:e("Pan up by 100 pixels.")},{key:G.jsx("kbd",{children:"Down"}),text:e("Pan down by 100 pixels.")},{key:G.jsx("kbd",{children:"Left"}),text:e("Pan left by 100 pixels.")},{key:G.jsx("kbd",{children:"Right"}),text:e("Pan right by 100 pixels.")},{key:G.jsxs(G.Fragment,{children:[G.jsx("kbd",{children:"Shift"})," + ",G.jsx("kbd",{children:"Right"})]}),text:e("Increase the rotation by 15 degrees.")},{key:G.jsxs(G.Fragment,{children:[G.jsx("kbd",{children:"Shift"})," + ",G.jsx("kbd",{children:"Left"})]}),text:e("Decrease the rotation by 15 degrees.")},{key:G.jsxs(G.Fragment,{children:[G.jsx("kbd",{children:"Shift"})," + ",G.jsx("kbd",{children:"Up"})]}),text:e("Increase the pitch by 10 degrees.")},{key:G.jsxs(G.Fragment,{children:[G.jsx("kbd",{children:"Shift"})," + ",G.jsx("kbd",{children:"Down"})]}),text:e("Decrease the pitch by 10 degrees.")}]);return Kd().s[3]++,G.jsx(g0,{"data-wd-key":"modal:shortcuts",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Shortcuts"),children:G.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[G.jsx("p",{children:G.jsxs(e0,{t:e,children:["Press ",G.jsx("code",{children:"ESC"})," to lose focus of any active elements, then press one of:"]})}),G.jsx("dl",{children:t.map((i,o)=>(Kd().f[1]++,Kd().s[4]++,G.jsxs("div",{className:"maputnik-modal-shortcuts__shortcut",children:[G.jsx("dt",{children:i.key},"dt"+o),G.jsx("dd",{children:i.text},"dd"+o)]},o)))}),G.jsx("p",{children:e("If the Map is in focused you can use the following shortcuts")}),G.jsx("ul",{children:r.map((i,o)=>(Kd().f[2]++,Kd().s[5]++,G.jsxs("li",{children:[G.jsx("span",{children:i.key})," ",i.text]},o)))})]})})}}const Tke=(Kd().s[6]++,No()(kke));function yl(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx",e="a1d210f2dd55b03f0e8aae655258e8184b2d45b3",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx",statementMap:{0:{start:{line:7,column:27},end:{line:7,column:37}},1:{start:{line:8,column:20},end:{line:8,column:48}},2:{start:{line:9,column:19},end:{line:9,column:49}},3:{start:{line:10,column:19},end:{line:10,column:49}},4:{start:{line:11,column:4},end:{line:53,column:6}},5:{start:{line:22,column:14},end:{line:26,column:27}},6:{start:{line:23,column:96},end:{line:23,column:153}},7:{start:{line:29,column:14},end:{line:33,column:27}},8:{start:{line:30,column:96},end:{line:30,column:153}},9:{start:{line:56,column:19},end:{line:56,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:54,column:3}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:21,column:140},end:{line:21,column:141}},loc:{start:{line:21,column:156},end:{line:27,column:13}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:23,column:89},end:{line:23,column:90}},loc:{start:{line:23,column:96},end:{line:23,column:153}},line:23},3:{name:"(anonymous_3)",decl:{start:{line:28,column:136},end:{line:28,column:137}},loc:{start:{line:28,column:152},end:{line:34,column:13}},line:28},4:{name:"(anonymous_4)",decl:{start:{line:30,column:89},end:{line:30,column:90}},loc:{start:{line:30,column:96},end:{line:30,column:153}},line:30}},branchMap:{0:{loc:{start:{line:21,column:12},end:{line:27,column:17}},type:"binary-expr",locations:[{start:{line:21,column:12},end:{line:21,column:44}},{start:{line:21,column:64},end:{line:27,column:17}}],line:21},1:{loc:{start:{line:28,column:12},end:{line:34,column:17}},type:"binary-expr",locations:[{start:{line:28,column:12},end:{line:28,column:40}},{start:{line:28,column:60},end:{line:34,column:17}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx"],names:[],mappings:"AAuCQ,cAKQ,YALR;AAvCR,OAAO,WAAW;AAElB,SAAS,OAAwB,uBAAuB;AACxD,OAAO,WAAW;AAqBlB,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,SAAS;AACP,UAAM,EAAC,GAAG,QAAO,IAAI,KAAK;AAE1B,UAAM,UAAU,KAAK,MAAM,QAAQ,IAAI,IAAE;AACzC,UAAM,SAAS,CAAE,QAAQ,OAAO,IAAK,QAAQ,CAAC;AAC9C,UAAM,SAAS,CAAE,QAAQ,OAAO,IAAK,QAAQ,CAAC;AAE9C,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,OAAO;AAAA,QAEhB;AAAA,+BAAC,aAAQ,WAAU,mDACjB;AAAA,gCAAC,QAAI,YAAE,SAAS,GAAE;AAAA,YACjB,KAAK,MAAM,aAAa,YACvB,oBAAC,QACE,iBAAO,QAAQ,KAAK,MAAM,sBAAuB,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM;AACtE,qBAAO,oBAAC,QACN,+BAAC,WACC;AAAA,oCAAC,WAAM,MAAK,YAAW,SAAS,KAAK,UAAU,CAAC,MAAM,KAAK,MAAM,wBAAwB,KAAK,EAAE,OAAO,OAAO,GAAG;AAAA,gBAAE;AAAA,gBAAE;AAAA,iBACvH,KAHc,GAIhB;AAAA,YACF,CAAC,GACH;AAAA,YAED,KAAK,MAAM,aAAa,QACvB,oBAAC,QACE,iBAAO,QAAQ,KAAK,MAAM,sBAAuB,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM;AACtE,qBAAO,oBAAC,QACN,+BAAC,WACC;AAAA,oCAAC,WAAM,MAAK,YAAW,SAAS,KAAK,UAAU,CAAC,MAAM,KAAK,MAAM,wBAAwB,KAAK,EAAE,OAAO,OAAO,GAAG;AAAA,gBAAE;AAAA,gBAAE;AAAA,iBACvH,KAHc,GAIhB;AAAA,YACF,CAAC,GACH;AAAA,aAEJ;AAAA,UACA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAG,mBAAK;AAAA,YACT,oBAAC,OACC,+BAAC,SAAM,GACL;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,QAAO;AAAA,kBACP,KAAI;AAAA,kBACJ,MAAM,sCAAsC,OAAO,IAAI,MAAM,IAAI,MAAM;AAAA,kBACxE;AAAA;AAAA,cAED;AAAA,cAAI;AAAA,eACN,GACF;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a1d210f2dd55b03f0e8aae655258e8184b2d45b3"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return yl=function(){return a},a}yl();class Kke extends Mn.Component{render(){yl().f[0]++;const{t:e,mapView:t}=(yl().s[0]++,this.props),r=(yl().s[1]++,Math.round(t.zoom)+1),i=(yl().s[2]++,+t.center.lng.toFixed(5)),o=(yl().s[3]++,+t.center.lat.toFixed(5));return yl().s[4]++,G.jsxs(g0,{"data-wd-key":"modal:debug",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Debug"),children:[G.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[G.jsx("h1",{children:e("Options")}),(yl().b[0][0]++,this.props.renderer==="mlgljs"&&(yl().b[0][1]++,G.jsx("ul",{children:Object.entries(this.props.maplibreGlDebugOptions).map(([a,s])=>(yl().f[1]++,yl().s[5]++,G.jsx("li",{children:G.jsxs("label",{children:[G.jsx("input",{type:"checkbox",checked:s,onChange:d=>(yl().f[2]++,yl().s[6]++,this.props.onChangeMaplibreGlDebug(a,d.target.checked))})," ",a]})},a)))}))),(yl().b[1][0]++,this.props.renderer==="ol"&&(yl().b[1][1]++,G.jsx("ul",{children:Object.entries(this.props.openlayersDebugOptions).map(([a,s])=>(yl().f[3]++,yl().s[7]++,G.jsx("li",{children:G.jsxs("label",{children:[G.jsx("input",{type:"checkbox",checked:s,onChange:d=>(yl().f[4]++,yl().s[8]++,this.props.onChangeOpenlayersDebug(a,d.target.checked))})," ",a]})},a)))})))]}),G.jsxs("section",{className:"maputnik-modal-section",children:[G.jsx("h1",{children:"Links"}),G.jsx("p",{children:G.jsxs(e0,{t:e,children:[G.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:`https://www.openstreetmap.org/#map=${r}/${o}/${i}`,children:"Open in OSM"})," — Opens the current view on openstreetmap.org"]})})]})]})}}const Pke=(yl().s[9]++,No()(Kke));var j1={},O5={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */O5.exports;(function(n,e){(function(t){var r=e&&!e.nodeType&&e,i=n&&!n.nodeType&&n,o=typeof window=="object"&&window;(o.global===o||o.window===o||o.self===o)&&(t=o);var a,s=2147483647,d=36,f=1,C=26,O=38,E=700,P=72,D=128,$="-",H=/^xn--/,Q=/[^\x20-\x7E]/,N=/[\x2E\u3002\uFF0E\uFF61]/g,Z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ae=d-f,pe=Math.floor,fe=String.fromCharCode,X;function oe(Re){throw new RangeError(Z[Re])}function Ce(Re,Ve){for(var Xe=Re.length,Jt=[];Xe--;)Jt[Xe]=Ve(Re[Xe]);return Jt}function we(Re,Ve){var Xe=Re.split("@"),Jt="";Xe.length>1&&(Jt=Xe[0]+"@",Re=Xe[1]),Re=Re.replace(N,".");var Ht=Re.split("."),bt=Ce(Ht,Ve).join(".");return Jt+bt}function Te(Re){for(var Ve=[],Xe=0,Jt=Re.length,Ht,bt;Xe<Jt;)Ht=Re.charCodeAt(Xe++),Ht>=55296&&Ht<=56319&&Xe<Jt?(bt=Re.charCodeAt(Xe++),(bt&64512)==56320?Ve.push(((Ht&1023)<<10)+(bt&1023)+65536):(Ve.push(Ht),Xe--)):Ve.push(Ht);return Ve}function Pe(Re){return Ce(Re,function(Ve){var Xe="";return Ve>65535&&(Ve-=65536,Xe+=fe(Ve>>>10&1023|55296),Ve=56320|Ve&1023),Xe+=fe(Ve),Xe}).join("")}function he(Re){return Re-48<10?Re-22:Re-65<26?Re-65:Re-97<26?Re-97:d}function $e(Re,Ve){return Re+22+75*(Re<26)-((Ve!=0)<<5)}function ye(Re,Ve,Xe){var Jt=0;for(Re=Xe?pe(Re/E):Re>>1,Re+=pe(Re/Ve);Re>ae*C>>1;Jt+=d)Re=pe(Re/ae);return pe(Jt+(ae+1)*Re/(Re+O))}function gt(Re){var Ve=[],Xe=Re.length,Jt,Ht=0,bt=D,Qt=P,Yt,ke,ge,Se,ze,it,ot,St,Rt;for(Yt=Re.lastIndexOf($),Yt<0&&(Yt=0),ke=0;ke<Yt;++ke)Re.charCodeAt(ke)>=128&&oe("not-basic"),Ve.push(Re.charCodeAt(ke));for(ge=Yt>0?Yt+1:0;ge<Xe;){for(Se=Ht,ze=1,it=d;ge>=Xe&&oe("invalid-input"),ot=he(Re.charCodeAt(ge++)),(ot>=d||ot>pe((s-Ht)/ze))&&oe("overflow"),Ht+=ot*ze,St=it<=Qt?f:it>=Qt+C?C:it-Qt,!(ot<St);it+=d)Rt=d-St,ze>pe(s/Rt)&&oe("overflow"),ze*=Rt;Jt=Ve.length+1,Qt=ye(Ht-Se,Jt,Se==0),pe(Ht/Jt)>s-bt&&oe("overflow"),bt+=pe(Ht/Jt),Ht%=Jt,Ve.splice(Ht++,0,bt)}return Pe(Ve)}function yt(Re){var Ve,Xe,Jt,Ht,bt,Qt,Yt,ke,ge,Se,ze,it=[],ot,St,Rt,zt;for(Re=Te(Re),ot=Re.length,Ve=D,Xe=0,bt=P,Qt=0;Qt<ot;++Qt)ze=Re[Qt],ze<128&&it.push(fe(ze));for(Jt=Ht=it.length,Ht&&it.push($);Jt<ot;){for(Yt=s,Qt=0;Qt<ot;++Qt)ze=Re[Qt],ze>=Ve&&ze<Yt&&(Yt=ze);for(St=Jt+1,Yt-Ve>pe((s-Xe)/St)&&oe("overflow"),Xe+=(Yt-Ve)*St,Ve=Yt,Qt=0;Qt<ot;++Qt)if(ze=Re[Qt],ze<Ve&&++Xe>s&&oe("overflow"),ze==Ve){for(ke=Xe,ge=d;Se=ge<=bt?f:ge>=bt+C?C:ge-bt,!(ke<Se);ge+=d)zt=ke-Se,Rt=d-Se,it.push(fe($e(Se+zt%Rt,0))),ke=pe(zt/Rt);it.push(fe($e(ke,0))),bt=ye(Xe,St,Jt==Ht),Xe=0,++Jt}++Xe,++Ve}return it.join("")}function st(Re){return we(Re,function(Ve){return H.test(Ve)?gt(Ve.slice(4).toLowerCase()):Ve})}function ft(Re){return we(Re,function(Ve){return Q.test(Ve)?"xn--"+yt(Ve):Ve})}if(a={version:"1.4.1",ucs2:{decode:Te,encode:Pe},decode:gt,encode:yt,toASCII:ft,toUnicode:st},r&&i)if(n.exports==r)i.exports=a;else for(X in a)a.hasOwnProperty(X)&&(r[X]=a[X]);else t.punycode=a})(Vf)})(O5,O5.exports);var Dke=O5.exports,Lke=Error,Fke=EvalError,Uke=RangeError,Rke=ReferenceError,ZQ=SyntaxError,yx=TypeError,zke=URIError,jke=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0},ML=typeof Symbol<"u"&&Symbol,Nke=jke,Wke=function(){return typeof ML!="function"||typeof Symbol!="function"||typeof ML("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Nke()},RE={__proto__:null,foo:{}},Gke=Object,$ke=function(){return{__proto__:RE}.foo===RE.foo&&!(RE instanceof Gke)},Qke="Function.prototype.bind called on incompatible ",Yke=Object.prototype.toString,qke=Math.max,Vke="[object Function]",SL=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},Hke=function(e,t){for(var r=[],i=t||0,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},Zke=function(n,e){for(var t="",r=0;r<n.length;r+=1)t+=n[r],r+1<n.length&&(t+=e);return t},Xke=function(e){var t=this;if(typeof t!="function"||Yke.apply(t)!==Vke)throw new TypeError(Qke+t);for(var r=Hke(arguments,1),i,o=function(){if(this instanceof i){var C=t.apply(this,SL(r,arguments));return Object(C)===C?C:this}return t.apply(e,SL(r,arguments))},a=qke(0,t.length-r.length),s=[],d=0;d<a;d++)s[d]="$"+d;if(i=Function("binder","return function ("+Zke(s,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var f=function(){};f.prototype=t.prototype,i.prototype=new f,f.prototype=null}return i},Jke=Xke,Ek=Function.prototype.bind||Jke,e9e=Function.prototype.call,t9e=Object.prototype.hasOwnProperty,n9e=Ek,r9e=n9e.call(e9e,t9e),Eo,i9e=Lke,o9e=Fke,a9e=Uke,s9e=Rke,Cv=ZQ,nv=yx,l9e=zke,XQ=Function,zE=function(n){try{return XQ('"use strict"; return ('+n+").constructor;")()}catch{}},M1=Object.getOwnPropertyDescriptor;if(M1)try{M1({},"")}catch{M1=null}var jE=function(){throw new nv},u9e=M1?function(){try{return arguments.callee,jE}catch{try{return M1(arguments,"callee").get}catch{return jE}}}():jE,$g=Wke(),A9e=$ke(),yu=Object.getPrototypeOf||(A9e?function(n){return n.__proto__}:null),ny={},c9e=typeof Uint8Array>"u"||!yu?Eo:yu(Uint8Array),S1={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Eo:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Eo:ArrayBuffer,"%ArrayIteratorPrototype%":$g&&yu?yu([][Symbol.iterator]()):Eo,"%AsyncFromSyncIteratorPrototype%":Eo,"%AsyncFunction%":ny,"%AsyncGenerator%":ny,"%AsyncGeneratorFunction%":ny,"%AsyncIteratorPrototype%":ny,"%Atomics%":typeof Atomics>"u"?Eo:Atomics,"%BigInt%":typeof BigInt>"u"?Eo:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Eo:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Eo:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Eo:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i9e,"%eval%":eval,"%EvalError%":o9e,"%Float32Array%":typeof Float32Array>"u"?Eo:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Eo:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Eo:FinalizationRegistry,"%Function%":XQ,"%GeneratorFunction%":ny,"%Int8Array%":typeof Int8Array>"u"?Eo:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Eo:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Eo:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$g&&yu?yu(yu([][Symbol.iterator]())):Eo,"%JSON%":typeof JSON=="object"?JSON:Eo,"%Map%":typeof Map>"u"?Eo:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$g||!yu?Eo:yu(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Eo:Promise,"%Proxy%":typeof Proxy>"u"?Eo:Proxy,"%RangeError%":a9e,"%ReferenceError%":s9e,"%Reflect%":typeof Reflect>"u"?Eo:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Eo:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$g||!yu?Eo:yu(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Eo:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$g&&yu?yu(""[Symbol.iterator]()):Eo,"%Symbol%":$g?Symbol:Eo,"%SyntaxError%":Cv,"%ThrowTypeError%":u9e,"%TypedArray%":c9e,"%TypeError%":nv,"%Uint8Array%":typeof Uint8Array>"u"?Eo:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Eo:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Eo:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Eo:Uint32Array,"%URIError%":l9e,"%WeakMap%":typeof WeakMap>"u"?Eo:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Eo:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Eo:WeakSet};if(yu)try{null.error}catch(n){var d9e=yu(yu(n));S1["%Error.prototype%"]=d9e}var h9e=function n(e){var t;if(e==="%AsyncFunction%")t=zE("async function () {}");else if(e==="%GeneratorFunction%")t=zE("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=zE("async function* () {}");else if(e==="%AsyncGenerator%"){var r=n("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&yu&&(t=yu(i.prototype))}return S1[e]=t,t},EL={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vx=Ek,B5=r9e,f9e=vx.call(Function.call,Array.prototype.concat),p9e=vx.call(Function.apply,Array.prototype.splice),OL=vx.call(Function.call,String.prototype.replace),I5=vx.call(Function.call,String.prototype.slice),m9e=vx.call(Function.call,RegExp.prototype.exec),g9e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,y9e=/\\(\\)?/g,v9e=function(e){var t=I5(e,0,1),r=I5(e,-1);if(t==="%"&&r!=="%")throw new Cv("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&t!=="%")throw new Cv("invalid intrinsic syntax, expected opening `%`");var i=[];return OL(e,g9e,function(o,a,s,d){i[i.length]=s?OL(d,y9e,"$1"):a||o}),i},C9e=function(e,t){var r=e,i;if(B5(EL,r)&&(i=EL[r],r="%"+i[0]+"%"),B5(S1,r)){var o=S1[r];if(o===ny&&(o=h9e(r)),typeof o>"u"&&!t)throw new nv("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Cv("intrinsic "+e+" does not exist!")},Gv=function(e,t){if(typeof e!="string"||e.length===0)throw new nv("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new nv('"allowMissing" argument must be a boolean');if(m9e(/^%?[^%]*%?$/,e)===null)throw new Cv("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=v9e(e),i=r.length>0?r[0]:"",o=C9e("%"+i+"%",t),a=o.name,s=o.value,d=!1,f=o.alias;f&&(i=f[0],p9e(r,f9e([0,1],f)));for(var C=1,O=!0;C<r.length;C+=1){var E=r[C],P=I5(E,0,1),D=I5(E,-1);if((P==='"'||P==="'"||P==="`"||D==='"'||D==="'"||D==="`")&&P!==D)throw new Cv("property names with quotes must have matching quotes");if((E==="constructor"||!O)&&(d=!0),i+="."+E,a="%"+i+"%",B5(S1,a))s=S1[a];else if(s!=null){if(!(E in s)){if(!t)throw new nv("base intrinsic for "+e+" exists, but the property is not available.");return}if(M1&&C+1>=r.length){var $=M1(s,E);O=!!$,O&&"get"in $&&!("originalValue"in $.get)?s=$.get:s=s[E]}else O=B5(s,E),s=s[E];O&&!d&&(S1[a]=s)}}return s},JQ={exports:{}},NE,BL;function Ok(){if(BL)return NE;BL=1;var n=Gv,e=n("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return NE=e,NE}var _9e=Gv,k3=_9e("%Object.getOwnPropertyDescriptor%",!0);if(k3)try{k3([],"length")}catch{k3=null}var eY=k3,IL=Ok(),b9e=ZQ,Qg=yx,kL=eY,x9e=function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Qg("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Qg("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qg("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qg("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qg("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qg("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,d=!!kL&&kL(e,t);if(IL)IL(e,t,{configurable:a===null&&d?d.configurable:!a,enumerable:i===null&&d?d.enumerable:!i,value:r,writable:o===null&&d?d.writable:!o});else if(s||!i&&!o&&!a)e[t]=r;else throw new b9e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},FB=Ok(),tY=function(){return!!FB};tY.hasArrayLengthDefineBug=function(){if(!FB)return null;try{return FB([],"length",{value:1}).length!==1}catch{return!0}};var w9e=tY,M9e=Gv,TL=x9e,S9e=w9e(),KL=eY,PL=yx,E9e=M9e("%Math.floor%"),O9e=function(e,t){if(typeof e!="function")throw new PL("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||E9e(t)!==t)throw new PL("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&KL){var a=KL(e,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!r)&&(S9e?TL(e,"length",t,!0,!0):TL(e,"length",t)),e};(function(n){var e=Ek,t=Gv,r=O9e,i=yx,o=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(a,o),d=Ok(),f=t("%Math.max%");n.exports=function(E){if(typeof E!="function")throw new i("a function is required");var P=s(e,a,arguments);return r(P,1+f(0,E.length-(arguments.length-1)),!0)};var C=function(){return s(e,o,arguments)};d?d(n.exports,"apply",{value:C}):n.exports.apply=C})(JQ);var B9e=JQ.exports,nY=Gv,rY=B9e,I9e=rY(nY("String.prototype.indexOf")),k9e=function(e,t){var r=nY(e,!!t);return typeof r=="function"&&I9e(e,".prototype.")>-1?rY(r):r};const T9e={},K9e=Object.freeze(Object.defineProperty({__proto__:null,default:T9e},Symbol.toStringTag,{value:"Module"})),P9e=VB(K9e);var Bk=typeof Map=="function"&&Map.prototype,WE=Object.getOwnPropertyDescriptor&&Bk?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,k5=Bk&&WE&&typeof WE.get=="function"?WE.get:null,DL=Bk&&Map.prototype.forEach,Ik=typeof Set=="function"&&Set.prototype,GE=Object.getOwnPropertyDescriptor&&Ik?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,T5=Ik&&GE&&typeof GE.get=="function"?GE.get:null,LL=Ik&&Set.prototype.forEach,D9e=typeof WeakMap=="function"&&WeakMap.prototype,T_=D9e?WeakMap.prototype.has:null,L9e=typeof WeakSet=="function"&&WeakSet.prototype,K_=L9e?WeakSet.prototype.has:null,F9e=typeof WeakRef=="function"&&WeakRef.prototype,FL=F9e?WeakRef.prototype.deref:null,U9e=Boolean.prototype.valueOf,R9e=Object.prototype.toString,z9e=Function.prototype.toString,j9e=String.prototype.match,kk=String.prototype.slice,$m=String.prototype.replace,N9e=String.prototype.toUpperCase,UL=String.prototype.toLowerCase,iY=RegExp.prototype.test,RL=Array.prototype.concat,If=Array.prototype.join,W9e=Array.prototype.slice,zL=Math.floor,UB=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$E=Object.getOwnPropertySymbols,RB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_v=typeof Symbol=="function"&&typeof Symbol.iterator=="object",yA=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_v||!0)?Symbol.toStringTag:null,oY=Object.prototype.propertyIsEnumerable,jL=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function NL(n,e){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||iY.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-zL(-n):zL(n);if(r!==n){var i=String(r),o=kk.call(e,i.length+1);return $m.call(i,t,"$&_")+"."+$m.call($m.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $m.call(e,t,"$&_")}var zB=P9e,WL=zB.custom,GL=sY(WL)?WL:null,G9e=function n(e,t,r,i){var o=t||{};if(Km(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Km(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Km(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Km(o,"indent")&&o.indent!==null&&o.indent!=="	"&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Km(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return uY(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return s?NL(e,d):d}if(typeof e=="bigint"){var f=String(e)+"n";return s?NL(e,f):f}var C=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=C&&C>0&&typeof e=="object")return jB(e)?"[Array]":"[Object]";var O=lTe(o,r);if(typeof i>"u")i=[];else if(lY(i,e)>=0)return"[Circular]";function E(he,$e,ye){if($e&&(i=W9e.call(i),i.push($e)),ye){var gt={depth:o.depth};return Km(o,"quoteStyle")&&(gt.quoteStyle=o.quoteStyle),n(he,gt,r+1,i)}return n(he,o,r+1,i)}if(typeof e=="function"&&!$L(e)){var P=J9e(e),D=n3(e,E);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(D.length>0?" { "+If.call(D,", ")+" }":"")}if(sY(e)){var $=_v?$m.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):RB.call(e);return typeof e=="object"&&!_v?GC($):$}if(oTe(e)){for(var H="<"+UL.call(String(e.nodeName)),Q=e.attributes||[],N=0;N<Q.length;N++)H+=" "+Q[N].name+"="+aY($9e(Q[N].value),"double",o);return H+=">",e.childNodes&&e.childNodes.length&&(H+="..."),H+="</"+UL.call(String(e.nodeName))+">",H}if(jB(e)){if(e.length===0)return"[]";var Z=n3(e,E);return O&&!sTe(Z)?"["+NB(Z,O)+"]":"[ "+If.call(Z,", ")+" ]"}if(Y9e(e)){var ae=n3(e,E);return!("cause"in Error.prototype)&&"cause"in e&&!oY.call(e,"cause")?"{ ["+String(e)+"] "+If.call(RL.call("[cause]: "+E(e.cause),ae),", ")+" }":ae.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+If.call(ae,", ")+" }"}if(typeof e=="object"&&a){if(GL&&typeof e[GL]=="function"&&zB)return zB(e,{depth:C-r});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(eTe(e)){var pe=[];return DL&&DL.call(e,function(he,$e){pe.push(E($e,e,!0)+" => "+E(he,e))}),QL("Map",k5.call(e),pe,O)}if(rTe(e)){var fe=[];return LL&&LL.call(e,function(he){fe.push(E(he,e))}),QL("Set",T5.call(e),fe,O)}if(tTe(e))return QE("WeakMap");if(iTe(e))return QE("WeakSet");if(nTe(e))return QE("WeakRef");if(V9e(e))return GC(E(Number(e)));if(Z9e(e))return GC(E(UB.call(e)));if(H9e(e))return GC(U9e.call(e));if(q9e(e))return GC(E(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===window)return"{ [object globalThis] }";if(!Q9e(e)&&!$L(e)){var X=n3(e,E),oe=jL?jL(e)===Object.prototype:e instanceof Object||e.constructor===Object,Ce=e instanceof Object?"":"null prototype",we=!oe&&yA&&Object(e)===e&&yA in e?kk.call(y0(e),8,-1):Ce?"Object":"",Te=oe||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Pe=Te+(we||Ce?"["+If.call(RL.call([],we||[],Ce||[]),": ")+"] ":"");return X.length===0?Pe+"{}":O?Pe+"{"+NB(X,O)+"}":Pe+"{ "+If.call(X,", ")+" }"}return String(e)};function aY(n,e,t){var r=(t.quoteStyle||e)==="double"?'"':"'";return r+n+r}function $9e(n){return $m.call(String(n),/"/g,"&quot;")}function jB(n){return y0(n)==="[object Array]"&&(!yA||!(typeof n=="object"&&yA in n))}function Q9e(n){return y0(n)==="[object Date]"&&(!yA||!(typeof n=="object"&&yA in n))}function $L(n){return y0(n)==="[object RegExp]"&&(!yA||!(typeof n=="object"&&yA in n))}function Y9e(n){return y0(n)==="[object Error]"&&(!yA||!(typeof n=="object"&&yA in n))}function q9e(n){return y0(n)==="[object String]"&&(!yA||!(typeof n=="object"&&yA in n))}function V9e(n){return y0(n)==="[object Number]"&&(!yA||!(typeof n=="object"&&yA in n))}function H9e(n){return y0(n)==="[object Boolean]"&&(!yA||!(typeof n=="object"&&yA in n))}function sY(n){if(_v)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!RB)return!1;try{return RB.call(n),!0}catch{}return!1}function Z9e(n){if(!n||typeof n!="object"||!UB)return!1;try{return UB.call(n),!0}catch{}return!1}var X9e=Object.prototype.hasOwnProperty||function(n){return n in this};function Km(n,e){return X9e.call(n,e)}function y0(n){return R9e.call(n)}function J9e(n){if(n.name)return n.name;var e=j9e.call(z9e.call(n),/^function\s*([\w$]+)/);return e?e[1]:null}function lY(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function eTe(n){if(!k5||!n||typeof n!="object")return!1;try{k5.call(n);try{T5.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function tTe(n){if(!T_||!n||typeof n!="object")return!1;try{T_.call(n,T_);try{K_.call(n,K_)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function nTe(n){if(!FL||!n||typeof n!="object")return!1;try{return FL.call(n),!0}catch{}return!1}function rTe(n){if(!T5||!n||typeof n!="object")return!1;try{T5.call(n);try{k5.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function iTe(n){if(!K_||!n||typeof n!="object")return!1;try{K_.call(n,K_);try{T_.call(n,T_)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function oTe(n){return!n||typeof n!="object"?!1:typeof HTMLElement<"u"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function uY(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,r="... "+t+" more character"+(t>1?"s":"");return uY(kk.call(n,0,e.maxStringLength),e)+r}var i=$m.call($m.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,aTe);return aY(i,"single",e)}function aTe(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+N9e.call(e.toString(16))}function GC(n){return"Object("+n+")"}function QE(n){return n+" { ? }"}function QL(n,e,t,r){var i=r?NB(t,r):If.call(t,", ");return n+" ("+e+") {"+i+"}"}function sTe(n){for(var e=0;e<n.length;e++)if(lY(n[e],`
`)>=0)return!1;return!0}function lTe(n,e){var t;if(n.indent==="	")t="	";else if(typeof n.indent=="number"&&n.indent>0)t=If.call(Array(n.indent+1)," ");else return null;return{base:t,prev:If.call(Array(e+1),t)}}function NB(n,e){if(n.length===0)return"";var t=`
`+e.prev+e.base;return t+If.call(n,","+t)+`
`+e.prev}function n3(n,e){var t=jB(n),r=[];if(t){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=Km(n,i)?e(n[i],n):""}var o=typeof $E=="function"?$E(n):[],a;if(_v){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var d in n)Km(n,d)&&(t&&String(Number(d))===d&&d<n.length||_v&&a["$"+d]instanceof Symbol||(iY.call(/[^\w$]/,d)?r.push(e(d,n)+": "+e(n[d],n)):r.push(d+": "+e(n[d],n))));if(typeof $E=="function")for(var f=0;f<o.length;f++)oY.call(n,o[f])&&r.push("["+e(o[f])+"]: "+e(n[o[f]],n));return r}var AY=Gv,$v=k9e,uTe=G9e,ATe=yx,r3=AY("%WeakMap%",!0),i3=AY("%Map%",!0),cTe=$v("WeakMap.prototype.get",!0),dTe=$v("WeakMap.prototype.set",!0),hTe=$v("WeakMap.prototype.has",!0),fTe=$v("Map.prototype.get",!0),pTe=$v("Map.prototype.set",!0),mTe=$v("Map.prototype.has",!0),Tk=function(n,e){for(var t=n,r;(r=t.next)!==null;t=r)if(r.key===e)return t.next=r.next,r.next=n.next,n.next=r,r},gTe=function(n,e){var t=Tk(n,e);return t&&t.value},yTe=function(n,e,t){var r=Tk(n,e);r?r.value=t:n.next={key:e,next:n.next,value:t}},vTe=function(n,e){return!!Tk(n,e)},CTe=function(){var e,t,r,i={assert:function(o){if(!i.has(o))throw new ATe("Side channel does not contain "+uTe(o))},get:function(o){if(r3&&o&&(typeof o=="object"||typeof o=="function")){if(e)return cTe(e,o)}else if(i3){if(t)return fTe(t,o)}else if(r)return gTe(r,o)},has:function(o){if(r3&&o&&(typeof o=="object"||typeof o=="function")){if(e)return hTe(e,o)}else if(i3){if(t)return mTe(t,o)}else if(r)return vTe(r,o);return!1},set:function(o,a){r3&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new r3),dTe(e,o,a)):i3?(t||(t=new i3),pTe(t,o,a)):(r||(r={key:{},next:null}),yTe(r,o,a))}};return i},_Te=String.prototype.replace,bTe=/%20/g,YE={RFC1738:"RFC1738",RFC3986:"RFC3986"},Kk={default:YE.RFC3986,formatters:{RFC1738:function(n){return _Te.call(n,bTe,"+")},RFC3986:function(n){return String(n)}},RFC1738:YE.RFC1738,RFC3986:YE.RFC3986},xTe=Kk,qE=Object.prototype.hasOwnProperty,s1=Array.isArray,bf=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),wTe=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s1(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);t.obj[t.prop]=i}}},cY=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},MTe=function n(e,t,r){if(!t)return e;if(typeof t!="object"){if(s1(e))e.push(t);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!qE.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return s1(e)&&!s1(t)&&(i=cY(e,r)),s1(e)&&s1(t)?(t.forEach(function(o,a){if(qE.call(e,a)){var s=e[a];s&&typeof s=="object"&&o&&typeof o=="object"?e[a]=n(s,o,r):e.push(o)}else e[a]=o}),e):Object.keys(t).reduce(function(o,a){var s=t[a];return qE.call(o,a)?o[a]=n(o[a],s,r):o[a]=s,o},i)},STe=function(e,t){return Object.keys(t).reduce(function(r,i){return r[i]=t[i],r},e)},ETe=function(n,e,t){var r=n.replace(/\+/g," ");if(t==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},OTe=function(e,t,r,i,o){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(C){return"%26%23"+parseInt(C.slice(2),16)+"%3B"});for(var s="",d=0;d<a.length;++d){var f=a.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===xTe.RFC1738&&(f===40||f===41)){s+=a.charAt(d);continue}if(f<128){s=s+bf[f];continue}if(f<2048){s=s+(bf[192|f>>6]+bf[128|f&63]);continue}if(f<55296||f>=57344){s=s+(bf[224|f>>12]+bf[128|f>>6&63]+bf[128|f&63]);continue}d+=1,f=65536+((f&1023)<<10|a.charCodeAt(d)&1023),s+=bf[240|f>>18]+bf[128|f>>12&63]+bf[128|f>>6&63]+bf[128|f&63]}return s},BTe=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var o=t[i],a=o.obj[o.prop],s=Object.keys(a),d=0;d<s.length;++d){var f=s[d],C=a[f];typeof C=="object"&&C!==null&&r.indexOf(C)===-1&&(t.push({obj:a,prop:f}),r.push(C))}return wTe(t),e},ITe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},kTe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},TTe=function(e,t){return[].concat(e,t)},KTe=function(e,t){if(s1(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(t(e[i]));return r}return t(e)},dY={arrayToObject:cY,assign:STe,combine:TTe,compact:BTe,decode:ETe,encode:OTe,isBuffer:kTe,isRegExp:ITe,maybeMap:KTe,merge:MTe},hY=CTe,T3=dY,P_=Kk,PTe=Object.prototype.hasOwnProperty,fY={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Bf=Array.isArray,DTe=Array.prototype.push,pY=function(n,e){DTe.apply(n,Bf(e)?e:[e])},LTe=Date.prototype.toISOString,YL=P_.default,Vl={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:T3.encode,encodeValuesOnly:!1,format:YL,formatter:P_.formatters[YL],indices:!1,serializeDate:function(e){return LTe.call(e)},skipNulls:!1,strictNullHandling:!1},FTe=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},VE={},UTe=function n(e,t,r,i,o,a,s,d,f,C,O,E,P,D,$,H,Q,N){for(var Z=e,ae=N,pe=0,fe=!1;(ae=ae.get(VE))!==void 0&&!fe;){var X=ae.get(e);if(pe+=1,typeof X<"u"){if(X===pe)throw new RangeError("Cyclic object value");fe=!0}typeof ae.get(VE)>"u"&&(pe=0)}if(typeof C=="function"?Z=C(t,Z):Z instanceof Date?Z=P(Z):r==="comma"&&Bf(Z)&&(Z=T3.maybeMap(Z,function(Re){return Re instanceof Date?P(Re):Re})),Z===null){if(a)return f&&!H?f(t,Vl.encoder,Q,"key",D):t;Z=""}if(FTe(Z)||T3.isBuffer(Z)){if(f){var oe=H?t:f(t,Vl.encoder,Q,"key",D);return[$(oe)+"="+$(f(Z,Vl.encoder,Q,"value",D))]}return[$(t)+"="+$(String(Z))]}var Ce=[];if(typeof Z>"u")return Ce;var we;if(r==="comma"&&Bf(Z))H&&f&&(Z=T3.maybeMap(Z,f)),we=[{value:Z.length>0?Z.join(",")||null:void 0}];else if(Bf(C))we=C;else{var Te=Object.keys(Z);we=O?Te.sort(O):Te}var Pe=d?t.replace(/\./g,"%2E"):t,he=i&&Bf(Z)&&Z.length===1?Pe+"[]":Pe;if(o&&Bf(Z)&&Z.length===0)return he+"[]";for(var $e=0;$e<we.length;++$e){var ye=we[$e],gt=typeof ye=="object"&&typeof ye.value<"u"?ye.value:Z[ye];if(!(s&&gt===null)){var yt=E&&d?ye.replace(/\./g,"%2E"):ye,st=Bf(Z)?typeof r=="function"?r(he,yt):he:he+(E?"."+yt:"["+yt+"]");N.set(e,pe);var ft=hY();ft.set(VE,N),pY(Ce,n(gt,st,r,i,o,a,s,d,r==="comma"&&H&&Bf(Z)?null:f,C,O,E,P,D,$,H,Q,ft))}}return Ce},RTe=function(e){if(!e)return Vl;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||Vl.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=P_.default;if(typeof e.format<"u"){if(!PTe.call(P_.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var i=P_.formatters[r],o=Vl.filter;(typeof e.filter=="function"||Bf(e.filter))&&(o=e.filter);var a;if(e.arrayFormat in fY?a=e.arrayFormat:"indices"in e?a=e.indices?"indices":"repeat":a=Vl.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Vl.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Vl.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Vl.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Vl.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Vl.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Vl.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Vl.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Vl.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Vl.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Vl.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Vl.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Vl.strictNullHandling}},zTe=function(n,e){var t=n,r=RTe(e),i,o;typeof r.filter=="function"?(o=r.filter,t=o("",t)):Bf(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof t!="object"||t===null)return"";var s=fY[r.arrayFormat],d=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(t)),r.sort&&i.sort(r.sort);for(var f=hY(),C=0;C<i.length;++C){var O=i[C];r.skipNulls&&t[O]===null||pY(a,UTe(t[O],O,s,d,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,f))}var E=a.join(r.delimiter),P=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?P+="utf8=%26%2310003%3B&":P+="utf8=%E2%9C%93&"),E.length>0?P+E:""},bv=dY,WB=Object.prototype.hasOwnProperty,jTe=Array.isArray,vl={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!0,decoder:bv.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},NTe=function(n){return n.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},mY=function(n,e){return n&&typeof n=="string"&&e.comma&&n.indexOf(",")>-1?n.split(","):n},WTe="utf8=%26%2310003%3B",GTe="utf8=%E2%9C%93",$Te=function(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=i.split(t.delimiter,o),s=-1,d,f=t.charset;if(t.charsetSentinel)for(d=0;d<a.length;++d)a[d].indexOf("utf8=")===0&&(a[d]===GTe?f="utf-8":a[d]===WTe&&(f="iso-8859-1"),s=d,d=a.length);for(d=0;d<a.length;++d)if(d!==s){var C=a[d],O=C.indexOf("]="),E=O===-1?C.indexOf("="):O+1,P,D;E===-1?(P=t.decoder(C,vl.decoder,f,"key"),D=t.strictNullHandling?null:""):(P=t.decoder(C.slice(0,E),vl.decoder,f,"key"),D=bv.maybeMap(mY(C.slice(E+1),t),function(H){return t.decoder(H,vl.decoder,f,"value")})),D&&t.interpretNumericEntities&&f==="iso-8859-1"&&(D=NTe(D)),C.indexOf("[]=")>-1&&(D=jTe(D)?[D]:D);var $=WB.call(r,P);$&&t.duplicates==="combine"?r[P]=bv.combine(r[P],D):(!$||t.duplicates==="last")&&(r[P]=D)}return r},QTe=function(n,e,t,r){for(var i=r?e:mY(e,t),o=n.length-1;o>=0;--o){var a,s=n[o];if(s==="[]"&&t.parseArrays)a=t.allowEmptyArrays&&i===""?[]:[].concat(i);else{a=t.plainObjects?Object.create(null):{};var d=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,f=t.decodeDotInKeys?d.replace(/%2E/g,"."):d,C=parseInt(f,10);!t.parseArrays&&f===""?a={0:i}:!isNaN(C)&&s!==f&&String(C)===f&&C>=0&&t.parseArrays&&C<=t.arrayLimit?(a=[],a[C]=i):f!=="__proto__"&&(a[f]=i)}i=a}return i},YTe=function(e,t,r,i){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,d=r.depth>0&&a.exec(o),f=d?o.slice(0,d.index):o,C=[];if(f){if(!r.plainObjects&&WB.call(Object.prototype,f)&&!r.allowPrototypes)return;C.push(f)}for(var O=0;r.depth>0&&(d=s.exec(o))!==null&&O<r.depth;){if(O+=1,!r.plainObjects&&WB.call(Object.prototype,d[1].slice(1,-1))&&!r.allowPrototypes)return;C.push(d[1])}return d&&C.push("["+o.slice(d.index)+"]"),QTe(C,t,r,i)}},qTe=function(e){if(!e)return vl;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?vl.charset:e.charset,r=typeof e.duplicates>"u"?vl.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:vl.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:vl.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:vl.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:vl.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:vl.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:vl.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:vl.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:vl.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:vl.decoder,delimiter:typeof e.delimiter=="string"||bv.isRegExp(e.delimiter)?e.delimiter:vl.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:vl.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:vl.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:vl.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:vl.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:vl.strictNullHandling}},VTe=function(n,e){var t=qTe(e);if(n===""||n===null||typeof n>"u")return t.plainObjects?Object.create(null):{};for(var r=typeof n=="string"?$Te(n,t):n,i=t.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],d=YTe(s,r[s],t,typeof n=="string");i=bv.merge(i,d,t)}return t.allowSparse===!0?i:bv.compact(i)},HTe=zTe,ZTe=VTe,XTe=Kk,JTe={formats:XTe,parse:ZTe,stringify:HTe},eKe=Dke;function Nd(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var tKe=/^([a-z0-9.+-]+:)/i,nKe=/:[0-9]*$/,rKe=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,iKe=["<",">",'"',"`"," ","\r",`
`,"	"],oKe=["{","}","|","\\","^","`"].concat(iKe),GB=["'"].concat(oKe),qL=["%","/","?",";","#"].concat(GB),VL=["/","?","#"],aKe=255,HL=/^[+a-z0-9A-Z_-]{0,63}$/,sKe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,lKe={javascript:!0,"javascript:":!0},$B={javascript:!0,"javascript:":!0},rv={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},QB=JTe;function Cx(n,e,t){if(n&&typeof n=="object"&&n instanceof Nd)return n;var r=new Nd;return r.parse(n,e,t),r}Nd.prototype.parse=function(n,e,t){if(typeof n!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof n);var r=n.indexOf("?"),i=r!==-1&&r<n.indexOf("#")?"?":"#",o=n.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),n=o.join(i);var s=n;if(s=s.trim(),!t&&n.split("#").length===1){var d=rKe.exec(s);if(d)return this.path=s,this.href=s,this.pathname=d[1],d[2]?(this.search=d[2],e?this.query=QB.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var f=tKe.exec(s);if(f){f=f[0];var C=f.toLowerCase();this.protocol=C,s=s.substr(f.length)}if(t||f||s.match(/^\/\/[^@/]+@[^@/]+/)){var O=s.substr(0,2)==="//";O&&!(f&&$B[f])&&(s=s.substr(2),this.slashes=!0)}if(!$B[f]&&(O||f&&!rv[f])){for(var E=-1,P=0;P<VL.length;P++){var D=s.indexOf(VL[P]);D!==-1&&(E===-1||D<E)&&(E=D)}var $,H;E===-1?H=s.lastIndexOf("@"):H=s.lastIndexOf("@",E),H!==-1&&($=s.slice(0,H),s=s.slice(H+1),this.auth=decodeURIComponent($)),E=-1;for(var P=0;P<qL.length;P++){var D=s.indexOf(qL[P]);D!==-1&&(E===-1||D<E)&&(E=D)}E===-1&&(E=s.length),this.host=s.slice(0,E),s=s.slice(E),this.parseHost(),this.hostname=this.hostname||"";var Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var N=this.hostname.split(/\./),P=0,Z=N.length;P<Z;P++){var ae=N[P];if(ae&&!ae.match(HL)){for(var pe="",fe=0,X=ae.length;fe<X;fe++)ae.charCodeAt(fe)>127?pe+="x":pe+=ae[fe];if(!pe.match(HL)){var oe=N.slice(0,P),Ce=N.slice(P+1),we=ae.match(sKe);we&&(oe.push(we[1]),Ce.unshift(we[2])),Ce.length&&(s="/"+Ce.join(".")+s),this.hostname=oe.join(".");break}}}this.hostname.length>aKe?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=eKe.toASCII(this.hostname));var Te=this.port?":"+this.port:"",Pe=this.hostname||"";this.host=Pe+Te,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!lKe[C])for(var P=0,Z=GB.length;P<Z;P++){var he=GB[P];if(s.indexOf(he)!==-1){var $e=encodeURIComponent(he);$e===he&&($e=escape(he)),s=s.split(he).join($e)}}var ye=s.indexOf("#");ye!==-1&&(this.hash=s.substr(ye),s=s.slice(0,ye));var gt=s.indexOf("?");if(gt!==-1?(this.search=s.substr(gt),this.query=s.substr(gt+1),e&&(this.query=QB.parse(this.query)),s=s.slice(0,gt)):e&&(this.search="",this.query={}),s&&(this.pathname=s),rv[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Te=this.pathname||"",yt=this.search||"";this.path=Te+yt}return this.href=this.format(),this};function uKe(n){return typeof n=="string"&&(n=Cx(n)),n instanceof Nd?n.format():Nd.prototype.format.call(n)}Nd.prototype.format=function(){var n=this.auth||"";n&&(n=encodeURIComponent(n),n=n.replace(/%3A/i,":"),n+="@");var e=this.protocol||"",t=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=n+this.host:this.hostname&&(i=n+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=QB.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||o&&"?"+o||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||rv[e])&&i!==!1?(i="//"+(i||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):i||(i=""),r&&r.charAt(0)!=="#"&&(r="#"+r),a&&a.charAt(0)!=="?"&&(a="?"+a),t=t.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),a=a.replace("#","%23"),e+i+t+a+r};function AKe(n,e){return Cx(n,!1,!0).resolve(e)}Nd.prototype.resolve=function(n){return this.resolveObject(Cx(n,!1,!0)).format()};function cKe(n,e){return n?Cx(n,!1,!0).resolveObject(e):e}Nd.prototype.resolveObject=function(n){if(typeof n=="string"){var e=new Nd;e.parse(n,!1,!0),n=e}for(var t=new Nd,r=Object.keys(this),i=0;i<r.length;i++){var o=r[i];t[o]=this[o]}if(t.hash=n.hash,n.href==="")return t.href=t.format(),t;if(n.slashes&&!n.protocol){for(var a=Object.keys(n),s=0;s<a.length;s++){var d=a[s];d!=="protocol"&&(t[d]=n[d])}return rv[t.protocol]&&t.hostname&&!t.pathname&&(t.pathname="/",t.path=t.pathname),t.href=t.format(),t}if(n.protocol&&n.protocol!==t.protocol){if(!rv[n.protocol]){for(var f=Object.keys(n),C=0;C<f.length;C++){var O=f[C];t[O]=n[O]}return t.href=t.format(),t}if(t.protocol=n.protocol,!n.host&&!$B[n.protocol]){for(var Z=(n.pathname||"").split("/");Z.length&&!(n.host=Z.shift()););n.host||(n.host=""),n.hostname||(n.hostname=""),Z[0]!==""&&Z.unshift(""),Z.length<2&&Z.unshift(""),t.pathname=Z.join("/")}else t.pathname=n.pathname;if(t.search=n.search,t.query=n.query,t.host=n.host||"",t.auth=n.auth,t.hostname=n.hostname||n.host,t.port=n.port,t.pathname||t.search){var E=t.pathname||"",P=t.search||"";t.path=E+P}return t.slashes=t.slashes||n.slashes,t.href=t.format(),t}var D=t.pathname&&t.pathname.charAt(0)==="/",$=n.host||n.pathname&&n.pathname.charAt(0)==="/",H=$||D||t.host&&n.pathname,Q=H,N=t.pathname&&t.pathname.split("/")||[],Z=n.pathname&&n.pathname.split("/")||[],ae=t.protocol&&!rv[t.protocol];if(ae&&(t.hostname="",t.port=null,t.host&&(N[0]===""?N[0]=t.host:N.unshift(t.host)),t.host="",n.protocol&&(n.hostname=null,n.port=null,n.host&&(Z[0]===""?Z[0]=n.host:Z.unshift(n.host)),n.host=null),H=H&&(Z[0]===""||N[0]==="")),$)t.host=n.host||n.host===""?n.host:t.host,t.hostname=n.hostname||n.hostname===""?n.hostname:t.hostname,t.search=n.search,t.query=n.query,N=Z;else if(Z.length)N||(N=[]),N.pop(),N=N.concat(Z),t.search=n.search,t.query=n.query;else if(n.search!=null){if(ae){t.host=N.shift(),t.hostname=t.host;var pe=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;pe&&(t.auth=pe.shift(),t.hostname=pe.shift(),t.host=t.hostname)}return t.search=n.search,t.query=n.query,(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!N.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var fe=N.slice(-1)[0],X=(t.host||n.host||N.length>1)&&(fe==="."||fe==="..")||fe==="",oe=0,Ce=N.length;Ce>=0;Ce--)fe=N[Ce],fe==="."?N.splice(Ce,1):fe===".."?(N.splice(Ce,1),oe++):oe&&(N.splice(Ce,1),oe--);if(!H&&!Q)for(;oe--;oe)N.unshift("..");H&&N[0]!==""&&(!N[0]||N[0].charAt(0)!=="/")&&N.unshift(""),X&&N.join("/").substr(-1)!=="/"&&N.push("");var we=N[0]===""||N[0]&&N[0].charAt(0)==="/";if(ae){t.hostname=we?"":N.length?N.shift():"",t.host=t.hostname;var pe=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;pe&&(t.auth=pe.shift(),t.hostname=pe.shift(),t.host=t.hostname)}return H=H||t.host&&N.length,H&&!we&&N.unshift(""),N.length>0?t.pathname=N.join("/"):(t.pathname=null,t.path=null),(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=n.auth||t.auth,t.slashes=t.slashes||n.slashes,t.href=t.format(),t};Nd.prototype.parseHost=function(){var n=this.host,e=nKe.exec(n);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),n=n.substr(0,n.length-e.length)),n&&(this.hostname=n)};j1.parse=Cx;j1.resolve=AKe;j1.resolveObject=cKe;j1.format=uKe;j1.Url=Nd;function zo(){var n="/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",e="19e47c652b47a74a8fe842dad1f0616429ed3097",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",statementMap:{0:{start:{line:3,column:2},end:{line:13,column:5}},1:{start:{line:7,column:4},end:{line:7,column:27}},2:{start:{line:9,column:4},end:{line:9,column:13}},3:{start:{line:11,column:4},end:{line:11,column:48}},4:{start:{line:12,column:4},end:{line:12,column:21}},5:{start:{line:16,column:2},end:{line:17,column:18}},6:{start:{line:17,column:4},end:{line:17,column:18}},7:{start:{line:18,column:17},end:{line:18,column:42}},8:{start:{line:19,column:23},end:{line:19,column:57}},9:{start:{line:20,column:2},end:{line:24,column:3}},10:{start:{line:21,column:4},end:{line:21,column:41}},11:{start:{line:23,column:4},end:{line:23,column:69}},12:{start:{line:25,column:14},end:{line:25,column:35}},13:{start:{line:26,column:2},end:{line:26,column:24}},14:{start:{line:29,column:2},end:{line:30,column:18}},15:{start:{line:30,column:4},end:{line:30,column:18}},16:{start:{line:31,column:14},end:{line:31,column:31}},17:{start:{line:32,column:2},end:{line:32,column:57}},18:{start:{line:32,column:32},end:{line:32,column:55}}},fnMap:{0:{name:"loadJSON",decl:{start:{line:2,column:9},end:{line:2,column:17}},loc:{start:{line:2,column:41},end:{line:14,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:6,column:10},end:{line:6,column:11}},loc:{start:{line:6,column:29},end:{line:8,column:3}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:8,column:10},end:{line:8,column:11}},loc:{start:{line:8,column:25},end:{line:10,column:3}},line:8},3:{name:"(anonymous_3)",decl:{start:{line:10,column:11},end:{line:10,column:12}},loc:{start:{line:10,column:22},end:{line:13,column:3}},line:10},4:{name:"downloadGlyphsMetadata",decl:{start:{line:15,column:16},end:{line:15,column:38}},loc:{start:{line:15,column:56},end:{line:27,column:1}},line:15},5:{name:"downloadSpriteMetadata",decl:{start:{line:28,column:16},end:{line:28,column:38}},loc:{start:{line:28,column:52},end:{line:33,column:1}},line:28},6:{name:"(anonymous_6)",decl:{start:{line:32,column:20},end:{line:32,column:21}},loc:{start:{line:32,column:32},end:{line:32,column:55}},line:32}},branchMap:{0:{loc:{start:{line:16,column:2},end:{line:17,column:18}},type:"if",locations:[{start:{line:16,column:2},end:{line:17,column:18}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:20,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:20,column:2},end:{line:24,column:3}},{start:{line:22,column:9},end:{line:24,column:3}}],line:20},2:{loc:{start:{line:29,column:2},end:{line:30,column:18}},type:"if",locations:[{start:{line:29,column:2},end:{line:30,column:18}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:29}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/metadata.ts"],names:[],mappings:"AAAA,OAAO,YAAY;AAEnB,SAAS,SAAS,KAAa,cAAmB,IAA8B;AAC9E,QAAM,KAAK;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACE,KAAK,SAAS,UAAU;AACvB,WAAO,SAAS,KAAK;AAAA,EACvB,CAAC,EACA,KAAK,SAAS,MAAM;AACnB,OAAG,IAAI;AAAA,EACT,CAAC,EACA,MAAM,WAAW;AAChB,YAAQ,KAAK,0BAA0B,GAAG;AAC1C,OAAG,YAAY;AAAA,EACjB,CAAC;AACL;AAEO,gBAAS,uBAAuB,aAAqB,IAA8B;AACxF,MAAG,CAAC;AAAa,WAAO,GAAG,CAAC,CAAC;AAI7B,QAAM,SAAS,OAAO,MAAM,WAAW;AACvC,QAAM,eAAe;AACrB,MAAG,OAAO,aAAa,cAAc;AACnC,WAAO,WAAW;AAAA,EACpB,OAAO;AACL,WAAO,WAAW,OAAO,SAAU,QAAQ,cAAc,OAAO;AAAA,EAClE;AACA,QAAM,MAAM,OAAO,OAAO,MAAM;AAEhC,WAAS,KAAK,CAAC,GAAG,EAAE;AACtB;AAEO,gBAAS,uBAAuB,SAAiB,IAA8B;AACpF,MAAG,CAAC;AAAS,WAAO,GAAG,CAAC,CAAC;AACzB,QAAM,MAAM,UAAU;AACtB,WAAS,KAAK,CAAC,GAAG,YAAU,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC;AACrD;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"19e47c652b47a74a8fe842dad1f0616429ed3097"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return zo=function(){return a},a}zo();function gY(n,e,t){zo().f[0]++,zo().s[0]++,fetch(n,{mode:"cors",credentials:"same-origin"}).then(function(r){return zo().f[1]++,zo().s[1]++,r.json()}).then(function(r){zo().f[2]++,zo().s[2]++,t(r)}).catch(function(){zo().f[3]++,zo().s[3]++,console.warn("Can not metadata for "+n),zo().s[4]++,t(e)})}function dKe(n,e){if(zo().f[4]++,zo().s[5]++,n)zo().b[0][1]++;else return zo().b[0][0]++,zo().s[6]++,e([]);const t=(zo().s[7]++,j1.parse(n)),r=(zo().s[8]++,"/%7Bfontstack%7D/%7Brange%7D.pbf");zo().s[9]++,t.pathname===r?(zo().b[1][0]++,zo().s[10]++,t.pathname="/fontstacks.json"):(zo().b[1][1]++,zo().s[11]++,t.pathname=t.pathname.replace(r,".json"));const i=(zo().s[12]++,j1.format(t));zo().s[13]++,gY(i,[],e)}function hKe(n,e){if(zo().f[5]++,zo().s[14]++,n)zo().b[2][1]++;else return zo().b[2][0]++,zo().s[15]++,e([]);const t=(zo().s[16]++,n+".json");zo().s[17]++,gY(t,{},r=>(zo().f[6]++,zo().s[18]++,e(Object.keys(r))))}function Hl(){var n="/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",e="5d157b2ae65dbd5a5a7dfa0dbf76114e1399ceba",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",statementMap:{0:{start:{line:3,column:21},end:{line:3,column:50}},1:{start:{line:4,column:2},end:{line:4,column:46}},2:{start:{line:7,column:2},end:{line:7,column:41}},3:{start:{line:8,column:2},end:{line:18,column:5}},4:{start:{line:12,column:4},end:{line:12,column:27}},5:{start:{line:14,column:4},end:{line:14,column:40}},6:{start:{line:16,column:4},end:{line:16,column:60}},7:{start:{line:17,column:4},end:{line:17,column:25}},8:{start:{line:21,column:21},end:{line:21,column:50}},9:{start:{line:22,column:2},end:{line:22,column:42}},10:{start:{line:23,column:2},end:{line:23,column:73}}},fnMap:{0:{name:"initialStyleUrl",decl:{start:{line:2,column:16},end:{line:2,column:31}},loc:{start:{line:2,column:34},end:{line:5,column:1}},line:2},1:{name:"loadStyleUrl",decl:{start:{line:6,column:16},end:{line:6,column:28}},loc:{start:{line:6,column:43},end:{line:19,column:1}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:11,column:10},end:{line:11,column:11}},loc:{start:{line:11,column:29},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:13,column:10},end:{line:13,column:11}},loc:{start:{line:13,column:25},end:{line:15,column:3}},line:13},4:{name:"(anonymous_4)",decl:{start:{line:15,column:11},end:{line:15,column:12}},loc:{start:{line:15,column:22},end:{line:18,column:3}},line:15},5:{name:"removeStyleQuerystring",decl:{start:{line:20,column:16},end:{line:20,column:38}},loc:{start:{line:20,column:41},end:{line:24,column:1}},line:20}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts"],names:[],mappings:"AACA,OAAO,WAAW;AAEX,gBAAS,kBAAkB;AAChC,QAAM,aAAa,IAAI,IAAI,OAAO,SAAS,IAAI;AAC/C,SAAO,WAAW,aAAa,IAAI,OAAO;AAC5C;AAEO,gBAAS,aAAa,UAAkB,IAA8B;AAC3E,UAAQ,IAAI,iBAAiB,QAAQ;AACrC,QAAM,UAAU;AAAA,IACd,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACE,KAAK,SAAS,UAAU;AACvB,WAAO,SAAS,KAAK;AAAA,EACvB,CAAC,EACA,KAAK,SAAS,MAAM;AACnB,OAAG,MAAM,oBAAoB,IAAI,CAAC;AAAA,EACpC,CAAC,EACA,MAAM,WAAW;AAChB,YAAQ,KAAK,iCAAiC,QAAQ;AACtD,OAAG,MAAM,UAAU;AAAA,EACrB,CAAC;AACL;AAEO,gBAAS,yBAAyB;AACvC,QAAM,aAAa,IAAI,IAAI,OAAO,SAAS,IAAI;AAC/C,aAAW,aAAa,OAAO,OAAO;AACtC,SAAO,QAAQ,aAAa,CAAC,GAAG,SAAS,OAAO,WAAW,SAAS,CAAC;AACvE;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"5d157b2ae65dbd5a5a7dfa0dbf76114e1399ceba"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Hl=function(){return a},a}Hl();function fKe(){Hl().f[0]++;const n=(Hl().s[0]++,new URL(window.location.href));return Hl().s[1]++,n.searchParams.get("style")}function yY(n,e){Hl().f[1]++,Hl().s[2]++,console.log("Loading style",n),Hl().s[3]++,fetch(n,{mode:"cors",credentials:"same-origin"}).then(function(t){return Hl().f[2]++,Hl().s[4]++,t.json()}).then(function(t){Hl().f[3]++,Hl().s[5]++,e(Ru.ensureStyleValidity(t))}).catch(function(){Hl().f[4]++,Hl().s[6]++,console.warn("Could not fetch default style",n),Hl().s[7]++,e(Ru.emptyStyle)})}function ZL(){Hl().f[5]++;const n=(Hl().s[8]++,new URL(window.location.href));Hl().s[9]++,n.searchParams.delete("style"),Hl().s[10]++,window.history.replaceState({},document.title,n.toString())}function NA(){var n="/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",e="f92fa2abb31199d99fd3ae02d967dc6702faf862",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",statementMap:{0:{start:{line:3,column:18},end:{line:3,column:47}},1:{start:{line:4,column:2},end:{line:4,column:70}},2:{start:{line:4,column:30},end:{line:4,column:68}},3:{start:{line:7,column:2},end:{line:7,column:71}},4:{start:{line:7,column:58},end:{line:7,column:69}},5:{start:{line:10,column:2},end:{line:10,column:71}},6:{start:{line:10,column:58},end:{line:10,column:69}}},fnMap:{0:{name:"diffMessages",decl:{start:{line:2,column:9},end:{line:2,column:21}},loc:{start:{line:2,column:47},end:{line:5,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:4,column:21},end:{line:4,column:22}},loc:{start:{line:4,column:30},end:{line:4,column:68}},line:4},2:{name:"undoMessages",decl:{start:{line:6,column:16},end:{line:6,column:28}},loc:{start:{line:6,column:54},end:{line:8,column:1}},line:6},3:{name:"(anonymous_3)",decl:{start:{line:7,column:51},end:{line:7,column:52}},loc:{start:{line:7,column:58},end:{line:7,column:69}},line:7},4:{name:"redoMessages",decl:{start:{line:9,column:16},end:{line:9,column:28}},loc:{start:{line:9,column:54},end:{line:11,column:1}},line:9},5:{name:"(anonymous_5)",decl:{start:{line:10,column:51},end:{line:10,column:52}},loc:{start:{line:10,column:58},end:{line:10,column:69}},line:10}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts"],names:[],mappings:"AAAA,SAAQ,YAAW;AAGnB,SAAS,aAAa,aAAiC,YAAgC;AACrF,QAAM,UAAU,KAAK,aAAa,UAAU;AAC5C,SAAO,QAAQ,IAAI,SAAO,IAAI,UAAU,MAAM,IAAI,KAAK,KAAK,GAAG,CAAC;AAClE;AAEO,gBAAS,aAAa,aAAiC,YAAgC;AAC5F,SAAO,aAAa,aAAa,UAAU,EAAE,IAAI,OAAK,UAAU,CAAC;AACnE;AACO,gBAAS,aAAa,aAAiC,YAAgC;AAC5F,SAAO,aAAa,aAAa,UAAU,EAAE,IAAI,OAAK,UAAU,CAAC;AACnE;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f92fa2abb31199d99fd3ae02d967dc6702faf862"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return NA=function(){return a},a}NA();function vY(n,e){NA().f[0]++;const t=(NA().s[0]++,ete(n,e));return NA().s[1]++,t.map(r=>(NA().f[1]++,NA().s[2]++,r.command+" "+r.args.join(" ")))}function pKe(n,e){return NA().f[2]++,NA().s[3]++,vY(n,e).map(t=>(NA().f[3]++,NA().s[4]++,"Undo "+t))}function mKe(n,e){return NA().f[4]++,NA().s[5]++,vY(n,e).map(t=>(NA().f[5]++,NA().s[6]++,"Redo "+t))}function zr(){var n="/home/runner/work/maputnik/maputnik/src/libs/stylestore.ts",e="dfd07f747cd43002e646758ee096fc67f1f8153d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/stylestore.ts",statementMap:{0:{start:{line:4,column:22},end:{line:4,column:32}},1:{start:{line:5,column:20},end:{line:5,column:27}},2:{start:{line:6,column:20},end:{line:9,column:1}},3:{start:{line:10,column:24},end:{line:10,column:44}},4:{start:{line:12,column:2},end:{line:12,column:36}},5:{start:{line:15,column:17},end:{line:15,column:19}},6:{start:{line:16,column:2},end:{line:21,column:3}},7:{start:{line:16,column:15},end:{line:16,column:16}},8:{start:{line:17,column:16},end:{line:17,column:42}},9:{start:{line:18,column:4},end:{line:20,column:5}},10:{start:{line:19,column:6},end:{line:19,column:32}},11:{start:{line:22,column:2},end:{line:22,column:16}},12:{start:{line:25,column:16},end:{line:25,column:30}},13:{start:{line:26,column:2},end:{line:26,column:86}},14:{start:{line:29,column:2},end:{line:31,column:3}},15:{start:{line:30,column:4},end:{line:30,column:41}},16:{start:{line:32,column:16},end:{line:32,column:30}},17:{start:{line:33,column:18},end:{line:33,column:26}},18:{start:{line:34,column:2},end:{line:34,column:17}},19:{start:{line:37,column:2},end:{line:37,column:57}},20:{start:{line:47,column:4},end:{line:47,column:40}},21:{start:{line:50,column:4},end:{line:50,column:13}},22:{start:{line:54,column:4},end:{line:59,column:5}},23:{start:{line:54,column:17},end:{line:54,column:18}},24:{start:{line:55,column:18},end:{line:55,column:44}},25:{start:{line:56,column:6},end:{line:58,column:7}},26:{start:{line:57,column:8},end:{line:57,column:44}},27:{start:{line:63,column:4},end:{line:64,column:34}},28:{start:{line:64,column:6},end:{line:64,column:34}},29:{start:{line:65,column:20},end:{line:65,column:67}},30:{start:{line:66,column:22},end:{line:66,column:68}},31:{start:{line:67,column:4},end:{line:68,column:39}},32:{start:{line:68,column:6},end:{line:68,column:39}},33:{start:{line:69,column:4},end:{line:69,column:25}},34:{start:{line:73,column:4},end:{line:73,column:51}},35:{start:{line:74,column:16},end:{line:74,column:37}},36:{start:{line:75,column:4},end:{line:75,column:63}},37:{start:{line:76,column:4},end:{line:76,column:65}},38:{start:{line:77,column:4},end:{line:77,column:20}}},fnMap:{0:{name:"loadDefaultStyle",decl:{start:{line:11,column:16},end:{line:11,column:32}},loc:{start:{line:11,column:37},end:{line:13,column:1}},line:11},1:{name:"loadStoredStyles",decl:{start:{line:14,column:9},end:{line:14,column:25}},loc:{start:{line:14,column:28},end:{line:23,column:1}},line:14},2:{name:"isStyleKey",decl:{start:{line:24,column:9},end:{line:24,column:19}},loc:{start:{line:24,column:25},end:{line:27,column:1}},line:24},3:{name:"fromKey",decl:{start:{line:28,column:9},end:{line:28,column:16}},loc:{start:{line:28,column:22},end:{line:35,column:1}},line:28},4:{name:"styleKey",decl:{start:{line:36,column:9},end:{line:36,column:17}},loc:{start:{line:36,column:27},end:{line:38,column:1}},line:36},5:{name:"(anonymous_5)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:16},end:{line:48,column:3}},line:46},6:{name:"(anonymous_6)",decl:{start:{line:49,column:2},end:{line:49,column:3}},loc:{start:{line:49,column:11},end:{line:51,column:3}},line:49},7:{name:"(anonymous_7)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:10},end:{line:60,column:3}},line:53},8:{name:"(anonymous_8)",decl:{start:{line:62,column:2},end:{line:62,column:3}},loc:{start:{line:62,column:18},end:{line:70,column:3}},line:62},9:{name:"(anonymous_9)",decl:{start:{line:72,column:2},end:{line:72,column:3}},loc:{start:{line:72,column:17},end:{line:78,column:3}},line:72}},branchMap:{0:{loc:{start:{line:18,column:4},end:{line:20,column:5}},type:"if",locations:[{start:{line:18,column:4},end:{line:20,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},1:{loc:{start:{line:26,column:9},end:{line:26,column:85}},type:"binary-expr",locations:[{start:{line:26,column:9},end:{line:26,column:27}},{start:{line:26,column:31},end:{line:26,column:57}},{start:{line:26,column:61},end:{line:26,column:85}}],line:26},2:{loc:{start:{line:29,column:2},end:{line:31,column:3}},type:"if",locations:[{start:{line:29,column:2},end:{line:31,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:29},3:{loc:{start:{line:56,column:6},end:{line:58,column:7}},type:"if",locations:[{start:{line:56,column:6},end:{line:58,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},4:{loc:{start:{line:63,column:4},end:{line:64,column:34}},type:"if",locations:[{start:{line:63,column:4},end:{line:64,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:63},5:{loc:{start:{line:67,column:4},end:{line:68,column:39}},type:"if",locations:[{start:{line:67,column:4},end:{line:68,column:39}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/stylestore.ts"],names:[],mappings:"AAAA,OAAO,WAAW;AAClB,SAAQ,oBAAmB;AAC3B,OAAO,mBAAmB;AAG1B,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AAAA,EAClB,QAAQ,CAAC,eAAe,cAAc,EAAE,KAAK,GAAG;AAAA,EAChD,aAAa,CAAC,eAAe,cAAc,EAAE,KAAK,GAAG;AACvD;AAEA,MAAM,kBAAkB,cAAc,CAAC,EAAE;AAGlC,gBAAS,iBAAiB,IAA8B;AAC7D,eAAa,iBAAiB,EAAE;AAClC;AAGA,SAAS,mBAAmB;AAC1B,QAAM,SAAS,CAAC;AAChB,WAAS,IAAI,GAAG,IAAI,OAAO,aAAa,QAAQ,KAAK;AACnD,UAAM,MAAM,OAAO,aAAa,IAAI,CAAC;AACrC,QAAG,WAAW,GAAI,GAAG;AACnB,aAAO,KAAK,QAAQ,GAAI,CAAC;AAAA,IAC3B;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,WAAW,KAAa;AAC/B,QAAM,QAAQ,IAAI,MAAM,GAAG;AAC3B,SAAO,MAAM,WAAW,KAAK,MAAM,CAAC,MAAM,iBAAiB,MAAM,CAAC,MAAM;AAC1E;AAGA,SAAS,QAAQ,KAAa;AAC5B,MAAG,CAAC,WAAW,GAAG,GAAG;AACnB,UAAM;AAAA,EACR;AAEA,QAAM,QAAQ,IAAI,MAAM,GAAG;AAC3B,QAAM,UAAU,MAAM,CAAC;AACvB,SAAO;AACT;AAGA,SAAS,SAAS,SAAiB;AACjC,SAAO,CAAC,eAAe,aAAa,OAAO,EAAE,KAAK,GAAG;AACvD;AAGO,aAAM,WAAW;AAAA;AAAA;AAAA;AAAA,EAItB;AAAA;AAAA;AAAA,EAIA,cAAc;AACZ,SAAK,YAAY,iBAAiB;AAAA,EACpC;AAAA,EAEA,KAAK,IAA8B;AACjC,OAAG,IAAI;AAAA,EACT;AAAA;AAAA,EAGA,QAAQ;AACN,aAAS,IAAI,GAAG,IAAI,OAAO,aAAa,QAAQ,KAAK;AACnD,YAAM,MAAM,OAAO,aAAa,IAAI,CAAC;AACrC,UAAG,IAAI,WAAW,aAAa,GAAG;AAChC,eAAO,aAAa,WAAW,GAAG;AAAA,MACpC;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,YAAY,IAA8B;AACxC,QAAG,KAAK,UAAU,WAAW;AAAG,aAAO,iBAAiB,EAAE;AAC1D,UAAM,UAAU,OAAO,aAAa,QAAQ,YAAY,MAAM;AAC9D,UAAM,YAAY,OAAO,aAAa,QAAQ,SAAS,OAAO,CAAC;AAE/D,QAAG;AAAW,aAAO,GAAG,KAAK,MAAM,SAAS,CAAC;AAC7C,qBAAiB,EAAE;AAAA,EACrB;AAAA;AAAA,EAGA,KAAK,UAA+C;AAClD,eAAW,MAAM,oBAAoB,QAAQ;AAC7C,UAAM,MAAM,SAAS,SAAS,EAAE;AAChC,WAAO,aAAa,QAAQ,KAAK,KAAK,UAAU,QAAQ,CAAC;AACzD,WAAO,aAAa,QAAQ,YAAY,QAAQ,SAAS,EAAE;AAC3D,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"dfd07f747cd43002e646758ee096fc67f1f8153d"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return zr=function(){return a},a}zr();const Bb=(zr().s[0]++,"maputnik"),CY=(zr().s[1]++,"style"),XL=(zr().s[2]++,{latest:[Bb,"latest_style"].join(":"),accessToken:[Bb,"access_token"].join(":")}),gKe=(zr().s[3]++,HQ[0].url);function JL(n){zr().f[0]++,zr().s[4]++,yY(gKe,n)}function yKe(){zr().f[1]++;const n=(zr().s[5]++,[]);zr().s[6]++;for(let e=(zr().s[7]++,0);e<window.localStorage.length;e++){const t=(zr().s[8]++,window.localStorage.key(e));zr().s[9]++,_Y(t)?(zr().b[0][0]++,zr().s[10]++,n.push(vKe(t))):zr().b[0][1]++}return zr().s[11]++,n}function _Y(n){zr().f[2]++;const e=(zr().s[12]++,n.split(":"));return zr().s[13]++,zr().b[1][0]++,e.length===3&&(zr().b[1][1]++,e[0]===Bb)&&(zr().b[1][2]++,e[1]===CY)}function vKe(n){if(zr().f[3]++,zr().s[14]++,_Y(n))zr().b[2][1]++;else throw zr().b[2][0]++,zr().s[15]++,"Key is not a valid style key";const e=(zr().s[16]++,n.split(":")),t=(zr().s[17]++,e[2]);return zr().s[18]++,t}function eF(n){return zr().f[4]++,zr().s[19]++,[Bb,CY,n].join(":")}class tF{constructor(){sn(this,"mapStyles");zr().f[5]++,zr().s[20]++,this.mapStyles=yKe()}init(e){zr().f[6]++,zr().s[21]++,e(null)}purge(){zr().f[7]++,zr().s[22]++;for(let e=(zr().s[23]++,0);e<window.localStorage.length;e++){const t=(zr().s[24]++,window.localStorage.key(e));zr().s[25]++,t.startsWith(Bb)?(zr().b[3][0]++,zr().s[26]++,window.localStorage.removeItem(t)):zr().b[3][1]++}}latestStyle(e){if(zr().f[8]++,zr().s[27]++,this.mapStyles.length===0)return zr().b[4][0]++,zr().s[28]++,JL(e);zr().b[4][1]++;const t=(zr().s[29]++,window.localStorage.getItem(XL.latest)),r=(zr().s[30]++,window.localStorage.getItem(eF(t)));if(zr().s[31]++,r)return zr().b[5][0]++,zr().s[32]++,e(JSON.parse(r));zr().b[5][1]++,zr().s[33]++,JL(e)}save(e){zr().f[9]++,zr().s[34]++,e=Ru.ensureStyleValidity(e);const t=(zr().s[35]++,eF(e.id));return zr().s[36]++,window.localStorage.setItem(t,JSON.stringify(e)),zr().s[37]++,window.localStorage.setItem(XL.latest,e.id),zr().s[38]++,e}}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var YB=function(n,e){return YB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},YB(n,e)};function bY(n,e){YB(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function CKe(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function _Ke(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(a)throw a.error}}return o}function bKe(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(_Ke(arguments[e]));return n}var xY=function(){function n(e,t){this.target=t,this.type=e}return n}(),xKe=function(n){bY(e,n);function e(t,r){var i=n.call(this,"error",r)||this;return i.message=t.message,i.error=t,i}return e}(xY),wKe=function(n){bY(e,n);function e(t,r,i){t===void 0&&(t=1e3),r===void 0&&(r="");var o=n.call(this,"close",i)||this;return o.wasClean=!0,o.code=t,o.reason=r,o}return e}(xY);/*!
 * Reconnecting WebSocket
 * by Pedro Ladaria <pedro.ladaria@gmail.com>
 * https://github.com/pladaria/reconnecting-websocket
 * License MIT
 */var MKe=function(){if(typeof WebSocket<"u")return WebSocket},SKe=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},q0={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},EKe=function(){function n(e,t,r){var i=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){i._debug("open event");var a=i._options.minUptime,s=a===void 0?q0.minUptime:a;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},s),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(d){return i._ws.send(d)}),i._messageQueue=[],i.onopen&&i.onopen(o),i._listeners.open.forEach(function(d){return i._callEventListener(o,d)})},this._handleMessage=function(o){i._debug("message event"),i.onmessage&&i.onmessage(o),i._listeners.message.forEach(function(a){return i._callEventListener(o,a)})},this._handleError=function(o){i._debug("error event",o.message),i._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(o),i._debug("exec error listeners"),i._listeners.error.forEach(function(a){return i._callEventListener(o,a)}),i._connect()},this._handleClose=function(o){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(o),i._listeners.close.forEach(function(a){return i._callEventListener(o,a)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,r){return typeof r=="string"?t+=r.length:r instanceof Blob?t+=r.size:t+=r.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=t===void 0?q0.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,r,i=this._listeners[e.type];if(i)try{for(var o=CKe(i),a=o.next();!a.done;a=o.next()){var s=a.value;this._callEventListener(e,s)}}catch(d){t={error:d}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(r){return r!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,bKe(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=t===void 0?q0.reconnectionDelayGrowFactor:t,i=e.minReconnectionDelay,o=i===void 0?q0.minReconnectionDelay:i,a=e.maxReconnectionDelay,s=a===void 0?q0.maxReconnectionDelay:a,d=0;return this._retryCount>0&&(d=o*Math.pow(r,this._retryCount-1),d>s&&(d=s)),this._debug("next delay",d),d},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,r=t.maxRetries,i=r===void 0?q0.maxRetries:r,o=t.connectionTimeout,a=o===void 0?q0.connectionTimeout:o,s=t.WebSocket,d=s===void 0?MKe():s;if(this._retryCount>=i){this._debug("max retries reached",this._retryCount,">=",i);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!SKe(d))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(f){e._closeCalled||(e._debug("connect",{url:f,protocols:e._protocols}),e._ws=e._protocols?new d(f,e._protocols):new d(f),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},a))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new xKe(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new wKe(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n}();function jr(){var n="/home/runner/work/maputnik/maputnik/src/libs/apistore.ts",e="affc9a723ceb39c9f38866dab538bc0c9774f995",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/apistore.ts",statementMap:{0:{start:{line:7,column:18},end:{line:7,column:24}},1:{start:{line:10,column:4},end:{line:11,column:7}},2:{start:{line:12,column:17},end:{line:12,column:36}},3:{start:{line:13,column:17},end:{line:13,column:41}},4:{start:{line:14,column:4},end:{line:14,column:45}},5:{start:{line:15,column:4},end:{line:15,column:50}},6:{start:{line:16,column:4},end:{line:16,column:37}},7:{start:{line:19,column:4},end:{line:30,column:7}},8:{start:{line:22,column:6},end:{line:22,column:29}},9:{start:{line:24,column:23},end:{line:24,column:27}},10:{start:{line:25,column:6},end:{line:25,column:39}},11:{start:{line:26,column:6},end:{line:26,column:32}},12:{start:{line:27,column:6},end:{line:27,column:15}},13:{start:{line:29,column:6},end:{line:29,column:52}},14:{start:{line:33,column:23},end:{line:33,column:67}},15:{start:{line:34,column:4},end:{line:46,column:6}},16:{start:{line:35,column:6},end:{line:36,column:15}},17:{start:{line:36,column:8},end:{line:36,column:15}},18:{start:{line:37,column:6},end:{line:37,column:52}},19:{start:{line:38,column:24},end:{line:38,column:40}},20:{start:{line:39,column:6},end:{line:43,column:7}},21:{start:{line:40,column:8},end:{line:40,column:41}},22:{start:{line:42,column:8},end:{line:42,column:27}},23:{start:{line:44,column:27},end:{line:44,column:65}},24:{start:{line:45,column:6},end:{line:45,column:44}},25:{start:{line:49,column:4},end:{line:59,column:5}},26:{start:{line:50,column:6},end:{line:56,column:9}},27:{start:{line:53,column:8},end:{line:53,column:31}},28:{start:{line:55,column:8},end:{line:55,column:44}},29:{start:{line:58,column:6},end:{line:58,column:92}},30:{start:{line:63,column:22},end:{line:67,column:5}},31:{start:{line:68,column:15},end:{line:68,column:26}},32:{start:{line:69,column:4},end:{line:79,column:7}},33:{start:{line:77,column:6},end:{line:78,column:29}},34:{start:{line:78,column:8},end:{line:78,column:29}},35:{start:{line:80,column:4},end:{line:80,column:20}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:20},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:10,column:58},end:{line:10,column:59}},loc:{start:{line:10,column:64},end:{line:11,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:11},end:{line:31,column:3}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:21,column:12},end:{line:21,column:13}},loc:{start:{line:21,column:26},end:{line:23,column:5}},line:21},4:{name:"(anonymous_4)",decl:{start:{line:23,column:12},end:{line:23,column:13}},loc:{start:{line:23,column:22},end:{line:28,column:5}},line:23},5:{name:"(anonymous_5)",decl:{start:{line:28,column:13},end:{line:28,column:14}},loc:{start:{line:28,column:19},end:{line:30,column:5}},line:28},6:{name:"(anonymous_6)",decl:{start:{line:32,column:2},end:{line:32,column:3}},loc:{start:{line:32,column:23},end:{line:47,column:3}},line:32},7:{name:"(anonymous_7)",decl:{start:{line:34,column:27},end:{line:34,column:28}},loc:{start:{line:34,column:34},end:{line:46,column:5}},line:34},8:{name:"(anonymous_8)",decl:{start:{line:48,column:2},end:{line:48,column:3}},loc:{start:{line:48,column:18},end:{line:60,column:3}},line:48},9:{name:"(anonymous_9)",decl:{start:{line:52,column:14},end:{line:52,column:15}},loc:{start:{line:52,column:33},end:{line:54,column:7}},line:52},10:{name:"(anonymous_10)",decl:{start:{line:54,column:14},end:{line:54,column:15}},loc:{start:{line:54,column:29},end:{line:56,column:7}},line:54},11:{name:"(anonymous_11)",decl:{start:{line:62,column:2},end:{line:62,column:3}},loc:{start:{line:62,column:17},end:{line:81,column:3}},line:62},12:{name:"(anonymous_12)",decl:{start:{line:76,column:13},end:{line:76,column:14}},loc:{start:{line:76,column:29},end:{line:79,column:5}},line:76}},branchMap:{0:{loc:{start:{line:10,column:30},end:{line:11,column:6}},type:"binary-expr",locations:[{start:{line:10,column:30},end:{line:10,column:53}},{start:{line:10,column:58},end:{line:11,column:5}}],line:10},1:{loc:{start:{line:12,column:17},end:{line:12,column:36}},type:"binary-expr",locations:[{start:{line:12,column:17},end:{line:12,column:26}},{start:{line:12,column:30},end:{line:12,column:36}}],line:12},2:{loc:{start:{line:13,column:17},end:{line:13,column:41}},type:"binary-expr",locations:[{start:{line:13,column:17},end:{line:13,column:26}},{start:{line:13,column:30},end:{line:13,column:41}}],line:13},3:{loc:{start:{line:35,column:6},end:{line:36,column:15}},type:"if",locations:[{start:{line:35,column:6},end:{line:36,column:15}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},4:{loc:{start:{line:49,column:4},end:{line:59,column:5}},type:"if",locations:[{start:{line:49,column:4},end:{line:59,column:5}},{start:{line:57,column:11},end:{line:59,column:5}}],line:49},5:{loc:{start:{line:77,column:6},end:{line:78,column:29}},type:"if",locations:[{start:{line:77,column:6},end:{line:78,column:29}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:77}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/apistore.ts"],names:[],mappings:"AAAA,OAAO,WAAW;AAClB,SAAQ,cAAa;AAErB,OAAO,2BAA2B;AAQ3B,aAAM,cAAc;AAAA,EAEzB;AAAA,EACA;AAAA,EACA,gBAAoC;AAAA,EACpC;AAAA,EAEA,YAAY,MAA4B;AACtC,SAAK,qBAAqB,KAAK,uBAAuB,MAAM;AAAA,IAAC;AAC7D,UAAM,OAAO,KAAK,QAAQ;AAC1B,UAAM,OAAO,KAAK,QAAQ;AAC1B,SAAK,WAAW,UAAU,IAAI,IAAI,IAAI;AACtC,SAAK,eAAe,QAAQ,IAAI,IAAI,IAAI;AACxC,SAAK,OAAO,KAAK,KAAK,KAAK,IAAI;AAAA,EACjC;AAAA,EAEA,KAAK,IAA8B;AACjC,UAAM,KAAK,WAAW,WAAW;AAAA,MAC/B,MAAM;AAAA,IACR,CAAC,EACE,KAAK,CAAC,aAAc;AACnB,aAAO,SAAS,KAAK;AAAA,IACvB,CAAC,EACA,KAAK,CAAC,SAAS;AACd,YAAM,WAAW;AACjB,WAAK,gBAAgB,SAAS,CAAC;AAC/B,WAAK,mBAAmB;AACxB,SAAG,IAAI;AAAA,IACT,CAAC,EACA,MAAM,MAAM;AACX,SAAG,IAAI,MAAM,8BAA8B,CAAC;AAAA,IAC9C,CAAC;AAAA,EACL;AAAA,EAEA,qBAAqB;AACnB,UAAM,aAAa,IAAI,sBAAsB,KAAK,YAAY;AAC9D,eAAW,YAAY,OAAK;AAC1B,UAAG,CAAC,EAAE;AAAM;AACZ,cAAQ,IAAI,gCAAgC;AAC5C,UAAI,cAAc,MAAM;AACxB,UAAI;AACF,sBAAc,KAAK,MAAM,EAAE,IAAI;AAAA,MACjC,SAAQ,KAAK;AACX,gBAAQ,MAAM,GAAG;AAAA,MACnB;AACA,YAAM,eAAe,MAAM,oBAAoB,WAAW;AAC1D,WAAK,mBAAmB,YAAY;AAAA,IACtC;AAAA,EACF;AAAA,EAEA,YAAY,IAA8B;AACxC,QAAG,KAAK,eAAe;AACrB,YAAM,KAAK,WAAW,aAAa,KAAK,eAAe;AAAA,QACrD,MAAM;AAAA,MACR,CAAC,EACE,KAAK,SAAS,UAAU;AACvB,eAAO,SAAS,KAAK;AAAA,MACvB,CAAC,EACA,KAAK,SAAS,MAAM;AACnB,WAAG,MAAM,oBAAoB,IAAI,CAAC;AAAA,MACpC,CAAC;AAAA,IACL,OAAO;AACL,YAAM,IAAI,MAAM,oEAAoE;AAAA,IACtF;AAAA,EACF;AAAA;AAAA,EAGA,KAAK,UAA+C;AAClD,UAAM,YAAY;AAAA,MAChB,MAAM;AAAA,QACJ,MAAM,oBAAoB,QAAQ;AAAA,MACpC;AAAA,IACF;AAEA,UAAM,KAAK,SAAS;AACpB,UAAM,KAAK,WAAW,aAAa,IAAI;AAAA,MACrC,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,QACP,gBAAgB;AAAA,MAClB;AAAA,MACA,MAAM;AAAA,IACR,CAAC,EACE,MAAM,SAAS,OAAO;AACrB,UAAG;AAAO,gBAAQ,MAAM,KAAK;AAAA,IAC/B,CAAC;AACH,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"affc9a723ceb39c9f38866dab538bc0c9774f995"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return jr=function(){return a},a}jr();class OKe{constructor(e){sn(this,"localUrl");sn(this,"websocketUrl");sn(this,"latestStyleId",(jr().s[0]++,void 0));sn(this,"onLocalStyleChange");jr().f[0]++,jr().s[1]++,this.onLocalStyleChange=(jr().b[0][0]++,e.onLocalStyleChange||(jr().b[0][1]++,()=>{jr().f[1]++}));const t=(jr().s[2]++,jr().b[1][0]++,e.port||(jr().b[1][1]++,"8000")),r=(jr().s[3]++,jr().b[2][0]++,e.host||(jr().b[2][1]++,"localhost"));jr().s[4]++,this.localUrl=`http://${r}:${t}`,jr().s[5]++,this.websocketUrl=`ws://${r}:${t}/ws`,jr().s[6]++,this.init=this.init.bind(this)}init(e){jr().f[2]++,jr().s[7]++,fetch(this.localUrl+"/styles",{mode:"cors"}).then(t=>(jr().f[3]++,jr().s[8]++,t.json())).then(t=>{jr().f[4]++;const r=(jr().s[9]++,t);jr().s[10]++,this.latestStyleId=r[0],jr().s[11]++,this.notifyLocalChanges(),jr().s[12]++,e(null)}).catch(()=>{jr().f[5]++,jr().s[13]++,e(new Error("Can not connect to style API"))})}notifyLocalChanges(){jr().f[6]++;const e=(jr().s[14]++,new EKe(this.websocketUrl));jr().s[15]++,e.onmessage=t=>{if(jr().f[7]++,jr().s[16]++,t.data)jr().b[3][1]++;else{jr().b[3][0]++,jr().s[17]++;return}jr().s[18]++,console.log("Received style update from API");let r=(jr().s[19]++,Ru.emptyStyle);jr().s[20]++;try{jr().s[21]++,r=JSON.parse(t.data)}catch(o){jr().s[22]++,console.error(o)}const i=(jr().s[23]++,Ru.ensureStyleValidity(r));jr().s[24]++,this.onLocalStyleChange(i)}}latestStyle(e){if(jr().f[8]++,jr().s[25]++,this.latestStyleId)jr().b[4][0]++,jr().s[26]++,fetch(this.localUrl+"/styles/"+this.latestStyleId,{mode:"cors"}).then(function(t){return jr().f[9]++,jr().s[27]++,t.json()}).then(function(t){jr().f[10]++,jr().s[28]++,e(Ru.ensureStyleValidity(t))});else throw jr().b[4][1]++,jr().s[29]++,new Error("No latest style available. You need to init the api backend first.")}save(e){jr().f[11]++;const t=(jr().s[30]++,Hz(Ru.stripAccessTokens(Ru.replaceAccessTokens(e)))),r=(jr().s[31]++,e.id);return jr().s[32]++,fetch(this.localUrl+"/styles/"+r,{method:"PUT",mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"},body:t}).catch(function(i){jr().f[12]++,jr().s[33]++,i?(jr().b[5][0]++,jr().s[34]++,console.error(i)):jr().b[5][1]++}),jr().s[35]++,e}}function Ja(){var n="/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",e="9277d165d3b1fd7c235a1faab33cf41596d9966e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",statementMap:{0:{start:{line:5,column:4},end:{line:5,column:38}},1:{start:{line:6,column:4},end:{line:6,column:50}},2:{start:{line:9,column:4},end:{line:9,column:53}},3:{start:{line:12,column:4},end:{line:12,column:43}},4:{start:{line:15,column:4},end:{line:15,column:66}},5:{start:{line:16,column:4},end:{line:16,column:34}},6:{start:{line:17,column:4},end:{line:17,column:22}},7:{start:{line:20,column:4},end:{line:22,column:5}},8:{start:{line:21,column:6},end:{line:21,column:24}},9:{start:{line:23,column:4},end:{line:23,column:24}},10:{start:{line:26,column:4},end:{line:28,column:5}},11:{start:{line:27,column:6},end:{line:27,column:24}},12:{start:{line:29,column:4},end:{line:29,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:37},end:{line:7,column:3}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:15},end:{line:10,column:3}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:11,column:2},end:{line:11,column:3}},loc:{start:{line:11,column:16},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:24},end:{line:18,column:3}},line:14},4:{name:"(anonymous_4)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:24,column:3}},line:19},5:{name:"(anonymous_5)",decl:{start:{line:25,column:2},end:{line:25,column:3}},loc:{start:{line:25,column:9},end:{line:30,column:3}},line:25}},branchMap:{0:{loc:{start:{line:4,column:14},end:{line:4,column:35}},type:"default-arg",locations:[{start:{line:4,column:33},end:{line:4,column:35}}],line:4},1:{loc:{start:{line:20,column:4},end:{line:22,column:5}},type:"if",locations:[{start:{line:20,column:4},end:{line:22,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},2:{loc:{start:{line:26,column:4},end:{line:28,column:5}},type:"if",locations:[{start:{line:26,column:4},end:{line:28,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:26}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/revisions.ts"],names:[],mappings:"AAEO,aAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EAGA,YAAY,mBAAiB,CAAC,GAAG;AAC/B,SAAK,YAAY;AACjB,SAAK,aAAa,iBAAiB,SAAS;AAAA,EAC9C;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,KAAK,UAAU,KAAK,UAAU,SAAS,CAAC;AAAA,EACjD;AAAA,EAEA,IAAI,UAAU;AACZ,WAAO,KAAK,UAAU,KAAK,UAAU;AAAA,EACvC;AAAA,EAEA,YAAY,UAA6C;AAGvD,SAAK,YAAY,KAAK,UAAU,MAAM,GAAG,KAAK,aAAa,CAAC;AAE5D,SAAK,UAAU,KAAK,QAAQ;AAC5B,SAAK;AAAA,EAEP;AAAA,EAEA,OAAO;AACL,QAAG,KAAK,aAAa,GAAG;AACtB,WAAK;AAAA,IACP;AACA,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,OAAO;AACL,QAAG,KAAK,aAAa,KAAK,UAAU,SAAS,GAAG;AAC9C,WAAK;AAAA,IACP;AACA,WAAO,KAAK;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9277d165d3b1fd7c235a1faab33cf41596d9966e"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return Ja=function(){return a},a}Ja();class BKe{constructor(e=(Ja().b[0][0]++,[])){sn(this,"revisions");sn(this,"currentIdx");Ja().f[0]++,Ja().s[0]++,this.revisions=e,Ja().s[1]++,this.currentIdx=e.length-1}get latest(){return Ja().f[1]++,Ja().s[2]++,this.revisions[this.revisions.length-1]}get current(){return Ja().f[2]++,Ja().s[3]++,this.revisions[this.currentIdx]}addRevision(e){Ja().f[3]++,Ja().s[4]++,this.revisions=this.revisions.slice(0,this.currentIdx+1),Ja().s[5]++,this.revisions.push(e),Ja().s[6]++,this.currentIdx++}undo(){return Ja().f[4]++,Ja().s[7]++,this.currentIdx>0?(Ja().b[1][0]++,Ja().s[8]++,this.currentIdx--):Ja().b[1][1]++,Ja().s[9]++,this.current}redo(){return Ja().f[5]++,Ja().s[10]++,this.currentIdx<this.revisions.length-1?(Ja().b[2][0]++,Ja().s[11]++,this.currentIdx++):Ja().b[2][1]++,Ja().s[12]++,this.current}}var wY="Expected a function",nF=NaN,IKe="[object Symbol]",kKe=/^\s+|\s+$/g,TKe=/^[-+]0x[0-9a-f]+$/i,KKe=/^0b[01]+$/i,PKe=/^0o[0-7]+$/i,DKe=parseInt,LKe=typeof window=="object"&&window&&window.Object===Object&&window,FKe=typeof self=="object"&&self&&self.Object===Object&&self,UKe=LKe||FKe||Function("return this")(),RKe=Object.prototype,zKe=RKe.toString,jKe=Math.max,NKe=Math.min,HE=function(){return UKe.Date.now()};function WKe(n,e,t){var r,i,o,a,s,d,f=0,C=!1,O=!1,E=!0;if(typeof n!="function")throw new TypeError(wY);e=rF(e)||0,K5(t)&&(C=!!t.leading,O="maxWait"in t,o=O?jKe(rF(t.maxWait)||0,e):o,E="trailing"in t?!!t.trailing:E);function P(fe){var X=r,oe=i;return r=i=void 0,f=fe,a=n.apply(oe,X),a}function D(fe){return f=fe,s=setTimeout(Q,e),C?P(fe):a}function $(fe){var X=fe-d,oe=fe-f,Ce=e-X;return O?NKe(Ce,o-oe):Ce}function H(fe){var X=fe-d,oe=fe-f;return d===void 0||X>=e||X<0||O&&oe>=o}function Q(){var fe=HE();if(H(fe))return N(fe);s=setTimeout(Q,$(fe))}function N(fe){return s=void 0,E&&r?P(fe):(r=i=void 0,a)}function Z(){s!==void 0&&clearTimeout(s),f=0,r=d=i=s=void 0}function ae(){return s===void 0?a:N(HE())}function pe(){var fe=HE(),X=H(fe);if(r=arguments,i=this,d=fe,X){if(s===void 0)return D(d);if(O)return s=setTimeout(Q,e),P(d)}return s===void 0&&(s=setTimeout(Q,e)),a}return pe.cancel=Z,pe.flush=ae,pe}function GKe(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(wY);return K5(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),WKe(n,e,{leading:r,maxWait:e,trailing:i})}function K5(n){var e=typeof n;return!!n&&(e=="object"||e=="function")}function $Ke(n){return!!n&&typeof n=="object"}function QKe(n){return typeof n=="symbol"||$Ke(n)&&zKe.call(n)==IKe}function rF(n){if(typeof n=="number")return n;if(QKe(n))return nF;if(K5(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=K5(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=n.replace(kKe,"");var t=KKe.test(n);return t||PKe.test(n)?DKe(n.slice(2),t?2:8):TKe.test(n)?nF:+n}var YKe=GKe;const qKe=Ba(YKe);var P5={exports:{}};P5.exports;(function(n,e){var t=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",C="[object Boolean]",O="[object Date]",E="[object Error]",P="[object Function]",D="[object GeneratorFunction]",$="[object Map]",H="[object Number]",Q="[object Null]",N="[object Object]",Z="[object Promise]",ae="[object Proxy]",pe="[object RegExp]",fe="[object Set]",X="[object String]",oe="[object Symbol]",Ce="[object Undefined]",we="[object WeakMap]",Te="[object ArrayBuffer]",Pe="[object DataView]",he="[object Float32Array]",$e="[object Float64Array]",ye="[object Int8Array]",gt="[object Int16Array]",yt="[object Int32Array]",st="[object Uint8Array]",ft="[object Uint8ClampedArray]",Re="[object Uint16Array]",Ve="[object Uint32Array]",Xe=/[\\^$.*+?()[\]{}|]/g,Jt=/^\[object .+?Constructor\]$/,Ht=/^(?:0|[1-9]\d*)$/,bt={};bt[he]=bt[$e]=bt[ye]=bt[gt]=bt[yt]=bt[st]=bt[ft]=bt[Re]=bt[Ve]=!0,bt[s]=bt[d]=bt[Te]=bt[C]=bt[Pe]=bt[O]=bt[E]=bt[P]=bt[$]=bt[H]=bt[N]=bt[pe]=bt[fe]=bt[X]=bt[we]=!1;var Qt=typeof window=="object"&&window&&window.Object===Object&&window,Yt=typeof self=="object"&&self&&self.Object===Object&&self,ke=Qt||Yt||Function("return this")(),ge=e&&!e.nodeType&&e,Se=ge&&!0&&n&&!n.nodeType&&n,ze=Se&&Se.exports===ge,it=ze&&Qt.process,ot=function(){try{return it&&it.binding&&it.binding("util")}catch{}}(),St=ot&&ot.isTypedArray;function Rt(z,le){for(var Ue=-1,vt=z==null?0:z.length,$n=0,vn=[];++Ue<vt;){var Kn=z[Ue];le(Kn,Ue,z)&&(vn[$n++]=Kn)}return vn}function zt(z,le){for(var Ue=-1,vt=le.length,$n=z.length;++Ue<vt;)z[$n+Ue]=le[Ue];return z}function mt(z,le){for(var Ue=-1,vt=z==null?0:z.length;++Ue<vt;)if(le(z[Ue],Ue,z))return!0;return!1}function or(z,le){for(var Ue=-1,vt=Array(z);++Ue<z;)vt[Ue]=le(Ue);return vt}function gn(z){return function(le){return z(le)}}function yn(z,le){return z.has(le)}function tr(z,le){return z==null?void 0:z[le]}function dr(z){var le=-1,Ue=Array(z.size);return z.forEach(function(vt,$n){Ue[++le]=[$n,vt]}),Ue}function Sr(z,le){return function(Ue){return z(le(Ue))}}function Nr(z){var le=-1,Ue=Array(z.size);return z.forEach(function(vt){Ue[++le]=vt}),Ue}var yr=Array.prototype,_i=Function.prototype,Ee=Object.prototype,ee=ke["__core-js_shared__"],V=_i.toString,Ke=Ee.hasOwnProperty,At=function(){var z=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||"");return z?"Symbol(src)_1."+z:""}(),Bt=Ee.toString,kt=RegExp("^"+V.call(Ke).replace(Xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=ze?ke.Buffer:void 0,fn=ke.Symbol,Pn=ke.Uint8Array,On=Ee.propertyIsEnumerable,g=yr.splice,Kt=fn?fn.toStringTag:void 0,Pr=Object.getOwnPropertySymbols,rr=Lt?Lt.isBuffer:void 0,Le=Sr(Object.keys,Object),ce=na(ke,"DataView"),xe=na(ke,"Map"),Ie=na(ke,"Promise"),je=na(ke,"Set"),rt=na(ke,"WeakMap"),lt=na(Object,"create"),pt=Wo(ce),et=Wo(xe),Mt=Wo(Ie),tn=Wo(je),qt=Wo(rt),en=fn?fn.prototype:void 0,Fn=en?en.valueOf:void 0;function Bn(z){var le=-1,Ue=z==null?0:z.length;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function Hn(){this.__data__=lt?lt(null):{},this.size=0}function Or(z){var le=this.has(z)&&delete this.__data__[z];return this.size-=le?1:0,le}function cr(z){var le=this.__data__;if(lt){var Ue=le[z];return Ue===r?void 0:Ue}return Ke.call(le,z)?le[z]:void 0}function Qr(z){var le=this.__data__;return lt?le[z]!==void 0:Ke.call(le,z)}function Br(z,le){var Ue=this.__data__;return this.size+=this.has(z)?0:1,Ue[z]=lt&&le===void 0?r:le,this}Bn.prototype.clear=Hn,Bn.prototype.delete=Or,Bn.prototype.get=cr,Bn.prototype.has=Qr,Bn.prototype.set=Br;function Fr(z){var le=-1,Ue=z==null?0:z.length;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function ar(){this.__data__=[],this.size=0}function di(z){var le=this.__data__,Ue=wn(le,z);if(Ue<0)return!1;var vt=le.length-1;return Ue==vt?le.pop():g.call(le,Ue,1),--this.size,!0}function Ui(z){var le=this.__data__,Ue=wn(le,z);return Ue<0?void 0:le[Ue][1]}function to(z){return wn(this.__data__,z)>-1}function ho(z,le){var Ue=this.__data__,vt=wn(Ue,z);return vt<0?(++this.size,Ue.push([z,le])):Ue[vt][1]=le,this}Fr.prototype.clear=ar,Fr.prototype.delete=di,Fr.prototype.get=Ui,Fr.prototype.has=to,Fr.prototype.set=ho;function si(z){var le=-1,Ue=z==null?0:z.length;for(this.clear();++le<Ue;){var vt=z[le];this.set(vt[0],vt[1])}}function fo(){this.size=0,this.__data__={hash:new Bn,map:new(xe||Fr),string:new Bn}}function Na(z){var le=ta(this,z).delete(z);return this.size-=le?1:0,le}function Ia(z){return ta(this,z).get(z)}function Ei(z){return ta(this,z).has(z)}function os(z,le){var Ue=ta(this,z),vt=Ue.size;return Ue.set(z,le),this.size+=Ue.size==vt?0:1,this}si.prototype.clear=fo,si.prototype.delete=Na,si.prototype.get=Ia,si.prototype.has=Ei,si.prototype.set=os;function yi(z){var le=-1,Ue=z==null?0:z.length;for(this.__data__=new si;++le<Ue;)this.add(z[le])}function Gn(z){return this.__data__.set(z,r),this}function ro(z){return this.__data__.has(z)}yi.prototype.add=yi.prototype.push=Gn,yi.prototype.has=ro;function Co(z){var le=this.__data__=new Fr(z);this.size=le.size}function Ri(){this.__data__=new Fr,this.size=0}function _e(z){var le=this.__data__,Ue=le.delete(z);return this.size=le.size,Ue}function Je(z){return this.__data__.get(z)}function Zt(z){return this.__data__.has(z)}function ln(z,le){var Ue=this.__data__;if(Ue instanceof Fr){var vt=Ue.__data__;if(!xe||vt.length<t-1)return vt.push([z,le]),this.size=++Ue.size,this;Ue=this.__data__=new si(vt)}return Ue.set(z,le),this.size=Ue.size,this}Co.prototype.clear=Ri,Co.prototype.delete=_e,Co.prototype.get=Je,Co.prototype.has=Zt,Co.prototype.set=ln;function Ft(z,le){var Ue=ss(z),vt=!Ue&&nu(z),$n=!Ue&&!vt&&Go(z),vn=!Ue&&!vt&&!$n&&cl(z),Kn=Ue||vt||$n||vn,Ur=Kn?or(z.length,String):[],vr=Ur.length;for(var kr in z)(le||Ke.call(z,kr))&&!(Kn&&(kr=="length"||$n&&(kr=="offset"||kr=="parent")||vn&&(kr=="buffer"||kr=="byteLength"||kr=="byteOffset")||_A(kr,vr)))&&Ur.push(kr);return Ur}function wn(z,le){for(var Ue=z.length;Ue--;)if(xs(z[Ue][0],le))return Ue;return-1}function hr(z,le,Ue){var vt=le(z);return ss(z)?vt:zt(vt,Ue(z))}function ii(z){return z==null?z===void 0?Ce:Q:Kt&&Kt in Object(z)?bs(z):Gu(z)}function li(z){return ua(z)&&ii(z)==s}function Jo(z,le,Ue,vt,$n){return z===le?!0:z==null||le==null||!ua(z)&&!ua(le)?z!==z&&le!==le:Ka(z,le,Ue,vt,Jo,$n)}function Ka(z,le,Ue,vt,$n,vn){var Kn=ss(z),Ur=ss(le),vr=Kn?d:ma(z),kr=Ur?d:ma(le);vr=vr==s?N:vr,kr=kr==s?N:kr;var Ti=vr==N,po=kr==N,Oi=vr==kr;if(Oi&&Go(z)){if(!Go(le))return!1;Kn=!0,Ti=!1}if(Oi&&!Ti)return vn||(vn=new Co),Kn||cl(z)?Ga(z,le,Ue,vt,$n,vn):ea(z,le,vr,Ue,vt,$n,vn);if(!(Ue&i)){var Zr=Ti&&Ke.call(z,"__wrapped__"),Vi=po&&Ke.call(le,"__wrapped__");if(Zr||Vi){var Io=Zr?z.value():z,wo=Vi?le.value():le;return vn||(vn=new Co),$n(Io,wo,Ue,vt,vn)}}return Oi?(vn||(vn=new Co),xu(z,le,Ue,vt,$n,vn)):!1}function Dr(z){if(!ru(z)||bA(z))return!1;var le=Al(z)?kt:Jt;return le.test(Wo(z))}function Wa(z){return ua(z)&&Ml(z.length)&&!!bt[ii(z)]}function vi(z){if(!Mu(z))return Le(z);var le=[];for(var Ue in Object(z))Ke.call(z,Ue)&&Ue!="constructor"&&le.push(Ue);return le}function Ga(z,le,Ue,vt,$n,vn){var Kn=Ue&i,Ur=z.length,vr=le.length;if(Ur!=vr&&!(Kn&&vr>Ur))return!1;var kr=vn.get(z);if(kr&&vn.get(le))return kr==le;var Ti=-1,po=!0,Oi=Ue&o?new yi:void 0;for(vn.set(z,le),vn.set(le,z);++Ti<Ur;){var Zr=z[Ti],Vi=le[Ti];if(vt)var Io=Kn?vt(Vi,Zr,Ti,le,z,vn):vt(Zr,Vi,Ti,z,le,vn);if(Io!==void 0){if(Io)continue;po=!1;break}if(Oi){if(!mt(le,function(wo,$a){if(!yn(Oi,$a)&&(Zr===wo||$n(Zr,wo,Ue,vt,vn)))return Oi.push($a)})){po=!1;break}}else if(!(Zr===Vi||$n(Zr,Vi,Ue,vt,vn))){po=!1;break}}return vn.delete(z),vn.delete(le),po}function ea(z,le,Ue,vt,$n,vn,Kn){switch(Ue){case Pe:if(z.byteLength!=le.byteLength||z.byteOffset!=le.byteOffset)return!1;z=z.buffer,le=le.buffer;case Te:return!(z.byteLength!=le.byteLength||!vn(new Pn(z),new Pn(le)));case C:case O:case H:return xs(+z,+le);case E:return z.name==le.name&&z.message==le.message;case pe:case X:return z==le+"";case $:var Ur=dr;case fe:var vr=vt&i;if(Ur||(Ur=Nr),z.size!=le.size&&!vr)return!1;var kr=Kn.get(z);if(kr)return kr==le;vt|=o,Kn.set(z,le);var Ti=Ga(Ur(z),Ur(le),vt,$n,vn,Kn);return Kn.delete(z),Ti;case oe:if(Fn)return Fn.call(z)==Fn.call(le)}return!1}function xu(z,le,Ue,vt,$n,vn){var Kn=Ue&i,Ur=as(z),vr=Ur.length,kr=as(le),Ti=kr.length;if(vr!=Ti&&!Kn)return!1;for(var po=vr;po--;){var Oi=Ur[po];if(!(Kn?Oi in le:Ke.call(le,Oi)))return!1}var Zr=vn.get(z);if(Zr&&vn.get(le))return Zr==le;var Vi=!0;vn.set(z,le),vn.set(le,z);for(var Io=Kn;++po<vr;){Oi=Ur[po];var wo=z[Oi],$a=le[Oi];if(vt)var Fl=Kn?vt($a,wo,Oi,le,z,vn):vt(wo,$a,Oi,z,le,vn);if(!(Fl===void 0?wo===$a||$n(wo,$a,Ue,vt,vn):Fl)){Vi=!1;break}Io||(Io=Oi=="constructor")}if(Vi&&!Io){var iu=z.constructor,ga=le.constructor;iu!=ga&&"constructor"in z&&"constructor"in le&&!(typeof iu=="function"&&iu instanceof iu&&typeof ga=="function"&&ga instanceof ga)&&(Vi=!1)}return vn.delete(z),vn.delete(le),Vi}function as(z){return hr(z,xA,wu)}function ta(z,le){var Ue=z.__data__;return Wu(le)?Ue[typeof le=="string"?"string":"hash"]:Ue.map}function na(z,le){var Ue=tr(z,le);return Dr(Ue)?Ue:void 0}function bs(z){var le=Ke.call(z,Kt),Ue=z[Kt];try{z[Kt]=void 0;var vt=!0}catch{}var $n=Bt.call(z);return vt&&(le?z[Kt]=Ue:delete z[Kt]),$n}var wu=Pr?function(z){return z==null?[]:(z=Object(z),Rt(Pr(z),function(le){return On.call(z,le)}))}:vo,ma=ii;(ce&&ma(new ce(new ArrayBuffer(1)))!=Pe||xe&&ma(new xe)!=$||Ie&&ma(Ie.resolve())!=Z||je&&ma(new je)!=fe||rt&&ma(new rt)!=we)&&(ma=function(z){var le=ii(z),Ue=le==N?z.constructor:void 0,vt=Ue?Wo(Ue):"";if(vt)switch(vt){case pt:return Pe;case et:return $;case Mt:return Z;case tn:return fe;case qt:return we}return le});function _A(z,le){return le=le??a,!!le&&(typeof z=="number"||Ht.test(z))&&z>-1&&z%1==0&&z<le}function Wu(z){var le=typeof z;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?z!=="__proto__":z===null}function bA(z){return!!At&&At in z}function Mu(z){var le=z&&z.constructor,Ue=typeof le=="function"&&le.prototype||Ee;return z===Ue}function Gu(z){return Bt.call(z)}function Wo(z){if(z!=null){try{return V.call(z)}catch{}try{return z+""}catch{}}return""}function xs(z,le){return z===le||z!==z&&le!==le}var nu=li(function(){return arguments}())?li:function(z){return ua(z)&&Ke.call(z,"callee")&&!On.call(z,"callee")},ss=Array.isArray;function ul(z){return z!=null&&Ml(z.length)&&!Al(z)}var Go=rr||io;function Su(z,le){return Jo(z,le)}function Al(z){if(!ru(z))return!1;var le=ii(z);return le==P||le==D||le==f||le==ae}function Ml(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=a}function ru(z){var le=typeof z;return z!=null&&(le=="object"||le=="function")}function ua(z){return z!=null&&typeof z=="object"}var cl=St?gn(St):Wa;function xA(z){return ul(z)?Ft(z):vi(z)}function vo(){return[]}function io(){return!1}n.exports=Su})(P5,P5.exports);var VKe=P5.exports;const qB=Ba(VKe);function ni(){var n="/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",e="77d2098743f5a64765174c6e14fc4dc25f900f6c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",statementMap:{0:{start:{line:10,column:4},end:{line:11,column:7}},1:{start:{line:12,column:4},end:{line:13,column:7}},2:{start:{line:14,column:4},end:{line:14,column:23}},3:{start:{line:15,column:4},end:{line:15,column:28}},4:{start:{line:16,column:4},end:{line:16,column:90}},5:{start:{line:19,column:28},end:{line:19,column:48}},6:{start:{line:20,column:4},end:{line:22,column:7}},7:{start:{line:21,column:6},end:{line:21,column:88}},8:{start:{line:23,column:4},end:{line:25,column:5}},9:{start:{line:24,column:6},end:{line:24,column:42}},10:{start:{line:26,column:4},end:{line:26,column:48}},11:{start:{line:29,column:33},end:{line:29,column:58}},12:{start:{line:30,column:4},end:{line:43,column:7}},13:{start:{line:31,column:6},end:{line:42,column:9}},14:{start:{line:32,column:32},end:{line:32,column:71}},15:{start:{line:33,column:23},end:{line:33,column:53}},16:{start:{line:34,column:8},end:{line:40,column:11}},17:{start:{line:35,column:10},end:{line:39,column:13}},18:{start:{line:36,column:40},end:{line:36,column:75}},19:{start:{line:37,column:12},end:{line:37,column:71}},20:{start:{line:38,column:12},end:{line:38,column:64}},21:{start:{line:41,column:8},end:{line:41,column:60}},22:{start:{line:44,column:4},end:{line:46,column:5}},23:{start:{line:45,column:6},end:{line:45,column:52}},24:{start:{line:50,column:4},end:{line:50,column:25}},25:{start:{line:53,column:4},end:{line:53,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:25},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:10,column:52},end:{line:10,column:53}},loc:{start:{line:10,column:58},end:{line:11,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:12,column:62},end:{line:12,column:63}},loc:{start:{line:12,column:68},end:{line:13,column:5}},line:12},3:{name:"(anonymous_3)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:18},end:{line:27,column:3}},line:18},4:{name:"(anonymous_4)",decl:{start:{line:20,column:48},end:{line:20,column:49}},loc:{start:{line:20,column:62},end:{line:22,column:5}},line:20},5:{name:"(anonymous_5)",decl:{start:{line:28,column:2},end:{line:28,column:3}},loc:{start:{line:28,column:32},end:{line:47,column:3}},line:28},6:{name:"(anonymous_6)",decl:{start:{line:30,column:39},end:{line:30,column:40}},loc:{start:{line:30,column:53},end:{line:43,column:5}},line:30},7:{name:"(anonymous_7)",decl:{start:{line:31,column:46},end:{line:31,column:47}},loc:{start:{line:31,column:65},end:{line:42,column:7}},line:31},8:{name:"(anonymous_8)",decl:{start:{line:34,column:58},end:{line:34,column:59}},loc:{start:{line:34,column:71},end:{line:40,column:9}},line:34},9:{name:"(anonymous_9)",decl:{start:{line:35,column:50},end:{line:35,column:51}},loc:{start:{line:35,column:68},end:{line:39,column:11}},line:35},10:{name:"(anonymous_10)",decl:{start:{line:49,column:2},end:{line:49,column:3}},loc:{start:{line:49,column:16},end:{line:51,column:3}},line:49},11:{name:"(anonymous_11)",decl:{start:{line:52,column:2},end:{line:52,column:3}},loc:{start:{line:52,column:21},end:{line:54,column:3}},line:52}},branchMap:{0:{loc:{start:{line:9,column:14},end:{line:9,column:23}},type:"default-arg",locations:[{start:{line:9,column:21},end:{line:9,column:23}}],line:9},1:{loc:{start:{line:10,column:27},end:{line:11,column:6}},type:"binary-expr",locations:[{start:{line:10,column:27},end:{line:10,column:47}},{start:{line:10,column:52},end:{line:11,column:5}}],line:10},2:{loc:{start:{line:12,column:32},end:{line:13,column:6}},type:"binary-expr",locations:[{start:{line:12,column:32},end:{line:12,column:57}},{start:{line:12,column:62},end:{line:13,column:5}}],line:12},3:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},4:{loc:{start:{line:31,column:7},end:{line:31,column:36}},type:"binary-expr",locations:[{start:{line:31,column:7},end:{line:31,column:30}},{start:{line:31,column:34},end:{line:31,column:36}}],line:31},5:{loc:{start:{line:32,column:32},end:{line:32,column:71}},type:"binary-expr",locations:[{start:{line:32,column:32},end:{line:32,column:65}},{start:{line:32,column:69},end:{line:32,column:71}}],line:32},6:{loc:{start:{line:36,column:40},end:{line:36,column:75}},type:"binary-expr",locations:[{start:{line:36,column:40},end:{line:36,column:69}},{start:{line:36,column:73},end:{line:36,column:75}}],line:36},7:{loc:{start:{line:44,column:4},end:{line:46,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:46,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts"],names:[],mappings:"AAAA,OAAO,cAAc;AACrB,OAAO,aAAa;AAUpB,qBAAqB,aAAa;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAA4B,CAAC,GAAG;AAC1C,SAAK,kBAAkB,KAAK,oBAAoB,MAAM;AAAA,IAAC;AACvD,SAAK,uBAAuB,KAAK,yBAAyB,MAAM;AAAA,IAAC;AAEjE,SAAK,WAAW,CAAC;AACjB,SAAK,gBAAgB,CAAC;AAKtB,SAAK,oCAAoC,SAAS,KAAK,0BAA0B,GAAI;AAAA,EACvF;AAAA,EAEA,WAAW,KAAU;AACnB,UAAM,kBAAkB,EAAE,GAAG,KAAK,SAAS;AAE3C,WAAO,KAAK,IAAI,MAAM,YAAY,EAAE,QAAQ,cAAY;AAGtD,WAAK,SAAS,QAAQ,IAAI,IAAI,MAAM,aAAa,QAAQ,EAAE,QAAQ;AAAA,IACrE,CAAC;AAED,QAAG,CAAC,QAAQ,iBAAiB,KAAK,QAAQ,GAAG;AAC3C,WAAK,gBAAgB,KAAK,QAAQ;AAAA,IACpC;AAEA,SAAK,kCAAkC,GAAG;AAAA,EAC5C;AAAA,EAEA,yBAAyB,KAAU;AACjC,UAAM,uBAAuB,EAAE,GAAG,KAAK,cAAc;AAErD,WAAO,KAAK,KAAK,QAAQ,EAAE,QAAQ,cAAY;AAC7C,OAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,GAAG,QAAQ,mBAAiB;AACvD,cAAM,kBAAkB,KAAK,cAAc,aAAa,KAAK,CAAC;AAC9D,cAAM,SAAS,EAAE,aAAa,cAAc;AAC5C,YAAI,oBAAoB,UAAU,MAAa,EAAE,QAAQ,aAAW;AAClE,iBAAO,KAAK,QAAQ,UAAU,EAAE,QAAQ,kBAAgB;AACtD,kBAAM,sBAAsB,gBAAgB,YAAY,KAAK,CAAC;AAC9D,gCAAoB,QAAQ,WAAW,YAAY,CAAC,IAAI,CAAC;AACzD,4BAAgB,YAAY,IAAI;AAAA,UAClC,CAAC;AAAA,QACH,CAAC;AAED,aAAK,cAAc,aAAa,IAAI;AAAA,MACtC,CAAC;AAAA,IACH,CAAC;AAED,QAAG,CAAC,QAAQ,sBAAsB,KAAK,aAAa,GAAG;AACrD,WAAK,qBAAqB,KAAK,aAAa;AAAA,IAC9C;AAAA,EAEF;AAAA;AAAA,EAGA,IAAI,UAAU;AACZ,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,eAAe;AACjB,WAAO,KAAK;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"77d2098743f5a64765174c6e14fc4dc25f900f6c"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return ni=function(){return a},a}ni();class HKe{constructor(e=(ni().b[0][0]++,{})){sn(this,"onSourcesChange");sn(this,"onVectorLayersChange");sn(this,"throttledAnalyzeVectorLayerFields");sn(this,"_sources");sn(this,"_vectorLayers");ni().f[0]++,ni().s[0]++,this.onSourcesChange=(ni().b[1][0]++,e.onSourcesChange||(ni().b[1][1]++,()=>{ni().f[1]++})),ni().s[1]++,this.onVectorLayersChange=(ni().b[2][0]++,e.onVectorLayersChange||(ni().b[2][1]++,()=>{ni().f[2]++})),ni().s[2]++,this._sources={},ni().s[3]++,this._vectorLayers={},ni().s[4]++,this.throttledAnalyzeVectorLayerFields=qKe(this.analyzeVectorLayerFields,5e3)}analyzeMap(e){ni().f[3]++;const t=(ni().s[5]++,{...this._sources});ni().s[6]++,Object.keys(e.style.sourceCaches).forEach(r=>{ni().f[4]++,ni().s[7]++,this._sources[r]=e.style.sourceCaches[r]._source.vectorLayerIds}),ni().s[8]++,qB(t,this._sources)?ni().b[3][1]++:(ni().b[3][0]++,ni().s[9]++,this.onSourcesChange(this._sources)),ni().s[10]++,this.throttledAnalyzeVectorLayerFields(e)}analyzeVectorLayerFields(e){ni().f[5]++;const t=(ni().s[11]++,{...this._vectorLayers});ni().s[12]++,Object.keys(this._sources).forEach(r=>{ni().f[6]++,ni().s[13]++,(ni().b[4][0]++,this._sources[r]||(ni().b[4][1]++,[])).forEach(i=>{ni().f[7]++;const o=(ni().s[14]++,ni().b[5][0]++,this._vectorLayers[i]||(ni().b[5][1]++,{})),a=(ni().s[15]++,{sourceLayer:i});ni().s[16]++,e.querySourceFeatures(r,a).forEach(s=>{ni().f[8]++,ni().s[17]++,Object.keys(s.properties).forEach(d=>{ni().f[9]++;const f=(ni().s[18]++,ni().b[6][0]++,o[d]||(ni().b[6][1]++,{}));ni().s[19]++,f[s.properties[d]]={},ni().s[20]++,o[d]=f})}),ni().s[21]++,this._vectorLayers[i]=o})}),ni().s[22]++,qB(t,this._vectorLayers)?ni().b[7][1]++:(ni().b[7][0]++,ni().s[23]++,this.onVectorLayersChange(this._vectorLayers))}get sources(){return ni().f[10]++,ni().s[24]++,this._sources}get vectorLayers(){return ni().f[11]++,ni().s[25]++,this._vectorLayers}}function qo(){var n="/home/runner/work/maputnik/maputnik/src/libs/debug.ts",e="f3fc52390a8e0125df8ac2b3d3c29ba103bd1c39",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/debug.ts",statementMap:{0:{start:{line:1,column:19},end:{line:1,column:21}},1:{start:{line:3,column:13},end:{line:3,column:55}},2:{start:{line:4,column:18},end:{line:4,column:33}},3:{start:{line:5,column:2},end:{line:9,column:3}},4:{start:{line:6,column:4},end:{line:6,column:42}},5:{start:{line:8,column:4},end:{line:8,column:17}},6:{start:{line:12,column:2},end:{line:12,column:91}},7:{start:{line:15,column:2},end:{line:17,column:3}},8:{start:{line:16,column:4},end:{line:16,column:19}},9:{start:{line:18,column:2},end:{line:18,column:54}},10:{start:{line:19,column:2},end:{line:19,column:37}},11:{start:{line:22,column:2},end:{line:24,column:3}},12:{start:{line:23,column:4},end:{line:23,column:19}},13:{start:{line:25,column:2},end:{line:27,column:3}},14:{start:{line:26,column:4},end:{line:26,column:38}},15:{start:{line:29,column:12},end:{line:33,column:1}},16:{start:{line:34,column:0},end:{line:34,column:19}}},fnMap:{0:{name:"enabled",decl:{start:{line:2,column:9},end:{line:2,column:16}},loc:{start:{line:2,column:19},end:{line:10,column:1}},line:2},1:{name:"genErr",decl:{start:{line:11,column:9},end:{line:11,column:15}},loc:{start:{line:11,column:18},end:{line:13,column:1}},line:11},2:{name:"set",decl:{start:{line:14,column:9},end:{line:14,column:12}},loc:{start:{line:14,column:36},end:{line:20,column:1}},line:14},3:{name:"get",decl:{start:{line:21,column:9},end:{line:21,column:12}},loc:{start:{line:21,column:29},end:{line:28,column:1}},line:21}},branchMap:{0:{loc:{start:{line:5,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:9,column:3}},{start:{line:7,column:9},end:{line:9,column:3}}],line:5},1:{loc:{start:{line:15,column:2},end:{line:17,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:17,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:18,column:26},end:{line:18,column:53}},type:"binary-expr",locations:[{start:{line:18,column:26},end:{line:18,column:47}},{start:{line:18,column:51},end:{line:18,column:53}}],line:18},3:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},4:{loc:{start:{line:25,column:2},end:{line:27,column:3}},type:"if",locations:[{start:{line:25,column:2},end:{line:27,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:25}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/debug.ts"],names:[],mappings:"AAMA,MAAM,aAAyB,CAAC;AAEhC,SAAS,UAAU;AACjB,QAAM,KAAK,IAAI,IAAI,OAAO,SAAS,IAAI,EAAE;AACzC,QAAM,UAAU,GAAG,IAAI,OAAO;AAC9B,MAAG,SAAS;AACV,WAAO,CAAC,CAAC,QAAQ,MAAM,aAAa;AAAA,EACtC,OACK;AACH,WAAO;AAAA,EACT;AACF;AAEA,SAAS,SAAS;AAChB,SAAO,IAAI,MAAM,sEAAsE;AACzF;AAEA,SAAS,IAAI,WAA6B,KAAa,OAAY;AACjE,MAAG,CAAC,QAAQ,GAAG;AACb,UAAM,OAAO;AAAA,EACf;AACA,aAAW,SAAS,IAAI,WAAW,SAAS,KAAK,CAAC;AAClD,aAAW,SAAS,EAAE,GAAG,IAAI;AAC/B;AAEA,SAAS,IAAI,WAA6B,KAAa;AACrD,MAAG,CAAC,QAAQ,GAAG;AACb,UAAM,OAAO;AAAA,EACf;AACA,MAAG,OAAO,UAAU,eAAe,KAAK,YAAY,SAAS,GAAG;AAC9D,WAAO,WAAW,SAAS,EAAE,GAAG;AAAA,EAClC;AACF;AAEA,MAAM,MAAM;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF;AAEC,OAAe,QAAQ;AACxB,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f3fc52390a8e0125df8ac2b3d3c29ba103bd1c39"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return qo=function(){return a},a}qo();const D_=(qo().s[0]++,{});function Pk(){qo().f[0]++;const n=(qo().s[1]++,new URL(window.location.href).searchParams),e=(qo().s[2]++,n.get("debug"));return qo().s[3]++,e?(qo().b[0][0]++,qo().s[4]++,!!e.match(/^(|1|true)$/)):(qo().b[0][1]++,qo().s[5]++,!1)}function MY(){return qo().f[1]++,qo().s[6]++,new Error("Debug not enabled, enable by appending '?debug' to your query string")}function ZKe(n,e,t){if(qo().f[2]++,qo().s[7]++,Pk())qo().b[1][1]++;else throw qo().b[1][0]++,qo().s[8]++,MY();qo().s[9]++,D_[n]=(qo().b[2][0]++,D_[n]||(qo().b[2][1]++,{})),qo().s[10]++,D_[n][e]=t}function XKe(n,e){if(qo().f[3]++,qo().s[11]++,Pk())qo().b[3][1]++;else throw qo().b[3][0]++,qo().s[12]++,MY();if(qo().s[13]++,Object.prototype.hasOwnProperty.call(D_,n))return qo().b[4][0]++,qo().s[14]++,D_[n][e];qo().b[4][1]++}const t1=(qo().s[15]++,{enabled:Pk,get:XKe,set:ZKe});qo().s[16]++;window.debug=t1;function se(){var n="/home/runner/work/maputnik/maputnik/src/components/App.tsx",e="38e41ac814aa6ecd958f9d974ad879dc05091ce8",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/App.tsx",statementMap:{0:{start:{line:36,column:0},end:{line:36,column:30}},1:{start:{line:38,column:29},end:{line:38,column:60}},2:{start:{line:39,column:26},end:{line:39,column:54}},3:{start:{line:40,column:31},end:{line:40,column:64}},4:{start:{line:41,column:2},end:{line:53,column:3}},5:{start:{line:42,column:24},end:{line:42,column:95}},6:{start:{line:43,column:4},end:{line:45,column:5}},7:{start:{line:44,column:6},end:{line:44,column:47}},8:{start:{line:46,column:9},end:{line:53,column:3}},9:{start:{line:47,column:24},end:{line:47,column:96}},10:{start:{line:48,column:4},end:{line:50,column:5}},11:{start:{line:49,column:6},end:{line:49,column:47}},12:{start:{line:52,column:4},end:{line:52,column:15}},13:{start:{line:56,column:2},end:{line:65,column:4}},14:{start:{line:72,column:4},end:{line:72,column:17}},15:{start:{line:73,column:4},end:{line:73,column:19}},16:{start:{line:74,column:4},end:{line:74,column:45}},17:{start:{line:75,column:19},end:{line:75,column:75}},18:{start:{line:76,column:15},end:{line:76,column:38}},19:{start:{line:77,column:4},end:{line:79,column:5}},20:{start:{line:78,column:6},end:{line:78,column:34}},21:{start:{line:80,column:4},end:{line:84,column:7}},22:{start:{line:81,column:40},end:{line:81,column:86}},23:{start:{line:85,column:22},end:{line:136,column:5}},24:{start:{line:89,column:10},end:{line:89,column:40}},25:{start:{line:95,column:10},end:{line:95,column:35}},26:{start:{line:101,column:10},end:{line:101,column:37}},27:{start:{line:107,column:10},end:{line:107,column:38}},28:{start:{line:113,column:10},end:{line:113,column:39}},29:{start:{line:119,column:10},end:{line:121,column:12}},30:{start:{line:127,column:10},end:{line:127,column:63}},31:{start:{line:133,column:10},end:{line:133,column:36}},32:{start:{line:137,column:4},end:{line:150,column:7}},33:{start:{line:138,column:6},end:{line:149,column:7}},34:{start:{line:139,column:8},end:{line:139,column:24}},35:{start:{line:140,column:8},end:{line:140,column:30}},36:{start:{line:141,column:13},end:{line:149,column:7}},37:{start:{line:142,column:25},end:{line:144,column:10}},38:{start:{line:143,column:10},end:{line:143,column:41}},39:{start:{line:145,column:8},end:{line:148,column:9}},40:{start:{line:146,column:10},end:{line:146,column:44}},41:{start:{line:147,column:10},end:{line:147,column:29}},42:{start:{line:151,column:21},end:{line:151,column:38}},43:{start:{line:152,column:4},end:{line:171,column:5}},44:{start:{line:153,column:6},end:{line:153,column:41}},45:{start:{line:154,column:6},end:{line:154,column:74}},46:{start:{line:154,column:43},end:{line:154,column:72}},47:{start:{line:155,column:6},end:{line:155,column:31}},48:{start:{line:157,column:6},end:{line:159,column:7}},49:{start:{line:158,column:8},end:{line:158,column:33}},50:{start:{line:160,column:6},end:{line:170,column:9}},51:{start:{line:161,column:8},end:{line:164,column:9}},52:{start:{line:162,column:10},end:{line:162,column:74}},53:{start:{line:163,column:10},end:{line:163,column:45}},54:{start:{line:165,column:8},end:{line:165,column:104}},55:{start:{line:165,column:50},end:{line:165,column:102}},56:{start:{line:166,column:8},end:{line:169,column:9}},57:{start:{line:167,column:10},end:{line:167,column:63}},58:{start:{line:168,column:10},end:{line:168,column:69}},59:{start:{line:172,column:4},end:{line:175,column:5}},60:{start:{line:173,column:6},end:{line:173,column:65}},61:{start:{line:174,column:6},end:{line:174,column:59}},62:{start:{line:176,column:4},end:{line:209,column:6}},63:{start:{line:210,column:4},end:{line:212,column:7}},64:{start:{line:211,column:35},end:{line:211,column:69}},65:{start:{line:214,column:19},end:{line:232,column:3}},66:{start:{line:215,column:4},end:{line:231,column:5}},67:{start:{line:216,column:6},end:{line:222,column:7}},68:{start:{line:217,column:8},end:{line:217,column:27}},69:{start:{line:218,column:8},end:{line:218,column:22}},70:{start:{line:219,column:13},end:{line:222,column:7}},71:{start:{line:220,column:8},end:{line:220,column:27}},72:{start:{line:221,column:8},end:{line:221,column:22}},73:{start:{line:224,column:6},end:{line:230,column:7}},74:{start:{line:225,column:8},end:{line:225,column:27}},75:{start:{line:226,column:8},end:{line:226,column:22}},76:{start:{line:227,column:13},end:{line:230,column:7}},77:{start:{line:228,column:8},end:{line:228,column:27}},78:{start:{line:229,column:8},end:{line:229,column:22}},79:{start:{line:234,column:4},end:{line:234,column:60}},80:{start:{line:237,column:4},end:{line:237,column:63}},81:{start:{line:240,column:4},end:{line:240,column:40}},82:{start:{line:243,column:21},end:{line:243,column:55}},83:{start:{line:244,column:24},end:{line:244,column:93}},84:{start:{line:245,column:21},end:{line:245,column:110}},85:{start:{line:246,column:4},end:{line:248,column:7}},86:{start:{line:247,column:6},end:{line:247,column:80}},87:{start:{line:251,column:4},end:{line:253,column:7}},88:{start:{line:252,column:6},end:{line:252,column:80}},89:{start:{line:255,column:29},end:{line:269,column:3}},90:{start:{line:256,column:4},end:{line:260,column:5}},91:{start:{line:257,column:6},end:{line:259,column:9}},92:{start:{line:261,column:25},end:{line:267,column:5}},93:{start:{line:268,column:4},end:{line:268,column:38}},94:{start:{line:270,column:19},end:{line:382,column:3}},95:{start:{line:271,column:4},end:{line:276,column:6}},96:{start:{line:277,column:4},end:{line:279,column:5}},97:{start:{line:278,column:6},end:{line:278,column:44}},98:{start:{line:280,column:19},end:{line:280,column:51}},99:{start:{line:281,column:24},end:{line:281,column:26}},100:{start:{line:282,column:4},end:{line:293,column:5}},101:{start:{line:283,column:26},end:{line:283,column:42}},102:{start:{line:284,column:6},end:{line:292,column:9}},103:{start:{line:285,column:8},end:{line:290,column:9}},104:{start:{line:286,column:24},end:{line:288,column:11}},105:{start:{line:289,column:10},end:{line:289,column:34}},106:{start:{line:291,column:8},end:{line:291,column:40}},107:{start:{line:294,column:25},end:{line:345,column:6}},108:{start:{line:295,column:23},end:{line:295,column:109}},109:{start:{line:296,column:6},end:{line:309,column:7}},110:{start:{line:297,column:35},end:{line:297,column:43}},111:{start:{line:298,column:8},end:{line:308,column:10}},112:{start:{line:310,column:33},end:{line:310,column:100}},113:{start:{line:311,column:6},end:{line:324,column:7}},114:{start:{line:312,column:35},end:{line:312,column:53}},115:{start:{line:313,column:8},end:{line:323,column:10}},116:{start:{line:325,column:25},end:{line:325,column:88}},117:{start:{line:326,column:6},end:{line:344,column:7}},118:{start:{line:327,column:52},end:{line:327,column:62}},119:{start:{line:328,column:20},end:{line:328,column:78}},120:{start:{line:329,column:8},end:{line:339,column:10}},121:{start:{line:341,column:8},end:{line:343,column:10}},122:{start:{line:346,column:24},end:{line:346,column:30}},123:{start:{line:347,column:4},end:{line:361,column:5}},124:{start:{line:348,column:6},end:{line:348,column:42}},125:{start:{line:349,column:6},end:{line:360,column:9}},126:{start:{line:350,column:28},end:{line:350,column:33}},127:{start:{line:351,column:8},end:{line:359,column:9}},128:{start:{line:352,column:10},end:{line:358,column:11}},129:{start:{line:353,column:28},end:{line:353,column:49}},130:{start:{line:354,column:30},end:{line:354,column:69}},131:{start:{line:355,column:12},end:{line:355,column:44}},132:{start:{line:357,column:12},end:{line:357,column:30}},133:{start:{line:362,column:4},end:{line:364,column:5}},134:{start:{line:363,column:6},end:{line:363,column:40}},135:{start:{line:365,column:4},end:{line:367,column:5}},136:{start:{line:366,column:6},end:{line:366,column:40}},137:{start:{line:368,column:4},end:{line:370,column:5}},138:{start:{line:369,column:6},end:{line:369,column:47}},139:{start:{line:371,column:4},end:{line:373,column:5}},140:{start:{line:372,column:6},end:{line:372,column:31}},141:{start:{line:374,column:4},end:{line:381,column:7}},142:{start:{line:379,column:6},end:{line:379,column:26}},143:{start:{line:380,column:6},end:{line:380,column:27}},144:{start:{line:383,column:11},end:{line:390,column:3}},145:{start:{line:384,column:24},end:{line:384,column:49}},146:{start:{line:385,column:21},end:{line:385,column:67}},147:{start:{line:386,column:4},end:{line:386,column:61}},148:{start:{line:387,column:4},end:{line:389,column:7}},149:{start:{line:391,column:11},end:{line:398,column:3}},150:{start:{line:392,column:24},end:{line:392,column:49}},151:{start:{line:393,column:21},end:{line:393,column:67}},152:{start:{line:394,column:4},end:{line:394,column:61}},153:{start:{line:395,column:4},end:{line:397,column:7}},154:{start:{line:399,column:16},end:{line:414,column:3}},155:{start:{line:400,column:33},end:{line:400,column:37}},156:{start:{line:401,column:17},end:{line:401,column:43}},157:{start:{line:402,column:4},end:{line:402,column:53}},158:{start:{line:403,column:4},end:{line:403,column:53}},159:{start:{line:404,column:4},end:{line:405,column:13}},160:{start:{line:405,column:6},end:{line:405,column:13}},161:{start:{line:406,column:4},end:{line:410,column:5}},162:{start:{line:407,column:6},end:{line:409,column:9}},163:{start:{line:411,column:4},end:{line:411,column:29}},164:{start:{line:412,column:4},end:{line:412,column:49}},165:{start:{line:413,column:4},end:{line:413,column:32}},166:{start:{line:415,column:19},end:{line:421,column:3}},167:{start:{line:416,column:25},end:{line:419,column:5}},168:{start:{line:420,column:4},end:{line:420,column:38}},169:{start:{line:422,column:19},end:{line:427,column:3}},170:{start:{line:423,column:19},end:{line:423,column:45}},171:{start:{line:424,column:28},end:{line:424,column:43}},172:{start:{line:425,column:4},end:{line:425,column:37}},173:{start:{line:426,column:4},end:{line:426,column:41}},174:{start:{line:428,column:16},end:{line:435,column:3}},175:{start:{line:429,column:19},end:{line:429,column:45}},176:{start:{line:430,column:26},end:{line:430,column:41}},177:{start:{line:431,column:24},end:{line:431,column:55}},178:{start:{line:432,column:4},end:{line:432,column:46}},179:{start:{line:433,column:4},end:{line:433,column:48}},180:{start:{line:434,column:4},end:{line:434,column:39}},181:{start:{line:436,column:28},end:{line:445,column:3}},182:{start:{line:437,column:19},end:{line:437,column:45}},183:{start:{line:438,column:26},end:{line:438,column:41}},184:{start:{line:439,column:18},end:{line:439,column:45}},185:{start:{line:440,column:26},end:{line:440,column:70}},186:{start:{line:441,column:4},end:{line:441,column:88}},187:{start:{line:442,column:4},end:{line:442,column:33}},188:{start:{line:443,column:4},end:{line:443,column:33}},189:{start:{line:444,column:4},end:{line:444,column:39}},190:{start:{line:446,column:20},end:{line:453,column:3}},191:{start:{line:447,column:26},end:{line:447,column:61}},192:{start:{line:448,column:4},end:{line:451,column:6}},193:{start:{line:452,column:4},end:{line:452,column:39}},194:{start:{line:454,column:19},end:{line:458,column:3}},195:{start:{line:455,column:26},end:{line:455,column:61}},196:{start:{line:456,column:4},end:{line:456,column:33}},197:{start:{line:457,column:4},end:{line:457,column:39}},198:{start:{line:459,column:16},end:{line:463,column:3}},199:{start:{line:460,column:4},end:{line:462,column:27}},200:{start:{line:464,column:21},end:{line:478,column:3}},201:{start:{line:465,column:21},end:{line:465,column:44}},202:{start:{line:466,column:4},end:{line:477,column:5}},203:{start:{line:467,column:27},end:{line:473,column:7}},204:{start:{line:474,column:6},end:{line:474,column:26}},205:{start:{line:476,column:6},end:{line:476,column:22}},206:{start:{line:479,column:14},end:{line:482,column:3}},207:{start:{line:480,column:4},end:{line:480,column:47}},208:{start:{line:481,column:4},end:{line:481,column:34}},209:{start:{line:484,column:23},end:{line:484,column:25}},210:{start:{line:485,column:4},end:{line:519,column:5}},211:{start:{line:486,column:6},end:{line:518,column:7}},212:{start:{line:487,column:8},end:{line:490,column:10}},213:{start:{line:491,column:18},end:{line:491,column:25}},214:{start:{line:492,column:8},end:{line:496,column:9}},215:{start:{line:493,column:10},end:{line:493,column:62}},216:{start:{line:495,column:10},end:{line:495,column:63}},217:{start:{line:497,column:8},end:{line:515,column:11}},218:{start:{line:499,column:30},end:{line:499,column:45}},219:{start:{line:500,column:10},end:{line:502,column:11}},220:{start:{line:501,column:12},end:{line:501,column:19}},221:{start:{line:503,column:26},end:{line:505,column:12}},222:{start:{line:506,column:10},end:{line:508,column:11}},223:{start:{line:507,column:12},end:{line:507,column:47}},224:{start:{line:509,column:10},end:{line:509,column:51}},225:{start:{line:510,column:10},end:{line:512,column:13}},226:{start:{line:514,column:10},end:{line:514,column:72}},227:{start:{line:517,column:8},end:{line:517,column:86}},228:{start:{line:520,column:4},end:{line:525,column:5}},229:{start:{line:521,column:6},end:{line:521,column:39}},230:{start:{line:522,column:6},end:{line:524,column:9}},231:{start:{line:528,column:21},end:{line:528,column:55}},232:{start:{line:529,column:4},end:{line:529,column:53}},233:{start:{line:531,column:16},end:{line:535,column:3}},234:{start:{line:532,column:4},end:{line:534,column:7}},235:{start:{line:537,column:40},end:{line:537,column:50}},236:{start:{line:538,column:21},end:{line:549,column:5}},237:{start:{line:541,column:8},end:{line:543,column:11}},238:{start:{line:546,column:8},end:{line:546,column:44}},239:{start:{line:547,column:8},end:{line:547,column:28}},240:{start:{line:550,column:21},end:{line:550,column:40}},241:{start:{line:552,column:4},end:{line:574,column:5}},242:{start:{line:553,column:6},end:{line:561,column:8}},243:{start:{line:563,column:6},end:{line:573,column:8}},244:{start:{line:576,column:4},end:{line:578,column:5}},245:{start:{line:577,column:6},end:{line:577,column:63}},246:{start:{line:579,column:25},end:{line:579,column:27}},247:{start:{line:580,column:4},end:{line:582,column:5}},248:{start:{line:581,column:6},end:{line:581,column:52}},249:{start:{line:583,column:4},end:{line:583,column:160}},250:{start:{line:585,column:18},end:{line:603,column:3}},251:{start:{line:586,column:43},end:{line:586,column:53}},252:{start:{line:587,column:35},end:{line:587,column:45}},253:{start:{line:588,column:16},end:{line:588,column:38}},254:{start:{line:589,column:20},end:{line:589,column:50}},255:{start:{line:590,column:4},end:{line:590,column:70}},256:{start:{line:591,column:23},end:{line:591,column:122}},257:{start:{line:591,column:66},end:{line:591,column:91}},258:{start:{line:591,column:109},end:{line:591,column:121}},259:{start:{line:592,column:4},end:{line:596,column:5}},260:{start:{line:593,column:6},end:{line:593,column:58}},261:{start:{line:595,column:6},end:{line:595,column:39}},262:{start:{line:597,column:4},end:{line:601,column:5}},263:{start:{line:598,column:6},end:{line:598,column:38}},264:{start:{line:599,column:11},end:{line:601,column:5}},265:{start:{line:600,column:6},end:{line:600,column:46}},266:{start:{line:602,column:4},end:{line:602,column:71}},267:{start:{line:604,column:27},end:{line:649,column:3}},268:{start:{line:605,column:16},end:{line:605,column:38}},269:{start:{line:606,column:23},end:{line:606,column:52}},270:{start:{line:607,column:4},end:{line:619,column:5}},271:{start:{line:608,column:21},end:{line:608,column:42}},272:{start:{line:609,column:23},end:{line:609,column:25}},273:{start:{line:610,column:6},end:{line:612,column:9}},274:{start:{line:611,column:8},end:{line:611,column:35}},275:{start:{line:613,column:6},end:{line:618,column:9}},276:{start:{line:620,column:17},end:{line:620,column:45}},277:{start:{line:621,column:4},end:{line:623,column:5}},278:{start:{line:622,column:6},end:{line:622,column:29}},279:{start:{line:624,column:17},end:{line:624,column:46}},280:{start:{line:625,column:4},end:{line:648,column:5}},281:{start:{line:626,column:6},end:{line:647,column:7}},282:{start:{line:627,column:22},end:{line:627,column:37}},283:{start:{line:628,column:46},end:{line:631,column:9}},284:{start:{line:632,column:20},end:{line:632,column:24}},285:{start:{line:633,column:8},end:{line:638,column:9}},286:{start:{line:634,column:33},end:{line:634,column:63}},287:{start:{line:635,column:10},end:{line:637,column:11}},288:{start:{line:636,column:12},end:{line:636,column:26}},289:{start:{line:639,column:8},end:{line:644,column:9}},290:{start:{line:640,column:10},end:{line:643,column:13}},291:{start:{line:646,column:8},end:{line:646,column:26}},292:{start:{line:650,column:18},end:{line:655,column:3}},293:{start:{line:651,column:4},end:{line:654,column:27}},294:{start:{line:657,column:4},end:{line:662,column:27}},295:{start:{line:665,column:4},end:{line:665,column:60}},296:{start:{line:667,column:28},end:{line:674,column:3}},297:{start:{line:668,column:4},end:{line:673,column:7}},298:{start:{line:675,column:28},end:{line:682,column:3}},299:{start:{line:676,column:4},end:{line:681,column:7}},300:{start:{line:684,column:19},end:{line:684,column:51}},301:{start:{line:685,column:26},end:{line:685,column:92}},302:{start:{line:686,column:36},end:{line:699,column:5}},303:{start:{line:700,column:38},end:{line:714,column:5}},304:{start:{line:715,column:24},end:{line:734,column:14}},305:{start:{line:735,column:24},end:{line:745,column:14}},306:{start:{line:746,column:35},end:{line:803,column:8}},307:{start:{line:804,column:4},end:{line:814,column:6}}},fnMap:{0:{name:"setFetchAccessToken",decl:{start:{line:37,column:9},end:{line:37,column:28}},loc:{start:{line:37,column:44},end:{line:54,column:1}},line:37},1:{name:"updateRootSpec",decl:{start:{line:55,column:9},end:{line:55,column:23}},loc:{start:{line:55,column:52},end:{line:66,column:1}},line:55},2:{name:"(anonymous_2)",decl:{start:{line:71,column:2},end:{line:71,column:3}},loc:{start:{line:71,column:21},end:{line:213,column:3}},line:71},3:{name:"(anonymous_3)",decl:{start:{line:81,column:26},end:{line:81,column:27}},loc:{start:{line:81,column:40},end:{line:81,column:86}},line:81},4:{name:"(anonymous_4)",decl:{start:{line:88,column:17},end:{line:88,column:18}},loc:{start:{line:88,column:23},end:{line:90,column:9}},line:88},5:{name:"(anonymous_5)",decl:{start:{line:94,column:17},end:{line:94,column:18}},loc:{start:{line:94,column:23},end:{line:96,column:9}},line:94},6:{name:"(anonymous_6)",decl:{start:{line:100,column:17},end:{line:100,column:18}},loc:{start:{line:100,column:23},end:{line:102,column:9}},line:100},7:{name:"(anonymous_7)",decl:{start:{line:106,column:17},end:{line:106,column:18}},loc:{start:{line:106,column:23},end:{line:108,column:9}},line:106},8:{name:"(anonymous_8)",decl:{start:{line:112,column:17},end:{line:112,column:18}},loc:{start:{line:112,column:23},end:{line:114,column:9}},line:112},9:{name:"(anonymous_9)",decl:{start:{line:118,column:17},end:{line:118,column:18}},loc:{start:{line:118,column:23},end:{line:122,column:9}},line:118},10:{name:"(anonymous_10)",decl:{start:{line:126,column:17},end:{line:126,column:18}},loc:{start:{line:126,column:23},end:{line:128,column:9}},line:126},11:{name:"(anonymous_11)",decl:{start:{line:132,column:17},end:{line:132,column:18}},loc:{start:{line:132,column:23},end:{line:134,column:9}},line:132},12:{name:"(anonymous_12)",decl:{start:{line:137,column:44},end:{line:137,column:45}},loc:{start:{line:137,column:51},end:{line:150,column:5}},line:137},13:{name:"(anonymous_13)",decl:{start:{line:142,column:40},end:{line:142,column:41}},loc:{start:{line:142,column:55},end:{line:144,column:9}},line:142},14:{name:"(anonymous_14)",decl:{start:{line:154,column:29},end:{line:154,column:30}},loc:{start:{line:154,column:43},end:{line:154,column:72}},line:154},15:{name:"(anonymous_15)",decl:{start:{line:160,column:27},end:{line:160,column:28}},loc:{start:{line:160,column:36},end:{line:170,column:7}},line:160},16:{name:"(anonymous_16)",decl:{start:{line:165,column:36},end:{line:165,column:37}},loc:{start:{line:165,column:50},end:{line:165,column:102}},line:165},17:{name:"(anonymous_17)",decl:{start:{line:211,column:28},end:{line:211,column:29}},loc:{start:{line:211,column:35},end:{line:211,column:69}},line:211},18:{name:"(anonymous_18)",decl:{start:{line:214,column:19},end:{line:214,column:20}},loc:{start:{line:214,column:26},end:{line:232,column:3}},line:214},19:{name:"(anonymous_19)",decl:{start:{line:233,column:2},end:{line:233,column:3}},loc:{start:{line:233,column:22},end:{line:235,column:3}},line:233},20:{name:"(anonymous_20)",decl:{start:{line:236,column:2},end:{line:236,column:3}},loc:{start:{line:236,column:25},end:{line:238,column:3}},line:236},21:{name:"(anonymous_21)",decl:{start:{line:239,column:2},end:{line:239,column:3}},loc:{start:{line:239,column:27},end:{line:241,column:3}},line:239},22:{name:"(anonymous_22)",decl:{start:{line:242,column:2},end:{line:242,column:3}},loc:{start:{line:242,column:27},end:{line:249,column:3}},line:242},23:{name:"(anonymous_23)",decl:{start:{line:246,column:37},end:{line:246,column:38}},loc:{start:{line:246,column:48},end:{line:248,column:5}},line:246},24:{name:"(anonymous_24)",decl:{start:{line:250,column:2},end:{line:250,column:3}},loc:{start:{line:250,column:23},end:{line:254,column:3}},line:250},25:{name:"(anonymous_25)",decl:{start:{line:251,column:36},end:{line:251,column:37}},loc:{start:{line:251,column:47},end:{line:253,column:5}},line:251},26:{name:"(anonymous_26)",decl:{start:{line:255,column:29},end:{line:255,column:30}},loc:{start:{line:255,column:50},end:{line:269,column:3}},line:255},27:{name:"(anonymous_27)",decl:{start:{line:270,column:19},end:{line:270,column:20}},loc:{start:{line:270,column:44},end:{line:382,column:3}},line:270},28:{name:"(anonymous_28)",decl:{start:{line:284,column:30},end:{line:284,column:31}},loc:{start:{line:284,column:48},end:{line:292,column:7}},line:284},29:{name:"(anonymous_29)",decl:{start:{line:294,column:56},end:{line:294,column:57}},loc:{start:{line:294,column:67},end:{line:345,column:5}},line:294},30:{name:"(anonymous_30)",decl:{start:{line:349,column:21},end:{line:349,column:22}},loc:{start:{line:349,column:32},end:{line:360,column:7}},line:349},31:{name:"(anonymous_31)",decl:{start:{line:378,column:7},end:{line:378,column:8}},loc:{start:{line:378,column:13},end:{line:381,column:5}},line:378},32:{name:"(anonymous_32)",decl:{start:{line:383,column:11},end:{line:383,column:12}},loc:{start:{line:383,column:17},end:{line:390,column:3}},line:383},33:{name:"(anonymous_33)",decl:{start:{line:391,column:11},end:{line:391,column:12}},loc:{start:{line:391,column:17},end:{line:398,column:3}},line:391},34:{name:"(anonymous_34)",decl:{start:{line:399,column:16},end:{line:399,column:17}},loc:{start:{line:399,column:26},end:{line:414,column:3}},line:399},35:{name:"(anonymous_35)",decl:{start:{line:415,column:19},end:{line:415,column:20}},loc:{start:{line:415,column:38},end:{line:421,column:3}},line:415},36:{name:"(anonymous_36)",decl:{start:{line:422,column:19},end:{line:422,column:20}},loc:{start:{line:422,column:30},end:{line:427,column:3}},line:422},37:{name:"(anonymous_37)",decl:{start:{line:428,column:16},end:{line:428,column:17}},loc:{start:{line:428,column:27},end:{line:435,column:3}},line:428},38:{name:"(anonymous_38)",decl:{start:{line:436,column:28},end:{line:436,column:29}},loc:{start:{line:436,column:39},end:{line:445,column:3}},line:436},39:{name:"(anonymous_39)",decl:{start:{line:446,column:20},end:{line:446,column:21}},loc:{start:{line:446,column:46},end:{line:453,column:3}},line:446},40:{name:"(anonymous_40)",decl:{start:{line:454,column:19},end:{line:454,column:20}},loc:{start:{line:454,column:37},end:{line:458,column:3}},line:454},41:{name:"(anonymous_41)",decl:{start:{line:459,column:16},end:{line:459,column:17}},loc:{start:{line:459,column:30},end:{line:463,column:3}},line:459},42:{name:"(anonymous_42)",decl:{start:{line:464,column:21},end:{line:464,column:22}},loc:{start:{line:464,column:35},end:{line:478,column:3}},line:464},43:{name:"(anonymous_43)",decl:{start:{line:479,column:14},end:{line:479,column:15}},loc:{start:{line:479,column:28},end:{line:482,column:3}},line:479},44:{name:"(anonymous_44)",decl:{start:{line:483,column:2},end:{line:483,column:3}},loc:{start:{line:483,column:17},end:{line:526,column:3}},line:483},45:{name:"(anonymous_45)",decl:{start:{line:499,column:16},end:{line:499,column:17}},loc:{start:{line:499,column:30},end:{line:499,column:45}},line:499},46:{name:"(anonymous_46)",decl:{start:{line:499,column:52},end:{line:499,column:53}},loc:{start:{line:499,column:62},end:{line:513,column:9}},line:499},47:{name:"(anonymous_47)",decl:{start:{line:513,column:17},end:{line:513,column:18}},loc:{start:{line:513,column:26},end:{line:515,column:9}},line:513},48:{name:"(anonymous_48)",decl:{start:{line:527,column:2},end:{line:527,column:3}},loc:{start:{line:527,column:17},end:{line:530,column:3}},line:527},49:{name:"(anonymous_49)",decl:{start:{line:531,column:16},end:{line:531,column:17}},loc:{start:{line:531,column:29},end:{line:535,column:3}},line:531},50:{name:"(anonymous_50)",decl:{start:{line:536,column:2},end:{line:536,column:3}},loc:{start:{line:536,column:16},end:{line:584,column:3}},line:536},51:{name:"(anonymous_51)",decl:{start:{line:540,column:27},end:{line:540,column:28}},loc:{start:{line:540,column:42},end:{line:544,column:7}},line:540},52:{name:"(anonymous_52)",decl:{start:{line:545,column:20},end:{line:545,column:21}},loc:{start:{line:545,column:27},end:{line:548,column:7}},line:545},53:{name:"(anonymous_53)",decl:{start:{line:585,column:18},end:{line:585,column:19}},loc:{start:{line:585,column:24},end:{line:603,column:3}},line:585},54:{name:"(anonymous_54)",decl:{start:{line:591,column:50},end:{line:591,column:51}},loc:{start:{line:591,column:66},end:{line:591,column:91}},line:591},55:{name:"(anonymous_55)",decl:{start:{line:591,column:100},end:{line:591,column:101}},loc:{start:{line:591,column:109},end:{line:591,column:121}},line:591},56:{name:"(anonymous_56)",decl:{start:{line:604,column:27},end:{line:604,column:28}},loc:{start:{line:604,column:41},end:{line:649,column:3}},line:604},57:{name:"(anonymous_57)",decl:{start:{line:610,column:21},end:{line:610,column:22}},loc:{start:{line:610,column:36},end:{line:612,column:7}},line:610},58:{name:"(anonymous_58)",decl:{start:{line:650,column:18},end:{line:650,column:19}},loc:{start:{line:650,column:29},end:{line:655,column:3}},line:650},59:{name:"(anonymous_59)",decl:{start:{line:656,column:2},end:{line:656,column:3}},loc:{start:{line:656,column:29},end:{line:663,column:3}},line:656},60:{name:"(anonymous_60)",decl:{start:{line:664,column:2},end:{line:664,column:3}},loc:{start:{line:664,column:25},end:{line:666,column:3}},line:664},61:{name:"(anonymous_61)",decl:{start:{line:667,column:28},end:{line:667,column:29}},loc:{start:{line:667,column:44},end:{line:674,column:3}},line:667},62:{name:"(anonymous_62)",decl:{start:{line:675,column:28},end:{line:675,column:29}},loc:{start:{line:675,column:44},end:{line:682,column:3}},line:675},63:{name:"(anonymous_63)",decl:{start:{line:683,column:2},end:{line:683,column:3}},loc:{start:{line:683,column:11},end:{line:815,column:3}},line:683}},branchMap:{0:{loc:{start:{line:41,column:2},end:{line:53,column:3}},type:"if",locations:[{start:{line:41,column:2},end:{line:53,column:3}},{start:{line:46,column:9},end:{line:53,column:3}}],line:41},1:{loc:{start:{line:41,column:6},end:{line:41,column:43}},type:"binary-expr",locations:[{start:{line:41,column:6},end:{line:41,column:24}},{start:{line:41,column:28},end:{line:41,column:43}}],line:41},2:{loc:{start:{line:43,column:4},end:{line:45,column:5}},type:"if",locations:[{start:{line:43,column:4},end:{line:45,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:43},3:{loc:{start:{line:46,column:9},end:{line:53,column:3}},type:"if",locations:[{start:{line:46,column:9},end:{line:53,column:3}},{start:{line:51,column:9},end:{line:53,column:3}}],line:46},4:{loc:{start:{line:48,column:4},end:{line:50,column:5}},type:"if",locations:[{start:{line:48,column:4},end:{line:50,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},5:{loc:{start:{line:77,column:4},end:{line:79,column:5}},type:"if",locations:[{start:{line:77,column:4},end:{line:79,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:77},6:{loc:{start:{line:77,column:8},end:{line:77,column:89}},type:"binary-expr",locations:[{start:{line:77,column:8},end:{line:77,column:20}},{start:{line:77,column:25},end:{line:77,column:54}},{start:{line:77,column:58},end:{line:77,column:88}}],line:77},7:{loc:{start:{line:120,column:12},end:{line:120,column:61}},type:"cond-expr",locations:[{start:{line:120,column:44},end:{line:120,column:53}},{start:{line:120,column:56},end:{line:120,column:61}}],line:120},8:{loc:{start:{line:138,column:6},end:{line:149,column:7}},type:"if",locations:[{start:{line:138,column:6},end:{line:149,column:7}},{start:{line:141,column:13},end:{line:149,column:7}}],line:138},9:{loc:{start:{line:141,column:13},end:{line:149,column:7}},type:"if",locations:[{start:{line:141,column:13},end:{line:149,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:141},10:{loc:{start:{line:141,column:17},end:{line:141,column:88}},type:"binary-expr",locations:[{start:{line:141,column:17},end:{line:141,column:44}},{start:{line:141,column:48},end:{line:141,column:88}}],line:141},11:{loc:{start:{line:145,column:8},end:{line:148,column:9}},type:"if",locations:[{start:{line:145,column:8},end:{line:148,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:145},12:{loc:{start:{line:152,column:4},end:{line:171,column:5}},type:"if",locations:[{start:{line:152,column:4},end:{line:171,column:5}},{start:{line:156,column:11},end:{line:171,column:5}}],line:152},13:{loc:{start:{line:152,column:8},end:{line:152,column:104}},type:"binary-expr",locations:[{start:{line:152,column:8},end:{line:152,column:16}},{start:{line:152,column:20},end:{line:152,column:104}}],line:152},14:{loc:{start:{line:157,column:6},end:{line:159,column:7}},type:"if",locations:[{start:{line:157,column:6},end:{line:159,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},15:{loc:{start:{line:161,column:8},end:{line:164,column:9}},type:"if",locations:[{start:{line:161,column:8},end:{line:164,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:161},16:{loc:{start:{line:166,column:8},end:{line:169,column:9}},type:"if",locations:[{start:{line:166,column:8},end:{line:169,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:166},17:{loc:{start:{line:172,column:4},end:{line:175,column:5}},type:"if",locations:[{start:{line:172,column:4},end:{line:175,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:172},18:{loc:{start:{line:215,column:4},end:{line:231,column:5}},type:"if",locations:[{start:{line:215,column:4},end:{line:231,column:5}},{start:{line:223,column:11},end:{line:231,column:5}}],line:215},19:{loc:{start:{line:216,column:6},end:{line:222,column:7}},type:"if",locations:[{start:{line:216,column:6},end:{line:222,column:7}},{start:{line:219,column:13},end:{line:222,column:7}}],line:216},20:{loc:{start:{line:216,column:10},end:{line:216,column:53}},type:"binary-expr",locations:[{start:{line:216,column:10},end:{line:216,column:19}},{start:{line:216,column:23},end:{line:216,column:33}},{start:{line:216,column:37},end:{line:216,column:53}}],line:216},21:{loc:{start:{line:219,column:13},end:{line:222,column:7}},type:"if",locations:[{start:{line:219,column:13},end:{line:222,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:219},22:{loc:{start:{line:219,column:17},end:{line:219,column:46}},type:"binary-expr",locations:[{start:{line:219,column:17},end:{line:219,column:26}},{start:{line:219,column:30},end:{line:219,column:46}}],line:219},23:{loc:{start:{line:224,column:6},end:{line:230,column:7}},type:"if",locations:[{start:{line:224,column:6},end:{line:230,column:7}},{start:{line:227,column:13},end:{line:230,column:7}}],line:224},24:{loc:{start:{line:224,column:10},end:{line:224,column:39}},type:"binary-expr",locations:[{start:{line:224,column:10},end:{line:224,column:19}},{start:{line:224,column:23},end:{line:224,column:39}}],line:224},25:{loc:{start:{line:227,column:13},end:{line:230,column:7}},type:"if",locations:[{start:{line:227,column:13},end:{line:230,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:227},26:{loc:{start:{line:227,column:17},end:{line:227,column:46}},type:"binary-expr",locations:[{start:{line:227,column:17},end:{line:227,column:26}},{start:{line:227,column:30},end:{line:227,column:46}}],line:227},27:{loc:{start:{line:243,column:21},end:{line:243,column:55}},type:"binary-expr",locations:[{start:{line:243,column:21},end:{line:243,column:49}},{start:{line:243,column:53},end:{line:243,column:55}}],line:243},28:{loc:{start:{line:244,column:24},end:{line:244,column:93}},type:"binary-expr",locations:[{start:{line:244,column:24},end:{line:244,column:70}},{start:{line:244,column:74},end:{line:244,column:93}}],line:244},29:{loc:{start:{line:245,column:21},end:{line:245,column:110}},type:"cond-expr",locations:[{start:{line:245,column:55},end:{line:245,column:96}},{start:{line:245,column:99},end:{line:245,column:110}}],line:245},30:{loc:{start:{line:256,column:4},end:{line:260,column:5}},type:"if",locations:[{start:{line:256,column:4},end:{line:260,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:256},31:{loc:{start:{line:256,column:8},end:{line:256,column:123}},type:"binary-expr",locations:[{start:{line:256,column:8},end:{line:256,column:40}},{start:{line:256,column:44},end:{line:256,column:123}}],line:256},32:{loc:{start:{line:270,column:30},end:{line:270,column:39}},type:"default-arg",locations:[{start:{line:270,column:37},end:{line:270,column:39}}],line:270},33:{loc:{start:{line:277,column:4},end:{line:279,column:5}},type:"if",locations:[{start:{line:277,column:4},end:{line:279,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:277},34:{loc:{start:{line:280,column:19},end:{line:280,column:51}},type:"binary-expr",locations:[{start:{line:280,column:19},end:{line:280,column:45}},{start:{line:280,column:49},end:{line:280,column:51}}],line:280},35:{loc:{start:{line:282,column:4},end:{line:293,column:5}},type:"if",locations:[{start:{line:282,column:4},end:{line:293,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:282},36:{loc:{start:{line:282,column:8},end:{line:282,column:35}},type:"binary-expr",locations:[{start:{line:282,column:8},end:{line:282,column:16}},{start:{line:282,column:20},end:{line:282,column:35}}],line:282},37:{loc:{start:{line:285,column:8},end:{line:290,column:9}},type:"if",locations:[{start:{line:285,column:8},end:{line:290,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:285},38:{loc:{start:{line:285,column:12},end:{line:285,column:56}},type:"binary-expr",locations:[{start:{line:285,column:12},end:{line:285,column:27}},{start:{line:285,column:31},end:{line:285,column:56}}],line:285},39:{loc:{start:{line:296,column:6},end:{line:309,column:7}},type:"if",locations:[{start:{line:296,column:6},end:{line:309,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:296},40:{loc:{start:{line:311,column:6},end:{line:324,column:7}},type:"if",locations:[{start:{line:311,column:6},end:{line:324,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:311},41:{loc:{start:{line:326,column:6},end:{line:344,column:7}},type:"if",locations:[{start:{line:326,column:6},end:{line:344,column:7}},{start:{line:340,column:13},end:{line:344,column:7}}],line:326},42:{loc:{start:{line:328,column:20},end:{line:328,column:78}},type:"cond-expr",locations:[{start:{line:328,column:40},end:{line:328,column:67}},{start:{line:328,column:70},end:{line:328,column:78}}],line:328},43:{loc:{start:{line:328,column:20},end:{line:328,column:37}},type:"binary-expr",locations:[{start:{line:328,column:20},end:{line:328,column:25}},{start:{line:328,column:29},end:{line:328,column:37}}],line:328},44:{loc:{start:{line:347,column:4},end:{line:361,column:5}},type:"if",locations:[{start:{line:347,column:4},end:{line:361,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:347},45:{loc:{start:{line:351,column:8},end:{line:359,column:9}},type:"if",locations:[{start:{line:351,column:8},end:{line:359,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:351},46:{loc:{start:{line:362,column:4},end:{line:364,column:5}},type:"if",locations:[{start:{line:362,column:4},end:{line:364,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:362},47:{loc:{start:{line:365,column:4},end:{line:367,column:5}},type:"if",locations:[{start:{line:365,column:4},end:{line:367,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:365},48:{loc:{start:{line:368,column:4},end:{line:370,column:5}},type:"if",locations:[{start:{line:368,column:4},end:{line:370,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:368},49:{loc:{start:{line:371,column:4},end:{line:373,column:5}},type:"if",locations:[{start:{line:371,column:4},end:{line:373,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:371},50:{loc:{start:{line:404,column:4},end:{line:405,column:13}},type:"if",locations:[{start:{line:404,column:4},end:{line:405,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:404},51:{loc:{start:{line:406,column:4},end:{line:410,column:5}},type:"if",locations:[{start:{line:406,column:4},end:{line:410,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:406},52:{loc:{start:{line:440,column:26},end:{line:440,column:70}},type:"cond-expr",locations:[{start:{line:440,column:46},end:{line:440,column:65}},{start:{line:440,column:68},end:{line:440,column:70}}],line:440},53:{loc:{start:{line:441,column:31},end:{line:441,column:87}},type:"cond-expr",locations:[{start:{line:441,column:69},end:{line:441,column:78}},{start:{line:441,column:81},end:{line:441,column:87}}],line:441},54:{loc:{start:{line:465,column:21},end:{line:465,column:44}},type:"binary-expr",locations:[{start:{line:465,column:21},end:{line:465,column:38}},{start:{line:465,column:42},end:{line:465,column:44}}],line:465},55:{loc:{start:{line:466,column:4},end:{line:477,column:5}},type:"if",locations:[{start:{line:466,column:4},end:{line:477,column:5}},{start:{line:475,column:11},end:{line:477,column:5}}],line:466},56:{loc:{start:{line:486,column:6},end:{line:518,column:7}},type:"if",locations:[{start:{line:486,column:6},end:{line:518,column:7}},{start:{line:516,column:13},end:{line:518,column:7}}],line:486},57:{loc:{start:{line:486,column:10},end:{line:486,column:149}},type:"binary-expr",locations:[{start:{line:486,column:10},end:{line:486,column:72}},{start:{line:486,column:76},end:{line:486,column:97}},{start:{line:486,column:101},end:{line:486,column:149}}],line:486},58:{loc:{start:{line:500,column:10},end:{line:502,column:11}},type:"if",locations:[{start:{line:500,column:10},end:{line:502,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:500},59:{loc:{start:{line:517,column:26},end:{line:517,column:85}},type:"binary-expr",locations:[{start:{line:517,column:26},end:{line:517,column:49}},{start:{line:517,column:53},end:{line:517,column:85}}],line:517},60:{loc:{start:{line:520,column:4},end:{line:525,column:5}},type:"if",locations:[{start:{line:520,column:4},end:{line:525,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:520},61:{loc:{start:{line:528,column:21},end:{line:528,column:55}},type:"binary-expr",locations:[{start:{line:528,column:21},end:{line:528,column:49}},{start:{line:528,column:53},end:{line:528,column:55}}],line:528},62:{loc:{start:{line:529,column:11},end:{line:529,column:52}},type:"binary-expr",locations:[{start:{line:529,column:11},end:{line:529,column:40}},{start:{line:529,column:44},end:{line:529,column:52}}],line:529},63:{loc:{start:{line:539,column:16},end:{line:539,column:41}},type:"binary-expr",locations:[{start:{line:539,column:16},end:{line:539,column:29}},{start:{line:539,column:33},end:{line:539,column:41}}],line:539},64:{loc:{start:{line:552,column:4},end:{line:574,column:5}},type:"if",locations:[{start:{line:552,column:4},end:{line:574,column:5}},{start:{line:562,column:11},end:{line:574,column:5}}],line:552},65:{loc:{start:{line:576,column:4},end:{line:578,column:5}},type:"if",locations:[{start:{line:576,column:4},end:{line:578,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:576},66:{loc:{start:{line:580,column:4},end:{line:582,column:5}},type:"if",locations:[{start:{line:580,column:4},end:{line:582,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:580},67:{loc:{start:{line:591,column:66},end:{line:591,column:91}},type:"cond-expr",locations:[{start:{line:591,column:81},end:{line:591,column:84}},{start:{line:591,column:87},end:{line:591,column:91}}],line:591},68:{loc:{start:{line:592,column:4},end:{line:596,column:5}},type:"if",locations:[{start:{line:592,column:4},end:{line:596,column:5}},{start:{line:594,column:11},end:{line:596,column:5}}],line:592},69:{loc:{start:{line:597,column:4},end:{line:601,column:5}},type:"if",locations:[{start:{line:597,column:4},end:{line:601,column:5}},{start:{line:599,column:11},end:{line:601,column:5}}],line:597},70:{loc:{start:{line:599,column:11},end:{line:601,column:5}},type:"if",locations:[{start:{line:599,column:11},end:{line:601,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:599},71:{loc:{start:{line:607,column:4},end:{line:619,column:5}},type:"if",locations:[{start:{line:607,column:4},end:{line:619,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:607},72:{loc:{start:{line:607,column:8},end:{line:607,column:39}},type:"binary-expr",locations:[{start:{line:607,column:8},end:{line:607,column:18}},{start:{line:607,column:22},end:{line:607,column:39}}],line:607},73:{loc:{start:{line:621,column:4},end:{line:623,column:5}},type:"if",locations:[{start:{line:621,column:4},end:{line:623,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:621},74:{loc:{start:{line:621,column:8},end:{line:621,column:27}},type:"binary-expr",locations:[{start:{line:621,column:8},end:{line:621,column:12}},{start:{line:621,column:16},end:{line:621,column:27}}],line:621},75:{loc:{start:{line:625,column:4},end:{line:648,column:5}},type:"if",locations:[{start:{line:625,column:4},end:{line:648,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:625},76:{loc:{start:{line:633,column:8},end:{line:638,column:9}},type:"if",locations:[{start:{line:633,column:8},end:{line:638,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:633},77:{loc:{start:{line:635,column:10},end:{line:637,column:11}},type:"if",locations:[{start:{line:635,column:10},end:{line:637,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:635},78:{loc:{start:{line:639,column:8},end:{line:644,column:9}},type:"if",locations:[{start:{line:639,column:8},end:{line:644,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:639},79:{loc:{start:{line:684,column:19},end:{line:684,column:51}},type:"binary-expr",locations:[{start:{line:684,column:19},end:{line:684,column:45}},{start:{line:684,column:49},end:{line:684,column:51}}],line:684},80:{loc:{start:{line:685,column:26},end:{line:685,column:92}},type:"cond-expr",locations:[{start:{line:685,column:46},end:{line:685,column:83}},{start:{line:685,column:86},end:{line:685,column:92}}],line:685},81:{loc:{start:{line:715,column:24},end:{line:734,column:14}},type:"cond-expr",locations:[{start:{line:715,column:56},end:{line:734,column:5}},{start:{line:734,column:8},end:{line:734,column:14}}],line:715},82:{loc:{start:{line:735,column:24},end:{line:745,column:14}},type:"cond-expr",locations:[{start:{line:735,column:97},end:{line:745,column:5}},{start:{line:745,column:8},end:{line:745,column:14}}],line:735}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:0,136:0,137:0,138:0,139:0,140:0,141:0,142:0,143:0,144:0,145:0,146:0,147:0,148:0,149:0,150:0,151:0,152:0,153:0,154:0,155:0,156:0,157:0,158:0,159:0,160:0,161:0,162:0,163:0,164:0,165:0,166:0,167:0,168:0,169:0,170:0,171:0,172:0,173:0,174:0,175:0,176:0,177:0,178:0,179:0,180:0,181:0,182:0,183:0,184:0,185:0,186:0,187:0,188:0,189:0,190:0,191:0,192:0,193:0,194:0,195:0,196:0,197:0,198:0,199:0,200:0,201:0,202:0,203:0,204:0,205:0,206:0,207:0,208:0,209:0,210:0,211:0,212:0,213:0,214:0,215:0,216:0,217:0,218:0,219:0,220:0,221:0,222:0,223:0,224:0,225:0,226:0,227:0,228:0,229:0,230:0,231:0,232:0,233:0,234:0,235:0,236:0,237:0,238:0,239:0,240:0,241:0,242:0,243:0,244:0,245:0,246:0,247:0,248:0,249:0,250:0,251:0,252:0,253:0,254:0,255:0,256:0,257:0,258:0,259:0,260:0,261:0,262:0,263:0,264:0,265:0,266:0,267:0,268:0,269:0,270:0,271:0,272:0,273:0,274:0,275:0,276:0,277:0,278:0,279:0,280:0,281:0,282:0,283:0,284:0,285:0,286:0,287:0,288:0,289:0,290:0,291:0,292:0,293:0,294:0,295:0,296:0,297:0,298:0,299:0,300:0,301:0,302:0,303:0,304:0,305:0,306:0,307:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0],32:[0],33:[0,0],34:[0,0],35:[0,0],36:[0,0],37:[0,0],38:[0,0],39:[0,0],40:[0,0],41:[0,0],42:[0,0],43:[0,0],44:[0,0],45:[0,0],46:[0,0],47:[0,0],48:[0,0],49:[0,0],50:[0,0],51:[0,0],52:[0,0],53:[0,0],54:[0,0],55:[0,0],56:[0,0],57:[0,0,0],58:[0,0],59:[0,0],60:[0,0],61:[0,0],62:[0,0],63:[0,0],64:[0,0],65:[0,0],66:[0,0],67:[0,0],68:[0,0],69:[0,0],70:[0,0],71:[0,0],72:[0,0],73:[0,0],74:[0,0],75:[0,0],76:[0,0],77:[0,0],78:[0,0],79:[0,0],80:[0,0],81:[0,0],82:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/App.tsx"],names:["shortcut","mapStyle"],mappings:"AAgtBmB,SAAA,KA4MA,YA5MA;AA/sBnB,OAAO,cAAc;AACrB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,SAAS;AAChB,SAAQ,aAAY;AACpB,SAAQ,wBAAuB;AAC/B,OAAO,UAAU;AAEjB,SAAQ,QAAQ,wBAAuB;AAEvC,OAAO,mBAAmB;AAC1B,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,gBAA8B;AACrC,OAAO,eAAe;AACtB,OAAO,kBAAkB;AAEzB,OAAO,mBAAmB;AAC1B,OAAO,iBAAiB;AACxB,OAAO,kBAAkB;AACzB,OAAO,eAAe;AACtB,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AAEvB,SAAQ,wBAAwB,8BAA6B;AAC7D,OAAO,WAAW;AAClB,SAAS,iBAAiB,cAAc,8BAA8B;AACtE,SAAS,cAAc,oBAAoB;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACnB,OAAO,aAAa;AACpB,OAAO,WAAW;AAKlB,OAAO,SAAS,OAAO;AAEvB,SAAS,oBAAoB,KAAa,UAA8B;AAChE,QAAA,qBAAqB,IAAI,MAAM,oBAAoB;AACnD,QAAA,kBAAkB,IAAI,MAAM,iBAAiB;AAC7C,QAAA,uBAAuB,IAAI,MAAM,sBAAsB;AAC7D,MAAI,sBAAsB,iBAAiB;AACnC,UAAA,cAAc,MAAM,eAAe,gBAAgB,UAAU,EAAC,eAAe,KAAI,CAAC;AACxF,QAAI,aAAa;AACR,aAAA,IAAI,QAAQ,SAAS,WAAW;AAAA,IACzC;AAAA,EACF,WACS,sBAAsB;AACvB,UAAA,cAAc,MAAM,eAAe,iBAAiB,UAAU,EAAC,eAAe,KAAI,CAAC;AACzF,QAAI,aAAa;AACR,aAAA,IAAI,QAAQ,SAAS,WAAW;AAAA,IACzC;AAAA,EACF,OACK;AACI,WAAA;AAAA,EACT;AACF;AAEA,SAAS,eAAe,MAAW,WAAmB,WAAgB;AAC7D,SAAA;AAAA,IACL,GAAG;AAAA,IACH,OAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,CAAC,SAAS,GAAG;AAAA,QACX,GAAG,KAAK,MAAM,SAAS;AAAA,QACvB,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;AAwDA,qBAAqB,YAAY,MAAM,UAAyB;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAAY;AACtB,UAAM,KAAK;AACX,aAAS,IAAI;AAER,SAAA,gBAAgB,IAAI,cAAc;AACjC,UAAA,SAAS,IAAI,gBAAgB,OAAO,SAAS,OAAO,UAAU,CAAC,CAAC;AAClE,QAAA,OAAO,OAAO,IAAI,WAAW;AAC7B,QAAA,QAAQ,SAAS,OAAO,SAAS,SAAS,QAAQ,OAAO,SAAS,SAAS,QAAQ;AACrF,aAAO,OAAO,SAAS;AAAA,IACzB;AACK,SAAA,aAAa,IAAI,cAAc;AAAA,MAClC,oBAAoB,cAAY,KAAK,eAAe,UAAU,EAAC,MAAM,MAAK,CAAC;AAAA,MAC3E;AAAA,MACA,MAAM,OAAO,IAAI,WAAW;AAAA,IAC9B,CAAC;AAGD,UAAM,YAAY;AAAA,MAChB;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,WAAW;AAAA,QAC9B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,MAAM;AAAA,QACzB;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,QAAQ;AAAA,QAC3B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,SAAS;AAAA,QAC5B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,UAAU;AAAA,QAC7B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACR,eAAA;AAAA,YACH,KAAK,MAAM,aAAa,QAAQ,YAAY;AAAA,UAC9C;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACZ,mBAAS,cAAc,oBAAoB,EAAwB,MAAM;AAAA,QAC5E;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,OAAO;AAAA,QAC1B;AAAA,MACF;AAAA,IACF;AAEA,aAAS,KAAK,iBAAiB,SAAS,CAAC,MAAM;AAC1C,UAAA,EAAE,QAAQ,UAAU;AACpB,UAAE,OAAuB,KAAK;AAC/B,iBAAS,KAAK,MAAM;AAAA,MACtB,WACQ,KAAK,MAAM,OAAO,aAAa,SAAS,kBAAkB,SAAS,MAAM;AAC/E,cAAM,WAAW,UAAU,KAAK,CAACA,cAAa;AACpCA,iBAAAA,UAAS,QAAQ,EAAE;AAAA,QAC7B,CAAC;AAED,YAAG,UAAU;AACN,eAAA,SAAS,aAAa,KAAK;AAChC,mBAAS,QAAQ;AAAA,QACnB;AAAA,MACF;AAAA,IACF,CAAC;AAED,UAAM,WAAW,gBAAgB;AACjC,QAAG,YAAY,OAAO,QAAQ,0BAA0B,WAAW,+BAA+B,GAAG;AAC9F,WAAA,aAAa,IAAI,WAAW;AACjC,mBAAa,UAAU,CAAA,aAAY,KAAK,eAAe,QAAQ,CAAC;AACzC,6BAAA;AAAA,IACzB,OAAO;AACL,UAAG,UAAU;AACY,+BAAA;AAAA,MACzB;AACK,WAAA,WAAW,KAAK,CAAO,QAAA;AAC1B,YAAG,KAAK;AACN,kBAAQ,IAAI,kDAAkD;AACzD,eAAA,aAAa,IAAI,WAAW;AAAA,QACnC;AACK,aAAA,WAAW,YAAY,CAAA,aAAY,KAAK,eAAe,UAAU,EAAC,aAAa,KAAI,CAAC,CAAC;AAEvF,YAAA,MAAM,QAAQ,GAAG;AAClB,gBAAM,IAAI,YAAY,cAAc,KAAK,UAAU;AACnD,gBAAM,IAAI,YAAY,iBAAiB,KAAK,aAAa;AAAA,QAC3D;AAAA,MACF,CAAC;AAAA,IACH;AAEG,QAAA,MAAM,QAAQ,GAAG;AAClB,YAAM,IAAI,YAAY,iBAAiB,KAAK,aAAa;AACzD,YAAM,IAAI,YAAY,cAAc,KAAK,UAAU;AAAA,IACrD;AAEA,SAAK,QAAQ;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,OAAO,CAAC;AAAA,MACR,UAAU,MAAM;AAAA,MAChB,oBAAoB;AAAA,MACpB,SAAS,CAAC;AAAA,MACV,cAAc,CAAC;AAAA,MACf,UAAU;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK;AAAA,UACL,KAAK;AAAA,QACP;AAAA,MACF;AAAA,MACA,QAAQ;AAAA,QACN,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,WAAW;AAAA,QACX,QAAQ;AAAA;AAAA,QAER,OAAO;AAAA,MACT;AAAA,MACA,wBAAwB;AAAA,QACtB,oBAAoB;AAAA,QACpB,oBAAoB;AAAA,QACpB,uBAAuB;AAAA,MACzB;AAAA,MACA,wBAAwB;AAAA,QACtB,cAAc;AAAA,MAChB;AAAA,IACF;AAEK,SAAA,eAAe,IAAI,aAAa;AAAA,MACnC,sBAAsB,CAAK,MAAA,KAAK,SAAS,EAAE,cAAc,EAAE,CAAC;AAAA,IAC9D,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB,CAAC,MAAqB;AACrC,QAAG,UAAU,SAAS,YAAY,EAAE,QAAQ,KAAK,KAAK,GAAG;AACvD,UAAG,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,IAAI;AAC9C,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd,WACQ,EAAE,WAAW,EAAE,YAAY,IAAI;AACrC,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd;AAAA,IACF,OACK;AACH,UAAG,EAAE,WAAW,EAAE,YAAY,IAAI;AAChC,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd,WACQ,EAAE,WAAW,EAAE,YAAY,IAAI;AACrC,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAoB;AACX,WAAA,iBAAiB,WAAW,KAAK,cAAc;AAAA,EACxD;AAAA,EAEA,uBAAuB;AACd,WAAA,oBAAoB,WAAW,KAAK,cAAc;AAAA,EAC3D;AAAA,EAEA,UAAU,eAAkD;AACrD,SAAA,WAAW,KAAK,aAAa;AAAA,EACpC;AAAA,EAEA,YAAY,aAAqB;AAC/B,UAAM,WAAoC,KAAK,MAAM,SAAS,YAAY,CAAC;AAC3E,UAAM,cAAc,SAAS,oCAAoC,KAAK,OAAO;AAEvE,UAAA,WAAY,OAAO,gBAAgB,WAAW,YAAY,QAAQ,SAAS,WAAW,IAAG;AAC/F,2BAAuB,UAAU,CAAS,UAAA;AACnC,WAAA,SAAS,EAAE,MAAM,eAAe,KAAK,MAAM,MAAM,UAAU,KAAK,EAAC,CAAC;AAAA,IACzE,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,SAAiB;AAC3B,2BAAuB,SAAS,CAAS,UAAA;AAClC,WAAA,SAAS,EAAE,MAAM,eAAe,KAAK,MAAM,MAAM,UAAU,KAAK,EAAC,CAAC;AAAA,IACzE,CAAC;AAAA,EACH;AAAA,EAEA,2BAA2B,CAAC,UAAkB,UAAe;AAE3D,QACE,aAAa,uBACb,UAAU,IAAI,KAAK,MAAM,UAAU,CAAC,YAAY,mBAAmB,GAAG,QAAQ,GAC9E;AACA,WAAK,SAAS;AAAA,QACZ,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAEA,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,UAAU;AAAA,QACR,GAAI,KAAK,MAAM,SAAiB;AAAA,QAChC,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AACA,SAAK,eAAe,YAAY;AAAA,EAClC;AAAA,EAEA,iBAAiB,CAAC,UAA6C,OAAyB,CAAC,MAAM;AACtF,WAAA;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,MACb,GAAG;AAAA,IACL;AAEA,QAAI,KAAK,aAAa;AACpB,WAAK,uBAAuB,QAAQ;AAAA,IACtC;AAEA,UAAM,SAA4B,iBAAiB,QAAQ,KAAK,CAAC;AAIjE,UAAM,cAA2C,CAAC;AAC9C,QAAA,YAAY,SAAS,QAAQ;AACzB,YAAA,cAAc,IAAI,OAAO,IAAI;AACnC,eAAS,OAAO,QAAQ,CAAC,OAAO,UAAU;AACxC,YAAI,MAAM,OAAO,MAAM,YAAY,IAAI,MAAM,EAAE,GAAG;AAChD,gBAAM,QAAQ,IAAI;AAAA,YAChB,UAAU,KAAK;AAAA,UACjB;AACA,sBAAY,KAAK,KAAK;AAAA,QACxB;AACY,oBAAA,IAAI,MAAM,IAAI,IAAI;AAAA,MAChC,CAAC;AAAA,IACH;AAEA,UAAM,eAAe,YAAY,OAAO,MAAM,EAAE,IAAI,CAAS,UAAA;AAE3D,YAAM,WAAW,MAAM,QAAQ,MAAM,iEAAiE;AACtG,UAAI,UAAU;AACZ,cAAM,CAAC,EAAE,OAAO,OAAO,IAAI;AACpB,eAAA;AAAA,UACL,SAAS,MAAM;AAAA,UACf,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,cACJ,OAAO,SAAS,OAAO,EAAE;AAAA,cACzB,KAAK;AAAA,cACL;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAGA,YAAM,qBAAqB,MAAM,QAAQ,MAAM,8CAA8C;AAC7F,UAAI,oBAAoB;AACtB,cAAM,CAAC,EAAE,OAAO,OAAO,IAAI;AACpB,eAAA;AAAA,UACL,SAAS,MAAM;AAAA,UACf,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,cACJ,OAAO,SAAS,OAAO,EAAE;AAAA,cACzB,KAAK;AAAA,cACL;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAEA,YAAM,aAAa,MAAM,QAAQ,MAAM,0CAA0C;AACjF,UAAI,YAAY;AACd,cAAM,CAAC,EAAE,OAAO,OAAO,UAAU,OAAO,IAAI;AACtC,cAAA,MAAO,SAAS,WAAY,CAAC,OAAO,QAAQ,EAAE,KAAK,GAAG,IAAI;AACzD,eAAA;AAAA,UACL,SAAS,MAAM;AAAA,UACf,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,cACJ,OAAO,SAAS,OAAO,EAAE;AAAA,cACzB;AAAA,cACA;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF,OACK;AACI,eAAA;AAAA,UACL,SAAS,MAAM;AAAA,QACjB;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI,gBAAgD;AAChD,QAAA,OAAO,SAAS,GAAG;AACrB,sBAAgB,UAAU,QAAQ;AAElC,aAAO,QAAQ,CAAS,UAAA;AAChB,cAAA,EAAC,QAAO,IAAI;AAClB,YAAI,SAAS;AACP,cAAA;AACF,kBAAM,UAAU,QAAQ,MAAM,GAAG,EAAE,CAAC;AAEpC,kBAAM,YAAY,QAAQ,MAAM,qBAAqB,EAAG,CAAC;AACzD,kBAAM,eAAe,SAAS;AAAA,UAChC,SACO,KAAK;AACV,oBAAQ,KAAK,GAAG;AAAA,UAClB;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAEA,QAAG,SAAS,WAAW,KAAK,MAAM,SAAS,QAAQ;AAC5C,WAAA,YAAY,SAAS,MAAgB;AAAA,IAC5C;AACA,QAAG,SAAS,WAAW,KAAK,MAAM,SAAS,QAAQ;AAC5C,WAAA,YAAY,SAAS,MAAgB;AAAA,IAC5C;AAEA,QAAI,KAAK,aAAa;AACf,WAAA,cAAc,YAAY,QAAQ;AAAA,IACzC;AACA,QAAI,KAAK,MAAM;AACb,WAAK,UAAU,QAA6C;AAAA,IAC9D;AAEA,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,MACV;AAAA,MACA,QAAQ;AAAA,IACV,GAAG,MAAM;AACP,WAAK,aAAa;AAClB,WAAK,cAAc;AAAA,IACrB,CAAC;AAAA,EAEH;AAAA,EAEA,SAAS,MAAM;AACP,UAAA,cAAc,KAAK,cAAc,KAAK;AAE5C,UAAM,WAAW,aAAa,KAAK,MAAM,UAAU,WAAW;AAC9D,SAAK,eAAe,aAAa,EAAC,aAAa,MAAK,CAAC;AACrD,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EAEA,SAAS,MAAM;AACP,UAAA,cAAc,KAAK,cAAc,KAAK;AAC5C,UAAM,WAAW,aAAa,KAAK,MAAM,UAAU,WAAW;AAC9D,SAAK,eAAe,aAAa,EAAC,aAAa,MAAK,CAAC;AACrD,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,CAAC,SAAkB;AAC3B,QAAA,EAAE,UAAU,SAAS,IAAI;AACzB,QAAA,SAAS,KAAK,MAAM,SAAS;AACjC,eAAW,MAAM,UAAU,GAAG,OAAO,SAAO,CAAC;AAC7C,eAAW,MAAM,UAAU,GAAG,OAAO,SAAO,CAAC;AAC7C,QAAG,aAAa;AAAU;AAEtB,QAAA,aAAa,KAAK,MAAM,oBAAoB;AAC9C,WAAK,SAAS;AAAA,QACZ,oBAAoB;AAAA,MACtB,CAAC;AAAA,IACH;AAES,aAAA,OAAO,MAAM,CAAC;AACN,qBAAA,QAAQ,UAAU,QAAQ;AAC3C,SAAK,eAAe,MAAM;AAAA,EAC5B;AAAA,EAEA,iBAAiB,CAAC,kBAAwC;AACxD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,QAAQ;AAAA,IACV;AACA,SAAK,eAAe,YAAY;AAAA,EAClC;AAAA,EAEA,iBAAiB,CAAC,UAAkB;AAC5B,UAAA,SAAS,KAAK,MAAM,SAAS;AAC7B,UAAA,kBAAkB,OAAO,MAAM,CAAC;AACtB,oBAAA,OAAO,OAAO,CAAC;AAC/B,SAAK,eAAe,eAAe;AAAA,EACrC;AAAA,EAEA,cAAc,CAAC,UAAkB;AACzB,UAAA,SAAS,KAAK,MAAM,SAAS;AAC7B,UAAA,gBAAgB,OAAO,MAAM,CAAC;AAEpC,UAAM,cAAc,UAAU,cAAc,KAAK,CAAC;AACtC,gBAAA,KAAK,YAAY,KAAK;AACpB,kBAAA,OAAO,OAAO,GAAG,WAAW;AAC1C,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAEA,0BAA0B,CAAC,UAAkB;AACrC,UAAA,SAAS,KAAK,MAAM,SAAS;AAC7B,UAAA,gBAAgB,OAAO,MAAM,CAAC;AAEpC,UAAM,QAAQ,EAAE,GAAG,cAAc,KAAK,EAAE;AAClC,UAAA,gBAAgB,YAAY,QAAQ,EAAC,GAAG,MAAM,OAAM,IAAI,CAAC;AAC/D,kBAAc,aAAa,cAAc,eAAe,SAAS,YAAY;AAE7E,UAAM,SAAS;AACf,kBAAc,KAAK,IAAI;AACvB,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAGA,kBAAkB,CAAC,OAAe,QAAgB,UAAkB;AAClE,UAAM,gBAAgB,KAAK,MAAM,SAAS,OAAO,MAAM,CAAC;AACxD,kBAAc,KAAK,IAAI;AAAA,MACrB,GAAG,cAAc,KAAK;AAAA,MACtB,IAAI;AAAA,IACN;AAEA,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAEA,iBAAiB,CAAC,OAAe,UAA8B;AAC7D,UAAM,gBAAgB,KAAK,MAAM,SAAS,OAAO,MAAM,CAAC;AACxD,kBAAc,KAAK,IAAI;AAEvB,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAEA,cAAc,CAAC,aAAuB;AACpC,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,GAAG,KAAK,aAAa;AAAA,EACvB;AAAA,EAEA,mBAAmB,CAAC,aAAgD;AAC5D,UAAA,WAAoC,SAAS,YAAY,CAAC;AAC7D,QAAA,SAAS,mBAAmB,MAAM,QAAW;AAC9C,YAAM,eAAe;AAAA,QACnB,GAAG;AAAA,QACH,UAAU;AAAA,UACR,GAAG,SAAS;AAAA,UACZ,qBAAqB;AAAA,QACvB;AAAA,MACF;AACO,aAAA;AAAA,IACT,OAAO;AACE,aAAA;AAAA,IACT;AAAA,EACF;AAAA,EAEA,YAAY,CAAC,aAAgD;AAChD,eAAA,KAAK,iBAAiB,QAAQ;AACzC,SAAK,eAAe,QAAQ;AAAA,EAC9B;AAAA,EAEA,eAAe;AACb,UAAM,aAAmC,CAAC;AAEhC,eAAA,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,KAAK,MAAM,SAAS,OAAO,GAAG;AACnE,UACE,CAAC,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,SAAS,GAAG,KAC7D,IAAI,SAAS,YACb,OAAO,UAAU,eAAe,KAAK,KAAK,KAAK,GAC/C;AACA,mBAAW,GAAG,IAAI;AAAA,UAChB,MAAM,IAAI;AAAA,UACV,QAAQ,CAAC;AAAA,QACX;AAEA,YAAI,MAAM,IAAI;AAEV,YAAA;AACF,gBAAM,oBAAoB,KAAM,KAAK,MAAM,QAAQ;AAAA,QACrD,SAAQ,KAAK;AACH,kBAAA,KAAK,mCAAmC,GAAG;AAAA,QACrD;AAEA,cAAM,KAAM;AAAA,UACV,MAAM;AAAA,QACR,CAAC,EACE,KAAK,CAAA,aAAY,SAAS,KAAK,CAAC,EAChC,KAAK,CAAQ,SAAA;AAEZ,cAAG,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,eAAe,GAAG;AAC/D;AAAA,UACF;AAGA,gBAAM,UAAU,OAAO,OAAO,CAAC,GAAG;AAAA,YAChC,CAAC,GAAG,GAAG,KAAK,MAAM,QAAQ,GAAG;AAAA,UAC/B,CAAC;AAES,qBAAA,SAAS,KAAK,eAAe;AACpC,oBAAQ,GAAG,EAAU,OAAO,KAAK,MAAM,EAAE;AAAA,UAC5C;AAEQ,kBAAA,MAAM,sBAAoB,GAAG;AACrC,eAAK,SAAS;AAAA,YACZ;AAAA,UACF,CAAC;AAAA,QACH,CAAC,EACA,MAAM,CAAO,QAAA;AACJ,kBAAA,MAAM,sCAAsC,KAAK,GAAG;AAAA,QAC9D,CAAC;AAAA,MACL,OACK;AACQ,mBAAA,GAAG,IAAI,KAAK,MAAM,QAAQ,GAAG,KAAK,KAAK,MAAM,SAAS,QAAQ,GAAG;AAAA,MAC9E;AAAA,IACF;AAEA,QAAG,CAAC,QAAQ,KAAK,MAAM,SAAS,UAAU,GAAG;AAC3C,cAAQ,MAAM,iBAAiB;AAC/B,WAAK,SAAS;AAAA,QACZ,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,eAAgB;AACd,UAAM,WAAmC,KAAK,MAAM,SAAS,YAAY,CAAC;AACnE,WAAA,SAAS,mBAAmB,KAAK;AAAA,EAC1C;AAAA,EAEA,cAAc,CAAC,YAMT;AACJ,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,cAAc;AACZ,UAAM,EAAC,UAAU,cAAa,IAAI,KAAK;AAEvC,UAAM,WAAW;AAAA,MACf,UAAW,iBAAiB;AAAA,MAC5B,qBAAqB,CAACC,cAAiC;AAC9C,eAAA,MAAM,oBAAoBA,WAAU;AAAA,UACzC,eAAe;AAAA,QACjB,CAAC;AAAA,MACH;AAAA,MACA,cAAc,CAAC,MAAkB;AAC1B,aAAA,aAAa,WAAW,EAAE,GAAG;AAClC,aAAK,aAAa;AAAA,MACpB;AAAA,IACF;AAEM,UAAA,WAAW,KAAK,aAAa;AAE/B,QAAA;AAGJ,QAAG,aAAa,MAAM;AACP,mBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACX,GAAG;AAAA,UACJ,UAAU,KAAK;AAAA,UACf,cAAc,KAAK,MAAM,uBAAuB;AAAA,UAChD,eAAe,KAAK;AAAA,QAAA;AAAA,MACtB;AAAA,IACF,OAAO;AACQ,mBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UAAe,GAAG;AAAA,UAC9B,UAAU,KAAK;AAAA,UACf,SAAS,KAAK,MAAM;AAAA,UACpB,oBAAoB,KAAK,MAAM,aAAa;AAAA,UAC5C,kBAAkB,KAAK,MAAM,SAAS,OAAO,KAAK,MAAM,kBAAkB;AAAA,UAC1E,eAAe,KAAK;AAAA,QAAA;AAAA,MAAe;AAAA,IACvC;AAEI,QAAA;AACJ,QAAG,KAAK,MAAM,SAAS,MAAM,UAAU,GAAG;AACxC,mBAAa,KAAK,MAAM,SAAS,QAAQ,YAAY,EAAE;AAAA,IACzD;AACA,UAAM,eAAkC,CAAC;AACzC,QAAI,YAAY;AACD,mBAAA,SAAS,SAAS,UAAU;AAAA,IAC3C;AAEO,WAAA,oBAAC,SAAI,OAAO,cAAc,WAAU,2BAA0B,eAAY,sBAC9E,UACH,WAAA,CAAA;AAAA,EACF;AAAA,EAEA,gBAAgB,MAAM;AACpB,UAAM,EAAC,UAAU,UAAU,OAAM,IAAI,KAAK;AACpC,UAAA,EAAC,mBAAkB,IAAI,KAAK;AAClC,UAAM,MAAM,IAAI,IAAI,SAAS,IAAI;AACjC,UAAM,UAAU,KAAK,KAAK,UAAU,QAAQ,CAAC;AAC7C,QAAI,aAAa,IAAI,SAAS,GAAG,OAAO,IAAI,kBAAkB,EAAE;AAEhE,UAAM,aAAa,OAAO,QAAQ,MAAM,EACrC,IAAI,CAAC,CAAC,KAAK,GAAG,MAAO,QAAQ,OAAO,MAAM,IAAK,EAC/C,OAAO,CAAA,QAAO,QAAQ,IAAI;AAEzB,QAAA,WAAW,SAAS,GAAG;AACzB,UAAI,aAAa,IAAI,SAAS,WAAW,KAAK,GAAG,CAAC;AAAA,IACpD,OACK;AACC,UAAA,aAAa,OAAO,OAAO;AAAA,IACjC;AAEA,QAAI,aAAa,OAAO;AAClB,UAAA,aAAa,OAAO,MAAM;AAAA,IAChC,WACS,aAAa,WAAW;AAC3B,UAAA,aAAa,IAAI,QAAQ,SAAS;AAAA,IACxC;AAEA,YAAQ,aAAa,EAAC,mBAAkB,GAAG,YAAY,IAAI,IAAI;AAAA,EACjE;AAAA,EAEA,yBAAyB,CAAC,aAAiC;AACzD,UAAM,MAAM,IAAI,IAAI,SAAS,IAAI;AACjC,UAAM,aAAa,IAAI,aAAa,IAAI,OAAO;AAC3C,QAAA,cAAc,eAAe,IAAI;AAC7B,YAAA,SAAS,WAAW,MAAM,GAAG;AACnC,YAAM,WAAqC,CAAC;AAC5C,aAAO,QAAQ,CAAa,cAAA;AAC1B,iBAAS,SAAS,IAAI;AAAA,MACxB,CAAC;AAED,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,UACN,GAAG,KAAK,MAAM;AAAA,UACd,GAAG;AAAA,QACL;AAAA,MACF,CAAC;AAAA,IACH;AAEA,UAAM,OAAO,IAAI,aAAa,IAAI,MAAM;AACpC,QAAA,QAAQ,SAAS,IAAI;AACvB,WAAK,YAAY,IAAgB;AAAA,IACnC;AAEA,UAAM,OAAO,IAAI,aAAa,IAAI,OAAO;AACzC,QAAI,MAAM;AACJ,UAAA;AACI,cAAA,QAAQ,KAAK,MAAM,GAAG;AACtB,cAAA,CAAC,SAAS,kBAAkB,IAAI;AAAA,UACpC,MAAM,CAAC;AAAA,UACP,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,QACvB;AAEA,YAAI,QAAQ;AACZ,YAAI,YAAY,KAAK;AACnB,gBAAM,iBAAiB,KAAK,KAAK,UAAU,QAAQ,CAAC;AACpD,cAAI,mBAAmB,SAAS,SAAS,EAAE,GAAG;AACpC,oBAAA;AAAA,UACV;AAAA,QACF;AACA,YAAI,OAAO;AACT,eAAK,SAAS;AAAA,YACZ;AAAA,YACA,yBAAyB,SAAS,OAAO,kBAAkB,EAAE;AAAA,UAC/D,CAAC;AAAA,QACH;AAAA,MACF,SACO,KAAK;AACV,gBAAQ,KAAK,GAAG;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,UAAkB;AACjC,SAAK,SAAS;AAAA,MACZ,oBAAoB;AAAA,MACpB,yBAAyB,KAAK,MAAM,SAAS,OAAO,KAAK,EAAE;AAAA,IAC7D,GAAG,KAAK,aAAa;AAAA,EACvB;AAAA,EAEA,SAAS,WAAqC,OAAgB;AAC5D,SAAK,SAAS;AAAA,MACZ,QAAQ;AAAA,QACN,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG;AAAA,MACf;AAAA,IACF,GAAG,KAAK,aAAa;AAAA,EACvB;AAAA,EAEA,YAAY,WAAqC;AAC/C,SAAK,SAAS,WAAW,CAAC,KAAK,MAAM,OAAO,SAAS,CAAC;AAAA,EACxD;AAAA,EAEA,0BAA0B,CAAC,KAA+C,UAAmB;AAC3F,SAAK,SAAS;AAAA,MACZ,wBAAwB;AAAA,QACtB,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,GAAG,GAAG;AAAA,MACT;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,0BAA0B,CAAC,KAA+C,UAAe;AACvF,SAAK,SAAS;AAAA,MACZ,wBAAwB;AAAA,QACtB,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,GAAG,GAAG;AAAA,MACT;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,MAAM,SAAS,UAAU,CAAC;AACxC,UAAA,gBAAgB,OAAO,SAAS,IAAI,OAAO,KAAK,MAAM,kBAAkB,IAAI;AAElF,UAAM,UAAU;AAAA,MAAC;AAAA,MAAA;AAAA,QACf,UAAU,KAAK,aAAa;AAAA,QAC5B,UAAU,KAAK,MAAM;AAAA,QACrB,UAAU,KAAK,MAAM;AAAA,QACrB,oBAAoB,KAAK,MAAM,aAAa;AAAA,QAC5C,SAAS,KAAK,MAAM;AAAA,QACpB,gBAAgB,KAAK;AAAA,QACrB,aAAa,KAAK;AAAA,QAClB,eAAe,KAAK;AAAA,QACpB,eAAe,KAAK,YAAY,KAAK,IAAI;AAAA,MAAA;AAAA,IAC3C;AAEA,UAAM,YAAY;AAAA,MAAC;AAAA,MAAA;AAAA,QACjB,aAAa,KAAK;AAAA,QAClB,gBAAgB,KAAK;AAAA,QACrB,aAAa,KAAK;AAAA,QAClB,yBAAyB,KAAK;AAAA,QAC9B,gBAAgB,KAAK;AAAA,QACrB,eAAe,KAAK;AAAA,QACpB,oBAAoB,KAAK,MAAM;AAAA,QAC/B;AAAA,QACA,SAAS,KAAK,MAAM;AAAA,QACpB,QAAQ,KAAK,MAAM;AAAA,MAAA;AAAA,IACrB;AAEA,UAAM,cAAc,gBAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QAEnC,OAAO;AAAA,QACP,YAAY,KAAK,MAAM;AAAA,QACvB,cAAc,KAAK,MAAM,qBAAqB;AAAA,QAC9C,aAAa,KAAK,MAAM,uBAAuB,KAAK,MAAM,SAAS,OAAO,SAAO;AAAA,QACjF,SAAS,KAAK,MAAM;AAAA,QACpB,cAAc,KAAK,MAAM;AAAA,QACzB,MAAM,KAAK,MAAM;AAAA,QACjB,aAAa,KAAK;AAAA,QAClB,gBAAgB,KAAK;AAAA,QACrB,gBAAgB,KAAK;AAAA,QACrB,aAAa,KAAK;AAAA,QAClB,yBAAyB,KAAK;AAAA,QAC9B,iBAAiB,KAAK;AAAA,QACtB,QAAQ,KAAK,MAAM;AAAA,MAAA;AAAA,MAdd,KAAK,MAAM;AAAA,IAelB,IAAK;AAEC,UAAA,cAAe,KAAK,MAAM,OAAO,SAAS,KAAK,MAAM,MAAM,SAAU,IAAI;AAAA,MAAC;AAAA,MAAA;AAAA,QAC9E,cAAc;AAAA,QACd,oBAAoB,KAAK,MAAM;AAAA,QAC/B,eAAe,KAAK;AAAA,QACpB,UAAU,KAAK,MAAM;AAAA,QACrB,QAAQ,KAAK,MAAM;AAAA,QACnB,OAAO,KAAK,MAAM;AAAA,MAAA;AAAA,IACpB,IAAK;AAGC,UAAA,8BAAU,OACd,EAAA,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,aAAa;AAAA,UAC5B,wBAAwB,KAAK,MAAM;AAAA,UACnC,wBAAwB,KAAK,MAAM;AAAA,UACnC,yBAAyB,KAAK;AAAA,UAC9B,yBAAyB,KAAK;AAAA,UAC9B,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,OAAO;AAAA,UACjD,SAAS,KAAK,MAAM;AAAA,QAAA;AAAA,MACtB;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,WAAW;AAAA,QAAA;AAAA,MACvD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,0BAA0B,KAAK;AAAA,UAC/B,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,UAAU;AAAA,QAAA;AAAA,MACtD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,QAAQ;AAAA,QAAA;AAAA,MACpD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,aAAa,KAAK;AAAA,UAClB,cAAc,KAAK,YAAY,KAAK,MAAM,MAAM;AAAA,QAAA;AAAA,MAClD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,SAAS;AAAA,QAAA;AAAA,MACrD;AAAA,IACF,EAAA,CAAA;AAEO,WAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK,KAAK,YAAY;AAAA,QACtB,QAAQ;AAAA,QACR;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"38e41ac814aa6ecd958f9d974ad879dc05091ce8"},o=t[r]||(t[r]={});(!o[n]||o[n].hash!==e)&&(o[n]=i);var a=o[n];return se=function(){return a},a}se();se().s[0]++;window.Buffer=aJ.Buffer;function JKe(n,e){se().f[0]++;const t=(se().s[1]++,n.match(/\.tilehosting\.com/)),r=(se().s[2]++,n.match(/\.maptiler\.com/)),i=(se().s[3]++,n.match(/\.thunderforest\.com/));if(se().s[4]++,se().b[1][0]++,t||(se().b[1][1]++,r)){se().b[0][0]++;const o=(se().s[5]++,Ru.getAccessToken("openmaptiles",e,{allowFallback:!0}));if(se().s[6]++,o)return se().b[2][0]++,se().s[7]++,n.replace("{key}",o);se().b[2][1]++}else if(se().b[0][1]++,se().s[8]++,i){se().b[3][0]++;const o=(se().s[9]++,Ru.getAccessToken("thunderforest",e,{allowFallback:!0}));if(se().s[10]++,o)return se().b[4][0]++,se().s[11]++,n.replace("{key}",o);se().b[4][1]++}else return se().b[3][1]++,se().s[12]++,n}function iF(n,e,t){return se().f[1]++,se().s[13]++,{...n,$root:{...n.$root,[e]:{...n.$root[e],values:t}}}}class ePe extends Mn.Component{constructor(t){se().f[2]++,se().s[14]++;super(t);sn(this,"revisionStore");sn(this,"styleStore");sn(this,"layerWatcher");sn(this,"handleKeyPress",(se().s[65]++,t=>{se().f[18]++,se().s[66]++,navigator.platform.toUpperCase().indexOf("MAC")>=0?(se().b[18][0]++,se().s[67]++,se().b[20][0]++,t.metaKey&&(se().b[20][1]++,t.shiftKey)&&(se().b[20][2]++,t.keyCode===90)?(se().b[19][0]++,se().s[68]++,t.preventDefault(),se().s[69]++,this.onRedo()):(se().b[19][1]++,se().s[70]++,se().b[22][0]++,t.metaKey&&(se().b[22][1]++,t.keyCode===90)?(se().b[21][0]++,se().s[71]++,t.preventDefault(),se().s[72]++,this.onUndo()):se().b[21][1]++)):(se().b[18][1]++,se().s[73]++,se().b[24][0]++,t.ctrlKey&&(se().b[24][1]++,t.keyCode===90)?(se().b[23][0]++,se().s[74]++,t.preventDefault(),se().s[75]++,this.onUndo()):(se().b[23][1]++,se().s[76]++,se().b[26][0]++,t.ctrlKey&&(se().b[26][1]++,t.keyCode===89)?(se().b[25][0]++,se().s[77]++,t.preventDefault(),se().s[78]++,this.onRedo()):se().b[25][1]++))}));sn(this,"onChangeMetadataProperty",(se().s[89]++,(t,r)=>{se().f[26]++,se().s[90]++,se().b[31][0]++,t==="maputnik:renderer"&&(se().b[31][1]++,r!==iee(this.state.mapStyle,["metadata","maputnik:renderer"],"mlgljs"))?(se().b[30][0]++,se().s[91]++,this.setState({mapState:"map"})):se().b[30][1]++;const i=(se().s[92]++,{...this.state.mapStyle,metadata:{...this.state.mapStyle.metadata,[t]:r}});se().s[93]++,this.onStyleChanged(i)}));sn(this,"onStyleChanged",(se().s[94]++,(t,r=(se().b[32][0]++,{}))=>{se().f[27]++,se().s[95]++,r={save:!0,addRevision:!0,initialLoad:!1,...r},se().s[96]++,r.initialLoad?(se().b[33][0]++,se().s[97]++,this.getInitialStateFromUrl(t)):se().b[33][1]++;const i=(se().s[98]++,se().b[34][0]++,Yd(t)||(se().b[34][1]++,[])),o=(se().s[99]++,[]);if(se().s[100]++,se().b[36][0]++,t&&(se().b[36][1]++,t.layers)){se().b[35][0]++;const d=(se().s[101]++,new window.Map);se().s[102]++,t.layers.forEach((f,C)=>{if(se().f[28]++,se().s[103]++,se().b[38][0]++,f.id===""&&(se().b[38][1]++,d.has(f.id))){se().b[37][0]++;const O=(se().s[104]++,new Error(`layers[${C}]: duplicate layer id [empty_string], previously used`));se().s[105]++,o.push(O)}else se().b[37][1]++;se().s[106]++,d.set(f.id,!0)})}else se().b[35][1]++;const a=(se().s[107]++,o.concat(i).map(d=>{se().f[29]++;const f=(se().s[108]++,d.message.match(/layers\[(\d+)\]: (duplicate layer id "?(.*)"?, previously used)/));if(se().s[109]++,f){se().b[39][0]++;const[,E,P]=(se().s[110]++,f);return se().s[111]++,{message:d.message,parsed:{type:"layer",data:{index:parseInt(E,10),key:"id",message:P}}}}else se().b[39][1]++;const C=(se().s[112]++,d.message.match(/layers\[(\d+)\]: (source "(?:.*)" not found)/));if(se().s[113]++,C){se().b[40][0]++;const[,E,P]=(se().s[114]++,C);return se().s[115]++,{message:d.message,parsed:{type:"layer",data:{index:parseInt(E,10),key:"source",message:P}}}}else se().b[40][1]++;const O=(se().s[116]++,d.message.match(/layers\[(\d+)\]\.(?:(\S+)\.)?(\S+): (.*)/));if(se().s[117]++,O){se().b[41][0]++;const[,E,P,D,$]=(se().s[118]++,O),H=(se().s[119]++,se().b[43][0]++,P&&(se().b[43][1]++,D)?(se().b[42][0]++,[P,D].join(".")):(se().b[42][1]++,D));return se().s[120]++,{message:d.message,parsed:{type:"layer",data:{index:parseInt(E,10),key:H,message:$}}}}else return se().b[41][1]++,se().s[121]++,{message:d.message}}));let s=(se().s[122]++,void 0);se().s[123]++,i.length>0?(se().b[44][0]++,se().s[124]++,s=gT(t),se().s[125]++,i.forEach(d=>{se().f[30]++;const{message:f}=(se().s[126]++,d);if(se().s[127]++,f){se().b[45][0]++,se().s[128]++;try{const C=(se().s[129]++,f.split(":")[0]),O=(se().s[130]++,C.match(/^\S+?\[\d+\]\.[^[]+/)[0]);se().s[131]++,nw.unset(s,O)}catch(C){se().s[132]++,console.warn(C)}}else se().b[45][1]++})):se().b[44][1]++,se().s[133]++,t.glyphs!==this.state.mapStyle.glyphs?(se().b[46][0]++,se().s[134]++,this.updateFonts(t.glyphs)):se().b[46][1]++,se().s[135]++,t.sprite!==this.state.mapStyle.sprite?(se().b[47][0]++,se().s[136]++,this.updateIcons(t.sprite)):se().b[47][1]++,se().s[137]++,r.addRevision?(se().b[48][0]++,se().s[138]++,this.revisionStore.addRevision(t)):se().b[48][1]++,se().s[139]++,r.save?(se().b[49][0]++,se().s[140]++,this.saveStyle(t)):se().b[49][1]++,se().s[141]++,this.setState({mapStyle:t,dirtyMapStyle:s,errors:a},()=>{se().f[31]++,se().s[142]++,this.fetchSources(),se().s[143]++,this.setStateInUrl()})}));sn(this,"onUndo",(se().s[144]++,()=>{se().f[32]++;const t=(se().s[145]++,this.revisionStore.undo()),r=(se().s[146]++,pKe(this.state.mapStyle,t));se().s[147]++,this.onStyleChanged(t,{addRevision:!1}),se().s[148]++,this.setState({infos:r})}));sn(this,"onRedo",(se().s[149]++,()=>{se().f[33]++;const t=(se().s[150]++,this.revisionStore.redo()),r=(se().s[151]++,mKe(this.state.mapStyle,t));se().s[152]++,this.onStyleChanged(t,{addRevision:!1}),se().s[153]++,this.setState({infos:r})}));sn(this,"onMoveLayer",(se().s[154]++,t=>{se().f[34]++;let{oldIndex:r,newIndex:i}=(se().s[155]++,t),o=(se().s[156]++,this.state.mapStyle.layers);if(se().s[157]++,r=CT(r,0,o.length-1),se().s[158]++,i=CT(i,0,o.length-1),se().s[159]++,r===i){se().b[50][0]++,se().s[160]++;return}else se().b[50][1]++;se().s[161]++,r===this.state.selectedLayerIndex?(se().b[51][0]++,se().s[162]++,this.setState({selectedLayerIndex:i})):se().b[51][1]++,se().s[163]++,o=o.slice(0),se().s[164]++,oee(o,r,i),se().s[165]++,this.onLayersChange(o)}));sn(this,"onLayersChange",(se().s[166]++,t=>{se().f[35]++;const r=(se().s[167]++,{...this.state.mapStyle,layers:t});se().s[168]++,this.onStyleChanged(r)}));sn(this,"onLayerDestroy",(se().s[169]++,t=>{se().f[36]++;const r=(se().s[170]++,this.state.mapStyle.layers),i=(se().s[171]++,r.slice(0));se().s[172]++,i.splice(t,1),se().s[173]++,this.onLayersChange(i)}));sn(this,"onLayerCopy",(se().s[174]++,t=>{se().f[37]++;const r=(se().s[175]++,this.state.mapStyle.layers),i=(se().s[176]++,r.slice(0)),o=(se().s[177]++,gT(i[t]));se().s[178]++,o.id=o.id+"-copy",se().s[179]++,i.splice(t,0,o),se().s[180]++,this.onLayersChange(i)}));sn(this,"onLayerVisibilityToggle",(se().s[181]++,t=>{se().f[38]++;const r=(se().s[182]++,this.state.mapStyle.layers),i=(se().s[183]++,r.slice(0)),o=(se().s[184]++,{...i[t]}),a=(se().s[185]++,"layout"in o?(se().b[52][0]++,{...o.layout}):(se().b[52][1]++,{}));se().s[186]++,a.visibility=a.visibility==="none"?(se().b[53][0]++,"visible"):(se().b[53][1]++,"none"),se().s[187]++,o.layout=a,se().s[188]++,i[t]=o,se().s[189]++,this.onLayersChange(i)}));sn(this,"onLayerIdChange",(se().s[190]++,(t,r,i)=>{se().f[39]++;const o=(se().s[191]++,this.state.mapStyle.layers.slice(0));se().s[192]++,o[t]={...o[t],id:i},se().s[193]++,this.onLayersChange(o)}));sn(this,"onLayerChanged",(se().s[194]++,(t,r)=>{se().f[40]++;const i=(se().s[195]++,this.state.mapStyle.layers.slice(0));se().s[196]++,i[t]=r,se().s[197]++,this.onLayersChange(i)}));sn(this,"setMapState",(se().s[198]++,t=>{se().f[41]++,se().s[199]++,this.setState({mapState:t},this.setStateInUrl)}));sn(this,"setDefaultValues",(se().s[200]++,t=>{se().f[42]++;const r=(se().s[201]++,se().b[54][0]++,t.metadata||(se().b[54][1]++,{}));if(se().s[202]++,r["maputnik:renderer"]===void 0){se().b[55][0]++;const i=(se().s[203]++,{...t,metadata:{...t.metadata,"maputnik:renderer":"mlgljs"}});return se().s[204]++,i}else return se().b[55][1]++,se().s[205]++,t}));sn(this,"openStyle",(se().s[206]++,t=>{se().f[43]++,se().s[207]++,t=this.setDefaultValues(t),se().s[208]++,this.onStyleChanged(t)}));sn(this,"onMapChange",(se().s[233]++,t=>{se().f[49]++,se().s[234]++,this.setState({mapView:t})}));sn(this,"setStateInUrl",(se().s[250]++,()=>{se().f[53]++;const{mapState:t,mapStyle:r,isOpen:i}=(se().s[251]++,this.state),{selectedLayerIndex:o}=(se().s[252]++,this.state),a=(se().s[253]++,new URL(location.href)),s=(se().s[254]++,MT(JSON.stringify(r)));se().s[255]++,a.searchParams.set("layer",`${s}~${o}`);const d=(se().s[256]++,Object.entries(i).map(([f,C])=>(se().f[54]++,se().s[257]++,C===!0?(se().b[67][0]++,f):(se().b[67][1]++,null))).filter(f=>(se().f[55]++,se().s[258]++,f!==null)));se().s[259]++,d.length>0?(se().b[68][0]++,se().s[260]++,a.searchParams.set("modal",d.join(","))):(se().b[68][1]++,se().s[261]++,a.searchParams.delete("modal")),se().s[262]++,t==="map"?(se().b[69][0]++,se().s[263]++,a.searchParams.delete("view")):(se().b[69][1]++,se().s[264]++,t==="inspect"?(se().b[70][0]++,se().s[265]++,a.searchParams.set("view","inspect")):se().b[70][1]++),se().s[266]++,history.replaceState({selectedLayerIndex:o},"Maputnik",a.href)}));sn(this,"getInitialStateFromUrl",(se().s[267]++,t=>{se().f[56]++;const r=(se().s[268]++,new URL(location.href)),i=(se().s[269]++,r.searchParams.get("modal"));if(se().s[270]++,se().b[72][0]++,i&&(se().b[72][1]++,i!=="")){se().b[71][0]++;const s=(se().s[271]++,i.split(",")),d=(se().s[272]++,{});se().s[273]++,s.forEach(f=>{se().f[57]++,se().s[274]++,d[f]=!0}),se().s[275]++,this.setState({isOpen:{...this.state.isOpen,...d}})}else se().b[71][1]++;const o=(se().s[276]++,r.searchParams.get("view"));se().s[277]++,se().b[74][0]++,o&&(se().b[74][1]++,o!=="")?(se().b[73][0]++,se().s[278]++,this.setMapState(o)):se().b[73][1]++;const a=(se().s[279]++,r.searchParams.get("layer"));if(se().s[280]++,a){se().b[75][0]++,se().s[281]++;try{const s=(se().s[282]++,a.split("~")),[d,f]=(se().s[283]++,[s[0],parseInt(s[1],10)]);let C=(se().s[284]++,!0);if(se().s[285]++,d!=="-"){se().b[76][0]++;const O=(se().s[286]++,MT(JSON.stringify(t)));se().s[287]++,O!==parseInt(d,10)?(se().b[77][0]++,se().s[288]++,C=!1):se().b[77][1]++}else se().b[76][1]++;se().s[289]++,C?(se().b[78][0]++,se().s[290]++,this.setState({selectedLayerIndex:f,selectedLayerOriginalId:t.layers[f].id})):se().b[78][1]++}catch(s){se().s[291]++,console.warn(s)}}else se().b[75][1]++}));sn(this,"onLayerSelect",(se().s[292]++,t=>{se().f[58]++,se().s[293]++,this.setState({selectedLayerIndex:t,selectedLayerOriginalId:this.state.mapStyle.layers[t].id},this.setStateInUrl)}));sn(this,"onChangeOpenlayersDebug",(se().s[296]++,(t,r)=>{se().f[61]++,se().s[297]++,this.setState({openlayersDebugOptions:{...this.state.openlayersDebugOptions,[t]:r}})}));sn(this,"onChangeMaplibreGlDebug",(se().s[298]++,(t,r)=>{se().f[62]++,se().s[299]++,this.setState({maplibreGlDebugOptions:{...this.state.maplibreGlDebugOptions,[t]:r}})}));se().s[15]++,FX(this),se().s[16]++,this.revisionStore=new BKe;const r=(se().s[17]++,new URLSearchParams(window.location.search.substring(1)));let i=(se().s[18]++,r.get("localport"));se().s[19]++,se().b[6][0]++,i==null&&(se().b[6][1]++,window.location.port!=="80")&&(se().b[6][2]++,window.location.port!=="443")?(se().b[5][0]++,se().s[20]++,i=window.location.port):se().b[5][1]++,se().s[21]++,this.styleStore=new OKe({onLocalStyleChange:s=>(se().f[3]++,se().s[22]++,this.onStyleChanged(s,{save:!1})),port:i,host:r.get("localhost")});const o=(se().s[23]++,[{key:"?",handler:()=>{se().f[4]++,se().s[24]++,this.toggleModal("shortcuts")}},{key:"o",handler:()=>{se().f[5]++,se().s[25]++,this.toggleModal("open")}},{key:"e",handler:()=>{se().f[6]++,se().s[26]++,this.toggleModal("export")}},{key:"d",handler:()=>{se().f[7]++,se().s[27]++,this.toggleModal("sources")}},{key:"s",handler:()=>{se().f[8]++,se().s[28]++,this.toggleModal("settings")}},{key:"i",handler:()=>{se().f[9]++,se().s[29]++,this.setMapState(this.state.mapState==="map"?(se().b[7][0]++,"inspect"):(se().b[7][1]++,"map"))}},{key:"m",handler:()=>{se().f[10]++,se().s[30]++,document.querySelector(".maplibregl-canvas").focus()}},{key:"!",handler:()=>{se().f[11]++,se().s[31]++,this.toggleModal("debug")}}]);se().s[32]++,document.body.addEventListener("keyup",s=>{if(se().f[12]++,se().s[33]++,s.key==="Escape")se().b[8][0]++,se().s[34]++,s.target.blur(),se().s[35]++,document.body.focus();else if(se().b[8][1]++,se().s[36]++,se().b[10][0]++,this.state.isOpen.shortcuts||(se().b[10][1]++,document.activeElement===document.body)){se().b[9][0]++;const d=(se().s[37]++,o.find(f=>(se().f[13]++,se().s[38]++,f.key===s.key)));se().s[39]++,d?(se().b[11][0]++,se().s[40]++,this.setModal("shortcuts",!1),se().s[41]++,d.handler()):se().b[11][1]++}else se().b[9][1]++});const a=(se().s[42]++,fKe());se().s[43]++,se().b[13][0]++,a&&(se().b[13][1]++,window.confirm("Load style from URL: "+a+" and discard current changes?"))?(se().b[12][0]++,se().s[44]++,this.styleStore=new tF,se().s[45]++,yY(a,s=>(se().f[14]++,se().s[46]++,this.onStyleChanged(s))),se().s[47]++,ZL()):(se().b[12][1]++,se().s[48]++,a?(se().b[14][0]++,se().s[49]++,ZL()):se().b[14][1]++,se().s[50]++,this.styleStore.init(s=>{se().f[15]++,se().s[51]++,s?(se().b[15][0]++,se().s[52]++,console.log("Falling back to local storage for storing styles"),se().s[53]++,this.styleStore=new tF):se().b[15][1]++,se().s[54]++,this.styleStore.latestStyle(d=>(se().f[16]++,se().s[55]++,this.onStyleChanged(d,{initialLoad:!0}))),se().s[56]++,t1.enabled()?(se().b[16][0]++,se().s[57]++,t1.set("maputnik","styleStore",this.styleStore),se().s[58]++,t1.set("maputnik","revisionStore",this.revisionStore)):se().b[16][1]++})),se().s[59]++,t1.enabled()?(se().b[17][0]++,se().s[60]++,t1.set("maputnik","revisionStore",this.revisionStore),se().s[61]++,t1.set("maputnik","styleStore",this.styleStore)):se().b[17][1]++,se().s[62]++,this.state={errors:[],infos:[],mapStyle:Ru.emptyStyle,selectedLayerIndex:0,sources:{},vectorLayers:{},mapState:"map",spec:Ea,mapView:{zoom:0,center:{lng:0,lat:0}},isOpen:{settings:!1,sources:!1,open:!1,shortcuts:!1,export:!1,debug:!1},maplibreGlDebugOptions:{showTileBoundaries:!1,showCollisionBoxes:!1,showOverdrawInspector:!1},openlayersDebugOptions:{debugToolbox:!1}},se().s[63]++,this.layerWatcher=new HKe({onVectorLayersChange:s=>(se().f[17]++,se().s[64]++,this.setState({vectorLayers:s}))})}componentDidMount(){se().f[19]++,se().s[79]++,window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){se().f[20]++,se().s[80]++,window.removeEventListener("keydown",this.handleKeyPress)}saveStyle(t){se().f[21]++,se().s[81]++,this.styleStore.save(t)}updateFonts(t){se().f[22]++;const r=(se().s[82]++,se().b[27][0]++,this.state.mapStyle.metadata||(se().b[27][1]++,{})),i=(se().s[83]++,se().b[28][0]++,r["maputnik:openmaptiles_access_token"]||(se().b[28][1]++,NQ.openmaptiles)),o=(se().s[84]++,typeof t=="string"?(se().b[29][0]++,t.replace("{key}",i)):(se().b[29][1]++,t));se().s[85]++,dKe(o,a=>{se().f[23]++,se().s[86]++,this.setState({spec:iF(this.state.spec,"glyphs",a)})})}updateIcons(t){se().f[24]++,se().s[87]++,hKe(t,r=>{se().f[25]++,se().s[88]++,this.setState({spec:iF(this.state.spec,"sprite",r)})})}fetchSources(){se().f[44]++;const t=(se().s[209]++,{});se().s[210]++;for(const[r,i]of Object.entries(this.state.mapStyle.sources))if(se().s[211]++,se().b[57][0]++,!Object.prototype.hasOwnProperty.call(this.state.sources,r)&&(se().b[57][1]++,i.type==="vector")&&(se().b[57][2]++,Object.prototype.hasOwnProperty.call(i,"url"))){se().b[56][0]++,se().s[212]++,t[r]={type:i.type,layers:[]};let o=(se().s[213]++,i.url);se().s[214]++;try{se().s[215]++,o=JKe(o,this.state.mapStyle)}catch(a){se().s[216]++,console.warn("Failed to setFetchAccessToken: ",a)}se().s[217]++,fetch(o,{mode:"cors"}).then(a=>(se().f[45]++,se().s[218]++,a.json())).then(a=>{if(se().f[46]++,se().s[219]++,Object.prototype.hasOwnProperty.call(a,"vector_layers"))se().b[58][1]++;else{se().b[58][0]++,se().s[220]++;return}const s=(se().s[221]++,Object.assign({},{[r]:this.state.sources[r]}));se().s[222]++;for(const d of a.vector_layers)se().s[223]++,s[r].layers.push(d.id);se().s[224]++,console.debug("Updating source: "+r),se().s[225]++,this.setState({sources:s})}).catch(a=>{se().f[47]++,se().s[226]++,console.error("Failed to process sources for '%s'",o,a)})}else se().b[56][1]++,se().s[227]++,t[r]=(se().b[59][0]++,this.state.sources[r]||(se().b[59][1]++,this.state.mapStyle.sources[r]));se().s[228]++,qB(this.state.sources,t)?se().b[60][1]++:(se().b[60][0]++,se().s[229]++,console.debug("Setting sources"),se().s[230]++,this.setState({sources:t}))}_getRenderer(){se().f[48]++;const t=(se().s[231]++,se().b[61][0]++,this.state.mapStyle.metadata||(se().b[61][1]++,{}));return se().s[232]++,se().b[62][0]++,t["maputnik:renderer"]||(se().b[62][1]++,"mlgljs")}mapRenderer(){se().f[50]++;const{mapStyle:t,dirtyMapStyle:r}=(se().s[235]++,this.state),i=(se().s[236]++,{mapStyle:(se().b[63][0]++,r||(se().b[63][1]++,t)),replaceAccessTokens:f=>(se().f[51]++,se().s[237]++,Ru.replaceAccessTokens(f,{allowFallback:!0})),onDataChange:f=>{se().f[52]++,se().s[238]++,this.layerWatcher.analyzeMap(f.map),se().s[239]++,this.fetchSources()}}),o=(se().s[240]++,this._getRenderer());let a;se().s[241]++,o==="ol"?(se().b[64][0]++,se().s[242]++,a=G.jsx(Upe,{...i,onChange:this.onMapChange,debugToolbox:this.state.openlayersDebugOptions.debugToolbox,onLayerSelect:this.onLayerSelect})):(se().b[64][1]++,se().s[243]++,a=G.jsx(toe,{...i,onChange:this.onMapChange,options:this.state.maplibreGlDebugOptions,inspectModeEnabled:this.state.mapState==="inspect",highlightedLayer:this.state.mapStyle.layers[this.state.selectedLayerIndex],onLayerSelect:this.onLayerSelect}));let s;se().s[244]++,this.state.mapState.match(/^filter-/)?(se().b[65][0]++,se().s[245]++,s=this.state.mapState.replace(/^filter-/,"")):se().b[65][1]++;const d=(se().s[246]++,{});return se().s[247]++,s?(se().b[66][0]++,se().s[248]++,d.filter=`url('#${s}')`):se().b[66][1]++,se().s[249]++,G.jsx("div",{style:d,className:"maputnik-map__container","data-wd-key":"maplibre:container",children:a})}setModal(t,r){se().f[59]++,se().s[294]++,this.setState({isOpen:{...this.state.isOpen,[t]:r}},this.setStateInUrl)}toggleModal(t){se().f[60]++,se().s[295]++,this.setModal(t,!this.state.isOpen[t])}render(){se().f[63]++;const t=(se().s[300]++,se().b[79][0]++,this.state.mapStyle.layers||(se().b[79][1]++,[])),r=(se().s[301]++,t.length>0?(se().b[80][0]++,t[this.state.selectedLayerIndex]):(se().b[80][1]++,void 0)),i=(se().s[302]++,G.jsx(SIe,{renderer:this._getRenderer(),mapState:this.state.mapState,mapStyle:this.state.mapStyle,inspectModeEnabled:this.state.mapState==="inspect",sources:this.state.sources,onStyleChanged:this.onStyleChanged,onStyleOpen:this.onStyleChanged,onSetMapState:this.setMapState,onToggleModal:this.toggleModal.bind(this)})),o=(se().s[303]++,G.jsx(P1e,{onMoveLayer:this.onMoveLayer,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayersChange:this.onLayersChange,onLayerSelect:this.onLayerSelect,selectedLayerIndex:this.state.selectedLayerIndex,layers:t,sources:this.state.sources,errors:this.state.errors})),a=(se().s[304]++,r?(se().b[81][0]++,G.jsx(q8e,{layer:r,layerIndex:this.state.selectedLayerIndex,isFirstLayer:this.state.selectedLayerIndex<1,isLastLayer:this.state.selectedLayerIndex===this.state.mapStyle.layers.length-1,sources:this.state.sources,vectorLayers:this.state.vectorLayers,spec:this.state.spec,onMoveLayer:this.onMoveLayer,onLayerChanged:this.onLayerChanged,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayerIdChange:this.onLayerIdChange,errors:this.state.errors},this.state.selectedLayerOriginalId)):(se().b[81][1]++,void 0)),s=(se().s[305]++,this.state.errors.length+this.state.infos.length>0?(se().b[82][0]++,G.jsx(BIe,{currentLayer:r,selectedLayerIndex:this.state.selectedLayerIndex,onLayerSelect:this.onLayerSelect,mapStyle:this.state.mapStyle,errors:this.state.errors,infos:this.state.infos})):(se().b[82][1]++,void 0)),d=(se().s[306]++,G.jsxs("div",{children:[G.jsx(Pke,{renderer:this._getRenderer(),maplibreGlDebugOptions:this.state.maplibreGlDebugOptions,openlayersDebugOptions:this.state.openlayersDebugOptions,onChangeMaplibreGlDebug:this.onChangeMaplibreGlDebug,onChangeOpenlayersDebug:this.onChangeOpenlayersDebug,isOpen:this.state.isOpen.debug,onOpenToggle:this.toggleModal.bind(this,"debug"),mapView:this.state.mapView}),G.jsx(Tke,{isOpen:this.state.isOpen.shortcuts,onOpenToggle:this.toggleModal.bind(this,"shortcuts")}),G.jsx(KIe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,onChangeMetadataProperty:this.onChangeMetadataProperty,isOpen:this.state.isOpen.settings,onOpenToggle:this.toggleModal.bind(this,"settings")}),G.jsx(qIe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.export,onOpenToggle:this.toggleModal.bind(this,"export")}),G.jsx(Ike,{isOpen:this.state.isOpen.open,onStyleOpen:this.openStyle,onOpenToggle:this.toggleModal.bind(this,"open")}),G.jsx(cke,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.sources,onOpenToggle:this.toggleModal.bind(this,"sources")})]}));return se().s[307]++,G.jsx(OIe,{toolbar:i,layerList:o,layerEditor:a,map:this.mapRenderer(),bottom:s,modals:d})}}const tPe=CR(document.querySelector("#app"));tPe.render(G.jsx(XE.Provider,{value:{className:"react-icons"},children:G.jsx(ePe,{})}));document.querySelector(".loading").style.display="none";
//# sourceMappingURL=index-BAhwfmk9.js.map
