mirror of
https://github.com/maputnik/editor.git
synced 2026-01-03 12:00:00 +00:00
1002 lines
3.5 MiB
1002 lines
3.5 MiB
var jz=Object.defineProperty;var zz=(r,t,e)=>t in r?jz(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var Kn=(r,t,e)=>zz(r,typeof t!="symbol"?t+"":t,e);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function e(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 n(i){if(i.ep)return;i.ep=!0;const o=e(i);fetch(i.href,o)}})();function us(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function BE(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var lx={exports:{}},hy={},ux={exports:{}},ga={},eB;function Nz(){if(eB)return ga;eB=1;/**
|
||
* @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 r=Symbol.for("react.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),I=Symbol.iterator;function S(ke){return ke===null||typeof ke!="object"?null:(ke=I&&ke[I]||ke["@@iterator"],typeof ke=="function"?ke:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,U={};function j(ke,We,vt){this.props=ke,this.context=We,this.refs=U,this.updater=vt||B}j.prototype.isReactComponent={},j.prototype.setState=function(ke,We){if(typeof ke!="object"&&typeof ke!="function"&&ke!=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,ke,We,"setState")},j.prototype.forceUpdate=function(ke){this.updater.enqueueForceUpdate(this,ke,"forceUpdate")};function q(){}q.prototype=j.prototype;function W(ke,We,vt){this.props=ke,this.context=We,this.refs=U,this.updater=vt||B}var ee=W.prototype=new q;ee.constructor=W,P(ee,j.prototype),ee.isPureReactComponent=!0;var J=Array.isArray,$=Object.prototype.hasOwnProperty,X={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function ae(ke,We,vt){var Pt,ut={},jt=null,Rt=null;if(We!=null)for(Pt in We.ref!==void 0&&(Rt=We.ref),We.key!==void 0&&(jt=""+We.key),We)$.call(We,Pt)&&!G.hasOwnProperty(Pt)&&(ut[Pt]=We[Pt]);var Ke=arguments.length-2;if(Ke===1)ut.children=vt;else if(1<Ke){for(var we=Array(Ke),Fe=0;Fe<Ke;Fe++)we[Fe]=arguments[Fe+2];ut.children=we}if(ke&&ke.defaultProps)for(Pt in Ke=ke.defaultProps,Ke)ut[Pt]===void 0&&(ut[Pt]=Ke[Pt]);return{$$typeof:r,type:ke,key:jt,ref:Rt,props:ut,_owner:X.current}}function ge(ke,We){return{$$typeof:r,type:ke.type,key:We,ref:ke.ref,props:ke.props,_owner:ke._owner}}function he(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===r}function Ie(ke){var We={"=":"=0",":":"=2"};return"$"+ke.replace(/[=:]/g,function(vt){return We[vt]})}var re=/\/+/g;function oe(ke,We){return typeof ke=="object"&&ke!==null&&ke.key!=null?Ie(""+ke.key):We.toString(36)}function Se(ke,We,vt,Pt,ut){var jt=typeof ke;(jt==="undefined"||jt==="boolean")&&(ke=null);var Rt=!1;if(ke===null)Rt=!0;else switch(jt){case"string":case"number":Rt=!0;break;case"object":switch(ke.$$typeof){case r:case t:Rt=!0}}if(Rt)return Rt=ke,ut=ut(Rt),ke=Pt===""?"."+oe(Rt,0):Pt,J(ut)?(vt="",ke!=null&&(vt=ke.replace(re,"$&/")+"/"),Se(ut,We,vt,"",function(Fe){return Fe})):ut!=null&&(he(ut)&&(ut=ge(ut,vt+(!ut.key||Rt&&Rt.key===ut.key?"":(""+ut.key).replace(re,"$&/")+"/")+ke)),We.push(ut)),1;if(Rt=0,Pt=Pt===""?".":Pt+":",J(ke))for(var Ke=0;Ke<ke.length;Ke++){jt=ke[Ke];var we=Pt+oe(jt,Ke);Rt+=Se(jt,We,vt,we,ut)}else if(we=S(ke),typeof we=="function")for(ke=we.call(ke),Ke=0;!(jt=ke.next()).done;)jt=jt.value,we=Pt+oe(jt,Ke++),Rt+=Se(jt,We,vt,we,ut);else if(jt==="object")throw We=String(ke),Error("Objects are not valid as a React child (found: "+(We==="[object Object]"?"object with keys {"+Object.keys(ke).join(", ")+"}":We)+"). If you meant to render a collection of children, use an array instead.");return Rt}function ye(ke,We,vt){if(ke==null)return ke;var Pt=[],ut=0;return Se(ke,Pt,"","",function(jt){return We.call(vt,jt,ut++)}),Pt}function nt(ke){if(ke._status===-1){var We=ke._result;We=We(),We.then(function(vt){(ke._status===0||ke._status===-1)&&(ke._status=1,ke._result=vt)},function(vt){(ke._status===0||ke._status===-1)&&(ke._status=2,ke._result=vt)}),ke._status===-1&&(ke._status=0,ke._result=We)}if(ke._status===1)return ke._result.default;throw ke._result}var Ne={current:null},je={transition:null},et={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:je,ReactCurrentOwner:X};function Ue(){throw Error("act(...) is not supported in production builds of React.")}return ga.Children={map:ye,forEach:function(ke,We,vt){ye(ke,function(){We.apply(this,arguments)},vt)},count:function(ke){var We=0;return ye(ke,function(){We++}),We},toArray:function(ke){return ye(ke,function(We){return We})||[]},only:function(ke){if(!he(ke))throw Error("React.Children.only expected to receive a single React element child.");return ke}},ga.Component=j,ga.Fragment=e,ga.Profiler=i,ga.PureComponent=W,ga.StrictMode=n,ga.Suspense=f,ga.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=et,ga.act=Ue,ga.cloneElement=function(ke,We,vt){if(ke==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+ke+".");var Pt=P({},ke.props),ut=ke.key,jt=ke.ref,Rt=ke._owner;if(We!=null){if(We.ref!==void 0&&(jt=We.ref,Rt=X.current),We.key!==void 0&&(ut=""+We.key),ke.type&&ke.type.defaultProps)var Ke=ke.type.defaultProps;for(we in We)$.call(We,we)&&!G.hasOwnProperty(we)&&(Pt[we]=We[we]===void 0&&Ke!==void 0?Ke[we]:We[we])}var we=arguments.length-2;if(we===1)Pt.children=vt;else if(1<we){Ke=Array(we);for(var Fe=0;Fe<we;Fe++)Ke[Fe]=arguments[Fe+2];Pt.children=Ke}return{$$typeof:r,type:ke.type,key:ut,ref:jt,props:Pt,_owner:Rt}},ga.createContext=function(ke){return ke={$$typeof:s,_currentValue:ke,_currentValue2:ke,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},ke.Provider={$$typeof:o,_context:ke},ke.Consumer=ke},ga.createElement=ae,ga.createFactory=function(ke){var We=ae.bind(null,ke);return We.type=ke,We},ga.createRef=function(){return{current:null}},ga.forwardRef=function(ke){return{$$typeof:a,render:ke}},ga.isValidElement=he,ga.lazy=function(ke){return{$$typeof:b,_payload:{_status:-1,_result:ke},_init:nt}},ga.memo=function(ke,We){return{$$typeof:g,type:ke,compare:We===void 0?null:We}},ga.startTransition=function(ke){var We=je.transition;je.transition={};try{ke()}finally{je.transition=We}},ga.unstable_act=Ue,ga.useCallback=function(ke,We){return Ne.current.useCallback(ke,We)},ga.useContext=function(ke){return Ne.current.useContext(ke)},ga.useDebugValue=function(){},ga.useDeferredValue=function(ke){return Ne.current.useDeferredValue(ke)},ga.useEffect=function(ke,We){return Ne.current.useEffect(ke,We)},ga.useId=function(){return Ne.current.useId()},ga.useImperativeHandle=function(ke,We,vt){return Ne.current.useImperativeHandle(ke,We,vt)},ga.useInsertionEffect=function(ke,We){return Ne.current.useInsertionEffect(ke,We)},ga.useLayoutEffect=function(ke,We){return Ne.current.useLayoutEffect(ke,We)},ga.useMemo=function(ke,We){return Ne.current.useMemo(ke,We)},ga.useReducer=function(ke,We,vt){return Ne.current.useReducer(ke,We,vt)},ga.useRef=function(ke){return Ne.current.useRef(ke)},ga.useState=function(ke){return Ne.current.useState(ke)},ga.useSyncExternalStore=function(ke,We,vt){return Ne.current.useSyncExternalStore(ke,We,vt)},ga.useTransition=function(){return Ne.current.useTransition()},ga.version="18.3.1",ga}var tB;function Ts(){return tB||(tB=1,ux.exports=Nz()),ux.exports}/**
|
||
* @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 nB;function Gz(){if(nB)return hy;nB=1;var r=Ts(),t=Symbol.for("react.element"),e=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,f,g){var b,I={},S=null,B=null;g!==void 0&&(S=""+g),f.key!==void 0&&(S=""+f.key),f.ref!==void 0&&(B=f.ref);for(b in f)n.call(f,b)&&!o.hasOwnProperty(b)&&(I[b]=f[b]);if(a&&a.defaultProps)for(b in f=a.defaultProps,f)I[b]===void 0&&(I[b]=f[b]);return{$$typeof:t,type:a,key:S,ref:B,props:I,_owner:i.current}}return hy.Fragment=e,hy.jsx=s,hy.jsxs=s,hy}var rB;function Wz(){return rB||(rB=1,lx.exports=Gz()),lx.exports}var ue=Wz(),di=Ts();const Zn=us(di);var JK={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},aS=Zn.createContext&&Zn.createContext(JK),Qz=["attr","size","title"];function qz(r,t){if(r==null)return{};var e=Yz(r,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(e[n]=r[n])}return e}function Yz(r,t){if(r==null)return{};var e={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(e[i]=r[i]);return e}function OC(){return OC=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},OC.apply(this,arguments)}function iB(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function BC(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?iB(Object(e),!0).forEach(function(n){$z(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):iB(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function $z(r,t,e){return t=Vz(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Vz(r){var t=Hz(r,"string");return typeof t=="symbol"?t:String(t)}function Hz(r,t){if(typeof r!="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function eR(r){return r&&r.map((t,e)=>Zn.createElement(t.tag,BC({key:e},t.attr),eR(t.child)))}function Yl(r){return t=>Zn.createElement(Zz,OC({attr:BC({},r.attr)},t),eR(r.child))}function Zz(r){var t=e=>{var{attr:n,size:i,title:o}=r,s=qz(r,Qz),a=i||e.size||"1em",f;return e.className&&(f=e.className),r.className&&(f=(f?f+" ":"")+r.className),Zn.createElement("svg",OC({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,n,s,{className:f,style:BC(BC({color:r.color||e.color},e.style),r.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&Zn.createElement("title",null,o),r.children)};return aS!==void 0?Zn.createElement(aS.Consumer,null,e=>t(e)):t(JK)}var S_={},Ax={exports:{}},nh={},cx={exports:{}},dx={};/**
|
||
* @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.
|
||
*/var oB;function Xz(){return oB||(oB=1,function(r){function t(je,et){var Ue=je.length;je.push(et);e:for(;0<Ue;){var ke=Ue-1>>>1,We=je[ke];if(0<i(We,et))je[ke]=et,je[Ue]=We,Ue=ke;else break e}}function e(je){return je.length===0?null:je[0]}function n(je){if(je.length===0)return null;var et=je[0],Ue=je.pop();if(Ue!==et){je[0]=Ue;e:for(var ke=0,We=je.length,vt=We>>>1;ke<vt;){var Pt=2*(ke+1)-1,ut=je[Pt],jt=Pt+1,Rt=je[jt];if(0>i(ut,Ue))jt<We&&0>i(Rt,ut)?(je[ke]=Rt,je[jt]=Ue,ke=jt):(je[ke]=ut,je[Pt]=Ue,ke=Pt);else if(jt<We&&0>i(Rt,Ue))je[ke]=Rt,je[jt]=Ue,ke=jt;else break e}}return et}function i(je,et){var Ue=je.sortIndex-et.sortIndex;return Ue!==0?Ue:je.id-et.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();r.unstable_now=function(){return s.now()-a}}var f=[],g=[],b=1,I=null,S=3,B=!1,P=!1,U=!1,j=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ee(je){for(var et=e(g);et!==null;){if(et.callback===null)n(g);else if(et.startTime<=je)n(g),et.sortIndex=et.expirationTime,t(f,et);else break;et=e(g)}}function J(je){if(U=!1,ee(je),!P)if(e(f)!==null)P=!0,nt($);else{var et=e(g);et!==null&&Ne(J,et.startTime-je)}}function $(je,et){P=!1,U&&(U=!1,q(ae),ae=-1),B=!0;var Ue=S;try{for(ee(et),I=e(f);I!==null&&(!(I.expirationTime>et)||je&&!Ie());){var ke=I.callback;if(typeof ke=="function"){I.callback=null,S=I.priorityLevel;var We=ke(I.expirationTime<=et);et=r.unstable_now(),typeof We=="function"?I.callback=We:I===e(f)&&n(f),ee(et)}else n(f);I=e(f)}if(I!==null)var vt=!0;else{var Pt=e(g);Pt!==null&&Ne(J,Pt.startTime-et),vt=!1}return vt}finally{I=null,S=Ue,B=!1}}var X=!1,G=null,ae=-1,ge=5,he=-1;function Ie(){return!(r.unstable_now()-he<ge)}function re(){if(G!==null){var je=r.unstable_now();he=je;var et=!0;try{et=G(!0,je)}finally{et?oe():(X=!1,G=null)}}else X=!1}var oe;if(typeof W=="function")oe=function(){W(re)};else if(typeof MessageChannel<"u"){var Se=new MessageChannel,ye=Se.port2;Se.port1.onmessage=re,oe=function(){ye.postMessage(null)}}else oe=function(){j(re,0)};function nt(je){G=je,X||(X=!0,oe())}function Ne(je,et){ae=j(function(){je(r.unstable_now())},et)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(je){je.callback=null},r.unstable_continueExecution=function(){P||B||(P=!0,nt($))},r.unstable_forceFrameRate=function(je){0>je||125<je?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<je?Math.floor(1e3/je):5},r.unstable_getCurrentPriorityLevel=function(){return S},r.unstable_getFirstCallbackNode=function(){return e(f)},r.unstable_next=function(je){switch(S){case 1:case 2:case 3:var et=3;break;default:et=S}var Ue=S;S=et;try{return je()}finally{S=Ue}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(je,et){switch(je){case 1:case 2:case 3:case 4:case 5:break;default:je=3}var Ue=S;S=je;try{return et()}finally{S=Ue}},r.unstable_scheduleCallback=function(je,et,Ue){var ke=r.unstable_now();switch(typeof Ue=="object"&&Ue!==null?(Ue=Ue.delay,Ue=typeof Ue=="number"&&0<Ue?ke+Ue:ke):Ue=ke,je){case 1:var We=-1;break;case 2:We=250;break;case 5:We=1073741823;break;case 4:We=1e4;break;default:We=5e3}return We=Ue+We,je={id:b++,callback:et,priorityLevel:je,startTime:Ue,expirationTime:We,sortIndex:-1},Ue>ke?(je.sortIndex=Ue,t(g,je),e(f)===null&&je===e(g)&&(U?(q(ae),ae=-1):U=!0,Ne(J,Ue-ke))):(je.sortIndex=We,t(f,je),P||B||(P=!0,nt($))),je},r.unstable_shouldYield=Ie,r.unstable_wrapCallback=function(je){var et=S;return function(){var Ue=S;S=et;try{return je.apply(this,arguments)}finally{S=Ue}}}}(dx)),dx}var aB;function Jz(){return aB||(aB=1,cx.exports=Xz()),cx.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 sB;function eN(){if(sB)return nh;sB=1;var r=Ts(),t=Jz();function e(m){for(var _="https://reactjs.org/docs/error-decoder.html?invariant="+m,L=1;L<arguments.length;L++)_+="&args[]="+encodeURIComponent(arguments[L]);return"Minified React error #"+m+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(m,_){s(m,_),s(m+"Capture",_)}function s(m,_){for(i[m]=_,m=0;m<_.length;m++)n.add(_[m])}var a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,g=/^[: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]*$/,b={},I={};function S(m){return f.call(I,m)?!0:f.call(b,m)?!1:g.test(m)?I[m]=!0:(b[m]=!0,!1)}function B(m,_,L,Q){if(L!==null&&L.type===0)return!1;switch(typeof _){case"function":case"symbol":return!0;case"boolean":return Q?!1:L!==null?!L.acceptsBooleans:(m=m.toLowerCase().slice(0,5),m!=="data-"&&m!=="aria-");default:return!1}}function P(m,_,L,Q){if(_===null||typeof _>"u"||B(m,_,L,Q))return!0;if(Q)return!1;if(L!==null)switch(L.type){case 3:return!_;case 4:return _===!1;case 5:return isNaN(_);case 6:return isNaN(_)||1>_}return!1}function U(m,_,L,Q,le,me,Xe){this.acceptsBooleans=_===2||_===3||_===4,this.attributeName=Q,this.attributeNamespace=le,this.mustUseProperty=L,this.propertyName=m,this.type=_,this.sanitizeURL=me,this.removeEmptyString=Xe}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(m){j[m]=new U(m,0,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(m){var _=m[0];j[_]=new U(_,1,!1,m[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(m){j[m]=new U(m,2,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(m){j[m]=new U(m,2,!1,m,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(m){j[m]=new U(m,3,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(m){j[m]=new U(m,3,!0,m,null,!1,!1)}),["capture","download"].forEach(function(m){j[m]=new U(m,4,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(function(m){j[m]=new U(m,6,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(function(m){j[m]=new U(m,5,!1,m.toLowerCase(),null,!1,!1)});var q=/[\-:]([a-z])/g;function W(m){return m[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(m){var _=m.replace(q,W);j[_]=new U(_,1,!1,m,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(m){var _=m.replace(q,W);j[_]=new U(_,1,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(m){var _=m.replace(q,W);j[_]=new U(_,1,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(m){j[m]=new U(m,1,!1,m.toLowerCase(),null,!1,!1)}),j.xlinkHref=new U("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(m){j[m]=new U(m,1,!1,m.toLowerCase(),null,!0,!0)});function ee(m,_,L,Q){var le=j.hasOwnProperty(_)?j[_]:null;(le!==null?le.type!==0:Q||!(2<_.length)||_[0]!=="o"&&_[0]!=="O"||_[1]!=="n"&&_[1]!=="N")&&(P(_,L,le,Q)&&(L=null),Q||le===null?S(_)&&(L===null?m.removeAttribute(_):m.setAttribute(_,""+L)):le.mustUseProperty?m[le.propertyName]=L===null?le.type===3?!1:"":L:(_=le.attributeName,Q=le.attributeNamespace,L===null?m.removeAttribute(_):(le=le.type,L=le===3||le===4&&L===!0?"":""+L,Q?m.setAttributeNS(Q,_,L):m.setAttribute(_,L))))}var J=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),X=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),he=Symbol.for("react.provider"),Ie=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),Se=Symbol.for("react.suspense_list"),ye=Symbol.for("react.memo"),nt=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),je=Symbol.iterator;function et(m){return m===null||typeof m!="object"?null:(m=je&&m[je]||m["@@iterator"],typeof m=="function"?m:null)}var Ue=Object.assign,ke;function We(m){if(ke===void 0)try{throw Error()}catch(L){var _=L.stack.trim().match(/\n( *(at )?)/);ke=_&&_[1]||""}return`
|
||
`+ke+m}var vt=!1;function Pt(m,_){if(!m||vt)return"";vt=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(_)if(_=function(){throw Error()},Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(Cn){var Q=Cn}Reflect.construct(m,[],_)}else{try{_.call()}catch(Cn){Q=Cn}m.call(_.prototype)}else{try{throw Error()}catch(Cn){Q=Cn}m()}}catch(Cn){if(Cn&&Q&&typeof Cn.stack=="string"){for(var le=Cn.stack.split(`
|
||
`),me=Q.stack.split(`
|
||
`),Xe=le.length-1,Bt=me.length-1;1<=Xe&&0<=Bt&&le[Xe]!==me[Bt];)Bt--;for(;1<=Xe&&0<=Bt;Xe--,Bt--)if(le[Xe]!==me[Bt]){if(Xe!==1||Bt!==1)do if(Xe--,Bt--,0>Bt||le[Xe]!==me[Bt]){var Wt=`
|
||
`+le[Xe].replace(" at new "," at ");return m.displayName&&Wt.includes("<anonymous>")&&(Wt=Wt.replace("<anonymous>",m.displayName)),Wt}while(1<=Xe&&0<=Bt);break}}}finally{vt=!1,Error.prepareStackTrace=L}return(m=m?m.displayName||m.name:"")?We(m):""}function ut(m){switch(m.tag){case 5:return We(m.type);case 16:return We("Lazy");case 13:return We("Suspense");case 19:return We("SuspenseList");case 0:case 2:case 15:return m=Pt(m.type,!1),m;case 11:return m=Pt(m.type.render,!1),m;case 1:return m=Pt(m.type,!0),m;default:return""}}function jt(m){if(m==null)return null;if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case G:return"Fragment";case X:return"Portal";case ge:return"Profiler";case ae:return"StrictMode";case oe:return"Suspense";case Se:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case Ie:return(m.displayName||"Context")+".Consumer";case he:return(m._context.displayName||"Context")+".Provider";case re:var _=m.render;return m=m.displayName,m||(m=_.displayName||_.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case ye:return _=m.displayName||null,_!==null?_:jt(m.type)||"Memo";case nt:_=m._payload,m=m._init;try{return jt(m(_))}catch{}}return null}function Rt(m){var _=m.type;switch(m.tag){case 24:return"Cache";case 9:return(_.displayName||"Context")+".Consumer";case 10:return(_._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return m=_.render,m=m.displayName||m.name||"",_.displayName||(m!==""?"ForwardRef("+m+")":"ForwardRef");case 7:return"Fragment";case 5:return _;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jt(_);case 8:return _===ae?"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 _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _}return null}function Ke(m){switch(typeof m){case"boolean":case"number":case"string":case"undefined":return m;case"object":return m;default:return""}}function we(m){var _=m.type;return(m=m.nodeName)&&m.toLowerCase()==="input"&&(_==="checkbox"||_==="radio")}function Fe(m){var _=we(m)?"checked":"value",L=Object.getOwnPropertyDescriptor(m.constructor.prototype,_),Q=""+m[_];if(!m.hasOwnProperty(_)&&typeof L<"u"&&typeof L.get=="function"&&typeof L.set=="function"){var le=L.get,me=L.set;return Object.defineProperty(m,_,{configurable:!0,get:function(){return le.call(this)},set:function(Xe){Q=""+Xe,me.call(this,Xe)}}),Object.defineProperty(m,_,{enumerable:L.enumerable}),{getValue:function(){return Q},setValue:function(Xe){Q=""+Xe},stopTracking:function(){m._valueTracker=null,delete m[_]}}}}function tt(m){m._valueTracker||(m._valueTracker=Fe(m))}function mt(m){if(!m)return!1;var _=m._valueTracker;if(!_)return!0;var L=_.getValue(),Q="";return m&&(Q=we(m)?m.checked?"true":"false":m.value),m=Q,m!==L?(_.setValue(m),!0):!1}function bt(m){if(m=m||(typeof document<"u"?document:void 0),typeof m>"u")return null;try{return m.activeElement||m.body}catch{return m.body}}function Lt(m,_){var L=_.checked;return Ue({},_,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:L??m._wrapperState.initialChecked})}function Vt(m,_){var L=_.defaultValue==null?"":_.defaultValue,Q=_.checked!=null?_.checked:_.defaultChecked;L=Ke(_.value!=null?_.value:L),m._wrapperState={initialChecked:Q,initialValue:L,controlled:_.type==="checkbox"||_.type==="radio"?_.checked!=null:_.value!=null}}function rn(m,_){_=_.checked,_!=null&&ee(m,"checked",_,!1)}function Sn(m,_){rn(m,_);var L=Ke(_.value),Q=_.type;if(L!=null)Q==="number"?(L===0&&m.value===""||m.value!=L)&&(m.value=""+L):m.value!==""+L&&(m.value=""+L);else if(Q==="submit"||Q==="reset"){m.removeAttribute("value");return}_.hasOwnProperty("value")?Bn(m,_.type,L):_.hasOwnProperty("defaultValue")&&Bn(m,_.type,Ke(_.defaultValue)),_.checked==null&&_.defaultChecked!=null&&(m.defaultChecked=!!_.defaultChecked)}function Ar(m,_,L){if(_.hasOwnProperty("value")||_.hasOwnProperty("defaultValue")){var Q=_.type;if(!(Q!=="submit"&&Q!=="reset"||_.value!==void 0&&_.value!==null))return;_=""+m._wrapperState.initialValue,L||_===m.value||(m.value=_),m.defaultValue=_}L=m.name,L!==""&&(m.name=""),m.defaultChecked=!!m._wrapperState.initialChecked,L!==""&&(m.name=L)}function Bn(m,_,L){(_!=="number"||bt(m.ownerDocument)!==m)&&(L==null?m.defaultValue=""+m._wrapperState.initialValue:m.defaultValue!==""+L&&(m.defaultValue=""+L))}var ar=Array.isArray;function Cr(m,_,L,Q){if(m=m.options,_){_={};for(var le=0;le<L.length;le++)_["$"+L[le]]=!0;for(L=0;L<m.length;L++)le=_.hasOwnProperty("$"+m[L].value),m[L].selected!==le&&(m[L].selected=le),le&&Q&&(m[L].defaultSelected=!0)}else{for(L=""+Ke(L),_=null,le=0;le<m.length;le++){if(m[le].value===L){m[le].selected=!0,Q&&(m[le].defaultSelected=!0);return}_!==null||m[le].disabled||(_=m[le])}_!==null&&(_.selected=!0)}}function br(m,_){if(_.dangerouslySetInnerHTML!=null)throw Error(e(91));return Ue({},_,{value:void 0,defaultValue:void 0,children:""+m._wrapperState.initialValue})}function _r(m,_){var L=_.value;if(L==null){if(L=_.children,_=_.defaultValue,L!=null){if(_!=null)throw Error(e(92));if(ar(L)){if(1<L.length)throw Error(e(93));L=L[0]}_=L}_==null&&(_=""),L=_}m._wrapperState={initialValue:Ke(L)}}function Jr(m,_){var L=Ke(_.value),Q=Ke(_.defaultValue);L!=null&&(L=""+L,L!==m.value&&(m.value=L),_.defaultValue==null&&m.defaultValue!==L&&(m.defaultValue=L)),Q!=null&&(m.defaultValue=""+Q)}function wr(m){var _=m.textContent;_===m._wrapperState.initialValue&&_!==""&&_!==null&&(m.value=_)}function hi(m){switch(m){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 Ye(m,_){return m==null||m==="http://www.w3.org/1999/xhtml"?hi(_):m==="http://www.w3.org/2000/svg"&&_==="foreignObject"?"http://www.w3.org/1999/xhtml":m}var de,pe=function(m){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(_,L,Q,le){MSApp.execUnsafeLocalFunction(function(){return m(_,L,Q,le)})}:m}(function(m,_){if(m.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in m)m.innerHTML=_;else{for(de=de||document.createElement("div"),de.innerHTML="<svg>"+_.valueOf().toString()+"</svg>",_=de.firstChild;m.firstChild;)m.removeChild(m.firstChild);for(;_.firstChild;)m.appendChild(_.firstChild)}});function Je(m,_){if(_){var L=m.firstChild;if(L&&L===m.lastChild&&L.nodeType===3){L.nodeValue=_;return}}m.textContent=_}var kt={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},Xt=["Webkit","ms","Moz","O"];Object.keys(kt).forEach(function(m){Xt.forEach(function(_){_=_+m.charAt(0).toUpperCase()+m.substring(1),kt[_]=kt[m]})});function it(m,_,L){return _==null||typeof _=="boolean"||_===""?"":L||typeof _!="number"||_===0||kt.hasOwnProperty(m)&&kt[m]?(""+_).trim():_+"px"}function Ut(m,_){m=m.style;for(var L in _)if(_.hasOwnProperty(L)){var Q=L.indexOf("--")===0,le=it(L,_[L],Q);L==="float"&&(L="cssFloat"),Q?m.setProperty(L,le):m[L]=le}}var qe=Ue({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 fe(m,_){if(_){if(qe[m]&&(_.children!=null||_.dangerouslySetInnerHTML!=null))throw Error(e(137,m));if(_.dangerouslySetInnerHTML!=null){if(_.children!=null)throw Error(e(60));if(typeof _.dangerouslySetInnerHTML!="object"||!("__html"in _.dangerouslySetInnerHTML))throw Error(e(61))}if(_.style!=null&&typeof _.style!="object")throw Error(e(62))}}function xe(m,_){if(m.indexOf("-")===-1)return typeof _.is=="string";switch(m){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var p=null;function Qe(m){return m=m.target||m.srcElement||window,m.correspondingUseElement&&(m=m.correspondingUseElement),m.nodeType===3?m.parentNode:m}var pt=null,ft=null,Et=null;function Ct(m){if(m=Li(m)){if(typeof pt!="function")throw Error(e(280));var _=m.stateNode;_&&(_=Ma(_),pt(m.stateNode,m.type,_))}}function nn(m){ft?Et?Et.push(m):Et=[m]:ft=m}function Yt(){if(ft){var m=ft,_=Et;if(Et=ft=null,Ct(m),_)for(m=0;m<_.length;m++)Ct(_[m])}}function Gt(m,_){return m(_)}function wt(){}var Tn=!1;function En(m,_,L){if(Tn)return m(_,L);Tn=!0;try{return Gt(m,_,L)}finally{Tn=!1,(ft!==null||Et!==null)&&(wt(),Yt())}}function sr(m,_){var L=m.stateNode;if(L===null)return null;var Q=Ma(L);if(Q===null)return null;L=Q[_];e:switch(_){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Q=!Q.disabled)||(m=m.type,Q=!(m==="button"||m==="input"||m==="select"||m==="textarea")),m=!Q;break e;default:m=!1}if(m)return null;if(L&&typeof L!="function")throw Error(e(231,_,typeof L));return L}var Pr=!1;if(a)try{var an={};Object.defineProperty(an,"passive",{get:function(){Pr=!0}}),window.addEventListener("test",an,an),window.removeEventListener("test",an,an)}catch{Pr=!1}function Wn(m,_,L,Q,le,me,Xe,Bt,Wt){var Cn=Array.prototype.slice.call(arguments,3);try{_.apply(L,Cn)}catch(nr){this.onError(nr)}}var ir=!1,zr=null,fr=!1,hr=null,zn={onError:function(m){ir=!0,zr=m}};function Pi(m,_,L,Q,le,me,Xe,Bt,Wt){ir=!1,zr=null,Wn.apply(zn,arguments)}function po(m,_,L,Q,le,me,Xe,Bt,Wt){if(Pi.apply(this,arguments),ir){if(ir){var Cn=zr;ir=!1,zr=null}else throw Error(e(198));fr||(fr=!0,hr=Cn)}}function ri(m){var _=m,L=m;if(m.alternate)for(;_.return;)_=_.return;else{m=_;do _=m,_.flags&4098&&(L=_.return),m=_.return;while(m)}return _.tag===3?L:null}function Xr(m){if(m.tag===13){var _=m.memoizedState;if(_===null&&(m=m.alternate,m!==null&&(_=m.memoizedState)),_!==null)return _.dehydrated}return null}function ii(m){if(ri(m)!==m)throw Error(e(188))}function mo(m){var _=m.alternate;if(!_){if(_=ri(m),_===null)throw Error(e(188));return _!==m?null:m}for(var L=m,Q=_;;){var le=L.return;if(le===null)break;var me=le.alternate;if(me===null){if(Q=le.return,Q!==null){L=Q;continue}break}if(le.child===me.child){for(me=le.child;me;){if(me===L)return ii(le),m;if(me===Q)return ii(le),_;me=me.sibling}throw Error(e(188))}if(L.return!==Q.return)L=le,Q=me;else{for(var Xe=!1,Bt=le.child;Bt;){if(Bt===L){Xe=!0,L=le,Q=me;break}if(Bt===Q){Xe=!0,Q=le,L=me;break}Bt=Bt.sibling}if(!Xe){for(Bt=me.child;Bt;){if(Bt===L){Xe=!0,L=me,Q=le;break}if(Bt===Q){Xe=!0,Q=me,L=le;break}Bt=Bt.sibling}if(!Xe)throw Error(e(189))}}if(L.alternate!==Q)throw Error(e(190))}if(L.tag!==3)throw Error(e(188));return L.stateNode.current===L?m:_}function Mi(m){return m=mo(m),m!==null?ka(m):null}function ka(m){if(m.tag===5||m.tag===6)return m;for(m=m.child;m!==null;){var _=ka(m);if(_!==null)return _;m=m.sibling}return null}var ns=t.unstable_scheduleCallback,wo=t.unstable_cancelCallback,Ua=t.unstable_shouldYield,Ya=t.unstable_requestPaint,Vi=t.unstable_now,Rl=t.unstable_getCurrentPriorityLevel,Ps=t.unstable_ImmediatePriority,ki=t.unstable_UserBlockingPriority,Mr=t.unstable_NormalPriority,ms=t.unstable_LowPriority,oa=t.unstable_IdlePriority,ba=null,Ge=null;function _t(m){if(Ge&&typeof Ge.onCommitFiberRoot=="function")try{Ge.onCommitFiberRoot(ba,m,void 0,(m.current.flags&128)===128)}catch{}}var cn=Math.clz32?Math.clz32:Qn,jn=Math.log,An=Math.LN2;function Qn(m){return m>>>=0,m===0?32:31-(jn(m)/An|0)|0}var _i=64,Ki=4194304;function Xi(m){switch(m&-m){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 m&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return m&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return m}}function aa(m,_){var L=m.pendingLanes;if(L===0)return 0;var Q=0,le=m.suspendedLanes,me=m.pingedLanes,Xe=L&268435455;if(Xe!==0){var Bt=Xe&~le;Bt!==0?Q=Xi(Bt):(me&=Xe,me!==0&&(Q=Xi(me)))}else Xe=L&~le,Xe!==0?Q=Xi(Xe):me!==0&&(Q=Xi(me));if(Q===0)return 0;if(_!==0&&_!==Q&&!(_&le)&&(le=Q&-Q,me=_&-_,le>=me||le===16&&(me&4194240)!==0))return _;if(Q&4&&(Q|=L&16),_=m.entangledLanes,_!==0)for(m=m.entanglements,_&=Q;0<_;)L=31-cn(_),le=1<<L,Q|=m[L],_&=~le;return Q}function Mu(m,_){switch(m){case 1:case 2:case 4:return _+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 _+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 Hr(m,_){for(var L=m.suspendedLanes,Q=m.pingedLanes,le=m.expirationTimes,me=m.pendingLanes;0<me;){var Xe=31-cn(me),Bt=1<<Xe,Wt=le[Xe];Wt===-1?(!(Bt&L)||Bt&Q)&&(le[Xe]=Mu(Bt,_)):Wt<=_&&(m.expiredLanes|=Bt),me&=~Bt}}function ci(m){return m=m.pendingLanes&-1073741825,m!==0?m:m&1073741824?1073741824:0}function rs(){var m=_i;return _i<<=1,!(_i&4194240)&&(_i=64),m}function Ai(m){for(var _=[],L=0;31>L;L++)_.push(m);return _}function As(m,_,L){m.pendingLanes|=_,_!==536870912&&(m.suspendedLanes=0,m.pingedLanes=0),m=m.eventTimes,_=31-cn(_),m[_]=L}function Ju(m,_){var L=m.pendingLanes&~_;m.pendingLanes=_,m.suspendedLanes=0,m.pingedLanes=0,m.expiredLanes&=_,m.mutableReadLanes&=_,m.entangledLanes&=_,_=m.entanglements;var Q=m.eventTimes;for(m=m.expirationTimes;0<L;){var le=31-cn(L),me=1<<le;_[le]=0,Q[le]=-1,m[le]=-1,L&=~me}}function sa(m,_){var L=m.entangledLanes|=_;for(m=m.entanglements;L;){var Q=31-cn(L),le=1<<Q;le&_|m[Q]&_&&(m[Q]|=_),L&=~le}}var kr=0;function Oi(m){return m&=-m,1<m?4<m?m&268435455?16:536870912:4:1}var Qs,Ta,Mo,ja,au,Dl=!1,ea=[],$a=null,co=null,pa=null,xa=new Map,qs=new Map,Pa=[],Cl="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 eA(m,_){switch(m){case"focusin":case"focusout":$a=null;break;case"dragenter":case"dragleave":co=null;break;case"mouseover":case"mouseout":pa=null;break;case"pointerover":case"pointerout":xa.delete(_.pointerId);break;case"gotpointercapture":case"lostpointercapture":qs.delete(_.pointerId)}}function Ji(m,_,L,Q,le,me){return m===null||m.nativeEvent!==me?(m={blockedOn:_,domEventName:L,eventSystemFlags:Q,nativeEvent:me,targetContainers:[le]},_!==null&&(_=Li(_),_!==null&&Ta(_)),m):(m.eventSystemFlags|=Q,_=m.targetContainers,le!==null&&_.indexOf(le)===-1&&_.push(le),m)}function $l(m,_,L,Q,le){switch(_){case"focusin":return $a=Ji($a,m,_,L,Q,le),!0;case"dragenter":return co=Ji(co,m,_,L,Q,le),!0;case"mouseover":return pa=Ji(pa,m,_,L,Q,le),!0;case"pointerover":var me=le.pointerId;return xa.set(me,Ji(xa.get(me)||null,m,_,L,Q,le)),!0;case"gotpointercapture":return me=le.pointerId,qs.set(me,Ji(qs.get(me)||null,m,_,L,Q,le)),!0}return!1}function zi(m){var _=Eo(m.target);if(_!==null){var L=ri(_);if(L!==null){if(_=L.tag,_===13){if(_=Xr(L),_!==null){m.blockedOn=_,au(m.priority,function(){Mo(L)});return}}else if(_===3&&L.stateNode.current.memoizedState.isDehydrated){m.blockedOn=L.tag===3?L.stateNode.containerInfo:null;return}}}m.blockedOn=null}function Zr(m){if(m.blockedOn!==null)return!1;for(var _=m.targetContainers;0<_.length;){var L=si(m.domEventName,m.eventSystemFlags,_[0],m.nativeEvent);if(L===null){L=m.nativeEvent;var Q=new L.constructor(L.type,L);p=Q,L.target.dispatchEvent(Q),p=null}else return _=Li(L),_!==null&&Ta(_),m.blockedOn=L,!1;_.shift()}return!0}function Vl(m,_,L){Zr(m)&&L.delete(_)}function Wi(){Dl=!1,$a!==null&&Zr($a)&&($a=null),co!==null&&Zr(co)&&(co=null),pa!==null&&Zr(pa)&&(pa=null),xa.forEach(Vl),qs.forEach(Vl)}function lo(m,_){m.blockedOn===_&&(m.blockedOn=null,Dl||(Dl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Wi)))}function Di(m){function _(le){return lo(le,m)}if(0<ea.length){lo(ea[0],m);for(var L=1;L<ea.length;L++){var Q=ea[L];Q.blockedOn===m&&(Q.blockedOn=null)}}for($a!==null&&lo($a,m),co!==null&&lo(co,m),pa!==null&&lo(pa,m),xa.forEach(_),qs.forEach(_),L=0;L<Pa.length;L++)Q=Pa[L],Q.blockedOn===m&&(Q.blockedOn=null);for(;0<Pa.length&&(L=Pa[0],L.blockedOn===null);)zi(L),L.blockedOn===null&&Pa.shift()}var te=J.ReactCurrentBatchConfig,Ee=!0;function ot(m,_,L,Q){var le=kr,me=te.transition;te.transition=null;try{kr=1,Sr(m,_,L,Q)}finally{kr=le,te.transition=me}}function $t(m,_,L,Q){var le=kr,me=te.transition;te.transition=null;try{kr=4,Sr(m,_,L,Q)}finally{kr=le,te.transition=me}}function Sr(m,_,L,Q){if(Ee){var le=si(m,_,L,Q);if(le===null)Gd(m,_,Q,Nn,L),eA(m,Q);else if($l(le,m,_,L,Q))Q.stopPropagation();else if(eA(m,Q),_&4&&-1<Cl.indexOf(m)){for(;le!==null;){var me=Li(le);if(me!==null&&Qs(me),me=si(m,_,L,Q),me===null&&Gd(m,_,Q,Nn,L),me===le)break;le=me}le!==null&&Q.stopPropagation()}else Gd(m,_,Q,null,L)}}var Nn=null;function si(m,_,L,Q){if(Nn=null,m=Qe(Q),m=Eo(m),m!==null)if(_=ri(m),_===null)m=null;else if(L=_.tag,L===13){if(m=Xr(_),m!==null)return m;m=null}else if(L===3){if(_.stateNode.current.memoizedState.isDehydrated)return _.tag===3?_.stateNode.containerInfo:null;m=null}else _!==m&&(m=null);return Nn=m,null}function fi(m){switch(m){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(Rl()){case Ps:return 1;case ki:return 4;case Mr:case ms:return 16;case oa:return 536870912;default:return 16}default:return 16}}var pr=null,Er=null,Ci=null;function So(){if(Ci)return Ci;var m,_=Er,L=_.length,Q,le="value"in pr?pr.value:pr.textContent,me=le.length;for(m=0;m<L&&_[m]===le[m];m++);var Xe=L-m;for(Q=1;Q<=Xe&&_[L-Q]===le[me-Q];Q++);return Ci=le.slice(m,1<Q?1-Q:void 0)}function Ri(m){var _=m.keyCode;return"charCode"in m?(m=m.charCode,m===0&&_===13&&(m=13)):m=_,m===10&&(m=13),32<=m||m===13?m:0}function Nr(){return!0}function eo(){return!1}function to(m){function _(L,Q,le,me,Xe){this._reactName=L,this._targetInst=le,this.type=Q,this.nativeEvent=me,this.target=Xe,this.currentTarget=null;for(var Bt in m)m.hasOwnProperty(Bt)&&(L=m[Bt],this[Bt]=L?L(me):me[Bt]);return this.isDefaultPrevented=(me.defaultPrevented!=null?me.defaultPrevented:me.returnValue===!1)?Nr:eo,this.isPropagationStopped=eo,this}return Ue(_.prototype,{preventDefault:function(){this.defaultPrevented=!0;var L=this.nativeEvent;L&&(L.preventDefault?L.preventDefault():typeof L.returnValue!="unknown"&&(L.returnValue=!1),this.isDefaultPrevented=Nr)},stopPropagation:function(){var L=this.nativeEvent;L&&(L.stopPropagation?L.stopPropagation():typeof L.cancelBubble!="unknown"&&(L.cancelBubble=!0),this.isPropagationStopped=Nr)},persist:function(){},isPersistent:Nr}),_}var la={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(m){return m.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gs=to(la),Ks=Ue({},la,{view:0,detail:0}),su=to(Ks),Va,ac,ws,rl=Ue({},Ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ch,button:0,buttons:0,relatedTarget:function(m){return m.relatedTarget===void 0?m.fromElement===m.srcElement?m.toElement:m.fromElement:m.relatedTarget},movementX:function(m){return"movementX"in m?m.movementX:(m!==ws&&(ws&&m.type==="mousemove"?(Va=m.screenX-ws.screenX,ac=m.screenY-ws.screenY):ac=Va=0,ws=m),Va)},movementY:function(m){return"movementY"in m?m.movementY:ac}}),Xc=to(rl),Su=Ue({},rl,{dataTransfer:0}),Eu=to(Su),Ah=Ue({},Ks,{relatedTarget:0}),wa=to(Ah),Ou=Ue({},la,{animationName:0,elapsedTime:0,pseudoElement:0}),Jc=to(Ou),Hf=Ue({},la,{clipboardData:function(m){return"clipboardData"in m?m.clipboardData:window.clipboardData}}),tA=to(Hf),Dd=Ue({},la,{data:0}),Bc=to(Dd),Zf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gf={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"},sc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ha(m){var _=this.nativeEvent;return _.getModifierState?_.getModifierState(m):(m=sc[m])?!!_[m]:!1}function ch(){return Ha}var Fh=Ue({},Ks,{key:function(m){if(m.key){var _=Zf[m.key]||m.key;if(_!=="Unidentified")return _}return m.type==="keypress"?(m=Ri(m),m===13?"Enter":String.fromCharCode(m)):m.type==="keydown"||m.type==="keyup"?gf[m.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ch,charCode:function(m){return m.type==="keypress"?Ri(m):0},keyCode:function(m){return m.type==="keydown"||m.type==="keyup"?m.keyCode:0},which:function(m){return m.type==="keypress"?Ri(m):m.type==="keydown"||m.type==="keyup"?m.keyCode:0}}),ed=to(Fh),Uh=Ue({},rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),td=to(Uh),lc=Ue({},Ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ch}),dh=to(lc),hh=Ue({},la,{propertyName:0,elapsedTime:0,pseudoElement:0}),nd=to(hh),Dp=Ue({},rl,{deltaX:function(m){return"deltaX"in m?m.deltaX:"wheelDeltaX"in m?-m.wheelDeltaX:0},deltaY:function(m){return"deltaY"in m?m.deltaY:"wheelDeltaY"in m?-m.wheelDeltaY:"wheelDelta"in m?-m.wheelDelta:0},deltaZ:0,deltaMode:0}),Ic=to(Dp),lu=[9,13,27,32],fh=a&&"CompositionEvent"in window,uu=null;a&&"documentMode"in document&&(uu=document.documentMode);var nA=a&&"TextEvent"in window&&!uu,kc=a&&(!fh||uu&&8<uu&&11>=uu),Ld=" ",jh=!1;function Hl(m,_){switch(m){case"keyup":return lu.indexOf(_.keyCode)!==-1;case"keydown":return _.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bl(m){return m=m.detail,typeof m=="object"&&"data"in m?m.data:null}var FA=!1;function Tc(m,_){switch(m){case"compositionend":return bl(_);case"keypress":return _.which!==32?null:(jh=!0,Ld);case"textInput":return m=_.data,m===Ld&&jh?null:m;default:return null}}function zh(m,_){if(FA)return m==="compositionend"||!fh&&Hl(m,_)?(m=So(),Ci=Er=pr=null,FA=!1,m):null;switch(m){case"paste":return null;case"keypress":if(!(_.ctrlKey||_.altKey||_.metaKey)||_.ctrlKey&&_.altKey){if(_.char&&1<_.char.length)return _.char;if(_.which)return String.fromCharCode(_.which)}return null;case"compositionend":return kc&&_.locale!=="ko"?null:_.data;default:return null}}var yf={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 rd(m){var _=m&&m.nodeName&&m.nodeName.toLowerCase();return _==="input"?!!yf[m.type]:_==="textarea"}function fA(m,_,L,Q){nn(Q),_=hc(_,"onChange"),0<_.length&&(L=new gs("onChange","change",null,L,Q),m.push({event:L,listeners:_}))}var Ys=null,xl=null;function Yo(m){Nd(m,0)}function ph(m){var _=Wr(m);if(mt(_))return m}function Lp(m,_){if(m==="change")return _}var Pc=!1;if(a){var Bu;if(a){var Fd="oninput"in document;if(!Fd){var Ud=document.createElement("div");Ud.setAttribute("oninput","return;"),Fd=typeof Ud.oninput=="function"}Bu=Fd}else Bu=!1;Pc=Bu&&(!document.documentMode||9<document.documentMode)}function uc(){Ys&&(Ys.detachEvent("onpropertychange",jd),xl=Ys=null)}function jd(m){if(m.propertyName==="value"&&ph(xl)){var _=[];fA(_,xl,m,Qe(m)),En(Yo,_)}}function Nh(m,_,L){m==="focusin"?(uc(),Ys=_,xl=L,Ys.attachEvent("onpropertychange",jd)):m==="focusout"&&uc()}function Ac(m){if(m==="selectionchange"||m==="keyup"||m==="keydown")return ph(xl)}function Au(m,_){if(m==="click")return ph(_)}function Ht(m,_){if(m==="input"||m==="change")return ph(_)}function Pn(m,_){return m===_&&(m!==0||1/m===1/_)||m!==m&&_!==_}var sn=typeof Object.is=="function"?Object.is:Pn;function Kr(m,_){if(sn(m,_))return!0;if(typeof m!="object"||m===null||typeof _!="object"||_===null)return!1;var L=Object.keys(m),Q=Object.keys(_);if(L.length!==Q.length)return!1;for(Q=0;Q<L.length;Q++){var le=L[Q];if(!f.call(_,le)||!sn(m[le],_[le]))return!1}return!0}function bi(m){for(;m&&m.firstChild;)m=m.firstChild;return m}function Co(m,_){var L=bi(m);m=0;for(var Q;L;){if(L.nodeType===3){if(Q=m+L.textContent.length,m<=_&&Q>=_)return{node:L,offset:_-m};m=Q}e:{for(;L;){if(L.nextSibling){L=L.nextSibling;break e}L=L.parentNode}L=void 0}L=bi(L)}}function is(m,_){return m&&_?m===_?!0:m&&m.nodeType===3?!1:_&&_.nodeType===3?is(m,_.parentNode):"contains"in m?m.contains(_):m.compareDocumentPosition?!!(m.compareDocumentPosition(_)&16):!1:!1}function $o(){for(var m=window,_=bt();_ instanceof m.HTMLIFrameElement;){try{var L=typeof _.contentWindow.location.href=="string"}catch{L=!1}if(L)m=_.contentWindow;else break;_=bt(m.document)}return _}function UA(m){var _=m&&m.nodeName&&m.nodeName.toLowerCase();return _&&(_==="input"&&(m.type==="text"||m.type==="search"||m.type==="tel"||m.type==="url"||m.type==="password")||_==="textarea"||m.contentEditable==="true")}function Xf(m){var _=$o(),L=m.focusedElem,Q=m.selectionRange;if(_!==L&&L&&L.ownerDocument&&is(L.ownerDocument.documentElement,L)){if(Q!==null&&UA(L)){if(_=Q.start,m=Q.end,m===void 0&&(m=_),"selectionStart"in L)L.selectionStart=_,L.selectionEnd=Math.min(m,L.value.length);else if(m=(_=L.ownerDocument||document)&&_.defaultView||window,m.getSelection){m=m.getSelection();var le=L.textContent.length,me=Math.min(Q.start,le);Q=Q.end===void 0?me:Math.min(Q.end,le),!m.extend&&me>Q&&(le=Q,Q=me,me=le),le=Co(L,me);var Xe=Co(L,Q);le&&Xe&&(m.rangeCount!==1||m.anchorNode!==le.node||m.anchorOffset!==le.offset||m.focusNode!==Xe.node||m.focusOffset!==Xe.offset)&&(_=_.createRange(),_.setStart(le.node,le.offset),m.removeAllRanges(),me>Q?(m.addRange(_),m.extend(Xe.node,Xe.offset)):(_.setEnd(Xe.node,Xe.offset),m.addRange(_)))}}for(_=[],m=L;m=m.parentNode;)m.nodeType===1&&_.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<_.length;L++)m=_[L],m.element.scrollLeft=m.left,m.element.scrollTop=m.top}}var wl=a&&"documentMode"in document&&11>=document.documentMode,cu=null,jA=null,Ml=null,Qi=!1;function zA(m,_,L){var Q=L.window===L?L.document:L.nodeType===9?L:L.ownerDocument;Qi||cu==null||cu!==bt(Q)||(Q=cu,"selectionStart"in Q&&UA(Q)?Q={start:Q.selectionStart,end:Q.selectionEnd}:(Q=(Q.ownerDocument&&Q.ownerDocument.defaultView||window).getSelection(),Q={anchorNode:Q.anchorNode,anchorOffset:Q.anchorOffset,focusNode:Q.focusNode,focusOffset:Q.focusOffset}),Ml&&Kr(Ml,Q)||(Ml=Q,Q=hc(jA,"onSelect"),0<Q.length&&(_=new gs("onSelect","select",null,_,L),m.push({event:_,listeners:Q}),_.target=cu)))}function Fo(m,_){var L={};return L[m.toLowerCase()]=_.toLowerCase(),L["Webkit"+m]="webkit"+_,L["Moz"+m]="moz"+_,L}var Kc={animationend:Fo("Animation","AnimationEnd"),animationiteration:Fo("Animation","AnimationIteration"),animationstart:Fo("Animation","AnimationStart"),transitionend:Fo("Transition","TransitionEnd")},NA={},pA={};a&&(pA=document.createElement("div").style,"AnimationEvent"in window||(delete Kc.animationend.animation,delete Kc.animationiteration.animation,delete Kc.animationstart.animation),"TransitionEvent"in window||delete Kc.transitionend.transition);function rA(m){if(NA[m])return NA[m];if(!Kc[m])return m;var _=Kc[m],L;for(L in _)if(_.hasOwnProperty(L)&&L in pA)return NA[m]=_[L];return m}var Sl=rA("animationend"),cc=rA("animationiteration"),du=rA("animationstart"),Ll=rA("transitionend"),Rc=new Map,zd="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 Rs(m,_){Rc.set(m,_),o(_,[m])}for(var id=0;id<zd.length;id++){var dc=zd[id],GA=dc.toLowerCase(),Gh=dc[0].toUpperCase()+dc.slice(1);Rs(GA,"on"+Gh)}Rs(Sl,"onAnimationEnd"),Rs(cc,"onAnimationIteration"),Rs(du,"onAnimationStart"),Rs("dblclick","onDoubleClick"),Rs("focusin","onFocus"),Rs("focusout","onBlur"),Rs(Ll,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mA="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(" "),WA=new Set("cancel close invalid load scroll toggle".split(" ").concat(mA));function Dc(m,_,L){var Q=m.type||"unknown-event";m.currentTarget=L,po(Q,_,void 0,m),m.currentTarget=null}function Nd(m,_){_=(_&4)!==0;for(var L=0;L<m.length;L++){var Q=m[L],le=Q.event;Q=Q.listeners;e:{var me=void 0;if(_)for(var Xe=Q.length-1;0<=Xe;Xe--){var Bt=Q[Xe],Wt=Bt.instance,Cn=Bt.currentTarget;if(Bt=Bt.listener,Wt!==me&&le.isPropagationStopped())break e;Dc(le,Bt,Cn),me=Wt}else for(Xe=0;Xe<Q.length;Xe++){if(Bt=Q[Xe],Wt=Bt.instance,Cn=Bt.currentTarget,Bt=Bt.listener,Wt!==me&&le.isPropagationStopped())break e;Dc(le,Bt,Cn),me=Wt}}}if(fr)throw m=hr,fr=!1,hr=null,m}function Vo(m,_){var L=_[jc];L===void 0&&(L=_[jc]=new Set);var Q=m+"__bubble";L.has(Q)||(Fc(_,m,2,!1),L.add(Q))}function Lc(m,_,L){var Q=0;_&&(Q|=4),Fc(L,m,Q,_)}var QA="_reactListening"+Math.random().toString(36).slice(2);function Iu(m){if(!m[QA]){m[QA]=!0,n.forEach(function(L){L!=="selectionchange"&&(WA.has(L)||Lc(L,!1,m),Lc(L,!0,m))});var _=m.nodeType===9?m:m.ownerDocument;_===null||_[QA]||(_[QA]=!0,Lc("selectionchange",!1,_))}}function Fc(m,_,L,Q){switch(fi(_)){case 1:var le=ot;break;case 4:le=$t;break;default:le=Sr}L=le.bind(null,_,L,m),le=void 0,!Pr||_!=="touchstart"&&_!=="touchmove"&&_!=="wheel"||(le=!0),Q?le!==void 0?m.addEventListener(_,L,{capture:!0,passive:le}):m.addEventListener(_,L,!0):le!==void 0?m.addEventListener(_,L,{passive:le}):m.addEventListener(_,L,!1)}function Gd(m,_,L,Q,le){var me=Q;if(!(_&1)&&!(_&2)&&Q!==null)e:for(;;){if(Q===null)return;var Xe=Q.tag;if(Xe===3||Xe===4){var Bt=Q.stateNode.containerInfo;if(Bt===le||Bt.nodeType===8&&Bt.parentNode===le)break;if(Xe===4)for(Xe=Q.return;Xe!==null;){var Wt=Xe.tag;if((Wt===3||Wt===4)&&(Wt=Xe.stateNode.containerInfo,Wt===le||Wt.nodeType===8&&Wt.parentNode===le))return;Xe=Xe.return}for(;Bt!==null;){if(Xe=Eo(Bt),Xe===null)return;if(Wt=Xe.tag,Wt===5||Wt===6){Q=me=Xe;continue e}Bt=Bt.parentNode}}Q=Q.return}En(function(){var Cn=me,nr=Qe(L),ur=[];e:{var $n=Rc.get(m);if($n!==void 0){var Rr=gs,oi=m;switch(m){case"keypress":if(Ri(L)===0)break e;case"keydown":case"keyup":Rr=ed;break;case"focusin":oi="focus",Rr=wa;break;case"focusout":oi="blur",Rr=wa;break;case"beforeblur":case"afterblur":Rr=wa;break;case"click":if(L.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Rr=Xc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Rr=Eu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Rr=dh;break;case Sl:case cc:case du:Rr=Jc;break;case Ll:Rr=nd;break;case"scroll":Rr=su;break;case"wheel":Rr=Ic;break;case"copy":case"cut":case"paste":Rr=tA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Rr=td}var ui=(_&4)!==0,Xs=!ui&&m==="scroll",ln=ui?$n!==null?$n+"Capture":null:$n;ui=[];for(var en=Cn,dn;en!==null;){dn=en;var mr=dn.stateNode;if(dn.tag===5&&mr!==null&&(dn=mr,ln!==null&&(mr=sr(en,ln),mr!=null&&ui.push(Uc(en,mr,dn)))),Xs)break;en=en.return}0<ui.length&&($n=new Rr($n,oi,null,L,nr),ur.push({event:$n,listeners:ui}))}}if(!(_&7)){e:{if($n=m==="mouseover"||m==="pointerover",Rr=m==="mouseout"||m==="pointerout",$n&&L!==p&&(oi=L.relatedTarget||L.fromElement)&&(Eo(oi)||oi[hu]))break e;if((Rr||$n)&&($n=nr.window===nr?nr:($n=nr.ownerDocument)?$n.defaultView||$n.parentWindow:window,Rr?(oi=L.relatedTarget||L.toElement,Rr=Cn,oi=oi?Eo(oi):null,oi!==null&&(Xs=ri(oi),oi!==Xs||oi.tag!==5&&oi.tag!==6)&&(oi=null)):(Rr=null,oi=Cn),Rr!==oi)){if(ui=Xc,mr="onMouseLeave",ln="onMouseEnter",en="mouse",(m==="pointerout"||m==="pointerover")&&(ui=td,mr="onPointerLeave",ln="onPointerEnter",en="pointer"),Xs=Rr==null?$n:Wr(Rr),dn=oi==null?$n:Wr(oi),$n=new ui(mr,en+"leave",Rr,L,nr),$n.target=Xs,$n.relatedTarget=dn,mr=null,Eo(nr)===Cn&&(ui=new ui(ln,en+"enter",oi,L,nr),ui.target=dn,ui.relatedTarget=Xs,mr=ui),Xs=mr,Rr&&oi)t:{for(ui=Rr,ln=oi,en=0,dn=ui;dn;dn=ua(dn))en++;for(dn=0,mr=ln;mr;mr=ua(mr))dn++;for(;0<en-dn;)ui=ua(ui),en--;for(;0<dn-en;)ln=ua(ln),dn--;for(;en--;){if(ui===ln||ln!==null&&ui===ln.alternate)break t;ui=ua(ui),ln=ua(ln)}ui=null}else ui=null;Rr!==null&&Uo(ur,$n,Rr,ui,!1),oi!==null&&Xs!==null&&Uo(ur,Xs,oi,ui,!0)}}e:{if($n=Cn?Wr(Cn):window,Rr=$n.nodeName&&$n.nodeName.toLowerCase(),Rr==="select"||Rr==="input"&&$n.type==="file")var ni=Lp;else if(rd($n))if(Pc)ni=Ht;else{ni=Ac;var Ti=Nh}else(Rr=$n.nodeName)&&Rr.toLowerCase()==="input"&&($n.type==="checkbox"||$n.type==="radio")&&(ni=Au);if(ni&&(ni=ni(m,Cn))){fA(ur,ni,L,nr);break e}Ti&&Ti(m,$n,Cn),m==="focusout"&&(Ti=$n._wrapperState)&&Ti.controlled&&$n.type==="number"&&Bn($n,"number",$n.value)}switch(Ti=Cn?Wr(Cn):window,m){case"focusin":(rd(Ti)||Ti.contentEditable==="true")&&(cu=Ti,jA=Cn,Ml=null);break;case"focusout":Ml=jA=cu=null;break;case"mousedown":Qi=!0;break;case"contextmenu":case"mouseup":case"dragend":Qi=!1,zA(ur,L,nr);break;case"selectionchange":if(wl)break;case"keydown":case"keyup":zA(ur,L,nr)}var Ii;if(fh)e:{switch(m){case"compositionstart":var Ni="onCompositionStart";break e;case"compositionend":Ni="onCompositionEnd";break e;case"compositionupdate":Ni="onCompositionUpdate";break e}Ni=void 0}else FA?Hl(m,L)&&(Ni="onCompositionEnd"):m==="keydown"&&L.keyCode===229&&(Ni="onCompositionStart");Ni&&(kc&&L.locale!=="ko"&&(FA||Ni!=="onCompositionStart"?Ni==="onCompositionEnd"&&FA&&(Ii=So()):(pr=nr,Er="value"in pr?pr.value:pr.textContent,FA=!0)),Ti=hc(Cn,Ni),0<Ti.length&&(Ni=new Bc(Ni,m,null,L,nr),ur.push({event:Ni,listeners:Ti}),Ii?Ni.data=Ii:(Ii=bl(L),Ii!==null&&(Ni.data=Ii)))),(Ii=nA?Tc(m,L):zh(m,L))&&(Cn=hc(Cn,"onBeforeInput"),0<Cn.length&&(nr=new Bc("onBeforeInput","beforeinput",null,L,nr),ur.push({event:nr,listeners:Cn}),nr.data=Ii))}Nd(ur,_)})}function Uc(m,_,L){return{instance:m,listener:_,currentTarget:L}}function hc(m,_){for(var L=_+"Capture",Q=[];m!==null;){var le=m,me=le.stateNode;le.tag===5&&me!==null&&(le=me,me=sr(m,L),me!=null&&Q.unshift(Uc(m,me,le)),me=sr(m,_),me!=null&&Q.push(Uc(m,me,le))),m=m.return}return Q}function ua(m){if(m===null)return null;do m=m.return;while(m&&m.tag!==5);return m||null}function Uo(m,_,L,Q,le){for(var me=_._reactName,Xe=[];L!==null&&L!==Q;){var Bt=L,Wt=Bt.alternate,Cn=Bt.stateNode;if(Wt!==null&&Wt===Q)break;Bt.tag===5&&Cn!==null&&(Bt=Cn,le?(Wt=sr(L,me),Wt!=null&&Xe.unshift(Uc(L,Wt,Bt))):le||(Wt=sr(L,me),Wt!=null&&Xe.push(Uc(L,Wt,Bt)))),L=L.return}Xe.length!==0&&m.push({event:_,listeners:Xe})}var Aa=/\r\n?/g,vf=/\u0000|\uFFFD/g;function od(m){return(typeof m=="string"?m:""+m).replace(Aa,`
|
||
`).replace(vf,"")}function ad(m,_,L){if(_=od(_),od(m)!==_&&L)throw Error(e(425))}function ku(){}var qA=null,Fl=null;function gA(m,_){return m==="textarea"||m==="noscript"||typeof _.children=="string"||typeof _.children=="number"||typeof _.dangerouslySetInnerHTML=="object"&&_.dangerouslySetInnerHTML!==null&&_.dangerouslySetInnerHTML.__html!=null}var il=typeof setTimeout=="function"?setTimeout:void 0,YA=typeof clearTimeout=="function"?clearTimeout:void 0,Tu=typeof Promise=="function"?Promise:void 0,sd=typeof queueMicrotask=="function"?queueMicrotask:typeof Tu<"u"?function(m){return Tu.resolve(null).then(m).catch(Pu)}:il;function Pu(m){setTimeout(function(){throw m})}function Wd(m,_){var L=_,Q=0;do{var le=L.nextSibling;if(m.removeChild(L),le&&le.nodeType===8)if(L=le.data,L==="/$"){if(Q===0){m.removeChild(le),Di(_);return}Q--}else L!=="$"&&L!=="$?"&&L!=="$!"||Q++;L=le}while(L);Di(_)}function $A(m){for(;m!=null;m=m.nextSibling){var _=m.nodeType;if(_===1||_===3)break;if(_===8){if(_=m.data,_==="$"||_==="$!"||_==="$?")break;if(_==="/$")return null}}return m}function Ku(m){m=m.previousSibling;for(var _=0;m;){if(m.nodeType===8){var L=m.data;if(L==="$"||L==="$!"||L==="$?"){if(_===0)return m;_--}else L==="/$"&&_++}m=m.previousSibling}return null}var Ru=Math.random().toString(36).slice(2),yA="__reactFiber$"+Ru,fc="__reactProps$"+Ru,hu="__reactContainer$"+Ru,jc="__reactEvents$"+Ru,rt="__reactListeners$"+Ru,Ds="__reactHandles$"+Ru;function Eo(m){var _=m[yA];if(_)return _;for(var L=m.parentNode;L;){if(_=L[hu]||L[yA]){if(L=_.alternate,_.child!==null||L!==null&&L.child!==null)for(m=Ku(m);m!==null;){if(L=m[yA])return L;m=Ku(m)}return _}m=L,L=m.parentNode}return null}function Li(m){return m=m[yA]||m[hu],!m||m.tag!==5&&m.tag!==6&&m.tag!==13&&m.tag!==3?null:m}function Wr(m){if(m.tag===5||m.tag===6)return m.stateNode;throw Error(e(33))}function Ma(m){return m[fc]||null}var ld=[],Qd=-1;function Ms(m){return{current:m}}function za(m){0>Qd||(m.current=ld[Qd],ld[Qd]=null,Qd--)}function ya(m,_){Qd++,ld[Qd]=m.current,m.current=_}var iA={},Sa=Ms(iA),dr=Ms(!1),ys=iA;function zc(m,_){var L=m.type.contextTypes;if(!L)return iA;var Q=m.stateNode;if(Q&&Q.__reactInternalMemoizedUnmaskedChildContext===_)return Q.__reactInternalMemoizedMaskedChildContext;var le={},me;for(me in L)le[me]=_[me];return Q&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=_,m.__reactInternalMemoizedMaskedChildContext=le),le}function Ss(m){return m=m.childContextTypes,m!=null}function VA(){za(dr),za(Sa)}function ud(m,_,L){if(Sa.current!==iA)throw Error(e(168));ya(Sa,_),ya(dr,L)}function Ad(m,_,L){var Q=m.stateNode;if(_=_.childContextTypes,typeof Q.getChildContext!="function")return L;Q=Q.getChildContext();for(var le in Q)if(!(le in _))throw Error(e(108,Rt(m)||"Unknown",le));return Ue({},L,Q)}function Si(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||iA,ys=Sa.current,ya(Sa,m),ya(dr,dr.current),!0}function cd(m,_,L){var Q=m.stateNode;if(!Q)throw Error(e(169));L?(m=Ad(m,_,ys),Q.__reactInternalMemoizedMergedChildContext=m,za(dr),za(Sa),ya(Sa,m)):za(dr),ya(dr,L)}var Ul=null,dd=!1,hd=!1;function vA(m){Ul===null?Ul=[m]:Ul.push(m)}function HA(m){dd=!0,vA(m)}function oA(){if(!hd&&Ul!==null){hd=!0;var m=0,_=kr;try{var L=Ul;for(kr=1;m<L.length;m++){var Q=L[m];do Q=Q(!0);while(Q!==null)}Ul=null,dd=!1}catch(le){throw Ul!==null&&(Ul=Ul.slice(m+1)),ns(Ps,oA),le}finally{kr=_,hd=!1}}return null}var pc=[],Ea=0,bo=null,fu=0,Ls=[],Ka=0,Ho=null,Zl=1,Du="";function mc(m,_){pc[Ea++]=fu,pc[Ea++]=bo,bo=m,fu=_}function qd(m,_,L){Ls[Ka++]=Zl,Ls[Ka++]=Du,Ls[Ka++]=Ho,Ho=m;var Q=Zl;m=Du;var le=32-cn(Q)-1;Q&=~(1<<le),L+=1;var me=32-cn(_)+le;if(30<me){var Xe=le-le%5;me=(Q&(1<<Xe)-1).toString(32),Q>>=Xe,le-=Xe,Zl=1<<32-cn(_)+le|L<<le|Q,Du=me+m}else Zl=1<<me|L<<le|Q,Du=m}function _A(m){m.return!==null&&(mc(m,1),qd(m,1,0))}function gc(m){for(;m===bo;)bo=pc[--Ea],pc[Ea]=null,fu=pc[--Ea],pc[Ea]=null;for(;m===Ho;)Ho=Ls[--Ka],Ls[Ka]=null,Du=Ls[--Ka],Ls[Ka]=null,Zl=Ls[--Ka],Ls[Ka]=null}var ma=null,cs=null,cr=!1,qr=null;function Lu(m,_){var L=Gu(5,null,null,0);L.elementType="DELETED",L.stateNode=_,L.return=m,_=m.deletions,_===null?(m.deletions=[L],m.flags|=16):_.push(L)}function ZA(m,_){switch(m.tag){case 5:var L=m.type;return _=_.nodeType!==1||L.toLowerCase()!==_.nodeName.toLowerCase()?null:_,_!==null?(m.stateNode=_,ma=m,cs=$A(_.firstChild),!0):!1;case 6:return _=m.pendingProps===""||_.nodeType!==3?null:_,_!==null?(m.stateNode=_,ma=m,cs=null,!0):!1;case 13:return _=_.nodeType!==8?null:_,_!==null?(L=Ho!==null?{id:Zl,overflow:Du}:null,m.memoizedState={dehydrated:_,treeContext:L,retryLane:1073741824},L=Gu(18,null,null,0),L.stateNode=_,L.return=m,m.child=L,ma=m,cs=null,!0):!1;default:return!1}}function pu(m){return(m.mode&1)!==0&&(m.flags&128)===0}function va(m){if(cr){var _=cs;if(_){var L=_;if(!ZA(m,_)){if(pu(m))throw Error(e(418));_=$A(L.nextSibling);var Q=ma;_&&ZA(m,_)?Lu(Q,L):(m.flags=m.flags&-4097|2,cr=!1,ma=m)}}else{if(pu(m))throw Error(e(418));m.flags=m.flags&-4097|2,cr=!1,ma=m}}}function _f(m){for(m=m.return;m!==null&&m.tag!==5&&m.tag!==3&&m.tag!==13;)m=m.return;ma=m}function Xl(m){if(m!==ma)return!1;if(!cr)return _f(m),cr=!0,!1;var _;if((_=m.tag!==3)&&!(_=m.tag!==5)&&(_=m.type,_=_!=="head"&&_!=="body"&&!gA(m.type,m.memoizedProps)),_&&(_=cs)){if(pu(m))throw Cf(),Error(e(418));for(;_;)Lu(m,_),_=$A(_.nextSibling)}if(_f(m),m.tag===13){if(m=m.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(e(317));e:{for(m=m.nextSibling,_=0;m;){if(m.nodeType===8){var L=m.data;if(L==="/$"){if(_===0){cs=$A(m.nextSibling);break e}_--}else L!=="$"&&L!=="$!"&&L!=="$?"||_++}m=m.nextSibling}cs=null}}else cs=ma?$A(m.stateNode.nextSibling):null;return!0}function Cf(){for(var m=cs;m;)m=$A(m.nextSibling)}function mu(){cs=ma=null,cr=!1}function To(m){qr===null?qr=[m]:qr.push(m)}var Oa=J.ReactCurrentBatchConfig;function Yd(m,_,L){if(m=L.ref,m!==null&&typeof m!="function"&&typeof m!="object"){if(L._owner){if(L=L._owner,L){if(L.tag!==1)throw Error(e(309));var Q=L.stateNode}if(!Q)throw Error(e(147,m));var le=Q,me=""+m;return _!==null&&_.ref!==null&&typeof _.ref=="function"&&_.ref._stringRef===me?_.ref:(_=function(Xe){var Bt=le.refs;Xe===null?delete Bt[me]:Bt[me]=Xe},_._stringRef=me,_)}if(typeof m!="string")throw Error(e(284));if(!L._owner)throw Error(e(290,m))}return m}function CA(m,_){throw m=Object.prototype.toString.call(_),Error(e(31,m==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":m))}function $d(m){var _=m._init;return _(m._payload)}function bA(m){function _(ln,en){if(m){var dn=ln.deletions;dn===null?(ln.deletions=[en],ln.flags|=16):dn.push(en)}}function L(ln,en){if(!m)return null;for(;en!==null;)_(ln,en),en=en.sibling;return null}function Q(ln,en){for(ln=new Map;en!==null;)en.key!==null?ln.set(en.key,en):ln.set(en.index,en),en=en.sibling;return ln}function le(ln,en){return ln=Md(ln,en),ln.index=0,ln.sibling=null,ln}function me(ln,en,dn){return ln.index=dn,m?(dn=ln.alternate,dn!==null?(dn=dn.index,dn<en?(ln.flags|=2,en):dn):(ln.flags|=2,en)):(ln.flags|=1048576,en)}function Xe(ln){return m&&ln.alternate===null&&(ln.flags|=2),ln}function Bt(ln,en,dn,mr){return en===null||en.tag!==6?(en=y0(dn,ln.mode,mr),en.return=ln,en):(en=le(en,dn),en.return=ln,en)}function Wt(ln,en,dn,mr){var ni=dn.type;return ni===G?nr(ln,en,dn.props.children,mr,dn.key):en!==null&&(en.elementType===ni||typeof ni=="object"&&ni!==null&&ni.$$typeof===nt&&$d(ni)===en.type)?(mr=le(en,dn.props),mr.ref=Yd(ln,en,dn),mr.return=ln,mr):(mr=Tm(dn.type,dn.key,dn.props,null,ln.mode,mr),mr.ref=Yd(ln,en,dn),mr.return=ln,mr)}function Cn(ln,en,dn,mr){return en===null||en.tag!==4||en.stateNode.containerInfo!==dn.containerInfo||en.stateNode.implementation!==dn.implementation?(en=Pm(dn,ln.mode,mr),en.return=ln,en):(en=le(en,dn.children||[]),en.return=ln,en)}function nr(ln,en,dn,mr,ni){return en===null||en.tag!==7?(en=ef(dn,ln.mode,mr,ni),en.return=ln,en):(en=le(en,dn),en.return=ln,en)}function ur(ln,en,dn){if(typeof en=="string"&&en!==""||typeof en=="number")return en=y0(""+en,ln.mode,dn),en.return=ln,en;if(typeof en=="object"&&en!==null){switch(en.$$typeof){case $:return dn=Tm(en.type,en.key,en.props,null,ln.mode,dn),dn.ref=Yd(ln,null,en),dn.return=ln,dn;case X:return en=Pm(en,ln.mode,dn),en.return=ln,en;case nt:var mr=en._init;return ur(ln,mr(en._payload),dn)}if(ar(en)||et(en))return en=ef(en,ln.mode,dn,null),en.return=ln,en;CA(ln,en)}return null}function $n(ln,en,dn,mr){var ni=en!==null?en.key:null;if(typeof dn=="string"&&dn!==""||typeof dn=="number")return ni!==null?null:Bt(ln,en,""+dn,mr);if(typeof dn=="object"&&dn!==null){switch(dn.$$typeof){case $:return dn.key===ni?Wt(ln,en,dn,mr):null;case X:return dn.key===ni?Cn(ln,en,dn,mr):null;case nt:return ni=dn._init,$n(ln,en,ni(dn._payload),mr)}if(ar(dn)||et(dn))return ni!==null?null:nr(ln,en,dn,mr,null);CA(ln,dn)}return null}function Rr(ln,en,dn,mr,ni){if(typeof mr=="string"&&mr!==""||typeof mr=="number")return ln=ln.get(dn)||null,Bt(en,ln,""+mr,ni);if(typeof mr=="object"&&mr!==null){switch(mr.$$typeof){case $:return ln=ln.get(mr.key===null?dn:mr.key)||null,Wt(en,ln,mr,ni);case X:return ln=ln.get(mr.key===null?dn:mr.key)||null,Cn(en,ln,mr,ni);case nt:var Ti=mr._init;return Rr(ln,en,dn,Ti(mr._payload),ni)}if(ar(mr)||et(mr))return ln=ln.get(dn)||null,nr(en,ln,mr,ni,null);CA(en,mr)}return null}function oi(ln,en,dn,mr){for(var ni=null,Ti=null,Ii=en,Ni=en=0,Ra=null;Ii!==null&&Ni<dn.length;Ni++){Ii.index>Ni?(Ra=Ii,Ii=null):Ra=Ii.sibling;var Xo=$n(ln,Ii,dn[Ni],mr);if(Xo===null){Ii===null&&(Ii=Ra);break}m&&Ii&&Xo.alternate===null&&_(ln,Ii),en=me(Xo,en,Ni),Ti===null?ni=Xo:Ti.sibling=Xo,Ti=Xo,Ii=Ra}if(Ni===dn.length)return L(ln,Ii),cr&&mc(ln,Ni),ni;if(Ii===null){for(;Ni<dn.length;Ni++)Ii=ur(ln,dn[Ni],mr),Ii!==null&&(en=me(Ii,en,Ni),Ti===null?ni=Ii:Ti.sibling=Ii,Ti=Ii);return cr&&mc(ln,Ni),ni}for(Ii=Q(ln,Ii);Ni<dn.length;Ni++)Ra=Rr(Ii,ln,Ni,dn[Ni],mr),Ra!==null&&(m&&Ra.alternate!==null&&Ii.delete(Ra.key===null?Ni:Ra.key),en=me(Ra,en,Ni),Ti===null?ni=Ra:Ti.sibling=Ra,Ti=Ra);return m&&Ii.forEach(function(Eh){return _(ln,Eh)}),cr&&mc(ln,Ni),ni}function ui(ln,en,dn,mr){var ni=et(dn);if(typeof ni!="function")throw Error(e(150));if(dn=ni.call(dn),dn==null)throw Error(e(151));for(var Ti=ni=null,Ii=en,Ni=en=0,Ra=null,Xo=dn.next();Ii!==null&&!Xo.done;Ni++,Xo=dn.next()){Ii.index>Ni?(Ra=Ii,Ii=null):Ra=Ii.sibling;var Eh=$n(ln,Ii,Xo.value,mr);if(Eh===null){Ii===null&&(Ii=Ra);break}m&&Ii&&Eh.alternate===null&&_(ln,Ii),en=me(Eh,en,Ni),Ti===null?ni=Eh:Ti.sibling=Eh,Ti=Eh,Ii=Ra}if(Xo.done)return L(ln,Ii),cr&&mc(ln,Ni),ni;if(Ii===null){for(;!Xo.done;Ni++,Xo=dn.next())Xo=ur(ln,Xo.value,mr),Xo!==null&&(en=me(Xo,en,Ni),Ti===null?ni=Xo:Ti.sibling=Xo,Ti=Xo);return cr&&mc(ln,Ni),ni}for(Ii=Q(ln,Ii);!Xo.done;Ni++,Xo=dn.next())Xo=Rr(Ii,ln,Ni,Xo.value,mr),Xo!==null&&(m&&Xo.alternate!==null&&Ii.delete(Xo.key===null?Ni:Xo.key),en=me(Xo,en,Ni),Ti===null?ni=Xo:Ti.sibling=Xo,Ti=Xo);return m&&Ii.forEach(function(_g){return _(ln,_g)}),cr&&mc(ln,Ni),ni}function Xs(ln,en,dn,mr){if(typeof dn=="object"&&dn!==null&&dn.type===G&&dn.key===null&&(dn=dn.props.children),typeof dn=="object"&&dn!==null){switch(dn.$$typeof){case $:e:{for(var ni=dn.key,Ti=en;Ti!==null;){if(Ti.key===ni){if(ni=dn.type,ni===G){if(Ti.tag===7){L(ln,Ti.sibling),en=le(Ti,dn.props.children),en.return=ln,ln=en;break e}}else if(Ti.elementType===ni||typeof ni=="object"&&ni!==null&&ni.$$typeof===nt&&$d(ni)===Ti.type){L(ln,Ti.sibling),en=le(Ti,dn.props),en.ref=Yd(ln,Ti,dn),en.return=ln,ln=en;break e}L(ln,Ti);break}else _(ln,Ti);Ti=Ti.sibling}dn.type===G?(en=ef(dn.props.children,ln.mode,mr,dn.key),en.return=ln,ln=en):(mr=Tm(dn.type,dn.key,dn.props,null,ln.mode,mr),mr.ref=Yd(ln,en,dn),mr.return=ln,ln=mr)}return Xe(ln);case X:e:{for(Ti=dn.key;en!==null;){if(en.key===Ti)if(en.tag===4&&en.stateNode.containerInfo===dn.containerInfo&&en.stateNode.implementation===dn.implementation){L(ln,en.sibling),en=le(en,dn.children||[]),en.return=ln,ln=en;break e}else{L(ln,en);break}else _(ln,en);en=en.sibling}en=Pm(dn,ln.mode,mr),en.return=ln,ln=en}return Xe(ln);case nt:return Ti=dn._init,Xs(ln,en,Ti(dn._payload),mr)}if(ar(dn))return oi(ln,en,dn,mr);if(et(dn))return ui(ln,en,dn,mr);CA(ln,dn)}return typeof dn=="string"&&dn!==""||typeof dn=="number"?(dn=""+dn,en!==null&&en.tag===6?(L(ln,en.sibling),en=le(en,dn),en.return=ln,ln=en):(L(ln,en),en=y0(dn,ln.mode,mr),en.return=ln,ln=en),Xe(ln)):L(ln,en)}return Xs}var Na=bA(!0),yc=bA(!1),jl=Ms(null),ol=null,Fu=null,vc=null;function gu(){vc=Fu=ol=null}function vs(m){var _=jl.current;za(jl),m._currentValue=_}function Za(m,_,L){for(;m!==null;){var Q=m.alternate;if((m.childLanes&_)!==_?(m.childLanes|=_,Q!==null&&(Q.childLanes|=_)):Q!==null&&(Q.childLanes&_)!==_&&(Q.childLanes|=_),m===L)break;m=m.return}}function Jl(m,_){ol=m,vc=Fu=null,m=m.dependencies,m!==null&&m.firstContext!==null&&(m.lanes&_&&(Nl=!0),m.firstContext=null)}function eu(m){var _=m._currentValue;if(vc!==m)if(m={context:m,memoizedValue:_,next:null},Fu===null){if(ol===null)throw Error(e(308));Fu=m,ol.dependencies={lanes:0,firstContext:m}}else Fu=Fu.next=m;return _}var aA=null;function yu(m){aA===null?aA=[m]:aA.push(m)}function _c(m,_,L,Q){var le=_.interleaved;return le===null?(L.next=L,yu(_)):(L.next=le.next,le.next=L),_.interleaved=L,Uu(m,Q)}function Uu(m,_){m.lanes|=_;var L=m.alternate;for(L!==null&&(L.lanes|=_),L=m,m=m.return;m!==null;)m.childLanes|=_,L=m.alternate,L!==null&&(L.childLanes|=_),L=m,m=m.return;return L.tag===3?L.stateNode:null}var zl=!1;function fd(m){m.updateQueue={baseState:m.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function k(m,_){m=m.updateQueue,_.updateQueue===m&&(_.updateQueue={baseState:m.baseState,firstBaseUpdate:m.firstBaseUpdate,lastBaseUpdate:m.lastBaseUpdate,shared:m.shared,effects:m.effects})}function l(m,_){return{eventTime:m,lane:_,tag:0,payload:null,callback:null,next:null}}function c(m,_,L){var Q=m.updateQueue;if(Q===null)return null;if(Q=Q.shared,vi&2){var le=Q.pending;return le===null?_.next=_:(_.next=le.next,le.next=_),Q.pending=_,Uu(m,L)}return le=Q.interleaved,le===null?(_.next=_,yu(Q)):(_.next=le.next,le.next=_),Q.interleaved=_,Uu(m,L)}function C(m,_,L){if(_=_.updateQueue,_!==null&&(_=_.shared,(L&4194240)!==0)){var Q=_.lanes;Q&=m.pendingLanes,L|=Q,_.lanes=L,sa(m,L)}}function M(m,_){var L=m.updateQueue,Q=m.alternate;if(Q!==null&&(Q=Q.updateQueue,L===Q)){var le=null,me=null;if(L=L.firstBaseUpdate,L!==null){do{var Xe={eventTime:L.eventTime,lane:L.lane,tag:L.tag,payload:L.payload,callback:L.callback,next:null};me===null?le=me=Xe:me=me.next=Xe,L=L.next}while(L!==null);me===null?le=me=_:me=me.next=_}else le=me=_;L={baseState:Q.baseState,firstBaseUpdate:le,lastBaseUpdate:me,shared:Q.shared,effects:Q.effects},m.updateQueue=L;return}m=L.lastBaseUpdate,m===null?L.firstBaseUpdate=_:m.next=_,L.lastBaseUpdate=_}function K(m,_,L,Q){var le=m.updateQueue;zl=!1;var me=le.firstBaseUpdate,Xe=le.lastBaseUpdate,Bt=le.shared.pending;if(Bt!==null){le.shared.pending=null;var Wt=Bt,Cn=Wt.next;Wt.next=null,Xe===null?me=Cn:Xe.next=Cn,Xe=Wt;var nr=m.alternate;nr!==null&&(nr=nr.updateQueue,Bt=nr.lastBaseUpdate,Bt!==Xe&&(Bt===null?nr.firstBaseUpdate=Cn:Bt.next=Cn,nr.lastBaseUpdate=Wt))}if(me!==null){var ur=le.baseState;Xe=0,nr=Cn=Wt=null,Bt=me;do{var $n=Bt.lane,Rr=Bt.eventTime;if((Q&$n)===$n){nr!==null&&(nr=nr.next={eventTime:Rr,lane:0,tag:Bt.tag,payload:Bt.payload,callback:Bt.callback,next:null});e:{var oi=m,ui=Bt;switch($n=_,Rr=L,ui.tag){case 1:if(oi=ui.payload,typeof oi=="function"){ur=oi.call(Rr,ur,$n);break e}ur=oi;break e;case 3:oi.flags=oi.flags&-65537|128;case 0:if(oi=ui.payload,$n=typeof oi=="function"?oi.call(Rr,ur,$n):oi,$n==null)break e;ur=Ue({},ur,$n);break e;case 2:zl=!0}}Bt.callback!==null&&Bt.lane!==0&&(m.flags|=64,$n=le.effects,$n===null?le.effects=[Bt]:$n.push(Bt))}else Rr={eventTime:Rr,lane:$n,tag:Bt.tag,payload:Bt.payload,callback:Bt.callback,next:null},nr===null?(Cn=nr=Rr,Wt=ur):nr=nr.next=Rr,Xe|=$n;if(Bt=Bt.next,Bt===null){if(Bt=le.shared.pending,Bt===null)break;$n=Bt,Bt=$n.next,$n.next=null,le.lastBaseUpdate=$n,le.shared.pending=null}}while(!0);if(nr===null&&(Wt=ur),le.baseState=Wt,le.firstBaseUpdate=Cn,le.lastBaseUpdate=nr,_=le.shared.interleaved,_!==null){le=_;do Xe|=le.lane,le=le.next;while(le!==_)}else me===null&&(le.shared.lanes=0);Al|=Xe,m.lanes=Xe,m.memoizedState=ur}}function z(m,_,L){if(m=_.effects,_.effects=null,m!==null)for(_=0;_<m.length;_++){var Q=m[_],le=Q.callback;if(le!==null){if(Q.callback=null,Q=L,typeof le!="function")throw Error(e(191,le));le.call(Q)}}}var Y={},ne=Ms(Y),se=Ms(Y),be=Ms(Y);function Oe(m){if(m===Y)throw Error(e(174));return m}function Te(m,_){switch(ya(be,_),ya(se,m),ya(ne,Y),m=_.nodeType,m){case 9:case 11:_=(_=_.documentElement)?_.namespaceURI:Ye(null,"");break;default:m=m===8?_.parentNode:_,_=m.namespaceURI||null,m=m.tagName,_=Ye(_,m)}za(ne),ya(ne,_)}function $e(){za(ne),za(se),za(be)}function He(m){Oe(be.current);var _=Oe(ne.current),L=Ye(_,m.type);_!==L&&(ya(se,m),ya(ne,L))}function ct(m){se.current===m&&(za(ne),za(se))}var st=Ms(0);function dt(m){for(var _=m;_!==null;){if(_.tag===13){var L=_.memoizedState;if(L!==null&&(L=L.dehydrated,L===null||L.data==="$?"||L.data==="$!"))return _}else if(_.tag===19&&_.memoizedProps.revealOrder!==void 0){if(_.flags&128)return _}else if(_.child!==null){_.child.return=_,_=_.child;continue}if(_===m)break;for(;_.sibling===null;){if(_.return===null||_.return===m)return null;_=_.return}_.sibling.return=_.return,_=_.sibling}return null}var gt=[];function St(){for(var m=0;m<gt.length;m++)gt[m]._workInProgressVersionPrimary=null;gt.length=0}var It=J.ReactCurrentDispatcher,Kt=J.ReactCurrentBatchConfig,zt=0,Tt=null,tn=null,Zt=null,vn=!1,_n=!1,gn=0,In=0;function Un(){throw Error(e(321))}function wn(m,_){if(_===null)return!1;for(var L=0;L<_.length&&L<m.length;L++)if(!sn(m[L],_[L]))return!1;return!0}function Or(m,_,L,Q,le,me){if(zt=me,Tt=_,_.memoizedState=null,_.updateQueue=null,_.lanes=0,It.current=m===null||m.memoizedState===null?Jf:Cc,m=L(Q,le),_n){me=0;do{if(_n=!1,gn=0,25<=me)throw Error(e(301));me+=1,Zt=tn=null,_.updateQueue=null,It.current=MA,m=L(Q,le)}while(_n)}if(It.current=gd,_=tn!==null&&tn.next!==null,zt=0,Zt=tn=Tt=null,vn=!1,_)throw Error(e(300));return m}function Bi(){var m=gn!==0;return gn=0,m}function Hi(){var m={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Tt.memoizedState=Zt=m:Zt=Zt.next=m,Zt}function Oo(){if(tn===null){var m=Tt.alternate;m=m!==null?m.memoizedState:null}else m=tn.next;var _=Zt===null?Tt.memoizedState:Zt.next;if(_!==null)Zt=_,tn=m;else{if(m===null)throw Error(e(310));tn=m,m={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},Zt===null?Tt.memoizedState=Zt=m:Zt=Zt.next=m}return Zt}function Ei(m,_){return typeof _=="function"?_(m):_}function jo(m){var _=Oo(),L=_.queue;if(L===null)throw Error(e(311));L.lastRenderedReducer=m;var Q=tn,le=Q.baseQueue,me=L.pending;if(me!==null){if(le!==null){var Xe=le.next;le.next=me.next,me.next=Xe}Q.baseQueue=le=me,L.pending=null}if(le!==null){me=le.next,Q=Q.baseState;var Bt=Xe=null,Wt=null,Cn=me;do{var nr=Cn.lane;if((zt&nr)===nr)Wt!==null&&(Wt=Wt.next={lane:0,action:Cn.action,hasEagerState:Cn.hasEagerState,eagerState:Cn.eagerState,next:null}),Q=Cn.hasEagerState?Cn.eagerState:m(Q,Cn.action);else{var ur={lane:nr,action:Cn.action,hasEagerState:Cn.hasEagerState,eagerState:Cn.eagerState,next:null};Wt===null?(Bt=Wt=ur,Xe=Q):Wt=Wt.next=ur,Tt.lanes|=nr,Al|=nr}Cn=Cn.next}while(Cn!==null&&Cn!==me);Wt===null?Xe=Q:Wt.next=Bt,sn(Q,_.memoizedState)||(Nl=!0),_.memoizedState=Q,_.baseState=Xe,_.baseQueue=Wt,L.lastRenderedState=Q}if(m=L.interleaved,m!==null){le=m;do me=le.lane,Tt.lanes|=me,Al|=me,le=le.next;while(le!==m)}else le===null&&(L.lanes=0);return[_.memoizedState,L.dispatch]}function zo(m){var _=Oo(),L=_.queue;if(L===null)throw Error(e(311));L.lastRenderedReducer=m;var Q=L.dispatch,le=L.pending,me=_.memoizedState;if(le!==null){L.pending=null;var Xe=le=le.next;do me=m(me,Xe.action),Xe=Xe.next;while(Xe!==le);sn(me,_.memoizedState)||(Nl=!0),_.memoizedState=me,_.baseQueue===null&&(_.baseState=me),L.lastRenderedState=me}return[me,Q]}function xo(){}function go(m,_){var L=Tt,Q=Oo(),le=_(),me=!sn(Q.memoizedState,le);if(me&&(Q.memoizedState=le,Nl=!0),Q=Q.queue,Xa(ca.bind(null,L,Q,m),[m]),Q.getSnapshot!==_||me||Zt!==null&&Zt.memoizedState.tag&1){if(L.flags|=2048,sl(9,No.bind(null,L,Q,le,_),void 0,null),Zo===null)throw Error(e(349));zt&30||Es(L,_,le)}return le}function Es(m,_,L){m.flags|=16384,m={getSnapshot:_,value:L},_=Tt.updateQueue,_===null?(_={lastEffect:null,stores:null},Tt.updateQueue=_,_.stores=[m]):(L=_.stores,L===null?_.stores=[m]:L.push(m))}function No(m,_,L,Q){_.value=L,_.getSnapshot=Q,Fs(_)&&ju(m)}function ca(m,_,L){return L(function(){Fs(_)&&ju(m)})}function Fs(m){var _=m.getSnapshot;m=m.value;try{var L=_();return!sn(m,L)}catch{return!0}}function ju(m){var _=Uu(m,1);_!==null&&Qc(_,m,1,-1)}function al(m){var _=Hi();return typeof m=="function"&&(m=m()),_.memoizedState=_.baseState=m,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:m},_.queue=m,m=m.dispatch=XA.bind(null,Tt,m),[_.memoizedState,m]}function sl(m,_,L,Q){return m={tag:m,create:_,destroy:L,deps:Q,next:null},_=Tt.updateQueue,_===null?(_={lastEffect:null,stores:null},Tt.updateQueue=_,_.lastEffect=m.next=m):(L=_.lastEffect,L===null?_.lastEffect=m.next=m:(Q=L.next,L.next=m,m.next=Q,_.lastEffect=m)),m}function tu(){return Oo().memoizedState}function xA(m,_,L,Q){var le=Hi();Tt.flags|=m,le.memoizedState=sl(1|_,L,void 0,Q===void 0?null:Q)}function wA(m,_,L,Q){var le=Oo();Q=Q===void 0?null:Q;var me=void 0;if(tn!==null){var Xe=tn.memoizedState;if(me=Xe.destroy,Q!==null&&wn(Q,Xe.deps)){le.memoizedState=sl(_,L,me,Q);return}}Tt.flags|=m,le.memoizedState=sl(1|_,L,me,Q)}function zu(m,_){return xA(8390656,8,m,_)}function Xa(m,_){return wA(2048,8,m,_)}function ll(m,_){return wA(4,2,m,_)}function os(m,_){return wA(4,4,m,_)}function El(m,_){if(typeof _=="function")return m=m(),_(m),function(){_(null)};if(_!=null)return m=m(),_.current=m,function(){_.current=null}}function _a(m,_,L){return L=L!=null?L.concat([m]):null,wA(4,4,El.bind(null,_,m),L)}function Ga(){}function $s(m,_){var L=Oo();_=_===void 0?null:_;var Q=L.memoizedState;return Q!==null&&_!==null&&wn(_,Q[1])?Q[0]:(L.memoizedState=[m,_],m)}function Vs(m,_){var L=Oo();_=_===void 0?null:_;var Q=L.memoizedState;return Q!==null&&_!==null&&wn(_,Q[1])?Q[0]:(m=m(),L.memoizedState=[m,_],m)}function pd(m,_,L){return zt&21?(sn(L,_)||(L=rs(),Tt.lanes|=L,Al|=L,m.baseState=!0),_):(m.baseState&&(m.baseState=!1,Nl=!0),m.memoizedState=L)}function mh(m,_){var L=kr;kr=L!==0&&4>L?L:4,m(!0);var Q=Kt.transition;Kt.transition={};try{m(!1),_()}finally{kr=L,Kt.transition=Q}}function gh(){return Oo().memoizedState}function md(m,_,L){var Q=xh(m);if(L={lane:Q,action:L,hasEagerState:!1,eagerState:null,next:null},yh(m))Os(_,L);else if(L=_c(m,_,L,Q),L!==null){var le=sA();Qc(L,m,Q,le),nu(L,_,Q)}}function XA(m,_,L){var Q=xh(m),le={lane:Q,action:L,hasEagerState:!1,eagerState:null,next:null};if(yh(m))Os(_,le);else{var me=m.alternate;if(m.lanes===0&&(me===null||me.lanes===0)&&(me=_.lastRenderedReducer,me!==null))try{var Xe=_.lastRenderedState,Bt=me(Xe,L);if(le.hasEagerState=!0,le.eagerState=Bt,sn(Bt,Xe)){var Wt=_.interleaved;Wt===null?(le.next=le,yu(_)):(le.next=Wt.next,Wt.next=le),_.interleaved=le;return}}catch{}finally{}L=_c(m,_,le,Q),L!==null&&(le=sA(),Qc(L,m,Q,le),nu(L,_,Q))}}function yh(m){var _=m.alternate;return m===Tt||_!==null&&_===Tt}function Os(m,_){_n=vn=!0;var L=m.pending;L===null?_.next=_:(_.next=L.next,L.next=_),m.pending=_}function nu(m,_,L){if(L&4194240){var Q=_.lanes;Q&=m.pendingLanes,L|=Q,_.lanes=L,sa(m,L)}}var gd={readContext:eu,useCallback:Un,useContext:Un,useEffect:Un,useImperativeHandle:Un,useInsertionEffect:Un,useLayoutEffect:Un,useMemo:Un,useReducer:Un,useRef:Un,useState:Un,useDebugValue:Un,useDeferredValue:Un,useTransition:Un,useMutableSource:Un,useSyncExternalStore:Un,useId:Un,unstable_isNewReconciler:!1},Jf={readContext:eu,useCallback:function(m,_){return Hi().memoizedState=[m,_===void 0?null:_],m},useContext:eu,useEffect:zu,useImperativeHandle:function(m,_,L){return L=L!=null?L.concat([m]):null,xA(4194308,4,El.bind(null,_,m),L)},useLayoutEffect:function(m,_){return xA(4194308,4,m,_)},useInsertionEffect:function(m,_){return xA(4,2,m,_)},useMemo:function(m,_){var L=Hi();return _=_===void 0?null:_,m=m(),L.memoizedState=[m,_],m},useReducer:function(m,_,L){var Q=Hi();return _=L!==void 0?L(_):_,Q.memoizedState=Q.baseState=_,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:m,lastRenderedState:_},Q.queue=m,m=m.dispatch=md.bind(null,Tt,m),[Q.memoizedState,m]},useRef:function(m){var _=Hi();return m={current:m},_.memoizedState=m},useState:al,useDebugValue:Ga,useDeferredValue:function(m){return Hi().memoizedState=m},useTransition:function(){var m=al(!1),_=m[0];return m=mh.bind(null,m[1]),Hi().memoizedState=m,[_,m]},useMutableSource:function(){},useSyncExternalStore:function(m,_,L){var Q=Tt,le=Hi();if(cr){if(L===void 0)throw Error(e(407));L=L()}else{if(L=_(),Zo===null)throw Error(e(349));zt&30||Es(Q,_,L)}le.memoizedState=L;var me={value:L,getSnapshot:_};return le.queue=me,zu(ca.bind(null,Q,me,m),[m]),Q.flags|=2048,sl(9,No.bind(null,Q,me,L,_),void 0,null),L},useId:function(){var m=Hi(),_=Zo.identifierPrefix;if(cr){var L=Du,Q=Zl;L=(Q&~(1<<32-cn(Q)-1)).toString(32)+L,_=":"+_+"R"+L,L=gn++,0<L&&(_+="H"+L.toString(32)),_+=":"}else L=In++,_=":"+_+"r"+L.toString(32)+":";return m.memoizedState=_},unstable_isNewReconciler:!1},Cc={readContext:eu,useCallback:$s,useContext:eu,useEffect:Xa,useImperativeHandle:_a,useInsertionEffect:ll,useLayoutEffect:os,useMemo:Vs,useReducer:jo,useRef:tu,useState:function(){return jo(Ei)},useDebugValue:Ga,useDeferredValue:function(m){var _=Oo();return pd(_,tn.memoizedState,m)},useTransition:function(){var m=jo(Ei)[0],_=Oo().memoizedState;return[m,_]},useMutableSource:xo,useSyncExternalStore:go,useId:gh,unstable_isNewReconciler:!1},MA={readContext:eu,useCallback:$s,useContext:eu,useEffect:Xa,useImperativeHandle:_a,useInsertionEffect:ll,useLayoutEffect:os,useMemo:Vs,useReducer:zo,useRef:tu,useState:function(){return zo(Ei)},useDebugValue:Ga,useDeferredValue:function(m){var _=Oo();return tn===null?_.memoizedState=m:pd(_,tn.memoizedState,m)},useTransition:function(){var m=zo(Ei)[0],_=Oo().memoizedState;return[m,_]},useMutableSource:xo,useSyncExternalStore:go,useId:gh,unstable_isNewReconciler:!1};function Us(m,_){if(m&&m.defaultProps){_=Ue({},_),m=m.defaultProps;for(var L in m)_[L]===void 0&&(_[L]=m[L]);return _}return _}function ep(m,_,L,Q){_=m.memoizedState,L=L(Q,_),L=L==null?_:Ue({},_,L),m.memoizedState=L,m.lanes===0&&(m.updateQueue.baseState=L)}var vh={isMounted:function(m){return(m=m._reactInternals)?ri(m)===m:!1},enqueueSetState:function(m,_,L){m=m._reactInternals;var Q=sA(),le=xh(m),me=l(Q,le);me.payload=_,L!=null&&(me.callback=L),_=c(m,me,le),_!==null&&(Qc(_,m,le,Q),C(_,m,le))},enqueueReplaceState:function(m,_,L){m=m._reactInternals;var Q=sA(),le=xh(m),me=l(Q,le);me.tag=1,me.payload=_,L!=null&&(me.callback=L),_=c(m,me,le),_!==null&&(Qc(_,m,le,Q),C(_,m,le))},enqueueForceUpdate:function(m,_){m=m._reactInternals;var L=sA(),Q=xh(m),le=l(L,Q);le.tag=2,_!=null&&(le.callback=_),_=c(m,le,Q),_!==null&&(Qc(_,m,Q,L),C(_,m,Q))}};function tp(m,_,L,Q,le,me,Xe){return m=m.stateNode,typeof m.shouldComponentUpdate=="function"?m.shouldComponentUpdate(Q,me,Xe):_.prototype&&_.prototype.isPureReactComponent?!Kr(L,Q)||!Kr(le,me):!0}function Vd(m,_,L){var Q=!1,le=iA,me=_.contextType;return typeof me=="object"&&me!==null?me=eu(me):(le=Ss(_)?ys:Sa.current,Q=_.contextTypes,me=(Q=Q!=null)?zc(m,le):iA),_=new _(L,me),m.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=vh,m.stateNode=_,_._reactInternals=m,Q&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=le,m.__reactInternalMemoizedMaskedChildContext=me),_}function bc(m,_,L,Q){m=_.state,typeof _.componentWillReceiveProps=="function"&&_.componentWillReceiveProps(L,Q),typeof _.UNSAFE_componentWillReceiveProps=="function"&&_.UNSAFE_componentWillReceiveProps(L,Q),_.state!==m&&vh.enqueueReplaceState(_,_.state,null)}function Fp(m,_,L,Q){var le=m.stateNode;le.props=L,le.state=m.memoizedState,le.refs={},fd(m);var me=_.contextType;typeof me=="object"&&me!==null?le.context=eu(me):(me=Ss(_)?ys:Sa.current,le.context=zc(m,me)),le.state=m.memoizedState,me=_.getDerivedStateFromProps,typeof me=="function"&&(ep(m,_,me,L),le.state=m.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof le.getSnapshotBeforeUpdate=="function"||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(_=le.state,typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount(),_!==le.state&&vh.enqueueReplaceState(le,le.state,null),K(m,L,le,Q),le.state=m.memoizedState),typeof le.componentDidMount=="function"&&(m.flags|=4194308)}function JA(m,_){try{var L="",Q=_;do L+=ut(Q),Q=Q.return;while(Q);var le=L}catch(me){le=`
|
||
Error generating stack: `+me.message+`
|
||
`+me.stack}return{value:m,source:_,stack:le,digest:null}}function _h(m,_,L){return{value:m,source:null,stack:L??null,digest:_??null}}function yd(m,_){try{console.error(_.value)}catch(L){setTimeout(function(){throw L})}}var np=typeof WeakMap=="function"?WeakMap:Map;function Hd(m,_,L){L=l(-1,L),L.tag=3,L.payload={element:null};var Q=_.value;return L.callback=function(){Hh||(Hh=!0,xm=Q),yd(m,_)},L}function bf(m,_,L){L=l(-1,L),L.tag=3;var Q=m.type.getDerivedStateFromError;if(typeof Q=="function"){var le=_.value;L.payload=function(){return Q(le)},L.callback=function(){yd(m,_)}}var me=m.stateNode;return me!==null&&typeof me.componentDidCatch=="function"&&(L.callback=function(){yd(m,_),typeof Q!="function"&&(Zh===null?Zh=new Set([this]):Zh.add(this));var Xe=_.stack;this.componentDidCatch(_.value,{componentStack:Xe!==null?Xe:""})}),L}function xf(m,_,L){var Q=m.pingCache;if(Q===null){Q=m.pingCache=new np;var le=new Set;Q.set(_,le)}else le=Q.get(_),le===void 0&&(le=new Set,Q.set(_,le));le.has(L)||(le.add(L),m=pg.bind(null,m,_,L),_.then(m,m))}function rp(m){do{var _;if((_=m.tag===13)&&(_=m.memoizedState,_=_!==null?_.dehydrated!==null:!0),_)return m;m=m.return}while(m!==null);return null}function vd(m,_,L,Q,le){return m.mode&1?(m.flags|=65536,m.lanes=le,m):(m===_?m.flags|=65536:(m.flags|=128,L.flags|=131072,L.flags&=-52805,L.tag===1&&(L.alternate===null?L.tag=17:(_=l(-1,1),_.tag=2,c(L,_,1))),L.lanes|=1),m)}var Wh=J.ReactCurrentOwner,Nl=!1;function Ol(m,_,L,Q){_.child=m===null?yc(_,null,L,Q):Na(_,m.child,L,Q)}function Up(m,_,L,Q,le){L=L.render;var me=_.ref;return Jl(_,le),Q=Or(m,_,L,Q,me,le),L=Bi(),m!==null&&!Nl?(_.updateQueue=m.updateQueue,_.flags&=-2053,m.lanes&=~le,vu(m,_,le)):(cr&&L&&_A(_),_.flags|=1,Ol(m,_,Q,le),_.child)}function wf(m,_,L,Q,le){if(m===null){var me=L.type;return typeof me=="function"&&!Bf(me)&&me.defaultProps===void 0&&L.compare===null&&L.defaultProps===void 0?(_.tag=15,_.type=me,Bo(m,_,me,Q,le)):(m=Tm(L.type,null,Q,_,_.mode,le),m.ref=_.ref,m.return=_,_.child=m)}if(me=m.child,!(m.lanes&le)){var Xe=me.memoizedProps;if(L=L.compare,L=L!==null?L:Kr,L(Xe,Q)&&m.ref===_.ref)return vu(m,_,le)}return _.flags|=1,m=Md(me,Q),m.ref=_.ref,m.return=_,_.child=m}function Bo(m,_,L,Q,le){if(m!==null){var me=m.memoizedProps;if(Kr(me,Q)&&m.ref===_.ref)if(Nl=!1,_.pendingProps=Q=me,(m.lanes&le)!==0)m.flags&131072&&(Nl=!0);else return _.lanes=m.lanes,vu(m,_,le)}return _d(m,_,L,Q,le)}function Nu(m,_,L){var Q=_.pendingProps,le=Q.children,me=m!==null?m.memoizedState:null;if(Q.mode==="hidden")if(!(_.mode&1))_.memoizedState={baseLanes:0,cachePool:null,transitions:null},ya(Bl,Ba),Ba|=L;else{if(!(L&1073741824))return m=me!==null?me.baseLanes|L:L,_.lanes=_.childLanes=1073741824,_.memoizedState={baseLanes:m,cachePool:null,transitions:null},_.updateQueue=null,ya(Bl,Ba),Ba|=m,null;_.memoizedState={baseLanes:0,cachePool:null,transitions:null},Q=me!==null?me.baseLanes:L,ya(Bl,Ba),Ba|=Q}else me!==null?(Q=me.baseLanes|L,_.memoizedState=null):Q=L,ya(Bl,Ba),Ba|=Q;return Ol(m,_,le,L),_.child}function Qh(m,_){var L=_.ref;(m===null&&L!==null||m!==null&&m.ref!==L)&&(_.flags|=512,_.flags|=2097152)}function _d(m,_,L,Q,le){var me=Ss(L)?ys:Sa.current;return me=zc(_,me),Jl(_,le),L=Or(m,_,L,Q,me,le),Q=Bi(),m!==null&&!Nl?(_.updateQueue=m.updateQueue,_.flags&=-2053,m.lanes&=~le,vu(m,_,le)):(cr&&Q&&_A(_),_.flags|=1,Ol(m,_,L,le),_.child)}function SA(m,_,L,Q,le){if(Ss(L)){var me=!0;Si(_)}else me=!1;if(Jl(_,le),_.stateNode===null)op(m,_),Vd(_,L,Q),Fp(_,L,Q,le),Q=!0;else if(m===null){var Xe=_.stateNode,Bt=_.memoizedProps;Xe.props=Bt;var Wt=Xe.context,Cn=L.contextType;typeof Cn=="object"&&Cn!==null?Cn=eu(Cn):(Cn=Ss(L)?ys:Sa.current,Cn=zc(_,Cn));var nr=L.getDerivedStateFromProps,ur=typeof nr=="function"||typeof Xe.getSnapshotBeforeUpdate=="function";ur||typeof Xe.UNSAFE_componentWillReceiveProps!="function"&&typeof Xe.componentWillReceiveProps!="function"||(Bt!==Q||Wt!==Cn)&&bc(_,Xe,Q,Cn),zl=!1;var $n=_.memoizedState;Xe.state=$n,K(_,Q,Xe,le),Wt=_.memoizedState,Bt!==Q||$n!==Wt||dr.current||zl?(typeof nr=="function"&&(ep(_,L,nr,Q),Wt=_.memoizedState),(Bt=zl||tp(_,L,Bt,Q,$n,Wt,Cn))?(ur||typeof Xe.UNSAFE_componentWillMount!="function"&&typeof Xe.componentWillMount!="function"||(typeof Xe.componentWillMount=="function"&&Xe.componentWillMount(),typeof Xe.UNSAFE_componentWillMount=="function"&&Xe.UNSAFE_componentWillMount()),typeof Xe.componentDidMount=="function"&&(_.flags|=4194308)):(typeof Xe.componentDidMount=="function"&&(_.flags|=4194308),_.memoizedProps=Q,_.memoizedState=Wt),Xe.props=Q,Xe.state=Wt,Xe.context=Cn,Q=Bt):(typeof Xe.componentDidMount=="function"&&(_.flags|=4194308),Q=!1)}else{Xe=_.stateNode,k(m,_),Bt=_.memoizedProps,Cn=_.type===_.elementType?Bt:Us(_.type,Bt),Xe.props=Cn,ur=_.pendingProps,$n=Xe.context,Wt=L.contextType,typeof Wt=="object"&&Wt!==null?Wt=eu(Wt):(Wt=Ss(L)?ys:Sa.current,Wt=zc(_,Wt));var Rr=L.getDerivedStateFromProps;(nr=typeof Rr=="function"||typeof Xe.getSnapshotBeforeUpdate=="function")||typeof Xe.UNSAFE_componentWillReceiveProps!="function"&&typeof Xe.componentWillReceiveProps!="function"||(Bt!==ur||$n!==Wt)&&bc(_,Xe,Q,Wt),zl=!1,$n=_.memoizedState,Xe.state=$n,K(_,Q,Xe,le);var oi=_.memoizedState;Bt!==ur||$n!==oi||dr.current||zl?(typeof Rr=="function"&&(ep(_,L,Rr,Q),oi=_.memoizedState),(Cn=zl||tp(_,L,Cn,Q,$n,oi,Wt)||!1)?(nr||typeof Xe.UNSAFE_componentWillUpdate!="function"&&typeof Xe.componentWillUpdate!="function"||(typeof Xe.componentWillUpdate=="function"&&Xe.componentWillUpdate(Q,oi,Wt),typeof Xe.UNSAFE_componentWillUpdate=="function"&&Xe.UNSAFE_componentWillUpdate(Q,oi,Wt)),typeof Xe.componentDidUpdate=="function"&&(_.flags|=4),typeof Xe.getSnapshotBeforeUpdate=="function"&&(_.flags|=1024)):(typeof Xe.componentDidUpdate!="function"||Bt===m.memoizedProps&&$n===m.memoizedState||(_.flags|=4),typeof Xe.getSnapshotBeforeUpdate!="function"||Bt===m.memoizedProps&&$n===m.memoizedState||(_.flags|=1024),_.memoizedProps=Q,_.memoizedState=oi),Xe.props=Q,Xe.state=oi,Xe.context=Wt,Q=Cn):(typeof Xe.componentDidUpdate!="function"||Bt===m.memoizedProps&&$n===m.memoizedState||(_.flags|=4),typeof Xe.getSnapshotBeforeUpdate!="function"||Bt===m.memoizedProps&&$n===m.memoizedState||(_.flags|=1024),Q=!1)}return Ch(m,_,L,Q,me,le)}function Ch(m,_,L,Q,le,me){Qh(m,_);var Xe=(_.flags&128)!==0;if(!Q&&!Xe)return le&&cd(_,L,!1),vu(m,_,me);Q=_.stateNode,Wh.current=_;var Bt=Xe&&typeof L.getDerivedStateFromError!="function"?null:Q.render();return _.flags|=1,m!==null&&Xe?(_.child=Na(_,m.child,null,me),_.child=Na(_,null,Bt,me)):Ol(m,_,Bt,me),_.memoizedState=Q.state,le&&cd(_,L,!0),_.child}function ip(m){var _=m.stateNode;_.pendingContext?ud(m,_.pendingContext,_.pendingContext!==_.context):_.context&&ud(m,_.context,!1),Te(m,_.containerInfo)}function xc(m,_,L,Q,le){return mu(),To(le),_.flags|=256,Ol(m,_,L,Q),_.child}var qh={dehydrated:null,treeContext:null,retryLane:0};function Yh(m){return{baseLanes:m,cachePool:null,transitions:null}}function Zd(m,_,L){var Q=_.pendingProps,le=st.current,me=!1,Xe=(_.flags&128)!==0,Bt;if((Bt=Xe)||(Bt=m!==null&&m.memoizedState===null?!1:(le&2)!==0),Bt?(me=!0,_.flags&=-129):(m===null||m.memoizedState!==null)&&(le|=1),ya(st,le&1),m===null)return va(_),m=_.memoizedState,m!==null&&(m=m.dehydrated,m!==null)?(_.mode&1?m.data==="$!"?_.lanes=8:_.lanes=1073741824:_.lanes=1,null):(Xe=Q.children,m=Q.fallback,me?(Q=_.mode,me=_.child,Xe={mode:"hidden",children:Xe},!(Q&1)&&me!==null?(me.childLanes=0,me.pendingProps=Xe):me=Qp(Xe,Q,0,null),m=ef(m,Q,L,null),me.return=_,m.return=_,me.sibling=m,_.child=me,_.child.memoizedState=Yh(L),_.memoizedState=qh,m):Cd(_,Xe));if(le=m.memoizedState,le!==null&&(Bt=le.dehydrated,Bt!==null))return pi(m,_,Xe,Q,Bt,le,L);if(me){me=Q.fallback,Xe=_.mode,le=m.child,Bt=le.sibling;var Wt={mode:"hidden",children:Q.children};return!(Xe&1)&&_.child!==le?(Q=_.child,Q.childLanes=0,Q.pendingProps=Wt,_.deletions=null):(Q=Md(le,Wt),Q.subtreeFlags=le.subtreeFlags&14680064),Bt!==null?me=Md(Bt,me):(me=ef(me,Xe,L,null),me.flags|=2),me.return=_,Q.return=_,Q.sibling=me,_.child=Q,Q=me,me=_.child,Xe=m.child.memoizedState,Xe=Xe===null?Yh(L):{baseLanes:Xe.baseLanes|L,cachePool:null,transitions:Xe.transitions},me.memoizedState=Xe,me.childLanes=m.childLanes&~L,_.memoizedState=qh,Q}return me=m.child,m=me.sibling,Q=Md(me,{mode:"visible",children:Q.children}),!(_.mode&1)&&(Q.lanes=L),Q.return=_,Q.sibling=null,m!==null&&(L=_.deletions,L===null?(_.deletions=[m],_.flags|=16):L.push(m)),_.child=Q,_.memoizedState=null,Q}function Cd(m,_){return _=Qp({mode:"visible",children:_},m.mode,0,null),_.return=m,m.child=_}function Nc(m,_,L,Q){return Q!==null&&To(Q),Na(_,m.child,null,L),m=Cd(_,_.pendingProps.children),m.flags|=2,_.memoizedState=null,m}function pi(m,_,L,Q,le,me,Xe){if(L)return _.flags&256?(_.flags&=-257,Q=_h(Error(e(422))),Nc(m,_,Xe,Q)):_.memoizedState!==null?(_.child=m.child,_.flags|=128,null):(me=Q.fallback,le=_.mode,Q=Qp({mode:"visible",children:Q.children},le,0,null),me=ef(me,le,Xe,null),me.flags|=2,Q.return=_,me.return=_,Q.sibling=me,_.child=Q,_.mode&1&&Na(_,m.child,null,Xe),_.child.memoizedState=Yh(Xe),_.memoizedState=qh,me);if(!(_.mode&1))return Nc(m,_,Xe,null);if(le.data==="$!"){if(Q=le.nextSibling&&le.nextSibling.dataset,Q)var Bt=Q.dgst;return Q=Bt,me=Error(e(419)),Q=_h(me,Q,void 0),Nc(m,_,Xe,Q)}if(Bt=(Xe&m.childLanes)!==0,Nl||Bt){if(Q=Zo,Q!==null){switch(Xe&-Xe){case 4:le=2;break;case 16:le=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:le=32;break;case 536870912:le=268435456;break;default:le=0}le=le&(Q.suspendedLanes|Xe)?0:le,le!==0&&le!==me.retryLane&&(me.retryLane=le,Uu(m,le),Qc(Q,m,le,-1))}return Om(),Q=_h(Error(e(421))),Nc(m,_,Xe,Q)}return le.data==="$?"?(_.flags|=128,_.child=m.child,_=g0.bind(null,m),le._reactRetry=_,null):(m=me.treeContext,cs=$A(le.nextSibling),ma=_,cr=!0,qr=null,m!==null&&(Ls[Ka++]=Zl,Ls[Ka++]=Du,Ls[Ka++]=Ho,Zl=m.id,Du=m.overflow,Ho=_),_=Cd(_,Q.children),_.flags|=4096,_)}function Gc(m,_,L){m.lanes|=_;var Q=m.alternate;Q!==null&&(Q.lanes|=_),Za(m.return,_,L)}function ta(m,_,L,Q,le){var me=m.memoizedState;me===null?m.memoizedState={isBackwards:_,rendering:null,renderingStartTime:0,last:Q,tail:L,tailMode:le}:(me.isBackwards=_,me.rendering=null,me.renderingStartTime=0,me.last=Q,me.tail=L,me.tailMode=le)}function bd(m,_,L){var Q=_.pendingProps,le=Q.revealOrder,me=Q.tail;if(Ol(m,_,Q.children,L),Q=st.current,Q&2)Q=Q&1|2,_.flags|=128;else{if(m!==null&&m.flags&128)e:for(m=_.child;m!==null;){if(m.tag===13)m.memoizedState!==null&&Gc(m,L,_);else if(m.tag===19)Gc(m,L,_);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===_)break e;for(;m.sibling===null;){if(m.return===null||m.return===_)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}Q&=1}if(ya(st,Q),!(_.mode&1))_.memoizedState=null;else switch(le){case"forwards":for(L=_.child,le=null;L!==null;)m=L.alternate,m!==null&&dt(m)===null&&(le=L),L=L.sibling;L=le,L===null?(le=_.child,_.child=null):(le=L.sibling,L.sibling=null),ta(_,!1,le,L,me);break;case"backwards":for(L=null,le=_.child,_.child=null;le!==null;){if(m=le.alternate,m!==null&&dt(m)===null){_.child=le;break}m=le.sibling,le.sibling=L,L=le,le=m}ta(_,!0,L,null,me);break;case"together":ta(_,!1,null,null,void 0);break;default:_.memoizedState=null}return _.child}function op(m,_){!(_.mode&1)&&m!==null&&(m.alternate=null,_.alternate=null,_.flags|=2)}function vu(m,_,L){if(m!==null&&(_.dependencies=m.dependencies),Al|=_.lanes,!(L&_.childLanes))return null;if(m!==null&&_.child!==m.child)throw Error(e(153));if(_.child!==null){for(m=_.child,L=Md(m,m.pendingProps),_.child=L,L.return=_;m.sibling!==null;)m=m.sibling,L=L.sibling=Md(m,m.pendingProps),L.return=_;L.sibling=null}return _.child}function bm(m,_,L){switch(_.tag){case 3:ip(_),mu();break;case 5:He(_);break;case 1:Ss(_.type)&&Si(_);break;case 4:Te(_,_.stateNode.containerInfo);break;case 10:var Q=_.type._context,le=_.memoizedProps.value;ya(jl,Q._currentValue),Q._currentValue=le;break;case 13:if(Q=_.memoizedState,Q!==null)return Q.dehydrated!==null?(ya(st,st.current&1),_.flags|=128,null):L&_.child.childLanes?Zd(m,_,L):(ya(st,st.current&1),m=vu(m,_,L),m!==null?m.sibling:null);ya(st,st.current&1);break;case 19:if(Q=(L&_.childLanes)!==0,m.flags&128){if(Q)return bd(m,_,L);_.flags|=128}if(le=_.memoizedState,le!==null&&(le.rendering=null,le.tail=null,le.lastEffect=null),ya(st,st.current),Q)break;return null;case 22:case 23:return _.lanes=0,Nu(m,_,L)}return vu(m,_,L)}var ul,jp,ds,zp;ul=function(m,_){for(var L=_.child;L!==null;){if(L.tag===5||L.tag===6)m.appendChild(L.stateNode);else if(L.tag!==4&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===_)break;for(;L.sibling===null;){if(L.return===null||L.return===_)return;L=L.return}L.sibling.return=L.return,L=L.sibling}},jp=function(){},ds=function(m,_,L,Q){var le=m.memoizedProps;if(le!==Q){m=_.stateNode,Oe(ne.current);var me=null;switch(L){case"input":le=Lt(m,le),Q=Lt(m,Q),me=[];break;case"select":le=Ue({},le,{value:void 0}),Q=Ue({},Q,{value:void 0}),me=[];break;case"textarea":le=br(m,le),Q=br(m,Q),me=[];break;default:typeof le.onClick!="function"&&typeof Q.onClick=="function"&&(m.onclick=ku)}fe(L,Q);var Xe;L=null;for(Cn in le)if(!Q.hasOwnProperty(Cn)&&le.hasOwnProperty(Cn)&&le[Cn]!=null)if(Cn==="style"){var Bt=le[Cn];for(Xe in Bt)Bt.hasOwnProperty(Xe)&&(L||(L={}),L[Xe]="")}else Cn!=="dangerouslySetInnerHTML"&&Cn!=="children"&&Cn!=="suppressContentEditableWarning"&&Cn!=="suppressHydrationWarning"&&Cn!=="autoFocus"&&(i.hasOwnProperty(Cn)?me||(me=[]):(me=me||[]).push(Cn,null));for(Cn in Q){var Wt=Q[Cn];if(Bt=le!=null?le[Cn]:void 0,Q.hasOwnProperty(Cn)&&Wt!==Bt&&(Wt!=null||Bt!=null))if(Cn==="style")if(Bt){for(Xe in Bt)!Bt.hasOwnProperty(Xe)||Wt&&Wt.hasOwnProperty(Xe)||(L||(L={}),L[Xe]="");for(Xe in Wt)Wt.hasOwnProperty(Xe)&&Bt[Xe]!==Wt[Xe]&&(L||(L={}),L[Xe]=Wt[Xe])}else L||(me||(me=[]),me.push(Cn,L)),L=Wt;else Cn==="dangerouslySetInnerHTML"?(Wt=Wt?Wt.__html:void 0,Bt=Bt?Bt.__html:void 0,Wt!=null&&Bt!==Wt&&(me=me||[]).push(Cn,Wt)):Cn==="children"?typeof Wt!="string"&&typeof Wt!="number"||(me=me||[]).push(Cn,""+Wt):Cn!=="suppressContentEditableWarning"&&Cn!=="suppressHydrationWarning"&&(i.hasOwnProperty(Cn)?(Wt!=null&&Cn==="onScroll"&&Vo("scroll",m),me||Bt===Wt||(me=[])):(me=me||[]).push(Cn,Wt))}L&&(me=me||[]).push("style",L);var Cn=me;(_.updateQueue=Cn)&&(_.flags|=4)}},zp=function(m,_,L,Q){L!==Q&&(_.flags|=4)};function $h(m,_){if(!cr)switch(m.tailMode){case"hidden":_=m.tail;for(var L=null;_!==null;)_.alternate!==null&&(L=_),_=_.sibling;L===null?m.tail=null:L.sibling=null;break;case"collapsed":L=m.tail;for(var Q=null;L!==null;)L.alternate!==null&&(Q=L),L=L.sibling;Q===null?_||m.tail===null?m.tail=null:m.tail.sibling=null:Q.sibling=null}}function Hs(m){var _=m.alternate!==null&&m.alternate.child===m.child,L=0,Q=0;if(_)for(var le=m.child;le!==null;)L|=le.lanes|le.childLanes,Q|=le.subtreeFlags&14680064,Q|=le.flags&14680064,le.return=m,le=le.sibling;else for(le=m.child;le!==null;)L|=le.lanes|le.childLanes,Q|=le.subtreeFlags,Q|=le.flags,le.return=m,le=le.sibling;return m.subtreeFlags|=Q,m.childLanes=L,_}function ap(m,_,L){var Q=_.pendingProps;switch(gc(_),_.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hs(_),null;case 1:return Ss(_.type)&&VA(),Hs(_),null;case 3:return Q=_.stateNode,$e(),za(dr),za(Sa),St(),Q.pendingContext&&(Q.context=Q.pendingContext,Q.pendingContext=null),(m===null||m.child===null)&&(Xl(_)?_.flags|=4:m===null||m.memoizedState.isDehydrated&&!(_.flags&256)||(_.flags|=1024,qr!==null&&(Mm(qr),qr=null))),jp(m,_),Hs(_),null;case 5:ct(_);var le=Oe(be.current);if(L=_.type,m!==null&&_.stateNode!=null)ds(m,_,L,Q,le),m.ref!==_.ref&&(_.flags|=512,_.flags|=2097152);else{if(!Q){if(_.stateNode===null)throw Error(e(166));return Hs(_),null}if(m=Oe(ne.current),Xl(_)){Q=_.stateNode,L=_.type;var me=_.memoizedProps;switch(Q[yA]=_,Q[fc]=me,m=(_.mode&1)!==0,L){case"dialog":Vo("cancel",Q),Vo("close",Q);break;case"iframe":case"object":case"embed":Vo("load",Q);break;case"video":case"audio":for(le=0;le<mA.length;le++)Vo(mA[le],Q);break;case"source":Vo("error",Q);break;case"img":case"image":case"link":Vo("error",Q),Vo("load",Q);break;case"details":Vo("toggle",Q);break;case"input":Vt(Q,me),Vo("invalid",Q);break;case"select":Q._wrapperState={wasMultiple:!!me.multiple},Vo("invalid",Q);break;case"textarea":_r(Q,me),Vo("invalid",Q)}fe(L,me),le=null;for(var Xe in me)if(me.hasOwnProperty(Xe)){var Bt=me[Xe];Xe==="children"?typeof Bt=="string"?Q.textContent!==Bt&&(me.suppressHydrationWarning!==!0&&ad(Q.textContent,Bt,m),le=["children",Bt]):typeof Bt=="number"&&Q.textContent!==""+Bt&&(me.suppressHydrationWarning!==!0&&ad(Q.textContent,Bt,m),le=["children",""+Bt]):i.hasOwnProperty(Xe)&&Bt!=null&&Xe==="onScroll"&&Vo("scroll",Q)}switch(L){case"input":tt(Q),Ar(Q,me,!0);break;case"textarea":tt(Q),wr(Q);break;case"select":case"option":break;default:typeof me.onClick=="function"&&(Q.onclick=ku)}Q=le,_.updateQueue=Q,Q!==null&&(_.flags|=4)}else{Xe=le.nodeType===9?le:le.ownerDocument,m==="http://www.w3.org/1999/xhtml"&&(m=hi(L)),m==="http://www.w3.org/1999/xhtml"?L==="script"?(m=Xe.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild)):typeof Q.is=="string"?m=Xe.createElement(L,{is:Q.is}):(m=Xe.createElement(L),L==="select"&&(Xe=m,Q.multiple?Xe.multiple=!0:Q.size&&(Xe.size=Q.size))):m=Xe.createElementNS(m,L),m[yA]=_,m[fc]=Q,ul(m,_,!1,!1),_.stateNode=m;e:{switch(Xe=xe(L,Q),L){case"dialog":Vo("cancel",m),Vo("close",m),le=Q;break;case"iframe":case"object":case"embed":Vo("load",m),le=Q;break;case"video":case"audio":for(le=0;le<mA.length;le++)Vo(mA[le],m);le=Q;break;case"source":Vo("error",m),le=Q;break;case"img":case"image":case"link":Vo("error",m),Vo("load",m),le=Q;break;case"details":Vo("toggle",m),le=Q;break;case"input":Vt(m,Q),le=Lt(m,Q),Vo("invalid",m);break;case"option":le=Q;break;case"select":m._wrapperState={wasMultiple:!!Q.multiple},le=Ue({},Q,{value:void 0}),Vo("invalid",m);break;case"textarea":_r(m,Q),le=br(m,Q),Vo("invalid",m);break;default:le=Q}fe(L,le),Bt=le;for(me in Bt)if(Bt.hasOwnProperty(me)){var Wt=Bt[me];me==="style"?Ut(m,Wt):me==="dangerouslySetInnerHTML"?(Wt=Wt?Wt.__html:void 0,Wt!=null&&pe(m,Wt)):me==="children"?typeof Wt=="string"?(L!=="textarea"||Wt!=="")&&Je(m,Wt):typeof Wt=="number"&&Je(m,""+Wt):me!=="suppressContentEditableWarning"&&me!=="suppressHydrationWarning"&&me!=="autoFocus"&&(i.hasOwnProperty(me)?Wt!=null&&me==="onScroll"&&Vo("scroll",m):Wt!=null&&ee(m,me,Wt,Xe))}switch(L){case"input":tt(m),Ar(m,Q,!1);break;case"textarea":tt(m),wr(m);break;case"option":Q.value!=null&&m.setAttribute("value",""+Ke(Q.value));break;case"select":m.multiple=!!Q.multiple,me=Q.value,me!=null?Cr(m,!!Q.multiple,me,!1):Q.defaultValue!=null&&Cr(m,!!Q.multiple,Q.defaultValue,!0);break;default:typeof le.onClick=="function"&&(m.onclick=ku)}switch(L){case"button":case"input":case"select":case"textarea":Q=!!Q.autoFocus;break e;case"img":Q=!0;break e;default:Q=!1}}Q&&(_.flags|=4)}_.ref!==null&&(_.flags|=512,_.flags|=2097152)}return Hs(_),null;case 6:if(m&&_.stateNode!=null)zp(m,_,m.memoizedProps,Q);else{if(typeof Q!="string"&&_.stateNode===null)throw Error(e(166));if(L=Oe(be.current),Oe(ne.current),Xl(_)){if(Q=_.stateNode,L=_.memoizedProps,Q[yA]=_,(me=Q.nodeValue!==L)&&(m=ma,m!==null))switch(m.tag){case 3:ad(Q.nodeValue,L,(m.mode&1)!==0);break;case 5:m.memoizedProps.suppressHydrationWarning!==!0&&ad(Q.nodeValue,L,(m.mode&1)!==0)}me&&(_.flags|=4)}else Q=(L.nodeType===9?L:L.ownerDocument).createTextNode(Q),Q[yA]=_,_.stateNode=Q}return Hs(_),null;case 13:if(za(st),Q=_.memoizedState,m===null||m.memoizedState!==null&&m.memoizedState.dehydrated!==null){if(cr&&cs!==null&&_.mode&1&&!(_.flags&128))Cf(),mu(),_.flags|=98560,me=!1;else if(me=Xl(_),Q!==null&&Q.dehydrated!==null){if(m===null){if(!me)throw Error(e(318));if(me=_.memoizedState,me=me!==null?me.dehydrated:null,!me)throw Error(e(317));me[yA]=_}else mu(),!(_.flags&128)&&(_.memoizedState=null),_.flags|=4;Hs(_),me=!1}else qr!==null&&(Mm(qr),qr=null),me=!0;if(!me)return _.flags&65536?_:null}return _.flags&128?(_.lanes=L,_):(Q=Q!==null,Q!==(m!==null&&m.memoizedState!==null)&&Q&&(_.child.flags|=8192,_.mode&1&&(m===null||st.current&1?Po===0&&(Po=3):Om())),_.updateQueue!==null&&(_.flags|=4),Hs(_),null);case 4:return $e(),jp(m,_),m===null&&Iu(_.stateNode.containerInfo),Hs(_),null;case 10:return vs(_.type._context),Hs(_),null;case 17:return Ss(_.type)&&VA(),Hs(_),null;case 19:if(za(st),me=_.memoizedState,me===null)return Hs(_),null;if(Q=(_.flags&128)!==0,Xe=me.rendering,Xe===null)if(Q)$h(me,!1);else{if(Po!==0||m!==null&&m.flags&128)for(m=_.child;m!==null;){if(Xe=dt(m),Xe!==null){for(_.flags|=128,$h(me,!1),Q=Xe.updateQueue,Q!==null&&(_.updateQueue=Q,_.flags|=4),_.subtreeFlags=0,Q=L,L=_.child;L!==null;)me=L,m=Q,me.flags&=14680066,Xe=me.alternate,Xe===null?(me.childLanes=0,me.lanes=m,me.child=null,me.subtreeFlags=0,me.memoizedProps=null,me.memoizedState=null,me.updateQueue=null,me.dependencies=null,me.stateNode=null):(me.childLanes=Xe.childLanes,me.lanes=Xe.lanes,me.child=Xe.child,me.subtreeFlags=0,me.deletions=null,me.memoizedProps=Xe.memoizedProps,me.memoizedState=Xe.memoizedState,me.updateQueue=Xe.updateQueue,me.type=Xe.type,m=Xe.dependencies,me.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext}),L=L.sibling;return ya(st,st.current&1|2),_.child}m=m.sibling}me.tail!==null&&Vi()>Mf&&(_.flags|=128,Q=!0,$h(me,!1),_.lanes=4194304)}else{if(!Q)if(m=dt(Xe),m!==null){if(_.flags|=128,Q=!0,L=m.updateQueue,L!==null&&(_.updateQueue=L,_.flags|=4),$h(me,!0),me.tail===null&&me.tailMode==="hidden"&&!Xe.alternate&&!cr)return Hs(_),null}else 2*Vi()-me.renderingStartTime>Mf&&L!==1073741824&&(_.flags|=128,Q=!0,$h(me,!1),_.lanes=4194304);me.isBackwards?(Xe.sibling=_.child,_.child=Xe):(L=me.last,L!==null?L.sibling=Xe:_.child=Xe,me.last=Xe)}return me.tail!==null?(_=me.tail,me.rendering=_,me.tail=_.sibling,me.renderingStartTime=Vi(),_.sibling=null,L=st.current,ya(st,Q?L&1|2:L&1),_):(Hs(_),null);case 22:case 23:return h0(),Q=_.memoizedState!==null,m!==null&&m.memoizedState!==null!==Q&&(_.flags|=8192),Q&&_.mode&1?Ba&1073741824&&(Hs(_),_.subtreeFlags&6&&(_.flags|=8192)):Hs(_),null;case 24:return null;case 25:return null}throw Error(e(156,_.tag))}function A(m,_){switch(gc(_),_.tag){case 1:return Ss(_.type)&&VA(),m=_.flags,m&65536?(_.flags=m&-65537|128,_):null;case 3:return $e(),za(dr),za(Sa),St(),m=_.flags,m&65536&&!(m&128)?(_.flags=m&-65537|128,_):null;case 5:return ct(_),null;case 13:if(za(st),m=_.memoizedState,m!==null&&m.dehydrated!==null){if(_.alternate===null)throw Error(e(340));mu()}return m=_.flags,m&65536?(_.flags=m&-65537|128,_):null;case 19:return za(st),null;case 4:return $e(),null;case 10:return vs(_.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var y=!1,O=!1,E=typeof WeakSet=="function"?WeakSet:Set,R=null;function H(m,_){var L=m.ref;if(L!==null)if(typeof L=="function")try{L(null)}catch(Q){Zs(m,_,Q)}else L.current=null}function Ae(m,_,L){try{L()}catch(Q){Zs(m,_,Q)}}var _e=!1;function Be(m,_){if(qA=Ee,m=$o(),UA(m)){if("selectionStart"in m)var L={start:m.selectionStart,end:m.selectionEnd};else e:{L=(L=m.ownerDocument)&&L.defaultView||window;var Q=L.getSelection&&L.getSelection();if(Q&&Q.rangeCount!==0){L=Q.anchorNode;var le=Q.anchorOffset,me=Q.focusNode;Q=Q.focusOffset;try{L.nodeType,me.nodeType}catch{L=null;break e}var Xe=0,Bt=-1,Wt=-1,Cn=0,nr=0,ur=m,$n=null;t:for(;;){for(var Rr;ur!==L||le!==0&&ur.nodeType!==3||(Bt=Xe+le),ur!==me||Q!==0&&ur.nodeType!==3||(Wt=Xe+Q),ur.nodeType===3&&(Xe+=ur.nodeValue.length),(Rr=ur.firstChild)!==null;)$n=ur,ur=Rr;for(;;){if(ur===m)break t;if($n===L&&++Cn===le&&(Bt=Xe),$n===me&&++nr===Q&&(Wt=Xe),(Rr=ur.nextSibling)!==null)break;ur=$n,$n=ur.parentNode}ur=Rr}L=Bt===-1||Wt===-1?null:{start:Bt,end:Wt}}else L=null}L=L||{start:0,end:0}}else L=null;for(Fl={focusedElem:m,selectionRange:L},Ee=!1,R=_;R!==null;)if(_=R,m=_.child,(_.subtreeFlags&1028)!==0&&m!==null)m.return=_,R=m;else for(;R!==null;){_=R;try{var oi=_.alternate;if(_.flags&1024)switch(_.tag){case 0:case 11:case 15:break;case 1:if(oi!==null){var ui=oi.memoizedProps,Xs=oi.memoizedState,ln=_.stateNode,en=ln.getSnapshotBeforeUpdate(_.elementType===_.type?ui:Us(_.type,ui),Xs);ln.__reactInternalSnapshotBeforeUpdate=en}break;case 3:var dn=_.stateNode.containerInfo;dn.nodeType===1?dn.textContent="":dn.nodeType===9&&dn.documentElement&&dn.removeChild(dn.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(e(163))}}catch(mr){Zs(_,_.return,mr)}if(m=_.sibling,m!==null){m.return=_.return,R=m;break}R=_.return}return oi=_e,_e=!1,oi}function Le(m,_,L){var Q=_.updateQueue;if(Q=Q!==null?Q.lastEffect:null,Q!==null){var le=Q=Q.next;do{if((le.tag&m)===m){var me=le.destroy;le.destroy=void 0,me!==void 0&&Ae(_,L,me)}le=le.next}while(le!==Q)}}function ht(m,_){if(_=_.updateQueue,_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&m)===m){var Q=L.create;L.destroy=Q()}L=L.next}while(L!==_)}}function xt(m){var _=m.ref;if(_!==null){var L=m.stateNode;switch(m.tag){case 5:m=L;break;default:m=L}typeof _=="function"?_(m):_.current=m}}function Jt(m){var _=m.alternate;_!==null&&(m.alternate=null,Jt(_)),m.child=null,m.deletions=null,m.sibling=null,m.tag===5&&(_=m.stateNode,_!==null&&(delete _[yA],delete _[fc],delete _[jc],delete _[rt],delete _[Ds])),m.stateNode=null,m.return=null,m.dependencies=null,m.memoizedProps=null,m.memoizedState=null,m.pendingProps=null,m.stateNode=null,m.updateQueue=null}function Qt(m){return m.tag===5||m.tag===3||m.tag===4}function xn(m){e:for(;;){for(;m.sibling===null;){if(m.return===null||Qt(m.return))return null;m=m.return}for(m.sibling.return=m.return,m=m.sibling;m.tag!==5&&m.tag!==6&&m.tag!==18;){if(m.flags&2||m.child===null||m.tag===4)continue e;m.child.return=m,m=m.child}if(!(m.flags&2))return m.stateNode}}function Rn(m,_,L){var Q=m.tag;if(Q===5||Q===6)m=m.stateNode,_?L.nodeType===8?L.parentNode.insertBefore(m,_):L.insertBefore(m,_):(L.nodeType===8?(_=L.parentNode,_.insertBefore(m,L)):(_=L,_.appendChild(m)),L=L._reactRootContainer,L!=null||_.onclick!==null||(_.onclick=ku));else if(Q!==4&&(m=m.child,m!==null))for(Rn(m,_,L),m=m.sibling;m!==null;)Rn(m,_,L),m=m.sibling}function Yn(m,_,L){var Q=m.tag;if(Q===5||Q===6)m=m.stateNode,_?L.insertBefore(m,_):L.appendChild(m);else if(Q!==4&&(m=m.child,m!==null))for(Yn(m,_,L),m=m.sibling;m!==null;)Yn(m,_,L),m=m.sibling}var Xn=null,yr=!1;function or(m,_,L){for(L=L.child;L!==null;)Tr(m,_,L),L=L.sibling}function Tr(m,_,L){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(ba,L)}catch{}switch(L.tag){case 5:O||H(L,_);case 6:var Q=Xn,le=yr;Xn=null,or(m,_,L),Xn=Q,yr=le,Xn!==null&&(yr?(m=Xn,L=L.stateNode,m.nodeType===8?m.parentNode.removeChild(L):m.removeChild(L)):Xn.removeChild(L.stateNode));break;case 18:Xn!==null&&(yr?(m=Xn,L=L.stateNode,m.nodeType===8?Wd(m.parentNode,L):m.nodeType===1&&Wd(m,L),Di(m)):Wd(Xn,L.stateNode));break;case 4:Q=Xn,le=yr,Xn=L.stateNode.containerInfo,yr=!0,or(m,_,L),Xn=Q,yr=le;break;case 0:case 11:case 14:case 15:if(!O&&(Q=L.updateQueue,Q!==null&&(Q=Q.lastEffect,Q!==null))){le=Q=Q.next;do{var me=le,Xe=me.destroy;me=me.tag,Xe!==void 0&&(me&2||me&4)&&Ae(L,_,Xe),le=le.next}while(le!==Q)}or(m,_,L);break;case 1:if(!O&&(H(L,_),Q=L.stateNode,typeof Q.componentWillUnmount=="function"))try{Q.props=L.memoizedProps,Q.state=L.memoizedState,Q.componentWillUnmount()}catch(Bt){Zs(L,_,Bt)}or(m,_,L);break;case 21:or(m,_,L);break;case 22:L.mode&1?(O=(Q=O)||L.memoizedState!==null,or(m,_,L),O=Q):or(m,_,L);break;default:or(m,_,L)}}function li(m){var _=m.updateQueue;if(_!==null){m.updateQueue=null;var L=m.stateNode;L===null&&(L=m.stateNode=new E),_.forEach(function(Q){var le=mg.bind(null,m,Q);L.has(Q)||(L.add(Q),Q.then(le,le))})}}function Fr(m,_){var L=_.deletions;if(L!==null)for(var Q=0;Q<L.length;Q++){var le=L[Q];try{var me=m,Xe=_,Bt=Xe;e:for(;Bt!==null;){switch(Bt.tag){case 5:Xn=Bt.stateNode,yr=!1;break e;case 3:Xn=Bt.stateNode.containerInfo,yr=!0;break e;case 4:Xn=Bt.stateNode.containerInfo,yr=!0;break e}Bt=Bt.return}if(Xn===null)throw Error(e(160));Tr(me,Xe,le),Xn=null,yr=!1;var Wt=le.alternate;Wt!==null&&(Wt.return=null),le.return=null}catch(Cn){Zs(le,_,Cn)}}if(_.subtreeFlags&12854)for(_=_.child;_!==null;)no(_,m),_=_.sibling}function no(m,_){var L=m.alternate,Q=m.flags;switch(m.tag){case 0:case 11:case 14:case 15:if(Fr(_,m),Io(m),Q&4){try{Le(3,m,m.return),ht(3,m)}catch(ui){Zs(m,m.return,ui)}try{Le(5,m,m.return)}catch(ui){Zs(m,m.return,ui)}}break;case 1:Fr(_,m),Io(m),Q&512&&L!==null&&H(L,L.return);break;case 5:if(Fr(_,m),Io(m),Q&512&&L!==null&&H(L,L.return),m.flags&32){var le=m.stateNode;try{Je(le,"")}catch(ui){Zs(m,m.return,ui)}}if(Q&4&&(le=m.stateNode,le!=null)){var me=m.memoizedProps,Xe=L!==null?L.memoizedProps:me,Bt=m.type,Wt=m.updateQueue;if(m.updateQueue=null,Wt!==null)try{Bt==="input"&&me.type==="radio"&&me.name!=null&&rn(le,me),xe(Bt,Xe);var Cn=xe(Bt,me);for(Xe=0;Xe<Wt.length;Xe+=2){var nr=Wt[Xe],ur=Wt[Xe+1];nr==="style"?Ut(le,ur):nr==="dangerouslySetInnerHTML"?pe(le,ur):nr==="children"?Je(le,ur):ee(le,nr,ur,Cn)}switch(Bt){case"input":Sn(le,me);break;case"textarea":Jr(le,me);break;case"select":var $n=le._wrapperState.wasMultiple;le._wrapperState.wasMultiple=!!me.multiple;var Rr=me.value;Rr!=null?Cr(le,!!me.multiple,Rr,!1):$n!==!!me.multiple&&(me.defaultValue!=null?Cr(le,!!me.multiple,me.defaultValue,!0):Cr(le,!!me.multiple,me.multiple?[]:"",!1))}le[fc]=me}catch(ui){Zs(m,m.return,ui)}}break;case 6:if(Fr(_,m),Io(m),Q&4){if(m.stateNode===null)throw Error(e(162));le=m.stateNode,me=m.memoizedProps;try{le.nodeValue=me}catch(ui){Zs(m,m.return,ui)}}break;case 3:if(Fr(_,m),Io(m),Q&4&&L!==null&&L.memoizedState.isDehydrated)try{Di(_.containerInfo)}catch(ui){Zs(m,m.return,ui)}break;case 4:Fr(_,m),Io(m);break;case 13:Fr(_,m),Io(m),le=m.child,le.flags&8192&&(me=le.memoizedState!==null,le.stateNode.isHidden=me,!me||le.alternate!==null&&le.alternate.memoizedState!==null||(Vh=Vi())),Q&4&&li(m);break;case 22:if(nr=L!==null&&L.memoizedState!==null,m.mode&1?(O=(Cn=O)||nr,Fr(_,m),O=Cn):Fr(_,m),Io(m),Q&8192){if(Cn=m.memoizedState!==null,(m.stateNode.isHidden=Cn)&&!nr&&m.mode&1)for(R=m,nr=m.child;nr!==null;){for(ur=R=nr;R!==null;){switch($n=R,Rr=$n.child,$n.tag){case 0:case 11:case 14:case 15:Le(4,$n,$n.return);break;case 1:H($n,$n.return);var oi=$n.stateNode;if(typeof oi.componentWillUnmount=="function"){Q=$n,L=$n.return;try{_=Q,oi.props=_.memoizedProps,oi.state=_.memoizedState,oi.componentWillUnmount()}catch(ui){Zs(Q,L,ui)}}break;case 5:H($n,$n.return);break;case 22:if($n.memoizedState!==null){Cs(ur);continue}}Rr!==null?(Rr.return=$n,R=Rr):Cs(ur)}nr=nr.sibling}e:for(nr=null,ur=m;;){if(ur.tag===5){if(nr===null){nr=ur;try{le=ur.stateNode,Cn?(me=le.style,typeof me.setProperty=="function"?me.setProperty("display","none","important"):me.display="none"):(Bt=ur.stateNode,Wt=ur.memoizedProps.style,Xe=Wt!=null&&Wt.hasOwnProperty("display")?Wt.display:null,Bt.style.display=it("display",Xe))}catch(ui){Zs(m,m.return,ui)}}}else if(ur.tag===6){if(nr===null)try{ur.stateNode.nodeValue=Cn?"":ur.memoizedProps}catch(ui){Zs(m,m.return,ui)}}else if((ur.tag!==22&&ur.tag!==23||ur.memoizedState===null||ur===m)&&ur.child!==null){ur.child.return=ur,ur=ur.child;continue}if(ur===m)break e;for(;ur.sibling===null;){if(ur.return===null||ur.return===m)break e;nr===ur&&(nr=null),ur=ur.return}nr===ur&&(nr=null),ur.sibling.return=ur.return,ur=ur.sibling}}break;case 19:Fr(_,m),Io(m),Q&4&&li(m);break;case 21:break;default:Fr(_,m),Io(m)}}function Io(m){var _=m.flags;if(_&2){try{e:{for(var L=m.return;L!==null;){if(Qt(L)){var Q=L;break e}L=L.return}throw Error(e(160))}switch(Q.tag){case 5:var le=Q.stateNode;Q.flags&32&&(Je(le,""),Q.flags&=-33);var me=xn(m);Yn(m,me,le);break;case 3:case 4:var Xe=Q.stateNode.containerInfo,Bt=xn(m);Rn(m,Bt,Xe);break;default:throw Error(e(161))}}catch(Wt){Zs(m,m.return,Wt)}m.flags&=-3}_&4096&&(m.flags&=-4097)}function js(m,_,L){R=m,as(m)}function as(m,_,L){for(var Q=(m.mode&1)!==0;R!==null;){var le=R,me=le.child;if(le.tag===22&&Q){var Xe=le.memoizedState!==null||y;if(!Xe){var Bt=le.alternate,Wt=Bt!==null&&Bt.memoizedState!==null||O;Bt=y;var Cn=O;if(y=Xe,(O=Wt)&&!Cn)for(R=le;R!==null;)Xe=R,Wt=Xe.child,Xe.tag===22&&Xe.memoizedState!==null?Bs(le):Wt!==null?(Wt.return=Xe,R=Wt):Bs(le);for(;me!==null;)R=me,as(me),me=me.sibling;R=le,y=Bt,O=Cn}_s(m)}else le.subtreeFlags&8772&&me!==null?(me.return=le,R=me):_s(m)}}function _s(m){for(;R!==null;){var _=R;if(_.flags&8772){var L=_.alternate;try{if(_.flags&8772)switch(_.tag){case 0:case 11:case 15:O||ht(5,_);break;case 1:var Q=_.stateNode;if(_.flags&4&&!O)if(L===null)Q.componentDidMount();else{var le=_.elementType===_.type?L.memoizedProps:Us(_.type,L.memoizedProps);Q.componentDidUpdate(le,L.memoizedState,Q.__reactInternalSnapshotBeforeUpdate)}var me=_.updateQueue;me!==null&&z(_,me,Q);break;case 3:var Xe=_.updateQueue;if(Xe!==null){if(L=null,_.child!==null)switch(_.child.tag){case 5:L=_.child.stateNode;break;case 1:L=_.child.stateNode}z(_,Xe,L)}break;case 5:var Bt=_.stateNode;if(L===null&&_.flags&4){L=Bt;var Wt=_.memoizedProps;switch(_.type){case"button":case"input":case"select":case"textarea":Wt.autoFocus&&L.focus();break;case"img":Wt.src&&(L.src=Wt.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(_.memoizedState===null){var Cn=_.alternate;if(Cn!==null){var nr=Cn.memoizedState;if(nr!==null){var ur=nr.dehydrated;ur!==null&&Di(ur)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(e(163))}O||_.flags&512&&xt(_)}catch($n){Zs(_,_.return,$n)}}if(_===m){R=null;break}if(L=_.sibling,L!==null){L.return=_.return,R=L;break}R=_.return}}function Cs(m){for(;R!==null;){var _=R;if(_===m){R=null;break}var L=_.sibling;if(L!==null){L.return=_.return,R=L;break}R=_.return}}function Bs(m){for(;R!==null;){var _=R;try{switch(_.tag){case 0:case 11:case 15:var L=_.return;try{ht(4,_)}catch(Wt){Zs(_,L,Wt)}break;case 1:var Q=_.stateNode;if(typeof Q.componentDidMount=="function"){var le=_.return;try{Q.componentDidMount()}catch(Wt){Zs(_,le,Wt)}}var me=_.return;try{xt(_)}catch(Wt){Zs(_,me,Wt)}break;case 5:var Xe=_.return;try{xt(_)}catch(Wt){Zs(_,Xe,Wt)}}}catch(Wt){Zs(_,_.return,Wt)}if(_===m){R=null;break}var Bt=_.sibling;if(Bt!==null){Bt.return=_.return,R=Bt;break}R=_.return}}var Gl=Math.ceil,zs=J.ReactCurrentDispatcher,bs=J.ReactCurrentOwner,da=J.ReactCurrentBatchConfig,vi=0,Zo=null,ss=null,hs=0,Ba=0,Bl=Ms(0),Po=0,xd=null,Al=0,EA=0,Wc=0,cl=null,dl=null,Vh=0,Mf=1/0,bh=null,Hh=!1,xm=null,Zh=null,wm=!1,Xh=null,OA=0,Np=0,c0=null,Gp=-1,Sf=0;function sA(){return vi&6?Vi():Gp!==-1?Gp:Gp=Vi()}function xh(m){return m.mode&1?vi&2&&hs!==0?hs&-hs:Oa.transition!==null?(Sf===0&&(Sf=rs()),Sf):(m=kr,m!==0||(m=window.event,m=m===void 0?16:fi(m.type)),m):1}function Qc(m,_,L,Q){if(50<Np)throw Np=0,c0=null,Error(e(185));As(m,L,Q),(!(vi&2)||m!==Zo)&&(m===Zo&&(!(vi&2)&&(EA|=L),Po===4&&Jh(m,hs)),ec(m,Q),L===1&&vi===0&&!(_.mode&1)&&(Mf=Vi()+500,dd&&oA()))}function ec(m,_){var L=m.callbackNode;Hr(m,_);var Q=aa(m,m===Zo?hs:0);if(Q===0)L!==null&&wo(L),m.callbackNode=null,m.callbackPriority=0;else if(_=Q&-Q,m.callbackPriority!==_){if(L!=null&&wo(L),_===1)m.tag===0?HA(fg.bind(null,m)):vA(fg.bind(null,m)),sd(function(){!(vi&6)&&oA()}),L=null;else{switch(Oi(Q)){case 1:L=Ps;break;case 4:L=ki;break;case 16:L=Mr;break;case 536870912:L=oa;break;default:L=Mr}L=lp(L,Ef.bind(null,m))}m.callbackPriority=_,m.callbackNode=L}}function Ef(m,_){if(Gp=-1,Sf=0,vi&6)throw Error(e(327));var L=m.callbackNode;if(sp()&&m.callbackNode!==L)return null;var Q=aa(m,m===Zo?hs:0);if(Q===0)return null;if(Q&30||Q&m.expiredLanes||_)_=Ns(m,Q);else{_=Q;var le=vi;vi|=2;var me=Em();(Zo!==m||hs!==_)&&(bh=null,Mf=Vi()+500,wd(m,_));do try{ry();break}catch(Bt){f0(m,Bt)}while(!0);gu(),zs.current=me,vi=le,ss!==null?_=0:(Zo=null,hs=0,_=Po)}if(_!==0){if(_===2&&(le=ci(m),le!==0&&(Q=le,_=d0(m,le))),_===1)throw L=xd,wd(m,0),Jh(m,Q),ec(m,Vi()),L;if(_===6)Jh(m,Q);else{if(le=m.current.alternate,!(Q&30)&&!ny(le)&&(_=Ns(m,Q),_===2&&(me=ci(m),me!==0&&(Q=me,_=d0(m,me))),_===1))throw L=xd,wd(m,0),Jh(m,Q),ec(m,Vi()),L;switch(m.finishedWork=le,m.finishedLanes=Q,_){case 0:case 1:throw Error(e(345));case 2:wh(m,dl,bh);break;case 3:if(Jh(m,Q),(Q&130023424)===Q&&(_=Vh+500-Vi(),10<_)){if(aa(m,0)!==0)break;if(le=m.suspendedLanes,(le&Q)!==Q){sA(),m.pingedLanes|=m.suspendedLanes≤break}m.timeoutHandle=il(wh.bind(null,m,dl,bh),_);break}wh(m,dl,bh);break;case 4:if(Jh(m,Q),(Q&4194240)===Q)break;for(_=m.eventTimes,le=-1;0<Q;){var Xe=31-cn(Q);me=1<<Xe,Xe=_[Xe],Xe>le&&(le=Xe),Q&=~me}if(Q=le,Q=Vi()-Q,Q=(120>Q?120:480>Q?480:1080>Q?1080:1920>Q?1920:3e3>Q?3e3:4320>Q?4320:1960*Gl(Q/1960))-Q,10<Q){m.timeoutHandle=il(wh.bind(null,m,dl,bh),Q);break}wh(m,dl,bh);break;case 5:wh(m,dl,bh);break;default:throw Error(e(329))}}}return ec(m,Vi()),m.callbackNode===L?Ef.bind(null,m):null}function d0(m,_){var L=cl;return m.current.memoizedState.isDehydrated&&(wd(m,_).flags|=256),m=Ns(m,_),m!==2&&(_=dl,dl=L,_!==null&&Mm(_)),m}function Mm(m){dl===null?dl=m:dl.push.apply(dl,m)}function ny(m){for(var _=m;;){if(_.flags&16384){var L=_.updateQueue;if(L!==null&&(L=L.stores,L!==null))for(var Q=0;Q<L.length;Q++){var le=L[Q],me=le.getSnapshot;le=le.value;try{if(!sn(me(),le))return!1}catch{return!1}}}if(L=_.child,_.subtreeFlags&16384&&L!==null)L.return=_,_=L;else{if(_===m)break;for(;_.sibling===null;){if(_.return===null||_.return===m)return!0;_=_.return}_.sibling.return=_.return,_=_.sibling}}return!0}function Jh(m,_){for(_&=~Wc,_&=~EA,m.suspendedLanes|=_,m.pingedLanes&=~_,m=m.expirationTimes;0<_;){var L=31-cn(_),Q=1<<L;m[L]=-1,_&=~Q}}function fg(m){if(vi&6)throw Error(e(327));sp();var _=aa(m,0);if(!(_&1))return ec(m,Vi()),null;var L=Ns(m,_);if(m.tag!==0&&L===2){var Q=ci(m);Q!==0&&(_=Q,L=d0(m,Q))}if(L===1)throw L=xd,wd(m,0),Jh(m,_),ec(m,Vi()),L;if(L===6)throw Error(e(345));return m.finishedWork=m.current.alternate,m.finishedLanes=_,wh(m,dl,bh),ec(m,Vi()),null}function Sm(m,_){var L=vi;vi|=1;try{return m(_)}finally{vi=L,vi===0&&(Mf=Vi()+500,dd&&oA())}}function Of(m){Xh!==null&&Xh.tag===0&&!(vi&6)&&sp();var _=vi;vi|=1;var L=da.transition,Q=kr;try{if(da.transition=null,kr=1,m)return m()}finally{kr=Q,da.transition=L,vi=_,!(vi&6)&&oA()}}function h0(){Ba=Bl.current,za(Bl)}function wd(m,_){m.finishedWork=null,m.finishedLanes=0;var L=m.timeoutHandle;if(L!==-1&&(m.timeoutHandle=-1,YA(L)),ss!==null)for(L=ss.return;L!==null;){var Q=L;switch(gc(Q),Q.tag){case 1:Q=Q.type.childContextTypes,Q!=null&&VA();break;case 3:$e(),za(dr),za(Sa),St();break;case 5:ct(Q);break;case 4:$e();break;case 13:za(st);break;case 19:za(st);break;case 10:vs(Q.type._context);break;case 22:case 23:h0()}L=L.return}if(Zo=m,ss=m=Md(m.current,null),hs=Ba=_,Po=0,xd=null,Wc=EA=Al=0,dl=cl=null,aA!==null){for(_=0;_<aA.length;_++)if(L=aA[_],Q=L.interleaved,Q!==null){L.interleaved=null;var le=Q.next,me=L.pending;if(me!==null){var Xe=me.next;me.next=le,Q.next=Xe}L.pending=Q}aA=null}return m}function f0(m,_){do{var L=ss;try{if(gu(),It.current=gd,vn){for(var Q=Tt.memoizedState;Q!==null;){var le=Q.queue;le!==null&&(le.pending=null),Q=Q.next}vn=!1}if(zt=0,Zt=tn=Tt=null,_n=!1,gn=0,bs.current=null,L===null||L.return===null){Po=1,xd=_,ss=null;break}e:{var me=m,Xe=L.return,Bt=L,Wt=_;if(_=hs,Bt.flags|=32768,Wt!==null&&typeof Wt=="object"&&typeof Wt.then=="function"){var Cn=Wt,nr=Bt,ur=nr.tag;if(!(nr.mode&1)&&(ur===0||ur===11||ur===15)){var $n=nr.alternate;$n?(nr.updateQueue=$n.updateQueue,nr.memoizedState=$n.memoizedState,nr.lanes=$n.lanes):(nr.updateQueue=null,nr.memoizedState=null)}var Rr=rp(Xe);if(Rr!==null){Rr.flags&=-257,vd(Rr,Xe,Bt,me,_),Rr.mode&1&&xf(me,Cn,_),_=Rr,Wt=Cn;var oi=_.updateQueue;if(oi===null){var ui=new Set;ui.add(Wt),_.updateQueue=ui}else oi.add(Wt);break e}else{if(!(_&1)){xf(me,Cn,_),Om();break e}Wt=Error(e(426))}}else if(cr&&Bt.mode&1){var Xs=rp(Xe);if(Xs!==null){!(Xs.flags&65536)&&(Xs.flags|=256),vd(Xs,Xe,Bt,me,_),To(JA(Wt,Bt));break e}}me=Wt=JA(Wt,Bt),Po!==4&&(Po=2),cl===null?cl=[me]:cl.push(me),me=Xe;do{switch(me.tag){case 3:me.flags|=65536,_&=-_,me.lanes|=_;var ln=Hd(me,Wt,_);M(me,ln);break e;case 1:Bt=Wt;var en=me.type,dn=me.stateNode;if(!(me.flags&128)&&(typeof en.getDerivedStateFromError=="function"||dn!==null&&typeof dn.componentDidCatch=="function"&&(Zh===null||!Zh.has(dn)))){me.flags|=65536,_&=-_,me.lanes|=_;var mr=bf(me,Bt,_);M(me,mr);break e}}me=me.return}while(me!==null)}Bm(L)}catch(ni){_=ni,ss===L&&L!==null&&(ss=L=L.return);continue}break}while(!0)}function Em(){var m=zs.current;return zs.current=gd,m===null?gd:m}function Om(){(Po===0||Po===3||Po===2)&&(Po=4),Zo===null||!(Al&268435455)&&!(EA&268435455)||Jh(Zo,hs)}function Ns(m,_){var L=vi;vi|=2;var Q=Em();(Zo!==m||hs!==_)&&(bh=null,wd(m,_));do try{p0();break}catch(le){f0(m,le)}while(!0);if(gu(),vi=L,zs.current=Q,ss!==null)throw Error(e(261));return Zo=null,hs=0,Po}function p0(){for(;ss!==null;)m0(ss)}function ry(){for(;ss!==null&&!Ua();)m0(ss)}function m0(m){var _=Mh(m.alternate,m,Ba);m.memoizedProps=m.pendingProps,_===null?Bm(m):ss=_,bs.current=null}function Bm(m){var _=m;do{var L=_.alternate;if(m=_.return,_.flags&32768){if(L=A(L,_),L!==null){L.flags&=32767,ss=L;return}if(m!==null)m.flags|=32768,m.subtreeFlags=0,m.deletions=null;else{Po=6,ss=null;return}}else if(L=ap(L,_,Ba),L!==null){ss=L;return}if(_=_.sibling,_!==null){ss=_;return}ss=_=m}while(_!==null);Po===0&&(Po=5)}function wh(m,_,L){var Q=kr,le=da.transition;try{da.transition=null,kr=1,iy(m,_,L,Q)}finally{da.transition=le,kr=Q}return null}function iy(m,_,L,Q){do sp();while(Xh!==null);if(vi&6)throw Error(e(327));L=m.finishedWork;var le=m.finishedLanes;if(L===null)return null;if(m.finishedWork=null,m.finishedLanes=0,L===m.current)throw Error(e(177));m.callbackNode=null,m.callbackPriority=0;var me=L.lanes|L.childLanes;if(Ju(m,me),m===Zo&&(ss=Zo=null,hs=0),!(L.subtreeFlags&2064)&&!(L.flags&2064)||wm||(wm=!0,lp(Mr,function(){return sp(),null})),me=(L.flags&15990)!==0,L.subtreeFlags&15990||me){me=da.transition,da.transition=null;var Xe=kr;kr=1;var Bt=vi;vi|=4,bs.current=null,Be(m,L),no(L,m),Xf(Fl),Ee=!!qA,Fl=qA=null,m.current=L,js(L),Ya(),vi=Bt,kr=Xe,da.transition=me}else m.current=L;if(wm&&(wm=!1,Xh=m,OA=le),me=m.pendingLanes,me===0&&(Zh=null),_t(L.stateNode),ec(m,Vi()),_!==null)for(Q=m.onRecoverableError,L=0;L<_.length;L++)le=_[L],Q(le.value,{componentStack:le.stack,digest:le.digest});if(Hh)throw Hh=!1,m=xm,xm=null,m;return OA&1&&m.tag!==0&&sp(),me=m.pendingLanes,me&1?m===c0?Np++:(Np=0,c0=m):Np=0,oA(),null}function sp(){if(Xh!==null){var m=Oi(OA),_=da.transition,L=kr;try{if(da.transition=null,kr=16>m?16:m,Xh===null)var Q=!1;else{if(m=Xh,Xh=null,OA=0,vi&6)throw Error(e(331));var le=vi;for(vi|=4,R=m.current;R!==null;){var me=R,Xe=me.child;if(R.flags&16){var Bt=me.deletions;if(Bt!==null){for(var Wt=0;Wt<Bt.length;Wt++){var Cn=Bt[Wt];for(R=Cn;R!==null;){var nr=R;switch(nr.tag){case 0:case 11:case 15:Le(8,nr,me)}var ur=nr.child;if(ur!==null)ur.return=nr,R=ur;else for(;R!==null;){nr=R;var $n=nr.sibling,Rr=nr.return;if(Jt(nr),nr===Cn){R=null;break}if($n!==null){$n.return=Rr,R=$n;break}R=Rr}}}var oi=me.alternate;if(oi!==null){var ui=oi.child;if(ui!==null){oi.child=null;do{var Xs=ui.sibling;ui.sibling=null,ui=Xs}while(ui!==null)}}R=me}}if(me.subtreeFlags&2064&&Xe!==null)Xe.return=me,R=Xe;else e:for(;R!==null;){if(me=R,me.flags&2048)switch(me.tag){case 0:case 11:case 15:Le(9,me,me.return)}var ln=me.sibling;if(ln!==null){ln.return=me.return,R=ln;break e}R=me.return}}var en=m.current;for(R=en;R!==null;){Xe=R;var dn=Xe.child;if(Xe.subtreeFlags&2064&&dn!==null)dn.return=Xe,R=dn;else e:for(Xe=en;R!==null;){if(Bt=R,Bt.flags&2048)try{switch(Bt.tag){case 0:case 11:case 15:ht(9,Bt)}}catch(ni){Zs(Bt,Bt.return,ni)}if(Bt===Xe){R=null;break e}var mr=Bt.sibling;if(mr!==null){mr.return=Bt.return,R=mr;break e}R=Bt.return}}if(vi=le,oA(),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(ba,m)}catch{}Q=!0}return Q}finally{kr=L,da.transition=_}}return!1}function Im(m,_,L){_=JA(L,_),_=Hd(m,_,1),m=c(m,_,1),_=sA(),m!==null&&(As(m,1,_),ec(m,_))}function Zs(m,_,L){if(m.tag===3)Im(m,m,L);else for(;_!==null;){if(_.tag===3){Im(_,m,L);break}else if(_.tag===1){var Q=_.stateNode;if(typeof _.type.getDerivedStateFromError=="function"||typeof Q.componentDidCatch=="function"&&(Zh===null||!Zh.has(Q))){m=JA(L,m),m=bf(_,m,1),_=c(_,m,1),m=sA(),_!==null&&(As(_,1,m),ec(_,m));break}}_=_.return}}function pg(m,_,L){var Q=m.pingCache;Q!==null&&Q.delete(_),_=sA(),m.pingedLanes|=m.suspendedLanes&L,Zo===m&&(hs&L)===L&&(Po===4||Po===3&&(hs&130023424)===hs&&500>Vi()-Vh?wd(m,0):Wc|=L),ec(m,_)}function lA(m,_){_===0&&(m.mode&1?(_=Ki,Ki<<=1,!(Ki&130023424)&&(Ki=4194304)):_=1);var L=sA();m=Uu(m,_),m!==null&&(As(m,_,L),ec(m,L))}function g0(m){var _=m.memoizedState,L=0;_!==null&&(L=_.retryLane),lA(m,L)}function mg(m,_){var L=0;switch(m.tag){case 13:var Q=m.stateNode,le=m.memoizedState;le!==null&&(L=le.retryLane);break;case 19:Q=m.stateNode;break;default:throw Error(e(314))}Q!==null&&Q.delete(_),lA(m,L)}var Mh;Mh=function(m,_,L){if(m!==null)if(m.memoizedProps!==_.pendingProps||dr.current)Nl=!0;else{if(!(m.lanes&L)&&!(_.flags&128))return Nl=!1,bm(m,_,L);Nl=!!(m.flags&131072)}else Nl=!1,cr&&_.flags&1048576&&qd(_,fu,_.index);switch(_.lanes=0,_.tag){case 2:var Q=_.type;op(m,_),m=_.pendingProps;var le=zc(_,Sa.current);Jl(_,L),le=Or(null,_,Q,m,le,L);var me=Bi();return _.flags|=1,typeof le=="object"&&le!==null&&typeof le.render=="function"&&le.$$typeof===void 0?(_.tag=1,_.memoizedState=null,_.updateQueue=null,Ss(Q)?(me=!0,Si(_)):me=!1,_.memoizedState=le.state!==null&&le.state!==void 0?le.state:null,fd(_),le.updater=vh,_.stateNode=le,le._reactInternals=_,Fp(_,Q,m,L),_=Ch(null,_,Q,!0,me,L)):(_.tag=0,cr&&me&&_A(_),Ol(null,_,le,L),_=_.child),_;case 16:Q=_.elementType;e:{switch(op(m,_),m=_.pendingProps,le=Q._init,Q=le(Q._payload),_.type=Q,le=_.tag=km(Q),m=Us(Q,m),le){case 0:_=_d(null,_,Q,m,L);break e;case 1:_=SA(null,_,Q,m,L);break e;case 11:_=Up(null,_,Q,m,L);break e;case 14:_=wf(null,_,Q,Us(Q.type,m),L);break e}throw Error(e(306,Q,""))}return _;case 0:return Q=_.type,le=_.pendingProps,le=_.elementType===Q?le:Us(Q,le),_d(m,_,Q,le,L);case 1:return Q=_.type,le=_.pendingProps,le=_.elementType===Q?le:Us(Q,le),SA(m,_,Q,le,L);case 3:e:{if(ip(_),m===null)throw Error(e(387));Q=_.pendingProps,me=_.memoizedState,le=me.element,k(m,_),K(_,Q,null,L);var Xe=_.memoizedState;if(Q=Xe.element,me.isDehydrated)if(me={element:Q,isDehydrated:!1,cache:Xe.cache,pendingSuspenseBoundaries:Xe.pendingSuspenseBoundaries,transitions:Xe.transitions},_.updateQueue.baseState=me,_.memoizedState=me,_.flags&256){le=JA(Error(e(423)),_),_=xc(m,_,Q,L,le);break e}else if(Q!==le){le=JA(Error(e(424)),_),_=xc(m,_,Q,L,le);break e}else for(cs=$A(_.stateNode.containerInfo.firstChild),ma=_,cr=!0,qr=null,L=yc(_,null,Q,L),_.child=L;L;)L.flags=L.flags&-3|4096,L=L.sibling;else{if(mu(),Q===le){_=vu(m,_,L);break e}Ol(m,_,Q,L)}_=_.child}return _;case 5:return He(_),m===null&&va(_),Q=_.type,le=_.pendingProps,me=m!==null?m.memoizedProps:null,Xe=le.children,gA(Q,le)?Xe=null:me!==null&&gA(Q,me)&&(_.flags|=32),Qh(m,_),Ol(m,_,Xe,L),_.child;case 6:return m===null&&va(_),null;case 13:return Zd(m,_,L);case 4:return Te(_,_.stateNode.containerInfo),Q=_.pendingProps,m===null?_.child=Na(_,null,Q,L):Ol(m,_,Q,L),_.child;case 11:return Q=_.type,le=_.pendingProps,le=_.elementType===Q?le:Us(Q,le),Up(m,_,Q,le,L);case 7:return Ol(m,_,_.pendingProps,L),_.child;case 8:return Ol(m,_,_.pendingProps.children,L),_.child;case 12:return Ol(m,_,_.pendingProps.children,L),_.child;case 10:e:{if(Q=_.type._context,le=_.pendingProps,me=_.memoizedProps,Xe=le.value,ya(jl,Q._currentValue),Q._currentValue=Xe,me!==null)if(sn(me.value,Xe)){if(me.children===le.children&&!dr.current){_=vu(m,_,L);break e}}else for(me=_.child,me!==null&&(me.return=_);me!==null;){var Bt=me.dependencies;if(Bt!==null){Xe=me.child;for(var Wt=Bt.firstContext;Wt!==null;){if(Wt.context===Q){if(me.tag===1){Wt=l(-1,L&-L),Wt.tag=2;var Cn=me.updateQueue;if(Cn!==null){Cn=Cn.shared;var nr=Cn.pending;nr===null?Wt.next=Wt:(Wt.next=nr.next,nr.next=Wt),Cn.pending=Wt}}me.lanes|=L,Wt=me.alternate,Wt!==null&&(Wt.lanes|=L),Za(me.return,L,_),Bt.lanes|=L;break}Wt=Wt.next}}else if(me.tag===10)Xe=me.type===_.type?null:me.child;else if(me.tag===18){if(Xe=me.return,Xe===null)throw Error(e(341));Xe.lanes|=L,Bt=Xe.alternate,Bt!==null&&(Bt.lanes|=L),Za(Xe,L,_),Xe=me.sibling}else Xe=me.child;if(Xe!==null)Xe.return=me;else for(Xe=me;Xe!==null;){if(Xe===_){Xe=null;break}if(me=Xe.sibling,me!==null){me.return=Xe.return,Xe=me;break}Xe=Xe.return}me=Xe}Ol(m,_,le.children,L),_=_.child}return _;case 9:return le=_.type,Q=_.pendingProps.children,Jl(_,L),le=eu(le),Q=Q(le),_.flags|=1,Ol(m,_,Q,L),_.child;case 14:return Q=_.type,le=Us(Q,_.pendingProps),le=Us(Q.type,le),wf(m,_,Q,le,L);case 15:return Bo(m,_,_.type,_.pendingProps,L);case 17:return Q=_.type,le=_.pendingProps,le=_.elementType===Q?le:Us(Q,le),op(m,_),_.tag=1,Ss(Q)?(m=!0,Si(_)):m=!1,Jl(_,L),Vd(_,Q,le),Fp(_,Q,le,L),Ch(null,_,Q,!0,m,L);case 19:return bd(m,_,L);case 22:return Nu(m,_,L)}throw Error(e(156,_.tag))};function lp(m,_){return ns(m,_)}function Wp(m,_,L,Q){this.tag=m,this.key=L,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=_,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Q,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gu(m,_,L,Q){return new Wp(m,_,L,Q)}function Bf(m){return m=m.prototype,!(!m||!m.isReactComponent)}function km(m){if(typeof m=="function")return Bf(m)?1:0;if(m!=null){if(m=m.$$typeof,m===re)return 11;if(m===ye)return 14}return 2}function Md(m,_){var L=m.alternate;return L===null?(L=Gu(m.tag,_,m.key,m.mode),L.elementType=m.elementType,L.type=m.type,L.stateNode=m.stateNode,L.alternate=m,m.alternate=L):(L.pendingProps=_,L.type=m.type,L.flags=0,L.subtreeFlags=0,L.deletions=null),L.flags=m.flags&14680064,L.childLanes=m.childLanes,L.lanes=m.lanes,L.child=m.child,L.memoizedProps=m.memoizedProps,L.memoizedState=m.memoizedState,L.updateQueue=m.updateQueue,_=m.dependencies,L.dependencies=_===null?null:{lanes:_.lanes,firstContext:_.firstContext},L.sibling=m.sibling,L.index=m.index,L.ref=m.ref,L}function Tm(m,_,L,Q,le,me){var Xe=2;if(Q=m,typeof m=="function")Bf(m)&&(Xe=1);else if(typeof m=="string")Xe=5;else e:switch(m){case G:return ef(L.children,le,me,_);case ae:Xe=8,le|=8;break;case ge:return m=Gu(12,L,_,le|2),m.elementType=ge,m.lanes=me,m;case oe:return m=Gu(13,L,_,le),m.elementType=oe,m.lanes=me,m;case Se:return m=Gu(19,L,_,le),m.elementType=Se,m.lanes=me,m;case Ne:return Qp(L,le,me,_);default:if(typeof m=="object"&&m!==null)switch(m.$$typeof){case he:Xe=10;break e;case Ie:Xe=9;break e;case re:Xe=11;break e;case ye:Xe=14;break e;case nt:Xe=16,Q=null;break e}throw Error(e(130,m==null?m:typeof m,""))}return _=Gu(Xe,L,_,le),_.elementType=m,_.type=Q,_.lanes=me,_}function ef(m,_,L,Q){return m=Gu(7,m,Q,_),m.lanes=L,m}function Qp(m,_,L,Q){return m=Gu(22,m,Q,_),m.elementType=Ne,m.lanes=L,m.stateNode={isHidden:!1},m}function y0(m,_,L){return m=Gu(6,m,null,_),m.lanes=L,m}function Pm(m,_,L){return _=Gu(4,m.children!==null?m.children:[],m.key,_),_.lanes=L,_.stateNode={containerInfo:m.containerInfo,pendingChildren:null,implementation:m.implementation},_}function gg(m,_,L,Q,le){this.tag=_,this.containerInfo=m,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ai(0),this.expirationTimes=Ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ai(0),this.identifierPrefix=Q,this.onRecoverableError=le,this.mutableSourceEagerHydrationData=null}function qp(m,_,L,Q,le,me,Xe,Bt,Wt){return m=new gg(m,_,L,Bt,Wt),_===1?(_=1,me===!0&&(_|=8)):_=0,me=Gu(3,null,null,_),m.current=me,me.stateNode=m,me.memoizedState={element:Q,isDehydrated:L,cache:null,transitions:null,pendingSuspenseBoundaries:null},fd(me),m}function v0(m,_,L){var Q=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X,key:Q==null?null:""+Q,children:m,containerInfo:_,implementation:L}}function yg(m){if(!m)return iA;m=m._reactInternals;e:{if(ri(m)!==m||m.tag!==1)throw Error(e(170));var _=m;do{switch(_.tag){case 3:_=_.stateNode.context;break e;case 1:if(Ss(_.type)){_=_.stateNode.__reactInternalMemoizedMergedChildContext;break e}}_=_.return}while(_!==null);throw Error(e(171))}if(m.tag===1){var L=m.type;if(Ss(L))return Ad(m,L,_)}return _}function vg(m,_,L,Q,le,me,Xe,Bt,Wt){return m=qp(L,Q,!0,m,le,me,Xe,Bt,Wt),m.context=yg(null),L=m.current,Q=sA(),le=xh(L),me=l(Q,le),me.callback=_??null,c(L,me,le),m.current.lanes=le,As(m,le,Q),ec(m,Q),m}function Yp(m,_,L,Q){var le=_.current,me=sA(),Xe=xh(le);return L=yg(L),_.context===null?_.context=L:_.pendingContext=L,_=l(me,Xe),_.payload={element:m},Q=Q===void 0?null:Q,Q!==null&&(_.callback=Q),m=c(le,_,Xe),m!==null&&(Qc(m,le,Xe,me),C(m,le,Xe)),Xe}function $p(m){if(m=m.current,!m.child)return null;switch(m.child.tag){case 5:return m.child.stateNode;default:return m.child.stateNode}}function up(m,_){if(m=m.memoizedState,m!==null&&m.dehydrated!==null){var L=m.retryLane;m.retryLane=L!==0&&L<_?L:_}}function qc(m,_){up(m,_),(m=m.alternate)&&up(m,_)}var Sh=typeof reportError=="function"?reportError:function(m){console.error(m)};function Km(m){this._internalRoot=m}If.prototype.render=Km.prototype.render=function(m){var _=this._internalRoot;if(_===null)throw Error(e(409));Yp(m,_,null,null)},If.prototype.unmount=Km.prototype.unmount=function(){var m=this._internalRoot;if(m!==null){this._internalRoot=null;var _=m.containerInfo;Of(function(){Yp(null,m,null,null)}),_[hu]=null}};function If(m){this._internalRoot=m}If.prototype.unstable_scheduleHydration=function(m){if(m){var _=ja();m={blockedOn:null,target:m,priority:_};for(var L=0;L<Pa.length&&_!==0&&_<Pa[L].priority;L++);Pa.splice(L,0,m),L===0&&zi(m)}};function Rm(m){return!(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)}function Dm(m){return!(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11&&(m.nodeType!==8||m.nodeValue!==" react-mount-point-unstable "))}function Vp(){}function _0(m,_,L,Q,le){if(le){if(typeof Q=="function"){var me=Q;Q=function(){var Cn=$p(Xe);me.call(Cn)}}var Xe=vg(_,Q,m,0,null,!1,!1,"",Vp);return m._reactRootContainer=Xe,m[hu]=Xe.current,Iu(m.nodeType===8?m.parentNode:m),Of(),Xe}for(;le=m.lastChild;)m.removeChild(le);if(typeof Q=="function"){var Bt=Q;Q=function(){var Cn=$p(Wt);Bt.call(Cn)}}var Wt=qp(m,0,!1,null,null,!1,!1,"",Vp);return m._reactRootContainer=Wt,m[hu]=Wt.current,Iu(m.nodeType===8?m.parentNode:m),Of(function(){Yp(_,Wt,L,Q)}),Wt}function Lm(m,_,L,Q,le){var me=L._reactRootContainer;if(me){var Xe=me;if(typeof le=="function"){var Bt=le;le=function(){var Wt=$p(Xe);Bt.call(Wt)}}Yp(_,Xe,m,le)}else Xe=_0(L,_,m,le,Q);return $p(Xe)}Qs=function(m){switch(m.tag){case 3:var _=m.stateNode;if(_.current.memoizedState.isDehydrated){var L=Xi(_.pendingLanes);L!==0&&(sa(_,L|1),ec(_,Vi()),!(vi&6)&&(Mf=Vi()+500,oA()))}break;case 13:Of(function(){var Q=Uu(m,1);if(Q!==null){var le=sA();Qc(Q,m,1,le)}}),qc(m,1)}},Ta=function(m){if(m.tag===13){var _=Uu(m,134217728);if(_!==null){var L=sA();Qc(_,m,134217728,L)}qc(m,134217728)}},Mo=function(m){if(m.tag===13){var _=xh(m),L=Uu(m,_);if(L!==null){var Q=sA();Qc(L,m,_,Q)}qc(m,_)}},ja=function(){return kr},au=function(m,_){var L=kr;try{return kr=m,_()}finally{kr=L}},pt=function(m,_,L){switch(_){case"input":if(Sn(m,L),_=L.name,L.type==="radio"&&_!=null){for(L=m;L.parentNode;)L=L.parentNode;for(L=L.querySelectorAll("input[name="+JSON.stringify(""+_)+'][type="radio"]'),_=0;_<L.length;_++){var Q=L[_];if(Q!==m&&Q.form===m.form){var le=Ma(Q);if(!le)throw Error(e(90));mt(Q),Sn(Q,le)}}}break;case"textarea":Jr(m,L);break;case"select":_=L.value,_!=null&&Cr(m,!!L.multiple,_,!1)}},Gt=Sm,wt=Of;var Ap={usingClientEntryPoint:!1,Events:[Li,Wr,Ma,nn,Yt,Sm]},kf={findFiberByHostInstance:Eo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cp={bundleType:kf.bundleType,version:kf.version,rendererPackageName:kf.rendererPackageName,rendererConfig:kf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(m){return m=Mi(m),m===null?null:m.stateNode},findFiberByHostInstance:kf.findFiberByHostInstance,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{ba=Hp.inject(cp),Ge=Hp}catch{}}return nh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ap,nh.createPortal=function(m,_){var L=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rm(_))throw Error(e(200));return v0(m,_,null,L)},nh.createRoot=function(m,_){if(!Rm(m))throw Error(e(299));var L=!1,Q="",le=Sh;return _!=null&&(_.unstable_strictMode===!0&&(L=!0),_.identifierPrefix!==void 0&&(Q=_.identifierPrefix),_.onRecoverableError!==void 0&&(le=_.onRecoverableError)),_=qp(m,1,!1,null,null,L,!1,Q,le),m[hu]=_.current,Iu(m.nodeType===8?m.parentNode:m),new Km(_)},nh.findDOMNode=function(m){if(m==null)return null;if(m.nodeType===1)return m;var _=m._reactInternals;if(_===void 0)throw typeof m.render=="function"?Error(e(188)):(m=Object.keys(m).join(","),Error(e(268,m)));return m=Mi(_),m=m===null?null:m.stateNode,m},nh.flushSync=function(m){return Of(m)},nh.hydrate=function(m,_,L){if(!Dm(_))throw Error(e(200));return Lm(null,m,_,!0,L)},nh.hydrateRoot=function(m,_,L){if(!Rm(m))throw Error(e(405));var Q=L!=null&&L.hydratedSources||null,le=!1,me="",Xe=Sh;if(L!=null&&(L.unstable_strictMode===!0&&(le=!0),L.identifierPrefix!==void 0&&(me=L.identifierPrefix),L.onRecoverableError!==void 0&&(Xe=L.onRecoverableError)),_=vg(_,null,m,1,L??null,le,!1,me,Xe),m[hu]=_.current,Iu(m),Q)for(m=0;m<Q.length;m++)L=Q[m],le=L._getVersion,le=le(L._source),_.mutableSourceEagerHydrationData==null?_.mutableSourceEagerHydrationData=[L,le]:_.mutableSourceEagerHydrationData.push(L,le);return new If(_)},nh.render=function(m,_,L){if(!Dm(_))throw Error(e(200));return Lm(null,m,_,!1,L)},nh.unmountComponentAtNode=function(m){if(!Dm(m))throw Error(e(40));return m._reactRootContainer?(Of(function(){Lm(null,null,m,!1,function(){m._reactRootContainer=null,m[hu]=null})}),!0):!1},nh.unstable_batchedUpdates=Sm,nh.unstable_renderSubtreeIntoContainer=function(m,_,L,Q){if(!Dm(L))throw Error(e(200));if(m==null||m._reactInternals===void 0)throw Error(e(38));return Lm(m,_,L,!1,Q)},nh.version="18.3.1-next-f1338f8080-20240426",nh}var lB;function Tv(){if(lB)return Ax.exports;lB=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),Ax.exports=eN(),Ax.exports}var uB;function tN(){if(uB)return S_;uB=1;var r=Tv();return S_.createRoot=r.createRoot,S_.hydrateRoot=r.hydrateRoot,S_}var nN=tN();const rN="modulepreload",iN=function(r){return"/maputnik/"+r},AB={},fy=function(t,e,n){let i=Promise.resolve();if(e&&e.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(e.map(f=>{if(f=iN(f),f in AB)return;AB[f]=!0;const g=f.endsWith(".css"),b=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${b}`))return;const I=document.createElement("link");if(I.rel=g?"stylesheet":rN,g||(I.as="script"),I.crossOrigin="",I.href=f,a&&I.setAttribute("nonce",a),document.head.appendChild(I),g)return new Promise((S,B)=>{I.addEventListener("load",S),I.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},oN=(r,t,e)=>{const n=r[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((i,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==e?". Note that variables only represent file names one level deep.":""))))})},aN={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,t){console&&console[r]&&console[r].apply(console,t)}};class IC{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||aN,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new IC(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new IC(this.logger,t)}}var xp=new IC;class jb{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(e)||0;this.observers[n].set(e,i+1)}),this}off(t,e){if(this.observers[t]){if(!e){delete this.observers[t];return}this.observers[t].delete(e)}}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[a,f]=s;for(let g=0;g<f;g++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,f]=s;for(let g=0;g<f;g++)a.apply(a,[t,...n])})}}function py(){let r,t;const e=new Promise((n,i)=>{r=n,t=i});return e.resolve=r,e.reject=t,e}function cB(r){return r==null?"":""+r}function sN(r,t,e){r.forEach(n=>{t[n]&&(e[n]=t[n])})}const lN=/###/g;function Qy(r,t,e){function n(a){return a&&a.indexOf("###")>-1?a.replace(lN,"."):a}function i(){return!r||typeof r=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s<o.length-1;){if(i())return{};const a=n(o[s]);!r[a]&&e&&(r[a]=new e),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return i()?{}:{obj:r,k:n(o[s])}}function dB(r,t,e){const{obj:n,k:i}=Qy(r,t,Object);if(n!==void 0||t.length===1){n[i]=e;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=Qy(r,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=Qy(r,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=e}function uN(r,t,e,n){const{obj:i,k:o}=Qy(r,t,Object);i[o]=i[o]||[],i[o].push(e)}function kC(r,t){const{obj:e,k:n}=Qy(r,t);if(e)return e[n]}function AN(r,t,e){const n=kC(r,e);return n!==void 0?n:kC(t,e)}function tR(r,t,e){for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in r?typeof r[n]=="string"||r[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?e&&(r[n]=t[n]):tR(r[n],t[n],e):r[n]=t[n]);return r}function Sg(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var cN={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function dN(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,t=>cN[t]):r}class hN{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==void 0)return e;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const fN=[" ",",","?","!",";"],pN=new hN(20);function mN(r,t,e){t=t||"",e=e||"";const n=fN.filter(s=>t.indexOf(s)<0&&e.indexOf(s)<0);if(n.length===0)return!0;const i=pN.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(r);if(!o){const s=r.indexOf(e);s>0&&!i.test(r.substring(0,s))&&(o=!0)}return o}function sS(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[t])return r[t];const n=t.split(e);let i=r;for(let o=0;o<n.length;){if(!i||typeof i!="object")return;let s,a="";for(let f=o;f<n.length;++f)if(f!==o&&(a+=e),a+=n[f],s=i[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&f<n.length-1)continue;o+=f-o+1;break}i=s}return i}function TC(r){return r&&r.indexOf("_")>0?r.replace("_","-"):r}class hB extends jb{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,e],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&o?a.push(...n.split(o)):a.push(n)));const f=kC(this.data,a);return!f&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),f||!s||typeof n!="string"?f:sS(this.data&&this.data[t]&&this.data[t][e],n,o)}addResource(t,e,n,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,e];n&&(a=a.concat(s?n.split(s):n)),t.indexOf(".")>-1&&(a=t.split("."),i=e,e=a[1]),this.addNamespaces(e),dB(this.data,a,i),o.silent||this.emit("added",t,e,n,i)}addResources(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in n)(typeof n[o]=="string"||Array.isArray(n[o]))&&this.addResource(t,e,o,n[o],{silent:!0});i.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,e];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=e,e=a[1]),this.addNamespaces(e);let f=kC(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?tR(f,n,o):f={...f,...n},dB(this.data,a,f),s.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==void 0}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(i=>e[i]&&Object.keys(e[i]).length>0)}toJSON(){return this.data}}var nR={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,t,e,n,i){return r.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,e,n,i))}),t}};const fB={};class PC extends jb{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),sN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=xp.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,e);return n&&n.res!==void 0}extractFromKey(t,e){let n=e.nsSeparator!==void 0?e.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator;let o=e.ns||this.options.defaultNS||[];const s=n&&t.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!mN(t,n,i);if(s&&!a){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:o};const g=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(g[0])>-1)&&(o=g.shift()),t=g.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,e,n){if(typeof e!="object"&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),typeof e=="object"&&(e={...e}),e||(e={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=e.returnDetails!==void 0?e.returnDetails:this.options.returnDetails,o=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],e),f=a[a.length-1],g=e.lng||this.language,b=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(b){const J=e.nsSeparator||this.options.nsSeparator;return i?{res:`${f}${J}${s}`,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:f,usedParams:this.getUsedParamsDetails(e)}:`${f}${J}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:f,usedParams:this.getUsedParamsDetails(e)}:s}const I=this.resolve(t,e);let S=I&&I.res;const B=I&&I.usedKey||s,P=I&&I.exactUsedKey||s,U=Object.prototype.toString.apply(S),j=["[object Number]","[object Function]","[object RegExp]"],q=e.joinArrays!==void 0?e.joinArrays:this.options.joinArrays,W=!this.i18nFormat||this.i18nFormat.handleAsObject;if(W&&S&&(typeof S!="string"&&typeof S!="boolean"&&typeof S!="number")&&j.indexOf(U)<0&&!(typeof q=="string"&&Array.isArray(S))){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const J=this.options.returnedObjectHandler?this.options.returnedObjectHandler(B,S,{...e,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(I.res=J,I.usedParams=this.getUsedParamsDetails(e),I):J}if(o){const J=Array.isArray(S),$=J?[]:{},X=J?P:B;for(const G in S)if(Object.prototype.hasOwnProperty.call(S,G)){const ae=`${X}${o}${G}`;$[G]=this.translate(ae,{...e,joinArrays:!1,ns:a}),$[G]===ae&&($[G]=S[G])}S=$}}else if(W&&typeof q=="string"&&Array.isArray(S))S=S.join(q),S&&(S=this.extendTranslation(S,t,e,n));else{let J=!1,$=!1;const X=e.count!==void 0&&typeof e.count!="string",G=PC.hasDefaultValue(e),ae=X?this.pluralResolver.getSuffix(g,e.count,e):"",ge=e.ordinal&&X?this.pluralResolver.getSuffix(g,e.count,{ordinal:!1}):"",he=X&&!e.ordinal&&e.count===0&&this.pluralResolver.shouldUseIntlApi(),Ie=he&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${ae}`]||e[`defaultValue${ge}`]||e.defaultValue;!this.isValidLookup(S)&&G&&(J=!0,S=Ie),this.isValidLookup(S)||($=!0,S=s);const oe=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:S,Se=G&&Ie!==S&&this.options.updateMissing;if($||J||Se){if(this.logger.log(Se?"updateKey":"missingKey",g,f,s,Se?Ie:S),o){const je=this.resolve(s,{...e,keySeparator:!1});je&&je.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 nt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if(this.options.saveMissingTo==="fallback"&&nt&&nt[0])for(let je=0;je<nt.length;je++)ye.push(nt[je]);else this.options.saveMissingTo==="all"?ye=this.languageUtils.toResolveHierarchy(e.lng||this.language):ye.push(e.lng||this.language);const Ne=(je,et,Ue)=>{const ke=G&&Ue!==S?Ue:oe;this.options.missingKeyHandler?this.options.missingKeyHandler(je,f,et,ke,Se,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(je,f,et,ke,Se,e),this.emit("missingKey",je,f,et,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&X?ye.forEach(je=>{const et=this.pluralResolver.getSuffixes(je,e);he&&e[`defaultValue${this.options.pluralSeparator}zero`]&&et.indexOf(`${this.options.pluralSeparator}zero`)<0&&et.push(`${this.options.pluralSeparator}zero`),et.forEach(Ue=>{Ne([je],s+Ue,e[`defaultValue${Ue}`]||Ie)})}):Ne(ye,s,Ie))}S=this.extendTranslation(S,t,e,I,n),$&&S===s&&this.options.appendNamespaceToMissingKey&&(S=`${f}:${s}`),($||J)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${s}`:s,J?S:void 0):S=this.options.parseMissingKeyHandler(S))}return i?(I.res=S,I.usedParams=this.getUsedParamsDetails(e),I):S}extendTranslation(t,e,n,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const g=typeof t=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(g){const S=t.match(this.interpolator.nestingRegexp);b=S&&S.length}let I=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(I={...this.options.interpolation.defaultVariables,...I}),t=this.interpolator.interpolate(t,I,n.lng||this.language||i.usedLng,n),g){const S=t.match(this.interpolator.nestingRegexp),B=S&&S.length;b<B&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var S=arguments.length,B=new Array(S),P=0;P<S;P++)B[P]=arguments[P];return o&&o[0]===B[0]&&!n.context?(s.logger.warn(`It seems you are nesting recursively key: ${B[0]} in key: ${e[0]}`),null):s.translate(...B,e)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,f=typeof a=="string"?[a]:a;return t!=null&&f&&f.length&&n.applyPostProcessor!==!1&&(t=nR.handle(f,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(f=>{if(this.isValidLookup(n))return;const g=this.extractFromKey(f,e),b=g.key;i=b;let I=g.namespaces;this.options.fallbackNS&&(I=I.concat(this.options.fallbackNS));const S=e.count!==void 0&&typeof e.count!="string",B=S&&!e.ordinal&&e.count===0&&this.pluralResolver.shouldUseIntlApi(),P=e.context!==void 0&&(typeof e.context=="string"||typeof e.context=="number")&&e.context!=="",U=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);I.forEach(j=>{this.isValidLookup(n)||(a=j,!fB[`${U[0]}-${j}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(fB[`${U[0]}-${j}`]=!0,this.logger.warn(`key "${i}" for languages "${U.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),U.forEach(q=>{if(this.isValidLookup(n))return;s=q;const W=[b];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(W,b,q,j,e);else{let J;S&&(J=this.pluralResolver.getSuffix(q,e.count,e));const $=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(W.push(b+J),e.ordinal&&J.indexOf(X)===0&&W.push(b+J.replace(X,this.options.pluralSeparator)),B&&W.push(b+$)),P){const G=`${b}${this.options.contextSeparator}${e.context}`;W.push(G),S&&(W.push(G+J),e.ordinal&&J.indexOf(X)===0&&W.push(G+J.replace(X,this.options.pluralSeparator)),B&&W.push(G+$))}}let ee;for(;ee=W.pop();)this.isValidLookup(n)||(o=ee,n=this.getResource(q,j,ee,e))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,i):this.resourceStore.getResource(t,e,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&typeof t.replace!="string";let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const o of e)delete i[o]}return i}static hasDefaultValue(t){const e="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,e.length)&&t[n]!==void 0)return!0;return!1}}function hx(r){return r.charAt(0).toUpperCase()+r.slice(1)}class pB{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xp.create("languageUtils")}getScriptPartFromCode(t){if(t=TC(t),!t||t.indexOf("-")<0)return null;const e=t.split("-");return e.length===2||(e.pop(),e[e.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){if(t=TC(t),!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=hx(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=hx(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=hx(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(n=>{if(e)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(e=i)}),!e&&this.options.supportedLngs&&t.forEach(n=>{if(e)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return e=i;e=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})}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if(typeof t=="function"&&(t=t(e)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),n.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let gN=[{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}],yN={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}};const vN=["v1","v2","v3"],_N=["v4"],mB={zero:0,one:1,two:2,few:3,many:4,other:5};function CN(){const r={};return gN.forEach(t=>{t.lngs.forEach(e=>{r[e]={numbers:t.nr,plurals:yN[t.fc]}})}),r}class bN{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=xp.create("pluralResolver"),(!this.options.compatibilityJSON||_N.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=CN()}addRule(t,e){this.rules[t]=e}getRule(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(TC(t==="dev"?"en":t),{type:e.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${e}${i}`)}getSuffixes(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,o)=>mB[i]-mB[o]).map(i=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,e)):[]}getSuffix(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:this.getSuffixRetroCompatible(i,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.noAbs?t.plurals(e):t.plurals(Math.abs(e));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.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&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!vN.includes(this.options.compatibilityJSON)}}function gB(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=AN(r,t,e);return!o&&i&&typeof e=="string"&&(o=sS(r,e,n),o===void 0&&(o=sS(t,e,n))),o}class xN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=xp.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(e=>e),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:n,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:f,formatSeparator:g,unescapeSuffix:b,unescapePrefix:I,nestingPrefix:S,nestingPrefixEscaped:B,nestingSuffix:P,nestingSuffixEscaped:U,nestingOptionsSeparator:j,maxReplaces:q,alwaysFormat:W}=t.interpolation;this.escape=e!==void 0?e:dN,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Sg(o):s||"{{",this.suffix=a?Sg(a):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=b?"":I||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=S?Sg(S):B||Sg("$t("),this.nestingSuffix=P?Sg(P):U||Sg(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=q||1e3,this.alwaysFormat=W!==void 0?W:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(e,n)=>e&&e.source===n?(e.lastIndex=0,e):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,n,i){let o,s,a;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function g(P){return P.replace(/\$/g,"$$$$")}const b=P=>{if(P.indexOf(this.formatSeparator)<0){const W=gB(e,f,P,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,{...i,...e,interpolationkey:P}):W}const U=P.split(this.formatSeparator),j=U.shift().trim(),q=U.join(this.formatSeparator).trim();return this.format(gB(e,f,j,this.options.keySeparator,this.options.ignoreJSONStructure),q,n,{...i,...e,interpolationkey:j})};this.resetRegExp();const I=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,S=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:P=>g(P)},{regex:this.regexp,safeValue:P=>this.escapeValue?g(this.escape(P)):g(P)}].forEach(P=>{for(a=0;o=P.regex.exec(t);){const U=o[1].trim();if(s=b(U),s===void 0)if(typeof I=="function"){const q=I(t,o,i);s=typeof q=="string"?q:""}else if(i&&Object.prototype.hasOwnProperty.call(i,U))s="";else if(S){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${U} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=cB(s));const j=P.safeValue(s);if(t=t.replace(o[0],j),S?(P.regex.lastIndex+=s.length,P.regex.lastIndex-=o[0].length):P.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(f,g){const b=this.nestingOptionsSeparator;if(f.indexOf(b)<0)return f;const I=f.split(new RegExp(`${b}[ ]*{`));let S=`{${I[1]}`;f=I[0],S=this.interpolate(S,s);const B=S.match(/'/g),P=S.match(/"/g);(B&&B.length%2===0&&!P||P.length%2!==0)&&(S=S.replace(/'/g,'"'));try{s=JSON.parse(S),g&&(s={...g,...s})}catch(U){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,U),`${f}${b}${S}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,f}for(;i=this.nestingRegexp.exec(t);){let f=[];s={...n},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let g=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const b=i[1].split(this.formatSeparator).map(I=>I.trim());i[1]=b.shift(),f=b,g=!0}if(o=e(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=cB(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),g&&(o=f.reduce((b,I)=>this.format(b,I,n.lng,{...n,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function wN(r){let t=r.toLowerCase().trim();const e={};if(r.indexOf("(")>-1){const n=r.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?e.currency||(e.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?e.range||(e.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...f]=s.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),b=a.trim();e[b]||(e[b]=g),g==="false"&&(e[b]=!1),g==="true"&&(e[b]=!0),isNaN(g)||(e[b]=parseInt(g,10))}})}return{formatName:t,formatOptions:e}}function Eg(r){const t={};return function(n,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=r(TC(i),o),t[s]=a),a(n)}}class MN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=xp.create("formatter"),this.options=t,this.formats={number:Eg((e,n)=>{const i=new Intl.NumberFormat(e,{...n});return o=>i.format(o)}),currency:Eg((e,n)=>{const i=new Intl.NumberFormat(e,{...n,style:"currency"});return o=>i.format(o)}),datetime:Eg((e,n)=>{const i=new Intl.DateTimeFormat(e,{...n});return o=>i.format(o)}),relativetime:Eg((e,n)=>{const i=new Intl.RelativeTimeFormat(e,{...n});return o=>i.format(o,n.range||"day")}),list:Eg((e,n)=>{const i=new Intl.ListFormat(e,{...n});return o=>i.format(o)})},this.init(t)}init(t){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=Eg(e)}format(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return e.split(this.formatSeparator).reduce((a,f)=>{const{formatName:g,formatOptions:b}=wN(f);if(this.formats[g]){let I=a;try{const S=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},B=S.locale||S.lng||i.locale||i.lng||n;I=this.formats[g](a,B,{...b,...i,...S})}catch(S){this.logger.warn(S)}return I}else this.logger.warn(`there was no format function for ${g}`);return a},t)}}function SN(r,t){r.pending[t]!==void 0&&(delete r.pending[t],r.pendingCount--)}class EN extends jb{constructor(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=xp.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(n,i.backend,i)}queueLoad(t,e,n,i){const o={},s={},a={},f={};return t.forEach(g=>{let b=!0;e.forEach(I=>{const S=`${g}|${I}`;!n.reload&&this.store.hasResourceBundle(g,I)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?s[S]===void 0&&(s[S]=!0):(this.state[S]=1,b=!1,s[S]===void 0&&(s[S]=!0),o[S]===void 0&&(o[S]=!0),f[I]===void 0&&(f[I]=!0)))}),b||(a[g]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(f)}}loaded(t,e,n){const i=t.split("|"),o=i[0],s=i[1];e&&this.emit("failedLoading",o,s,e),n&&this.store.addResourceBundle(o,s,n,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2;const a={};this.queue.forEach(f=>{uN(f.loaded,[o],s),SN(f,t),e&&f.errors.push(e),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{a[g]||(a[g]={});const b=f.loaded[g];b.length&&b.forEach(I=>{a[g][I]===void 0&&(a[g][I]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(f=>!f.done)}read(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(g,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const I=this.waitingReads.shift();this.read(I.lng,I.ns,I.fcName,I.tried,I.wait,I.callback)}if(g&&b&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,e,n,i+1,o*2,s)},o);return}s(g,b)},f=this.backend[n].bind(this.backend);if(f.length===2){try{const g=f(t,e);g&&typeof g.then=="function"?g.then(b=>a(null,b)).catch(a):a(null,g)}catch(g){a(g)}return}return f(t,e,a)}prepareLoading(t,e){let n=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 t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof e=="string"&&(e=[e]);const o=this.queueLoad(t,e,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${e}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${e}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,e,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${n}" as the namespace "${e}" 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(!(n==null||n==="")){if(this.backend&&this.backend.create){const f={...s,isUpdate:o},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(t,e,n,i,f):b=g(t,e,n,i),b&&typeof b.then=="function"?b.then(I=>a(null,I)).catch(a):a(null,b)}catch(b){a(b)}else g(t,e,n,i,a,f)}!t||!t[0]||this.store.addResource(t[0],e,n,i)}}}function yB(){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(t){let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function vB(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function E_(){}function ON(r){Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(e=>{typeof r[e]=="function"&&(r[e]=r[e].bind(r))})}class rv extends jb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(super(),this.options=vB(t),this.services={},this.logger=xp,this.modules={external:[]},ON(this),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),!e.defaultNS&&e.defaultNS!==!1&&e.ns&&(typeof e.ns=="string"?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=yB();this.options={...i,...this.options,...vB(e)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);function o(b){return b?typeof b=="function"?new b:b:null}if(!this.options.isClone){this.modules.logger?xp.init(o(this.modules.logger),this.options):xp.init(null,this.options);let b;this.modules.formatter?b=this.modules.formatter:typeof Intl<"u"&&(b=MN);const I=new pB(this.options);this.store=new hB(this.options.resources,this.options);const S=this.services;S.logger=xp,S.resourceStore=this.store,S.languageUtils=I,S.pluralResolver=new bN(I,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),b&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(S.formatter=o(b),S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new xN(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new EN(o(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",function(B){for(var P=arguments.length,U=new Array(P>1?P-1:0),j=1;j<P;j++)U[j-1]=arguments[j];t.emit(B,...U)}),this.modules.languageDetector&&(S.languageDetector=o(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=o(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new PC(this.services,this.options),this.translator.on("*",function(B){for(var P=arguments.length,U=new Array(P>1?P-1:0),j=1;j<P;j++)U[j-1]=arguments[j];t.emit(B,...U)}),this.modules.external.forEach(B=>{B.init&&B.init(this)})}if(this.format=this.options.interpolation.format,n||(n=E_),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const b=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);b.length>0&&b[0]!=="dev"&&(this.options.lng=b[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(b=>{this[b]=function(){return t.store[b](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(b=>{this[b]=function(){return t.store[b](...arguments),t}});const f=py(),g=()=>{const b=(I,S)=>{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),f.resolve(S),n(I,S)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return b(null,this.t.bind(this));this.changeLanguage(this.options.lng,b)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),f}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E_;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(g=>{g!=="cimode"&&o.indexOf(g)<0&&o.push(g)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>s(f)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(t,e,n){const i=py();return t||(t=this.languages),e||(e=this.options.ns),n||(n=E_),this.services.backendConnector.reload(t,e,o=>{i.resolve(),n(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&nR.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let e=0;e<this.languages.length;e++){const n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const i=py();this.emit("languageChanging",t);const o=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},s=(f,g)=>{g?(o(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),e&&e(f,function(){return n.t(...arguments)})},a=f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const g=typeof f=="string"?f:this.services.languageUtils.getBestMatchFromCodes(f);g&&(this.language||o(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(g)),this.loadResources(g,b=>{s(b,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,e,n){var i=this;const o=function(s,a){let f;if(typeof a!="object"){for(var g=arguments.length,b=new Array(g>2?g-2:0),I=2;I<g;I++)b[I-2]=arguments[I];f=i.options.overloadTranslationOptionHandler([s,a].concat(b))}else f={...a};f.lng=f.lng||o.lng,f.lngs=f.lngs||o.lngs,f.ns=f.ns||o.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||n||o.keyPrefix);const S=i.options.keySeparator||".";let B;return f.keyPrefix&&Array.isArray(s)?B=s.map(P=>`${f.keyPrefix}${S}${P}`):B=f.keyPrefix?`${f.keyPrefix}${S}${s}`:s,i.t(B,f)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=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 n=e.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,f)=>{const g=this.services.backendConnector.state[`${a}|${f}`];return g===-1||g===2};if(e.precheck){const a=e.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,t)&&(!i||s(o,t)))}loadNamespaces(t,e){const n=py();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),e&&e(i)}),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=py();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{n.resolve(),e&&e(s)}),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=["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"],n=this.services&&this.services.languageUtils||new pB(yB());return e.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new rv(t,e)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E_;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new rv(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new hB(this.store.data,i),o.services.resourceStore=o.store),o.translator=new PC(o.services,i),o.translator.on("*",function(a){for(var f=arguments.length,g=new Array(f>1?f-1:0),b=1;b<f;b++)g[b-1]=arguments[b];o.emit(a,...g)}),o.init(i,e),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 Oc=rv.createInstance();Oc.createInstance=rv.createInstance;Oc.createInstance;Oc.dir;Oc.init;Oc.loadResources;Oc.reloadResources;Oc.use;Oc.changeLanguage;Oc.getFixedT;Oc.t;Oc.exists;Oc.setDefaultNamespace;Oc.hasLoadedNamespace;Oc.loadNamespaces;Oc.loadLanguages;const{slice:BN,forEach:IN}=[];function kN(r){return IN.call(BN.call(arguments,1),t=>{if(t)for(const e in t)r[e]===void 0&&(r[e]=t[e])}),r}const _B=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,TN=function(r,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${r}=${i}`;if(n.maxAge>0){const s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(n.domain){if(!_B.test(n.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${n.domain}`}if(n.path){if(!_B.test(n.path))throw new TypeError("option path is invalid");o+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.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},CB={create(r,t,e,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};e&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+e*60*1e3)),n&&(i.domain=n),document.cookie=TN(r,encodeURIComponent(t),i)},read(r){const t=`${r}=`,e=document.cookie.split(";");for(let n=0;n<e.length;n++){let i=e[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var PN={name:"cookie",lookup(r){let{lookupCookie:t}=r;if(t&&typeof document<"u")return CB.read(t)||void 0},cacheUserLanguage(r,t){let{lookupCookie:e,cookieMinutes:n,cookieDomain:i,cookieOptions:o}=t;e&&typeof document<"u"&&CB.create(e,r,n,i,o)}},KN={name:"querystring",lookup(r){var n;let{lookupQuerystring:t}=r,e;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let a=0;a<s.length;a++){const f=s[a].indexOf("=");f>0&&s[a].substring(0,f)===t&&(e=s[a].substring(f+1))}}return e}};let my=null;const bB=()=>{if(my!==null)return my;try{my=window!=="undefined"&&window.localStorage!==null;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{my=!1}return my};var RN={name:"localStorage",lookup(r){let{lookupLocalStorage:t}=r;if(t&&bB())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(r,t){let{lookupLocalStorage:e}=t;e&&bB()&&window.localStorage.setItem(e,r)}};let gy=null;const xB=()=>{if(gy!==null)return gy;try{gy=window!=="undefined"&&window.sessionStorage!==null;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{gy=!1}return gy};var DN={name:"sessionStorage",lookup(r){let{lookupSessionStorage:t}=r;if(t&&xB())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(r,t){let{lookupSessionStorage:e}=t;e&&xB()&&window.sessionStorage.setItem(e,r)}},LN={name:"navigator",lookup(r){const t=[];if(typeof navigator<"u"){const{languages:e,userLanguage:n,language:i}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},FN={name:"htmlTag",lookup(r){let{htmlTag:t}=r,e;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(e=n.getAttribute("lang")),e}},UN={name:"path",lookup(r){var i;let{lookupFromPathIndex:t}=r;if(typeof window>"u")return;const e=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(e)?(i=e[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},jN={name:"subdomain",lookup(r){var i,o;let{lookupFromSubdomainIndex:t}=r;const e=typeof t=="number"?t+1:1,n=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(n)return n[e]}};let rR=!1;try{document.cookie,rR=!0}catch{}const iR=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];rR||iR.splice(1,1);const zN=()=>({order:iR,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r});class oR{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,e)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=kN(e,this.options||{},zN()),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=n,this.addDetector(PN),this.addDetector(KN),this.addDetector(RN),this.addDetector(DN),this.addDetector(LN),this.addDetector(FN),this.addDetector(UN),this.addDetector(jN)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,e=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(e=e.concat(i))}}),e=e.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;e&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||e.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}oR.type="languageDetector";var NN=function(t){return{type:"backend",init:function(n,i,o){},read:function(n,i,o){if(typeof t=="function"){if(t.length<3){try{var s=t(n,i);s&&typeof s.then=="function"?s.then(function(a){return o(null,a&&a.default||a)}).catch(o):o(null,s)}catch(a){o(a)}return}t(n,i,o);return}o(null,t[n]&&t[n][i])}}},fx,wB;function GN(){return wB||(wB=1,fx={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}),fx}var WN=GN();const QN=us(WN);var qN=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function MB(r){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},e=r.match(/<\/?([^\s]+?)[/\s>]/);if(e&&(t.name=e[1],(QN[e[1]]||r.charAt(r.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var n=r.indexOf("-->");return{type:"comment",comment:n!==-1?r.slice(4,n):""}}for(var i=new RegExp(qN),o=null;(o=i.exec(r))!==null;)if(o[0].trim())if(o[1]){var s=o[1].trim(),a=[s,""];s.indexOf("=")>-1&&(a=s.split("=")),t.attrs[a[0]]=a[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var YN=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,$N=/^\s*$/,VN=Object.create(null);function aR(r,t){switch(t.type){case"text":return r+t.content;case"tag":return r+="<"+t.name+(t.attrs?function(e){var n=[];for(var i in e)n.push(i+'="'+e[i]+'"');return n.length?" "+n.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?r:r+t.children.reduce(aR,"")+"</"+t.name+">";case"comment":return r+"<!--"+t.comment+"-->"}}var HN={parse:function(r,t){t||(t={}),t.components||(t.components=VN);var e,n=[],i=[],o=-1,s=!1;if(r.indexOf("<")!==0){var a=r.indexOf("<");n.push({type:"text",content:a===-1?r:r.substring(0,a)})}return r.replace(YN,function(f,g){if(s){if(f!=="</"+e.name+">")return;s=!1}var b,I=f.charAt(1)!=="/",S=f.startsWith("<!--"),B=g+f.length,P=r.charAt(B);if(S){var U=MB(f);return o<0?(n.push(U),n):((b=i[o]).children.push(U),n)}if(I&&(o++,(e=MB(f)).type==="tag"&&t.components[e.name]&&(e.type="component",s=!0),e.voidElement||s||!P||P==="<"||e.children.push({type:"text",content:r.slice(B,r.indexOf("<",B))}),o===0&&n.push(e),(b=i[o-1])&&b.children.push(e),i[o]=e),(!I||e.voidElement)&&(o>-1&&(e.voidElement||e.name===f.slice(2,-1))&&(o--,e=o===-1?n:i[o]),!s&&P!=="<"&&P)){b=o===-1?n:i[o].children;var j=r.indexOf("<",B),q=r.slice(B,j===-1?void 0:j);$N.test(q)&&(q=" "),(j>-1&&o+b.length>=0||q!==" ")&&b.push({type:"text",content:q})}}),n},stringify:function(r){return r.reduce(function(t,e){return t+aR("",e)},"")}};const dC=(...r)=>{console!=null&&console.warn&&(Dh(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),console.warn(...r))},SB={},KC=(...r)=>{Dh(r[0])&&SB[r[0]]||(Dh(r[0])&&(SB[r[0]]=new Date),dC(...r))},sR=(r,t)=>()=>{if(r.isInitialized)t();else{const e=()=>{setTimeout(()=>{r.off("initialized",e)},0),t()};r.on("initialized",e)}},EB=(r,t,e)=>{r.loadNamespaces(t,sR(r,e))},OB=(r,t,e,n)=>{Dh(e)&&(e=[e]),e.forEach(i=>{r.options.ns.indexOf(i)<0&&r.options.ns.push(i)}),r.loadLanguages(t,sR(r,n))},ZN=(r,t,e={})=>!t.languages||!t.languages.length?(KC("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(r,{lng:e.lng,precheck:(n,i)=>{var o;if(((o=e.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,r))return!1}}),XN=r=>r.displayName||r.name||(Dh(r)&&r.length>0?r:"Unknown"),Dh=r=>typeof r=="string",o1=r=>typeof r=="object"&&r!==null,JN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,eG={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},tG=r=>eG[r],nG=r=>r.replace(JN,tG);let lS={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:nG};const rG=(r={})=>{lS={...lS,...r}},lR=()=>lS;let uR;const iG=r=>{uR=r},IE=()=>uR,px=(r,t)=>{var n;if(!r)return!1;const e=((n=r.props)==null?void 0:n.children)??r.children;return t?e.length>0:!!e},mx=r=>{var e,n;if(!r)return[];const t=((e=r.props)==null?void 0:e.children)??r.children;return(n=r.props)!=null&&n.i18nIsDynamicList?a1(t):t},oG=r=>Array.isArray(r)&&r.every(di.isValidElement),a1=r=>Array.isArray(r)?r:[r],aG=(r,t)=>{const e={...t};return e.props=Object.assign(r.props,t.props),e},AR=(r,t)=>{if(!r)return"";let e="";const n=a1(r),i=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return n.forEach((o,s)=>{if(Dh(o))e+=`${o}`;else if(di.isValidElement(o)){const{props:a,type:f}=o,g=Object.keys(a).length,b=i.indexOf(f)>-1,I=a.children;if(!I&&b&&!g)e+=`<${f}/>`;else if(!I&&(!b||g)||a.i18nIsDynamicList)e+=`<${s}></${s}>`;else if(b&&g===1&&Dh(I))e+=`<${f}>${I}</${f}>`;else{const S=AR(I,t);e+=`<${s}>${S}</${s}>`}}else if(o===null)dC("Trans: the passed in value is invalid - seems you passed in a null child.");else if(o1(o)){const{format:a,...f}=o,g=Object.keys(f);if(g.length===1){const b=a?`${g[0]}, ${a}`:g[0];e+=`{{${b}}}`}else dC("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else dC("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)}),e},sG=(r,t,e,n,i,o)=>{if(t==="")return[];const s=n.transKeepBasicHtmlNodesFor||[],a=t&&new RegExp(s.map(j=>`<${j}`).join("|")).test(t);if(!r&&!a&&!o)return[t];const f={},g=j=>{a1(j).forEach(W=>{Dh(W)||(px(W)?g(mx(W)):o1(W)&&!di.isValidElement(W)&&Object.assign(f,W))})};g(r);const b=HN.parse(`<0>${t}</0>`),I={...f,...i},S=(j,q,W)=>{var $;const ee=mx(j),J=P(ee,q.children,W);return oG(ee)&&J.length===0||($=j.props)!=null&&$.i18nIsDynamicList?ee:J},B=(j,q,W,ee,J)=>{j.dummy?(j.children=q,W.push(di.cloneElement(j,{key:ee},J?void 0:q))):W.push(...di.Children.map([j],$=>{const X={...$.props};return delete X.i18nIsDynamicList,di.createElement($.type,{...X,key:ee,ref:$.ref},J?null:q)}))},P=(j,q,W)=>{const ee=a1(j);return a1(q).reduce(($,X,G)=>{var ge,he;const ae=((he=(ge=X.children)==null?void 0:ge[0])==null?void 0:he.content)&&e.services.interpolator.interpolate(X.children[0].content,I,e.language);if(X.type==="tag"){let Ie=ee[parseInt(X.name,10)];W.length===1&&!Ie&&(Ie=W[0][X.name]),Ie||(Ie={});const re=Object.keys(X.attrs).length!==0?aG({props:X.attrs},Ie):Ie,oe=di.isValidElement(re),Se=oe&&px(X,!0)&&!X.voidElement,ye=a&&o1(re)&&re.dummy&&!oe,nt=o1(r)&&Object.hasOwnProperty.call(r,X.name);if(Dh(re)){const Ne=e.services.interpolator.interpolate(re,I,e.language);$.push(Ne)}else if(px(re)||Se){const Ne=S(re,X,W);B(re,Ne,$,G)}else if(ye){const Ne=P(ee,X.children,W);B(re,Ne,$,G)}else if(Number.isNaN(parseFloat(X.name)))if(nt){const Ne=S(re,X,W);B(re,Ne,$,G,X.voidElement)}else if(n.transSupportBasicHtmlNodes&&s.indexOf(X.name)>-1)if(X.voidElement)$.push(di.createElement(X.name,{key:`${X.name}-${G}`}));else{const Ne=P(ee,X.children,W);$.push(di.createElement(X.name,{key:`${X.name}-${G}`},Ne))}else if(X.voidElement)$.push(`<${X.name} />`);else{const Ne=P(ee,X.children,W);$.push(`<${X.name}>${Ne}</${X.name}>`)}else if(o1(re)&&!oe){const Ne=X.children[0]?ae:null;Ne&&$.push(Ne)}else B(re,ae,$,G,X.children.length!==1||!ae)}else if(X.type==="text"){const Ie=n.transWrapTextNodes,re=o?n.unescape(e.services.interpolator.interpolate(X.content,I,e.language)):e.services.interpolator.interpolate(X.content,I,e.language);Ie?$.push(di.createElement(Ie,{key:`${X.name}-${G}`},re)):$.push(re)}return $},[])},U=P([{dummy:!0,children:r||[]}],b,a1(r||[]));return mx(U[0])};function lG({children:r,count:t,parent:e,i18nKey:n,context:i,tOptions:o={},values:s,defaults:a,components:f,ns:g,i18n:b,t:I,shouldUnescape:S,...B}){var Ie,re,oe,Se;const P=b||IE();if(!P)return KC("You will need to pass in an i18next instance by using i18nextReactModule"),r;const U=I||P.t.bind(P)||(ye=>ye),j={...lR(),...(Ie=P.options)==null?void 0:Ie.react};let q=g||U.ns||((re=P.options)==null?void 0:re.defaultNS);q=Dh(q)?[q]:q||["translation"];const W=AR(r,j),ee=a||W||j.transEmptyNodeValue||n,{hashTransKey:J}=j,$=n||(J?J(W||ee):W||ee);(Se=(oe=P.options)==null?void 0:oe.interpolation)!=null&&Se.defaultVariables&&(s=s&&Object.keys(s).length>0?{...s,...P.options.interpolation.defaultVariables}:{...P.options.interpolation.defaultVariables});const X=s||t!==void 0||!r?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},G={...o,context:i||o.context,count:t,...s,...X,defaultValue:ee,ns:q},ae=$?U($,G):ee;f&&Object.keys(f).forEach(ye=>{const nt=f[ye];if(typeof nt.type=="function"||!nt.props||!nt.props.children||ae.indexOf(`${ye}/>`)<0&&ae.indexOf(`${ye} />`)<0)return;function Ne(){return di.createElement(di.Fragment,null,nt)}f[ye]=di.createElement(Ne)});const ge=sG(f||r,ae,P,j,G,S),he=e??j.defaultTransParent;return he?di.createElement(he,B,ge):ge}const uG={type:"3rdParty",init(r){rG(r.options.react),iG(r)}},cR=di.createContext();class AG{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(e=>{var n;(n=this.usedNamespaces)[e]??(n[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Jm({children:r,count:t,parent:e,i18nKey:n,context:i,tOptions:o={},values:s,defaults:a,components:f,ns:g,i18n:b,t:I,shouldUnescape:S,...B}){var W;const{i18n:P,defaultNS:U}=di.useContext(cR)||{},j=b||P||IE(),q=I||(j==null?void 0:j.t.bind(j));return lG({children:r,count:t,parent:e,i18nKey:n,context:i,tOptions:o,values:s,defaults:a,components:f,ns:g||(q==null?void 0:q.ns)||U||((W=j==null?void 0:j.options)==null?void 0:W.defaultNS),i18n:j,t:I,shouldUnescape:S,...B})}const cG=(r,t)=>{const e=di.useRef();return di.useEffect(()=>{e.current=r},[r,t]),e.current},dR=(r,t,e,n)=>r.getFixedT(t,e,n),dG=(r,t,e,n)=>di.useCallback(dR(r,t,e,n),[r,t,e,n]),hG=(r,t={})=>{var J,$,X,G;const{i18n:e}=t,{i18n:n,defaultNS:i}=di.useContext(cR)||{},o=e||n||IE();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new AG),!o){KC("You will need to pass in an i18next instance by using initReactI18next");const ae=(he,Ie)=>Dh(Ie)?Ie:o1(Ie)&&Dh(Ie.defaultValue)?Ie.defaultValue:Array.isArray(he)?he[he.length-1]:he,ge=[ae,{},!1];return ge.t=ae,ge.i18n={},ge.ready=!1,ge}(J=o.options.react)!=null&&J.wait&&KC("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...lR(),...o.options.react,...t},{useSuspense:a,keyPrefix:f}=s;let g=i||(($=o.options)==null?void 0:$.defaultNS);g=Dh(g)?[g]:g||["translation"],(G=(X=o.reportNamespaces).addUsedNamespaces)==null||G.call(X,g);const b=(o.isInitialized||o.initializedStoreOnce)&&g.every(ae=>ZN(ae,o,s)),I=dG(o,t.lng||null,s.nsMode==="fallback"?g:g[0],f),S=()=>I,B=()=>dR(o,t.lng||null,s.nsMode==="fallback"?g:g[0],f),[P,U]=di.useState(S);let j=g.join();t.lng&&(j=`${t.lng}${j}`);const q=cG(j),W=di.useRef(!0);di.useEffect(()=>{const{bindI18n:ae,bindI18nStore:ge}=s;W.current=!0,!b&&!a&&(t.lng?OB(o,t.lng,g,()=>{W.current&&U(B)}):EB(o,g,()=>{W.current&&U(B)})),b&&q&&q!==j&&W.current&&U(B);const he=()=>{W.current&&U(B)};return ae&&(o==null||o.on(ae,he)),ge&&(o==null||o.store.on(ge,he)),()=>{W.current=!1,o&&(ae==null||ae.split(" ").forEach(Ie=>o.off(Ie,he))),ge&&o&&ge.split(" ").forEach(Ie=>o.store.off(Ie,he))}},[o,j]),di.useEffect(()=>{W.current&&b&&U(S)},[o,f,b]);const ee=[P,o,b];if(ee.t=P,ee.i18n=o,ee.ready=b,b||!b&&!a)return ee;throw new Promise(ae=>{t.lng?OB(o,t.lng,g,()=>ae()):EB(o,g,()=>ae())})},qa=(r,t={})=>function(n){function i({forwardedRef:s,...a}){const[f,g,b]=hG(r,{...a,keyPrefix:t.keyPrefix}),I={...a,t:f,i18n:g,tReady:b};return t.withRef&&s?I.ref=s:!t.withRef&&s&&(I.forwardedRef=s),di.createElement(n,I)}i.displayName=`withI18nextTranslation(${XN(n)})`,i.WrappedComponent=n;const o=(s,a)=>di.createElement(i,Object.assign({},s,{forwardedRef:a}));return t.withRef?di.forwardRef(o):i};function yl(){var r="/home/runner/work/maputnik/maputnik/src/i18n.ts",t="d8f26cf16d2bfe94f6075e04546db610e7ce65b5",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/i18n.ts",statementMap:{0:{start:{line:5,column:34},end:{line:12,column:1}},1:{start:{line:13,column:0},end:{line:39,column:3}},2:{start:{line:15,column:4},end:{line:17,column:5}},3:{start:{line:16,column:6},end:{line:16,column:16}},4:{start:{line:18,column:4},end:{line:18,column:514}},5:{start:{line:18,column:119},end:{line:18,column:158}},6:{start:{line:18,column:198},end:{line:18,column:237}},7:{start:{line:18,column:277},end:{line:18,column:316}},8:{start:{line:18,column:356},end:{line:18,column:395}},9:{start:{line:18,column:435},end:{line:18,column:474}},10:{start:{line:34,column:4},end:{line:36,column:5}},11:{start:{line:35,column:6},end:{line:35,column:13}},12:{start:{line:37,column:4},end:{line:37,column:77}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:21},end:{line:14,column:22}},loc:{start:{line:14,column:35},end:{line:19,column:3}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:18,column:113},end:{line:18,column:114}},loc:{start:{line:18,column:119},end:{line:18,column:158}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:18,column:192},end:{line:18,column:193}},loc:{start:{line:18,column:198},end:{line:18,column:237}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:18,column:271},end:{line:18,column:272}},loc:{start:{line:18,column:277},end:{line:18,column:316}},line:18},4:{name:"(anonymous_4)",decl:{start:{line:18,column:350},end:{line:18,column:351}},loc:{start:{line:18,column:356},end:{line:18,column:395}},line:18},5:{name:"(anonymous_5)",decl:{start:{line:18,column:429},end:{line:18,column:430}},loc:{start:{line:18,column:435},end:{line:18,column:474}},line:18},6:{name:"(anonymous_6)",decl:{start:{line:33,column:21},end:{line:33,column:22}},loc:{start:{line:33,column:41},end:{line:38,column:3}},line:33}},branchMap:{0:{loc:{start:{line:15,column:4},end:{line:17,column:5}},type:"if",locations:[{start:{line:15,column:4},end:{line:17,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},1:{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}},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,6:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/i18n.ts"],names:[],mappings:"AAAA,MAAA,CAAA,oCAAA,CAAA,IAAA,CAAA,CAAA,CAAA,IAAA,CAAA,OAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAA,MAAA,CAAO,IAAU,CAAA,IAAA,CAAA,CAAA,OAAA,CAAA;AACjB,MAAA,CAAO,QAAc,CAAA,IAAA,CAAA,CAAA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA;AACrB,MAAA,CAAO,kBAAwB,CAAA,IAAA,CAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,CAAA,OAAA,CAAA;AAC/B,MAAA,CAAA,CAAA,CAAS,gBAAwB,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,KAAA,CAAA,OAAA,CAAA;AAE1B,MAAA,CAAA,KAAA,CAAM,kBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChC,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,GAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACR,CAAA;AAEA,IACG,CAAA,GAAA,CAAI,QAAQ,CACZ,CAAA,GAAA;AAAA,CACC,CAAA,kBAAA,CAAmB,CAAC,IAAA,CAAA,CAAc,EAAe,CAAA,CAAA,CAAA,CAAA,CAAA;AAC/C,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAI,SAAS,CAAM,EAAA,CAAA,CAAA,CAAA;AAEjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,CAAC,CAAA;AAAA,CACV,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,oCAA8B,CAAA,CAAA,2aAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC;AACH,CACC,CAAA,GAAA,CAAI,gBAAgB,CAAA,CACpB,IAAK,CAAA;AAAA,CACJ,CAAA,aAAA,CAAA,CAAe,MAAO,CAAA,IAAA,CAAK,kBAAkB,CAAA;AAAA,CAAA,CAC7C,YAAc,CAAA,CAAA,KAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,IAAA,CAAA,EAAA,CAAA,IAAA,CAAA,QAAA,CAAA;AAAA,CAAA,CACd,WAAa,CAAA,CAAA,KAAA;AAAA,CAAA,CACb,aAAe,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACb,WAAa,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,GAAA,CAAA;AAAA,CACf,CAAA,CAAA;AAAA,CAAA,CACA,WAAa,CAAA,CAAA,IAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,iBAAA,CAAA,EAAA,CAAA;AAAA,CAAA,CACb,WAAa,CAAA,CAAA,KAAA;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;AAAA,CAAA,CACb,iBAAmB,CAAA,CAAA,CAAC,IAAM,CAAA,CAAA,GAAA,CAAA,CAAK,GAAQ,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;AAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA;AAAA,CAAQ,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;AAAA,CACzE,CAAA;AACF,CAAC,CAAA;AAEH,MAAe,CAAA,OAAA,CAAA,IAAA;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d8f26cf16d2bfe94f6075e04546db610e7ce65b5"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return yl=function(){return s},s}yl();const hR=(yl().s[0]++,{de:"Deutsch",en:"English",fr:"Français",he:"עברית",ja:"日本語",zh:"简体中文"});yl().s[1]++;Oc.use(oR).use(NN((r,t)=>(yl().f[0]++,yl().s[2]++,r==="en"?(yl().b[0][0]++,yl().s[3]++,{}):(yl().b[0][1]++,yl().s[4]++,oN(Object.assign({"./locales/de/translation.json":()=>(yl().f[1]++,yl().s[5]++,fy(()=>import("./translation-jw99Nxvk.js"),[])),"./locales/fr/translation.json":()=>(yl().f[2]++,yl().s[6]++,fy(()=>import("./translation-BG6vn6wi.js"),[])),"./locales/he/translation.json":()=>(yl().f[3]++,yl().s[7]++,fy(()=>import("./translation-y_pBWWYu.js"),[])),"./locales/ja/translation.json":()=>(yl().f[4]++,yl().s[8]++,fy(()=>import("./translation-CM4Rn8lU.js"),[])),"./locales/zh/translation.json":()=>(yl().f[5]++,yl().s[9]++,fy(()=>import("./translation-DHsMJ3Qo.js"),[]))}),`./locales/${r}/${t}.json`,4))))).use(uG).init({supportedLngs:Object.keys(hR),keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},saveMissing:!0,fallbackLng:!1,missingKeyHandler:(r,t,e)=>{if(yl().f[6]++,yl().s[10]++,r[0]==="en"){yl().b[1][0]++,yl().s[11]++;return}else yl().b[1][1]++;yl().s[12]++,console.warn(`Missing translation for "${e}" in "${r.join(", ")}"`)}});var O_={exports:{}},BB;function fG(){return BB||(BB=1,function(r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var e=["constructor","render","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount"],n=[];function i(s){if(s===void 0){console.error("Autobind error: No context provided.");return}var a=Object.getPrototypeOf(s);arguments.length>1?n=Array.prototype.slice.call(arguments,1):n=Object.getOwnPropertyNames(a),n.forEach(function(f){var g=Object.getOwnPropertyDescriptor(a,f);if(g===void 0){console.warn('Autobind: "'+f+'" method not found in class.');return}e.indexOf(f)!==-1||typeof g.value!="function"||Object.defineProperty(a,f,o(a,f,g))})}function o(s,a,f){var g=f.value;return{configurable:!0,get:function(){if(this===s||this.hasOwnProperty(a))return g;var I=g.bind(this);return Object.defineProperty(this,a,{value:I,configurable:!0,writable:!0}),I}}}r.exports=t.default}(O_,O_.exports)),O_.exports}var gx,IB;function pG(){return IB||(IB=1,gx=fG()),gx}var mG=pG();const gG=us(mG);var Ey={exports:{}};Ey.exports;var kB;function yG(){return kB||(kB=1,function(r,t){var e=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",f="[object Date]",g="[object Error]",b="[object Function]",I="[object GeneratorFunction]",S="[object Map]",B="[object Number]",P="[object Object]",U="[object Promise]",j="[object RegExp]",q="[object Set]",W="[object String]",ee="[object Symbol]",J="[object WeakMap]",$="[object ArrayBuffer]",X="[object DataView]",G="[object Float32Array]",ae="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",Ie="[object Int32Array]",re="[object Uint8Array]",oe="[object Uint8ClampedArray]",Se="[object Uint16Array]",ye="[object Uint32Array]",nt=/[\\^$.*+?()[\]{}|]/g,Ne=/\w*$/,je=/^\[object .+?Constructor\]$/,et=/^(?:0|[1-9]\d*)$/,Ue={};Ue[o]=Ue[s]=Ue[$]=Ue[X]=Ue[a]=Ue[f]=Ue[G]=Ue[ae]=Ue[ge]=Ue[he]=Ue[Ie]=Ue[S]=Ue[B]=Ue[P]=Ue[j]=Ue[q]=Ue[W]=Ue[ee]=Ue[re]=Ue[oe]=Ue[Se]=Ue[ye]=!0,Ue[g]=Ue[b]=Ue[J]=!1;var ke=typeof window=="object"&&window&&window.Object===Object&&window,We=typeof self=="object"&&self&&self.Object===Object&&self,vt=ke||We||Function("return this")(),Pt=t&&!t.nodeType&&t,ut=Pt&&!0&&r&&!r.nodeType&&r,jt=ut&&ut.exports===Pt;function Rt(te,Ee){return te.set(Ee[0],Ee[1]),te}function Ke(te,Ee){return te.add(Ee),te}function we(te,Ee){for(var ot=-1,$t=te?te.length:0;++ot<$t&&Ee(te[ot],ot,te)!==!1;);return te}function Fe(te,Ee){for(var ot=-1,$t=Ee.length,Sr=te.length;++ot<$t;)te[Sr+ot]=Ee[ot];return te}function tt(te,Ee,ot,$t){for(var Sr=-1,Nn=te?te.length:0;++Sr<Nn;)ot=Ee(ot,te[Sr],Sr,te);return ot}function mt(te,Ee){for(var ot=-1,$t=Array(te);++ot<te;)$t[ot]=Ee(ot);return $t}function bt(te,Ee){return te==null?void 0:te[Ee]}function Lt(te){var Ee=!1;if(te!=null&&typeof te.toString!="function")try{Ee=!!(te+"")}catch{}return Ee}function Vt(te){var Ee=-1,ot=Array(te.size);return te.forEach(function($t,Sr){ot[++Ee]=[Sr,$t]}),ot}function rn(te,Ee){return function(ot){return te(Ee(ot))}}function Sn(te){var Ee=-1,ot=Array(te.size);return te.forEach(function($t){ot[++Ee]=$t}),ot}var Ar=Array.prototype,Bn=Function.prototype,ar=Object.prototype,Cr=vt["__core-js_shared__"],br=function(){var te=/[^.]+$/.exec(Cr&&Cr.keys&&Cr.keys.IE_PROTO||"");return te?"Symbol(src)_1."+te:""}(),_r=Bn.toString,Jr=ar.hasOwnProperty,wr=ar.toString,hi=RegExp("^"+_r.call(Jr).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=jt?vt.Buffer:void 0,de=vt.Symbol,pe=vt.Uint8Array,Je=rn(Object.getPrototypeOf,Object),kt=Object.create,Xt=ar.propertyIsEnumerable,it=Ar.splice,Ut=Object.getOwnPropertySymbols,qe=Ye?Ye.isBuffer:void 0,fe=rn(Object.keys,Object),xe=kr(vt,"DataView"),p=kr(vt,"Map"),Qe=kr(vt,"Promise"),pt=kr(vt,"Set"),ft=kr(vt,"WeakMap"),Et=kr(Object,"create"),Ct=co(xe),nn=co(p),Yt=co(Qe),Gt=co(pt),wt=co(ft),Tn=de?de.prototype:void 0,En=Tn?Tn.valueOf:void 0;function sr(te){var Ee=-1,ot=te?te.length:0;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function Pr(){this.__data__=Et?Et(null):{}}function an(te){return this.has(te)&&delete this.__data__[te]}function Wn(te){var Ee=this.__data__;if(Et){var ot=Ee[te];return ot===n?void 0:ot}return Jr.call(Ee,te)?Ee[te]:void 0}function ir(te){var Ee=this.__data__;return Et?Ee[te]!==void 0:Jr.call(Ee,te)}function zr(te,Ee){var ot=this.__data__;return ot[te]=Et&&Ee===void 0?n:Ee,this}sr.prototype.clear=Pr,sr.prototype.delete=an,sr.prototype.get=Wn,sr.prototype.has=ir,sr.prototype.set=zr;function fr(te){var Ee=-1,ot=te?te.length:0;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function hr(){this.__data__=[]}function zn(te){var Ee=this.__data__,ot=ms(Ee,te);if(ot<0)return!1;var $t=Ee.length-1;return ot==$t?Ee.pop():it.call(Ee,ot,1),!0}function Pi(te){var Ee=this.__data__,ot=ms(Ee,te);return ot<0?void 0:Ee[ot][1]}function po(te){return ms(this.__data__,te)>-1}function ri(te,Ee){var ot=this.__data__,$t=ms(ot,te);return $t<0?ot.push([te,Ee]):ot[$t][1]=Ee,this}fr.prototype.clear=hr,fr.prototype.delete=zn,fr.prototype.get=Pi,fr.prototype.has=po,fr.prototype.set=ri;function Xr(te){var Ee=-1,ot=te?te.length:0;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function ii(){this.__data__={hash:new sr,map:new(p||fr),string:new sr}}function mo(te){return sa(this,te).delete(te)}function Mi(te){return sa(this,te).get(te)}function ka(te){return sa(this,te).has(te)}function ns(te,Ee){return sa(this,te).set(te,Ee),this}Xr.prototype.clear=ii,Xr.prototype.delete=mo,Xr.prototype.get=Mi,Xr.prototype.has=ka,Xr.prototype.set=ns;function wo(te){this.__data__=new fr(te)}function Ua(){this.__data__=new fr}function Ya(te){return this.__data__.delete(te)}function Vi(te){return this.__data__.get(te)}function Rl(te){return this.__data__.has(te)}function Ps(te,Ee){var ot=this.__data__;if(ot instanceof fr){var $t=ot.__data__;if(!p||$t.length<e-1)return $t.push([te,Ee]),this;ot=this.__data__=new Xr($t)}return ot.set(te,Ee),this}wo.prototype.clear=Ua,wo.prototype.delete=Ya,wo.prototype.get=Vi,wo.prototype.has=Rl,wo.prototype.set=Ps;function ki(te,Ee){var ot=Pa(te)||qs(te)?mt(te.length,String):[],$t=ot.length,Sr=!!$t;for(var Nn in te)Jr.call(te,Nn)&&!(Sr&&(Nn=="length"||au(Nn,$t)))&&ot.push(Nn);return ot}function Mr(te,Ee,ot){var $t=te[Ee];(!(Jr.call(te,Ee)&&xa($t,ot))||ot===void 0&&!(Ee in te))&&(te[Ee]=ot)}function ms(te,Ee){for(var ot=te.length;ot--;)if(xa(te[ot][0],Ee))return ot;return-1}function oa(te,Ee){return te&&Ai(Ee,Wi(Ee),te)}function ba(te,Ee,ot,$t,Sr,Nn,si){var fi;if($t&&(fi=Nn?$t(te,Sr,Nn,si):$t(te)),fi!==void 0)return fi;if(!Zr(te))return te;var pr=Pa(te);if(pr){if(fi=Ta(te),!Ee)return rs(te,fi)}else{var Er=Qs(te),Ci=Er==b||Er==I;if(Ji(te))return Qn(te,Ee);if(Er==P||Er==o||Ci&&!Nn){if(Lt(te))return Nn?te:{};if(fi=Mo(Ci?{}:te),!Ee)return As(te,oa(fi,te))}else{if(!Ue[Er])return Nn?te:{};fi=ja(te,Er,ba,Ee)}}si||(si=new wo);var So=si.get(te);if(So)return So;if(si.set(te,fi),!pr)var Ri=ot?Ju(te):Wi(te);return we(Ri||te,function(Nr,eo){Ri&&(eo=Nr,Nr=te[eo]),Mr(fi,eo,ba(Nr,Ee,ot,$t,eo,te,si))}),fi}function Ge(te){return Zr(te)?kt(te):{}}function _t(te,Ee,ot){var $t=Ee(te);return Pa(te)?$t:Fe($t,ot(te))}function cn(te){return wr.call(te)}function jn(te){if(!Zr(te)||ea(te))return!1;var Ee=$l(te)||Lt(te)?hi:je;return Ee.test(co(te))}function An(te){if(!$a(te))return fe(te);var Ee=[];for(var ot in Object(te))Jr.call(te,ot)&&ot!="constructor"&&Ee.push(ot);return Ee}function Qn(te,Ee){if(Ee)return te.slice();var ot=new te.constructor(te.length);return te.copy(ot),ot}function _i(te){var Ee=new te.constructor(te.byteLength);return new pe(Ee).set(new pe(te)),Ee}function Ki(te,Ee){var ot=Ee?_i(te.buffer):te.buffer;return new te.constructor(ot,te.byteOffset,te.byteLength)}function Xi(te,Ee,ot){var $t=Ee?ot(Vt(te),!0):Vt(te);return tt($t,Rt,new te.constructor)}function aa(te){var Ee=new te.constructor(te.source,Ne.exec(te));return Ee.lastIndex=te.lastIndex,Ee}function Mu(te,Ee,ot){var $t=Ee?ot(Sn(te),!0):Sn(te);return tt($t,Ke,new te.constructor)}function Hr(te){return En?Object(En.call(te)):{}}function ci(te,Ee){var ot=Ee?_i(te.buffer):te.buffer;return new te.constructor(ot,te.byteOffset,te.length)}function rs(te,Ee){var ot=-1,$t=te.length;for(Ee||(Ee=Array($t));++ot<$t;)Ee[ot]=te[ot];return Ee}function Ai(te,Ee,ot,$t){ot||(ot={});for(var Sr=-1,Nn=Ee.length;++Sr<Nn;){var si=Ee[Sr],fi=void 0;Mr(ot,si,fi===void 0?te[si]:fi)}return ot}function As(te,Ee){return Ai(te,Oi(te),Ee)}function Ju(te){return _t(te,Wi,Oi)}function sa(te,Ee){var ot=te.__data__;return Dl(Ee)?ot[typeof Ee=="string"?"string":"hash"]:ot.map}function kr(te,Ee){var ot=bt(te,Ee);return jn(ot)?ot:void 0}var Oi=Ut?rn(Ut,Object):lo,Qs=cn;(xe&&Qs(new xe(new ArrayBuffer(1)))!=X||p&&Qs(new p)!=S||Qe&&Qs(Qe.resolve())!=U||pt&&Qs(new pt)!=q||ft&&Qs(new ft)!=J)&&(Qs=function(te){var Ee=wr.call(te),ot=Ee==P?te.constructor:void 0,$t=ot?co(ot):void 0;if($t)switch($t){case Ct:return X;case nn:return S;case Yt:return U;case Gt:return q;case wt:return J}return Ee});function Ta(te){var Ee=te.length,ot=te.constructor(Ee);return Ee&&typeof te[0]=="string"&&Jr.call(te,"index")&&(ot.index=te.index,ot.input=te.input),ot}function Mo(te){return typeof te.constructor=="function"&&!$a(te)?Ge(Je(te)):{}}function ja(te,Ee,ot,$t){var Sr=te.constructor;switch(Ee){case $:return _i(te);case a:case f:return new Sr(+te);case X:return Ki(te,$t);case G:case ae:case ge:case he:case Ie:case re:case oe:case Se:case ye:return ci(te,$t);case S:return Xi(te,$t,ot);case B:case W:return new Sr(te);case j:return aa(te);case q:return Mu(te,$t,ot);case ee:return Hr(te)}}function au(te,Ee){return Ee=Ee??i,!!Ee&&(typeof te=="number"||et.test(te))&&te>-1&&te%1==0&&te<Ee}function Dl(te){var Ee=typeof te;return Ee=="string"||Ee=="number"||Ee=="symbol"||Ee=="boolean"?te!=="__proto__":te===null}function ea(te){return!!br&&br in te}function $a(te){var Ee=te&&te.constructor,ot=typeof Ee=="function"&&Ee.prototype||ar;return te===ot}function co(te){if(te!=null){try{return _r.call(te)}catch{}try{return te+""}catch{}}return""}function pa(te){return ba(te,!0,!0)}function xa(te,Ee){return te===Ee||te!==te&&Ee!==Ee}function qs(te){return eA(te)&&Jr.call(te,"callee")&&(!Xt.call(te,"callee")||wr.call(te)==o)}var Pa=Array.isArray;function Cl(te){return te!=null&&zi(te.length)&&!$l(te)}function eA(te){return Vl(te)&&Cl(te)}var Ji=qe||Di;function $l(te){var Ee=Zr(te)?wr.call(te):"";return Ee==b||Ee==I}function zi(te){return typeof te=="number"&&te>-1&&te%1==0&&te<=i}function Zr(te){var Ee=typeof te;return!!te&&(Ee=="object"||Ee=="function")}function Vl(te){return!!te&&typeof te=="object"}function Wi(te){return Cl(te)?ki(te):An(te)}function lo(){return[]}function Di(){return!1}r.exports=pa}(Ey,Ey.exports)),Ey.exports}var vG=yG();const TB=us(vG);var yx,PB;function _G(){if(PB)return yx;PB=1;var r=NaN,t="[object Symbol]",e=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,a=Object.prototype,f=a.toString;function g(U,j,q){return U===U&&(q!==void 0&&(U=U<=q?U:q),j!==void 0&&(U=U>=j?U:j)),U}function b(U){var j=typeof U;return!!U&&(j=="object"||j=="function")}function I(U){return!!U&&typeof U=="object"}function S(U){return typeof U=="symbol"||I(U)&&f.call(U)==t}function B(U){if(typeof U=="number")return U;if(S(U))return r;if(b(U)){var j=typeof U.valueOf=="function"?U.valueOf():U;U=b(j)?j+"":j}if(typeof U!="string")return U===0?U:+U;U=U.replace(e,"");var q=i.test(U);return q||o.test(U)?s(U.slice(2),q?2:8):n.test(U)?r:+U}function P(U,j,q){return q===void 0&&(q=j,j=void 0),q!==void 0&&(q=B(q),q=q===q?q:0),j!==void 0&&(j=B(j),j=j===j?j:0),g(B(U),j,q)}return yx=P,yx}var CG=_G();const KB=us(CG);var vx={},yy={},RB;function bG(){if(RB)return yy;RB=1,yy.byteLength=a,yy.toByteArray=g,yy.fromByteArray=S;for(var r=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)r[i]=n[i],t[n.charCodeAt(i)]=i;t[45]=62,t[95]=63;function s(B){var P=B.length;if(P%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var U=B.indexOf("=");U===-1&&(U=P);var j=U===P?0:4-U%4;return[U,j]}function a(B){var P=s(B),U=P[0],j=P[1];return(U+j)*3/4-j}function f(B,P,U){return(P+U)*3/4-U}function g(B){var P,U=s(B),j=U[0],q=U[1],W=new e(f(B,j,q)),ee=0,J=q>0?j-4:j,$;for($=0;$<J;$+=4)P=t[B.charCodeAt($)]<<18|t[B.charCodeAt($+1)]<<12|t[B.charCodeAt($+2)]<<6|t[B.charCodeAt($+3)],W[ee++]=P>>16&255,W[ee++]=P>>8&255,W[ee++]=P&255;return q===2&&(P=t[B.charCodeAt($)]<<2|t[B.charCodeAt($+1)]>>4,W[ee++]=P&255),q===1&&(P=t[B.charCodeAt($)]<<10|t[B.charCodeAt($+1)]<<4|t[B.charCodeAt($+2)]>>2,W[ee++]=P>>8&255,W[ee++]=P&255),W}function b(B){return r[B>>18&63]+r[B>>12&63]+r[B>>6&63]+r[B&63]}function I(B,P,U){for(var j,q=[],W=P;W<U;W+=3)j=(B[W]<<16&16711680)+(B[W+1]<<8&65280)+(B[W+2]&255),q.push(b(j));return q.join("")}function S(B){for(var P,U=B.length,j=U%3,q=[],W=16383,ee=0,J=U-j;ee<J;ee+=W)q.push(I(B,ee,ee+W>J?J:ee+W));return j===1?(P=B[U-1],q.push(r[P>>2]+r[P<<4&63]+"==")):j===2&&(P=(B[U-2]<<8)+B[U-1],q.push(r[P>>10]+r[P>>4&63]+r[P<<2&63]+"=")),q.join("")}return yy}var B_={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var DB;function fR(){return DB||(DB=1,B_.read=function(r,t,e,n,i){var o,s,a=i*8-n-1,f=(1<<a)-1,g=f>>1,b=-7,I=e?i-1:0,S=e?-1:1,B=r[t+I];for(I+=S,o=B&(1<<-b)-1,B>>=-b,b+=a;b>0;o=o*256+r[t+I],I+=S,b-=8);for(s=o&(1<<-b)-1,o>>=-b,b+=n;b>0;s=s*256+r[t+I],I+=S,b-=8);if(o===0)o=1-g;else{if(o===f)return s?NaN:(B?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-g}return(B?-1:1)*s*Math.pow(2,o-n)},B_.write=function(r,t,e,n,i,o){var s,a,f,g=o*8-i-1,b=(1<<g)-1,I=b>>1,S=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=n?0:o-1,P=n?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=b):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+I>=1?t+=S/f:t+=S*Math.pow(2,1-I),t*f>=2&&(s++,f/=2),s+I>=b?(a=0,s=b):s+I>=1?(a=(t*f-1)*Math.pow(2,i),s=s+I):(a=t*Math.pow(2,I-1)*Math.pow(2,i),s=0));i>=8;r[e+B]=a&255,B+=P,a/=256,i-=8);for(s=s<<i|a,g+=i;g>0;r[e+B]=s&255,B+=P,s/=256,g-=8);r[e+B-P]|=U*128}),B_}/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/var LB;function xG(){return LB||(LB=1,function(r){const t=bG(),e=fR(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=a,r.SlowBuffer=W,r.INSPECT_MAX_BYTES=50;const i=2147483647;r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.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 Ye=new Uint8Array(1),de={foo:function(){return 42}};return Object.setPrototypeOf(de,Uint8Array.prototype),Object.setPrototypeOf(Ye,de),Ye.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(Ye){if(Ye>i)throw new RangeError('The value "'+Ye+'" is invalid for option "size"');const de=new Uint8Array(Ye);return Object.setPrototypeOf(de,a.prototype),de}function a(Ye,de,pe){if(typeof Ye=="number"){if(typeof de=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(Ye)}return f(Ye,de,pe)}a.poolSize=8192;function f(Ye,de,pe){if(typeof Ye=="string")return S(Ye,de);if(ArrayBuffer.isView(Ye))return P(Ye);if(Ye==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ye);if(br(Ye,ArrayBuffer)||Ye&&br(Ye.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(br(Ye,SharedArrayBuffer)||Ye&&br(Ye.buffer,SharedArrayBuffer)))return U(Ye,de,pe);if(typeof Ye=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Je=Ye.valueOf&&Ye.valueOf();if(Je!=null&&Je!==Ye)return a.from(Je,de,pe);const kt=j(Ye);if(kt)return kt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ye[Symbol.toPrimitive]=="function")return a.from(Ye[Symbol.toPrimitive]("string"),de,pe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ye)}a.from=function(Ye,de,pe){return f(Ye,de,pe)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function g(Ye){if(typeof Ye!="number")throw new TypeError('"size" argument must be of type number');if(Ye<0)throw new RangeError('The value "'+Ye+'" is invalid for option "size"')}function b(Ye,de,pe){return g(Ye),Ye<=0?s(Ye):de!==void 0?typeof pe=="string"?s(Ye).fill(de,pe):s(Ye).fill(de):s(Ye)}a.alloc=function(Ye,de,pe){return b(Ye,de,pe)};function I(Ye){return g(Ye),s(Ye<0?0:q(Ye)|0)}a.allocUnsafe=function(Ye){return I(Ye)},a.allocUnsafeSlow=function(Ye){return I(Ye)};function S(Ye,de){if((typeof de!="string"||de==="")&&(de="utf8"),!a.isEncoding(de))throw new TypeError("Unknown encoding: "+de);const pe=ee(Ye,de)|0;let Je=s(pe);const kt=Je.write(Ye,de);return kt!==pe&&(Je=Je.slice(0,kt)),Je}function B(Ye){const de=Ye.length<0?0:q(Ye.length)|0,pe=s(de);for(let Je=0;Je<de;Je+=1)pe[Je]=Ye[Je]&255;return pe}function P(Ye){if(br(Ye,Uint8Array)){const de=new Uint8Array(Ye);return U(de.buffer,de.byteOffset,de.byteLength)}return B(Ye)}function U(Ye,de,pe){if(de<0||Ye.byteLength<de)throw new RangeError('"offset" is outside of buffer bounds');if(Ye.byteLength<de+(pe||0))throw new RangeError('"length" is outside of buffer bounds');let Je;return de===void 0&&pe===void 0?Je=new Uint8Array(Ye):pe===void 0?Je=new Uint8Array(Ye,de):Je=new Uint8Array(Ye,de,pe),Object.setPrototypeOf(Je,a.prototype),Je}function j(Ye){if(a.isBuffer(Ye)){const de=q(Ye.length)|0,pe=s(de);return pe.length===0||Ye.copy(pe,0,0,de),pe}if(Ye.length!==void 0)return typeof Ye.length!="number"||_r(Ye.length)?s(0):B(Ye);if(Ye.type==="Buffer"&&Array.isArray(Ye.data))return B(Ye.data)}function q(Ye){if(Ye>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return Ye|0}function W(Ye){return+Ye!=Ye&&(Ye=0),a.alloc(+Ye)}a.isBuffer=function(de){return de!=null&&de._isBuffer===!0&&de!==a.prototype},a.compare=function(de,pe){if(br(de,Uint8Array)&&(de=a.from(de,de.offset,de.byteLength)),br(pe,Uint8Array)&&(pe=a.from(pe,pe.offset,pe.byteLength)),!a.isBuffer(de)||!a.isBuffer(pe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(de===pe)return 0;let Je=de.length,kt=pe.length;for(let Xt=0,it=Math.min(Je,kt);Xt<it;++Xt)if(de[Xt]!==pe[Xt]){Je=de[Xt],kt=pe[Xt];break}return Je<kt?-1:kt<Je?1:0},a.isEncoding=function(de){switch(String(de).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}},a.concat=function(de,pe){if(!Array.isArray(de))throw new TypeError('"list" argument must be an Array of Buffers');if(de.length===0)return a.alloc(0);let Je;if(pe===void 0)for(pe=0,Je=0;Je<de.length;++Je)pe+=de[Je].length;const kt=a.allocUnsafe(pe);let Xt=0;for(Je=0;Je<de.length;++Je){let it=de[Je];if(br(it,Uint8Array))Xt+it.length>kt.length?(a.isBuffer(it)||(it=a.from(it)),it.copy(kt,Xt)):Uint8Array.prototype.set.call(kt,it,Xt);else if(a.isBuffer(it))it.copy(kt,Xt);else throw new TypeError('"list" argument must be an Array of Buffers');Xt+=it.length}return kt};function ee(Ye,de){if(a.isBuffer(Ye))return Ye.length;if(ArrayBuffer.isView(Ye)||br(Ye,ArrayBuffer))return Ye.byteLength;if(typeof Ye!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ye);const pe=Ye.length,Je=arguments.length>2&&arguments[2]===!0;if(!Je&&pe===0)return 0;let kt=!1;for(;;)switch(de){case"ascii":case"latin1":case"binary":return pe;case"utf8":case"utf-8":return Sn(Ye).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe*2;case"hex":return pe>>>1;case"base64":return ar(Ye).length;default:if(kt)return Je?-1:Sn(Ye).length;de=(""+de).toLowerCase(),kt=!0}}a.byteLength=ee;function J(Ye,de,pe){let Je=!1;if((de===void 0||de<0)&&(de=0),de>this.length||((pe===void 0||pe>this.length)&&(pe=this.length),pe<=0)||(pe>>>=0,de>>>=0,pe<=de))return"";for(Ye||(Ye="utf8");;)switch(Ye){case"hex":return et(this,de,pe);case"utf8":case"utf-8":return Se(this,de,pe);case"ascii":return Ne(this,de,pe);case"latin1":case"binary":return je(this,de,pe);case"base64":return oe(this,de,pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue(this,de,pe);default:if(Je)throw new TypeError("Unknown encoding: "+Ye);Ye=(Ye+"").toLowerCase(),Je=!0}}a.prototype._isBuffer=!0;function $(Ye,de,pe){const Je=Ye[de];Ye[de]=Ye[pe],Ye[pe]=Je}a.prototype.swap16=function(){const de=this.length;if(de%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let pe=0;pe<de;pe+=2)$(this,pe,pe+1);return this},a.prototype.swap32=function(){const de=this.length;if(de%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let pe=0;pe<de;pe+=4)$(this,pe,pe+3),$(this,pe+1,pe+2);return this},a.prototype.swap64=function(){const de=this.length;if(de%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let pe=0;pe<de;pe+=8)$(this,pe,pe+7),$(this,pe+1,pe+6),$(this,pe+2,pe+5),$(this,pe+3,pe+4);return this},a.prototype.toString=function(){const de=this.length;return de===0?"":arguments.length===0?Se(this,0,de):J.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(de){if(!a.isBuffer(de))throw new TypeError("Argument must be a Buffer");return this===de?!0:a.compare(this,de)===0},a.prototype.inspect=function(){let de="";const pe=r.INSPECT_MAX_BYTES;return de=this.toString("hex",0,pe).replace(/(.{2})/g,"$1 ").trim(),this.length>pe&&(de+=" ... "),"<Buffer "+de+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(de,pe,Je,kt,Xt){if(br(de,Uint8Array)&&(de=a.from(de,de.offset,de.byteLength)),!a.isBuffer(de))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof de);if(pe===void 0&&(pe=0),Je===void 0&&(Je=de?de.length:0),kt===void 0&&(kt=0),Xt===void 0&&(Xt=this.length),pe<0||Je>de.length||kt<0||Xt>this.length)throw new RangeError("out of range index");if(kt>=Xt&&pe>=Je)return 0;if(kt>=Xt)return-1;if(pe>=Je)return 1;if(pe>>>=0,Je>>>=0,kt>>>=0,Xt>>>=0,this===de)return 0;let it=Xt-kt,Ut=Je-pe;const qe=Math.min(it,Ut),fe=this.slice(kt,Xt),xe=de.slice(pe,Je);for(let p=0;p<qe;++p)if(fe[p]!==xe[p]){it=fe[p],Ut=xe[p];break}return it<Ut?-1:Ut<it?1:0};function X(Ye,de,pe,Je,kt){if(Ye.length===0)return-1;if(typeof pe=="string"?(Je=pe,pe=0):pe>2147483647?pe=2147483647:pe<-2147483648&&(pe=-2147483648),pe=+pe,_r(pe)&&(pe=kt?0:Ye.length-1),pe<0&&(pe=Ye.length+pe),pe>=Ye.length){if(kt)return-1;pe=Ye.length-1}else if(pe<0)if(kt)pe=0;else return-1;if(typeof de=="string"&&(de=a.from(de,Je)),a.isBuffer(de))return de.length===0?-1:G(Ye,de,pe,Je,kt);if(typeof de=="number")return de=de&255,typeof Uint8Array.prototype.indexOf=="function"?kt?Uint8Array.prototype.indexOf.call(Ye,de,pe):Uint8Array.prototype.lastIndexOf.call(Ye,de,pe):G(Ye,[de],pe,Je,kt);throw new TypeError("val must be string, number or Buffer")}function G(Ye,de,pe,Je,kt){let Xt=1,it=Ye.length,Ut=de.length;if(Je!==void 0&&(Je=String(Je).toLowerCase(),Je==="ucs2"||Je==="ucs-2"||Je==="utf16le"||Je==="utf-16le")){if(Ye.length<2||de.length<2)return-1;Xt=2,it/=2,Ut/=2,pe/=2}function qe(xe,p){return Xt===1?xe[p]:xe.readUInt16BE(p*Xt)}let fe;if(kt){let xe=-1;for(fe=pe;fe<it;fe++)if(qe(Ye,fe)===qe(de,xe===-1?0:fe-xe)){if(xe===-1&&(xe=fe),fe-xe+1===Ut)return xe*Xt}else xe!==-1&&(fe-=fe-xe),xe=-1}else for(pe+Ut>it&&(pe=it-Ut),fe=pe;fe>=0;fe--){let xe=!0;for(let p=0;p<Ut;p++)if(qe(Ye,fe+p)!==qe(de,p)){xe=!1;break}if(xe)return fe}return-1}a.prototype.includes=function(de,pe,Je){return this.indexOf(de,pe,Je)!==-1},a.prototype.indexOf=function(de,pe,Je){return X(this,de,pe,Je,!0)},a.prototype.lastIndexOf=function(de,pe,Je){return X(this,de,pe,Je,!1)};function ae(Ye,de,pe,Je){pe=Number(pe)||0;const kt=Ye.length-pe;Je?(Je=Number(Je),Je>kt&&(Je=kt)):Je=kt;const Xt=de.length;Je>Xt/2&&(Je=Xt/2);let it;for(it=0;it<Je;++it){const Ut=parseInt(de.substr(it*2,2),16);if(_r(Ut))return it;Ye[pe+it]=Ut}return it}function ge(Ye,de,pe,Je){return Cr(Sn(de,Ye.length-pe),Ye,pe,Je)}function he(Ye,de,pe,Je){return Cr(Ar(de),Ye,pe,Je)}function Ie(Ye,de,pe,Je){return Cr(ar(de),Ye,pe,Je)}function re(Ye,de,pe,Je){return Cr(Bn(de,Ye.length-pe),Ye,pe,Je)}a.prototype.write=function(de,pe,Je,kt){if(pe===void 0)kt="utf8",Je=this.length,pe=0;else if(Je===void 0&&typeof pe=="string")kt=pe,Je=this.length,pe=0;else if(isFinite(pe))pe=pe>>>0,isFinite(Je)?(Je=Je>>>0,kt===void 0&&(kt="utf8")):(kt=Je,Je=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Xt=this.length-pe;if((Je===void 0||Je>Xt)&&(Je=Xt),de.length>0&&(Je<0||pe<0)||pe>this.length)throw new RangeError("Attempt to write outside buffer bounds");kt||(kt="utf8");let it=!1;for(;;)switch(kt){case"hex":return ae(this,de,pe,Je);case"utf8":case"utf-8":return ge(this,de,pe,Je);case"ascii":case"latin1":case"binary":return he(this,de,pe,Je);case"base64":return Ie(this,de,pe,Je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,de,pe,Je);default:if(it)throw new TypeError("Unknown encoding: "+kt);kt=(""+kt).toLowerCase(),it=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(Ye,de,pe){return de===0&&pe===Ye.length?t.fromByteArray(Ye):t.fromByteArray(Ye.slice(de,pe))}function Se(Ye,de,pe){pe=Math.min(Ye.length,pe);const Je=[];let kt=de;for(;kt<pe;){const Xt=Ye[kt];let it=null,Ut=Xt>239?4:Xt>223?3:Xt>191?2:1;if(kt+Ut<=pe){let qe,fe,xe,p;switch(Ut){case 1:Xt<128&&(it=Xt);break;case 2:qe=Ye[kt+1],(qe&192)===128&&(p=(Xt&31)<<6|qe&63,p>127&&(it=p));break;case 3:qe=Ye[kt+1],fe=Ye[kt+2],(qe&192)===128&&(fe&192)===128&&(p=(Xt&15)<<12|(qe&63)<<6|fe&63,p>2047&&(p<55296||p>57343)&&(it=p));break;case 4:qe=Ye[kt+1],fe=Ye[kt+2],xe=Ye[kt+3],(qe&192)===128&&(fe&192)===128&&(xe&192)===128&&(p=(Xt&15)<<18|(qe&63)<<12|(fe&63)<<6|xe&63,p>65535&&p<1114112&&(it=p))}}it===null?(it=65533,Ut=1):it>65535&&(it-=65536,Je.push(it>>>10&1023|55296),it=56320|it&1023),Je.push(it),kt+=Ut}return nt(Je)}const ye=4096;function nt(Ye){const de=Ye.length;if(de<=ye)return String.fromCharCode.apply(String,Ye);let pe="",Je=0;for(;Je<de;)pe+=String.fromCharCode.apply(String,Ye.slice(Je,Je+=ye));return pe}function Ne(Ye,de,pe){let Je="";pe=Math.min(Ye.length,pe);for(let kt=de;kt<pe;++kt)Je+=String.fromCharCode(Ye[kt]&127);return Je}function je(Ye,de,pe){let Je="";pe=Math.min(Ye.length,pe);for(let kt=de;kt<pe;++kt)Je+=String.fromCharCode(Ye[kt]);return Je}function et(Ye,de,pe){const Je=Ye.length;(!de||de<0)&&(de=0),(!pe||pe<0||pe>Je)&&(pe=Je);let kt="";for(let Xt=de;Xt<pe;++Xt)kt+=Jr[Ye[Xt]];return kt}function Ue(Ye,de,pe){const Je=Ye.slice(de,pe);let kt="";for(let Xt=0;Xt<Je.length-1;Xt+=2)kt+=String.fromCharCode(Je[Xt]+Je[Xt+1]*256);return kt}a.prototype.slice=function(de,pe){const Je=this.length;de=~~de,pe=pe===void 0?Je:~~pe,de<0?(de+=Je,de<0&&(de=0)):de>Je&&(de=Je),pe<0?(pe+=Je,pe<0&&(pe=0)):pe>Je&&(pe=Je),pe<de&&(pe=de);const kt=this.subarray(de,pe);return Object.setPrototypeOf(kt,a.prototype),kt};function ke(Ye,de,pe){if(Ye%1!==0||Ye<0)throw new RangeError("offset is not uint");if(Ye+de>pe)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(de,pe,Je){de=de>>>0,pe=pe>>>0,Je||ke(de,pe,this.length);let kt=this[de],Xt=1,it=0;for(;++it<pe&&(Xt*=256);)kt+=this[de+it]*Xt;return kt},a.prototype.readUintBE=a.prototype.readUIntBE=function(de,pe,Je){de=de>>>0,pe=pe>>>0,Je||ke(de,pe,this.length);let kt=this[de+--pe],Xt=1;for(;pe>0&&(Xt*=256);)kt+=this[de+--pe]*Xt;return kt},a.prototype.readUint8=a.prototype.readUInt8=function(de,pe){return de=de>>>0,pe||ke(de,1,this.length),this[de]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(de,pe){return de=de>>>0,pe||ke(de,2,this.length),this[de]|this[de+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(de,pe){return de=de>>>0,pe||ke(de,2,this.length),this[de]<<8|this[de+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(de,pe){return de=de>>>0,pe||ke(de,4,this.length),(this[de]|this[de+1]<<8|this[de+2]<<16)+this[de+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(de,pe){return de=de>>>0,pe||ke(de,4,this.length),this[de]*16777216+(this[de+1]<<16|this[de+2]<<8|this[de+3])},a.prototype.readBigUInt64LE=wr(function(de){de=de>>>0,bt(de,"offset");const pe=this[de],Je=this[de+7];(pe===void 0||Je===void 0)&&Lt(de,this.length-8);const kt=pe+this[++de]*2**8+this[++de]*2**16+this[++de]*2**24,Xt=this[++de]+this[++de]*2**8+this[++de]*2**16+Je*2**24;return BigInt(kt)+(BigInt(Xt)<<BigInt(32))}),a.prototype.readBigUInt64BE=wr(function(de){de=de>>>0,bt(de,"offset");const pe=this[de],Je=this[de+7];(pe===void 0||Je===void 0)&&Lt(de,this.length-8);const kt=pe*2**24+this[++de]*2**16+this[++de]*2**8+this[++de],Xt=this[++de]*2**24+this[++de]*2**16+this[++de]*2**8+Je;return(BigInt(kt)<<BigInt(32))+BigInt(Xt)}),a.prototype.readIntLE=function(de,pe,Je){de=de>>>0,pe=pe>>>0,Je||ke(de,pe,this.length);let kt=this[de],Xt=1,it=0;for(;++it<pe&&(Xt*=256);)kt+=this[de+it]*Xt;return Xt*=128,kt>=Xt&&(kt-=Math.pow(2,8*pe)),kt},a.prototype.readIntBE=function(de,pe,Je){de=de>>>0,pe=pe>>>0,Je||ke(de,pe,this.length);let kt=pe,Xt=1,it=this[de+--kt];for(;kt>0&&(Xt*=256);)it+=this[de+--kt]*Xt;return Xt*=128,it>=Xt&&(it-=Math.pow(2,8*pe)),it},a.prototype.readInt8=function(de,pe){return de=de>>>0,pe||ke(de,1,this.length),this[de]&128?(255-this[de]+1)*-1:this[de]},a.prototype.readInt16LE=function(de,pe){de=de>>>0,pe||ke(de,2,this.length);const Je=this[de]|this[de+1]<<8;return Je&32768?Je|4294901760:Je},a.prototype.readInt16BE=function(de,pe){de=de>>>0,pe||ke(de,2,this.length);const Je=this[de+1]|this[de]<<8;return Je&32768?Je|4294901760:Je},a.prototype.readInt32LE=function(de,pe){return de=de>>>0,pe||ke(de,4,this.length),this[de]|this[de+1]<<8|this[de+2]<<16|this[de+3]<<24},a.prototype.readInt32BE=function(de,pe){return de=de>>>0,pe||ke(de,4,this.length),this[de]<<24|this[de+1]<<16|this[de+2]<<8|this[de+3]},a.prototype.readBigInt64LE=wr(function(de){de=de>>>0,bt(de,"offset");const pe=this[de],Je=this[de+7];(pe===void 0||Je===void 0)&&Lt(de,this.length-8);const kt=this[de+4]+this[de+5]*2**8+this[de+6]*2**16+(Je<<24);return(BigInt(kt)<<BigInt(32))+BigInt(pe+this[++de]*2**8+this[++de]*2**16+this[++de]*2**24)}),a.prototype.readBigInt64BE=wr(function(de){de=de>>>0,bt(de,"offset");const pe=this[de],Je=this[de+7];(pe===void 0||Je===void 0)&&Lt(de,this.length-8);const kt=(pe<<24)+this[++de]*2**16+this[++de]*2**8+this[++de];return(BigInt(kt)<<BigInt(32))+BigInt(this[++de]*2**24+this[++de]*2**16+this[++de]*2**8+Je)}),a.prototype.readFloatLE=function(de,pe){return de=de>>>0,pe||ke(de,4,this.length),e.read(this,de,!0,23,4)},a.prototype.readFloatBE=function(de,pe){return de=de>>>0,pe||ke(de,4,this.length),e.read(this,de,!1,23,4)},a.prototype.readDoubleLE=function(de,pe){return de=de>>>0,pe||ke(de,8,this.length),e.read(this,de,!0,52,8)},a.prototype.readDoubleBE=function(de,pe){return de=de>>>0,pe||ke(de,8,this.length),e.read(this,de,!1,52,8)};function We(Ye,de,pe,Je,kt,Xt){if(!a.isBuffer(Ye))throw new TypeError('"buffer" argument must be a Buffer instance');if(de>kt||de<Xt)throw new RangeError('"value" argument is out of bounds');if(pe+Je>Ye.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(de,pe,Je,kt){if(de=+de,pe=pe>>>0,Je=Je>>>0,!kt){const Ut=Math.pow(2,8*Je)-1;We(this,de,pe,Je,Ut,0)}let Xt=1,it=0;for(this[pe]=de&255;++it<Je&&(Xt*=256);)this[pe+it]=de/Xt&255;return pe+Je},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(de,pe,Je,kt){if(de=+de,pe=pe>>>0,Je=Je>>>0,!kt){const Ut=Math.pow(2,8*Je)-1;We(this,de,pe,Je,Ut,0)}let Xt=Je-1,it=1;for(this[pe+Xt]=de&255;--Xt>=0&&(it*=256);)this[pe+Xt]=de/it&255;return pe+Je},a.prototype.writeUint8=a.prototype.writeUInt8=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,1,255,0),this[pe]=de&255,pe+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,2,65535,0),this[pe]=de&255,this[pe+1]=de>>>8,pe+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,2,65535,0),this[pe]=de>>>8,this[pe+1]=de&255,pe+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,4,4294967295,0),this[pe+3]=de>>>24,this[pe+2]=de>>>16,this[pe+1]=de>>>8,this[pe]=de&255,pe+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,4,4294967295,0),this[pe]=de>>>24,this[pe+1]=de>>>16,this[pe+2]=de>>>8,this[pe+3]=de&255,pe+4};function vt(Ye,de,pe,Je,kt){mt(de,Je,kt,Ye,pe,7);let Xt=Number(de&BigInt(4294967295));Ye[pe++]=Xt,Xt=Xt>>8,Ye[pe++]=Xt,Xt=Xt>>8,Ye[pe++]=Xt,Xt=Xt>>8,Ye[pe++]=Xt;let it=Number(de>>BigInt(32)&BigInt(4294967295));return Ye[pe++]=it,it=it>>8,Ye[pe++]=it,it=it>>8,Ye[pe++]=it,it=it>>8,Ye[pe++]=it,pe}function Pt(Ye,de,pe,Je,kt){mt(de,Je,kt,Ye,pe,7);let Xt=Number(de&BigInt(4294967295));Ye[pe+7]=Xt,Xt=Xt>>8,Ye[pe+6]=Xt,Xt=Xt>>8,Ye[pe+5]=Xt,Xt=Xt>>8,Ye[pe+4]=Xt;let it=Number(de>>BigInt(32)&BigInt(4294967295));return Ye[pe+3]=it,it=it>>8,Ye[pe+2]=it,it=it>>8,Ye[pe+1]=it,it=it>>8,Ye[pe]=it,pe+8}a.prototype.writeBigUInt64LE=wr(function(de,pe=0){return vt(this,de,pe,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=wr(function(de,pe=0){return Pt(this,de,pe,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(de,pe,Je,kt){if(de=+de,pe=pe>>>0,!kt){const qe=Math.pow(2,8*Je-1);We(this,de,pe,Je,qe-1,-qe)}let Xt=0,it=1,Ut=0;for(this[pe]=de&255;++Xt<Je&&(it*=256);)de<0&&Ut===0&&this[pe+Xt-1]!==0&&(Ut=1),this[pe+Xt]=(de/it>>0)-Ut&255;return pe+Je},a.prototype.writeIntBE=function(de,pe,Je,kt){if(de=+de,pe=pe>>>0,!kt){const qe=Math.pow(2,8*Je-1);We(this,de,pe,Je,qe-1,-qe)}let Xt=Je-1,it=1,Ut=0;for(this[pe+Xt]=de&255;--Xt>=0&&(it*=256);)de<0&&Ut===0&&this[pe+Xt+1]!==0&&(Ut=1),this[pe+Xt]=(de/it>>0)-Ut&255;return pe+Je},a.prototype.writeInt8=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,1,127,-128),de<0&&(de=255+de+1),this[pe]=de&255,pe+1},a.prototype.writeInt16LE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,2,32767,-32768),this[pe]=de&255,this[pe+1]=de>>>8,pe+2},a.prototype.writeInt16BE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,2,32767,-32768),this[pe]=de>>>8,this[pe+1]=de&255,pe+2},a.prototype.writeInt32LE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,4,2147483647,-2147483648),this[pe]=de&255,this[pe+1]=de>>>8,this[pe+2]=de>>>16,this[pe+3]=de>>>24,pe+4},a.prototype.writeInt32BE=function(de,pe,Je){return de=+de,pe=pe>>>0,Je||We(this,de,pe,4,2147483647,-2147483648),de<0&&(de=4294967295+de+1),this[pe]=de>>>24,this[pe+1]=de>>>16,this[pe+2]=de>>>8,this[pe+3]=de&255,pe+4},a.prototype.writeBigInt64LE=wr(function(de,pe=0){return vt(this,de,pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=wr(function(de,pe=0){return Pt(this,de,pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ut(Ye,de,pe,Je,kt,Xt){if(pe+Je>Ye.length)throw new RangeError("Index out of range");if(pe<0)throw new RangeError("Index out of range")}function jt(Ye,de,pe,Je,kt){return de=+de,pe=pe>>>0,kt||ut(Ye,de,pe,4),e.write(Ye,de,pe,Je,23,4),pe+4}a.prototype.writeFloatLE=function(de,pe,Je){return jt(this,de,pe,!0,Je)},a.prototype.writeFloatBE=function(de,pe,Je){return jt(this,de,pe,!1,Je)};function Rt(Ye,de,pe,Je,kt){return de=+de,pe=pe>>>0,kt||ut(Ye,de,pe,8),e.write(Ye,de,pe,Je,52,8),pe+8}a.prototype.writeDoubleLE=function(de,pe,Je){return Rt(this,de,pe,!0,Je)},a.prototype.writeDoubleBE=function(de,pe,Je){return Rt(this,de,pe,!1,Je)},a.prototype.copy=function(de,pe,Je,kt){if(!a.isBuffer(de))throw new TypeError("argument should be a Buffer");if(Je||(Je=0),!kt&&kt!==0&&(kt=this.length),pe>=de.length&&(pe=de.length),pe||(pe=0),kt>0&&kt<Je&&(kt=Je),kt===Je||de.length===0||this.length===0)return 0;if(pe<0)throw new RangeError("targetStart out of bounds");if(Je<0||Je>=this.length)throw new RangeError("Index out of range");if(kt<0)throw new RangeError("sourceEnd out of bounds");kt>this.length&&(kt=this.length),de.length-pe<kt-Je&&(kt=de.length-pe+Je);const Xt=kt-Je;return this===de&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(pe,Je,kt):Uint8Array.prototype.set.call(de,this.subarray(Je,kt),pe),Xt},a.prototype.fill=function(de,pe,Je,kt){if(typeof de=="string"){if(typeof pe=="string"?(kt=pe,pe=0,Je=this.length):typeof Je=="string"&&(kt=Je,Je=this.length),kt!==void 0&&typeof kt!="string")throw new TypeError("encoding must be a string");if(typeof kt=="string"&&!a.isEncoding(kt))throw new TypeError("Unknown encoding: "+kt);if(de.length===1){const it=de.charCodeAt(0);(kt==="utf8"&&it<128||kt==="latin1")&&(de=it)}}else typeof de=="number"?de=de&255:typeof de=="boolean"&&(de=Number(de));if(pe<0||this.length<pe||this.length<Je)throw new RangeError("Out of range index");if(Je<=pe)return this;pe=pe>>>0,Je=Je===void 0?this.length:Je>>>0,de||(de=0);let Xt;if(typeof de=="number")for(Xt=pe;Xt<Je;++Xt)this[Xt]=de;else{const it=a.isBuffer(de)?de:a.from(de,kt),Ut=it.length;if(Ut===0)throw new TypeError('The value "'+de+'" is invalid for argument "value"');for(Xt=0;Xt<Je-pe;++Xt)this[Xt+pe]=it[Xt%Ut]}return this};const Ke={};function we(Ye,de,pe){Ke[Ye]=class extends pe{constructor(){super(),Object.defineProperty(this,"message",{value:de.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ye}]`,this.stack,delete this.name}get code(){return Ye}set code(kt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:kt,writable:!0})}toString(){return`${this.name} [${Ye}]: ${this.message}`}}}we("ERR_BUFFER_OUT_OF_BOUNDS",function(Ye){return Ye?`${Ye} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),we("ERR_INVALID_ARG_TYPE",function(Ye,de){return`The "${Ye}" argument must be of type number. Received type ${typeof de}`},TypeError),we("ERR_OUT_OF_RANGE",function(Ye,de,pe){let Je=`The value of "${Ye}" is out of range.`,kt=pe;return Number.isInteger(pe)&&Math.abs(pe)>2**32?kt=Fe(String(pe)):typeof pe=="bigint"&&(kt=String(pe),(pe>BigInt(2)**BigInt(32)||pe<-(BigInt(2)**BigInt(32)))&&(kt=Fe(kt)),kt+="n"),Je+=` It must be ${de}. Received ${kt}`,Je},RangeError);function Fe(Ye){let de="",pe=Ye.length;const Je=Ye[0]==="-"?1:0;for(;pe>=Je+4;pe-=3)de=`_${Ye.slice(pe-3,pe)}${de}`;return`${Ye.slice(0,pe)}${de}`}function tt(Ye,de,pe){bt(de,"offset"),(Ye[de]===void 0||Ye[de+pe]===void 0)&&Lt(de,Ye.length-(pe+1))}function mt(Ye,de,pe,Je,kt,Xt){if(Ye>pe||Ye<de){const it=typeof de=="bigint"?"n":"";let Ut;throw de===0||de===BigInt(0)?Ut=`>= 0${it} and < 2${it} ** ${(Xt+1)*8}${it}`:Ut=`>= -(2${it} ** ${(Xt+1)*8-1}${it}) and < 2 ** ${(Xt+1)*8-1}${it}`,new Ke.ERR_OUT_OF_RANGE("value",Ut,Ye)}tt(Je,kt,Xt)}function bt(Ye,de){if(typeof Ye!="number")throw new Ke.ERR_INVALID_ARG_TYPE(de,"number",Ye)}function Lt(Ye,de,pe){throw Math.floor(Ye)!==Ye?(bt(Ye,pe),new Ke.ERR_OUT_OF_RANGE("offset","an integer",Ye)):de<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${de}`,Ye)}const Vt=/[^+/0-9A-Za-z-_]/g;function rn(Ye){if(Ye=Ye.split("=")[0],Ye=Ye.trim().replace(Vt,""),Ye.length<2)return"";for(;Ye.length%4!==0;)Ye=Ye+"=";return Ye}function Sn(Ye,de){de=de||1/0;let pe;const Je=Ye.length;let kt=null;const Xt=[];for(let it=0;it<Je;++it){if(pe=Ye.charCodeAt(it),pe>55295&&pe<57344){if(!kt){if(pe>56319){(de-=3)>-1&&Xt.push(239,191,189);continue}else if(it+1===Je){(de-=3)>-1&&Xt.push(239,191,189);continue}kt=pe;continue}if(pe<56320){(de-=3)>-1&&Xt.push(239,191,189),kt=pe;continue}pe=(kt-55296<<10|pe-56320)+65536}else kt&&(de-=3)>-1&&Xt.push(239,191,189);if(kt=null,pe<128){if((de-=1)<0)break;Xt.push(pe)}else if(pe<2048){if((de-=2)<0)break;Xt.push(pe>>6|192,pe&63|128)}else if(pe<65536){if((de-=3)<0)break;Xt.push(pe>>12|224,pe>>6&63|128,pe&63|128)}else if(pe<1114112){if((de-=4)<0)break;Xt.push(pe>>18|240,pe>>12&63|128,pe>>6&63|128,pe&63|128)}else throw new Error("Invalid code point")}return Xt}function Ar(Ye){const de=[];for(let pe=0;pe<Ye.length;++pe)de.push(Ye.charCodeAt(pe)&255);return de}function Bn(Ye,de){let pe,Je,kt;const Xt=[];for(let it=0;it<Ye.length&&!((de-=2)<0);++it)pe=Ye.charCodeAt(it),Je=pe>>8,kt=pe%256,Xt.push(kt),Xt.push(Je);return Xt}function ar(Ye){return t.toByteArray(rn(Ye))}function Cr(Ye,de,pe,Je){let kt;for(kt=0;kt<Je&&!(kt+pe>=de.length||kt>=Ye.length);++kt)de[kt+pe]=Ye[kt];return kt}function br(Ye,de){return Ye instanceof de||Ye!=null&&Ye.constructor!=null&&Ye.constructor.name!=null&&Ye.constructor.name===de.name}function _r(Ye){return Ye!==Ye}const Jr=function(){const Ye="0123456789abcdef",de=new Array(256);for(let pe=0;pe<16;++pe){const Je=pe*16;for(let kt=0;kt<16;++kt)de[Je+kt]=Ye[pe]+Ye[kt]}return de}();function wr(Ye){return typeof BigInt>"u"?hi:Ye}function hi(){throw new Error("BigInt not supported")}}(vx)),vx}var wG=xG();const MG=us(wG);var _x,FB;function SG(){if(FB)return _x;FB=1;var r="Expected a function",t="__lodash_hash_undefined__",e="[object Function]",n="[object GeneratorFunction]",i="[object Symbol]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,a=/^\./,f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/[\\^$.*+?()[\]{}|]/g,b=/\\(\\)?/g,I=/^\[object .+?Constructor\]$/,S=typeof window=="object"&&window&&window.Object===Object&&window,B=typeof self=="object"&&self&&self.Object===Object&&self,P=S||B||Function("return this")();function U(fe,xe){return fe==null?void 0:fe[xe]}function j(fe){var xe=!1;if(fe!=null&&typeof fe.toString!="function")try{xe=!!(fe+"")}catch{}return xe}var q=Array.prototype,W=Function.prototype,ee=Object.prototype,J=P["__core-js_shared__"],$=function(){var fe=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||"");return fe?"Symbol(src)_1."+fe:""}(),X=W.toString,G=ee.hasOwnProperty,ae=ee.toString,ge=RegExp("^"+X.call(G).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),he=P.Symbol,Ie=q.splice,re=ar(P,"Map"),oe=ar(Object,"create"),Se=he?he.prototype:void 0,ye=Se?Se.toString:void 0;function nt(fe){var xe=-1,p=fe?fe.length:0;for(this.clear();++xe<p;){var Qe=fe[xe];this.set(Qe[0],Qe[1])}}function Ne(){this.__data__=oe?oe(null):{}}function je(fe){return this.has(fe)&&delete this.__data__[fe]}function et(fe){var xe=this.__data__;if(oe){var p=xe[fe];return p===t?void 0:p}return G.call(xe,fe)?xe[fe]:void 0}function Ue(fe){var xe=this.__data__;return oe?xe[fe]!==void 0:G.call(xe,fe)}function ke(fe,xe){var p=this.__data__;return p[fe]=oe&&xe===void 0?t:xe,this}nt.prototype.clear=Ne,nt.prototype.delete=je,nt.prototype.get=et,nt.prototype.has=Ue,nt.prototype.set=ke;function We(fe){var xe=-1,p=fe?fe.length:0;for(this.clear();++xe<p;){var Qe=fe[xe];this.set(Qe[0],Qe[1])}}function vt(){this.__data__=[]}function Pt(fe){var xe=this.__data__,p=Lt(xe,fe);if(p<0)return!1;var Qe=xe.length-1;return p==Qe?xe.pop():Ie.call(xe,p,1),!0}function ut(fe){var xe=this.__data__,p=Lt(xe,fe);return p<0?void 0:xe[p][1]}function jt(fe){return Lt(this.__data__,fe)>-1}function Rt(fe,xe){var p=this.__data__,Qe=Lt(p,fe);return Qe<0?p.push([fe,xe]):p[Qe][1]=xe,this}We.prototype.clear=vt,We.prototype.delete=Pt,We.prototype.get=ut,We.prototype.has=jt,We.prototype.set=Rt;function Ke(fe){var xe=-1,p=fe?fe.length:0;for(this.clear();++xe<p;){var Qe=fe[xe];this.set(Qe[0],Qe[1])}}function we(){this.__data__={hash:new nt,map:new(re||We),string:new nt}}function Fe(fe){return Bn(this,fe).delete(fe)}function tt(fe){return Bn(this,fe).get(fe)}function mt(fe){return Bn(this,fe).has(fe)}function bt(fe,xe){return Bn(this,fe).set(fe,xe),this}Ke.prototype.clear=we,Ke.prototype.delete=Fe,Ke.prototype.get=tt,Ke.prototype.has=mt,Ke.prototype.set=bt;function Lt(fe,xe){for(var p=fe.length;p--;)if(de(fe[p][0],xe))return p;return-1}function Vt(fe,xe){xe=Cr(xe,fe)?[xe]:Ar(xe);for(var p=0,Qe=xe.length;fe!=null&&p<Qe;)fe=fe[wr(xe[p++])];return p&&p==Qe?fe:void 0}function rn(fe){if(!kt(fe)||_r(fe))return!1;var xe=Je(fe)||j(fe)?ge:I;return xe.test(hi(fe))}function Sn(fe){if(typeof fe=="string")return fe;if(it(fe))return ye?ye.call(fe):"";var xe=fe+"";return xe=="0"&&1/fe==-1/0?"-0":xe}function Ar(fe){return pe(fe)?fe:Jr(fe)}function Bn(fe,xe){var p=fe.__data__;return br(xe)?p[typeof xe=="string"?"string":"hash"]:p.map}function ar(fe,xe){var p=U(fe,xe);return rn(p)?p:void 0}function Cr(fe,xe){if(pe(fe))return!1;var p=typeof fe;return p=="number"||p=="symbol"||p=="boolean"||fe==null||it(fe)?!0:s.test(fe)||!o.test(fe)||xe!=null&&fe in Object(xe)}function br(fe){var xe=typeof fe;return xe=="string"||xe=="number"||xe=="symbol"||xe=="boolean"?fe!=="__proto__":fe===null}function _r(fe){return!!$&&$ in fe}var Jr=Ye(function(fe){fe=Ut(fe);var xe=[];return a.test(fe)&&xe.push(""),fe.replace(f,function(p,Qe,pt,ft){xe.push(pt?ft.replace(b,"$1"):Qe||p)}),xe});function wr(fe){if(typeof fe=="string"||it(fe))return fe;var xe=fe+"";return xe=="0"&&1/fe==-1/0?"-0":xe}function hi(fe){if(fe!=null){try{return X.call(fe)}catch{}try{return fe+""}catch{}}return""}function Ye(fe,xe){if(typeof fe!="function"||xe&&typeof xe!="function")throw new TypeError(r);var p=function(){var Qe=arguments,pt=xe?xe.apply(this,Qe):Qe[0],ft=p.cache;if(ft.has(pt))return ft.get(pt);var Et=fe.apply(this,Qe);return p.cache=ft.set(pt,Et),Et};return p.cache=new(Ye.Cache||Ke),p}Ye.Cache=Ke;function de(fe,xe){return fe===xe||fe!==fe&&xe!==xe}var pe=Array.isArray;function Je(fe){var xe=kt(fe)?ae.call(fe):"";return xe==e||xe==n}function kt(fe){var xe=typeof fe;return!!fe&&(xe=="object"||xe=="function")}function Xt(fe){return!!fe&&typeof fe=="object"}function it(fe){return typeof fe=="symbol"||Xt(fe)&&ae.call(fe)==i}function Ut(fe){return fe==null?"":Sn(fe)}function qe(fe,xe,p){var Qe=fe==null?void 0:Vt(fe,xe);return Qe===void 0?p:Qe}return _x=qe,_x}var EG=SG();const OG=us(EG);var Oy={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
|
||
*/var BG=Oy.exports,UB;function IG(){return UB||(UB=1,function(r,t){(function(){var e,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,b="__lodash_placeholder__",I=1,S=2,B=4,P=1,U=2,j=1,q=2,W=4,ee=8,J=16,$=32,X=64,G=128,ae=256,ge=512,he=30,Ie="...",re=800,oe=16,Se=1,ye=2,nt=3,Ne=1/0,je=9007199254740991,et=17976931348623157e292,Ue=NaN,ke=4294967295,We=ke-1,vt=ke>>>1,Pt=[["ary",G],["bind",j],["bindKey",q],["curry",ee],["curryRight",J],["flip",ge],["partial",$],["partialRight",X],["rearg",ae]],ut="[object Arguments]",jt="[object Array]",Rt="[object AsyncFunction]",Ke="[object Boolean]",we="[object Date]",Fe="[object DOMException]",tt="[object Error]",mt="[object Function]",bt="[object GeneratorFunction]",Lt="[object Map]",Vt="[object Number]",rn="[object Null]",Sn="[object Object]",Ar="[object Promise]",Bn="[object Proxy]",ar="[object RegExp]",Cr="[object Set]",br="[object String]",_r="[object Symbol]",Jr="[object Undefined]",wr="[object WeakMap]",hi="[object WeakSet]",Ye="[object ArrayBuffer]",de="[object DataView]",pe="[object Float32Array]",Je="[object Float64Array]",kt="[object Int8Array]",Xt="[object Int16Array]",it="[object Int32Array]",Ut="[object Uint8Array]",qe="[object Uint8ClampedArray]",fe="[object Uint16Array]",xe="[object Uint32Array]",p=/\b__p \+= '';/g,Qe=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ft=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"']/g,Ct=RegExp(ft.source),nn=RegExp(Et.source),Yt=/<%-([\s\S]+?)%>/g,Gt=/<%([\s\S]+?)%>/g,wt=/<%=([\s\S]+?)%>/g,Tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,En=/^\w*$/,sr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pr=/[\\^$.*+?()[\]{}|]/g,an=RegExp(Pr.source),Wn=/^\s+/,ir=/\s/,zr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fr=/\{\n\/\* \[wrapped with (.+)\] \*/,hr=/,? & /,zn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pi=/[()=,{}\[\]\/\s]/,po=/\\(\\)?/g,ri=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xr=/\w*$/,ii=/^[-+]0x[0-9a-f]+$/i,mo=/^0b[01]+$/i,Mi=/^\[object .+?Constructor\]$/,ka=/^0o[0-7]+$/i,ns=/^(?:0|[1-9]\d*)$/,wo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ua=/($^)/,Ya=/['\n\r\u2028\u2029\\]/g,Vi="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Ps="\\ufe20-\\ufe2f",ki="\\u20d0-\\u20ff",Mr=Rl+Ps+ki,ms="\\u2700-\\u27bf",oa="a-z\\xdf-\\xf6\\xf8-\\xff",ba="\\xac\\xb1\\xd7\\xf7",Ge="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_t="\\u2000-\\u206f",cn=" \\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",jn="A-Z\\xc0-\\xd6\\xd8-\\xde",An="\\ufe0e\\ufe0f",Qn=ba+Ge+_t+cn,_i="['’]",Ki="["+Vi+"]",Xi="["+Qn+"]",aa="["+Mr+"]",Mu="\\d+",Hr="["+ms+"]",ci="["+oa+"]",rs="[^"+Vi+Qn+Mu+ms+oa+jn+"]",Ai="\\ud83c[\\udffb-\\udfff]",As="(?:"+aa+"|"+Ai+")",Ju="[^"+Vi+"]",sa="(?:\\ud83c[\\udde6-\\uddff]){2}",kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Oi="["+jn+"]",Qs="\\u200d",Ta="(?:"+ci+"|"+rs+")",Mo="(?:"+Oi+"|"+rs+")",ja="(?:"+_i+"(?:d|ll|m|re|s|t|ve))?",au="(?:"+_i+"(?:D|LL|M|RE|S|T|VE))?",Dl=As+"?",ea="["+An+"]?",$a="(?:"+Qs+"(?:"+[Ju,sa,kr].join("|")+")"+ea+Dl+")*",co="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xa=ea+Dl+$a,qs="(?:"+[Hr,sa,kr].join("|")+")"+xa,Pa="(?:"+[Ju+aa+"?",aa,sa,kr,Ki].join("|")+")",Cl=RegExp(_i,"g"),eA=RegExp(aa,"g"),Ji=RegExp(Ai+"(?="+Ai+")|"+Pa+xa,"g"),$l=RegExp([Oi+"?"+ci+"+"+ja+"(?="+[Xi,Oi,"$"].join("|")+")",Mo+"+"+au+"(?="+[Xi,Oi+Ta,"$"].join("|")+")",Oi+"?"+Ta+"+"+ja,Oi+"+"+au,pa,co,Mu,qs].join("|"),"g"),zi=RegExp("["+Qs+Vi+Mr+An+"]"),Zr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vl=["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"],Wi=-1,lo={};lo[pe]=lo[Je]=lo[kt]=lo[Xt]=lo[it]=lo[Ut]=lo[qe]=lo[fe]=lo[xe]=!0,lo[ut]=lo[jt]=lo[Ye]=lo[Ke]=lo[de]=lo[we]=lo[tt]=lo[mt]=lo[Lt]=lo[Vt]=lo[Sn]=lo[ar]=lo[Cr]=lo[br]=lo[wr]=!1;var Di={};Di[ut]=Di[jt]=Di[Ye]=Di[de]=Di[Ke]=Di[we]=Di[pe]=Di[Je]=Di[kt]=Di[Xt]=Di[it]=Di[Lt]=Di[Vt]=Di[Sn]=Di[ar]=Di[Cr]=Di[br]=Di[_r]=Di[Ut]=Di[qe]=Di[fe]=Di[xe]=!0,Di[tt]=Di[mt]=Di[wr]=!1;var te={À:"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",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ee={"&":"&","<":"<",">":">",'"':""","'":"'"},ot={"&":"&","<":"<",">":">",""":'"',"'":"'"},$t={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Sr=parseFloat,Nn=parseInt,si=typeof window=="object"&&window&&window.Object===Object&&window,fi=typeof self=="object"&&self&&self.Object===Object&&self,pr=si||fi||Function("return this")(),Er=t&&!t.nodeType&&t,Ci=Er&&!0&&r&&!r.nodeType&&r,So=Ci&&Ci.exports===Er,Ri=So&&si.process,Nr=function(){try{var Ht=Ci&&Ci.require&&Ci.require("util").types;return Ht||Ri&&Ri.binding&&Ri.binding("util")}catch{}}(),eo=Nr&&Nr.isArrayBuffer,to=Nr&&Nr.isDate,la=Nr&&Nr.isMap,gs=Nr&&Nr.isRegExp,Ks=Nr&&Nr.isSet,su=Nr&&Nr.isTypedArray;function Va(Ht,Pn,sn){switch(sn.length){case 0:return Ht.call(Pn);case 1:return Ht.call(Pn,sn[0]);case 2:return Ht.call(Pn,sn[0],sn[1]);case 3:return Ht.call(Pn,sn[0],sn[1],sn[2])}return Ht.apply(Pn,sn)}function ac(Ht,Pn,sn,Kr){for(var bi=-1,Co=Ht==null?0:Ht.length;++bi<Co;){var is=Ht[bi];Pn(Kr,is,sn(is),Ht)}return Kr}function ws(Ht,Pn){for(var sn=-1,Kr=Ht==null?0:Ht.length;++sn<Kr&&Pn(Ht[sn],sn,Ht)!==!1;);return Ht}function rl(Ht,Pn){for(var sn=Ht==null?0:Ht.length;sn--&&Pn(Ht[sn],sn,Ht)!==!1;);return Ht}function Xc(Ht,Pn){for(var sn=-1,Kr=Ht==null?0:Ht.length;++sn<Kr;)if(!Pn(Ht[sn],sn,Ht))return!1;return!0}function Su(Ht,Pn){for(var sn=-1,Kr=Ht==null?0:Ht.length,bi=0,Co=[];++sn<Kr;){var is=Ht[sn];Pn(is,sn,Ht)&&(Co[bi++]=is)}return Co}function Eu(Ht,Pn){var sn=Ht==null?0:Ht.length;return!!sn&&Ha(Ht,Pn,0)>-1}function Ah(Ht,Pn,sn){for(var Kr=-1,bi=Ht==null?0:Ht.length;++Kr<bi;)if(sn(Pn,Ht[Kr]))return!0;return!1}function wa(Ht,Pn){for(var sn=-1,Kr=Ht==null?0:Ht.length,bi=Array(Kr);++sn<Kr;)bi[sn]=Pn(Ht[sn],sn,Ht);return bi}function Ou(Ht,Pn){for(var sn=-1,Kr=Pn.length,bi=Ht.length;++sn<Kr;)Ht[bi+sn]=Pn[sn];return Ht}function Jc(Ht,Pn,sn,Kr){var bi=-1,Co=Ht==null?0:Ht.length;for(Kr&&Co&&(sn=Ht[++bi]);++bi<Co;)sn=Pn(sn,Ht[bi],bi,Ht);return sn}function Hf(Ht,Pn,sn,Kr){var bi=Ht==null?0:Ht.length;for(Kr&&bi&&(sn=Ht[--bi]);bi--;)sn=Pn(sn,Ht[bi],bi,Ht);return sn}function tA(Ht,Pn){for(var sn=-1,Kr=Ht==null?0:Ht.length;++sn<Kr;)if(Pn(Ht[sn],sn,Ht))return!0;return!1}var Dd=Uh("length");function Bc(Ht){return Ht.split("")}function Zf(Ht){return Ht.match(zn)||[]}function gf(Ht,Pn,sn){var Kr;return sn(Ht,function(bi,Co,is){if(Pn(bi,Co,is))return Kr=Co,!1}),Kr}function sc(Ht,Pn,sn,Kr){for(var bi=Ht.length,Co=sn+(Kr?1:-1);Kr?Co--:++Co<bi;)if(Pn(Ht[Co],Co,Ht))return Co;return-1}function Ha(Ht,Pn,sn){return Pn===Pn?ph(Ht,Pn,sn):sc(Ht,Fh,sn)}function ch(Ht,Pn,sn,Kr){for(var bi=sn-1,Co=Ht.length;++bi<Co;)if(Kr(Ht[bi],Pn))return bi;return-1}function Fh(Ht){return Ht!==Ht}function ed(Ht,Pn){var sn=Ht==null?0:Ht.length;return sn?hh(Ht,Pn)/sn:Ue}function Uh(Ht){return function(Pn){return Pn==null?e:Pn[Ht]}}function td(Ht){return function(Pn){return Ht==null?e:Ht[Pn]}}function lc(Ht,Pn,sn,Kr,bi){return bi(Ht,function(Co,is,$o){sn=Kr?(Kr=!1,Co):Pn(sn,Co,is,$o)}),sn}function dh(Ht,Pn){var sn=Ht.length;for(Ht.sort(Pn);sn--;)Ht[sn]=Ht[sn].value;return Ht}function hh(Ht,Pn){for(var sn,Kr=-1,bi=Ht.length;++Kr<bi;){var Co=Pn(Ht[Kr]);Co!==e&&(sn=sn===e?Co:sn+Co)}return sn}function nd(Ht,Pn){for(var sn=-1,Kr=Array(Ht);++sn<Ht;)Kr[sn]=Pn(sn);return Kr}function Dp(Ht,Pn){return wa(Pn,function(sn){return[sn,Ht[sn]]})}function Ic(Ht){return Ht&&Ht.slice(0,Fd(Ht)+1).replace(Wn,"")}function lu(Ht){return function(Pn){return Ht(Pn)}}function fh(Ht,Pn){return wa(Pn,function(sn){return Ht[sn]})}function uu(Ht,Pn){return Ht.has(Pn)}function nA(Ht,Pn){for(var sn=-1,Kr=Ht.length;++sn<Kr&&Ha(Pn,Ht[sn],0)>-1;);return sn}function kc(Ht,Pn){for(var sn=Ht.length;sn--&&Ha(Pn,Ht[sn],0)>-1;);return sn}function Ld(Ht,Pn){for(var sn=Ht.length,Kr=0;sn--;)Ht[sn]===Pn&&++Kr;return Kr}var jh=td(te),Hl=td(Ee);function bl(Ht){return"\\"+$t[Ht]}function FA(Ht,Pn){return Ht==null?e:Ht[Pn]}function Tc(Ht){return zi.test(Ht)}function zh(Ht){return Zr.test(Ht)}function yf(Ht){for(var Pn,sn=[];!(Pn=Ht.next()).done;)sn.push(Pn.value);return sn}function rd(Ht){var Pn=-1,sn=Array(Ht.size);return Ht.forEach(function(Kr,bi){sn[++Pn]=[bi,Kr]}),sn}function fA(Ht,Pn){return function(sn){return Ht(Pn(sn))}}function Ys(Ht,Pn){for(var sn=-1,Kr=Ht.length,bi=0,Co=[];++sn<Kr;){var is=Ht[sn];(is===Pn||is===b)&&(Ht[sn]=b,Co[bi++]=sn)}return Co}function xl(Ht){var Pn=-1,sn=Array(Ht.size);return Ht.forEach(function(Kr){sn[++Pn]=Kr}),sn}function Yo(Ht){var Pn=-1,sn=Array(Ht.size);return Ht.forEach(function(Kr){sn[++Pn]=[Kr,Kr]}),sn}function ph(Ht,Pn,sn){for(var Kr=sn-1,bi=Ht.length;++Kr<bi;)if(Ht[Kr]===Pn)return Kr;return-1}function Lp(Ht,Pn,sn){for(var Kr=sn+1;Kr--;)if(Ht[Kr]===Pn)return Kr;return Kr}function Pc(Ht){return Tc(Ht)?uc(Ht):Dd(Ht)}function Bu(Ht){return Tc(Ht)?jd(Ht):Bc(Ht)}function Fd(Ht){for(var Pn=Ht.length;Pn--&&ir.test(Ht.charAt(Pn)););return Pn}var Ud=td(ot);function uc(Ht){for(var Pn=Ji.lastIndex=0;Ji.test(Ht);)++Pn;return Pn}function jd(Ht){return Ht.match(Ji)||[]}function Nh(Ht){return Ht.match($l)||[]}var Ac=function Ht(Pn){Pn=Pn==null?pr:Au.defaults(pr.Object(),Pn,Au.pick(pr,Vl));var sn=Pn.Array,Kr=Pn.Date,bi=Pn.Error,Co=Pn.Function,is=Pn.Math,$o=Pn.Object,UA=Pn.RegExp,Xf=Pn.String,wl=Pn.TypeError,cu=sn.prototype,jA=Co.prototype,Ml=$o.prototype,Qi=Pn["__core-js_shared__"],zA=jA.toString,Fo=Ml.hasOwnProperty,Kc=0,NA=function(){var x=/[^.]+$/.exec(Qi&&Qi.keys&&Qi.keys.IE_PROTO||"");return x?"Symbol(src)_1."+x:""}(),pA=Ml.toString,rA=zA.call($o),Sl=pr._,cc=UA("^"+zA.call(Fo).replace(Pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),du=So?Pn.Buffer:e,Ll=Pn.Symbol,Rc=Pn.Uint8Array,zd=du?du.allocUnsafe:e,Rs=fA($o.getPrototypeOf,$o),id=$o.create,dc=Ml.propertyIsEnumerable,GA=cu.splice,Gh=Ll?Ll.isConcatSpreadable:e,mA=Ll?Ll.iterator:e,WA=Ll?Ll.toStringTag:e,Dc=function(){try{var x=bd($o,"defineProperty");return x({},"",{}),x}catch{}}(),Nd=Pn.clearTimeout!==pr.clearTimeout&&Pn.clearTimeout,Vo=Kr&&Kr.now!==pr.Date.now&&Kr.now,Lc=Pn.setTimeout!==pr.setTimeout&&Pn.setTimeout,QA=is.ceil,Iu=is.floor,Fc=$o.getOwnPropertySymbols,Gd=du?du.isBuffer:e,Uc=Pn.isFinite,hc=cu.join,ua=fA($o.keys,$o),Uo=is.max,Aa=is.min,vf=Kr.now,od=Pn.parseInt,ad=is.random,ku=cu.reverse,qA=bd(Pn,"DataView"),Fl=bd(Pn,"Map"),gA=bd(Pn,"Promise"),il=bd(Pn,"Set"),YA=bd(Pn,"WeakMap"),Tu=bd($o,"create"),sd=YA&&new YA,Pu={},Wd=Cs(qA),$A=Cs(Fl),Ku=Cs(gA),Ru=Cs(il),yA=Cs(YA),fc=Ll?Ll.prototype:e,hu=fc?fc.valueOf:e,jc=fc?fc.toString:e;function rt(x){if(pl(x)&&!yo(x)&&!(x instanceof Wr)){if(x instanceof Li)return x;if(Fo.call(x,"__wrapped__"))return Gl(x)}return new Li(x)}var Ds=function(){function x(){}return function(T){if(!fl(T))return{};if(id)return id(T);x.prototype=T;var V=new x;return x.prototype=e,V}}();function Eo(){}function Li(x,T){this.__wrapped__=x,this.__actions__=[],this.__chain__=!!T,this.__index__=0,this.__values__=e}rt.templateSettings={escape:Yt,evaluate:Gt,interpolate:wt,variable:"",imports:{_:rt}},rt.prototype=Eo.prototype,rt.prototype.constructor=rt,Li.prototype=Ds(Eo.prototype),Li.prototype.constructor=Li;function Wr(x){this.__wrapped__=x,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ke,this.__views__=[]}function Ma(){var x=new Wr(this.__wrapped__);return x.__actions__=Os(this.__actions__),x.__dir__=this.__dir__,x.__filtered__=this.__filtered__,x.__iteratees__=Os(this.__iteratees__),x.__takeCount__=this.__takeCount__,x.__views__=Os(this.__views__),x}function ld(){if(this.__filtered__){var x=new Wr(this);x.__dir__=-1,x.__filtered__=!0}else x=this.clone(),x.__dir__*=-1;return x}function Qd(){var x=this.__wrapped__.value(),T=this.__dir__,V=yo(x),ve=T<0,Ve=V?x.length:0,At=jp(0,Ve,this.__views__),Dt=At.start,qt=At.end,on=qt-Dt,Gn=ve?qt:Dt-1,qn=this.__iteratees__,lr=qn.length,Yr=0,wi=Aa(on,this.__takeCount__);if(!V||!ve&&Ve==on&&wi==on)return sl(x,this.__actions__);var ro=[];e:for(;on--&&Yr<wi;){Gn+=T;for(var na=-1,io=x[Gn];++na<lr;){var Ca=qn[na],Da=Ca.iteratee,Ih=Ca.type,Id=Da(io);if(Ih==ye)io=Id;else if(!Id){if(Ih==Se)continue e;break e}}ro[Yr++]=io}return ro}Wr.prototype=Ds(Eo.prototype),Wr.prototype.constructor=Wr;function Ms(x){var T=-1,V=x==null?0:x.length;for(this.clear();++T<V;){var ve=x[T];this.set(ve[0],ve[1])}}function za(){this.__data__=Tu?Tu(null):{},this.size=0}function ya(x){var T=this.has(x)&&delete this.__data__[x];return this.size-=T?1:0,T}function iA(x){var T=this.__data__;if(Tu){var V=T[x];return V===f?e:V}return Fo.call(T,x)?T[x]:e}function Sa(x){var T=this.__data__;return Tu?T[x]!==e:Fo.call(T,x)}function dr(x,T){var V=this.__data__;return this.size+=this.has(x)?0:1,V[x]=Tu&&T===e?f:T,this}Ms.prototype.clear=za,Ms.prototype.delete=ya,Ms.prototype.get=iA,Ms.prototype.has=Sa,Ms.prototype.set=dr;function ys(x){var T=-1,V=x==null?0:x.length;for(this.clear();++T<V;){var ve=x[T];this.set(ve[0],ve[1])}}function zc(){this.__data__=[],this.size=0}function Ss(x){var T=this.__data__,V=ma(T,x);if(V<0)return!1;var ve=T.length-1;return V==ve?T.pop():GA.call(T,V,1),--this.size,!0}function VA(x){var T=this.__data__,V=ma(T,x);return V<0?e:T[V][1]}function ud(x){return ma(this.__data__,x)>-1}function Ad(x,T){var V=this.__data__,ve=ma(V,x);return ve<0?(++this.size,V.push([x,T])):V[ve][1]=T,this}ys.prototype.clear=zc,ys.prototype.delete=Ss,ys.prototype.get=VA,ys.prototype.has=ud,ys.prototype.set=Ad;function Si(x){var T=-1,V=x==null?0:x.length;for(this.clear();++T<V;){var ve=x[T];this.set(ve[0],ve[1])}}function cd(){this.size=0,this.__data__={hash:new Ms,map:new(Fl||ys),string:new Ms}}function Ul(x){var T=Gc(this,x).delete(x);return this.size-=T?1:0,T}function dd(x){return Gc(this,x).get(x)}function hd(x){return Gc(this,x).has(x)}function vA(x,T){var V=Gc(this,x),ve=V.size;return V.set(x,T),this.size+=V.size==ve?0:1,this}Si.prototype.clear=cd,Si.prototype.delete=Ul,Si.prototype.get=dd,Si.prototype.has=hd,Si.prototype.set=vA;function HA(x){var T=-1,V=x==null?0:x.length;for(this.__data__=new Si;++T<V;)this.add(x[T])}function oA(x){return this.__data__.set(x,f),this}function pc(x){return this.__data__.has(x)}HA.prototype.add=HA.prototype.push=oA,HA.prototype.has=pc;function Ea(x){var T=this.__data__=new ys(x);this.size=T.size}function bo(){this.__data__=new ys,this.size=0}function fu(x){var T=this.__data__,V=T.delete(x);return this.size=T.size,V}function Ls(x){return this.__data__.get(x)}function Ka(x){return this.__data__.has(x)}function Ho(x,T){var V=this.__data__;if(V instanceof ys){var ve=V.__data__;if(!Fl||ve.length<i-1)return ve.push([x,T]),this.size=++V.size,this;V=this.__data__=new Si(ve)}return V.set(x,T),this.size=V.size,this}Ea.prototype.clear=bo,Ea.prototype.delete=fu,Ea.prototype.get=Ls,Ea.prototype.has=Ka,Ea.prototype.set=Ho;function Zl(x,T){var V=yo(x),ve=!V&&Zp(x),Ve=!V&&!ve&&Oh(x),At=!V&&!ve&&!Ve&&fp(x),Dt=V||ve||Ve||At,qt=Dt?nd(x.length,Xf):[],on=qt.length;for(var Gn in x)(T||Fo.call(x,Gn))&&!(Dt&&(Gn=="length"||Ve&&(Gn=="offset"||Gn=="parent")||At&&(Gn=="buffer"||Gn=="byteLength"||Gn=="byteOffset")||O(Gn,on)))&&qt.push(Gn);return qt}function Du(x){var T=x.length;return T?x[vn(0,T-1)]:e}function mc(x,T){return js(Os(x),pu(T,0,x.length))}function qd(x){return js(Os(x))}function _A(x,T,V){(V!==e&&!Xd(x[T],V)||V===e&&!(T in x))&&Lu(x,T,V)}function gc(x,T,V){var ve=x[T];(!(Fo.call(x,T)&&Xd(ve,V))||V===e&&!(T in x))&&Lu(x,T,V)}function ma(x,T){for(var V=x.length;V--;)if(Xd(x[V][0],T))return V;return-1}function cs(x,T,V,ve){return To(x,function(Ve,At,Dt){T(ve,Ve,V(Ve),Dt)}),ve}function cr(x,T){return x&&nu(T,Lr(T),x)}function qr(x,T){return x&&nu(T,jr(T),x)}function Lu(x,T,V){T=="__proto__"&&Dc?Dc(x,T,{configurable:!0,enumerable:!0,value:V,writable:!0}):x[T]=V}function ZA(x,T){for(var V=-1,ve=T.length,Ve=sn(ve),At=x==null;++V<ve;)Ve[V]=At?e:bn(x,T[V]);return Ve}function pu(x,T,V){return x===x&&(V!==e&&(x=x<=V?x:V),T!==e&&(x=x>=T?x:T)),x}function va(x,T,V,ve,Ve,At){var Dt,qt=T&I,on=T&S,Gn=T&B;if(V&&(Dt=Ve?V(x,ve,Ve,At):V(x)),Dt!==e)return Dt;if(!fl(x))return x;var qn=yo(x);if(qn){if(Dt=$h(x),!qt)return Os(x,Dt)}else{var lr=ul(x),Yr=lr==mt||lr==bt;if(Oh(x))return _a(x,qt);if(lr==Sn||lr==ut||Yr&&!Ve){if(Dt=on||Yr?{}:Hs(x),!qt)return on?Jf(x,qr(Dt,x)):gd(x,cr(Dt,x))}else{if(!Di[lr])return Ve?x:{};Dt=ap(x,lr,qt)}}At||(At=new Ea);var wi=At.get(x);if(wi)return wi;At.set(x,Dt),wg(x)?x.forEach(function(io){Dt.add(va(io,T,V,io,x,At))}):d_(x)&&x.forEach(function(io,Ca){Dt.set(Ca,va(io,T,V,Ca,x,At))});var ro=Gn?on?Yh:qh:on?jr:Lr,na=qn?e:ro(x);return ws(na||x,function(io,Ca){na&&(Ca=io,io=x[Ca]),gc(Dt,Ca,va(io,T,V,Ca,x,At))}),Dt}function _f(x){var T=Lr(x);return function(V){return Xl(V,x,T)}}function Xl(x,T,V){var ve=V.length;if(x==null)return!ve;for(x=$o(x);ve--;){var Ve=V[ve],At=T[Ve],Dt=x[Ve];if(Dt===e&&!(Ve in x)||!At(Dt))return!1}return!0}function Cf(x,T,V){if(typeof x!="function")throw new wl(s);return li(function(){x.apply(e,V)},T)}function mu(x,T,V,ve){var Ve=-1,At=Eu,Dt=!0,qt=x.length,on=[],Gn=T.length;if(!qt)return on;V&&(T=wa(T,lu(V))),ve?(At=Ah,Dt=!1):T.length>=i&&(At=uu,Dt=!1,T=new HA(T));e:for(;++Ve<qt;){var qn=x[Ve],lr=V==null?qn:V(qn);if(qn=ve||qn!==0?qn:0,Dt&&lr===lr){for(var Yr=Gn;Yr--;)if(T[Yr]===lr)continue e;on.push(qn)}else At(T,lr,ve)||on.push(qn)}return on}var To=Us(ol),Oa=Us(Fu,!0);function Yd(x,T){var V=!0;return To(x,function(ve,Ve,At){return V=!!T(ve,Ve,At),V}),V}function CA(x,T,V){for(var ve=-1,Ve=x.length;++ve<Ve;){var At=x[ve],Dt=T(At);if(Dt!=null&&(qt===e?Dt===Dt&&!BA(Dt):V(Dt,qt)))var qt=Dt,on=At}return on}function $d(x,T,V,ve){var Ve=x.length;for(V=w(V),V<0&&(V=-V>Ve?0:Ve+V),ve=ve===e||ve>Ve?Ve:w(ve),ve<0&&(ve+=Ve),ve=V>ve?0:D(ve);V<ve;)x[V++]=T;return x}function bA(x,T){var V=[];return To(x,function(ve,Ve,At){T(ve,Ve,At)&&V.push(ve)}),V}function Na(x,T,V,ve,Ve){var At=-1,Dt=x.length;for(V||(V=y),Ve||(Ve=[]);++At<Dt;){var qt=x[At];T>0&&V(qt)?T>1?Na(qt,T-1,V,ve,Ve):Ou(Ve,qt):ve||(Ve[Ve.length]=qt)}return Ve}var yc=ep(),jl=ep(!0);function ol(x,T){return x&&yc(x,T,Lr)}function Fu(x,T){return x&&jl(x,T,Lr)}function vc(x,T){return Su(T,function(V){return tc(x[V])})}function gu(x,T){T=Xa(T,x);for(var V=0,ve=T.length;x!=null&&V<ve;)x=x[_s(T[V++])];return V&&V==ve?x:e}function vs(x,T,V){var ve=T(x);return yo(x)?ve:Ou(ve,V(x))}function Za(x){return x==null?x===e?Jr:rn:WA&&WA in $o(x)?op(x):Rn(x)}function Jl(x,T){return x>T}function eu(x,T){return x!=null&&Fo.call(x,T)}function aA(x,T){return x!=null&&T in $o(x)}function yu(x,T,V){return x>=Aa(T,V)&&x<Uo(T,V)}function _c(x,T,V){for(var ve=V?Ah:Eu,Ve=x[0].length,At=x.length,Dt=At,qt=sn(At),on=1/0,Gn=[];Dt--;){var qn=x[Dt];Dt&&T&&(qn=wa(qn,lu(T))),on=Aa(qn.length,on),qt[Dt]=!V&&(T||Ve>=120&&qn.length>=120)?new HA(Dt&&qn):e}qn=x[0];var lr=-1,Yr=qt[0];e:for(;++lr<Ve&&Gn.length<on;){var wi=qn[lr],ro=T?T(wi):wi;if(wi=V||wi!==0?wi:0,!(Yr?uu(Yr,ro):ve(Gn,ro,V))){for(Dt=At;--Dt;){var na=qt[Dt];if(!(na?uu(na,ro):ve(x[Dt],ro,V)))continue e}Yr&&Yr.push(ro),Gn.push(wi)}}return Gn}function Uu(x,T,V,ve){return ol(x,function(Ve,At,Dt){T(ve,V(Ve),At,Dt)}),ve}function zl(x,T,V){T=Xa(T,x),x=Xn(x,T);var ve=x==null?x:x[_s(OA(T))];return ve==null?e:Va(ve,x,V)}function fd(x){return pl(x)&&Za(x)==ut}function k(x){return pl(x)&&Za(x)==Ye}function l(x){return pl(x)&&Za(x)==we}function c(x,T,V,ve,Ve){return x===T?!0:x==null||T==null||!pl(x)&&!pl(T)?x!==x&&T!==T:C(x,T,V,ve,c,Ve)}function C(x,T,V,ve,Ve,At){var Dt=yo(x),qt=yo(T),on=Dt?jt:ul(x),Gn=qt?jt:ul(T);on=on==ut?Sn:on,Gn=Gn==ut?Sn:Gn;var qn=on==Sn,lr=Gn==Sn,Yr=on==Gn;if(Yr&&Oh(x)){if(!Oh(T))return!1;Dt=!0,qn=!1}if(Yr&&!qn)return At||(At=new Ea),Dt||fp(x)?SA(x,T,V,ve,Ve,At):Ch(x,T,on,V,ve,Ve,At);if(!(V&P)){var wi=qn&&Fo.call(x,"__wrapped__"),ro=lr&&Fo.call(T,"__wrapped__");if(wi||ro){var na=wi?x.value():x,io=ro?T.value():T;return At||(At=new Ea),Ve(na,io,V,ve,At)}}return Yr?(At||(At=new Ea),ip(x,T,V,ve,Ve,At)):!1}function M(x){return pl(x)&&ul(x)==Lt}function K(x,T,V,ve){var Ve=V.length,At=Ve,Dt=!ve;if(x==null)return!At;for(x=$o(x);Ve--;){var qt=V[Ve];if(Dt&&qt[2]?qt[1]!==x[qt[0]]:!(qt[0]in x))return!1}for(;++Ve<At;){qt=V[Ve];var on=qt[0],Gn=x[on],qn=qt[1];if(Dt&&qt[2]){if(Gn===e&&!(on in x))return!1}else{var lr=new Ea;if(ve)var Yr=ve(Gn,qn,on,x,T,lr);if(!(Yr===e?c(qn,Gn,P|U,ve,lr):Yr))return!1}}return!0}function z(x){if(!fl(x)||_e(x))return!1;var T=tc(x)?cc:Mi;return T.test(Cs(x))}function Y(x){return pl(x)&&Za(x)==ar}function ne(x){return pl(x)&&ul(x)==Cr}function se(x){return pl(x)&&b0(x.length)&&!!lo[Za(x)]}function be(x){return typeof x=="function"?x:x==null?th:typeof x=="object"?yo(x)?st(x[0],x[1]):ct(x):XO(x)}function Oe(x){if(!Le(x))return ua(x);var T=[];for(var V in $o(x))Fo.call(x,V)&&V!="constructor"&&T.push(V);return T}function Te(x){if(!fl(x))return xn(x);var T=Le(x),V=[];for(var ve in x)ve=="constructor"&&(T||!Fo.call(x,ve))||V.push(ve);return V}function $e(x,T){return x<T}function He(x,T){var V=-1,ve=wc(x)?sn(x.length):[];return To(x,function(Ve,At,Dt){ve[++V]=T(Ve,At,Dt)}),ve}function ct(x){var T=ta(x);return T.length==1&&T[0][2]?xt(T[0][0],T[0][1]):function(V){return V===x||K(V,x,T)}}function st(x,T){return R(x)&&ht(T)?xt(_s(x),T):function(V){var ve=bn(V,x);return ve===e&&ve===T?Ln(V,x):c(T,ve,P|U)}}function dt(x,T,V,ve,Ve){x!==T&&yc(T,function(At,Dt){if(Ve||(Ve=new Ea),fl(At))gt(x,T,Dt,V,dt,ve,Ve);else{var qt=ve?ve(or(x,Dt),At,Dt+"",x,T,Ve):e;qt===e&&(qt=At),_A(x,Dt,qt)}},jr)}function gt(x,T,V,ve,Ve,At,Dt){var qt=or(x,V),on=or(T,V),Gn=Dt.get(on);if(Gn){_A(x,V,Gn);return}var qn=At?At(qt,on,V+"",x,T,Dt):e,lr=qn===e;if(lr){var Yr=yo(on),wi=!Yr&&Oh(on),ro=!Yr&&!wi&&fp(on);qn=on,Yr||wi||ro?yo(qt)?qn=qt:hl(qt)?qn=Os(qt):wi?(lr=!1,qn=_a(on,!0)):ro?(lr=!1,qn=mh(on,!0)):qn=[]:Tf(on)||Zp(on)?(qn=qt,Zp(qt)?qn=N(qt):(!fl(qt)||tc(qt))&&(qn=Hs(on))):lr=!1}lr&&(Dt.set(on,qn),Ve(qn,on,ve,At,Dt),Dt.delete(on)),_A(x,V,qn)}function St(x,T){var V=x.length;if(V)return T+=T<0?V:0,O(T,V)?x[T]:e}function It(x,T,V){T.length?T=wa(T,function(At){return yo(At)?function(Dt){return gu(Dt,At.length===1?At[0]:At)}:At}):T=[th];var ve=-1;T=wa(T,lu(pi()));var Ve=He(x,function(At,Dt,qt){var on=wa(T,function(Gn){return Gn(At)});return{criteria:on,index:++ve,value:At}});return dh(Ve,function(At,Dt){return md(At,Dt,V)})}function Kt(x,T){return zt(x,T,function(V,ve){return Ln(x,ve)})}function zt(x,T,V){for(var ve=-1,Ve=T.length,At={};++ve<Ve;){var Dt=T[ve],qt=gu(x,Dt);V(qt,Dt)&&Or(At,Xa(Dt,x),qt)}return At}function Tt(x){return function(T){return gu(T,x)}}function tn(x,T,V,ve){var Ve=ve?ch:Ha,At=-1,Dt=T.length,qt=x;for(x===T&&(T=Os(T)),V&&(qt=wa(x,lu(V)));++At<Dt;)for(var on=0,Gn=T[At],qn=V?V(Gn):Gn;(on=Ve(qt,qn,on,ve))>-1;)qt!==x&&GA.call(qt,on,1),GA.call(x,on,1);return x}function Zt(x,T){for(var V=x?T.length:0,ve=V-1;V--;){var Ve=T[V];if(V==ve||Ve!==At){var At=Ve;O(Ve)?GA.call(x,Ve,1):Fs(x,Ve)}}return x}function vn(x,T){return x+Iu(ad()*(T-x+1))}function _n(x,T,V,ve){for(var Ve=-1,At=Uo(QA((T-x)/(V||1)),0),Dt=sn(At);At--;)Dt[ve?At:++Ve]=x,x+=V;return Dt}function gn(x,T){var V="";if(!x||T<1||T>je)return V;do T%2&&(V+=x),T=Iu(T/2),T&&(x+=x);while(T);return V}function In(x,T){return Fr(Yn(x,T,th),x+"")}function Un(x){return Du(Ro(x))}function wn(x,T){var V=Ro(x);return js(V,pu(T,0,V.length))}function Or(x,T,V,ve){if(!fl(x))return x;T=Xa(T,x);for(var Ve=-1,At=T.length,Dt=At-1,qt=x;qt!=null&&++Ve<At;){var on=_s(T[Ve]),Gn=V;if(on==="__proto__"||on==="constructor"||on==="prototype")return x;if(Ve!=Dt){var qn=qt[on];Gn=ve?ve(qn,on,qt):e,Gn===e&&(Gn=fl(qn)?qn:O(T[Ve+1])?[]:{})}gc(qt,on,Gn),qt=qt[on]}return x}var Bi=sd?function(x,T){return sd.set(x,T),x}:th,Hi=Dc?function(x,T){return Dc(x,"toString",{configurable:!0,enumerable:!1,value:Bd(T),writable:!0})}:th;function Oo(x){return js(Ro(x))}function Ei(x,T,V){var ve=-1,Ve=x.length;T<0&&(T=-T>Ve?0:Ve+T),V=V>Ve?Ve:V,V<0&&(V+=Ve),Ve=T>V?0:V-T>>>0,T>>>=0;for(var At=sn(Ve);++ve<Ve;)At[ve]=x[ve+T];return At}function jo(x,T){var V;return To(x,function(ve,Ve,At){return V=T(ve,Ve,At),!V}),!!V}function zo(x,T,V){var ve=0,Ve=x==null?ve:x.length;if(typeof T=="number"&&T===T&&Ve<=vt){for(;ve<Ve;){var At=ve+Ve>>>1,Dt=x[At];Dt!==null&&!BA(Dt)&&(V?Dt<=T:Dt<T)?ve=At+1:Ve=At}return Ve}return xo(x,T,th,V)}function xo(x,T,V,ve){var Ve=0,At=x==null?0:x.length;if(At===0)return 0;T=V(T);for(var Dt=T!==T,qt=T===null,on=BA(T),Gn=T===e;Ve<At;){var qn=Iu((Ve+At)/2),lr=V(x[qn]),Yr=lr!==e,wi=lr===null,ro=lr===lr,na=BA(lr);if(Dt)var io=ve||ro;else Gn?io=ro&&(ve||Yr):qt?io=ro&&Yr&&(ve||!wi):on?io=ro&&Yr&&!wi&&(ve||!na):wi||na?io=!1:io=ve?lr<=T:lr<T;io?Ve=qn+1:At=qn}return Aa(At,We)}function go(x,T){for(var V=-1,ve=x.length,Ve=0,At=[];++V<ve;){var Dt=x[V],qt=T?T(Dt):Dt;if(!V||!Xd(qt,on)){var on=qt;At[Ve++]=Dt===0?0:Dt}}return At}function Es(x){return typeof x=="number"?x:BA(x)?Ue:+x}function No(x){if(typeof x=="string")return x;if(yo(x))return wa(x,No)+"";if(BA(x))return jc?jc.call(x):"";var T=x+"";return T=="0"&&1/x==-1/0?"-0":T}function ca(x,T,V){var ve=-1,Ve=Eu,At=x.length,Dt=!0,qt=[],on=qt;if(V)Dt=!1,Ve=Ah;else if(At>=i){var Gn=T?null:Up(x);if(Gn)return xl(Gn);Dt=!1,Ve=uu,on=new HA}else on=T?[]:qt;e:for(;++ve<At;){var qn=x[ve],lr=T?T(qn):qn;if(qn=V||qn!==0?qn:0,Dt&&lr===lr){for(var Yr=on.length;Yr--;)if(on[Yr]===lr)continue e;T&&on.push(lr),qt.push(qn)}else Ve(on,lr,V)||(on!==qt&&on.push(lr),qt.push(qn))}return qt}function Fs(x,T){return T=Xa(T,x),x=Xn(x,T),x==null||delete x[_s(OA(T))]}function ju(x,T,V,ve){return Or(x,T,V(gu(x,T)),ve)}function al(x,T,V,ve){for(var Ve=x.length,At=ve?Ve:-1;(ve?At--:++At<Ve)&&T(x[At],At,x););return V?Ei(x,ve?0:At,ve?At+1:Ve):Ei(x,ve?At+1:0,ve?Ve:At)}function sl(x,T){var V=x;return V instanceof Wr&&(V=V.value()),Jc(T,function(ve,Ve){return Ve.func.apply(Ve.thisArg,Ou([ve],Ve.args))},V)}function tu(x,T,V){var ve=x.length;if(ve<2)return ve?ca(x[0]):[];for(var Ve=-1,At=sn(ve);++Ve<ve;)for(var Dt=x[Ve],qt=-1;++qt<ve;)qt!=Ve&&(At[Ve]=mu(At[Ve]||Dt,x[qt],T,V));return ca(Na(At,1),T,V)}function xA(x,T,V){for(var ve=-1,Ve=x.length,At=T.length,Dt={};++ve<Ve;){var qt=ve<At?T[ve]:e;V(Dt,x[ve],qt)}return Dt}function wA(x){return hl(x)?x:[]}function zu(x){return typeof x=="function"?x:th}function Xa(x,T){return yo(x)?x:R(x,T)?[x]:as(ie(x))}var ll=In;function os(x,T,V){var ve=x.length;return V=V===e?ve:V,!T&&V>=ve?x:Ei(x,T,V)}var El=Nd||function(x){return pr.clearTimeout(x)};function _a(x,T){if(T)return x.slice();var V=x.length,ve=zd?zd(V):new x.constructor(V);return x.copy(ve),ve}function Ga(x){var T=new x.constructor(x.byteLength);return new Rc(T).set(new Rc(x)),T}function $s(x,T){var V=T?Ga(x.buffer):x.buffer;return new x.constructor(V,x.byteOffset,x.byteLength)}function Vs(x){var T=new x.constructor(x.source,Xr.exec(x));return T.lastIndex=x.lastIndex,T}function pd(x){return hu?$o(hu.call(x)):{}}function mh(x,T){var V=T?Ga(x.buffer):x.buffer;return new x.constructor(V,x.byteOffset,x.length)}function gh(x,T){if(x!==T){var V=x!==e,ve=x===null,Ve=x===x,At=BA(x),Dt=T!==e,qt=T===null,on=T===T,Gn=BA(T);if(!qt&&!Gn&&!At&&x>T||At&&Dt&&on&&!qt&&!Gn||ve&&Dt&&on||!V&&on||!Ve)return 1;if(!ve&&!At&&!Gn&&x<T||Gn&&V&&Ve&&!ve&&!At||qt&&V&&Ve||!Dt&&Ve||!on)return-1}return 0}function md(x,T,V){for(var ve=-1,Ve=x.criteria,At=T.criteria,Dt=Ve.length,qt=V.length;++ve<Dt;){var on=gh(Ve[ve],At[ve]);if(on){if(ve>=qt)return on;var Gn=V[ve];return on*(Gn=="desc"?-1:1)}}return x.index-T.index}function XA(x,T,V,ve){for(var Ve=-1,At=x.length,Dt=V.length,qt=-1,on=T.length,Gn=Uo(At-Dt,0),qn=sn(on+Gn),lr=!ve;++qt<on;)qn[qt]=T[qt];for(;++Ve<Dt;)(lr||Ve<At)&&(qn[V[Ve]]=x[Ve]);for(;Gn--;)qn[qt++]=x[Ve++];return qn}function yh(x,T,V,ve){for(var Ve=-1,At=x.length,Dt=-1,qt=V.length,on=-1,Gn=T.length,qn=Uo(At-qt,0),lr=sn(qn+Gn),Yr=!ve;++Ve<qn;)lr[Ve]=x[Ve];for(var wi=Ve;++on<Gn;)lr[wi+on]=T[on];for(;++Dt<qt;)(Yr||Ve<At)&&(lr[wi+V[Dt]]=x[Ve++]);return lr}function Os(x,T){var V=-1,ve=x.length;for(T||(T=sn(ve));++V<ve;)T[V]=x[V];return T}function nu(x,T,V,ve){var Ve=!V;V||(V={});for(var At=-1,Dt=T.length;++At<Dt;){var qt=T[At],on=ve?ve(V[qt],x[qt],qt,V,x):e;on===e&&(on=x[qt]),Ve?Lu(V,qt,on):gc(V,qt,on)}return V}function gd(x,T){return nu(x,vu(x),T)}function Jf(x,T){return nu(x,bm(x),T)}function Cc(x,T){return function(V,ve){var Ve=yo(V)?ac:cs,At=T?T():{};return Ve(V,x,pi(ve,2),At)}}function MA(x){return In(function(T,V){var ve=-1,Ve=V.length,At=Ve>1?V[Ve-1]:e,Dt=Ve>2?V[2]:e;for(At=x.length>3&&typeof At=="function"?(Ve--,At):e,Dt&&E(V[0],V[1],Dt)&&(At=Ve<3?e:At,Ve=1),T=$o(T);++ve<Ve;){var qt=V[ve];qt&&x(T,qt,ve,At)}return T})}function Us(x,T){return function(V,ve){if(V==null)return V;if(!wc(V))return x(V,ve);for(var Ve=V.length,At=T?Ve:-1,Dt=$o(V);(T?At--:++At<Ve)&&ve(Dt[At],At,Dt)!==!1;);return V}}function ep(x){return function(T,V,ve){for(var Ve=-1,At=$o(T),Dt=ve(T),qt=Dt.length;qt--;){var on=Dt[x?qt:++Ve];if(V(At[on],on,At)===!1)break}return T}}function vh(x,T,V){var ve=T&j,Ve=bc(x);function At(){var Dt=this&&this!==pr&&this instanceof At?Ve:x;return Dt.apply(ve?V:this,arguments)}return At}function tp(x){return function(T){T=ie(T);var V=Tc(T)?Bu(T):e,ve=V?V[0]:T.charAt(0),Ve=V?os(V,1).join(""):T.slice(1);return ve[x]()+Ve}}function Vd(x){return function(T){return Jc(w_(w0(T).replace(Cl,"")),x,"")}}function bc(x){return function(){var T=arguments;switch(T.length){case 0:return new x;case 1:return new x(T[0]);case 2:return new x(T[0],T[1]);case 3:return new x(T[0],T[1],T[2]);case 4:return new x(T[0],T[1],T[2],T[3]);case 5:return new x(T[0],T[1],T[2],T[3],T[4]);case 6:return new x(T[0],T[1],T[2],T[3],T[4],T[5]);case 7:return new x(T[0],T[1],T[2],T[3],T[4],T[5],T[6])}var V=Ds(x.prototype),ve=x.apply(V,T);return fl(ve)?ve:V}}function Fp(x,T,V){var ve=bc(x);function Ve(){for(var At=arguments.length,Dt=sn(At),qt=At,on=Nc(Ve);qt--;)Dt[qt]=arguments[qt];var Gn=At<3&&Dt[0]!==on&&Dt[At-1]!==on?[]:Ys(Dt,on);if(At-=Gn.length,At<V)return Nl(x,T,yd,Ve.placeholder,e,Dt,Gn,e,e,V-At);var qn=this&&this!==pr&&this instanceof Ve?ve:x;return Va(qn,this,Dt)}return Ve}function JA(x){return function(T,V,ve){var Ve=$o(T);if(!wc(T)){var At=pi(V,3);T=Lr(T),V=function(qt){return At(Ve[qt],qt,Ve)}}var Dt=x(T,V,ve);return Dt>-1?Ve[At?T[Dt]:Dt]:e}}function _h(x){return xc(function(T){var V=T.length,ve=V,Ve=Li.prototype.thru;for(x&&T.reverse();ve--;){var At=T[ve];if(typeof At!="function")throw new wl(s);if(Ve&&!Dt&&Cd(At)=="wrapper")var Dt=new Li([],!0)}for(ve=Dt?ve:V;++ve<V;){At=T[ve];var qt=Cd(At),on=qt=="wrapper"?Zd(At):e;on&&Ae(on[0])&&on[1]==(G|ee|$|ae)&&!on[4].length&&on[9]==1?Dt=Dt[Cd(on[0])].apply(Dt,on[3]):Dt=At.length==1&&Ae(At)?Dt[qt]():Dt.thru(At)}return function(){var Gn=arguments,qn=Gn[0];if(Dt&&Gn.length==1&&yo(qn))return Dt.plant(qn).value();for(var lr=0,Yr=V?T[lr].apply(this,Gn):qn;++lr<V;)Yr=T[lr].call(this,Yr);return Yr}})}function yd(x,T,V,ve,Ve,At,Dt,qt,on,Gn){var qn=T&G,lr=T&j,Yr=T&q,wi=T&(ee|J),ro=T&ge,na=Yr?e:bc(x);function io(){for(var Ca=arguments.length,Da=sn(Ca),Ih=Ca;Ih--;)Da[Ih]=arguments[Ih];if(wi)var Id=Nc(io),kh=Ld(Da,Id);if(ve&&(Da=XA(Da,ve,Ve,wi)),At&&(Da=yh(Da,At,Dt,wi)),Ca-=kh,wi&&Ca<Gn){var qu=Ys(Da,Id);return Nl(x,T,yd,io.placeholder,V,Da,qu,qt,on,Gn-Ca)}var Rf=lr?V:this,nm=Yr?Rf[x]:x;return Ca=Da.length,qt?Da=yr(Da,qt):ro&&Ca>1&&Da.reverse(),qn&&on<Ca&&(Da.length=on),this&&this!==pr&&this instanceof io&&(nm=na||bc(nm)),nm.apply(Rf,Da)}return io}function np(x,T){return function(V,ve){return Uu(V,x,T(ve),{})}}function Hd(x,T){return function(V,ve){var Ve;if(V===e&&ve===e)return T;if(V!==e&&(Ve=V),ve!==e){if(Ve===e)return ve;typeof V=="string"||typeof ve=="string"?(V=No(V),ve=No(ve)):(V=Es(V),ve=Es(ve)),Ve=x(V,ve)}return Ve}}function bf(x){return xc(function(T){return T=wa(T,lu(pi())),In(function(V){var ve=this;return x(T,function(Ve){return Va(Ve,ve,V)})})})}function xf(x,T){T=T===e?" ":No(T);var V=T.length;if(V<2)return V?gn(T,x):T;var ve=gn(T,QA(x/Pc(T)));return Tc(T)?os(Bu(ve),0,x).join(""):ve.slice(0,x)}function rp(x,T,V,ve){var Ve=T&j,At=bc(x);function Dt(){for(var qt=-1,on=arguments.length,Gn=-1,qn=ve.length,lr=sn(qn+on),Yr=this&&this!==pr&&this instanceof Dt?At:x;++Gn<qn;)lr[Gn]=ve[Gn];for(;on--;)lr[Gn++]=arguments[++qt];return Va(Yr,Ve?V:this,lr)}return Dt}function vd(x){return function(T,V,ve){return ve&&typeof ve!="number"&&E(T,V,ve)&&(V=ve=e),T=v(T),V===e?(V=T,T=0):V=v(V),ve=ve===e?T<V?1:-1:v(ve),_n(T,V,ve,x)}}function Wh(x){return function(T,V){return typeof T=="string"&&typeof V=="string"||(T=F(T),V=F(V)),x(T,V)}}function Nl(x,T,V,ve,Ve,At,Dt,qt,on,Gn){var qn=T&ee,lr=qn?Dt:e,Yr=qn?e:Dt,wi=qn?At:e,ro=qn?e:At;T|=qn?$:X,T&=~(qn?X:$),T&W||(T&=-4);var na=[x,T,Ve,wi,lr,ro,Yr,qt,on,Gn],io=V.apply(e,na);return Ae(x)&&Tr(io,na),io.placeholder=ve,no(io,x,T)}function Ol(x){var T=is[x];return function(V,ve){if(V=F(V),ve=ve==null?0:Aa(w(ve),292),ve&&Uc(V)){var Ve=(ie(V)+"e").split("e"),At=T(Ve[0]+"e"+(+Ve[1]+ve));return Ve=(ie(At)+"e").split("e"),+(Ve[0]+"e"+(+Ve[1]-ve))}return T(V)}}var Up=il&&1/xl(new il([,-0]))[1]==Ne?function(x){return new il(x)}:ox;function wf(x){return function(T){var V=ul(T);return V==Lt?rd(T):V==Cr?Yo(T):Dp(T,x(T))}}function Bo(x,T,V,ve,Ve,At,Dt,qt){var on=T&q;if(!on&&typeof x!="function")throw new wl(s);var Gn=ve?ve.length:0;if(Gn||(T&=-97,ve=Ve=e),Dt=Dt===e?Dt:Uo(w(Dt),0),qt=qt===e?qt:w(qt),Gn-=Ve?Ve.length:0,T&X){var qn=ve,lr=Ve;ve=Ve=e}var Yr=on?e:Zd(x),wi=[x,T,V,ve,Ve,qn,lr,At,Dt,qt];if(Yr&&Qt(wi,Yr),x=wi[0],T=wi[1],V=wi[2],ve=wi[3],Ve=wi[4],qt=wi[9]=wi[9]===e?on?0:x.length:Uo(wi[9]-Gn,0),!qt&&T&(ee|J)&&(T&=-25),!T||T==j)var ro=vh(x,T,V);else T==ee||T==J?ro=Fp(x,T,qt):(T==$||T==(j|$))&&!Ve.length?ro=rp(x,T,V,ve):ro=yd.apply(e,wi);var na=Yr?Bi:Tr;return no(na(ro,wi),x,T)}function Nu(x,T,V,ve){return x===e||Xd(x,Ml[V])&&!Fo.call(ve,V)?T:x}function Qh(x,T,V,ve,Ve,At){return fl(x)&&fl(T)&&(At.set(T,x),dt(x,T,e,Qh,At),At.delete(T)),x}function _d(x){return Tf(x)?e:x}function SA(x,T,V,ve,Ve,At){var Dt=V&P,qt=x.length,on=T.length;if(qt!=on&&!(Dt&&on>qt))return!1;var Gn=At.get(x),qn=At.get(T);if(Gn&&qn)return Gn==T&&qn==x;var lr=-1,Yr=!0,wi=V&U?new HA:e;for(At.set(x,T),At.set(T,x);++lr<qt;){var ro=x[lr],na=T[lr];if(ve)var io=Dt?ve(na,ro,lr,T,x,At):ve(ro,na,lr,x,T,At);if(io!==e){if(io)continue;Yr=!1;break}if(wi){if(!tA(T,function(Ca,Da){if(!uu(wi,Da)&&(ro===Ca||Ve(ro,Ca,V,ve,At)))return wi.push(Da)})){Yr=!1;break}}else if(!(ro===na||Ve(ro,na,V,ve,At))){Yr=!1;break}}return At.delete(x),At.delete(T),Yr}function Ch(x,T,V,ve,Ve,At,Dt){switch(V){case de:if(x.byteLength!=T.byteLength||x.byteOffset!=T.byteOffset)return!1;x=x.buffer,T=T.buffer;case Ye:return!(x.byteLength!=T.byteLength||!At(new Rc(x),new Rc(T)));case Ke:case we:case Vt:return Xd(+x,+T);case tt:return x.name==T.name&&x.message==T.message;case ar:case br:return x==T+"";case Lt:var qt=rd;case Cr:var on=ve&P;if(qt||(qt=xl),x.size!=T.size&&!on)return!1;var Gn=Dt.get(x);if(Gn)return Gn==T;ve|=U,Dt.set(x,T);var qn=SA(qt(x),qt(T),ve,Ve,At,Dt);return Dt.delete(x),qn;case _r:if(hu)return hu.call(x)==hu.call(T)}return!1}function ip(x,T,V,ve,Ve,At){var Dt=V&P,qt=qh(x),on=qt.length,Gn=qh(T),qn=Gn.length;if(on!=qn&&!Dt)return!1;for(var lr=on;lr--;){var Yr=qt[lr];if(!(Dt?Yr in T:Fo.call(T,Yr)))return!1}var wi=At.get(x),ro=At.get(T);if(wi&&ro)return wi==T&&ro==x;var na=!0;At.set(x,T),At.set(T,x);for(var io=Dt;++lr<on;){Yr=qt[lr];var Ca=x[Yr],Da=T[Yr];if(ve)var Ih=Dt?ve(Da,Ca,Yr,T,x,At):ve(Ca,Da,Yr,x,T,At);if(!(Ih===e?Ca===Da||Ve(Ca,Da,V,ve,At):Ih)){na=!1;break}io||(io=Yr=="constructor")}if(na&&!io){var Id=x.constructor,kh=T.constructor;Id!=kh&&"constructor"in x&&"constructor"in T&&!(typeof Id=="function"&&Id instanceof Id&&typeof kh=="function"&&kh instanceof kh)&&(na=!1)}return At.delete(x),At.delete(T),na}function xc(x){return Fr(Yn(x,e,Wc),x+"")}function qh(x){return vs(x,Lr,vu)}function Yh(x){return vs(x,jr,bm)}var Zd=sd?function(x){return sd.get(x)}:ox;function Cd(x){for(var T=x.name+"",V=Pu[T],ve=Fo.call(Pu,T)?V.length:0;ve--;){var Ve=V[ve],At=Ve.func;if(At==null||At==x)return Ve.name}return T}function Nc(x){var T=Fo.call(rt,"placeholder")?rt:x;return T.placeholder}function pi(){var x=rt.iteratee||rx;return x=x===rx?be:x,arguments.length?x(arguments[0],arguments[1]):x}function Gc(x,T){var V=x.__data__;return H(T)?V[typeof T=="string"?"string":"hash"]:V.map}function ta(x){for(var T=Lr(x),V=T.length;V--;){var ve=T[V],Ve=x[ve];T[V]=[ve,Ve,ht(Ve)]}return T}function bd(x,T){var V=FA(x,T);return z(V)?V:e}function op(x){var T=Fo.call(x,WA),V=x[WA];try{x[WA]=e;var ve=!0}catch{}var Ve=pA.call(x);return ve&&(T?x[WA]=V:delete x[WA]),Ve}var vu=Fc?function(x){return x==null?[]:(x=$o(x),Su(Fc(x),function(T){return dc.call(x,T)}))}:ax,bm=Fc?function(x){for(var T=[];x;)Ou(T,vu(x)),x=Rs(x);return T}:ax,ul=Za;(qA&&ul(new qA(new ArrayBuffer(1)))!=de||Fl&&ul(new Fl)!=Lt||gA&&ul(gA.resolve())!=Ar||il&&ul(new il)!=Cr||YA&&ul(new YA)!=wr)&&(ul=function(x){var T=Za(x),V=T==Sn?x.constructor:e,ve=V?Cs(V):"";if(ve)switch(ve){case Wd:return de;case $A:return Lt;case Ku:return Ar;case Ru:return Cr;case yA:return wr}return T});function jp(x,T,V){for(var ve=-1,Ve=V.length;++ve<Ve;){var At=V[ve],Dt=At.size;switch(At.type){case"drop":x+=Dt;break;case"dropRight":T-=Dt;break;case"take":T=Aa(T,x+Dt);break;case"takeRight":x=Uo(x,T-Dt);break}}return{start:x,end:T}}function ds(x){var T=x.match(fr);return T?T[1].split(hr):[]}function zp(x,T,V){T=Xa(T,x);for(var ve=-1,Ve=T.length,At=!1;++ve<Ve;){var Dt=_s(T[ve]);if(!(At=x!=null&&V(x,Dt)))break;x=x[Dt]}return At||++ve!=Ve?At:(Ve=x==null?0:x.length,!!Ve&&b0(Ve)&&O(Dt,Ve)&&(yo(x)||Zp(x)))}function $h(x){var T=x.length,V=new x.constructor(T);return T&&typeof x[0]=="string"&&Fo.call(x,"index")&&(V.index=x.index,V.input=x.input),V}function Hs(x){return typeof x.constructor=="function"&&!Le(x)?Ds(Rs(x)):{}}function ap(x,T,V){var ve=x.constructor;switch(T){case Ye:return Ga(x);case Ke:case we:return new ve(+x);case de:return $s(x,V);case pe:case Je:case kt:case Xt:case it:case Ut:case qe:case fe:case xe:return mh(x,V);case Lt:return new ve;case Vt:case br:return new ve(x);case ar:return Vs(x);case Cr:return new ve;case _r:return pd(x)}}function A(x,T){var V=T.length;if(!V)return x;var ve=V-1;return T[ve]=(V>1?"& ":"")+T[ve],T=T.join(V>2?", ":" "),x.replace(zr,`{
|
||
/* [wrapped with `+T+`] */
|
||
`)}function y(x){return yo(x)||Zp(x)||!!(Gh&&x&&x[Gh])}function O(x,T){var V=typeof x;return T=T??je,!!T&&(V=="number"||V!="symbol"&&ns.test(x))&&x>-1&&x%1==0&&x<T}function E(x,T,V){if(!fl(V))return!1;var ve=typeof T;return(ve=="number"?wc(V)&&O(T,V.length):ve=="string"&&T in V)?Xd(V[T],x):!1}function R(x,T){if(yo(x))return!1;var V=typeof x;return V=="number"||V=="symbol"||V=="boolean"||x==null||BA(x)?!0:En.test(x)||!Tn.test(x)||T!=null&&x in $o(T)}function H(x){var T=typeof x;return T=="string"||T=="number"||T=="symbol"||T=="boolean"?x!=="__proto__":x===null}function Ae(x){var T=Cd(x),V=rt[T];if(typeof V!="function"||!(T in Wr.prototype))return!1;if(x===V)return!0;var ve=Zd(V);return!!ve&&x===ve[0]}function _e(x){return!!NA&&NA in x}var Be=Qi?tc:sx;function Le(x){var T=x&&x.constructor,V=typeof T=="function"&&T.prototype||Ml;return x===V}function ht(x){return x===x&&!fl(x)}function xt(x,T){return function(V){return V==null?!1:V[x]===T&&(T!==e||x in $o(V))}}function Jt(x){var T=mr(x,function(ve){return V.size===g&&V.clear(),ve}),V=T.cache;return T}function Qt(x,T){var V=x[1],ve=T[1],Ve=V|ve,At=Ve<(j|q|G),Dt=ve==G&&V==ee||ve==G&&V==ae&&x[7].length<=T[8]||ve==(G|ae)&&T[7].length<=T[8]&&V==ee;if(!(At||Dt))return x;ve&j&&(x[2]=T[2],Ve|=V&j?0:W);var qt=T[3];if(qt){var on=x[3];x[3]=on?XA(on,qt,T[4]):qt,x[4]=on?Ys(x[3],b):T[4]}return qt=T[5],qt&&(on=x[5],x[5]=on?yh(on,qt,T[6]):qt,x[6]=on?Ys(x[5],b):T[6]),qt=T[7],qt&&(x[7]=qt),ve&G&&(x[8]=x[8]==null?T[8]:Aa(x[8],T[8])),x[9]==null&&(x[9]=T[9]),x[0]=T[0],x[1]=Ve,x}function xn(x){var T=[];if(x!=null)for(var V in $o(x))T.push(V);return T}function Rn(x){return pA.call(x)}function Yn(x,T,V){return T=Uo(T===e?x.length-1:T,0),function(){for(var ve=arguments,Ve=-1,At=Uo(ve.length-T,0),Dt=sn(At);++Ve<At;)Dt[Ve]=ve[T+Ve];Ve=-1;for(var qt=sn(T+1);++Ve<T;)qt[Ve]=ve[Ve];return qt[T]=V(Dt),Va(x,this,qt)}}function Xn(x,T){return T.length<2?x:gu(x,Ei(T,0,-1))}function yr(x,T){for(var V=x.length,ve=Aa(T.length,V),Ve=Os(x);ve--;){var At=T[ve];x[ve]=O(At,V)?Ve[At]:e}return x}function or(x,T){if(!(T==="constructor"&&typeof x[T]=="function")&&T!="__proto__")return x[T]}var Tr=Io(Bi),li=Lc||function(x,T){return pr.setTimeout(x,T)},Fr=Io(Hi);function no(x,T,V){var ve=T+"";return Fr(x,A(ve,Bs(ds(ve),V)))}function Io(x){var T=0,V=0;return function(){var ve=vf(),Ve=oe-(ve-V);if(V=ve,Ve>0){if(++T>=re)return arguments[0]}else T=0;return x.apply(e,arguments)}}function js(x,T){var V=-1,ve=x.length,Ve=ve-1;for(T=T===e?ve:T;++V<T;){var At=vn(V,Ve),Dt=x[At];x[At]=x[V],x[V]=Dt}return x.length=T,x}var as=Jt(function(x){var T=[];return x.charCodeAt(0)===46&&T.push(""),x.replace(sr,function(V,ve,Ve,At){T.push(Ve?At.replace(po,"$1"):ve||V)}),T});function _s(x){if(typeof x=="string"||BA(x))return x;var T=x+"";return T=="0"&&1/x==-1/0?"-0":T}function Cs(x){if(x!=null){try{return zA.call(x)}catch{}try{return x+""}catch{}}return""}function Bs(x,T){return ws(Pt,function(V){var ve="_."+V[0];T&V[1]&&!Eu(x,ve)&&x.push(ve)}),x.sort()}function Gl(x){if(x instanceof Wr)return x.clone();var T=new Li(x.__wrapped__,x.__chain__);return T.__actions__=Os(x.__actions__),T.__index__=x.__index__,T.__values__=x.__values__,T}function zs(x,T,V){(V?E(x,T,V):T===e)?T=1:T=Uo(w(T),0);var ve=x==null?0:x.length;if(!ve||T<1)return[];for(var Ve=0,At=0,Dt=sn(QA(ve/T));Ve<ve;)Dt[At++]=Ei(x,Ve,Ve+=T);return Dt}function bs(x){for(var T=-1,V=x==null?0:x.length,ve=0,Ve=[];++T<V;){var At=x[T];At&&(Ve[ve++]=At)}return Ve}function da(){var x=arguments.length;if(!x)return[];for(var T=sn(x-1),V=arguments[0],ve=x;ve--;)T[ve-1]=arguments[ve];return Ou(yo(V)?Os(V):[V],Na(T,1))}var vi=In(function(x,T){return hl(x)?mu(x,Na(T,1,hl,!0)):[]}),Zo=In(function(x,T){var V=OA(T);return hl(V)&&(V=e),hl(x)?mu(x,Na(T,1,hl,!0),pi(V,2)):[]}),ss=In(function(x,T){var V=OA(T);return hl(V)&&(V=e),hl(x)?mu(x,Na(T,1,hl,!0),e,V):[]});function hs(x,T,V){var ve=x==null?0:x.length;return ve?(T=V||T===e?1:w(T),Ei(x,T<0?0:T,ve)):[]}function Ba(x,T,V){var ve=x==null?0:x.length;return ve?(T=V||T===e?1:w(T),T=ve-T,Ei(x,0,T<0?0:T)):[]}function Bl(x,T){return x&&x.length?al(x,pi(T,3),!0,!0):[]}function Po(x,T){return x&&x.length?al(x,pi(T,3),!0):[]}function xd(x,T,V,ve){var Ve=x==null?0:x.length;return Ve?(V&&typeof V!="number"&&E(x,T,V)&&(V=0,ve=Ve),$d(x,T,V,ve)):[]}function Al(x,T,V){var ve=x==null?0:x.length;if(!ve)return-1;var Ve=V==null?0:w(V);return Ve<0&&(Ve=Uo(ve+Ve,0)),sc(x,pi(T,3),Ve)}function EA(x,T,V){var ve=x==null?0:x.length;if(!ve)return-1;var Ve=ve-1;return V!==e&&(Ve=w(V),Ve=V<0?Uo(ve+Ve,0):Aa(Ve,ve-1)),sc(x,pi(T,3),Ve,!0)}function Wc(x){var T=x==null?0:x.length;return T?Na(x,1):[]}function cl(x){var T=x==null?0:x.length;return T?Na(x,Ne):[]}function dl(x,T){var V=x==null?0:x.length;return V?(T=T===e?1:w(T),Na(x,T)):[]}function Vh(x){for(var T=-1,V=x==null?0:x.length,ve={};++T<V;){var Ve=x[T];ve[Ve[0]]=Ve[1]}return ve}function Mf(x){return x&&x.length?x[0]:e}function bh(x,T,V){var ve=x==null?0:x.length;if(!ve)return-1;var Ve=V==null?0:w(V);return Ve<0&&(Ve=Uo(ve+Ve,0)),Ha(x,T,Ve)}function Hh(x){var T=x==null?0:x.length;return T?Ei(x,0,-1):[]}var xm=In(function(x){var T=wa(x,wA);return T.length&&T[0]===x[0]?_c(T):[]}),Zh=In(function(x){var T=OA(x),V=wa(x,wA);return T===OA(V)?T=e:V.pop(),V.length&&V[0]===x[0]?_c(V,pi(T,2)):[]}),wm=In(function(x){var T=OA(x),V=wa(x,wA);return T=typeof T=="function"?T:e,T&&V.pop(),V.length&&V[0]===x[0]?_c(V,e,T):[]});function Xh(x,T){return x==null?"":hc.call(x,T)}function OA(x){var T=x==null?0:x.length;return T?x[T-1]:e}function Np(x,T,V){var ve=x==null?0:x.length;if(!ve)return-1;var Ve=ve;return V!==e&&(Ve=w(V),Ve=Ve<0?Uo(ve+Ve,0):Aa(Ve,ve-1)),T===T?Lp(x,T,Ve):sc(x,Fh,Ve,!0)}function c0(x,T){return x&&x.length?St(x,w(T)):e}var Gp=In(Sf);function Sf(x,T){return x&&x.length&&T&&T.length?tn(x,T):x}function sA(x,T,V){return x&&x.length&&T&&T.length?tn(x,T,pi(V,2)):x}function xh(x,T,V){return x&&x.length&&T&&T.length?tn(x,T,e,V):x}var Qc=xc(function(x,T){var V=x==null?0:x.length,ve=ZA(x,T);return Zt(x,wa(T,function(Ve){return O(Ve,V)?+Ve:Ve}).sort(gh)),ve});function ec(x,T){var V=[];if(!(x&&x.length))return V;var ve=-1,Ve=[],At=x.length;for(T=pi(T,3);++ve<At;){var Dt=x[ve];T(Dt,ve,x)&&(V.push(Dt),Ve.push(ve))}return Zt(x,Ve),V}function Ef(x){return x==null?x:ku.call(x)}function d0(x,T,V){var ve=x==null?0:x.length;return ve?(V&&typeof V!="number"&&E(x,T,V)?(T=0,V=ve):(T=T==null?0:w(T),V=V===e?ve:w(V)),Ei(x,T,V)):[]}function Mm(x,T){return zo(x,T)}function ny(x,T,V){return xo(x,T,pi(V,2))}function Jh(x,T){var V=x==null?0:x.length;if(V){var ve=zo(x,T);if(ve<V&&Xd(x[ve],T))return ve}return-1}function fg(x,T){return zo(x,T,!0)}function Sm(x,T,V){return xo(x,T,pi(V,2),!0)}function Of(x,T){var V=x==null?0:x.length;if(V){var ve=zo(x,T,!0)-1;if(Xd(x[ve],T))return ve}return-1}function h0(x){return x&&x.length?go(x):[]}function wd(x,T){return x&&x.length?go(x,pi(T,2)):[]}function f0(x){var T=x==null?0:x.length;return T?Ei(x,1,T):[]}function Em(x,T,V){return x&&x.length?(T=V||T===e?1:w(T),Ei(x,0,T<0?0:T)):[]}function Om(x,T,V){var ve=x==null?0:x.length;return ve?(T=V||T===e?1:w(T),T=ve-T,Ei(x,T<0?0:T,ve)):[]}function Ns(x,T){return x&&x.length?al(x,pi(T,3),!1,!0):[]}function p0(x,T){return x&&x.length?al(x,pi(T,3)):[]}var ry=In(function(x){return ca(Na(x,1,hl,!0))}),m0=In(function(x){var T=OA(x);return hl(T)&&(T=e),ca(Na(x,1,hl,!0),pi(T,2))}),Bm=In(function(x){var T=OA(x);return T=typeof T=="function"?T:e,ca(Na(x,1,hl,!0),e,T)});function wh(x){return x&&x.length?ca(x):[]}function iy(x,T){return x&&x.length?ca(x,pi(T,2)):[]}function sp(x,T){return T=typeof T=="function"?T:e,x&&x.length?ca(x,e,T):[]}function Im(x){if(!(x&&x.length))return[];var T=0;return x=Su(x,function(V){if(hl(V))return T=Uo(V.length,T),!0}),nd(T,function(V){return wa(x,Uh(V))})}function Zs(x,T){if(!(x&&x.length))return[];var V=Im(x);return T==null?V:wa(V,function(ve){return Va(T,e,ve)})}var pg=In(function(x,T){return hl(x)?mu(x,T):[]}),lA=In(function(x){return tu(Su(x,hl))}),g0=In(function(x){var T=OA(x);return hl(T)&&(T=e),tu(Su(x,hl),pi(T,2))}),mg=In(function(x){var T=OA(x);return T=typeof T=="function"?T:e,tu(Su(x,hl),e,T)}),Mh=In(Im);function lp(x,T){return xA(x||[],T||[],gc)}function Wp(x,T){return xA(x||[],T||[],Or)}var Gu=In(function(x){var T=x.length,V=T>1?x[T-1]:e;return V=typeof V=="function"?(x.pop(),V):e,Zs(x,V)});function Bf(x){var T=rt(x);return T.__chain__=!0,T}function km(x,T){return T(x),x}function Md(x,T){return T(x)}var Tm=xc(function(x){var T=x.length,V=T?x[0]:0,ve=this.__wrapped__,Ve=function(At){return ZA(At,x)};return T>1||this.__actions__.length||!(ve instanceof Wr)||!O(V)?this.thru(Ve):(ve=ve.slice(V,+V+(T?1:0)),ve.__actions__.push({func:Md,args:[Ve],thisArg:e}),new Li(ve,this.__chain__).thru(function(At){return T&&!At.length&&At.push(e),At}))});function ef(){return Bf(this)}function Qp(){return new Li(this.value(),this.__chain__)}function y0(){this.__values__===e&&(this.__values__=d(this.value()));var x=this.__index__>=this.__values__.length,T=x?e:this.__values__[this.__index__++];return{done:x,value:T}}function Pm(){return this}function gg(x){for(var T,V=this;V instanceof Eo;){var ve=Gl(V);ve.__index__=0,ve.__values__=e,T?Ve.__wrapped__=ve:T=ve;var Ve=ve;V=V.__wrapped__}return Ve.__wrapped__=x,T}function qp(){var x=this.__wrapped__;if(x instanceof Wr){var T=x;return this.__actions__.length&&(T=new Wr(this)),T=T.reverse(),T.__actions__.push({func:Md,args:[Ef],thisArg:e}),new Li(T,this.__chain__)}return this.thru(Ef)}function v0(){return sl(this.__wrapped__,this.__actions__)}var yg=Cc(function(x,T,V){Fo.call(x,V)?++x[V]:Lu(x,V,1)});function vg(x,T,V){var ve=yo(x)?Xc:Yd;return V&&E(x,T,V)&&(T=e),ve(x,pi(T,3))}function Yp(x,T){var V=yo(x)?Su:bA;return V(x,pi(T,3))}var $p=JA(Al),up=JA(EA);function qc(x,T){return Na(Ap(x,T),1)}function Sh(x,T){return Na(Ap(x,T),Ne)}function Km(x,T,V){return V=V===e?1:w(V),Na(Ap(x,T),V)}function If(x,T){var V=yo(x)?ws:To;return V(x,pi(T,3))}function Rm(x,T){var V=yo(x)?rl:Oa;return V(x,pi(T,3))}var Dm=Cc(function(x,T,V){Fo.call(x,V)?x[V].push(T):Lu(x,V,[T])});function Vp(x,T,V,ve){x=wc(x)?x:Ro(x),V=V&&!ve?w(V):0;var Ve=x.length;return V<0&&(V=Uo(Ve+V,0)),Xp(x)?V<=Ve&&x.indexOf(T,V)>-1:!!Ve&&Ha(x,T,V)>-1}var _0=In(function(x,T,V){var ve=-1,Ve=typeof T=="function",At=wc(x)?sn(x.length):[];return To(x,function(Dt){At[++ve]=Ve?Va(T,Dt,V):zl(Dt,T,V)}),At}),Lm=Cc(function(x,T,V){Lu(x,V,T)});function Ap(x,T){var V=yo(x)?wa:He;return V(x,pi(T,3))}function kf(x,T,V,ve){return x==null?[]:(yo(T)||(T=T==null?[]:[T]),V=ve?e:V,yo(V)||(V=V==null?[]:[V]),It(x,T,V))}var cp=Cc(function(x,T,V){x[V?0:1].push(T)},function(){return[[],[]]});function Hp(x,T,V){var ve=yo(x)?Jc:lc,Ve=arguments.length<3;return ve(x,pi(T,4),V,Ve,To)}function m(x,T,V){var ve=yo(x)?Hf:lc,Ve=arguments.length<3;return ve(x,pi(T,4),V,Ve,Oa)}function _(x,T){var V=yo(x)?Su:bA;return V(x,ni(pi(T,3)))}function L(x){var T=yo(x)?Du:Un;return T(x)}function Q(x,T,V){(V?E(x,T,V):T===e)?T=1:T=w(T);var ve=yo(x)?mc:wn;return ve(x,T)}function le(x){var T=yo(x)?qd:Oo;return T(x)}function me(x){if(x==null)return 0;if(wc(x))return Xp(x)?Pc(x):x.length;var T=ul(x);return T==Lt||T==Cr?x.size:Oe(x).length}function Xe(x,T,V){var ve=yo(x)?tA:jo;return V&&E(x,T,V)&&(T=e),ve(x,pi(T,3))}var Bt=In(function(x,T){if(x==null)return[];var V=T.length;return V>1&&E(x,T[0],T[1])?T=[]:V>2&&E(T[0],T[1],T[2])&&(T=[T[0]]),It(x,Na(T,1),[])}),Wt=Vo||function(){return pr.Date.now()};function Cn(x,T){if(typeof T!="function")throw new wl(s);return x=w(x),function(){if(--x<1)return T.apply(this,arguments)}}function nr(x,T,V){return T=V?e:T,T=x&&T==null?x.length:T,Bo(x,G,e,e,e,e,T)}function ur(x,T){var V;if(typeof T!="function")throw new wl(s);return x=w(x),function(){return--x>0&&(V=T.apply(this,arguments)),x<=1&&(T=e),V}}var $n=In(function(x,T,V){var ve=j;if(V.length){var Ve=Ys(V,Nc($n));ve|=$}return Bo(x,ve,T,V,Ve)}),Rr=In(function(x,T,V){var ve=j|q;if(V.length){var Ve=Ys(V,Nc(Rr));ve|=$}return Bo(T,ve,x,V,Ve)});function oi(x,T,V){T=V?e:T;var ve=Bo(x,ee,e,e,e,e,e,T);return ve.placeholder=oi.placeholder,ve}function ui(x,T,V){T=V?e:T;var ve=Bo(x,J,e,e,e,e,e,T);return ve.placeholder=ui.placeholder,ve}function Xs(x,T,V){var ve,Ve,At,Dt,qt,on,Gn=0,qn=!1,lr=!1,Yr=!0;if(typeof x!="function")throw new wl(s);T=F(T)||0,fl(V)&&(qn=!!V.leading,lr="maxWait"in V,At=lr?Uo(F(V.maxWait)||0,T):At,Yr="trailing"in V?!!V.trailing:Yr);function wi(qu){var Rf=ve,nm=Ve;return ve=Ve=e,Gn=qu,Dt=x.apply(nm,Rf),Dt}function ro(qu){return Gn=qu,qt=li(Ca,T),qn?wi(qu):Dt}function na(qu){var Rf=qu-on,nm=qu-Gn,JO=T-Rf;return lr?Aa(JO,At-nm):JO}function io(qu){var Rf=qu-on,nm=qu-Gn;return on===e||Rf>=T||Rf<0||lr&&nm>=At}function Ca(){var qu=Wt();if(io(qu))return Da(qu);qt=li(Ca,na(qu))}function Da(qu){return qt=e,Yr&&ve?wi(qu):(ve=Ve=e,Dt)}function Ih(){qt!==e&&El(qt),Gn=0,ve=on=Ve=qt=e}function Id(){return qt===e?Dt:Da(Wt())}function kh(){var qu=Wt(),Rf=io(qu);if(ve=arguments,Ve=this,on=qu,Rf){if(qt===e)return ro(on);if(lr)return El(qt),qt=li(Ca,T),wi(on)}return qt===e&&(qt=li(Ca,T)),Dt}return kh.cancel=Ih,kh.flush=Id,kh}var ln=In(function(x,T){return Cf(x,1,T)}),en=In(function(x,T,V){return Cf(x,F(T)||0,V)});function dn(x){return Bo(x,ge)}function mr(x,T){if(typeof x!="function"||T!=null&&typeof T!="function")throw new wl(s);var V=function(){var ve=arguments,Ve=T?T.apply(this,ve):ve[0],At=V.cache;if(At.has(Ve))return At.get(Ve);var Dt=x.apply(this,ve);return V.cache=At.set(Ve,Dt)||At,Dt};return V.cache=new(mr.Cache||Si),V}mr.Cache=Si;function ni(x){if(typeof x!="function")throw new wl(s);return function(){var T=arguments;switch(T.length){case 0:return!x.call(this);case 1:return!x.call(this,T[0]);case 2:return!x.call(this,T[0],T[1]);case 3:return!x.call(this,T[0],T[1],T[2])}return!x.apply(this,T)}}function Ti(x){return ur(2,x)}var Ii=ll(function(x,T){T=T.length==1&&yo(T[0])?wa(T[0],lu(pi())):wa(Na(T,1),lu(pi()));var V=T.length;return In(function(ve){for(var Ve=-1,At=Aa(ve.length,V);++Ve<At;)ve[Ve]=T[Ve].call(this,ve[Ve]);return Va(x,this,ve)})}),Ni=In(function(x,T){var V=Ys(T,Nc(Ni));return Bo(x,$,e,T,V)}),Ra=In(function(x,T){var V=Ys(T,Nc(Ra));return Bo(x,X,e,T,V)}),Xo=xc(function(x,T){return Bo(x,ae,e,e,e,T)});function Eh(x,T){if(typeof x!="function")throw new wl(s);return T=T===e?T:w(T),In(x,T)}function _g(x,T){if(typeof x!="function")throw new wl(s);return T=T==null?0:Uo(w(T),0),In(function(V){var ve=V[T],Ve=os(V,0,T);return ve&&Ou(Ve,ve),Va(x,this,Ve)})}function r_(x,T,V){var ve=!0,Ve=!0;if(typeof x!="function")throw new wl(s);return fl(V)&&(ve="leading"in V?!!V.leading:ve,Ve="trailing"in V?!!V.trailing:Ve),Xs(x,T,{leading:ve,maxWait:T,trailing:Ve})}function i_(x){return nr(x,1)}function o_(x,T){return Ni(zu(T),x)}function a_(){if(!arguments.length)return[];var x=arguments[0];return yo(x)?x:[x]}function N2(x){return va(x,B)}function s_(x,T){return T=typeof T=="function"?T:e,va(x,B,T)}function dp(x){return va(x,I|B)}function l_(x,T){return T=typeof T=="function"?T:e,va(x,I|B,T)}function u_(x,T){return T==null||Xl(x,T,Lr(T))}function Xd(x,T){return x===T||x!==x&&T!==T}var A_=Wh(Jl),G2=Wh(function(x,T){return x>=T}),Zp=fd(function(){return arguments}())?fd:function(x){return pl(x)&&Fo.call(x,"callee")&&!dc.call(x,"callee")},yo=sn.isArray,C0=eo?lu(eo):k;function wc(x){return x!=null&&b0(x.length)&&!tc(x)}function hl(x){return pl(x)&&wc(x)}function c_(x){return x===!0||x===!1||pl(x)&&Za(x)==Ke}var Oh=Gd||sx,Cg=to?lu(to):l;function bg(x){return pl(x)&&x.nodeType===1&&!Tf(x)}function W2(x){if(x==null)return!0;if(wc(x)&&(yo(x)||typeof x=="string"||typeof x.splice=="function"||Oh(x)||fp(x)||Zp(x)))return!x.length;var T=ul(x);if(T==Lt||T==Cr)return!x.size;if(Le(x))return!Oe(x).length;for(var V in x)if(Fo.call(x,V))return!1;return!0}function Q2(x,T){return c(x,T)}function q2(x,T,V){V=typeof V=="function"?V:e;var ve=V?V(x,T):e;return ve===e?c(x,T,e,V):!!ve}function hp(x){if(!pl(x))return!1;var T=Za(x);return T==tt||T==Fe||typeof x.message=="string"&&typeof x.name=="string"&&!Tf(x)}function uA(x){return typeof x=="number"&&Uc(x)}function tc(x){if(!fl(x))return!1;var T=Za(x);return T==mt||T==bt||T==Rt||T==Bn}function xg(x){return typeof x=="number"&&x==w(x)}function b0(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=je}function fl(x){var T=typeof x;return x!=null&&(T=="object"||T=="function")}function pl(x){return x!=null&&typeof x=="object"}var d_=la?lu(la):M;function h_(x,T){return x===T||K(x,T,ta(T))}function f_(x,T,V){return V=typeof V=="function"?V:e,K(x,T,ta(T),V)}function Y2(x){return sy(x)&&x!=+x}function p_(x){if(Be(x))throw new bi(o);return z(x)}function oy(x){return x===null}function ay(x){return x==null}function sy(x){return typeof x=="number"||pl(x)&&Za(x)==Vt}function Tf(x){if(!pl(x)||Za(x)!=Sn)return!1;var T=Rs(x);if(T===null)return!0;var V=Fo.call(T,"constructor")&&T.constructor;return typeof V=="function"&&V instanceof V&&zA.call(V)==rA}var x0=gs?lu(gs):Y;function m_(x){return xg(x)&&x>=-9007199254740991&&x<=je}var wg=Ks?lu(Ks):ne;function Xp(x){return typeof x=="string"||!yo(x)&&pl(x)&&Za(x)==br}function BA(x){return typeof x=="symbol"||pl(x)&&Za(x)==_r}var fp=su?lu(su):se;function ly(x){return x===e}function uy(x){return pl(x)&&ul(x)==wr}function $2(x){return pl(x)&&Za(x)==hi}var h=Wh($e),u=Wh(function(x,T){return x<=T});function d(x){if(!x)return[];if(wc(x))return Xp(x)?Bu(x):Os(x);if(mA&&x[mA])return yf(x[mA]());var T=ul(x),V=T==Lt?rd:T==Cr?xl:Ro;return V(x)}function v(x){if(!x)return x===0?x:0;if(x=F(x),x===Ne||x===-1/0){var T=x<0?-1:1;return T*et}return x===x?x:0}function w(x){var T=v(x),V=T%1;return T===T?V?T-V:T:0}function D(x){return x?pu(w(x),0,ke):0}function F(x){if(typeof x=="number")return x;if(BA(x))return Ue;if(fl(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=fl(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=Ic(x);var V=mo.test(x);return V||ka.test(x)?Nn(x.slice(2),V?2:8):ii.test(x)?Ue:+x}function N(x){return nu(x,jr(x))}function Z(x){return x?pu(w(x),-9007199254740991,je):x===0?x:0}function ie(x){return x==null?"":No(x)}var ce=MA(function(x,T){if(Le(T)||wc(T)){nu(T,Lr(T),x);return}for(var V in T)Fo.call(T,V)&&gc(x,V,T[V])}),Ce=MA(function(x,T){nu(T,jr(T),x)}),Pe=MA(function(x,T,V,ve){nu(T,jr(T),x,ve)}),De=MA(function(x,T,V,ve){nu(T,Lr(T),x,ve)}),ze=xc(ZA);function Ze(x,T){var V=Ds(x);return T==null?V:cr(V,T)}var lt=In(function(x,T){x=$o(x);var V=-1,ve=T.length,Ve=ve>2?T[2]:e;for(Ve&&E(T[0],T[1],Ve)&&(ve=1);++V<ve;)for(var At=T[V],Dt=jr(At),qt=-1,on=Dt.length;++qt<on;){var Gn=Dt[qt],qn=x[Gn];(qn===e||Xd(qn,Ml[Gn])&&!Fo.call(x,Gn))&&(x[Gn]=At[Gn])}return x}),yt=In(function(x){return x.push(e,Qh),Va(Wl,e,x)});function Nt(x,T){return gf(x,pi(T,3),ol)}function Mt(x,T){return gf(x,pi(T,3),Fu)}function Re(x,T){return x==null?x:yc(x,pi(T,3),jr)}function at(x,T){return x==null?x:jl(x,pi(T,3),jr)}function Ot(x,T){return x&&ol(x,pi(T,3))}function un(x,T){return x&&Fu(x,pi(T,3))}function Fn(x){return x==null?[]:vc(x,Lr(x))}function mn(x){return x==null?[]:vc(x,jr(x))}function bn(x,T,V){var ve=x==null?e:gu(x,T);return ve===e?V:ve}function Vn(x,T){return x!=null&&zp(x,T,eu)}function Ln(x,T){return x!=null&&zp(x,T,aA)}var rr=np(function(x,T,V){T!=null&&typeof T.toString!="function"&&(T=pA.call(T)),x[T]=V},Bd(th)),On=np(function(x,T,V){T!=null&&typeof T.toString!="function"&&(T=pA.call(T)),Fo.call(x,T)?x[T].push(V):x[T]=[V]},pi),Ur=In(zl);function Lr(x){return wc(x)?Zl(x):Oe(x)}function jr(x){return wc(x)?Zl(x,!0):Te(x)}function ei(x,T){var V={};return T=pi(T,3),ol(x,function(ve,Ve,At){Lu(V,T(ve,Ve,At),ve)}),V}function Ko(x,T){var V={};return T=pi(T,3),ol(x,function(ve,Ve,At){Lu(V,Ve,T(ve,Ve,At))}),V}var Js=MA(function(x,T,V){dt(x,T,V)}),Wl=MA(function(x,T,V,ve){dt(x,T,V,ve)}),Wu=xc(function(x,T){var V={};if(x==null)return V;var ve=!1;T=wa(T,function(At){return At=Xa(At,x),ve||(ve=At.length>1),At}),nu(x,Yh(x),V),ve&&(V=va(V,I|S|B,_d));for(var Ve=T.length;Ve--;)Fs(V,T[Ve]);return V});function Jd(x,T){return _u(x,ni(pi(T)))}var nc=xc(function(x,T){return x==null?{}:Kt(x,T)});function _u(x,T){if(x==null)return{};var V=wa(Yh(x),function(ve){return[ve]});return T=pi(T),zt(x,V,function(ve,Ve){return T(ve,Ve[0])})}function AA(x,T,V){T=Xa(T,x);var ve=-1,Ve=T.length;for(Ve||(Ve=1,x=e);++ve<Ve;){var At=x==null?e:x[_s(T[ve])];At===e&&(ve=Ve,At=V),x=tc(At)?At.call(x):At}return x}function ml(x,T,V){return x==null?x:Or(x,T,V)}function ru(x,T,V,ve){return ve=typeof ve=="function"?ve:e,x==null?x:Or(x,T,V,ve)}var IA=wf(Lr),kA=wf(jr);function rc(x,T,V){var ve=yo(x),Ve=ve||Oh(x)||fp(x);if(T=pi(T,4),V==null){var At=x&&x.constructor;Ve?V=ve?new At:[]:fl(x)?V=tc(At)?Ds(Rs(x)):{}:V={}}return(Ve?ws:ol)(x,function(Dt,qt,on){return T(V,Dt,qt,on)}),V}function iu(x,T){return x==null?!0:Fs(x,T)}function Sd(x,T,V){return x==null?x:ju(x,T,zu(V))}function Mc(x,T,V,ve){return ve=typeof ve=="function"?ve:e,x==null?x:ju(x,T,zu(V),ve)}function Ro(x){return x==null?[]:fh(x,Lr(x))}function cA(x){return x==null?[]:fh(x,jr(x))}function Gs(x,T,V){return V===e&&(V=T,T=e),V!==e&&(V=F(V),V=V===V?V:0),T!==e&&(T=F(T),T=T===T?T:0),pu(F(x),T,V)}function el(x,T,V){return T=v(T),V===e?(V=T,T=0):V=v(V),x=F(x),yu(x,T,V)}function Cu(x,T,V){if(V&&typeof V!="boolean"&&E(x,T,V)&&(T=V=e),V===e&&(typeof T=="boolean"?(V=T,T=e):typeof x=="boolean"&&(V=x,x=e)),x===e&&T===e?(x=0,T=1):(x=v(x),T===e?(T=x,x=0):T=v(T)),x>T){var ve=x;x=T,T=ve}if(V||x%1||T%1){var Ve=ad();return Aa(x+Ve*(T-x+Sr("1e-"+((Ve+"").length-1))),T)}return vn(x,T)}var Jp=Vd(function(x,T,V){return T=T.toLowerCase(),x+(V?Yc(T):T)});function Yc(x){return dy(ie(x).toLowerCase())}function w0(x){return x=ie(x),x&&x.replace(wo,jh).replace(eA,"")}function eh(x,T,V){x=ie(x),T=No(T);var ve=x.length;V=V===e?ve:pu(w(V),0,ve);var Ve=V;return V-=T.length,V>=0&&x.slice(V,Ve)==T}function $c(x){return x=ie(x),x&&nn.test(x)?x.replace(Et,Hl):x}function Qu(x){return x=ie(x),x&&an.test(x)?x.replace(Pr,"\\$&"):x}var Ed=Vd(function(x,T,V){return x+(V?"-":"")+T.toLowerCase()}),Pf=Vd(function(x,T,V){return x+(V?" ":"")+T.toLowerCase()}),g_=tp("toLowerCase");function y_(x,T,V){x=ie(x),T=w(T);var ve=T?Pc(x):0;if(!T||ve>=T)return x;var Ve=(T-ve)/2;return xf(Iu(Ve),V)+x+xf(QA(Ve),V)}function v_(x,T,V){x=ie(x),T=w(T);var ve=T?Pc(x):0;return T&&ve<T?x+xf(T-ve,V):x}function __(x,T,V){x=ie(x),T=w(T);var ve=T?Pc(x):0;return T&&ve<T?xf(T-ve,V)+x:x}function Ay(x,T,V){return V||T==null?T=0:T&&(T=+T),od(ie(x).replace(Wn,""),T||0)}function cy(x,T,V){return(V?E(x,T,V):T===e)?T=1:T=w(T),gn(ie(x),T)}function Kf(){var x=arguments,T=ie(x[0]);return x.length<3?T:T.replace(x[1],x[2])}var C_=Vd(function(x,T,V){return x+(V?"_":"")+T.toLowerCase()});function b_(x,T,V){return V&&typeof V!="number"&&E(x,T,V)&&(T=V=e),V=V===e?ke:V>>>0,V?(x=ie(x),x&&(typeof T=="string"||T!=null&&!x0(T))&&(T=No(T),!T&&Tc(x))?os(Bu(x),0,V):x.split(T,V)):[]}var V2=Vd(function(x,T,V){return x+(V?" ":"")+dy(T)});function H2(x,T,V){return x=ie(x),V=V==null?0:pu(w(V),0,x.length),T=No(T),x.slice(V,V+T.length)==T}function Z2(x,T,V){var ve=rt.templateSettings;V&&E(x,T,V)&&(T=e),x=ie(x),T=Pe({},T,ve,Nu);var Ve=Pe({},T.imports,ve.imports,Nu),At=Lr(Ve),Dt=fh(Ve,At),qt,on,Gn=0,qn=T.interpolate||Ua,lr="__p += '",Yr=UA((T.escape||Ua).source+"|"+qn.source+"|"+(qn===wt?ri:Ua).source+"|"+(T.evaluate||Ua).source+"|$","g"),wi="//# sourceURL="+(Fo.call(T,"sourceURL")?(T.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wi+"]")+`
|
||
`;x.replace(Yr,function(io,Ca,Da,Ih,Id,kh){return Da||(Da=Ih),lr+=x.slice(Gn,kh).replace(Ya,bl),Ca&&(qt=!0,lr+=`' +
|
||
__e(`+Ca+`) +
|
||
'`),Id&&(on=!0,lr+=`';
|
||
`+Id+`;
|
||
__p += '`),Da&&(lr+=`' +
|
||
((__t = (`+Da+`)) == null ? '' : __t) +
|
||
'`),Gn=kh+io.length,io}),lr+=`';
|
||
`;var ro=Fo.call(T,"variable")&&T.variable;if(!ro)lr=`with (obj) {
|
||
`+lr+`
|
||
}
|
||
`;else if(Pi.test(ro))throw new bi(a);lr=(on?lr.replace(p,""):lr).replace(Qe,"$1").replace(pt,"$1;"),lr="function("+(ro||"obj")+`) {
|
||
`+(ro?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(qt?", __e = _.escape":"")+(on?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+lr+`return __p
|
||
}`;var na=M_(function(){return Co(At,wi+"return "+lr).apply(e,Dt)});if(na.source=lr,hp(na))throw na;return na}function X2(x){return ie(x).toLowerCase()}function J2(x){return ie(x).toUpperCase()}function ex(x,T,V){if(x=ie(x),x&&(V||T===e))return Ic(x);if(!x||!(T=No(T)))return x;var ve=Bu(x),Ve=Bu(T),At=nA(ve,Ve),Dt=kc(ve,Ve)+1;return os(ve,At,Dt).join("")}function tx(x,T,V){if(x=ie(x),x&&(V||T===e))return x.slice(0,Fd(x)+1);if(!x||!(T=No(T)))return x;var ve=Bu(x),Ve=kc(ve,Bu(T))+1;return os(ve,0,Ve).join("")}function nx(x,T,V){if(x=ie(x),x&&(V||T===e))return x.replace(Wn,"");if(!x||!(T=No(T)))return x;var ve=Bu(x),Ve=nA(ve,Bu(T));return os(ve,Ve).join("")}function Bh(x,T){var V=he,ve=Ie;if(fl(T)){var Ve="separator"in T?T.separator:Ve;V="length"in T?w(T.length):V,ve="omission"in T?No(T.omission):ve}x=ie(x);var At=x.length;if(Tc(x)){var Dt=Bu(x);At=Dt.length}if(V>=At)return x;var qt=V-Pc(ve);if(qt<1)return ve;var on=Dt?os(Dt,0,qt).join(""):x.slice(0,qt);if(Ve===e)return on+ve;if(Dt&&(qt+=on.length-qt),x0(Ve)){if(x.slice(qt).search(Ve)){var Gn,qn=on;for(Ve.global||(Ve=UA(Ve.source,ie(Xr.exec(Ve))+"g")),Ve.lastIndex=0;Gn=Ve.exec(qn);)var lr=Gn.index;on=on.slice(0,lr===e?qt:lr)}}else if(x.indexOf(No(Ve),qt)!=qt){var Yr=on.lastIndexOf(Ve);Yr>-1&&(on=on.slice(0,Yr))}return on+ve}function Mg(x){return x=ie(x),x&&Ct.test(x)?x.replace(ft,Ud):x}var x_=Vd(function(x,T,V){return x+(V?" ":"")+T.toUpperCase()}),dy=tp("toUpperCase");function w_(x,T,V){return x=ie(x),T=V?e:T,T===e?zh(x)?Nh(x):Zf(x):x.match(T)||[]}var M_=In(function(x,T){try{return Va(x,e,T)}catch(V){return hp(V)?V:new bi(V)}}),TA=xc(function(x,T){return ws(T,function(V){V=_s(V),Lu(x,V,$n(x[V],x))}),x});function Od(x){var T=x==null?0:x.length,V=pi();return x=T?wa(x,function(ve){if(typeof ve[1]!="function")throw new wl(s);return[V(ve[0]),ve[1]]}):[],In(function(ve){for(var Ve=-1;++Ve<T;){var At=x[Ve];if(Va(At[0],this,ve))return Va(At[1],this,ve)}})}function em(x){return _f(va(x,I))}function Bd(x){return function(){return x}}function tm(x,T){return x==null||x!==x?T:x}var tf=_h(),az=_h(!0);function th(x){return x}function rx(x){return be(typeof x=="function"?x:va(x,I))}function sz(x){return ct(va(x,I))}function lz(x,T){return st(x,va(T,I))}var uz=In(function(x,T){return function(V){return zl(V,x,T)}}),Az=In(function(x,T){return function(V){return zl(x,V,T)}});function ix(x,T,V){var ve=Lr(T),Ve=vc(T,ve);V==null&&!(fl(T)&&(Ve.length||!ve.length))&&(V=T,T=x,x=this,Ve=vc(T,Lr(T)));var At=!(fl(V)&&"chain"in V)||!!V.chain,Dt=tc(x);return ws(Ve,function(qt){var on=T[qt];x[qt]=on,Dt&&(x.prototype[qt]=function(){var Gn=this.__chain__;if(At||Gn){var qn=x(this.__wrapped__),lr=qn.__actions__=Os(this.__actions__);return lr.push({func:on,args:arguments,thisArg:x}),qn.__chain__=Gn,qn}return on.apply(x,Ou([this.value()],arguments))})}),x}function cz(){return pr._===this&&(pr._=Sl),this}function ox(){}function dz(x){return x=w(x),In(function(T){return St(T,x)})}var hz=bf(wa),fz=bf(Xc),pz=bf(tA);function XO(x){return R(x)?Uh(_s(x)):Tt(x)}function mz(x){return function(T){return x==null?e:gu(x,T)}}var gz=vd(),yz=vd(!0);function ax(){return[]}function sx(){return!1}function vz(){return{}}function _z(){return""}function Cz(){return!0}function bz(x,T){if(x=w(x),x<1||x>je)return[];var V=ke,ve=Aa(x,ke);T=pi(T),x-=ke;for(var Ve=nd(ve,T);++V<x;)T(V);return Ve}function xz(x){return yo(x)?wa(x,_s):BA(x)?[x]:Os(as(ie(x)))}function wz(x){var T=++Kc;return ie(x)+T}var Mz=Hd(function(x,T){return x+T},0),Sz=Ol("ceil"),Ez=Hd(function(x,T){return x/T},1),Oz=Ol("floor");function Bz(x){return x&&x.length?CA(x,th,Jl):e}function Iz(x,T){return x&&x.length?CA(x,pi(T,2),Jl):e}function kz(x){return ed(x,th)}function Tz(x,T){return ed(x,pi(T,2))}function Pz(x){return x&&x.length?CA(x,th,$e):e}function Kz(x,T){return x&&x.length?CA(x,pi(T,2),$e):e}var Rz=Hd(function(x,T){return x*T},1),Dz=Ol("round"),Lz=Hd(function(x,T){return x-T},0);function Fz(x){return x&&x.length?hh(x,th):0}function Uz(x,T){return x&&x.length?hh(x,pi(T,2)):0}return rt.after=Cn,rt.ary=nr,rt.assign=ce,rt.assignIn=Ce,rt.assignInWith=Pe,rt.assignWith=De,rt.at=ze,rt.before=ur,rt.bind=$n,rt.bindAll=TA,rt.bindKey=Rr,rt.castArray=a_,rt.chain=Bf,rt.chunk=zs,rt.compact=bs,rt.concat=da,rt.cond=Od,rt.conforms=em,rt.constant=Bd,rt.countBy=yg,rt.create=Ze,rt.curry=oi,rt.curryRight=ui,rt.debounce=Xs,rt.defaults=lt,rt.defaultsDeep=yt,rt.defer=ln,rt.delay=en,rt.difference=vi,rt.differenceBy=Zo,rt.differenceWith=ss,rt.drop=hs,rt.dropRight=Ba,rt.dropRightWhile=Bl,rt.dropWhile=Po,rt.fill=xd,rt.filter=Yp,rt.flatMap=qc,rt.flatMapDeep=Sh,rt.flatMapDepth=Km,rt.flatten=Wc,rt.flattenDeep=cl,rt.flattenDepth=dl,rt.flip=dn,rt.flow=tf,rt.flowRight=az,rt.fromPairs=Vh,rt.functions=Fn,rt.functionsIn=mn,rt.groupBy=Dm,rt.initial=Hh,rt.intersection=xm,rt.intersectionBy=Zh,rt.intersectionWith=wm,rt.invert=rr,rt.invertBy=On,rt.invokeMap=_0,rt.iteratee=rx,rt.keyBy=Lm,rt.keys=Lr,rt.keysIn=jr,rt.map=Ap,rt.mapKeys=ei,rt.mapValues=Ko,rt.matches=sz,rt.matchesProperty=lz,rt.memoize=mr,rt.merge=Js,rt.mergeWith=Wl,rt.method=uz,rt.methodOf=Az,rt.mixin=ix,rt.negate=ni,rt.nthArg=dz,rt.omit=Wu,rt.omitBy=Jd,rt.once=Ti,rt.orderBy=kf,rt.over=hz,rt.overArgs=Ii,rt.overEvery=fz,rt.overSome=pz,rt.partial=Ni,rt.partialRight=Ra,rt.partition=cp,rt.pick=nc,rt.pickBy=_u,rt.property=XO,rt.propertyOf=mz,rt.pull=Gp,rt.pullAll=Sf,rt.pullAllBy=sA,rt.pullAllWith=xh,rt.pullAt=Qc,rt.range=gz,rt.rangeRight=yz,rt.rearg=Xo,rt.reject=_,rt.remove=ec,rt.rest=Eh,rt.reverse=Ef,rt.sampleSize=Q,rt.set=ml,rt.setWith=ru,rt.shuffle=le,rt.slice=d0,rt.sortBy=Bt,rt.sortedUniq=h0,rt.sortedUniqBy=wd,rt.split=b_,rt.spread=_g,rt.tail=f0,rt.take=Em,rt.takeRight=Om,rt.takeRightWhile=Ns,rt.takeWhile=p0,rt.tap=km,rt.throttle=r_,rt.thru=Md,rt.toArray=d,rt.toPairs=IA,rt.toPairsIn=kA,rt.toPath=xz,rt.toPlainObject=N,rt.transform=rc,rt.unary=i_,rt.union=ry,rt.unionBy=m0,rt.unionWith=Bm,rt.uniq=wh,rt.uniqBy=iy,rt.uniqWith=sp,rt.unset=iu,rt.unzip=Im,rt.unzipWith=Zs,rt.update=Sd,rt.updateWith=Mc,rt.values=Ro,rt.valuesIn=cA,rt.without=pg,rt.words=w_,rt.wrap=o_,rt.xor=lA,rt.xorBy=g0,rt.xorWith=mg,rt.zip=Mh,rt.zipObject=lp,rt.zipObjectDeep=Wp,rt.zipWith=Gu,rt.entries=IA,rt.entriesIn=kA,rt.extend=Ce,rt.extendWith=Pe,ix(rt,rt),rt.add=Mz,rt.attempt=M_,rt.camelCase=Jp,rt.capitalize=Yc,rt.ceil=Sz,rt.clamp=Gs,rt.clone=N2,rt.cloneDeep=dp,rt.cloneDeepWith=l_,rt.cloneWith=s_,rt.conformsTo=u_,rt.deburr=w0,rt.defaultTo=tm,rt.divide=Ez,rt.endsWith=eh,rt.eq=Xd,rt.escape=$c,rt.escapeRegExp=Qu,rt.every=vg,rt.find=$p,rt.findIndex=Al,rt.findKey=Nt,rt.findLast=up,rt.findLastIndex=EA,rt.findLastKey=Mt,rt.floor=Oz,rt.forEach=If,rt.forEachRight=Rm,rt.forIn=Re,rt.forInRight=at,rt.forOwn=Ot,rt.forOwnRight=un,rt.get=bn,rt.gt=A_,rt.gte=G2,rt.has=Vn,rt.hasIn=Ln,rt.head=Mf,rt.identity=th,rt.includes=Vp,rt.indexOf=bh,rt.inRange=el,rt.invoke=Ur,rt.isArguments=Zp,rt.isArray=yo,rt.isArrayBuffer=C0,rt.isArrayLike=wc,rt.isArrayLikeObject=hl,rt.isBoolean=c_,rt.isBuffer=Oh,rt.isDate=Cg,rt.isElement=bg,rt.isEmpty=W2,rt.isEqual=Q2,rt.isEqualWith=q2,rt.isError=hp,rt.isFinite=uA,rt.isFunction=tc,rt.isInteger=xg,rt.isLength=b0,rt.isMap=d_,rt.isMatch=h_,rt.isMatchWith=f_,rt.isNaN=Y2,rt.isNative=p_,rt.isNil=ay,rt.isNull=oy,rt.isNumber=sy,rt.isObject=fl,rt.isObjectLike=pl,rt.isPlainObject=Tf,rt.isRegExp=x0,rt.isSafeInteger=m_,rt.isSet=wg,rt.isString=Xp,rt.isSymbol=BA,rt.isTypedArray=fp,rt.isUndefined=ly,rt.isWeakMap=uy,rt.isWeakSet=$2,rt.join=Xh,rt.kebabCase=Ed,rt.last=OA,rt.lastIndexOf=Np,rt.lowerCase=Pf,rt.lowerFirst=g_,rt.lt=h,rt.lte=u,rt.max=Bz,rt.maxBy=Iz,rt.mean=kz,rt.meanBy=Tz,rt.min=Pz,rt.minBy=Kz,rt.stubArray=ax,rt.stubFalse=sx,rt.stubObject=vz,rt.stubString=_z,rt.stubTrue=Cz,rt.multiply=Rz,rt.nth=c0,rt.noConflict=cz,rt.noop=ox,rt.now=Wt,rt.pad=y_,rt.padEnd=v_,rt.padStart=__,rt.parseInt=Ay,rt.random=Cu,rt.reduce=Hp,rt.reduceRight=m,rt.repeat=cy,rt.replace=Kf,rt.result=AA,rt.round=Dz,rt.runInContext=Ht,rt.sample=L,rt.size=me,rt.snakeCase=C_,rt.some=Xe,rt.sortedIndex=Mm,rt.sortedIndexBy=ny,rt.sortedIndexOf=Jh,rt.sortedLastIndex=fg,rt.sortedLastIndexBy=Sm,rt.sortedLastIndexOf=Of,rt.startCase=V2,rt.startsWith=H2,rt.subtract=Lz,rt.sum=Fz,rt.sumBy=Uz,rt.template=Z2,rt.times=bz,rt.toFinite=v,rt.toInteger=w,rt.toLength=D,rt.toLower=X2,rt.toNumber=F,rt.toSafeInteger=Z,rt.toString=ie,rt.toUpper=J2,rt.trim=ex,rt.trimEnd=tx,rt.trimStart=nx,rt.truncate=Bh,rt.unescape=Mg,rt.uniqueId=wz,rt.upperCase=x_,rt.upperFirst=dy,rt.each=If,rt.eachRight=Rm,rt.first=Mf,ix(rt,function(){var x={};return ol(rt,function(T,V){Fo.call(rt.prototype,V)||(x[V]=T)}),x}(),{chain:!1}),rt.VERSION=n,ws(["bind","bindKey","curry","curryRight","partial","partialRight"],function(x){rt[x].placeholder=rt}),ws(["drop","take"],function(x,T){Wr.prototype[x]=function(V){V=V===e?1:Uo(w(V),0);var ve=this.__filtered__&&!T?new Wr(this):this.clone();return ve.__filtered__?ve.__takeCount__=Aa(V,ve.__takeCount__):ve.__views__.push({size:Aa(V,ke),type:x+(ve.__dir__<0?"Right":"")}),ve},Wr.prototype[x+"Right"]=function(V){return this.reverse()[x](V).reverse()}}),ws(["filter","map","takeWhile"],function(x,T){var V=T+1,ve=V==Se||V==nt;Wr.prototype[x]=function(Ve){var At=this.clone();return At.__iteratees__.push({iteratee:pi(Ve,3),type:V}),At.__filtered__=At.__filtered__||ve,At}}),ws(["head","last"],function(x,T){var V="take"+(T?"Right":"");Wr.prototype[x]=function(){return this[V](1).value()[0]}}),ws(["initial","tail"],function(x,T){var V="drop"+(T?"":"Right");Wr.prototype[x]=function(){return this.__filtered__?new Wr(this):this[V](1)}}),Wr.prototype.compact=function(){return this.filter(th)},Wr.prototype.find=function(x){return this.filter(x).head()},Wr.prototype.findLast=function(x){return this.reverse().find(x)},Wr.prototype.invokeMap=In(function(x,T){return typeof x=="function"?new Wr(this):this.map(function(V){return zl(V,x,T)})}),Wr.prototype.reject=function(x){return this.filter(ni(pi(x)))},Wr.prototype.slice=function(x,T){x=w(x);var V=this;return V.__filtered__&&(x>0||T<0)?new Wr(V):(x<0?V=V.takeRight(-x):x&&(V=V.drop(x)),T!==e&&(T=w(T),V=T<0?V.dropRight(-T):V.take(T-x)),V)},Wr.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},Wr.prototype.toArray=function(){return this.take(ke)},ol(Wr.prototype,function(x,T){var V=/^(?:filter|find|map|reject)|While$/.test(T),ve=/^(?:head|last)$/.test(T),Ve=rt[ve?"take"+(T=="last"?"Right":""):T],At=ve||/^find/.test(T);Ve&&(rt.prototype[T]=function(){var Dt=this.__wrapped__,qt=ve?[1]:arguments,on=Dt instanceof Wr,Gn=qt[0],qn=on||yo(Dt),lr=function(Ca){var Da=Ve.apply(rt,Ou([Ca],qt));return ve&&Yr?Da[0]:Da};qn&&V&&typeof Gn=="function"&&Gn.length!=1&&(on=qn=!1);var Yr=this.__chain__,wi=!!this.__actions__.length,ro=At&&!Yr,na=on&&!wi;if(!At&&qn){Dt=na?Dt:new Wr(this);var io=x.apply(Dt,qt);return io.__actions__.push({func:Md,args:[lr],thisArg:e}),new Li(io,Yr)}return ro&&na?x.apply(this,qt):(io=this.thru(lr),ro?ve?io.value()[0]:io.value():io)})}),ws(["pop","push","shift","sort","splice","unshift"],function(x){var T=cu[x],V=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",ve=/^(?:pop|shift)$/.test(x);rt.prototype[x]=function(){var Ve=arguments;if(ve&&!this.__chain__){var At=this.value();return T.apply(yo(At)?At:[],Ve)}return this[V](function(Dt){return T.apply(yo(Dt)?Dt:[],Ve)})}}),ol(Wr.prototype,function(x,T){var V=rt[T];if(V){var ve=V.name+"";Fo.call(Pu,ve)||(Pu[ve]=[]),Pu[ve].push({name:T,func:V})}}),Pu[yd(e,q).name]=[{name:"wrapper",func:e}],Wr.prototype.clone=Ma,Wr.prototype.reverse=ld,Wr.prototype.value=Qd,rt.prototype.at=Tm,rt.prototype.chain=ef,rt.prototype.commit=Qp,rt.prototype.next=y0,rt.prototype.plant=gg,rt.prototype.reverse=qp,rt.prototype.toJSON=rt.prototype.valueOf=rt.prototype.value=v0,rt.prototype.first=rt.prototype.head,mA&&(rt.prototype[mA]=Pm),rt},Au=Ac();Ci?((Ci.exports=Au)._=Au,Er._=Au):pr._=Au}).call(BG)}(Oy,Oy.exports)),Oy.exports}var zb=IG();const uS=us(zb);function kG(r,t,e){const n=t<0?r.length+t:t;if(n>=0&&n<r.length){const i=e<0?r.length+e:e,[o]=r.splice(t,1);r.splice(i,0,o)}}var Cx,jB;function TG(){if(jB)return Cx;jB=1;function r(t){for(var e=5381,n=t.length;n;)e=e*33^t.charCodeAt(--n);return e>>>0}return Cx=r,Cx}var PG=TG();const zB=us(PG);var KG=8,RG={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},DG={"*":{type:"source"}},LG=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],FG={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:"*"}},UG={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:"*"}},jG={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:"*"}},zG={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"}},NG={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"}}},GG={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"}}},WG={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"}},QG=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],qG={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},YG={"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"}},$G={"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"}},VG={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},HG={"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"}},ZG={"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"}},XG={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},JG={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},eW={type:"array",value:"*"},tW={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},nW={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},rW={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},iW={type:"array",value:"*",minimum:1},oW={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}},aW={"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sW={source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},lW={type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},uW=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],AW={"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"}},cW={"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"}},dW={"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"}},hW={"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"}},fW={"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"}},pW={"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"}},mW={"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"}},gW={"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"}},yW={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},vW={"*":{type:"string"}},Qa={$version:KG,$root:RG,sources:DG,source:LG,source_vector:FG,source_raster:UG,source_raster_dem:jG,source_geojson:zG,source_video:NG,source_image:GG,layer:WG,layout:QG,layout_background:qG,layout_fill:YG,layout_circle:$G,layout_heatmap:VG,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:HG,layout_symbol:ZG,layout_raster:XG,layout_hillshade:JG,filter:eW,filter_operator:tW,geometry_type:nW,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:rW,expression:iW,light:oW,sky:aW,terrain:sW,projection:lW,paint:uW,paint_fill:AW,"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:cW,paint_circle:dW,paint_heatmap:hW,paint_symbol:fW,paint_raster:pW,paint_hillshade:mW,paint_background:gW,transition:yW,"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:vW};const _W=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function CW(r,t){const e={};for(const n in r)n!=="ref"&&(e[n]=r[n]);return _W.forEach(n=>{n in t&&(e[n]=t[n])}),e}function bW(r){r=r.slice();const t=Object.create(null);for(let e=0;e<r.length;e++)t[r[e].id]=r[e];for(let e=0;e<r.length;e++)"ref"in r[e]&&(r[e]=CW(r[e],t[r[e].ref]));return r}function xs(r,t){if(Array.isArray(r)){if(!Array.isArray(t)||r.length!==t.length)return!1;for(let e=0;e<r.length;e++)if(!xs(r[e],t[e]))return!1;return!0}if(typeof r=="object"&&r!==null&&t!==null){if(typeof t!="object"||Object.keys(r).length!==Object.keys(t).length)return!1;for(const n in r)if(!xs(r[n],t[n]))return!1;return!0}return r===t}function of(r,t){r.push(t)}function pR(r,t,e){of(e,{command:"addSource",args:[r,t[r]]})}function mR(r,t,e){of(t,{command:"removeSource",args:[r]}),e[r]=!0}function xW(r,t,e,n){mR(r,e,n),pR(r,t,e)}function wW(r,t,e){let n;for(n in r[e])if(Object.prototype.hasOwnProperty.call(r[e],n)&&n!=="data"&&!xs(r[e][n],t[e][n]))return!1;for(n in t[e])if(Object.prototype.hasOwnProperty.call(t[e],n)&&n!=="data"&&!xs(r[e][n],t[e][n]))return!1;return!0}function MW(r,t,e,n){r=r||{},t=t||{};let i;for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(Object.prototype.hasOwnProperty.call(t,i)||mR(i,e,n));for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(r,i)?xs(r[i],t[i])||(r[i].type==="geojson"&&t[i].type==="geojson"&&wW(r,t,i)?of(e,{command:"setGeoJSONSourceData",args:[i,t[i].data]}):xW(i,t,e,n)):pR(i,t,e))}function I_(r,t,e,n,i,o){r=r||{},t=t||{};for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(xs(r[s],t[s])||e.push({command:o,args:[n,s,t[s],i]}));for(const s in t)!Object.prototype.hasOwnProperty.call(t,s)||Object.prototype.hasOwnProperty.call(r,s)||xs(r[s],t[s])||e.push({command:o,args:[n,s,t[s],i]})}function NB(r){return r.id}function GB(r,t){return r[t.id]=t,r}function SW(r,t,e){r=r||[],t=t||[];const n=r.map(NB),i=t.map(NB),o=r.reduce(GB,{}),s=t.reduce(GB,{}),a=n.slice(),f=Object.create(null);let g,b,I,S,B;for(let P=0,U=0;P<n.length;P++)g=n[P],Object.prototype.hasOwnProperty.call(s,g)?U++:(of(e,{command:"removeLayer",args:[g]}),a.splice(a.indexOf(g,U),1));for(let P=0,U=0;P<i.length;P++)g=i[i.length-1-P],a[a.length-1-P]!==g&&(Object.prototype.hasOwnProperty.call(o,g)?(of(e,{command:"removeLayer",args:[g]}),a.splice(a.lastIndexOf(g,a.length-U),1)):U++,S=a[a.length-P],of(e,{command:"addLayer",args:[s[g],S]}),a.splice(a.length-P,0,g),f[g]=!0);for(let P=0;P<i.length;P++)if(g=i[P],b=o[g],I=s[g],!(f[g]||xs(b,I))){if(!xs(b.source,I.source)||!xs(b["source-layer"],I["source-layer"])||!xs(b.type,I.type)){of(e,{command:"removeLayer",args:[g]}),S=a[a.lastIndexOf(g)+1],of(e,{command:"addLayer",args:[I,S]});continue}I_(b.layout,I.layout,e,g,null,"setLayoutProperty"),I_(b.paint,I.paint,e,g,null,"setPaintProperty"),xs(b.filter,I.filter)||of(e,{command:"setFilter",args:[g,I.filter]}),(!xs(b.minzoom,I.minzoom)||!xs(b.maxzoom,I.maxzoom))&&of(e,{command:"setLayerZoomRange",args:[g,I.minzoom,I.maxzoom]});for(B in b)Object.prototype.hasOwnProperty.call(b,B)&&(B==="layout"||B==="paint"||B==="filter"||B==="metadata"||B==="minzoom"||B==="maxzoom"||(B.indexOf("paint.")===0?I_(b[B],I[B],e,g,B.slice(6),"setPaintProperty"):xs(b[B],I[B])||of(e,{command:"setLayerProperty",args:[g,B,I[B]]})));for(B in I)!Object.prototype.hasOwnProperty.call(I,B)||Object.prototype.hasOwnProperty.call(b,B)||B==="layout"||B==="paint"||B==="filter"||B==="metadata"||B==="minzoom"||B==="maxzoom"||(B.indexOf("paint.")===0?I_(b[B],I[B],e,g,B.slice(6),"setPaintProperty"):xs(b[B],I[B])||of(e,{command:"setLayerProperty",args:[g,B,I[B]]}))}}function EW(r,t){if(!r)return[{command:"setStyle",args:[t]}];let e=[];try{if(!xs(r.version,t.version))return[{command:"setStyle",args:[t]}];xs(r.center,t.center)||e.push({command:"setCenter",args:[t.center]}),xs(r.centerAltitude,t.centerAltitude)||e.push({command:"setCenterAltitude",args:[t.centerAltitude]}),xs(r.zoom,t.zoom)||e.push({command:"setZoom",args:[t.zoom]}),xs(r.bearing,t.bearing)||e.push({command:"setBearing",args:[t.bearing]}),xs(r.pitch,t.pitch)||e.push({command:"setPitch",args:[t.pitch]}),xs(r.roll,t.roll)||e.push({command:"setRoll",args:[t.roll]}),xs(r.sprite,t.sprite)||e.push({command:"setSprite",args:[t.sprite]}),xs(r.glyphs,t.glyphs)||e.push({command:"setGlyphs",args:[t.glyphs]}),xs(r.transition,t.transition)||e.push({command:"setTransition",args:[t.transition]}),xs(r.light,t.light)||e.push({command:"setLight",args:[t.light]}),xs(r.terrain,t.terrain)||e.push({command:"setTerrain",args:[t.terrain]}),xs(r.sky,t.sky)||e.push({command:"setSky",args:[t.sky]}),xs(r.projection,t.projection)||e.push({command:"setProjection",args:[t.projection]});const n={},i=[];MW(r.sources,t.sources,i,n);const o=[];r.layers&&r.layers.forEach(s=>{"source"in s&&n[s.source]?e.push({command:"removeLayer",args:[s.id]}):o.push(s)}),e=e.concat(i),SW(o,t.layers,e)}catch(n){console.warn("Unable to compute style diff:",n),e=[{command:"setStyle",args:[t]}]}return e}class xr{constructor(t,e,n,i){this.message=(t?`${t}: `:"")+n,i&&(this.identifier=i),e!=null&&e.__line__&&(this.line=e.__line__)}}function P1(r,...t){for(const e of t)for(const n in e)r[n]=e[n];return r}class Cp extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}let OW=class gR{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[n,i]of e)this.bindings[n]=i}concat(t){return new gR(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1}};const Nb={kind:"null"},Ir={kind:"number"},ra={kind:"string"},Go={kind:"boolean"},Mp={kind:"color"},Gb={kind:"projectionDefinition"},g1={kind:"object"},Qo={kind:"value"},BW={kind:"error"},Wb={kind:"collator"},Qb={kind:"formatted"},qb={kind:"padding"},Pv={kind:"resolvedImage"},Yb={kind:"variableAnchorOffsetCollection"};function Ph(r,t){return{kind:"array",itemType:r,N:t}}function Ql(r){if(r.kind==="array"){const t=Ql(r.itemType);return typeof r.N=="number"?`array<${t}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${t}>`}else return r.kind}const IW=[Nb,Ir,ra,Go,Mp,Gb,Qb,g1,Ph(Qo),qb,Pv,Yb];function iv(r,t){if(t.kind==="error")return null;if(r.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!iv(r.itemType,t.itemType))&&(typeof r.N!="number"||r.N===t.N))return null}else{if(r.kind===t.kind)return null;if(r.kind==="value"){for(const e of IW)if(!iv(e,t))return null}}return`Expected ${Ql(r)} but found ${Ql(t)} instead.`}function kE(r,t){return t.some(e=>e.kind===r.kind)}function $0(r,t){return t.some(e=>e==="null"?r===null:e==="array"?Array.isArray(r):e==="object"?r&&!Array.isArray(r)&&typeof r=="object":e===typeof r)}function Og(r,t){return r.kind==="array"&&t.kind==="array"?r.itemType.kind===t.itemType.kind&&typeof r.N=="number":r.kind===t.kind}const yR=.96422,vR=1,_R=.82521,CR=4/29,y1=6/29,bR=3*y1*y1,kW=y1*y1*y1,TW=Math.PI/180,PW=180/Math.PI;function xR(r){return r=r%360,r<0&&(r+=360),r}function wR([r,t,e,n]){r=bx(r),t=bx(t),e=bx(e);let i,o;const s=xx((.2225045*r+.7168786*t+.0606169*e)/vR);r===t&&t===e?i=o=s:(i=xx((.4360747*r+.3850649*t+.1430804*e)/yR),o=xx((.0139322*r+.0971045*t+.7141733*e)/_R));const a=116*s-16;return[a<0?0:a,500*(i-s),200*(s-o),n]}function bx(r){return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function xx(r){return r>kW?Math.pow(r,1/3):r/bR+CR}function MR([r,t,e,n]){let i=(r+16)/116,o=isNaN(t)?i:i+t/500,s=isNaN(e)?i:i-e/200;return i=vR*Mx(i),o=yR*Mx(o),s=_R*Mx(s),[wx(3.1338561*o-1.6168667*i-.4906146*s),wx(-.9787684*o+1.9161415*i+.033454*s),wx(.0719453*o-.2289914*i+1.4052427*s),n]}function wx(r){return r=r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055,r<0?0:r>1?1:r}function Mx(r){return r>y1?r*r*r:bR*(r-CR)}function KW(r){const[t,e,n,i]=wR(r),o=Math.sqrt(e*e+n*n);return[Math.round(o*1e4)?xR(Math.atan2(n,e)*PW):NaN,o,t,i]}function RW([r,t,e,n]){return r=isNaN(r)?0:r*TW,MR([e,Math.cos(r)*t,Math.sin(r)*t,n])}function DW([r,t,e,n]){r=xR(r),t/=100,e/=100;function i(o){const s=(o+r/30)%12,a=t*Math.min(e,1-e);return e-a*Math.max(-1,Math.min(s-3,9-s,1))}return[i(0),i(8),i(4),n]}function LW(r){if(r=r.toLowerCase().trim(),r==="transparent")return[0,0,0,0];const t=FW[r];if(t){const[i,o,s]=t;return[i/255,o/255,s/255,1]}if(r.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(r)){const o=r.length<6?1:2;let s=1;return[k_(r.slice(s,s+=o)),k_(r.slice(s,s+=o)),k_(r.slice(s,s+=o)),k_(r.slice(s,s+o)||"ff")]}if(r.startsWith("rgb")){const i=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,o=r.match(i);if(o){const[s,a,f,g,b,I,S,B,P,U,j,q]=o,W=[g||" ",S||" ",U].join("");if(W===" "||W===" /"||W===",,"||W===",,,"){const ee=[f,I,P].join(""),J=ee==="%%%"?100:ee===""?255:0;if(J){const $=[Zg(+a/J,0,1),Zg(+b/J,0,1),Zg(+B/J,0,1),j?WB(+j,q):1];if(QB($))return $}}return}}const e=/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,n=r.match(e);if(n){const[i,o,s,a,f,g,b,I,S]=n,B=[s||" ",f||" ",b].join("");if(B===" "||B===" /"||B===",,"||B===",,,"){const P=[+o,Zg(+a,0,100),Zg(+g,0,100),I?WB(+I,S):1];if(QB(P))return DW(P)}}}function k_(r){return parseInt(r.padEnd(2,r),16)/255}function WB(r,t){return Zg(t?r/100:r,0,1)}function Zg(r,t,e){return Math.min(Math.max(t,r),e)}function QB(r){return!r.some(Number.isNaN)}const FW={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function e0(r,t,e){return r+e*(t-r)}function ov(r,t,e){return r.map((n,i)=>e0(n,t[i],e))}function UW(r){return r==="rgb"||r==="hcl"||r==="lab"}let Kl=class Xg{constructor(t,e,n,i=1,o=!0){this.r=t,this.g=e,this.b=n,this.a=i,o||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[t,e,n,i]))}static parse(t){if(t instanceof Xg)return t;if(typeof t!="string")return;const e=LW(t);if(e)return new Xg(...e,!1)}get rgb(){const{r:t,g:e,b:n,a:i}=this,o=i||1/0;return this.overwriteGetter("rgb",[t/o,e/o,n/o,i])}get hcl(){return this.overwriteGetter("hcl",KW(this.rgb))}get lab(){return this.overwriteGetter("lab",wR(this.rgb))}overwriteGetter(t,e){return Object.defineProperty(this,t,{value:e}),e}toString(){const[t,e,n,i]=this.rgb;return`rgba(${[t,e,n].map(o=>Math.round(o*255)).join(",")},${i})`}static interpolate(t,e,n,i="rgb"){switch(i){case"rgb":{const[o,s,a,f]=ov(t.rgb,e.rgb,n);return new Xg(o,s,a,f,!1)}case"hcl":{const[o,s,a,f]=t.hcl,[g,b,I,S]=e.hcl;let B,P;if(!isNaN(o)&&!isNaN(g)){let ee=g-o;g>o&&ee>180?ee-=360:g<o&&o-g>180&&(ee+=360),B=o+n*ee}else isNaN(o)?isNaN(g)?B=NaN:(B=g,(a===1||a===0)&&(P=b)):(B=o,(I===1||I===0)&&(P=s));const[U,j,q,W]=RW([B,P??e0(s,b,n),e0(a,I,n),e0(f,S,n)]);return new Xg(U,j,q,W,!1)}case"lab":{const[o,s,a,f]=MR(ov(t.lab,e.lab,n));return new Xg(o,s,a,f,!1)}}}};Kl.black=new Kl(0,0,0,1);Kl.white=new Kl(1,1,1,1);Kl.transparent=new Kl(0,0,0,0);Kl.red=new Kl(1,0,0,1);let TE=class{constructor(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};const jW=["bottom","center","top"];let AS=class{constructor(t,e,n,i,o,s){this.text=t,this.image=e,this.scale=n,this.fontStack=i,this.textColor=o,this.verticalAlign=s}},G1=class hC{constructor(t){this.sections=t}static fromString(t){return new hC([new AS(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof hC?t:hC.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}};class Kd{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Kd)return t;if(typeof t=="number")return new Kd([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const e of t)if(typeof e!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]];break}return new Kd(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,n){return new Kd(ov(t.values,e.values,n))}}let Xu=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const zW=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class cf{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof cf)return t;if(!(!Array.isArray(t)||t.length<1||t.length%2!==0)){for(let e=0;e<t.length;e+=2){const n=t[e],i=t[e+1];if(typeof n!="string"||!zW.has(n)||!Array.isArray(i)||i.length!==2||typeof i[0]!="number"||typeof i[1]!="number")return}return new cf(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,n){const i=t.values,o=e.values;if(i.length!==o.length)throw new Xu(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${e.toString()}`);const s=[];for(let a=0;a<i.length;a+=2){if(i[a]!==o[a])throw new Xu(`Cannot interpolate values containing mismatched anchors. from[${a}]: ${i[a]}, to[${a}]: ${o[a]}`);s.push(i[a]);const[f,g]=i[a+1],[b,I]=o[a+1];s.push([e0(f,b,n),e0(g,I,n)])}return new cf(s)}}let sg=class SR{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new SR({name:t,available:!1}):null}};class sf{constructor(t,e,n){this.from=t,this.to=e,this.transition=n}static interpolate(t,e,n){return new sf(t,e,n)}static parse(t){if(t instanceof sf)return t;if(Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number")return new sf(t[0],t[1],t[2]);if(typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number")return new sf(t.from,t.to,t.transition);if(typeof t=="string")return new sf(t,t,1)}}function ER(r,t,e,n){return typeof r=="number"&&r>=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255?typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[r,t,e,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[r,t,e,n]:[r,t,e]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function av(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof sf||r instanceof Kl||r instanceof TE||r instanceof G1||r instanceof Kd||r instanceof cf||r instanceof sg)return!0;if(Array.isArray(r)){for(const t of r)if(!av(t))return!1;return!0}else if(typeof r=="object"){for(const t in r)if(!av(r[t]))return!1;return!0}else return!1}function RA(r){if(r===null)return Nb;if(typeof r=="string")return ra;if(typeof r=="boolean")return Go;if(typeof r=="number")return Ir;if(r instanceof Kl)return Mp;if(r instanceof sf)return Gb;if(r instanceof TE)return Wb;if(r instanceof G1)return Qb;if(r instanceof Kd)return qb;if(r instanceof cf)return Yb;if(r instanceof sg)return Pv;if(Array.isArray(r)){const t=r.length;let e;for(const n of r){const i=RA(n);if(!e)e=i;else{if(e===i)continue;e=Qo;break}}return Ph(e||Qo,t)}else return g1}function qy(r){const t=typeof r;return r===null?"":t==="string"||t==="number"||t==="boolean"?String(r):r instanceof Kl||r instanceof sf||r instanceof G1||r instanceof Kd||r instanceof cf||r instanceof sg?r.toString():JSON.stringify(r)}let RC=class OR{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(t.length!==2)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!av(t[1]))return e.error("invalid value");const n=t[1];let i=RA(n);const o=e.expectedType;return i.kind==="array"&&i.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(i=o),new OR(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}};const T_={string:ra,number:Ir,boolean:Go,object:g1};let cm=class BR{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let n=1,i;const o=t[0];if(o==="array"){let a;if(t.length>2){const g=t[1];if(typeof g!="string"||!(g in T_)||g==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=T_[g],n++}else a=Qo;let f;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);f=t[2],n++}i=Ph(a,f)}else{if(!T_[o])throw new Error(`Types doesn't contain name = ${o}`);i=T_[o]}const s=[];for(;n<t.length;n++){const a=e.parse(t[n],n,Qo);if(!a)return null;s.push(a)}return new BR(i,s)}evaluate(t){for(let e=0;e<this.args.length;e++){const n=this.args[e].evaluate(t);if(iv(this.type,RA(n))){if(e===this.args.length-1)throw new Xu(`Expected value to be of type ${Ql(this.type)}, but found ${Ql(RA(n))} instead.`)}else return n}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}};const qB={"to-boolean":Go,"to-color":Mp,"to-number":Ir,"to-string":ra};let s1=class IR{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[0];if(!qB[n])throw new Error(`Can't parse ${n} as it is not part of the known types`);if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");const i=qB[n],o=[];for(let s=1;s<t.length;s++){const a=e.parse(t[s],s,Qo);if(!a)return null;o.push(a)}return new IR(i,o)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let e,n;for(const i of this.args){if(e=i.evaluate(t),n=null,e instanceof Kl)return e;if(typeof e=="string"){const o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&(e.length<3||e.length>4?n=`Invalid rgba value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:n=ER(e[0],e[1],e[2],e[3]),!n))return new Kl(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Xu(n||`Could not parse color from value '${typeof e=="string"?e:JSON.stringify(e)}'`)}case"padding":{let e;for(const n of this.args){e=n.evaluate(t);const i=Kd.parse(e);if(i)return i}throw new Xu(`Could not parse padding from value '${typeof e=="string"?e:JSON.stringify(e)}'`)}case"variableAnchorOffsetCollection":{let e;for(const n of this.args){e=n.evaluate(t);const i=cf.parse(e);if(i)return i}throw new Xu(`Could not parse variableAnchorOffsetCollection from value '${typeof e=="string"?e:JSON.stringify(e)}'`)}case"number":{let e=null;for(const n of this.args){if(e=n.evaluate(t),e===null)return 0;const i=Number(e);if(!isNaN(i))return i}throw new Xu(`Could not convert ${JSON.stringify(e)} to number.`)}case"formatted":return G1.fromString(qy(this.args[0].evaluate(t)));case"resolvedImage":return sg.fromString(qy(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return qy(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}};const NW=["Unknown","Point","LineString","Polygon"];let kR=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"?NW[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Kl.parse(t)),e}},TR=class PR{constructor(t,e,n=[],i,o=new OW,s=[]){this.registry=t,this.path=n,this.key=n.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=s,this.expectedType=i,this._isConstant=e}parse(t,e,n,i,o={}){return e?this.concat(e,n,i)._parse(t,o):this._parse(t,o)}_parse(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(i,o,s){return s==="assert"?new cm(o,[i]):s==="coerce"?new s1(o,[i]):i}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=t[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 s=o.parse(t,this);if(!s)return null;if(this.expectedType){const a=this.expectedType,f=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&f.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if(a.kind==="projectionDefinition"&&(f.kind==="string"||f.kind==="array"))s=n(s,a,e.typeAnnotation||"coerce");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(f.kind==="value"||f.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(a.kind==="padding"&&(f.kind==="value"||f.kind==="number"||f.kind==="array"))s=n(s,a,e.typeAnnotation||"coerce");else if(a.kind==="variableAnchorOffsetCollection"&&(f.kind==="value"||f.kind==="array"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,f))return null}if(!(s instanceof RC)&&s.type.kind!=="resolvedImage"&&this._isConstant(s)){const a=new kR;try{s=new RC(s.type,s.evaluate(a))}catch(f){return this.error(f.message),null}}return s}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,n){const i=typeof t=="number"?this.path.concat(t):this.path,o=n?this.scope.concat(n):this.scope;return new PR(this.registry,this._isConstant,i,e||null,o,this.errors)}error(t,...e){const n=`${this.key}${e.map(i=>`[${i}]`).join("")}`;this.errors.push(new Cp(n,t))}checkSubtype(t,e){const n=iv(t,e);return n&&this.error(n),n}},KR=class RR{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const n=[];for(let o=1;o<t.length-1;o+=2){const s=t[o];if(typeof s!="string")return e.error(`Expected string, but found ${typeof s} instead.`,o);if(/[^a-zA-Z0-9_]/.test(s))return e.error("Variable names must contain only alphanumeric characters or '_'.",o);const a=e.parse(t[o+1],o+1);if(!a)return null;n.push([s,a])}const i=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return i?new RR(n,i):null}outputDefined(){return this.result.outputDefined()}},DR=class LR{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");const n=t[1];return e.scope.has(n)?new LR(n,e.scope.get(n)):e.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}},GW=class FR{constructor(t,e,n){this.type=t,this.index=e,this.input=n}static parse(t,e){if(t.length!==3)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,Ir),i=e.parse(t[2],2,Ph(e.expectedType||Qo));if(!n||!i)return null;const o=i.type;return new FR(o.itemType,n,i)}evaluate(t){const e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new Xu(`Array index out of bounds: ${e} < 0.`);if(e>=n.length)throw new Xu(`Array index out of bounds: ${e} > ${n.length-1}.`);if(e!==Math.floor(e))throw new Xu(`Array index must be an integer, but found ${e} instead.`);return n[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}},WW=class UR{constructor(t,e){this.type=Go,this.needle=t,this.haystack=e}static parse(t,e){if(t.length!==3)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,Qo),i=e.parse(t[2],2,Qo);return!n||!i?null:kE(n.type,[Go,ra,Ir,Nb,Qo])?new UR(n,i):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ql(n.type)} instead`)}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!$0(e,["boolean","string","number","null"]))throw new Xu(`Expected first argument to be of type boolean, string, number or null, but found ${Ql(RA(e))} instead.`);if(!$0(n,["string","array"]))throw new Xu(`Expected second argument to be of type array or string, but found ${Ql(RA(n))} instead.`);return n.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}},QW=class cS{constructor(t,e,n){this.type=Ir,this.needle=t,this.haystack=e,this.fromIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,Qo),i=e.parse(t[2],2,Qo);if(!n||!i)return null;if(!kE(n.type,[Go,ra,Ir,Nb,Qo]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ql(n.type)} instead`);if(t.length===4){const o=e.parse(t[3],3,Ir);return o?new cS(n,i,o):null}else return new cS(n,i)}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!$0(e,["boolean","string","number","null"]))throw new Xu(`Expected first argument to be of type boolean, string, number or null, but found ${Ql(RA(e))} instead.`);let i;if(this.fromIndex&&(i=this.fromIndex.evaluate(t)),$0(n,["string"])){const o=n.indexOf(e,i);return o===-1?-1:[...n.slice(0,o)].length}else{if($0(n,["array"]))return n.indexOf(e,i);throw new Xu(`Expected second argument to be of type array or string, but found ${Ql(RA(n))} instead.`)}}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}},qW=class jR{constructor(t,e,n,i,o,s){this.inputType=t,this.type=e,this.input=n,this.cases=i,this.outputs=o,this.otherwise=s}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!==1)return e.error("Expected an even number of arguments.");let n,i;e.expectedType&&e.expectedType.kind!=="value"&&(i=e.expectedType);const o={},s=[];for(let g=2;g<t.length-1;g+=2){let b=t[g];const I=t[g+1];Array.isArray(b)||(b=[b]);const S=e.concat(g);if(b.length===0)return S.error("Expected at least one branch label.");for(const P of b){if(typeof P!="number"&&typeof P!="string")return S.error("Branch labels must be numbers or strings.");if(typeof P=="number"&&Math.abs(P)>Number.MAX_SAFE_INTEGER)return S.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof P=="number"&&Math.floor(P)!==P)return S.error("Numeric branch labels must be integer values.");if(!n)n=RA(P);else if(S.checkSubtype(n,RA(P)))return null;if(typeof o[String(P)]<"u")return S.error("Branch labels must be unique.");o[String(P)]=s.length}const B=e.parse(I,g,i);if(!B)return null;i=i||B.type,s.push(B)}const a=e.parse(t[1],1,Qo);if(!a)return null;const f=e.parse(t[t.length-1],t.length-1,i);return!f||a.type.kind!=="value"&&e.concat(1).checkSubtype(n,a.type)?null:new jR(n,i,a,o,s,f)}evaluate(t){const e=this.input.evaluate(t);return(RA(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}},YW=class zR{constructor(t,e,n){this.type=t,this.branches=e,this.otherwise=n}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!==0)return e.error("Expected an odd number of arguments.");let n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);const i=[];for(let s=1;s<t.length-1;s+=2){const a=e.parse(t[s],s,Go);if(!a)return null;const f=e.parse(t[s+1],s+1,n);if(!f)return null;i.push([a,f]),n=n||f.type}const o=e.parse(t[t.length-1],t.length-1,n);if(!o)return null;if(!n)throw new Error("Can't infer output type");return new zR(n,i,o)}evaluate(t){for(const[e,n]of this.branches)if(e.evaluate(t))return n.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,n]of this.branches)t(e),t(n);t(this.otherwise)}outputDefined(){return this.branches.every(([t,e])=>e.outputDefined())&&this.otherwise.outputDefined()}},$W=class dS{constructor(t,e,n,i){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,Qo),i=e.parse(t[2],2,Ir);if(!n||!i)return null;if(!kE(n.type,[Ph(Qo),ra,Qo]))return e.error(`Expected first argument to be of type array or string, but found ${Ql(n.type)} instead`);if(t.length===4){const o=e.parse(t[3],3,Ir);return o?new dS(n.type,n,i,o):null}else return new dS(n.type,n,i)}evaluate(t){const e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);let i;if(this.endIndex&&(i=this.endIndex.evaluate(t)),$0(e,["string"]))return[...e].slice(n,i).join("");if($0(e,["array"]))return e.slice(n,i);throw new Xu(`Expected first argument to be of type array or string, but found ${Ql(RA(e))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}};function $b(r,t){const e=r.length-1;let n=0,i=e,o=0,s,a;for(;n<=i;)if(o=Math.floor((n+i)/2),s=r[o],a=r[o+1],s<=t){if(o===e||t<a)return o;n=o+1}else if(s>t)i=o-1;else throw new Xu("Input is not a number.");return 0}let NR=class GR{constructor(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[i,o]of n)this.labels.push(i),this.outputs.push(o)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");const n=e.parse(t[1],1,Ir);if(!n)return null;const i=[];let o=null;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(let s=1;s<t.length;s+=2){const a=s===1?-1/0:t[s],f=t[s+1],g=s,b=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(i.length&&i[i.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);const I=e.parse(f,b,o);if(!I)return null;o=o||I.type,i.push([a,I])}return new GR(o,n,i)}evaluate(t){const e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);const i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);const o=e.length;if(i>=e[o-1])return n[o-1].evaluate(t);const s=$b(e,i);return n[s].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};function VW(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Sx,YB;function HW(){if(YB)return Sx;YB=1,Sx=r;function r(t,e,n,i){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=n,this.p2y=i}return r.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var n=t,i=0;i<8;i++){var o=this.sampleCurveX(n)-t;if(Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n=n-o/s}var a=0,f=1;for(n=t,i=0;i<20&&(o=this.sampleCurveX(n),!(Math.abs(o-t)<e));i++)t>o?a=n:f=n,n=(f-a)*.5+a;return n},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},Sx}var ZW=HW(),XW=VW(ZW);let fm=class hS{constructor(t,e,n,i,o){this.type=t,this.operator=e,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(const[s,a]of o)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(t,e,n,i){let o=0;if(t.name==="exponential")o=Ex(e,t.base,n,i);else if(t.name==="linear")o=Ex(e,1,n,i);else if(t.name==="cubic-bezier"){const s=t.controlPoints;o=new XW(s[0],s[1],s[2],s[3]).solve(Ex(e,1,n,i))}return o}static parse(t,e){let[n,i,o,...s]=t;if(!Array.isArray(i)||i.length===0)return e.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const g=i[1];if(typeof g!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:g}}else if(i[0]==="cubic-bezier"){const g=i.slice(1);if(g.length!==4||g.some(b=>typeof b!="number"||b<0||b>1))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:g}}else return e.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,Ir),!o)return null;const a=[];let f=null;n==="interpolate-hcl"||n==="interpolate-lab"?f=Mp:e.expectedType&&e.expectedType.kind!=="value"&&(f=e.expectedType);for(let g=0;g<s.length;g+=2){const b=s[g],I=s[g+1],S=g+3,B=g+4;if(typeof b!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',S);if(a.length&&a[a.length-1][0]>=b)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',S);const P=e.parse(I,B,f);if(!P)return null;f=f||P.type,a.push([b,P])}return!Og(f,Ir)&&!Og(f,Gb)&&!Og(f,Mp)&&!Og(f,qb)&&!Og(f,Yb)&&!Og(f,Ph(Ir))?e.error(`Type ${Ql(f)} is not interpolatable.`):new hS(f,n,i,o,a)}evaluate(t){const e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);const i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);const o=e.length;if(i>=e[o-1])return n[o-1].evaluate(t);const s=$b(e,i),a=e[s],f=e[s+1],g=hS.interpolationFactor(this.interpolation,i,a,f),b=n[s].evaluate(t),I=n[s+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return e0(b,I,g);case"color":return Kl.interpolate(b,I,g);case"padding":return Kd.interpolate(b,I,g);case"variableAnchorOffsetCollection":return cf.interpolate(b,I,g);case"array":return ov(b,I,g);case"projectionDefinition":return sf.interpolate(b,I,g)}case"interpolate-hcl":return Kl.interpolate(b,I,g,"hcl");case"interpolate-lab":return Kl.interpolate(b,I,g,"lab")}}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};function Ex(r,t,e,n){const i=n-e,o=r-e;return i===0?0:t===1?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}const JW={color:Kl.interpolate,number:e0,padding:Kd.interpolate,variableAnchorOffsetCollection:cf.interpolate,array:ov};let WR=class fS{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let n=null;const i=e.expectedType;i&&i.kind!=="value"&&(n=i);const o=[];for(const a of t.slice(1)){const f=e.parse(a,1+o.length,n,void 0,{typeAnnotation:"omit"});if(!f)return null;n=n||f.type,o.push(f)}if(!n)throw new Error("No output type");return i&&o.some(a=>iv(i,a.type))?new fS(Qo,o):new fS(n,o)}evaluate(t){let e=null,n=0,i;for(const o of this.args)if(n++,e=o.evaluate(t),e&&e instanceof sg&&!e.available&&(i||(i=e.name),e=null,n===this.args.length&&(e=i)),e!==null)break;return e}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}};function $B(r,t){return r==="=="||r==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function eQ(r,t,e){return t===e}function tQ(r,t,e){return t!==e}function nQ(r,t,e){return t<e}function rQ(r,t,e){return t>e}function iQ(r,t,e){return t<=e}function oQ(r,t,e){return t>=e}function QR(r,t,e,n){return n.compare(t,e)===0}function aQ(r,t,e,n){return!QR(r,t,e,n)}function sQ(r,t,e,n){return n.compare(t,e)<0}function lQ(r,t,e,n){return n.compare(t,e)>0}function uQ(r,t,e,n){return n.compare(t,e)<=0}function AQ(r,t,e,n){return n.compare(t,e)>=0}function W1(r,t,e){const n=r!=="=="&&r!=="!=";return class qR{constructor(o,s,a){this.type=Go,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}static parse(o,s){if(o.length!==3&&o.length!==4)return s.error("Expected two or three arguments.");const a=o[0];let f=s.parse(o[1],1,Qo);if(!f)return null;if(!$B(a,f.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${Ql(f.type)}'.`);let g=s.parse(o[2],2,Qo);if(!g)return null;if(!$B(a,g.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${Ql(g.type)}'.`);if(f.type.kind!==g.type.kind&&f.type.kind!=="value"&&g.type.kind!=="value")return s.error(`Cannot compare types '${Ql(f.type)}' and '${Ql(g.type)}'.`);n&&(f.type.kind==="value"&&g.type.kind!=="value"?f=new cm(g.type,[f]):f.type.kind!=="value"&&g.type.kind==="value"&&(g=new cm(f.type,[g])));let b=null;if(o.length===4){if(f.type.kind!=="string"&&g.type.kind!=="string"&&f.type.kind!=="value"&&g.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(b=s.parse(o[3],3,Wb),!b)return null}return new qR(f,g,b)}evaluate(o){const s=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const f=RA(s),g=RA(a);if(f.kind!==g.kind||!(f.kind==="string"||f.kind==="number"))throw new Xu(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${f.kind}, ${g.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const f=RA(s),g=RA(a);if(f.kind!=="string"||g.kind!=="string")return t(o,s,a)}return this.collator?e(o,s,a,this.collator.evaluate(o)):t(o,s,a)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}}}const cQ=W1("==",eQ,QR),dQ=W1("!=",tQ,aQ),hQ=W1("<",nQ,sQ),fQ=W1(">",rQ,lQ),pQ=W1("<=",iQ,uQ),mQ=W1(">=",oQ,AQ);let YR=class $R{constructor(t,e,n){this.type=Wb,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(t.length!==2)return e.error("Expected one argument.");const n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");const i=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,Go);if(!i)return null;const o=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,Go);if(!o)return null;let s=null;return n.locale&&(s=e.parse(n.locale,1,ra),!s)?null:new $R(i,o,s)}evaluate(t){return new TE(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}},gQ=class VR{constructor(t,e,n,i,o){this.type=ra,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=o}static parse(t,e){if(t.length!==3)return e.error("Expected two arguments.");const n=e.parse(t[1],1,Ir);if(!n)return null;const i=t[2];if(typeof i!="object"||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=e.parse(i.locale,1,ra),!o))return null;let s=null;if(i.currency&&(s=e.parse(i.currency,1,ra),!s))return null;let a=null;if(i["min-fraction-digits"]&&(a=e.parse(i["min-fraction-digits"],1,Ir),!a))return null;let f=null;return i["max-fraction-digits"]&&(f=e.parse(i["max-fraction-digits"],1,Ir),!f)?null:new VR(n,o,s,a,f)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}},yQ=class HR{constructor(t){this.type=Qb,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");const i=[];let o=!1;for(let s=1;s<=t.length-1;++s){const a=t[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;let f=null;if(a["font-scale"]&&(f=e.parse(a["font-scale"],1,Ir),!f))return null;let g=null;if(a["text-font"]&&(g=e.parse(a["text-font"],1,Ph(ra)),!g))return null;let b=null;if(a["text-color"]&&(b=e.parse(a["text-color"],1,Mp),!b))return null;let I=null;if(a["vertical-align"]){if(typeof a["vertical-align"]=="string"&&!jW.includes(a["vertical-align"]))return e.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${a["vertical-align"]}' instead.`);if(I=e.parse(a["vertical-align"],1,ra),!I)return null}const S=i[i.length-1];S.scale=f,S.font=g,S.textColor=b,S.verticalAlign=I}else{const f=e.parse(t[s],1,Qo);if(!f)return null;const g=f.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:f,scale:null,font:null,textColor:null,verticalAlign:null})}}return new HR(i)}evaluate(t){const e=n=>{const i=n.content.evaluate(t);return RA(i)===Pv?new AS("",i,null,null,null,n.verticalAlign?n.verticalAlign.evaluate(t):null):new AS(qy(i),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null,n.verticalAlign?n.verticalAlign.evaluate(t):null)};return new G1(this.sections.map(e))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor),e.verticalAlign&&t(e.verticalAlign)}outputDefined(){return!1}},vQ=class ZR{constructor(t){this.type=Pv,this.input=t}static parse(t,e){if(t.length!==2)return e.error("Expected two arguments.");const n=e.parse(t[1],1,ra);return n?new ZR(n):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),n=sg.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n}eachChild(t){t(this.input)}outputDefined(){return!1}},_Q=class XR{constructor(t){this.type=Ir,this.input=t}static parse(t,e){if(t.length!==2)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error(`Expected argument of type string or array, but found ${Ql(n.type)} instead.`):new XR(n):null}evaluate(t){const e=this.input.evaluate(t);if(typeof e=="string")return[...e].length;if(Array.isArray(e))return e.length;throw new Xu(`Expected value to be of type string or array, but found ${Ql(RA(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}};const Sp=8192;function CQ(r,t){const e=bQ(r[0]),n=wQ(r[1]),i=Math.pow(2,t.z);return[Math.round(e*i*Sp),Math.round(n*i*Sp)]}function PE(r,t){const e=Math.pow(2,t.z),n=(r[0]/Sp+t.x)/e,i=(r[1]/Sp+t.y)/e;return[xQ(n),MQ(i)]}function bQ(r){return(180+r)/360}function xQ(r){return r*360-180}function wQ(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function MQ(r){return 360/Math.PI*Math.atan(Math.exp((180-r*360)*Math.PI/180))-90}function Kv(r,t){r[0]=Math.min(r[0],t[0]),r[1]=Math.min(r[1],t[1]),r[2]=Math.max(r[2],t[0]),r[3]=Math.max(r[3],t[1])}function sv(r,t){return!(r[0]<=t[0]||r[2]>=t[2]||r[1]<=t[1]||r[3]>=t[3])}function SQ(r,t,e){return t[1]>r[1]!=e[1]>r[1]&&r[0]<(e[0]-t[0])*(r[1]-t[1])/(e[1]-t[1])+t[0]}function EQ(r,t,e){const n=r[0]-t[0],i=r[1]-t[1],o=r[0]-e[0],s=r[1]-e[1];return n*s-o*i===0&&n*o<=0&&i*s<=0}function Vb(r,t,e,n){const i=[t[0]-r[0],t[1]-r[1]],o=[n[0]-e[0],n[1]-e[1]];return kQ(o,i)===0?!1:!!(VB(r,t,e,n)&&VB(e,n,r,t))}function OQ(r,t,e){for(const n of e)for(let i=0;i<n.length-1;++i)if(Vb(r,t,n[i],n[i+1]))return!0;return!1}function Q1(r,t,e=!1){let n=!1;for(const i of t)for(let o=0;o<i.length-1;o++){if(EQ(r,i[o],i[o+1]))return e;SQ(r,i[o],i[o+1])&&(n=!n)}return n}function BQ(r,t){for(const e of t)if(Q1(r,e))return!0;return!1}function JR(r,t){for(const e of r)if(!Q1(e,t))return!1;for(let e=0;e<r.length-1;++e)if(OQ(r[e],r[e+1],t))return!1;return!0}function IQ(r,t){for(const e of t)if(JR(r,e))return!0;return!1}function kQ(r,t){return r[0]*t[1]-r[1]*t[0]}function VB(r,t,e,n){const i=r[0]-e[0],o=r[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],f=n[0]-e[0],g=n[1]-e[1],b=i*g-f*o,I=s*g-f*a;return b>0&&I<0||b<0&&I>0}function KE(r,t,e){const n=[];for(let i=0;i<r.length;i++){const o=[];for(let s=0;s<r[i].length;s++){const a=CQ(r[i][s],e);Kv(t,a),o.push(a)}n.push(o)}return n}function eD(r,t,e){const n=[];for(let i=0;i<r.length;i++){const o=KE(r[i],t,e);n.push(o)}return n}function tD(r,t,e,n){if(r[0]<e[0]||r[0]>e[2]){const i=n*.5;let o=r[0]-e[0]>i?-n:e[0]-r[0]>i?n:0;o===0&&(o=r[0]-e[2]>i?-n:e[2]-r[0]>i?n:0),r[0]+=o}Kv(t,r)}function TQ(r){r[0]=r[1]=1/0,r[2]=r[3]=-1/0}function HB(r,t,e,n){const i=Math.pow(2,n.z)*Sp,o=[n.x*Sp,n.y*Sp],s=[];for(const a of r)for(const f of a){const g=[f.x+o[0],f.y+o[1]];tD(g,t,e,i),s.push(g)}return s}function ZB(r,t,e,n){const i=Math.pow(2,n.z)*Sp,o=[n.x*Sp,n.y*Sp],s=[];for(const a of r){const f=[];for(const g of a){const b=[g.x+o[0],g.y+o[1]];Kv(t,b),f.push(b)}s.push(f)}if(t[2]-t[0]<=i/2){TQ(t);for(const a of s)for(const f of a)tD(f,t,e,i)}return s}function PQ(r,t){const e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=r.canonicalID();if(t.type==="Polygon"){const o=KE(t.coordinates,n,i),s=HB(r.geometry(),e,n,i);if(!sv(e,n))return!1;for(const a of s)if(!Q1(a,o))return!1}if(t.type==="MultiPolygon"){const o=eD(t.coordinates,n,i),s=HB(r.geometry(),e,n,i);if(!sv(e,n))return!1;for(const a of s)if(!BQ(a,o))return!1}return!0}function KQ(r,t){const e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=r.canonicalID();if(t.type==="Polygon"){const o=KE(t.coordinates,n,i),s=ZB(r.geometry(),e,n,i);if(!sv(e,n))return!1;for(const a of s)if(!JR(a,o))return!1}if(t.type==="MultiPolygon"){const o=eD(t.coordinates,n,i),s=ZB(r.geometry(),e,n,i);if(!sv(e,n))return!1;for(const a of s)if(!IQ(a,o))return!1}return!0}let RE=class fC{constructor(t,e){this.type=Go,this.geojson=t,this.geometries=e}static parse(t,e){if(t.length!==2)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(av(t[1])){const n=t[1];if(n.type==="FeatureCollection"){const i=[];for(const o of n.features){const{type:s,coordinates:a}=o.geometry;s==="Polygon"&&i.push(a),s==="MultiPolygon"&&i.push(...a)}if(i.length){const o={type:"MultiPolygon",coordinates:i};return new fC(n,o)}}else if(n.type==="Feature"){const i=n.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new fC(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new fC(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return PQ(t,this.geometries);if(t.geometryType()==="LineString")return KQ(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}};class nD{constructor(t=[],e=(n,i)=>n<i?-1:n>i?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];for(;t>0;){const o=t-1>>1,s=e[o];if(n(i,s)>=0)break;e[t]=s,t=o}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,o=e[t];for(;t<i;){let s=(t<<1)+1;const a=s+1;if(a<this.length&&n(e[a],e[s])<0&&(s=a),n(e[s],o)>=0)break;e[t]=e[s],t=s}e[t]=o}}function RQ(r,t){if(r.length<=1)return[r];const n=[];let i,o;for(const s of r){const a=DQ(s);a!==0&&(s.area=Math.abs(a),o===void 0&&(o=a<0),o===a<0?(i&&n.push(i),i=[s]):i.push(s))}return i&&n.push(i),n}function DQ(r){let t=0;for(let e=0,n=r.length,i=n-1,o,s;e<n;i=e++)o=r[e],s=r[i],t+=(s.x-o.x)*(o.y+s.y);return t}const LQ=6378.137,XB=1/298.257223563,JB=XB*(2-XB),eI=Math.PI/180;class DE{constructor(t){const e=eI*LQ*1e3,n=Math.cos(t*eI),i=1/(1-JB*(1-n*n)),o=Math.sqrt(i);this.kx=e*o*n,this.ky=e*o*i*(1-JB)}distance(t,e){const n=this.wrap(t[0]-e[0])*this.kx,i=(t[1]-e[1])*this.ky;return Math.sqrt(n*n+i*i)}pointOnLine(t,e){let n=1/0,i,o,s,a;for(let f=0;f<t.length-1;f++){let g=t[f][0],b=t[f][1],I=this.wrap(t[f+1][0]-g)*this.kx,S=(t[f+1][1]-b)*this.ky,B=0;(I!==0||S!==0)&&(B=(this.wrap(e[0]-g)*this.kx*I+(e[1]-b)*this.ky*S)/(I*I+S*S),B>1?(g=t[f+1][0],b=t[f+1][1]):B>0&&(g+=I/this.kx*B,b+=S/this.ky*B)),I=this.wrap(e[0]-g)*this.kx,S=(e[1]-b)*this.ky;const P=I*I+S*S;P<n&&(n=P,i=g,o=b,s=f,a=B)}return{point:[i,o],index:s,t:Math.max(0,Math.min(1,a))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}const pS=100,mS=50;function rD(r,t){return t[0]-r[0]}function DC(r){return r[1]-r[0]+1}function vm(r,t){return r[1]>=r[0]&&r[1]<t}function gS(r,t){if(r[0]>r[1])return[null,null];const e=DC(r);if(t){if(e===2)return[r,null];const i=Math.floor(e/2);return[[r[0],r[0]+i],[r[0]+i,r[1]]]}if(e===1)return[r,null];const n=Math.floor(e/2)-1;return[[r[0],r[0]+n],[r[0]+n+1,r[1]]]}function yS(r,t){if(!vm(t,r.length))return[1/0,1/0,-1/0,-1/0];const e=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)Kv(e,r[n]);return e}function vS(r){const t=[1/0,1/0,-1/0,-1/0];for(const e of r)for(const n of e)Kv(t,n);return t}function tI(r){return r[0]!==-1/0&&r[1]!==-1/0&&r[2]!==1/0&&r[3]!==1/0}function LE(r,t,e){if(!tI(r)||!tI(t))return NaN;let n=0,i=0;return r[2]<t[0]&&(n=t[0]-r[2]),r[0]>t[2]&&(n=r[0]-t[2]),r[1]>t[3]&&(i=r[1]-t[3]),r[3]<t[1]&&(i=t[1]-r[3]),e.distance([0,0],[n,i])}function z0(r,t,e){const n=e.pointOnLine(t,r);return e.distance(r,n.point)}function FE(r,t,e,n,i){const o=Math.min(z0(r,[e,n],i),z0(t,[e,n],i)),s=Math.min(z0(e,[r,t],i),z0(n,[r,t],i));return Math.min(o,s)}function FQ(r,t,e,n,i){if(!(vm(t,r.length)&&vm(n,e.length)))return 1/0;let s=1/0;for(let a=t[0];a<t[1];++a){const f=r[a],g=r[a+1];for(let b=n[0];b<n[1];++b){const I=e[b],S=e[b+1];if(Vb(f,g,I,S))return 0;s=Math.min(s,FE(f,g,I,S,i))}}return s}function UQ(r,t,e,n,i){if(!(vm(t,r.length)&&vm(n,e.length)))return NaN;let s=1/0;for(let a=t[0];a<=t[1];++a)for(let f=n[0];f<=n[1];++f)if(s=Math.min(s,i.distance(r[a],e[f])),s===0)return s;return s}function jQ(r,t,e){if(Q1(r,t,!0))return 0;let n=1/0;for(const i of t){const o=i[0],s=i[i.length-1];if(o!==s&&(n=Math.min(n,z0(r,[s,o],e)),n===0))return n;const a=e.pointOnLine(i,r);if(n=Math.min(n,e.distance(r,a.point)),n===0)return n}return n}function zQ(r,t,e,n){if(!vm(t,r.length))return NaN;for(let o=t[0];o<=t[1];++o)if(Q1(r[o],e,!0))return 0;let i=1/0;for(let o=t[0];o<t[1];++o){const s=r[o],a=r[o+1];for(const f of e)for(let g=0,b=f.length,I=b-1;g<b;I=g++){const S=f[I],B=f[g];if(Vb(s,a,S,B))return 0;i=Math.min(i,FE(s,a,S,B,n))}}return i}function nI(r,t){for(const e of r)for(const n of e)if(Q1(n,t,!0))return!0;return!1}function NQ(r,t,e,n=1/0){const i=vS(r),o=vS(t);if(n!==1/0&&LE(i,o,e)>=n)return n;if(sv(i,o)){if(nI(r,t))return 0}else if(nI(t,r))return 0;let s=1/0;for(const a of r)for(let f=0,g=a.length,b=g-1;f<g;b=f++){const I=a[b],S=a[f];for(const B of t)for(let P=0,U=B.length,j=U-1;P<U;j=P++){const q=B[j],W=B[P];if(Vb(I,S,q,W))return 0;s=Math.min(s,FE(I,S,q,W,e))}}return s}function rI(r,t,e,n,i,o){if(!o)return;const s=LE(yS(n,o),i,e);s<t&&r.push([s,o,[0,0]])}function P_(r,t,e,n,i,o,s){if(!o||!s)return;const a=LE(yS(n,o),yS(i,s),e);a<t&&r.push([a,o,s])}function LC(r,t,e,n,i=1/0){let o=Math.min(n.distance(r[0],e[0][0]),i);if(o===0)return o;const s=new nD([[0,[0,r.length-1],[0,0]]],rD),a=vS(e);for(;s.length>0;){const f=s.pop();if(f[0]>=o)continue;const g=f[1],b=t?mS:pS;if(DC(g)<=b){if(!vm(g,r.length))return NaN;if(t){const I=zQ(r,g,e,n);if(isNaN(I)||I===0)return I;o=Math.min(o,I)}else for(let I=g[0];I<=g[1];++I){const S=jQ(r[I],e,n);if(o=Math.min(o,S),o===0)return 0}}else{const I=gS(g,t);rI(s,o,n,r,a,I[0]),rI(s,o,n,r,a,I[1])}}return o}function FC(r,t,e,n,i,o=1/0){let s=Math.min(o,i.distance(r[0],e[0]));if(s===0)return s;const a=new nD([[0,[0,r.length-1],[0,e.length-1]]],rD);for(;a.length>0;){const f=a.pop();if(f[0]>=s)continue;const g=f[1],b=f[2],I=t?mS:pS,S=n?mS:pS;if(DC(g)<=I&&DC(b)<=S){if(!vm(g,r.length)&&vm(b,e.length))return NaN;let B;if(t&&n)B=FQ(r,g,e,b,i),s=Math.min(s,B);else if(t&&!n){const P=r.slice(g[0],g[1]+1);for(let U=b[0];U<=b[1];++U)if(B=z0(e[U],P,i),s=Math.min(s,B),s===0)return s}else if(!t&&n){const P=e.slice(b[0],b[1]+1);for(let U=g[0];U<=g[1];++U)if(B=z0(r[U],P,i),s=Math.min(s,B),s===0)return s}else B=UQ(r,g,e,b,i),s=Math.min(s,B)}else{const B=gS(g,t),P=gS(b,n);P_(a,s,i,r,e,B[0],P[0]),P_(a,s,i,r,e,B[0],P[1]),P_(a,s,i,r,e,B[1],P[0]),P_(a,s,i,r,e,B[1],P[1])}}return s}function GQ(r,t){const e=r.geometry(),n=e.flat().map(s=>PE([s.x,s.y],r.canonical));if(e.length===0)return NaN;const i=new DE(n[0][1]);let o=1/0;for(const s of t){switch(s.type){case"Point":o=Math.min(o,FC(n,!1,[s.coordinates],!1,i,o));break;case"LineString":o=Math.min(o,FC(n,!1,s.coordinates,!0,i,o));break;case"Polygon":o=Math.min(o,LC(n,!1,s.coordinates,i,o));break}if(o===0)return o}return o}function WQ(r,t){const e=r.geometry(),n=e.flat().map(s=>PE([s.x,s.y],r.canonical));if(e.length===0)return NaN;const i=new DE(n[0][1]);let o=1/0;for(const s of t){switch(s.type){case"Point":o=Math.min(o,FC(n,!0,[s.coordinates],!1,i,o));break;case"LineString":o=Math.min(o,FC(n,!0,s.coordinates,!0,i,o));break;case"Polygon":o=Math.min(o,LC(n,!0,s.coordinates,i,o));break}if(o===0)return o}return o}function QQ(r,t){const e=r.geometry();if(e.length===0||e[0].length===0)return NaN;const n=RQ(e).map(s=>s.map(a=>a.map(f=>PE([f.x,f.y],r.canonical)))),i=new DE(n[0][0][0][1]);let o=1/0;for(const s of t)for(const a of n){switch(s.type){case"Point":o=Math.min(o,LC([s.coordinates],!1,a,i,o));break;case"LineString":o=Math.min(o,LC(s.coordinates,!0,a,i,o));break;case"Polygon":o=Math.min(o,NQ(a,s.coordinates,i,o));break}if(o===0)return o}return o}function Ox(r){return r.type==="MultiPolygon"?r.coordinates.map(t=>({type:"Polygon",coordinates:t})):r.type==="MultiLineString"?r.coordinates.map(t=>({type:"LineString",coordinates:t})):r.type==="MultiPoint"?r.coordinates.map(t=>({type:"Point",coordinates:t})):[r]}class V0{constructor(t,e){this.type=Ir,this.geojson=t,this.geometries=e}static parse(t,e){if(t.length!==2)return e.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(av(t[1])){const n=t[1];if(n.type==="FeatureCollection")return new V0(n,n.features.map(i=>Ox(i.geometry)).flat());if(n.type==="Feature")return new V0(n,Ox(n.geometry));if("type"in n&&"coordinates"in n)return new V0(n,Ox(n))}return e.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return GQ(t,this.geometries);if(t.geometryType()==="LineString")return WQ(t,this.geometries);if(t.geometryType()==="Polygon")return QQ(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const UE={"==":cQ,"!=":dQ,">":fQ,"<":hQ,">=":mQ,"<=":pQ,array:cm,at:GW,boolean:cm,case:YW,coalesce:WR,collator:YR,format:yQ,image:vQ,in:WW,"index-of":QW,interpolate:fm,"interpolate-hcl":fm,"interpolate-lab":fm,length:_Q,let:KR,literal:RC,match:qW,number:cm,"number-format":gQ,object:cm,slice:$W,step:NR,string:cm,"to-boolean":s1,"to-color":s1,"to-number":s1,"to-string":s1,var:DR,within:RE,distance:V0};let q1=class By{constructor(t,e,n,i){this.name=t,this.type=e,this._evaluate=n,this.args=i}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,e){const n=t[0],i=By.definitions[n];if(!i)return e.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(i)?i[0]:i.type,s=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,a=s.filter(([g])=>!Array.isArray(g)||g.length===t.length-1);let f=null;for(const[g,b]of a){f=new TR(e.registry,UC,e.path,null,e.scope);const I=[];let S=!1;for(let B=1;B<t.length;B++){const P=t[B],U=Array.isArray(g)?g[B-1]:g.type,j=f.parse(P,1+I.length,U);if(!j){S=!0;break}I.push(j)}if(!S){if(Array.isArray(g)&&g.length!==I.length){f.error(`Expected ${g.length} arguments, but found ${I.length} instead.`);continue}for(let B=0;B<I.length;B++){const P=Array.isArray(g)?g[B]:g.type,U=I[B];f.concat(B+1).checkSubtype(P,U.type)}if(f.errors.length===0)return new By(n,o,b,I)}}if(a.length===1)e.errors.push(...f.errors);else{const b=(a.length?a:s).map(([S])=>YQ(S)).join(" | "),I=[];for(let S=1;S<t.length;S++){const B=e.parse(t[S],1+I.length);if(!B)return null;I.push(Ql(B.type))}e.error(`Expected arguments of type ${b}, but found (${I.join(", ")}) instead.`)}return null}static register(t,e){By.definitions=e;for(const n in e)t[n]=By}};function iI(r,[t,e,n,i]){t=t.evaluate(r),e=e.evaluate(r),n=n.evaluate(r);const o=i?i.evaluate(r):1,s=ER(t,e,n,o);if(s)throw new Xu(s);return new Kl(t/255,e/255,n/255,o,!1)}function oI(r,t){return r in t}function Bx(r,t){const e=t[r];return typeof e>"u"?null:e}function qQ(r,t,e,n){for(;e<=n;){const i=e+n>>1;if(t[i]===r)return!0;t[i]>r?n=i-1:e=i+1}return!1}function M0(r){return{type:r}}q1.register(UE,{error:[BW,[ra],(r,[t])=>{throw new Xu(t.evaluate(r))}],typeof:[ra,[Qo],(r,[t])=>Ql(RA(t.evaluate(r)))],"to-rgba":[Ph(Ir,4),[Mp],(r,[t])=>{const[e,n,i,o]=t.evaluate(r).rgb;return[e*255,n*255,i*255,o]}],rgb:[Mp,[Ir,Ir,Ir],iI],rgba:[Mp,[Ir,Ir,Ir,Ir],iI],has:{type:Go,overloads:[[[ra],(r,[t])=>oI(t.evaluate(r),r.properties())],[[ra,g1],(r,[t,e])=>oI(t.evaluate(r),e.evaluate(r))]]},get:{type:Qo,overloads:[[[ra],(r,[t])=>Bx(t.evaluate(r),r.properties())],[[ra,g1],(r,[t,e])=>Bx(t.evaluate(r),e.evaluate(r))]]},"feature-state":[Qo,[ra],(r,[t])=>Bx(t.evaluate(r),r.featureState||{})],properties:[g1,[],r=>r.properties()],"geometry-type":[ra,[],r=>r.geometryType()],id:[Qo,[],r=>r.id()],zoom:[Ir,[],r=>r.globals.zoom],"heatmap-density":[Ir,[],r=>r.globals.heatmapDensity||0],"line-progress":[Ir,[],r=>r.globals.lineProgress||0],accumulated:[Qo,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[Ir,M0(Ir),(r,t)=>{let e=0;for(const n of t)e+=n.evaluate(r);return e}],"*":[Ir,M0(Ir),(r,t)=>{let e=1;for(const n of t)e*=n.evaluate(r);return e}],"-":{type:Ir,overloads:[[[Ir,Ir],(r,[t,e])=>t.evaluate(r)-e.evaluate(r)],[[Ir],(r,[t])=>-t.evaluate(r)]]},"/":[Ir,[Ir,Ir],(r,[t,e])=>t.evaluate(r)/e.evaluate(r)],"%":[Ir,[Ir,Ir],(r,[t,e])=>t.evaluate(r)%e.evaluate(r)],ln2:[Ir,[],()=>Math.LN2],pi:[Ir,[],()=>Math.PI],e:[Ir,[],()=>Math.E],"^":[Ir,[Ir,Ir],(r,[t,e])=>Math.pow(t.evaluate(r),e.evaluate(r))],sqrt:[Ir,[Ir],(r,[t])=>Math.sqrt(t.evaluate(r))],log10:[Ir,[Ir],(r,[t])=>Math.log(t.evaluate(r))/Math.LN10],ln:[Ir,[Ir],(r,[t])=>Math.log(t.evaluate(r))],log2:[Ir,[Ir],(r,[t])=>Math.log(t.evaluate(r))/Math.LN2],sin:[Ir,[Ir],(r,[t])=>Math.sin(t.evaluate(r))],cos:[Ir,[Ir],(r,[t])=>Math.cos(t.evaluate(r))],tan:[Ir,[Ir],(r,[t])=>Math.tan(t.evaluate(r))],asin:[Ir,[Ir],(r,[t])=>Math.asin(t.evaluate(r))],acos:[Ir,[Ir],(r,[t])=>Math.acos(t.evaluate(r))],atan:[Ir,[Ir],(r,[t])=>Math.atan(t.evaluate(r))],min:[Ir,M0(Ir),(r,t)=>Math.min(...t.map(e=>e.evaluate(r)))],max:[Ir,M0(Ir),(r,t)=>Math.max(...t.map(e=>e.evaluate(r)))],abs:[Ir,[Ir],(r,[t])=>Math.abs(t.evaluate(r))],round:[Ir,[Ir],(r,[t])=>{const e=t.evaluate(r);return e<0?-Math.round(-e):Math.round(e)}],floor:[Ir,[Ir],(r,[t])=>Math.floor(t.evaluate(r))],ceil:[Ir,[Ir],(r,[t])=>Math.ceil(t.evaluate(r))],"filter-==":[Go,[ra,Qo],(r,[t,e])=>r.properties()[t.value]===e.value],"filter-id-==":[Go,[Qo],(r,[t])=>r.id()===t.value],"filter-type-==":[Go,[ra],(r,[t])=>r.geometryType()===t.value],"filter-<":[Go,[ra,Qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n<i}],"filter-id-<":[Go,[Qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e<n}],"filter->":[Go,[ra,Qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n>i}],"filter-id->":[Go,[Qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e>n}],"filter-<=":[Go,[ra,Qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[Go,[Qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e<=n}],"filter->=":[Go,[ra,Qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[Go,[Qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e>=n}],"filter-has":[Go,[Qo],(r,[t])=>t.value in r.properties()],"filter-has-id":[Go,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[Go,[Ph(ra)],(r,[t])=>t.value.indexOf(r.geometryType())>=0],"filter-id-in":[Go,[Ph(Qo)],(r,[t])=>t.value.indexOf(r.id())>=0],"filter-in-small":[Go,[ra,Ph(Qo)],(r,[t,e])=>e.value.indexOf(r.properties()[t.value])>=0],"filter-in-large":[Go,[ra,Ph(Qo)],(r,[t,e])=>qQ(r.properties()[t.value],e.value,0,e.value.length-1)],all:{type:Go,overloads:[[[Go,Go],(r,[t,e])=>t.evaluate(r)&&e.evaluate(r)],[M0(Go),(r,t)=>{for(const e of t)if(!e.evaluate(r))return!1;return!0}]]},any:{type:Go,overloads:[[[Go,Go],(r,[t,e])=>t.evaluate(r)||e.evaluate(r)],[M0(Go),(r,t)=>{for(const e of t)if(e.evaluate(r))return!0;return!1}]]},"!":[Go,[Go],(r,[t])=>!t.evaluate(r)],"is-supported-script":[Go,[ra],(r,[t])=>{const e=r.globals&&r.globals.isSupportedScript;return e?e(t.evaluate(r)):!0}],upcase:[ra,[ra],(r,[t])=>t.evaluate(r).toUpperCase()],downcase:[ra,[ra],(r,[t])=>t.evaluate(r).toLowerCase()],concat:[ra,M0(Qo),(r,t)=>t.map(e=>qy(e.evaluate(r))).join("")],"resolved-locale":[ra,[Wb],(r,[t])=>t.evaluate(r).resolvedLocale()]});function YQ(r){return Array.isArray(r)?`(${r.map(Ql).join(", ")})`:`(${Ql(r.type)}...)`}function UC(r){if(r instanceof DR)return UC(r.boundExpression);if(r instanceof q1&&r.name==="error")return!1;if(r instanceof YR)return!1;if(r instanceof RE)return!1;if(r instanceof V0)return!1;const t=r instanceof s1||r instanceof cm;let e=!0;return r.eachChild(n=>{t?e=e&&UC(n):e=e&&n instanceof RC}),e?Hb(r)&&Zb(r,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Hb(r){if(r instanceof q1){if(r.name==="get"&&r.args.length===1)return!1;if(r.name==="feature-state")return!1;if(r.name==="has"&&r.args.length===1)return!1;if(r.name==="properties"||r.name==="geometry-type"||r.name==="id")return!1;if(/^filter-/.test(r.name))return!1}if(r instanceof RE||r instanceof V0)return!1;let t=!0;return r.eachChild(e=>{t&&!Hb(e)&&(t=!1)}),t}function lv(r){if(r instanceof q1&&r.name==="feature-state")return!1;let t=!0;return r.eachChild(e=>{t&&!lv(e)&&(t=!1)}),t}function Zb(r,t){if(r instanceof q1&&t.indexOf(r.name)>=0)return!1;let e=!0;return r.eachChild(n=>{e&&!Zb(n,t)&&(e=!1)}),e}function _S(r){return{result:"success",value:r}}function Jg(r){return{result:"error",value:r}}function jC(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function iD(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function jE(r){return!!r.expression&&r.expression.interpolated}function Fa(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function Rv(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function $Q(r){return r}function zE(r,t){const e=t.type==="color",n=r.stops&&typeof r.stops[0][0]=="object",i=n||r.property!==void 0,o=n||!i,s=r.type||(jE(t)?"exponential":"interval");if(e||t.type==="padding"){const b=e?Kl.parse:Kd.parse;r=P1({},r),r.stops&&(r.stops=r.stops.map(I=>[I[0],b(I[1])])),r.default?r.default=b(r.default):r.default=b(t.default)}if(r.colorSpace&&!UW(r.colorSpace))throw new Error(`Unknown color space: "${r.colorSpace}"`);let a,f,g;if(s==="exponential")a=aI;else if(s==="interval")a=HQ;else if(s==="categorical"){a=VQ,f=Object.create(null);for(const b of r.stops)f[b[0]]=b[1];g=typeof r.stops[0][0]}else if(s==="identity")a=ZQ;else throw new Error(`Unknown function type "${s}"`);if(n){const b={},I=[];for(let P=0;P<r.stops.length;P++){const U=r.stops[P],j=U[0].zoom;b[j]===void 0&&(b[j]={zoom:j,type:r.type,property:r.property,default:r.default,stops:[]},I.push(j)),b[j].stops.push([U[0].value,U[1]])}const S=[];for(const P of I)S.push([b[P].zoom,zE(b[P],t)]);const B={name:"linear"};return{kind:"composite",interpolationType:B,interpolationFactor:fm.interpolationFactor.bind(void 0,B),zoomStops:S.map(P=>P[0]),evaluate({zoom:P},U){return aI({stops:S,base:r.base},t,P).evaluate(P,U)}}}else if(o){const b=s==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:b,interpolationFactor:fm.interpolationFactor.bind(void 0,b),zoomStops:r.stops.map(I=>I[0]),evaluate:({zoom:I})=>a(r,t,I,f,g)}}else return{kind:"source",evaluate(b,I){const S=I&&I.properties?I.properties[r.property]:void 0;return S===void 0?Dv(r.default,t.default):a(r,t,S,f,g)}}}function Dv(r,t,e){if(r!==void 0)return r;if(t!==void 0)return t;if(e!==void 0)return e}function VQ(r,t,e,n,i){const o=typeof e===i?n[e]:void 0;return Dv(o,r.default,t.default)}function HQ(r,t,e){if(Fa(e)!=="number")return Dv(r.default,t.default);const n=r.stops.length;if(n===1||e<=r.stops[0][0])return r.stops[0][1];if(e>=r.stops[n-1][0])return r.stops[n-1][1];const i=$b(r.stops.map(o=>o[0]),e);return r.stops[i][1]}function aI(r,t,e){const n=r.base!==void 0?r.base:1;if(Fa(e)!=="number")return Dv(r.default,t.default);const i=r.stops.length;if(i===1||e<=r.stops[0][0])return r.stops[0][1];if(e>=r.stops[i-1][0])return r.stops[i-1][1];const o=$b(r.stops.map(b=>b[0]),e),s=XQ(e,n,r.stops[o][0],r.stops[o+1][0]),a=r.stops[o][1],f=r.stops[o+1][1],g=JW[t.type]||$Q;return typeof a.evaluate=="function"?{evaluate(...b){const I=a.evaluate.apply(void 0,b),S=f.evaluate.apply(void 0,b);if(!(I===void 0||S===void 0))return g(I,S,s,r.colorSpace)}}:g(a,f,s,r.colorSpace)}function ZQ(r,t,e){switch(t.type){case"color":e=Kl.parse(e);break;case"formatted":e=G1.fromString(e.toString());break;case"resolvedImage":e=sg.fromString(e.toString());break;case"padding":e=Kd.parse(e);break;default:Fa(e)!==t.type&&(t.type!=="enum"||!t.values[e])&&(e=void 0)}return Dv(e,r.default,t.default)}function XQ(r,t,e,n){const i=n-e,o=r-e;return i===0?0:t===1?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}let oD=class{constructor(t,e){this.expression=t,this._warningHistory={},this._evaluator=new kR,this._defaultValue=e?nq(e):null,this._enumValues=e&&e.type==="enum"?e.values:null}evaluateWithoutErrorHandling(t,e,n,i,o,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=i,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this.expression.evaluate(this._evaluator)}evaluate(t,e,n,i,o,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null;try{const a=this.expression.evaluate(this._evaluator);if(a==null||typeof a=="number"&&a!==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new Xu(`Expected value to be one of ${Object.keys(this._enumValues).map(f=>JSON.stringify(f)).join(", ")}, but found ${JSON.stringify(a)} instead.`);return a}catch(a){return this._warningHistory[a.message]||(this._warningHistory[a.message]=!0,typeof console<"u"&&console.warn(a.message)),this._defaultValue}}};function Lv(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in UE}function NE(r,t){const e=new TR(UE,UC,[],t?tq(t):void 0),n=e.parse(r,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?_S(new oD(n,t)):Jg(e.errors)}let CS=class{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!lv(e.expression)}evaluateWithoutErrorHandling(t,e,n,i,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,i,o,s)}evaluate(t,e,n,i,o,s){return this._styleExpression.evaluate(t,e,n,i,o,s)}},bS=class{constructor(t,e,n,i){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!lv(e.expression),this.interpolationType=i}evaluateWithoutErrorHandling(t,e,n,i,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,i,o,s)}evaluate(t,e,n,i,o,s){return this._styleExpression.evaluate(t,e,n,i,o,s)}interpolationFactor(t,e,n){return this.interpolationType?fm.interpolationFactor(this.interpolationType,t,e,n):0}};function JQ(r){return r._styleExpression!==void 0}function GE(r,t){const e=NE(r,t);if(e.result==="error")return e;const n=e.value.expression,i=Hb(n);if(!i&&!jC(t))return Jg([new Cp("","data expressions not supported")]);const o=Zb(n,["zoom"]);if(!o&&!iD(t))return Jg([new Cp("","zoom expressions not supported")]);const s=pC(n);if(!s&&!o)return Jg([new Cp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof Cp)return Jg([s]);if(s instanceof fm&&!jE(t))return Jg([new Cp("",'"interpolate" expressions cannot be used with this property')]);if(!s)return _S(i?new CS("constant",e.value):new CS("source",e.value));const a=s instanceof fm?s.interpolation:void 0;return _S(i?new bS("camera",e.value,s.labels,a):new bS("composite",e.value,s.labels,a))}let aD=class sD{constructor(t,e){this._parameters=t,this._specification=e,P1(this,zE(this._parameters,this._specification))}static deserialize(t){return new sD(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}};function eq(r,t){if(Rv(r))return new aD(r,t);if(Lv(r)){const e=GE(r,t);if(e.result==="error")throw new Error(e.value.map(n=>`${n.key}: ${n.message}`).join(", "));return e.value}else{let e=r;return t.type==="color"&&typeof r=="string"?e=Kl.parse(r):t.type==="padding"&&(typeof r=="number"||Array.isArray(r))?e=Kd.parse(r):t.type==="variableAnchorOffsetCollection"&&Array.isArray(r)?e=cf.parse(r):t.type==="projectionDefinition"&&typeof r=="string"&&(e=sf.parse(r)),{kind:"constant",evaluate:()=>e}}}function pC(r){let t=null;if(r instanceof KR)t=pC(r.result);else if(r instanceof WR){for(const e of r.args)if(t=pC(e),t)break}else(r instanceof NR||r instanceof fm)&&r.input instanceof q1&&r.input.name==="zoom"&&(t=r);return t instanceof Cp||r.eachChild(e=>{const n=pC(e);n instanceof Cp?t=n:!t&&n?t=new Cp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new Cp("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function tq(r){const t={color:Mp,string:ra,number:Ir,enum:ra,boolean:Go,formatted:Qb,padding:qb,projectionDefinition:Gb,resolvedImage:Pv,variableAnchorOffsetCollection:Yb};return r.type==="array"?Ph(t[r.value]||Qo,r.length):t[r.type]}function nq(r){return r.type==="color"&&Rv(r.default)?new Kl(0,0,0,0):r.type==="color"?Kl.parse(r.default)||null:r.type==="padding"?Kd.parse(r.default)||null:r.type==="variableAnchorOffsetCollection"?cf.parse(r.default)||null:r.type==="projectionDefinition"?sf.parse(r.default)||null:r.default===void 0?null:r.default}function Xb(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const t of r.slice(1))if(!Xb(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}function Yy(r,t={}){if(Xb(r))return r;if(!r)return!0;const e=r,n=e[0];if(r.length<=1)return n!=="any";switch(n){case"==":case"!=":case"<":case">":case"<=":case">=":{const[,i,o]=r;return iq(i,o,n,t)}case"any":{const[,...i]=e;return["any",...i.map(s=>{const a={},f=Yy(s,a),g=rq(a);return g===!0?f:["case",g,f,!1]})]}case"all":{const[,...i]=e,o=i.map(s=>Yy(s,t));return o.length>1?["all",...o]:o[0]}case"none":{const[,...i]=e;return["!",Yy(["any",...i],{})]}case"in":{const[,i,...o]=e;return sI(i,o)}case"!in":{const[,i,...o]=e;return sI(i,o,!0)}case"has":return lI(e[1]);case"!has":return["!",lI(e[1])];default:return!0}}function rq(r){const t=[];for(const e in r){const n=e==="$id"?["id"]:["get",e];t.push(["==",["typeof",n],r[e]])}return t.length===0?!0:t.length===1?t[0]:["all",...t]}function iq(r,t,e,n){let i;if(r==="$type")return[e,["geometry-type"],t];if(r==="$id"?i=["id"]:i=["get",r],n&&t!==null){const o=typeof t;n[r]=o}return e==="=="&&r!=="$id"&&t===null?["all",["has",r],["==",i,null]]:e==="!="&&r!=="$id"&&t===null?["any",["!",["has",r]],["!=",i,null]]:[e,i,t]}function sI(r,t,e=!1){if(t.length===0)return e;let n;r==="$type"?n=["geometry-type"]:r==="$id"?n=["id"]:n=["get",r];let i=!0;const o=typeof t[0];for(const s of t)if(typeof s!==o){i=!1;break}if(i&&(o==="string"||o==="number")){const s=t.sort().filter((a,f)=>f===0||t[f-1]!==a);return["match",n,s,!e,e]}return e?["all",...t.map(s=>["!=",n,s])]:["any",...t.map(s=>["==",n,s])]}function lI(r){return r==="$type"?!0:r==="$id"?["!=",["id"],null]:["has",r]}function uv(r){return typeof r=="object"?["literal",r]:r}function lD(r,t){let e=r.stops;if(!e)return oq(r,t);const n=e&&typeof e[0][0]=="object",i=n||r.property!==void 0,o=n||!i;return e=e.map(s=>!i&&t.tokens&&typeof s[1]=="string"?[s[0],uD(s[1])]:[s[0],uv(s[1])]),n?aq(r,t,e):o?lq(r,t,e):xS(r,t,e)}function oq(r,t){const e=["get",r.property];if(r.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,r.default];{const n=[t.type==="color"?"to-color":t.type,e,uv(r.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}}function WE(r){switch(r.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function aq(r,t,e){const n={},i={},o=[];for(let a=0;a<e.length;a++){const f=e[a],g=f[0].zoom;n[g]===void 0&&(n[g]={zoom:g,type:r.type,property:r.property,default:r.default},i[g]=[],o.push(g)),i[g].push([f[0].value,f[1]])}if(qE({},t)==="exponential"){const a=[WE(r),["linear"],["zoom"]];for(const f of o){const g=xS(n[f],t,i[f]);v1(a,f,g,!1)}return a}else{const a=["step",["zoom"]];for(const f of o){const g=xS(n[f],t,i[f]);v1(a,f,g,!0)}return QE(a),a}}function sq(r,t){if(r!==void 0)return r;if(t!==void 0)return t}function uI(r,t){const e=uv(sq(r.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function xS(r,t,e){const n=qE(r,t),i=["get",r.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){const o=["case"];for(const s of e)o.push(["==",i,s[0]],s[1]);return o.push(uI(r,t)),o}else if(n==="categorical"){const o=["match",i];for(const s of e)v1(o,s[0],s[1],!1);return o.push(uI(r,t)),o}else if(n==="interval"){const o=["step",["number",i]];for(const s of e)v1(o,s[0],s[1],!0);return QE(o),r.default===void 0?o:["case",["==",["typeof",i],"number"],o,uv(r.default)]}else if(n==="exponential"){const o=r.base!==void 0?r.base:1,s=[WE(r),o===1?["linear"]:["exponential",o],["number",i]];for(const a of e)v1(s,a[0],a[1],!1);return r.default===void 0?s:["case",["==",["typeof",i],"number"],s,uv(r.default)]}else throw new Error(`Unknown property function type ${n}`)}function lq(r,t,e,n=["zoom"]){const i=qE(r,t);let o,s=!1;if(i==="interval")o=["step",n],s=!0;else if(i==="exponential"){const a=r.base!==void 0?r.base:1;o=[WE(r),a===1?["linear"]:["exponential",a],n]}else throw new Error(`Unknown zoom function type "${i}"`);for(const a of e)v1(o,a[0],a[1],s);return QE(o),o}function QE(r){r[0]==="step"&&r.length===3&&(r.push(0),r.push(r[3]))}function v1(r,t,e,n){r.length>3&&t===r[r.length-2]||(n&&r.length===2||r.push(t),r.push(e))}function qE(r,t){return r.type?r.type:t.expression.interpolated?"exponential":"interval"}function uD(r){const t=["concat"],e=/{([^{}]+)}/g;let n=0;for(let i=e.exec(r);i!==null;i=e.exec(r)){const o=r.slice(n,e.lastIndex-i[0].length);n=e.lastIndex,o.length>0&&t.push(o),t.push(["get",i[1]])}if(t.length===1)return r;if(n<r.length)t.push(r.slice(n));else if(t.length===2)return["to-string",t[1]];return t}function uq(r){for(let t=0;t<Qa.layout.length;t++)for(const e in Qa[Qa.layout[t]])if(e===r)return Qa[Qa.layout[t]][e];for(let t=0;t<Qa.paint.length;t++)for(const e in Qa[Qa.paint[t]])if(e===r)return Qa[Qa.paint[t]][e];return null}function Aq(r,t){for(const e in r.sources)t(r.sources[e])}function $y(r,t){for(const e of r.layers)t(e)}function YE(r,t,e){function n(i,o){const s=i[o];s&&Object.keys(s).forEach(a=>{e({path:[i.id,o,a],key:a,value:s[a],reference:uq(a),set(f){s[a]=f}})})}$y(r,i=>{t.paint&&n(i,"paint"),t.layout&&n(i,"layout")})}function AD(r){const t=r.key,e=r.value;return e?[new xr(t,e,"constants have been deprecated as of v8")]:[]}function wu(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function eg(r){if(Array.isArray(r))return r.map(eg);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const t={};for(const e in r)t[e]=eg(r[e]);return t}return wu(r)}function uf(r){const t=r.key,e=r.value,n=r.valueSpec||{},i=r.objectElementValidators||{},o=r.style,s=r.styleSpec,a=r.validateSpec;let f=[];const g=Fa(e);if(g!=="object")return[new xr(t,e,`object expected, ${g} found`)];for(const b in e){const I=b.split(".")[0],S=n[I]||n["*"];let B;if(i[I])B=i[I];else if(n[I])B=a;else if(i["*"])B=i["*"];else if(n["*"])B=a;else{f.push(new xr(t,e[b],`unknown property "${b}"`));continue}f=f.concat(B({key:(t&&`${t}.`)+b,value:e[b],valueSpec:S,style:o,styleSpec:s,object:e,objectKey:b,validateSpec:a},e))}for(const b in n)i[b]||n[b].required&&n[b].default===void 0&&e[b]===void 0&&f.push(new xr(t,e,`missing required property "${b}"`));return f}function $E(r){const t=r.value,e=r.valueSpec,n=r.validateSpec,i=r.style,o=r.styleSpec,s=r.key,a=r.arrayElementValidator||n;if(Fa(t)!=="array")return[new xr(s,t,`array expected, ${Fa(t)} found`)];if(e.length&&t.length!==e.length)return[new xr(s,t,`array length ${e.length} expected, length ${t.length} found`)];if(e["min-length"]&&t.length<e["min-length"])return[new xr(s,t,`array length at least ${e["min-length"]} expected, length ${t.length} found`)];let f={type:e.value,values:e.values};o.$version<7&&(f.function=e.function),Fa(e.value)==="object"&&(f=e.value);let g=[];for(let b=0;b<t.length;b++)g=g.concat(a({array:t,arrayIndex:b,value:t[b],valueSpec:f,validateSpec:r.validateSpec,style:i,styleSpec:o,key:`${s}[${b}]`}));return g}function VE(r){const t=r.key,e=r.value,n=r.valueSpec;let i=Fa(e);return i==="number"&&e!==e&&(i="NaN"),i!=="number"?[new xr(t,e,`number expected, ${i} found`)]:"minimum"in n&&e<n.minimum?[new xr(t,e,`${e} is less than the minimum value ${n.minimum}`)]:"maximum"in n&&e>n.maximum?[new xr(t,e,`${e} is greater than the maximum value ${n.maximum}`)]:[]}function cD(r){const t=r.valueSpec,e=wu(r.value.type);let n,i={},o,s;const a=e!=="categorical"&&r.value.property===void 0,f=!a,g=Fa(r.value.stops)==="array"&&Fa(r.value.stops[0])==="array"&&Fa(r.value.stops[0][0])==="object",b=uf({key:r.key,value:r.value,valueSpec:r.styleSpec.function,validateSpec:r.validateSpec,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:I,default:P}});return e==="identity"&&a&&b.push(new xr(r.key,r.value,'missing required property "property"')),e!=="identity"&&!r.value.stops&&b.push(new xr(r.key,r.value,'missing required property "stops"')),e==="exponential"&&r.valueSpec.expression&&!jE(r.valueSpec)&&b.push(new xr(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(f&&!jC(r.valueSpec)?b.push(new xr(r.key,r.value,"property functions not supported")):a&&!iD(r.valueSpec)&&b.push(new xr(r.key,r.value,"zoom functions not supported"))),(e==="categorical"||g)&&r.value.property===void 0&&b.push(new xr(r.key,r.value,'"property" property is required')),b;function I(U){if(e==="identity")return[new xr(U.key,U.value,'identity function may not have a "stops" property')];let j=[];const q=U.value;return j=j.concat($E({key:U.key,value:q,valueSpec:U.valueSpec,validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec,arrayElementValidator:S})),Fa(q)==="array"&&q.length===0&&j.push(new xr(U.key,q,"array must have at least one stop")),j}function S(U){let j=[];const q=U.value,W=U.key;if(Fa(q)!=="array")return[new xr(W,q,`array expected, ${Fa(q)} found`)];if(q.length!==2)return[new xr(W,q,`array length 2 expected, length ${q.length} found`)];if(g){if(Fa(q[0])!=="object")return[new xr(W,q,`object expected, ${Fa(q[0])} found`)];if(q[0].zoom===void 0)return[new xr(W,q,"object stop key must have zoom")];if(q[0].value===void 0)return[new xr(W,q,"object stop key must have value")];if(s&&s>wu(q[0].zoom))return[new xr(W,q[0].zoom,"stop zoom values must appear in ascending order")];wu(q[0].zoom)!==s&&(s=wu(q[0].zoom),o=void 0,i={}),j=j.concat(uf({key:`${W}[0]`,value:q[0],valueSpec:{zoom:{}},validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec,objectElementValidators:{zoom:VE,value:B}}))}else j=j.concat(B({key:`${W}[0]`,value:q[0],valueSpec:{},validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec},q));return Lv(eg(q[1]))?j.concat([new xr(`${W}[1]`,q[1],"expressions are not allowed in function stops.")]):j.concat(U.validateSpec({key:`${W}[1]`,value:q[1],valueSpec:t,validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec}))}function B(U,j){const q=Fa(U.value),W=wu(U.value),ee=U.value!==null?U.value:j;if(!n)n=q;else if(q!==n)return[new xr(U.key,ee,`${q} stop domain type must match previous stop domain type ${n}`)];if(q!=="number"&&q!=="string"&&q!=="boolean")return[new xr(U.key,ee,"stop domain value must be a number, string, or boolean")];if(q!=="number"&&e!=="categorical"){let J=`number expected, ${q} found`;return jC(t)&&e===void 0&&(J+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xr(U.key,ee,J)]}return e==="categorical"&&q==="number"&&(!isFinite(W)||Math.floor(W)!==W)?[new xr(U.key,ee,`integer expected, found ${W}`)]:e!=="categorical"&&q==="number"&&o!==void 0&&W<o?[new xr(U.key,ee,"stop domain values must appear in ascending order")]:(o=W,e==="categorical"&&W in i?[new xr(U.key,ee,"stop domain values must be unique")]:(i[W]=!0,[]))}function P(U){return U.validateSpec({key:U.key,value:U.value,valueSpec:t,validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec})}}function K1(r){const t=(r.expressionContext==="property"?GE:NE)(eg(r.value),r.valueSpec);if(t.result==="error")return t.value.map(n=>new xr(`${r.key}${n.key}`,r.value,n.message));const e=t.value.expression||t.value._styleExpression.expression;if(r.expressionContext==="property"&&r.propertyKey==="text-font"&&!e.outputDefined())return[new xr(r.key,r.value,`Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];if(r.expressionContext==="property"&&r.propertyType==="layout"&&!lv(e))return[new xr(r.key,r.value,'"feature-state" data expressions are not supported with layout properties.')];if(r.expressionContext==="filter"&&!lv(e))return[new xr(r.key,r.value,'"feature-state" data expressions are not supported with filters.')];if(r.expressionContext&&r.expressionContext.indexOf("cluster")===0){if(!Zb(e,["zoom","feature-state"]))return[new xr(r.key,r.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(r.expressionContext==="cluster-initial"&&!Hb(e))return[new xr(r.key,r.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function cq(r){const t=r.value,e=r.key,n=Fa(t);return n!=="boolean"?[new xr(e,t,`boolean expected, ${n} found`)]:[]}function dq(r){const t=r.key,e=r.value,n=Fa(e);return n!=="string"?[new xr(t,e,`color expected, ${n} found`)]:Kl.parse(String(e))?[]:[new xr(t,e,`color expected, "${e}" found`)]}function Av(r){const t=r.key,e=r.value,n=r.valueSpec,i=[];return Array.isArray(n.values)?n.values.indexOf(wu(e))===-1&&i.push(new xr(t,e,`expected one of [${n.values.join(", ")}], ${JSON.stringify(e)} found`)):Object.keys(n.values).indexOf(wu(e))===-1&&i.push(new xr(t,e,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(e)} found`)),i}function HE(r){return Xb(eg(r.value))?K1(P1({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):dD(r)}function dD(r){const t=r.value,e=r.key;if(Fa(t)!=="array")return[new xr(e,t,`array expected, ${Fa(t)} found`)];const n=r.styleSpec;let i,o=[];if(t.length<1)return[new xr(e,t,"filter array must have at least 1 element")];switch(o=o.concat(Av({key:`${e}[0]`,value:t[0],valueSpec:n.filter_operator,style:r.style,styleSpec:r.styleSpec})),wu(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&wu(t[1])==="$type"&&o.push(new xr(e,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&o.push(new xr(e,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(i=Fa(t[1]),i!=="string"&&o.push(new xr(`${e}[1]`,t[1],`string expected, ${i} found`)));for(let s=2;s<t.length;s++)i=Fa(t[s]),wu(t[1])==="$type"?o=o.concat(Av({key:`${e}[${s}]`,value:t[s],valueSpec:n.geometry_type,style:r.style,styleSpec:r.styleSpec})):i!=="string"&&i!=="number"&&i!=="boolean"&&o.push(new xr(`${e}[${s}]`,t[s],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let s=1;s<t.length;s++)o=o.concat(dD({key:`${e}[${s}]`,value:t[s],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":i=Fa(t[1]),t.length!==2?o.push(new xr(e,t,`filter array for "${t[0]}" operator must have 2 elements`)):i!=="string"&&o.push(new xr(`${e}[1]`,t[1],`string expected, ${i} found`));break}return o}function hD(r,t){const e=r.key,n=r.validateSpec,i=r.style,o=r.styleSpec,s=r.value,a=r.objectKey,f=o[`${t}_${r.layerType}`];if(!f)return[];const g=a.match(/^(.*)-transition$/);if(t==="paint"&&g&&f[g[1]]&&f[g[1]].transition)return n({key:e,value:s,valueSpec:o.transition,style:i,styleSpec:o});const b=r.valueSpec||f[a];if(!b)return[new xr(e,s,`unknown property "${a}"`)];let I;if(Fa(s)==="string"&&jC(b)&&!b.tokens&&(I=/^{([^}]+)}$/.exec(s)))return[new xr(e,s,`"${a}" does not support interpolation syntax
|
||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(I[1])} }\`.`)];const S=[];return r.layerType==="symbol"&&(a==="text-field"&&i&&!i.glyphs&&S.push(new xr(e,s,'use of "text-field" requires a style "glyphs" property')),a==="text-font"&&Rv(eg(s))&&wu(s.type)==="identity"&&S.push(new xr(e,s,'"text-font" does not support identity functions'))),S.concat(n({key:r.key,value:s,valueSpec:b,style:i,styleSpec:o,expressionContext:"property",propertyType:t,propertyKey:a}))}function fD(r){return hD(r,"paint")}function pD(r){return hD(r,"layout")}function mD(r){let t=[];const e=r.value,n=r.key,i=r.style,o=r.styleSpec;!e.type&&!e.ref&&t.push(new xr(n,e,'either "type" or "ref" is required'));let s=wu(e.type);const a=wu(e.ref);if(e.id){const f=wu(e.id);for(let g=0;g<r.arrayIndex;g++){const b=i.layers[g];wu(b.id)===f&&t.push(new xr(n,e.id,`duplicate layer id "${e.id}", previously used at line ${b.id.__line__}`))}}if("ref"in e){["type","source","source-layer","filter","layout"].forEach(g=>{g in e&&t.push(new xr(n,e[g],`"${g}" is prohibited for ref layers`))});let f;i.layers.forEach(g=>{wu(g.id)===a&&(f=g)}),f?f.ref?t.push(new xr(n,e.ref,"ref cannot reference another ref layer")):s=wu(f.type):t.push(new xr(n,e.ref,`ref layer "${a}" not found`))}else if(s!=="background")if(!e.source)t.push(new xr(n,e,'missing required property "source"'));else{const f=i.sources&&i.sources[e.source],g=f&&wu(f.type);f?g==="vector"&&s==="raster"?t.push(new xr(n,e.source,`layer "${e.id}" requires a raster source`)):g!=="raster-dem"&&s==="hillshade"?t.push(new xr(n,e.source,`layer "${e.id}" requires a raster-dem source`)):g==="raster"&&s!=="raster"?t.push(new xr(n,e.source,`layer "${e.id}" requires a vector source`)):g==="vector"&&!e["source-layer"]?t.push(new xr(n,e,`layer "${e.id}" must specify a "source-layer"`)):g==="raster-dem"&&s!=="hillshade"?t.push(new xr(n,e.source,"raster-dem source can only be used with layer type 'hillshade'.")):s==="line"&&e.paint&&e.paint["line-gradient"]&&(g!=="geojson"||!f.lineMetrics)&&t.push(new xr(n,e,`layer "${e.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new xr(n,e.source,`source "${e.source}" not found`))}return t=t.concat(uf({key:n,value:e,valueSpec:o.layer,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,objectElementValidators:{"*"(){return[]},type(){return r.validateSpec({key:`${n}.type`,value:e.type,valueSpec:o.layer.type,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,object:e,objectKey:"type"})},filter:HE,layout(f){return uf({layer:e,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*"(g){return pD(P1({layerType:s},g))}}})},paint(f){return uf({layer:e,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*"(g){return fD(P1({layerType:s},g))}}})}}})),t}function tg(r){const t=r.value,e=r.key,n=Fa(t);return n!=="string"?[new xr(e,t,`string expected, ${n} found`)]:[]}function hq(r){var t;const e=(t=r.sourceName)!==null&&t!==void 0?t:"",n=r.value,i=r.styleSpec,o=i.source_raster_dem,s=r.style;let a=[];const f=Fa(n);if(n===void 0)return a;if(f!=="object")return a.push(new xr("source_raster_dem",n,`object expected, ${f} found`)),a;const b=wu(n.encoding)==="custom",I=["redFactor","greenFactor","blueFactor","baseShift"],S=r.value.encoding?`"${r.value.encoding}"`:"Default";for(const B in n)!b&&I.includes(B)?a.push(new xr(B,n[B],`In "${e}": "${B}" is only valid when "encoding" is set to "custom". ${S} encoding found`)):o[B]?a=a.concat(r.validateSpec({key:B,value:n[B],valueSpec:o[B],validateSpec:r.validateSpec,style:s,styleSpec:i})):a.push(new xr(B,n[B],`unknown property "${B}"`));return a}const AI={promoteId:fq};function gD(r){const t=r.value,e=r.key,n=r.styleSpec,i=r.style,o=r.validateSpec;if(!t.type)return[new xr(e,t,'"type" is required')];const s=wu(t.type);let a;switch(s){case"vector":case"raster":return a=uf({key:e,value:t,valueSpec:n[`source_${s.replace("-","_")}`],style:r.style,styleSpec:n,objectElementValidators:AI,validateSpec:o}),a;case"raster-dem":return a=hq({sourceName:e,value:t,style:r.style,styleSpec:n,validateSpec:o}),a;case"geojson":if(a=uf({key:e,value:t,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:o,objectElementValidators:AI}),t.cluster)for(const f in t.clusterProperties){const[g,b]=t.clusterProperties[f],I=typeof g=="string"?[g,["accumulated"],["get",f]]:g;a.push(...K1({key:`${e}.${f}.map`,value:b,validateSpec:o,expressionContext:"cluster-map"})),a.push(...K1({key:`${e}.${f}.reduce`,value:I,validateSpec:o,expressionContext:"cluster-reduce"}))}return a;case"video":return uf({key:e,value:t,valueSpec:n.source_video,style:i,validateSpec:o,styleSpec:n});case"image":return uf({key:e,value:t,valueSpec:n.source_image,style:i,validateSpec:o,styleSpec:n});case"canvas":return[new xr(e,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Av({key:`${e}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:o,styleSpec:n})}}function fq({key:r,value:t}){if(Fa(t)==="string")return tg({key:r,value:t});{const e=[];for(const n in t)e.push(...tg({key:`${r}.${n}`,value:t[n]}));return e}}function yD(r){const t=r.value,e=r.styleSpec,n=e.light,i=r.style;let o=[];const s=Fa(t);if(t===void 0)return o;if(s!=="object")return o=o.concat([new xr("light",t,`object expected, ${s} found`)]),o;for(const a in t){const f=a.match(/^(.*)-transition$/);f&&n[f[1]]&&n[f[1]].transition?o=o.concat(r.validateSpec({key:a,value:t[a],valueSpec:e.transition,validateSpec:r.validateSpec,style:i,styleSpec:e})):n[a]?o=o.concat(r.validateSpec({key:a,value:t[a],valueSpec:n[a],validateSpec:r.validateSpec,style:i,styleSpec:e})):o=o.concat([new xr(a,t[a],`unknown property "${a}"`)])}return o}function vD(r){const t=r.value,e=r.styleSpec,n=e.sky,i=r.style,o=Fa(t);if(t===void 0)return[];if(o!=="object")return[new xr("sky",t,`object expected, ${o} found`)];let s=[];for(const a in t)n[a]?s=s.concat(r.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:e})):s=s.concat([new xr(a,t[a],`unknown property "${a}"`)]);return s}function _D(r){const t=r.value,e=r.styleSpec,n=e.terrain,i=r.style;let o=[];const s=Fa(t);if(t===void 0)return o;if(s!=="object")return o=o.concat([new xr("terrain",t,`object expected, ${s} found`)]),o;for(const a in t)n[a]?o=o.concat(r.validateSpec({key:a,value:t[a],valueSpec:n[a],validateSpec:r.validateSpec,style:i,styleSpec:e})):o=o.concat([new xr(a,t[a],`unknown property "${a}"`)]);return o}function pq(r){return tg(r).length===0?[]:K1(r)}function mq(r){return tg(r).length===0?[]:K1(r)}function gq(r){const t=r.key,e=r.value;if(Fa(e)==="array"){if(e.length<1||e.length>4)return[new xr(t,e,`padding requires 1 to 4 values; ${e.length} values found`)];const i={type:"number"};let o=[];for(let s=0;s<e.length;s++)o=o.concat(r.validateSpec({key:`${t}[${s}]`,value:e[s],validateSpec:r.validateSpec,valueSpec:i}));return o}else return VE({key:t,value:e,valueSpec:{}})}function yq(r){const t=r.key,e=r.value,n=Fa(e),i=r.styleSpec;if(n!=="array"||e.length<1||e.length%2!==0)return[new xr(t,e,"variableAnchorOffsetCollection requires a non-empty array of even length")];let o=[];for(let s=0;s<e.length;s+=2)o=o.concat(Av({key:`${t}[${s}]`,value:e[s],valueSpec:i.layout_symbol["text-anchor"]})),o=o.concat($E({key:`${t}[${s+1}]`,value:e[s+1],valueSpec:{length:2,value:"number"},validateSpec:r.validateSpec,style:r.style,styleSpec:i}));return o}function CD(r){let t=[];const e=r.value,n=r.key;if(Array.isArray(e)){const i=[],o=[];for(const s in e){e[s].id&&i.includes(e[s].id)&&t.push(new xr(n,e,`all the sprites' ids must be unique, but ${e[s].id} is duplicated`)),i.push(e[s].id),e[s].url&&o.includes(e[s].url)&&t.push(new xr(n,e,`all the sprites' URLs must be unique, but ${e[s].url} is duplicated`)),o.push(e[s].url);const a={id:{type:"string",required:!0},url:{type:"string",required:!0}};t=t.concat(uf({key:`${n}[${s}]`,value:e[s],valueSpec:a,validateSpec:r.validateSpec}))}return t}else return tg({key:n,value:e})}function vq(r){const t=r.value,e=r.styleSpec,n=e.projection,i=r.style,o=Fa(t);if(t===void 0)return[];if(o!=="object")return[new xr("projection",t,`object expected, ${o} found`)];let s=[];for(const a in t)n[a]?s=s.concat(r.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:e})):s=s.concat([new xr(a,t[a],`unknown property "${a}"`)]);return s}function _q(r){const t=r.key;let e=r.value;e=e instanceof String?e.valueOf():e;const n=Fa(e);return n==="array"&&!bq(e)&&!Cq(e)?[new xr(t,e,`projection expected, invalid array ${JSON.stringify(e)} found`)]:["array","string"].includes(n)?[]:[new xr(t,e,`projection expected, invalid type "${n}" found`)]}function Cq(r){return!!["interpolate","step","literal"].includes(r[0])}function bq(r){return Array.isArray(r)&&r.length===3&&typeof r[0]=="string"&&typeof r[1]=="string"&&typeof r[2]=="number"}const cI={"*"(){return[]},array:$E,boolean:cq,number:VE,color:dq,constants:AD,enum:Av,filter:HE,function:cD,layer:mD,object:uf,source:gD,light:yD,sky:vD,terrain:_D,projection:vq,projectionDefinition:_q,string:tg,formatted:pq,resolvedImage:mq,padding:gq,variableAnchorOffsetCollection:yq,sprite:CD};function Vy(r){const t=r.value,e=r.valueSpec,n=r.styleSpec;return r.validateSpec=Vy,e.expression&&Rv(wu(t))?cD(r):e.expression&&Lv(eg(t))?K1(r):e.type&&cI[e.type]?cI[e.type](r):uf(P1({},r,{valueSpec:e.type?n[e.type]:e}))}function bD(r){const t=r.value,e=r.key,n=tg(r);return n.length||(t.indexOf("{fontstack}")===-1&&n.push(new xr(e,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&n.push(new xr(e,t,'"glyphs" url must include a "{range}" token'))),n}function pf(r,t=Qa){let e=[];return e=e.concat(Vy({key:"",value:r,valueSpec:t.$root,styleSpec:t,style:r,validateSpec:Vy,objectElementValidators:{glyphs:bD,"*"(){return[]}}})),r.constants&&(e=e.concat(AD({key:"constants",value:r.constants,style:r,styleSpec:t,validateSpec:Vy}))),xD(e)}pf.source=Kp(Pp(gD));pf.sprite=Kp(Pp(CD));pf.glyphs=Kp(Pp(bD));pf.light=Kp(Pp(yD));pf.sky=Kp(Pp(vD));pf.terrain=Kp(Pp(_D));pf.layer=Kp(Pp(mD));pf.filter=Kp(Pp(HE));pf.paintProperty=Kp(Pp(fD));pf.layoutProperty=Kp(Pp(pD));function Pp(r){return function(t){return r({...t,validateSpec:Vy})}}function xD(r){return[].concat(r).sort((t,e)=>t.line-e.line)}function Kp(r){return function(...t){return xD(r.apply(this,t))}}const xq=/("(?:[^\\"]|\\.)*")|[:,]/g;function wq(r,t={}){const e=JSON.stringify([1],void 0,t.indent===void 0?2:t.indent).slice(2,-3),n=e===""?1/0:t.maxLength===void 0?80:t.maxLength;let{replacer:i}=t;return function o(s,a,f){s&&typeof s.toJSON=="function"&&(s=s.toJSON());const g=JSON.stringify(s,i);if(g===void 0)return g;const b=n-a.length-f;if(g.length<=b){const I=g.replace(xq,(S,B)=>B||`${S} `);if(I.length<=b)return I}if(i!=null&&(s=JSON.parse(g),i=void 0),typeof s=="object"&&s!==null){const I=a+e,S=[];let B=0,P,U;if(Array.isArray(s)){P="[",U="]";const{length:j}=s;for(;B<j;B++)S.push(o(s[B],I,B===j-1?0:1)||"null")}else{P="{",U="}";const j=Object.keys(s),{length:q}=j;for(;B<q;B++){const W=j[B],ee=`${JSON.stringify(W)}: `,J=o(s[W],I,ee.length+(B===q-1?0:1));J!==void 0&&S.push(ee+J)}}if(S.length>0)return[P,e+S.join(`,
|
||
${I}`),U].join(`
|
||
${a}`)}return g}(r,"",0)}function dI(r,t){const e={};for(const n in t)r[n]!==void 0&&(e[n]=r[n]);for(const n in r)e[n]===void 0&&(e[n]=r[n]);return e}function wD(r,t=2){return r=dI(r,Qa.$root),r.layers&&(r.layers=r.layers.map(e=>dI(e,Qa.layer))),wq(r,{indent:t})}function Ix(r,t){for(const e in r)e.indexOf("layout")===0&&t(r[e],e)}function hI(r,t){for(const e in r)e.indexOf("paint")===0&&t(r[e],e)}function wS(r,t){return typeof t=="string"&&t[0]==="@"?wS(r,r.constants[t]):t}function Mq(r){return Array.isArray(r.stops)}function vy(r,t,e){r[e]=r[t],delete r[t]}function Sq(r){r.version=8,Aq(r,i=>{i.type==="video"&&i.url!==void 0&&vy(i,"url","urls"),i.type==="video"&&i.coordinates.forEach(o=>o.reverse())}),$y(r,i=>{Ix(i,o=>{o["symbol-min-distance"]!==void 0&&vy(o,"symbol-min-distance","symbol-spacing")}),hI(i,o=>{o["background-image"]!==void 0&&vy(o,"background-image","background-pattern"),o["line-image"]!==void 0&&vy(o,"line-image","line-pattern"),o["fill-image"]!==void 0&&vy(o,"fill-image","fill-pattern")})}),YE(r,{paint:!0,layout:!0},i=>{const o=wS(r,i.value);Mq(o)&&o.stops.forEach(s=>{s[1]=wS(r,s[1])}),i.set(o)}),delete r.constants,$y(r,i=>{Ix(i,o=>{delete o["text-max-size"],delete o["icon-max-size"]}),hI(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 t(i){function o(s){return s.split(",").map(a=>a.trim())}if(Array.isArray(i))return i;if(typeof i=="string")return o(i);if(typeof i=="object")return i.stops.forEach(s=>{s[1]=o(s[1])}),i;throw new Error("unexpected font value")}$y(r,i=>{Ix(i,o=>{o["text-font"]&&(o["text-font"]=t(o["text-font"]))})});let e=0;for(let i=r.layers.length-1;i>=0;i--)if(r.layers[i].type!=="symbol"){e=i+1;break}const n=r.layers.splice(e);return n.reverse(),r.layers=r.layers.concat(n),r}function Eq(r){const t=[];return $y(r,e=>{e.filter&&(e.filter=Yy(e.filter))}),YE(r,{paint:!0,layout:!0},({path:e,value:n,reference:i,set:o})=>{Lv(n)||(typeof n=="object"&&!Array.isArray(n)?(o(lD(n,i)),t.push(e.join("."))):i.tokens&&typeof n=="string"&&o(uD(n)))}),r}function Oq(r){return JSON.parse(Bq(JSON.stringify(r)))}function Bq(r){return r.replace(/"hsla?\((.+?)\)"/gi,(t,e)=>{const n=e.match(/^(.+?)\s*,\s*(.+?)\s*,\s*(.+?)(?:\s*,\s*(.+))?$/i);if(n){let[i,o,s,a]=n.slice(1);return[o,s]=[o,s].map(f=>f.endsWith("%")?f:`${parseFloat(f)*100}%`),`"hsl${typeof a=="string"?"a":""}(${[i,o,s,a].filter(Boolean).join(",")})"`}return t})}function Iq(r){let t=!1;if(r.version===7&&(r=Sq(r),t=!0),r.version===8&&(t=!!Eq(r),t=!0),YE(r,{paint:!0,layout:!0},({value:e,reference:n,set:i})=>{n.type==="color"&&i(Oq(e))}),!t)throw new Error(`Cannot migrate from ${r.version}`);return r}const kq={StyleExpression:oD,StylePropertyFunction:aD,ZoomConstantExpression:CS,ZoomDependentExpression:bS,createExpression:NE,createPropertyExpression:GE,isExpression:Lv,isExpressionFilter:Xb,isZoomExpression:JQ,normalizePropertyExpression:eq},Tq={convertFunction:lD,createFunction:zE,isFunction:Rv};var Jb=Tv();const Pq=us(Jb);var mC={exports:{}};/**
|
||
* MapLibre GL JS
|
||
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.0.1/LICENSE.txt
|
||
*/var Kq=mC.exports,fI;function Rq(){return fI||(fI=1,function(r,t){(function(e,n){r.exports=n()})(Kq,function(){var e={},n={};function i(s,a,f){if(n[s]=f,s==="index"){var g="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",b={};return n.shared(b),n.index(e,b),typeof window<"u"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([g],{type:"text/javascript"}))),e}}i("shared",["exports"],function(s){function a(h,u,d,v){return new(d||(d=Promise))(function(w,D){function F(ie){try{Z(v.next(ie))}catch(ce){D(ce)}}function N(ie){try{Z(v.throw(ie))}catch(ce){D(ce)}}function Z(ie){var ce;ie.done?w(ie.value):(ce=ie.value,ce instanceof d?ce:new d(function(Ce){Ce(ce)})).then(F,N)}Z((v=v.apply(h,u||[])).next())})}function f(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var g,b;function I(){if(b)return g;function h(u,d){this.x=u,this.y=d}return b=1,g=h,h.prototype={clone:function(){return new h(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,d){return this.clone()._rotateAround(u,d)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var d=u.x-this.x,v=u.y-this.y;return d*d+v*v},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,d){return Math.atan2(this.x*d-this.y*u,this.x*u+this.y*d)},_matMult:function(u){var d=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=d,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var d=Math.cos(u),v=Math.sin(u),w=v*this.x+d*this.y;return this.x=d*this.x-v*this.y,this.y=w,this},_rotateAround:function(u,d){var v=Math.cos(u),w=Math.sin(u),D=d.y+w*(this.x-d.x)+v*(this.y-d.y);return this.x=d.x+v*(this.x-d.x)-w*(this.y-d.y),this.y=D,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},h.convert=function(u){return u instanceof h?u:Array.isArray(u)?new h(u[0],u[1]):u},g}typeof SuppressedError=="function"&&SuppressedError;var S,B,P=f(I()),U=function(){if(B)return S;function h(u,d,v,w){this.cx=3*u,this.bx=3*(v-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*d,this.by=3*(w-d)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=d,this.p2x=v,this.p2y=w}return B=1,S=h,h.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,d){if(d===void 0&&(d=1e-6),u<0)return 0;if(u>1)return 1;for(var v=u,w=0;w<8;w++){var D=this.sampleCurveX(v)-u;if(Math.abs(D)<d)return v;var F=this.sampleCurveDerivativeX(v);if(Math.abs(F)<1e-6)break;v-=D/F}var N=0,Z=1;for(v=u,w=0;w<20&&(D=this.sampleCurveX(v),!(Math.abs(D-u)<d));w++)u>D?N=v:Z=v,v=.5*(Z-N)+N;return v},solve:function(u,d){return this.sampleCurveY(this.solveCurveX(u,d))}},S}(),j=f(U);let q,W;function ee(){return q==null&&(q=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),q}function J(){if(W==null&&(W=!1,ee())){const u=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(u){for(let v=0;v<5*5;v++){const w=4*v;u.fillStyle=`rgb(${w},${w+1},${w+2})`,u.fillRect(v%5,Math.floor(v/5),1,1)}const d=u.getImageData(0,0,5,5).data;for(let v=0;v<5*5*4;v++)if(v%4!=3&&d[v]!==v){W=!0;break}}}return W||!1}var $,X=1e-6,G=typeof Float32Array<"u"?Float32Array:Array;function ae(){var h=new G(9);return G!=Float32Array&&(h[1]=0,h[2]=0,h[3]=0,h[5]=0,h[6]=0,h[7]=0),h[0]=1,h[4]=1,h[8]=1,h}function ge(h){return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=1,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,h}function he(){var h=new G(3);return G!=Float32Array&&(h[0]=0,h[1]=0,h[2]=0),h}function Ie(h,u,d){var v=new G(3);return v[0]=h,v[1]=u,v[2]=d,v}function re(h,u,d){var v=u[0],w=u[1],D=u[2],F=u[3];return h[0]=d[0]*v+d[4]*w+d[8]*D+d[12]*F,h[1]=d[1]*v+d[5]*w+d[9]*D+d[13]*F,h[2]=d[2]*v+d[6]*w+d[10]*D+d[14]*F,h[3]=d[3]*v+d[7]*w+d[11]*D+d[15]*F,h}function oe(){var h=new G(4);return G!=Float32Array&&(h[0]=0,h[1]=0,h[2]=0),h[3]=1,h}function Se(){var h=new G(2);return G!=Float32Array&&(h[0]=0,h[1]=0),h}function ye(h,u){var d=new G(2);return d[0]=h,d[1]=u,d}Math.hypot||(Math.hypot=function(){for(var h=0,u=arguments.length;u--;)h+=arguments[u]*arguments[u];return Math.sqrt(h)}),he(),$=new G(4),G!=Float32Array&&($[0]=0,$[1]=0,$[2]=0,$[3]=0),he(),Ie(1,0,0),Ie(0,1,0),oe(),oe(),ae(),Se();const nt=8192;function Ne(h,u,d){return u*(nt/(h.tileSize*Math.pow(2,d-h.tileID.overscaledZ)))}function je(h,u){return(h%u+u)%u}function et(h,u,d){return h*(1-d)+u*d}function Ue(h){if(h<=0)return 0;if(h>=1)return 1;const u=h*h,d=u*h;return 4*(h<.5?d:3*(h-u)+d-.75)}function ke(h,u,d,v){const w=new j(h,u,d,v);return D=>w.solve(D)}const We=ke(.25,.1,.25,1);function vt(h,u,d){return Math.min(d,Math.max(u,h))}function Pt(h,u,d){const v=d-u,w=((h-u)%v+v)%v+u;return w===u?d:w}function ut(h,...u){for(const d of u)for(const v in d)h[v]=d[v];return h}let jt=1;function Rt(h,u,d){const v={};for(const w in h)v[w]=u.call(this,h[w],w,h);return v}function Ke(h,u,d){const v={};for(const w in h)u.call(this,h[w],w,h)&&(v[w]=h[w]);return v}function we(h){return Array.isArray(h)?h.map(we):typeof h=="object"&&h?Rt(h,we):h}const Fe={};function tt(h){Fe[h]||(typeof console<"u"&&console.warn(h),Fe[h]=!0)}function mt(h,u,d){return(d.y-h.y)*(u.x-h.x)>(u.y-h.y)*(d.x-h.x)}function bt(h){return typeof WorkerGlobalScope<"u"&&h!==void 0&&h instanceof WorkerGlobalScope}let Lt=null;function Vt(h){return typeof ImageBitmap<"u"&&h instanceof ImageBitmap}const rn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Sn(h,u,d,v,w){return a(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const D=new VideoFrame(h,{timestamp:0});try{const F=D==null?void 0:D.format;if(!F||!F.startsWith("BGR")&&!F.startsWith("RGB"))throw new Error(`Unrecognized format ${F}`);const N=F.startsWith("BGR"),Z=new Uint8ClampedArray(v*w*4);if(yield D.copyTo(Z,function(ie,ce,Ce,Pe,De){const ze=4*Math.max(1,0),Ze=(Math.max(0,Ce)-Ce)*Pe*4+ze,lt=4*Pe,yt=Math.max(0,ce),Nt=Math.max(0,Ce);return{rect:{x:yt,y:Nt,width:Math.min(ie.width,ce+Pe)-yt,height:Math.min(ie.height,Ce+De)-Nt},layout:[{offset:Ze,stride:lt}]}}(h,u,d,v,w)),N)for(let ie=0;ie<Z.length;ie+=4){const ce=Z[ie];Z[ie]=Z[ie+2],Z[ie+2]=ce}return Z}finally{D.close()}})}let Ar,Bn;function ar(h){return h/Math.PI*180}const Cr="AbortError";function br(){return new Error(Cr)}const _r={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Jr(h){return _r.REGISTERED_PROTOCOLS[h.substring(0,h.indexOf("://"))]}const wr="global-dispatcher";class hi extends Error{constructor(u,d,v,w){super(`AJAXError: ${d} (${u}): ${v}`),this.status=u,this.statusText=d,this.url=v,this.body=w}}const Ye=()=>bt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,de=function(h,u){if(/:\/\//.test(h.url)&&!/^https?:|^file:/.test(h.url)){const v=Jr(h.url);if(v)return v(h,u);if(bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:h,targetMapId:wr},u)}if(!(/^file:/.test(d=h.url)||/^file:/.test(Ye())&&!/^\w+:/.test(d))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(v,w){return a(this,void 0,void 0,function*(){const D=new Request(v.url,{method:v.method||"GET",body:v.body,credentials:v.credentials,headers:v.headers,cache:v.cache,referrer:Ye(),signal:w.signal});let F,N;v.type!=="json"||D.headers.has("Accept")||D.headers.set("Accept","application/json");try{F=yield fetch(D)}catch(ie){throw new hi(0,ie.message,v.url,new Blob)}if(!F.ok){const ie=yield F.blob();throw new hi(F.status,F.statusText,v.url,ie)}N=v.type==="arrayBuffer"||v.type==="image"?F.arrayBuffer():v.type==="json"?F.json():F.text();const Z=yield N;if(w.signal.aborted)throw br();return{data:Z,cacheControl:F.headers.get("Cache-Control"),expires:F.headers.get("Expires")}})}(h,u);if(bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:h,mustQueue:!0,targetMapId:wr},u)}var d;return function(v,w){return new Promise((D,F)=>{var N;const Z=new XMLHttpRequest;Z.open(v.method||"GET",v.url,!0),v.type!=="arrayBuffer"&&v.type!=="image"||(Z.responseType="arraybuffer");for(const ie in v.headers)Z.setRequestHeader(ie,v.headers[ie]);v.type==="json"&&(Z.responseType="text",!((N=v.headers)===null||N===void 0)&&N.Accept||Z.setRequestHeader("Accept","application/json")),Z.withCredentials=v.credentials==="include",Z.onerror=()=>{F(new Error(Z.statusText))},Z.onload=()=>{if(!w.signal.aborted)if((Z.status>=200&&Z.status<300||Z.status===0)&&Z.response!==null){let ie=Z.response;if(v.type==="json")try{ie=JSON.parse(Z.response)}catch(ce){return void F(ce)}D({data:ie,cacheControl:Z.getResponseHeader("Cache-Control"),expires:Z.getResponseHeader("Expires")})}else{const ie=new Blob([Z.response],{type:Z.getResponseHeader("Content-Type")});F(new hi(Z.status,Z.statusText,v.url,ie))}},w.signal.addEventListener("abort",()=>{Z.abort(),F(br())}),Z.send(v.body)})}(h,u)};function pe(h){if(!h||h.indexOf("://")<=0||h.indexOf("data:image/")===0||h.indexOf("blob:")===0)return!0;const u=new URL(h),d=window.location;return u.protocol===d.protocol&&u.host===d.host}function Je(h,u,d){d[h]&&d[h].indexOf(u)!==-1||(d[h]=d[h]||[],d[h].push(u))}function kt(h,u,d){if(d&&d[h]){const v=d[h].indexOf(u);v!==-1&&d[h].splice(v,1)}}class Xt{constructor(u,d={}){ut(this,d),this.type=u}}class it extends Xt{constructor(u,d={}){super("error",ut({error:u},d))}}class Ut{on(u,d){return this._listeners=this._listeners||{},Je(u,d,this._listeners),{unsubscribe:()=>{this.off(u,d)}}}off(u,d){return kt(u,d,this._listeners),kt(u,d,this._oneTimeListeners),this}once(u,d){return d?(this._oneTimeListeners=this._oneTimeListeners||{},Je(u,d,this._oneTimeListeners),this):new Promise(v=>this.once(u,v))}fire(u,d){typeof u=="string"&&(u=new Xt(u,d||{}));const v=u.type;if(this.listens(v)){u.target=this;const w=this._listeners&&this._listeners[v]?this._listeners[v].slice():[];for(const N of w)N.call(this,u);const D=this._oneTimeListeners&&this._oneTimeListeners[v]?this._oneTimeListeners[v].slice():[];for(const N of D)kt(v,N,this._oneTimeListeners),N.call(this,u);const F=this._eventedParent;F&&(ut(u,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),F.fire(u))}else u instanceof it&&console.error(u.error);return this}listens(u){return this._listeners&&this._listeners[u]&&this._listeners[u].length>0||this._oneTimeListeners&&this._oneTimeListeners[u]&&this._oneTimeListeners[u].length>0||this._eventedParent&&this._eventedParent.listens(u)}setEventedParent(u,d){return this._eventedParent=u,this._eventedParentData=d,this}}var qe={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_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 fe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function xe(h,u){const d={};for(const v in h)v!=="ref"&&(d[v]=h[v]);return fe.forEach(v=>{v in u&&(d[v]=u[v])}),d}function p(h,u){if(Array.isArray(h)){if(!Array.isArray(u)||h.length!==u.length)return!1;for(let d=0;d<h.length;d++)if(!p(h[d],u[d]))return!1;return!0}if(typeof h=="object"&&h!==null&&u!==null){if(typeof u!="object"||Object.keys(h).length!==Object.keys(u).length)return!1;for(const d in h)if(!p(h[d],u[d]))return!1;return!0}return h===u}function Qe(h,u){h.push(u)}function pt(h,u,d){Qe(d,{command:"addSource",args:[h,u[h]]})}function ft(h,u,d){Qe(u,{command:"removeSource",args:[h]}),d[h]=!0}function Et(h,u,d,v){ft(h,d,v),pt(h,u,d)}function Ct(h,u,d){let v;for(v in h[d])if(Object.prototype.hasOwnProperty.call(h[d],v)&&v!=="data"&&!p(h[d][v],u[d][v]))return!1;for(v in u[d])if(Object.prototype.hasOwnProperty.call(u[d],v)&&v!=="data"&&!p(h[d][v],u[d][v]))return!1;return!0}function nn(h,u,d,v,w,D){h=h||{},u=u||{};for(const F in h)Object.prototype.hasOwnProperty.call(h,F)&&(p(h[F],u[F])||d.push({command:D,args:[v,F,u[F],w]}));for(const F in u)Object.prototype.hasOwnProperty.call(u,F)&&!Object.prototype.hasOwnProperty.call(h,F)&&(p(h[F],u[F])||d.push({command:D,args:[v,F,u[F],w]}))}function Yt(h){return h.id}function Gt(h,u){return h[u.id]=u,h}class wt{constructor(u,d,v,w){this.message=(u?`${u}: `:"")+v,w&&(this.identifier=w),d!=null&&d.__line__&&(this.line=d.__line__)}}function Tn(h,...u){for(const d of u)for(const v in d)h[v]=d[v];return h}class En extends Error{constructor(u,d){super(d),this.message=d,this.key=u}}class sr{constructor(u,d=[]){this.parent=u,this.bindings={};for(const[v,w]of d)this.bindings[v]=w}concat(u){return new sr(this,u)}get(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error(`${u} not found in scope.`)}has(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}const Pr={kind:"null"},an={kind:"number"},Wn={kind:"string"},ir={kind:"boolean"},zr={kind:"color"},fr={kind:"projectionDefinition"},hr={kind:"object"},zn={kind:"value"},Pi={kind:"collator"},po={kind:"formatted"},ri={kind:"padding"},Xr={kind:"resolvedImage"},ii={kind:"variableAnchorOffsetCollection"};function mo(h,u){return{kind:"array",itemType:h,N:u}}function Mi(h){if(h.kind==="array"){const u=Mi(h.itemType);return typeof h.N=="number"?`array<${u}, ${h.N}>`:h.itemType.kind==="value"?"array":`array<${u}>`}return h.kind}const ka=[Pr,an,Wn,ir,zr,fr,po,hr,mo(zn),ri,Xr,ii];function ns(h,u){if(u.kind==="error")return null;if(h.kind==="array"){if(u.kind==="array"&&(u.N===0&&u.itemType.kind==="value"||!ns(h.itemType,u.itemType))&&(typeof h.N!="number"||h.N===u.N))return null}else{if(h.kind===u.kind)return null;if(h.kind==="value"){for(const d of ka)if(!ns(d,u))return null}}return`Expected ${Mi(h)} but found ${Mi(u)} instead.`}function wo(h,u){return u.some(d=>d.kind===h.kind)}function Ua(h,u){return u.some(d=>d==="null"?h===null:d==="array"?Array.isArray(h):d==="object"?h&&!Array.isArray(h)&&typeof h=="object":d===typeof h)}function Ya(h,u){return h.kind==="array"&&u.kind==="array"?h.itemType.kind===u.itemType.kind&&typeof h.N=="number":h.kind===u.kind}const Vi=.96422,Rl=.82521,Ps=4/29,ki=6/29,Mr=3*ki*ki,ms=ki*ki*ki,oa=Math.PI/180,ba=180/Math.PI;function Ge(h){return(h%=360)<0&&(h+=360),h}function _t([h,u,d,v]){let w,D;const F=jn((.2225045*(h=cn(h))+.7168786*(u=cn(u))+.0606169*(d=cn(d)))/1);h===u&&u===d?w=D=F:(w=jn((.4360747*h+.3850649*u+.1430804*d)/Vi),D=jn((.0139322*h+.0971045*u+.7141733*d)/Rl));const N=116*F-16;return[N<0?0:N,500*(w-F),200*(F-D),v]}function cn(h){return h<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}function jn(h){return h>ms?Math.pow(h,1/3):h/Mr+Ps}function An([h,u,d,v]){let w=(h+16)/116,D=isNaN(u)?w:w+u/500,F=isNaN(d)?w:w-d/200;return w=1*_i(w),D=Vi*_i(D),F=Rl*_i(F),[Qn(3.1338561*D-1.6168667*w-.4906146*F),Qn(-.9787684*D+1.9161415*w+.033454*F),Qn(.0719453*D-.2289914*w+1.4052427*F),v]}function Qn(h){return(h=h<=.00304?12.92*h:1.055*Math.pow(h,1/2.4)-.055)<0?0:h>1?1:h}function _i(h){return h>ki?h*h*h:Mr*(h-Ps)}function Ki(h){return parseInt(h.padEnd(2,h),16)/255}function Xi(h,u){return aa(u?h/100:h,0,1)}function aa(h,u,d){return Math.min(Math.max(u,h),d)}function Mu(h){return!h.some(Number.isNaN)}const Hr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function ci(h,u,d){return h+d*(u-h)}function rs(h,u,d){return h.map((v,w)=>ci(v,u[w],d))}class Ai{constructor(u,d,v,w=1,D=!0){this.r=u,this.g=d,this.b=v,this.a=w,D||(this.r*=w,this.g*=w,this.b*=w,w||this.overwriteGetter("rgb",[u,d,v,w]))}static parse(u){if(u instanceof Ai)return u;if(typeof u!="string")return;const d=function(v){if((v=v.toLowerCase().trim())==="transparent")return[0,0,0,0];const w=Hr[v];if(w){const[F,N,Z]=w;return[F/255,N/255,Z/255,1]}if(v.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(v)){const F=v.length<6?1:2;let N=1;return[Ki(v.slice(N,N+=F)),Ki(v.slice(N,N+=F)),Ki(v.slice(N,N+=F)),Ki(v.slice(N,N+F)||"ff")]}if(v.startsWith("rgb")){const F=v.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(F){const[N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt,Nt]=F,Mt=[ce||" ",De||" ",lt].join("");if(Mt===" "||Mt===" /"||Mt===",,"||Mt===",,,"){const Re=[ie,Pe,Ze].join(""),at=Re==="%%%"?100:Re===""?255:0;if(at){const Ot=[aa(+Z/at,0,1),aa(+Ce/at,0,1),aa(+ze/at,0,1),yt?Xi(+yt,Nt):1];if(Mu(Ot))return Ot}}return}}const D=v.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(D){const[F,N,Z,ie,ce,Ce,Pe,De,ze]=D,Ze=[Z||" ",ce||" ",Pe].join("");if(Ze===" "||Ze===" /"||Ze===",,"||Ze===",,,"){const lt=[+N,aa(+ie,0,100),aa(+Ce,0,100),De?Xi(+De,ze):1];if(Mu(lt))return function([yt,Nt,Mt,Re]){function at(Ot){const un=(Ot+yt/30)%12,Fn=Nt*Math.min(Mt,1-Mt);return Mt-Fn*Math.max(-1,Math.min(un-3,9-un,1))}return yt=Ge(yt),Nt/=100,Mt/=100,[at(0),at(8),at(4),Re]}(lt)}}}(u);return d?new Ai(...d,!1):void 0}get rgb(){const{r:u,g:d,b:v,a:w}=this,D=w||1/0;return this.overwriteGetter("rgb",[u/D,d/D,v/D,w])}get hcl(){return this.overwriteGetter("hcl",function(u){const[d,v,w,D]=_t(u),F=Math.sqrt(v*v+w*w);return[Math.round(1e4*F)?Ge(Math.atan2(w,v)*ba):NaN,F,d,D]}(this.rgb))}get lab(){return this.overwriteGetter("lab",_t(this.rgb))}overwriteGetter(u,d){return Object.defineProperty(this,u,{value:d}),d}toString(){const[u,d,v,w]=this.rgb;return`rgba(${[u,d,v].map(D=>Math.round(255*D)).join(",")},${w})`}static interpolate(u,d,v,w="rgb"){switch(w){case"rgb":{const[D,F,N,Z]=rs(u.rgb,d.rgb,v);return new Ai(D,F,N,Z,!1)}case"hcl":{const[D,F,N,Z]=u.hcl,[ie,ce,Ce,Pe]=d.hcl;let De,ze;if(isNaN(D)||isNaN(ie))isNaN(D)?isNaN(ie)?De=NaN:(De=ie,N!==1&&N!==0||(ze=ce)):(De=D,Ce!==1&&Ce!==0||(ze=F));else{let Mt=ie-D;ie>D&&Mt>180?Mt-=360:ie<D&&D-ie>180&&(Mt+=360),De=D+v*Mt}const[Ze,lt,yt,Nt]=function([Mt,Re,at,Ot]){return Mt=isNaN(Mt)?0:Mt*oa,An([at,Math.cos(Mt)*Re,Math.sin(Mt)*Re,Ot])}([De,ze??ci(F,ce,v),ci(N,Ce,v),ci(Z,Pe,v)]);return new Ai(Ze,lt,yt,Nt,!1)}case"lab":{const[D,F,N,Z]=An(rs(u.lab,d.lab,v));return new Ai(D,F,N,Z,!1)}}}}Ai.black=new Ai(0,0,0,1),Ai.white=new Ai(1,1,1,1),Ai.transparent=new Ai(0,0,0,0),Ai.red=new Ai(1,0,0,1);class As{constructor(u,d,v){this.sensitivity=u?d?"variant":"case":d?"accent":"base",this.locale=v,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,d){return this.collator.compare(u,d)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ju{constructor(u,d,v,w,D){this.text=u,this.image=d,this.scale=v,this.fontStack=w,this.textColor=D}}class sa{constructor(u){this.sections=u}static fromString(u){return new sa([new Ju(u,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(u=>u.text.length!==0||u.image&&u.image.name.length!==0)}static factory(u){return u instanceof sa?u:sa.fromString(u)}toString(){return this.sections.length===0?"":this.sections.map(u=>u.text).join("")}}class kr{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof kr)return u;if(typeof u=="number")return new kr([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const d of u)if(typeof d!="number")return;switch(u.length){case 1:u=[u[0],u[0],u[0],u[0]];break;case 2:u=[u[0],u[1],u[0],u[1]];break;case 3:u=[u[0],u[1],u[2],u[1]]}return new kr(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,d,v){return new kr(rs(u.values,d.values,v))}}class Oi{constructor(u){this.name="ExpressionEvaluationError",this.message=u}toJSON(){return this.message}}const Qs=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Ta{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Ta)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let d=0;d<u.length;d+=2){const v=u[d],w=u[d+1];if(typeof v!="string"||!Qs.has(v)||!Array.isArray(w)||w.length!==2||typeof w[0]!="number"||typeof w[1]!="number")return}return new Ta(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,d,v){const w=u.values,D=d.values;if(w.length!==D.length)throw new Oi(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${d.toString()}`);const F=[];for(let N=0;N<w.length;N+=2){if(w[N]!==D[N])throw new Oi(`Cannot interpolate values containing mismatched anchors. from[${N}]: ${w[N]}, to[${N}]: ${D[N]}`);F.push(w[N]);const[Z,ie]=w[N+1],[ce,Ce]=D[N+1];F.push([ci(Z,ce,v),ci(ie,Ce,v)])}return new Ta(F)}}class Mo{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new Mo({name:u,available:!1}):null}}class ja{constructor(u,d,v){this.from=u,this.to=d,this.transition=v}static interpolate(u,d,v){return new ja(u,d,v)}static parse(u){return u instanceof ja?u:Array.isArray(u)&&u.length===3&&typeof u[0]=="string"&&typeof u[1]=="string"&&typeof u[2]=="number"?new ja(u[0],u[1],u[2]):typeof u=="object"&&typeof u.from=="string"&&typeof u.to=="string"&&typeof u.transition=="number"?new ja(u.from,u.to,u.transition):typeof u=="string"?new ja(u,u,1):void 0}}function au(h,u,d,v){return typeof h=="number"&&h>=0&&h<=255&&typeof u=="number"&&u>=0&&u<=255&&typeof d=="number"&&d>=0&&d<=255?v===void 0||typeof v=="number"&&v>=0&&v<=1?null:`Invalid rgba value [${[h,u,d,v].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof v=="number"?[h,u,d,v]:[h,u,d]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Dl(h){if(h===null||typeof h=="string"||typeof h=="boolean"||typeof h=="number"||h instanceof ja||h instanceof Ai||h instanceof As||h instanceof sa||h instanceof kr||h instanceof Ta||h instanceof Mo)return!0;if(Array.isArray(h)){for(const u of h)if(!Dl(u))return!1;return!0}if(typeof h=="object"){for(const u in h)if(!Dl(h[u]))return!1;return!0}return!1}function ea(h){if(h===null)return Pr;if(typeof h=="string")return Wn;if(typeof h=="boolean")return ir;if(typeof h=="number")return an;if(h instanceof Ai)return zr;if(h instanceof ja)return fr;if(h instanceof As)return Pi;if(h instanceof sa)return po;if(h instanceof kr)return ri;if(h instanceof Ta)return ii;if(h instanceof Mo)return Xr;if(Array.isArray(h)){const u=h.length;let d;for(const v of h){const w=ea(v);if(d){if(d===w)continue;d=zn;break}d=w}return mo(d||zn,u)}return hr}function $a(h){const u=typeof h;return h===null?"":u==="string"||u==="number"||u==="boolean"?String(h):h instanceof Ai||h instanceof ja||h instanceof sa||h instanceof kr||h instanceof Ta||h instanceof Mo?h.toString():JSON.stringify(h)}class co{constructor(u,d){this.type=u,this.value=d}static parse(u,d){if(u.length!==2)return d.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!Dl(u[1]))return d.error("invalid value");const v=u[1];let w=ea(v);const D=d.expectedType;return w.kind!=="array"||w.N!==0||!D||D.kind!=="array"||typeof D.N=="number"&&D.N!==0||(w=D),new co(w,v)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const pa={string:Wn,number:an,boolean:ir,object:hr};class xa{constructor(u,d){this.type=u,this.args=d}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");let v,w=1;const D=u[0];if(D==="array"){let N,Z;if(u.length>2){const ie=u[1];if(typeof ie!="string"||!(ie in pa)||ie==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);N=pa[ie],w++}else N=zn;if(u.length>3){if(u[2]!==null&&(typeof u[2]!="number"||u[2]<0||u[2]!==Math.floor(u[2])))return d.error('The length argument to "array" must be a positive integer literal',2);Z=u[2],w++}v=mo(N,Z)}else{if(!pa[D])throw new Error(`Types doesn't contain name = ${D}`);v=pa[D]}const F=[];for(;w<u.length;w++){const N=d.parse(u[w],w,zn);if(!N)return null;F.push(N)}return new xa(v,F)}evaluate(u){for(let d=0;d<this.args.length;d++){const v=this.args[d].evaluate(u);if(!ns(this.type,ea(v)))return v;if(d===this.args.length-1)throw new Oi(`Expected value to be of type ${Mi(this.type)}, but found ${Mi(ea(v))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every(u=>u.outputDefined())}}const qs={"to-boolean":ir,"to-color":zr,"to-number":an,"to-string":Wn};class Pa{constructor(u,d){this.type=u,this.args=d}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");const v=u[0];if(!qs[v])throw new Error(`Can't parse ${v} as it is not part of the known types`);if((v==="to-boolean"||v==="to-string")&&u.length!==2)return d.error("Expected one argument.");const w=qs[v],D=[];for(let F=1;F<u.length;F++){const N=d.parse(u[F],F,zn);if(!N)return null;D.push(N)}return new Pa(w,D)}evaluate(u){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(u);case"color":{let d,v;for(const w of this.args){if(d=w.evaluate(u),v=null,d instanceof Ai)return d;if(typeof d=="string"){const D=u.parseColor(d);if(D)return D}else if(Array.isArray(d)&&(v=d.length<3||d.length>4?`Invalid rgba value ${JSON.stringify(d)}: expected an array containing either three or four numeric values.`:au(d[0],d[1],d[2],d[3]),!v))return new Ai(d[0]/255,d[1]/255,d[2]/255,d[3])}throw new Oi(v||`Could not parse color from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"padding":{let d;for(const v of this.args){d=v.evaluate(u);const w=kr.parse(d);if(w)return w}throw new Oi(`Could not parse padding from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"variableAnchorOffsetCollection":{let d;for(const v of this.args){d=v.evaluate(u);const w=Ta.parse(d);if(w)return w}throw new Oi(`Could not parse variableAnchorOffsetCollection from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"number":{let d=null;for(const v of this.args){if(d=v.evaluate(u),d===null)return 0;const w=Number(d);if(!isNaN(w))return w}throw new Oi(`Could not convert ${JSON.stringify(d)} to number.`)}case"formatted":return sa.fromString($a(this.args[0].evaluate(u)));case"resolvedImage":return Mo.fromString($a(this.args[0].evaluate(u)));case"projectionDefinition":return this.args[0].evaluate(u);default:return $a(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every(u=>u.outputDefined())}}const Cl=["Unknown","Point","LineString","Polygon"];class eA{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"?Cl[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(u){let d=this._parseColorCache[u];return d||(d=this._parseColorCache[u]=Ai.parse(u)),d}}class Ji{constructor(u,d,v=[],w,D=new sr,F=[]){this.registry=u,this.path=v,this.key=v.map(N=>`[${N}]`).join(""),this.scope=D,this.errors=F,this.expectedType=w,this._isConstant=d}parse(u,d,v,w,D={}){return d?this.concat(d,v,w)._parse(u,D):this._parse(u,D)}_parse(u,d){function v(w,D,F){return F==="assert"?new xa(D,[w]):F==="coerce"?new Pa(D,[w]):w}if(u!==null&&typeof u!="string"&&typeof u!="boolean"&&typeof u!="number"||(u=["literal",u]),Array.isArray(u)){if(u.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const w=u[0];if(typeof w!="string")return this.error(`Expression name must be a string, but found ${typeof w} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const D=this.registry[w];if(D){let F=D.parse(u,this);if(!F)return null;if(this.expectedType){const N=this.expectedType,Z=F.type;if(N.kind!=="string"&&N.kind!=="number"&&N.kind!=="boolean"&&N.kind!=="object"&&N.kind!=="array"||Z.kind!=="value")if(N.kind!=="projectionDefinition"||Z.kind!=="string"&&Z.kind!=="array")if(N.kind!=="color"&&N.kind!=="formatted"&&N.kind!=="resolvedImage"||Z.kind!=="value"&&Z.kind!=="string")if(N.kind!=="padding"||Z.kind!=="value"&&Z.kind!=="number"&&Z.kind!=="array")if(N.kind!=="variableAnchorOffsetCollection"||Z.kind!=="value"&&Z.kind!=="array"){if(this.checkSubtype(N,Z))return null}else F=v(F,N,d.typeAnnotation||"coerce");else F=v(F,N,d.typeAnnotation||"coerce");else F=v(F,N,d.typeAnnotation||"coerce");else F=v(F,N,d.typeAnnotation||"coerce");else F=v(F,N,d.typeAnnotation||"assert")}if(!(F instanceof co)&&F.type.kind!=="resolvedImage"&&this._isConstant(F)){const N=new eA;try{F=new co(F.type,F.evaluate(N))}catch(Z){return this.error(Z.message),null}}return F}return this.error(`Unknown expression "${w}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(u===void 0?"'undefined' value invalid. Use null instead.":typeof u=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof u} instead.`)}concat(u,d,v){const w=typeof u=="number"?this.path.concat(u):this.path,D=v?this.scope.concat(v):this.scope;return new Ji(this.registry,this._isConstant,w,d||null,D,this.errors)}error(u,...d){const v=`${this.key}${d.map(w=>`[${w}]`).join("")}`;this.errors.push(new En(v,u))}checkSubtype(u,d){const v=ns(u,d);return v&&this.error(v),v}}class $l{constructor(u,d){this.type=d.type,this.bindings=[].concat(u),this.result=d}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const d of this.bindings)u(d[1]);u(this.result)}static parse(u,d){if(u.length<4)return d.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const v=[];for(let D=1;D<u.length-1;D+=2){const F=u[D];if(typeof F!="string")return d.error(`Expected string, but found ${typeof F} instead.`,D);if(/[^a-zA-Z0-9_]/.test(F))return d.error("Variable names must contain only alphanumeric characters or '_'.",D);const N=d.parse(u[D+1],D+1);if(!N)return null;v.push([F,N])}const w=d.parse(u[u.length-1],u.length-1,d.expectedType,v);return w?new $l(v,w):null}outputDefined(){return this.result.outputDefined()}}class zi{constructor(u,d){this.type=d.type,this.name=u,this.boundExpression=d}static parse(u,d){if(u.length!==2||typeof u[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");const v=u[1];return d.scope.has(v)?new zi(v,d.scope.get(v)):d.error(`Unknown variable "${v}". Make sure "${v}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(u){return this.boundExpression.evaluate(u)}eachChild(){}outputDefined(){return!1}}class Zr{constructor(u,d,v){this.type=u,this.index=d,this.input=v}static parse(u,d){if(u.length!==3)return d.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const v=d.parse(u[1],1,an),w=d.parse(u[2],2,mo(d.expectedType||zn));return v&&w?new Zr(w.type.itemType,v,w):null}evaluate(u){const d=this.index.evaluate(u),v=this.input.evaluate(u);if(d<0)throw new Oi(`Array index out of bounds: ${d} < 0.`);if(d>=v.length)throw new Oi(`Array index out of bounds: ${d} > ${v.length-1}.`);if(d!==Math.floor(d))throw new Oi(`Array index must be an integer, but found ${d} instead.`);return v[d]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class Vl{constructor(u,d){this.type=ir,this.needle=u,this.haystack=d}static parse(u,d){if(u.length!==3)return d.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const v=d.parse(u[1],1,zn),w=d.parse(u[2],2,zn);return v&&w?wo(v.type,[ir,Wn,an,Pr,zn])?new Vl(v,w):d.error(`Expected first argument to be of type boolean, string, number or null, but found ${Mi(v.type)} instead`):null}evaluate(u){const d=this.needle.evaluate(u),v=this.haystack.evaluate(u);if(!v)return!1;if(!Ua(d,["boolean","string","number","null"]))throw new Oi(`Expected first argument to be of type boolean, string, number or null, but found ${Mi(ea(d))} instead.`);if(!Ua(v,["string","array"]))throw new Oi(`Expected second argument to be of type array or string, but found ${Mi(ea(v))} instead.`);return v.indexOf(d)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class Wi{constructor(u,d,v){this.type=an,this.needle=u,this.haystack=d,this.fromIndex=v}static parse(u,d){if(u.length<=2||u.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const v=d.parse(u[1],1,zn),w=d.parse(u[2],2,zn);if(!v||!w)return null;if(!wo(v.type,[ir,Wn,an,Pr,zn]))return d.error(`Expected first argument to be of type boolean, string, number or null, but found ${Mi(v.type)} instead`);if(u.length===4){const D=d.parse(u[3],3,an);return D?new Wi(v,w,D):null}return new Wi(v,w)}evaluate(u){const d=this.needle.evaluate(u),v=this.haystack.evaluate(u);if(!Ua(d,["boolean","string","number","null"]))throw new Oi(`Expected first argument to be of type boolean, string, number or null, but found ${Mi(ea(d))} instead.`);let w;if(this.fromIndex&&(w=this.fromIndex.evaluate(u)),Ua(v,["string"])){const D=v.indexOf(d,w);return D===-1?-1:[...v.slice(0,D)].length}if(Ua(v,["array"]))return v.indexOf(d,w);throw new Oi(`Expected second argument to be of type array or string, but found ${Mi(ea(v))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class lo{constructor(u,d,v,w,D,F){this.inputType=u,this.type=d,this.input=v,this.cases=w,this.outputs=D,this.otherwise=F}static parse(u,d){if(u.length<5)return d.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return d.error("Expected an even number of arguments.");let v,w;d.expectedType&&d.expectedType.kind!=="value"&&(w=d.expectedType);const D={},F=[];for(let ie=2;ie<u.length-1;ie+=2){let ce=u[ie];const Ce=u[ie+1];Array.isArray(ce)||(ce=[ce]);const Pe=d.concat(ie);if(ce.length===0)return Pe.error("Expected at least one branch label.");for(const ze of ce){if(typeof ze!="number"&&typeof ze!="string")return Pe.error("Branch labels must be numbers or strings.");if(typeof ze=="number"&&Math.abs(ze)>Number.MAX_SAFE_INTEGER)return Pe.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ze=="number"&&Math.floor(ze)!==ze)return Pe.error("Numeric branch labels must be integer values.");if(v){if(Pe.checkSubtype(v,ea(ze)))return null}else v=ea(ze);if(D[String(ze)]!==void 0)return Pe.error("Branch labels must be unique.");D[String(ze)]=F.length}const De=d.parse(Ce,ie,w);if(!De)return null;w=w||De.type,F.push(De)}const N=d.parse(u[1],1,zn);if(!N)return null;const Z=d.parse(u[u.length-1],u.length-1,w);return Z?N.type.kind!=="value"&&d.concat(1).checkSubtype(v,N.type)?null:new lo(v,w,N,D,F,Z):null}evaluate(u){const d=this.input.evaluate(u);return(ea(d)===this.inputType&&this.outputs[this.cases[d]]||this.otherwise).evaluate(u)}eachChild(u){u(this.input),this.outputs.forEach(u),u(this.otherwise)}outputDefined(){return this.outputs.every(u=>u.outputDefined())&&this.otherwise.outputDefined()}}class Di{constructor(u,d,v){this.type=u,this.branches=d,this.otherwise=v}static parse(u,d){if(u.length<4)return d.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return d.error("Expected an odd number of arguments.");let v;d.expectedType&&d.expectedType.kind!=="value"&&(v=d.expectedType);const w=[];for(let F=1;F<u.length-1;F+=2){const N=d.parse(u[F],F,ir);if(!N)return null;const Z=d.parse(u[F+1],F+1,v);if(!Z)return null;w.push([N,Z]),v=v||Z.type}const D=d.parse(u[u.length-1],u.length-1,v);if(!D)return null;if(!v)throw new Error("Can't infer output type");return new Di(v,w,D)}evaluate(u){for(const[d,v]of this.branches)if(d.evaluate(u))return v.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[d,v]of this.branches)u(d),u(v);u(this.otherwise)}outputDefined(){return this.branches.every(([u,d])=>d.outputDefined())&&this.otherwise.outputDefined()}}class te{constructor(u,d,v,w){this.type=u,this.input=d,this.beginIndex=v,this.endIndex=w}static parse(u,d){if(u.length<=2||u.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const v=d.parse(u[1],1,zn),w=d.parse(u[2],2,an);if(!v||!w)return null;if(!wo(v.type,[mo(zn),Wn,zn]))return d.error(`Expected first argument to be of type array or string, but found ${Mi(v.type)} instead`);if(u.length===4){const D=d.parse(u[3],3,an);return D?new te(v.type,v,w,D):null}return new te(v.type,v,w)}evaluate(u){const d=this.input.evaluate(u),v=this.beginIndex.evaluate(u);let w;if(this.endIndex&&(w=this.endIndex.evaluate(u)),Ua(d,["string"]))return[...d].slice(v,w).join("");if(Ua(d,["array"]))return d.slice(v,w);throw new Oi(`Expected first argument to be of type array or string, but found ${Mi(ea(d))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function Ee(h,u){const d=h.length-1;let v,w,D=0,F=d,N=0;for(;D<=F;)if(N=Math.floor((D+F)/2),v=h[N],w=h[N+1],v<=u){if(N===d||u<w)return N;D=N+1}else{if(!(v>u))throw new Oi("Input is not a number.");F=N-1}return 0}class ot{constructor(u,d,v){this.type=u,this.input=d,this.labels=[],this.outputs=[];for(const[w,D]of v)this.labels.push(w),this.outputs.push(D)}static parse(u,d){if(u.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return d.error("Expected an even number of arguments.");const v=d.parse(u[1],1,an);if(!v)return null;const w=[];let D=null;d.expectedType&&d.expectedType.kind!=="value"&&(D=d.expectedType);for(let F=1;F<u.length;F+=2){const N=F===1?-1/0:u[F],Z=u[F+1],ie=F,ce=F+1;if(typeof N!="number")return d.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ie);if(w.length&&w[w.length-1][0]>=N)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ie);const Ce=d.parse(Z,ce,D);if(!Ce)return null;D=D||Ce.type,w.push([N,Ce])}return new ot(D,v,w)}evaluate(u){const d=this.labels,v=this.outputs;if(d.length===1)return v[0].evaluate(u);const w=this.input.evaluate(u);if(w<=d[0])return v[0].evaluate(u);const D=d.length;return w>=d[D-1]?v[D-1].evaluate(u):v[Ee(d,w)].evaluate(u)}eachChild(u){u(this.input);for(const d of this.outputs)u(d)}outputDefined(){return this.outputs.every(u=>u.outputDefined())}}function $t(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var Sr,Nn,si=function(){if(Nn)return Sr;function h(u,d,v,w){this.cx=3*u,this.bx=3*(v-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*d,this.by=3*(w-d)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=d,this.p2x=v,this.p2y=w}return Nn=1,Sr=h,h.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,d){if(d===void 0&&(d=1e-6),u<0)return 0;if(u>1)return 1;for(var v=u,w=0;w<8;w++){var D=this.sampleCurveX(v)-u;if(Math.abs(D)<d)return v;var F=this.sampleCurveDerivativeX(v);if(Math.abs(F)<1e-6)break;v-=D/F}var N=0,Z=1;for(v=u,w=0;w<20&&(D=this.sampleCurveX(v),!(Math.abs(D-u)<d));w++)u>D?N=v:Z=v,v=.5*(Z-N)+N;return v},solve:function(u,d){return this.sampleCurveY(this.solveCurveX(u,d))}},Sr}(),fi=$t(si);class pr{constructor(u,d,v,w,D){this.type=u,this.operator=d,this.interpolation=v,this.input=w,this.labels=[],this.outputs=[];for(const[F,N]of D)this.labels.push(F),this.outputs.push(N)}static interpolationFactor(u,d,v,w){let D=0;if(u.name==="exponential")D=Er(d,u.base,v,w);else if(u.name==="linear")D=Er(d,1,v,w);else if(u.name==="cubic-bezier"){const F=u.controlPoints;D=new fi(F[0],F[1],F[2],F[3]).solve(Er(d,1,v,w))}return D}static parse(u,d){let[v,w,D,...F]=u;if(!Array.isArray(w)||w.length===0)return d.error("Expected an interpolation type expression.",1);if(w[0]==="linear")w={name:"linear"};else if(w[0]==="exponential"){const ie=w[1];if(typeof ie!="number")return d.error("Exponential interpolation requires a numeric base.",1,1);w={name:"exponential",base:ie}}else{if(w[0]!=="cubic-bezier")return d.error(`Unknown interpolation type ${String(w[0])}`,1,0);{const ie=w.slice(1);if(ie.length!==4||ie.some(ce=>typeof ce!="number"||ce<0||ce>1))return d.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);w={name:"cubic-bezier",controlPoints:ie}}}if(u.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(D=d.parse(D,2,an),!D)return null;const N=[];let Z=null;v==="interpolate-hcl"||v==="interpolate-lab"?Z=zr:d.expectedType&&d.expectedType.kind!=="value"&&(Z=d.expectedType);for(let ie=0;ie<F.length;ie+=2){const ce=F[ie],Ce=F[ie+1],Pe=ie+3,De=ie+4;if(typeof ce!="number")return d.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Pe);if(N.length&&N[N.length-1][0]>=ce)return d.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Pe);const ze=d.parse(Ce,De,Z);if(!ze)return null;Z=Z||ze.type,N.push([ce,ze])}return Ya(Z,an)||Ya(Z,fr)||Ya(Z,zr)||Ya(Z,ri)||Ya(Z,ii)||Ya(Z,mo(an))?new pr(Z,v,w,D,N):d.error(`Type ${Mi(Z)} is not interpolatable.`)}evaluate(u){const d=this.labels,v=this.outputs;if(d.length===1)return v[0].evaluate(u);const w=this.input.evaluate(u);if(w<=d[0])return v[0].evaluate(u);const D=d.length;if(w>=d[D-1])return v[D-1].evaluate(u);const F=Ee(d,w),N=pr.interpolationFactor(this.interpolation,w,d[F],d[F+1]),Z=v[F].evaluate(u),ie=v[F+1].evaluate(u);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return ci(Z,ie,N);case"color":return Ai.interpolate(Z,ie,N);case"padding":return kr.interpolate(Z,ie,N);case"variableAnchorOffsetCollection":return Ta.interpolate(Z,ie,N);case"array":return rs(Z,ie,N);case"projectionDefinition":return ja.interpolate(Z,ie,N)}case"interpolate-hcl":return Ai.interpolate(Z,ie,N,"hcl");case"interpolate-lab":return Ai.interpolate(Z,ie,N,"lab")}}eachChild(u){u(this.input);for(const d of this.outputs)u(d)}outputDefined(){return this.outputs.every(u=>u.outputDefined())}}function Er(h,u,d,v){const w=v-d,D=h-d;return w===0?0:u===1?D/w:(Math.pow(u,D)-1)/(Math.pow(u,w)-1)}const Ci={color:Ai.interpolate,number:ci,padding:kr.interpolate,variableAnchorOffsetCollection:Ta.interpolate,array:rs};class So{constructor(u,d){this.type=u,this.args=d}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");let v=null;const w=d.expectedType;w&&w.kind!=="value"&&(v=w);const D=[];for(const N of u.slice(1)){const Z=d.parse(N,1+D.length,v,void 0,{typeAnnotation:"omit"});if(!Z)return null;v=v||Z.type,D.push(Z)}if(!v)throw new Error("No output type");const F=w&&D.some(N=>ns(w,N.type));return new So(F?zn:v,D)}evaluate(u){let d,v=null,w=0;for(const D of this.args)if(w++,v=D.evaluate(u),v&&v instanceof Mo&&!v.available&&(d||(d=v.name),v=null,w===this.args.length&&(v=d)),v!==null)break;return v}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every(u=>u.outputDefined())}}function Ri(h,u){return h==="=="||h==="!="?u.kind==="boolean"||u.kind==="string"||u.kind==="number"||u.kind==="null"||u.kind==="value":u.kind==="string"||u.kind==="number"||u.kind==="value"}function Nr(h,u,d,v){return v.compare(u,d)===0}function eo(h,u,d){const v=h!=="=="&&h!=="!=";return class MD{constructor(D,F,N){this.type=ir,this.lhs=D,this.rhs=F,this.collator=N,this.hasUntypedArgument=D.type.kind==="value"||F.type.kind==="value"}static parse(D,F){if(D.length!==3&&D.length!==4)return F.error("Expected two or three arguments.");const N=D[0];let Z=F.parse(D[1],1,zn);if(!Z)return null;if(!Ri(N,Z.type))return F.concat(1).error(`"${N}" comparisons are not supported for type '${Mi(Z.type)}'.`);let ie=F.parse(D[2],2,zn);if(!ie)return null;if(!Ri(N,ie.type))return F.concat(2).error(`"${N}" comparisons are not supported for type '${Mi(ie.type)}'.`);if(Z.type.kind!==ie.type.kind&&Z.type.kind!=="value"&&ie.type.kind!=="value")return F.error(`Cannot compare types '${Mi(Z.type)}' and '${Mi(ie.type)}'.`);v&&(Z.type.kind==="value"&&ie.type.kind!=="value"?Z=new xa(ie.type,[Z]):Z.type.kind!=="value"&&ie.type.kind==="value"&&(ie=new xa(Z.type,[ie])));let ce=null;if(D.length===4){if(Z.type.kind!=="string"&&ie.type.kind!=="string"&&Z.type.kind!=="value"&&ie.type.kind!=="value")return F.error("Cannot use collator to compare non-string types.");if(ce=F.parse(D[3],3,Pi),!ce)return null}return new MD(Z,ie,ce)}evaluate(D){const F=this.lhs.evaluate(D),N=this.rhs.evaluate(D);if(v&&this.hasUntypedArgument){const Z=ea(F),ie=ea(N);if(Z.kind!==ie.kind||Z.kind!=="string"&&Z.kind!=="number")throw new Oi(`Expected arguments for "${h}" to be (string, string) or (number, number), but found (${Z.kind}, ${ie.kind}) instead.`)}if(this.collator&&!v&&this.hasUntypedArgument){const Z=ea(F),ie=ea(N);if(Z.kind!=="string"||ie.kind!=="string")return u(D,F,N)}return this.collator?d(D,F,N,this.collator.evaluate(D)):u(D,F,N)}eachChild(D){D(this.lhs),D(this.rhs),this.collator&&D(this.collator)}outputDefined(){return!0}}}const to=eo("==",function(h,u,d){return u===d},Nr),la=eo("!=",function(h,u,d){return u!==d},function(h,u,d,v){return!Nr(0,u,d,v)}),gs=eo("<",function(h,u,d){return u<d},function(h,u,d,v){return v.compare(u,d)<0}),Ks=eo(">",function(h,u,d){return u>d},function(h,u,d,v){return v.compare(u,d)>0}),su=eo("<=",function(h,u,d){return u<=d},function(h,u,d,v){return v.compare(u,d)<=0}),Va=eo(">=",function(h,u,d){return u>=d},function(h,u,d,v){return v.compare(u,d)>=0});class ac{constructor(u,d,v){this.type=Pi,this.locale=v,this.caseSensitive=u,this.diacriticSensitive=d}static parse(u,d){if(u.length!==2)return d.error("Expected one argument.");const v=u[1];if(typeof v!="object"||Array.isArray(v))return d.error("Collator options argument must be an object.");const w=d.parse(v["case-sensitive"]!==void 0&&v["case-sensitive"],1,ir);if(!w)return null;const D=d.parse(v["diacritic-sensitive"]!==void 0&&v["diacritic-sensitive"],1,ir);if(!D)return null;let F=null;return v.locale&&(F=d.parse(v.locale,1,Wn),!F)?null:new ac(w,D,F)}evaluate(u){return new As(this.caseSensitive.evaluate(u),this.diacriticSensitive.evaluate(u),this.locale?this.locale.evaluate(u):null)}eachChild(u){u(this.caseSensitive),u(this.diacriticSensitive),this.locale&&u(this.locale)}outputDefined(){return!1}}class ws{constructor(u,d,v,w,D){this.type=Wn,this.number=u,this.locale=d,this.currency=v,this.minFractionDigits=w,this.maxFractionDigits=D}static parse(u,d){if(u.length!==3)return d.error("Expected two arguments.");const v=d.parse(u[1],1,an);if(!v)return null;const w=u[2];if(typeof w!="object"||Array.isArray(w))return d.error("NumberFormat options argument must be an object.");let D=null;if(w.locale&&(D=d.parse(w.locale,1,Wn),!D))return null;let F=null;if(w.currency&&(F=d.parse(w.currency,1,Wn),!F))return null;let N=null;if(w["min-fraction-digits"]&&(N=d.parse(w["min-fraction-digits"],1,an),!N))return null;let Z=null;return w["max-fraction-digits"]&&(Z=d.parse(w["max-fraction-digits"],1,an),!Z)?null:new ws(v,D,F,N,Z)}evaluate(u){return new Intl.NumberFormat(this.locale?this.locale.evaluate(u):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(u):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(u):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(u):void 0}).format(this.number.evaluate(u))}eachChild(u){u(this.number),this.locale&&u(this.locale),this.currency&&u(this.currency),this.minFractionDigits&&u(this.minFractionDigits),this.maxFractionDigits&&u(this.maxFractionDigits)}outputDefined(){return!1}}class rl{constructor(u){this.type=po,this.sections=u}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");const v=u[1];if(!Array.isArray(v)&&typeof v=="object")return d.error("First argument must be an image or text section.");const w=[];let D=!1;for(let F=1;F<=u.length-1;++F){const N=u[F];if(D&&typeof N=="object"&&!Array.isArray(N)){D=!1;let Z=null;if(N["font-scale"]&&(Z=d.parse(N["font-scale"],1,an),!Z))return null;let ie=null;if(N["text-font"]&&(ie=d.parse(N["text-font"],1,mo(Wn)),!ie))return null;let ce=null;if(N["text-color"]&&(ce=d.parse(N["text-color"],1,zr),!ce))return null;const Ce=w[w.length-1];Ce.scale=Z,Ce.font=ie,Ce.textColor=ce}else{const Z=d.parse(u[F],1,zn);if(!Z)return null;const ie=Z.type.kind;if(ie!=="string"&&ie!=="value"&&ie!=="null"&&ie!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");D=!0,w.push({content:Z,scale:null,font:null,textColor:null})}}return new rl(w)}evaluate(u){return new sa(this.sections.map(d=>{const v=d.content.evaluate(u);return ea(v)===Xr?new Ju("",v,null,null,null):new Ju($a(v),null,d.scale?d.scale.evaluate(u):null,d.font?d.font.evaluate(u).join(","):null,d.textColor?d.textColor.evaluate(u):null)}))}eachChild(u){for(const d of this.sections)u(d.content),d.scale&&u(d.scale),d.font&&u(d.font),d.textColor&&u(d.textColor)}outputDefined(){return!1}}class Xc{constructor(u){this.type=Xr,this.input=u}static parse(u,d){if(u.length!==2)return d.error("Expected two arguments.");const v=d.parse(u[1],1,Wn);return v?new Xc(v):d.error("No image name provided.")}evaluate(u){const d=this.input.evaluate(u),v=Mo.fromString(d);return v&&u.availableImages&&(v.available=u.availableImages.indexOf(d)>-1),v}eachChild(u){u(this.input)}outputDefined(){return!1}}class Su{constructor(u){this.type=an,this.input=u}static parse(u,d){if(u.length!==2)return d.error(`Expected 1 argument, but found ${u.length-1} instead.`);const v=d.parse(u[1],1);return v?v.type.kind!=="array"&&v.type.kind!=="string"&&v.type.kind!=="value"?d.error(`Expected argument of type string or array, but found ${Mi(v.type)} instead.`):new Su(v):null}evaluate(u){const d=this.input.evaluate(u);if(typeof d=="string")return[...d].length;if(Array.isArray(d))return d.length;throw new Oi(`Expected value to be of type string or array, but found ${Mi(ea(d))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const Eu=8192;function Ah(h,u){const d=(180+h[0])/360,v=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+h[1]*Math.PI/360)))/360,w=Math.pow(2,u.z);return[Math.round(d*w*Eu),Math.round(v*w*Eu)]}function wa(h,u){const d=Math.pow(2,u.z);return[(w=(h[0]/Eu+u.x)/d,360*w-180),(v=(h[1]/Eu+u.y)/d,360/Math.PI*Math.atan(Math.exp((180-360*v)*Math.PI/180))-90)];var v,w}function Ou(h,u){h[0]=Math.min(h[0],u[0]),h[1]=Math.min(h[1],u[1]),h[2]=Math.max(h[2],u[0]),h[3]=Math.max(h[3],u[1])}function Jc(h,u){return!(h[0]<=u[0]||h[2]>=u[2]||h[1]<=u[1]||h[3]>=u[3])}function Hf(h,u,d){const v=h[0]-u[0],w=h[1]-u[1],D=h[0]-d[0],F=h[1]-d[1];return v*F-D*w==0&&v*D<=0&&w*F<=0}function tA(h,u,d,v){return(w=[v[0]-d[0],v[1]-d[1]])[0]*(D=[u[0]-h[0],u[1]-h[1]])[1]-w[1]*D[0]!=0&&!(!Ha(h,u,d,v)||!Ha(d,v,h,u));var w,D}function Dd(h,u,d){for(const v of d)for(let w=0;w<v.length-1;++w)if(tA(h,u,v[w],v[w+1]))return!0;return!1}function Bc(h,u,d=!1){let v=!1;for(const N of u)for(let Z=0;Z<N.length-1;Z++){if(Hf(h,N[Z],N[Z+1]))return d;(D=N[Z])[1]>(w=h)[1]!=(F=N[Z+1])[1]>w[1]&&w[0]<(F[0]-D[0])*(w[1]-D[1])/(F[1]-D[1])+D[0]&&(v=!v)}var w,D,F;return v}function Zf(h,u){for(const d of u)if(Bc(h,d))return!0;return!1}function gf(h,u){for(const d of h)if(!Bc(d,u))return!1;for(let d=0;d<h.length-1;++d)if(Dd(h[d],h[d+1],u))return!1;return!0}function sc(h,u){for(const d of u)if(gf(h,d))return!0;return!1}function Ha(h,u,d,v){const w=v[0]-d[0],D=v[1]-d[1],F=(h[0]-d[0])*D-w*(h[1]-d[1]),N=(u[0]-d[0])*D-w*(u[1]-d[1]);return F>0&&N<0||F<0&&N>0}function ch(h,u,d){const v=[];for(let w=0;w<h.length;w++){const D=[];for(let F=0;F<h[w].length;F++){const N=Ah(h[w][F],d);Ou(u,N),D.push(N)}v.push(D)}return v}function Fh(h,u,d){const v=[];for(let w=0;w<h.length;w++){const D=ch(h[w],u,d);v.push(D)}return v}function ed(h,u,d,v){if(h[0]<d[0]||h[0]>d[2]){const w=.5*v;let D=h[0]-d[0]>w?-v:d[0]-h[0]>w?v:0;D===0&&(D=h[0]-d[2]>w?-v:d[2]-h[0]>w?v:0),h[0]+=D}Ou(u,h)}function Uh(h,u,d,v){const w=Math.pow(2,v.z)*Eu,D=[v.x*Eu,v.y*Eu],F=[];for(const N of h)for(const Z of N){const ie=[Z.x+D[0],Z.y+D[1]];ed(ie,u,d,w),F.push(ie)}return F}function td(h,u,d,v){const w=Math.pow(2,v.z)*Eu,D=[v.x*Eu,v.y*Eu],F=[];for(const Z of h){const ie=[];for(const ce of Z){const Ce=[ce.x+D[0],ce.y+D[1]];Ou(u,Ce),ie.push(Ce)}F.push(ie)}if(u[2]-u[0]<=w/2){(N=u)[0]=N[1]=1/0,N[2]=N[3]=-1/0;for(const Z of F)for(const ie of Z)ed(ie,u,d,w)}var N;return F}class lc{constructor(u,d){this.type=ir,this.geojson=u,this.geometries=d}static parse(u,d){if(u.length!==2)return d.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(Dl(u[1])){const v=u[1];if(v.type==="FeatureCollection"){const w=[];for(const D of v.features){const{type:F,coordinates:N}=D.geometry;F==="Polygon"&&w.push(N),F==="MultiPolygon"&&w.push(...N)}if(w.length)return new lc(v,{type:"MultiPolygon",coordinates:w})}else if(v.type==="Feature"){const w=v.geometry.type;if(w==="Polygon"||w==="MultiPolygon")return new lc(v,v.geometry)}else if(v.type==="Polygon"||v.type==="MultiPolygon")return new lc(v,v)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(u.geometry()!=null&&u.canonicalID()!=null){if(u.geometryType()==="Point")return function(d,v){const w=[1/0,1/0,-1/0,-1/0],D=[1/0,1/0,-1/0,-1/0],F=d.canonicalID();if(v.type==="Polygon"){const N=ch(v.coordinates,D,F),Z=Uh(d.geometry(),w,D,F);if(!Jc(w,D))return!1;for(const ie of Z)if(!Bc(ie,N))return!1}if(v.type==="MultiPolygon"){const N=Fh(v.coordinates,D,F),Z=Uh(d.geometry(),w,D,F);if(!Jc(w,D))return!1;for(const ie of Z)if(!Zf(ie,N))return!1}return!0}(u,this.geometries);if(u.geometryType()==="LineString")return function(d,v){const w=[1/0,1/0,-1/0,-1/0],D=[1/0,1/0,-1/0,-1/0],F=d.canonicalID();if(v.type==="Polygon"){const N=ch(v.coordinates,D,F),Z=td(d.geometry(),w,D,F);if(!Jc(w,D))return!1;for(const ie of Z)if(!gf(ie,N))return!1}if(v.type==="MultiPolygon"){const N=Fh(v.coordinates,D,F),Z=td(d.geometry(),w,D,F);if(!Jc(w,D))return!1;for(const ie of Z)if(!sc(ie,N))return!1}return!0}(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let dh=class{constructor(h=[],u=(d,v)=>d<v?-1:d>v?1:0){if(this.data=h,this.length=this.data.length,this.compare=u,this.length>0)for(let d=(this.length>>1)-1;d>=0;d--)this._down(d)}push(h){this.data.push(h),this._up(this.length++)}pop(){if(this.length===0)return;const h=this.data[0],u=this.data.pop();return--this.length>0&&(this.data[0]=u,this._down(0)),h}peek(){return this.data[0]}_up(h){const{data:u,compare:d}=this,v=u[h];for(;h>0;){const w=h-1>>1,D=u[w];if(d(v,D)>=0)break;u[h]=D,h=w}u[h]=v}_down(h){const{data:u,compare:d}=this,v=this.length>>1,w=u[h];for(;h<v;){let D=1+(h<<1);const F=D+1;if(F<this.length&&d(u[F],u[D])<0&&(D=F),d(u[D],w)>=0)break;u[h]=u[D],h=D}u[h]=w}};function hh(h,u,d=0,v=h.length-1,w=Dp){for(;v>d;){if(v-d>600){const Z=v-d+1,ie=u-d+1,ce=Math.log(Z),Ce=.5*Math.exp(2*ce/3),Pe=.5*Math.sqrt(ce*Ce*(Z-Ce)/Z)*(ie-Z/2<0?-1:1);hh(h,u,Math.max(d,Math.floor(u-ie*Ce/Z+Pe)),Math.min(v,Math.floor(u+(Z-ie)*Ce/Z+Pe)),w)}const D=h[u];let F=d,N=v;for(nd(h,d,u),w(h[v],D)>0&&nd(h,d,v);F<N;){for(nd(h,F,N),F++,N--;w(h[F],D)<0;)F++;for(;w(h[N],D)>0;)N--}w(h[d],D)===0?nd(h,d,N):(N++,nd(h,N,v)),N<=u&&(d=N+1),u<=N&&(v=N-1)}}function nd(h,u,d){const v=h[u];h[u]=h[d],h[d]=v}function Dp(h,u){return h<u?-1:h>u?1:0}function Ic(h,u){if(h.length<=1)return[h];const d=[];let v,w;for(const D of h){const F=fh(D);F!==0&&(D.area=Math.abs(F),w===void 0&&(w=F<0),w===F<0?(v&&d.push(v),v=[D]):v.push(D))}if(v&&d.push(v),u>1)for(let D=0;D<d.length;D++)d[D].length<=u||(hh(d[D],u,1,d[D].length-1,lu),d[D]=d[D].slice(0,u));return d}function lu(h,u){return u.area-h.area}function fh(h){let u=0;for(let d,v,w=0,D=h.length,F=D-1;w<D;F=w++)d=h[w],v=h[F],u+=(v.x-d.x)*(d.y+v.y);return u}const uu=1/298.257223563,nA=uu*(2-uu),kc=Math.PI/180;class Ld{constructor(u){const d=6378.137*kc*1e3,v=Math.cos(u*kc),w=1/(1-nA*(1-v*v)),D=Math.sqrt(w);this.kx=d*D*v,this.ky=d*D*w*(1-nA)}distance(u,d){const v=this.wrap(u[0]-d[0])*this.kx,w=(u[1]-d[1])*this.ky;return Math.sqrt(v*v+w*w)}pointOnLine(u,d){let v,w,D,F,N=1/0;for(let Z=0;Z<u.length-1;Z++){let ie=u[Z][0],ce=u[Z][1],Ce=this.wrap(u[Z+1][0]-ie)*this.kx,Pe=(u[Z+1][1]-ce)*this.ky,De=0;Ce===0&&Pe===0||(De=(this.wrap(d[0]-ie)*this.kx*Ce+(d[1]-ce)*this.ky*Pe)/(Ce*Ce+Pe*Pe),De>1?(ie=u[Z+1][0],ce=u[Z+1][1]):De>0&&(ie+=Ce/this.kx*De,ce+=Pe/this.ky*De)),Ce=this.wrap(d[0]-ie)*this.kx,Pe=(d[1]-ce)*this.ky;const ze=Ce*Ce+Pe*Pe;ze<N&&(N=ze,v=ie,w=ce,D=Z,F=De)}return{point:[v,w],index:D,t:Math.max(0,Math.min(1,F))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function jh(h,u){return u[0]-h[0]}function Hl(h){return h[1]-h[0]+1}function bl(h,u){return h[1]>=h[0]&&h[1]<u}function FA(h,u){if(h[0]>h[1])return[null,null];const d=Hl(h);if(u){if(d===2)return[h,null];const w=Math.floor(d/2);return[[h[0],h[0]+w],[h[0]+w,h[1]]]}if(d===1)return[h,null];const v=Math.floor(d/2)-1;return[[h[0],h[0]+v],[h[0]+v+1,h[1]]]}function Tc(h,u){if(!bl(u,h.length))return[1/0,1/0,-1/0,-1/0];const d=[1/0,1/0,-1/0,-1/0];for(let v=u[0];v<=u[1];++v)Ou(d,h[v]);return d}function zh(h){const u=[1/0,1/0,-1/0,-1/0];for(const d of h)for(const v of d)Ou(u,v);return u}function yf(h){return h[0]!==-1/0&&h[1]!==-1/0&&h[2]!==1/0&&h[3]!==1/0}function rd(h,u,d){if(!yf(h)||!yf(u))return NaN;let v=0,w=0;return h[2]<u[0]&&(v=u[0]-h[2]),h[0]>u[2]&&(v=h[0]-u[2]),h[1]>u[3]&&(w=h[1]-u[3]),h[3]<u[1]&&(w=u[1]-h[3]),d.distance([0,0],[v,w])}function fA(h,u,d){const v=d.pointOnLine(u,h);return d.distance(h,v.point)}function Ys(h,u,d,v,w){const D=Math.min(fA(h,[d,v],w),fA(u,[d,v],w)),F=Math.min(fA(d,[h,u],w),fA(v,[h,u],w));return Math.min(D,F)}function xl(h,u,d,v,w){if(!bl(u,h.length)||!bl(v,d.length))return 1/0;let D=1/0;for(let F=u[0];F<u[1];++F){const N=h[F],Z=h[F+1];for(let ie=v[0];ie<v[1];++ie){const ce=d[ie],Ce=d[ie+1];if(tA(N,Z,ce,Ce))return 0;D=Math.min(D,Ys(N,Z,ce,Ce,w))}}return D}function Yo(h,u,d,v,w){if(!bl(u,h.length)||!bl(v,d.length))return NaN;let D=1/0;for(let F=u[0];F<=u[1];++F)for(let N=v[0];N<=v[1];++N)if(D=Math.min(D,w.distance(h[F],d[N])),D===0)return D;return D}function ph(h,u,d){if(Bc(h,u,!0))return 0;let v=1/0;for(const w of u){const D=w[0],F=w[w.length-1];if(D!==F&&(v=Math.min(v,fA(h,[F,D],d)),v===0))return v;const N=d.pointOnLine(w,h);if(v=Math.min(v,d.distance(h,N.point)),v===0)return v}return v}function Lp(h,u,d,v){if(!bl(u,h.length))return NaN;for(let D=u[0];D<=u[1];++D)if(Bc(h[D],d,!0))return 0;let w=1/0;for(let D=u[0];D<u[1];++D){const F=h[D],N=h[D+1];for(const Z of d)for(let ie=0,ce=Z.length,Ce=ce-1;ie<ce;Ce=ie++){const Pe=Z[Ce],De=Z[ie];if(tA(F,N,Pe,De))return 0;w=Math.min(w,Ys(F,N,Pe,De,v))}}return w}function Pc(h,u){for(const d of h)for(const v of d)if(Bc(v,u,!0))return!0;return!1}function Bu(h,u,d,v=1/0){const w=zh(h),D=zh(u);if(v!==1/0&&rd(w,D,d)>=v)return v;if(Jc(w,D)){if(Pc(h,u))return 0}else if(Pc(u,h))return 0;let F=1/0;for(const N of h)for(let Z=0,ie=N.length,ce=ie-1;Z<ie;ce=Z++){const Ce=N[ce],Pe=N[Z];for(const De of u)for(let ze=0,Ze=De.length,lt=Ze-1;ze<Ze;lt=ze++){const yt=De[lt],Nt=De[ze];if(tA(Ce,Pe,yt,Nt))return 0;F=Math.min(F,Ys(Ce,Pe,yt,Nt,d))}}return F}function Fd(h,u,d,v,w,D){if(!D)return;const F=rd(Tc(v,D),w,d);F<u&&h.push([F,D,[0,0]])}function Ud(h,u,d,v,w,D,F){if(!D||!F)return;const N=rd(Tc(v,D),Tc(w,F),d);N<u&&h.push([N,D,F])}function uc(h,u,d,v,w=1/0){let D=Math.min(v.distance(h[0],d[0][0]),w);if(D===0)return D;const F=new dh([[0,[0,h.length-1],[0,0]]],jh),N=zh(d);for(;F.length>0;){const Z=F.pop();if(Z[0]>=D)continue;const ie=Z[1],ce=u?50:100;if(Hl(ie)<=ce){if(!bl(ie,h.length))return NaN;if(u){const Ce=Lp(h,ie,d,v);if(isNaN(Ce)||Ce===0)return Ce;D=Math.min(D,Ce)}else for(let Ce=ie[0];Ce<=ie[1];++Ce){const Pe=ph(h[Ce],d,v);if(D=Math.min(D,Pe),D===0)return 0}}else{const Ce=FA(ie,u);Fd(F,D,v,h,N,Ce[0]),Fd(F,D,v,h,N,Ce[1])}}return D}function jd(h,u,d,v,w,D=1/0){let F=Math.min(D,w.distance(h[0],d[0]));if(F===0)return F;const N=new dh([[0,[0,h.length-1],[0,d.length-1]]],jh);for(;N.length>0;){const Z=N.pop();if(Z[0]>=F)continue;const ie=Z[1],ce=Z[2],Ce=u?50:100,Pe=v?50:100;if(Hl(ie)<=Ce&&Hl(ce)<=Pe){if(!bl(ie,h.length)&&bl(ce,d.length))return NaN;let De;if(u&&v)De=xl(h,ie,d,ce,w),F=Math.min(F,De);else if(u&&!v){const ze=h.slice(ie[0],ie[1]+1);for(let Ze=ce[0];Ze<=ce[1];++Ze)if(De=fA(d[Ze],ze,w),F=Math.min(F,De),F===0)return F}else if(!u&&v){const ze=d.slice(ce[0],ce[1]+1);for(let Ze=ie[0];Ze<=ie[1];++Ze)if(De=fA(h[Ze],ze,w),F=Math.min(F,De),F===0)return F}else De=Yo(h,ie,d,ce,w),F=Math.min(F,De)}else{const De=FA(ie,u),ze=FA(ce,v);Ud(N,F,w,h,d,De[0],ze[0]),Ud(N,F,w,h,d,De[0],ze[1]),Ud(N,F,w,h,d,De[1],ze[0]),Ud(N,F,w,h,d,De[1],ze[1])}}return F}function Nh(h){return h.type==="MultiPolygon"?h.coordinates.map(u=>({type:"Polygon",coordinates:u})):h.type==="MultiLineString"?h.coordinates.map(u=>({type:"LineString",coordinates:u})):h.type==="MultiPoint"?h.coordinates.map(u=>({type:"Point",coordinates:u})):[h]}class Ac{constructor(u,d){this.type=an,this.geojson=u,this.geometries=d}static parse(u,d){if(u.length!==2)return d.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(Dl(u[1])){const v=u[1];if(v.type==="FeatureCollection")return new Ac(v,v.features.map(w=>Nh(w.geometry)).flat());if(v.type==="Feature")return new Ac(v,Nh(v.geometry));if("type"in v&&"coordinates"in v)return new Ac(v,Nh(v))}return d.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(u.geometry()!=null&&u.canonicalID()!=null){if(u.geometryType()==="Point")return function(d,v){const w=d.geometry(),D=w.flat().map(Z=>wa([Z.x,Z.y],d.canonical));if(w.length===0)return NaN;const F=new Ld(D[0][1]);let N=1/0;for(const Z of v){switch(Z.type){case"Point":N=Math.min(N,jd(D,!1,[Z.coordinates],!1,F,N));break;case"LineString":N=Math.min(N,jd(D,!1,Z.coordinates,!0,F,N));break;case"Polygon":N=Math.min(N,uc(D,!1,Z.coordinates,F,N))}if(N===0)return N}return N}(u,this.geometries);if(u.geometryType()==="LineString")return function(d,v){const w=d.geometry(),D=w.flat().map(Z=>wa([Z.x,Z.y],d.canonical));if(w.length===0)return NaN;const F=new Ld(D[0][1]);let N=1/0;for(const Z of v){switch(Z.type){case"Point":N=Math.min(N,jd(D,!0,[Z.coordinates],!1,F,N));break;case"LineString":N=Math.min(N,jd(D,!0,Z.coordinates,!0,F,N));break;case"Polygon":N=Math.min(N,uc(D,!0,Z.coordinates,F,N))}if(N===0)return N}return N}(u,this.geometries);if(u.geometryType()==="Polygon")return function(d,v){const w=d.geometry();if(w.length===0||w[0].length===0)return NaN;const D=Ic(w,0).map(Z=>Z.map(ie=>ie.map(ce=>wa([ce.x,ce.y],d.canonical)))),F=new Ld(D[0][0][0][1]);let N=1/0;for(const Z of v)for(const ie of D){switch(Z.type){case"Point":N=Math.min(N,uc([Z.coordinates],!1,ie,F,N));break;case"LineString":N=Math.min(N,uc(Z.coordinates,!0,ie,F,N));break;case"Polygon":N=Math.min(N,Bu(ie,Z.coordinates,F,N))}if(N===0)return N}return N}(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Au={"==":to,"!=":la,">":Ks,"<":gs,">=":Va,"<=":su,array:xa,at:Zr,boolean:xa,case:Di,coalesce:So,collator:ac,format:rl,image:Xc,in:Vl,"index-of":Wi,interpolate:pr,"interpolate-hcl":pr,"interpolate-lab":pr,length:Su,let:$l,literal:co,match:lo,number:xa,"number-format":ws,object:xa,slice:te,step:ot,string:xa,"to-boolean":Pa,"to-color":Pa,"to-number":Pa,"to-string":Pa,var:zi,within:lc,distance:Ac};class Ht{constructor(u,d,v,w){this.name=u,this.type=d,this._evaluate=v,this.args=w}evaluate(u){return this._evaluate(u,this.args)}eachChild(u){this.args.forEach(u)}outputDefined(){return!1}static parse(u,d){const v=u[0],w=Ht.definitions[v];if(!w)return d.error(`Unknown expression "${v}". If you wanted a literal array, use ["literal", [...]].`,0);const D=Array.isArray(w)?w[0]:w.type,F=Array.isArray(w)?[[w[1],w[2]]]:w.overloads,N=F.filter(([ie])=>!Array.isArray(ie)||ie.length===u.length-1);let Z=null;for(const[ie,ce]of N){Z=new Ji(d.registry,Co,d.path,null,d.scope);const Ce=[];let Pe=!1;for(let De=1;De<u.length;De++){const ze=u[De],Ze=Array.isArray(ie)?ie[De-1]:ie.type,lt=Z.parse(ze,1+Ce.length,Ze);if(!lt){Pe=!0;break}Ce.push(lt)}if(!Pe)if(Array.isArray(ie)&&ie.length!==Ce.length)Z.error(`Expected ${ie.length} arguments, but found ${Ce.length} instead.`);else{for(let De=0;De<Ce.length;De++){const ze=Array.isArray(ie)?ie[De]:ie.type,Ze=Ce[De];Z.concat(De+1).checkSubtype(ze,Ze.type)}if(Z.errors.length===0)return new Ht(v,D,ce,Ce)}}if(N.length===1)d.errors.push(...Z.errors);else{const ie=(N.length?N:F).map(([Ce])=>{return Pe=Ce,Array.isArray(Pe)?`(${Pe.map(Mi).join(", ")})`:`(${Mi(Pe.type)}...)`;var Pe}).join(" | "),ce=[];for(let Ce=1;Ce<u.length;Ce++){const Pe=d.parse(u[Ce],1+ce.length);if(!Pe)return null;ce.push(Mi(Pe.type))}d.error(`Expected arguments of type ${ie}, but found (${ce.join(", ")}) instead.`)}return null}static register(u,d){Ht.definitions=d;for(const v in d)u[v]=Ht}}function Pn(h,[u,d,v,w]){u=u.evaluate(h),d=d.evaluate(h),v=v.evaluate(h);const D=w?w.evaluate(h):1,F=au(u,d,v,D);if(F)throw new Oi(F);return new Ai(u/255,d/255,v/255,D,!1)}function sn(h,u){return h in u}function Kr(h,u){const d=u[h];return d===void 0?null:d}function bi(h){return{type:h}}function Co(h){if(h instanceof zi)return Co(h.boundExpression);if(h instanceof Ht&&h.name==="error"||h instanceof ac||h instanceof lc||h instanceof Ac)return!1;const u=h instanceof Pa||h instanceof xa;let d=!0;return h.eachChild(v=>{d=u?d&&Co(v):d&&v instanceof co}),!!d&&is(h)&&UA(h,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function is(h){if(h instanceof Ht&&(h.name==="get"&&h.args.length===1||h.name==="feature-state"||h.name==="has"&&h.args.length===1||h.name==="properties"||h.name==="geometry-type"||h.name==="id"||/^filter-/.test(h.name))||h instanceof lc||h instanceof Ac)return!1;let u=!0;return h.eachChild(d=>{u&&!is(d)&&(u=!1)}),u}function $o(h){if(h instanceof Ht&&h.name==="feature-state")return!1;let u=!0;return h.eachChild(d=>{u&&!$o(d)&&(u=!1)}),u}function UA(h,u){if(h instanceof Ht&&u.indexOf(h.name)>=0)return!1;let d=!0;return h.eachChild(v=>{d&&!UA(v,u)&&(d=!1)}),d}function Xf(h){return{result:"success",value:h}}function wl(h){return{result:"error",value:h}}function cu(h){return h["property-type"]==="data-driven"||h["property-type"]==="cross-faded-data-driven"}function jA(h){return!!h.expression&&h.expression.parameters.indexOf("zoom")>-1}function Ml(h){return!!h.expression&&h.expression.interpolated}function Qi(h){return h instanceof Number?"number":h instanceof String?"string":h instanceof Boolean?"boolean":Array.isArray(h)?"array":h===null?"null":typeof h}function zA(h){return typeof h=="object"&&h!==null&&!Array.isArray(h)}function Fo(h){return h}function Kc(h,u){const d=u.type==="color",v=h.stops&&typeof h.stops[0][0]=="object",w=v||!(v||h.property!==void 0),D=h.type||(Ml(u)?"exponential":"interval");if(d||u.type==="padding"){const ce=d?Ai.parse:kr.parse;(h=Tn({},h)).stops&&(h.stops=h.stops.map(Ce=>[Ce[0],ce(Ce[1])])),h.default=ce(h.default?h.default:u.default)}if(h.colorSpace&&(F=h.colorSpace)!=="rgb"&&F!=="hcl"&&F!=="lab")throw new Error(`Unknown color space: "${h.colorSpace}"`);var F;let N,Z,ie;if(D==="exponential")N=Sl;else if(D==="interval")N=rA;else if(D==="categorical"){N=pA,Z=Object.create(null);for(const ce of h.stops)Z[ce[0]]=ce[1];ie=typeof h.stops[0][0]}else{if(D!=="identity")throw new Error(`Unknown function type "${D}"`);N=cc}if(v){const ce={},Ce=[];for(let ze=0;ze<h.stops.length;ze++){const Ze=h.stops[ze],lt=Ze[0].zoom;ce[lt]===void 0&&(ce[lt]={zoom:lt,type:h.type,property:h.property,default:h.default,stops:[]},Ce.push(lt)),ce[lt].stops.push([Ze[0].value,Ze[1]])}const Pe=[];for(const ze of Ce)Pe.push([ce[ze].zoom,Kc(ce[ze],u)]);const De={name:"linear"};return{kind:"composite",interpolationType:De,interpolationFactor:pr.interpolationFactor.bind(void 0,De),zoomStops:Pe.map(ze=>ze[0]),evaluate:({zoom:ze},Ze)=>Sl({stops:Pe,base:h.base},u,ze).evaluate(ze,Ze)}}if(w){const ce=D==="exponential"?{name:"exponential",base:h.base!==void 0?h.base:1}:null;return{kind:"camera",interpolationType:ce,interpolationFactor:pr.interpolationFactor.bind(void 0,ce),zoomStops:h.stops.map(Ce=>Ce[0]),evaluate:({zoom:Ce})=>N(h,u,Ce,Z,ie)}}return{kind:"source",evaluate(ce,Ce){const Pe=Ce&&Ce.properties?Ce.properties[h.property]:void 0;return Pe===void 0?NA(h.default,u.default):N(h,u,Pe,Z,ie)}}}function NA(h,u,d){return h!==void 0?h:u!==void 0?u:d!==void 0?d:void 0}function pA(h,u,d,v,w){return NA(typeof d===w?v[d]:void 0,h.default,u.default)}function rA(h,u,d){if(Qi(d)!=="number")return NA(h.default,u.default);const v=h.stops.length;if(v===1||d<=h.stops[0][0])return h.stops[0][1];if(d>=h.stops[v-1][0])return h.stops[v-1][1];const w=Ee(h.stops.map(D=>D[0]),d);return h.stops[w][1]}function Sl(h,u,d){const v=h.base!==void 0?h.base:1;if(Qi(d)!=="number")return NA(h.default,u.default);const w=h.stops.length;if(w===1||d<=h.stops[0][0])return h.stops[0][1];if(d>=h.stops[w-1][0])return h.stops[w-1][1];const D=Ee(h.stops.map(ce=>ce[0]),d),F=function(ce,Ce,Pe,De){const ze=De-Pe,Ze=ce-Pe;return ze===0?0:Ce===1?Ze/ze:(Math.pow(Ce,Ze)-1)/(Math.pow(Ce,ze)-1)}(d,v,h.stops[D][0],h.stops[D+1][0]),N=h.stops[D][1],Z=h.stops[D+1][1],ie=Ci[u.type]||Fo;return typeof N.evaluate=="function"?{evaluate(...ce){const Ce=N.evaluate.apply(void 0,ce),Pe=Z.evaluate.apply(void 0,ce);if(Ce!==void 0&&Pe!==void 0)return ie(Ce,Pe,F,h.colorSpace)}}:ie(N,Z,F,h.colorSpace)}function cc(h,u,d){switch(u.type){case"color":d=Ai.parse(d);break;case"formatted":d=sa.fromString(d.toString());break;case"resolvedImage":d=Mo.fromString(d.toString());break;case"padding":d=kr.parse(d);break;default:Qi(d)===u.type||u.type==="enum"&&u.values[d]||(d=void 0)}return NA(d,h.default,u.default)}Ht.register(Au,{error:[{kind:"error"},[Wn],(h,[u])=>{throw new Oi(u.evaluate(h))}],typeof:[Wn,[zn],(h,[u])=>Mi(ea(u.evaluate(h)))],"to-rgba":[mo(an,4),[zr],(h,[u])=>{const[d,v,w,D]=u.evaluate(h).rgb;return[255*d,255*v,255*w,D]}],rgb:[zr,[an,an,an],Pn],rgba:[zr,[an,an,an,an],Pn],has:{type:ir,overloads:[[[Wn],(h,[u])=>sn(u.evaluate(h),h.properties())],[[Wn,hr],(h,[u,d])=>sn(u.evaluate(h),d.evaluate(h))]]},get:{type:zn,overloads:[[[Wn],(h,[u])=>Kr(u.evaluate(h),h.properties())],[[Wn,hr],(h,[u,d])=>Kr(u.evaluate(h),d.evaluate(h))]]},"feature-state":[zn,[Wn],(h,[u])=>Kr(u.evaluate(h),h.featureState||{})],properties:[hr,[],h=>h.properties()],"geometry-type":[Wn,[],h=>h.geometryType()],id:[zn,[],h=>h.id()],zoom:[an,[],h=>h.globals.zoom],"heatmap-density":[an,[],h=>h.globals.heatmapDensity||0],"line-progress":[an,[],h=>h.globals.lineProgress||0],accumulated:[zn,[],h=>h.globals.accumulated===void 0?null:h.globals.accumulated],"+":[an,bi(an),(h,u)=>{let d=0;for(const v of u)d+=v.evaluate(h);return d}],"*":[an,bi(an),(h,u)=>{let d=1;for(const v of u)d*=v.evaluate(h);return d}],"-":{type:an,overloads:[[[an,an],(h,[u,d])=>u.evaluate(h)-d.evaluate(h)],[[an],(h,[u])=>-u.evaluate(h)]]},"/":[an,[an,an],(h,[u,d])=>u.evaluate(h)/d.evaluate(h)],"%":[an,[an,an],(h,[u,d])=>u.evaluate(h)%d.evaluate(h)],ln2:[an,[],()=>Math.LN2],pi:[an,[],()=>Math.PI],e:[an,[],()=>Math.E],"^":[an,[an,an],(h,[u,d])=>Math.pow(u.evaluate(h),d.evaluate(h))],sqrt:[an,[an],(h,[u])=>Math.sqrt(u.evaluate(h))],log10:[an,[an],(h,[u])=>Math.log(u.evaluate(h))/Math.LN10],ln:[an,[an],(h,[u])=>Math.log(u.evaluate(h))],log2:[an,[an],(h,[u])=>Math.log(u.evaluate(h))/Math.LN2],sin:[an,[an],(h,[u])=>Math.sin(u.evaluate(h))],cos:[an,[an],(h,[u])=>Math.cos(u.evaluate(h))],tan:[an,[an],(h,[u])=>Math.tan(u.evaluate(h))],asin:[an,[an],(h,[u])=>Math.asin(u.evaluate(h))],acos:[an,[an],(h,[u])=>Math.acos(u.evaluate(h))],atan:[an,[an],(h,[u])=>Math.atan(u.evaluate(h))],min:[an,bi(an),(h,u)=>Math.min(...u.map(d=>d.evaluate(h)))],max:[an,bi(an),(h,u)=>Math.max(...u.map(d=>d.evaluate(h)))],abs:[an,[an],(h,[u])=>Math.abs(u.evaluate(h))],round:[an,[an],(h,[u])=>{const d=u.evaluate(h);return d<0?-Math.round(-d):Math.round(d)}],floor:[an,[an],(h,[u])=>Math.floor(u.evaluate(h))],ceil:[an,[an],(h,[u])=>Math.ceil(u.evaluate(h))],"filter-==":[ir,[Wn,zn],(h,[u,d])=>h.properties()[u.value]===d.value],"filter-id-==":[ir,[zn],(h,[u])=>h.id()===u.value],"filter-type-==":[ir,[Wn],(h,[u])=>h.geometryType()===u.value],"filter-<":[ir,[Wn,zn],(h,[u,d])=>{const v=h.properties()[u.value],w=d.value;return typeof v==typeof w&&v<w}],"filter-id-<":[ir,[zn],(h,[u])=>{const d=h.id(),v=u.value;return typeof d==typeof v&&d<v}],"filter->":[ir,[Wn,zn],(h,[u,d])=>{const v=h.properties()[u.value],w=d.value;return typeof v==typeof w&&v>w}],"filter-id->":[ir,[zn],(h,[u])=>{const d=h.id(),v=u.value;return typeof d==typeof v&&d>v}],"filter-<=":[ir,[Wn,zn],(h,[u,d])=>{const v=h.properties()[u.value],w=d.value;return typeof v==typeof w&&v<=w}],"filter-id-<=":[ir,[zn],(h,[u])=>{const d=h.id(),v=u.value;return typeof d==typeof v&&d<=v}],"filter->=":[ir,[Wn,zn],(h,[u,d])=>{const v=h.properties()[u.value],w=d.value;return typeof v==typeof w&&v>=w}],"filter-id->=":[ir,[zn],(h,[u])=>{const d=h.id(),v=u.value;return typeof d==typeof v&&d>=v}],"filter-has":[ir,[zn],(h,[u])=>u.value in h.properties()],"filter-has-id":[ir,[],h=>h.id()!==null&&h.id()!==void 0],"filter-type-in":[ir,[mo(Wn)],(h,[u])=>u.value.indexOf(h.geometryType())>=0],"filter-id-in":[ir,[mo(zn)],(h,[u])=>u.value.indexOf(h.id())>=0],"filter-in-small":[ir,[Wn,mo(zn)],(h,[u,d])=>d.value.indexOf(h.properties()[u.value])>=0],"filter-in-large":[ir,[Wn,mo(zn)],(h,[u,d])=>function(v,w,D,F){for(;D<=F;){const N=D+F>>1;if(w[N]===v)return!0;w[N]>v?F=N-1:D=N+1}return!1}(h.properties()[u.value],d.value,0,d.value.length-1)],all:{type:ir,overloads:[[[ir,ir],(h,[u,d])=>u.evaluate(h)&&d.evaluate(h)],[bi(ir),(h,u)=>{for(const d of u)if(!d.evaluate(h))return!1;return!0}]]},any:{type:ir,overloads:[[[ir,ir],(h,[u,d])=>u.evaluate(h)||d.evaluate(h)],[bi(ir),(h,u)=>{for(const d of u)if(d.evaluate(h))return!0;return!1}]]},"!":[ir,[ir],(h,[u])=>!u.evaluate(h)],"is-supported-script":[ir,[Wn],(h,[u])=>{const d=h.globals&&h.globals.isSupportedScript;return!d||d(u.evaluate(h))}],upcase:[Wn,[Wn],(h,[u])=>u.evaluate(h).toUpperCase()],downcase:[Wn,[Wn],(h,[u])=>u.evaluate(h).toLowerCase()],concat:[Wn,bi(zn),(h,u)=>u.map(d=>$a(d.evaluate(h))).join("")],"resolved-locale":[Wn,[Pi],(h,[u])=>u.evaluate(h).resolvedLocale()]});class du{constructor(u,d){var v;this.expression=u,this._warningHistory={},this._evaluator=new eA,this._defaultValue=d?(v=d).type==="color"&&zA(v.default)?new Ai(0,0,0,0):v.type==="color"?Ai.parse(v.default)||null:v.type==="padding"?kr.parse(v.default)||null:v.type==="variableAnchorOffsetCollection"?Ta.parse(v.default)||null:v.type==="projectionDefinition"?ja.parse(v.default)||null:v.default===void 0?null:v.default:null,this._enumValues=d&&d.type==="enum"?d.values:null}evaluateWithoutErrorHandling(u,d,v,w,D,F){return this._evaluator.globals=u,this._evaluator.feature=d,this._evaluator.featureState=v,this._evaluator.canonical=w,this._evaluator.availableImages=D||null,this._evaluator.formattedSection=F,this.expression.evaluate(this._evaluator)}evaluate(u,d,v,w,D,F){this._evaluator.globals=u,this._evaluator.feature=d||null,this._evaluator.featureState=v||null,this._evaluator.canonical=w,this._evaluator.availableImages=D||null,this._evaluator.formattedSection=F||null;try{const N=this.expression.evaluate(this._evaluator);if(N==null||typeof N=="number"&&N!=N)return this._defaultValue;if(this._enumValues&&!(N in this._enumValues))throw new Oi(`Expected value to be one of ${Object.keys(this._enumValues).map(Z=>JSON.stringify(Z)).join(", ")}, but found ${JSON.stringify(N)} instead.`);return N}catch(N){return this._warningHistory[N.message]||(this._warningHistory[N.message]=!0,typeof console<"u"&&console.warn(N.message)),this._defaultValue}}}function Ll(h){return Array.isArray(h)&&h.length>0&&typeof h[0]=="string"&&h[0]in Au}function Rc(h,u){const d=new Ji(Au,Co,[],u?function(w){const D={color:zr,string:Wn,number:an,enum:Wn,boolean:ir,formatted:po,padding:ri,projectionDefinition:fr,resolvedImage:Xr,variableAnchorOffsetCollection:ii};return w.type==="array"?mo(D[w.value]||zn,w.length):D[w.type]}(u):void 0),v=d.parse(h,void 0,void 0,void 0,u&&u.type==="string"?{typeAnnotation:"coerce"}:void 0);return v?Xf(new du(v,u)):wl(d.errors)}class zd{constructor(u,d){this.kind=u,this._styleExpression=d,this.isStateDependent=u!=="constant"&&!$o(d.expression)}evaluateWithoutErrorHandling(u,d,v,w,D,F){return this._styleExpression.evaluateWithoutErrorHandling(u,d,v,w,D,F)}evaluate(u,d,v,w,D,F){return this._styleExpression.evaluate(u,d,v,w,D,F)}}class Rs{constructor(u,d,v,w){this.kind=u,this.zoomStops=v,this._styleExpression=d,this.isStateDependent=u!=="camera"&&!$o(d.expression),this.interpolationType=w}evaluateWithoutErrorHandling(u,d,v,w,D,F){return this._styleExpression.evaluateWithoutErrorHandling(u,d,v,w,D,F)}evaluate(u,d,v,w,D,F){return this._styleExpression.evaluate(u,d,v,w,D,F)}interpolationFactor(u,d,v){return this.interpolationType?pr.interpolationFactor(this.interpolationType,u,d,v):0}}function id(h,u){const d=Rc(h,u);if(d.result==="error")return d;const v=d.value.expression,w=is(v);if(!w&&!cu(u))return wl([new En("","data expressions not supported")]);const D=UA(v,["zoom"]);if(!D&&!jA(u))return wl([new En("","zoom expressions not supported")]);const F=GA(v);return F||D?F instanceof En?wl([F]):F instanceof pr&&!Ml(u)?wl([new En("",'"interpolate" expressions cannot be used with this property')]):Xf(F?new Rs(w?"camera":"composite",d.value,F.labels,F instanceof pr?F.interpolation:void 0):new zd(w?"constant":"source",d.value)):wl([new En("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class dc{constructor(u,d){this._parameters=u,this._specification=d,Tn(this,Kc(this._parameters,this._specification))}static deserialize(u){return new dc(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function GA(h){let u=null;if(h instanceof $l)u=GA(h.result);else if(h instanceof So){for(const d of h.args)if(u=GA(d),u)break}else(h instanceof ot||h instanceof pr)&&h.input instanceof Ht&&h.input.name==="zoom"&&(u=h);return u instanceof En||h.eachChild(d=>{const v=GA(d);v instanceof En?u=v:!u&&v?u=new En("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):u&&v&&u!==v&&(u=new En("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),u}function Gh(h){if(h===!0||h===!1)return!0;if(!Array.isArray(h)||h.length===0)return!1;switch(h[0]){case"has":return h.length>=2&&h[1]!=="$id"&&h[1]!=="$type";case"in":return h.length>=3&&(typeof h[1]!="string"||Array.isArray(h[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return h.length!==3||Array.isArray(h[1])||Array.isArray(h[2]);case"any":case"all":for(const u of h.slice(1))if(!Gh(u)&&typeof u!="boolean")return!1;return!0;default:return!0}}const mA={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function WA(h){if(h==null)return{filter:()=>!0,needGeometry:!1};Gh(h)||(h=Vo(h));const u=Rc(h,mA);if(u.result==="error")throw new Error(u.value.map(d=>`${d.key}: ${d.message}`).join(", "));return{filter:(d,v,w)=>u.value.evaluate(d,v,{},w),needGeometry:Nd(h)}}function Dc(h,u){return h<u?-1:h>u?1:0}function Nd(h){if(!Array.isArray(h))return!1;if(h[0]==="within"||h[0]==="distance")return!0;for(let u=1;u<h.length;u++)if(Nd(h[u]))return!0;return!1}function Vo(h){if(!h)return!0;const u=h[0];return h.length<=1?u!=="any":u==="=="?Lc(h[1],h[2],"=="):u==="!="?Fc(Lc(h[1],h[2],"==")):u==="<"||u===">"||u==="<="||u===">="?Lc(h[1],h[2],u):u==="any"?(d=h.slice(1),["any"].concat(d.map(Vo))):u==="all"?["all"].concat(h.slice(1).map(Vo)):u==="none"?["all"].concat(h.slice(1).map(Vo).map(Fc)):u==="in"?QA(h[1],h.slice(2)):u==="!in"?Fc(QA(h[1],h.slice(2))):u==="has"?Iu(h[1]):u!=="!has"||Fc(Iu(h[1]));var d}function Lc(h,u,d){switch(h){case"$type":return[`filter-type-${d}`,u];case"$id":return[`filter-id-${d}`,u];default:return[`filter-${d}`,h,u]}}function QA(h,u){if(u.length===0)return!1;switch(h){case"$type":return["filter-type-in",["literal",u]];case"$id":return["filter-id-in",["literal",u]];default:return u.length>200&&!u.some(d=>typeof d!=typeof u[0])?["filter-in-large",h,["literal",u.sort(Dc)]]:["filter-in-small",h,["literal",u]]}}function Iu(h){switch(h){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",h]}}function Fc(h){return["!",h]}function Gd(h){const u=typeof h;if(u==="number"||u==="boolean"||u==="string"||h==null)return JSON.stringify(h);if(Array.isArray(h)){let w="[";for(const D of h)w+=`${Gd(D)},`;return`${w}]`}const d=Object.keys(h).sort();let v="{";for(let w=0;w<d.length;w++)v+=`${JSON.stringify(d[w])}:${Gd(h[d[w]])},`;return`${v}}`}function Uc(h){let u="";for(const d of fe)u+=`/${Gd(h[d])}`;return u}function hc(h){const u=h.value;return u?[new wt(h.key,u,"constants have been deprecated as of v8")]:[]}function ua(h){return h instanceof Number||h instanceof String||h instanceof Boolean?h.valueOf():h}function Uo(h){if(Array.isArray(h))return h.map(Uo);if(h instanceof Object&&!(h instanceof Number||h instanceof String||h instanceof Boolean)){const u={};for(const d in h)u[d]=Uo(h[d]);return u}return ua(h)}function Aa(h){const u=h.key,d=h.value,v=h.valueSpec||{},w=h.objectElementValidators||{},D=h.style,F=h.styleSpec,N=h.validateSpec;let Z=[];const ie=Qi(d);if(ie!=="object")return[new wt(u,d,`object expected, ${ie} found`)];for(const ce in d){const Ce=ce.split(".")[0],Pe=v[Ce]||v["*"];let De;if(w[Ce])De=w[Ce];else if(v[Ce])De=N;else if(w["*"])De=w["*"];else{if(!v["*"]){Z.push(new wt(u,d[ce],`unknown property "${ce}"`));continue}De=N}Z=Z.concat(De({key:(u&&`${u}.`)+ce,value:d[ce],valueSpec:Pe,style:D,styleSpec:F,object:d,objectKey:ce,validateSpec:N},d))}for(const ce in v)w[ce]||v[ce].required&&v[ce].default===void 0&&d[ce]===void 0&&Z.push(new wt(u,d,`missing required property "${ce}"`));return Z}function vf(h){const u=h.value,d=h.valueSpec,v=h.style,w=h.styleSpec,D=h.key,F=h.arrayElementValidator||h.validateSpec;if(Qi(u)!=="array")return[new wt(D,u,`array expected, ${Qi(u)} found`)];if(d.length&&u.length!==d.length)return[new wt(D,u,`array length ${d.length} expected, length ${u.length} found`)];if(d["min-length"]&&u.length<d["min-length"])return[new wt(D,u,`array length at least ${d["min-length"]} expected, length ${u.length} found`)];let N={type:d.value,values:d.values};w.$version<7&&(N.function=d.function),Qi(d.value)==="object"&&(N=d.value);let Z=[];for(let ie=0;ie<u.length;ie++)Z=Z.concat(F({array:u,arrayIndex:ie,value:u[ie],valueSpec:N,validateSpec:h.validateSpec,style:v,styleSpec:w,key:`${D}[${ie}]`}));return Z}function od(h){const u=h.key,d=h.value,v=h.valueSpec;let w=Qi(d);return w==="number"&&d!=d&&(w="NaN"),w!=="number"?[new wt(u,d,`number expected, ${w} found`)]:"minimum"in v&&d<v.minimum?[new wt(u,d,`${d} is less than the minimum value ${v.minimum}`)]:"maximum"in v&&d>v.maximum?[new wt(u,d,`${d} is greater than the maximum value ${v.maximum}`)]:[]}function ad(h){const u=h.valueSpec,d=ua(h.value.type);let v,w,D,F={};const N=d!=="categorical"&&h.value.property===void 0,Z=!N,ie=Qi(h.value.stops)==="array"&&Qi(h.value.stops[0])==="array"&&Qi(h.value.stops[0][0])==="object",ce=Aa({key:h.key,value:h.value,valueSpec:h.styleSpec.function,validateSpec:h.validateSpec,style:h.style,styleSpec:h.styleSpec,objectElementValidators:{stops:function(De){if(d==="identity")return[new wt(De.key,De.value,'identity function may not have a "stops" property')];let ze=[];const Ze=De.value;return ze=ze.concat(vf({key:De.key,value:Ze,valueSpec:De.valueSpec,validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec,arrayElementValidator:Ce})),Qi(Ze)==="array"&&Ze.length===0&&ze.push(new wt(De.key,Ze,"array must have at least one stop")),ze},default:function(De){return De.validateSpec({key:De.key,value:De.value,valueSpec:u,validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec})}}});return d==="identity"&&N&&ce.push(new wt(h.key,h.value,'missing required property "property"')),d==="identity"||h.value.stops||ce.push(new wt(h.key,h.value,'missing required property "stops"')),d==="exponential"&&h.valueSpec.expression&&!Ml(h.valueSpec)&&ce.push(new wt(h.key,h.value,"exponential functions not supported")),h.styleSpec.$version>=8&&(Z&&!cu(h.valueSpec)?ce.push(new wt(h.key,h.value,"property functions not supported")):N&&!jA(h.valueSpec)&&ce.push(new wt(h.key,h.value,"zoom functions not supported"))),d!=="categorical"&&!ie||h.value.property!==void 0||ce.push(new wt(h.key,h.value,'"property" property is required')),ce;function Ce(De){let ze=[];const Ze=De.value,lt=De.key;if(Qi(Ze)!=="array")return[new wt(lt,Ze,`array expected, ${Qi(Ze)} found`)];if(Ze.length!==2)return[new wt(lt,Ze,`array length 2 expected, length ${Ze.length} found`)];if(ie){if(Qi(Ze[0])!=="object")return[new wt(lt,Ze,`object expected, ${Qi(Ze[0])} found`)];if(Ze[0].zoom===void 0)return[new wt(lt,Ze,"object stop key must have zoom")];if(Ze[0].value===void 0)return[new wt(lt,Ze,"object stop key must have value")];if(D&&D>ua(Ze[0].zoom))return[new wt(lt,Ze[0].zoom,"stop zoom values must appear in ascending order")];ua(Ze[0].zoom)!==D&&(D=ua(Ze[0].zoom),w=void 0,F={}),ze=ze.concat(Aa({key:`${lt}[0]`,value:Ze[0],valueSpec:{zoom:{}},validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec,objectElementValidators:{zoom:od,value:Pe}}))}else ze=ze.concat(Pe({key:`${lt}[0]`,value:Ze[0],valueSpec:{},validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec},Ze));return Ll(Uo(Ze[1]))?ze.concat([new wt(`${lt}[1]`,Ze[1],"expressions are not allowed in function stops.")]):ze.concat(De.validateSpec({key:`${lt}[1]`,value:Ze[1],valueSpec:u,validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec}))}function Pe(De,ze){const Ze=Qi(De.value),lt=ua(De.value),yt=De.value!==null?De.value:ze;if(v){if(Ze!==v)return[new wt(De.key,yt,`${Ze} stop domain type must match previous stop domain type ${v}`)]}else v=Ze;if(Ze!=="number"&&Ze!=="string"&&Ze!=="boolean")return[new wt(De.key,yt,"stop domain value must be a number, string, or boolean")];if(Ze!=="number"&&d!=="categorical"){let Nt=`number expected, ${Ze} found`;return cu(u)&&d===void 0&&(Nt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new wt(De.key,yt,Nt)]}return d!=="categorical"||Ze!=="number"||isFinite(lt)&&Math.floor(lt)===lt?d!=="categorical"&&Ze==="number"&&w!==void 0&<<w?[new wt(De.key,yt,"stop domain values must appear in ascending order")]:(w=lt,d==="categorical"&< in F?[new wt(De.key,yt,"stop domain values must be unique")]:(F[lt]=!0,[])):[new wt(De.key,yt,`integer expected, found ${lt}`)]}}function ku(h){const u=(h.expressionContext==="property"?id:Rc)(Uo(h.value),h.valueSpec);if(u.result==="error")return u.value.map(v=>new wt(`${h.key}${v.key}`,h.value,v.message));const d=u.value.expression||u.value._styleExpression.expression;if(h.expressionContext==="property"&&h.propertyKey==="text-font"&&!d.outputDefined())return[new wt(h.key,h.value,`Invalid data expression for "${h.propertyKey}". Output values must be contained as literals within the expression.`)];if(h.expressionContext==="property"&&h.propertyType==="layout"&&!$o(d))return[new wt(h.key,h.value,'"feature-state" data expressions are not supported with layout properties.')];if(h.expressionContext==="filter"&&!$o(d))return[new wt(h.key,h.value,'"feature-state" data expressions are not supported with filters.')];if(h.expressionContext&&h.expressionContext.indexOf("cluster")===0){if(!UA(d,["zoom","feature-state"]))return[new wt(h.key,h.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(h.expressionContext==="cluster-initial"&&!is(d))return[new wt(h.key,h.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function qA(h){const u=h.key,d=h.value,v=h.valueSpec,w=[];return Array.isArray(v.values)?v.values.indexOf(ua(d))===-1&&w.push(new wt(u,d,`expected one of [${v.values.join(", ")}], ${JSON.stringify(d)} found`)):Object.keys(v.values).indexOf(ua(d))===-1&&w.push(new wt(u,d,`expected one of [${Object.keys(v.values).join(", ")}], ${JSON.stringify(d)} found`)),w}function Fl(h){return Gh(Uo(h.value))?ku(Tn({},h,{expressionContext:"filter",valueSpec:{value:"boolean"}})):gA(h)}function gA(h){const u=h.value,d=h.key;if(Qi(u)!=="array")return[new wt(d,u,`array expected, ${Qi(u)} found`)];const v=h.styleSpec;let w,D=[];if(u.length<1)return[new wt(d,u,"filter array must have at least 1 element")];switch(D=D.concat(qA({key:`${d}[0]`,value:u[0],valueSpec:v.filter_operator,style:h.style,styleSpec:h.styleSpec})),ua(u[0])){case"<":case"<=":case">":case">=":u.length>=2&&ua(u[1])==="$type"&&D.push(new wt(d,u,`"$type" cannot be use with operator "${u[0]}"`));case"==":case"!=":u.length!==3&&D.push(new wt(d,u,`filter array for operator "${u[0]}" must have 3 elements`));case"in":case"!in":u.length>=2&&(w=Qi(u[1]),w!=="string"&&D.push(new wt(`${d}[1]`,u[1],`string expected, ${w} found`)));for(let F=2;F<u.length;F++)w=Qi(u[F]),ua(u[1])==="$type"?D=D.concat(qA({key:`${d}[${F}]`,value:u[F],valueSpec:v.geometry_type,style:h.style,styleSpec:h.styleSpec})):w!=="string"&&w!=="number"&&w!=="boolean"&&D.push(new wt(`${d}[${F}]`,u[F],`string, number, or boolean expected, ${w} found`));break;case"any":case"all":case"none":for(let F=1;F<u.length;F++)D=D.concat(gA({key:`${d}[${F}]`,value:u[F],style:h.style,styleSpec:h.styleSpec}));break;case"has":case"!has":w=Qi(u[1]),u.length!==2?D.push(new wt(d,u,`filter array for "${u[0]}" operator must have 2 elements`)):w!=="string"&&D.push(new wt(`${d}[1]`,u[1],`string expected, ${w} found`))}return D}function il(h,u){const d=h.key,v=h.validateSpec,w=h.style,D=h.styleSpec,F=h.value,N=h.objectKey,Z=D[`${u}_${h.layerType}`];if(!Z)return[];const ie=N.match(/^(.*)-transition$/);if(u==="paint"&&ie&&Z[ie[1]]&&Z[ie[1]].transition)return v({key:d,value:F,valueSpec:D.transition,style:w,styleSpec:D});const ce=h.valueSpec||Z[N];if(!ce)return[new wt(d,F,`unknown property "${N}"`)];let Ce;if(Qi(F)==="string"&&cu(ce)&&!ce.tokens&&(Ce=/^{([^}]+)}$/.exec(F)))return[new wt(d,F,`"${N}" does not support interpolation syntax
|
||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Ce[1])} }\`.`)];const Pe=[];return h.layerType==="symbol"&&(N==="text-field"&&w&&!w.glyphs&&Pe.push(new wt(d,F,'use of "text-field" requires a style "glyphs" property')),N==="text-font"&&zA(Uo(F))&&ua(F.type)==="identity"&&Pe.push(new wt(d,F,'"text-font" does not support identity functions'))),Pe.concat(v({key:h.key,value:F,valueSpec:ce,style:w,styleSpec:D,expressionContext:"property",propertyType:u,propertyKey:N}))}function YA(h){return il(h,"paint")}function Tu(h){return il(h,"layout")}function sd(h){let u=[];const d=h.value,v=h.key,w=h.style,D=h.styleSpec;d.type||d.ref||u.push(new wt(v,d,'either "type" or "ref" is required'));let F=ua(d.type);const N=ua(d.ref);if(d.id){const Z=ua(d.id);for(let ie=0;ie<h.arrayIndex;ie++){const ce=w.layers[ie];ua(ce.id)===Z&&u.push(new wt(v,d.id,`duplicate layer id "${d.id}", previously used at line ${ce.id.__line__}`))}}if("ref"in d){let Z;["type","source","source-layer","filter","layout"].forEach(ie=>{ie in d&&u.push(new wt(v,d[ie],`"${ie}" is prohibited for ref layers`))}),w.layers.forEach(ie=>{ua(ie.id)===N&&(Z=ie)}),Z?Z.ref?u.push(new wt(v,d.ref,"ref cannot reference another ref layer")):F=ua(Z.type):u.push(new wt(v,d.ref,`ref layer "${N}" not found`))}else if(F!=="background")if(d.source){const Z=w.sources&&w.sources[d.source],ie=Z&&ua(Z.type);Z?ie==="vector"&&F==="raster"?u.push(new wt(v,d.source,`layer "${d.id}" requires a raster source`)):ie!=="raster-dem"&&F==="hillshade"?u.push(new wt(v,d.source,`layer "${d.id}" requires a raster-dem source`)):ie==="raster"&&F!=="raster"?u.push(new wt(v,d.source,`layer "${d.id}" requires a vector source`)):ie!=="vector"||d["source-layer"]?ie==="raster-dem"&&F!=="hillshade"?u.push(new wt(v,d.source,"raster-dem source can only be used with layer type 'hillshade'.")):F!=="line"||!d.paint||!d.paint["line-gradient"]||ie==="geojson"&&Z.lineMetrics||u.push(new wt(v,d,`layer "${d.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):u.push(new wt(v,d,`layer "${d.id}" must specify a "source-layer"`)):u.push(new wt(v,d.source,`source "${d.source}" not found`))}else u.push(new wt(v,d,'missing required property "source"'));return u=u.concat(Aa({key:v,value:d,valueSpec:D.layer,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*":()=>[],type:()=>h.validateSpec({key:`${v}.type`,value:d.type,valueSpec:D.layer.type,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,object:d,objectKey:"type"}),filter:Fl,layout:Z=>Aa({layer:d,key:Z.key,value:Z.value,style:Z.style,styleSpec:Z.styleSpec,validateSpec:Z.validateSpec,objectElementValidators:{"*":ie=>Tu(Tn({layerType:F},ie))}}),paint:Z=>Aa({layer:d,key:Z.key,value:Z.value,style:Z.style,styleSpec:Z.styleSpec,validateSpec:Z.validateSpec,objectElementValidators:{"*":ie=>YA(Tn({layerType:F},ie))}})}})),u}function Pu(h){const u=h.value,d=h.key,v=Qi(u);return v!=="string"?[new wt(d,u,`string expected, ${v} found`)]:[]}const Wd={promoteId:function({key:h,value:u}){if(Qi(u)==="string")return Pu({key:h,value:u});{const d=[];for(const v in u)d.push(...Pu({key:`${h}.${v}`,value:u[v]}));return d}}};function $A(h){const u=h.value,d=h.key,v=h.styleSpec,w=h.style,D=h.validateSpec;if(!u.type)return[new wt(d,u,'"type" is required')];const F=ua(u.type);let N;switch(F){case"vector":case"raster":return N=Aa({key:d,value:u,valueSpec:v[`source_${F.replace("-","_")}`],style:h.style,styleSpec:v,objectElementValidators:Wd,validateSpec:D}),N;case"raster-dem":return N=function(Z){var ie;const ce=(ie=Z.sourceName)!==null&&ie!==void 0?ie:"",Ce=Z.value,Pe=Z.styleSpec,De=Pe.source_raster_dem,ze=Z.style;let Ze=[];const lt=Qi(Ce);if(Ce===void 0)return Ze;if(lt!=="object")return Ze.push(new wt("source_raster_dem",Ce,`object expected, ${lt} found`)),Ze;const yt=ua(Ce.encoding)==="custom",Nt=["redFactor","greenFactor","blueFactor","baseShift"],Mt=Z.value.encoding?`"${Z.value.encoding}"`:"Default";for(const Re in Ce)!yt&&Nt.includes(Re)?Ze.push(new wt(Re,Ce[Re],`In "${ce}": "${Re}" is only valid when "encoding" is set to "custom". ${Mt} encoding found`)):De[Re]?Ze=Ze.concat(Z.validateSpec({key:Re,value:Ce[Re],valueSpec:De[Re],validateSpec:Z.validateSpec,style:ze,styleSpec:Pe})):Ze.push(new wt(Re,Ce[Re],`unknown property "${Re}"`));return Ze}({sourceName:d,value:u,style:h.style,styleSpec:v,validateSpec:D}),N;case"geojson":if(N=Aa({key:d,value:u,valueSpec:v.source_geojson,style:w,styleSpec:v,validateSpec:D,objectElementValidators:Wd}),u.cluster)for(const Z in u.clusterProperties){const[ie,ce]=u.clusterProperties[Z],Ce=typeof ie=="string"?[ie,["accumulated"],["get",Z]]:ie;N.push(...ku({key:`${d}.${Z}.map`,value:ce,validateSpec:D,expressionContext:"cluster-map"})),N.push(...ku({key:`${d}.${Z}.reduce`,value:Ce,validateSpec:D,expressionContext:"cluster-reduce"}))}return N;case"video":return Aa({key:d,value:u,valueSpec:v.source_video,style:w,validateSpec:D,styleSpec:v});case"image":return Aa({key:d,value:u,valueSpec:v.source_image,style:w,validateSpec:D,styleSpec:v});case"canvas":return[new wt(d,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return qA({key:`${d}.type`,value:u.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:w,validateSpec:D,styleSpec:v})}}function Ku(h){const u=h.value,d=h.styleSpec,v=d.light,w=h.style;let D=[];const F=Qi(u);if(u===void 0)return D;if(F!=="object")return D=D.concat([new wt("light",u,`object expected, ${F} found`)]),D;for(const N in u){const Z=N.match(/^(.*)-transition$/);D=D.concat(Z&&v[Z[1]]&&v[Z[1]].transition?h.validateSpec({key:N,value:u[N],valueSpec:d.transition,validateSpec:h.validateSpec,style:w,styleSpec:d}):v[N]?h.validateSpec({key:N,value:u[N],valueSpec:v[N],validateSpec:h.validateSpec,style:w,styleSpec:d}):[new wt(N,u[N],`unknown property "${N}"`)])}return D}function Ru(h){const u=h.value,d=h.styleSpec,v=d.sky,w=h.style,D=Qi(u);if(u===void 0)return[];if(D!=="object")return[new wt("sky",u,`object expected, ${D} found`)];let F=[];for(const N in u)F=F.concat(v[N]?h.validateSpec({key:N,value:u[N],valueSpec:v[N],style:w,styleSpec:d}):[new wt(N,u[N],`unknown property "${N}"`)]);return F}function yA(h){const u=h.value,d=h.styleSpec,v=d.terrain,w=h.style;let D=[];const F=Qi(u);if(u===void 0)return D;if(F!=="object")return D=D.concat([new wt("terrain",u,`object expected, ${F} found`)]),D;for(const N in u)D=D.concat(v[N]?h.validateSpec({key:N,value:u[N],valueSpec:v[N],validateSpec:h.validateSpec,style:w,styleSpec:d}):[new wt(N,u[N],`unknown property "${N}"`)]);return D}function fc(h){let u=[];const d=h.value,v=h.key;if(Array.isArray(d)){const w=[],D=[];for(const F in d)d[F].id&&w.includes(d[F].id)&&u.push(new wt(v,d,`all the sprites' ids must be unique, but ${d[F].id} is duplicated`)),w.push(d[F].id),d[F].url&&D.includes(d[F].url)&&u.push(new wt(v,d,`all the sprites' URLs must be unique, but ${d[F].url} is duplicated`)),D.push(d[F].url),u=u.concat(Aa({key:`${v}[${F}]`,value:d[F],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:h.validateSpec}));return u}return Pu({key:v,value:d})}const hu={"*":()=>[],array:vf,boolean:function(h){const u=h.value,d=h.key,v=Qi(u);return v!=="boolean"?[new wt(d,u,`boolean expected, ${v} found`)]:[]},number:od,color:function(h){const u=h.key,d=h.value,v=Qi(d);return v!=="string"?[new wt(u,d,`color expected, ${v} found`)]:Ai.parse(String(d))?[]:[new wt(u,d,`color expected, "${d}" found`)]},constants:hc,enum:qA,filter:Fl,function:ad,layer:sd,object:Aa,source:$A,light:Ku,sky:Ru,terrain:yA,projection:function(h){const u=h.value,d=h.styleSpec,v=d.projection,w=h.style,D=Qi(u);if(u===void 0)return[];if(D!=="object")return[new wt("projection",u,`object expected, ${D} found`)];let F=[];for(const N in u)F=F.concat(v[N]?h.validateSpec({key:N,value:u[N],valueSpec:v[N],style:w,styleSpec:d}):[new wt(N,u[N],`unknown property "${N}"`)]);return F},projectionDefinition:function(h){const u=h.key;let d=h.value;d=d instanceof String?d.valueOf():d;const v=Qi(d);return v!=="array"||function(w){return Array.isArray(w)&&w.length===3&&typeof w[0]=="string"&&typeof w[1]=="string"&&typeof w[2]=="number"}(d)||function(w){return!!["interpolate","step","literal"].includes(w[0])}(d)?["array","string"].includes(v)?[]:[new wt(u,d,`projection expected, invalid type "${v}" found`)]:[new wt(u,d,`projection expected, invalid array ${JSON.stringify(d)} found`)]},string:Pu,formatted:function(h){return Pu(h).length===0?[]:ku(h)},resolvedImage:function(h){return Pu(h).length===0?[]:ku(h)},padding:function(h){const u=h.key,d=h.value;if(Qi(d)==="array"){if(d.length<1||d.length>4)return[new wt(u,d,`padding requires 1 to 4 values; ${d.length} values found`)];const v={type:"number"};let w=[];for(let D=0;D<d.length;D++)w=w.concat(h.validateSpec({key:`${u}[${D}]`,value:d[D],validateSpec:h.validateSpec,valueSpec:v}));return w}return od({key:u,value:d,valueSpec:{}})},variableAnchorOffsetCollection:function(h){const u=h.key,d=h.value,v=Qi(d),w=h.styleSpec;if(v!=="array"||d.length<1||d.length%2!=0)return[new wt(u,d,"variableAnchorOffsetCollection requires a non-empty array of even length")];let D=[];for(let F=0;F<d.length;F+=2)D=D.concat(qA({key:`${u}[${F}]`,value:d[F],valueSpec:w.layout_symbol["text-anchor"]})),D=D.concat(vf({key:`${u}[${F+1}]`,value:d[F+1],valueSpec:{length:2,value:"number"},validateSpec:h.validateSpec,style:h.style,styleSpec:w}));return D},sprite:fc};function jc(h){const u=h.value,d=h.valueSpec,v=h.styleSpec;return h.validateSpec=jc,d.expression&&zA(ua(u))?ad(h):d.expression&&Ll(Uo(u))?ku(h):d.type&&hu[d.type]?hu[d.type](h):Aa(Tn({},h,{valueSpec:d.type?v[d.type]:d}))}function rt(h){const u=h.value,d=h.key,v=Pu(h);return v.length||(u.indexOf("{fontstack}")===-1&&v.push(new wt(d,u,'"glyphs" url must include a "{fontstack}" token')),u.indexOf("{range}")===-1&&v.push(new wt(d,u,'"glyphs" url must include a "{range}" token'))),v}function Ds(h,u=qe){let d=[];return d=d.concat(jc({key:"",value:h,valueSpec:u.$root,styleSpec:u,style:h,validateSpec:jc,objectElementValidators:{glyphs:rt,"*":()=>[]}})),h.constants&&(d=d.concat(hc({key:"constants",value:h.constants,style:h,styleSpec:u,validateSpec:jc}))),Li(d)}function Eo(h){return function(u){return h({...u,validateSpec:jc})}}function Li(h){return[].concat(h).sort((u,d)=>u.line-d.line)}function Wr(h){return function(...u){return Li(h.apply(this,u))}}Ds.source=Wr(Eo($A)),Ds.sprite=Wr(Eo(fc)),Ds.glyphs=Wr(Eo(rt)),Ds.light=Wr(Eo(Ku)),Ds.sky=Wr(Eo(Ru)),Ds.terrain=Wr(Eo(yA)),Ds.layer=Wr(Eo(sd)),Ds.filter=Wr(Eo(Fl)),Ds.paintProperty=Wr(Eo(YA)),Ds.layoutProperty=Wr(Eo(Tu));const Ma=Ds,ld=Ma.light,Qd=Ma.sky,Ms=Ma.paintProperty,za=Ma.layoutProperty;function ya(h,u){let d=!1;if(u&&u.length)for(const v of u)h.fire(new it(new Error(v.message))),d=!0;return d}class iA{constructor(u,d,v){const w=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const F=new Int32Array(this.arrayBuffer);u=F[0],this.d=(d=F[1])+2*(v=F[2]);for(let Z=0;Z<this.d*this.d;Z++){const ie=F[3+Z],ce=F[3+Z+1];w.push(ie===ce?null:F.subarray(ie,ce))}const N=F[3+w.length+1];this.keys=F.subarray(F[3+w.length],N),this.bboxes=F.subarray(N),this.insert=this._insertReadonly}else{this.d=d+2*v;for(let F=0;F<this.d*this.d;F++)w.push([]);this.keys=[],this.bboxes=[]}this.n=d,this.extent=u,this.padding=v,this.scale=d/u,this.uid=0;const D=v/d*u;this.min=-D,this.max=u+D}insert(u,d,v,w,D){this._forEachCell(d,v,w,D,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(d),this.bboxes.push(v),this.bboxes.push(w),this.bboxes.push(D)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,d,v,w,D,F){this.cells[D].push(F)}query(u,d,v,w,D){const F=this.min,N=this.max;if(u<=F&&d<=F&&N<=v&&N<=w&&!D)return Array.prototype.slice.call(this.keys);{const Z=[];return this._forEachCell(u,d,v,w,this._queryCell,Z,{},D),Z}}_queryCell(u,d,v,w,D,F,N,Z){const ie=this.cells[D];if(ie!==null){const ce=this.keys,Ce=this.bboxes;for(let Pe=0;Pe<ie.length;Pe++){const De=ie[Pe];if(N[De]===void 0){const ze=4*De;(Z?Z(Ce[ze+0],Ce[ze+1],Ce[ze+2],Ce[ze+3]):u<=Ce[ze+2]&&d<=Ce[ze+3]&&v>=Ce[ze+0]&&w>=Ce[ze+1])?(N[De]=!0,F.push(ce[De])):N[De]=!1}}}}_forEachCell(u,d,v,w,D,F,N,Z){const ie=this._convertToCellCoord(u),ce=this._convertToCellCoord(d),Ce=this._convertToCellCoord(v),Pe=this._convertToCellCoord(w);for(let De=ie;De<=Ce;De++)for(let ze=ce;ze<=Pe;ze++){const Ze=this.d*ze+De;if((!Z||Z(this._convertFromCellCoord(De),this._convertFromCellCoord(ze),this._convertFromCellCoord(De+1),this._convertFromCellCoord(ze+1)))&&D.call(this,u,d,v,w,Ze,F,N,Z))return}}_convertFromCellCoord(u){return(u-this.padding)/this.scale}_convertToCellCoord(u){return Math.max(0,Math.min(this.d-1,Math.floor(u*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const u=this.cells,d=3+this.cells.length+1+1;let v=0;for(let F=0;F<this.cells.length;F++)v+=this.cells[F].length;const w=new Int32Array(d+v+this.keys.length+this.bboxes.length);w[0]=this.extent,w[1]=this.n,w[2]=this.padding;let D=d;for(let F=0;F<u.length;F++){const N=u[F];w[3+F]=D,w.set(N,D),D+=N.length}return w[3+u.length]=D,w.set(this.keys,D),D+=this.keys.length,w[3+u.length+1]=D,w.set(this.bboxes,D),D+=this.bboxes.length,w.buffer}static serialize(u,d){const v=u.toArrayBuffer();return d&&d.push(v),{buffer:v}}static deserialize(u){return new iA(u.buffer)}}const Sa={};function dr(h,u,d={}){if(Sa[h])throw new Error(`${h} is already registered.`);Object.defineProperty(u,"_classRegistryKey",{value:h,writeable:!1}),Sa[h]={klass:u,omit:d.omit||[],shallow:d.shallow||[]}}dr("Object",Object),dr("TransferableGridIndex",iA),dr("Color",Ai),dr("Error",Error),dr("AJAXError",hi),dr("ResolvedImage",Mo),dr("StylePropertyFunction",dc),dr("StyleExpression",du,{omit:["_evaluator"]}),dr("ZoomDependentExpression",Rs),dr("ZoomConstantExpression",zd),dr("CompoundExpression",Ht,{omit:["_evaluate"]});for(const h in Au)Au[h]._classRegistryKey||dr(`Expression_${h}`,Au[h]);function ys(h){return h&&typeof ArrayBuffer<"u"&&(h instanceof ArrayBuffer||h.constructor&&h.constructor.name==="ArrayBuffer")}function zc(h){return h.$name||h.constructor._classRegistryKey}function Ss(h){return!function(u){if(u===null||typeof u!="object")return!1;const d=zc(u);return!(!d||d==="Object")}(h)&&(h==null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h instanceof Boolean||h instanceof Number||h instanceof String||h instanceof Date||h instanceof RegExp||h instanceof Blob||h instanceof Error||ys(h)||Vt(h)||ArrayBuffer.isView(h)||h instanceof ImageData)}function VA(h,u){if(Ss(h))return(ys(h)||Vt(h))&&u&&u.push(h),ArrayBuffer.isView(h)&&u&&u.push(h.buffer),h instanceof ImageData&&u&&u.push(h.data.buffer),h;if(Array.isArray(h)){const D=[];for(const F of h)D.push(VA(F,u));return D}if(typeof h!="object")throw new Error("can't serialize object of type "+typeof h);const d=zc(h);if(!d)throw new Error(`can't serialize object of unregistered class ${h.constructor.name}`);if(!Sa[d])throw new Error(`${d} is not registered.`);const{klass:v}=Sa[d],w=v.serialize?v.serialize(h,u):{};if(v.serialize){if(u&&w===u[u.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const D in h){if(!h.hasOwnProperty(D)||Sa[d].omit.indexOf(D)>=0)continue;const F=h[D];w[D]=Sa[d].shallow.indexOf(D)>=0?F:VA(F,u)}h instanceof Error&&(w.message=h.message)}if(w.$name)throw new Error("$name property is reserved for worker serialization logic.");return d!=="Object"&&(w.$name=d),w}function ud(h){if(Ss(h))return h;if(Array.isArray(h))return h.map(ud);if(typeof h!="object")throw new Error("can't deserialize object of type "+typeof h);const u=zc(h)||"Object";if(!Sa[u])throw new Error(`can't deserialize unregistered class ${u}`);const{klass:d}=Sa[u];if(!d)throw new Error(`can't deserialize unregistered class ${u}`);if(d.deserialize)return d.deserialize(h);const v=Object.create(d.prototype);for(const w of Object.keys(h)){if(w==="$name")continue;const D=h[w];v[w]=Sa[u].shallow.indexOf(w)>=0?D:ud(D)}return v}class Ad{constructor(){this.first=!0}update(u,d){const v=Math.floor(u);return this.first?(this.first=!1,this.lastIntegerZoom=v,this.lastIntegerZoomTime=0,this.lastZoom=u,this.lastFloorZoom=v,!0):(this.lastFloorZoom>v?(this.lastIntegerZoom=v+1,this.lastIntegerZoomTime=d):this.lastFloorZoom<v&&(this.lastIntegerZoom=v,this.lastIntegerZoomTime=d),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=v,!0))}}const Si={"Latin-1 Supplement":h=>h>=128&&h<=255,"Hangul Jamo":h=>h>=4352&&h<=4607,Khmer:h=>h>=6016&&h<=6143,"General Punctuation":h=>h>=8192&&h<=8303,"Letterlike Symbols":h=>h>=8448&&h<=8527,"Number Forms":h=>h>=8528&&h<=8591,"Miscellaneous Technical":h=>h>=8960&&h<=9215,"Control Pictures":h=>h>=9216&&h<=9279,"Optical Character Recognition":h=>h>=9280&&h<=9311,"Enclosed Alphanumerics":h=>h>=9312&&h<=9471,"Geometric Shapes":h=>h>=9632&&h<=9727,"Miscellaneous Symbols":h=>h>=9728&&h<=9983,"Miscellaneous Symbols and Arrows":h=>h>=11008&&h<=11263,"Ideographic Description Characters":h=>h>=12272&&h<=12287,"CJK Symbols and Punctuation":h=>h>=12288&&h<=12351,Katakana:h=>h>=12448&&h<=12543,Kanbun:h=>h>=12688&&h<=12703,"CJK Strokes":h=>h>=12736&&h<=12783,"Enclosed CJK Letters and Months":h=>h>=12800&&h<=13055,"CJK Compatibility":h=>h>=13056&&h<=13311,"Yijing Hexagram Symbols":h=>h>=19904&&h<=19967,"Private Use Area":h=>h>=57344&&h<=63743,"Vertical Forms":h=>h>=65040&&h<=65055,"CJK Compatibility Forms":h=>h>=65072&&h<=65103,"Small Form Variants":h=>h>=65104&&h<=65135,"Halfwidth and Fullwidth Forms":h=>h>=65280&&h<=65519};function cd(h){for(const u of h)if(oA(u.charCodeAt(0)))return!0;return!1}function Ul(h){for(const u of h)if(!vA(u.charCodeAt(0)))return!1;return!0}function dd(h){const u=h.map(d=>{try{return new RegExp(`\\p{sc=${d}}`,"u").source}catch{return null}}).filter(d=>d);return new RegExp(u.join("|"),"u")}const hd=dd(["Arab","Dupl","Mong","Ougr","Syrc"]);function vA(h){return!hd.test(String.fromCodePoint(h))}const HA=dd(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function oA(h){return!(h!==746&&h!==747&&(h<4352||!(Si["CJK Compatibility Forms"](h)&&!(h>=65097&&h<=65103)||Si["CJK Compatibility"](h)||Si["CJK Strokes"](h)||!(!Si["CJK Symbols and Punctuation"](h)||h>=12296&&h<=12305||h>=12308&&h<=12319||h===12336)||Si["Enclosed CJK Letters and Months"](h)||Si["Ideographic Description Characters"](h)||Si.Kanbun(h)||Si.Katakana(h)&&h!==12540||!(!Si["Halfwidth and Fullwidth Forms"](h)||h===65288||h===65289||h===65293||h>=65306&&h<=65310||h===65339||h===65341||h===65343||h>=65371&&h<=65503||h===65507||h>=65512&&h<=65519)||!(!Si["Small Form Variants"](h)||h>=65112&&h<=65118||h>=65123&&h<=65126)||Si["Vertical Forms"](h)||Si["Yijing Hexagram Symbols"](h)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(h))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(h))||HA.test(String.fromCodePoint(h)))))}function pc(h){return!(oA(h)||function(u){return!!(Si["Latin-1 Supplement"](u)&&(u===167||u===169||u===174||u===177||u===188||u===189||u===190||u===215||u===247)||Si["General Punctuation"](u)&&(u===8214||u===8224||u===8225||u===8240||u===8241||u===8251||u===8252||u===8258||u===8263||u===8264||u===8265||u===8273)||Si["Letterlike Symbols"](u)||Si["Number Forms"](u)||Si["Miscellaneous Technical"](u)&&(u>=8960&&u<=8967||u>=8972&&u<=8991||u>=8996&&u<=9e3||u===9003||u>=9085&&u<=9114||u>=9150&&u<=9165||u===9167||u>=9169&&u<=9179||u>=9186&&u<=9215)||Si["Control Pictures"](u)&&u!==9251||Si["Optical Character Recognition"](u)||Si["Enclosed Alphanumerics"](u)||Si["Geometric Shapes"](u)||Si["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||Si["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||Si["CJK Symbols and Punctuation"](u)||Si.Katakana(u)||Si["Private Use Area"](u)||Si["CJK Compatibility Forms"](u)||Si["Small Form Variants"](u)||Si["Halfwidth and Fullwidth Forms"](u)||u===8734||u===8756||u===8757||u>=9984&&u<=10087||u>=10102&&u<=10131||u===65532||u===65533)}(h))}const Ea=dd(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function bo(h){return Ea.test(String.fromCodePoint(h))}function fu(h,u){return!(!u&&bo(h)||h>=2304&&h<=3583||h>=3840&&h<=4255||Si.Khmer(h))}function Ls(h){for(const u of h)if(bo(u.charCodeAt(0)))return!0;return!1}const Ka=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(h){this.pluginStatus=h.pluginStatus,this.pluginURL=h.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(h){if(Ka.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=h.applyArabicShaping,this.processBidirectionalText=h.processBidirectionalText,this.processStyledBidirectionalText=h.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(h,u){return a(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(h.pluginStatus!=="loading")return this.setState(h),h;const d=h.pluginURL,v=new Promise(D=>{this.loadScriptResolve=D});u(d);const w=new Promise(D=>setTimeout(()=>D(),this.TIMEOUT));if(yield Promise.race([v,w]),this.isParsed()){const D={pluginStatus:"loaded",pluginURL:d};return this.setState(D),D}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${d}`)})}};class Ho{constructor(u,d){this.zoom=u,d?(this.now=d.now,this.fadeDuration=d.fadeDuration,this.zoomHistory=d.zoomHistory,this.transition=d.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ad,this.transition={})}isSupportedScript(u){return function(d,v){for(const w of d)if(!fu(w.charCodeAt(0),v))return!1;return!0}(u,Ka.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,d=u-Math.floor(u),v=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:d+(1-d)*v}:{fromScale:.5,toScale:1,t:1-(1-v)*d}}}class Zl{constructor(u,d){this.property=u,this.value=d,this.expression=function(v,w){if(zA(v))return new dc(v,w);if(Ll(v)){const D=id(v,w);if(D.result==="error")throw new Error(D.value.map(F=>`${F.key}: ${F.message}`).join(", "));return D.value}{let D=v;return w.type==="color"&&typeof v=="string"?D=Ai.parse(v):w.type!=="padding"||typeof v!="number"&&!Array.isArray(v)?w.type==="variableAnchorOffsetCollection"&&Array.isArray(v)?D=Ta.parse(v):w.type==="projectionDefinition"&&typeof v=="string"&&(D=ja.parse(v)):D=kr.parse(v),{kind:"constant",evaluate:()=>D}}}(d===void 0?u.specification.default:d,u.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(u,d,v){return this.property.possiblyEvaluate(this,u,d,v)}}class Du{constructor(u){this.property=u,this.value=new Zl(u,void 0)}transitioned(u,d){return new qd(this.property,this.value,d,ut({},u.transition,this.transition),u.now)}untransitioned(){return new qd(this.property,this.value,null,{},0)}}class mc{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues)}getValue(u){return we(this._values[u].value.value)}setValue(u,d){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Du(this._values[u].property)),this._values[u].value=new Zl(this._values[u].property,d===null?void 0:we(d))}getTransition(u){return we(this._values[u].transition)}setTransition(u,d){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Du(this._values[u].property)),this._values[u].transition=we(d)||void 0}serialize(){const u={};for(const d of Object.keys(this._values)){const v=this.getValue(d);v!==void 0&&(u[d]=v);const w=this.getTransition(d);w!==void 0&&(u[`${d}-transition`]=w)}return u}transitioned(u,d){const v=new _A(this._properties);for(const w of Object.keys(this._values))v._values[w]=this._values[w].transitioned(u,d._values[w]);return v}untransitioned(){const u=new _A(this._properties);for(const d of Object.keys(this._values))u._values[d]=this._values[d].untransitioned();return u}}class qd{constructor(u,d,v,w,D){this.property=u,this.value=d,this.begin=D+w.delay||0,this.end=this.begin+w.duration||0,u.specification.transition&&(w.delay||w.duration)&&(this.prior=v)}possiblyEvaluate(u,d,v){const w=u.now||0,D=this.value.possiblyEvaluate(u,d,v),F=this.prior;if(F){if(w>this.end)return this.prior=null,D;if(this.value.isDataDriven())return this.prior=null,D;if(w<this.begin)return F.possiblyEvaluate(u,d,v);{const N=(w-this.begin)/(this.end-this.begin);return this.property.interpolate(F.possiblyEvaluate(u,d,v),D,Ue(N))}}return D}}class _A{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,d,v){const w=new cs(this._properties);for(const D of Object.keys(this._values))w._values[D]=this._values[D].possiblyEvaluate(u,d,v);return w}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class gc{constructor(u){this._properties=u,this._values=Object.create(u.defaultPropertyValues)}hasValue(u){return this._values[u].value!==void 0}getValue(u){return we(this._values[u].value)}setValue(u,d){this._values[u]=new Zl(this._values[u].property,d===null?void 0:we(d))}serialize(){const u={};for(const d of Object.keys(this._values)){const v=this.getValue(d);v!==void 0&&(u[d]=v)}return u}possiblyEvaluate(u,d,v){const w=new cs(this._properties);for(const D of Object.keys(this._values))w._values[D]=this._values[D].possiblyEvaluate(u,d,v);return w}}class ma{constructor(u,d,v){this.property=u,this.value=d,this.parameters=v}isConstant(){return this.value.kind==="constant"}constantOr(u){return this.value.kind==="constant"?this.value.value:u}evaluate(u,d,v,w){return this.property.evaluate(this.value,this.parameters,u,d,v,w)}}class cs{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class cr{constructor(u){this.specification=u}possiblyEvaluate(u,d){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(d)}interpolate(u,d,v){const w=Ci[this.specification.type];return w?w(u,d,v):u}}class qr{constructor(u,d){this.specification=u,this.overrides=d}possiblyEvaluate(u,d,v,w){return new ma(this,u.expression.kind==="constant"||u.expression.kind==="camera"?{kind:"constant",value:u.expression.evaluate(d,null,{},v,w)}:u.expression,d)}interpolate(u,d,v){if(u.value.kind!=="constant"||d.value.kind!=="constant")return u;if(u.value.value===void 0||d.value.value===void 0)return new ma(this,{kind:"constant",value:void 0},u.parameters);const w=Ci[this.specification.type];if(w){const D=w(u.value.value,d.value.value,v);return new ma(this,{kind:"constant",value:D},u.parameters)}return u}evaluate(u,d,v,w,D,F){return u.kind==="constant"?u.value:u.evaluate(d,v,w,D,F)}}class Lu extends qr{possiblyEvaluate(u,d,v,w){if(u.value===void 0)return new ma(this,{kind:"constant",value:void 0},d);if(u.expression.kind==="constant"){const D=u.expression.evaluate(d,null,{},v,w),F=u.property.specification.type==="resolvedImage"&&typeof D!="string"?D.name:D,N=this._calculate(F,F,F,d);return new ma(this,{kind:"constant",value:N},d)}if(u.expression.kind==="camera"){const D=this._calculate(u.expression.evaluate({zoom:d.zoom-1}),u.expression.evaluate({zoom:d.zoom}),u.expression.evaluate({zoom:d.zoom+1}),d);return new ma(this,{kind:"constant",value:D},d)}return new ma(this,u.expression,d)}evaluate(u,d,v,w,D,F){if(u.kind==="source"){const N=u.evaluate(d,v,w,D,F);return this._calculate(N,N,N,d)}return u.kind==="composite"?this._calculate(u.evaluate({zoom:Math.floor(d.zoom)-1},v,w),u.evaluate({zoom:Math.floor(d.zoom)},v,w),u.evaluate({zoom:Math.floor(d.zoom)+1},v,w),d):u.value}_calculate(u,d,v,w){return w.zoom>w.zoomHistory.lastIntegerZoom?{from:u,to:d}:{from:v,to:d}}interpolate(u){return u}}class ZA{constructor(u){this.specification=u}possiblyEvaluate(u,d,v,w){if(u.value!==void 0){if(u.expression.kind==="constant"){const D=u.expression.evaluate(d,null,{},v,w);return this._calculate(D,D,D,d)}return this._calculate(u.expression.evaluate(new Ho(Math.floor(d.zoom-1),d)),u.expression.evaluate(new Ho(Math.floor(d.zoom),d)),u.expression.evaluate(new Ho(Math.floor(d.zoom+1),d)),d)}}_calculate(u,d,v,w){return w.zoom>w.zoomHistory.lastIntegerZoom?{from:u,to:d}:{from:v,to:d}}interpolate(u){return u}}class pu{constructor(u){this.specification=u}possiblyEvaluate(u,d,v,w){return!!u.expression.evaluate(d,null,{},v,w)}interpolate(){return!1}}class va{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const d in u){const v=u[d];v.specification.overridable&&this.overridableProperties.push(d);const w=this.defaultPropertyValues[d]=new Zl(v,void 0),D=this.defaultTransitionablePropertyValues[d]=new Du(v);this.defaultTransitioningPropertyValues[d]=D.untransitioned(),this.defaultPossiblyEvaluatedValues[d]=w.possiblyEvaluate({})}}}dr("DataDrivenProperty",qr),dr("DataConstantProperty",cr),dr("CrossFadedDataDrivenProperty",Lu),dr("CrossFadedProperty",ZA),dr("ColorRampProperty",pu);const _f="-transition";class Xl extends Ut{constructor(u,d){if(super(),this.id=u.id,this.type=u.type,this._featureFilter={filter:()=>!0,needGeometry:!1},u.type!=="custom"&&(this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,u.type!=="background"&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),d.layout&&(this._unevaluatedLayout=new gc(d.layout)),d.paint)){this._transitionablePaint=new mc(d.paint);for(const v in u.paint)this.setPaintProperty(v,u.paint[v],{validate:!1});for(const v in u.layout)this.setLayoutProperty(v,u.layout[v],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new cs(d.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return u==="visibility"?this.visibility:this._unevaluatedLayout.getValue(u)}setLayoutProperty(u,d,v={}){d!=null&&this._validate(za,`layers.${this.id}.layout.${u}`,u,d,v)||(u!=="visibility"?this._unevaluatedLayout.setValue(u,d):this.visibility=d)}getPaintProperty(u){return u.endsWith(_f)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,d,v={}){if(d!=null&&this._validate(Ms,`layers.${this.id}.paint.${u}`,u,d,v))return!1;if(u.endsWith(_f))return this._transitionablePaint.setTransition(u.slice(0,-11),d||void 0),!1;{const w=this._transitionablePaint._values[u],D=w.property.specification["property-type"]==="cross-faded-data-driven",F=w.value.isDataDriven(),N=w.value;this._transitionablePaint.setValue(u,d),this._handleSpecialPaintPropertyUpdate(u);const Z=this._transitionablePaint._values[u].value;return Z.isDataDriven()||F||D||this._handleOverridablePaintPropertyUpdate(u,N,Z)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,d,v){return!1}isHidden(u){return!!(this.minzoom&&u<this.minzoom)||!!(this.maxzoom&&u>=this.maxzoom)||this.visibility==="none"}updateTransitions(u){this._transitioningPaint=this._transitionablePaint.transitioned(u,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(u,d){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,d)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,d)}serialize(){const u={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&&(u.layout=u.layout||{},u.layout.visibility=this.visibility),Ke(u,(d,v)=>!(d===void 0||v==="layout"&&!Object.keys(d).length||v==="paint"&&!Object.keys(d).length))}_validate(u,d,v,w,D={}){return(!D||D.validate!==!1)&&ya(this,u.call(Ma,{key:d,layerType:this.type,objectKey:v,value:w,styleSpec:qe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const d=this.paint.get(u);if(d instanceof ma&&cu(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1}}const Cf={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class mu{constructor(u,d){this._structArray=u,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class To{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,d){return u._trim(),d&&(u.isTransferred=!0,d.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const d=Object.create(this.prototype);return d.arrayBuffer=u.arrayBuffer,d.length=u.length,d.capacity=u.arrayBuffer.byteLength/d.bytesPerElement,d._refreshViews(),d}_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(u){this.reserve(u),this.length=u}reserve(u){if(u>this.capacity){this.capacity=Math.max(u,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const d=this.uint8;this._refreshViews(),d&&this.uint8.set(d)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Oa(h,u=1){let d=0,v=0;return{members:h.map(w=>{const D=Cf[w.type].BYTES_PER_ELEMENT,F=d=Yd(d,Math.max(u,D)),N=w.components||1;return v=Math.max(v,D),d+=D*N,{name:w.name,type:w.type,components:N,offset:F}}),size:Yd(d,Math.max(v,u)),alignment:u}}function Yd(h,u){return Math.ceil(h/u)*u}class CA extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d){const v=this.length;return this.resize(v+1),this.emplace(v,u,d)}emplace(u,d,v){const w=2*u;return this.int16[w+0]=d,this.int16[w+1]=v,u}}CA.prototype.bytesPerElement=4,dr("StructArrayLayout2i4",CA);class $d extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,d,v)}emplace(u,d,v,w){const D=3*u;return this.int16[D+0]=d,this.int16[D+1]=v,this.int16[D+2]=w,u}}$d.prototype.bytesPerElement=6,dr("StructArrayLayout3i6",$d);class bA extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v,w){const D=this.length;return this.resize(D+1),this.emplace(D,u,d,v,w)}emplace(u,d,v,w,D){const F=4*u;return this.int16[F+0]=d,this.int16[F+1]=v,this.int16[F+2]=w,this.int16[F+3]=D,u}}bA.prototype.bytesPerElement=8,dr("StructArrayLayout4i8",bA);class Na extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D,F){const N=this.length;return this.resize(N+1),this.emplace(N,u,d,v,w,D,F)}emplace(u,d,v,w,D,F,N){const Z=6*u;return this.int16[Z+0]=d,this.int16[Z+1]=v,this.int16[Z+2]=w,this.int16[Z+3]=D,this.int16[Z+4]=F,this.int16[Z+5]=N,u}}Na.prototype.bytesPerElement=12,dr("StructArrayLayout2i4i12",Na);class yc extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D,F){const N=this.length;return this.resize(N+1),this.emplace(N,u,d,v,w,D,F)}emplace(u,d,v,w,D,F,N){const Z=4*u,ie=8*u;return this.int16[Z+0]=d,this.int16[Z+1]=v,this.uint8[ie+4]=w,this.uint8[ie+5]=D,this.uint8[ie+6]=F,this.uint8[ie+7]=N,u}}yc.prototype.bytesPerElement=8,dr("StructArrayLayout2i4ub8",yc);class jl extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d){const v=this.length;return this.resize(v+1),this.emplace(v,u,d)}emplace(u,d,v){const w=2*u;return this.float32[w+0]=d,this.float32[w+1]=v,u}}jl.prototype.bytesPerElement=8,dr("StructArrayLayout2f8",jl);class ol extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D,F,N,Z,ie,ce){const Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,u,d,v,w,D,F,N,Z,ie,ce)}emplace(u,d,v,w,D,F,N,Z,ie,ce,Ce){const Pe=10*u;return this.uint16[Pe+0]=d,this.uint16[Pe+1]=v,this.uint16[Pe+2]=w,this.uint16[Pe+3]=D,this.uint16[Pe+4]=F,this.uint16[Pe+5]=N,this.uint16[Pe+6]=Z,this.uint16[Pe+7]=ie,this.uint16[Pe+8]=ce,this.uint16[Pe+9]=Ce,u}}ol.prototype.bytesPerElement=20,dr("StructArrayLayout10ui20",ol);class Fu extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe){const De=this.length;return this.resize(De+1),this.emplace(De,u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe)}emplace(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De){const ze=12*u;return this.int16[ze+0]=d,this.int16[ze+1]=v,this.int16[ze+2]=w,this.int16[ze+3]=D,this.uint16[ze+4]=F,this.uint16[ze+5]=N,this.uint16[ze+6]=Z,this.uint16[ze+7]=ie,this.int16[ze+8]=ce,this.int16[ze+9]=Ce,this.int16[ze+10]=Pe,this.int16[ze+11]=De,u}}Fu.prototype.bytesPerElement=24,dr("StructArrayLayout4i4ui4i24",Fu);class vc extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,d,v)}emplace(u,d,v,w){const D=3*u;return this.float32[D+0]=d,this.float32[D+1]=v,this.float32[D+2]=w,u}}vc.prototype.bytesPerElement=12,dr("StructArrayLayout3f12",vc);class gu extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const d=this.length;return this.resize(d+1),this.emplace(d,u)}emplace(u,d){return this.uint32[1*u+0]=d,u}}gu.prototype.bytesPerElement=4,dr("StructArrayLayout1ul4",gu);class vs extends To{_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(u,d,v,w,D,F,N,Z,ie){const ce=this.length;return this.resize(ce+1),this.emplace(ce,u,d,v,w,D,F,N,Z,ie)}emplace(u,d,v,w,D,F,N,Z,ie,ce){const Ce=10*u,Pe=5*u;return this.int16[Ce+0]=d,this.int16[Ce+1]=v,this.int16[Ce+2]=w,this.int16[Ce+3]=D,this.int16[Ce+4]=F,this.int16[Ce+5]=N,this.uint32[Pe+3]=Z,this.uint16[Ce+8]=ie,this.uint16[Ce+9]=ce,u}}vs.prototype.bytesPerElement=20,dr("StructArrayLayout6i1ul2ui20",vs);class Za extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D,F){const N=this.length;return this.resize(N+1),this.emplace(N,u,d,v,w,D,F)}emplace(u,d,v,w,D,F,N){const Z=6*u;return this.int16[Z+0]=d,this.int16[Z+1]=v,this.int16[Z+2]=w,this.int16[Z+3]=D,this.int16[Z+4]=F,this.int16[Z+5]=N,u}}Za.prototype.bytesPerElement=12,dr("StructArrayLayout2i2i2i12",Za);class Jl extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D){const F=this.length;return this.resize(F+1),this.emplace(F,u,d,v,w,D)}emplace(u,d,v,w,D,F){const N=4*u,Z=8*u;return this.float32[N+0]=d,this.float32[N+1]=v,this.float32[N+2]=w,this.int16[Z+6]=D,this.int16[Z+7]=F,u}}Jl.prototype.bytesPerElement=16,dr("StructArrayLayout2f1f2i16",Jl);class eu extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,v,w,D,F){const N=this.length;return this.resize(N+1),this.emplace(N,u,d,v,w,D,F)}emplace(u,d,v,w,D,F,N){const Z=16*u,ie=4*u,ce=8*u;return this.uint8[Z+0]=d,this.uint8[Z+1]=v,this.float32[ie+1]=w,this.float32[ie+2]=D,this.int16[ce+6]=F,this.int16[ce+7]=N,u}}eu.prototype.bytesPerElement=16,dr("StructArrayLayout2ub2f2i16",eu);class aA extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,d,v)}emplace(u,d,v,w){const D=3*u;return this.uint16[D+0]=d,this.uint16[D+1]=v,this.uint16[D+2]=w,u}}aA.prototype.bytesPerElement=6,dr("StructArrayLayout3ui6",aA);class yu extends To{_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(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt){const Nt=this.length;return this.resize(Nt+1),this.emplace(Nt,u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt)}emplace(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt,Nt){const Mt=24*u,Re=12*u,at=48*u;return this.int16[Mt+0]=d,this.int16[Mt+1]=v,this.uint16[Mt+2]=w,this.uint16[Mt+3]=D,this.uint32[Re+2]=F,this.uint32[Re+3]=N,this.uint32[Re+4]=Z,this.uint16[Mt+10]=ie,this.uint16[Mt+11]=ce,this.uint16[Mt+12]=Ce,this.float32[Re+7]=Pe,this.float32[Re+8]=De,this.uint8[at+36]=ze,this.uint8[at+37]=Ze,this.uint8[at+38]=lt,this.uint32[Re+10]=yt,this.int16[Mt+22]=Nt,u}}yu.prototype.bytesPerElement=48,dr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",yu);class _c extends To{_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(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt,Nt,Mt,Re,at,Ot,un,Fn,mn,bn,Vn,Ln){const rr=this.length;return this.resize(rr+1),this.emplace(rr,u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt,Nt,Mt,Re,at,Ot,un,Fn,mn,bn,Vn,Ln)}emplace(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt,Nt,Mt,Re,at,Ot,un,Fn,mn,bn,Vn,Ln,rr){const On=32*u,Ur=16*u;return this.int16[On+0]=d,this.int16[On+1]=v,this.int16[On+2]=w,this.int16[On+3]=D,this.int16[On+4]=F,this.int16[On+5]=N,this.int16[On+6]=Z,this.int16[On+7]=ie,this.uint16[On+8]=ce,this.uint16[On+9]=Ce,this.uint16[On+10]=Pe,this.uint16[On+11]=De,this.uint16[On+12]=ze,this.uint16[On+13]=Ze,this.uint16[On+14]=lt,this.uint16[On+15]=yt,this.uint16[On+16]=Nt,this.uint16[On+17]=Mt,this.uint16[On+18]=Re,this.uint16[On+19]=at,this.uint16[On+20]=Ot,this.uint16[On+21]=un,this.uint16[On+22]=Fn,this.uint32[Ur+12]=mn,this.float32[Ur+13]=bn,this.float32[Ur+14]=Vn,this.uint16[On+30]=Ln,this.uint16[On+31]=rr,u}}_c.prototype.bytesPerElement=64,dr("StructArrayLayout8i15ui1ul2f2ui64",_c);class Uu extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const d=this.length;return this.resize(d+1),this.emplace(d,u)}emplace(u,d){return this.float32[1*u+0]=d,u}}Uu.prototype.bytesPerElement=4,dr("StructArrayLayout1f4",Uu);class zl extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,d,v)}emplace(u,d,v,w){const D=3*u;return this.uint16[6*u+0]=d,this.float32[D+1]=v,this.float32[D+2]=w,u}}zl.prototype.bytesPerElement=12,dr("StructArrayLayout1ui2f12",zl);class fd extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,d,v)}emplace(u,d,v,w){const D=4*u;return this.uint32[2*u+0]=d,this.uint16[D+2]=v,this.uint16[D+3]=w,u}}fd.prototype.bytesPerElement=8,dr("StructArrayLayout1ul2ui8",fd);class k extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d){const v=this.length;return this.resize(v+1),this.emplace(v,u,d)}emplace(u,d,v){const w=2*u;return this.uint16[w+0]=d,this.uint16[w+1]=v,u}}k.prototype.bytesPerElement=4,dr("StructArrayLayout2ui4",k);class l extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const d=this.length;return this.resize(d+1),this.emplace(d,u)}emplace(u,d){return this.uint16[1*u+0]=d,u}}l.prototype.bytesPerElement=2,dr("StructArrayLayout1ui2",l);class c extends To{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d,v,w){const D=this.length;return this.resize(D+1),this.emplace(D,u,d,v,w)}emplace(u,d,v,w,D){const F=4*u;return this.float32[F+0]=d,this.float32[F+1]=v,this.float32[F+2]=w,this.float32[F+3]=D,u}}c.prototype.bytesPerElement=16,dr("StructArrayLayout4f16",c);class C extends mu{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 P(this.anchorPointX,this.anchorPointY)}}C.prototype.size=20;class M extends vs{get(u){return new C(this,u)}}dr("CollisionBoxArray",M);class K extends mu{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(u){this._structArray.uint8[this._pos1+37]=u}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(u){this._structArray.uint8[this._pos1+38]=u}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(u){this._structArray.uint32[this._pos4+10]=u}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}K.prototype.size=48;class z extends yu{get(u){return new K(this,u)}}dr("PlacedSymbolArray",z);class Y extends mu{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(u){this._structArray.uint32[this._pos4+12]=u}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]}}Y.prototype.size=64;class ne extends _c{get(u){return new Y(this,u)}}dr("SymbolInstanceArray",ne);class se extends Uu{getoffsetX(u){return this.float32[1*u+0]}}dr("GlyphOffsetArray",se);class be extends $d{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}dr("SymbolLineVertexArray",be);class Oe extends mu{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]}}Oe.prototype.size=12;class Te extends zl{get(u){return new Oe(this,u)}}dr("TextAnchorOffsetArray",Te);class $e extends mu{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]}}$e.prototype.size=8;class He extends fd{get(u){return new $e(this,u)}}dr("FeatureIndexArray",He);class ct extends CA{}class st extends CA{}class dt extends CA{}class gt extends Na{}class St extends yc{}class It extends jl{}class Kt extends ol{}class zt extends Fu{}class Tt extends vc{}class tn extends gu{}class Zt extends Za{}class vn extends eu{}class _n extends aA{}class gn extends k{}const In=Oa([{name:"a_pos",components:2,type:"Int16"}],4),{members:Un}=In;class wn{constructor(u=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=u}prepareSegment(u,d,v,w){const D=this.segments[this.segments.length-1];return u>wn.MAX_VERTEX_ARRAY_LENGTH&&tt(`Max vertices per segment is ${wn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${wn.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!D||D.vertexLength+u>wn.MAX_VERTEX_ARRAY_LENGTH||D.sortKey!==w?this.createNewSegment(d,v,w):D}createNewSegment(u,d,v){const w={vertexOffset:u.length,primitiveOffset:d.length,vertexLength:0,primitiveLength:0,vaos:{}};return v!==void 0&&(w.sortKey=v),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(w),w}getOrCreateLatestSegment(u,d,v){return this.prepareSegment(0,u,d,v)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const u of this.segments)for(const d in u.vaos)u.vaos[d].destroy()}static simpleSegment(u,d,v,w){return new wn([{vertexOffset:u,primitiveOffset:d,vertexLength:v,primitiveLength:w,vaos:{},sortKey:0}])}}function Or(h,u){return 256*(h=vt(Math.floor(h),0,255))+vt(Math.floor(u),0,255)}wn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,dr("SegmentVector",wn);const Bi=Oa([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Hi,Oo,Ei,jo={exports:{}},zo={exports:{}},xo={exports:{}},go=function(){if(Ei)return jo.exports;Ei=1;var h=(Hi||(Hi=1,zo.exports=function(d,v){var w,D,F,N,Z,ie,ce,Ce;for(D=d.length-(w=3&d.length),F=v,Z=3432918353,ie=461845907,Ce=0;Ce<D;)ce=255&d.charCodeAt(Ce)|(255&d.charCodeAt(++Ce))<<8|(255&d.charCodeAt(++Ce))<<16|(255&d.charCodeAt(++Ce))<<24,++Ce,F=27492+(65535&(N=5*(65535&(F=(F^=ce=(65535&(ce=(ce=(65535&ce)*Z+(((ce>>>16)*Z&65535)<<16)&4294967295)<<15|ce>>>17))*ie+(((ce>>>16)*ie&65535)<<16)&4294967295)<<13|F>>>19))+((5*(F>>>16)&65535)<<16)&4294967295))+((58964+(N>>>16)&65535)<<16);switch(ce=0,w){case 3:ce^=(255&d.charCodeAt(Ce+2))<<16;case 2:ce^=(255&d.charCodeAt(Ce+1))<<8;case 1:F^=ce=(65535&(ce=(ce=(65535&(ce^=255&d.charCodeAt(Ce)))*Z+(((ce>>>16)*Z&65535)<<16)&4294967295)<<15|ce>>>17))*ie+(((ce>>>16)*ie&65535)<<16)&4294967295}return F^=d.length,F=2246822507*(65535&(F^=F>>>16))+((2246822507*(F>>>16)&65535)<<16)&4294967295,F=3266489909*(65535&(F^=F>>>13))+((3266489909*(F>>>16)&65535)<<16)&4294967295,(F^=F>>>16)>>>0}),zo.exports),u=(Oo||(Oo=1,xo.exports=function(d,v){for(var w,D=d.length,F=v^D,N=0;D>=4;)w=1540483477*(65535&(w=255&d.charCodeAt(N)|(255&d.charCodeAt(++N))<<8|(255&d.charCodeAt(++N))<<16|(255&d.charCodeAt(++N))<<24))+((1540483477*(w>>>16)&65535)<<16),F=1540483477*(65535&F)+((1540483477*(F>>>16)&65535)<<16)^(w=1540483477*(65535&(w^=w>>>24))+((1540483477*(w>>>16)&65535)<<16)),D-=4,++N;switch(D){case 3:F^=(255&d.charCodeAt(N+2))<<16;case 2:F^=(255&d.charCodeAt(N+1))<<8;case 1:F=1540483477*(65535&(F^=255&d.charCodeAt(N)))+((1540483477*(F>>>16)&65535)<<16)}return F=1540483477*(65535&(F^=F>>>13))+((1540483477*(F>>>16)&65535)<<16),(F^=F>>>15)>>>0}),xo.exports);return jo.exports=h,jo.exports.murmur3=h,jo.exports.murmur2=u,jo.exports}(),Es=f(go);class No{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,d,v,w){this.ids.push(ca(u)),this.positions.push(d,v,w)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const d=ca(u);let v=0,w=this.ids.length-1;for(;v<w;){const F=v+w>>1;this.ids[F]>=d?w=F:v=F+1}const D=[];for(;this.ids[v]===d;)D.push({index:this.positions[3*v],start:this.positions[3*v+1],end:this.positions[3*v+2]}),v++;return D}static serialize(u,d){const v=new Float64Array(u.ids),w=new Uint32Array(u.positions);return Fs(v,w,0,v.length-1),d&&d.push(v.buffer,w.buffer),{ids:v,positions:w}}static deserialize(u){const d=new No;return d.ids=u.ids,d.positions=u.positions,d.indexed=!0,d}}function ca(h){const u=+h;return!isNaN(u)&&u<=Number.MAX_SAFE_INTEGER?u:Es(String(h))}function Fs(h,u,d,v){for(;d<v;){const w=h[d+v>>1];let D=d-1,F=v+1;for(;;){do D++;while(h[D]<w);do F--;while(h[F]>w);if(D>=F)break;ju(h,D,F),ju(u,3*D,3*F),ju(u,3*D+1,3*F+1),ju(u,3*D+2,3*F+2)}F-d<v-F?(Fs(h,u,d,F),d=F+1):(Fs(h,u,F+1,v),v=F)}}function ju(h,u,d){const v=h[u];h[u]=h[d],h[d]=v}dr("FeaturePositionMap",No);class al{constructor(u,d){this.gl=u.gl,this.location=d}}class sl extends al{constructor(u,d){super(u,d),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class tu extends al{constructor(u,d){super(u,d),this.current=[0,0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]&&u[3]===this.current[3]||(this.current=u,this.gl.uniform4f(this.location,u[0],u[1],u[2],u[3]))}}class xA extends al{constructor(u,d){super(u,d),this.current=Ai.transparent}set(u){u.r===this.current.r&&u.g===this.current.g&&u.b===this.current.b&&u.a===this.current.a||(this.current=u,this.gl.uniform4f(this.location,u.r,u.g,u.b,u.a))}}const wA=new Float32Array(16);function zu(h){return[Or(255*h.r,255*h.g),Or(255*h.b,255*h.a)]}class Xa{constructor(u,d,v){this.value=u,this.uniformNames=d.map(w=>`u_${w}`),this.type=v}setUniform(u,d,v){u.set(v.constantOr(this.value))}getBinding(u,d,v){return this.type==="color"?new xA(u,d):new sl(u,d)}}class ll{constructor(u,d){this.uniformNames=d.map(v=>`u_${v}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,d){this.pixelRatioFrom=d.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=d.tlbr,this.patternTo=u.tlbr}setUniform(u,d,v,w){const D=w==="u_pattern_to"?this.patternTo:w==="u_pattern_from"?this.patternFrom:w==="u_pixel_ratio_to"?this.pixelRatioTo:w==="u_pixel_ratio_from"?this.pixelRatioFrom:null;D&&u.set(D)}getBinding(u,d,v){return v.substr(0,9)==="u_pattern"?new tu(u,d):new sl(u,d)}}class os{constructor(u,d,v,w){this.expression=u,this.type=v,this.maxValue=0,this.paintVertexAttributes=d.map(D=>({name:`a_${D}`,type:"Float32",components:v==="color"?2:1,offset:0})),this.paintVertexArray=new w}populatePaintArray(u,d,v,w,D){const F=this.paintVertexArray.length,N=this.expression.evaluate(new Ho(0),d,{},w,[],D);this.paintVertexArray.resize(u),this._setPaintValue(F,u,N)}updatePaintArray(u,d,v,w){const D=this.expression.evaluate({zoom:0},v,w);this._setPaintValue(u,d,D)}_setPaintValue(u,d,v){if(this.type==="color"){const w=zu(v);for(let D=u;D<d;D++)this.paintVertexArray.emplace(D,w[0],w[1])}else{for(let w=u;w<d;w++)this.paintVertexArray.emplace(w,v);this.maxValue=Math.max(this.maxValue,Math.abs(v))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class El{constructor(u,d,v,w,D,F){this.expression=u,this.uniformNames=d.map(N=>`u_${N}_t`),this.type=v,this.useIntegerZoom=w,this.zoom=D,this.maxValue=0,this.paintVertexAttributes=d.map(N=>({name:`a_${N}`,type:"Float32",components:v==="color"?4:2,offset:0})),this.paintVertexArray=new F}populatePaintArray(u,d,v,w,D){const F=this.expression.evaluate(new Ho(this.zoom),d,{},w,[],D),N=this.expression.evaluate(new Ho(this.zoom+1),d,{},w,[],D),Z=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(Z,u,F,N)}updatePaintArray(u,d,v,w){const D=this.expression.evaluate({zoom:this.zoom},v,w),F=this.expression.evaluate({zoom:this.zoom+1},v,w);this._setPaintValue(u,d,D,F)}_setPaintValue(u,d,v,w){if(this.type==="color"){const D=zu(v),F=zu(w);for(let N=u;N<d;N++)this.paintVertexArray.emplace(N,D[0],D[1],F[0],F[1])}else{for(let D=u;D<d;D++)this.paintVertexArray.emplace(D,v,w);this.maxValue=Math.max(this.maxValue,Math.abs(v),Math.abs(w))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(u,d){const v=this.useIntegerZoom?Math.floor(d.zoom):d.zoom,w=vt(this.expression.interpolationFactor(v,this.zoom,this.zoom+1),0,1);u.set(w)}getBinding(u,d,v){return new sl(u,d)}}class _a{constructor(u,d,v,w,D,F){this.expression=u,this.type=d,this.useIntegerZoom=v,this.zoom=w,this.layerId=F,this.zoomInPaintVertexArray=new D,this.zoomOutPaintVertexArray=new D}populatePaintArray(u,d,v){const w=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(w,u,d.patterns&&d.patterns[this.layerId],v)}updatePaintArray(u,d,v,w,D){this._setPaintValues(u,d,v.patterns&&v.patterns[this.layerId],D)}_setPaintValues(u,d,v,w){if(!w||!v)return;const{min:D,mid:F,max:N}=v,Z=w[D],ie=w[F],ce=w[N];if(Z&&ie&&ce)for(let Ce=u;Ce<d;Ce++)this.zoomInPaintVertexArray.emplace(Ce,ie.tl[0],ie.tl[1],ie.br[0],ie.br[1],Z.tl[0],Z.tl[1],Z.br[0],Z.br[1],ie.pixelRatio,Z.pixelRatio),this.zoomOutPaintVertexArray.emplace(Ce,ie.tl[0],ie.tl[1],ie.br[0],ie.br[1],ce.tl[0],ce.tl[1],ce.br[0],ce.br[1],ie.pixelRatio,ce.pixelRatio)}upload(u){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=u.createVertexBuffer(this.zoomInPaintVertexArray,Bi.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=u.createVertexBuffer(this.zoomOutPaintVertexArray,Bi.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Ga{constructor(u,d,v){this.binders={},this._buffers=[];const w=[];for(const D in u.paint._values){if(!v(D))continue;const F=u.paint.get(D);if(!(F instanceof ma&&cu(F.property.specification)))continue;const N=Vs(D,u.type),Z=F.value,ie=F.property.specification.type,ce=F.property.useIntegerZoom,Ce=F.property.specification["property-type"],Pe=Ce==="cross-faded"||Ce==="cross-faded-data-driven";if(Z.kind==="constant")this.binders[D]=Pe?new ll(Z.value,N):new Xa(Z.value,N,ie),w.push(`/u_${D}`);else if(Z.kind==="source"||Pe){const De=pd(D,ie,"source");this.binders[D]=Pe?new _a(Z,ie,ce,d,De,u.id):new os(Z,N,ie,De),w.push(`/a_${D}`)}else{const De=pd(D,ie,"composite");this.binders[D]=new El(Z,N,ie,ce,d,De),w.push(`/z_${D}`)}}this.cacheKey=w.sort().join("")}getMaxValue(u){const d=this.binders[u];return d instanceof os||d instanceof El?d.maxValue:0}populatePaintArrays(u,d,v,w,D){for(const F in this.binders){const N=this.binders[F];(N instanceof os||N instanceof El||N instanceof _a)&&N.populatePaintArray(u,d,v,w,D)}}setConstantPatternPositions(u,d){for(const v in this.binders){const w=this.binders[v];w instanceof ll&&w.setConstantPatternPositions(u,d)}}updatePaintArrays(u,d,v,w,D){let F=!1;for(const N in u){const Z=d.getPositions(N);for(const ie of Z){const ce=v.feature(ie.index);for(const Ce in this.binders){const Pe=this.binders[Ce];if((Pe instanceof os||Pe instanceof El||Pe instanceof _a)&&Pe.expression.isStateDependent===!0){const De=w.paint.get(Ce);Pe.expression=De.value,Pe.updatePaintArray(ie.start,ie.end,ce,u[N],D),F=!0}}}}return F}defines(){const u=[];for(const d in this.binders){const v=this.binders[d];(v instanceof Xa||v instanceof ll)&&u.push(...v.uniformNames.map(w=>`#define HAS_UNIFORM_${w}`))}return u}getBinderAttributes(){const u=[];for(const d in this.binders){const v=this.binders[d];if(v instanceof os||v instanceof El)for(let w=0;w<v.paintVertexAttributes.length;w++)u.push(v.paintVertexAttributes[w].name);else if(v instanceof _a)for(let w=0;w<Bi.members.length;w++)u.push(Bi.members[w].name)}return u}getBinderUniforms(){const u=[];for(const d in this.binders){const v=this.binders[d];if(v instanceof Xa||v instanceof ll||v instanceof El)for(const w of v.uniformNames)u.push(w)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,d){const v=[];for(const w in this.binders){const D=this.binders[w];if(D instanceof Xa||D instanceof ll||D instanceof El){for(const F of D.uniformNames)if(d[F]){const N=D.getBinding(u,d[F],F);v.push({name:F,property:w,binding:N})}}}return v}setUniforms(u,d,v,w){for(const{name:D,property:F,binding:N}of d)this.binders[F].setUniform(N,w,v.get(F),D)}updatePaintBuffers(u){this._buffers=[];for(const d in this.binders){const v=this.binders[d];if(u&&v instanceof _a){const w=u.fromScale===2?v.zoomInPaintVertexBuffer:v.zoomOutPaintVertexBuffer;w&&this._buffers.push(w)}else(v instanceof os||v instanceof El)&&v.paintVertexBuffer&&this._buffers.push(v.paintVertexBuffer)}}upload(u){for(const d in this.binders){const v=this.binders[d];(v instanceof os||v instanceof El||v instanceof _a)&&v.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const d=this.binders[u];(d instanceof os||d instanceof El||d instanceof _a)&&d.destroy()}}}class $s{constructor(u,d,v=()=>!0){this.programConfigurations={};for(const w of u)this.programConfigurations[w.id]=new Ga(w,d,v);this.needsUpload=!1,this._featureMap=new No,this._bufferOffset=0}populatePaintArrays(u,d,v,w,D,F){for(const N in this.programConfigurations)this.programConfigurations[N].populatePaintArrays(u,d,w,D,F);d.id!==void 0&&this._featureMap.add(d.id,v,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,d,v,w){for(const D of v)this.needsUpload=this.programConfigurations[D.id].updatePaintArrays(u,this._featureMap,d,D,w)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const d in this.programConfigurations)this.programConfigurations[d].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function Vs(h,u){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"]}[h]||[h.replace(`${u}-`,"").replace(/-/g,"_")]}function pd(h,u,d){const v={color:{source:jl,composite:c},number:{source:Uu,composite:jl}},w=function(D){return{"line-pattern":{source:Kt,composite:Kt},"fill-pattern":{source:Kt,composite:Kt},"fill-extrusion-pattern":{source:Kt,composite:Kt}}[D]}(h);return w&&w[d]||v[u][d]}dr("ConstantBinder",Xa),dr("CrossFadedConstantBinder",ll),dr("SourceExpressionBinder",os),dr("CrossFadedCompositeBinder",_a),dr("CompositeExpressionBinder",El),dr("ProgramConfiguration",Ga,{omit:["_buffers"]}),dr("ProgramConfigurationSet",$s);const mh=Math.pow(2,14)-1,gh=-mh-1;function md(h){const u=nt/h.extent,d=h.loadGeometry();for(let v=0;v<d.length;v++){const w=d[v];for(let D=0;D<w.length;D++){const F=w[D],N=Math.round(F.x*u),Z=Math.round(F.y*u);F.x=vt(N,gh,mh),F.y=vt(Z,gh,mh),(N<F.x||N>F.x+1||Z<F.y||Z>F.y+1)&&tt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return d}function XA(h,u){return{type:h.type,id:h.id,properties:h.properties,geometry:u?md(h):[]}}const yh=-32768;function Os(h,u,d,v,w){h.emplaceBack(yh+8*u+v,yh+8*d+w)}class nu{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(d=>d.id),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new st,this.indexArray=new _n,this.segments=new wn,this.programConfigurations=new $s(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(u,d,v){const w=this.layers[0],D=[];let F=null,N=!1,Z=w.type==="heatmap";if(w.type==="circle"){const ce=w;F=ce.layout.get("circle-sort-key"),N=!F.isConstant(),Z=Z||ce.paint.get("circle-pitch-alignment")==="map"}const ie=Z?d.subdivisionGranularity.circle:1;for(const{feature:ce,id:Ce,index:Pe,sourceLayerIndex:De}of u){const ze=this.layers[0]._featureFilter.needGeometry,Ze=XA(ce,ze);if(!this.layers[0]._featureFilter.filter(new Ho(this.zoom),Ze,v))continue;const lt=N?F.evaluate(Ze,{},v):void 0,yt={id:Ce,properties:ce.properties,type:ce.type,sourceLayerIndex:De,index:Pe,geometry:ze?Ze.geometry:md(ce),patterns:{},sortKey:lt};D.push(yt)}N&&D.sort((ce,Ce)=>ce.sortKey-Ce.sortKey);for(const ce of D){const{geometry:Ce,index:Pe,sourceLayerIndex:De}=ce,ze=u[Pe].feature;this.addFeature(ce,Ce,Pe,v,ie),d.featureIndex.insert(ze,Ce,Pe,De,this.index)}}update(u,d,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,v)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Un),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(u,d,v,w,D=1){let F;switch(D){case 1:F=[0,7];break;case 3:F=[0,2,5,7];break;case 5:F=[0,1,3,4,6,7];break;case 7:F=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${D}; valid values are 1, 3, 5, 7.`)}const N=F.length;for(const Z of d)for(const ie of Z){const ce=ie.x,Ce=ie.y;if(ce<0||ce>=nt||Ce<0||Ce>=nt)continue;const Pe=this.segments.prepareSegment(N*N,this.layoutVertexArray,this.indexArray,u.sortKey),De=Pe.vertexLength;for(let ze=0;ze<N;ze++)for(let Ze=0;Ze<N;Ze++)Os(this.layoutVertexArray,ce,Ce,F[Ze],F[ze]);for(let ze=0;ze<N-1;ze++)for(let Ze=0;Ze<N-1;Ze++){const lt=De+ze*N+Ze,yt=De+(ze+1)*N+Ze;this.indexArray.emplaceBack(lt,yt+1,lt+1),this.indexArray.emplaceBack(lt,yt,yt+1)}Pe.vertexLength+=N*N,Pe.primitiveLength+=(N-1)*(N-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,{},w)}}function gd(h,u){for(let d=0;d<h.length;d++)if(bc(u,h[d]))return!0;for(let d=0;d<u.length;d++)if(bc(h,u[d]))return!0;return!!Us(h,u)}function Jf(h,u,d){return!!bc(h,u)||!!vh(u,h,d)}function Cc(h,u){if(h.length===1)return Vd(u,h[0]);for(let d=0;d<u.length;d++){const v=u[d];for(let w=0;w<v.length;w++)if(bc(h,v[w]))return!0}for(let d=0;d<h.length;d++)if(Vd(u,h[d]))return!0;for(let d=0;d<u.length;d++)if(Us(h,u[d]))return!0;return!1}function MA(h,u,d){if(h.length>1){if(Us(h,u))return!0;for(let v=0;v<u.length;v++)if(vh(u[v],h,d))return!0}for(let v=0;v<h.length;v++)if(vh(h[v],u,d))return!0;return!1}function Us(h,u){if(h.length===0||u.length===0)return!1;for(let d=0;d<h.length-1;d++){const v=h[d],w=h[d+1];for(let D=0;D<u.length-1;D++)if(ep(v,w,u[D],u[D+1]))return!0}return!1}function ep(h,u,d,v){return mt(h,d,v)!==mt(u,d,v)&&mt(h,u,d)!==mt(h,u,v)}function vh(h,u,d){const v=d*d;if(u.length===1)return h.distSqr(u[0])<v;for(let w=1;w<u.length;w++)if(tp(h,u[w-1],u[w])<v)return!0;return!1}function tp(h,u,d){const v=u.distSqr(d);if(v===0)return h.distSqr(u);const w=((h.x-u.x)*(d.x-u.x)+(h.y-u.y)*(d.y-u.y))/v;return h.distSqr(w<0?u:w>1?d:d.sub(u)._mult(w)._add(u))}function Vd(h,u){let d,v,w,D=!1;for(let F=0;F<h.length;F++){d=h[F];for(let N=0,Z=d.length-1;N<d.length;Z=N++)v=d[N],w=d[Z],v.y>u.y!=w.y>u.y&&u.x<(w.x-v.x)*(u.y-v.y)/(w.y-v.y)+v.x&&(D=!D)}return D}function bc(h,u){let d=!1;for(let v=0,w=h.length-1;v<h.length;w=v++){const D=h[v],F=h[w];D.y>u.y!=F.y>u.y&&u.x<(F.x-D.x)*(u.y-D.y)/(F.y-D.y)+D.x&&(d=!d)}return d}function Fp(h,u,d){const v=d[0],w=d[2];if(h.x<v.x&&u.x<v.x||h.x>w.x&&u.x>w.x||h.y<v.y&&u.y<v.y||h.y>w.y&&u.y>w.y)return!1;const D=mt(h,u,d[0]);return D!==mt(h,u,d[1])||D!==mt(h,u,d[2])||D!==mt(h,u,d[3])}function JA(h,u,d){const v=u.paint.get(h).value;return v.kind==="constant"?v.value:d.programConfigurations.get(u.id).getMaxValue(h)}function _h(h){return Math.sqrt(h[0]*h[0]+h[1]*h[1])}function yd(h,u,d,v,w){if(!u[0]&&!u[1])return h;const D=P.convert(u)._mult(w);d==="viewport"&&D._rotate(-v);const F=[];for(let N=0;N<h.length;N++)F.push(h[N].sub(D));return F}let np,Hd;dr("CircleBucket",nu,{omit:["layers"]});var bf={get paint(){return Hd=Hd||new va({"circle-radius":new qr(qe.paint_circle["circle-radius"]),"circle-color":new qr(qe.paint_circle["circle-color"]),"circle-blur":new qr(qe.paint_circle["circle-blur"]),"circle-opacity":new qr(qe.paint_circle["circle-opacity"]),"circle-translate":new cr(qe.paint_circle["circle-translate"]),"circle-translate-anchor":new cr(qe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new cr(qe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new cr(qe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new qr(qe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new qr(qe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new qr(qe.paint_circle["circle-stroke-opacity"])})},get layout(){return np=np||new va({"circle-sort-key":new qr(qe.layout_circle["circle-sort-key"])})}};class xf extends Xl{constructor(u){super(u,bf)}createBucket(u){return new nu(u)}queryRadius(u){const d=u;return JA("circle-radius",this,d)+JA("circle-stroke-width",this,d)+_h(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:v,geometry:w,transform:D,pixelsToTileUnits:F,pixelPosMatrix:N}){const Z=yd(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-D.bearingInRadians,F),ie=this.paint.get("circle-radius").evaluate(d,v)+this.paint.get("circle-stroke-width").evaluate(d,v),ce=this.paint.get("circle-pitch-alignment")==="map",Ce=ce?Z:function(De,ze){return De.map(Ze=>rp(Ze,ze))}(Z,N),Pe=ce?ie*F:ie;for(const De of w)for(const ze of De){const Ze=ce?ze:rp(ze,N);let lt=Pe;const yt=re([],[ze.x,ze.y,0,1],N);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?lt*=yt[3]/D.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(lt*=D.cameraToCenterDistance/yt[3]),Jf(Ce,Ze,lt))return!0}return!1}}function rp(h,u){const d=re([],[h.x,h.y,0,1],u);return new P(d[0]/d[3],d[1]/d[3])}class vd extends nu{}let Wh;dr("HeatmapBucket",vd,{omit:["layers"]});var Nl={get paint(){return Wh=Wh||new va({"heatmap-radius":new qr(qe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new qr(qe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new cr(qe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new pu(qe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new cr(qe.paint_heatmap["heatmap-opacity"])})}};function Ol(h,{width:u,height:d},v,w){if(w){if(w instanceof Uint8ClampedArray)w=new Uint8Array(w.buffer);else if(w.length!==u*d*v)throw new RangeError(`mismatched image size. expected: ${w.length} but got: ${u*d*v}`)}else w=new Uint8Array(u*d*v);return h.width=u,h.height=d,h.data=w,h}function Up(h,{width:u,height:d},v){if(u===h.width&&d===h.height)return;const w=Ol({},{width:u,height:d},v);wf(h,w,{x:0,y:0},{x:0,y:0},{width:Math.min(h.width,u),height:Math.min(h.height,d)},v),h.width=u,h.height=d,h.data=w.data}function wf(h,u,d,v,w,D){if(w.width===0||w.height===0)return u;if(w.width>h.width||w.height>h.height||d.x>h.width-w.width||d.y>h.height-w.height)throw new RangeError("out of range source coordinates for image copy");if(w.width>u.width||w.height>u.height||v.x>u.width-w.width||v.y>u.height-w.height)throw new RangeError("out of range destination coordinates for image copy");const F=h.data,N=u.data;if(F===N)throw new Error("srcData equals dstData, so image is already copied");for(let Z=0;Z<w.height;Z++){const ie=((d.y+Z)*h.width+d.x)*D,ce=((v.y+Z)*u.width+v.x)*D;for(let Ce=0;Ce<w.width*D;Ce++)N[ce+Ce]=F[ie+Ce]}return u}class Bo{constructor(u,d){Ol(this,u,1,d)}resize(u){Up(this,u,1)}clone(){return new Bo({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,d,v,w,D){wf(u,d,v,w,D,1)}}class Nu{constructor(u,d){Ol(this,u,4,d)}resize(u){Up(this,u,4)}replace(u,d){d?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new Nu({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,d,v,w,D){wf(u,d,v,w,D,4)}}function Qh(h){const u={},d=h.resolution||256,v=h.clips?h.clips.length:1,w=h.image||new Nu({width:d,height:v});if(Math.log(d)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${d}`);const D=(F,N,Z)=>{u[h.evaluationKey]=Z;const ie=h.expression.evaluate(u);w.data[F+N+0]=Math.floor(255*ie.r/ie.a),w.data[F+N+1]=Math.floor(255*ie.g/ie.a),w.data[F+N+2]=Math.floor(255*ie.b/ie.a),w.data[F+N+3]=Math.floor(255*ie.a)};if(h.clips)for(let F=0,N=0;F<v;++F,N+=4*d)for(let Z=0,ie=0;Z<d;Z++,ie+=4){const ce=Z/(d-1),{start:Ce,end:Pe}=h.clips[F];D(N,ie,Ce*(1-ce)+Pe*ce)}else for(let F=0,N=0;F<d;F++,N+=4)D(0,N,F/(d-1));return w}dr("AlphaImage",Bo),dr("RGBAImage",Nu);const _d="big-fb";class SA extends Xl{createBucket(u){return new vd(u)}constructor(u){super(u,Nl),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){u==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Qh({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(_d)&&this.heatmapFbos.delete(_d)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Ch;var ip={get paint(){return Ch=Ch||new va({"hillshade-illumination-direction":new cr(qe.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new cr(qe.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new cr(qe.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new cr(qe.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new cr(qe.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new cr(qe.paint_hillshade["hillshade-accent-color"])})}};class xc extends Xl{constructor(u){super(u,ip)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const qh=Oa([{name:"a_pos",components:2,type:"Int16"}],4),{members:Yh}=qh;function Zd(h,u,d){const v=d.patternDependencies;let w=!1;for(const D of u){const F=D.paint.get(`${h}-pattern`);F.isConstant()||(w=!0);const N=F.constantOr(null);N&&(w=!0,v[N.to]=!0,v[N.from]=!0)}return w}function Cd(h,u,d,v,w){const D=w.patternDependencies;for(const F of u){const N=F.paint.get(`${h}-pattern`).value;if(N.kind!=="constant"){let Z=N.evaluate({zoom:v-1},d,{},w.availableImages),ie=N.evaluate({zoom:v},d,{},w.availableImages),ce=N.evaluate({zoom:v+1},d,{},w.availableImages);Z=Z&&Z.name?Z.name:Z,ie=ie&&ie.name?ie.name:ie,ce=ce&&ce.name?ce.name:ce,D[Z]=!0,D[ie]=!0,D[ce]=!0,d.patterns[F.id]={min:Z,mid:ie,max:ce}}}return d}function Nc(h,u,d,v,w){let D;if(w===function(F,N,Z,ie){let ce=0;for(let Ce=N,Pe=Z-ie;Ce<Z;Ce+=ie)ce+=(F[Pe]-F[Ce])*(F[Ce+1]+F[Pe+1]),Pe=Ce;return ce}(h,u,d,v)>0)for(let F=u;F<d;F+=v)D=_e(F/v|0,h[F],h[F+1],D);else for(let F=d-v;F>=u;F-=v)D=_e(F/v|0,h[F],h[F+1],D);return D&&y(D,D.next)&&(Be(D),D=D.next),D}function pi(h,u){if(!h)return h;u||(u=h);let d,v=h;do if(d=!1,v.steiner||!y(v,v.next)&&A(v.prev,v,v.next)!==0)v=v.next;else{if(Be(v),v=u=v.prev,v===v.next)break;d=!0}while(d||v!==u);return u}function Gc(h,u,d,v,w,D,F){if(!h)return;!F&&D&&function(Z,ie,ce,Ce){let Pe=Z;do Pe.z===0&&(Pe.z=ds(Pe.x,Pe.y,ie,ce,Ce)),Pe.prevZ=Pe.prev,Pe.nextZ=Pe.next,Pe=Pe.next;while(Pe!==Z);Pe.prevZ.nextZ=null,Pe.prevZ=null,function(De){let ze,Ze=1;do{let lt,yt=De;De=null;let Nt=null;for(ze=0;yt;){ze++;let Mt=yt,Re=0;for(let Ot=0;Ot<Ze&&(Re++,Mt=Mt.nextZ,Mt);Ot++);let at=Ze;for(;Re>0||at>0&&Mt;)Re!==0&&(at===0||!Mt||yt.z<=Mt.z)?(lt=yt,yt=yt.nextZ,Re--):(lt=Mt,Mt=Mt.nextZ,at--),Nt?Nt.nextZ=lt:De=lt,lt.prevZ=Nt,Nt=lt;yt=Mt}Nt.nextZ=null,Ze*=2}while(ze>1)}(Pe)}(h,v,w,D);let N=h;for(;h.prev!==h.next;){const Z=h.prev,ie=h.next;if(D?bd(h,v,w,D):ta(h))u.push(Z.i,h.i,ie.i),Be(h),h=ie.next,N=ie.next;else if((h=ie)===N){F?F===1?Gc(h=op(pi(h),u),u,d,v,w,D,2):F===2&&vu(h,u,d,v,w,D):Gc(pi(h),u,d,v,w,D,1);break}}}function ta(h){const u=h.prev,d=h,v=h.next;if(A(u,d,v)>=0)return!1;const w=u.x,D=d.x,F=v.x,N=u.y,Z=d.y,ie=v.y,ce=Math.min(w,D,F),Ce=Math.min(N,Z,ie),Pe=Math.max(w,D,F),De=Math.max(N,Z,ie);let ze=v.next;for(;ze!==u;){if(ze.x>=ce&&ze.x<=Pe&&ze.y>=Ce&&ze.y<=De&&Hs(w,N,D,Z,F,ie,ze.x,ze.y)&&A(ze.prev,ze,ze.next)>=0)return!1;ze=ze.next}return!0}function bd(h,u,d,v){const w=h.prev,D=h,F=h.next;if(A(w,D,F)>=0)return!1;const N=w.x,Z=D.x,ie=F.x,ce=w.y,Ce=D.y,Pe=F.y,De=Math.min(N,Z,ie),ze=Math.min(ce,Ce,Pe),Ze=Math.max(N,Z,ie),lt=Math.max(ce,Ce,Pe),yt=ds(De,ze,u,d,v),Nt=ds(Ze,lt,u,d,v);let Mt=h.prevZ,Re=h.nextZ;for(;Mt&&Mt.z>=yt&&Re&&Re.z<=Nt;){if(Mt.x>=De&&Mt.x<=Ze&&Mt.y>=ze&&Mt.y<=lt&&Mt!==w&&Mt!==F&&Hs(N,ce,Z,Ce,ie,Pe,Mt.x,Mt.y)&&A(Mt.prev,Mt,Mt.next)>=0||(Mt=Mt.prevZ,Re.x>=De&&Re.x<=Ze&&Re.y>=ze&&Re.y<=lt&&Re!==w&&Re!==F&&Hs(N,ce,Z,Ce,ie,Pe,Re.x,Re.y)&&A(Re.prev,Re,Re.next)>=0))return!1;Re=Re.nextZ}for(;Mt&&Mt.z>=yt;){if(Mt.x>=De&&Mt.x<=Ze&&Mt.y>=ze&&Mt.y<=lt&&Mt!==w&&Mt!==F&&Hs(N,ce,Z,Ce,ie,Pe,Mt.x,Mt.y)&&A(Mt.prev,Mt,Mt.next)>=0)return!1;Mt=Mt.prevZ}for(;Re&&Re.z<=Nt;){if(Re.x>=De&&Re.x<=Ze&&Re.y>=ze&&Re.y<=lt&&Re!==w&&Re!==F&&Hs(N,ce,Z,Ce,ie,Pe,Re.x,Re.y)&&A(Re.prev,Re,Re.next)>=0)return!1;Re=Re.nextZ}return!0}function op(h,u){let d=h;do{const v=d.prev,w=d.next.next;!y(v,w)&&O(v,d,d.next,w)&&H(v,w)&&H(w,v)&&(u.push(v.i,d.i,w.i),Be(d),Be(d.next),d=h=w),d=d.next}while(d!==h);return pi(d)}function vu(h,u,d,v,w,D){let F=h;do{let N=F.next.next;for(;N!==F.prev;){if(F.i!==N.i&&ap(F,N)){let Z=Ae(F,N);return F=pi(F,F.next),Z=pi(Z,Z.next),Gc(F,u,d,v,w,D,0),void Gc(Z,u,d,v,w,D,0)}N=N.next}F=F.next}while(F!==h)}function bm(h,u){let d=h.x-u.x;return d===0&&(d=h.y-u.y,d===0)&&(d=(h.next.y-h.y)/(h.next.x-h.x)-(u.next.y-u.y)/(u.next.x-u.x)),d}function ul(h,u){const d=function(w,D){let F=D;const N=w.x,Z=w.y;let ie,ce=-1/0;if(y(w,F))return F;do{if(y(w,F.next))return F.next;if(Z<=F.y&&Z>=F.next.y&&F.next.y!==F.y){const Ze=F.x+(Z-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(Ze<=N&&Ze>ce&&(ce=Ze,ie=F.x<F.next.x?F:F.next,Ze===N))return ie}F=F.next}while(F!==D);if(!ie)return null;const Ce=ie,Pe=ie.x,De=ie.y;let ze=1/0;F=ie;do{if(N>=F.x&&F.x>=Pe&&N!==F.x&&$h(Z<De?N:ce,Z,Pe,De,Z<De?ce:N,Z,F.x,F.y)){const Ze=Math.abs(Z-F.y)/(N-F.x);H(F,w)&&(Ze<ze||Ze===ze&&(F.x>ie.x||F.x===ie.x&&jp(ie,F)))&&(ie=F,ze=Ze)}F=F.next}while(F!==Ce);return ie}(h,u);if(!d)return u;const v=Ae(d,h);return pi(v,v.next),pi(d,d.next)}function jp(h,u){return A(h.prev,h,u.prev)<0&&A(u.next,h,h.next)<0}function ds(h,u,d,v,w){return(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-d)*w|0)|h<<8))|h<<4))|h<<2))|h<<1))|(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-v)*w|0)|u<<8))|u<<4))|u<<2))|u<<1))<<1}function zp(h){let u=h,d=h;do(u.x<d.x||u.x===d.x&&u.y<d.y)&&(d=u),u=u.next;while(u!==h);return d}function $h(h,u,d,v,w,D,F,N){return(w-F)*(u-N)>=(h-F)*(D-N)&&(h-F)*(v-N)>=(d-F)*(u-N)&&(d-F)*(D-N)>=(w-F)*(v-N)}function Hs(h,u,d,v,w,D,F,N){return!(h===F&&u===N)&&$h(h,u,d,v,w,D,F,N)}function ap(h,u){return h.next.i!==u.i&&h.prev.i!==u.i&&!function(d,v){let w=d;do{if(w.i!==d.i&&w.next.i!==d.i&&w.i!==v.i&&w.next.i!==v.i&&O(w,w.next,d,v))return!0;w=w.next}while(w!==d);return!1}(h,u)&&(H(h,u)&&H(u,h)&&function(d,v){let w=d,D=!1;const F=(d.x+v.x)/2,N=(d.y+v.y)/2;do w.y>N!=w.next.y>N&&w.next.y!==w.y&&F<(w.next.x-w.x)*(N-w.y)/(w.next.y-w.y)+w.x&&(D=!D),w=w.next;while(w!==d);return D}(h,u)&&(A(h.prev,h,u.prev)||A(h,u.prev,u))||y(h,u)&&A(h.prev,h,h.next)>0&&A(u.prev,u,u.next)>0)}function A(h,u,d){return(u.y-h.y)*(d.x-u.x)-(u.x-h.x)*(d.y-u.y)}function y(h,u){return h.x===u.x&&h.y===u.y}function O(h,u,d,v){const w=R(A(h,u,d)),D=R(A(h,u,v)),F=R(A(d,v,h)),N=R(A(d,v,u));return w!==D&&F!==N||!(w!==0||!E(h,d,u))||!(D!==0||!E(h,v,u))||!(F!==0||!E(d,h,v))||!(N!==0||!E(d,u,v))}function E(h,u,d){return u.x<=Math.max(h.x,d.x)&&u.x>=Math.min(h.x,d.x)&&u.y<=Math.max(h.y,d.y)&&u.y>=Math.min(h.y,d.y)}function R(h){return h>0?1:h<0?-1:0}function H(h,u){return A(h.prev,h,h.next)<0?A(h,u,h.next)>=0&&A(h,h.prev,u)>=0:A(h,u,h.prev)<0||A(h,h.next,u)<0}function Ae(h,u){const d=Le(h.i,h.x,h.y),v=Le(u.i,u.x,u.y),w=h.next,D=u.prev;return h.next=u,u.prev=h,d.next=w,w.prev=d,v.next=d,d.prev=v,D.next=v,v.prev=D,v}function _e(h,u,d,v){const w=Le(h,u,d);return v?(w.next=v.next,w.prev=v,v.next.prev=w,v.next=w):(w.prev=w,w.next=w),w}function Be(h){h.next.prev=h.prev,h.prev.next=h.next,h.prevZ&&(h.prevZ.nextZ=h.nextZ),h.nextZ&&(h.nextZ.prevZ=h.prevZ)}function Le(h,u,d){return{i:h,x:u,y:d,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class ht{constructor(u,d){if(d>u)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=u,this._minGranularity=d}getGranularityForZoomLevel(u){return Math.max(Math.floor(this._baseZoomGranularity/(1<<u)),this._minGranularity,1)}}class xt{constructor(u){this.fill=u.fill,this.line=u.line,this.tile=u.tile,this.stencil=u.stencil,this.circle=u.circle}}xt.noSubdivision=new xt({fill:new ht(0,0),line:new ht(0,0),tile:new ht(0,0),stencil:new ht(0,0),circle:1}),dr("SubdivisionGranularityExpression",ht),dr("SubdivisionGranularitySetting",xt);const Jt=-32768,Qt=32767;class xn{constructor(u,d){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=u,this._granularityCellSize=nt/u,this._canonical=d}_getKey(u,d){return(u+=32768)<<16|(d+=32768)<<0}_vertexToIndex(u,d){if(u<-32768||d<-32768||u>32767||d>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const v=0|Math.round(u),w=0|Math.round(d),D=this._getKey(v,w);if(this._vertexDictionary.has(D))return this._vertexDictionary.get(D);const F=this._vertexBuffer.length/2;return this._vertexDictionary.set(D,F),this._vertexBuffer.push(v,w),F}_subdivideTrianglesScanline(u){if(this._granularity<2)return function(w,D){const F=[];for(let N=0;N<D.length;N+=3){const Z=D[N],ie=D[N+1],ce=D[N+2],Ce=w[2*Z],Pe=w[2*Z+1];(w[2*ie]-Ce)*(w[2*ce+1]-Pe)-(w[2*ie+1]-Pe)*(w[2*ce]-Ce)>0?(F.push(Z),F.push(ce),F.push(ie)):(F.push(Z),F.push(ie),F.push(ce))}return F}(this._vertexBuffer,u);const d=[],v=u.length;for(let w=0;w<v;w+=3){const D=[u[w+0],u[w+1],u[w+2]],F=[this._vertexBuffer[2*u[w+0]+0],this._vertexBuffer[2*u[w+0]+1],this._vertexBuffer[2*u[w+1]+0],this._vertexBuffer[2*u[w+1]+1],this._vertexBuffer[2*u[w+2]+0],this._vertexBuffer[2*u[w+2]+1]];let N=1/0,Z=1/0,ie=-1/0,ce=-1/0;for(let Ze=0;Ze<3;Ze++){const lt=F[2*Ze],yt=F[2*Ze+1];N=Math.min(N,lt),ie=Math.max(ie,lt),Z=Math.min(Z,yt),ce=Math.max(ce,yt)}if(N===ie||Z===ce)continue;const Ce=Math.floor(N/this._granularityCellSize),Pe=Math.ceil(ie/this._granularityCellSize),De=Math.floor(Z/this._granularityCellSize),ze=Math.ceil(ce/this._granularityCellSize);if(Ce!==Pe||De!==ze)for(let Ze=De;Ze<ze;Ze++){const lt=this._scanlineGenerateVertexRingForCellRow(Ze,F,D);Xn(this._vertexBuffer,lt,d)}else d.push(...D)}return d}_scanlineGenerateVertexRingForCellRow(u,d,v){const w=u*this._granularityCellSize,D=w+this._granularityCellSize,F=[];for(let N=0;N<3;N++){const Z=d[2*N],ie=d[2*N+1],ce=d[2*(N+1)%6],Ce=d[(2*(N+1)+1)%6],Pe=d[2*(N+2)%6],De=d[(2*(N+2)+1)%6],ze=ce-Z,Ze=Ce-ie,lt=ze===0,yt=Ze===0,Nt=(w-ie)/Ze,Mt=(D-ie)/Ze,Re=Math.min(Nt,Mt),at=Math.max(Nt,Mt);if(!yt&&(Re>=1||at<=0)||yt&&(ie<w||ie>D)){Ce>=w&&Ce<=D&&F.push(v[(N+1)%3]);continue}!yt&&Re>0&&F.push(this._vertexToIndex(Z+ze*Re,ie+Ze*Re));const Ot=Z+ze*Math.max(Re,0),un=Z+ze*Math.min(at,1);lt||this._generateIntraEdgeVertices(F,Z,ie,ce,Ce,Ot,un),!yt&&at<1&&F.push(this._vertexToIndex(Z+ze*at,ie+Ze*at)),(yt||Ce>=w&&Ce<=D)&&F.push(v[(N+1)%3]),!yt&&(Ce<=w||Ce>=D)&&this._generateInterEdgeVertices(F,Z,ie,ce,Ce,Pe,De,un,w,D)}return F}_generateIntraEdgeVertices(u,d,v,w,D,F,N){const Z=w-d,ie=D-v,ce=ie===0,Ce=ce?Math.min(d,w):Math.min(F,N),Pe=ce?Math.max(d,w):Math.max(F,N),De=Math.floor(Ce/this._granularityCellSize)+1,ze=Math.ceil(Pe/this._granularityCellSize)-1;if(ce?d<w:F<N)for(let Ze=De;Ze<=ze;Ze++){const lt=Ze*this._granularityCellSize;u.push(this._vertexToIndex(lt,v+ie*(lt-d)/Z))}else for(let Ze=ze;Ze>=De;Ze--){const lt=Ze*this._granularityCellSize;u.push(this._vertexToIndex(lt,v+ie*(lt-d)/Z))}}_generateInterEdgeVertices(u,d,v,w,D,F,N,Z,ie,ce){const Ce=D-v,Pe=F-w,De=N-D,ze=(ie-D)/De,Ze=(ce-D)/De,lt=Math.min(ze,Ze),yt=Math.max(ze,Ze),Nt=w+Pe*lt;let Mt=Math.floor(Math.min(Nt,Z)/this._granularityCellSize)+1,Re=Math.ceil(Math.max(Nt,Z)/this._granularityCellSize)-1,at=Z<Nt;const Ot=De===0;if(Ot&&(N===ie||N===ce))return;if(Ot||lt>=1||yt<=0){const Fn=v-N,mn=F+(d-F)*Math.min((ie-N)/Fn,(ce-N)/Fn);Mt=Math.floor(Math.min(mn,Z)/this._granularityCellSize)+1,Re=Math.ceil(Math.max(mn,Z)/this._granularityCellSize)-1,at=Z<mn}const un=Ce>0?ce:ie;if(at)for(let Fn=Mt;Fn<=Re;Fn++)u.push(this._vertexToIndex(Fn*this._granularityCellSize,un));else for(let Fn=Re;Fn>=Mt;Fn--)u.push(this._vertexToIndex(Fn*this._granularityCellSize,un))}_generateOutline(u){const d=[];for(const v of u){const w=Yn(v,this._granularity,!0),D=this._pointArrayToIndices(w),F=[];for(let N=1;N<D.length;N++)F.push(D[N-1]),F.push(D[N]);d.push(F)}return d}_handlePoles(u){let d=!1,v=!1;this._canonical&&(this._canonical.y===0&&(d=!0),this._canonical.y===(1<<this._canonical.z)-1&&(v=!0)),(d||v)&&this._fillPoles(u,d,v)}_ensureNoPoleVertices(){const u=this._vertexBuffer;for(let d=0;d<u.length;d+=2){const v=u[d+1];v===Jt&&(u[d+1]=-32767),v===Qt&&(u[d+1]=32766)}}_generatePoleQuad(u,d,v,w,D,F){w>D!=(F===Jt)?(u.push(d),u.push(v),u.push(this._vertexToIndex(w,F)),u.push(v),u.push(this._vertexToIndex(D,F)),u.push(this._vertexToIndex(w,F))):(u.push(v),u.push(d),u.push(this._vertexToIndex(w,F)),u.push(this._vertexToIndex(D,F)),u.push(v),u.push(this._vertexToIndex(w,F)))}_fillPoles(u,d,v){const w=this._vertexBuffer,D=nt,F=u.length;for(let N=2;N<F;N+=3){const Z=u[N-2],ie=u[N-1],ce=u[N],Ce=w[2*Z],Pe=w[2*Z+1],De=w[2*ie],ze=w[2*ie+1],Ze=w[2*ce],lt=w[2*ce+1];d&&(Pe===0&&ze===0&&this._generatePoleQuad(u,Z,ie,Ce,De,Jt),ze===0&<===0&&this._generatePoleQuad(u,ie,ce,De,Ze,Jt),lt===0&&Pe===0&&this._generatePoleQuad(u,ce,Z,Ze,Ce,Jt)),v&&(Pe===D&&ze===D&&this._generatePoleQuad(u,Z,ie,Ce,De,Qt),ze===D&<===D&&this._generatePoleQuad(u,ie,ce,De,Ze,Qt),lt===D&&Pe===D&&this._generatePoleQuad(u,ce,Z,Ze,Ce,Qt))}}_initializeVertices(u){for(let d=0;d<u.length;d+=2)this._vertexToIndex(u[d],u[d+1])}subdividePolygonInternal(u,d){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:v,holeIndices:w}=function(N){const Z=[],ie=[];for(const ce of N)if(ce.length!==0){ce!==N[0]&&Z.push(ie.length/2);for(let Ce=0;Ce<ce.length;Ce++)ie.push(ce[Ce].x),ie.push(ce[Ce].y)}return{flattened:ie,holeIndices:Z}}(u);let D;this._initializeVertices(v);try{const N=function(ie,ce,Ce=2){const Pe=ce&&ce.length,De=Pe?ce[0]*Ce:ie.length;let ze=Nc(ie,0,De,Ce,!0);const Ze=[];if(!ze||ze.next===ze.prev)return Ze;let lt,yt,Nt;if(Pe&&(ze=function(Mt,Re,at,Ot){const un=[];for(let Fn=0,mn=Re.length;Fn<mn;Fn++){const bn=Nc(Mt,Re[Fn]*Ot,Fn<mn-1?Re[Fn+1]*Ot:Mt.length,Ot,!1);bn===bn.next&&(bn.steiner=!0),un.push(zp(bn))}un.sort(bm);for(let Fn=0;Fn<un.length;Fn++)at=ul(un[Fn],at);return at}(ie,ce,ze,Ce)),ie.length>80*Ce){lt=1/0,yt=1/0;let Mt=-1/0,Re=-1/0;for(let at=Ce;at<De;at+=Ce){const Ot=ie[at],un=ie[at+1];Ot<lt&&(lt=Ot),un<yt&&(yt=un),Ot>Mt&&(Mt=Ot),un>Re&&(Re=un)}Nt=Math.max(Mt-lt,Re-yt),Nt=Nt!==0?32767/Nt:0}return Gc(ze,Ze,Ce,lt,yt,Nt,0),Ze}(v,w),Z=this._convertIndices(v,N);D=this._subdivideTrianglesScanline(Z)}catch(N){console.error(N)}let F=[];return d&&(F=this._generateOutline(u)),this._ensureNoPoleVertices(),this._handlePoles(D),{verticesFlattened:this._vertexBuffer,indicesTriangles:D,indicesLineList:F}}_convertIndices(u,d){const v=[];for(let w=0;w<d.length;w++)v.push(this._vertexToIndex(u[2*d[w]],u[2*d[w]+1]));return v}_pointArrayToIndices(u){const d=[];for(let v=0;v<u.length;v++){const w=u[v];d.push(this._vertexToIndex(w.x,w.y))}return d}}function Rn(h,u,d,v=!0){return new xn(d,u).subdividePolygonInternal(h,v)}function Yn(h,u,d=!1){if(!h||h.length<1)return[];if(h.length<2)return[];const v=h[0],w=h[h.length-1],D=d&&(v.x!==w.x||v.y!==w.y);if(u<2)return D?[...h,h[0]]:[...h];const F=Math.floor(nt/u),N=[];N.push(new P(h[0].x,h[0].y));const Z=h.length,ie=D?Z:Z-1;for(let ce=0;ce<ie;ce++){const Ce=h[ce],Pe=ce<Z-1?h[ce+1]:h[0],De=Ce.x,ze=Ce.y,Ze=Pe.x,lt=Pe.y,yt=De!==Ze,Nt=ze!==lt;if(!yt&&!Nt)continue;const Mt=Ze-De,Re=lt-ze,at=Math.abs(Mt),Ot=Math.abs(Re);let un=De,Fn=ze;for(;;){const bn=Mt>0?(Math.floor(un/F)+1)*F:(Math.ceil(un/F)-1)*F,Vn=Re>0?(Math.floor(Fn/F)+1)*F:(Math.ceil(Fn/F)-1)*F,Ln=Math.abs(un-bn),rr=Math.abs(Fn-Vn),On=Math.abs(un-Ze),Ur=Math.abs(Fn-lt),Lr=yt?Ln/at:Number.POSITIVE_INFINITY,jr=Nt?rr/Ot:Number.POSITIVE_INFINITY;if((On<=Ln||!yt)&&(Ur<=rr||!Nt))break;if(Lr<jr&&yt||!Nt){un=bn,Fn+=Re*Lr;const ei=new P(un,Math.round(Fn));N[N.length-1].x===ei.x&&N[N.length-1].y===ei.y||N.push(ei)}else{un+=Mt*jr,Fn=Vn;const ei=new P(Math.round(un),Fn);N[N.length-1].x===ei.x&&N[N.length-1].y===ei.y||N.push(ei)}}const mn=new P(Ze,lt);N[N.length-1].x===mn.x&&N[N.length-1].y===mn.y||N.push(mn)}return N}function Xn(h,u,d){if(u.length===0)throw new Error("Subdivision vertex ring is empty.");let v=0,w=h[2*u[0]];for(let Z=1;Z<u.length;Z++){const ie=h[2*u[Z]];ie<w&&(w=ie,v=Z)}const D=u.length;let F=v,N=(F+1)%D;for(;;){const Z=F-1>=0?F-1:D-1,ie=(N+1)%D,ce=h[2*u[Z]],Ce=h[2*u[ie]],Pe=h[2*u[F]],De=h[2*u[F]+1],ze=h[2*u[N]+1];let Ze=!1;if(ce<Ce)Ze=!0;else if(ce>Ce)Ze=!1;else{const lt=ze-De,yt=-(h[2*u[N]]-Pe),Nt=De<ze?1:-1;((ce-Pe)*lt+(h[2*u[Z]+1]-De)*yt)*Nt>((Ce-Pe)*lt+(h[2*u[ie]+1]-De)*yt)*Nt&&(Ze=!0)}if(Ze){const lt=u[Z],yt=u[F],Nt=u[N];lt!==yt&<!==Nt&&yt!==Nt&&d.push(Nt,yt,lt),F--,F<0&&(F=D-1)}else{const lt=u[ie],yt=u[F],Nt=u[N];lt!==yt&<!==Nt&&yt!==Nt&&d.push(Nt,yt,lt),N++,N>=D&&(N=0)}if(Z===ie)break}}function yr(h,u,d,v,w,D,F,N,Z){const ie=w.length/2,ce=F&&N&&Z;if(ie<wn.MAX_VERTEX_ARRAY_LENGTH){const Ce=u.prepareSegment(ie,d,v),Pe=Ce.vertexLength;for(let Ze=0;Ze<D.length;Ze+=3)v.emplaceBack(Pe+D[Ze],Pe+D[Ze+1],Pe+D[Ze+2]);let De,ze;Ce.vertexLength+=ie,Ce.primitiveLength+=D.length/3,ce&&(ze=F.prepareSegment(ie,d,N),De=ze.vertexLength,ze.vertexLength+=ie);for(let Ze=0;Ze<w.length;Ze+=2)h(w[Ze],w[Ze+1]);if(ce)for(let Ze=0;Ze<Z.length;Ze++){const lt=Z[Ze];for(let yt=1;yt<lt.length;yt+=2)N.emplaceBack(De+lt[yt-1],De+lt[yt]);ze.primitiveLength+=lt.length/2}}else(function(Ce,Pe,De,ze,Ze,lt){const yt=[];for(let Ot=0;Ot<ze.length/2;Ot++)yt.push(-1);const Nt={count:0};let Mt=0,Re=Ce.getOrCreateLatestSegment(Pe,De),at=Re.vertexLength;for(let Ot=2;Ot<Ze.length;Ot+=3){const un=Ze[Ot-2],Fn=Ze[Ot-1],mn=Ze[Ot];let bn=yt[un]<Mt,Vn=yt[Fn]<Mt,Ln=yt[mn]<Mt;Re.vertexLength+((bn?1:0)+(Vn?1:0)+(Ln?1:0))>wn.MAX_VERTEX_ARRAY_LENGTH&&(Re=Ce.createNewSegment(Pe,De),Mt=Nt.count,bn=!0,Vn=!0,Ln=!0,at=0);const rr=or(yt,ze,lt,Nt,un,bn,Re),On=or(yt,ze,lt,Nt,Fn,Vn,Re),Ur=or(yt,ze,lt,Nt,mn,Ln,Re);De.emplaceBack(at+rr-Mt,at+On-Mt,at+Ur-Mt),Re.primitiveLength++}})(u,d,v,w,D,h),ce&&function(Ce,Pe,De,ze,Ze,lt){const yt=[];for(let Ot=0;Ot<ze.length/2;Ot++)yt.push(-1);const Nt={count:0};let Mt=0,Re=Ce.getOrCreateLatestSegment(Pe,De),at=Re.vertexLength;for(let Ot=0;Ot<Ze.length;Ot++){const un=Ze[Ot];for(let Fn=1;Fn<Ze[Ot].length;Fn+=2){const mn=un[Fn-1],bn=un[Fn];let Vn=yt[mn]<Mt,Ln=yt[bn]<Mt;Re.vertexLength+((Vn?1:0)+(Ln?1:0))>wn.MAX_VERTEX_ARRAY_LENGTH&&(Re=Ce.createNewSegment(Pe,De),Mt=Nt.count,Vn=!0,Ln=!0,at=0);const rr=or(yt,ze,lt,Nt,mn,Vn,Re),On=or(yt,ze,lt,Nt,bn,Ln,Re);De.emplaceBack(at+rr-Mt,at+On-Mt),Re.primitiveLength++}}}(F,d,N,w,Z,h),u.forceNewSegmentOnNextPrepare(),F==null||F.forceNewSegmentOnNextPrepare()}function or(h,u,d,v,w,D,F){if(D){const N=v.count;return d(u[2*w],u[2*w+1]),h[w]=v.count,v.count++,F.vertexLength++,N}return h[w]}class Tr{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(d=>d.id),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new dt,this.indexArray=new _n,this.indexArray2=new gn,this.programConfigurations=new $s(u.layers,u.zoom),this.segments=new wn,this.segments2=new wn,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(u,d,v){this.hasPattern=Zd("fill",this.layers,d);const w=this.layers[0].layout.get("fill-sort-key"),D=!w.isConstant(),F=[];for(const{feature:N,id:Z,index:ie,sourceLayerIndex:ce}of u){const Ce=this.layers[0]._featureFilter.needGeometry,Pe=XA(N,Ce);if(!this.layers[0]._featureFilter.filter(new Ho(this.zoom),Pe,v))continue;const De=D?w.evaluate(Pe,{},v,d.availableImages):void 0,ze={id:Z,properties:N.properties,type:N.type,sourceLayerIndex:ce,index:ie,geometry:Ce?Pe.geometry:md(N),patterns:{},sortKey:De};F.push(ze)}D&&F.sort((N,Z)=>N.sortKey-Z.sortKey);for(const N of F){const{geometry:Z,index:ie,sourceLayerIndex:ce}=N;if(this.hasPattern){const Ce=Cd("fill",this.layers,N,this.zoom,d);this.patternFeatures.push(Ce)}else this.addFeature(N,Z,ie,v,{},d.subdivisionGranularity);d.featureIndex.insert(u[ie].feature,Z,ie,ce,this.index)}}update(u,d,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,v)}addFeatures(u,d,v){for(const w of this.patternFeatures)this.addFeature(w,w.geometry,w.index,d,v,u.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Yh),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.indexBuffer2=u.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(u),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(u,d,v,w,D,F){for(const N of Ic(d,500)){const Z=Rn(N,w,F.fill.getGranularityForZoomLevel(w.z)),ie=this.layoutVertexArray;yr((ce,Ce)=>{ie.emplaceBack(ce,Ce)},this.segments,this.layoutVertexArray,this.indexArray,Z.verticesFlattened,Z.indicesTriangles,this.segments2,this.indexArray2,Z.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,D,w)}}let li,Fr;dr("FillBucket",Tr,{omit:["layers","patternFeatures"]});var no={get paint(){return Fr=Fr||new va({"fill-antialias":new cr(qe.paint_fill["fill-antialias"]),"fill-opacity":new qr(qe.paint_fill["fill-opacity"]),"fill-color":new qr(qe.paint_fill["fill-color"]),"fill-outline-color":new qr(qe.paint_fill["fill-outline-color"]),"fill-translate":new cr(qe.paint_fill["fill-translate"]),"fill-translate-anchor":new cr(qe.paint_fill["fill-translate-anchor"]),"fill-pattern":new Lu(qe.paint_fill["fill-pattern"])})},get layout(){return li=li||new va({"fill-sort-key":new qr(qe.layout_fill["fill-sort-key"])})}};class Io extends Xl{constructor(u){super(u,no)}recalculate(u,d){super.recalculate(u,d);const v=this.paint._values["fill-outline-color"];v.value.kind==="constant"&&v.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new Tr(u)}queryRadius(){return _h(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:u,geometry:d,transform:v,pixelsToTileUnits:w}){return Cc(yd(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-v.bearingInRadians,w),d)}isTileClipped(){return!0}}const js=Oa([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),as=Oa([{name:"a_centroid",components:2,type:"Int16"}],4),{members:_s}=js;var Cs,Bs,Gl,zs,bs,da,vi,Zo={};function ss(){if(Bs)return Cs;Bs=1;var h=I();function u(w,D,F,N,Z){this.properties={},this.extent=F,this.type=0,this._pbf=w,this._geometry=-1,this._keys=N,this._values=Z,w.readFields(d,this,D)}function d(w,D,F){w==1?D.id=F.readVarint():w==2?function(N,Z){for(var ie=N.readVarint()+N.pos;N.pos<ie;){var ce=Z._keys[N.readVarint()],Ce=Z._values[N.readVarint()];Z.properties[ce]=Ce}}(F,D):w==3?D.type=F.readVarint():w==4&&(D._geometry=F.pos)}function v(w){for(var D,F,N=0,Z=0,ie=w.length,ce=ie-1;Z<ie;ce=Z++)N+=((F=w[ce]).x-(D=w[Z]).x)*(D.y+F.y);return N}return Cs=u,u.types=["Unknown","Point","LineString","Polygon"],u.prototype.loadGeometry=function(){var w=this._pbf;w.pos=this._geometry;for(var D,F=w.readVarint()+w.pos,N=1,Z=0,ie=0,ce=0,Ce=[];w.pos<F;){if(Z<=0){var Pe=w.readVarint();N=7&Pe,Z=Pe>>3}if(Z--,N===1||N===2)ie+=w.readSVarint(),ce+=w.readSVarint(),N===1&&(D&&Ce.push(D),D=[]),D.push(new h(ie,ce));else{if(N!==7)throw new Error("unknown command "+N);D&&D.push(D[0].clone())}}return D&&Ce.push(D),Ce},u.prototype.bbox=function(){var w=this._pbf;w.pos=this._geometry;for(var D=w.readVarint()+w.pos,F=1,N=0,Z=0,ie=0,ce=1/0,Ce=-1/0,Pe=1/0,De=-1/0;w.pos<D;){if(N<=0){var ze=w.readVarint();F=7&ze,N=ze>>3}if(N--,F===1||F===2)(Z+=w.readSVarint())<ce&&(ce=Z),Z>Ce&&(Ce=Z),(ie+=w.readSVarint())<Pe&&(Pe=ie),ie>De&&(De=ie);else if(F!==7)throw new Error("unknown command "+F)}return[ce,Pe,Ce,De]},u.prototype.toGeoJSON=function(w,D,F){var N,Z,ie=this.extent*Math.pow(2,F),ce=this.extent*w,Ce=this.extent*D,Pe=this.loadGeometry(),De=u.types[this.type];function ze(yt){for(var Nt=0;Nt<yt.length;Nt++){var Mt=yt[Nt];yt[Nt]=[360*(Mt.x+ce)/ie-180,360/Math.PI*Math.atan(Math.exp((180-360*(Mt.y+Ce)/ie)*Math.PI/180))-90]}}switch(this.type){case 1:var Ze=[];for(N=0;N<Pe.length;N++)Ze[N]=Pe[N][0];ze(Pe=Ze);break;case 2:for(N=0;N<Pe.length;N++)ze(Pe[N]);break;case 3:for(Pe=function(yt){var Nt=yt.length;if(Nt<=1)return[yt];for(var Mt,Re,at=[],Ot=0;Ot<Nt;Ot++){var un=v(yt[Ot]);un!==0&&(Re===void 0&&(Re=un<0),Re===un<0?(Mt&&at.push(Mt),Mt=[yt[Ot]]):Mt.push(yt[Ot]))}return Mt&&at.push(Mt),at}(Pe),N=0;N<Pe.length;N++)for(Z=0;Z<Pe[N].length;Z++)ze(Pe[N][Z])}Pe.length===1?Pe=Pe[0]:De="Multi"+De;var lt={type:"Feature",geometry:{type:De,coordinates:Pe},properties:this.properties};return"id"in this&&(lt.id=this.id),lt},Cs}function hs(){if(zs)return Gl;zs=1;var h=ss();function u(v,w){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=v,this._keys=[],this._values=[],this._features=[],v.readFields(d,this,w),this.length=this._features.length}function d(v,w,D){v===15?w.version=D.readVarint():v===1?w.name=D.readString():v===5?w.extent=D.readVarint():v===2?w._features.push(D.pos):v===3?w._keys.push(D.readString()):v===4&&w._values.push(function(F){for(var N=null,Z=F.readVarint()+F.pos;F.pos<Z;){var ie=F.readVarint()>>3;N=ie===1?F.readString():ie===2?F.readFloat():ie===3?F.readDouble():ie===4?F.readVarint64():ie===5?F.readVarint():ie===6?F.readSVarint():ie===7?F.readBoolean():null}return N}(D))}return Gl=u,u.prototype.feature=function(v){if(v<0||v>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[v];var w=this._pbf.readVarint()+this._pbf.pos;return new h(this._pbf,w,this.extent,this._keys,this._values)},Gl}function Ba(){return vi||(vi=1,Zo.VectorTile=function(){if(da)return bs;da=1;var h=hs();function u(d,v,w){if(d===3){var D=new h(w,w.readVarint()+w.pos);D.length&&(v[D.name]=D)}}return bs=function(d,v){this.layers=d.readFields(u,{},v)},bs}(),Zo.VectorTileFeature=ss(),Zo.VectorTileLayer=hs()),Zo}var Bl=f(Ba());const Po=Bl.VectorTileFeature.types,xd=Math.pow(2,13);function Al(h,u,d,v,w,D,F,N){h.emplaceBack(u,d,2*Math.floor(v*xd)+F,w*xd*2,D*xd*2,Math.round(N))}class EA{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(d=>d.id),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new gt,this.centroidVertexArray=new ct,this.indexArray=new _n,this.programConfigurations=new $s(u.layers,u.zoom),this.segments=new wn,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(u,d,v){this.features=[],this.hasPattern=Zd("fill-extrusion",this.layers,d);for(const{feature:w,id:D,index:F,sourceLayerIndex:N}of u){const Z=this.layers[0]._featureFilter.needGeometry,ie=XA(w,Z);if(!this.layers[0]._featureFilter.filter(new Ho(this.zoom),ie,v))continue;const ce={id:D,sourceLayerIndex:N,index:F,geometry:Z?ie.geometry:md(w),properties:w.properties,type:w.type,patterns:{}};this.hasPattern?this.features.push(Cd("fill-extrusion",this.layers,ce,this.zoom,d)):this.addFeature(ce,ce.geometry,F,v,{},d.subdivisionGranularity),d.featureIndex.insert(w,ce.geometry,F,N,this.index,!0)}}addFeatures(u,d,v){for(const w of this.features){const{geometry:D}=w;this.addFeature(w,D,w.index,d,v,u.subdivisionGranularity)}}update(u,d,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,v)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,_s),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,as.members,!0),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(u,d,v,w,D,F){for(const N of Ic(d,500)){const Z={x:0,y:0,sampleCount:0},ie=this.layoutVertexArray.length;this.processPolygon(Z,w,u,N,F);const ce=this.layoutVertexArray.length-ie,Ce=Math.floor(Z.x/Z.sampleCount),Pe=Math.floor(Z.y/Z.sampleCount);for(let De=0;De<ce;De++)this.centroidVertexArray.emplaceBack(Ce,Pe)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,D,w)}processPolygon(u,d,v,w,D){if(w.length<1||dl(w[0]))return;for(const Ce of w)Ce.length!==0&&Wc(u,Ce);const F={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},N=D.fill.getGranularityForZoomLevel(d.z),Z=Po[v.type]==="Polygon";for(const Ce of w){if(Ce.length===0||dl(Ce))continue;const Pe=Yn(Ce,N,Z);this._generateSideFaces(Pe,F)}if(!Z)return;const ie=Rn(w,d,N,!1),ce=this.layoutVertexArray;yr((Ce,Pe)=>{Al(ce,Ce,Pe,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,ie.verticesFlattened,ie.indicesTriangles)}_generateSideFaces(u,d){let v=0;for(let w=1;w<u.length;w++){const D=u[w],F=u[w-1];if(cl(D,F))continue;d.segment.vertexLength+4>wn.MAX_VERTEX_ARRAY_LENGTH&&(d.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const N=D.sub(F)._perp()._unit(),Z=F.dist(D);v+Z>32768&&(v=0),Al(this.layoutVertexArray,D.x,D.y,N.x,N.y,0,0,v),Al(this.layoutVertexArray,D.x,D.y,N.x,N.y,0,1,v),v+=Z,Al(this.layoutVertexArray,F.x,F.y,N.x,N.y,0,0,v),Al(this.layoutVertexArray,F.x,F.y,N.x,N.y,0,1,v);const ie=d.segment.vertexLength;this.indexArray.emplaceBack(ie,ie+2,ie+1),this.indexArray.emplaceBack(ie+1,ie+2,ie+3),d.segment.vertexLength+=4,d.segment.primitiveLength+=2}}}function Wc(h,u){for(let d=0;d<u.length;d++){const v=u[d];d===u.length-1&&u[0].x===v.x&&u[0].y===v.y||(h.x+=v.x,h.y+=v.y,h.sampleCount++)}}function cl(h,u){return h.x===u.x&&(h.x<0||h.x>nt)||h.y===u.y&&(h.y<0||h.y>nt)}function dl(h){return h.every(u=>u.x<0)||h.every(u=>u.x>nt)||h.every(u=>u.y<0)||h.every(u=>u.y>nt)}let Vh;dr("FillExtrusionBucket",EA,{omit:["layers","features"]});var Mf={get paint(){return Vh=Vh||new va({"fill-extrusion-opacity":new cr(qe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new qr(qe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new cr(qe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new cr(qe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Lu(qe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new qr(qe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new qr(qe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new cr(qe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class bh extends Xl{constructor(u){super(u,Mf)}createBucket(u){return new EA(u)}queryRadius(){return _h(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:v,geometry:w,transform:D,pixelsToTileUnits:F,pixelPosMatrix:N}){const Z=yd(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-D.bearingInRadians,F),ie=this.paint.get("fill-extrusion-height").evaluate(d,v),ce=this.paint.get("fill-extrusion-base").evaluate(d,v),Ce=function(De,ze,Ze){const lt=[];for(const yt of De){const Nt=[yt.x,yt.y,0,1];re(Nt,Nt,ze),lt.push(new P(Nt[0]/Nt[3],Nt[1]/Nt[3]))}return lt}(Z,N),Pe=function(De,ze,Ze,lt){const yt=[],Nt=[],Mt=lt[8]*ze,Re=lt[9]*ze,at=lt[10]*ze,Ot=lt[11]*ze,un=lt[8]*Ze,Fn=lt[9]*Ze,mn=lt[10]*Ze,bn=lt[11]*Ze;for(const Vn of De){const Ln=[],rr=[];for(const On of Vn){const Ur=On.x,Lr=On.y,jr=lt[0]*Ur+lt[4]*Lr+lt[12],ei=lt[1]*Ur+lt[5]*Lr+lt[13],Ko=lt[2]*Ur+lt[6]*Lr+lt[14],Js=lt[3]*Ur+lt[7]*Lr+lt[15],Wl=Ko+at,Wu=Js+Ot,Jd=jr+un,nc=ei+Fn,_u=Ko+mn,AA=Js+bn,ml=new P((jr+Mt)/Wu,(ei+Re)/Wu);ml.z=Wl/Wu,Ln.push(ml);const ru=new P(Jd/AA,nc/AA);ru.z=_u/AA,rr.push(ru)}yt.push(Ln),Nt.push(rr)}return[yt,Nt]}(w,ce,ie,N);return function(De,ze,Ze){let lt=1/0;Cc(Ze,ze)&&(lt=xm(Ze,ze[0]));for(let yt=0;yt<ze.length;yt++){const Nt=ze[yt],Mt=De[yt];for(let Re=0;Re<Nt.length-1;Re++){const at=Nt[Re],Ot=[at,Nt[Re+1],Mt[Re+1],Mt[Re],at];gd(Ze,Ot)&&(lt=Math.min(lt,xm(Ze,Ot)))}}return lt!==1/0&<}(Pe[0],Pe[1],Ce)}}function Hh(h,u){return h.x*u.x+h.y*u.y}function xm(h,u){if(h.length===1){let d=0;const v=u[d++];let w;for(;!w||v.equals(w);)if(w=u[d++],!w)return 1/0;for(;d<u.length;d++){const D=u[d],F=h[0],N=w.sub(v),Z=D.sub(v),ie=F.sub(v),ce=Hh(N,N),Ce=Hh(N,Z),Pe=Hh(Z,Z),De=Hh(ie,N),ze=Hh(ie,Z),Ze=ce*Pe-Ce*Ce,lt=(Pe*De-Ce*ze)/Ze,yt=(ce*ze-Ce*De)/Ze,Nt=v.z*(1-lt-yt)+w.z*lt+D.z*yt;if(isFinite(Nt))return Nt}return 1/0}{let d=1/0;for(const v of u)d=Math.min(d,v.z);return d}}const Zh=Oa([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:wm}=Zh,Xh=Oa([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:OA}=Xh,Np=Bl.VectorTileFeature.types,c0=Math.cos(Math.PI/180*37.5),Gp=Math.pow(2,14)/.5;class Sf{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(d=>d.id),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(d=>{this.gradients[d.id]={}}),this.layoutVertexArray=new St,this.layoutVertexArray2=new It,this.indexArray=new _n,this.programConfigurations=new $s(u.layers,u.zoom),this.segments=new wn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(u,d,v){this.hasPattern=Zd("line",this.layers,d);const w=this.layers[0].layout.get("line-sort-key"),D=!w.isConstant(),F=[];for(const{feature:N,id:Z,index:ie,sourceLayerIndex:ce}of u){const Ce=this.layers[0]._featureFilter.needGeometry,Pe=XA(N,Ce);if(!this.layers[0]._featureFilter.filter(new Ho(this.zoom),Pe,v))continue;const De=D?w.evaluate(Pe,{},v):void 0,ze={id:Z,properties:N.properties,type:N.type,sourceLayerIndex:ce,index:ie,geometry:Ce?Pe.geometry:md(N),patterns:{},sortKey:De};F.push(ze)}D&&F.sort((N,Z)=>N.sortKey-Z.sortKey);for(const N of F){const{geometry:Z,index:ie,sourceLayerIndex:ce}=N;if(this.hasPattern){const Ce=Cd("line",this.layers,N,this.zoom,d);this.patternFeatures.push(Ce)}else this.addFeature(N,Z,ie,v,{},d.subdivisionGranularity);d.featureIndex.insert(u[ie].feature,Z,ie,ce,this.index)}}update(u,d,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,v)}addFeatures(u,d,v){for(const w of this.patternFeatures)this.addFeature(w,w.geometry,w.index,d,v,u.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=u.createVertexBuffer(this.layoutVertexArray2,OA)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,wm),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(u){if(u.properties&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_end"))return{start:+u.properties.mapbox_clip_start,end:+u.properties.mapbox_clip_end}}addFeature(u,d,v,w,D,F){const N=this.layers[0].layout,Z=N.get("line-join").evaluate(u,{}),ie=N.get("line-cap"),ce=N.get("line-miter-limit"),Ce=N.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const Pe of d)this.addLine(Pe,u,Z,ie,ce,Ce,w,F);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,D,w)}addLine(u,d,v,w,D,F,N,Z){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,u=Yn(u,N?Z.line.getGranularityForZoomLevel(N.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Mt=0;Mt<u.length-1;Mt++)this.totalDistance+=u[Mt].dist(u[Mt+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const ie=Np[d.type]==="Polygon";let ce=u.length;for(;ce>=2&&u[ce-1].equals(u[ce-2]);)ce--;let Ce=0;for(;Ce<ce-1&&u[Ce].equals(u[Ce+1]);)Ce++;if(ce<(ie?3:2))return;v==="bevel"&&(D=1.05);const Pe=this.overscaling<=16?15*nt/(512*this.overscaling):0,De=this.segments.prepareSegment(10*ce,this.layoutVertexArray,this.indexArray);let ze,Ze,lt,yt,Nt;this.e1=this.e2=-1,ie&&(ze=u[ce-2],Nt=u[Ce].sub(ze)._unit()._perp());for(let Mt=Ce;Mt<ce;Mt++){if(lt=Mt===ce-1?ie?u[Ce+1]:void 0:u[Mt+1],lt&&u[Mt].equals(lt))continue;Nt&&(yt=Nt),ze&&(Ze=ze),ze=u[Mt],Nt=lt?lt.sub(ze)._unit()._perp():yt,yt=yt||Nt;let Re=yt.add(Nt);Re.x===0&&Re.y===0||Re._unit();const at=yt.x*Nt.x+yt.y*Nt.y,Ot=Re.x*Nt.x+Re.y*Nt.y,un=Ot!==0?1/Ot:1/0,Fn=2*Math.sqrt(2-2*Ot),mn=Ot<c0&&Ze&<,bn=yt.x*Nt.y-yt.y*Nt.x>0;if(mn&&Mt>Ce){const rr=ze.dist(Ze);if(rr>2*Pe){const On=ze.sub(ze.sub(Ze)._mult(Pe/rr)._round());this.updateDistance(Ze,On),this.addCurrentVertex(On,yt,0,0,De),Ze=On}}const Vn=Ze&<let Ln=Vn?v:ie?"butt":w;if(Vn&&Ln==="round"&&(un<F?Ln="miter":un<=2&&(Ln="fakeround")),Ln==="miter"&&un>D&&(Ln="bevel"),Ln==="bevel"&&(un>2&&(Ln="flipbevel"),un<D&&(Ln="miter")),Ze&&this.updateDistance(Ze,ze),Ln==="miter")Re._mult(un),this.addCurrentVertex(ze,Re,0,0,De);else if(Ln==="flipbevel"){if(un>100)Re=Nt.mult(-1);else{const rr=un*yt.add(Nt).mag()/yt.sub(Nt).mag();Re._perp()._mult(rr*(bn?-1:1))}this.addCurrentVertex(ze,Re,0,0,De),this.addCurrentVertex(ze,Re.mult(-1),0,0,De)}else if(Ln==="bevel"||Ln==="fakeround"){const rr=-Math.sqrt(un*un-1),On=bn?rr:0,Ur=bn?0:rr;if(Ze&&this.addCurrentVertex(ze,yt,On,Ur,De),Ln==="fakeround"){const Lr=Math.round(180*Fn/Math.PI/20);for(let jr=1;jr<Lr;jr++){let ei=jr/Lr;if(ei!==.5){const Js=ei-.5;ei+=ei*Js*(ei-1)*((1.0904+at*(at*(3.55645-1.43519*at)-3.2452))*Js*Js+(.848013+at*(.215638*at-1.06021)))}const Ko=Nt.sub(yt)._mult(ei)._add(yt)._unit()._mult(bn?-1:1);this.addHalfVertex(ze,Ko.x,Ko.y,!1,bn,0,De)}}lt&&this.addCurrentVertex(ze,Nt,-On,-Ur,De)}else if(Ln==="butt")this.addCurrentVertex(ze,Re,0,0,De);else if(Ln==="square"){const rr=Ze?1:-1;this.addCurrentVertex(ze,Re,rr,rr,De)}else Ln==="round"&&(Ze&&(this.addCurrentVertex(ze,yt,0,0,De),this.addCurrentVertex(ze,yt,1,1,De,!0)),lt&&(this.addCurrentVertex(ze,Nt,-1,-1,De,!0),this.addCurrentVertex(ze,Nt,0,0,De)));if(mn&&Mt<ce-1){const rr=ze.dist(lt);if(rr>2*Pe){const On=ze.add(lt.sub(ze)._mult(Pe/rr)._round());this.updateDistance(ze,On),this.addCurrentVertex(On,Nt,0,0,De),ze=On}}}}addCurrentVertex(u,d,v,w,D,F=!1){const N=d.y*w-d.x,Z=-d.y-d.x*w;this.addHalfVertex(u,d.x+d.y*v,d.y-d.x*v,F,!1,v,D),this.addHalfVertex(u,N,Z,F,!0,-w,D),this.distance>Gp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,d,v,w,D,F))}addHalfVertex({x:u,y:d},v,w,D,F,N,Z){const ie=.5*(this.lineClips?this.scaledDistance*(Gp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(D?1:0),(d<<1)+(F?1:0),Math.round(63*v)+128,Math.round(63*w)+128,1+(N===0?0:N<0?-1:1)|(63&ie)<<2,ie>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const ce=Z.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,ce,this.e2),Z.primitiveLength++),F?this.e2=ce:this.e1=ce}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(u,d){this.distance+=u.dist(d),this.updateScaledDistance()}}let sA,xh;dr("LineBucket",Sf,{omit:["layers","patternFeatures"]});var Qc={get paint(){return xh=xh||new va({"line-opacity":new qr(qe.paint_line["line-opacity"]),"line-color":new qr(qe.paint_line["line-color"]),"line-translate":new cr(qe.paint_line["line-translate"]),"line-translate-anchor":new cr(qe.paint_line["line-translate-anchor"]),"line-width":new qr(qe.paint_line["line-width"]),"line-gap-width":new qr(qe.paint_line["line-gap-width"]),"line-offset":new qr(qe.paint_line["line-offset"]),"line-blur":new qr(qe.paint_line["line-blur"]),"line-dasharray":new ZA(qe.paint_line["line-dasharray"]),"line-pattern":new Lu(qe.paint_line["line-pattern"]),"line-gradient":new pu(qe.paint_line["line-gradient"])})},get layout(){return sA=sA||new va({"line-cap":new cr(qe.layout_line["line-cap"]),"line-join":new qr(qe.layout_line["line-join"]),"line-miter-limit":new cr(qe.layout_line["line-miter-limit"]),"line-round-limit":new cr(qe.layout_line["line-round-limit"]),"line-sort-key":new qr(qe.layout_line["line-sort-key"])})}};class ec extends qr{possiblyEvaluate(u,d){return d=new Ho(Math.floor(d.zoom),{now:d.now,fadeDuration:d.fadeDuration,zoomHistory:d.zoomHistory,transition:d.transition}),super.possiblyEvaluate(u,d)}evaluate(u,d,v,w){return d=ut({},d,{zoom:Math.floor(d.zoom)}),super.evaluate(u,d,v,w)}}let Ef;class d0 extends Xl{constructor(u){super(u,Qc),this.gradientVersion=0,Ef||(Ef=new ec(Qc.paint.properties["line-width"].specification),Ef.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if(u==="line-gradient"){const d=this.gradientExpression();this.stepInterpolant=!!function(v){return v._styleExpression!==void 0}(d)&&d._styleExpression.expression instanceof ot,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,d){super.recalculate(u,d),this.paint._values["line-floorwidth"]=Ef.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new Sf(u)}queryRadius(u){const d=u,v=Mm(JA("line-width",this,d),JA("line-gap-width",this,d)),w=JA("line-offset",this,d);return v/2+Math.abs(w)+_h(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:v,geometry:w,transform:D,pixelsToTileUnits:F}){const N=yd(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-D.bearingInRadians,F),Z=F/2*Mm(this.paint.get("line-width").evaluate(d,v),this.paint.get("line-gap-width").evaluate(d,v)),ie=this.paint.get("line-offset").evaluate(d,v);return ie&&(w=function(ce,Ce){const Pe=[];for(let De=0;De<ce.length;De++){const ze=ce[De],Ze=[];for(let lt=0;lt<ze.length;lt++){const yt=ze[lt-1],Nt=ze[lt],Mt=ze[lt+1],Re=lt===0?new P(0,0):Nt.sub(yt)._unit()._perp(),at=lt===ze.length-1?new P(0,0):Mt.sub(Nt)._unit()._perp(),Ot=Re._add(at)._unit(),un=Ot.x*at.x+Ot.y*at.y;un!==0&&Ot._mult(1/un),Ze.push(Ot._mult(Ce)._add(Nt))}Pe.push(Ze)}return Pe}(w,ie*F)),function(ce,Ce,Pe){for(let De=0;De<Ce.length;De++){const ze=Ce[De];if(ce.length>=3){for(let Ze=0;Ze<ze.length;Ze++)if(bc(ce,ze[Ze]))return!0}if(MA(ce,ze,Pe))return!0}return!1}(N,w,Z)}isTileClipped(){return!0}}function Mm(h,u){return u>0?u+2*h:h}const ny=Oa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Jh=Oa([{name:"a_projected_pos",components:3,type:"Float32"}],4);Oa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const fg=Oa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Oa([{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 Sm=Oa([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Of=Oa([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function h0(h,u,d){return h.sections.forEach(v=>{v.text=function(w,D,F){const N=D.layout.get("text-transform").evaluate(F,{});return N==="uppercase"?w=w.toLocaleUpperCase():N==="lowercase"&&(w=w.toLocaleLowerCase()),Ka.applyArabicShaping&&(w=Ka.applyArabicShaping(w)),w}(v.text,u,d)}),h}Oa([{name:"triangle",components:3,type:"Uint16"}]),Oa([{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"}]),Oa([{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"}]),Oa([{type:"Float32",name:"offsetX"}]),Oa([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Oa([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const wd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var f0,Em,Om,Ns=24,p0={};function ry(){return f0||(f0=1,p0.read=function(h,u,d,v,w){var D,F,N=8*w-v-1,Z=(1<<N)-1,ie=Z>>1,ce=-7,Ce=d?w-1:0,Pe=d?-1:1,De=h[u+Ce];for(Ce+=Pe,D=De&(1<<-ce)-1,De>>=-ce,ce+=N;ce>0;D=256*D+h[u+Ce],Ce+=Pe,ce-=8);for(F=D&(1<<-ce)-1,D>>=-ce,ce+=v;ce>0;F=256*F+h[u+Ce],Ce+=Pe,ce-=8);if(D===0)D=1-ie;else{if(D===Z)return F?NaN:1/0*(De?-1:1);F+=Math.pow(2,v),D-=ie}return(De?-1:1)*F*Math.pow(2,D-v)},p0.write=function(h,u,d,v,w,D){var F,N,Z,ie=8*D-w-1,ce=(1<<ie)-1,Ce=ce>>1,Pe=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,De=v?0:D-1,ze=v?1:-1,Ze=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(N=isNaN(u)?1:0,F=ce):(F=Math.floor(Math.log(u)/Math.LN2),u*(Z=Math.pow(2,-F))<1&&(F--,Z*=2),(u+=F+Ce>=1?Pe/Z:Pe*Math.pow(2,1-Ce))*Z>=2&&(F++,Z/=2),F+Ce>=ce?(N=0,F=ce):F+Ce>=1?(N=(u*Z-1)*Math.pow(2,w),F+=Ce):(N=u*Math.pow(2,Ce-1)*Math.pow(2,w),F=0));w>=8;h[d+De]=255&N,De+=ze,N/=256,w-=8);for(F=F<<w|N,ie+=w;ie>0;h[d+De]=255&F,De+=ze,F/=256,ie-=8);h[d+De-ze]|=128*Ze}),p0}function m0(){if(Om)return Em;Om=1,Em=u;var h=ry();function u(Re){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(Re)?Re:new Uint8Array(Re||0),this.pos=0,this.type=0,this.length=this.buf.length}u.Varint=0,u.Fixed64=1,u.Bytes=2,u.Fixed32=5;var d=4294967296,v=1/d,w=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function D(Re){return Re.type===u.Bytes?Re.readVarint()+Re.pos:Re.pos+1}function F(Re,at,Ot){return Ot?4294967296*at+(Re>>>0):4294967296*(at>>>0)+(Re>>>0)}function N(Re,at,Ot){var un=at<=16383?1:at<=2097151?2:at<=268435455?3:Math.floor(Math.log(at)/(7*Math.LN2));Ot.realloc(un);for(var Fn=Ot.pos-1;Fn>=Re;Fn--)Ot.buf[Fn+un]=Ot.buf[Fn]}function Z(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeVarint(Re[Ot])}function ie(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeSVarint(Re[Ot])}function ce(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeFloat(Re[Ot])}function Ce(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeDouble(Re[Ot])}function Pe(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeBoolean(Re[Ot])}function De(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeFixed32(Re[Ot])}function ze(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeSFixed32(Re[Ot])}function Ze(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeFixed64(Re[Ot])}function lt(Re,at){for(var Ot=0;Ot<Re.length;Ot++)at.writeSFixed64(Re[Ot])}function yt(Re,at){return(Re[at]|Re[at+1]<<8|Re[at+2]<<16)+16777216*Re[at+3]}function Nt(Re,at,Ot){Re[Ot]=at,Re[Ot+1]=at>>>8,Re[Ot+2]=at>>>16,Re[Ot+3]=at>>>24}function Mt(Re,at){return(Re[at]|Re[at+1]<<8|Re[at+2]<<16)+(Re[at+3]<<24)}return u.prototype={destroy:function(){this.buf=null},readFields:function(Re,at,Ot){for(Ot=Ot||this.length;this.pos<Ot;){var un=this.readVarint(),Fn=un>>3,mn=this.pos;this.type=7&un,Re(Fn,at,this),this.pos===mn&&this.skip(un)}return at},readMessage:function(Re,at){return this.readFields(Re,at,this.readVarint()+this.pos)},readFixed32:function(){var Re=yt(this.buf,this.pos);return this.pos+=4,Re},readSFixed32:function(){var Re=Mt(this.buf,this.pos);return this.pos+=4,Re},readFixed64:function(){var Re=yt(this.buf,this.pos)+yt(this.buf,this.pos+4)*d;return this.pos+=8,Re},readSFixed64:function(){var Re=yt(this.buf,this.pos)+Mt(this.buf,this.pos+4)*d;return this.pos+=8,Re},readFloat:function(){var Re=h.read(this.buf,this.pos,!0,23,4);return this.pos+=4,Re},readDouble:function(){var Re=h.read(this.buf,this.pos,!0,52,8);return this.pos+=8,Re},readVarint:function(Re){var at,Ot,un=this.buf;return at=127&(Ot=un[this.pos++]),Ot<128?at:(at|=(127&(Ot=un[this.pos++]))<<7,Ot<128?at:(at|=(127&(Ot=un[this.pos++]))<<14,Ot<128?at:(at|=(127&(Ot=un[this.pos++]))<<21,Ot<128?at:function(Fn,mn,bn){var Vn,Ln,rr=bn.buf;if(Vn=(112&(Ln=rr[bn.pos++]))>>4,Ln<128||(Vn|=(127&(Ln=rr[bn.pos++]))<<3,Ln<128)||(Vn|=(127&(Ln=rr[bn.pos++]))<<10,Ln<128)||(Vn|=(127&(Ln=rr[bn.pos++]))<<17,Ln<128)||(Vn|=(127&(Ln=rr[bn.pos++]))<<24,Ln<128)||(Vn|=(1&(Ln=rr[bn.pos++]))<<31,Ln<128))return F(Fn,Vn,mn);throw new Error("Expected varint not more than 10 bytes")}(at|=(15&(Ot=un[this.pos]))<<28,Re,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var Re=this.readVarint();return Re%2==1?(Re+1)/-2:Re/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var Re=this.readVarint()+this.pos,at=this.pos;return this.pos=Re,Re-at>=12&&w?function(Ot,un,Fn){return w.decode(Ot.subarray(un,Fn))}(this.buf,at,Re):function(Ot,un,Fn){for(var mn="",bn=un;bn<Fn;){var Vn,Ln,rr,On=Ot[bn],Ur=null,Lr=On>239?4:On>223?3:On>191?2:1;if(bn+Lr>Fn)break;Lr===1?On<128&&(Ur=On):Lr===2?(192&(Vn=Ot[bn+1]))==128&&(Ur=(31&On)<<6|63&Vn)<=127&&(Ur=null):Lr===3?(Ln=Ot[bn+2],(192&(Vn=Ot[bn+1]))==128&&(192&Ln)==128&&((Ur=(15&On)<<12|(63&Vn)<<6|63&Ln)<=2047||Ur>=55296&&Ur<=57343)&&(Ur=null)):Lr===4&&(Ln=Ot[bn+2],rr=Ot[bn+3],(192&(Vn=Ot[bn+1]))==128&&(192&Ln)==128&&(192&rr)==128&&((Ur=(15&On)<<18|(63&Vn)<<12|(63&Ln)<<6|63&rr)<=65535||Ur>=1114112)&&(Ur=null)),Ur===null?(Ur=65533,Lr=1):Ur>65535&&(Ur-=65536,mn+=String.fromCharCode(Ur>>>10&1023|55296),Ur=56320|1023&Ur),mn+=String.fromCharCode(Ur),bn+=Lr}return mn}(this.buf,at,Re)},readBytes:function(){var Re=this.readVarint()+this.pos,at=this.buf.subarray(this.pos,Re);return this.pos=Re,at},readPackedVarint:function(Re,at){if(this.type!==u.Bytes)return Re.push(this.readVarint(at));var Ot=D(this);for(Re=Re||[];this.pos<Ot;)Re.push(this.readVarint(at));return Re},readPackedSVarint:function(Re){if(this.type!==u.Bytes)return Re.push(this.readSVarint());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readSVarint());return Re},readPackedBoolean:function(Re){if(this.type!==u.Bytes)return Re.push(this.readBoolean());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readBoolean());return Re},readPackedFloat:function(Re){if(this.type!==u.Bytes)return Re.push(this.readFloat());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readFloat());return Re},readPackedDouble:function(Re){if(this.type!==u.Bytes)return Re.push(this.readDouble());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readDouble());return Re},readPackedFixed32:function(Re){if(this.type!==u.Bytes)return Re.push(this.readFixed32());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readFixed32());return Re},readPackedSFixed32:function(Re){if(this.type!==u.Bytes)return Re.push(this.readSFixed32());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readSFixed32());return Re},readPackedFixed64:function(Re){if(this.type!==u.Bytes)return Re.push(this.readFixed64());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readFixed64());return Re},readPackedSFixed64:function(Re){if(this.type!==u.Bytes)return Re.push(this.readSFixed64());var at=D(this);for(Re=Re||[];this.pos<at;)Re.push(this.readSFixed64());return Re},skip:function(Re){var at=7ℜif(at===u.Varint)for(;this.buf[this.pos++]>127;);else if(at===u.Bytes)this.pos=this.readVarint()+this.pos;else if(at===u.Fixed32)this.pos+=4;else{if(at!==u.Fixed64)throw new Error("Unimplemented type: "+at);this.pos+=8}},writeTag:function(Re,at){this.writeVarint(Re<<3|at)},realloc:function(Re){for(var at=this.length||16;at<this.pos+Re;)at*=2;if(at!==this.length){var Ot=new Uint8Array(at);Ot.set(this.buf),this.buf=Ot,this.length=at}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(Re){this.realloc(4),Nt(this.buf,Re,this.pos),this.pos+=4},writeSFixed32:function(Re){this.realloc(4),Nt(this.buf,Re,this.pos),this.pos+=4},writeFixed64:function(Re){this.realloc(8),Nt(this.buf,-1&Re,this.pos),Nt(this.buf,Math.floor(Re*v),this.pos+4),this.pos+=8},writeSFixed64:function(Re){this.realloc(8),Nt(this.buf,-1&Re,this.pos),Nt(this.buf,Math.floor(Re*v),this.pos+4),this.pos+=8},writeVarint:function(Re){(Re=+Re||0)>268435455||Re<0?function(at,Ot){var un,Fn;if(at>=0?(un=at%4294967296|0,Fn=at/4294967296|0):(Fn=~(-at/4294967296),4294967295^(un=~(-at%4294967296))?un=un+1|0:(un=0,Fn=Fn+1|0)),at>=18446744073709552e3||at<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Ot.realloc(10),function(mn,bn,Vn){Vn.buf[Vn.pos++]=127&mn|128,mn>>>=7,Vn.buf[Vn.pos++]=127&mn|128,mn>>>=7,Vn.buf[Vn.pos++]=127&mn|128,mn>>>=7,Vn.buf[Vn.pos++]=127&mn|128,Vn.buf[Vn.pos]=127&(mn>>>=7)}(un,0,Ot),function(mn,bn){var Vn=(7&mn)<<4;bn.buf[bn.pos++]|=Vn|((mn>>>=3)?128:0),mn&&(bn.buf[bn.pos++]=127&mn|((mn>>>=7)?128:0),mn&&(bn.buf[bn.pos++]=127&mn|((mn>>>=7)?128:0),mn&&(bn.buf[bn.pos++]=127&mn|((mn>>>=7)?128:0),mn&&(bn.buf[bn.pos++]=127&mn|((mn>>>=7)?128:0),mn&&(bn.buf[bn.pos++]=127&mn)))))}(Fn,Ot)}(Re,this):(this.realloc(4),this.buf[this.pos++]=127&Re|(Re>127?128:0),Re<=127||(this.buf[this.pos++]=127&(Re>>>=7)|(Re>127?128:0),Re<=127||(this.buf[this.pos++]=127&(Re>>>=7)|(Re>127?128:0),Re<=127||(this.buf[this.pos++]=Re>>>7&127))))},writeSVarint:function(Re){this.writeVarint(Re<0?2*-Re-1:2*Re)},writeBoolean:function(Re){this.writeVarint(!!Re)},writeString:function(Re){Re=String(Re),this.realloc(4*Re.length),this.pos++;var at=this.pos;this.pos=function(un,Fn,mn){for(var bn,Vn,Ln=0;Ln<Fn.length;Ln++){if((bn=Fn.charCodeAt(Ln))>55295&&bn<57344){if(!Vn){bn>56319||Ln+1===Fn.length?(un[mn++]=239,un[mn++]=191,un[mn++]=189):Vn=bn;continue}if(bn<56320){un[mn++]=239,un[mn++]=191,un[mn++]=189,Vn=bn;continue}bn=Vn-55296<<10|bn-56320|65536,Vn=null}else Vn&&(un[mn++]=239,un[mn++]=191,un[mn++]=189,Vn=null);bn<128?un[mn++]=bn:(bn<2048?un[mn++]=bn>>6|192:(bn<65536?un[mn++]=bn>>12|224:(un[mn++]=bn>>18|240,un[mn++]=bn>>12&63|128),un[mn++]=bn>>6&63|128),un[mn++]=63&bn|128)}return mn}(this.buf,Re,this.pos);var Ot=this.pos-at;Ot>=128&&N(at,Ot,this),this.pos=at-1,this.writeVarint(Ot),this.pos+=Ot},writeFloat:function(Re){this.realloc(4),h.write(this.buf,Re,this.pos,!0,23,4),this.pos+=4},writeDouble:function(Re){this.realloc(8),h.write(this.buf,Re,this.pos,!0,52,8),this.pos+=8},writeBytes:function(Re){var at=Re.length;this.writeVarint(at),this.realloc(at);for(var Ot=0;Ot<at;Ot++)this.buf[this.pos++]=Re[Ot]},writeRawMessage:function(Re,at){this.pos++;var Ot=this.pos;Re(at,this);var un=this.pos-Ot;un>=128&&N(Ot,un,this),this.pos=Ot-1,this.writeVarint(un),this.pos+=un},writeMessage:function(Re,at,Ot){this.writeTag(Re,u.Bytes),this.writeRawMessage(at,Ot)},writePackedVarint:function(Re,at){at.length&&this.writeMessage(Re,Z,at)},writePackedSVarint:function(Re,at){at.length&&this.writeMessage(Re,ie,at)},writePackedBoolean:function(Re,at){at.length&&this.writeMessage(Re,Pe,at)},writePackedFloat:function(Re,at){at.length&&this.writeMessage(Re,ce,at)},writePackedDouble:function(Re,at){at.length&&this.writeMessage(Re,Ce,at)},writePackedFixed32:function(Re,at){at.length&&this.writeMessage(Re,De,at)},writePackedSFixed32:function(Re,at){at.length&&this.writeMessage(Re,ze,at)},writePackedFixed64:function(Re,at){at.length&&this.writeMessage(Re,Ze,at)},writePackedSFixed64:function(Re,at){at.length&&this.writeMessage(Re,lt,at)},writeBytesField:function(Re,at){this.writeTag(Re,u.Bytes),this.writeBytes(at)},writeFixed32Field:function(Re,at){this.writeTag(Re,u.Fixed32),this.writeFixed32(at)},writeSFixed32Field:function(Re,at){this.writeTag(Re,u.Fixed32),this.writeSFixed32(at)},writeFixed64Field:function(Re,at){this.writeTag(Re,u.Fixed64),this.writeFixed64(at)},writeSFixed64Field:function(Re,at){this.writeTag(Re,u.Fixed64),this.writeSFixed64(at)},writeVarintField:function(Re,at){this.writeTag(Re,u.Varint),this.writeVarint(at)},writeSVarintField:function(Re,at){this.writeTag(Re,u.Varint),this.writeSVarint(at)},writeStringField:function(Re,at){this.writeTag(Re,u.Bytes),this.writeString(at)},writeFloatField:function(Re,at){this.writeTag(Re,u.Fixed32),this.writeFloat(at)},writeDoubleField:function(Re,at){this.writeTag(Re,u.Fixed64),this.writeDouble(at)},writeBooleanField:function(Re,at){this.writeVarintField(Re,!!at)}},Em}var Bm=f(m0());const wh=3;function iy(h,u,d){h===1&&d.readMessage(sp,u)}function sp(h,u,d){if(h===3){const{id:v,bitmap:w,width:D,height:F,left:N,top:Z,advance:ie}=d.readMessage(Im,{});u.push({id:v,bitmap:new Bo({width:D+2*wh,height:F+2*wh},w),metrics:{width:D,height:F,left:N,top:Z,advance:ie}})}}function Im(h,u,d){h===1?u.id=d.readVarint():h===2?u.bitmap=d.readBytes():h===3?u.width=d.readVarint():h===4?u.height=d.readVarint():h===5?u.left=d.readSVarint():h===6?u.top=d.readSVarint():h===7&&(u.advance=d.readVarint())}const Zs=wh;function pg(h){let u=0,d=0;for(const F of h)u+=F.w*F.h,d=Math.max(d,F.w);h.sort((F,N)=>N.h-F.h);const v=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(u/.95)),d),h:1/0}];let w=0,D=0;for(const F of h)for(let N=v.length-1;N>=0;N--){const Z=v[N];if(!(F.w>Z.w||F.h>Z.h)){if(F.x=Z.x,F.y=Z.y,D=Math.max(D,F.y+F.h),w=Math.max(w,F.x+F.w),F.w===Z.w&&F.h===Z.h){const ie=v.pop();N<v.length&&(v[N]=ie)}else F.h===Z.h?(Z.x+=F.w,Z.w-=F.w):F.w===Z.w?(Z.y+=F.h,Z.h-=F.h):(v.push({x:Z.x+F.w,y:Z.y,w:Z.w-F.w,h:F.h}),Z.y+=F.h,Z.h-=F.h);break}}return{w,h:D,fill:u/(w*D)||0}}const lA=1;class g0{constructor(u,{pixelRatio:d,version:v,stretchX:w,stretchY:D,content:F,textFitWidth:N,textFitHeight:Z}){this.paddedRect=u,this.pixelRatio=d,this.stretchX=w,this.stretchY=D,this.content=F,this.version=v,this.textFitWidth=N,this.textFitHeight=Z}get tl(){return[this.paddedRect.x+lA,this.paddedRect.y+lA]}get br(){return[this.paddedRect.x+this.paddedRect.w-lA,this.paddedRect.y+this.paddedRect.h-lA]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*lA)/this.pixelRatio,(this.paddedRect.h-2*lA)/this.pixelRatio]}}class mg{constructor(u,d){const v={},w={};this.haveRenderCallbacks=[];const D=[];this.addImages(u,v,D),this.addImages(d,w,D);const{w:F,h:N}=pg(D),Z=new Nu({width:F||1,height:N||1});for(const ie in u){const ce=u[ie],Ce=v[ie].paddedRect;Nu.copy(ce.data,Z,{x:0,y:0},{x:Ce.x+lA,y:Ce.y+lA},ce.data)}for(const ie in d){const ce=d[ie],Ce=w[ie].paddedRect,Pe=Ce.x+lA,De=Ce.y+lA,ze=ce.data.width,Ze=ce.data.height;Nu.copy(ce.data,Z,{x:0,y:0},{x:Pe,y:De},ce.data),Nu.copy(ce.data,Z,{x:0,y:Ze-1},{x:Pe,y:De-1},{width:ze,height:1}),Nu.copy(ce.data,Z,{x:0,y:0},{x:Pe,y:De+Ze},{width:ze,height:1}),Nu.copy(ce.data,Z,{x:ze-1,y:0},{x:Pe-1,y:De},{width:1,height:Ze}),Nu.copy(ce.data,Z,{x:0,y:0},{x:Pe+ze,y:De},{width:1,height:Ze})}this.image=Z,this.iconPositions=v,this.patternPositions=w}addImages(u,d,v){for(const w in u){const D=u[w],F={x:0,y:0,w:D.data.width+2*lA,h:D.data.height+2*lA};v.push(F),d[w]=new g0(F,D),D.hasRenderCallback&&this.haveRenderCallbacks.push(w)}}patchUpdatedImages(u,d){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const v in u.updatedImages)this.patchUpdatedImage(this.iconPositions[v],u.getImage(v),d),this.patchUpdatedImage(this.patternPositions[v],u.getImage(v),d)}patchUpdatedImage(u,d,v){if(!u||!d||u.version===d.version)return;u.version=d.version;const[w,D]=u.tl;v.update(d.data,void 0,{x:w,y:D})}}var Mh;dr("ImagePosition",g0),dr("ImageAtlas",mg),s.ai=void 0,(Mh=s.ai||(s.ai={}))[Mh.none=0]="none",Mh[Mh.horizontal=1]="horizontal",Mh[Mh.vertical=2]="vertical",Mh[Mh.horizontalOnly=3]="horizontalOnly";const lp=-17;class Wp{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(u,d){const v=new Wp;return v.scale=u||1,v.fontStack=d,v}static forImage(u){const d=new Wp;return d.imageName=u,d}}class Gu{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,d){const v=new Gu;for(let w=0;w<u.sections.length;w++){const D=u.sections[w];D.image?v.addImageSection(D):v.addTextSection(D,d)}return v}length(){return this.text.length}getSection(u){return this.sections[this.sectionIndex[u]]}getSectionIndex(u){return this.sectionIndex[u]}getCharCode(u){return this.text.charCodeAt(u)}verticalizePunctuation(){this.text=function(u){let d="";for(let v=0;v<u.length;v++){const w=u.charCodeAt(v+1)||null,D=u.charCodeAt(v-1)||null;d+=w&&pc(w)&&!wd[u[v+1]]||D&&pc(D)&&!wd[u[v-1]]||!wd[u[v]]?u[v]:wd[u[v]]}return d}(this.text)}trim(){let u=0;for(let v=0;v<this.text.length&&km[this.text.charCodeAt(v)];v++)u++;let d=this.text.length;for(let v=this.text.length-1;v>=0&&v>=u&&km[this.text.charCodeAt(v)];v--)d--;this.text=this.text.substring(u,d),this.sectionIndex=this.sectionIndex.slice(u,d)}substring(u,d){const v=new Gu;return v.text=this.text.substring(u,d),v.sectionIndex=this.sectionIndex.slice(u,d),v.sections=this.sections,v}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((u,d)=>Math.max(u,this.sections[d].scale),0)}addTextSection(u,d){this.text+=u.text,this.sections.push(Wp.forText(u.scale,u.fontStack||d));const v=this.sections.length-1;for(let w=0;w<u.text.length;++w)this.sectionIndex.push(v)}addImageSection(u){const d=u.image?u.image.name:"";if(d.length===0)return void tt("Can't add FormattedSection with an empty image.");const v=this.getNextImageSectionCharCode();v?(this.text+=String.fromCharCode(v),this.sections.push(Wp.forImage(d)),this.sectionIndex.push(this.sections.length-1)):tt("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Bf(h,u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze){const Ze=Gu.fromFeature(h,w);let lt;Ce===s.ai.vertical&&Ze.verticalizePunctuation();const{processBidirectionalText:yt,processStyledBidirectionalText:Nt}=Ka;if(yt&&Ze.sections.length===1){lt=[];const at=yt(Ze.toString(),qp(Ze,ie,D,u,v,De));for(const Ot of at){const un=new Gu;un.text=Ot,un.sections=Ze.sections;for(let Fn=0;Fn<Ot.length;Fn++)un.sectionIndex.push(0);lt.push(un)}}else if(Nt){lt=[];const at=Nt(Ze.text,Ze.sectionIndex,qp(Ze,ie,D,u,v,De));for(const Ot of at){const un=new Gu;un.text=Ot[0],un.sectionIndex=Ot[1],un.sections=Ze.sections,lt.push(un)}}else lt=function(at,Ot){const un=[],Fn=at.text;let mn=0;for(const bn of Ot)un.push(at.substring(mn,bn)),mn=bn;return mn<Fn.length&&un.push(at.substring(mn,Fn.length)),un}(Ze,qp(Ze,ie,D,u,v,De));const Mt=[],Re={positionedLines:Mt,text:Ze.toString(),top:ce[1],bottom:ce[1],left:ce[0],right:ce[0],writingMode:Ce,iconsInText:!1,verticalizable:!1};return function(at,Ot,un,Fn,mn,bn,Vn,Ln,rr,On,Ur,Lr){let jr=0,ei=lp,Ko=0,Js=0;const Wl=Ln==="right"?1:Ln==="left"?0:.5;let Wu=0;for(const ml of mn){ml.trim();const ru=ml.getMaxScale(),IA=(ru-1)*Ns,kA={positionedGlyphs:[],lineOffset:0};at.positionedLines[Wu]=kA;const rc=kA.positionedGlyphs;let iu=0;if(!ml.length()){ei+=bn,++Wu;continue}for(let Mc=0;Mc<ml.length();Mc++){const Ro=ml.getSection(Mc),cA=ml.getSectionIndex(Mc),Gs=ml.getCharCode(Mc);let el=0,Cu=null,Jp=null,Yc=null,w0=Ns;const eh=!(rr===s.ai.horizontal||!Ur&&!oA(Gs)||Ur&&(km[Gs]||(Jd=Gs,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(Jd)))));if(Ro.imageName){const $c=Fn[Ro.imageName];if(!$c)continue;Yc=Ro.imageName,at.iconsInText=at.iconsInText||!0,Jp=$c.paddedRect;const Qu=$c.displaySize;Ro.scale=Ro.scale*Ns/Lr,Cu={width:Qu[0],height:Qu[1],left:lA,top:-3,advance:eh?Qu[1]:Qu[0]},el=IA+(Ns-Qu[1]*Ro.scale),w0=Cu.advance;const Ed=eh?Qu[0]*Ro.scale-Ns*ru:Qu[1]*Ro.scale-Ns*ru;Ed>0&&Ed>iu&&(iu=Ed)}else{const $c=un[Ro.fontStack],Qu=$c&&$c[Gs];if(Qu&&Qu.rect)Jp=Qu.rect,Cu=Qu.metrics;else{const Ed=Ot[Ro.fontStack],Pf=Ed&&Ed[Gs];if(!Pf)continue;Cu=Pf.metrics}el=(ru-Ro.scale)*Ns}eh?(at.verticalizable=!0,rc.push({glyph:Gs,imageName:Yc,x:jr,y:ei+el,vertical:eh,scale:Ro.scale,fontStack:Ro.fontStack,sectionIndex:cA,metrics:Cu,rect:Jp}),jr+=w0*Ro.scale+On):(rc.push({glyph:Gs,imageName:Yc,x:jr,y:ei+el,vertical:eh,scale:Ro.scale,fontStack:Ro.fontStack,sectionIndex:cA,metrics:Cu,rect:Jp}),jr+=Cu.advance*Ro.scale+On)}rc.length!==0&&(Ko=Math.max(jr-On,Ko),yg(rc,0,rc.length-1,Wl,iu)),jr=0;const Sd=bn*ru+iu;kA.lineOffset=Math.max(iu,IA),ei+=Sd,Js=Math.max(Sd,Js),++Wu}var Jd;const nc=ei-lp,{horizontalAlign:_u,verticalAlign:AA}=v0(Vn);(function(ml,ru,IA,kA,rc,iu,Sd,Mc,Ro){const cA=(ru-IA)*rc;let Gs=0;Gs=iu!==Sd?-Mc*kA-lp:(-kA*Ro+.5)*Sd;for(const el of ml)for(const Cu of el.positionedGlyphs)Cu.x+=cA,Cu.y+=Gs})(at.positionedLines,Wl,_u,AA,Ko,Js,bn,nc,mn.length),at.top+=-AA*nc,at.bottom=at.top+nc,at.left+=-_u*Ko,at.right=at.left+Ko}(Re,u,d,v,lt,F,N,Z,Ce,ie,Pe,ze),!function(at){for(const Ot of at)if(Ot.positionedGlyphs.length!==0)return!1;return!0}(Mt)&&Re}const km={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Md={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Tm={40:!0};function ef(h,u,d,v,w,D){if(u.imageName){const F=v[u.imageName];return F?F.displaySize[0]*u.scale*Ns/D+w:0}{const F=d[u.fontStack],N=F&&F[h];return N?N.metrics.advance*u.scale+w:0}}function Qp(h,u,d,v){const w=Math.pow(h-u,2);return v?h<u?w/2:2*w:w+Math.abs(d)*d}function y0(h,u,d){let v=0;return h===10&&(v-=1e4),d&&(v+=150),h!==40&&h!==65288||(v+=50),u!==41&&u!==65289||(v+=50),v}function Pm(h,u,d,v,w,D){let F=null,N=Qp(u,d,w,D);for(const Z of v){const ie=Qp(u-Z.x,d,w,D)+Z.badness;ie<=N&&(F=Z,N=ie)}return{index:h,x:u,priorBreak:F,badness:N}}function gg(h){return h?gg(h.priorBreak).concat(h.index):[]}function qp(h,u,d,v,w,D){if(!h)return[];const F=[],N=function(Ce,Pe,De,ze,Ze,lt){let yt=0;for(let Nt=0;Nt<Ce.length();Nt++){const Mt=Ce.getSection(Nt);yt+=ef(Ce.getCharCode(Nt),Mt,ze,Ze,Pe,lt)}return yt/Math.max(1,Math.ceil(yt/De))}(h,u,d,v,w,D),Z=h.text.indexOf("")>=0;let ie=0;for(let Ce=0;Ce<h.length();Ce++){const Pe=h.getSection(Ce),De=h.getCharCode(Ce);if(km[De]||(ie+=ef(De,Pe,v,w,u,D)),Ce<h.length()-1){const ze=!((ce=De)<11904)&&(!!Si["CJK Compatibility Forms"](ce)||!!Si["CJK Compatibility"](ce)||!!Si["CJK Strokes"](ce)||!!Si["CJK Symbols and Punctuation"](ce)||!!Si["Enclosed CJK Letters and Months"](ce)||!!Si["Halfwidth and Fullwidth Forms"](ce)||!!Si["Ideographic Description Characters"](ce)||!!Si["Vertical Forms"](ce)||HA.test(String.fromCodePoint(ce)));(Md[De]||ze||Pe.imageName||Ce!==h.length()-2&&Tm[h.getCharCode(Ce+1)])&&F.push(Pm(Ce+1,ie,N,F,y0(De,h.getCharCode(Ce+1),ze&&Z),!1))}}var ce;return gg(Pm(h.length(),ie,N,F,0,!0))}function v0(h){let u=.5,d=.5;switch(h){case"right":case"top-right":case"bottom-right":u=1;break;case"left":case"top-left":case"bottom-left":u=0}switch(h){case"bottom":case"bottom-right":case"bottom-left":d=1;break;case"top":case"top-right":case"top-left":d=0}return{horizontalAlign:u,verticalAlign:d}}function yg(h,u,d,v,w){if(!v&&!w)return;const D=h[d],F=(h[d].x+D.metrics.advance*D.scale)*v;for(let N=u;N<=d;N++)h[N].x-=F,h[N].y+=w}function vg(h,u,d){const{horizontalAlign:v,verticalAlign:w}=v0(d),D=u[0]-h.displaySize[0]*v,F=u[1]-h.displaySize[1]*w;return{image:h,top:F,bottom:F+h.displaySize[1],left:D,right:D+h.displaySize[0]}}function Yp(h){var u,d;let v=h.left,w=h.top,D=h.right-v,F=h.bottom-w;const N=(u=h.image.textFitWidth)!==null&&u!==void 0?u:"stretchOrShrink",Z=(d=h.image.textFitHeight)!==null&&d!==void 0?d:"stretchOrShrink",ie=(h.image.content[2]-h.image.content[0])/(h.image.content[3]-h.image.content[1]);if(Z==="proportional"){if(N==="stretchOnly"&&D/F<ie||N==="proportional"){const ce=Math.ceil(F*ie);v*=ce/D,D=ce}}else if(N==="proportional"&&Z==="stretchOnly"&&ie!==0&&D/F>ie){const ce=Math.ceil(D/ie);w*=ce/F,F=ce}return{x1:v,y1:w,x2:v+D,y2:w+F}}function $p(h,u,d,v,w,D){const F=h.image;let N;if(F.content){const lt=F.content,yt=F.pixelRatio||1;N=[lt[0]/yt,lt[1]/yt,F.displaySize[0]-lt[2]/yt,F.displaySize[1]-lt[3]/yt]}const Z=u.left*D,ie=u.right*D;let ce,Ce,Pe,De;d==="width"||d==="both"?(De=w[0]+Z-v[3],Ce=w[0]+ie+v[1]):(De=w[0]+(Z+ie-F.displaySize[0])/2,Ce=De+F.displaySize[0]);const ze=u.top*D,Ze=u.bottom*D;return d==="height"||d==="both"?(ce=w[1]+ze-v[0],Pe=w[1]+Ze+v[2]):(ce=w[1]+(ze+Ze-F.displaySize[1])/2,Pe=ce+F.displaySize[1]),{image:F,top:ce,right:Ce,bottom:Pe,left:De,collisionPadding:N}}const up=255,qc=128,Sh=up*qc;function Km(h,u){const{expression:d}=u;if(d.kind==="constant")return{kind:"constant",layoutSize:d.evaluate(new Ho(h+1))};if(d.kind==="source")return{kind:"source"};{const{zoomStops:v,interpolationType:w}=d;let D=0;for(;D<v.length&&v[D]<=h;)D++;D=Math.max(0,D-1);let F=D;for(;F<v.length&&v[F]<h+1;)F++;F=Math.min(v.length-1,F);const N=v[D],Z=v[F];return d.kind==="composite"?{kind:"composite",minZoom:N,maxZoom:Z,interpolationType:w}:{kind:"camera",minZoom:N,maxZoom:Z,minSize:d.evaluate(new Ho(N)),maxSize:d.evaluate(new Ho(Z)),interpolationType:w}}}function If(h,u,d){let v="never";const w=h.get(u);return w?v=w:h.get(d)&&(v="always"),v}const Rm=Bl.VectorTileFeature.types,Dm=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Vp(h,u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe){const De=N?Math.min(Sh,Math.round(N[0])):0,ze=N?Math.min(Sh,Math.round(N[1])):0;h.emplaceBack(u,d,Math.round(32*v),Math.round(32*w),D,F,(De<<1)+(Z?1:0),ze,16*ie,16*ce,256*Ce,256*Pe)}function _0(h,u,d){h.emplaceBack(u.x,u.y,d),h.emplaceBack(u.x,u.y,d),h.emplaceBack(u.x,u.y,d),h.emplaceBack(u.x,u.y,d)}function Lm(h){for(const u of h.sections)if(Ls(u.text))return!0;return!1}class Ap{constructor(u){this.layoutVertexArray=new zt,this.indexArray=new _n,this.programConfigurations=u,this.segments=new wn,this.dynamicLayoutVertexArray=new Tt,this.opacityVertexArray=new tn,this.hasVisibleVertices=!1,this.placedSymbolArray=new z}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(u,d,v,w){this.isEmpty()||(v&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,ny.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,d),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,Jh.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,Dm,!0),this.opacityVertexBuffer.itemSize=1),(v||w)&&this.programConfigurations.upload(u))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}dr("SymbolBuffers",Ap);class kf{constructor(u,d,v){this.layoutVertexArray=new u,this.layoutAttributes=d,this.indexArray=new v,this.segments=new wn,this.collisionVertexArray=new vn}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,fg.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}dr("CollisionBuffers",kf);class cp{constructor(u){this.collisionBoxArray=u.collisionBoxArray,this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(F=>F.id),this.index=u.index,this.pixelRatio=u.pixelRatio,this.sourceLayerIndex=u.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Km(this.zoom,d["text-size"]),this.iconSizeData=Km(this.zoom,d["icon-size"]);const v=this.layers[0].layout,w=v.get("symbol-sort-key"),D=v.get("symbol-z-order");this.canOverlap=If(v,"text-overlap","text-allow-overlap")!=="never"||If(v,"icon-overlap","icon-allow-overlap")!=="never"||v.get("text-ignore-placement")||v.get("icon-ignore-placement"),this.sortFeaturesByKey=D!=="viewport-y"&&!w.isConstant(),this.sortFeaturesByY=(D==="viewport-y"||D==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,v.get("symbol-placement")==="point"&&(this.writingModes=v.get("text-writing-mode").map(F=>s.ai[F])),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id),this.sourceID=u.sourceID}createArrays(){this.text=new Ap(new $s(this.layers,this.zoom,u=>/^text/.test(u))),this.icon=new Ap(new $s(this.layers,this.zoom,u=>/^icon/.test(u))),this.glyphOffsetArray=new se,this.lineVertexArray=new be,this.symbolInstances=new ne,this.textAnchorOffsets=new Te}calculateGlyphDependencies(u,d,v,w,D){for(let F=0;F<u.length;F++)if(d[u.charCodeAt(F)]=!0,(v||w)&&D){const N=wd[u.charAt(F)];N&&(d[N.charCodeAt(0)]=!0)}}populate(u,d,v){const w=this.layers[0],D=w.layout,F=D.get("text-font"),N=D.get("text-field"),Z=D.get("icon-image"),ie=(N.value.kind!=="constant"||N.value.value instanceof sa&&!N.value.value.isEmpty()||N.value.value.toString().length>0)&&(F.value.kind!=="constant"||F.value.value.length>0),ce=Z.value.kind!=="constant"||!!Z.value.value||Object.keys(Z.parameters).length>0,Ce=D.get("symbol-sort-key");if(this.features=[],!ie&&!ce)return;const Pe=d.iconDependencies,De=d.glyphDependencies,ze=d.availableImages,Ze=new Ho(this.zoom);for(const{feature:lt,id:yt,index:Nt,sourceLayerIndex:Mt}of u){const Re=w._featureFilter.needGeometry,at=XA(lt,Re);if(!w._featureFilter.filter(Ze,at,v))continue;let Ot,un;if(Re||(at.geometry=md(lt)),ie){const mn=w.getValueAndResolveTokens("text-field",at,v,ze),bn=sa.factory(mn),Vn=this.hasRTLText=this.hasRTLText||Lm(bn);(!Vn||Ka.getRTLTextPluginStatus()==="unavailable"||Vn&&Ka.isParsed())&&(Ot=h0(bn,w,at))}if(ce){const mn=w.getValueAndResolveTokens("icon-image",at,v,ze);un=mn instanceof Mo?mn:Mo.fromString(mn)}if(!Ot&&!un)continue;const Fn=this.sortFeaturesByKey?Ce.evaluate(at,{},v):void 0;if(this.features.push({id:yt,text:Ot,icon:un,index:Nt,sourceLayerIndex:Mt,geometry:at.geometry,properties:lt.properties,type:Rm[lt.type],sortKey:Fn}),un&&(Pe[un.name]=!0),Ot){const mn=F.evaluate(at,{},v).join(","),bn=D.get("text-rotation-alignment")!=="viewport"&&D.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(s.ai.vertical)>=0;for(const Vn of Ot.sections)if(Vn.image)Pe[Vn.image.name]=!0;else{const Ln=cd(Ot.toString()),rr=Vn.fontStack||mn,On=De[rr]=De[rr]||{};this.calculateGlyphDependencies(Vn.text,On,bn,this.allowVerticalPlacement,Ln)}}}D.get("symbol-placement")==="line"&&(this.features=function(lt){const yt={},Nt={},Mt=[];let Re=0;function at(mn){Mt.push(lt[mn]),Re++}function Ot(mn,bn,Vn){const Ln=Nt[mn];return delete Nt[mn],Nt[bn]=Ln,Mt[Ln].geometry[0].pop(),Mt[Ln].geometry[0]=Mt[Ln].geometry[0].concat(Vn[0]),Ln}function un(mn,bn,Vn){const Ln=yt[bn];return delete yt[bn],yt[mn]=Ln,Mt[Ln].geometry[0].shift(),Mt[Ln].geometry[0]=Vn[0].concat(Mt[Ln].geometry[0]),Ln}function Fn(mn,bn,Vn){const Ln=Vn?bn[0][bn[0].length-1]:bn[0][0];return`${mn}:${Ln.x}:${Ln.y}`}for(let mn=0;mn<lt.length;mn++){const bn=lt[mn],Vn=bn.geometry,Ln=bn.text?bn.text.toString():null;if(!Ln){at(mn);continue}const rr=Fn(Ln,Vn),On=Fn(Ln,Vn,!0);if(rr in Nt&&On in yt&&Nt[rr]!==yt[On]){const Ur=un(rr,On,Vn),Lr=Ot(rr,On,Mt[Ur].geometry);delete yt[rr],delete Nt[On],Nt[Fn(Ln,Mt[Lr].geometry,!0)]=Lr,Mt[Ur].geometry=null}else rr in Nt?Ot(rr,On,Vn):On in yt?un(rr,On,Vn):(at(mn),yt[rr]=Re-1,Nt[On]=Re-1)}return Mt.filter(mn=>mn.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((lt,yt)=>lt.sortKey-yt.sortKey)}update(u,d,v){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,d,this.layers,v),this.icon.programConfigurations.updatePaintArrays(u,d,this.layers,v))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(u){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(u),this.iconCollisionBox.upload(u)),this.text.upload(u,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(u,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(u,d){const v=this.lineVertexArray.length;if(u.segment!==void 0){let w=u.dist(d[u.segment+1]),D=u.dist(d[u.segment]);const F={};for(let N=u.segment+1;N<d.length;N++)F[N]={x:d[N].x,y:d[N].y,tileUnitDistanceFromAnchor:w},N<d.length-1&&(w+=d[N+1].dist(d[N]));for(let N=u.segment||0;N>=0;N--)F[N]={x:d[N].x,y:d[N].y,tileUnitDistanceFromAnchor:D},N>0&&(D+=d[N-1].dist(d[N]));for(let N=0;N<d.length;N++){const Z=F[N];this.lineVertexArray.emplaceBack(Z.x,Z.y,Z.tileUnitDistanceFromAnchor)}}return{lineStartIndex:v,lineLength:this.lineVertexArray.length-v}}addSymbols(u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe){const De=u.indexArray,ze=u.layoutVertexArray,Ze=u.segments.prepareSegment(4*d.length,ze,De,this.canOverlap?F.sortKey:void 0),lt=this.glyphOffsetArray.length,yt=Ze.vertexLength,Nt=this.allowVerticalPlacement&&N===s.ai.vertical?Math.PI/2:0,Mt=F.text&&F.text.sections;for(let Re=0;Re<d.length;Re++){const{tl:at,tr:Ot,bl:un,br:Fn,tex:mn,pixelOffsetTL:bn,pixelOffsetBR:Vn,minFontScaleX:Ln,minFontScaleY:rr,glyphOffset:On,isSDF:Ur,sectionIndex:Lr}=d[Re],jr=Ze.vertexLength,ei=On[1];Vp(ze,Z.x,Z.y,at.x,ei+at.y,mn.x,mn.y,v,Ur,bn.x,bn.y,Ln,rr),Vp(ze,Z.x,Z.y,Ot.x,ei+Ot.y,mn.x+mn.w,mn.y,v,Ur,Vn.x,bn.y,Ln,rr),Vp(ze,Z.x,Z.y,un.x,ei+un.y,mn.x,mn.y+mn.h,v,Ur,bn.x,Vn.y,Ln,rr),Vp(ze,Z.x,Z.y,Fn.x,ei+Fn.y,mn.x+mn.w,mn.y+mn.h,v,Ur,Vn.x,Vn.y,Ln,rr),_0(u.dynamicLayoutVertexArray,Z,Nt),De.emplaceBack(jr,jr+2,jr+1),De.emplaceBack(jr+1,jr+2,jr+3),Ze.vertexLength+=4,Ze.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(On[0]),Re!==d.length-1&&Lr===d[Re+1].sectionIndex||u.programConfigurations.populatePaintArrays(ze.length,F,F.index,{},Pe,Mt&&Mt[Lr])}u.placedSymbolArray.emplaceBack(Z.x,Z.y,lt,this.glyphOffsetArray.length-lt,yt,ie,ce,Z.segment,v?v[0]:0,v?v[1]:0,w[0],w[1],N,0,!1,0,Ce)}_addCollisionDebugVertex(u,d,v,w,D,F){return d.emplaceBack(0,0),u.emplaceBack(v.x,v.y,w,D,Math.round(F.x),Math.round(F.y))}addCollisionDebugVertices(u,d,v,w,D,F,N){const Z=D.segments.prepareSegment(4,D.layoutVertexArray,D.indexArray),ie=Z.vertexLength,ce=D.layoutVertexArray,Ce=D.collisionVertexArray,Pe=N.anchorX,De=N.anchorY;this._addCollisionDebugVertex(ce,Ce,F,Pe,De,new P(u,d)),this._addCollisionDebugVertex(ce,Ce,F,Pe,De,new P(v,d)),this._addCollisionDebugVertex(ce,Ce,F,Pe,De,new P(v,w)),this._addCollisionDebugVertex(ce,Ce,F,Pe,De,new P(u,w)),Z.vertexLength+=4;const ze=D.indexArray;ze.emplaceBack(ie,ie+1),ze.emplaceBack(ie+1,ie+2),ze.emplaceBack(ie+2,ie+3),ze.emplaceBack(ie+3,ie),Z.primitiveLength+=4}addDebugCollisionBoxes(u,d,v,w){for(let D=u;D<d;D++){const F=this.collisionBoxArray.get(D);this.addCollisionDebugVertices(F.x1,F.y1,F.x2,F.y2,w?this.textCollisionBox:this.iconCollisionBox,F.anchorPoint,v)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new kf(Zt,Sm.members,gn),this.iconCollisionBox=new kf(Zt,Sm.members,gn);for(let u=0;u<this.symbolInstances.length;u++){const d=this.symbolInstances.get(u);this.addDebugCollisionBoxes(d.textBoxStartIndex,d.textBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.verticalTextBoxStartIndex,d.verticalTextBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.iconBoxStartIndex,d.iconBoxEndIndex,d,!1),this.addDebugCollisionBoxes(d.verticalIconBoxStartIndex,d.verticalIconBoxEndIndex,d,!1)}}_deserializeCollisionBoxesForSymbol(u,d,v,w,D,F,N,Z,ie){const ce={};for(let Ce=d;Ce<v;Ce++){const Pe=u.get(Ce);ce.textBox={x1:Pe.x1,y1:Pe.y1,x2:Pe.x2,y2:Pe.y2,anchorPointX:Pe.anchorPointX,anchorPointY:Pe.anchorPointY},ce.textFeatureIndex=Pe.featureIndex;break}for(let Ce=w;Ce<D;Ce++){const Pe=u.get(Ce);ce.verticalTextBox={x1:Pe.x1,y1:Pe.y1,x2:Pe.x2,y2:Pe.y2,anchorPointX:Pe.anchorPointX,anchorPointY:Pe.anchorPointY},ce.verticalTextFeatureIndex=Pe.featureIndex;break}for(let Ce=F;Ce<N;Ce++){const Pe=u.get(Ce);ce.iconBox={x1:Pe.x1,y1:Pe.y1,x2:Pe.x2,y2:Pe.y2,anchorPointX:Pe.anchorPointX,anchorPointY:Pe.anchorPointY},ce.iconFeatureIndex=Pe.featureIndex;break}for(let Ce=Z;Ce<ie;Ce++){const Pe=u.get(Ce);ce.verticalIconBox={x1:Pe.x1,y1:Pe.y1,x2:Pe.x2,y2:Pe.y2,anchorPointX:Pe.anchorPointX,anchorPointY:Pe.anchorPointY},ce.verticalIconFeatureIndex=Pe.featureIndex;break}return ce}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let d=0;d<this.symbolInstances.length;d++){const v=this.symbolInstances.get(d);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(u,v.textBoxStartIndex,v.textBoxEndIndex,v.verticalTextBoxStartIndex,v.verticalTextBoxEndIndex,v.iconBoxStartIndex,v.iconBoxEndIndex,v.verticalIconBoxStartIndex,v.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(u,d){const v=u.placedSymbolArray.get(d),w=v.vertexStartIndex+4*v.numGlyphs;for(let D=v.vertexStartIndex;D<w;D+=4)u.indexArray.emplaceBack(D,D+2,D+1),u.indexArray.emplaceBack(D+1,D+2,D+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const d=Math.sin(u),v=Math.cos(u),w=[],D=[],F=[];for(let N=0;N<this.symbolInstances.length;++N){F.push(N);const Z=this.symbolInstances.get(N);w.push(0|Math.round(d*Z.anchorX+v*Z.anchorY)),D.push(Z.featureIndex)}return F.sort((N,Z)=>w[N]-w[Z]||D[Z]-D[N]),F}addToSortKeyRanges(u,d){const v=this.sortKeyRanges[this.sortKeyRanges.length-1];v&&v.sortKey===d?v.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:u,symbolInstanceEnd:u+1})}sortFeatures(u){if(this.sortFeaturesByY&&this.sortedAngle!==u&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(u),this.sortedAngle=u,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const d of this.symbolInstanceIndexes){const v=this.symbolInstances.get(d);this.featureSortOrder.push(v.featureIndex),[v.rightJustifiedTextSymbolIndex,v.centerJustifiedTextSymbolIndex,v.leftJustifiedTextSymbolIndex].forEach((w,D,F)=>{w>=0&&F.indexOf(w)===D&&this.addIndicesForPlacedSymbol(this.text,w)}),v.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,v.verticalPlacedTextSymbolIndex),v.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,v.placedIconSymbolIndex),v.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,v.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Hp,m;dr("SymbolBucket",cp,{omit:["layers","collisionBoxArray","features","compareText"]}),cp.MAX_GLYPHS=65535,cp.addDynamicAttributes=_0;var _={get paint(){return m=m||new va({"icon-opacity":new qr(qe.paint_symbol["icon-opacity"]),"icon-color":new qr(qe.paint_symbol["icon-color"]),"icon-halo-color":new qr(qe.paint_symbol["icon-halo-color"]),"icon-halo-width":new qr(qe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new qr(qe.paint_symbol["icon-halo-blur"]),"icon-translate":new cr(qe.paint_symbol["icon-translate"]),"icon-translate-anchor":new cr(qe.paint_symbol["icon-translate-anchor"]),"text-opacity":new qr(qe.paint_symbol["text-opacity"]),"text-color":new qr(qe.paint_symbol["text-color"],{runtimeType:zr,getOverride:h=>h.textColor,hasOverride:h=>!!h.textColor}),"text-halo-color":new qr(qe.paint_symbol["text-halo-color"]),"text-halo-width":new qr(qe.paint_symbol["text-halo-width"]),"text-halo-blur":new qr(qe.paint_symbol["text-halo-blur"]),"text-translate":new cr(qe.paint_symbol["text-translate"]),"text-translate-anchor":new cr(qe.paint_symbol["text-translate-anchor"])})},get layout(){return Hp=Hp||new va({"symbol-placement":new cr(qe.layout_symbol["symbol-placement"]),"symbol-spacing":new cr(qe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new cr(qe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new qr(qe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new cr(qe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new cr(qe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new cr(qe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new cr(qe.layout_symbol["icon-ignore-placement"]),"icon-optional":new cr(qe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new cr(qe.layout_symbol["icon-rotation-alignment"]),"icon-size":new qr(qe.layout_symbol["icon-size"]),"icon-text-fit":new cr(qe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new cr(qe.layout_symbol["icon-text-fit-padding"]),"icon-image":new qr(qe.layout_symbol["icon-image"]),"icon-rotate":new qr(qe.layout_symbol["icon-rotate"]),"icon-padding":new qr(qe.layout_symbol["icon-padding"]),"icon-keep-upright":new cr(qe.layout_symbol["icon-keep-upright"]),"icon-offset":new qr(qe.layout_symbol["icon-offset"]),"icon-anchor":new qr(qe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new cr(qe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new cr(qe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new cr(qe.layout_symbol["text-rotation-alignment"]),"text-field":new qr(qe.layout_symbol["text-field"]),"text-font":new qr(qe.layout_symbol["text-font"]),"text-size":new qr(qe.layout_symbol["text-size"]),"text-max-width":new qr(qe.layout_symbol["text-max-width"]),"text-line-height":new cr(qe.layout_symbol["text-line-height"]),"text-letter-spacing":new qr(qe.layout_symbol["text-letter-spacing"]),"text-justify":new qr(qe.layout_symbol["text-justify"]),"text-radial-offset":new qr(qe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new cr(qe.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new qr(qe.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new qr(qe.layout_symbol["text-anchor"]),"text-max-angle":new cr(qe.layout_symbol["text-max-angle"]),"text-writing-mode":new cr(qe.layout_symbol["text-writing-mode"]),"text-rotate":new qr(qe.layout_symbol["text-rotate"]),"text-padding":new cr(qe.layout_symbol["text-padding"]),"text-keep-upright":new cr(qe.layout_symbol["text-keep-upright"]),"text-transform":new qr(qe.layout_symbol["text-transform"]),"text-offset":new qr(qe.layout_symbol["text-offset"]),"text-allow-overlap":new cr(qe.layout_symbol["text-allow-overlap"]),"text-overlap":new cr(qe.layout_symbol["text-overlap"]),"text-ignore-placement":new cr(qe.layout_symbol["text-ignore-placement"]),"text-optional":new cr(qe.layout_symbol["text-optional"])})}};class L{constructor(u){if(u.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=u.property.overrides?u.property.overrides.runtimeType:Pr,this.defaultValue=u}evaluate(u){if(u.formattedSection){const d=this.defaultValue.property.overrides;if(d&&d.hasOverride(u.formattedSection))return d.getOverride(u.formattedSection)}return u.feature&&u.featureState?this.defaultValue.evaluate(u.feature,u.featureState):this.defaultValue.property.specification.default}eachChild(u){this.defaultValue.isConstant()||u(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}dr("FormatSectionOverride",L,{omit:["defaultValue"]});class Q extends Xl{constructor(u){super(u,_)}recalculate(u,d){if(super.recalculate(u,d),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="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 v=this.layout.get("text-writing-mode");if(v){const w=[];for(const D of v)w.indexOf(D)<0&&w.push(D);this.layout._values["text-writing-mode"]=w}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,d,v,w){const D=this.layout.get(u).evaluate(d,{},v,w),F=this._unevaluatedLayout._values[u];return F.isDataDriven()||Ll(F.value)||!D?D:function(N,Z){return Z.replace(/{([^{}]+)}/g,(ie,ce)=>N&&ce in N?String(N[ce]):"")}(d.properties,D)}createBucket(u){return new cp(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of _.paint.overridableProperties){if(!Q.hasPaintOverride(this.layout,u))continue;const d=this.paint.get(u),v=new L(d),w=new du(v,d.property.specification);let D=null;D=d.value.kind==="constant"||d.value.kind==="source"?new zd("source",w):new Rs("composite",w,d.value.zoomStops),this.paint._values[u]=new ma(d.property,D,d.parameters)}}_handleOverridablePaintPropertyUpdate(u,d,v){return!(!this.layout||d.isDataDriven()||v.isDataDriven())&&Q.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,d){const v=u.get("text-field"),w=_.paint.properties[d];let D=!1;const F=N=>{for(const Z of N)if(w.overrides&&w.overrides.hasOverride(Z))return void(D=!0)};if(v.value.kind==="constant"&&v.value.value instanceof sa)F(v.value.value.sections);else if(v.value.kind==="source"){const N=ie=>{D||(ie instanceof co&&ea(ie.value)===po?F(ie.value.sections):ie instanceof rl?F(ie.sections):ie.eachChild(N))},Z=v.value;Z._styleExpression&&N(Z._styleExpression.expression)}return D}}let le;var me={get paint(){return le=le||new va({"background-color":new cr(qe.paint_background["background-color"]),"background-pattern":new ZA(qe.paint_background["background-pattern"]),"background-opacity":new cr(qe.paint_background["background-opacity"])})}};class Xe extends Xl{constructor(u){super(u,me)}}let Bt;var Wt={get paint(){return Bt=Bt||new va({"raster-opacity":new cr(qe.paint_raster["raster-opacity"]),"raster-hue-rotate":new cr(qe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new cr(qe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new cr(qe.paint_raster["raster-brightness-max"]),"raster-saturation":new cr(qe.paint_raster["raster-saturation"]),"raster-contrast":new cr(qe.paint_raster["raster-contrast"]),"raster-resampling":new cr(qe.paint_raster["raster-resampling"]),"raster-fade-duration":new cr(qe.paint_raster["raster-fade-duration"])})}};class Cn extends Xl{constructor(u){super(u,Wt)}}class nr extends Xl{constructor(u){super(u,{}),this.onAdd=d=>{this.implementation.onAdd&&this.implementation.onAdd(d,d.painter.context.gl)},this.onRemove=d=>{this.implementation.onRemove&&this.implementation.onRemove(d,d.painter.context.gl)},this.implementation=u}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 ur{constructor(u){this._methodToThrottle=u,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 $n=63710088e-1;class Rr{constructor(u,d){if(isNaN(u)||isNaN(d))throw new Error(`Invalid LngLat object: (${u}, ${d})`);if(this.lng=+u,this.lat=+d,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Rr(Pt(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const d=Math.PI/180,v=this.lat*d,w=u.lat*d,D=Math.sin(v)*Math.sin(w)+Math.cos(v)*Math.cos(w)*Math.cos((u.lng-this.lng)*d);return $n*Math.acos(Math.min(D,1))}static convert(u){if(u instanceof Rr)return u;if(Array.isArray(u)&&(u.length===2||u.length===3))return new Rr(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&typeof u=="object"&&u!==null)return new Rr(Number("lng"in u?u.lng:u.lon),Number(u.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 oi=2*Math.PI*$n;function ui(h){return oi*Math.cos(h*Math.PI/180)}function Xs(h){return(180+h)/360}function ln(h){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+h*Math.PI/360)))/360}function en(h,u){return h/ui(u)}function dn(h){return 360/Math.PI*Math.atan(Math.exp((180-360*h)*Math.PI/180))-90}function mr(h,u){return h*ui(dn(u))}class ni{constructor(u,d,v=0){this.x=+u,this.y=+d,this.z=+v}static fromLngLat(u,d=0){const v=Rr.convert(u);return new ni(Xs(v.lng),ln(v.lat),en(d,v.lat))}toLngLat(){return new Rr(360*this.x-180,dn(this.y))}toAltitude(){return mr(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/oi*(u=dn(this.y),1/Math.cos(u*Math.PI/180));var u}}function Ti(h,u,d){var v=2*Math.PI*6378137/256/Math.pow(2,d);return[h*v-2*Math.PI*6378137/2,u*v-2*Math.PI*6378137/2]}class Ii{constructor(u,d,v){if(!function(w,D,F){return!(w<0||w>25||F<0||F>=Math.pow(2,w)||D<0||D>=Math.pow(2,w))}(u,d,v))throw new Error(`x=${d}, y=${v}, z=${u} outside of bounds. 0<=x<${Math.pow(2,u)}, 0<=y<${Math.pow(2,u)} 0<=z<=25 `);this.z=u,this.x=d,this.y=v,this.key=Xo(0,u,u,d,v)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,d,v){const w=(F=this.y,N=this.z,Z=Ti(256*(D=this.x),256*(F=Math.pow(2,N)-F-1),N),ie=Ti(256*(D+1),256*(F+1),N),Z[0]+","+Z[1]+","+ie[0]+","+ie[1]);var D,F,N,Z,ie;const ce=function(Ce,Pe,De){let ze,Ze="";for(let lt=Ce;lt>0;lt--)ze=1<<lt-1,Ze+=(Pe&ze?1:0)+(De&ze?2:0);return Ze}(this.z,this.x,this.y);return u[(this.x+this.y)%u.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(v==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,d>1?"@2x":"").replace(/{quadkey}/g,ce).replace(/{bbox-epsg-3857}/g,w)}isChildOf(u){const d=this.z-u.z;return d>0&&u.x===this.x>>d&&u.y===this.y>>d}getTilePoint(u){const d=Math.pow(2,this.z);return new P((u.x*d-this.x)*nt,(u.y*d-this.y)*nt)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ni{constructor(u,d){this.wrap=u,this.canonical=d,this.key=Xo(u,d.z,d.z,d.x,d.y)}}class Ra{constructor(u,d,v,w,D){if(this.terrainRttPosMatrix32f=null,u<v)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${v}`);this.overscaledZ=u,this.wrap=d,this.canonical=new Ii(v,+w,+D),this.key=Xo(d,u,v,w,D)}clone(){return new Ra(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(u){return this.overscaledZ===u.overscaledZ&&this.wrap===u.wrap&&this.canonical.equals(u.canonical)}scaledTo(u){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const d=this.canonical.z-u;return u>this.canonical.z?new Ra(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ra(u,this.wrap,u,this.canonical.x>>d,this.canonical.y>>d)}calculateScaledKey(u,d){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const v=this.canonical.z-u;return u>this.canonical.z?Xo(this.wrap*+d,u,this.canonical.z,this.canonical.x,this.canonical.y):Xo(this.wrap*+d,u,u,this.canonical.x>>v,this.canonical.y>>v)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const d=this.canonical.z-u.canonical.z;return u.overscaledZ===0||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>d&&u.canonical.y===this.canonical.y>>d}children(u){if(this.overscaledZ>=u)return[new Ra(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const d=this.canonical.z+1,v=2*this.canonical.x,w=2*this.canonical.y;return[new Ra(d,this.wrap,d,v,w),new Ra(d,this.wrap,d,v+1,w),new Ra(d,this.wrap,d,v,w+1),new Ra(d,this.wrap,d,v+1,w+1)]}isLessThan(u){return this.wrap<u.wrap||!(this.wrap>u.wrap)&&(this.overscaledZ<u.overscaledZ||!(this.overscaledZ>u.overscaledZ)&&(this.canonical.x<u.canonical.x||!(this.canonical.x>u.canonical.x)&&this.canonical.y<u.canonical.y))}wrapped(){return new Ra(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new Ra(this.overscaledZ,u,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Ni(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(u){return this.canonical.getTilePoint(new ni(u.x-this.wrap,u.y))}}function Xo(h,u,d,v,w){(h*=2)<0&&(h=-1*h-1);const D=1<<d;return(D*D*h+D*w+v).toString(36)+d.toString(36)+u.toString(36)}dr("CanonicalTileID",Ii),dr("OverscaledTileID",Ra,{omit:["terrainRttPosMatrix32f"]});class Eh{constructor(u,d,v,w=1,D=1,F=1,N=0){if(this.uid=u,d.height!==d.width)throw new RangeError("DEM tiles must be square");if(v&&!["mapbox","terrarium","custom"].includes(v))return void tt(`"${v}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=d.height;const Z=this.dim=d.height-2;switch(this.data=new Uint32Array(d.data.buffer),v){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=w,this.greenFactor=D,this.blueFactor=F,this.baseShift=N;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ie=0;ie<Z;ie++)this.data[this._idx(-1,ie)]=this.data[this._idx(0,ie)],this.data[this._idx(Z,ie)]=this.data[this._idx(Z-1,ie)],this.data[this._idx(ie,-1)]=this.data[this._idx(ie,0)],this.data[this._idx(ie,Z)]=this.data[this._idx(ie,Z-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Z,-1)]=this.data[this._idx(Z-1,0)],this.data[this._idx(-1,Z)]=this.data[this._idx(0,Z-1)],this.data[this._idx(Z,Z)]=this.data[this._idx(Z-1,Z-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ie=0;ie<Z;ie++)for(let ce=0;ce<Z;ce++){const Ce=this.get(ie,ce);Ce>this.max&&(this.max=Ce),Ce<this.min&&(this.min=Ce)}}get(u,d){const v=new Uint8Array(this.data.buffer),w=4*this._idx(u,d);return this.unpack(v[w],v[w+1],v[w+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,d){if(u<-1||u>=this.dim+1||d<-1||d>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(d+1)*this.stride+(u+1)}unpack(u,d,v){return u*this.redFactor+d*this.greenFactor+v*this.blueFactor-this.baseShift}getPixels(){return new Nu({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,d,v){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let w=d*this.dim,D=d*this.dim+this.dim,F=v*this.dim,N=v*this.dim+this.dim;switch(d){case-1:w=D-1;break;case 1:D=w+1}switch(v){case-1:F=N-1;break;case 1:N=F+1}const Z=-d*this.dim,ie=-v*this.dim;for(let ce=F;ce<N;ce++)for(let Ce=w;Ce<D;Ce++)this.data[this._idx(Ce,ce)]=u.data[this._idx(Ce+Z,ce+ie)]}}dr("DEMData",Eh);class _g{constructor(u){this._stringToNumber={},this._numberToString=[];for(let d=0;d<u.length;d++){const v=u[d];this._stringToNumber[v]=d,this._numberToString[d]=v}}encode(u){return this._stringToNumber[u]}decode(u){if(u>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${u} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[u]}}class r_{constructor(u,d,v,w,D){this.type="Feature",this._vectorTileFeature=u,u._z=d,u._x=v,u._y=w,this.properties=u.properties,this.id=D}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(u){this._geometry=u}toJSON(){const u={geometry:this.geometry};for(const d in this)d!=="_geometry"&&d!=="_vectorTileFeature"&&(u[d]=this[d]);return u}}class i_{constructor(u,d){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new iA(nt,16,0),this.grid3D=new iA(nt,16,0),this.featureIndexArray=new He,this.promoteId=d}insert(u,d,v,w,D,F){const N=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(v,w,D);const Z=F?this.grid3D:this.grid;for(let ie=0;ie<d.length;ie++){const ce=d[ie],Ce=[1/0,1/0,-1/0,-1/0];for(let Pe=0;Pe<ce.length;Pe++){const De=ce[Pe];Ce[0]=Math.min(Ce[0],De.x),Ce[1]=Math.min(Ce[1],De.y),Ce[2]=Math.max(Ce[2],De.x),Ce[3]=Math.max(Ce[3],De.y)}Ce[0]<nt&&Ce[1]<nt&&Ce[2]>=0&&Ce[3]>=0&&Z.insert(N,Ce[0],Ce[1],Ce[2],Ce[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Bl.VectorTile(new Bm(this.rawTileData)).layers,this.sourceLayerCoder=new _g(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,d,v,w){this.loadVTLayers();const D=u.params,F=nt/u.tileSize/u.scale,N=WA(D.filter),Z=u.queryGeometry,ie=u.queryPadding*F,ce=a_(Z),Ce=this.grid.query(ce.minX-ie,ce.minY-ie,ce.maxX+ie,ce.maxY+ie),Pe=a_(u.cameraQueryGeometry),De=this.grid3D.query(Pe.minX-ie,Pe.minY-ie,Pe.maxX+ie,Pe.maxY+ie,(lt,yt,Nt,Mt)=>function(Re,at,Ot,un,Fn){for(const bn of Re)if(at<=bn.x&&Ot<=bn.y&&un>=bn.x&&Fn>=bn.y)return!0;const mn=[new P(at,Ot),new P(at,Fn),new P(un,Fn),new P(un,Ot)];if(Re.length>2){for(const bn of mn)if(bc(Re,bn))return!0}for(let bn=0;bn<Re.length-1;bn++)if(Fp(Re[bn],Re[bn+1],mn))return!0;return!1}(u.cameraQueryGeometry,lt-ie,yt-ie,Nt+ie,Mt+ie));for(const lt of De)Ce.push(lt);Ce.sort(N2);const ze={};let Ze;for(let lt=0;lt<Ce.length;lt++){const yt=Ce[lt];if(yt===Ze)continue;Ze=yt;const Nt=this.featureIndexArray.get(yt);let Mt=null;this.loadMatchingFeature(ze,Nt.bucketIndex,Nt.sourceLayerIndex,Nt.featureIndex,N,D.layers,D.availableImages,d,v,w,(Re,at,Ot)=>(Mt||(Mt=md(Re)),at.queryIntersectsFeature({queryGeometry:Z,feature:Re,featureState:Ot,geometry:Mt,zoom:this.z,transform:u.transform,pixelsToTileUnits:F,pixelPosMatrix:u.pixelPosMatrix})))}return ze}loadMatchingFeature(u,d,v,w,D,F,N,Z,ie,ce,Ce){const Pe=this.bucketLayerIDs[d];if(F&&!Pe.some(lt=>F.has(lt)))return;const De=this.sourceLayerCoder.decode(v),ze=this.vtLayers[De].feature(w);if(D.needGeometry){const lt=XA(ze,!0);if(!D.filter(new Ho(this.tileID.overscaledZ),lt,this.tileID.canonical))return}else if(!D.filter(new Ho(this.tileID.overscaledZ),ze))return;const Ze=this.getId(ze,De);for(let lt=0;lt<Pe.length;lt++){const yt=Pe[lt];if(F&&!F.has(yt))continue;const Nt=Z[yt];if(!Nt)continue;let Mt={};Ze&&ce&&(Mt=ce.getState(Nt.sourceLayer||"_geojsonTileLayer",Ze));const Re=ut({},ie[yt]);Re.paint=o_(Re.paint,Nt.paint,ze,Mt,N),Re.layout=o_(Re.layout,Nt.layout,ze,Mt,N);const at=!Ce||Ce(ze,Nt,Mt);if(!at)continue;const Ot=new r_(ze,this.z,this.x,this.y,Ze);Ot.layer=Re;let un=u[yt];un===void 0&&(un=u[yt]=[]),un.push({featureIndex:w,feature:Ot,intersectionZ:at})}}lookupSymbolFeatures(u,d,v,w,D,F,N,Z){const ie={};this.loadVTLayers();const ce=WA(D);for(const Ce of u)this.loadMatchingFeature(ie,v,w,Ce,ce,F,N,Z,d);return ie}hasLayer(u){for(const d of this.bucketLayerIDs)for(const v of d)if(u===v)return!0;return!1}getId(u,d){var v;let w=u.id;return this.promoteId&&(w=u.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[d]],typeof w=="boolean"&&(w=Number(w)),w===void 0&&(!((v=u.properties)===null||v===void 0)&&v.cluster)&&this.promoteId&&(w=Number(u.properties.cluster_id))),w}}function o_(h,u,d,v,w){return Rt(h,(D,F)=>{const N=u instanceof cs?u.get(F):null;return N&&N.evaluate?N.evaluate(d,v,w):N})}function a_(h){let u=1/0,d=1/0,v=-1/0,w=-1/0;for(const D of h)u=Math.min(u,D.x),d=Math.min(d,D.y),v=Math.max(v,D.x),w=Math.max(w,D.y);return{minX:u,minY:d,maxX:v,maxY:w}}function N2(h,u){return u-h}function s_(h,u,d,v,w){const D=[];for(let F=0;F<h.length;F++){const N=h[F];let Z;for(let ie=0;ie<N.length-1;ie++){let ce=N[ie],Ce=N[ie+1];ce.x<u&&Ce.x<u||(ce.x<u?ce=new P(u,ce.y+(u-ce.x)/(Ce.x-ce.x)*(Ce.y-ce.y))._round():Ce.x<u&&(Ce=new P(u,ce.y+(u-ce.x)/(Ce.x-ce.x)*(Ce.y-ce.y))._round()),ce.y<d&&Ce.y<d||(ce.y<d?ce=new P(ce.x+(d-ce.y)/(Ce.y-ce.y)*(Ce.x-ce.x),d)._round():Ce.y<d&&(Ce=new P(ce.x+(d-ce.y)/(Ce.y-ce.y)*(Ce.x-ce.x),d)._round()),ce.x>=v&&Ce.x>=v||(ce.x>=v?ce=new P(v,ce.y+(v-ce.x)/(Ce.x-ce.x)*(Ce.y-ce.y))._round():Ce.x>=v&&(Ce=new P(v,ce.y+(v-ce.x)/(Ce.x-ce.x)*(Ce.y-ce.y))._round()),ce.y>=w&&Ce.y>=w||(ce.y>=w?ce=new P(ce.x+(w-ce.y)/(Ce.y-ce.y)*(Ce.x-ce.x),w)._round():Ce.y>=w&&(Ce=new P(ce.x+(w-ce.y)/(Ce.y-ce.y)*(Ce.x-ce.x),w)._round()),Z&&ce.equals(Z[Z.length-1])||(Z=[ce],D.push(Z)),Z.push(Ce)))))}}return D}dr("FeatureIndex",i_,{omit:["rawTileData","sourceLayerCoder"]});class dp extends P{constructor(u,d,v,w){super(u,d),this.angle=v,w!==void 0&&(this.segment=w)}clone(){return new dp(this.x,this.y,this.angle,this.segment)}}function l_(h,u,d,v,w){if(u.segment===void 0||d===0)return!0;let D=u,F=u.segment+1,N=0;for(;N>-d/2;){if(F--,F<0)return!1;N-=h[F].dist(D),D=h[F]}N+=h[F].dist(h[F+1]),F++;const Z=[];let ie=0;for(;N<d/2;){const ce=h[F],Ce=h[F+1];if(!Ce)return!1;let Pe=h[F-1].angleTo(ce)-ce.angleTo(Ce);for(Pe=Math.abs((Pe+3*Math.PI)%(2*Math.PI)-Math.PI),Z.push({distance:N,angleDelta:Pe}),ie+=Pe;N-Z[0].distance>v;)ie-=Z.shift().angleDelta;if(ie>w)return!1;F++,N+=ce.dist(Ce)}return!0}function u_(h){let u=0;for(let d=0;d<h.length-1;d++)u+=h[d].dist(h[d+1]);return u}function Xd(h,u,d){return h?.6*u*d:0}function A_(h,u){return Math.max(h?h.right-h.left:0,u?u.right-u.left:0)}function G2(h,u,d,v,w,D){const F=Xd(d,w,D),N=A_(d,v)*D;let Z=0;const ie=u_(h)/2;for(let ce=0;ce<h.length-1;ce++){const Ce=h[ce],Pe=h[ce+1],De=Ce.dist(Pe);if(Z+De>ie){const ze=(ie-Z)/De,Ze=Ci.number(Ce.x,Pe.x,ze),lt=Ci.number(Ce.y,Pe.y,ze),yt=new dp(Ze,lt,Pe.angleTo(Ce),ce);return yt._round(),!F||l_(h,yt,N,F,u)?yt:void 0}Z+=De}}function Zp(h,u,d,v,w,D,F,N,Z){const ie=Xd(v,D,F),ce=A_(v,w),Ce=ce*F,Pe=h[0].x===0||h[0].x===Z||h[0].y===0||h[0].y===Z;return u-Ce<u/4&&(u=Ce+u/4),yo(h,Pe?u/2*N%u:(ce/2+2*D)*F*N%u,u,ie,d,Ce,Pe,!1,Z)}function yo(h,u,d,v,w,D,F,N,Z){const ie=D/2,ce=u_(h);let Ce=0,Pe=u-d,De=[];for(let ze=0;ze<h.length-1;ze++){const Ze=h[ze],lt=h[ze+1],yt=Ze.dist(lt),Nt=lt.angleTo(Ze);for(;Pe+d<Ce+yt;){Pe+=d;const Mt=(Pe-Ce)/yt,Re=Ci.number(Ze.x,lt.x,Mt),at=Ci.number(Ze.y,lt.y,Mt);if(Re>=0&&Re<Z&&at>=0&&at<Z&&Pe-ie>=0&&Pe+ie<=ce){const Ot=new dp(Re,at,Nt,ze);Ot._round(),v&&!l_(h,Ot,D,v,w)||De.push(Ot)}}Ce+=yt}return N||De.length||F||(De=yo(h,Ce/2,d,v,w,D,F,!0,Z)),De}dr("Anchor",dp);const C0=lA;function wc(h,u,d,v){const w=[],D=h.image,F=D.pixelRatio,N=D.paddedRect.w-2*C0,Z=D.paddedRect.h-2*C0;let ie={x1:h.left,y1:h.top,x2:h.right,y2:h.bottom};const ce=D.stretchX||[[0,N]],Ce=D.stretchY||[[0,Z]],Pe=(On,Ur)=>On+Ur[1]-Ur[0],De=ce.reduce(Pe,0),ze=Ce.reduce(Pe,0),Ze=N-De,lt=Z-ze;let yt=0,Nt=De,Mt=0,Re=ze,at=0,Ot=Ze,un=0,Fn=lt;if(D.content&&v){const On=D.content,Ur=On[2]-On[0],Lr=On[3]-On[1];(D.textFitWidth||D.textFitHeight)&&(ie=Yp(h)),yt=hl(ce,0,On[0]),Mt=hl(Ce,0,On[1]),Nt=hl(ce,On[0],On[2]),Re=hl(Ce,On[1],On[3]),at=On[0]-yt,un=On[1]-Mt,Ot=Ur-Nt,Fn=Lr-Re}const mn=ie.x1,bn=ie.y1,Vn=ie.x2-mn,Ln=ie.y2-bn,rr=(On,Ur,Lr,jr)=>{const ei=Oh(On.stretch-yt,Nt,Vn,mn),Ko=Cg(On.fixed-at,Ot,On.stretch,De),Js=Oh(Ur.stretch-Mt,Re,Ln,bn),Wl=Cg(Ur.fixed-un,Fn,Ur.stretch,ze),Wu=Oh(Lr.stretch-yt,Nt,Vn,mn),Jd=Cg(Lr.fixed-at,Ot,Lr.stretch,De),nc=Oh(jr.stretch-Mt,Re,Ln,bn),_u=Cg(jr.fixed-un,Fn,jr.stretch,ze),AA=new P(ei,Js),ml=new P(Wu,Js),ru=new P(Wu,nc),IA=new P(ei,nc),kA=new P(Ko/F,Wl/F),rc=new P(Jd/F,_u/F),iu=u*Math.PI/180;if(iu){const Ro=Math.sin(iu),cA=Math.cos(iu),Gs=[cA,-Ro,Ro,cA];AA._matMult(Gs),ml._matMult(Gs),IA._matMult(Gs),ru._matMult(Gs)}const Sd=On.stretch+On.fixed,Mc=Ur.stretch+Ur.fixed;return{tl:AA,tr:ml,bl:IA,br:ru,tex:{x:D.paddedRect.x+C0+Sd,y:D.paddedRect.y+C0+Mc,w:Lr.stretch+Lr.fixed-Sd,h:jr.stretch+jr.fixed-Mc},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:kA,pixelOffsetBR:rc,minFontScaleX:Ot/F/Vn,minFontScaleY:Fn/F/Ln,isSDF:d}};if(v&&(D.stretchX||D.stretchY)){const On=c_(ce,Ze,De),Ur=c_(Ce,lt,ze);for(let Lr=0;Lr<On.length-1;Lr++){const jr=On[Lr],ei=On[Lr+1];for(let Ko=0;Ko<Ur.length-1;Ko++)w.push(rr(jr,Ur[Ko],ei,Ur[Ko+1]))}}else w.push(rr({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:N+1},{fixed:0,stretch:Z+1}));return w}function hl(h,u,d){let v=0;for(const w of h)v+=Math.max(u,Math.min(d,w[1]))-Math.max(u,Math.min(d,w[0]));return v}function c_(h,u,d){const v=[{fixed:-1,stretch:0}];for(const[w,D]of h){const F=v[v.length-1];v.push({fixed:w-F.stretch,stretch:F.stretch}),v.push({fixed:w-F.stretch,stretch:F.stretch+(D-w)})}return v.push({fixed:u+C0,stretch:d}),v}function Oh(h,u,d,v){return h/u*d+v}function Cg(h,u,d,v){return h-u*d/v}class bg{constructor(u,d,v,w,D,F,N,Z,ie,ce){var Ce;if(this.boxStartIndex=u.length,ie){let Pe=F.top,De=F.bottom;const ze=F.collisionPadding;ze&&(Pe-=ze[1],De+=ze[3]);let Ze=De-Pe;Ze>0&&(Ze=Math.max(10,Ze),this.circleDiameter=Ze)}else{const Pe=!((Ce=F.image)===null||Ce===void 0)&&Ce.content&&(F.image.textFitWidth||F.image.textFitHeight)?Yp(F):{x1:F.left,y1:F.top,x2:F.right,y2:F.bottom};Pe.y1=Pe.y1*N-Z[0],Pe.y2=Pe.y2*N+Z[2],Pe.x1=Pe.x1*N-Z[3],Pe.x2=Pe.x2*N+Z[1];const De=F.collisionPadding;if(De&&(Pe.x1-=De[0]*N,Pe.y1-=De[1]*N,Pe.x2+=De[2]*N,Pe.y2+=De[3]*N),ce){const ze=new P(Pe.x1,Pe.y1),Ze=new P(Pe.x2,Pe.y1),lt=new P(Pe.x1,Pe.y2),yt=new P(Pe.x2,Pe.y2),Nt=ce*Math.PI/180;ze._rotate(Nt),Ze._rotate(Nt),lt._rotate(Nt),yt._rotate(Nt),Pe.x1=Math.min(ze.x,Ze.x,lt.x,yt.x),Pe.x2=Math.max(ze.x,Ze.x,lt.x,yt.x),Pe.y1=Math.min(ze.y,Ze.y,lt.y,yt.y),Pe.y2=Math.max(ze.y,Ze.y,lt.y,yt.y)}u.emplaceBack(d.x,d.y,Pe.x1,Pe.y1,Pe.x2,Pe.y2,v,w,D)}this.boxEndIndex=u.length}}class W2{constructor(u=[],d=(v,w)=>v<w?-1:v>w?1:0){if(this.data=u,this.length=this.data.length,this.compare=d,this.length>0)for(let v=(this.length>>1)-1;v>=0;v--)this._down(v)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(this.length===0)return;const u=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:d,compare:v}=this,w=d[u];for(;u>0;){const D=u-1>>1,F=d[D];if(v(w,F)>=0)break;d[u]=F,u=D}d[u]=w}_down(u){const{data:d,compare:v}=this,w=this.length>>1,D=d[u];for(;u<w;){let F=1+(u<<1);const N=F+1;if(N<this.length&&v(d[N],d[F])<0&&(F=N),v(d[F],D)>=0)break;d[u]=d[F],u=F}d[u]=D}}function Q2(h,u=1,d=!1){let v=1/0,w=1/0,D=-1/0,F=-1/0;const N=h[0];for(let De=0;De<N.length;De++){const ze=N[De];(!De||ze.x<v)&&(v=ze.x),(!De||ze.y<w)&&(w=ze.y),(!De||ze.x>D)&&(D=ze.x),(!De||ze.y>F)&&(F=ze.y)}const Z=Math.min(D-v,F-w);let ie=Z/2;const ce=new W2([],q2);if(Z===0)return new P(v,w);for(let De=v;De<D;De+=Z)for(let ze=w;ze<F;ze+=Z)ce.push(new hp(De+ie,ze+ie,ie,h));let Ce=function(De){let ze=0,Ze=0,lt=0;const yt=De[0];for(let Nt=0,Mt=yt.length,Re=Mt-1;Nt<Mt;Re=Nt++){const at=yt[Nt],Ot=yt[Re],un=at.x*Ot.y-Ot.x*at.y;Ze+=(at.x+Ot.x)*un,lt+=(at.y+Ot.y)*un,ze+=3*un}return new hp(Ze/ze,lt/ze,0,De)}(h),Pe=ce.length;for(;ce.length;){const De=ce.pop();(De.d>Ce.d||!Ce.d)&&(Ce=De,d&&console.log("found best %d after %d probes",Math.round(1e4*De.d)/1e4,Pe)),De.max-Ce.d<=u||(ie=De.h/2,ce.push(new hp(De.p.x-ie,De.p.y-ie,ie,h)),ce.push(new hp(De.p.x+ie,De.p.y-ie,ie,h)),ce.push(new hp(De.p.x-ie,De.p.y+ie,ie,h)),ce.push(new hp(De.p.x+ie,De.p.y+ie,ie,h)),Pe+=4)}return d&&(console.log(`num probes: ${Pe}`),console.log(`best distance: ${Ce.d}`)),Ce.p}function q2(h,u){return u.max-h.max}function hp(h,u,d,v){this.p=new P(h,u),this.h=d,this.d=function(w,D){let F=!1,N=1/0;for(let Z=0;Z<D.length;Z++){const ie=D[Z];for(let ce=0,Ce=ie.length,Pe=Ce-1;ce<Ce;Pe=ce++){const De=ie[ce],ze=ie[Pe];De.y>w.y!=ze.y>w.y&&w.x<(ze.x-De.x)*(w.y-De.y)/(ze.y-De.y)+De.x&&(F=!F),N=Math.min(N,tp(w,De,ze))}}return(F?1:-1)*Math.sqrt(N)}(this.p,v),this.max=this.d+this.h*Math.SQRT2}var uA;s.av=void 0,(uA=s.av||(s.av={}))[uA.center=1]="center",uA[uA.left=2]="left",uA[uA.right=3]="right",uA[uA.top=4]="top",uA[uA.bottom=5]="bottom",uA[uA["top-left"]=6]="top-left",uA[uA["top-right"]=7]="top-right",uA[uA["bottom-left"]=8]="bottom-left",uA[uA["bottom-right"]=9]="bottom-right";const tc=7,xg=Number.POSITIVE_INFINITY;function b0(h,u){return u[1]!==xg?function(d,v,w){let D=0,F=0;switch(v=Math.abs(v),w=Math.abs(w),d){case"top-right":case"top-left":case"top":F=w-tc;break;case"bottom-right":case"bottom-left":case"bottom":F=-w+tc}switch(d){case"top-right":case"bottom-right":case"right":D=-v;break;case"top-left":case"bottom-left":case"left":D=v}return[D,F]}(h,u[0],u[1]):function(d,v){let w=0,D=0;v<0&&(v=0);const F=v/Math.SQRT2;switch(d){case"top-right":case"top-left":D=F-tc;break;case"bottom-right":case"bottom-left":D=-F+tc;break;case"bottom":D=-v+tc;break;case"top":D=v-tc}switch(d){case"top-right":case"bottom-right":w=-F;break;case"top-left":case"bottom-left":w=F;break;case"left":w=v;break;case"right":w=-v}return[w,D]}(h,u[0])}function fl(h,u,d){var v;const w=h.layout,D=(v=w.get("text-variable-anchor-offset"))===null||v===void 0?void 0:v.evaluate(u,{},d);if(D){const N=D.values,Z=[];for(let ie=0;ie<N.length;ie+=2){const ce=Z[ie]=N[ie],Ce=N[ie+1].map(Pe=>Pe*Ns);ce.startsWith("top")?Ce[1]-=tc:ce.startsWith("bottom")&&(Ce[1]+=tc),Z[ie+1]=Ce}return new Ta(Z)}const F=w.get("text-variable-anchor");if(F){let N;N=h._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[w.get("text-radial-offset").evaluate(u,{},d)*Ns,xg]:w.get("text-offset").evaluate(u,{},d).map(ie=>ie*Ns);const Z=[];for(const ie of F)Z.push(ie,b0(ie,N));return new Ta(Z)}return null}function pl(h){switch(h){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function d_(h,u,d,v,w,D,F,N,Z,ie,ce,Ce){let Pe=D.textMaxSize.evaluate(u,{});Pe===void 0&&(Pe=F);const De=h.layers[0].layout,ze=De.get("icon-offset").evaluate(u,{},ce),Ze=f_(d.horizontal),lt=F/24,yt=h.tilePixelRatio*lt,Nt=h.tilePixelRatio*Pe/24,Mt=h.tilePixelRatio*N,Re=h.tilePixelRatio*De.get("symbol-spacing"),at=De.get("text-padding")*h.tilePixelRatio,Ot=function(Lr,jr,ei,Ko=1){const Js=Lr.get("icon-padding").evaluate(jr,{},ei),Wl=Js&&Js.values;return[Wl[0]*Ko,Wl[1]*Ko,Wl[2]*Ko,Wl[3]*Ko]}(De,u,ce,h.tilePixelRatio),un=De.get("text-max-angle")/180*Math.PI,Fn=De.get("text-rotation-alignment")!=="viewport"&&De.get("symbol-placement")!=="point",mn=De.get("icon-rotation-alignment")==="map"&&De.get("symbol-placement")!=="point",bn=De.get("symbol-placement"),Vn=Re/2,Ln=De.get("icon-text-fit");let rr;v&&Ln!=="none"&&(h.allowVerticalPlacement&&d.vertical&&(rr=$p(v,d.vertical,Ln,De.get("icon-text-fit-padding"),ze,lt)),Ze&&(v=$p(v,Ze,Ln,De.get("icon-text-fit-padding"),ze,lt)));const On=ce?Ce.line.getGranularityForZoomLevel(ce.z):1,Ur=(Lr,jr)=>{jr.x<0||jr.x>=nt||jr.y<0||jr.y>=nt||function(ei,Ko,Js,Wl,Wu,Jd,nc,_u,AA,ml,ru,IA,kA,rc,iu,Sd,Mc,Ro,cA,Gs,el,Cu,Jp,Yc,w0){const eh=ei.addToLineVertexArray(Ko,Js);let $c,Qu,Ed,Pf,g_=0,y_=0,v_=0,__=0,Ay=-1,cy=-1;const Kf={};let C_=Es("");if(ei.allowVerticalPlacement&&Wl.vertical){const TA=_u.layout.get("text-rotate").evaluate(el,{},Yc)+90;Ed=new bg(AA,Ko,ml,ru,IA,Wl.vertical,kA,rc,iu,TA),nc&&(Pf=new bg(AA,Ko,ml,ru,IA,nc,Mc,Ro,iu,TA))}if(Wu){const TA=_u.layout.get("icon-rotate").evaluate(el,{}),Od=_u.layout.get("icon-text-fit")!=="none",em=wc(Wu,TA,Jp,Od),Bd=nc?wc(nc,TA,Jp,Od):void 0;Qu=new bg(AA,Ko,ml,ru,IA,Wu,Mc,Ro,!1,TA),g_=4*em.length;const tm=ei.iconSizeData;let tf=null;tm.kind==="source"?(tf=[qc*_u.layout.get("icon-size").evaluate(el,{})],tf[0]>Sh&&tt(`${ei.layerIds[0]}: Value for "icon-size" is >= ${up}. Reduce your "icon-size".`)):tm.kind==="composite"&&(tf=[qc*Cu.compositeIconSizes[0].evaluate(el,{},Yc),qc*Cu.compositeIconSizes[1].evaluate(el,{},Yc)],(tf[0]>Sh||tf[1]>Sh)&&tt(`${ei.layerIds[0]}: Value for "icon-size" is >= ${up}. Reduce your "icon-size".`)),ei.addSymbols(ei.icon,em,tf,Gs,cA,el,s.ai.none,Ko,eh.lineStartIndex,eh.lineLength,-1,Yc),Ay=ei.icon.placedSymbolArray.length-1,Bd&&(y_=4*Bd.length,ei.addSymbols(ei.icon,Bd,tf,Gs,cA,el,s.ai.vertical,Ko,eh.lineStartIndex,eh.lineLength,-1,Yc),cy=ei.icon.placedSymbolArray.length-1)}const b_=Object.keys(Wl.horizontal);for(const TA of b_){const Od=Wl.horizontal[TA];if(!$c){C_=Es(Od.text);const Bd=_u.layout.get("text-rotate").evaluate(el,{},Yc);$c=new bg(AA,Ko,ml,ru,IA,Od,kA,rc,iu,Bd)}const em=Od.positionedLines.length===1;if(v_+=h_(ei,Ko,Od,Jd,_u,iu,el,Sd,eh,Wl.vertical?s.ai.horizontal:s.ai.horizontalOnly,em?b_:[TA],Kf,Ay,Cu,Yc),em)break}Wl.vertical&&(__+=h_(ei,Ko,Wl.vertical,Jd,_u,iu,el,Sd,eh,s.ai.vertical,["vertical"],Kf,cy,Cu,Yc));const V2=$c?$c.boxStartIndex:ei.collisionBoxArray.length,H2=$c?$c.boxEndIndex:ei.collisionBoxArray.length,Z2=Ed?Ed.boxStartIndex:ei.collisionBoxArray.length,X2=Ed?Ed.boxEndIndex:ei.collisionBoxArray.length,J2=Qu?Qu.boxStartIndex:ei.collisionBoxArray.length,ex=Qu?Qu.boxEndIndex:ei.collisionBoxArray.length,tx=Pf?Pf.boxStartIndex:ei.collisionBoxArray.length,nx=Pf?Pf.boxEndIndex:ei.collisionBoxArray.length;let Bh=-1;const Mg=(TA,Od)=>TA&&TA.circleDiameter?Math.max(TA.circleDiameter,Od):Od;Bh=Mg($c,Bh),Bh=Mg(Ed,Bh),Bh=Mg(Qu,Bh),Bh=Mg(Pf,Bh);const x_=Bh>-1?1:0;x_&&(Bh*=w0/Ns),ei.glyphOffsetArray.length>=cp.MAX_GLYPHS&&tt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),el.sortKey!==void 0&&ei.addToSortKeyRanges(ei.symbolInstances.length,el.sortKey);const dy=fl(_u,el,Yc),[w_,M_]=function(TA,Od){const em=TA.length,Bd=Od==null?void 0:Od.values;if((Bd==null?void 0:Bd.length)>0)for(let tm=0;tm<Bd.length;tm+=2){const tf=Bd[tm+1];TA.emplaceBack(s.av[Bd[tm]],tf[0],tf[1])}return[em,TA.length]}(ei.textAnchorOffsets,dy);ei.symbolInstances.emplaceBack(Ko.x,Ko.y,Kf.right>=0?Kf.right:-1,Kf.center>=0?Kf.center:-1,Kf.left>=0?Kf.left:-1,Kf.vertical||-1,Ay,cy,C_,V2,H2,Z2,X2,J2,ex,tx,nx,ml,v_,__,g_,y_,x_,0,kA,Bh,w_,M_)}(h,jr,Lr,d,v,w,rr,h.layers[0],h.collisionBoxArray,u.index,u.sourceLayerIndex,h.index,yt,[at,at,at,at],Fn,Z,Mt,Ot,mn,ze,u,D,ie,ce,F)};if(bn==="line")for(const Lr of s_(u.geometry,0,0,nt,nt)){const jr=Yn(Lr,On),ei=Zp(jr,Re,un,d.vertical||Ze,v,24,Nt,h.overscaling,nt);for(const Ko of ei)Ze&&Y2(h,Ze.text,Vn,Ko)||Ur(jr,Ko)}else if(bn==="line-center"){for(const Lr of u.geometry)if(Lr.length>1){const jr=Yn(Lr,On),ei=G2(jr,un,d.vertical||Ze,v,24,Nt);ei&&Ur(jr,ei)}}else if(u.type==="Polygon")for(const Lr of Ic(u.geometry,0)){const jr=Q2(Lr,16);Ur(Yn(Lr[0],On,!0),new dp(jr.x,jr.y,0))}else if(u.type==="LineString")for(const Lr of u.geometry){const jr=Yn(Lr,On);Ur(jr,new dp(jr[0].x,jr[0].y,0))}else if(u.type==="Point")for(const Lr of u.geometry)for(const jr of Lr)Ur([jr],new dp(jr.x,jr.y,0))}function h_(h,u,d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze){const Ze=function(Nt,Mt,Re,at,Ot,un,Fn,mn){const bn=at.layout.get("text-rotate").evaluate(un,{})*Math.PI/180,Vn=[];for(const Ln of Mt.positionedLines)for(const rr of Ln.positionedGlyphs){if(!rr.rect)continue;const On=rr.rect||{};let Ur=Zs+1,Lr=!0,jr=1,ei=0;const Ko=(Ot||mn)&&rr.vertical,Js=rr.metrics.advance*rr.scale/2;if(mn&&Mt.verticalizable&&(ei=Ln.lineOffset/2-(rr.imageName?-(Ns-rr.metrics.width*rr.scale)/2:(rr.scale-1)*Ns)),rr.imageName){const Ro=Fn[rr.imageName];Lr=Ro.sdf,jr=Ro.pixelRatio,Ur=lA/jr}const Wl=Ot?[rr.x+Js,rr.y]:[0,0];let Wu=Ot?[0,0]:[rr.x+Js+Re[0],rr.y+Re[1]-ei],Jd=[0,0];Ko&&(Jd=Wu,Wu=[0,0]);const nc=rr.metrics.isDoubleResolution?2:1,_u=(rr.metrics.left-Ur)*rr.scale-Js+Wu[0],AA=(-rr.metrics.top-Ur)*rr.scale+Wu[1],ml=_u+On.w/nc*rr.scale/jr,ru=AA+On.h/nc*rr.scale/jr,IA=new P(_u,AA),kA=new P(ml,AA),rc=new P(_u,ru),iu=new P(ml,ru);if(Ko){const Ro=new P(-Js,Js-lp),cA=-Math.PI/2,Gs=Ns/2-Js,el=new P(5-lp-Gs,-(rr.imageName?Gs:0)),Cu=new P(...Jd);IA._rotateAround(cA,Ro)._add(el)._add(Cu),kA._rotateAround(cA,Ro)._add(el)._add(Cu),rc._rotateAround(cA,Ro)._add(el)._add(Cu),iu._rotateAround(cA,Ro)._add(el)._add(Cu)}if(bn){const Ro=Math.sin(bn),cA=Math.cos(bn),Gs=[cA,-Ro,Ro,cA];IA._matMult(Gs),kA._matMult(Gs),rc._matMult(Gs),iu._matMult(Gs)}const Sd=new P(0,0),Mc=new P(0,0);Vn.push({tl:IA,tr:kA,bl:rc,br:iu,tex:On,writingMode:Mt.writingMode,glyphOffset:Wl,sectionIndex:rr.sectionIndex,isSDF:Lr,pixelOffsetTL:Sd,pixelOffsetBR:Mc,minFontScaleX:0,minFontScaleY:0})}return Vn}(0,d,N,w,D,F,v,h.allowVerticalPlacement),lt=h.textSizeData;let yt=null;lt.kind==="source"?(yt=[qc*w.layout.get("text-size").evaluate(F,{})],yt[0]>Sh&&tt(`${h.layerIds[0]}: Value for "text-size" is >= ${up}. Reduce your "text-size".`)):lt.kind==="composite"&&(yt=[qc*De.compositeTextSizes[0].evaluate(F,{},ze),qc*De.compositeTextSizes[1].evaluate(F,{},ze)],(yt[0]>Sh||yt[1]>Sh)&&tt(`${h.layerIds[0]}: Value for "text-size" is >= ${up}. Reduce your "text-size".`)),h.addSymbols(h.text,Ze,yt,N,D,F,ie,u,Z.lineStartIndex,Z.lineLength,Pe,ze);for(const Nt of ce)Ce[Nt]=h.text.placedSymbolArray.length-1;return 4*Ze.length}function f_(h){for(const u in h)return h[u];return null}function Y2(h,u,d,v){const w=h.compareText;if(u in w){const D=w[u];for(let F=D.length-1;F>=0;F--)if(v.dist(D[F])<d)return!0}else w[u]=[];return w[u].push(v),!1}const p_=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class oy{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[d,v]=new Uint8Array(u,0,2);if(d!==219)throw new Error("Data does not appear to be in a KDBush format.");const w=v>>4;if(w!==1)throw new Error(`Got v${w} data when expected v1.`);const D=p_[15&v];if(!D)throw new Error("Unrecognized array type.");const[F]=new Uint16Array(u,2,1),[N]=new Uint32Array(u,4,1);return new oy(N,F,D,u)}constructor(u,d=64,v=Float64Array,w){if(isNaN(u)||u<0)throw new Error(`Unpexpected numItems value: ${u}.`);this.numItems=+u,this.nodeSize=Math.min(Math.max(+d,2),65535),this.ArrayType=v,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const D=p_.indexOf(this.ArrayType),F=2*u*this.ArrayType.BYTES_PER_ELEMENT,N=u*this.IndexArrayType.BYTES_PER_ELEMENT,Z=(8-N%8)%8;if(D<0)throw new Error(`Unexpected typed array class: ${v}.`);w&&w instanceof ArrayBuffer?(this.data=w,this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+N+Z,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+F+N+Z),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+N+Z,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+D]),new Uint16Array(this.data,2,1)[0]=d,new Uint32Array(this.data,4,1)[0]=u)}add(u,d){const v=this._pos>>1;return this.ids[v]=v,this.coords[this._pos++]=u,this.coords[this._pos++]=d,v}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return ay(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,d,v,w){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:D,coords:F,nodeSize:N}=this,Z=[0,D.length-1,0],ie=[];for(;Z.length;){const ce=Z.pop()||0,Ce=Z.pop()||0,Pe=Z.pop()||0;if(Ce-Pe<=N){for(let lt=Pe;lt<=Ce;lt++){const yt=F[2*lt],Nt=F[2*lt+1];yt>=u&&yt<=v&&Nt>=d&&Nt<=w&&ie.push(D[lt])}continue}const De=Pe+Ce>>1,ze=F[2*De],Ze=F[2*De+1];ze>=u&&ze<=v&&Ze>=d&&Ze<=w&&ie.push(D[De]),(ce===0?u<=ze:d<=Ze)&&(Z.push(Pe),Z.push(De-1),Z.push(1-ce)),(ce===0?v>=ze:w>=Ze)&&(Z.push(De+1),Z.push(Ce),Z.push(1-ce))}return ie}within(u,d,v){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:w,coords:D,nodeSize:F}=this,N=[0,w.length-1,0],Z=[],ie=v*v;for(;N.length;){const ce=N.pop()||0,Ce=N.pop()||0,Pe=N.pop()||0;if(Ce-Pe<=F){for(let lt=Pe;lt<=Ce;lt++)m_(D[2*lt],D[2*lt+1],u,d)<=ie&&Z.push(w[lt]);continue}const De=Pe+Ce>>1,ze=D[2*De],Ze=D[2*De+1];m_(ze,Ze,u,d)<=ie&&Z.push(w[De]),(ce===0?u-v<=ze:d-v<=Ze)&&(N.push(Pe),N.push(De-1),N.push(1-ce)),(ce===0?u+v>=ze:d+v>=Ze)&&(N.push(De+1),N.push(Ce),N.push(1-ce))}return Z}}function ay(h,u,d,v,w,D){if(w-v<=d)return;const F=v+w>>1;sy(h,u,F,v,w,D),ay(h,u,d,v,F-1,1-D),ay(h,u,d,F+1,w,1-D)}function sy(h,u,d,v,w,D){for(;w>v;){if(w-v>600){const ie=w-v+1,ce=d-v+1,Ce=Math.log(ie),Pe=.5*Math.exp(2*Ce/3),De=.5*Math.sqrt(Ce*Pe*(ie-Pe)/ie)*(ce-ie/2<0?-1:1);sy(h,u,d,Math.max(v,Math.floor(d-ce*Pe/ie+De)),Math.min(w,Math.floor(d+(ie-ce)*Pe/ie+De)),D)}const F=u[2*d+D];let N=v,Z=w;for(Tf(h,u,v,d),u[2*w+D]>F&&Tf(h,u,v,w);N<Z;){for(Tf(h,u,N,Z),N++,Z--;u[2*N+D]<F;)N++;for(;u[2*Z+D]>F;)Z--}u[2*v+D]===F?Tf(h,u,v,Z):(Z++,Tf(h,u,Z,w)),Z<=d&&(v=Z+1),d<=Z&&(w=Z-1)}}function Tf(h,u,d,v){x0(h,d,v),x0(u,2*d,2*v),x0(u,2*d+1,2*v+1)}function x0(h,u,d){const v=h[u];h[u]=h[d],h[d]=v}function m_(h,u,d,v){const w=h-d,D=u-v;return w*w+D*D}var wg;s.ce=void 0,(wg=s.ce||(s.ce={})).create="create",wg.load="load",wg.fullLoad="fullLoad";let Xp=null,BA=[];const fp=1e3/60,ly="loadTime",uy="fullLoadTime",$2={mark(h){performance.mark(h)},frame(h){const u=h;Xp!=null&&BA.push(u-Xp),Xp=u},clearMetrics(){Xp=null,BA=[],performance.clearMeasures(ly),performance.clearMeasures(uy);for(const h in s.ce)performance.clearMarks(s.ce[h])},getPerformanceMetrics(){performance.measure(ly,s.ce.create,s.ce.load),performance.measure(uy,s.ce.create,s.ce.fullLoad);const h=performance.getEntriesByName(ly)[0].duration,u=performance.getEntriesByName(uy)[0].duration,d=BA.length,v=1/(BA.reduce((D,F)=>D+F,0)/d/1e3),w=BA.filter(D=>D>fp).reduce((D,F)=>D+(F-fp)/fp,0);return{loadTime:h,fullLoadTime:u,fps:v,percentDroppedFrames:w/(d+w)*100,totalFrames:d}}};s.$=wt,s.A=G,s.B=Qd,s.C=function(h){if(Lt==null){const u=h.navigator?h.navigator.userAgent:null;Lt=!!h.safari||!(!u||!(/\b(iPad|iPhone|iPod)\b/.test(u)||u.match("Safari")&&!u.match("Chrome")))}return Lt},s.D=cr,s.E=Ut,s.F=class{constructor(h,u){this.target=h,this.mapId=u,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new ur(()=>this.process()),this.subscription=function(d,v,w,D){return d.addEventListener(v,w,!1),{unsubscribe:()=>{d.removeEventListener(v,w,!1)}}}(this.target,"message",d=>this.receive(d)),this.globalScope=bt(self)?h:window}registerMessageHandler(h,u){this.messageHandlers[h]=u}sendAsync(h,u){return new Promise((d,v)=>{const w=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[w]={resolve:d,reject:v},u&&u.signal.addEventListener("abort",()=>{delete this.resolveRejects[w];const N={id:w,type:"<cancel>",origin:location.origin,targetMapId:h.targetMapId,sourceMapId:this.mapId};this.target.postMessage(N)},{once:!0});const D=[],F=Object.assign(Object.assign({},h),{id:w,sourceMapId:this.mapId,origin:location.origin,data:VA(h.data,D)});this.target.postMessage(F,{transfer:D})})}receive(h){const u=h.data,d=u.id;if(!(u.origin!=="file://"&&location.origin!=="file://"&&u.origin!=="resource://android"&&location.origin!=="resource://android"&&u.origin!==location.origin||u.targetMapId&&this.mapId!==u.targetMapId)){if(u.type==="<cancel>"){delete this.tasks[d];const v=this.abortControllers[d];return delete this.abortControllers[d],void(v&&v.abort())}if(bt(self)||u.mustQueue)return this.tasks[d]=u,this.taskQueue.push(d),void this.invoker.trigger();this.processTask(d,u)}}process(){if(this.taskQueue.length===0)return;const h=this.taskQueue.shift(),u=this.tasks[h];delete this.tasks[h],this.taskQueue.length>0&&this.invoker.trigger(),u&&this.processTask(h,u)}processTask(h,u){return a(this,void 0,void 0,function*(){if(u.type==="<response>"){const w=this.resolveRejects[h];return delete this.resolveRejects[h],w?void(u.error?w.reject(ud(u.error)):w.resolve(ud(u.data))):void 0}if(!this.messageHandlers[u.type])return void this.completeTask(h,new Error(`Could not find a registered handler for ${u.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const d=ud(u.data),v=new AbortController;this.abortControllers[h]=v;try{const w=yield this.messageHandlers[u.type](u.sourceMapId,d,v);this.completeTask(h,null,w)}catch(w){this.completeTask(h,w)}})}completeTask(h,u,d){const v=[];delete this.abortControllers[h];const w={id:h,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:u?VA(u):null,data:VA(d,v)};this.target.postMessage(w,{transfer:v})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},s.G=wr,s.H=function(){var h=new G(16);return G!=Float32Array&&(h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0),h[0]=1,h[5]=1,h[10]=1,h[15]=1,h},s.I=g0,s.J=function(h,u,d){var v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze=d[0],lt=d[1],yt=d[2];return u===h?(h[12]=u[0]*Ze+u[4]*lt+u[8]*yt+u[12],h[13]=u[1]*Ze+u[5]*lt+u[9]*yt+u[13],h[14]=u[2]*Ze+u[6]*lt+u[10]*yt+u[14],h[15]=u[3]*Ze+u[7]*lt+u[11]*yt+u[15]):(w=u[1],D=u[2],F=u[3],N=u[4],Z=u[5],ie=u[6],ce=u[7],Ce=u[8],Pe=u[9],De=u[10],ze=u[11],h[0]=v=u[0],h[1]=w,h[2]=D,h[3]=F,h[4]=N,h[5]=Z,h[6]=ie,h[7]=ce,h[8]=Ce,h[9]=Pe,h[10]=De,h[11]=ze,h[12]=v*Ze+N*lt+Ce*yt+u[12],h[13]=w*Ze+Z*lt+Pe*yt+u[13],h[14]=D*Ze+ie*lt+De*yt+u[14],h[15]=F*Ze+ce*lt+ze*yt+u[15]),h},s.K=function(h,u,d){var v=d[0],w=d[1],D=d[2];return h[0]=u[0]*v,h[1]=u[1]*v,h[2]=u[2]*v,h[3]=u[3]*v,h[4]=u[4]*w,h[5]=u[5]*w,h[6]=u[6]*w,h[7]=u[7]*w,h[8]=u[8]*D,h[9]=u[9]*D,h[10]=u[10]*D,h[11]=u[11]*D,h[12]=u[12],h[13]=u[13],h[14]=u[14],h[15]=u[15],h},s.L=function(h,u,d){var v=u[0],w=u[1],D=u[2],F=u[3],N=u[4],Z=u[5],ie=u[6],ce=u[7],Ce=u[8],Pe=u[9],De=u[10],ze=u[11],Ze=u[12],lt=u[13],yt=u[14],Nt=u[15],Mt=d[0],Re=d[1],at=d[2],Ot=d[3];return h[0]=Mt*v+Re*N+at*Ce+Ot*Ze,h[1]=Mt*w+Re*Z+at*Pe+Ot*lt,h[2]=Mt*D+Re*ie+at*De+Ot*yt,h[3]=Mt*F+Re*ce+at*ze+Ot*Nt,h[4]=(Mt=d[4])*v+(Re=d[5])*N+(at=d[6])*Ce+(Ot=d[7])*Ze,h[5]=Mt*w+Re*Z+at*Pe+Ot*lt,h[6]=Mt*D+Re*ie+at*De+Ot*yt,h[7]=Mt*F+Re*ce+at*ze+Ot*Nt,h[8]=(Mt=d[8])*v+(Re=d[9])*N+(at=d[10])*Ce+(Ot=d[11])*Ze,h[9]=Mt*w+Re*Z+at*Pe+Ot*lt,h[10]=Mt*D+Re*ie+at*De+Ot*yt,h[11]=Mt*F+Re*ce+at*ze+Ot*Nt,h[12]=(Mt=d[12])*v+(Re=d[13])*N+(at=d[14])*Ce+(Ot=d[15])*Ze,h[13]=Mt*w+Re*Z+at*Pe+Ot*lt,h[14]=Mt*D+Re*ie+at*De+Ot*yt,h[15]=Mt*F+Re*ce+at*ze+Ot*Nt,h},s.M=function(h,u){const d={};for(let v=0;v<u.length;v++){const w=u[v];w in h&&(d[w]=h[w])}return d},s.N=Rr,s.O=Xs,s.P=P,s.Q=ln,s.R=Nu,s.S=Ra,s.T=mc,s.U=ee,s.V=J,s.W=Sn,s.X=nt,s.Y=ni,s.Z=Ii,s._=a,s.a=_r,s.a$=function(){return new Float64Array(16)},s.a0=h=>{const u=window.document.createElement("video");return u.muted=!0,new Promise(d=>{u.onloadstart=()=>{d(u)};for(const v of h){const w=window.document.createElement("source");pe(v)||(u.crossOrigin="Anonymous"),w.src=v,u.appendChild(w)}})},s.a1=function(){return jt++},s.a2=M,s.a3=cp,s.a4=WA,s.a5=XA,s.a6=r_,s.a7=function(h){const u={};if(h.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(d,v,w,D)=>{const F=w||D;return u[v]=!F||F.toLowerCase(),""}),u["max-age"]){const d=parseInt(u["max-age"],10);isNaN(d)?delete u["max-age"]:u["max-age"]=d}return u},s.a8=function(h){return Math.log(h)/Math.LN2},s.a9=function(h){var u=h[0],d=h[1];return u*u+d*d},s.aA=Oa,s.aB=xt,s.aC=ct,s.aD=wn,s.aE=_n,s.aF=85.051129,s.aG=function(h){return Math.pow(2,h)},s.aH=en,s.aI=Pt,s.aJ=ar,s.aK=mr,s.aL=function(h,u,d){return h[0]=u[0]*d,h[1]=u[1]*d,h[2]=u[2]*d,h},s.aM=function(h,u,d){return h[0]=u[0]+d[0],h[1]=u[1]+d[1],h[2]=u[2]+d[2],h},s.aN=function(h){var u=new G(3);return u[0]=h[0],u[1]=h[1],u[2]=h[2],u},s.aO=function(h,u,d){return h[0]=u[0]*d[0],h[1]=u[1]*d[1],h[2]=u[2]*d[2],h[3]=u[3]*d[3],h},s.aP=function(h,u,d){return h[0]=u[0]-d[0],h[1]=u[1]-d[1],h[2]=u[2]-d[2],h},s.aQ=function(h,u){var d=u[0],v=u[1],w=u[2],D=d*d+v*v+w*w;return D>0&&(D=1/Math.sqrt(D)),h[0]=u[0]*D,h[1]=u[1]*D,h[2]=u[2]*D,h},s.aR=function(h,u,d){var v=u[0],w=u[1],D=u[2],F=d[0],N=d[1],Z=d[2];return h[0]=w*Z-D*N,h[1]=D*F-v*Z,h[2]=v*N-w*F,h},s.aS=function(h,u){return h[0]*u[0]+h[1]*u[1]+h[2]*u[2]},s.aT=Ni,s.aU=Xo,s.aV=function(h,u,d,v,w){var D,F=1/Math.tan(u/2);return h[0]=F/d,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=F,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[11]=-1,h[12]=0,h[13]=0,h[15]=0,w!=null&&w!==1/0?(h[10]=(w+v)*(D=1/(v-w)),h[14]=2*w*v*D):(h[10]=-1,h[14]=-2*v),h},s.aW=function(h){var u=new G(16);return u[0]=h[0],u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5],u[6]=h[6],u[7]=h[7],u[8]=h[8],u[9]=h[9],u[10]=h[10],u[11]=h[11],u[12]=h[12],u[13]=h[13],u[14]=h[14],u[15]=h[15],u},s.aX=function(h,u,d){var v=Math.sin(d),w=Math.cos(d),D=u[0],F=u[1],N=u[2],Z=u[3],ie=u[4],ce=u[5],Ce=u[6],Pe=u[7];return u!==h&&(h[8]=u[8],h[9]=u[9],h[10]=u[10],h[11]=u[11],h[12]=u[12],h[13]=u[13],h[14]=u[14],h[15]=u[15]),h[0]=D*w+ie*v,h[1]=F*w+ce*v,h[2]=N*w+Ce*v,h[3]=Z*w+Pe*v,h[4]=ie*w-D*v,h[5]=ce*w-F*v,h[6]=Ce*w-N*v,h[7]=Pe*w-Z*v,h},s.aY=function(h,u,d){var v=Math.sin(d),w=Math.cos(d),D=u[4],F=u[5],N=u[6],Z=u[7],ie=u[8],ce=u[9],Ce=u[10],Pe=u[11];return u!==h&&(h[0]=u[0],h[1]=u[1],h[2]=u[2],h[3]=u[3],h[12]=u[12],h[13]=u[13],h[14]=u[14],h[15]=u[15]),h[4]=D*w+ie*v,h[5]=F*w+ce*v,h[6]=N*w+Ce*v,h[7]=Z*w+Pe*v,h[8]=ie*w-D*v,h[9]=ce*w-F*v,h[10]=Ce*w-N*v,h[11]=Pe*w-Z*v,h},s.aZ=function(){const h=new Float32Array(16);return ge(h),h},s.a_=function(){const h=new Float64Array(16);return ge(h),h},s.aa=function(h){return h*Math.PI/180},s.ab=vt,s.ac=function(h,u){const d=[];for(const v in h)v in u||d.push(v);return d},s.ad=Se,s.ae=function(h){return Math.hypot(h[0],h[1])},s.af=function(h){return h[0]=0,h[1]=0,h},s.ag=function(h,u,d){return h[0]=u[0]*d,h[1]=u[1]*d,h},s.ah=function(h,u){let d=0,v=0;if(h.kind==="constant")v=h.layoutSize;else if(h.kind!=="source"){const{interpolationType:w,minZoom:D,maxZoom:F}=h,N=w?vt(pr.interpolationFactor(w,u,D,F),0,1):0;h.kind==="camera"?v=Ci.number(h.minSize,h.maxSize,N):d=N}return{uSizeT:d,uSize:v}},s.aj=function(h,{uSize:u,uSizeT:d},{lowerSize:v,upperSize:w}){return h.kind==="source"?v/qc:h.kind==="composite"?Ci.number(v/qc,w/qc,d):u},s.ak=_0,s.al=re,s.am=function(h,u,d,v){const w=u.y-h.y,D=u.x-h.x,F=v.y-d.y,N=v.x-d.x,Z=F*D-N*w;if(Z===0)return null;const ie=(N*(h.y-d.y)-F*(h.x-d.x))/Z;return new P(h.x+ie*D,h.y+ie*w)},s.an=function(h,u){var d=u[0],v=u[1],w=u[2],D=u[3],F=u[4],N=u[5],Z=u[6],ie=u[7],ce=u[8],Ce=u[9],Pe=u[10],De=u[11],ze=u[12],Ze=u[13],lt=u[14],yt=u[15],Nt=d*N-v*F,Mt=d*Z-w*F,Re=d*ie-D*F,at=v*Z-w*N,Ot=v*ie-D*N,un=w*ie-D*Z,Fn=ce*Ze-Ce*ze,mn=ce*lt-Pe*ze,bn=ce*yt-De*ze,Vn=Ce*lt-Pe*Ze,Ln=Ce*yt-De*Ze,rr=Pe*yt-De*lt,On=Nt*rr-Mt*Ln+Re*Vn+at*bn-Ot*mn+un*Fn;return On?(h[0]=(N*rr-Z*Ln+ie*Vn)*(On=1/On),h[1]=(w*Ln-v*rr-D*Vn)*On,h[2]=(Ze*un-lt*Ot+yt*at)*On,h[3]=(Pe*Ot-Ce*un-De*at)*On,h[4]=(Z*bn-F*rr-ie*mn)*On,h[5]=(d*rr-w*bn+D*mn)*On,h[6]=(lt*Re-ze*un-yt*Mt)*On,h[7]=(ce*un-Pe*Re+De*Mt)*On,h[8]=(F*Ln-N*bn+ie*Fn)*On,h[9]=(v*bn-d*Ln-D*Fn)*On,h[10]=(ze*Ot-Ze*Re+yt*Nt)*On,h[11]=(Ce*Re-ce*Ot-De*Nt)*On,h[12]=(N*mn-F*Vn-Z*Fn)*On,h[13]=(d*Vn-v*mn+w*Fn)*On,h[14]=(Ze*Mt-ze*at-lt*Nt)*On,h[15]=(ce*at-Ce*Mt+Pe*Nt)*On,h):null},s.ao=s_,s.ap=gd,s.aq=ge,s.ar=function(h){let u=1/0,d=1/0,v=-1/0,w=-1/0;for(const D of h)u=Math.min(u,D.x),d=Math.min(d,D.y),v=Math.max(v,D.x),w=Math.max(w,D.y);return[u,d,v,w]},s.as=Ns,s.at=Ne,s.au=function(h,u,d,v,w=!1){if(!d[0]&&!d[1])return[0,0];const D=w?v==="map"?-h.bearingInRadians:0:v==="viewport"?h.bearingInRadians:0;if(D){const F=Math.sin(D),N=Math.cos(D);d=[d[0]*N-d[1]*F,d[0]*F+d[1]*N]}return[w?d[0]:Ne(u,d[0],h.zoom),w?d[1]:Ne(u,d[1],h.zoom)]},s.aw=If,s.ax=pl,s.ay=v0,s.az=oy,s.b=Vt,s.b$=h=>h.type==="line",s.b0=function(h,u,d){const v=new Float64Array(4);return function(w,D,F,N){var Z=.5*Math.PI/180;D*=Z,F*=Z,N*=Z;var ie=Math.sin(D),ce=Math.cos(D),Ce=Math.sin(F),Pe=Math.cos(F),De=Math.sin(N),ze=Math.cos(N);w[0]=ie*Pe*ze-ce*Ce*De,w[1]=ce*Ce*ze+ie*Pe*De,w[2]=ce*Pe*De-ie*Ce*ze,w[3]=ce*Pe*ze+ie*Ce*De}(v,h,u-90,d),v},s.b1=function(h,u,d,v){var w,D,F,N,Z,ie=u[0],ce=u[1],Ce=u[2],Pe=u[3],De=d[0],ze=d[1],Ze=d[2],lt=d[3];return(D=ie*De+ce*ze+Ce*Ze+Pe*lt)<0&&(D=-D,De=-De,ze=-ze,Ze=-Ze,lt=-lt),1-D>X?(w=Math.acos(D),F=Math.sin(w),N=Math.sin((1-v)*w)/F,Z=Math.sin(v*w)/F):(N=1-v,Z=v),h[0]=N*ie+Z*De,h[1]=N*ce+Z*ze,h[2]=N*Ce+Z*Ze,h[3]=N*Pe+Z*lt,h},s.b2=function(h){const u=new Float64Array(9);var d,v,w,D,F,N,Z,ie,ce,Ce,Pe,De,ze,Ze,lt,yt,Nt,Mt;Ce=(w=(v=h)[0])*(Z=w+w),Pe=(D=v[1])*Z,ze=(F=v[2])*Z,Ze=F*(ie=D+D),yt=(N=v[3])*Z,Nt=N*ie,Mt=N*(ce=F+F),(d=u)[0]=1-(De=D*ie)-(lt=F*ce),d[3]=Pe-Mt,d[6]=ze+Nt,d[1]=Pe+Mt,d[4]=1-Ce-lt,d[7]=Ze-yt,d[2]=ze-Nt,d[5]=Ze+yt,d[8]=1-Ce-De;const Re=ar(-Math.asin(vt(u[2],-1,1)));let at,Ot;return Math.hypot(u[5],u[8])<.001?(at=0,Ot=-ar(Math.atan2(u[3],u[4]))):(at=ar(u[5]===0&&u[8]===0?0:Math.atan2(u[5],u[8])),Ot=ar(u[1]===0&&u[0]===0?0:Math.atan2(u[1],u[0]))),{roll:at,pitch:Re+90,bearing:Ot}},s.b3=function(h,u){return h.roll==u.roll&&h.pitch==u.pitch&&h.bearing==u.bearing},s.b4=Ai,s.b5=sl,s.b6=Jt,s.b7=Qt,s.b8=ht,s.b9=et,s.bA=Rt,s.bB=Ke,s.bC=class extends al{constructor(h,u){super(h,u),this.current=0}set(h){this.current!==h&&(this.current=h,this.gl.uniform1i(this.location,h))}},s.bD=class extends al{constructor(h,u){super(h,u),this.current=wA}set(h){if(h[12]!==this.current[12]||h[0]!==this.current[0])return this.current=h,void this.gl.uniformMatrix4fv(this.location,!1,h);for(let u=1;u<16;u++)if(h[u]!==this.current[u]){this.current=h,this.gl.uniformMatrix4fv(this.location,!1,h);break}}},s.bE=tu,s.bF=xA,s.bG=class extends al{constructor(h,u){super(h,u),this.current=[0,0,0]}set(h){h[0]===this.current[0]&&h[1]===this.current[1]&&h[2]===this.current[2]||(this.current=h,this.gl.uniform3f(this.location,h[0],h[1],h[2]))}},s.bH=class extends al{constructor(h,u){super(h,u),this.current=[0,0]}set(h){h[0]===this.current[0]&&h[1]===this.current[1]||(this.current=h,this.gl.uniform2f(this.location,h[0],h[1]))}},s.bI=ae,s.bJ=function(h,u){var d=Math.sin(u),v=Math.cos(u);return h[0]=v,h[1]=d,h[2]=0,h[3]=-d,h[4]=v,h[5]=0,h[6]=0,h[7]=0,h[8]=1,h},s.bK=function(h,u,d){var v=u[0],w=u[1],D=u[2];return h[0]=v*d[0]+w*d[3]+D*d[6],h[1]=v*d[1]+w*d[4]+D*d[7],h[2]=v*d[2]+w*d[5]+D*d[8],h},s.bL=function(h,u,d,v,w,D,F){var N=1/(u-d),Z=1/(v-w),ie=1/(D-F);return h[0]=-2*N,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=-2*Z,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=2*ie,h[11]=0,h[12]=(u+d)*N,h[13]=(w+v)*Z,h[14]=(F+D)*ie,h[15]=1,h},s.bM=class extends Jl{},s.bN=Of,s.bO=class extends aA{},s.bP=_d,s.bQ=function(h){return h<=1?1:Math.pow(2,Math.ceil(Math.log(h)/Math.LN2))},s.bR=Qh,s.bS=function(h,u,d){var v=u[0],w=u[1],D=u[2],F=d[3]*v+d[7]*w+d[11]*D+d[15];return h[0]=(d[0]*v+d[4]*w+d[8]*D+d[12])/(F=F||1),h[1]=(d[1]*v+d[5]*w+d[9]*D+d[13])/F,h[2]=(d[2]*v+d[6]*w+d[10]*D+d[14])/F,h},s.bT=class extends bA{},s.bU=class extends l{},s.bV=function(h,u){return h[0]===u[0]&&h[1]===u[1]&&h[2]===u[2]&&h[3]===u[3]&&h[4]===u[4]&&h[5]===u[5]&&h[6]===u[6]&&h[7]===u[7]&&h[8]===u[8]&&h[9]===u[9]&&h[10]===u[10]&&h[11]===u[11]&&h[12]===u[12]&&h[13]===u[13]&&h[14]===u[14]&&h[15]===u[15]},s.bW=function(h,u){var d=h[0],v=h[1],w=h[2],D=h[3],F=h[4],N=h[5],Z=h[6],ie=h[7],ce=h[8],Ce=h[9],Pe=h[10],De=h[11],ze=h[12],Ze=h[13],lt=h[14],yt=h[15],Nt=u[0],Mt=u[1],Re=u[2],at=u[3],Ot=u[4],un=u[5],Fn=u[6],mn=u[7],bn=u[8],Vn=u[9],Ln=u[10],rr=u[11],On=u[12],Ur=u[13],Lr=u[14],jr=u[15];return Math.abs(d-Nt)<=X*Math.max(1,Math.abs(d),Math.abs(Nt))&&Math.abs(v-Mt)<=X*Math.max(1,Math.abs(v),Math.abs(Mt))&&Math.abs(w-Re)<=X*Math.max(1,Math.abs(w),Math.abs(Re))&&Math.abs(D-at)<=X*Math.max(1,Math.abs(D),Math.abs(at))&&Math.abs(F-Ot)<=X*Math.max(1,Math.abs(F),Math.abs(Ot))&&Math.abs(N-un)<=X*Math.max(1,Math.abs(N),Math.abs(un))&&Math.abs(Z-Fn)<=X*Math.max(1,Math.abs(Z),Math.abs(Fn))&&Math.abs(ie-mn)<=X*Math.max(1,Math.abs(ie),Math.abs(mn))&&Math.abs(ce-bn)<=X*Math.max(1,Math.abs(ce),Math.abs(bn))&&Math.abs(Ce-Vn)<=X*Math.max(1,Math.abs(Ce),Math.abs(Vn))&&Math.abs(Pe-Ln)<=X*Math.max(1,Math.abs(Pe),Math.abs(Ln))&&Math.abs(De-rr)<=X*Math.max(1,Math.abs(De),Math.abs(rr))&&Math.abs(ze-On)<=X*Math.max(1,Math.abs(ze),Math.abs(On))&&Math.abs(Ze-Ur)<=X*Math.max(1,Math.abs(Ze),Math.abs(Ur))&&Math.abs(lt-Lr)<=X*Math.max(1,Math.abs(lt),Math.abs(Lr))&&Math.abs(yt-jr)<=X*Math.max(1,Math.abs(yt),Math.abs(jr))},s.bX=function(h,u){return h[0]=u[0],h[1]=u[1],h[2]=u[2],h[3]=u[3],h[4]=u[4],h[5]=u[5],h[6]=u[6],h[7]=u[7],h[8]=u[8],h[9]=u[9],h[10]=u[10],h[11]=u[11],h[12]=u[12],h[13]=u[13],h[14]=u[14],h[15]=u[15],h},s.bY=h=>h.type==="symbol",s.bZ=h=>h.type==="circle",s.b_=h=>h.type==="heatmap",s.ba=Ue,s.bb=ja,s.bc=function(h,u,d,v,w){return et(v,w,vt((h-u)/(d-u),0,1))},s.bd=je,s.be=function(){return new Float64Array(4)},s.bf=function(){return new Float64Array(3)},s.bg=function(h,u,d,v){var w=[],D=[];return w[0]=u[0]-d[0],w[1]=u[1]-d[1],w[2]=u[2]-d[2],D[0]=w[0]*Math.cos(v)-w[1]*Math.sin(v),D[1]=w[0]*Math.sin(v)+w[1]*Math.cos(v),D[2]=w[2],h[0]=D[0]+d[0],h[1]=D[1]+d[1],h[2]=D[2]+d[2],h},s.bh=function(h,u,d,v){var w=[],D=[];return w[0]=u[0]-d[0],w[1]=u[1]-d[1],w[2]=u[2]-d[2],D[0]=w[0],D[1]=w[1]*Math.cos(v)-w[2]*Math.sin(v),D[2]=w[1]*Math.sin(v)+w[2]*Math.cos(v),h[0]=D[0]+d[0],h[1]=D[1]+d[1],h[2]=D[2]+d[2],h},s.bi=function(h,u,d,v){var w=[],D=[];return w[0]=u[0]-d[0],w[1]=u[1]-d[1],w[2]=u[2]-d[2],D[0]=w[2]*Math.sin(v)+w[0]*Math.cos(v),D[1]=w[1],D[2]=w[2]*Math.cos(v)-w[0]*Math.sin(v),h[0]=D[0]+d[0],h[1]=D[1]+d[1],h[2]=D[2]+d[2],h},s.bj=function(h,u,d){var v=Math.sin(d),w=Math.cos(d),D=u[0],F=u[1],N=u[2],Z=u[3],ie=u[8],ce=u[9],Ce=u[10],Pe=u[11];return u!==h&&(h[4]=u[4],h[5]=u[5],h[6]=u[6],h[7]=u[7],h[12]=u[12],h[13]=u[13],h[14]=u[14],h[15]=u[15]),h[0]=D*w-ie*v,h[1]=F*w-ce*v,h[2]=N*w-Ce*v,h[3]=Z*w-Pe*v,h[8]=D*v+ie*w,h[9]=F*v+ce*w,h[10]=N*v+Ce*w,h[11]=Z*v+Pe*w,h},s.bk=function(h,u){const d=je(h,360),v=je(u,360),w=v-d,D=v>d?w-360:w+360;return Math.abs(w)<Math.abs(D)?w:D},s.bl=function(h){return h[0]=0,h[1]=0,h[2]=0,h},s.bm=function(h,u,d,v){const w=Math.sqrt(h*h+u*u),D=Math.sqrt(d*d+v*v);h/=w,u/=w,d/=D,v/=D;const F=Math.acos(h*d+u*v);return-u*d+h*v>0?F:-F},s.bn=function(h,u){return h[0]*u[0]+h[1]*u[1]+h[2]*u[2]+h[3]},s.bo=$n,s.bp=function(h,u){const d=je(h,2*Math.PI),v=je(u,2*Math.PI);return Math.min(Math.abs(d-v),Math.abs(d-v+2*Math.PI),Math.abs(d-v-2*Math.PI))},s.bq=function(h){return Math.hypot(h[0],h[1],h[2])},s.br=function(){const h={},u=qe.$version;for(const d in qe.$root){const v=qe.$root[d];if(v.required){let w=null;w=d==="version"?u:v.type==="array"?[]:{},w!=null&&(h[d]=w)}}return h},s.bs=Ad,s.bt=Ye,s.bu=function(h){h=h.slice();const u=Object.create(null);for(let d=0;d<h.length;d++)u[h[d].id]=h[d];for(let d=0;d<h.length;d++)"ref"in h[d]&&(h[d]=xe(h[d],u[h[d].ref]));return h},s.bv=function(h){if(h.type==="custom")return new nr(h);switch(h.type){case"background":return new Xe(h);case"circle":return new xf(h);case"fill":return new Io(h);case"fill-extrusion":return new bh(h);case"heatmap":return new SA(h);case"hillshade":return new xc(h);case"line":return new d0(h);case"raster":return new Cn(h);case"symbol":return new Q(h)}},s.bw=we,s.bx=function(h,u){if(!h)return[{command:"setStyle",args:[u]}];let d=[];try{if(!p(h.version,u.version))return[{command:"setStyle",args:[u]}];p(h.center,u.center)||d.push({command:"setCenter",args:[u.center]}),p(h.centerAltitude,u.centerAltitude)||d.push({command:"setCenterAltitude",args:[u.centerAltitude]}),p(h.zoom,u.zoom)||d.push({command:"setZoom",args:[u.zoom]}),p(h.bearing,u.bearing)||d.push({command:"setBearing",args:[u.bearing]}),p(h.pitch,u.pitch)||d.push({command:"setPitch",args:[u.pitch]}),p(h.roll,u.roll)||d.push({command:"setRoll",args:[u.roll]}),p(h.sprite,u.sprite)||d.push({command:"setSprite",args:[u.sprite]}),p(h.glyphs,u.glyphs)||d.push({command:"setGlyphs",args:[u.glyphs]}),p(h.transition,u.transition)||d.push({command:"setTransition",args:[u.transition]}),p(h.light,u.light)||d.push({command:"setLight",args:[u.light]}),p(h.terrain,u.terrain)||d.push({command:"setTerrain",args:[u.terrain]}),p(h.sky,u.sky)||d.push({command:"setSky",args:[u.sky]}),p(h.projection,u.projection)||d.push({command:"setProjection",args:[u.projection]});const v={},w=[];(function(F,N,Z,ie){let ce;for(ce in N=N||{},F=F||{})Object.prototype.hasOwnProperty.call(F,ce)&&(Object.prototype.hasOwnProperty.call(N,ce)||ft(ce,Z,ie));for(ce in N)Object.prototype.hasOwnProperty.call(N,ce)&&(Object.prototype.hasOwnProperty.call(F,ce)?p(F[ce],N[ce])||(F[ce].type==="geojson"&&N[ce].type==="geojson"&&Ct(F,N,ce)?Qe(Z,{command:"setGeoJSONSourceData",args:[ce,N[ce].data]}):Et(ce,N,Z,ie)):pt(ce,N,Z))})(h.sources,u.sources,w,v);const D=[];h.layers&&h.layers.forEach(F=>{"source"in F&&v[F.source]?d.push({command:"removeLayer",args:[F.id]}):D.push(F)}),d=d.concat(w),function(F,N,Z){N=N||[];const ie=(F=F||[]).map(Yt),ce=N.map(Yt),Ce=F.reduce(Gt,{}),Pe=N.reduce(Gt,{}),De=ie.slice(),ze=Object.create(null);let Ze,lt,yt,Nt,Mt;for(let Re=0,at=0;Re<ie.length;Re++)Ze=ie[Re],Object.prototype.hasOwnProperty.call(Pe,Ze)?at++:(Qe(Z,{command:"removeLayer",args:[Ze]}),De.splice(De.indexOf(Ze,at),1));for(let Re=0,at=0;Re<ce.length;Re++)Ze=ce[ce.length-1-Re],De[De.length-1-Re]!==Ze&&(Object.prototype.hasOwnProperty.call(Ce,Ze)?(Qe(Z,{command:"removeLayer",args:[Ze]}),De.splice(De.lastIndexOf(Ze,De.length-at),1)):at++,Nt=De[De.length-Re],Qe(Z,{command:"addLayer",args:[Pe[Ze],Nt]}),De.splice(De.length-Re,0,Ze),ze[Ze]=!0);for(let Re=0;Re<ce.length;Re++)if(Ze=ce[Re],lt=Ce[Ze],yt=Pe[Ze],!ze[Ze]&&!p(lt,yt))if(p(lt.source,yt.source)&&p(lt["source-layer"],yt["source-layer"])&&p(lt.type,yt.type)){for(Mt in nn(lt.layout,yt.layout,Z,Ze,null,"setLayoutProperty"),nn(lt.paint,yt.paint,Z,Ze,null,"setPaintProperty"),p(lt.filter,yt.filter)||Qe(Z,{command:"setFilter",args:[Ze,yt.filter]}),p(lt.minzoom,yt.minzoom)&&p(lt.maxzoom,yt.maxzoom)||Qe(Z,{command:"setLayerZoomRange",args:[Ze,yt.minzoom,yt.maxzoom]}),lt)Object.prototype.hasOwnProperty.call(lt,Mt)&&Mt!=="layout"&&Mt!=="paint"&&Mt!=="filter"&&Mt!=="metadata"&&Mt!=="minzoom"&&Mt!=="maxzoom"&&(Mt.indexOf("paint.")===0?nn(lt[Mt],yt[Mt],Z,Ze,Mt.slice(6),"setPaintProperty"):p(lt[Mt],yt[Mt])||Qe(Z,{command:"setLayerProperty",args:[Ze,Mt,yt[Mt]]}));for(Mt in yt)Object.prototype.hasOwnProperty.call(yt,Mt)&&!Object.prototype.hasOwnProperty.call(lt,Mt)&&Mt!=="layout"&&Mt!=="paint"&&Mt!=="filter"&&Mt!=="metadata"&&Mt!=="minzoom"&&Mt!=="maxzoom"&&(Mt.indexOf("paint.")===0?nn(lt[Mt],yt[Mt],Z,Ze,Mt.slice(6),"setPaintProperty"):p(lt[Mt],yt[Mt])||Qe(Z,{command:"setLayerProperty",args:[Ze,Mt,yt[Mt]]}))}else Qe(Z,{command:"removeLayer",args:[Ze]}),Nt=De[De.lastIndexOf(Ze)+1],Qe(Z,{command:"addLayer",args:[yt,Nt]})}(D,u.layers,d)}catch(v){console.warn("Unable to compute style diff:",v),d=[{command:"setStyle",args:[u]}]}return d},s.by=function(h){const u=[],d=h.id;return d===void 0&&u.push({message:`layers.${d}: missing required property "id"`}),h.render===void 0&&u.push({message:`layers.${d}: missing required method "render"`}),h.renderingMode&&h.renderingMode!=="2d"&&h.renderingMode!=="3d"&&u.push({message:`layers.${d}: property "renderingMode" must be either "2d" or "3d"`}),u},s.bz=function h(u,d){if(Array.isArray(u)){if(!Array.isArray(d)||u.length!==d.length)return!1;for(let v=0;v<u.length;v++)if(!h(u[v],d[v]))return!1;return!0}if(typeof u=="object"&&u!==null&&d!==null){if(typeof d!="object"||Object.keys(u).length!==Object.keys(d).length)return!1;for(const v in u)if(!h(u[v],d[v]))return!1;return!0}return u===d},s.c=br,s.c0=h=>h.type==="fill",s.c1=h=>h.type==="fill-extrusion",s.c2=h=>h.type==="hillshade",s.c3=h=>h.type==="raster",s.c4=h=>h.type==="background",s.c5=h=>h.type==="custom",s.c6=ke,s.c7=function(h,u,d){const v=ye(u.x-d.x,u.y-d.y),w=ye(h.x-d.x,h.y-d.y);var D,F;return ar(Math.atan2(v[0]*w[1]-v[1]*w[0],(D=v)[0]*(F=w)[0]+D[1]*F[1]))},s.c8=We,s.c9=function(h,u,d){var v=u[0],w=u[1];return h[0]=d[0]*v+d[4]*w+d[12],h[1]=d[1]*v+d[5]*w+d[13],h},s.cA=m0,s.cB=Rc,s.cC=Ka,s.ca=function(h,u){const{x:d,y:v}=ni.fromLngLat(u);return!(h<0||h>25||v<0||v>=1||d<0||d>=1)},s.cb=function(h,u){return h[0]=u[0],h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=u[1],h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=u[2],h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,h},s.cc=class extends $d{},s.cd=$2,s.cf=function(h){return h.message===Cr},s.cg=hi,s.ch=function(h,u){_r.REGISTERED_PROTOCOLS[h]=u},s.ci=function(h){delete _r.REGISTERED_PROTOCOLS[h]},s.cj=function(h,u){const d={};for(let w=0;w<h.length;w++){const D=u&&u[h[w].id]||Uc(h[w]);u&&(u[h[w].id]=D);let F=d[D];F||(F=d[D]=[]),F.push(h[w])}const v=[];for(const w in d)v.push(d[w]);return v},s.ck=dr,s.cl=_g,s.cm=i_,s.cn=mg,s.co=function(h){h.bucket.createArrays(),h.bucket.tilePixelRatio=nt/(512*h.bucket.overscaling),h.bucket.compareText={},h.bucket.iconsNeedLinear=!1;const u=h.bucket.layers[0],d=u.layout,v=u._unevaluatedLayout._values,w={layoutIconSize:v["icon-size"].possiblyEvaluate(new Ho(h.bucket.zoom+1),h.canonical),layoutTextSize:v["text-size"].possiblyEvaluate(new Ho(h.bucket.zoom+1),h.canonical),textMaxSize:v["text-size"].possiblyEvaluate(new Ho(18))};if(h.bucket.textSizeData.kind==="composite"){const{minZoom:ie,maxZoom:ce}=h.bucket.textSizeData;w.compositeTextSizes=[v["text-size"].possiblyEvaluate(new Ho(ie),h.canonical),v["text-size"].possiblyEvaluate(new Ho(ce),h.canonical)]}if(h.bucket.iconSizeData.kind==="composite"){const{minZoom:ie,maxZoom:ce}=h.bucket.iconSizeData;w.compositeIconSizes=[v["icon-size"].possiblyEvaluate(new Ho(ie),h.canonical),v["icon-size"].possiblyEvaluate(new Ho(ce),h.canonical)]}const D=d.get("text-line-height")*Ns,F=d.get("text-rotation-alignment")!=="viewport"&&d.get("symbol-placement")!=="point",N=d.get("text-keep-upright"),Z=d.get("text-size");for(const ie of h.bucket.features){const ce=d.get("text-font").evaluate(ie,{},h.canonical).join(","),Ce=Z.evaluate(ie,{},h.canonical),Pe=w.layoutTextSize.evaluate(ie,{},h.canonical),De=w.layoutIconSize.evaluate(ie,{},h.canonical),ze={horizontal:{},vertical:void 0},Ze=ie.text;let lt,yt=[0,0];if(Ze){const Re=Ze.toString(),at=d.get("text-letter-spacing").evaluate(ie,{},h.canonical)*Ns,Ot=Ul(Re)?at:0,un=d.get("text-anchor").evaluate(ie,{},h.canonical),Fn=fl(u,ie,h.canonical);if(!Fn){const Ln=d.get("text-radial-offset").evaluate(ie,{},h.canonical);yt=Ln?b0(un,[Ln*Ns,xg]):d.get("text-offset").evaluate(ie,{},h.canonical).map(rr=>rr*Ns)}let mn=F?"center":d.get("text-justify").evaluate(ie,{},h.canonical);const bn=d.get("symbol-placement")==="point"?d.get("text-max-width").evaluate(ie,{},h.canonical)*Ns:1/0,Vn=()=>{h.bucket.allowVerticalPlacement&&cd(Re)&&(ze.vertical=Bf(Ze,h.glyphMap,h.glyphPositions,h.imagePositions,ce,bn,D,un,"left",Ot,yt,s.ai.vertical,!0,Pe,Ce))};if(!F&&Fn){const Ln=new Set;if(mn==="auto")for(let On=0;On<Fn.values.length;On+=2)Ln.add(pl(Fn.values[On]));else Ln.add(mn);let rr=!1;for(const On of Ln)if(!ze.horizontal[On])if(rr)ze.horizontal[On]=ze.horizontal[0];else{const Ur=Bf(Ze,h.glyphMap,h.glyphPositions,h.imagePositions,ce,bn,D,"center",On,Ot,yt,s.ai.horizontal,!1,Pe,Ce);Ur&&(ze.horizontal[On]=Ur,rr=Ur.positionedLines.length===1)}Vn()}else{mn==="auto"&&(mn=pl(un));const Ln=Bf(Ze,h.glyphMap,h.glyphPositions,h.imagePositions,ce,bn,D,un,mn,Ot,yt,s.ai.horizontal,!1,Pe,Ce);Ln&&(ze.horizontal[mn]=Ln),Vn(),cd(Re)&&F&&N&&(ze.vertical=Bf(Ze,h.glyphMap,h.glyphPositions,h.imagePositions,ce,bn,D,un,mn,Ot,yt,s.ai.vertical,!1,Pe,Ce))}}let Nt=!1;if(ie.icon&&ie.icon.name){const Re=h.imageMap[ie.icon.name];Re&&(lt=vg(h.imagePositions[ie.icon.name],d.get("icon-offset").evaluate(ie,{},h.canonical),d.get("icon-anchor").evaluate(ie,{},h.canonical)),Nt=!!Re.sdf,h.bucket.sdfIcons===void 0?h.bucket.sdfIcons=Nt:h.bucket.sdfIcons!==Nt&&tt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Re.pixelRatio!==h.bucket.pixelRatio||d.get("icon-rotate").constantOr(1)!==0)&&(h.bucket.iconsNeedLinear=!0))}const Mt=f_(ze.horizontal)||ze.vertical;h.bucket.iconsInText=!!Mt&&Mt.iconsInText,(Mt||lt)&&d_(h.bucket,ie,ze,lt,h.imageMap,w,Pe,De,yt,Nt,h.canonical,h.subdivisionGranularity)}h.showCollisionBoxes&&h.bucket.generateCollisionDebugBuffers()},s.cp=Sf,s.cq=Tr,s.cr=EA,s.cs=Bl,s.ct=Bm,s.cu=class{constructor(h){this._marks={start:[h.url,"start"].join("#"),end:[h.url,"end"].join("#"),measure:h.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let h=performance.getEntriesByName(this._marks.measure);return h.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),h=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),h}},s.cv=function(h,u,d,v,w){return a(this,void 0,void 0,function*(){if(J())try{return yield Sn(h,u,d,v,w)}catch{}return function(D,F,N,Z,ie){const ce=D.width,Ce=D.height;Ar&&Bn||(Ar=new OffscreenCanvas(ce,Ce),Bn=Ar.getContext("2d",{willReadFrequently:!0})),Ar.width=ce,Ar.height=Ce,Bn.drawImage(D,0,0,ce,Ce);const Pe=Bn.getImageData(F,N,Z,ie);return Bn.clearRect(0,0,ce,Ce),Pe.data}(h,u,d,v,w)})},s.cw=Eh,s.cx=f,s.cy=I,s.cz=Ba,s.d=h=>a(void 0,void 0,void 0,function*(){if(h.byteLength===0)return createImageBitmap(new ImageData(1,1));const u=new Blob([new Uint8Array(h)],{type:"image/png"});try{return createImageBitmap(u)}catch(d){throw new Error(`Could not load image because of ${d.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),s.e=ut,s.f=h=>new Promise((u,d)=>{const v=new Image;v.onload=()=>{u(v),URL.revokeObjectURL(v.src),v.onload=null,window.requestAnimationFrame(()=>{v.src=rn})},v.onerror=()=>d(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 w=new Blob([new Uint8Array(h)],{type:"image/png"});v.src=h.byteLength?URL.createObjectURL(w):rn}),s.g=Jr,s.h=(h,u)=>de(ut(h,{type:"json"}),u),s.i=bt,s.j=it,s.k=Xt,s.l=(h,u)=>de(ut(h,{type:"arrayBuffer"}),u),s.m=de,s.n=function(h){return new Bm(h).readFields(iy,[])},s.o=Bo,s.p=pg,s.q=va,s.r=ld,s.s=pe,s.t=ya,s.u=Ma,s.v=qe,s.w=tt,s.x=function([h,u,d]){return u+=90,u*=Math.PI/180,d*=Math.PI/180,{x:h*Math.cos(u)*Math.sin(d),y:h*Math.sin(u)*Math.sin(d),z:h*Math.cos(d)}},s.y=Ci,s.z=Ho}),i("worker",["./shared"],function(s){class a{constructor(fe){this.keyCache={},fe&&this.replace(fe)}replace(fe){this._layerConfigs={},this._layers={},this.update(fe,[])}update(fe,xe){for(const Qe of fe){this._layerConfigs[Qe.id]=Qe;const pt=this._layers[Qe.id]=s.bv(Qe);pt._featureFilter=s.a4(pt.filter),this.keyCache[Qe.id]&&delete this.keyCache[Qe.id]}for(const Qe of xe)delete this.keyCache[Qe],delete this._layerConfigs[Qe],delete this._layers[Qe];this.familiesBySource={};const p=s.cj(Object.values(this._layerConfigs),this.keyCache);for(const Qe of p){const pt=Qe.map(Gt=>this._layers[Gt.id]),ft=pt[0];if(ft.visibility==="none")continue;const Et=ft.source||"";let Ct=this.familiesBySource[Et];Ct||(Ct=this.familiesBySource[Et]={});const nn=ft.sourceLayer||"_geojsonTileLayer";let Yt=Ct[nn];Yt||(Yt=Ct[nn]=[]),Yt.push(pt)}}}class f{constructor(fe){const xe={},p=[];for(const Et in fe){const Ct=fe[Et],nn=xe[Et]={};for(const Yt in Ct){const Gt=Ct[+Yt];if(!Gt||Gt.bitmap.width===0||Gt.bitmap.height===0)continue;const wt={x:0,y:0,w:Gt.bitmap.width+2,h:Gt.bitmap.height+2};p.push(wt),nn[Yt]={rect:wt,metrics:Gt.metrics}}}const{w:Qe,h:pt}=s.p(p),ft=new s.o({width:Qe||1,height:pt||1});for(const Et in fe){const Ct=fe[Et];for(const nn in Ct){const Yt=Ct[+nn];if(!Yt||Yt.bitmap.width===0||Yt.bitmap.height===0)continue;const Gt=xe[Et][nn].rect;s.o.copy(Yt.bitmap,ft,{x:0,y:0},{x:Gt.x+1,y:Gt.y+1},Yt.bitmap)}}this.image=ft,this.positions=xe}}s.ck("GlyphAtlas",f);class g{constructor(fe){this.tileID=new s.S(fe.tileID.overscaledZ,fe.tileID.wrap,fe.tileID.canonical.z,fe.tileID.canonical.x,fe.tileID.canonical.y),this.uid=fe.uid,this.zoom=fe.zoom,this.pixelRatio=fe.pixelRatio,this.tileSize=fe.tileSize,this.source=fe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=fe.showCollisionBoxes,this.collectResourceTiming=!!fe.collectResourceTiming,this.returnDependencies=!!fe.returnDependencies,this.promoteId=fe.promoteId,this.inFlightDependencies=[]}parse(fe,xe,p,Qe,pt){return s._(this,void 0,void 0,function*(){this.status="parsing",this.data=fe,this.collisionBoxArray=new s.a2;const ft=new s.cl(Object.keys(fe.layers).sort()),Et=new s.cm(this.tileID,this.promoteId);Et.bucketLayerIDs=[];const Ct={},nn={featureIndex:Et,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:p,subdivisionGranularity:pt},Yt=xe.familiesBySource[this.source];for(const hr in Yt){const zn=fe.layers[hr];if(!zn)continue;zn.version===1&&s.w(`Vector tile source "${this.source}" layer "${hr}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Pi=ft.encode(hr),po=[];for(let ri=0;ri<zn.length;ri++){const Xr=zn.feature(ri),ii=Et.getId(Xr,hr);po.push({feature:Xr,id:ii,index:ri,sourceLayerIndex:Pi})}for(const ri of Yt[hr]){const Xr=ri[0];Xr.source!==this.source&&s.w(`layer.source = ${Xr.source} does not equal this.source = ${this.source}`),Xr.minzoom&&this.zoom<Math.floor(Xr.minzoom)||Xr.maxzoom&&this.zoom>=Xr.maxzoom||Xr.visibility!=="none"&&(b(ri,this.zoom,p),(Ct[Xr.id]=Xr.createBucket({index:Et.bucketLayerIDs.length,layers:ri,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Pi,sourceID:this.source})).populate(po,nn,this.tileID.canonical),Et.bucketLayerIDs.push(ri.map(ii=>ii.id)))}}const Gt=s.bA(nn.glyphDependencies,hr=>Object.keys(hr).map(Number));this.inFlightDependencies.forEach(hr=>hr==null?void 0:hr.abort()),this.inFlightDependencies=[];let wt=Promise.resolve({});if(Object.keys(Gt).length){const hr=new AbortController;this.inFlightDependencies.push(hr),wt=Qe.sendAsync({type:"GG",data:{stacks:Gt,source:this.source,tileID:this.tileID,type:"glyphs"}},hr)}const Tn=Object.keys(nn.iconDependencies);let En=Promise.resolve({});if(Tn.length){const hr=new AbortController;this.inFlightDependencies.push(hr),En=Qe.sendAsync({type:"GI",data:{icons:Tn,source:this.source,tileID:this.tileID,type:"icons"}},hr)}const sr=Object.keys(nn.patternDependencies);let Pr=Promise.resolve({});if(sr.length){const hr=new AbortController;this.inFlightDependencies.push(hr),Pr=Qe.sendAsync({type:"GI",data:{icons:sr,source:this.source,tileID:this.tileID,type:"patterns"}},hr)}const[an,Wn,ir]=yield Promise.all([wt,En,Pr]),zr=new f(an),fr=new s.cn(Wn,ir);for(const hr in Ct){const zn=Ct[hr];zn instanceof s.a3?(b(zn.layers,this.zoom,p),s.co({bucket:zn,glyphMap:an,glyphPositions:zr.positions,imageMap:Wn,imagePositions:fr.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:nn.subdivisionGranularity})):zn.hasPattern&&(zn instanceof s.cp||zn instanceof s.cq||zn instanceof s.cr)&&(b(zn.layers,this.zoom,p),zn.addFeatures(nn,this.tileID.canonical,fr.patternPositions))}return this.status="done",{buckets:Object.values(Ct).filter(hr=>!hr.isEmpty()),featureIndex:Et,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:zr.image,imageAtlas:fr,glyphMap:this.returnDependencies?an:null,iconMap:this.returnDependencies?Wn:null,glyphPositions:this.returnDependencies?zr.positions:null}})}}function b(qe,fe,xe){const p=new s.z(fe);for(const Qe of qe)Qe.recalculate(p,xe)}class I{constructor(fe,xe,p){this.actor=fe,this.layerIndex=xe,this.availableImages=p,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(fe,xe){return s._(this,void 0,void 0,function*(){const p=yield s.l(fe.request,xe);try{return{vectorTile:new s.cs.VectorTile(new s.ct(p.data)),rawData:p.data,cacheControl:p.cacheControl,expires:p.expires}}catch(Qe){const pt=new Uint8Array(p.data);let ft=`Unable to parse the tile at ${fe.request.url}, `;throw ft+=pt[0]===31&&pt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Qe.message}`,new Error(ft)}})}loadTile(fe){return s._(this,void 0,void 0,function*(){const xe=fe.uid,p=!!(fe&&fe.request&&fe.request.collectResourceTiming)&&new s.cu(fe.request),Qe=new g(fe);this.loading[xe]=Qe;const pt=new AbortController;Qe.abort=pt;try{const ft=yield this.loadVectorTile(fe,pt);if(delete this.loading[xe],!ft)return null;const Et=ft.rawData,Ct={};ft.expires&&(Ct.expires=ft.expires),ft.cacheControl&&(Ct.cacheControl=ft.cacheControl);const nn={};if(p){const Gt=p.finish();Gt&&(nn.resourceTiming=JSON.parse(JSON.stringify(Gt)))}Qe.vectorTile=ft.vectorTile;const Yt=Qe.parse(ft.vectorTile,this.layerIndex,this.availableImages,this.actor,fe.subdivisionGranularity);this.loaded[xe]=Qe,this.fetching[xe]={rawTileData:Et,cacheControl:Ct,resourceTiming:nn};try{const Gt=yield Yt;return s.e({rawTileData:Et.slice(0)},Gt,Ct,nn)}finally{delete this.fetching[xe]}}catch(ft){throw delete this.loading[xe],Qe.status="done",this.loaded[xe]=Qe,ft}})}reloadTile(fe){return s._(this,void 0,void 0,function*(){const xe=fe.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 p=this.loaded[xe];if(p.showCollisionBoxes=fe.showCollisionBoxes,p.status==="parsing"){const Qe=yield p.parse(p.vectorTile,this.layerIndex,this.availableImages,this.actor,fe.subdivisionGranularity);let pt;if(this.fetching[xe]){const{rawTileData:ft,cacheControl:Et,resourceTiming:Ct}=this.fetching[xe];delete this.fetching[xe],pt=s.e({rawTileData:ft.slice(0)},Qe,Et,Ct)}else pt=Qe;return pt}if(p.status==="done"&&p.vectorTile)return p.parse(p.vectorTile,this.layerIndex,this.availableImages,this.actor,fe.subdivisionGranularity)})}abortTile(fe){return s._(this,void 0,void 0,function*(){const xe=this.loading,p=fe.uid;xe&&xe[p]&&xe[p].abort&&(xe[p].abort.abort(),delete xe[p])})}removeTile(fe){return s._(this,void 0,void 0,function*(){this.loaded&&this.loaded[fe.uid]&&delete this.loaded[fe.uid]})}}class S{constructor(){this.loaded={}}loadTile(fe){return s._(this,void 0,void 0,function*(){const{uid:xe,encoding:p,rawImageData:Qe,redFactor:pt,greenFactor:ft,blueFactor:Et,baseShift:Ct}=fe,nn=Qe.width+2,Yt=Qe.height+2,Gt=s.b(Qe)?new s.R({width:nn,height:Yt},yield s.cv(Qe,-1,-1,nn,Yt)):Qe,wt=new s.cw(xe,Gt,p,pt,ft,Et,Ct);return this.loaded=this.loaded||{},this.loaded[xe]=wt,wt})}removeTile(fe){const xe=this.loaded,p=fe.uid;xe&&xe[p]&&delete xe[p]}}var B,P,U=function(){if(P)return B;function qe(xe,p){if(xe.length!==0){fe(xe[0],p);for(var Qe=1;Qe<xe.length;Qe++)fe(xe[Qe],!p)}}function fe(xe,p){for(var Qe=0,pt=0,ft=0,Et=xe.length,Ct=Et-1;ft<Et;Ct=ft++){var nn=(xe[ft][0]-xe[Ct][0])*(xe[Ct][1]+xe[ft][1]),Yt=Qe+nn;pt+=Math.abs(Qe)>=Math.abs(nn)?Qe-Yt+nn:nn-Yt+Qe,Qe=Yt}Qe+pt>=0!=!!p&&xe.reverse()}return P=1,B=function xe(p,Qe){var pt,ft=p&&p.type;if(ft==="FeatureCollection")for(pt=0;pt<p.features.length;pt++)xe(p.features[pt],Qe);else if(ft==="GeometryCollection")for(pt=0;pt<p.geometries.length;pt++)xe(p.geometries[pt],Qe);else if(ft==="Feature")xe(p.geometry,Qe);else if(ft==="Polygon")qe(p.coordinates,Qe);else if(ft==="MultiPolygon")for(pt=0;pt<p.coordinates.length;pt++)qe(p.coordinates[pt],Qe);return p}}(),j=s.cx(U);const q=s.cs.VectorTileFeature.prototype.toGeoJSON;class W{constructor(fe){this._feature=fe,this.extent=s.X,this.type=fe.type,this.properties=fe.tags,"id"in fe&&!isNaN(fe.id)&&(this.id=parseInt(fe.id,10))}loadGeometry(){if(this._feature.type===1){const fe=[];for(const xe of this._feature.geometry)fe.push([new s.P(xe[0],xe[1])]);return fe}{const fe=[];for(const xe of this._feature.geometry){const p=[];for(const Qe of xe)p.push(new s.P(Qe[0],Qe[1]));fe.push(p)}return fe}}toGeoJSON(fe,xe,p){return q.call(this,fe,xe,p)}}class ee{constructor(fe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=s.X,this.length=fe.length,this._features=fe}feature(fe){return new W(this._features[fe])}}var J,$,X,G={exports:{}},ae=function(){if(X)return G.exports;X=1;var qe=s.cA(),fe=function(){if($)return J;$=1;var Yt=s.cy(),Gt=s.cz().VectorTileFeature;function wt(En,sr){this.options=sr||{},this.features=En,this.length=En.length}function Tn(En,sr){this.id=typeof En.id=="number"?En.id:void 0,this.type=En.type,this.rawGeometry=En.type===1?[En.geometry]:En.geometry,this.properties=En.tags,this.extent=sr||4096}return J=wt,wt.prototype.feature=function(En){return new Tn(this.features[En],this.options.extent)},Tn.prototype.loadGeometry=function(){var En=this.rawGeometry;this.geometry=[];for(var sr=0;sr<En.length;sr++){for(var Pr=En[sr],an=[],Wn=0;Wn<Pr.length;Wn++)an.push(new Yt(Pr[Wn][0],Pr[Wn][1]));this.geometry.push(an)}return this.geometry},Tn.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var En=this.geometry,sr=1/0,Pr=-1/0,an=1/0,Wn=-1/0,ir=0;ir<En.length;ir++)for(var zr=En[ir],fr=0;fr<zr.length;fr++){var hr=zr[fr];sr=Math.min(sr,hr.x),Pr=Math.max(Pr,hr.x),an=Math.min(an,hr.y),Wn=Math.max(Wn,hr.y)}return[sr,an,Pr,Wn]},Tn.prototype.toGeoJSON=Gt.prototype.toGeoJSON,J}();function xe(Yt){var Gt=new qe;return function(wt,Tn){for(var En in wt.layers)Tn.writeMessage(3,p,wt.layers[En])}(Yt,Gt),Gt.finish()}function p(Yt,Gt){var wt;Gt.writeVarintField(15,Yt.version||1),Gt.writeStringField(1,Yt.name||""),Gt.writeVarintField(5,Yt.extent||4096);var Tn={keys:[],values:[],keycache:{},valuecache:{}};for(wt=0;wt<Yt.length;wt++)Tn.feature=Yt.feature(wt),Gt.writeMessage(2,Qe,Tn);var En=Tn.keys;for(wt=0;wt<En.length;wt++)Gt.writeStringField(3,En[wt]);var sr=Tn.values;for(wt=0;wt<sr.length;wt++)Gt.writeMessage(4,nn,sr[wt])}function Qe(Yt,Gt){var wt=Yt.feature;wt.id!==void 0&&Gt.writeVarintField(1,wt.id),Gt.writeMessage(2,pt,Yt),Gt.writeVarintField(3,wt.type),Gt.writeMessage(4,Ct,wt)}function pt(Yt,Gt){var wt=Yt.feature,Tn=Yt.keys,En=Yt.values,sr=Yt.keycache,Pr=Yt.valuecache;for(var an in wt.properties){var Wn=wt.properties[an],ir=sr[an];if(Wn!==null){ir===void 0&&(Tn.push(an),sr[an]=ir=Tn.length-1),Gt.writeVarint(ir);var zr=typeof Wn;zr!=="string"&&zr!=="boolean"&&zr!=="number"&&(Wn=JSON.stringify(Wn));var fr=zr+":"+Wn,hr=Pr[fr];hr===void 0&&(En.push(Wn),Pr[fr]=hr=En.length-1),Gt.writeVarint(hr)}}}function ft(Yt,Gt){return(Gt<<3)+(7&Yt)}function Et(Yt){return Yt<<1^Yt>>31}function Ct(Yt,Gt){for(var wt=Yt.loadGeometry(),Tn=Yt.type,En=0,sr=0,Pr=wt.length,an=0;an<Pr;an++){var Wn=wt[an],ir=1;Tn===1&&(ir=Wn.length),Gt.writeVarint(ft(1,ir));for(var zr=Tn===3?Wn.length-1:Wn.length,fr=0;fr<zr;fr++){fr===1&&Tn!==1&&Gt.writeVarint(ft(2,zr-1));var hr=Wn[fr].x-En,zn=Wn[fr].y-sr;Gt.writeVarint(Et(hr)),Gt.writeVarint(Et(zn)),En+=hr,sr+=zn}Tn===3&&Gt.writeVarint(ft(7,1))}}function nn(Yt,Gt){var wt=typeof Yt;wt==="string"?Gt.writeStringField(1,Yt):wt==="boolean"?Gt.writeBooleanField(7,Yt):wt==="number"&&(Yt%1!=0?Gt.writeDoubleField(3,Yt):Yt<0?Gt.writeSVarintField(6,Yt):Gt.writeVarintField(5,Yt))}return G.exports=xe,G.exports.fromVectorTileJs=xe,G.exports.fromGeojsonVt=function(Yt,Gt){Gt=Gt||{};var wt={};for(var Tn in Yt)wt[Tn]=new fe(Yt[Tn].features,Gt),wt[Tn].name=Tn,wt[Tn].version=Gt.version,wt[Tn].extent=Gt.extent;return xe({layers:wt})},G.exports.GeoJSONWrapper=fe,G.exports}(),ge=s.cx(ae);const he={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:qe=>qe},Ie=Math.fround||(re=new Float32Array(1),qe=>(re[0]=+qe,re[0]));var re;const oe=3,Se=5,ye=6;class nt{constructor(fe){this.options=Object.assign(Object.create(he),fe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(fe){const{log:xe,minZoom:p,maxZoom:Qe}=this.options;xe&&console.time("total time");const pt=`prepare ${fe.length} points`;xe&&console.time(pt),this.points=fe;const ft=[];for(let Ct=0;Ct<fe.length;Ct++){const nn=fe[Ct];if(!nn.geometry)continue;const[Yt,Gt]=nn.geometry.coordinates,wt=Ie(et(Yt)),Tn=Ie(Ue(Gt));ft.push(wt,Tn,1/0,Ct,-1,1),this.options.reduce&&ft.push(0)}let Et=this.trees[Qe+1]=this._createTree(ft);xe&&console.timeEnd(pt);for(let Ct=Qe;Ct>=p;Ct--){const nn=+Date.now();Et=this.trees[Ct]=this._createTree(this._cluster(Et,Ct)),xe&&console.log("z%d: %d clusters in %dms",Ct,Et.numItems,+Date.now()-nn)}return xe&&console.timeEnd("total time"),this}getClusters(fe,xe){let p=((fe[0]+180)%360+360)%360-180;const Qe=Math.max(-90,Math.min(90,fe[1]));let pt=fe[2]===180?180:((fe[2]+180)%360+360)%360-180;const ft=Math.max(-90,Math.min(90,fe[3]));if(fe[2]-fe[0]>=360)p=-180,pt=180;else if(p>pt){const Gt=this.getClusters([p,Qe,180,ft],xe),wt=this.getClusters([-180,Qe,pt,ft],xe);return Gt.concat(wt)}const Et=this.trees[this._limitZoom(xe)],Ct=Et.range(et(p),Ue(ft),et(pt),Ue(Qe)),nn=Et.data,Yt=[];for(const Gt of Ct){const wt=this.stride*Gt;Yt.push(nn[wt+Se]>1?Ne(nn,wt,this.clusterProps):this.points[nn[wt+oe]])}return Yt}getChildren(fe){const xe=this._getOriginId(fe),p=this._getOriginZoom(fe),Qe="No cluster with the specified id.",pt=this.trees[p];if(!pt)throw new Error(Qe);const ft=pt.data;if(xe*this.stride>=ft.length)throw new Error(Qe);const Et=this.options.radius/(this.options.extent*Math.pow(2,p-1)),Ct=pt.within(ft[xe*this.stride],ft[xe*this.stride+1],Et),nn=[];for(const Yt of Ct){const Gt=Yt*this.stride;ft[Gt+4]===fe&&nn.push(ft[Gt+Se]>1?Ne(ft,Gt,this.clusterProps):this.points[ft[Gt+oe]])}if(nn.length===0)throw new Error(Qe);return nn}getLeaves(fe,xe,p){const Qe=[];return this._appendLeaves(Qe,fe,xe=xe||10,p=p||0,0),Qe}getTile(fe,xe,p){const Qe=this.trees[this._limitZoom(fe)],pt=Math.pow(2,fe),{extent:ft,radius:Et}=this.options,Ct=Et/ft,nn=(p-Ct)/pt,Yt=(p+1+Ct)/pt,Gt={features:[]};return this._addTileFeatures(Qe.range((xe-Ct)/pt,nn,(xe+1+Ct)/pt,Yt),Qe.data,xe,p,pt,Gt),xe===0&&this._addTileFeatures(Qe.range(1-Ct/pt,nn,1,Yt),Qe.data,pt,p,pt,Gt),xe===pt-1&&this._addTileFeatures(Qe.range(0,nn,Ct/pt,Yt),Qe.data,-1,p,pt,Gt),Gt.features.length?Gt:null}getClusterExpansionZoom(fe){let xe=this._getOriginZoom(fe)-1;for(;xe<=this.options.maxZoom;){const p=this.getChildren(fe);if(xe++,p.length!==1)break;fe=p[0].properties.cluster_id}return xe}_appendLeaves(fe,xe,p,Qe,pt){const ft=this.getChildren(xe);for(const Et of ft){const Ct=Et.properties;if(Ct&&Ct.cluster?pt+Ct.point_count<=Qe?pt+=Ct.point_count:pt=this._appendLeaves(fe,Ct.cluster_id,p,Qe,pt):pt<Qe?pt++:fe.push(Et),fe.length===p)break}return pt}_createTree(fe){const xe=new s.az(fe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let p=0;p<fe.length;p+=this.stride)xe.add(fe[p],fe[p+1]);return xe.finish(),xe.data=fe,xe}_addTileFeatures(fe,xe,p,Qe,pt,ft){for(const Et of fe){const Ct=Et*this.stride,nn=xe[Ct+Se]>1;let Yt,Gt,wt;if(nn)Yt=je(xe,Ct,this.clusterProps),Gt=xe[Ct],wt=xe[Ct+1];else{const sr=this.points[xe[Ct+oe]];Yt=sr.properties;const[Pr,an]=sr.geometry.coordinates;Gt=et(Pr),wt=Ue(an)}const Tn={type:1,geometry:[[Math.round(this.options.extent*(Gt*pt-p)),Math.round(this.options.extent*(wt*pt-Qe))]],tags:Yt};let En;En=nn||this.options.generateId?xe[Ct+oe]:this.points[xe[Ct+oe]].id,En!==void 0&&(Tn.id=En),ft.features.push(Tn)}}_limitZoom(fe){return Math.max(this.options.minZoom,Math.min(Math.floor(+fe),this.options.maxZoom+1))}_cluster(fe,xe){const{radius:p,extent:Qe,reduce:pt,minPoints:ft}=this.options,Et=p/(Qe*Math.pow(2,xe)),Ct=fe.data,nn=[],Yt=this.stride;for(let Gt=0;Gt<Ct.length;Gt+=Yt){if(Ct[Gt+2]<=xe)continue;Ct[Gt+2]=xe;const wt=Ct[Gt],Tn=Ct[Gt+1],En=fe.within(Ct[Gt],Ct[Gt+1],Et),sr=Ct[Gt+Se];let Pr=sr;for(const an of En){const Wn=an*Yt;Ct[Wn+2]>xe&&(Pr+=Ct[Wn+Se])}if(Pr>sr&&Pr>=ft){let an,Wn=wt*sr,ir=Tn*sr,zr=-1;const fr=((Gt/Yt|0)<<5)+(xe+1)+this.points.length;for(const hr of En){const zn=hr*Yt;if(Ct[zn+2]<=xe)continue;Ct[zn+2]=xe;const Pi=Ct[zn+Se];Wn+=Ct[zn]*Pi,ir+=Ct[zn+1]*Pi,Ct[zn+4]=fr,pt&&(an||(an=this._map(Ct,Gt,!0),zr=this.clusterProps.length,this.clusterProps.push(an)),pt(an,this._map(Ct,zn)))}Ct[Gt+4]=fr,nn.push(Wn/Pr,ir/Pr,1/0,fr,-1,Pr),pt&&nn.push(zr)}else{for(let an=0;an<Yt;an++)nn.push(Ct[Gt+an]);if(Pr>1)for(const an of En){const Wn=an*Yt;if(!(Ct[Wn+2]<=xe)){Ct[Wn+2]=xe;for(let ir=0;ir<Yt;ir++)nn.push(Ct[Wn+ir])}}}}return nn}_getOriginId(fe){return fe-this.points.length>>5}_getOriginZoom(fe){return(fe-this.points.length)%32}_map(fe,xe,p){if(fe[xe+Se]>1){const ft=this.clusterProps[fe[xe+ye]];return p?Object.assign({},ft):ft}const Qe=this.points[fe[xe+oe]].properties,pt=this.options.map(Qe);return p&&pt===Qe?Object.assign({},pt):pt}}function Ne(qe,fe,xe){return{type:"Feature",id:qe[fe+oe],properties:je(qe,fe,xe),geometry:{type:"Point",coordinates:[(p=qe[fe],360*(p-.5)),ke(qe[fe+1])]}};var p}function je(qe,fe,xe){const p=qe[fe+Se],Qe=p>=1e4?`${Math.round(p/1e3)}k`:p>=1e3?Math.round(p/100)/10+"k":p,pt=qe[fe+ye],ft=pt===-1?{}:Object.assign({},xe[pt]);return Object.assign(ft,{cluster:!0,cluster_id:qe[fe+oe],point_count:p,point_count_abbreviated:Qe})}function et(qe){return qe/360+.5}function Ue(qe){const fe=Math.sin(qe*Math.PI/180),xe=.5-.25*Math.log((1+fe)/(1-fe))/Math.PI;return xe<0?0:xe>1?1:xe}function ke(qe){const fe=(180-360*qe)*Math.PI/180;return 360*Math.atan(Math.exp(fe))/Math.PI-90}function We(qe,fe,xe,p){let Qe=p;const pt=fe+(xe-fe>>1);let ft,Et=xe-fe;const Ct=qe[fe],nn=qe[fe+1],Yt=qe[xe],Gt=qe[xe+1];for(let wt=fe+3;wt<xe;wt+=3){const Tn=vt(qe[wt],qe[wt+1],Ct,nn,Yt,Gt);if(Tn>Qe)ft=wt,Qe=Tn;else if(Tn===Qe){const En=Math.abs(wt-pt);En<Et&&(ft=wt,Et=En)}}Qe>p&&(ft-fe>3&&We(qe,fe,ft,p),qe[ft+2]=Qe,xe-ft>3&&We(qe,ft,xe,p))}function vt(qe,fe,xe,p,Qe,pt){let ft=Qe-xe,Et=pt-p;if(ft!==0||Et!==0){const Ct=((qe-xe)*ft+(fe-p)*Et)/(ft*ft+Et*Et);Ct>1?(xe=Qe,p=pt):Ct>0&&(xe+=ft*Ct,p+=Et*Ct)}return ft=qe-xe,Et=fe-p,ft*ft+Et*Et}function Pt(qe,fe,xe,p){const Qe={id:qe??null,type:fe,geometry:xe,tags:p,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(fe==="Point"||fe==="MultiPoint"||fe==="LineString")ut(Qe,xe);else if(fe==="Polygon")ut(Qe,xe[0]);else if(fe==="MultiLineString")for(const pt of xe)ut(Qe,pt);else if(fe==="MultiPolygon")for(const pt of xe)ut(Qe,pt[0]);return Qe}function ut(qe,fe){for(let xe=0;xe<fe.length;xe+=3)qe.minX=Math.min(qe.minX,fe[xe]),qe.minY=Math.min(qe.minY,fe[xe+1]),qe.maxX=Math.max(qe.maxX,fe[xe]),qe.maxY=Math.max(qe.maxY,fe[xe+1])}function jt(qe,fe,xe,p){if(!fe.geometry)return;const Qe=fe.geometry.coordinates;if(Qe&&Qe.length===0)return;const pt=fe.geometry.type,ft=Math.pow(xe.tolerance/((1<<xe.maxZoom)*xe.extent),2);let Et=[],Ct=fe.id;if(xe.promoteId?Ct=fe.properties[xe.promoteId]:xe.generateId&&(Ct=p||0),pt==="Point")Rt(Qe,Et);else if(pt==="MultiPoint")for(const nn of Qe)Rt(nn,Et);else if(pt==="LineString")Ke(Qe,Et,ft,!1);else if(pt==="MultiLineString"){if(xe.lineMetrics){for(const nn of Qe)Et=[],Ke(nn,Et,ft,!1),qe.push(Pt(Ct,"LineString",Et,fe.properties));return}we(Qe,Et,ft,!1)}else if(pt==="Polygon")we(Qe,Et,ft,!0);else{if(pt!=="MultiPolygon"){if(pt==="GeometryCollection"){for(const nn of fe.geometry.geometries)jt(qe,{id:Ct,geometry:nn,properties:fe.properties},xe,p);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const nn of Qe){const Yt=[];we(nn,Yt,ft,!0),Et.push(Yt)}}qe.push(Pt(Ct,pt,Et,fe.properties))}function Rt(qe,fe){fe.push(Fe(qe[0]),tt(qe[1]),0)}function Ke(qe,fe,xe,p){let Qe,pt,ft=0;for(let Ct=0;Ct<qe.length;Ct++){const nn=Fe(qe[Ct][0]),Yt=tt(qe[Ct][1]);fe.push(nn,Yt,0),Ct>0&&(ft+=p?(Qe*Yt-nn*pt)/2:Math.sqrt(Math.pow(nn-Qe,2)+Math.pow(Yt-pt,2))),Qe=nn,pt=Yt}const Et=fe.length-3;fe[2]=1,We(fe,0,Et,xe),fe[Et+2]=1,fe.size=Math.abs(ft),fe.start=0,fe.end=fe.size}function we(qe,fe,xe,p){for(let Qe=0;Qe<qe.length;Qe++){const pt=[];Ke(qe[Qe],pt,xe,p),fe.push(pt)}}function Fe(qe){return qe/360+.5}function tt(qe){const fe=Math.sin(qe*Math.PI/180),xe=.5-.25*Math.log((1+fe)/(1-fe))/Math.PI;return xe<0?0:xe>1?1:xe}function mt(qe,fe,xe,p,Qe,pt,ft,Et){if(p/=fe,pt>=(xe/=fe)&&ft<p)return qe;if(ft<xe||pt>=p)return null;const Ct=[];for(const nn of qe){const Yt=nn.geometry;let Gt=nn.type;const wt=Qe===0?nn.minX:nn.minY,Tn=Qe===0?nn.maxX:nn.maxY;if(wt>=xe&&Tn<p){Ct.push(nn);continue}if(Tn<xe||wt>=p)continue;let En=[];if(Gt==="Point"||Gt==="MultiPoint")bt(Yt,En,xe,p,Qe);else if(Gt==="LineString")Lt(Yt,En,xe,p,Qe,!1,Et.lineMetrics);else if(Gt==="MultiLineString")rn(Yt,En,xe,p,Qe,!1);else if(Gt==="Polygon")rn(Yt,En,xe,p,Qe,!0);else if(Gt==="MultiPolygon")for(const sr of Yt){const Pr=[];rn(sr,Pr,xe,p,Qe,!0),Pr.length&&En.push(Pr)}if(En.length){if(Et.lineMetrics&&Gt==="LineString"){for(const sr of En)Ct.push(Pt(nn.id,Gt,sr,nn.tags));continue}Gt!=="LineString"&&Gt!=="MultiLineString"||(En.length===1?(Gt="LineString",En=En[0]):Gt="MultiLineString"),Gt!=="Point"&&Gt!=="MultiPoint"||(Gt=En.length===3?"Point":"MultiPoint"),Ct.push(Pt(nn.id,Gt,En,nn.tags))}}return Ct.length?Ct:null}function bt(qe,fe,xe,p,Qe){for(let pt=0;pt<qe.length;pt+=3){const ft=qe[pt+Qe];ft>=xe&&ft<=p&&Sn(fe,qe[pt],qe[pt+1],qe[pt+2])}}function Lt(qe,fe,xe,p,Qe,pt,ft){let Et=Vt(qe);const Ct=Qe===0?Ar:Bn;let nn,Yt,Gt=qe.start;for(let Pr=0;Pr<qe.length-3;Pr+=3){const an=qe[Pr],Wn=qe[Pr+1],ir=qe[Pr+2],zr=qe[Pr+3],fr=qe[Pr+4],hr=Qe===0?an:Wn,zn=Qe===0?zr:fr;let Pi=!1;ft&&(nn=Math.sqrt(Math.pow(an-zr,2)+Math.pow(Wn-fr,2))),hr<xe?zn>xe&&(Yt=Ct(Et,an,Wn,zr,fr,xe),ft&&(Et.start=Gt+nn*Yt)):hr>p?zn<p&&(Yt=Ct(Et,an,Wn,zr,fr,p),ft&&(Et.start=Gt+nn*Yt)):Sn(Et,an,Wn,ir),zn<xe&&hr>=xe&&(Yt=Ct(Et,an,Wn,zr,fr,xe),Pi=!0),zn>p&&hr<=p&&(Yt=Ct(Et,an,Wn,zr,fr,p),Pi=!0),!pt&&Pi&&(ft&&(Et.end=Gt+nn*Yt),fe.push(Et),Et=Vt(qe)),ft&&(Gt+=nn)}let wt=qe.length-3;const Tn=qe[wt],En=qe[wt+1],sr=Qe===0?Tn:En;sr>=xe&&sr<=p&&Sn(Et,Tn,En,qe[wt+2]),wt=Et.length-3,pt&&wt>=3&&(Et[wt]!==Et[0]||Et[wt+1]!==Et[1])&&Sn(Et,Et[0],Et[1],Et[2]),Et.length&&fe.push(Et)}function Vt(qe){const fe=[];return fe.size=qe.size,fe.start=qe.start,fe.end=qe.end,fe}function rn(qe,fe,xe,p,Qe,pt){for(const ft of qe)Lt(ft,fe,xe,p,Qe,pt,!1)}function Sn(qe,fe,xe,p){qe.push(fe,xe,p)}function Ar(qe,fe,xe,p,Qe,pt){const ft=(pt-fe)/(p-fe);return Sn(qe,pt,xe+(Qe-xe)*ft,1),ft}function Bn(qe,fe,xe,p,Qe,pt){const ft=(pt-xe)/(Qe-xe);return Sn(qe,fe+(p-fe)*ft,pt,1),ft}function ar(qe,fe){const xe=[];for(let p=0;p<qe.length;p++){const Qe=qe[p],pt=Qe.type;let ft;if(pt==="Point"||pt==="MultiPoint"||pt==="LineString")ft=Cr(Qe.geometry,fe);else if(pt==="MultiLineString"||pt==="Polygon"){ft=[];for(const Et of Qe.geometry)ft.push(Cr(Et,fe))}else if(pt==="MultiPolygon"){ft=[];for(const Et of Qe.geometry){const Ct=[];for(const nn of Et)Ct.push(Cr(nn,fe));ft.push(Ct)}}xe.push(Pt(Qe.id,pt,ft,Qe.tags))}return xe}function Cr(qe,fe){const xe=[];xe.size=qe.size,qe.start!==void 0&&(xe.start=qe.start,xe.end=qe.end);for(let p=0;p<qe.length;p+=3)xe.push(qe[p]+fe,qe[p+1],qe[p+2]);return xe}function br(qe,fe){if(qe.transformed)return qe;const xe=1<<qe.z,p=qe.x,Qe=qe.y;for(const pt of qe.features){const ft=pt.geometry,Et=pt.type;if(pt.geometry=[],Et===1)for(let Ct=0;Ct<ft.length;Ct+=2)pt.geometry.push(_r(ft[Ct],ft[Ct+1],fe,xe,p,Qe));else for(let Ct=0;Ct<ft.length;Ct++){const nn=[];for(let Yt=0;Yt<ft[Ct].length;Yt+=2)nn.push(_r(ft[Ct][Yt],ft[Ct][Yt+1],fe,xe,p,Qe));pt.geometry.push(nn)}}return qe.transformed=!0,qe}function _r(qe,fe,xe,p,Qe,pt){return[Math.round(xe*(qe*p-Qe)),Math.round(xe*(fe*p-pt))]}function Jr(qe,fe,xe,p,Qe){const pt=fe===Qe.maxZoom?0:Qe.tolerance/((1<<fe)*Qe.extent),ft={features:[],numPoints:0,numSimplified:0,numFeatures:qe.length,source:null,x:xe,y:p,z:fe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Et of qe)wr(ft,Et,pt,Qe);return ft}function wr(qe,fe,xe,p){const Qe=fe.geometry,pt=fe.type,ft=[];if(qe.minX=Math.min(qe.minX,fe.minX),qe.minY=Math.min(qe.minY,fe.minY),qe.maxX=Math.max(qe.maxX,fe.maxX),qe.maxY=Math.max(qe.maxY,fe.maxY),pt==="Point"||pt==="MultiPoint")for(let Et=0;Et<Qe.length;Et+=3)ft.push(Qe[Et],Qe[Et+1]),qe.numPoints++,qe.numSimplified++;else if(pt==="LineString")hi(ft,Qe,qe,xe,!1,!1);else if(pt==="MultiLineString"||pt==="Polygon")for(let Et=0;Et<Qe.length;Et++)hi(ft,Qe[Et],qe,xe,pt==="Polygon",Et===0);else if(pt==="MultiPolygon")for(let Et=0;Et<Qe.length;Et++){const Ct=Qe[Et];for(let nn=0;nn<Ct.length;nn++)hi(ft,Ct[nn],qe,xe,!0,nn===0)}if(ft.length){let Et=fe.tags||null;if(pt==="LineString"&&p.lineMetrics){Et={};for(const nn in fe.tags)Et[nn]=fe.tags[nn];Et.mapbox_clip_start=Qe.start/Qe.size,Et.mapbox_clip_end=Qe.end/Qe.size}const Ct={geometry:ft,type:pt==="Polygon"||pt==="MultiPolygon"?3:pt==="LineString"||pt==="MultiLineString"?2:1,tags:Et};fe.id!==null&&(Ct.id=fe.id),qe.features.push(Ct)}}function hi(qe,fe,xe,p,Qe,pt){const ft=p*p;if(p>0&&fe.size<(Qe?ft:p))return void(xe.numPoints+=fe.length/3);const Et=[];for(let Ct=0;Ct<fe.length;Ct+=3)(p===0||fe[Ct+2]>ft)&&(xe.numSimplified++,Et.push(fe[Ct],fe[Ct+1])),xe.numPoints++;Qe&&function(Ct,nn){let Yt=0;for(let Gt=0,wt=Ct.length,Tn=wt-2;Gt<wt;Tn=Gt,Gt+=2)Yt+=(Ct[Gt]-Ct[Tn])*(Ct[Gt+1]+Ct[Tn+1]);if(Yt>0===nn)for(let Gt=0,wt=Ct.length;Gt<wt/2;Gt+=2){const Tn=Ct[Gt],En=Ct[Gt+1];Ct[Gt]=Ct[wt-2-Gt],Ct[Gt+1]=Ct[wt-1-Gt],Ct[wt-2-Gt]=Tn,Ct[wt-1-Gt]=En}}(Et,pt),qe.push(Et)}const Ye={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class de{constructor(fe,xe){const p=(xe=this.options=function(pt,ft){for(const Et in ft)pt[Et]=ft[Et];return pt}(Object.create(Ye),xe)).debug;if(p&&console.time("preprocess data"),xe.maxZoom<0||xe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(xe.promoteId&&xe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Qe=function(pt,ft){const Et=[];if(pt.type==="FeatureCollection")for(let Ct=0;Ct<pt.features.length;Ct++)jt(Et,pt.features[Ct],ft,Ct);else jt(Et,pt.type==="Feature"?pt:{geometry:pt},ft);return Et}(fe,xe);this.tiles={},this.tileCoords=[],p&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",xe.indexMaxZoom,xe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Qe=function(pt,ft){const Et=ft.buffer/ft.extent;let Ct=pt;const nn=mt(pt,1,-1-Et,Et,0,-1,2,ft),Yt=mt(pt,1,1-Et,2+Et,0,-1,2,ft);return(nn||Yt)&&(Ct=mt(pt,1,-Et,1+Et,0,-1,2,ft)||[],nn&&(Ct=ar(nn,1).concat(Ct)),Yt&&(Ct=Ct.concat(ar(Yt,-1)))),Ct}(Qe,xe),Qe.length&&this.splitTile(Qe,0,0,0),p&&(Qe.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(fe,xe,p,Qe,pt,ft,Et){const Ct=[fe,xe,p,Qe],nn=this.options,Yt=nn.debug;for(;Ct.length;){Qe=Ct.pop(),p=Ct.pop(),xe=Ct.pop(),fe=Ct.pop();const Gt=1<<xe,wt=pe(xe,p,Qe);let Tn=this.tiles[wt];if(!Tn&&(Yt>1&&console.time("creation"),Tn=this.tiles[wt]=Jr(fe,xe,p,Qe,nn),this.tileCoords.push({z:xe,x:p,y:Qe}),Yt)){Yt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",xe,p,Qe,Tn.numFeatures,Tn.numPoints,Tn.numSimplified),console.timeEnd("creation"));const Pi=`z${xe}`;this.stats[Pi]=(this.stats[Pi]||0)+1,this.total++}if(Tn.source=fe,pt==null){if(xe===nn.indexMaxZoom||Tn.numPoints<=nn.indexMaxPoints)continue}else{if(xe===nn.maxZoom||xe===pt)continue;if(pt!=null){const Pi=pt-xe;if(p!==ft>>Pi||Qe!==Et>>Pi)continue}}if(Tn.source=null,fe.length===0)continue;Yt>1&&console.time("clipping");const En=.5*nn.buffer/nn.extent,sr=.5-En,Pr=.5+En,an=1+En;let Wn=null,ir=null,zr=null,fr=null,hr=mt(fe,Gt,p-En,p+Pr,0,Tn.minX,Tn.maxX,nn),zn=mt(fe,Gt,p+sr,p+an,0,Tn.minX,Tn.maxX,nn);fe=null,hr&&(Wn=mt(hr,Gt,Qe-En,Qe+Pr,1,Tn.minY,Tn.maxY,nn),ir=mt(hr,Gt,Qe+sr,Qe+an,1,Tn.minY,Tn.maxY,nn),hr=null),zn&&(zr=mt(zn,Gt,Qe-En,Qe+Pr,1,Tn.minY,Tn.maxY,nn),fr=mt(zn,Gt,Qe+sr,Qe+an,1,Tn.minY,Tn.maxY,nn),zn=null),Yt>1&&console.timeEnd("clipping"),Ct.push(Wn||[],xe+1,2*p,2*Qe),Ct.push(ir||[],xe+1,2*p,2*Qe+1),Ct.push(zr||[],xe+1,2*p+1,2*Qe),Ct.push(fr||[],xe+1,2*p+1,2*Qe+1)}}getTile(fe,xe,p){fe=+fe,xe=+xe,p=+p;const Qe=this.options,{extent:pt,debug:ft}=Qe;if(fe<0||fe>24)return null;const Et=1<<fe,Ct=pe(fe,xe=xe+Et&Et-1,p);if(this.tiles[Ct])return br(this.tiles[Ct],pt);ft>1&&console.log("drilling down to z%d-%d-%d",fe,xe,p);let nn,Yt=fe,Gt=xe,wt=p;for(;!nn&&Yt>0;)Yt--,Gt>>=1,wt>>=1,nn=this.tiles[pe(Yt,Gt,wt)];return nn&&nn.source?(ft>1&&(console.log("found parent tile z%d-%d-%d",Yt,Gt,wt),console.time("drilling down")),this.splitTile(nn.source,Yt,Gt,wt,fe,xe,p),ft>1&&console.timeEnd("drilling down"),this.tiles[Ct]?br(this.tiles[Ct],pt):null):null}}function pe(qe,fe,xe){return 32*((1<<qe)*xe+fe)+qe}function Je(qe,fe){return fe?qe.properties[fe]:qe.id}function kt(qe,fe){if(qe==null)return!0;if(qe.type==="Feature")return Je(qe,fe)!=null;if(qe.type==="FeatureCollection"){const xe=new Set;for(const p of qe.features){const Qe=Je(p,fe);if(Qe==null||xe.has(Qe))return!1;xe.add(Qe)}return!0}return!1}function Xt(qe,fe){const xe=new Map;if(qe!=null)if(qe.type==="Feature")xe.set(Je(qe,fe),qe);else for(const p of qe.features)xe.set(Je(p,fe),p);return xe}class it extends I{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(fe,xe){return s._(this,void 0,void 0,function*(){const p=fe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const Qe=this._geoJSONIndex.getTile(p.z,p.x,p.y);if(!Qe)return null;const pt=new ee(Qe.features);let ft=ge(pt);return ft.byteOffset===0&&ft.byteLength===ft.buffer.byteLength||(ft=new Uint8Array(ft)),{vectorTile:pt,rawData:ft.buffer}})}loadData(fe){return s._(this,void 0,void 0,function*(){var xe;(xe=this._pendingRequest)===null||xe===void 0||xe.abort();const p=!!(fe&&fe.request&&fe.request.collectResourceTiming)&&new s.cu(fe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(fe,this._pendingRequest),this._geoJSONIndex=fe.cluster?new nt(function({superclusterOptions:ft,clusterProperties:Et}){if(!Et||!ft)return ft;const Ct={},nn={},Yt={accumulated:null,zoom:0},Gt={properties:null},wt=Object.keys(Et);for(const Tn of wt){const[En,sr]=Et[Tn],Pr=s.cB(sr),an=s.cB(typeof En=="string"?[En,["accumulated"],["get",Tn]]:En);Ct[Tn]=Pr.value,nn[Tn]=an.value}return ft.map=Tn=>{Gt.properties=Tn;const En={};for(const sr of wt)En[sr]=Ct[sr].evaluate(Yt,Gt);return En},ft.reduce=(Tn,En)=>{Gt.properties=En;for(const sr of wt)Yt.accumulated=Tn[sr],Tn[sr]=nn[sr].evaluate(Yt,Gt)},ft}(fe)).load((yield this._pendingData).features):(Qe=yield this._pendingData,new de(Qe,fe.geojsonVtOptions)),this.loaded={};const pt={};if(p){const ft=p.finish();ft&&(pt.resourceTiming={},pt.resourceTiming[fe.source]=JSON.parse(JSON.stringify(ft)))}return pt}catch(pt){if(delete this._pendingRequest,s.cf(pt))return{abandoned:!0};throw pt}var Qe})}getData(){return s._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(fe){const xe=this.loaded;return xe&&xe[fe.uid]?super.reloadTile(fe):this.loadTile(fe)}loadAndProcessGeoJSON(fe,xe){return s._(this,void 0,void 0,function*(){let p=yield this.loadGeoJSON(fe,xe);if(delete this._pendingRequest,typeof p!="object")throw new Error(`Input data given to '${fe.source}' is not a valid GeoJSON object.`);if(j(p,!0),fe.filter){const Qe=s.cB(fe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Qe.result==="error")throw new Error(Qe.value.map(ft=>`${ft.key}: ${ft.message}`).join(", "));p={type:"FeatureCollection",features:p.features.filter(ft=>Qe.value.evaluate({zoom:0},ft))}}return p})}loadGeoJSON(fe,xe){return s._(this,void 0,void 0,function*(){const{promoteId:p}=fe;if(fe.request){const Qe=yield s.h(fe.request,xe);return this._dataUpdateable=kt(Qe.data,p)?Xt(Qe.data,p):void 0,Qe.data}if(typeof fe.data=="string")try{const Qe=JSON.parse(fe.data);return this._dataUpdateable=kt(Qe,p)?Xt(Qe,p):void 0,Qe}catch{throw new Error(`Input data given to '${fe.source}' is not a valid GeoJSON object.`)}if(!fe.dataDiff)throw new Error(`Input data given to '${fe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${fe.source}`);return function(Qe,pt,ft){var Et,Ct,nn,Yt;if(pt.removeAll&&Qe.clear(),pt.remove)for(const Gt of pt.remove)Qe.delete(Gt);if(pt.add)for(const Gt of pt.add){const wt=Je(Gt,ft);wt!=null&&Qe.set(wt,Gt)}if(pt.update)for(const Gt of pt.update){let wt=Qe.get(Gt.id);if(wt==null)continue;const Tn=!Gt.removeAllProperties&&(((Et=Gt.removeProperties)===null||Et===void 0?void 0:Et.length)>0||((Ct=Gt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0);if((Gt.newGeometry||Gt.removeAllProperties||Tn)&&(wt=Object.assign({},wt),Qe.set(Gt.id,wt),Tn&&(wt.properties=Object.assign({},wt.properties))),Gt.newGeometry&&(wt.geometry=Gt.newGeometry),Gt.removeAllProperties)wt.properties={};else if(((nn=Gt.removeProperties)===null||nn===void 0?void 0:nn.length)>0)for(const En of Gt.removeProperties)Object.prototype.hasOwnProperty.call(wt.properties,En)&&delete wt.properties[En];if(((Yt=Gt.addOrUpdateProperties)===null||Yt===void 0?void 0:Yt.length)>0)for(const{key:En,value:sr}of Gt.addOrUpdateProperties)wt.properties[En]=sr}}(this._dataUpdateable,fe.dataDiff,p),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(fe){return s._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(fe){return this._geoJSONIndex.getClusterExpansionZoom(fe.clusterId)}getClusterChildren(fe){return this._geoJSONIndex.getChildren(fe.clusterId)}getClusterLeaves(fe){return this._geoJSONIndex.getLeaves(fe.clusterId,fe.limit,fe.offset)}}class Ut{constructor(fe){this.self=fe,this.actor=new s.F(fe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(xe,p)=>{if(this.externalWorkerSourceTypes[xe])throw new Error(`Worker source with name "${xe}" already registered.`);this.externalWorkerSourceTypes[xe]=p},this.self.addProtocol=s.ch,this.self.removeProtocol=s.ci,this.self.registerRTLTextPlugin=xe=>{s.cC.setMethods(xe)},this.actor.registerMessageHandler("LDT",(xe,p)=>this._getDEMWorkerSource(xe,p.source).loadTile(p)),this.actor.registerMessageHandler("RDT",(xe,p)=>s._(this,void 0,void 0,function*(){this._getDEMWorkerSource(xe,p.source).removeTile(p)})),this.actor.registerMessageHandler("GCEZ",(xe,p)=>s._(this,void 0,void 0,function*(){return this._getWorkerSource(xe,p.type,p.source).getClusterExpansionZoom(p)})),this.actor.registerMessageHandler("GCC",(xe,p)=>s._(this,void 0,void 0,function*(){return this._getWorkerSource(xe,p.type,p.source).getClusterChildren(p)})),this.actor.registerMessageHandler("GCL",(xe,p)=>s._(this,void 0,void 0,function*(){return this._getWorkerSource(xe,p.type,p.source).getClusterLeaves(p)})),this.actor.registerMessageHandler("LD",(xe,p)=>this._getWorkerSource(xe,p.type,p.source).loadData(p)),this.actor.registerMessageHandler("GD",(xe,p)=>this._getWorkerSource(xe,p.type,p.source).getData()),this.actor.registerMessageHandler("LT",(xe,p)=>this._getWorkerSource(xe,p.type,p.source).loadTile(p)),this.actor.registerMessageHandler("RT",(xe,p)=>this._getWorkerSource(xe,p.type,p.source).reloadTile(p)),this.actor.registerMessageHandler("AT",(xe,p)=>this._getWorkerSource(xe,p.type,p.source).abortTile(p)),this.actor.registerMessageHandler("RMT",(xe,p)=>this._getWorkerSource(xe,p.type,p.source).removeTile(p)),this.actor.registerMessageHandler("RS",(xe,p)=>s._(this,void 0,void 0,function*(){if(!this.workerSources[xe]||!this.workerSources[xe][p.type]||!this.workerSources[xe][p.type][p.source])return;const Qe=this.workerSources[xe][p.type][p.source];delete this.workerSources[xe][p.type][p.source],Qe.removeSource!==void 0&&Qe.removeSource(p)})),this.actor.registerMessageHandler("RM",xe=>s._(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("SR",(xe,p)=>s._(this,void 0,void 0,function*(){this.referrer=p})),this.actor.registerMessageHandler("SRPS",(xe,p)=>this._syncRTLPluginState(xe,p)),this.actor.registerMessageHandler("IS",(xe,p)=>s._(this,void 0,void 0,function*(){this.self.importScripts(p)})),this.actor.registerMessageHandler("SI",(xe,p)=>this._setImages(xe,p)),this.actor.registerMessageHandler("UL",(xe,p)=>s._(this,void 0,void 0,function*(){this._getLayerIndex(xe).update(p.layers,p.removedIds)})),this.actor.registerMessageHandler("SL",(xe,p)=>s._(this,void 0,void 0,function*(){this._getLayerIndex(xe).replace(p)}))}_setImages(fe,xe){return s._(this,void 0,void 0,function*(){this.availableImages[fe]=xe;for(const p in this.workerSources[fe]){const Qe=this.workerSources[fe][p];for(const pt in Qe)Qe[pt].availableImages=xe}})}_syncRTLPluginState(fe,xe){return s._(this,void 0,void 0,function*(){return yield s.cC.syncState(xe,this.self.importScripts)})}_getAvailableImages(fe){let xe=this.availableImages[fe];return xe||(xe=[]),xe}_getLayerIndex(fe){let xe=this.layerIndexes[fe];return xe||(xe=this.layerIndexes[fe]=new a),xe}_getWorkerSource(fe,xe,p){if(this.workerSources[fe]||(this.workerSources[fe]={}),this.workerSources[fe][xe]||(this.workerSources[fe][xe]={}),!this.workerSources[fe][xe][p]){const Qe={sendAsync:(pt,ft)=>(pt.targetMapId=fe,this.actor.sendAsync(pt,ft))};switch(xe){case"vector":this.workerSources[fe][xe][p]=new I(Qe,this._getLayerIndex(fe),this._getAvailableImages(fe));break;case"geojson":this.workerSources[fe][xe][p]=new it(Qe,this._getLayerIndex(fe),this._getAvailableImages(fe));break;default:this.workerSources[fe][xe][p]=new this.externalWorkerSourceTypes[xe](Qe,this._getLayerIndex(fe),this._getAvailableImages(fe))}}return this.workerSources[fe][xe][p]}_getDEMWorkerSource(fe,xe){return this.demWorkerSources[fe]||(this.demWorkerSources[fe]={}),this.demWorkerSources[fe][xe]||(this.demWorkerSources[fe][xe]=new S),this.demWorkerSources[fe][xe]}}return s.i(self)&&(self.worker=new Ut(self)),Ut}),i("index",["exports","./shared"],function(s,a){var f="5.0.1";function g(){var k=new a.A(4);return a.A!=Float32Array&&(k[1]=0,k[2]=0),k[0]=1,k[3]=1,k}let b,I;const S={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:k=>new Promise((l,c)=>{const C=requestAnimationFrame(l);k.signal.addEventListener("abort",()=>{cancelAnimationFrame(C),c(a.c())})}),getImageData(k,l=0){return this.getImageCanvasContext(k).getImageData(-l,-l,k.width+2*l,k.height+2*l)},getImageCanvasContext(k){const l=window.document.createElement("canvas"),c=l.getContext("2d",{willReadFrequently:!0});if(!c)throw new Error("failed to create canvas 2d context");return l.width=k.width,l.height=k.height,c.drawImage(k,0,0,k.width,k.height),c},resolveURL:k=>(b||(b=document.createElement("a")),b.href=k,b.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(I==null&&(I=matchMedia("(prefers-reduced-motion: reduce)")),I.matches)}};class B{static testProp(l){if(!B.docStyle)return l[0];for(let c=0;c<l.length;c++)if(l[c]in B.docStyle)return l[c];return l[0]}static create(l,c,C){const M=window.document.createElement(l);return c!==void 0&&(M.className=c),C&&C.appendChild(M),M}static createNS(l,c){return window.document.createElementNS(l,c)}static disableDrag(){B.docStyle&&B.selectProp&&(B.userSelect=B.docStyle[B.selectProp],B.docStyle[B.selectProp]="none")}static enableDrag(){B.docStyle&&B.selectProp&&(B.docStyle[B.selectProp]=B.userSelect)}static setTransform(l,c){l.style[B.transformProp]=c}static addEventListener(l,c,C,M={}){l.addEventListener(c,C,"passive"in M?M:M.capture)}static removeEventListener(l,c,C,M={}){l.removeEventListener(c,C,"passive"in M?M:M.capture)}static suppressClickInternal(l){l.preventDefault(),l.stopPropagation(),window.removeEventListener("click",B.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",B.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",B.suppressClickInternal,!0)},0)}static getScale(l){const c=l.getBoundingClientRect();return{x:c.width/l.offsetWidth||1,y:c.height/l.offsetHeight||1,boundingClientRect:c}}static getPoint(l,c,C){const M=c.boundingClientRect;return new a.P((C.clientX-M.left)/c.x-l.clientLeft,(C.clientY-M.top)/c.y-l.clientTop)}static mousePos(l,c){const C=B.getScale(l);return B.getPoint(l,C,c)}static touchPos(l,c){const C=[],M=B.getScale(l);for(let K=0;K<c.length;K++)C.push(B.getPoint(l,M,c[K]));return C}static mouseButton(l){return l.button}static remove(l){l.parentNode&&l.parentNode.removeChild(l)}static sanitize(l){const c=new DOMParser().parseFromString(l,"text/html").body||document.createElement("body"),C=c.querySelectorAll("script");for(const M of C)M.remove();return B.clean(c),c.innerHTML}static isPossiblyDangerous(l,c){const C=c.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(l)||!C.includes("javascript:")&&!C.includes("data:"))||!!l.startsWith("on")||void 0}static clean(l){const c=l.children;for(const C of c)B.removeAttributes(C),B.clean(C)}static removeAttributes(l){for(const{name:c,value:C}of l.attributes)B.isPossiblyDangerous(c,C)&&l.removeAttribute(c)}}B.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,B.selectProp=B.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),B.transformProp=B.testProp(["transform","WebkitTransform"]);const P={supported:!1,testSupport:function(k){!q&&j&&(W?ee(k):U=k)}};let U,j,q=!1,W=!1;function ee(k){const l=k.createTexture();k.bindTexture(k.TEXTURE_2D,l);try{if(k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,j),k.isContextLost())return;P.supported=!0}catch{}k.deleteTexture(l),q=!0}var J;typeof document<"u"&&(j=document.createElement("img"),j.onload=()=>{U&&ee(U),U=null,W=!0},j.onerror=()=>{q=!0,U=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(k){let l,c,C,M;k.resetRequestQueue=()=>{l=[],c=0,C=0,M={}},k.addThrottleControl=ne=>{const se=C++;return M[se]=ne,se},k.removeThrottleControl=ne=>{delete M[ne],z()},k.getImage=(ne,se,be=!0)=>new Promise((Oe,Te)=>{P.supported&&(ne.headers||(ne.headers={}),ne.headers.accept="image/webp,*/*"),a.e(ne,{type:"image"}),l.push({abortController:se,requestParameters:ne,supportImageRefresh:be,state:"queued",onError:$e=>{Te($e)},onSuccess:$e=>{Oe($e)}}),z()});const K=ne=>a._(this,void 0,void 0,function*(){ne.state="running";const{requestParameters:se,supportImageRefresh:be,onError:Oe,onSuccess:Te,abortController:$e}=ne,He=be===!1&&!a.i(self)&&!a.g(se.url)&&(!se.headers||Object.keys(se.headers).reduce((dt,gt)=>dt&>==="accept",!0));c++;const ct=He?Y(se,$e):a.m(se,$e);try{const dt=yield ct;delete ne.abortController,ne.state="completed",dt.data instanceof HTMLImageElement||a.b(dt.data)?Te(dt):dt.data&&Te({data:yield(st=dt.data,typeof createImageBitmap=="function"?a.d(st):a.f(st)),cacheControl:dt.cacheControl,expires:dt.expires})}catch(dt){delete ne.abortController,Oe(dt)}finally{c--,z()}var st}),z=()=>{const ne=(()=>{for(const se of Object.keys(M))if(M[se]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let se=c;se<ne&&l.length>0;se++){const be=l.shift();be.abortController.signal.aborted?se--:K(be)}},Y=(ne,se)=>new Promise((be,Oe)=>{const Te=new Image,$e=ne.url,He=ne.credentials;He&&He==="include"?Te.crossOrigin="use-credentials":(He&&He==="same-origin"||!a.s($e))&&(Te.crossOrigin="anonymous"),se.signal.addEventListener("abort",()=>{Te.src="",Oe(a.c())}),Te.fetchPriority="high",Te.onload=()=>{Te.onerror=Te.onload=null,be({data:Te})},Te.onerror=()=>{Te.onerror=Te.onload=null,se.signal.aborted||Oe(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."))},Te.src=$e})}(J||(J={})),J.resetRequestQueue();class ${constructor(l){this._transformRequestFn=l}transformRequest(l,c){return this._transformRequestFn&&this._transformRequestFn(l,c)||{url:l}}setTransformRequest(l){this._transformRequestFn=l}}function X(k){const l=[];if(typeof k=="string")l.push({id:"default",url:k});else if(k&&k.length>0){const c=[];for(const{id:C,url:M}of k){const K=`${C}${M}`;c.indexOf(K)===-1&&(c.push(K),l.push({id:C,url:M}))}}return l}function G(k,l,c){try{const C=new URL(k);return C.pathname+=`${l}${c}`,C.toString()}catch{throw new Error(`Invalid sprite URL "${k}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class ae{constructor(l,c,C,M){this.context=l,this.format=C,this.texture=l.gl.createTexture(),this.update(c,M)}update(l,c,C){const{width:M,height:K}=l,z=!(this.size&&this.size[0]===M&&this.size[1]===K||C),{context:Y}=this,{gl:ne}=Y;if(this.useMipmap=!!(c&&c.useMipmap),ne.bindTexture(ne.TEXTURE_2D,this.texture),Y.pixelStoreUnpackFlipY.set(!1),Y.pixelStoreUnpack.set(1),Y.pixelStoreUnpackPremultiplyAlpha.set(this.format===ne.RGBA&&(!c||c.premultiply!==!1)),z)this.size=[M,K],l instanceof HTMLImageElement||l instanceof HTMLCanvasElement||l instanceof HTMLVideoElement||l instanceof ImageData||a.b(l)?ne.texImage2D(ne.TEXTURE_2D,0,this.format,this.format,ne.UNSIGNED_BYTE,l):ne.texImage2D(ne.TEXTURE_2D,0,this.format,M,K,0,this.format,ne.UNSIGNED_BYTE,l.data);else{const{x:se,y:be}=C||{x:0,y:0};l instanceof HTMLImageElement||l instanceof HTMLCanvasElement||l instanceof HTMLVideoElement||l instanceof ImageData||a.b(l)?ne.texSubImage2D(ne.TEXTURE_2D,0,se,be,ne.RGBA,ne.UNSIGNED_BYTE,l):ne.texSubImage2D(ne.TEXTURE_2D,0,se,be,M,K,ne.RGBA,ne.UNSIGNED_BYTE,l.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ne.generateMipmap(ne.TEXTURE_2D)}bind(l,c,C){const{context:M}=this,{gl:K}=M;K.bindTexture(K.TEXTURE_2D,this.texture),C!==K.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(C=K.LINEAR),l!==this.filter&&(K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MAG_FILTER,l),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MIN_FILTER,C||l),this.filter=l),c!==this.wrap&&(K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_S,c),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_T,c),this.wrap=c)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:l}=this.context;l.deleteTexture(this.texture),this.texture=null}}function ge(k){const{userImage:l}=k;return!!(l&&l.render&&l.render())&&(k.data.replace(new Uint8Array(l.data.buffer)),!0)}class he extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(l){if(this.loaded!==l&&(this.loaded=l,l)){for(const{ids:c,promiseResolve:C}of this.requestors)C(this._getImagesForIds(c));this.requestors=[]}}getImage(l){const c=this.images[l];if(c&&!c.data&&c.spriteData){const C=c.spriteData;c.data=new a.R({width:C.width,height:C.height},C.context.getImageData(C.x,C.y,C.width,C.height).data),c.spriteData=null}return c}addImage(l,c){if(this.images[l])throw new Error(`Image id ${l} already exist, use updateImage instead`);this._validate(l,c)&&(this.images[l]=c)}_validate(l,c){let C=!0;const M=c.data||c.spriteData;return this._validateStretch(c.stretchX,M&&M.width)||(this.fire(new a.j(new Error(`Image "${l}" has invalid "stretchX" value`))),C=!1),this._validateStretch(c.stretchY,M&&M.height)||(this.fire(new a.j(new Error(`Image "${l}" has invalid "stretchY" value`))),C=!1),this._validateContent(c.content,c)||(this.fire(new a.j(new Error(`Image "${l}" has invalid "content" value`))),C=!1),C}_validateStretch(l,c){if(!l)return!0;let C=0;for(const M of l){if(M[0]<C||M[1]<M[0]||c<M[1])return!1;C=M[1]}return!0}_validateContent(l,c){if(!l)return!0;if(l.length!==4)return!1;const C=c.spriteData,M=C&&C.width||c.data.width,K=C&&C.height||c.data.height;return!(l[0]<0||M<l[0]||l[1]<0||K<l[1]||l[2]<0||M<l[2]||l[3]<0||K<l[3]||l[2]<l[0]||l[3]<l[1])}updateImage(l,c,C=!0){const M=this.getImage(l);if(C&&(M.data.width!==c.data.width||M.data.height!==c.data.height))throw new Error(`size mismatch between old image (${M.data.width}x${M.data.height}) and new image (${c.data.width}x${c.data.height}).`);c.version=M.version+1,this.images[l]=c,this.updatedImages[l]=!0}removeImage(l){const c=this.images[l];delete this.images[l],delete this.patterns[l],c.userImage&&c.userImage.onRemove&&c.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(l){return new Promise((c,C)=>{let M=!0;if(!this.isLoaded())for(const K of l)this.images[K]||(M=!1);this.isLoaded()||M?c(this._getImagesForIds(l)):this.requestors.push({ids:l,promiseResolve:c})})}_getImagesForIds(l){const c={};for(const C of l){let M=this.getImage(C);M||(this.fire(new a.k("styleimagemissing",{id:C})),M=this.getImage(C)),M?c[C]={data:M.data.clone(),pixelRatio:M.pixelRatio,sdf:M.sdf,version:M.version,stretchX:M.stretchX,stretchY:M.stretchY,content:M.content,textFitWidth:M.textFitWidth,textFitHeight:M.textFitHeight,hasRenderCallback:!!(M.userImage&&M.userImage.render)}:a.w(`Image "${C}" 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 c}getPixelSize(){const{width:l,height:c}=this.atlasImage;return{width:l,height:c}}getPattern(l){const c=this.patterns[l],C=this.getImage(l);if(!C)return null;if(c&&c.position.version===C.version)return c.position;if(c)c.position.version=C.version;else{const M={w:C.data.width+2,h:C.data.height+2,x:0,y:0},K=new a.I(M,C);this.patterns[l]={bin:M,position:K}}return this._updatePatternAtlas(),this.patterns[l].position}bind(l){const c=l.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new ae(l,this.atlasImage,c.RGBA),this.atlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE)}_updatePatternAtlas(){const l=[];for(const K in this.patterns)l.push(this.patterns[K].bin);const{w:c,h:C}=a.p(l),M=this.atlasImage;M.resize({width:c||1,height:C||1});for(const K in this.patterns){const{bin:z}=this.patterns[K],Y=z.x+1,ne=z.y+1,se=this.getImage(K).data,be=se.width,Oe=se.height;a.R.copy(se,M,{x:0,y:0},{x:Y,y:ne},{width:be,height:Oe}),a.R.copy(se,M,{x:0,y:Oe-1},{x:Y,y:ne-1},{width:be,height:1}),a.R.copy(se,M,{x:0,y:0},{x:Y,y:ne+Oe},{width:be,height:1}),a.R.copy(se,M,{x:be-1,y:0},{x:Y-1,y:ne},{width:1,height:Oe}),a.R.copy(se,M,{x:0,y:0},{x:Y+be,y:ne},{width:1,height:Oe})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(l){for(const c of l){if(this.callbackDispatchedThisFrame[c])continue;this.callbackDispatchedThisFrame[c]=!0;const C=this.getImage(c);C||a.w(`Image with ID: "${c}" was not found`),ge(C)&&this.updateImage(c,C)}}}const Ie=1e20;function re(k,l,c,C,M,K,z,Y,ne){for(let se=l;se<l+C;se++)oe(k,c*K+se,K,M,z,Y,ne);for(let se=c;se<c+M;se++)oe(k,se*K+l,1,C,z,Y,ne)}function oe(k,l,c,C,M,K,z){K[0]=0,z[0]=-1e20,z[1]=Ie,M[0]=k[l];for(let Y=1,ne=0,se=0;Y<C;Y++){M[Y]=k[l+Y*c];const be=Y*Y;do{const Oe=K[ne];se=(M[Y]-M[Oe]+be-Oe*Oe)/(Y-Oe)/2}while(se<=z[ne]&&--ne>-1);ne++,K[ne]=Y,z[ne]=se,z[ne+1]=Ie}for(let Y=0,ne=0;Y<C;Y++){for(;z[ne+1]<Y;)ne++;const se=K[ne],be=Y-se;k[l+Y*c]=M[se]+be*be}}class Se{constructor(l,c){this.requestManager=l,this.localIdeographFontFamily=c,this.entries={}}setURL(l){this.url=l}getGlyphs(l){return a._(this,void 0,void 0,function*(){const c=[];for(const K in l)for(const z of l[K])c.push(this._getAndCacheGlyphsPromise(K,z));const C=yield Promise.all(c),M={};for(const{stack:K,id:z,glyph:Y}of C)M[K]||(M[K]={}),M[K][z]=Y&&{id:Y.id,bitmap:Y.bitmap.clone(),metrics:Y.metrics};return M})}_getAndCacheGlyphsPromise(l,c){return a._(this,void 0,void 0,function*(){let C=this.entries[l];C||(C=this.entries[l]={glyphs:{},requests:{},ranges:{}});let M=C.glyphs[c];if(M!==void 0)return{stack:l,id:c,glyph:M};if(M=this._tinySDF(C,l,c),M)return C.glyphs[c]=M,{stack:l,id:c,glyph:M};const K=Math.floor(c/256);if(256*K>65535)throw new Error("glyphs > 65535 not supported");if(C.ranges[K])return{stack:l,id:c,glyph:M};if(!this.url)throw new Error("glyphsUrl is not set");if(!C.requests[K]){const Y=Se.loadGlyphRange(l,K,this.url,this.requestManager);C.requests[K]=Y}const z=yield C.requests[K];for(const Y in z)this._doesCharSupportLocalGlyph(+Y)||(C.glyphs[+Y]=z[+Y]);return C.ranges[K]=!0,{stack:l,id:c,glyph:z[c]||null}})}_doesCharSupportLocalGlyph(l){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(l))}_tinySDF(l,c,C){const M=this.localIdeographFontFamily;if(!M||!this._doesCharSupportLocalGlyph(C))return;let K=l.tinySDF;if(!K){let Y="400";/bold/i.test(c)?Y="900":/medium/i.test(c)?Y="500":/light/i.test(c)&&(Y="200"),K=l.tinySDF=new Se.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:M,fontWeight:Y})}const z=K.draw(String.fromCharCode(C));return{id:C,bitmap:new a.o({width:z.width||60,height:z.height||60},z.data),metrics:{width:z.glyphWidth/2||24,height:z.glyphHeight/2||24,left:z.glyphLeft/2+.5||0,top:z.glyphTop/2-27.5||-8,advance:z.glyphAdvance/2||24,isDoubleResolution:!0}}}}Se.loadGlyphRange=function(k,l,c,C){return a._(this,void 0,void 0,function*(){const M=256*l,K=M+255,z=C.transformRequest(c.replace("{fontstack}",k).replace("{range}",`${M}-${K}`),"Glyphs"),Y=yield a.l(z,new AbortController);if(!Y||!Y.data)throw new Error(`Could not load glyph range. range: ${l}, ${M}-${K}`);const ne={};for(const se of a.n(Y.data))ne[se.id]=se;return ne})},Se.TinySDF=class{constructor({fontSize:k=24,buffer:l=3,radius:c=8,cutoff:C=.25,fontFamily:M="sans-serif",fontWeight:K="normal",fontStyle:z="normal"}={}){this.buffer=l,this.cutoff=C,this.radius=c;const Y=this.size=k+4*l,ne=this._createCanvas(Y),se=this.ctx=ne.getContext("2d",{willReadFrequently:!0});se.font=`${z} ${K} ${k}px ${M}`,se.textBaseline="alphabetic",se.textAlign="left",se.fillStyle="black",this.gridOuter=new Float64Array(Y*Y),this.gridInner=new Float64Array(Y*Y),this.f=new Float64Array(Y),this.z=new Float64Array(Y+1),this.v=new Uint16Array(Y)}_createCanvas(k){const l=document.createElement("canvas");return l.width=l.height=k,l}draw(k){const{width:l,actualBoundingBoxAscent:c,actualBoundingBoxDescent:C,actualBoundingBoxLeft:M,actualBoundingBoxRight:K}=this.ctx.measureText(k),z=Math.ceil(c),Y=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(K-M))),ne=Math.min(this.size-this.buffer,z+Math.ceil(C)),se=Y+2*this.buffer,be=ne+2*this.buffer,Oe=Math.max(se*be,0),Te=new Uint8ClampedArray(Oe),$e={data:Te,width:se,height:be,glyphWidth:Y,glyphHeight:ne,glyphTop:z,glyphLeft:0,glyphAdvance:l};if(Y===0||ne===0)return $e;const{ctx:He,buffer:ct,gridInner:st,gridOuter:dt}=this;He.clearRect(ct,ct,Y,ne),He.fillText(k,ct,ct+z);const gt=He.getImageData(ct,ct,Y,ne);dt.fill(Ie,0,Oe),st.fill(0,0,Oe);for(let St=0;St<ne;St++)for(let It=0;It<Y;It++){const Kt=gt.data[4*(St*Y+It)+3]/255;if(Kt===0)continue;const zt=(St+ct)*se+It+ct;if(Kt===1)dt[zt]=0,st[zt]=Ie;else{const Tt=.5-Kt;dt[zt]=Tt>0?Tt*Tt:0,st[zt]=Tt<0?Tt*Tt:0}}re(dt,0,0,se,be,se,this.f,this.v,this.z),re(st,ct,ct,Y,ne,se,this.f,this.v,this.z);for(let St=0;St<Oe;St++){const It=Math.sqrt(dt[St])-Math.sqrt(st[St]);Te[St]=Math.round(255-255*(It/this.radius+this.cutoff))}return $e}};class ye{constructor(){this.specification=a.v.light.position}possiblyEvaluate(l,c){return a.x(l.expression.evaluate(c))}interpolate(l,c,C){return{x:a.y.number(l.x,c.x,C),y:a.y.number(l.y,c.y,C),z:a.y.number(l.z,c.z,C)}}}let nt;class Ne extends a.E{constructor(l){super(),nt=nt||new a.q({anchor:new a.D(a.v.light.anchor),position:new ye,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(nt),this.setLight(l),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,c={}){if(!this._validate(a.r,l,c))for(const C in l){const M=l[C];C.endsWith("-transition")?this._transitionable.setTransition(C.slice(0,-11),M):this._transitionable.setValue(C,M)}}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,c,C){return(!C||C.validate!==!1)&&a.t(this,l.call(a.u,{value:c,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}const je=new a.q({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class et extends a.E{constructor(l){super(),this._transitionable=new a.T(je),this.setSky(l),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0))}setSky(l,c={}){if(!this._validate(a.B,l,c)){l||(l={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const C in l){const M=l[C];C.endsWith("-transition")?this._transitionable.setTransition(C.slice(0,-11),M):this._transitionable.setValue(C,M)}}}getSky(){return this._transitionable.serialize()}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,c,C={}){return(C==null?void 0:C.validate)!==!1&&a.t(this,l.call(a.u,a.e({value:c,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(l){return l<60?0:l<70?(l-60)/10:1}}class Ue{constructor(l,c){this.width=l,this.height=c,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(l,c){const C=l.join(",")+String(c);return this.dashEntry[C]||(this.dashEntry[C]=this.addDash(l,c)),this.dashEntry[C]}getDashRanges(l,c,C){const M=[];let K=l.length%2==1?-l[l.length-1]*C:0,z=l[0]*C,Y=!0;M.push({left:K,right:z,isDash:Y,zeroLength:l[0]===0});let ne=l[0];for(let se=1;se<l.length;se++){Y=!Y;const be=l[se];K=ne*C,ne+=be,z=ne*C,M.push({left:K,right:z,isDash:Y,zeroLength:be===0})}return M}addRoundDash(l,c,C){const M=c/2;for(let K=-C;K<=C;K++){const z=this.width*(this.nextRow+C+K);let Y=0,ne=l[Y];for(let se=0;se<this.width;se++){se/ne.right>1&&(ne=l[++Y]);const be=Math.abs(se-ne.left),Oe=Math.abs(se-ne.right),Te=Math.min(be,Oe);let $e;const He=K/C*(M+1);if(ne.isDash){const ct=M-Math.abs(He);$e=Math.sqrt(Te*Te+ct*ct)}else $e=M-Math.sqrt(Te*Te+He*He);this.data[z+se]=Math.max(0,Math.min(255,$e+128))}}}addRegularDash(l){for(let Y=l.length-1;Y>=0;--Y){const ne=l[Y],se=l[Y+1];ne.zeroLength?l.splice(Y,1):se&&se.isDash===ne.isDash&&(se.left=ne.left,l.splice(Y,1))}const c=l[0],C=l[l.length-1];c.isDash===C.isDash&&(c.left=C.left-this.width,C.right=c.right+this.width);const M=this.width*this.nextRow;let K=0,z=l[K];for(let Y=0;Y<this.width;Y++){Y/z.right>1&&(z=l[++K]);const ne=Math.abs(Y-z.left),se=Math.abs(Y-z.right),be=Math.min(ne,se);this.data[M+Y]=Math.max(0,Math.min(255,(z.isDash?be:-be)+128))}}addDash(l,c){const C=c?7:0,M=2*C+1;if(this.nextRow+M>this.height)return a.w("LineAtlas out of space"),null;let K=0;for(let Y=0;Y<l.length;Y++)K+=l[Y];if(K!==0){const Y=this.width/K,ne=this.getDashRanges(l,this.width,Y);c?this.addRoundDash(ne,Y,C):this.addRegularDash(ne)}const z={y:(this.nextRow+C+.5)/this.height,height:2*C/this.height,width:K};return this.nextRow+=M,this.dirty=!0,z}bind(l){const c=l.gl;this.texture?(c.bindTexture(c.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,c.texSubImage2D(c.TEXTURE_2D,0,0,0,this.width,this.height,c.ALPHA,c.UNSIGNED_BYTE,this.data))):(this.texture=c.createTexture(),c.bindTexture(c.TEXTURE_2D,this.texture),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.REPEAT),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.REPEAT),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texImage2D(c.TEXTURE_2D,0,c.ALPHA,this.width,this.height,0,c.ALPHA,c.UNSIGNED_BYTE,this.data))}}const ke="maplibre_preloaded_worker_pool";class We{constructor(){this.active={}}acquire(l){if(!this.workers)for(this.workers=[];this.workers.length<We.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[l]=!0,this.workers.slice()}release(l){delete this.active[l],this.numActive()===0&&(this.workers.forEach(c=>{c.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[ke]}numActive(){return Object.keys(this.active).length}}const vt=Math.floor(S.hardwareConcurrency/2);let Pt,ut;function jt(){return Pt||(Pt=new We),Pt}We.workerCount=a.C(globalThis)?Math.max(Math.min(vt,3),1):1;class Rt{constructor(l,c){this.workerPool=l,this.actors=[],this.currentActor=0,this.id=c;const C=this.workerPool.acquire(c);for(let M=0;M<C.length;M++){const K=new a.F(C[M],c);K.name=`Worker ${M}`,this.actors.push(K)}if(!this.actors.length)throw new Error("No actors found")}broadcast(l,c){const C=[];for(const M of this.actors)C.push(M.sendAsync({type:l,data:c}));return Promise.all(C)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(l=!0){this.actors.forEach(c=>{c.remove()}),this.actors=[],l&&this.workerPool.release(this.id)}registerMessageHandler(l,c){for(const C of this.actors)C.registerMessageHandler(l,c)}}function Ke(){return ut||(ut=new Rt(jt(),a.G),ut.registerMessageHandler("GR",(k,l,c)=>a.m(l,c))),ut}function we(k,l){const c=a.H();return a.J(c,c,[1,1,0]),a.K(c,c,[.5*k.width,.5*k.height,1]),k.calculatePosMatrix?a.L(c,c,k.calculatePosMatrix(l.toUnwrapped())):c}function Fe(k,l,c,C,M,K){var z;const Y=function(Oe,Te,$e){if(Oe)for(const He of Oe){const ct=Te[He];if(ct&&ct.source===$e&&ct.type==="fill-extrusion")return!0}else for(const He in Te){const ct=Te[He];if(ct.source===$e&&ct.type==="fill-extrusion")return!0}return!1}((z=M==null?void 0:M.layers)!==null&&z!==void 0?z:null,l,k.id),ne=K.maxPitchScaleFactor(),se=k.tilesIn(C,ne,Y);se.sort(tt);const be=[];for(const Oe of se)be.push({wrappedTileID:Oe.tileID.wrapped().key,queryResults:Oe.tile.queryRenderedFeatures(l,c,k._state,Oe.queryGeometry,Oe.cameraQueryGeometry,Oe.scale,M,K,ne,we(k.transform,Oe.tileID))});return function(Oe,Te){for(const $e in Oe)for(const He of Oe[$e])mt(He,Te);return Oe}(function(Oe){const Te={},$e={};for(const He of Oe){const ct=He.queryResults,st=He.wrappedTileID,dt=$e[st]=$e[st]||{};for(const gt in ct){const St=ct[gt],It=dt[gt]=dt[gt]||{},Kt=Te[gt]=Te[gt]||[];for(const zt of St)It[zt.featureIndex]||(It[zt.featureIndex]=!0,Kt.push(zt))}}return Te}(be),k)}function tt(k,l){const c=k.tileID,C=l.tileID;return c.overscaledZ-C.overscaledZ||c.canonical.y-C.canonical.y||c.wrap-C.wrap||c.canonical.x-C.canonical.x}function mt(k,l){const c=k.feature,C=l.getFeatureState(c.layer["source-layer"],c.id);c.source=c.layer.source,c.layer["source-layer"]&&(c.sourceLayer=c.layer["source-layer"]),c.state=C}function bt(k,l,c){return a._(this,void 0,void 0,function*(){let C=k;if(k.url?C=(yield a.h(l.transformRequest(k.url,"Source"),c)).data:yield S.frameAsync(c),!C)return null;const M=a.M(a.e(C,k),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in C&&C.vector_layers&&(M.vectorLayerIds=C.vector_layers.map(K=>K.id)),M})}class Lt{constructor(l,c){l&&(c?this.setSouthWest(l).setNorthEast(c):Array.isArray(l)&&(l.length===4?this.setSouthWest([l[0],l[1]]).setNorthEast([l[2],l[3]]):this.setSouthWest(l[0]).setNorthEast(l[1])))}setNorthEast(l){return this._ne=l instanceof a.N?new a.N(l.lng,l.lat):a.N.convert(l),this}setSouthWest(l){return this._sw=l instanceof a.N?new a.N(l.lng,l.lat):a.N.convert(l),this}extend(l){const c=this._sw,C=this._ne;let M,K;if(l instanceof a.N)M=l,K=l;else{if(!(l instanceof Lt))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(Lt.convert(l)):this.extend(a.N.convert(l)):l&&("lng"in l||"lon"in l)&&"lat"in l?this.extend(a.N.convert(l)):this;if(M=l._sw,K=l._ne,!M||!K)return this}return c||C?(c.lng=Math.min(M.lng,c.lng),c.lat=Math.min(M.lat,c.lat),C.lng=Math.max(K.lng,C.lng),C.lat=Math.max(K.lat,C.lat)):(this._sw=new a.N(M.lng,M.lat),this._ne=new a.N(K.lng,K.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(l){const{lng:c,lat:C}=a.N.convert(l);let M=this._sw.lng<=c&&c<=this._ne.lng;return this._sw.lng>this._ne.lng&&(M=this._sw.lng>=c&&c>=this._ne.lng),this._sw.lat<=C&&C<=this._ne.lat&&M}static convert(l){return l instanceof Lt?l:l&&new Lt(l)}static fromLngLat(l,c=0){const C=360*c/40075017,M=C/Math.cos(Math.PI/180*l.lat);return new Lt(new a.N(l.lng-M,l.lat-C),new a.N(l.lng+M,l.lat+C))}adjustAntiMeridian(){const l=new a.N(this._sw.lng,this._sw.lat),c=new a.N(this._ne.lng,this._ne.lat);return new Lt(l,l.lng>c.lng?new a.N(c.lng+360,c.lat):c)}}class Vt{constructor(l,c,C){this.bounds=Lt.convert(this.validateBounds(l)),this.minzoom=c||0,this.maxzoom=C||24}validateBounds(l){return Array.isArray(l)&&l.length===4?[Math.max(-180,l[0]),Math.max(-90,l[1]),Math.min(180,l[2]),Math.min(90,l[3])]:[-180,-90,180,90]}contains(l){const c=Math.pow(2,l.z),C=Math.floor(a.O(this.bounds.getWest())*c),M=Math.floor(a.Q(this.bounds.getNorth())*c),K=Math.ceil(a.O(this.bounds.getEast())*c),z=Math.ceil(a.Q(this.bounds.getSouth())*c);return l.x>=C&&l.x<K&&l.y>=M&&l.y<z}}class rn extends a.E{constructor(l,c,C,M){if(super(),this.id=l,this.dispatcher=C,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.M(c,["url","scheme","tileSize","promoteId"])),this._options=a.e({type:"vector"},c),this._collectResourceTiming=c.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(M)}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const l=yield bt(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),l&&(a.e(this,l),l.bounds&&(this.tileBounds=new Vt(l.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(l){this._tileJSONRequest=null,this.fire(new a.j(l))}})}loaded(){return this._loaded}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}onAdd(l){this.map=l,this.load()}setSourceProperty(l){this._tileJSONRequest&&this._tileJSONRequest.abort(),l(),this.load()}setTiles(l){return this.setSourceProperty(()=>{this._options.tiles=l}),this}setUrl(l){return this.setSourceProperty(()=>{this.url=l,this._options.url=l}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(l){return a._(this,void 0,void 0,function*(){const c=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),C={request:this.map._requestManager.transformRequest(c,"Tile"),uid:l.uid,tileID:l.tileID,zoom:l.tileID.overscaledZ,tileSize:this.tileSize*l.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};C.request.collectResourceTiming=this._collectResourceTiming;let M="RT";if(l.actor&&l.state!=="expired"){if(l.state==="loading")return new Promise((K,z)=>{l.reloadPromise={resolve:K,reject:z}})}else l.actor=this.dispatcher.getActor(),M="LT";l.abortController=new AbortController;try{const K=yield l.actor.sendAsync({type:M,data:C},l.abortController);if(delete l.abortController,l.aborted)return;this._afterTileLoadWorkerResponse(l,K)}catch(K){if(delete l.abortController,l.aborted)return;if(K&&K.status!==404)throw K;this._afterTileLoadWorkerResponse(l,null)}})}_afterTileLoadWorkerResponse(l,c){if(c&&c.resourceTiming&&(l.resourceTiming=c.resourceTiming),c&&this.map._refreshExpiredTiles&&l.setExpiryData(c),l.loadVectorData(c,this.map.painter),l.reloadPromise){const C=l.reloadPromise;l.reloadPromise=null,this.loadTile(l).then(C.resolve).catch(C.reject)}}abortTile(l){return a._(this,void 0,void 0,function*(){l.abortController&&(l.abortController.abort(),delete l.abortController),l.actor&&(yield l.actor.sendAsync({type:"AT",data:{uid:l.uid,type:this.type,source:this.id}}))})}unloadTile(l){return a._(this,void 0,void 0,function*(){l.unloadVectorData(),l.actor&&(yield l.actor.sendAsync({type:"RMT",data:{uid:l.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Sn extends a.E{constructor(l,c,C,M){super(),this.id=l,this.dispatcher=C,this.setEventedParent(M),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},c),a.e(this,a.M(c,["url","scheme","tileSize"]))}load(){return a._(this,arguments,void 0,function*(l=!1){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const c=yield bt(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,c&&(a.e(this,c),c.bounds&&(this.tileBounds=new Vt(c.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:l})))}catch(c){this._tileJSONRequest=null,this.fire(new a.j(c))}})}loaded(){return this._loaded}onAdd(l){this.map=l,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(l){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),l(),this.load(!0)}setTiles(l){return this.setSourceProperty(()=>{this._options.tiles=l}),this}setUrl(l){return this.setSourceProperty(()=>{this.url=l,this._options.url=l}),this}serialize(){return a.e({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l){return a._(this,void 0,void 0,function*(){const c=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);l.abortController=new AbortController;try{const C=yield J.getImage(this.map._requestManager.transformRequest(c,"Tile"),l.abortController,this.map._refreshExpiredTiles);if(delete l.abortController,l.aborted)return void(l.state="unloaded");if(C&&C.data){this.map._refreshExpiredTiles&&C.cacheControl&&C.expires&&l.setExpiryData({cacheControl:C.cacheControl,expires:C.expires});const M=this.map.painter.context,K=M.gl,z=C.data;l.texture=this.map.painter.getTileTexture(z.width),l.texture?l.texture.update(z,{useMipmap:!0}):(l.texture=new ae(M,z,K.RGBA,{useMipmap:!0}),l.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE,K.LINEAR_MIPMAP_NEAREST)),l.state="loaded"}}catch(C){if(delete l.abortController,l.aborted)l.state="unloaded";else if(C)throw l.state="errored",C}})}abortTile(l){return a._(this,void 0,void 0,function*(){l.abortController&&(l.abortController.abort(),delete l.abortController)})}unloadTile(l){return a._(this,void 0,void 0,function*(){l.texture&&this.map.painter.saveTileTexture(l.texture)})}hasTransition(){return!1}}class Ar extends Sn{constructor(l,c,C,M){super(l,c,C,M),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},c),this.encoding=c.encoding||"mapbox",this.redFactor=c.redFactor,this.greenFactor=c.greenFactor,this.blueFactor=c.blueFactor,this.baseShift=c.baseShift}loadTile(l){return a._(this,void 0,void 0,function*(){const c=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),C=this.map._requestManager.transformRequest(c,"Tile");l.neighboringTiles=this._getNeighboringTiles(l.tileID),l.abortController=new AbortController;try{const M=yield J.getImage(C,l.abortController,this.map._refreshExpiredTiles);if(delete l.abortController,l.aborted)return void(l.state="unloaded");if(M&&M.data){const K=M.data;this.map._refreshExpiredTiles&&M.cacheControl&&M.expires&&l.setExpiryData({cacheControl:M.cacheControl,expires:M.expires});const z=a.b(K)&&a.U()?K:yield this.readImageNow(K),Y={type:this.type,uid:l.uid,source:this.id,rawImageData:z,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!l.actor||l.state==="expired"){l.actor=this.dispatcher.getActor();const ne=yield l.actor.sendAsync({type:"LDT",data:Y});l.dem=ne,l.needsHillshadePrepare=!0,l.needsTerrainPrepare=!0,l.state="loaded"}}}catch(M){if(delete l.abortController,l.aborted)l.state="unloaded";else if(M)throw l.state="errored",M}})}readImageNow(l){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&a.V()){const c=l.width+2,C=l.height+2;try{return new a.R({width:c,height:C},yield a.W(l,-1,-1,c,C))}catch{}}return S.getImageData(l,1)})}_getNeighboringTiles(l){const c=l.canonical,C=Math.pow(2,c.z),M=(c.x-1+C)%C,K=c.x===0?l.wrap-1:l.wrap,z=(c.x+1+C)%C,Y=c.x+1===C?l.wrap+1:l.wrap,ne={};return ne[new a.S(l.overscaledZ,K,c.z,M,c.y).key]={backfilled:!1},ne[new a.S(l.overscaledZ,Y,c.z,z,c.y).key]={backfilled:!1},c.y>0&&(ne[new a.S(l.overscaledZ,K,c.z,M,c.y-1).key]={backfilled:!1},ne[new a.S(l.overscaledZ,l.wrap,c.z,c.x,c.y-1).key]={backfilled:!1},ne[new a.S(l.overscaledZ,Y,c.z,z,c.y-1).key]={backfilled:!1}),c.y+1<C&&(ne[new a.S(l.overscaledZ,K,c.z,M,c.y+1).key]={backfilled:!1},ne[new a.S(l.overscaledZ,l.wrap,c.z,c.x,c.y+1).key]={backfilled:!1},ne[new a.S(l.overscaledZ,Y,c.z,z,c.y+1).key]={backfilled:!1}),ne}unloadTile(l){return a._(this,void 0,void 0,function*(){l.demTexture&&this.map.painter.saveTileTexture(l.demTexture),l.fbo&&(l.fbo.destroy(),delete l.fbo),l.dem&&delete l.dem,delete l.neighboringTiles,l.state="unloaded",l.actor&&(yield l.actor.sendAsync({type:"RDT",data:{type:this.type,uid:l.uid,source:this.id}}))})}}class Bn extends a.E{constructor(l,c,C,M){super(),this.id=l,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=C.getActor(),this.setEventedParent(M),this._data=c.data,this._options=a.e({},c),this._collectResourceTiming=c.collectResourceTiming,c.maxzoom!==void 0&&(this.maxzoom=c.maxzoom),c.type&&(this.type=c.type),c.attribution&&(this.attribution=c.attribution),this.promoteId=c.promoteId,c.clusterMaxZoom!==void 0&&this.maxzoom<=c.clusterMaxZoom&&a.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${c.clusterMaxZoom}".`),this.workerOptions=a.e({source:this.id,cluster:c.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(c.buffer!==void 0?c.buffer:128),tolerance:this._pixelsToTileUnits(c.tolerance!==void 0?c.tolerance:.375),extent:a.X,maxZoom:this.maxzoom,lineMetrics:c.lineMetrics||!1,generateId:c.generateId||!1},superclusterOptions:{maxZoom:c.clusterMaxZoom!==void 0?c.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,c.clusterMinPoints||2),extent:a.X,radius:this._pixelsToTileUnits(c.clusterRadius||50),log:!1,generateId:c.generateId||!1},clusterProperties:c.clusterProperties,filter:c.filter},c.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(l){return l*(a.X/this.tileSize)}load(){return a._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(l){this.map=l,this.load()}setData(l){return this._data=l,this._updateWorkerData(),this}updateData(l){return this._updateWorkerData(l),this}getData(){return a._(this,void 0,void 0,function*(){const l=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:l})})}setClusterOptions(l){return this.workerOptions.cluster=l.cluster,l&&(l.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(l.clusterRadius)),l.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=l.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(l){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:l,source:this.id}})}getClusterChildren(l){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:l,source:this.id}})}getClusterLeaves(l,c,C){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:l,limit:c,offset:C}})}_updateWorkerData(l){return a._(this,void 0,void 0,function*(){const c=a.e({type:this.type},this.workerOptions);l?c.dataDiff=l:typeof this._data=="string"?(c.request=this.map._requestManager.transformRequest(S.resolveURL(this._data),"Source"),c.request.collectResourceTiming=this._collectResourceTiming):c.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new a.k("dataloading",{dataType:"source"}));try{const C=yield this.actor.sendAsync({type:"LD",data:c});if(this._pendingLoads--,this._removed||C.abandoned)return void this.fire(new a.k("dataabort",{dataType:"source"}));let M=null;C.resourceTiming&&C.resourceTiming[this.id]&&(M=C.resourceTiming[this.id].slice(0));const K={dataType:"source"};this._collectResourceTiming&&M&&M.length>0&&a.e(K,{resourceTiming:M}),this.fire(new a.k("data",Object.assign(Object.assign({},K),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},K),{sourceDataType:"content"})))}catch(C){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(C))}})}loaded(){return this._pendingLoads===0}loadTile(l){return a._(this,void 0,void 0,function*(){const c=l.actor?"RT":"LT";l.actor=this.actor;const C={type:this.type,uid:l.uid,tileID:l.tileID,zoom:l.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};l.abortController=new AbortController;const M=yield this.actor.sendAsync({type:c,data:C},l.abortController);delete l.abortController,l.unloadVectorData(),l.aborted||l.loadVectorData(M,this.map.painter,c==="RT")})}abortTile(l){return a._(this,void 0,void 0,function*(){l.abortController&&(l.abortController.abort(),delete l.abortController),l.aborted=!0})}unloadTile(l){return a._(this,void 0,void 0,function*(){l.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:l.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class ar extends a.E{constructor(l,c,C,M){super(),this.flippedWindingOrder=!1,this.id=l,this.dispatcher=C,this.coordinates=c.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(M),this.options=c}load(l){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const c=yield J.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,c&&c.data&&(this.image=c.data,l&&(this.coordinates=l),this._finishLoading())}catch(c){this._request=null,this._loaded=!0,this.fire(new a.j(c))}})}loaded(){return this._loaded}updateImage(l){return l.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=l.url,this.load(l.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(l){this.map=l,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(l){this.coordinates=l;const c=l.map(a.Y.fromLngLat);var C;return this.tileID=function(M){let K=1/0,z=1/0,Y=-1/0,ne=-1/0;for(const Te of M)K=Math.min(K,Te.x),z=Math.min(z,Te.y),Y=Math.max(Y,Te.x),ne=Math.max(ne,Te.y);const se=Math.max(Y-K,ne-z),be=Math.max(0,Math.floor(-Math.log(se)/Math.LN2)),Oe=Math.pow(2,be);return new a.Z(be,Math.floor((K+Y)/2*Oe),Math.floor((z+ne)/2*Oe))}(c),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=c.map(M=>this.tileID.getTilePoint(M)._round()),this.flippedWindingOrder=((C=this.tileCoords)[1].x-C[0].x)*(C[2].y-C[0].y)-(C[1].y-C[0].y)*(C[2].x-C[0].x)<0,this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const l=this.map.painter.context,c=l.gl;this.texture||(this.texture=new ae(l,this.image,c.RGBA),this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE));let C=!1;for(const M in this.tiles){const K=this.tiles[M];K.state!=="loaded"&&(K.state="loaded",K.texture=this.texture,C=!0)}C&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(l){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(l.tileID.canonical)?(this.tiles[String(l.tileID.wrap)]=l,l.buckets={}):l.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Cr extends ar{constructor(l,c,C,M){super(l,c,C,M),this.roundZoom=!0,this.type="video",this.options=c}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;const l=this.options;this.urls=[];for(const c of l.urls)this.urls.push(this.map._requestManager.transformRequest(c,"Source").url);try{const c=yield a.a0(this.urls);if(this._loaded=!0,!c)return;this.video=c,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(c){this.fire(new a.j(c))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(l){if(this.video){const c=this.video.seekable;l<c.start(0)||l>c.end(0)?this.fire(new a.j(new a.$(`sources.${this.id}`,null,`Playback for this video can be set only between the ${c.start(0)} and ${c.end(0)}-second mark.`))):this.video.currentTime=l}}getVideo(){return this.video}onAdd(l){this.map||(this.map=l,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 l=this.map.painter.context,c=l.gl;this.texture?this.video.paused||(this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE),c.texSubImage2D(c.TEXTURE_2D,0,0,0,c.RGBA,c.UNSIGNED_BYTE,this.video)):(this.texture=new ae(l,this.video,c.RGBA),this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE));let C=!1;for(const M in this.tiles){const K=this.tiles[M];K.state!=="loaded"&&(K.state="loaded",K.texture=this.texture,C=!0)}C&&this.fire(new a.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 br extends ar{constructor(l,c,C,M){super(l,c,C,M),c.coordinates?Array.isArray(c.coordinates)&&c.coordinates.length===4&&!c.coordinates.some(K=>!Array.isArray(K)||K.length!==2||K.some(z=>typeof z!="number"))||this.fire(new a.j(new a.$(`sources.${l}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.$(`sources.${l}`,null,'missing required property "coordinates"'))),c.animate&&typeof c.animate!="boolean"&&this.fire(new a.j(new a.$(`sources.${l}`,null,'optional "animate" property must be a boolean value'))),c.canvas?typeof c.canvas=="string"||c.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.$(`sources.${l}`,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 a.j(new a.$(`sources.${l}`,null,'missing required property "canvas"'))),this.options=c,this.animate=c.animate===void 0||c.animate}load(){return a._(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 a.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(l){this.map=l,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let l=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,l=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,l=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const c=this.map.painter.context,C=c.gl;this.texture?(l||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ae(c,this.canvas,C.RGBA,{premultiply:!0});let M=!1;for(const K in this.tiles){const z=this.tiles[K];z.state!=="loaded"&&(z.state="loaded",z.texture=this.texture,M=!0)}M&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const l of[this.canvas.width,this.canvas.height])if(isNaN(l)||l<=0)return!0;return!1}}const _r={},Jr=k=>{switch(k){case"geojson":return Bn;case"image":return ar;case"raster":return Sn;case"raster-dem":return Ar;case"vector":return rn;case"video":return Cr;case"canvas":return br}return _r[k]},wr="RTLPluginLoaded";class hi extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Ke()}_syncState(l){return this.status=l,this.dispatcher.broadcast("SRPS",{pluginStatus:l,pluginURL:this.url}).catch(c=>{throw this.status="error",c})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(l){return a._(this,arguments,void 0,function*(c,C=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=S.resolveURL(c),!this.url)throw new Error(`requested url ${c} is invalid`);if(this.status==="unavailable"){if(!C)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(wr))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ye=null;function de(){return Ye||(Ye=new hi),Ye}class pe{constructor(l,c){this.timeAdded=0,this.fadeEndTime=0,this.tileID=l,this.uid=a.a1(),this.uses=0,this.tileSize=c,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(l){const c=l+this.timeAdded;c<this.fadeEndTime||(this.fadeEndTime=c)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(l){this.demTexture&&l.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(l,c,C){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",l){l.featureIndex&&(this.latestFeatureIndex=l.featureIndex,l.rawTileData?(this.latestRawTileData=l.rawTileData,this.latestFeatureIndex.rawTileData=l.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=l.collisionBoxArray,this.buckets=function(M,K){const z={};if(!K)return z;for(const Y of M){const ne=Y.layerIds.map(se=>K.getLayer(se)).filter(Boolean);if(ne.length!==0){Y.layers=ne,Y.stateDependentLayerIds&&(Y.stateDependentLayers=Y.stateDependentLayerIds.map(se=>ne.filter(be=>be.id===se)[0]));for(const se of ne)z[se.id]=Y}}return z}(l.buckets,c==null?void 0:c.style),this.hasSymbolBuckets=!1;for(const M in this.buckets){const K=this.buckets[M];if(K instanceof a.a3){if(this.hasSymbolBuckets=!0,!C)break;K.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const M in this.buckets){const K=this.buckets[M];if(K instanceof a.a3&&K.hasRTLText){this.hasRTLText=!0,de().lazyLoad();break}}this.queryPadding=0;for(const M in this.buckets){const K=this.buckets[M];this.queryPadding=Math.max(this.queryPadding,c.style.getLayer(M).queryRadius(K))}l.imageAtlas&&(this.imageAtlas=l.imageAtlas),l.glyphAtlasImage&&(this.glyphAtlasImage=l.glyphAtlasImage)}else this.collisionBoxArray=new a.a2}unloadVectorData(){for(const l in this.buckets)this.buckets[l].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(l){return this.buckets[l.id]}upload(l){for(const C in this.buckets){const M=this.buckets[C];M.uploadPending()&&M.upload(l)}const c=l.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ae(l,this.imageAtlas.image,c.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ae(l,this.glyphAtlasImage,c.ALPHA),this.glyphAtlasImage=null)}prepare(l){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(l,this.imageAtlasTexture)}queryRenderedFeatures(l,c,C,M,K,z,Y,ne,se,be){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:M,cameraQueryGeometry:K,scale:z,tileSize:this.tileSize,pixelPosMatrix:be,transform:ne,params:Y,queryPadding:this.queryPadding*se},l,c,C):{}}querySourceFeatures(l,c){const C=this.latestFeatureIndex;if(!C||!C.rawTileData)return;const M=C.loadVTLayers(),K=c&&c.sourceLayer?c.sourceLayer:"",z=M._geojsonTileLayer||M[K];if(!z)return;const Y=a.a4(c&&c.filter),{z:ne,x:se,y:be}=this.tileID.canonical,Oe={z:ne,x:se,y:be};for(let Te=0;Te<z.length;Te++){const $e=z.feature(Te);if(Y.needGeometry){const st=a.a5($e,!0);if(!Y.filter(new a.z(this.tileID.overscaledZ),st,this.tileID.canonical))continue}else if(!Y.filter(new a.z(this.tileID.overscaledZ),$e))continue;const He=C.getId($e,K),ct=new a.a6($e,ne,se,be,He);ct.tile=Oe,l.push(ct)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(l){const c=this.expirationTime;if(l.cacheControl){const C=a.a7(l.cacheControl);C["max-age"]&&(this.expirationTime=Date.now()+1e3*C["max-age"])}else l.expires&&(this.expirationTime=new Date(l.expires).getTime());if(this.expirationTime){const C=Date.now();let M=!1;if(this.expirationTime>C)M=!1;else if(c)if(this.expirationTime<c)M=!0;else{const K=this.expirationTime-c;K?this.expirationTime=C+Math.max(K,3e4):M=!0}else M=!0;M?(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(l,c){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(l).length===0)return;const C=this.latestFeatureIndex.loadVTLayers();for(const M in this.buckets){if(!c.style.hasLayer(M))continue;const K=this.buckets[M],z=K.layers[0].sourceLayer||"_geojsonTileLayer",Y=C[z],ne=l[z];if(!Y||!ne||Object.keys(ne).length===0)continue;K.update(ne,Y,this.imageAtlas&&this.imageAtlas.patternPositions||{});const se=c&&c.style&&c.style.getLayer(M);se&&(this.queryPadding=Math.max(this.queryPadding,se.queryRadius(K)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<S.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(l){this.symbolFadeHoldUntil=S.now()+l}setDependencies(l,c){const C={};for(const M of c)C[M]=!0;this.dependencies[l]=C}hasDependency(l,c){for(const C of l){const M=this.dependencies[C];if(M){for(const K of c)if(M[K])return!0}}return!1}}class Je{constructor(l,c){this.max=l,this.onRemove=c,this.reset()}reset(){for(const l in this.data)for(const c of this.data[l])c.timeout&&clearTimeout(c.timeout),this.onRemove(c.value);return this.data={},this.order=[],this}add(l,c,C){const M=l.wrapped().key;this.data[M]===void 0&&(this.data[M]=[]);const K={value:c,timeout:void 0};if(C!==void 0&&(K.timeout=setTimeout(()=>{this.remove(l,K)},C)),this.data[M].push(K),this.order.push(M),this.order.length>this.max){const z=this._getAndRemoveByKey(this.order[0]);z&&this.onRemove(z)}return this}has(l){return l.wrapped().key in this.data}getAndRemove(l){return this.has(l)?this._getAndRemoveByKey(l.wrapped().key):null}_getAndRemoveByKey(l){const c=this.data[l].shift();return c.timeout&&clearTimeout(c.timeout),this.data[l].length===0&&delete this.data[l],this.order.splice(this.order.indexOf(l),1),c.value}getByKey(l){const c=this.data[l];return c?c[0].value:null}get(l){return this.has(l)?this.data[l.wrapped().key][0].value:null}remove(l,c){if(!this.has(l))return this;const C=l.wrapped().key,M=c===void 0?0:this.data[C].indexOf(c),K=this.data[C][M];return this.data[C].splice(M,1),K.timeout&&clearTimeout(K.timeout),this.data[C].length===0&&delete this.data[C],this.onRemove(K.value),this.order.splice(this.order.indexOf(C),1),this}setMaxSize(l){for(this.max=l;this.order.length>this.max;){const c=this._getAndRemoveByKey(this.order[0]);c&&this.onRemove(c)}return this}filter(l){const c=[];for(const C in this.data)for(const M of this.data[C])l(M.value)||c.push(M);for(const C of c)this.remove(C.value.tileID,C)}}class kt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,c,C){const M=String(c);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][M]=this.stateChanges[l][M]||{},a.e(this.stateChanges[l][M],C),this.deletedStates[l]===null){this.deletedStates[l]={};for(const K in this.state[l])K!==M&&(this.deletedStates[l][K]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][M]===null){this.deletedStates[l][M]={};for(const K in this.state[l][M])C[K]||(this.deletedStates[l][M][K]=null)}else for(const K in C)this.deletedStates[l]&&this.deletedStates[l][M]&&this.deletedStates[l][M][K]===null&&delete this.deletedStates[l][M][K]}removeFeatureState(l,c,C){if(this.deletedStates[l]===null)return;const M=String(c);if(this.deletedStates[l]=this.deletedStates[l]||{},C&&c!==void 0)this.deletedStates[l][M]!==null&&(this.deletedStates[l][M]=this.deletedStates[l][M]||{},this.deletedStates[l][M][C]=null);else if(c!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][M])for(C in this.deletedStates[l][M]={},this.stateChanges[l][M])this.deletedStates[l][M][C]=null;else this.deletedStates[l][M]=null;else this.deletedStates[l]=null}getState(l,c){const C=String(c),M=a.e({},(this.state[l]||{})[C],(this.stateChanges[l]||{})[C]);if(this.deletedStates[l]===null)return{};if(this.deletedStates[l]){const K=this.deletedStates[l][c];if(K===null)return{};for(const z in K)delete M[z]}return M}initializeTileState(l,c){l.setFeatureState(this.state,c)}coalesceChanges(l,c){const C={};for(const M in this.stateChanges){this.state[M]=this.state[M]||{};const K={};for(const z in this.stateChanges[M])this.state[M][z]||(this.state[M][z]={}),a.e(this.state[M][z],this.stateChanges[M][z]),K[z]=this.state[M][z];C[M]=K}for(const M in this.deletedStates){this.state[M]=this.state[M]||{};const K={};if(this.deletedStates[M]===null)for(const z in this.state[M])K[z]={},this.state[M][z]={};else for(const z in this.deletedStates[M]){if(this.deletedStates[M][z]===null)this.state[M][z]={};else for(const Y of Object.keys(this.deletedStates[M][z]))delete this.state[M][z][Y];K[z]=this.state[M][z]}C[M]=C[M]||{},a.e(C[M],K)}if(this.stateChanges={},this.deletedStates={},Object.keys(C).length!==0)for(const M in l)l[M].setFeatureState(C,c)}}function Xt(k,l,c){const C=l.intersectsFrustum(k);if(!c)return C;const M=l.intersectsPlane(c);return C===0||M===0?0:C===2&&M===2?2:1}function it(k,l,c,C,M){let K=k;const z=Math.atan(l/c),Y=Math.hypot(l,c);return K=k+a.a8(C/Y/Math.max(.5,Math.cos(a.aa(M/2)))),K+=1*a.a8(Math.cos(z))/2,K+=a.ab(k-K,-0,0),K}function Ut(k,l){const c=(l.roundZoom?Math.round:Math.floor)(k.zoom+a.a8(k.tileSize/l.tileSize));return Math.max(0,c)}function qe(k,l){const c=k.getCameraFrustum(),C=k.getClippingPlane(),M=k.screenPointToMercatorCoordinate(k.getCameraPoint()),K=a.Y.fromLngLat(k.center,k.elevation);M.z=K.z+Math.cos(k.pitchInRadians)*k.cameraToCenterDistance/k.worldSize;const z=k.getCoveringTilesDetailsProvider(),Y=z.allowVariableZoom(k,l),ne=Ut(k,l),se=l.minzoom||0,be=l.maxzoom!==void 0?l.maxzoom:k.maxZoom,Oe=Math.min(Math.max(0,ne),be),Te=Math.pow(2,Oe),$e=[Te*M.x,Te*M.y,0],He=[Te*K.x,Te*K.y,0],ct=Math.hypot(K.x-M.x,K.y-M.y),st=Math.abs(K.z-M.z),dt=Math.hypot(ct,st),gt=Kt=>({zoom:0,x:0,y:0,wrap:Kt,fullyVisible:!1}),St=[],It=[];if(k.renderWorldCopies&&z.allowWorldCopies())for(let Kt=1;Kt<=3;Kt++)St.push(gt(-Kt)),St.push(gt(Kt));for(St.push(gt(0));St.length>0;){const Kt=St.pop(),zt=Kt.x,Tt=Kt.y;let tn=Kt.fullyVisible;const Zt={x:zt,y:Tt,z:Kt.zoom},vn=z.getTileAABB(Zt,Kt.wrap,k.elevation,l);if(!tn){const Un=Xt(c,vn,C);if(Un===0)continue;tn=Un===2}const _n=z.distanceToTile2d(M.x,M.y,Zt,vn);let gn=ne;Y&&(gn=(l.calculateTileZoom||it)(k.zoom+a.a8(k.tileSize/l.tileSize),_n,st,dt,k.fov)),gn=(l.roundZoom?Math.round:Math.floor)(gn),gn=Math.max(0,gn);const In=Math.min(gn,be);if(Kt.wrap=z.getWrap(K,Zt,Kt.wrap),Kt.zoom>=In){if(Kt.zoom<se)continue;const Un=Oe-Kt.zoom,wn=$e[0]-.5-(zt<<Un),Or=$e[1]-.5-(Tt<<Un),Bi=l.reparseOverscaled?Math.max(Kt.zoom,gn):Kt.zoom;It.push({tileID:new a.S(Kt.zoom===be?Bi:Kt.zoom,Kt.wrap,Kt.zoom,zt,Tt),distanceSq:a.a9([He[0]-.5-zt,He[1]-.5-Tt]),tileDistanceToCamera:Math.sqrt(wn*wn+Or*Or)})}else for(let Un=0;Un<4;Un++)St.push({zoom:Kt.zoom+1,x:(zt<<1)+Un%2,y:(Tt<<1)+(Un>>1),wrap:Kt.wrap,fullyVisible:tn})}return It.sort((Kt,zt)=>Kt.distanceSq-zt.distanceSq).map(Kt=>Kt.tileID)}class fe extends a.E{constructor(l,c,C){super(),this.id=l,this.dispatcher=C,this.on("data",M=>this._dataHandler(M)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((M,K,z,Y)=>{const ne=new(Jr(K.type))(M,K,z,Y);if(ne.id!==M)throw new Error(`Expected Source id to be ${M} instead of ${ne.id}`);return ne})(l,c,C,this),this._tiles={},this._cache=new Je(0,M=>this._unloadTile(M)),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(l){this.map=l,this._maxTileCacheSize=l?l._maxTileCacheSize:null,this._maxTileCacheZoomLevels=l?l._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(l)}onRemove(l){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(l)}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 l in this._tiles){const c=this._tiles[l];if(c.state!=="loaded"&&c.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const l=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,l&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(l,c,C){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(l),this._tileLoaded(l,c,C)}catch(M){l.state="errored",M.status!==404?this._source.fire(new a.j(M,{tile:l})):this.update(this.transform,this.terrain)}})}_unloadTile(l){this._source.unloadTile&&this._source.unloadTile(l)}_abortTile(l){this._source.abortTile&&this._source.abortTile(l),this._source.fire(new a.k("dataabort",{tile:l,coord:l.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(l){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const c in this._tiles){const C=this._tiles[c];C.upload(l),C.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(l=>l.tileID).sort(xe).map(l=>l.key)}getRenderableIds(l){const c=[];for(const C in this._tiles)this._isIdRenderable(C,l)&&c.push(this._tiles[C]);return l?c.sort((C,M)=>{const K=C.tileID,z=M.tileID,Y=new a.P(K.canonical.x,K.canonical.y)._rotate(-this.transform.bearingInRadians),ne=new a.P(z.canonical.x,z.canonical.y)._rotate(-this.transform.bearingInRadians);return K.overscaledZ-z.overscaledZ||ne.y-Y.y||ne.x-Y.x}).map(C=>C.tileID.key):c.map(C=>C.tileID).sort(xe).map(C=>C.key)}hasRenderableParent(l){const c=this.findLoadedParent(l,0);return!!c&&this._isIdRenderable(c.tileID.key)}_isIdRenderable(l,c){return this._tiles[l]&&this._tiles[l].hasData()&&!this._coveredTiles[l]&&(c||!this._tiles[l].holdingForFade())}reload(l){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const c in this._tiles)(l||this._tiles[c].state!=="errored")&&this._reloadTile(c,"reloading")}}_reloadTile(l,c){return a._(this,void 0,void 0,function*(){const C=this._tiles[l];C&&(C.state!=="loading"&&(C.state=c),yield this._loadTile(C,l,c))})}_tileLoaded(l,c,C){l.timeAdded=S.now(),C==="expired"&&(l.refreshedUponExpiration=!0),this._setTileReloadTimer(c,l),this.getSource().type==="raster-dem"&&l.dem&&this._backfillDEM(l),this._state.initializeTileState(l,this.map?this.map.painter:null),l.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:l,coord:l.tileID}))}_backfillDEM(l){const c=this.getRenderableIds();for(let M=0;M<c.length;M++){const K=c[M];if(l.neighboringTiles&&l.neighboringTiles[K]){const z=this.getTileByID(K);C(l,z),C(z,l)}}function C(M,K){M.needsHillshadePrepare=!0,M.needsTerrainPrepare=!0;let z=K.tileID.canonical.x-M.tileID.canonical.x;const Y=K.tileID.canonical.y-M.tileID.canonical.y,ne=Math.pow(2,M.tileID.canonical.z),se=K.tileID.key;z===0&&Y===0||Math.abs(Y)>1||(Math.abs(z)>1&&(Math.abs(z+ne)===1?z+=ne:Math.abs(z-ne)===1&&(z-=ne)),K.dem&&M.dem&&(M.dem.backfillBorder(K.dem,z,Y),M.neighboringTiles&&M.neighboringTiles[se]&&(M.neighboringTiles[se].backfilled=!0)))}}getTile(l){return this.getTileByID(l.key)}getTileByID(l){return this._tiles[l]}_retainLoadedChildren(l,c,C,M){for(const K in this._tiles){let z=this._tiles[K];if(M[K]||!z.hasData()||z.tileID.overscaledZ<=c||z.tileID.overscaledZ>C)continue;let Y=z.tileID;for(;z&&z.tileID.overscaledZ>c+1;){const se=z.tileID.scaledTo(z.tileID.overscaledZ-1);z=this._tiles[se.key],z&&z.hasData()&&(Y=se)}let ne=Y;for(;ne.overscaledZ>c;)if(ne=ne.scaledTo(ne.overscaledZ-1),l[ne.key]||l[ne.canonical.key]){M[Y.key]=Y;break}}}findLoadedParent(l,c){if(l.key in this._loadedParentTiles){const C=this._loadedParentTiles[l.key];return C&&C.tileID.overscaledZ>=c?C:null}for(let C=l.overscaledZ-1;C>=c;C--){const M=l.scaledTo(C),K=this._getLoadedTile(M);if(K)return K}}findLoadedSibling(l){return this._getLoadedTile(l)}_getLoadedTile(l){const c=this._tiles[l.key];return c&&c.hasData()?c:this._cache.getByKey(l.wrapped().key)}updateCacheSize(l){const c=Math.ceil(l.width/this._source.tileSize)+1,C=Math.ceil(l.height/this._source.tileSize)+1,M=Math.floor(c*C*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),K=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,M):M;this._cache.setMaxSize(K)}handleWrapJump(l){const c=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,c){const C={};for(const M in this._tiles){const K=this._tiles[M];K.tileID=K.tileID.unwrapTo(K.tileID.wrap+c),C[K.tileID.key]=K}this._tiles=C;for(const M in this._timers)clearTimeout(this._timers[M]),delete this._timers[M];for(const M in this._tiles)this._setTileReloadTimer(M,this._tiles[M])}}_updateCoveredAndRetainedTiles(l,c,C,M,K,z){const Y={},ne={},se=Object.keys(l),be=S.now();for(const Oe of se){const Te=l[Oe],$e=this._tiles[Oe];if(!$e||$e.fadeEndTime!==0&&$e.fadeEndTime<=be)continue;const He=this.findLoadedParent(Te,c),ct=this.findLoadedSibling(Te),st=He||ct||null;st&&(this._addTile(st.tileID),Y[st.tileID.key]=st.tileID),ne[Oe]=Te}this._retainLoadedChildren(ne,M,C,l);for(const Oe in Y)l[Oe]||(this._coveredTiles[Oe]=!0,l[Oe]=Y[Oe]);if(z){const Oe={},Te={};for(const $e of K)this._tiles[$e.key].hasData()?Oe[$e.key]=$e:Te[$e.key]=$e;for(const $e in Te){const He=Te[$e].children(this._source.maxzoom);this._tiles[He[0].key]&&this._tiles[He[1].key]&&this._tiles[He[2].key]&&this._tiles[He[3].key]&&(Oe[He[0].key]=l[He[0].key]=He[0],Oe[He[1].key]=l[He[1].key]=He[1],Oe[He[2].key]=l[He[2].key]=He[2],Oe[He[3].key]=l[He[3].key]=He[3],delete Te[$e])}for(const $e in Te){const He=Te[$e],ct=this.findLoadedParent(He,this._source.minzoom),st=this.findLoadedSibling(He),dt=ct||st||null;if(dt){Oe[dt.tileID.key]=l[dt.tileID.key]=dt.tileID;for(const gt in Oe)Oe[gt].isChildOf(dt.tileID)&&delete Oe[gt]}}for(const $e in this._tiles)Oe[$e]||(this._coveredTiles[$e]=!0)}}update(l,c){if(!this._sourceLoaded||this._paused)return;let C;this.transform=l,this.terrain=c,this.updateCacheSize(l),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?C=l.getVisibleUnwrappedCoordinates(this._source.tileID).map(be=>new a.S(be.canonical.z,be.wrap,be.canonical.z,be.canonical.x,be.canonical.y)):(C=qe(l,{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:c,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(C=C.filter(be=>this._source.hasTile(be)))):C=[];const M=Ut(l,this._source),K=Math.max(M-fe.maxOverzooming,this._source.minzoom),z=Math.max(M+fe.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const be={};for(const Oe of C)if(Oe.canonical.z>this._source.minzoom){const Te=Oe.scaledTo(Oe.canonical.z-1);be[Te.key]=Te;const $e=Oe.scaledTo(Math.max(this._source.minzoom,Math.min(Oe.canonical.z,5)));be[$e.key]=$e}C=C.concat(Object.values(be))}const Y=C.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Y&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const ne=this._updateRetainedTiles(C,M);p(this._source.type)&&this._updateCoveredAndRetainedTiles(ne,K,z,M,C,c);for(const be in ne)this._tiles[be].clearFadeHold();const se=a.ac(this._tiles,ne);for(const be of se){const Oe=this._tiles[be];Oe.hasSymbolBuckets&&!Oe.holdingForFade()?Oe.setHoldDuration(this.map._fadeDuration):Oe.hasSymbolBuckets&&!Oe.symbolFadeFinished()||this._removeTile(be)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const l in this._tiles)this._tiles[l].holdingForFade()&&this._removeTile(l)}_updateRetainedTiles(l,c){var C;const M={},K={},z=Math.max(c-fe.maxOverzooming,this._source.minzoom),Y=Math.max(c+fe.maxUnderzooming,this._source.minzoom),ne={};for(const se of l){const be=this._addTile(se);M[se.key]=se,be.hasData()||c<this._source.maxzoom&&(ne[se.key]=se)}this._retainLoadedChildren(ne,c,Y,M);for(const se of l){let be=this._tiles[se.key];if(be.hasData())continue;if(c+1>this._source.maxzoom){const Te=se.children(this._source.maxzoom)[0],$e=this.getTile(Te);if($e&&$e.hasData()){M[Te.key]=Te;continue}}else{const Te=se.children(this._source.maxzoom);if(M[Te[0].key]&&M[Te[1].key]&&M[Te[2].key]&&M[Te[3].key])continue}let Oe=be.wasRequested();for(let Te=se.overscaledZ-1;Te>=z;--Te){const $e=se.scaledTo(Te);if(K[$e.key])break;if(K[$e.key]=!0,be=this.getTile($e),!be&&Oe&&(be=this._addTile($e)),be){const He=be.hasData();if((He||!(!((C=this.map)===null||C===void 0)&&C.cancelPendingTileRequestsWhileZooming)||Oe)&&(M[$e.key]=$e),Oe=be.wasRequested(),He)break}}}return M}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const l in this._tiles){const c=[];let C,M=this._tiles[l].tileID;for(;M.overscaledZ>0;){if(M.key in this._loadedParentTiles){C=this._loadedParentTiles[M.key];break}c.push(M.key);const K=M.scaledTo(M.overscaledZ-1);if(C=this._getLoadedTile(K),C)break;M=K}for(const K of c)this._loadedParentTiles[K]=C}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const l in this._tiles){const c=this._tiles[l].tileID,C=this._getLoadedTile(c);this._loadedSiblingTiles[c.key]=C}}_addTile(l){let c=this._tiles[l.key];if(c)return c;c=this._cache.getAndRemove(l),c&&(this._setTileReloadTimer(l.key,c),c.tileID=l,this._state.initializeTileState(c,this.map?this.map.painter:null),this._cacheTimers[l.key]&&(clearTimeout(this._cacheTimers[l.key]),delete this._cacheTimers[l.key],this._setTileReloadTimer(l.key,c)));const C=c;return c||(c=new pe(l,this._source.tileSize*l.overscaleFactor()),this._loadTile(c,l.key,c.state)),c.uses++,this._tiles[l.key]=c,C||this._source.fire(new a.k("dataloading",{tile:c,coord:c.tileID,dataType:"source"})),c}_setTileReloadTimer(l,c){l in this._timers&&(clearTimeout(this._timers[l]),delete this._timers[l]);const C=c.getExpiryTimeout();C&&(this._timers[l]=setTimeout(()=>{this._reloadTile(l,"expired"),delete this._timers[l]},C))}_removeTile(l){const c=this._tiles[l];c&&(c.uses--,delete this._tiles[l],this._timers[l]&&(clearTimeout(this._timers[l]),delete this._timers[l]),c.uses>0||(c.hasData()&&c.state!=="reloading"?this._cache.add(c.tileID,c,c.getExpiryTimeout()):(c.aborted=!0,this._abortTile(c),this._unloadTile(c))))}_dataHandler(l){const c=l.sourceDataType;l.dataType==="source"&&c==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&l.dataType==="source"&&c==="content"&&(this.reload(l.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const l in this._tiles)this._removeTile(l);this._cache.reset()}tilesIn(l,c,C){const M=[],K=this.transform;if(!K)return M;const z=C?K.getCameraQueryGeometry(l):l,Y=l.map(He=>K.screenPointToMercatorCoordinate(He,this.terrain)),ne=z.map(He=>K.screenPointToMercatorCoordinate(He,this.terrain)),se=this.getIds();let be=1/0,Oe=1/0,Te=-1/0,$e=-1/0;for(const He of ne)be=Math.min(be,He.x),Oe=Math.min(Oe,He.y),Te=Math.max(Te,He.x),$e=Math.max($e,He.y);for(let He=0;He<se.length;He++){const ct=this._tiles[se[He]];if(ct.holdingForFade())continue;const st=ct.tileID,dt=Math.pow(2,K.zoom-ct.tileID.overscaledZ),gt=c*ct.queryPadding*a.X/ct.tileSize/dt,St=[st.getTilePoint(new a.Y(be,Oe)),st.getTilePoint(new a.Y(Te,$e))];if(St[0].x-gt<a.X&&St[0].y-gt<a.X&&St[1].x+gt>=0&&St[1].y+gt>=0){const It=Y.map(zt=>st.getTilePoint(zt)),Kt=ne.map(zt=>st.getTilePoint(zt));M.push({tile:ct,tileID:st,queryGeometry:It,cameraQueryGeometry:Kt,scale:dt})}}return M}getVisibleCoordinates(l){const c=this.getRenderableIds(l).map(C=>this._tiles[C].tileID);return this.transform&&this.transform.populateCache(c),c}hasTransition(){if(this._source.hasTransition())return!0;if(p(this._source.type)){const l=S.now();for(const c in this._tiles)if(this._tiles[c].fadeEndTime>=l)return!0}return!1}setFeatureState(l,c,C){this._state.updateState(l=l||"_geojsonTileLayer",c,C)}removeFeatureState(l,c,C){this._state.removeFeatureState(l=l||"_geojsonTileLayer",c,C)}getFeatureState(l,c){return this._state.getState(l=l||"_geojsonTileLayer",c)}setDependencies(l,c,C){const M=this._tiles[l];M&&M.setDependencies(c,C)}reloadTilesForDependencies(l,c){for(const C in this._tiles)this._tiles[C].hasDependency(l,c)&&this._reloadTile(C,"reloading");this._cache.filter(C=>!C.hasDependency(l,c))}}function xe(k,l){const c=Math.abs(2*k.wrap)-+(k.wrap<0),C=Math.abs(2*l.wrap)-+(l.wrap<0);return k.overscaledZ-l.overscaledZ||C-c||l.canonical.y-k.canonical.y||l.canonical.x-k.canonical.x}function p(k){return k==="raster"||k==="image"||k==="video"}fe.maxOverzooming=10,fe.maxUnderzooming=3;class Qe{constructor(l,c){this.reset(l,c)}reset(l,c){this.points=l||[],this._distances=[0];for(let C=1;C<this.points.length;C++)this._distances[C]=this._distances[C-1]+this.points[C].dist(this.points[C-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(c||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(l){if(this.points.length===1)return this.points[0];l=a.ab(l,0,1);let c=1,C=this._distances[c];const M=l*this.paddedLength+this.padding;for(;C<M&&c<this._distances.length;)C=this._distances[++c];const K=c-1,z=this._distances[K],Y=C-z,ne=Y>0?(M-z)/Y:0;return this.points[K].mult(1-ne).add(this.points[c].mult(ne))}}function pt(k,l){let c=!0;return k==="always"||k!=="never"&&l!=="never"||(c=!1),c}class ft{constructor(l,c,C){const M=this.boxCells=[],K=this.circleCells=[];this.xCellCount=Math.ceil(l/C),this.yCellCount=Math.ceil(c/C);for(let z=0;z<this.xCellCount*this.yCellCount;z++)M.push([]),K.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=l,this.height=c,this.xScale=this.xCellCount/l,this.yScale=this.yCellCount/c,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(l,c,C,M,K){this._forEachCell(c,C,M,K,this._insertBoxCell,this.boxUid++),this.boxKeys.push(l),this.bboxes.push(c),this.bboxes.push(C),this.bboxes.push(M),this.bboxes.push(K)}insertCircle(l,c,C,M){this._forEachCell(c-M,C-M,c+M,C+M,this._insertCircleCell,this.circleUid++),this.circleKeys.push(l),this.circles.push(c),this.circles.push(C),this.circles.push(M)}_insertBoxCell(l,c,C,M,K,z){this.boxCells[K].push(z)}_insertCircleCell(l,c,C,M,K,z){this.circleCells[K].push(z)}_query(l,c,C,M,K,z,Y){if(C<0||l>this.width||M<0||c>this.height)return[];const ne=[];if(l<=0&&c<=0&&this.width<=C&&this.height<=M){if(K)return[{key:null,x1:l,y1:c,x2:C,y2:M}];for(let se=0;se<this.boxKeys.length;se++)ne.push({key:this.boxKeys[se],x1:this.bboxes[4*se],y1:this.bboxes[4*se+1],x2:this.bboxes[4*se+2],y2:this.bboxes[4*se+3]});for(let se=0;se<this.circleKeys.length;se++){const be=this.circles[3*se],Oe=this.circles[3*se+1],Te=this.circles[3*se+2];ne.push({key:this.circleKeys[se],x1:be-Te,y1:Oe-Te,x2:be+Te,y2:Oe+Te})}}else this._forEachCell(l,c,C,M,this._queryCell,ne,{hitTest:K,overlapMode:z,seenUids:{box:{},circle:{}}},Y);return ne}query(l,c,C,M){return this._query(l,c,C,M,!1,null)}hitTest(l,c,C,M,K,z){return this._query(l,c,C,M,!0,K,z).length>0}hitTestCircle(l,c,C,M,K){const z=l-C,Y=l+C,ne=c-C,se=c+C;if(Y<0||z>this.width||se<0||ne>this.height)return!1;const be=[];return this._forEachCell(z,ne,Y,se,this._queryCellCircle,be,{hitTest:!0,overlapMode:M,circle:{x:l,y:c,radius:C},seenUids:{box:{},circle:{}}},K),be.length>0}_queryCell(l,c,C,M,K,z,Y,ne){const{seenUids:se,hitTest:be,overlapMode:Oe}=Y,Te=this.boxCells[K];if(Te!==null){const He=this.bboxes;for(const ct of Te)if(!se.box[ct]){se.box[ct]=!0;const st=4*ct,dt=this.boxKeys[ct];if(l<=He[st+2]&&c<=He[st+3]&&C>=He[st+0]&&M>=He[st+1]&&(!ne||ne(dt))&&(!be||!pt(Oe,dt.overlapMode))&&(z.push({key:dt,x1:He[st],y1:He[st+1],x2:He[st+2],y2:He[st+3]}),be))return!0}}const $e=this.circleCells[K];if($e!==null){const He=this.circles;for(const ct of $e)if(!se.circle[ct]){se.circle[ct]=!0;const st=3*ct,dt=this.circleKeys[ct];if(this._circleAndRectCollide(He[st],He[st+1],He[st+2],l,c,C,M)&&(!ne||ne(dt))&&(!be||!pt(Oe,dt.overlapMode))){const gt=He[st],St=He[st+1],It=He[st+2];if(z.push({key:dt,x1:gt-It,y1:St-It,x2:gt+It,y2:St+It}),be)return!0}}}return!1}_queryCellCircle(l,c,C,M,K,z,Y,ne){const{circle:se,seenUids:be,overlapMode:Oe}=Y,Te=this.boxCells[K];if(Te!==null){const He=this.bboxes;for(const ct of Te)if(!be.box[ct]){be.box[ct]=!0;const st=4*ct,dt=this.boxKeys[ct];if(this._circleAndRectCollide(se.x,se.y,se.radius,He[st+0],He[st+1],He[st+2],He[st+3])&&(!ne||ne(dt))&&!pt(Oe,dt.overlapMode))return z.push(!0),!0}}const $e=this.circleCells[K];if($e!==null){const He=this.circles;for(const ct of $e)if(!be.circle[ct]){be.circle[ct]=!0;const st=3*ct,dt=this.circleKeys[ct];if(this._circlesCollide(He[st],He[st+1],He[st+2],se.x,se.y,se.radius)&&(!ne||ne(dt))&&!pt(Oe,dt.overlapMode))return z.push(!0),!0}}}_forEachCell(l,c,C,M,K,z,Y,ne){const se=this._convertToXCellCoord(l),be=this._convertToYCellCoord(c),Oe=this._convertToXCellCoord(C),Te=this._convertToYCellCoord(M);for(let $e=se;$e<=Oe;$e++)for(let He=be;He<=Te;He++)if(K.call(this,l,c,C,M,this.xCellCount*He+$e,z,Y,ne))return}_convertToXCellCoord(l){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(l*this.xScale)))}_convertToYCellCoord(l){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(l*this.yScale)))}_circlesCollide(l,c,C,M,K,z){const Y=M-l,ne=K-c,se=C+z;return se*se>Y*Y+ne*ne}_circleAndRectCollide(l,c,C,M,K,z,Y){const ne=(z-M)/2,se=Math.abs(l-(M+ne));if(se>ne+C)return!1;const be=(Y-K)/2,Oe=Math.abs(c-(K+be));if(Oe>be+C)return!1;if(se<=ne||Oe<=be)return!0;const Te=se-ne,$e=Oe-be;return Te*Te+$e*$e<=C*C}}function Et(k,l,c){const C=a.H();if(!k){const{vecSouth:Oe,vecEast:Te}=nn(l),$e=g();$e[0]=Te[0],$e[1]=Te[1],$e[2]=Oe[0],$e[3]=Oe[1],M=$e,(be=(z=(K=$e)[0])*(se=K[3])-(ne=K[2])*(Y=K[1]))&&(M[0]=se*(be=1/be),M[1]=-Y*be,M[2]=-ne*be,M[3]=z*be),C[0]=$e[0],C[1]=$e[1],C[4]=$e[2],C[5]=$e[3]}var M,K,z,Y,ne,se,be;return a.K(C,C,[1/c,1/c,1]),C}function Ct(k,l,c,C){if(k){const M=a.H();if(!l){const{vecSouth:K,vecEast:z}=nn(c);M[0]=z[0],M[1]=z[1],M[4]=K[0],M[5]=K[1]}return a.K(M,M,[C,C,1]),M}return c.pixelsToClipSpaceMatrix}function nn(k){const l=Math.cos(k.rollInRadians),c=Math.sin(k.rollInRadians),C=Math.cos(k.pitchInRadians),M=Math.cos(k.bearingInRadians),K=Math.sin(k.bearingInRadians),z=a.ad();z[0]=-M*C*c-K*l,z[1]=-K*C*c+M*l;const Y=a.ae(z);Y<1e-9?a.af(z):a.ag(z,z,1/Y);const ne=a.ad();ne[0]=M*C*l-K*c,ne[1]=K*C*l+M*c;const se=a.ae(ne);return se<1e-9?a.af(ne):a.ag(ne,ne,1/se),{vecEast:ne,vecSouth:z}}function Yt(k,l,c,C){let M;C?(M=[k,l,C(k,l),1],a.al(M,M,c)):(M=[k,l,0,1],Xr(M,M,c));const K=M[3];return{point:new a.P(M[0]/K,M[1]/K),signedDistanceFromCamera:K,isOccluded:!1}}function Gt(k,l){return .5+k/l*.5}function wt(k,l){return k.x>=-l[0]&&k.x<=l[0]&&k.y>=-l[1]&&k.y<=l[1]}function Tn(k,l,c,C,M,K,z,Y,ne,se,be,Oe,Te){const $e=c?k.textSizeData:k.iconSizeData,He=a.ah($e,l.transform.zoom),ct=[256/l.width*2+1,256/l.height*2+1],st=c?k.text.dynamicLayoutVertexArray:k.icon.dynamicLayoutVertexArray;st.clear();const dt=k.lineVertexArray,gt=c?k.text.placedSymbolArray:k.icon.placedSymbolArray,St=l.transform.width/l.transform.height;let It=!1;for(let Kt=0;Kt<gt.length;Kt++){const zt=gt.get(Kt);if(zt.hidden||zt.writingMode===a.ai.vertical&&!It){ri(zt.numGlyphs,st);continue}It=!1;const Tt=new a.P(zt.anchorX,zt.anchorY),tn={getElevation:Te,pitchedLabelPlaneMatrix:C,lineVertexArray:dt,pitchWithMap:K,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:l.transform,tileAnchorPoint:Tt,unwrappedTileID:ne,width:se,height:be,translation:Oe},Zt=fr(zt.anchorX,zt.anchorY,tn);if(!wt(Zt.point,ct)){ri(zt.numGlyphs,st);continue}const vn=Gt(l.transform.cameraToCenterDistance,Zt.signedDistanceFromCamera),_n=a.aj($e,He,zt),gn=K?_n*l.transform.getPitchedTextCorrection(zt.anchorX,zt.anchorY,ne)/vn:_n*vn,In=Pr({projectionContext:tn,pitchedLabelPlaneMatrixInverse:M,symbol:zt,fontSize:gn,flip:!1,keepUpright:z,glyphOffsetArray:k.glyphOffsetArray,dynamicLayoutVertexArray:st,aspectRatio:St,rotateToLine:Y});It=In.useVertical,(In.notEnoughRoom||It||In.needsFlipping&&Pr({projectionContext:tn,pitchedLabelPlaneMatrixInverse:M,symbol:zt,fontSize:gn,flip:!0,keepUpright:z,glyphOffsetArray:k.glyphOffsetArray,dynamicLayoutVertexArray:st,aspectRatio:St,rotateToLine:Y}).notEnoughRoom)&&ri(zt.numGlyphs,st)}c?k.text.dynamicLayoutVertexBuffer.updateData(st):k.icon.dynamicLayoutVertexBuffer.updateData(st)}function En(k,l,c,C,M,K,z,Y){const ne=K.glyphStartIndex+K.numGlyphs,se=K.lineStartIndex,be=K.lineStartIndex+K.lineLength,Oe=l.getoffsetX(K.glyphStartIndex),Te=l.getoffsetX(ne-1),$e=Pi(k*Oe,c,C,M,K.segment,se,be,Y,z);if(!$e)return null;const He=Pi(k*Te,c,C,M,K.segment,se,be,Y,z);return He?Y.projectionCache.anyProjectionOccluded?null:{first:$e,last:He}:null}function sr(k,l,c,C){return k===a.ai.horizontal&&Math.abs(c.y-l.y)>Math.abs(c.x-l.x)*C?{useVertical:!0}:(k===a.ai.vertical?l.y<c.y:l.x>c.x)?{needsFlipping:!0}:null}function Pr(k){const{projectionContext:l,pitchedLabelPlaneMatrixInverse:c,symbol:C,fontSize:M,flip:K,keepUpright:z,glyphOffsetArray:Y,dynamicLayoutVertexArray:ne,aspectRatio:se,rotateToLine:be}=k,Oe=M/24,Te=C.lineOffsetX*Oe,$e=C.lineOffsetY*Oe;let He;if(C.numGlyphs>1){const ct=C.glyphStartIndex+C.numGlyphs,st=C.lineStartIndex,dt=C.lineStartIndex+C.lineLength,gt=En(Oe,Y,Te,$e,K,C,be,l);if(!gt)return{notEnoughRoom:!0};const St=zr(gt.first.point.x,gt.first.point.y,l,c),It=zr(gt.last.point.x,gt.last.point.y,l,c);if(z&&!K){const Kt=sr(C.writingMode,St,It,se);if(Kt)return Kt}He=[gt.first];for(let Kt=C.glyphStartIndex+1;Kt<ct-1;Kt++)He.push(Pi(Oe*Y.getoffsetX(Kt),Te,$e,K,C.segment,st,dt,l,be));He.push(gt.last)}else{if(z&&!K){const st=ir(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,dt=C.lineStartIndex+C.segment+1,gt=new a.P(l.lineVertexArray.getx(dt),l.lineVertexArray.gety(dt)),St=ir(gt.x,gt.y,l),It=St.signedDistanceFromCamera>0?St.point:an(l.tileAnchorPoint,gt,st,1,l),Kt=zr(st.x,st.y,l,c),zt=zr(It.x,It.y,l,c),Tt=sr(C.writingMode,Kt,zt,se);if(Tt)return Tt}const ct=Pi(Oe*Y.getoffsetX(C.glyphStartIndex),Te,$e,K,C.segment,C.lineStartIndex,C.lineStartIndex+C.lineLength,l,be);if(!ct||l.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};He=[ct]}for(const ct of He)a.ak(ne,ct.point,ct.angle);return{}}function an(k,l,c,C,M){const K=k.add(k.sub(l)._unit()),z=ir(K.x,K.y,M).point,Y=c.sub(z);return c.add(Y._mult(C/Y.mag()))}function Wn(k,l,c){const C=l.projectionCache;if(C.projections[k])return C.projections[k];const M=new a.P(l.lineVertexArray.getx(k),l.lineVertexArray.gety(k)),K=ir(M.x,M.y,l);if(K.signedDistanceFromCamera>0)return C.projections[k]=K.point,C.anyProjectionOccluded=C.anyProjectionOccluded||K.isOccluded,K.point;const z=k-c.direction;return an(c.distanceFromAnchor===0?l.tileAnchorPoint:new a.P(l.lineVertexArray.getx(z),l.lineVertexArray.gety(z)),M,c.previousVertex,c.absOffsetX-c.distanceFromAnchor+1,l)}function ir(k,l,c){const C=k+c.translation[0],M=l+c.translation[1];let K;return c.pitchWithMap?(K=Yt(C,M,c.pitchedLabelPlaneMatrix,c.getElevation),K.isOccluded=!1):(K=c.transform.projectTileCoordinates(C,M,c.unwrappedTileID,c.getElevation),K.point.x=(.5*K.point.x+.5)*c.width,K.point.y=(.5*-K.point.y+.5)*c.height),K}function zr(k,l,c,C){if(c.pitchWithMap){const M=[k,l,0,1];return a.al(M,M,C),c.transform.projectTileCoordinates(M[0]/M[3],M[1]/M[3],c.unwrappedTileID,c.getElevation).point}return{x:k/c.width*2-1,y:l/c.height*2-1}}function fr(k,l,c){return c.transform.projectTileCoordinates(k,l,c.unwrappedTileID,c.getElevation)}function hr(k,l,c){return k._unit()._perp()._mult(l*c)}function zn(k,l,c,C,M,K,z,Y,ne){if(Y.projectionCache.offsets[k])return Y.projectionCache.offsets[k];const se=c.add(l);if(k+ne.direction<C||k+ne.direction>=M)return Y.projectionCache.offsets[k]=se,se;const be=Wn(k+ne.direction,Y,ne),Oe=hr(be.sub(c),z,ne.direction),Te=c.add(Oe),$e=be.add(Oe);return Y.projectionCache.offsets[k]=a.am(K,se,Te,$e)||se,Y.projectionCache.offsets[k]}function Pi(k,l,c,C,M,K,z,Y,ne){const se=C?k-l:k+l;let be=se>0?1:-1,Oe=0;C&&(be*=-1,Oe=Math.PI),be<0&&(Oe+=Math.PI);let Te,$e=be>0?K+M:K+M+1;Y.projectionCache.cachedAnchorPoint?Te=Y.projectionCache.cachedAnchorPoint:(Te=ir(Y.tileAnchorPoint.x,Y.tileAnchorPoint.y,Y).point,Y.projectionCache.cachedAnchorPoint=Te);let He,ct,st=Te,dt=Te,gt=0,St=0;const It=Math.abs(se),Kt=[];let zt;for(;gt+St<=It;){if($e+=be,$e<K||$e>=z)return null;gt+=St,dt=st,ct=He;const Zt={absOffsetX:It,direction:be,distanceFromAnchor:gt,previousVertex:dt};if(st=Wn($e,Y,Zt),c===0)Kt.push(dt),zt=st.sub(dt);else{let vn;const _n=st.sub(dt);vn=_n.mag()===0?hr(Wn($e+be,Y,Zt).sub(st),c,be):hr(_n,c,be),ct||(ct=dt.add(vn)),He=zn($e,vn,st,K,z,ct,c,Y,Zt),Kt.push(ct),zt=He.sub(ct)}St=zt.mag()}const Tt=zt._mult((It-gt)/St)._add(ct||dt),tn=Oe+Math.atan2(st.y-dt.y,st.x-dt.x);return Kt.push(Tt),{point:Tt,angle:ne?tn:0,path:Kt}}const po=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ri(k,l){for(let c=0;c<k;c++){const C=l.length;l.resize(C+4),l.float32.set(po,3*C)}}function Xr(k,l,c){const C=l[0],M=l[1];return k[0]=c[0]*C+c[4]*M+c[12],k[1]=c[1]*C+c[5]*M+c[13],k[3]=c[3]*C+c[7]*M+c[15],k}const ii=100;class mo{constructor(l,c=new ft(l.width+200,l.height+200,25),C=new ft(l.width+200,l.height+200,25)){this.transform=l,this.grid=c,this.ignoredGrid=C,this.pitchFactor=Math.cos(l.pitch*Math.PI/180)*l.cameraToCenterDistance,this.screenRightBoundary=l.width+ii,this.screenBottomBoundary=l.height+ii,this.gridRightBoundary=l.width+200,this.gridBottomBoundary=l.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(l,c,C,M,K,z,Y,ne,se,be,Oe,Te){const $e=this.projectAndGetPerspectiveRatio(l.anchorPointX+ne[0],l.anchorPointY+ne[1],K,be,Te),He=C*$e.perspectiveRatio;let ct;if(z||Y)ct=this._projectCollisionBox(l,He,M,K,z,Y,ne,$e,be,Oe,Te);else{const zt=$e.x+(Oe?Oe.x*He:0),Tt=$e.y+(Oe?Oe.y*He:0);ct={allPointsOccluded:!1,box:[zt+l.x1*He,Tt+l.y1*He,zt+l.x2*He,Tt+l.y2*He]}}const[st,dt,gt,St]=ct.box,It=z?ct.allPointsOccluded:$e.isOccluded;let Kt=It;return Kt||(Kt=$e.perspectiveRatio<this.perspectiveRatioCutoff),Kt||(Kt=!this.isInsideGrid(st,dt,gt,St)),Kt||c!=="always"&&this.grid.hitTest(st,dt,gt,St,c,se)?{box:[st,dt,gt,St],placeable:!1,offscreen:!1,occluded:It}:{box:[st,dt,gt,St],placeable:!0,offscreen:this.isOffscreen(st,dt,gt,St),occluded:It}}placeCollisionCircles(l,c,C,M,K,z,Y,ne,se,be,Oe,Te,$e,He){const ct=[],st=new a.P(c.anchorX,c.anchorY),dt=this.getPerspectiveRatio(st.x,st.y,z,He),gt=(se?K*this.transform.getPitchedTextCorrection(c.anchorX,c.anchorY,z)/dt:K*dt)/a.as,St={getElevation:He,pitchedLabelPlaneMatrix:Y,lineVertexArray:C,pitchWithMap:se,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:st,unwrappedTileID:z,width:this.transform.width,height:this.transform.height,translation:$e},It=En(gt,M,c.lineOffsetX*gt,c.lineOffsetY*gt,!1,c,!1,St);let Kt=!1,zt=!1,Tt=!0;if(It){const tn=.5*Oe*dt+Te,Zt=new a.P(-100,-100),vn=new a.P(this.screenRightBoundary,this.screenBottomBoundary),_n=new Qe,gn=It.first,In=It.last;let Un=[];for(let Bi=gn.path.length-1;Bi>=1;Bi--)Un.push(gn.path[Bi]);for(let Bi=1;Bi<In.path.length;Bi++)Un.push(In.path[Bi]);const wn=2.5*tn;if(se){const Bi=this.projectPathToScreenSpace(Un,St);Un=Bi.some(Hi=>Hi.signedDistanceFromCamera<=0)?[]:Bi.map(Hi=>Hi.point)}let Or=[];if(Un.length>0){const Bi=Un[0].clone(),Hi=Un[0].clone();for(let Oo=1;Oo<Un.length;Oo++)Bi.x=Math.min(Bi.x,Un[Oo].x),Bi.y=Math.min(Bi.y,Un[Oo].y),Hi.x=Math.max(Hi.x,Un[Oo].x),Hi.y=Math.max(Hi.y,Un[Oo].y);Or=Bi.x>=Zt.x&&Hi.x<=vn.x&&Bi.y>=Zt.y&&Hi.y<=vn.y?[Un]:Hi.x<Zt.x||Bi.x>vn.x||Hi.y<Zt.y||Bi.y>vn.y?[]:a.ao([Un],Zt.x,Zt.y,vn.x,vn.y)}for(const Bi of Or){_n.reset(Bi,.25*tn);let Hi=0;Hi=_n.length<=.5*tn?1:Math.ceil(_n.paddedLength/wn)+1;for(let Oo=0;Oo<Hi;Oo++){const Ei=Oo/Math.max(Hi-1,1),jo=_n.lerp(Ei),zo=jo.x+ii,xo=jo.y+ii;ct.push(zo,xo,tn,0);const go=zo-tn,Es=xo-tn,No=zo+tn,ca=xo+tn;if(Tt=Tt&&this.isOffscreen(go,Es,No,ca),zt=zt||this.isInsideGrid(go,Es,No,ca),l!=="always"&&this.grid.hitTestCircle(zo,xo,tn,l,be)&&(Kt=!0,!ne))return{circles:[],offscreen:!1,collisionDetected:Kt}}}}return{circles:!ne&&Kt||!zt||dt<this.perspectiveRatioCutoff?[]:ct,offscreen:Tt,collisionDetected:Kt}}projectPathToScreenSpace(l,c){const C=function(M,K){const z=a.H();return a.an(z,K.pitchedLabelPlaneMatrix),M.map(Y=>{const ne=Yt(Y.x,Y.y,z,K.getElevation),se=K.transform.projectTileCoordinates(ne.point.x,ne.point.y,K.unwrappedTileID,K.getElevation);return se.point.x=(.5*se.point.x+.5)*K.width,se.point.y=(.5*-se.point.y+.5)*K.height,se})}(l,c);return function(M){let K=0,z=0,Y=0,ne=0;for(let se=0;se<M.length;se++)M[se].isOccluded?(Y=se+1,ne=0):(ne++,ne>z&&(z=ne,K=Y));return M.slice(K,K+z)}(C)}queryRenderedSymbols(l){if(l.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const c=[];let C=1/0,M=1/0,K=-1/0,z=-1/0;for(const be of l){const Oe=new a.P(be.x+ii,be.y+ii);C=Math.min(C,Oe.x),M=Math.min(M,Oe.y),K=Math.max(K,Oe.x),z=Math.max(z,Oe.y),c.push(Oe)}const Y=this.grid.query(C,M,K,z).concat(this.ignoredGrid.query(C,M,K,z)),ne={},se={};for(const be of Y){const Oe=be.key;if(ne[Oe.bucketInstanceId]===void 0&&(ne[Oe.bucketInstanceId]={}),ne[Oe.bucketInstanceId][Oe.featureIndex])continue;const Te=[new a.P(be.x1,be.y1),new a.P(be.x2,be.y1),new a.P(be.x2,be.y2),new a.P(be.x1,be.y2)];a.ap(c,Te)&&(ne[Oe.bucketInstanceId][Oe.featureIndex]=!0,se[Oe.bucketInstanceId]===void 0&&(se[Oe.bucketInstanceId]=[]),se[Oe.bucketInstanceId].push(Oe.featureIndex))}return se}insertCollisionBox(l,c,C,M,K,z){(C?this.ignoredGrid:this.grid).insert({bucketInstanceId:M,featureIndex:K,collisionGroupID:z,overlapMode:c},l[0],l[1],l[2],l[3])}insertCollisionCircles(l,c,C,M,K,z){const Y=C?this.ignoredGrid:this.grid,ne={bucketInstanceId:M,featureIndex:K,collisionGroupID:z,overlapMode:c};for(let se=0;se<l.length;se+=4)Y.insertCircle(ne,l[se],l[se+1],l[se+2])}projectAndGetPerspectiveRatio(l,c,C,M,K){if(K){let z;M?(z=[l,c,M(l,c),1],a.al(z,z,K)):(z=[l,c,0,1],Xr(z,z,K));const Y=z[3];return{x:(z[0]/Y+1)/2*this.transform.width+ii,y:(-z[1]/Y+1)/2*this.transform.height+ii,perspectiveRatio:.5+this.transform.cameraToCenterDistance/Y*.5,isOccluded:!1,signedDistanceFromCamera:Y}}{const z=this.transform.projectTileCoordinates(l,c,C,M);return{x:(z.point.x+1)/2*this.transform.width+ii,y:(1-z.point.y)/2*this.transform.height+ii,perspectiveRatio:.5+this.transform.cameraToCenterDistance/z.signedDistanceFromCamera*.5,isOccluded:z.isOccluded,signedDistanceFromCamera:z.signedDistanceFromCamera}}}getPerspectiveRatio(l,c,C,M){const K=this.transform.projectTileCoordinates(l,c,C,M);return .5+this.transform.cameraToCenterDistance/K.signedDistanceFromCamera*.5}isOffscreen(l,c,C,M){return C<ii||l>=this.screenRightBoundary||M<ii||c>this.screenBottomBoundary}isInsideGrid(l,c,C,M){return C>=0&&l<this.gridRightBoundary&&M>=0&&c<this.gridBottomBoundary}getViewportMatrix(){const l=a.aq([]);return a.J(l,l,[-100,-100,0]),l}_projectCollisionBox(l,c,C,M,K,z,Y,ne,se,be,Oe){let Te=1,$e=0,He=0,ct=1;const st=l.anchorPointX+Y[0],dt=l.anchorPointY+Y[1];if(z&&!K){const Un=this.projectAndGetPerspectiveRatio(st+1,dt,M,se,Oe),wn=Un.x-ne.x,Or=Math.atan((Un.y-ne.y)/wn)+(wn<0?Math.PI:0),Bi=Math.sin(Or),Hi=Math.cos(Or);Te=Hi,$e=Bi,He=-Bi,ct=Hi}else if(!z&&K){const Un=nn(this.transform);Te=Un.vecEast[0],$e=Un.vecEast[1],He=Un.vecSouth[0],ct=Un.vecSouth[1]}let gt=ne.x,St=ne.y,It=c;K&&(gt=st,St=dt,It=Math.pow(2,-(this.transform.zoom-C.overscaledZ)),It*=this.transform.getPitchedTextCorrection(st,dt,M),be||(It*=a.ab(.5+ne.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),be&&(gt+=Te*be.x*It+He*be.y*It,St+=$e*be.x*It+ct*be.y*It);const Kt=l.x1*It,zt=l.x2*It,Tt=(Kt+zt)/2,tn=l.y1*It,Zt=l.y2*It,vn=(tn+Zt)/2,_n=[{offsetX:Kt,offsetY:tn},{offsetX:Tt,offsetY:tn},{offsetX:zt,offsetY:tn},{offsetX:zt,offsetY:vn},{offsetX:zt,offsetY:Zt},{offsetX:Tt,offsetY:Zt},{offsetX:Kt,offsetY:Zt},{offsetX:Kt,offsetY:vn}];let gn=[];for(const{offsetX:Un,offsetY:wn}of _n)gn.push(new a.P(gt+Te*Un+He*wn,St+$e*Un+ct*wn));let In=!1;if(K){const Un=gn.map(wn=>this.projectAndGetPerspectiveRatio(wn.x,wn.y,M,se,Oe));In=Un.some(wn=>!wn.isOccluded),gn=Un.map(wn=>new a.P(wn.x,wn.y))}else In=!0;return{box:a.ar(gn),allPointsOccluded:!In}}}class Mi{constructor(l,c,C,M){this.opacity=l?Math.max(0,Math.min(1,l.opacity+(l.placed?c:-c))):M&&C?1:0,this.placed=C}isHidden(){return this.opacity===0&&!this.placed}}class ka{constructor(l,c,C,M,K){this.text=new Mi(l?l.text:null,c,C,K),this.icon=new Mi(l?l.icon:null,c,M,K)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ns{constructor(l,c,C){this.text=l,this.icon=c,this.skipFade=C}}class wo{constructor(l,c,C,M,K){this.bucketInstanceId=l,this.featureIndex=c,this.sourceLayerIndex=C,this.bucketIndex=M,this.tileID=K}}class Ua{constructor(l){this.crossSourceCollisions=l,this.maxGroupID=0,this.collisionGroups={}}get(l){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[l]){const c=++this.maxGroupID;this.collisionGroups[l]={ID:c,predicate:C=>C.collisionGroupID===c}}return this.collisionGroups[l]}}function Ya(k,l,c,C,M){const{horizontalAlign:K,verticalAlign:z}=a.ay(k);return new a.P(-(K-.5)*l+C[0]*M,-(z-.5)*c+C[1]*M)}class Vi{constructor(l,c,C,M,K){this.transform=l.clone(),this.terrain=c,this.collisionIndex=new mo(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=C,this.retainedQueryData={},this.collisionGroups=new Ua(M),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=K,K&&(K.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(l){const c=this.terrain;return c?(C,M)=>c.getElevation(l,C,M):null}getBucketParts(l,c,C,M){const K=C.getBucket(c),z=C.latestFeatureIndex;if(!K||!z||c.id!==K.layerIds[0])return;const Y=C.collisionBoxArray,ne=K.layers[0].layout,se=K.layers[0].paint,be=Math.pow(2,this.transform.zoom-C.tileID.overscaledZ),Oe=C.tileSize/a.X,Te=C.tileID.toUnwrapped(),$e=ne.get("text-rotation-alignment")==="map",He=a.at(C,1,this.transform.zoom),ct=a.au(this.collisionIndex.transform,C,se.get("text-translate"),se.get("text-translate-anchor")),st=a.au(this.collisionIndex.transform,C,se.get("icon-translate"),se.get("icon-translate-anchor")),dt=Et($e,this.transform,He);this.retainedQueryData[K.bucketInstanceId]=new wo(K.bucketInstanceId,z,K.sourceLayerIndex,K.index,C.tileID);const gt={bucket:K,layout:ne,translationText:ct,translationIcon:st,unwrappedTileID:Te,pitchedLabelPlaneMatrix:dt,scale:be,textPixelRatio:Oe,holdingForFade:C.holdingForFade(),collisionBoxArray:Y,partiallyEvaluatedTextSize:a.ah(K.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(K.sourceID)};if(M)for(const St of K.sortKeyRanges){const{sortKey:It,symbolInstanceStart:Kt,symbolInstanceEnd:zt}=St;l.push({sortKey:It,symbolInstanceStart:Kt,symbolInstanceEnd:zt,parameters:gt})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:K.symbolInstances.length,parameters:gt})}attemptAnchorPlacement(l,c,C,M,K,z,Y,ne,se,be,Oe,Te,$e,He,ct,st,dt,gt,St,It){const Kt=a.av[l.textAnchor],zt=[l.textOffset0,l.textOffset1],Tt=Ya(Kt,C,M,zt,K),tn=this.collisionIndex.placeCollisionBox(c,Te,ne,se,be,Y,z,st,Oe.predicate,St,Tt,It);if((!gt||this.collisionIndex.placeCollisionBox(gt,Te,ne,se,be,Y,z,dt,Oe.predicate,St,Tt,It).placeable)&&tn.placeable){let Zt;if(this.prevPlacement&&this.prevPlacement.variableOffsets[$e.crossTileID]&&this.prevPlacement.placements[$e.crossTileID]&&this.prevPlacement.placements[$e.crossTileID].text&&(Zt=this.prevPlacement.variableOffsets[$e.crossTileID].anchor),$e.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[$e.crossTileID]={textOffset:zt,width:C,height:M,anchor:Kt,textBoxScale:K,prevAnchor:Zt},this.markUsedJustification(He,Kt,$e,ct),He.allowVerticalPlacement&&(this.markUsedOrientation(He,ct,$e),this.placedOrientations[$e.crossTileID]=ct),{shift:Tt,placedGlyphBoxes:tn}}}placeLayerBucketPart(l,c,C){const{bucket:M,layout:K,translationText:z,translationIcon:Y,unwrappedTileID:ne,pitchedLabelPlaneMatrix:se,textPixelRatio:be,holdingForFade:Oe,collisionBoxArray:Te,partiallyEvaluatedTextSize:$e,collisionGroup:He}=l.parameters,ct=K.get("text-optional"),st=K.get("icon-optional"),dt=a.aw(K,"text-overlap","text-allow-overlap"),gt=dt==="always",St=a.aw(K,"icon-overlap","icon-allow-overlap"),It=St==="always",Kt=K.get("text-rotation-alignment")==="map",zt=K.get("text-pitch-alignment")==="map",Tt=K.get("icon-text-fit")!=="none",tn=K.get("symbol-z-order")==="viewport-y",Zt=gt&&(It||!M.hasIconData()||st),vn=It&&(gt||!M.hasTextData()||ct);!M.collisionArrays&&Te&&M.deserializeCollisionBoxes(Te);const _n=this.retainedQueryData[M.bucketInstanceId].tileID,gn=this._getTerrainElevationFunc(_n),In=this.transform.getFastPathSimpleProjectionMatrix(_n),Un=(wn,Or,Bi)=>{var Hi,Oo;if(c[wn.crossTileID])return;if(Oe)return void(this.placements[wn.crossTileID]=new ns(!1,!1,!1));let Ei=!1,jo=!1,zo=!0,xo=null,go={box:null,placeable:!1,offscreen:null,occluded:!1},Es={box:null,placeable:!1,offscreen:null},No=null,ca=null,Fs=null,ju=0,al=0,sl=0;Or.textFeatureIndex?ju=Or.textFeatureIndex:wn.useRuntimeCollisionCircles&&(ju=wn.featureIndex),Or.verticalTextFeatureIndex&&(al=Or.verticalTextFeatureIndex);const tu=Or.textBox;if(tu){const Xa=_a=>{let Ga=a.ai.horizontal;if(M.allowVerticalPlacement&&!_a&&this.prevPlacement){const $s=this.prevPlacement.placedOrientations[wn.crossTileID];$s&&(this.placedOrientations[wn.crossTileID]=$s,Ga=$s,this.markUsedOrientation(M,Ga,wn))}return Ga},ll=(_a,Ga)=>{if(M.allowVerticalPlacement&&wn.numVerticalGlyphVertices>0&&Or.verticalTextBox){for(const $s of M.writingModes)if($s===a.ai.vertical?(go=Ga(),Es=go):go=_a(),go&&go.placeable)break}else go=_a()},os=wn.textAnchorOffsetStartIndex,El=wn.textAnchorOffsetEndIndex;if(El===os){const _a=(Ga,$s)=>{const Vs=this.collisionIndex.placeCollisionBox(Ga,dt,be,_n,ne,zt,Kt,z,He.predicate,gn,void 0,In);return Vs&&Vs.placeable&&(this.markUsedOrientation(M,$s,wn),this.placedOrientations[wn.crossTileID]=$s),Vs};ll(()=>_a(tu,a.ai.horizontal),()=>{const Ga=Or.verticalTextBox;return M.allowVerticalPlacement&&wn.numVerticalGlyphVertices>0&&Ga?_a(Ga,a.ai.vertical):{box:null,offscreen:null}}),Xa(go&&go.placeable)}else{let _a=a.av[(Oo=(Hi=this.prevPlacement)===null||Hi===void 0?void 0:Hi.variableOffsets[wn.crossTileID])===null||Oo===void 0?void 0:Oo.anchor];const Ga=(Vs,pd,mh)=>{const gh=Vs.x2-Vs.x1,md=Vs.y2-Vs.y1,XA=wn.textBoxScale,yh=Tt&&St==="never"?pd:null;let Os=null,nu=dt==="never"?1:2,gd="never";_a&&nu++;for(let Jf=0;Jf<nu;Jf++){for(let Cc=os;Cc<El;Cc++){const MA=M.textAnchorOffsets.get(Cc);if(_a&&MA.textAnchor!==_a)continue;const Us=this.attemptAnchorPlacement(MA,Vs,gh,md,XA,Kt,zt,be,_n,ne,He,gd,wn,M,mh,z,Y,yh,gn);if(Us&&(Os=Us.placedGlyphBoxes,Os&&Os.placeable))return Ei=!0,xo=Us.shift,Os}_a?_a=null:gd=dt}return C&&!Os&&(Os={box:this.collisionIndex.placeCollisionBox(tu,"always",be,_n,ne,zt,Kt,z,He.predicate,gn,void 0,In).box,offscreen:!1,placeable:!1,occluded:!1}),Os};ll(()=>Ga(tu,Or.iconBox,a.ai.horizontal),()=>{const Vs=Or.verticalTextBox;return M.allowVerticalPlacement&&(!go||!go.placeable)&&wn.numVerticalGlyphVertices>0&&Vs?Ga(Vs,Or.verticalIconBox,a.ai.vertical):{box:null,occluded:!0,offscreen:null}}),go&&(Ei=go.placeable,zo=go.offscreen);const $s=Xa(go&&go.placeable);if(!Ei&&this.prevPlacement){const Vs=this.prevPlacement.variableOffsets[wn.crossTileID];Vs&&(this.variableOffsets[wn.crossTileID]=Vs,this.markUsedJustification(M,Vs.anchor,wn,$s))}}}if(No=go,Ei=No&&No.placeable,zo=No&&No.offscreen,wn.useRuntimeCollisionCircles){const Xa=M.text.placedSymbolArray.get(wn.centerJustifiedTextSymbolIndex),ll=a.aj(M.textSizeData,$e,Xa),os=K.get("text-padding");ca=this.collisionIndex.placeCollisionCircles(dt,Xa,M.lineVertexArray,M.glyphOffsetArray,ll,ne,se,C,zt,He.predicate,wn.collisionCircleDiameter,os,z,gn),ca.circles.length&&ca.collisionDetected&&!C&&a.w("Collisions detected, but collision boxes are not shown"),Ei=gt||ca.circles.length>0&&!ca.collisionDetected,zo=zo&&ca.offscreen}if(Or.iconFeatureIndex&&(sl=Or.iconFeatureIndex),Or.iconBox){const Xa=ll=>this.collisionIndex.placeCollisionBox(ll,St,be,_n,ne,zt,Kt,Y,He.predicate,gn,Tt&&xo?xo:void 0,In);Es&&Es.placeable&&Or.verticalIconBox?(Fs=Xa(Or.verticalIconBox),jo=Fs.placeable):(Fs=Xa(Or.iconBox),jo=Fs.placeable),zo=zo&&Fs.offscreen}const xA=ct||wn.numHorizontalGlyphVertices===0&&wn.numVerticalGlyphVertices===0,wA=st||wn.numIconVertices===0;xA||wA?wA?xA||(jo=jo&&Ei):Ei=jo&&Ei:jo=Ei=jo&&Ei;const zu=jo&&Fs.placeable;if(Ei&&No.placeable&&this.collisionIndex.insertCollisionBox(No.box,dt,K.get("text-ignore-placement"),M.bucketInstanceId,Es&&Es.placeable&&al?al:ju,He.ID),zu&&this.collisionIndex.insertCollisionBox(Fs.box,St,K.get("icon-ignore-placement"),M.bucketInstanceId,sl,He.ID),ca&&Ei&&this.collisionIndex.insertCollisionCircles(ca.circles,dt,K.get("text-ignore-placement"),M.bucketInstanceId,ju,He.ID),C&&this.storeCollisionData(M.bucketInstanceId,Bi,Or,No,Fs,ca),wn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(M.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[wn.crossTileID]=new ns((Ei||Zt)&&!(No!=null&&No.occluded),(jo||vn)&&!(Fs!=null&&Fs.occluded),zo||M.justReloaded),c[wn.crossTileID]=!0};if(tn){if(l.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const wn=M.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Or=wn.length-1;Or>=0;--Or){const Bi=wn[Or];Un(M.symbolInstances.get(Bi),M.collisionArrays[Bi],Bi)}}else for(let wn=l.symbolInstanceStart;wn<l.symbolInstanceEnd;wn++)Un(M.symbolInstances.get(wn),M.collisionArrays[wn],wn);M.justReloaded=!1}storeCollisionData(l,c,C,M,K,z){if(C.textBox||C.iconBox){let Y,ne;this.collisionBoxArrays.has(l)?Y=this.collisionBoxArrays.get(l):(Y=new Map,this.collisionBoxArrays.set(l,Y)),Y.has(c)?ne=Y.get(c):(ne={text:null,icon:null},Y.set(c,ne)),C.textBox&&(ne.text=M.box),C.iconBox&&(ne.icon=K.box)}if(z){let Y=this.collisionCircleArrays[l];Y===void 0&&(Y=this.collisionCircleArrays[l]=[]);for(let ne=0;ne<z.circles.length;ne+=4)Y.push(z.circles[ne+0]-ii),Y.push(z.circles[ne+1]-ii),Y.push(z.circles[ne+2]),Y.push(z.collisionDetected?1:0)}}markUsedJustification(l,c,C,M){let K;K=M===a.ai.vertical?C.verticalPlacedTextSymbolIndex:{left:C.leftJustifiedTextSymbolIndex,center:C.centerJustifiedTextSymbolIndex,right:C.rightJustifiedTextSymbolIndex}[a.ax(c)];const z=[C.leftJustifiedTextSymbolIndex,C.centerJustifiedTextSymbolIndex,C.rightJustifiedTextSymbolIndex,C.verticalPlacedTextSymbolIndex];for(const Y of z)Y>=0&&(l.text.placedSymbolArray.get(Y).crossTileID=K>=0&&Y!==K?0:C.crossTileID)}markUsedOrientation(l,c,C){const M=c===a.ai.horizontal||c===a.ai.horizontalOnly?c:0,K=c===a.ai.vertical?c:0,z=[C.leftJustifiedTextSymbolIndex,C.centerJustifiedTextSymbolIndex,C.rightJustifiedTextSymbolIndex];for(const Y of z)l.text.placedSymbolArray.get(Y).placedOrientation=M;C.verticalPlacedTextSymbolIndex&&(l.text.placedSymbolArray.get(C.verticalPlacedTextSymbolIndex).placedOrientation=K)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;const c=this.prevPlacement;let C=!1;this.prevZoomAdjustment=c?c.zoomAdjustment(this.transform.zoom):0;const M=c?c.symbolFadeChange(l):1,K=c?c.opacities:{},z=c?c.variableOffsets:{},Y=c?c.placedOrientations:{};for(const ne in this.placements){const se=this.placements[ne],be=K[ne];be?(this.opacities[ne]=new ka(be,M,se.text,se.icon),C=C||se.text!==be.text.placed||se.icon!==be.icon.placed):(this.opacities[ne]=new ka(null,M,se.text,se.icon,se.skipFade),C=C||se.text||se.icon)}for(const ne in K){const se=K[ne];if(!this.opacities[ne]){const be=new ka(se,M,!1,!1);be.isHidden()||(this.opacities[ne]=be,C=C||se.text.placed||se.icon.placed)}}for(const ne in z)this.variableOffsets[ne]||!this.opacities[ne]||this.opacities[ne].isHidden()||(this.variableOffsets[ne]=z[ne]);for(const ne in Y)this.placedOrientations[ne]||!this.opacities[ne]||this.opacities[ne].isHidden()||(this.placedOrientations[ne]=Y[ne]);if(c&&c.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");C?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=c?c.lastPlacementChangeTime:l)}updateLayerOpacities(l,c){const C={};for(const M of c){const K=M.getBucket(l);K&&M.latestFeatureIndex&&l.id===K.layerIds[0]&&this.updateBucketOpacities(K,M.tileID,C,M.collisionBoxArray)}}updateBucketOpacities(l,c,C,M){l.hasTextData()&&(l.text.opacityVertexArray.clear(),l.text.hasVisibleVertices=!1),l.hasIconData()&&(l.icon.opacityVertexArray.clear(),l.icon.hasVisibleVertices=!1),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexArray.clear(),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexArray.clear();const K=l.layers[0],z=K.layout,Y=new ka(null,0,!1,!1,!0),ne=z.get("text-allow-overlap"),se=z.get("icon-allow-overlap"),be=K._unevaluatedLayout.hasValue("text-variable-anchor")||K._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Oe=z.get("text-rotation-alignment")==="map",Te=z.get("text-pitch-alignment")==="map",$e=z.get("icon-text-fit")!=="none",He=new ka(null,0,ne&&(se||!l.hasIconData()||z.get("icon-optional")),se&&(ne||!l.hasTextData()||z.get("text-optional")),!0);!l.collisionArrays&&M&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(M);const ct=(dt,gt,St)=>{for(let It=0;It<gt/4;It++)dt.opacityVertexArray.emplaceBack(St);dt.hasVisibleVertices=dt.hasVisibleVertices||St!==cn},st=this.collisionBoxArrays.get(l.bucketInstanceId);for(let dt=0;dt<l.symbolInstances.length;dt++){const gt=l.symbolInstances.get(dt),{numHorizontalGlyphVertices:St,numVerticalGlyphVertices:It,crossTileID:Kt}=gt;let zt=this.opacities[Kt];C[Kt]?zt=Y:zt||(zt=He,this.opacities[Kt]=zt),C[Kt]=!0;const Tt=gt.numIconVertices>0,tn=this.placedOrientations[gt.crossTileID],Zt=tn===a.ai.vertical,vn=tn===a.ai.horizontal||tn===a.ai.horizontalOnly;if(St>0||It>0){const gn=_t(zt.text);ct(l.text,St,Zt?cn:gn),ct(l.text,It,vn?cn:gn);const In=zt.text.isHidden();[gt.rightJustifiedTextSymbolIndex,gt.centerJustifiedTextSymbolIndex,gt.leftJustifiedTextSymbolIndex].forEach(Or=>{Or>=0&&(l.text.placedSymbolArray.get(Or).hidden=In||Zt?1:0)}),gt.verticalPlacedTextSymbolIndex>=0&&(l.text.placedSymbolArray.get(gt.verticalPlacedTextSymbolIndex).hidden=In||vn?1:0);const Un=this.variableOffsets[gt.crossTileID];Un&&this.markUsedJustification(l,Un.anchor,gt,tn);const wn=this.placedOrientations[gt.crossTileID];wn&&(this.markUsedJustification(l,"left",gt,wn),this.markUsedOrientation(l,wn,gt))}if(Tt){const gn=_t(zt.icon),In=!($e&>.verticalPlacedIconSymbolIndex&&Zt);gt.placedIconSymbolIndex>=0&&(ct(l.icon,gt.numIconVertices,In?gn:cn),l.icon.placedSymbolArray.get(gt.placedIconSymbolIndex).hidden=zt.icon.isHidden()),gt.verticalPlacedIconSymbolIndex>=0&&(ct(l.icon,gt.numVerticalIconVertices,In?cn:gn),l.icon.placedSymbolArray.get(gt.verticalPlacedIconSymbolIndex).hidden=zt.icon.isHidden())}const _n=st&&st.has(dt)?st.get(dt):{text:null,icon:null};if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){const gn=l.collisionArrays[dt];if(gn){let In=new a.P(0,0);if(gn.textBox||gn.verticalTextBox){let Un=!0;if(be){const wn=this.variableOffsets[Kt];wn?(In=Ya(wn.anchor,wn.width,wn.height,wn.textOffset,wn.textBoxScale),Oe&&In._rotate(Te?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Un=!1}if(gn.textBox||gn.verticalTextBox){let wn;gn.textBox&&(wn=Zt),gn.verticalTextBox&&(wn=vn),Rl(l.textCollisionBox.collisionVertexArray,zt.text.placed,!Un||wn,_n.text,In.x,In.y)}}if(gn.iconBox||gn.verticalIconBox){const Un=!!(!vn&&gn.verticalIconBox);let wn;gn.iconBox&&(wn=Un),gn.verticalIconBox&&(wn=!Un),Rl(l.iconCollisionBox.collisionVertexArray,zt.icon.placed,wn,_n.icon,$e?In.x:0,$e?In.y:0)}}}}if(l.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[l.bucketInstanceId]&&(this.retainedQueryData[l.bucketInstanceId].featureSortOrder=l.featureSortOrder),l.hasTextData()&&l.text.opacityVertexBuffer&&l.text.opacityVertexBuffer.updateData(l.text.opacityVertexArray),l.hasIconData()&&l.icon.opacityVertexBuffer&&l.icon.opacityVertexBuffer.updateData(l.icon.opacityVertexArray),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexBuffer&&l.iconCollisionBox.collisionVertexBuffer.updateData(l.iconCollisionBox.collisionVertexArray),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexBuffer&&l.textCollisionBox.collisionVertexBuffer.updateData(l.textCollisionBox.collisionVertexArray),l.text.opacityVertexArray.length!==l.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${l.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${l.text.layoutVertexArray.length}) / 4`);if(l.icon.opacityVertexArray.length!==l.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${l.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${l.icon.layoutVertexArray.length}) / 4`);l.bucketInstanceId in this.collisionCircleArrays&&(l.collisionCircleArray=this.collisionCircleArrays[l.bucketInstanceId],delete this.collisionCircleArrays[l.bucketInstanceId])}symbolFadeChange(l){return this.fadeDuration===0?1:(l-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(l){return Math.max(0,(this.transform.zoom-l)/1.5)}hasTransitions(l){return this.stale||l-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(l,c){const C=this.zoomAtLastRecencyCheck===c?1-this.zoomAdjustment(c):1;return this.zoomAtLastRecencyCheck=c,this.commitTime+this.fadeDuration*C>l}setStale(){this.stale=!0}}function Rl(k,l,c,C,M,K){C&&C.length!==0||(C=[0,0,0,0]);const z=C[0]-ii,Y=C[1]-ii,ne=C[2]-ii,se=C[3]-ii;k.emplaceBack(l?1:0,c?1:0,M||0,K||0,z,Y),k.emplaceBack(l?1:0,c?1:0,M||0,K||0,ne,Y),k.emplaceBack(l?1:0,c?1:0,M||0,K||0,ne,se),k.emplaceBack(l?1:0,c?1:0,M||0,K||0,z,se)}const Ps=Math.pow(2,25),ki=Math.pow(2,24),Mr=Math.pow(2,17),ms=Math.pow(2,16),oa=Math.pow(2,9),ba=Math.pow(2,8),Ge=Math.pow(2,1);function _t(k){if(k.opacity===0&&!k.placed)return 0;if(k.opacity===1&&k.placed)return 4294967295;const l=k.placed?1:0,c=Math.floor(127*k.opacity);return c*Ps+l*ki+c*Mr+l*ms+c*oa+l*ba+c*Ge+l}const cn=0;class jn{constructor(l){this._sortAcrossTiles=l.layout.get("symbol-z-order")!=="viewport-y"&&!l.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(l,c,C,M,K){const z=this._bucketParts;for(;this._currentTileIndex<l.length;)if(c.getBucketParts(z,M,l[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,K())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,z.sort((Y,ne)=>Y.sortKey-ne.sortKey));this._currentPartIndex<z.length;)if(c.placeLayerBucketPart(z[this._currentPartIndex],this._seenCrossTileIDs,C),this._currentPartIndex++,K())return!0;return!1}}class An{constructor(l,c,C,M,K,z,Y,ne){this.placement=new Vi(l,c,z,Y,ne),this._currentPlacementIndex=C.length-1,this._forceFullPlacement=M,this._showCollisionBoxes=K,this._done=!1}isDone(){return this._done}continuePlacement(l,c,C){const M=S.now(),K=()=>!this._forceFullPlacement&&S.now()-M>2;for(;this._currentPlacementIndex>=0;){const z=c[l[this._currentPlacementIndex]],Y=this.placement.collisionIndex.transform.zoom;if(z.type==="symbol"&&(!z.minzoom||z.minzoom<=Y)&&(!z.maxzoom||z.maxzoom>Y)){if(this._inProgressLayer||(this._inProgressLayer=new jn(z)),this._inProgressLayer.continuePlacement(C[z.source],this.placement,this._showCollisionBoxes,z,K))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}const Qn=512/a.X/2;class _i{constructor(l,c,C){this.tileID=l,this.bucketInstanceId=C,this._symbolsByKey={};const M=new Map;for(let K=0;K<c.length;K++){const z=c.get(K),Y=z.key,ne=M.get(Y);ne?ne.push(z):M.set(Y,[z])}for(const[K,z]of M){const Y={positions:z.map(ne=>({x:Math.floor(ne.anchorX*Qn),y:Math.floor(ne.anchorY*Qn)})),crossTileIDs:z.map(ne=>ne.crossTileID)};if(Y.positions.length>128){const ne=new a.az(Y.positions.length,16,Uint16Array);for(const{x:se,y:be}of Y.positions)ne.add(se,be);ne.finish(),delete Y.positions,Y.index=ne}this._symbolsByKey[K]=Y}}getScaledCoordinates(l,c){const{x:C,y:M,z:K}=this.tileID.canonical,{x:z,y:Y,z:ne}=c.canonical,se=Qn/Math.pow(2,ne-K),be=(Y*a.X+l.anchorY)*se,Oe=M*a.X*Qn;return{x:Math.floor((z*a.X+l.anchorX)*se-C*a.X*Qn),y:Math.floor(be-Oe)}}findMatches(l,c,C){const M=this.tileID.canonical.z<c.canonical.z?1:Math.pow(2,this.tileID.canonical.z-c.canonical.z);for(let K=0;K<l.length;K++){const z=l.get(K);if(z.crossTileID)continue;const Y=this._symbolsByKey[z.key];if(!Y)continue;const ne=this.getScaledCoordinates(z,c);if(Y.index){const se=Y.index.range(ne.x-M,ne.y-M,ne.x+M,ne.y+M).sort();for(const be of se){const Oe=Y.crossTileIDs[be];if(!C[Oe]){C[Oe]=!0,z.crossTileID=Oe;break}}}else if(Y.positions)for(let se=0;se<Y.positions.length;se++){const be=Y.positions[se],Oe=Y.crossTileIDs[se];if(Math.abs(be.x-ne.x)<=M&&Math.abs(be.y-ne.y)<=M&&!C[Oe]){C[Oe]=!0,z.crossTileID=Oe;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:l})=>l)}}class Ki{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Xi{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(l){const c=Math.round((l-this.lng)/360);if(c!==0)for(const C in this.indexes){const M=this.indexes[C],K={};for(const z in M){const Y=M[z];Y.tileID=Y.tileID.unwrapTo(Y.tileID.wrap+c),K[Y.tileID.key]=Y}this.indexes[C]=K}this.lng=l}addBucket(l,c,C){if(this.indexes[l.overscaledZ]&&this.indexes[l.overscaledZ][l.key]){if(this.indexes[l.overscaledZ][l.key].bucketInstanceId===c.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(l.overscaledZ,this.indexes[l.overscaledZ][l.key])}for(let K=0;K<c.symbolInstances.length;K++)c.symbolInstances.get(K).crossTileID=0;this.usedCrossTileIDs[l.overscaledZ]||(this.usedCrossTileIDs[l.overscaledZ]={});const M=this.usedCrossTileIDs[l.overscaledZ];for(const K in this.indexes){const z=this.indexes[K];if(Number(K)>l.overscaledZ)for(const Y in z){const ne=z[Y];ne.tileID.isChildOf(l)&&ne.findMatches(c.symbolInstances,l,M)}else{const Y=z[l.scaledTo(Number(K)).key];Y&&Y.findMatches(c.symbolInstances,l,M)}}for(let K=0;K<c.symbolInstances.length;K++){const z=c.symbolInstances.get(K);z.crossTileID||(z.crossTileID=C.generate(),M[z.crossTileID]=!0)}return this.indexes[l.overscaledZ]===void 0&&(this.indexes[l.overscaledZ]={}),this.indexes[l.overscaledZ][l.key]=new _i(l,c.symbolInstances,c.bucketInstanceId),!0}removeBucketCrossTileIDs(l,c){for(const C of c.getCrossTileIDsLists())for(const M of C)delete this.usedCrossTileIDs[l][M]}removeStaleBuckets(l){let c=!1;for(const C in this.indexes){const M=this.indexes[C];for(const K in M)l[M[K].bucketInstanceId]||(this.removeBucketCrossTileIDs(C,M[K]),delete M[K],c=!0)}return c}}class aa{constructor(){this.layerIndexes={},this.crossTileIDs=new Ki,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(l,c,C){let M=this.layerIndexes[l.id];M===void 0&&(M=this.layerIndexes[l.id]=new Xi);let K=!1;const z={};M.handleWrapJump(C);for(const Y of c){const ne=Y.getBucket(l);ne&&l.id===ne.layerIds[0]&&(ne.bucketInstanceId||(ne.bucketInstanceId=++this.maxBucketInstanceId),M.addBucket(Y.tileID,ne,this.crossTileIDs)&&(K=!0),z[ne.bucketInstanceId]=!0)}return M.removeStaleBuckets(z)&&(K=!0),K}pruneUnusedLayers(l){const c={};l.forEach(C=>{c[C]=!0});for(const C in this.layerIndexes)c[C]||delete this.layerIndexes[C]}}var Mu="void main() {fragColor=vec4(1.0);}";const Hr={prelude:ci(`#ifdef GL_ES
|
||
precision mediump float;
|
||
#else
|
||
#if !defined(lowp)
|
||
#define lowp
|
||
#endif
|
||
#if !defined(mediump)
|
||
#define mediump
|
||
#endif
|
||
#if !defined(highp)
|
||
#define highp
|
||
#endif
|
||
#endif
|
||
out highp vec4 fragColor;`,`#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;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c
|
||
);}
|
||
#ifdef TERRAIN3D
|
||
uniform sampler2D u_terrain;uniform 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(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
|
||
#else
|
||
return 1.0;
|
||
#endif
|
||
}float calculate_visibility(vec4 pos) {
|
||
#ifdef TERRAIN3D
|
||
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
|
||
#else
|
||
return 1.0;
|
||
#endif
|
||
}float ele(vec2 pos) {
|
||
#ifdef TERRAIN3D
|
||
vec4 rgb=(texture(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
|
||
#ifdef GLOBE
|
||
if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
|
||
#endif
|
||
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+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
|
||
}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:ci("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:ci("",`#define GLOBE_RADIUS 6371008.8
|
||
uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
|
||
);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);
|
||
if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
|
||
);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:ci(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:ci(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,"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;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ci(`in vec3 v_data;in float v_visibility;
|
||
#pragma mapbox: define highp vec4 color
|
||
#pragma mapbox: define mediump float radius
|
||
#pragma mapbox: define lowp float blur
|
||
#pragma mapbox: define lowp float opacity
|
||
#pragma mapbox: define highp vec4 stroke_color
|
||
#pragma mapbox: define mediump float stroke_width
|
||
#pragma mapbox: define lowp float stroke_opacity
|
||
void main() {
|
||
#pragma mapbox: initialize highp vec4 color
|
||
#pragma mapbox: initialize mediump float radius
|
||
#pragma mapbox: initialize lowp float blur
|
||
#pragma mapbox: initialize lowp float opacity
|
||
#pragma mapbox: initialize highp vec4 stroke_color
|
||
#pragma mapbox: initialize mediump float stroke_width
|
||
#pragma mapbox: initialize lowp float stroke_opacity
|
||
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out 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 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
|
||
#ifdef GLOBE
|
||
vec3 center_vector=projectToSphere(circle_center);
|
||
#endif
|
||
float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
|
||
#ifdef GLOBE
|
||
vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
|
||
#else
|
||
vec4 projected_center=projectTileWithElevation(circle_center,ele);
|
||
#endif
|
||
corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
|
||
#ifdef GLOBE
|
||
vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
|
||
#else
|
||
gl_Position=projectTileWithElevation(corner_position,ele);
|
||
#endif
|
||
} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ci(Mu,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ci(`uniform highp float u_intensity;in 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);fragColor=vec4(val,1.0,1.0,1.0);
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out 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 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
|
||
#ifdef GLOBE
|
||
vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
|
||
#else
|
||
gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
|
||
#endif
|
||
}`),heatmapTexture:ci(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(0.0);
|
||
#endif
|
||
}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out 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:ci("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ci("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:ci("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ci(Mu,`in vec2 a_pos;void main() {
|
||
#ifdef GLOBE
|
||
gl_Position=projectTileFor3D(a_pos,0.0);
|
||
#else
|
||
gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
|
||
#endif
|
||
}`),fill:ci(`#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
|
||
fragColor=color*opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
|
||
#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=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:ci(`in vec2 v_pos;
|
||
#ifdef GLOBE
|
||
in float v_depth;
|
||
#endif
|
||
#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);fragColor=outline_color*(alpha*opacity);
|
||
#ifdef GLOBE
|
||
if (v_depth > 1.0) {discard;}
|
||
#endif
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
|
||
#ifdef GLOBE
|
||
out float v_depth;
|
||
#endif
|
||
#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=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
||
#ifdef GLOBE
|
||
v_depth=gl_Position.z/gl_Position.w;
|
||
#endif
|
||
}`),fillOutlinePattern:ci(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
|
||
#ifdef GLOBE
|
||
in float v_depth;
|
||
#endif
|
||
#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=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
|
||
#ifdef GLOBE
|
||
if (v_depth > 1.0) {discard;}
|
||
#endif
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
|
||
#ifdef GLOBE
|
||
out float v_depth;
|
||
#endif
|
||
#pragma 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=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
||
#ifdef GLOBE
|
||
v_depth=gl_Position.z/gl_Position.w;
|
||
#endif
|
||
}`),fillPattern:ci(`#ifdef GL_ES
|
||
precision highp float;
|
||
#endif
|
||
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in 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=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out 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=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:ci(`in vec4 v_color;void main() {fragColor=v_color;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
|
||
#ifdef TERRAIN3D
|
||
in vec2 a_centroid;
|
||
#endif
|
||
out 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);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
||
#ifdef GLOBE
|
||
vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
||
#else
|
||
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
||
#endif
|
||
float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
|
||
#ifdef GLOBE
|
||
mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
|
||
#endif
|
||
directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:ci(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
|
||
#pragma 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=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
|
||
#ifdef TERRAIN3D
|
||
in vec2 a_centroid;
|
||
#endif
|
||
#ifdef GLOBE
|
||
out vec3 v_sphere_pos;
|
||
#endif
|
||
out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
|
||
#pragma 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 elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
||
#ifdef GLOBE
|
||
vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
||
#else
|
||
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
||
#endif
|
||
vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
|
||
? a_pos
|
||
: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:ci(`#ifdef GL_ES
|
||
precision highp float;
|
||
#endif
|
||
uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(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));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
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ci(`uniform sampler2D u_image;in 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=texture(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);fragColor=accent_color*(1.0-shade_color.a)+shade_color;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:ci(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
|
||
#ifdef GLOBE
|
||
in float v_depth;
|
||
#endif
|
||
#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);fragColor=color*(alpha*opacity);
|
||
#ifdef GLOBE
|
||
if (v_depth > 1.0) {discard;}
|
||
#endif
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`
|
||
#define scale 0.015873016
|
||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
|
||
#ifdef GLOBE
|
||
out float v_depth;
|
||
#endif
|
||
#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||
#ifdef GLOBE
|
||
v_depth=gl_Position.z/gl_Position.w;
|
||
#endif
|
||
#ifdef TERRAIN3D
|
||
v_gamma_scale=1.0;
|
||
#else
|
||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||
#endif
|
||
v_width2=vec2(outset,inset);}`),lineGradient:ci(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
|
||
#ifdef GLOBE
|
||
in float v_depth;
|
||
#endif
|
||
#pragma 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=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
|
||
#ifdef GLOBE
|
||
if (v_depth > 1.0) {discard;}
|
||
#endif
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`
|
||
#define scale 0.015873016
|
||
in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
|
||
#ifdef GLOBE
|
||
out float v_depth;
|
||
#endif
|
||
#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||
#ifdef GLOBE
|
||
v_depth=gl_Position.z/gl_Position.w;
|
||
#endif
|
||
#ifdef TERRAIN3D
|
||
v_gamma_scale=1.0;
|
||
#else
|
||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||
#endif
|
||
v_width2=vec2(outset,inset);}`),linePattern:ci(`#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;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
|
||
#ifdef GLOBE
|
||
in float v_depth;
|
||
#endif
|
||
#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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
|
||
#ifdef GLOBE
|
||
if (v_depth > 1.0) {discard;}
|
||
#endif
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`
|
||
#define scale 0.015873016
|
||
#define LINE_DISTANCE_SCALE 2.0
|
||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
|
||
#ifdef GLOBE
|
||
out float v_depth;
|
||
#endif
|
||
#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||
#ifdef GLOBE
|
||
v_depth=gl_Position.z/gl_Position.w;
|
||
#endif
|
||
#ifdef TERRAIN3D
|
||
v_gamma_scale=1.0;
|
||
#else
|
||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||
#endif
|
||
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ci(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
|
||
#ifdef GLOBE
|
||
in float v_depth;
|
||
#endif
|
||
#pragma 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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
|
||
#ifdef GLOBE
|
||
if (v_depth > 1.0) {discard;}
|
||
#endif
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`
|
||
#define scale 0.015873016
|
||
#define LINE_DISTANCE_SCALE 2.0
|
||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;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;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
|
||
#ifdef GLOBE
|
||
out float v_depth;
|
||
#endif
|
||
#pragma 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||
#ifdef GLOBE
|
||
v_depth=gl_Position.z/gl_Position.w;
|
||
#endif
|
||
#ifdef TERRAIN3D
|
||
v_gamma_scale=1.0;
|
||
#else
|
||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||
#endif
|
||
v_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:ci(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
|
||
#ifdef GLOBE
|
||
if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
|
||
#endif
|
||
v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:ci(`uniform sampler2D u_texture;in vec2 v_tex;in 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;fragColor=texture(u_texture,v_tex)*alpha;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||
#ifdef GLOBE
|
||
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||
#endif
|
||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;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:ci(`#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;in vec2 v_data0;in 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=texture(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);}fragColor=color*(alpha*opacity*fade_opacity);
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||
#ifdef GLOBE
|
||
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||
#endif
|
||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:ci(`#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;in vec4 v_data0;in 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;fragColor=texture(u_texture_icon,tex_icon)*alpha;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;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=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
fragColor=vec4(1.0);
|
||
#endif
|
||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||
#ifdef GLOBE
|
||
if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||
#endif
|
||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:ci("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ci("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ci("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:ci("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:ci(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
|
||
);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:ci("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function ci(k,l){const c=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,C=l.match(/in ([\w]+) ([\w]+)/g),M=k.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),K=l.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),z=K?K.concat(M):M,Y={};return{fragmentSource:k=k.replace(c,(ne,se,be,Oe,Te)=>(Y[Te]=!0,se==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
in ${be} ${Oe} ${Te};
|
||
#else
|
||
uniform ${be} ${Oe} u_${Te};
|
||
#endif
|
||
`:`
|
||
#ifdef HAS_UNIFORM_u_${Te}
|
||
${be} ${Oe} ${Te} = u_${Te};
|
||
#endif
|
||
`)),vertexSource:l=l.replace(c,(ne,se,be,Oe,Te)=>{const $e=Oe==="float"?"vec2":"vec4",He=Te.match(/color/)?"color":$e;return Y[Te]?se==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
uniform lowp float u_${Te}_t;
|
||
in ${be} ${$e} a_${Te};
|
||
out ${be} ${Oe} ${Te};
|
||
#else
|
||
uniform ${be} ${Oe} u_${Te};
|
||
#endif
|
||
`:He==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
${Te} = a_${Te};
|
||
#else
|
||
${be} ${Oe} ${Te} = u_${Te};
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
${Te} = unpack_mix_${He}(a_${Te}, u_${Te}_t);
|
||
#else
|
||
${be} ${Oe} ${Te} = u_${Te};
|
||
#endif
|
||
`:se==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
uniform lowp float u_${Te}_t;
|
||
in ${be} ${$e} a_${Te};
|
||
#else
|
||
uniform ${be} ${Oe} u_${Te};
|
||
#endif
|
||
`:He==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
${be} ${Oe} ${Te} = a_${Te};
|
||
#else
|
||
${be} ${Oe} ${Te} = u_${Te};
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_${Te}
|
||
${be} ${Oe} ${Te} = unpack_mix_${He}(a_${Te}, u_${Te}_t);
|
||
#else
|
||
${be} ${Oe} ${Te} = u_${Te};
|
||
#endif
|
||
`}),staticAttributes:C,staticUniforms:z}}class rs{constructor(l,c,C){this.vertexBuffer=l,this.indexBuffer=c,this.segments=C}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Ai=a.aA([{name:"a_pos",type:"Int16",components:2}]);const As="#define PROJECTION_MERCATOR",Ju="mercator";class sa{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Ju}get shaderDefine(){return As}get shaderPreludeCode(){return Hr.projectionMercator}get vertexShaderPreludeCode(){return Hr.projectionMercator.vertexSource}get subdivisionGranularity(){return a.aB.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(l){}getMeshFromTileID(l,c,C,M,K){if(this._cachedMesh)return this._cachedMesh;const z=new a.aC;z.emplaceBack(0,0),z.emplaceBack(a.X,0),z.emplaceBack(0,a.X),z.emplaceBack(a.X,a.X);const Y=l.createVertexBuffer(z,Ai.members),ne=a.aD.simpleSegment(0,0,4,2),se=new a.aE;se.emplaceBack(1,0,2),se.emplaceBack(1,2,3);const be=l.createIndexBuffer(se);return this._cachedMesh=new rs(Y,be,ne),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(l){}}function kr(k,l){const c=a.ab(l.lat,-85.051129,a.aF);return new a.P(a.O(l.lng)*k,a.Q(c)*k)}function Oi(k,l){return new a.Y(l.x/k,l.y/k).toLngLat()}function Qs(k){return k.cameraToCenterDistance*Math.min(.85*Math.tan(a.aa(90-k.pitch)),Math.tan(a.aa(89.25-k.pitch)))}function Ta(k,l){const c=k.canonical,C=l/a.aG(c.z),M=c.x+Math.pow(2,c.z)*k.wrap,K=a.aq(new Float64Array(16));return a.J(K,K,[M*C,c.y*C,0]),a.K(K,K,[C/a.X,C/a.X,1]),K}function Mo(k,l,c,C,M){const K=a.Y.fromLngLat(k,l),z=M*a.aH(1,k.lat),Y=z*Math.cos(a.aa(c)),ne=Math.sqrt(z*z-Y*Y),se=ne*Math.sin(a.aa(-C)),be=ne*Math.cos(a.aa(-C));return new a.Y(K.x+se,K.y+be,K.z+Y)}class ja{constructor(l=0,c=0,C=0,M=0){if(isNaN(l)||l<0||isNaN(c)||c<0||isNaN(C)||C<0||isNaN(M)||M<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=c,this.left=C,this.right=M}interpolate(l,c,C){return c.top!=null&&l.top!=null&&(this.top=a.y.number(l.top,c.top,C)),c.bottom!=null&&l.bottom!=null&&(this.bottom=a.y.number(l.bottom,c.bottom,C)),c.left!=null&&l.left!=null&&(this.left=a.y.number(l.left,c.left,C)),c.right!=null&&l.right!=null&&(this.right=a.y.number(l.right,c.right,C)),this}getCenter(l,c){const C=a.ab((this.left+l-this.right)/2,0,l),M=a.ab((this.top+c-this.bottom)/2,0,c);return new a.P(C,M)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new ja(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function au(k,l){if(!k.renderWorldCopies||k.lngRange)return;const c=l.lng-k.center.lng;l.lng+=c>180?-360:c<-180?360:0}function Dl(k){return Math.max(0,Math.floor(k))}class ea{constructor(l,c,C,M,K,z){this._callbacks=l,this._tileSize=512,this._renderWorldCopies=z===void 0||!!z,this._minZoom=c||0,this._maxZoom=C||22,this._minPitch=M??0,this._maxPitch=K??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new a.N(0,0),this._elevation=0,this._zoom=0,this._tileZoom=Dl(this._zoom),this._scale=a.aG(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new ja,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(l,c,C){this._latRange=l.latRange,this._lngRange=l.lngRange,this._width=l.width,this._height=l.height,this._center=l.center,this._elevation=l.elevation,this._minElevationForCurrentTile=l.minElevationForCurrentTile,this._zoom=l.zoom,this._tileZoom=Dl(this._zoom),this._scale=a.aG(this._zoom),this._bearingInRadians=l.bearingInRadians,this._fovInRadians=l.fovInRadians,this._pitchInRadians=l.pitchInRadians,this._rollInRadians=l.rollInRadians,this._unmodified=l.unmodified,this._edgeInsets=new ja(l.padding.top,l.padding.bottom,l.padding.left,l.padding.right),this._minZoom=l.minZoom,this._maxZoom=l.maxZoom,this._minPitch=l.minPitch,this._maxPitch=l.maxPitch,this._renderWorldCopies=l.renderWorldCopies,this._cameraToCenterDistance=l.cameraToCenterDistance,this._nearZ=l.nearZ,this._farZ=l.farZ,this._autoCalculateNearFarZ=!C&&l.autoCalculateNearFarZ,c&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(l){this._minElevationForCurrentTile=l}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(l){this._minZoom!==l&&(this._minZoom=l,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(l){this._maxZoom!==l&&(this._maxZoom=l,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(l){this._minPitch!==l&&(this._minPitch=l,this.setPitch(Math.max(this.pitch,l)))}get maxPitch(){return this._maxPitch}setMaxPitch(l){this._maxPitch!==l&&(this._maxPitch=l,this.setPitch(Math.min(this.pitch,l)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(l){const c=a.aI(l,-180,180)*Math.PI/180;var C,M,K,z,Y,ne,se,be,Oe;this._bearingInRadians!==c&&(this._unmodified=!1,this._bearingInRadians=c,this._calcMatrices(),this._rotationMatrix=g(),C=this._rotationMatrix,K=-this._bearingInRadians,z=(M=this._rotationMatrix)[0],Y=M[1],ne=M[2],se=M[3],be=Math.sin(K),Oe=Math.cos(K),C[0]=z*Oe+ne*be,C[1]=Y*Oe+se*be,C[2]=z*-be+ne*Oe,C[3]=Y*-be+se*Oe)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(l){const c=a.ab(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==c&&(this._unmodified=!1,this._pitchInRadians=c,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(l){const c=l/180*Math.PI;this._rollInRadians!==c&&(this._unmodified=!1,this._rollInRadians=c,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return a.aJ(this._fovInRadians)}setFov(l){l=a.ab(l,.1,150),this.fov!==l&&(this._unmodified=!1,this._fovInRadians=a.aa(l),this._calcMatrices())}get zoom(){return this._zoom}setZoom(l){const c=this.getConstrained(this._center,l).zoom;this._zoom!==c&&(this._unmodified=!1,this._zoom=c,this._tileZoom=Math.max(0,Math.floor(c)),this._scale=a.aG(c),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(l){l!==this._elevation&&(this._elevation=l,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(l,c){this._autoCalculateNearFarZ=!1,this._nearZ=l,this._farZ=c,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(l){return this._edgeInsets.equals(l)}interpolatePadding(l,c,C){this._unmodified=!1,this._edgeInsets.interpolate(l,c,C),this._constrain(),this._calcMatrices()}resize(l,c,C=!0){this._width=l,this._height=c,C&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new Lt([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(l){l?(this._lngRange=[l.getWest(),l.getEast()],this._latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,a.aF])}getConstrained(l,c){return this._callbacks.getConstrained(l,c)}getCameraQueryGeometry(l,c){if(c.length===1)return[c[0],l];{let C=l.x,M=l.y,K=l.x,z=l.y;for(const Y of c)C=Math.min(C,Y.x),M=Math.min(M,Y.y),K=Math.max(K,Y.x),z=Math.max(z,Y.y);return[new a.P(C,M),new a.P(K,M),new a.P(K,z),new a.P(C,z),new a.P(C,M)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const l=this._unmodified,{center:c,zoom:C}=this.getConstrained(this.center,this.zoom);this.setCenter(c),this.setZoom(C),this._unmodified=l,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let l=a.aq(new Float64Array(16));a.K(l,l,[this._width/2,-this._height/2,1]),a.J(l,l,[1,-1,0]),this._clipSpaceToPixelsMatrix=l,l=a.aq(new Float64Array(16)),a.K(l,l,[1,-1,1]),a.J(l,l,[-1,-1,0]),a.K(l,l,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=l,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(l,c,C,M){const K=C!==void 0?C:this.bearing,z=M=M!==void 0?M:this.pitch,Y=a.Y.fromLngLat(l,c),ne=-Math.cos(a.aa(z)),se=Math.sin(a.aa(z)),be=se*Math.sin(a.aa(K)),Oe=-se*Math.cos(a.aa(K));let Te=this.elevation;const $e=c-Te;let He;ne*$e>=0||Math.abs(ne)<.1?(He=1e4,Te=c+He*ne):He=-$e/ne;let ct,st,dt=a.aK(1,Y.y),gt=0;do{if(gt+=1,gt>10)break;st=He/dt,ct=new a.Y(Y.x+be*st,Y.y+Oe*st),dt=1/ct.meterInMercatorCoordinateUnits()}while(Math.abs(He-st*dt)>1e-12);return{center:ct.toLngLat(),elevation:Te,zoom:a.a8(this.height/2/Math.tan(this.fovInRadians/2)/st/this.tileSize)}}recalculateZoomAndCenter(l){if(this.elevation-l==0)return;const c=a.aH(1,this.center.lat)*this.worldSize,C=this.cameraToCenterDistance/c,M=a.Y.fromLngLat(this.center,this.elevation),K=Mo(this.center,this.elevation,this.pitch,this.bearing,C);this._elevation=l;const z=this.calculateCenterFromCameraLngLatAlt(K.toLngLat(),a.aK(K.z,M.y),this.bearing,this.pitch);this._elevation=z.elevation,this._center=z.center,this.setZoom(z.zoom)}getCameraPoint(){const l=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(l*Math.sin(this.rollInRadians),l*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const l=a.aH(1,this.center.lat)*this.worldSize;return Mo(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/l).toLngLat()}getMercatorTileCoordinates(l){if(!l)return[0,0,1,1];const c=l.canonical.z>=0?1<<l.canonical.z:Math.pow(2,l.canonical.z);return[l.canonical.x/c,l.canonical.y/c,1/c/a.X,1/c/a.X]}}class $a{constructor(l,c){this.min=l,this.max=c,this.center=a.aL([],a.aM([],this.min,this.max),.5)}quadrant(l){const c=[l%2==0,l<2],C=a.aN(this.min),M=a.aN(this.max);for(let K=0;K<c.length;K++)C[K]=c[K]?this.min[K]:this.center[K],M[K]=c[K]?this.center[K]:this.max[K];return M[2]=this.max[2],new $a(C,M)}distanceX(l){return Math.max(Math.min(this.max[0],l[0]),this.min[0])-l[0]}distanceY(l){return Math.max(Math.min(this.max[1],l[1]),this.min[1])-l[1]}intersectsFrustum(l){let c=!0;for(let C=0;C<l.planes.length;C++){const M=this.intersectsPlane(l.planes[C]);if(M===0)return 0;M===1&&(c=!1)}return c?2:l.aabb.min[0]>this.max[0]||l.aabb.min[1]>this.max[1]||l.aabb.min[2]>this.max[2]||l.aabb.max[0]<this.min[0]||l.aabb.max[1]<this.min[1]||l.aabb.max[2]<this.min[2]?0:1}intersectsPlane(l){let c=l[3],C=l[3];for(let M=0;M<3;M++)l[M]>0?(c+=l[M]*this.min[M],C+=l[M]*this.max[M]):(C+=l[M]*this.min[M],c+=l[M]*this.max[M]);return c>=0?2:C<0?0:1}}class co{distanceToTile2d(l,c,C,M){const K=M.distanceX([l,c]),z=M.distanceY([l,c]);return Math.hypot(K,z)}getWrap(l,c,C){return C}getTileAABB(l,c,C,M){var K,z;let Y=C,ne=C;if(M.terrain){const be=new a.S(l.z,c,l.z,l.x,l.y),Oe=M.terrain.getMinMaxElevation(be);Y=(K=Oe.minElevation)!==null&&K!==void 0?K:C,ne=(z=Oe.maxElevation)!==null&&z!==void 0?z:C}const se=1<<l.z;return new $a([c+l.x/se,l.y/se,Y],[c+(l.x+1)/se,(l.y+1)/se,ne])}allowVariableZoom(l,c){const C=l.fov*(Math.abs(Math.cos(l.rollInRadians))*l.height+Math.abs(Math.sin(l.rollInRadians))*l.width)/l.height,M=a.ab(78.5-C/2,0,60);return!!c.terrain||l.pitch>M||l.padding.top>=.1}allowWorldCopies(){return!0}recalculateCache(){}}class pa{constructor(l,c,C){this.points=l,this.planes=c,this.aabb=C}static fromInvProjectionMatrix(l,c=1,C=0){const M=Math.pow(2,C),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(se=>{const be=1/(se=a.al([],se,l))[3]/c*M;return a.aO(se,se,[be,be,1/se[3],be])}),z=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(se=>{const be=a.aP([],K[se[0]],K[se[1]]),Oe=a.aP([],K[se[2]],K[se[1]]),Te=a.aQ([],a.aR([],be,Oe)),$e=-a.aS(Te,K[se[1]]);return Te.concat($e)}),Y=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],ne=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const se of K)for(let be=0;be<3;be++)Y[be]=Math.min(Y[be],se[be]),ne[be]=Math.max(ne[be],se[be]);return new pa(K,z,new $a(Y,ne))}}class xa{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(l){this._helper.setMinZoom(l)}setMaxZoom(l){this._helper.setMaxZoom(l)}setMinPitch(l){this._helper.setMinPitch(l)}setMaxPitch(l){this._helper.setMaxPitch(l)}setRenderWorldCopies(l){this._helper.setRenderWorldCopies(l)}setBearing(l){this._helper.setBearing(l)}setPitch(l){this._helper.setPitch(l)}setRoll(l){this._helper.setRoll(l)}setFov(l){this._helper.setFov(l)}setZoom(l){this._helper.setZoom(l)}setCenter(l){this._helper.setCenter(l)}setElevation(l){this._helper.setElevation(l)}setMinElevationForCurrentTile(l){this._helper.setMinElevationForCurrentTile(l)}setPadding(l){this._helper.setPadding(l)}interpolatePadding(l,c,C){return this._helper.interpolatePadding(l,c,C)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,c,C=!0){this._helper.resize(l,c,C)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(l){this._helper.setMaxBounds(l)}overrideNearFarZ(l,c){this._helper.overrideNearFarZ(l,c)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(l){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),l)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(l,c){}constructor(l,c,C,M,K){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new ea({calcMatrices:()=>{this._calcMatrices()},getConstrained:(z,Y)=>this.getConstrained(z,Y)},l,c,C,M,K),this._coveringTilesDetailsProvider=new co}clone(){const l=new xa;return l.apply(this),l}apply(l,c,C){this._helper.apply(l,c,C)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(l){const c=[new a.aT(0,l)];if(this._helper._renderWorldCopies){const C=this.screenPointToMercatorCoordinate(new a.P(0,0)),M=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,0)),K=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,this._helper._height)),z=this.screenPointToMercatorCoordinate(new a.P(0,this._helper._height)),Y=Math.floor(Math.min(C.x,M.x,K.x,z.x)),ne=Math.floor(Math.max(C.x,M.x,K.x,z.x)),se=1;for(let be=Y-se;be<=ne+se;be++)be!==0&&c.push(new a.aT(be,l))}return c}getCameraFrustum(){return pa.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(l){const c=this.screenPointToLocation(this.centerPoint,l),C=l?l.getElevationForLngLatZoom(c,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(C)}setLocationAtPoint(l,c){const C=a.aH(this.elevation,this.center.lat),M=this.screenPointToMercatorCoordinateAtZ(c,C),K=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,C),z=a.Y.fromLngLat(l),Y=new a.Y(z.x-(M.x-K.x),z.y-(M.y-K.y));this.setCenter(Y==null?void 0:Y.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(l,c){return c?this.coordinatePoint(a.Y.fromLngLat(l),c.getElevationForLngLatZoom(l,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(a.Y.fromLngLat(l))}screenPointToLocation(l,c){var C;return(C=this.screenPointToMercatorCoordinate(l,c))===null||C===void 0?void 0:C.toLngLat()}screenPointToMercatorCoordinate(l,c){if(c){const C=c.pointCoordinate(l);if(C!=null)return C}return this.screenPointToMercatorCoordinateAtZ(l)}screenPointToMercatorCoordinateAtZ(l,c){const C=c||0,M=[l.x,l.y,0,1],K=[l.x,l.y,1,1];a.al(M,M,this._pixelMatrixInverse),a.al(K,K,this._pixelMatrixInverse);const z=M[3],Y=K[3],ne=M[1]/z,se=K[1]/Y,be=M[2]/z,Oe=K[2]/Y,Te=be===Oe?0:(C-be)/(Oe-be);return new a.Y(a.y.number(M[0]/z,K[0]/Y,Te)/this.worldSize,a.y.number(ne,se,Te)/this.worldSize,C)}coordinatePoint(l,c=0,C=this._pixelMatrix){const M=[l.x*this.worldSize,l.y*this.worldSize,c,1];return a.al(M,M,C),new a.P(M[0]/M[3],M[1]/M[3])}getBounds(){const l=Math.max(0,this._helper._height/2-Qs(this));return new Lt().extend(this.screenPointToLocation(new a.P(0,l))).extend(this.screenPointToLocation(new a.P(this._helper._width,l))).extend(this.screenPointToLocation(new a.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new a.P(0,this._helper._height)))}isPointOnMapSurface(l,c){return c?c.pointCoordinate(l)!=null:l.y>this.height/2-Qs(this)}calculatePosMatrix(l,c=!1,C){var M;const K=(M=l.key)!==null&&M!==void 0?M:a.aU(l.wrap,l.canonical.z,l.canonical.z,l.canonical.x,l.canonical.y),z=c?this._alignedPosMatrixCache:this._posMatrixCache;if(z.has(K)){const se=z.get(K);return C?se.f32:se.f64}const Y=Ta(l,this.worldSize);a.L(Y,c?this._alignedProjMatrix:this._viewProjMatrix,Y);const ne={f64:Y,f32:new Float32Array(Y)};return z.set(K,ne),C?ne.f32:ne.f64}calculateFogMatrix(l){const c=l.key,C=this._fogMatrixCacheF32;if(C.has(c))return C.get(c);const M=Ta(l,this.worldSize);return a.L(M,this._fogMatrix,M),C.set(c,new Float32Array(M)),C.get(c)}getConstrained(l,c){c=a.ab(+c,this.minZoom,this.maxZoom);const C={center:new a.N(l.lng,l.lat),zoom:c};let M=this._helper._lngRange;this._helper._renderWorldCopies||M!==null||(M=[-179.9999999999,180-1e-10]);const K=this.tileSize*a.aG(C.zoom);let z=0,Y=K,ne=0,se=K,be=0,Oe=0;const{x:Te,y:$e}=this.size;if(this._helper._latRange){const St=this._helper._latRange;z=a.Q(St[1])*K,Y=a.Q(St[0])*K,Y-z<$e&&(be=$e/(Y-z))}M&&(ne=a.aI(a.O(M[0])*K,0,K),se=a.aI(a.O(M[1])*K,0,K),se<ne&&(se+=K),se-ne<Te&&(Oe=Te/(se-ne)));const{x:He,y:ct}=kr(K,l);let st,dt;const gt=Math.max(Oe||0,be||0);if(gt){const St=new a.P(Oe?(se+ne)/2:He,be?(Y+z)/2:ct);return C.center=Oi(K,St).wrap(),C.zoom+=a.a8(gt),C}if(this._helper._latRange){const St=$e/2;ct-St<z&&(dt=z+St),ct+St>Y&&(dt=Y-St)}if(M){const St=(ne+se)/2;let It=He;this._helper._renderWorldCopies&&(It=a.aI(He,St-K/2,St+K/2));const Kt=Te/2;It-Kt<ne&&(st=ne+Kt),It+Kt>se&&(st=se-Kt)}if(st!==void 0||dt!==void 0){const St=new a.P(st??He,dt??ct);C.center=Oi(K,St).wrap()}return C}calculateCenterFromCameraLngLatAlt(l,c,C,M){return this._helper.calculateCenterFromCameraLngLatAlt(l,c,C,M)}_calculateNearFarZIfNeeded(l,c,C){if(!this._helper.autoCalculateNearFarZ)return;const M=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),K=l-M*this._helper._pixelPerMeter/Math.cos(c),z=M<0?K:l,Y=Math.PI/2+this.pitchInRadians,ne=a.aa(this.fov)*(Math.abs(Math.cos(a.aa(this.roll)))*this.height+Math.abs(Math.sin(a.aa(this.roll)))*this.width)/this.height*(.5+C.y/this.height),se=Math.sin(ne)*z/Math.sin(a.ab(Math.PI-Y-ne,.01,Math.PI-.01)),be=Qs(this),Oe=Math.atan(be/this._helper.cameraToCenterDistance),Te=a.aa(.75),$e=Oe>Te?2*Oe*(.5+C.y/(2*be)):Te,He=Math.sin($e)*z/Math.sin(a.ab(Math.PI-Y-$e,.01,Math.PI-.01)),ct=Math.min(se,He);this._helper._farZ=1.01*(Math.cos(Math.PI/2-c)*ct+z),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const l=this.centerOffset,c=kr(this.worldSize,this.center),C=c.x,M=c.y;this._helper._pixelPerMeter=a.aH(1,this.center.lat)*this.worldSize;const K=a.aa(Math.min(this.pitch,89.25)),z=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(K));let Y;this._calculateNearFarZIfNeeded(z,K,l),Y=new Float64Array(16),a.aV(Y,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),a.an(this._invProjMatrix,Y),Y[8]=2*-l.x/this._helper._width,Y[9]=2*l.y/this._helper._height,this._projectionMatrix=a.aW(Y),a.K(Y,Y,[1,-1,1]),a.J(Y,Y,[0,0,-this._helper.cameraToCenterDistance]),a.aX(Y,Y,-this.rollInRadians),a.aY(Y,Y,this.pitchInRadians),a.aX(Y,Y,-this.bearingInRadians),a.J(Y,Y,[-C,-M,0]),this._mercatorMatrix=a.K([],Y,[this.worldSize,this.worldSize,this.worldSize]),a.K(Y,Y,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=a.L(new Float64Array(16),this.clipSpaceToPixelsMatrix,Y),a.J(Y,Y,[0,0,-this.elevation]),this._viewProjMatrix=Y,this._invViewProjMatrix=a.an([],Y);const ne=[0,0,-1,1];a.al(ne,ne,this._invViewProjMatrix),this._cameraPosition=[ne[0]/ne[3],ne[1]/ne[3],ne[2]/ne[3]],this._fogMatrix=new Float64Array(16),a.aV(this._fogMatrix,this.fovInRadians,this.width/this.height,z,this._helper._farZ),this._fogMatrix[8]=2*-l.x/this.width,this._fogMatrix[9]=2*l.y/this.height,a.K(this._fogMatrix,this._fogMatrix,[1,-1,1]),a.J(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),a.aX(this._fogMatrix,this._fogMatrix,-this.rollInRadians),a.aY(this._fogMatrix,this._fogMatrix,this.pitchInRadians),a.aX(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),a.J(this._fogMatrix,this._fogMatrix,[-C,-M,0]),a.K(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),a.J(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=a.L(new Float64Array(16),this.clipSpaceToPixelsMatrix,Y);const se=this._helper._width%2/2,be=this._helper._height%2/2,Oe=Math.cos(this.bearingInRadians),Te=Math.sin(-this.bearingInRadians),$e=C-Math.round(C)+Oe*se+Te*be,He=M-Math.round(M)+Oe*be+Te*se,ct=new Float64Array(Y);if(a.J(ct,ct,[$e>.5?$e-1:$e,He>.5?He-1:He,0]),this._alignedProjMatrix=ct,Y=a.an(new Float64Array(16),this._pixelMatrix),!Y)throw new Error("failed to invert matrix");this._pixelMatrixInverse=Y,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const l=this.screenPointToMercatorCoordinate(new a.P(0,0)),c=[l.x*this.worldSize,l.y*this.worldSize,0,1];return a.al(c,c,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const l=a.aH(1,this.center.lat)*this.worldSize;return Mo(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/l).toLngLat()}lngLatToCameraDepth(l,c){const C=a.Y.fromLngLat(l),M=[C.x*this.worldSize,C.y*this.worldSize,c,1];return a.al(M,M,this._viewProjMatrix),M[2]/M[3]}getProjectionData(l){const{overscaledTileID:c,aligned:C,applyTerrainMatrix:M}=l,K=this._helper.getMercatorTileCoordinates(c),z=c?this.calculatePosMatrix(c,C,!0):null;let Y;return Y=c&&c.terrainRttPosMatrix32f&&M?c.terrainRttPosMatrix32f:z||a.aZ(),{mainMatrix:Y,tileMercatorCoords:K,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:Y}}isLocationOccluded(l){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(l,c,C){return 1}transformLightDirection(l){return a.aN(l)}getRayDirectionFromPixel(l){throw new Error("Not implemented.")}projectTileCoordinates(l,c,C,M){const K=this.calculatePosMatrix(C);let z;M?(z=[l,c,M(l,c),1],a.al(z,z,K)):(z=[l,c,0,1],Xr(z,z,K));const Y=z[3];return{point:new a.P(z[0]/Y,z[1]/Y),signedDistanceFromCamera:Y,isOccluded:!1}}populateCache(l){for(const c of l)this.calculatePosMatrix(c)}getMatrixForModel(l,c){const C=a.Y.fromLngLat(l,c),M=C.meterInMercatorCoordinateUnits(),K=a.a_();return a.J(K,K,[C.x,C.y,C.z]),a.aX(K,K,Math.PI),a.aY(K,K,Math.PI/2),a.K(K,K,[-M,M,M]),K}getProjectionDataForCustomLayer(l=!0){const c=new a.S(0,0,0,0,0),C=this.getProjectionData({overscaledTileID:c,applyGlobeMatrix:l}),M=Ta(c,this.worldSize);a.L(M,this._viewProjMatrix,M),C.tileMercatorCoords=[0,0,1,1];const K=[a.X,a.X,this.worldSize/this._helper.pixelsPerMeter],z=a.a$();return a.K(z,M,K),C.fallbackMatrix=z,C.mainMatrix=z,C}getFastPathSimpleProjectionMatrix(l){return this.calculatePosMatrix(l)}}function qs(){a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Pa(k){if(k.useSlerp)if(k.k<1){const l=a.b0(k.startEulerAngles.roll,k.startEulerAngles.pitch,k.startEulerAngles.bearing),c=a.b0(k.endEulerAngles.roll,k.endEulerAngles.pitch,k.endEulerAngles.bearing),C=new Float64Array(4);a.b1(C,l,c,k.k);const M=a.b2(C);k.tr.setRoll(M.roll),k.tr.setPitch(M.pitch),k.tr.setBearing(M.bearing)}else k.tr.setRoll(k.endEulerAngles.roll),k.tr.setPitch(k.endEulerAngles.pitch),k.tr.setBearing(k.endEulerAngles.bearing);else k.tr.setRoll(a.y.number(k.startEulerAngles.roll,k.endEulerAngles.roll,k.k)),k.tr.setPitch(a.y.number(k.startEulerAngles.pitch,k.endEulerAngles.pitch,k.k)),k.tr.setBearing(a.y.number(k.startEulerAngles.bearing,k.endEulerAngles.bearing,k.k))}function Cl(k,l,c,C,M){const K=M.padding,z=kr(M.worldSize,c.getNorthWest()),Y=kr(M.worldSize,c.getNorthEast()),ne=kr(M.worldSize,c.getSouthEast()),se=kr(M.worldSize,c.getSouthWest()),be=a.aa(-C),Oe=z.rotate(be),Te=Y.rotate(be),$e=ne.rotate(be),He=se.rotate(be),ct=new a.P(Math.max(Oe.x,Te.x,He.x,$e.x),Math.max(Oe.y,Te.y,He.y,$e.y)),st=new a.P(Math.min(Oe.x,Te.x,He.x,$e.x),Math.min(Oe.y,Te.y,He.y,$e.y)),dt=ct.sub(st),gt=(M.width-(K.left+K.right+l.left+l.right))/dt.x,St=(M.height-(K.top+K.bottom+l.top+l.bottom))/dt.y;if(St<0||gt<0)return void qs();const It=Math.min(a.a8(M.scale*Math.min(gt,St)),k.maxZoom),Kt=a.P.convert(k.offset),zt=new a.P((l.left-l.right)/2,(l.top-l.bottom)/2).rotate(a.aa(C)),Tt=Kt.add(zt).mult(M.scale/a.aG(It));return{center:Oi(M.worldSize,z.add(ne).div(2).sub(Tt)),zoom:It,bearing:C}}class eA{get useGlobeControls(){return!1}handlePanInertia(l,c){return{easingOffset:l,easingCenter:c.center}}handleMapControlsRollPitchBearingZoom(l,c){l.bearingDelta&&c.setBearing(c.bearing+l.bearingDelta),l.pitchDelta&&c.setPitch(c.pitch+l.pitchDelta),l.rollDelta&&c.setRoll(c.roll+l.rollDelta),l.zoomDelta&&c.setZoom(c.zoom+l.zoomDelta)}handleMapControlsPan(l,c,C){l.around.distSqr(c.centerPoint)<.01||c.setLocationAtPoint(C,l.around)}cameraForBoxAndBearing(l,c,C,M,K){return Cl(l,c,C,M,K)}handleJumpToCenterZoom(l,c){l.zoom!==(c.zoom!==void 0?+c.zoom:l.zoom)&&l.setZoom(+c.zoom),c.center!==void 0&&l.setCenter(a.N.convert(c.center))}handleEaseTo(l,c){const C=l.zoom,M=l.padding,K={roll:l.roll,pitch:l.pitch,bearing:l.bearing},z={roll:c.roll===void 0?l.roll:c.roll,pitch:c.pitch===void 0?l.pitch:c.pitch,bearing:c.bearing===void 0?l.bearing:c.bearing},Y=c.zoom!==void 0,ne=!l.isPaddingEqual(c.padding);let se=!1;const be=Y?+c.zoom:l.zoom;let Oe=l.centerPoint.add(c.offsetAsPoint);const Te=l.screenPointToLocation(Oe),{center:$e,zoom:He}=l.getConstrained(a.N.convert(c.center||Te),be??C);au(l,$e);const ct=kr(l.worldSize,Te),st=kr(l.worldSize,$e).sub(ct),dt=a.aG(He-C);return se=He!==C,{easeFunc:gt=>{if(se&&l.setZoom(a.y.number(C,He,gt)),a.b3(K,z)||Pa({startEulerAngles:K,endEulerAngles:z,tr:l,k:gt,useSlerp:K.roll!=z.roll}),ne&&(l.interpolatePadding(M,c.padding,gt),Oe=l.centerPoint.add(c.offsetAsPoint)),c.around)l.setLocationAtPoint(c.around,c.aroundPoint);else{const St=a.aG(l.zoom-C),It=He>C?Math.min(2,dt):Math.max(.5,dt),Kt=Math.pow(It,1-gt),zt=Oi(l.worldSize,ct.add(st.mult(gt*Kt)).mult(St));l.setLocationAtPoint(l.renderWorldCopies?zt.wrap():zt,Oe)}},isZooming:se,elevationCenter:$e}}handleFlyTo(l,c){const C=c.zoom!==void 0,M=l.zoom,K=l.getConstrained(a.N.convert(c.center||c.locationAtOffset),C?+c.zoom:M),z=K.center,Y=K.zoom;au(l,z);const ne=kr(l.worldSize,c.locationAtOffset),se=kr(l.worldSize,z).sub(ne),be=se.mag(),Oe=a.aG(Y-M);let Te;if(c.minZoom!==void 0){const $e=Math.min(+c.minZoom,M,Y),He=l.getConstrained(z,$e).zoom;Te=a.aG(He-M)}return{easeFunc:($e,He,ct,st)=>{l.setZoom($e===1?Y:M+a.a8(He));const dt=$e===1?z:Oi(l.worldSize,ne.add(se.mult(ct)).mult(He));l.setLocationAtPoint(l.renderWorldCopies?dt.wrap():dt,st)},scaleOfZoom:Oe,targetCenter:z,scaleOfMinZoom:Te,pixelPathLength:be}}}class Ji{constructor(l,c,C){this.blendFunction=l,this.blendColor=c,this.mask=C}}Ji.Replace=[1,0],Ji.disabled=new Ji(Ji.Replace,a.b4.transparent,[!1,!1,!1,!1]),Ji.unblended=new Ji(Ji.Replace,a.b4.transparent,[!0,!0,!0,!0]),Ji.alphaBlended=new Ji([1,771],a.b4.transparent,[!0,!0,!0,!0]);const $l=2305;class zi{constructor(l,c,C){this.enable=l,this.mode=c,this.frontFace=C}}zi.disabled=new zi(!1,1029,$l),zi.backCCW=new zi(!0,1029,$l),zi.frontCCW=new zi(!0,1028,$l);class Zr{constructor(l,c,C){this.func=l,this.mask=c,this.range=C}}Zr.ReadOnly=!1,Zr.ReadWrite=!0,Zr.disabled=new Zr(519,Zr.ReadOnly,[0,1]);const Vl=7680;class Wi{constructor(l,c,C,M,K,z){this.test=l,this.ref=c,this.mask=C,this.fail=M,this.depthFail=K,this.pass=z}}Wi.disabled=new Wi({func:519,mask:0},0,0,Vl,Vl,Vl);const lo=new WeakMap;function Di(k){var l;if(lo.has(k))return lo.get(k);{const c=(l=k.getParameter(k.VERSION))===null||l===void 0?void 0:l.startsWith("WebGL 2.0");return lo.set(k,c),c}}class te{get awaitingQuery(){return!!this._readbackQueue}constructor(l){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=l;const c=l.context,C=c.gl;this._texFormat=C.RGBA,this._texType=C.UNSIGNED_BYTE;const M=new a.aC;M.emplaceBack(-1,-1),M.emplaceBack(2,-1),M.emplaceBack(-1,2);const K=new a.aE;K.emplaceBack(0,1,2),this._fullscreenTriangle=new rs(c.createVertexBuffer(M,Ai.members),c.createIndexBuffer(K),a.aD.simpleSegment(0,0,M.length,K.length)),this._resultBuffer=new Uint8Array(4),c.activeTexture.set(C.TEXTURE1);const z=C.createTexture();C.bindTexture(C.TEXTURE_2D,z),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.NEAREST),C.texImage2D(C.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=c.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(z),Di(C)&&(this._pbo=C.createBuffer(),C.bindBuffer(C.PIXEL_PACK_BUFFER,this._pbo),C.bufferData(C.PIXEL_PACK_BUFFER,4,C.STREAM_READ),C.bindBuffer(C.PIXEL_PACK_BUFFER,null))}destroy(){const l=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),l.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(l,c){const C=this._updateCount;return this._readbackQueue?C>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():C>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(l,c),this._updateCount++,this._measuredError}_bindFramebuffer(){const l=this._cachedRenderContext.context,c=l.gl;l.activeTexture.set(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,this._fbo.colorAttachment.get()),l.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(l,c){const C=this._cachedRenderContext.context,M=C.gl;if(this._bindFramebuffer(),C.viewport.set([0,0,this._texWidth,this._texHeight]),C.clear({color:a.b4.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(C,M.TRIANGLES,Zr.disabled,Wi.disabled,Ji.unblended,zi.disabled,((K,z)=>({u_input:K,u_output_expected:z}))(l,c),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Di(M)){M.bindBuffer(M.PIXEL_PACK_BUFFER,this._pbo),M.readBuffer(M.COLOR_ATTACHMENT0),M.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),M.bindBuffer(M.PIXEL_PACK_BUFFER,null);const K=M.fenceSync(M.SYNC_GPU_COMMANDS_COMPLETE,0);M.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:K}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const l=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Di(l)){const c=l.clientWaitSync(this._readbackQueue.sync,0,0);if(c===l.WAIT_FAILED)return a.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(c===l.TIMEOUT_EXPIRED)return;l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),l.bindBuffer(l.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),l.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=te._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(l){let c=0;return c+=l[0]/256,c+=l[1]/65536,c+=l[2]/16777216,l[3]<127&&(c=-c),c/128}}const Ee=a.X/128;function ot(k,l){const c=k.granularity!==void 0?Math.max(k.granularity,1):1,C=c+(k.generateBorders?2:0),M=c+(k.extendToNorthPole||k.generateBorders?1:0)+(k.extendToSouthPole||k.generateBorders?1:0),K=C+1,z=M+1,Y=k.generateBorders?-1:0,ne=k.generateBorders||k.extendToNorthPole?-1:0,se=c+(k.generateBorders?1:0),be=c+(k.generateBorders||k.extendToSouthPole?1:0),Oe=K*z,Te=C*M*6,$e=K*z>65536;if($e&&l==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const He=$e||l==="32bit",ct=new Int16Array(2*Oe);let st=0;for(let St=ne;St<=be;St++)for(let It=Y;It<=se;It++){let Kt=It/c*a.X;It===-1&&(Kt=-64),It===c+1&&(Kt=a.X+Ee);let zt=St/c*a.X;St===-1&&(zt=k.extendToNorthPole?a.b6:-64),St===c+1&&(zt=k.extendToSouthPole?a.b7:a.X+Ee),ct[st++]=Kt,ct[st++]=zt}const dt=He?new Uint32Array(Te):new Uint16Array(Te);let gt=0;for(let St=0;St<M;St++)for(let It=0;It<C;It++){const Kt=It+1+St*K,zt=It+(St+1)*K,Tt=It+1+(St+1)*K;dt[gt++]=It+St*K,dt[gt++]=zt,dt[gt++]=Kt,dt[gt++]=Kt,dt[gt++]=zt,dt[gt++]=Tt}return{vertices:ct.buffer.slice(0),indices:dt.buffer.slice(0),uses32bitIndices:He}}const $t=new a.aB({fill:new a.b8(128,2),line:new a.b8(512,0),tile:new a.b8(128,32),stencil:new a.b8(128,1),circle:3});class Sr{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Hr.projectionGlobe}get vertexShaderPreludeCode(){return Hr.projectionMercator.vertexSource}get subdivisionGranularity(){return $t}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(l){this._errorMeasurement||(this._errorMeasurement=new te(l));const c=a.Q(this._errorQueryLatitudeDegrees),C=2*Math.atan(Math.exp(Math.PI-c*Math.PI*2))-.5*Math.PI,M=this._errorMeasurement.updateErrorLoop(c,C),K=S.now();M!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=M,this._errorMeasurementLastChangeTime=K);const z=Math.min(Math.max((K-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=a.b9(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,a.ba(z))}_getMeshKey(l){return`${l.granularity.toString(36)}_${l.generateBorders?"b":""}${l.extendToNorthPole?"n":""}${l.extendToSouthPole?"s":""}`}getMeshFromTileID(l,c,C,M,K){const z=(K==="stencil"?$t.stencil:$t.tile).getGranularityForZoomLevel(c.z);return this._getMesh(l,{granularity:z,generateBorders:C,extendToNorthPole:c.y===0&&M,extendToSouthPole:c.y===(1<<c.z)-1&&M})}_getMesh(l,c){const C=this._getMeshKey(c);if(C in this._tileMeshCache)return this._tileMeshCache[C];const M=function(K,z){const Y=ot(z,"16bit"),ne=a.aC.deserialize({arrayBuffer:Y.vertices,length:Y.vertices.byteLength/2/2}),se=a.aE.deserialize({arrayBuffer:Y.indices,length:Y.indices.byteLength/2/3});return new rs(K.createVertexBuffer(ne,Ai.members),K.createIndexBuffer(se),a.aD.simpleSegment(0,0,ne.length,se.length))}(l,c);return this._tileMeshCache[C]=M,M}recalculate(l){}hasTransition(){const l=S.now();let c=!1;return c=c||(l-this._errorMeasurementLastChangeTime)/1e3<.7,c=c||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,c}setErrorQueryLatitudeDegrees(l){this._errorQueryLatitudeDegrees=l}}const Nn=new a.q({type:new a.D(a.v.projection.type)});class si extends a.E{constructor(l){super(),this._transitionable=new a.T(Nn),this.setProjection(l),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0)),this._mercatorProjection=new sa,this._verticalPerspectiveProjection=new Sr}get transitionState(){const l=this.properties.get("type");if(typeof l=="string"&&l==="mercator")return 0;if(typeof l=="string"&&l==="vertical-perspective")return 1;if(l instanceof a.bb){if(l.from==="vertical-perspective"&&l.to==="mercator")return 1-l.transition;if(l.from==="mercator"&&l.to==="vertical-perspective")return l.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(l){this._mercatorProjection.updateGPUdependent(l),this._verticalPerspectiveProjection.updateGPUdependent(l)}getMeshFromTileID(l,c,C,M,K){return this.currentProjection.getMeshFromTileID(l,c,C,M,K)}setProjection(l){this._transitionable.setValue("type",(l==null?void 0:l.type)||"mercator")}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}setErrorQueryLatitudeDegrees(l){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(l),this._mercatorProjection.setErrorQueryLatitudeDegrees(l)}}function fi(k){const l=Ci(k.worldSize,k.center.lat);return 2*Math.PI*l}function pr(k,l,c,C,M){const K=1/(1<<M),z=l/a.X*K+C*K,Y=a.bd((k/a.X*K+c*K)*Math.PI*2+Math.PI,2*Math.PI),ne=2*Math.atan(Math.exp(Math.PI-z*Math.PI*2))-.5*Math.PI,se=Math.cos(ne),be=new Float64Array(3);return be[0]=Math.sin(Y)*se,be[1]=Math.sin(ne),be[2]=Math.cos(Y)*se,be}function Er(k){return function(l,c){const C=Math.cos(c),M=new Float64Array(3);return M[0]=Math.sin(l)*C,M[1]=Math.sin(c),M[2]=Math.cos(l)*C,M}(k.lng*Math.PI/180,k.lat*Math.PI/180)}function Ci(k,l){return k/(2*Math.PI)/Math.cos(l*Math.PI/180)}function So(k){const l=Math.asin(k[1])/Math.PI*180,c=Math.sqrt(k[0]*k[0]+k[2]*k[2]);if(c>1e-6){const C=k[0]/c,M=Math.acos(k[2]/c),K=(C>0?M:-M)/Math.PI*180;return new a.N(a.aI(K,-180,180),l)}return new a.N(0,l)}function Ri(k){return Math.cos(k*Math.PI/180)}function Nr(k,l){const c=Ri(k),C=Ri(l);return a.a8(C/c)}function eo(k,l){const c=k.rotate(l.bearingInRadians),C=l.zoom+Nr(l.center.lat,0),M=a.b9(1/Ri(l.center.lat),1/Ri(Math.min(Math.abs(l.center.lat),60)),a.bc(C,7,3,0,1)),K=360/fi({worldSize:l.worldSize,center:{lat:l.center.lat}});return new a.N(l.center.lng-c.x*K*M,a.ab(l.center.lat+c.y*K,-85.051129,a.aF))}function to(k){const l=.5*k,c=Math.sin(l),C=Math.cos(l);return Math.log(c+C)-Math.log(C-c)}function la(k,l,c,C){const M=k.lat+c*C;if(Math.abs(c)>1){const K=(Math.sign(k.lat+c)!==Math.sign(k.lat)?-Math.abs(k.lat):Math.abs(k.lat))*Math.PI/180,z=Math.abs(k.lat+c)*Math.PI/180,Y=to(K+C*(z-K)),ne=to(K),se=to(z);return new a.N(k.lng+l*((Y-ne)/(se-ne)),M)}return new a.N(k.lng+l*C,M)}class gs{constructor(l){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._aabbFactory=l}recalculateCache(){if(!this._hadAnyChanges)return;const l=this._cachePrevious;this._cachePrevious=this._cache,this._cache=l,this._cache.clear(),this._hadAnyChanges=!1}getTileAABB(l,c,C,M){const K=`${l.z}_${l.x}_${l.y}`,z=this._cache.get(K);if(z)return z;const Y=this._cachePrevious.get(K);if(Y)return this._cache.set(K,Y),Y;const ne=this._aabbFactory(l,c,C,M);return this._cache.set(K,ne),this._hadAnyChanges=!0,ne}}function Ks(k,l,c){const C=k-l;return C<0?-C:Math.max(0,C-c)}function su(k,l,c,C,M){const K=k-c;let z;return z=K<0?Math.min(-K,1+K-M):K>1?Math.min(Math.max(K-M,0),1-K):0,Math.max(z,Ks(l,C,M))}class Va{constructor(){this._aabbCache=new gs(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(l,c,C,M){const K=1<<C.z,z=1/K,Y=C.x/K,ne=C.y/K;let se=2;return se=Math.min(se,su(l,c,Y,ne,z)),se=Math.min(se,su(l,c,Y+.5,-ne-z,z)),se=Math.min(se,su(l,c,Y+.5,2-ne-z,z)),se}getWrap(l,c,C){const M=1<<c.z,K=1/M,z=c.x/M,Y=Ks(l.x,z,K),ne=Ks(l.x,z-1,K),se=Ks(l.x,z+1,K),be=Math.min(Y,ne,se);return be===se?1:be===ne?-1:0}allowVariableZoom(l,c){return Ut(l,c)>4}allowWorldCopies(){return!1}getTileAABB(l,c,C,M){return this._aabbCache.getTileAABB(l,c,C,M)}_computeTileAABB(l,c,C,M){if(l.z<=0)return new $a([-1,-1,-1],[1,1,1]);if(l.z===1)return new $a([l.x===0?-1:0,l.y===0?0:-1,-1],[l.x===0?0:1,l.y===0?1:0,1]);{const K=[pr(0,0,l.x,l.y,l.z),pr(a.X,0,l.x,l.y,l.z),pr(a.X,a.X,l.x,l.y,l.z),pr(0,a.X,l.x,l.y,l.z)],z=[1,1,1],Y=[-1,-1,-1];for(const ne of K)for(let se=0;se<3;se++)z[se]=Math.min(z[se],ne[se]),Y[se]=Math.max(Y[se],ne[se]);if(l.y===0||l.y===(1<<l.z)-1){const ne=[0,l.y===0?1:-1,0];for(let se=0;se<3;se++)z[se]=Math.min(z[se],ne[se]),Y[se]=Math.max(Y[se],ne[se])}return new $a(z,Y)}}}class ac{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(l){this._helper.setMinZoom(l)}setMaxZoom(l){this._helper.setMaxZoom(l)}setMinPitch(l){this._helper.setMinPitch(l)}setMaxPitch(l){this._helper.setMaxPitch(l)}setRenderWorldCopies(l){this._helper.setRenderWorldCopies(l)}setBearing(l){this._helper.setBearing(l)}setPitch(l){this._helper.setPitch(l)}setRoll(l){this._helper.setRoll(l)}setFov(l){this._helper.setFov(l)}setZoom(l){this._helper.setZoom(l)}setCenter(l){this._helper.setCenter(l)}setElevation(l){this._helper.setElevation(l)}setMinElevationForCurrentTile(l){this._helper.setMinElevationForCurrentTile(l)}setPadding(l){this._helper.setPadding(l)}interpolatePadding(l,c,C){return this._helper.interpolatePadding(l,c,C)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,c){this._helper.resize(l,c)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(l){this._helper.setMaxBounds(l)}overrideNearFarZ(l,c){this._helper.overrideNearFarZ(l,c)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(l){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),l)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(l){}constructor(){this._cachedClippingPlane=a.be(),this._projectionMatrix=a.a_(),this._globeViewProjMatrix32f=a.aZ(),this._globeViewProjMatrixNoCorrection=a.a_(),this._globeViewProjMatrixNoCorrectionInverted=a.a_(),this._globeProjMatrixInverted=a.a_(),this._cameraPosition=a.bf(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new ea({calcMatrices:()=>{this._calcMatrices()},getConstrained:(l,c)=>this.getConstrained(l,c)}),this._coveringTilesDetailsProvider=new Va}clone(){const l=new ac;return l.apply(this),l}apply(l,c){this._globeLatitudeErrorCorrectionRadians=c||0,this._helper.apply(l)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const l=a.bf();return l[0]=this._cameraPosition[0],l[1]=this._cameraPosition[1],l[2]=this._cameraPosition[2],l}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(l){const{overscaledTileID:c,applyGlobeMatrix:C}=l,M=this._helper.getMercatorTileCoordinates(c);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:M,clippingPlane:this._cachedClippingPlane,projectionTransition:C?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(l){const c=this.pitchInRadians,C=this.cameraToCenterDistance/l,M=Math.sin(c)*C,K=Math.cos(c)*C+1,z=1/Math.sqrt(M*M+K*K)*1;let Y=-M,ne=K;const se=Math.sqrt(Y*Y+ne*ne);Y/=se,ne/=se;const be=[0,Y,ne];return a.bg(be,be,[0,0,0],-this.bearingInRadians),a.bh(be,be,[0,0,0],-1*this.center.lat*Math.PI/180),a.bi(be,be,[0,0,0],this.center.lng*Math.PI/180),a.aL(be,be,.25),[...be,.25*-z]}isLocationOccluded(l){return!this.isSurfacePointVisible(Er(l))}transformLightDirection(l){const c=this._helper._center.lng*Math.PI/180,C=this._helper._center.lat*Math.PI/180,M=Math.cos(C),K=[Math.sin(c)*M,Math.sin(C),Math.cos(c)*M],z=[K[2],0,-K[0]],Y=[0,0,0];a.aR(Y,z,K),a.aQ(z,z),a.aQ(Y,Y);const ne=[0,0,0];return a.aQ(ne,[z[0]*l[0]+Y[0]*l[1]+K[0]*l[2],z[1]*l[0]+Y[1]*l[1]+K[1]*l[2],z[2]*l[0]+Y[2]*l[1]+K[2]*l[2]]),ne}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(l,c,C){const M=function(Y,ne,se){const be=1/(1<<se.z);return new a.Y(Y/a.X*be+se.x*be,ne/a.X*be+se.y*be)}(l,c,C.canonical),K=(z=M.y,[a.bd(M.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-z*Math.PI*2))-.5*Math.PI]);var z;return this.getCircleRadiusCorrection()/Math.cos(K[1])}projectTileCoordinates(l,c,C,M){const K=C.canonical,z=pr(l,c,K.x,K.y,K.z),Y=1+(M?M(l,c):0)/a.bo,ne=[z[0]*Y,z[1]*Y,z[2]*Y,1];a.al(ne,ne,this._globeViewProjMatrixNoCorrection);const se=this._cachedClippingPlane,be=se[0]*z[0]+se[1]*z[1]+se[2]*z[2]+se[3]<0;return{point:new a.P(ne[0]/ne[3],ne[1]/ne[3]),signedDistanceFromCamera:ne[3],isOccluded:be}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const l=Ci(this.worldSize,this.center.lat),c=a.a$(),C=a.a$();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*l),a.aV(c,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const M=this.centerOffset;c[8]=2*-M.x/this._helper._width,c[9]=2*M.y/this._helper._height,this._projectionMatrix=a.aW(c),this._globeProjMatrixInverted=a.a$(),a.an(this._globeProjMatrixInverted,c),a.J(c,c,[0,0,-this.cameraToCenterDistance]),a.aX(c,c,this.rollInRadians),a.aY(c,c,-this.pitchInRadians),a.aX(c,c,this.bearingInRadians),a.J(c,c,[0,0,-l]);const K=a.bf();K[0]=l,K[1]=l,K[2]=l,a.aY(C,c,this.center.lat*Math.PI/180),a.bj(C,C,-this.center.lng*Math.PI/180),a.K(C,C,K),this._globeViewProjMatrixNoCorrection=C,a.aY(c,c,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),a.bj(c,c,-this.center.lng*Math.PI/180),a.K(c,c,K),this._globeViewProjMatrix32f=new Float32Array(c),this._globeViewProjMatrixNoCorrectionInverted=a.a$(),a.an(this._globeViewProjMatrixNoCorrectionInverted,C);const z=a.bf();this._cameraPosition=a.bf(),this._cameraPosition[2]=this.cameraToCenterDistance/l,a.bg(this._cameraPosition,this._cameraPosition,z,-this.rollInRadians),a.bh(this._cameraPosition,this._cameraPosition,z,this.pitchInRadians),a.bg(this._cameraPosition,this._cameraPosition,z,-this.bearingInRadians),a.aM(this._cameraPosition,this._cameraPosition,[0,0,1]),a.bh(this._cameraPosition,this._cameraPosition,z,-this.center.lat*Math.PI/180),a.bi(this._cameraPosition,this._cameraPosition,z,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(l);const Y=a.aW(this._globeViewProjMatrixNoCorrectionInverted);a.K(Y,Y,[1,1,-1]),this._cachedFrustum=pa.fromInvProjectionMatrix(Y)}calculateFogMatrix(l){a.w("calculateFogMatrix is not supported on globe projection.");const c=a.a$();return a.aq(c),c}getVisibleUnwrappedCoordinates(l){return[new a.aT(0,l)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(l){l&&a.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(l,c){if(!this._globeViewProjMatrixNoCorrection)return 1;const C=Er(l);a.aL(C,C,1+c/a.bo);const M=a.be();return a.al(M,[C[0],C[1],C[2],1],this._globeViewProjMatrixNoCorrection),M[2]/M[3]}populateCache(l){}getBounds(){const l=.5*this.width,c=.5*this.height,C=[new a.P(0,0),new a.P(l,0),new a.P(this.width,0),new a.P(this.width,c),new a.P(this.width,this.height),new a.P(l,this.height),new a.P(0,this.height),new a.P(0,c)],M=[];for(const Oe of C)M.push(this.unprojectScreenPoint(Oe));let K=0,z=0,Y=0,ne=0;const se=this.center;for(const Oe of M){const Te=a.bk(se.lng,Oe.lng),$e=a.bk(se.lat,Oe.lat);Te<z&&(z=Te),Te>K&&(K=Te),$e<ne&&(ne=$e),$e>Y&&(Y=$e)}const be=[se.lng+z,se.lat+ne,se.lng+K,se.lat+Y];return this.isSurfacePointOnScreen([0,1,0])&&(be[3]=90,be[0]=-180,be[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(be[1]=-90,be[0]=-180,be[2]=180),new Lt(be)}getConstrained(l,c){const C=a.ab(l.lat,-85.051129,a.aF),M=a.ab(+c,this.minZoom+Nr(0,C),this.maxZoom);return{center:new a.N(l.lng,C),zoom:M}}calculateCenterFromCameraLngLatAlt(l,c,C,M){return this._helper.calculateCenterFromCameraLngLatAlt(l,c,C,M)}setLocationAtPoint(l,c){const C=Er(this.unprojectScreenPoint(c)),M=Er(l),K=a.bf();a.bl(K);const z=a.bf();a.bi(z,C,K,-this.center.lng*Math.PI/180),a.bh(z,z,K,this.center.lat*Math.PI/180);const Y=M[0]*M[0]+M[2]*M[2],ne=z[0]*z[0];if(Y<ne)return;const se=Math.sqrt(Y-ne),be=-se,Oe=a.bm(M[0],M[2],z[0],se),Te=a.bm(M[0],M[2],z[0],be),$e=a.bf();a.bi($e,M,K,-Oe);const He=a.bm($e[1],$e[2],z[1],z[2]),ct=a.bf();a.bi(ct,M,K,-Te);const st=a.bm(ct[1],ct[2],z[1],z[2]),dt=.5*Math.PI,gt=He>=-dt&&He<=dt,St=st>=-dt&&st<=dt;let It,Kt;if(gt&&St){const Zt=this.center.lng*Math.PI/180,vn=this.center.lat*Math.PI/180;a.bp(Oe,Zt)+a.bp(He,vn)<a.bp(Te,Zt)+a.bp(st,vn)?(It=Oe,Kt=He):(It=Te,Kt=st)}else if(gt)It=Oe,Kt=He;else{if(!St)return;It=Te,Kt=st}const zt=It/Math.PI*180,Tt=Kt/Math.PI*180,tn=this.center.lat;this.setCenter(new a.N(zt,a.ab(Tt,-90,90))),this.setZoom(this.zoom+Nr(tn,this.center.lat))}locationToScreenPoint(l,c){const C=Er(l);if(c){const M=c.getElevationForLngLatZoom(l,this._helper._tileZoom);a.aL(C,C,1+M/a.bo)}return this._projectSurfacePointToScreen(C)}_projectSurfacePointToScreen(l){const c=a.be();return a.al(c,[...l,1],this._globeViewProjMatrixNoCorrection),c[0]/=c[3],c[1]/=c[3],new a.P((.5*c[0]+.5)*this.width,(.5*-c[1]+.5)*this.height)}screenPointToMercatorCoordinate(l,c){if(c){const C=c.pointCoordinate(l);if(C)return C}return a.Y.fromLngLat(this.unprojectScreenPoint(l))}screenPointToLocation(l,c){var C;return(C=this.screenPointToMercatorCoordinate(l,c))===null||C===void 0?void 0:C.toLngLat()}isPointOnMapSurface(l,c){const C=this._cameraPosition,M=this.getRayDirectionFromPixel(l);return!!this.rayPlanetIntersection(C,M)}getRayDirectionFromPixel(l){const c=a.be();c[0]=l.x/this.width*2-1,c[1]=-1*(l.y/this.height*2-1),c[2]=1,c[3]=1,a.al(c,c,this._globeViewProjMatrixNoCorrectionInverted),c[0]/=c[3],c[1]/=c[3],c[2]/=c[3];const C=a.bf();C[0]=c[0]-this._cameraPosition[0],C[1]=c[1]-this._cameraPosition[1],C[2]=c[2]-this._cameraPosition[2];const M=a.bf();return a.aQ(M,C),M}isSurfacePointVisible(l){const c=this._cachedClippingPlane;return c[0]*l[0]+c[1]*l[1]+c[2]*l[2]+c[3]>=0}isSurfacePointOnScreen(l){if(!this.isSurfacePointVisible(l))return!1;const c=a.be();return a.al(c,[...l,1],this._globeViewProjMatrixNoCorrection),c[0]/=c[3],c[1]/=c[3],c[2]/=c[3],c[0]>-1&&c[0]<1&&c[1]>-1&&c[1]<1&&c[2]>-1&&c[2]<1}rayPlanetIntersection(l,c){const C=a.aS(l,c),M=a.bf(),K=a.bf();a.aL(K,c,C),a.aP(M,l,K);const z=1-a.aS(M,M);if(z<0)return null;const Y=a.aS(l,l)-1,ne=-C+(C<0?1:-1)*Math.sqrt(z),se=Y/ne,be=ne;return{tMin:Math.min(se,be),tMax:Math.max(se,be)}}unprojectScreenPoint(l){const c=this._cameraPosition,C=this.getRayDirectionFromPixel(l),M=this.rayPlanetIntersection(c,C);if(M){const se=a.bf();a.aM(se,c,[C[0]*M.tMin,C[1]*M.tMin,C[2]*M.tMin]);const be=a.bf();return a.aQ(be,se),So(be)}const K=this._cachedClippingPlane[0]*C[0]+this._cachedClippingPlane[1]*C[1]+this._cachedClippingPlane[2]*C[2],z=-a.bn(this._cachedClippingPlane,c)/K,Y=a.bf();if(z>0)a.aM(Y,c,[C[0]*z,C[1]*z,C[2]*z]);else{const se=a.bf();a.aM(se,c,[2*C[0],2*C[1],2*C[2]]);const be=a.bn(this._cachedClippingPlane,se);a.aP(Y,se,[this._cachedClippingPlane[0]*be,this._cachedClippingPlane[1]*be,this._cachedClippingPlane[2]*be])}const ne=a.bf();return a.aQ(ne,Y),So(ne)}getMatrixForModel(l,c){const C=a.N.convert(l),M=1/a.bo,K=a.a_();return a.bj(K,K,C.lng/180*Math.PI),a.aY(K,K,-C.lat/180*Math.PI),a.J(K,K,[0,0,1+c/a.bo]),a.aY(K,K,.5*Math.PI),a.K(K,K,[M,M,M]),K}getProjectionDataForCustomLayer(l=!0){const c=this.getProjectionData({overscaledTileID:new a.S(0,0,0,0,0),applyGlobeMatrix:l});return c.tileMercatorCoords=[0,0,1,1],c}getFastPathSimpleProjectionMatrix(l){}}class ws{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(l){this._helper.setMinZoom(l)}setMaxZoom(l){this._helper.setMaxZoom(l)}setMinPitch(l){this._helper.setMinPitch(l)}setMaxPitch(l){this._helper.setMaxPitch(l)}setRenderWorldCopies(l){this._helper.setRenderWorldCopies(l)}setBearing(l){this._helper.setBearing(l)}setPitch(l){this._helper.setPitch(l)}setRoll(l){this._helper.setRoll(l)}setFov(l){this._helper.setFov(l)}setZoom(l){this._helper.setZoom(l)}setCenter(l){this._helper.setCenter(l)}setElevation(l){this._helper.setElevation(l)}setMinElevationForCurrentTile(l){this._helper.setMinElevationForCurrentTile(l)}setPadding(l){this._helper.setPadding(l)}interpolatePadding(l,c,C){return this._helper.interpolatePadding(l,c,C)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,c,C=!0){this._helper.resize(l,c,C)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(l){this._helper.setMaxBounds(l)}overrideNearFarZ(l,c){this._helper.overrideNearFarZ(l,c)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(l){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),l)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(l,c){this._globeness=l,this._globeLatitudeErrorCorrectionRadians=c,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().recalculateCache(),this._mercatorTransform.getCoveringTilesDetailsProvider().recalculateCache()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new ea({calcMatrices:()=>{this._calcMatrices()},getConstrained:(l,c)=>this.getConstrained(l,c)}),this._globeness=1,this._mercatorTransform=new xa,this._verticalPerspectiveTransform=new ac}clone(){const l=new ws;return l._globeness=this._globeness,l._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,l.apply(this),l}apply(l){this._helper.apply(l),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(l){const c=this._mercatorTransform.getProjectionData(l),C=this._verticalPerspectiveTransform.getProjectionData(l);return{mainMatrix:this.isGlobeRendering?C.mainMatrix:c.mainMatrix,clippingPlane:C.clippingPlane,tileMercatorCoords:C.tileMercatorCoords,projectionTransition:l.applyGlobeMatrix?this._globeness:0,fallbackMatrix:c.fallbackMatrix}}isLocationOccluded(l){return this.currentTransform.isLocationOccluded(l)}transformLightDirection(l){return this.currentTransform.transformLightDirection(l)}getPixelScale(){return a.b9(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return a.b9(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(l,c,C){const M=this._mercatorTransform.getPitchedTextCorrection(l,c,C),K=this._verticalPerspectiveTransform.getPitchedTextCorrection(l,c,C);return a.b9(M,K,this._globeness)}projectTileCoordinates(l,c,C,M){return this.currentTransform.projectTileCoordinates(l,c,C,M)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(l){return this.currentTransform.calculateFogMatrix(l)}getVisibleUnwrappedCoordinates(l){return this.currentTransform.getVisibleUnwrappedCoordinates(l)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(l){this._mercatorTransform.recalculateZoomAndCenter(l),this._verticalPerspectiveTransform.recalculateZoomAndCenter(l)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(l,c){return this.currentTransform.lngLatToCameraDepth(l,c)}populateCache(l){this._mercatorTransform.populateCache(l),this._verticalPerspectiveTransform.populateCache(l)}getBounds(){return this.currentTransform.getBounds()}getConstrained(l,c){return this.currentTransform.getConstrained(l,c)}calculateCenterFromCameraLngLatAlt(l,c,C,M){return this._helper.calculateCenterFromCameraLngLatAlt(l,c,C,M)}setLocationAtPoint(l,c){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(l,c),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(l,c),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(l,c){return this.currentTransform.locationToScreenPoint(l,c)}screenPointToMercatorCoordinate(l,c){return this.currentTransform.screenPointToMercatorCoordinate(l,c)}screenPointToLocation(l,c){return this.currentTransform.screenPointToLocation(l,c)}isPointOnMapSurface(l,c){return this.currentTransform.isPointOnMapSurface(l,c)}getRayDirectionFromPixel(l){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(l)}getMatrixForModel(l,c){return this.currentTransform.getMatrixForModel(l,c)}getProjectionDataForCustomLayer(l=!0){const c=this._mercatorTransform.getProjectionDataForCustomLayer(l);if(!this.isGlobeRendering)return c;const C=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(l);return C.fallbackMatrix=c.mainMatrix,C}getFastPathSimpleProjectionMatrix(l){return this.currentTransform.getFastPathSimpleProjectionMatrix(l)}}class rl{get useGlobeControls(){return!0}handlePanInertia(l,c){const C=eo(l,c);return Math.abs(C.lng-c.center.lng)>180&&(C.lng=c.center.lng+179.5*Math.sign(C.lng-c.center.lng)),{easingCenter:C,easingOffset:new a.P(0,0)}}handleMapControlsRollPitchBearingZoom(l,c){const C=l.around,M=c.screenPointToLocation(C);l.bearingDelta&&c.setBearing(c.bearing+l.bearingDelta),l.pitchDelta&&c.setPitch(c.pitch+l.pitchDelta),l.rollDelta&&c.setRoll(c.roll+l.rollDelta);const K=c.zoom;l.zoomDelta&&c.setZoom(c.zoom+l.zoomDelta);const z=c.zoom-K;if(z===0)return;const Y=a.bk(c.center.lng,M.lng),ne=Y/(Math.abs(Y/180)+1),se=a.bk(c.center.lat,M.lat),be=c.getRayDirectionFromPixel(C),Oe=c.cameraPosition,Te=-1*a.aS(Oe,be),$e=a.bf();a.aM($e,Oe,[be[0]*Te,be[1]*Te,be[2]*Te]);const He=a.bq($e)-1,ct=Math.exp(.5*-Math.max(He-.3,0)),st=Ci(c.worldSize,c.center.lat)/Math.min(c.width,c.height),dt=a.bc(st,.9,.5,1,.25),gt=(1-a.aG(-z))*Math.min(ct,dt),St=c.center.lat,It=c.zoom,Kt=new a.N(c.center.lng+ne*gt,a.ab(c.center.lat+se*gt,-85.051129,a.aF));c.setLocationAtPoint(M,C);const zt=c.center,Tt=a.bc(Math.abs(Y),45,85,0,1),tn=a.bc(st,.75,.35,0,1),Zt=Math.pow(Math.max(Tt,tn),.25),vn=a.bk(zt.lng,Kt.lng),_n=a.bk(zt.lat,Kt.lat);c.setCenter(new a.N(zt.lng+vn*Zt,zt.lat+_n*Zt).wrap()),c.setZoom(It+Nr(St,c.center.lat))}handleMapControlsPan(l,c,C){if(!l.panDelta)return;const M=c.center.lat,K=c.zoom;c.setCenter(eo(l.panDelta,c).wrap()),c.setZoom(K+Nr(M,c.center.lat))}cameraForBoxAndBearing(l,c,C,M,K){const z=Cl(l,c,C,M,K),Y=c.left/K.width*2-1,ne=(K.width-c.right)/K.width*2-1,se=c.top/K.height*-2+1,be=(K.height-c.bottom)/K.height*-2+1,Oe=a.bk(C.getWest(),C.getEast())<0,Te=Oe?C.getEast():C.getWest(),$e=Oe?C.getWest():C.getEast(),He=Math.max(C.getNorth(),C.getSouth()),ct=Math.min(C.getNorth(),C.getSouth()),st=Te+.5*a.bk(Te,$e),dt=He+.5*a.bk(He,ct),gt=K.clone();gt.setCenter(z.center),gt.setBearing(z.bearing),gt.setPitch(0),gt.setRoll(0),gt.setZoom(z.zoom);const St=gt.modelViewProjectionMatrix,It=[Er(C.getNorthWest()),Er(C.getNorthEast()),Er(C.getSouthWest()),Er(C.getSouthEast()),Er(new a.N($e,dt)),Er(new a.N(Te,dt)),Er(new a.N(st,He)),Er(new a.N(st,ct))],Kt=Er(z.center);let zt=Number.POSITIVE_INFINITY;for(const Tt of It)Y<0&&(zt=rl.getLesserNonNegativeNonNull(zt,rl.solveVectorScale(Tt,Kt,St,"x",Y))),ne>0&&(zt=rl.getLesserNonNegativeNonNull(zt,rl.solveVectorScale(Tt,Kt,St,"x",ne))),se>0&&(zt=rl.getLesserNonNegativeNonNull(zt,rl.solveVectorScale(Tt,Kt,St,"y",se))),be<0&&(zt=rl.getLesserNonNegativeNonNull(zt,rl.solveVectorScale(Tt,Kt,St,"y",be)));if(Number.isFinite(zt)&&zt!==0)return z.zoom=gt.zoom+a.a8(zt),z;qs()}handleJumpToCenterZoom(l,c){const C=l.center.lat,M=l.getConstrained(c.center?a.N.convert(c.center):l.center,l.zoom).center;l.setCenter(M.wrap());const K=c.zoom!==void 0?+c.zoom:l.zoom+Nr(C,M.lat);l.zoom!==K&&l.setZoom(K)}handleEaseTo(l,c){const C=l.zoom,M=l.center,K=l.padding,z={roll:l.roll,pitch:l.pitch,bearing:l.bearing},Y={roll:c.roll===void 0?l.roll:c.roll,pitch:c.pitch===void 0?l.pitch:c.pitch,bearing:c.bearing===void 0?l.bearing:c.bearing},ne=c.zoom!==void 0,se=!l.isPaddingEqual(c.padding);let be=!1;const Oe=c.center?a.N.convert(c.center):M,Te=l.getConstrained(Oe,C).center;au(l,Te);const $e=l.clone();$e.setCenter(Te),$e.setZoom(ne?+c.zoom:C+Nr(M.lat,Oe.lat)),$e.setBearing(c.bearing);const He=new a.P(a.ab(l.centerPoint.x+c.offsetAsPoint.x,0,l.width),a.ab(l.centerPoint.y+c.offsetAsPoint.y,0,l.height));$e.setLocationAtPoint(Te,He);const ct=(c.offset&&c.offsetAsPoint.mag())>0?$e.center:Te,st=ne?+c.zoom:C+Nr(M.lat,ct.lat),dt=C+Nr(M.lat,0),gt=st+Nr(ct.lat,0),St=a.bk(M.lng,ct.lng),It=a.bk(M.lat,ct.lat),Kt=a.aG(gt-dt);return be=st!==C,{easeFunc:zt=>{if(a.b3(z,Y)||Pa({startEulerAngles:z,endEulerAngles:Y,tr:l,k:zt,useSlerp:z.roll!=Y.roll}),se&&l.interpolatePadding(K,c.padding,zt),c.around)a.w("Easing around a point is not supported under globe projection."),l.setLocationAtPoint(c.around,c.aroundPoint);else{const Tt=gt>dt?Math.min(2,Kt):Math.max(.5,Kt),tn=Math.pow(Tt,1-zt),Zt=la(M,St,It,zt*tn);l.setCenter(Zt.wrap())}if(be){const Tt=a.y.number(dt,gt,zt)+Nr(0,l.center.lat);l.setZoom(Tt)}},isZooming:be,elevationCenter:ct}}handleFlyTo(l,c){const C=c.zoom!==void 0,M=l.center,K=l.zoom,z=!l.isPaddingEqual(c.padding),Y=l.getConstrained(a.N.convert(c.center||c.locationAtOffset),K).center,ne=C?+c.zoom:l.zoom+Nr(l.center.lat,Y.lat),se=l.clone();se.setCenter(Y),z&&se.setPadding(c.padding),se.setZoom(ne),se.setBearing(c.bearing);const be=new a.P(a.ab(l.centerPoint.x+c.offsetAsPoint.x,0,l.width),a.ab(l.centerPoint.y+c.offsetAsPoint.y,0,l.height));se.setLocationAtPoint(Y,be);const Oe=se.center;au(l,Oe);const Te=function(St,It,Kt){const zt=Er(It),Tt=Er(Kt),tn=a.aS(zt,Tt),Zt=Math.acos(tn),vn=fi(St);return Zt/(2*Math.PI)*vn}(l,M,Oe),$e=K+Nr(M.lat,0),He=ne+Nr(Oe.lat,0),ct=a.aG(He-$e);let st;if(typeof c.minZoom=="number"){const St=+c.minZoom+Nr(Oe.lat,0),It=Math.min(St,$e,He)+Nr(0,Oe.lat),Kt=l.getConstrained(Oe,It).zoom+Nr(Oe.lat,0);st=a.aG(Kt-$e)}const dt=a.bk(M.lng,Oe.lng),gt=a.bk(M.lat,Oe.lat);return{easeFunc:(St,It,Kt,zt)=>{const Tt=la(M,dt,gt,Kt),tn=St===1?Oe:Tt;l.setCenter(tn.wrap());const Zt=$e+a.a8(It);l.setZoom(St===1?ne:Zt+Nr(0,tn.lat))},scaleOfZoom:ct,targetCenter:Oe,scaleOfMinZoom:st,pixelPathLength:Te}}static solveVectorScale(l,c,C,M,K){const z=M==="x"?[C[0],C[4],C[8],C[12]]:[C[1],C[5],C[9],C[13]],Y=[C[3],C[7],C[11],C[15]],ne=l[0]*z[0]+l[1]*z[1]+l[2]*z[2],se=l[0]*Y[0]+l[1]*Y[1]+l[2]*Y[2],be=c[0]*z[0]+c[1]*z[1]+c[2]*z[2],Oe=c[0]*Y[0]+c[1]*Y[1]+c[2]*Y[2];return be+K*se===ne+K*Oe||Y[3]*(ne-be)+z[3]*(Oe-se)+ne*Oe==be*se?null:(be+z[3]-K*Oe-K*Y[3])/(be-ne-K*Oe+K*se)}static getLesserNonNegativeNonNull(l,c){return c!==null&&c>=0&&c<l?c:l}}class Xc{constructor(l){this._globe=l,this._mercatorCameraHelper=new eA,this._verticalPerspectiveCameraHelper=new rl}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(l,c){return this.currentHelper.handlePanInertia(l,c)}handleMapControlsRollPitchBearingZoom(l,c){return this.currentHelper.handleMapControlsRollPitchBearingZoom(l,c)}handleMapControlsPan(l,c,C){this.currentHelper.handleMapControlsPan(l,c,C)}cameraForBoxAndBearing(l,c,C,M,K){return this.currentHelper.cameraForBoxAndBearing(l,c,C,M,K)}handleJumpToCenterZoom(l,c){this.currentHelper.handleJumpToCenterZoom(l,c)}handleEaseTo(l,c){return this.currentHelper.handleEaseTo(l,c)}handleFlyTo(l,c){return this.currentHelper.handleFlyTo(l,c)}}const Su=(k,l)=>a.t(k,l&&l.filter(c=>c.identifier!=="source.canvas")),Eu=a.br();class Ah extends a.E{constructor(l,c={}){super(),this._rtlPluginLoaded=()=>{for(const C in this.sourceCaches){const M=this.sourceCaches[C].getSource().type;M!=="vector"&&M!=="geojson"||this.sourceCaches[C].reload()}},this.map=l,this.dispatcher=new Rt(jt(),l._getMapId()),this.dispatcher.registerMessageHandler("GG",(C,M)=>this.getGlyphs(C,M)),this.dispatcher.registerMessageHandler("GI",(C,M)=>this.getImages(C,M)),this.imageManager=new he,this.imageManager.setEventedParent(this),this.glyphManager=new Se(l._requestManager,c.localIdeographFontFamily),this.lineAtlas=new Ue(256,512),this.crossTileSymbolIndex=new aa,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.bs,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.bt()),de().on(wr,this._rtlPluginLoaded),this.on("data",C=>{if(C.dataType!=="source"||C.sourceDataType!=="metadata")return;const M=this.sourceCaches[C.sourceId];if(!M)return;const K=M.getSource();if(K&&K.vectorLayerIds)for(const z in this._layers){const Y=this._layers[z];Y.source===K.id&&this._validateLayer(Y)}})}loadURL(l,c={},C){this.fire(new a.k("dataloading",{dataType:"style"})),c.validate=typeof c.validate!="boolean"||c.validate;const M=this.map._requestManager.transformRequest(l,"Style");this._loadStyleRequest=new AbortController;const K=this._loadStyleRequest;a.h(M,this._loadStyleRequest).then(z=>{this._loadStyleRequest=null,this._load(z.data,c,C)}).catch(z=>{this._loadStyleRequest=null,z&&!K.signal.aborted&&this.fire(new a.j(z))})}loadJSON(l,c={},C){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,S.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,c.validate=c.validate!==!1,this._load(l,c,C)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(Eu,{validate:!1})}_load(l,c,C){var M,K;const z=c.transformStyle?c.transformStyle(C,l):l;if(!c.validate||!Su(this,a.u(z))){this._loaded=!0,this.stylesheet=z;for(const Y in z.sources)this.addSource(Y,z.sources[Y],{validate:!1});z.sprite?this._loadSprite(z.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(z.glyphs),this._createLayers(),this.light=new Ne(this.stylesheet.light),this._setProjectionInternal(((M=this.stylesheet.projection)===null||M===void 0?void 0:M.type)||"mercator"),this.sky=new et(this.stylesheet.sky),this.map.setTerrain((K=this.stylesheet.terrain)!==null&&K!==void 0?K:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){const l=a.bu(this.stylesheet.layers);this.dispatcher.broadcast("SL",l),this._order=l.map(c=>c.id),this._layers={},this._serializedLayers=null;for(const c of l){const C=a.bv(c);C.setEventedParent(this,{layer:{id:c.id}}),this._layers[c.id]=C}}_loadSprite(l,c=!1,C=void 0){let M;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(K,z,Y,ne){return a._(this,void 0,void 0,function*(){const se=X(K),be=Y>1?"@2x":"",Oe={},Te={};for(const{id:$e,url:He}of se){const ct=z.transformRequest(G(He,be,".json"),"SpriteJSON");Oe[$e]=a.h(ct,ne);const st=z.transformRequest(G(He,be,".png"),"SpriteImage");Te[$e]=J.getImage(st,ne)}return yield Promise.all([...Object.values(Oe),...Object.values(Te)]),function($e,He){return a._(this,void 0,void 0,function*(){const ct={};for(const st in $e){ct[st]={};const dt=S.getImageCanvasContext((yield He[st]).data),gt=(yield $e[st]).data;for(const St in gt){const{width:It,height:Kt,x:zt,y:Tt,sdf:tn,pixelRatio:Zt,stretchX:vn,stretchY:_n,content:gn,textFitWidth:In,textFitHeight:Un}=gt[St];ct[st][St]={data:null,pixelRatio:Zt,sdf:tn,stretchX:vn,stretchY:_n,content:gn,textFitWidth:In,textFitHeight:Un,spriteData:{width:It,height:Kt,x:zt,y:Tt,context:dt}}}}return ct})}(Oe,Te)})}(l,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(K=>{if(this._spriteRequest=null,K)for(const z in K){this._spritesImagesIds[z]=[];const Y=this._spritesImagesIds[z]?this._spritesImagesIds[z].filter(ne=>!(ne in K)):[];for(const ne of Y)this.imageManager.removeImage(ne),this._changedImages[ne]=!0;for(const ne in K[z]){const se=z==="default"?ne:`${z}:${ne}`;this._spritesImagesIds[z].push(se),se in this.imageManager.images?this.imageManager.updateImage(se,K[z][ne],!1):this.imageManager.addImage(se,K[z][ne]),c&&(this._changedImages[se]=!0)}}}).catch(K=>{this._spriteRequest=null,M=K,this.fire(new a.j(M))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),c&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"})),C&&C(M)})}_unloadSprite(){for(const l of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(l),this._changedImages[l]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}_validateLayer(l){const c=this.sourceCaches[l.source];if(!c)return;const C=l.sourceLayer;if(!C)return;const M=c.getSource();(M.type==="geojson"||M.vectorLayerIds&&M.vectorLayerIds.indexOf(C)===-1)&&this.fire(new a.j(new Error(`Source layer "${C}" does not exist on source "${M.id}" as specified by style layer "${l.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const l in this.sourceCaches)if(!this.sourceCaches[l].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(l,c=!1){const C=this._serializedAllLayers();if(!l||l.length===0)return Object.values(c?a.bw(C):C);const M=[];for(const K of l)if(C[K]){const z=c?a.bw(C[K]):C[K];M.push(z)}return M}_serializedAllLayers(){let l=this._serializedLayers;if(l)return l;l=this._serializedLayers={};const c=Object.keys(this._layers);for(const C of c){const M=this._layers[C];M.type!=="custom"&&(l[C]=M.serialize())}return l}hasTransitions(){var l,c,C;if(!((l=this.light)===null||l===void 0)&&l.hasTransition()||!((c=this.sky)===null||c===void 0)&&c.hasTransition()||!((C=this.projection)===null||C===void 0)&&C.hasTransition())return!0;for(const M in this.sourceCaches)if(this.sourceCaches[M].hasTransition())return!0;for(const M in this._layers)if(this._layers[M].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(l){if(!this._loaded)return;const c=this._changed;if(c){const M=Object.keys(this._updatedLayers),K=Object.keys(this._removedLayers);(M.length||K.length)&&this._updateWorkerLayers(M,K);for(const z in this._updatedSources){const Y=this._updatedSources[z];if(Y==="reload")this._reloadSource(z);else{if(Y!=="clear")throw new Error(`Invalid action ${Y}`);this._clearSource(z)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const z in this._updatedPaintProps)this._layers[z].updateTransitions(l);this.light.updateTransitions(l),this.sky.updateTransitions(l),this._resetUpdates()}const C={};for(const M in this.sourceCaches){const K=this.sourceCaches[M];C[M]=K.used,K.used=!1}for(const M of this._order){const K=this._layers[M];K.recalculate(l,this._availableImages),!K.isHidden(l.zoom)&&K.source&&(this.sourceCaches[K.source].used=!0)}for(const M in C){const K=this.sourceCaches[M];!!C[M]!=!!K.used&&K.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:M}))}this.light.recalculate(l),this.sky.recalculate(l),this.projection.recalculate(l),this.z=l.zoom,c&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const l=Object.keys(this._changedImages);if(l.length){for(const c in this.sourceCaches)this.sourceCaches[c].reloadTilesForDependencies(["icons","patterns"],l);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const l in this.sourceCaches)this.sourceCaches[l].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(l,c){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(l,!1),removedIds:c})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(l,c={}){var C;this._checkLoaded();const M=this.serialize();if(l=c.transformStyle?c.transformStyle(M,l):l,((C=c.validate)===null||C===void 0||C)&&Su(this,a.u(l)))return!1;(l=a.bw(l)).layers=a.bu(l.layers);const K=a.bx(M,l),z=this._getOperationsToPerform(K);if(z.unimplemented.length>0)throw new Error(`Unimplemented: ${z.unimplemented.join(", ")}.`);if(z.operations.length===0)return!1;for(const Y of z.operations)Y();return this.stylesheet=l,this._serializedLayers=null,!0}_getOperationsToPerform(l){const c=[],C=[];for(const M of l)switch(M.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":c.push(()=>this.addLayer.apply(this,M.args));break;case"removeLayer":c.push(()=>this.removeLayer.apply(this,M.args));break;case"setPaintProperty":c.push(()=>this.setPaintProperty.apply(this,M.args));break;case"setLayoutProperty":c.push(()=>this.setLayoutProperty.apply(this,M.args));break;case"setFilter":c.push(()=>this.setFilter.apply(this,M.args));break;case"addSource":c.push(()=>this.addSource.apply(this,M.args));break;case"removeSource":c.push(()=>this.removeSource.apply(this,M.args));break;case"setLayerZoomRange":c.push(()=>this.setLayerZoomRange.apply(this,M.args));break;case"setLight":c.push(()=>this.setLight.apply(this,M.args));break;case"setGeoJSONSourceData":c.push(()=>this.setGeoJSONSourceData.apply(this,M.args));break;case"setGlyphs":c.push(()=>this.setGlyphs.apply(this,M.args));break;case"setSprite":c.push(()=>this.setSprite.apply(this,M.args));break;case"setTerrain":c.push(()=>this.map.setTerrain.apply(this,M.args));break;case"setSky":c.push(()=>this.setSky.apply(this,M.args));break;case"setProjection":this.setProjection.apply(this,M.args);break;case"setTransition":c.push(()=>{});break;default:C.push(M.command)}return{operations:c,unimplemented:C}}addImage(l,c){if(this.getImage(l))return this.fire(new a.j(new Error(`An image named "${l}" already exists.`)));this.imageManager.addImage(l,c),this._afterImageUpdated(l)}updateImage(l,c){this.imageManager.updateImage(l,c)}getImage(l){return this.imageManager.getImage(l)}removeImage(l){if(!this.getImage(l))return this.fire(new a.j(new Error(`An image named "${l}" does not exist.`)));this.imageManager.removeImage(l),this._afterImageUpdated(l)}_afterImageUpdated(l){this._availableImages=this.imageManager.listImages(),this._changedImages[l]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(l,c,C={}){if(this._checkLoaded(),this.sourceCaches[l]!==void 0)throw new Error(`Source "${l}" already exists.`);if(!c.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(c).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(c.type)>=0&&this._validate(a.u.source,`sources.${l}`,c,null,C))return;this.map&&this.map._collectResourceTiming&&(c.collectResourceTiming=!0);const M=this.sourceCaches[l]=new fe(l,c,this.dispatcher);M.style=this,M.setEventedParent(this,()=>({isSourceLoaded:M.loaded(),source:M.serialize(),sourceId:l})),M.onAdd(this.map),this._changed=!0}removeSource(l){if(this._checkLoaded(),this.sourceCaches[l]===void 0)throw new Error("There is no source with this ID");for(const C in this._layers)if(this._layers[C].source===l)return this.fire(new a.j(new Error(`Source "${l}" cannot be removed while layer "${C}" is using it.`)));const c=this.sourceCaches[l];delete this.sourceCaches[l],delete this._updatedSources[l],c.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:l})),c.setEventedParent(null),c.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(l,c){if(this._checkLoaded(),this.sourceCaches[l]===void 0)throw new Error(`There is no source with this ID=${l}`);const C=this.sourceCaches[l].getSource();if(C.type!=="geojson")throw new Error(`geojsonSource.type is ${C.type}, which is !== 'geojson`);C.setData(c),this._changed=!0}getSource(l){return this.sourceCaches[l]&&this.sourceCaches[l].getSource()}addLayer(l,c,C={}){this._checkLoaded();const M=l.id;if(this.getLayer(M))return void this.fire(new a.j(new Error(`Layer "${M}" already exists on this map.`)));let K;if(l.type==="custom"){if(Su(this,a.by(l)))return;K=a.bv(l)}else{if("source"in l&&typeof l.source=="object"&&(this.addSource(M,l.source),l=a.bw(l),l=a.e(l,{source:M})),this._validate(a.u.layer,`layers.${M}`,l,{arrayIndex:-1},C))return;K=a.bv(l),this._validateLayer(K),K.setEventedParent(this,{layer:{id:M}})}const z=c?this._order.indexOf(c):this._order.length;if(c&&z===-1)this.fire(new a.j(new Error(`Cannot add layer "${M}" before non-existing layer "${c}".`)));else{if(this._order.splice(z,0,M),this._layerOrderChanged=!0,this._layers[M]=K,this._removedLayers[M]&&K.source&&K.type!=="custom"){const Y=this._removedLayers[M];delete this._removedLayers[M],Y.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(l,c){if(this._checkLoaded(),this._changed=!0,!this._layers[l])return void this.fire(new a.j(new Error(`The layer '${l}' does not exist in the map's style and cannot be moved.`)));if(l===c)return;const C=this._order.indexOf(l);this._order.splice(C,1);const M=c?this._order.indexOf(c):this._order.length;c&&M===-1?this.fire(new a.j(new Error(`Cannot move layer "${l}" before non-existing layer "${c}".`))):(this._order.splice(M,0,l),this._layerOrderChanged=!0)}removeLayer(l){this._checkLoaded();const c=this._layers[l];if(!c)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${l}".`)));c.setEventedParent(null);const C=this._order.indexOf(l);this._order.splice(C,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[l]=c,delete this._layers[l],this._serializedLayers&&delete this._serializedLayers[l],delete this._updatedLayers[l],delete this._updatedPaintProps[l],c.onRemove&&c.onRemove(this.map)}getLayer(l){return this._layers[l]}getLayersOrder(){return[...this._order]}hasLayer(l){return l in this._layers}setLayerZoomRange(l,c,C){this._checkLoaded();const M=this.getLayer(l);M?M.minzoom===c&&M.maxzoom===C||(c!=null&&(M.minzoom=c),C!=null&&(M.maxzoom=C),this._updateLayer(M)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${l}".`)))}setFilter(l,c,C={}){this._checkLoaded();const M=this.getLayer(l);if(M){if(!a.bz(M.filter,c))return c==null?(M.filter=void 0,void this._updateLayer(M)):void(this._validate(a.u.filter,`layers.${M.id}.filter`,c,null,C)||(M.filter=a.bw(c),this._updateLayer(M)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${l}".`)))}getFilter(l){return a.bw(this.getLayer(l).filter)}setLayoutProperty(l,c,C,M={}){this._checkLoaded();const K=this.getLayer(l);K?a.bz(K.getLayoutProperty(c),C)||(K.setLayoutProperty(c,C,M),this._updateLayer(K)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${l}".`)))}getLayoutProperty(l,c){const C=this.getLayer(l);if(C)return C.getLayoutProperty(c);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${l}".`)))}setPaintProperty(l,c,C,M={}){this._checkLoaded();const K=this.getLayer(l);K?a.bz(K.getPaintProperty(c),C)||(K.setPaintProperty(c,C,M)&&this._updateLayer(K),this._changed=!0,this._updatedPaintProps[l]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${l}".`)))}getPaintProperty(l,c){return this.getLayer(l).getPaintProperty(c)}setFeatureState(l,c){this._checkLoaded();const C=l.source,M=l.sourceLayer,K=this.sourceCaches[C];if(K===void 0)return void this.fire(new a.j(new Error(`The source '${C}' does not exist in the map's style.`)));const z=K.getSource().type;z==="geojson"&&M?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):z!=="vector"||M?(l.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),K.setFeatureState(M,l.id,c)):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(l,c){this._checkLoaded();const C=l.source,M=this.sourceCaches[C];if(M===void 0)return void this.fire(new a.j(new Error(`The source '${C}' does not exist in the map's style.`)));const K=M.getSource().type,z=K==="vector"?l.sourceLayer:void 0;K!=="vector"||z?c&&typeof l.id!="string"&&typeof l.id!="number"?this.fire(new a.j(new Error("A feature id is required to remove its specific state property."))):M.removeFeatureState(z,l.id,c):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(l){this._checkLoaded();const c=l.source,C=l.sourceLayer,M=this.sourceCaches[c];if(M!==void 0)return M.getSource().type!=="vector"||C?(l.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),M.getFeatureState(C,l.id)):void this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.j(new Error(`The source '${c}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const l=a.bA(this.sourceCaches,K=>K.serialize()),c=this._serializeByIds(this._order,!0),C=this.map.getTerrain()||void 0,M=this.stylesheet;return a.bB({version:M.version,name:M.name,metadata:M.metadata,light:M.light,sky:M.sky,center:M.center,zoom:M.zoom,bearing:M.bearing,pitch:M.pitch,sprite:M.sprite,glyphs:M.glyphs,transition:M.transition,projection:M.projection,sources:l,layers:c,terrain:C},K=>K!==void 0)}_updateLayer(l){this._updatedLayers[l.id]=!0,l.source&&!this._updatedSources[l.source]&&this.sourceCaches[l.source].getSource().type!=="raster"&&(this._updatedSources[l.source]="reload",this.sourceCaches[l.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(l){const c=z=>this._layers[z].type==="fill-extrusion",C={},M=[];for(let z=this._order.length-1;z>=0;z--){const Y=this._order[z];if(c(Y)){C[Y]=z;for(const ne of l){const se=ne[Y];if(se)for(const be of se)M.push(be)}}}M.sort((z,Y)=>Y.intersectionZ-z.intersectionZ);const K=[];for(let z=this._order.length-1;z>=0;z--){const Y=this._order[z];if(c(Y))for(let ne=M.length-1;ne>=0;ne--){const se=M[ne].feature;if(C[se.layer.id]<z)break;K.push(se),M.pop()}else for(const ne of l){const se=ne[Y];if(se)for(const be of se)K.push(be.feature)}}return K}queryRenderedFeatures(l,c,C){c&&c.filter&&this._validate(a.u.filter,"queryRenderedFeatures.filter",c.filter,null,c);const M={};if(c&&c.layers){if(!(Array.isArray(c.layers)||c.layers instanceof Set))return this.fire(new a.j(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const se of c.layers){const be=this._layers[se];if(!be)return this.fire(new a.j(new Error(`The layer '${se}' does not exist in the map's style and cannot be queried for features.`))),[];M[be.source]=!0}}const K=[];c.availableImages=this._availableImages;const z=this._serializedAllLayers(),Y=c.layers instanceof Set?c.layers:Array.isArray(c.layers)?new Set(c.layers):null,ne=Object.assign(Object.assign({},c),{layers:Y});for(const se in this.sourceCaches)c.layers&&!M[se]||K.push(Fe(this.sourceCaches[se],this._layers,z,l,ne,C));return this.placement&&K.push(function(se,be,Oe,Te,$e,He,ct){const st={},dt=He.queryRenderedSymbols(Te),gt=[];for(const St of Object.keys(dt).map(Number))gt.push(ct[St]);gt.sort(tt);for(const St of gt){const It=St.featureIndex.lookupSymbolFeatures(dt[St.bucketInstanceId],be,St.bucketIndex,St.sourceLayerIndex,$e.filter,$e.layers,$e.availableImages,se);for(const Kt in It){const zt=st[Kt]=st[Kt]||[],Tt=It[Kt];Tt.sort((tn,Zt)=>{const vn=St.featureSortOrder;if(vn){const _n=vn.indexOf(tn.featureIndex);return vn.indexOf(Zt.featureIndex)-_n}return Zt.featureIndex-tn.featureIndex});for(const tn of Tt)zt.push(tn)}}return function(St,It,Kt){for(const zt in St)for(const Tt of St[zt])mt(Tt,Kt[It[zt].source]);return St}(st,se,Oe)}(this._layers,z,this.sourceCaches,l,ne,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(K)}querySourceFeatures(l,c){c&&c.filter&&this._validate(a.u.filter,"querySourceFeatures.filter",c.filter,null,c);const C=this.sourceCaches[l];return C?function(M,K){const z=M.getRenderableIds().map(se=>M.getTileByID(se)),Y=[],ne={};for(let se=0;se<z.length;se++){const be=z[se],Oe=be.tileID.canonical.key;ne[Oe]||(ne[Oe]=!0,be.querySourceFeatures(Y,K))}return Y}(C,c):[]}getLight(){return this.light.getLight()}setLight(l,c={}){this._checkLoaded();const C=this.light.getLight();let M=!1;for(const z in l)if(!a.bz(l[z],C[z])){M=!0;break}if(!M)return;const K={now:S.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(l,c),this.light.updateTransitions(K)}getProjection(){var l;return(l=this.stylesheet)===null||l===void 0?void 0:l.projection}setProjection(l){if(this._checkLoaded(),this.projection){if(this.projection.name===l.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=l,this._setProjectionInternal(l.type)}getSky(){var l;return(l=this.stylesheet)===null||l===void 0?void 0:l.sky}setSky(l,c={}){this._checkLoaded();const C=this.getSky();let M=!1;if(!l&&!C)return;if(l&&!C)M=!0;else if(!l&&C)M=!0;else for(const z in l)if(!a.bz(l[z],C[z])){M=!0;break}if(!M)return;const K={now:S.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=l,this.sky.setSky(l,c),this.sky.updateTransitions(K)}_setProjectionInternal(l){const c=function(C){if(Array.isArray(C)){const M=new si({type:C});return{projection:M,transform:new ws,cameraHelper:new Xc(M)}}switch(C){case"mercator":return{projection:new sa,transform:new xa,cameraHelper:new eA};case"globe":{const M=new si({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:M,transform:new ws,cameraHelper:new Xc(M)}}case"vertical-perspective":return{projection:new Sr,transform:new ac,cameraHelper:new rl};default:return a.w(`Unknown projection name: ${C}. Falling back to mercator projection.`),{projection:new sa,transform:new xa,cameraHelper:new eA}}}(l);this.projection=c.projection,this.map.migrateProjection(c.transform,c.cameraHelper);for(const C in this.sourceCaches)this.sourceCaches[C].reload()}_validate(l,c,C,M,K={}){return(!K||K.validate!==!1)&&Su(this,l.call(a.u,a.e({key:c,style:this.serialize(),value:C,styleSpec:a.v},M)))}_remove(l=!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),de().off(wr,this._rtlPluginLoaded);for(const c in this._layers)this._layers[c].setEventedParent(null);for(const c in this.sourceCaches){const C=this.sourceCaches[c];C.setEventedParent(null),C.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),l&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(l)}_clearSource(l){this.sourceCaches[l].clearTiles()}_reloadSource(l){this.sourceCaches[l].resume(),this.sourceCaches[l].reload()}_updateSources(l){for(const c in this.sourceCaches)this.sourceCaches[c].update(l,this.map.terrain)}_generateCollisionBoxes(){for(const l in this.sourceCaches)this._reloadSource(l)}_updatePlacement(l,c,C,M,K=!1){let z=!1,Y=!1;const ne={};for(const se of this._order){const be=this._layers[se];if(be.type!=="symbol")continue;if(!ne[be.source]){const Te=this.sourceCaches[be.source];ne[be.source]=Te.getRenderableIds(!0).map($e=>Te.getTileByID($e)).sort(($e,He)=>He.tileID.overscaledZ-$e.tileID.overscaledZ||($e.tileID.isLessThan(He.tileID)?-1:1))}const Oe=this.crossTileSymbolIndex.addLayer(be,ne[be.source],l.center.lng);z=z||Oe}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((K=K||this._layerOrderChanged||C===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(S.now(),l.zoom))&&(this.pauseablePlacement=new An(l,this.map.terrain,this._order,K,c,C,M,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ne),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(S.now()),Y=!0),z&&this.pauseablePlacement.placement.setStale()),Y||z)for(const se of this._order){const be=this._layers[se];be.type==="symbol"&&this.placement.updateLayerOpacities(be,ne[be.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(S.now())}_releaseSymbolFadeTiles(){for(const l in this.sourceCaches)this.sourceCaches[l].releaseSymbolFadeTiles()}getImages(l,c){return a._(this,void 0,void 0,function*(){const C=yield this.imageManager.getImages(c.icons);this._updateTilesForChangedImages();const M=this.sourceCaches[c.source];return M&&M.setDependencies(c.tileID.key,c.type,c.icons),C})}getGlyphs(l,c){return a._(this,void 0,void 0,function*(){const C=yield this.glyphManager.getGlyphs(c.stacks),M=this.sourceCaches[c.source];return M&&M.setDependencies(c.tileID.key,c.type,[""]),C})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(l,c={}){this._checkLoaded(),l&&this._validate(a.u.glyphs,"glyphs",l,null,c)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=l,this.glyphManager.entries={},this.glyphManager.setURL(l))}addSprite(l,c,C={},M){this._checkLoaded();const K=[{id:l,url:c}],z=[...X(this.stylesheet.sprite),...K];this._validate(a.u.sprite,"sprite",z,null,C)||(this.stylesheet.sprite=z,this._loadSprite(K,!0,M))}removeSprite(l){this._checkLoaded();const c=X(this.stylesheet.sprite);if(c.find(C=>C.id===l)){if(this._spritesImagesIds[l])for(const C of this._spritesImagesIds[l])this.imageManager.removeImage(C),this._changedImages[C]=!0;c.splice(c.findIndex(C=>C.id===l),1),this.stylesheet.sprite=c.length>0?c:void 0,delete this._spritesImagesIds[l],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${l}" doesn't exists on this map.`)))}getSprite(){return X(this.stylesheet.sprite)}setSprite(l,c={},C){this._checkLoaded(),l&&this._validate(a.u.sprite,"sprite",l,null,c)||(this.stylesheet.sprite=l,l?this._loadSprite(l,!0,C):(this._unloadSprite(),C&&C(null)))}}var wa=a.aA([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Ou{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(l,c,C,M,K,z,Y,ne,se){this.context=l;let be=this.boundPaintVertexBuffers.length!==M.length;for(let Oe=0;!be&&Oe<M.length;Oe++)this.boundPaintVertexBuffers[Oe]!==M[Oe]&&(be=!0);!this.vao||this.boundProgram!==c||this.boundLayoutVertexBuffer!==C||be||this.boundIndexBuffer!==K||this.boundVertexOffset!==z||this.boundDynamicVertexBuffer!==Y||this.boundDynamicVertexBuffer2!==ne||this.boundDynamicVertexBuffer3!==se?this.freshBind(c,C,M,K,z,Y,ne,se):(l.bindVertexArray.set(this.vao),Y&&Y.bind(),K&&K.dynamicDraw&&K.bind(),ne&&ne.bind(),se&&se.bind())}freshBind(l,c,C,M,K,z,Y,ne){const se=l.numAttributes,be=this.context,Oe=be.gl;this.vao&&this.destroy(),this.vao=be.createVertexArray(),be.bindVertexArray.set(this.vao),this.boundProgram=l,this.boundLayoutVertexBuffer=c,this.boundPaintVertexBuffers=C,this.boundIndexBuffer=M,this.boundVertexOffset=K,this.boundDynamicVertexBuffer=z,this.boundDynamicVertexBuffer2=Y,this.boundDynamicVertexBuffer3=ne,c.enableAttributes(Oe,l);for(const Te of C)Te.enableAttributes(Oe,l);z&&z.enableAttributes(Oe,l),Y&&Y.enableAttributes(Oe,l),ne&&ne.enableAttributes(Oe,l),c.bind(),c.setVertexAttribPointers(Oe,l,K);for(const Te of C)Te.bind(),Te.setVertexAttribPointers(Oe,l,K);z&&(z.bind(),z.setVertexAttribPointers(Oe,l,K)),M&&M.bind(),Y&&(Y.bind(),Y.setVertexAttribPointers(Oe,l,K)),ne&&(ne.bind(),ne.setVertexAttribPointers(Oe,l,K)),be.currentNumAttributes=se}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Jc=(k,l,c,C,M)=>({u_texture:0,u_ele_delta:k,u_fog_matrix:l,u_fog_color:c?c.properties.get("fog-color"):a.b4.white,u_fog_ground_blend:c?c.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:M?0:c?c.calculateFogBlendOpacity(C):0,u_horizon_color:c?c.properties.get("horizon-color"):a.b4.white,u_horizon_fog_blend:c?c.properties.get("horizon-fog-blend"):1,u_is_globe_mode:M?1:0}),Hf={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function tA(k){const l=[];for(let c=0;c<k.length;c++){if(k[c]===null)continue;const C=k[c].split(" ");l.push(C.pop())}return l}class Dd{constructor(l,c,C,M,K,z,Y,ne){const se=l.gl;this.program=se.createProgram();const be=tA(c.staticAttributes),Oe=C?C.getBinderAttributes():[],Te=be.concat(Oe),$e=Hr.prelude.staticUniforms?tA(Hr.prelude.staticUniforms):[],He=Y.staticUniforms?tA(Y.staticUniforms):[],ct=c.staticUniforms?tA(c.staticUniforms):[],st=C?C.getBinderUniforms():[],dt=$e.concat(He).concat(ct).concat(st),gt=[];for(const Zt of dt)gt.indexOf(Zt)<0&>.push(Zt);const St=C?C.defines():[];Di(se)&&St.unshift("#version 300 es"),K&&St.push("#define OVERDRAW_INSPECTOR;"),z&&St.push("#define TERRAIN3D;"),ne&&St.push(ne);let It=St.concat(Hr.prelude.fragmentSource,Y.fragmentSource,c.fragmentSource).join(`
|
||
`),Kt=St.concat(Hr.prelude.vertexSource,Y.vertexSource,c.vertexSource).join(`
|
||
`);Di(se)||(It=function(Zt){return Zt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(It),Kt=function(Zt){return Zt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Kt));const zt=se.createShader(se.FRAGMENT_SHADER);if(se.isContextLost())return void(this.failedToCreate=!0);if(se.shaderSource(zt,It),se.compileShader(zt),!se.getShaderParameter(zt,se.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${se.getShaderInfoLog(zt)}`);se.attachShader(this.program,zt);const Tt=se.createShader(se.VERTEX_SHADER);if(se.isContextLost())return void(this.failedToCreate=!0);if(se.shaderSource(Tt,Kt),se.compileShader(Tt),!se.getShaderParameter(Tt,se.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${se.getShaderInfoLog(Tt)}`);se.attachShader(this.program,Tt),this.attributes={};const tn={};this.numAttributes=Te.length;for(let Zt=0;Zt<this.numAttributes;Zt++)Te[Zt]&&(se.bindAttribLocation(this.program,Zt,Te[Zt]),this.attributes[Te[Zt]]=Zt);if(se.linkProgram(this.program),!se.getProgramParameter(this.program,se.LINK_STATUS))throw new Error(`Program failed to link: ${se.getProgramInfoLog(this.program)}`);se.deleteShader(Tt),se.deleteShader(zt);for(let Zt=0;Zt<gt.length;Zt++){const vn=gt[Zt];if(vn&&!tn[vn]){const _n=se.getUniformLocation(this.program,vn);_n&&(tn[vn]=_n)}}this.fixedUniforms=M(l,tn),this.terrainUniforms=((Zt,vn)=>({u_depth:new a.bC(Zt,vn.u_depth),u_terrain:new a.bC(Zt,vn.u_terrain),u_terrain_dim:new a.b5(Zt,vn.u_terrain_dim),u_terrain_matrix:new a.bD(Zt,vn.u_terrain_matrix),u_terrain_unpack:new a.bE(Zt,vn.u_terrain_unpack),u_terrain_exaggeration:new a.b5(Zt,vn.u_terrain_exaggeration)}))(l,tn),this.projectionUniforms=((Zt,vn)=>({u_projection_matrix:new a.bD(Zt,vn.u_projection_matrix),u_projection_tile_mercator_coords:new a.bE(Zt,vn.u_projection_tile_mercator_coords),u_projection_clipping_plane:new a.bE(Zt,vn.u_projection_clipping_plane),u_projection_transition:new a.b5(Zt,vn.u_projection_transition),u_projection_fallback_matrix:new a.bD(Zt,vn.u_projection_fallback_matrix)}))(l,tn),this.binderUniforms=C?C.getUniforms(l,tn):[]}draw(l,c,C,M,K,z,Y,ne,se,be,Oe,Te,$e,He,ct,st,dt,gt,St){const It=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(C),l.setStencilMode(M),l.setColorMode(K),l.setCullFace(z),ne){l.activeTexture.set(It.TEXTURE2),It.bindTexture(It.TEXTURE_2D,ne.depthTexture),l.activeTexture.set(It.TEXTURE3),It.bindTexture(It.TEXTURE_2D,ne.texture);for(const zt in this.terrainUniforms)this.terrainUniforms[zt].set(ne[zt])}if(se)for(const zt in se)this.projectionUniforms[Hf[zt]].set(se[zt]);if(Y)for(const zt in this.fixedUniforms)this.fixedUniforms[zt].set(Y[zt]);st&&st.setUniforms(l,this.binderUniforms,He,{zoom:ct});let Kt=0;switch(c){case It.LINES:Kt=2;break;case It.TRIANGLES:Kt=3;break;case It.LINE_STRIP:Kt=1}for(const zt of $e.get()){const Tt=zt.vaos||(zt.vaos={});(Tt[be]||(Tt[be]=new Ou)).bind(l,this,Oe,st?st.getPaintVertexBuffers():[],Te,zt.vertexOffset,dt,gt,St),It.drawElements(c,zt.primitiveLength*Kt,It.UNSIGNED_SHORT,zt.primitiveOffset*Kt*2)}}}function Bc(k,l,c){const C=1/a.at(c,1,l.transform.tileZoom),M=Math.pow(2,c.tileID.overscaledZ),K=c.tileSize*Math.pow(2,l.transform.tileZoom)/M,z=K*(c.tileID.canonical.x+c.tileID.wrap*M),Y=K*c.tileID.canonical.y;return{u_image:0,u_texsize:c.imageAtlasTexture.size,u_scale:[C,k.fromScale,k.toScale],u_fade:k.t,u_pixel_coord_upper:[z>>16,Y>>16],u_pixel_coord_lower:[65535&z,65535&Y]}}const Zf=(k,l,c,C)=>{const M=k.style.light,K=M.properties.get("position"),z=[K.x,K.y,K.z],Y=a.bI();M.properties.get("anchor")==="viewport"&&a.bJ(Y,k.transform.bearingInRadians),a.bK(z,z,Y);const ne=k.transform.transformLightDirection(z),se=M.properties.get("color");return{u_lightpos:z,u_lightpos_globe:ne,u_lightintensity:M.properties.get("intensity"),u_lightcolor:[se.r,se.g,se.b],u_vertical_gradient:+l,u_opacity:c,u_fill_translate:C}},gf=(k,l,c,C,M,K,z)=>a.e(Zf(k,l,c,C),Bc(K,k,z),{u_height_factor:-Math.pow(2,M.overscaledZ)/z.tileSize/8}),sc=(k,l,c,C)=>a.e(Bc(l,k,c),{u_fill_translate:C}),Ha=(k,l)=>({u_world:k,u_fill_translate:l}),ch=(k,l,c,C,M)=>a.e(sc(k,l,c,M),{u_world:C}),Fh=(k,l,c,C,M)=>{const K=k.transform;let z,Y,ne=0;if(c.paint.get("circle-pitch-alignment")==="map"){const se=a.at(l,1,K.zoom);z=!0,Y=[se,se],ne=se/(a.X*Math.pow(2,l.tileID.overscaledZ))*2*Math.PI*M}else z=!1,Y=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(c.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+z,u_device_pixel_ratio:k.pixelRatio,u_extrude_scale:Y,u_globe_extrude_scale:ne,u_translate:C}},ed=k=>({u_pixel_extrude_scale:[1/k.width,1/k.height]}),Uh=k=>({u_viewport_size:[k.width,k.height]}),td=(k,l=1)=>({u_color:k,u_overlay:0,u_overlay_scale:l}),lc=(k,l,c,C)=>{const M=a.at(k,1,l)/(a.X*Math.pow(2,k.tileID.overscaledZ))*2*Math.PI*C;return{u_extrude_scale:a.at(k,1,l),u_intensity:c,u_globe_extrude_scale:M}},dh=(k,l,c,C)=>{const M=a.H();a.bL(M,0,k.width,k.height,0,0,1);const K=k.context.gl;return{u_matrix:M,u_world:[K.drawingBufferWidth,K.drawingBufferHeight],u_image:c,u_color_ramp:C,u_opacity:l.paint.get("heatmap-opacity")}},hh=(k,l,c)=>{const C=c.paint.get("hillshade-shadow-color"),M=c.paint.get("hillshade-highlight-color"),K=c.paint.get("hillshade-accent-color");let z=c.paint.get("hillshade-illumination-direction")*(Math.PI/180);return c.paint.get("hillshade-illumination-anchor")==="viewport"&&(z+=k.transform.bearingInRadians),{u_image:0,u_latrange:Dp(0,l.tileID),u_light:[c.paint.get("hillshade-exaggeration"),z],u_shadow:C,u_highlight:M,u_accent:K}},nd=(k,l)=>{const c=l.stride,C=a.H();return a.bL(C,0,a.X,-8192,0,0,1),a.J(C,C,[0,-8192,0]),{u_matrix:C,u_image:1,u_dimension:[c,c],u_zoom:k.overscaledZ,u_unpack:l.getUnpackVector()}};function Dp(k,l){const c=Math.pow(2,l.canonical.z),C=l.canonical.y;return[new a.Y(0,C/c).toLngLat().lat,new a.Y(0,(C+1)/c).toLngLat().lat]}const Ic=(k,l,c,C)=>{const M=k.transform;return{u_translation:kc(k,l,c),u_ratio:C/a.at(l,1,M.zoom),u_device_pixel_ratio:k.pixelRatio,u_units_to_pixels:[1/M.pixelsToGLUnits[0],1/M.pixelsToGLUnits[1]]}},lu=(k,l,c,C,M)=>a.e(Ic(k,l,c,C),{u_image:0,u_image_height:M}),fh=(k,l,c,C,M)=>{const K=k.transform,z=nA(l,K);return{u_translation:kc(k,l,c),u_texsize:l.imageAtlasTexture.size,u_ratio:C/a.at(l,1,K.zoom),u_device_pixel_ratio:k.pixelRatio,u_image:0,u_scale:[z,M.fromScale,M.toScale],u_fade:M.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},uu=(k,l,c,C,M,K)=>{const z=k.lineAtlas,Y=nA(l,k.transform),ne=c.layout.get("line-cap")==="round",se=z.getDash(M.from,ne),be=z.getDash(M.to,ne),Oe=se.width*K.fromScale,Te=be.width*K.toScale;return a.e(Ic(k,l,c,C),{u_patternscale_a:[Y/Oe,-se.height/2],u_patternscale_b:[Y/Te,-be.height/2],u_sdfgamma:z.width/(256*Math.min(Oe,Te)*k.pixelRatio)/2,u_image:0,u_tex_y_a:se.y,u_tex_y_b:be.y,u_mix:K.t})};function nA(k,l){return 1/a.at(k,1,l.tileZoom)}function kc(k,l,c){return a.au(k.transform,l,c.paint.get("line-translate"),c.paint.get("line-translate-anchor"))}const Ld=(k,l,c,C,M)=>{return{u_tl_parent:k,u_scale_parent:l,u_buffer_scale:1,u_fade_t:c.mix,u_opacity:c.opacity*C.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:C.paint.get("raster-brightness-min"),u_brightness_high:C.paint.get("raster-brightness-max"),u_saturation_factor:(z=C.paint.get("raster-saturation"),z>0?1-1/(1.001-z):-z),u_contrast_factor:(K=C.paint.get("raster-contrast"),K>0?1/(1-K):1+K),u_spin_weights:jh(C.paint.get("raster-hue-rotate")),u_coords_top:[M[0].x,M[0].y,M[1].x,M[1].y],u_coords_bottom:[M[3].x,M[3].y,M[2].x,M[2].y]};var K,z};function jh(k){k*=Math.PI/180;const l=Math.sin(k),c=Math.cos(k);return[(2*c+1)/3,(-Math.sqrt(3)*l-c+1)/3,(Math.sqrt(3)*l-c+1)/3]}const Hl=(k,l,c,C,M,K,z,Y,ne,se,be,Oe,Te)=>{const $e=z.transform;return{u_is_size_zoom_constant:+(k==="constant"||k==="source"),u_is_size_feature_constant:+(k==="constant"||k==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:$e.cameraToCenterDistance,u_pitch:$e.pitch/360*2*Math.PI,u_rotate_symbol:+c,u_aspect_ratio:$e.width/$e.height,u_fade_change:z.options.fadeDuration?z.symbolFadeChange:1,u_label_plane_matrix:Y,u_coord_matrix:ne,u_is_text:+be,u_pitch_with_map:+C,u_is_along_line:M,u_is_variable_anchor:K,u_texsize:Oe,u_texture:0,u_translation:se,u_pitched_scale:Te}},bl=(k,l,c,C,M,K,z,Y,ne,se,be,Oe,Te,$e)=>{const He=z.transform;return a.e(Hl(k,l,c,C,M,K,z,Y,ne,se,be,Oe,$e),{u_gamma_scale:C?Math.cos(He.pitch*Math.PI/180)*He.cameraToCenterDistance:1,u_device_pixel_ratio:z.pixelRatio,u_is_halo:1})},FA=(k,l,c,C,M,K,z,Y,ne,se,be,Oe,Te)=>a.e(bl(k,l,c,C,M,K,z,Y,ne,se,!0,be,0,Te),{u_texsize_icon:Oe,u_texture_icon:1}),Tc=(k,l)=>({u_opacity:k,u_color:l}),zh=(k,l,c,C,M)=>a.e(function(K,z,Y,ne){const se=Y.imageManager.getPattern(K.from.toString()),be=Y.imageManager.getPattern(K.to.toString()),{width:Oe,height:Te}=Y.imageManager.getPixelSize(),$e=Math.pow(2,ne.tileID.overscaledZ),He=ne.tileSize*Math.pow(2,Y.transform.tileZoom)/$e,ct=He*(ne.tileID.canonical.x+ne.tileID.wrap*$e),st=He*ne.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:se.tl,u_pattern_br_a:se.br,u_pattern_tl_b:be.tl,u_pattern_br_b:be.br,u_texsize:[Oe,Te],u_mix:z.t,u_pattern_size_a:se.displaySize,u_pattern_size_b:be.displaySize,u_scale_a:z.fromScale,u_scale_b:z.toScale,u_tile_units_to_pixels:1/a.at(ne,1,Y.transform.tileZoom),u_pixel_coord_upper:[ct>>16,st>>16],u_pixel_coord_lower:[65535&ct,65535&st]}}(c,M,l,C),{u_opacity:k}),yf=(k,l)=>{},rd={fillExtrusion:(k,l)=>({u_lightpos:new a.bG(k,l.u_lightpos),u_lightpos_globe:new a.bG(k,l.u_lightpos_globe),u_lightintensity:new a.b5(k,l.u_lightintensity),u_lightcolor:new a.bG(k,l.u_lightcolor),u_vertical_gradient:new a.b5(k,l.u_vertical_gradient),u_opacity:new a.b5(k,l.u_opacity),u_fill_translate:new a.bH(k,l.u_fill_translate)}),fillExtrusionPattern:(k,l)=>({u_lightpos:new a.bG(k,l.u_lightpos),u_lightpos_globe:new a.bG(k,l.u_lightpos_globe),u_lightintensity:new a.b5(k,l.u_lightintensity),u_lightcolor:new a.bG(k,l.u_lightcolor),u_vertical_gradient:new a.b5(k,l.u_vertical_gradient),u_height_factor:new a.b5(k,l.u_height_factor),u_opacity:new a.b5(k,l.u_opacity),u_fill_translate:new a.bH(k,l.u_fill_translate),u_image:new a.bC(k,l.u_image),u_texsize:new a.bH(k,l.u_texsize),u_pixel_coord_upper:new a.bH(k,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bH(k,l.u_pixel_coord_lower),u_scale:new a.bG(k,l.u_scale),u_fade:new a.b5(k,l.u_fade)}),fill:(k,l)=>({u_fill_translate:new a.bH(k,l.u_fill_translate)}),fillPattern:(k,l)=>({u_image:new a.bC(k,l.u_image),u_texsize:new a.bH(k,l.u_texsize),u_pixel_coord_upper:new a.bH(k,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bH(k,l.u_pixel_coord_lower),u_scale:new a.bG(k,l.u_scale),u_fade:new a.b5(k,l.u_fade),u_fill_translate:new a.bH(k,l.u_fill_translate)}),fillOutline:(k,l)=>({u_world:new a.bH(k,l.u_world),u_fill_translate:new a.bH(k,l.u_fill_translate)}),fillOutlinePattern:(k,l)=>({u_world:new a.bH(k,l.u_world),u_image:new a.bC(k,l.u_image),u_texsize:new a.bH(k,l.u_texsize),u_pixel_coord_upper:new a.bH(k,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bH(k,l.u_pixel_coord_lower),u_scale:new a.bG(k,l.u_scale),u_fade:new a.b5(k,l.u_fade),u_fill_translate:new a.bH(k,l.u_fill_translate)}),circle:(k,l)=>({u_camera_to_center_distance:new a.b5(k,l.u_camera_to_center_distance),u_scale_with_map:new a.bC(k,l.u_scale_with_map),u_pitch_with_map:new a.bC(k,l.u_pitch_with_map),u_extrude_scale:new a.bH(k,l.u_extrude_scale),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_globe_extrude_scale:new a.b5(k,l.u_globe_extrude_scale),u_translate:new a.bH(k,l.u_translate)}),collisionBox:(k,l)=>({u_pixel_extrude_scale:new a.bH(k,l.u_pixel_extrude_scale)}),collisionCircle:(k,l)=>({u_viewport_size:new a.bH(k,l.u_viewport_size)}),debug:(k,l)=>({u_color:new a.bF(k,l.u_color),u_overlay:new a.bC(k,l.u_overlay),u_overlay_scale:new a.b5(k,l.u_overlay_scale)}),depth:yf,clippingMask:yf,heatmap:(k,l)=>({u_extrude_scale:new a.b5(k,l.u_extrude_scale),u_intensity:new a.b5(k,l.u_intensity),u_globe_extrude_scale:new a.b5(k,l.u_globe_extrude_scale)}),heatmapTexture:(k,l)=>({u_matrix:new a.bD(k,l.u_matrix),u_world:new a.bH(k,l.u_world),u_image:new a.bC(k,l.u_image),u_color_ramp:new a.bC(k,l.u_color_ramp),u_opacity:new a.b5(k,l.u_opacity)}),hillshade:(k,l)=>({u_image:new a.bC(k,l.u_image),u_latrange:new a.bH(k,l.u_latrange),u_light:new a.bH(k,l.u_light),u_shadow:new a.bF(k,l.u_shadow),u_highlight:new a.bF(k,l.u_highlight),u_accent:new a.bF(k,l.u_accent)}),hillshadePrepare:(k,l)=>({u_matrix:new a.bD(k,l.u_matrix),u_image:new a.bC(k,l.u_image),u_dimension:new a.bH(k,l.u_dimension),u_zoom:new a.b5(k,l.u_zoom),u_unpack:new a.bE(k,l.u_unpack)}),line:(k,l)=>({u_translation:new a.bH(k,l.u_translation),u_ratio:new a.b5(k,l.u_ratio),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_units_to_pixels:new a.bH(k,l.u_units_to_pixels)}),lineGradient:(k,l)=>({u_translation:new a.bH(k,l.u_translation),u_ratio:new a.b5(k,l.u_ratio),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_units_to_pixels:new a.bH(k,l.u_units_to_pixels),u_image:new a.bC(k,l.u_image),u_image_height:new a.b5(k,l.u_image_height)}),linePattern:(k,l)=>({u_translation:new a.bH(k,l.u_translation),u_texsize:new a.bH(k,l.u_texsize),u_ratio:new a.b5(k,l.u_ratio),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_image:new a.bC(k,l.u_image),u_units_to_pixels:new a.bH(k,l.u_units_to_pixels),u_scale:new a.bG(k,l.u_scale),u_fade:new a.b5(k,l.u_fade)}),lineSDF:(k,l)=>({u_translation:new a.bH(k,l.u_translation),u_ratio:new a.b5(k,l.u_ratio),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_units_to_pixels:new a.bH(k,l.u_units_to_pixels),u_patternscale_a:new a.bH(k,l.u_patternscale_a),u_patternscale_b:new a.bH(k,l.u_patternscale_b),u_sdfgamma:new a.b5(k,l.u_sdfgamma),u_image:new a.bC(k,l.u_image),u_tex_y_a:new a.b5(k,l.u_tex_y_a),u_tex_y_b:new a.b5(k,l.u_tex_y_b),u_mix:new a.b5(k,l.u_mix)}),raster:(k,l)=>({u_tl_parent:new a.bH(k,l.u_tl_parent),u_scale_parent:new a.b5(k,l.u_scale_parent),u_buffer_scale:new a.b5(k,l.u_buffer_scale),u_fade_t:new a.b5(k,l.u_fade_t),u_opacity:new a.b5(k,l.u_opacity),u_image0:new a.bC(k,l.u_image0),u_image1:new a.bC(k,l.u_image1),u_brightness_low:new a.b5(k,l.u_brightness_low),u_brightness_high:new a.b5(k,l.u_brightness_high),u_saturation_factor:new a.b5(k,l.u_saturation_factor),u_contrast_factor:new a.b5(k,l.u_contrast_factor),u_spin_weights:new a.bG(k,l.u_spin_weights),u_coords_top:new a.bE(k,l.u_coords_top),u_coords_bottom:new a.bE(k,l.u_coords_bottom)}),symbolIcon:(k,l)=>({u_is_size_zoom_constant:new a.bC(k,l.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bC(k,l.u_is_size_feature_constant),u_size_t:new a.b5(k,l.u_size_t),u_size:new a.b5(k,l.u_size),u_camera_to_center_distance:new a.b5(k,l.u_camera_to_center_distance),u_pitch:new a.b5(k,l.u_pitch),u_rotate_symbol:new a.bC(k,l.u_rotate_symbol),u_aspect_ratio:new a.b5(k,l.u_aspect_ratio),u_fade_change:new a.b5(k,l.u_fade_change),u_label_plane_matrix:new a.bD(k,l.u_label_plane_matrix),u_coord_matrix:new a.bD(k,l.u_coord_matrix),u_is_text:new a.bC(k,l.u_is_text),u_pitch_with_map:new a.bC(k,l.u_pitch_with_map),u_is_along_line:new a.bC(k,l.u_is_along_line),u_is_variable_anchor:new a.bC(k,l.u_is_variable_anchor),u_texsize:new a.bH(k,l.u_texsize),u_texture:new a.bC(k,l.u_texture),u_translation:new a.bH(k,l.u_translation),u_pitched_scale:new a.b5(k,l.u_pitched_scale)}),symbolSDF:(k,l)=>({u_is_size_zoom_constant:new a.bC(k,l.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bC(k,l.u_is_size_feature_constant),u_size_t:new a.b5(k,l.u_size_t),u_size:new a.b5(k,l.u_size),u_camera_to_center_distance:new a.b5(k,l.u_camera_to_center_distance),u_pitch:new a.b5(k,l.u_pitch),u_rotate_symbol:new a.bC(k,l.u_rotate_symbol),u_aspect_ratio:new a.b5(k,l.u_aspect_ratio),u_fade_change:new a.b5(k,l.u_fade_change),u_label_plane_matrix:new a.bD(k,l.u_label_plane_matrix),u_coord_matrix:new a.bD(k,l.u_coord_matrix),u_is_text:new a.bC(k,l.u_is_text),u_pitch_with_map:new a.bC(k,l.u_pitch_with_map),u_is_along_line:new a.bC(k,l.u_is_along_line),u_is_variable_anchor:new a.bC(k,l.u_is_variable_anchor),u_texsize:new a.bH(k,l.u_texsize),u_texture:new a.bC(k,l.u_texture),u_gamma_scale:new a.b5(k,l.u_gamma_scale),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_is_halo:new a.bC(k,l.u_is_halo),u_translation:new a.bH(k,l.u_translation),u_pitched_scale:new a.b5(k,l.u_pitched_scale)}),symbolTextAndIcon:(k,l)=>({u_is_size_zoom_constant:new a.bC(k,l.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bC(k,l.u_is_size_feature_constant),u_size_t:new a.b5(k,l.u_size_t),u_size:new a.b5(k,l.u_size),u_camera_to_center_distance:new a.b5(k,l.u_camera_to_center_distance),u_pitch:new a.b5(k,l.u_pitch),u_rotate_symbol:new a.bC(k,l.u_rotate_symbol),u_aspect_ratio:new a.b5(k,l.u_aspect_ratio),u_fade_change:new a.b5(k,l.u_fade_change),u_label_plane_matrix:new a.bD(k,l.u_label_plane_matrix),u_coord_matrix:new a.bD(k,l.u_coord_matrix),u_is_text:new a.bC(k,l.u_is_text),u_pitch_with_map:new a.bC(k,l.u_pitch_with_map),u_is_along_line:new a.bC(k,l.u_is_along_line),u_is_variable_anchor:new a.bC(k,l.u_is_variable_anchor),u_texsize:new a.bH(k,l.u_texsize),u_texsize_icon:new a.bH(k,l.u_texsize_icon),u_texture:new a.bC(k,l.u_texture),u_texture_icon:new a.bC(k,l.u_texture_icon),u_gamma_scale:new a.b5(k,l.u_gamma_scale),u_device_pixel_ratio:new a.b5(k,l.u_device_pixel_ratio),u_is_halo:new a.bC(k,l.u_is_halo),u_translation:new a.bH(k,l.u_translation),u_pitched_scale:new a.b5(k,l.u_pitched_scale)}),background:(k,l)=>({u_opacity:new a.b5(k,l.u_opacity),u_color:new a.bF(k,l.u_color)}),backgroundPattern:(k,l)=>({u_opacity:new a.b5(k,l.u_opacity),u_image:new a.bC(k,l.u_image),u_pattern_tl_a:new a.bH(k,l.u_pattern_tl_a),u_pattern_br_a:new a.bH(k,l.u_pattern_br_a),u_pattern_tl_b:new a.bH(k,l.u_pattern_tl_b),u_pattern_br_b:new a.bH(k,l.u_pattern_br_b),u_texsize:new a.bH(k,l.u_texsize),u_mix:new a.b5(k,l.u_mix),u_pattern_size_a:new a.bH(k,l.u_pattern_size_a),u_pattern_size_b:new a.bH(k,l.u_pattern_size_b),u_scale_a:new a.b5(k,l.u_scale_a),u_scale_b:new a.b5(k,l.u_scale_b),u_pixel_coord_upper:new a.bH(k,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bH(k,l.u_pixel_coord_lower),u_tile_units_to_pixels:new a.b5(k,l.u_tile_units_to_pixels)}),terrain:(k,l)=>({u_texture:new a.bC(k,l.u_texture),u_ele_delta:new a.b5(k,l.u_ele_delta),u_fog_matrix:new a.bD(k,l.u_fog_matrix),u_fog_color:new a.bF(k,l.u_fog_color),u_fog_ground_blend:new a.b5(k,l.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.b5(k,l.u_fog_ground_blend_opacity),u_horizon_color:new a.bF(k,l.u_horizon_color),u_horizon_fog_blend:new a.b5(k,l.u_horizon_fog_blend),u_is_globe_mode:new a.b5(k,l.u_is_globe_mode)}),terrainDepth:(k,l)=>({u_ele_delta:new a.b5(k,l.u_ele_delta)}),terrainCoords:(k,l)=>({u_texture:new a.bC(k,l.u_texture),u_terrain_coords_id:new a.b5(k,l.u_terrain_coords_id),u_ele_delta:new a.b5(k,l.u_ele_delta)}),projectionErrorMeasurement:(k,l)=>({u_input:new a.b5(k,l.u_input),u_output_expected:new a.b5(k,l.u_output_expected)}),atmosphere:(k,l)=>({u_sun_pos:new a.bG(k,l.u_sun_pos),u_atmosphere_blend:new a.b5(k,l.u_atmosphere_blend),u_globe_position:new a.bG(k,l.u_globe_position),u_globe_radius:new a.b5(k,l.u_globe_radius),u_inv_proj_matrix:new a.bD(k,l.u_inv_proj_matrix)}),sky:(k,l)=>({u_sky_color:new a.bF(k,l.u_sky_color),u_horizon_color:new a.bF(k,l.u_horizon_color),u_horizon:new a.bH(k,l.u_horizon),u_horizon_normal:new a.bH(k,l.u_horizon_normal),u_sky_horizon_blend:new a.b5(k,l.u_sky_horizon_blend),u_sky_blend:new a.b5(k,l.u_sky_blend)})};class fA{constructor(l,c,C){this.context=l;const M=l.gl;this.buffer=M.createBuffer(),this.dynamicDraw=!!C,this.context.unbindVAO(),l.bindElementBuffer.set(this.buffer),M.bufferData(M.ELEMENT_ARRAY_BUFFER,c.arrayBuffer,this.dynamicDraw?M.DYNAMIC_DRAW:M.STATIC_DRAW),this.dynamicDraw||delete c.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(l){const c=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),c.bufferSubData(c.ELEMENT_ARRAY_BUFFER,0,l.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ys={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class xl{constructor(l,c,C,M){this.length=c.length,this.attributes=C,this.itemSize=c.bytesPerElement,this.dynamicDraw=M,this.context=l;const K=l.gl;this.buffer=K.createBuffer(),l.bindVertexBuffer.set(this.buffer),K.bufferData(K.ARRAY_BUFFER,c.arrayBuffer,this.dynamicDraw?K.DYNAMIC_DRAW:K.STATIC_DRAW),this.dynamicDraw||delete c.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){if(l.length!==this.length)throw new Error(`Length of new data is ${l.length}, which doesn't match current length of ${this.length}`);const c=this.context.gl;this.bind(),c.bufferSubData(c.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,c){for(let C=0;C<this.attributes.length;C++){const M=c.attributes[this.attributes[C].name];M!==void 0&&l.enableVertexAttribArray(M)}}setVertexAttribPointers(l,c,C){for(let M=0;M<this.attributes.length;M++){const K=this.attributes[M],z=c.attributes[K.name];z!==void 0&&l.vertexAttribPointer(z,K.components,l[Ys[K.type]],!1,this.itemSize,K.offset+this.itemSize*(C||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Yo{constructor(l){this.gl=l.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(l){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ph extends Yo{getDefault(){return a.b4.transparent}set(l){const c=this.current;(l.r!==c.r||l.g!==c.g||l.b!==c.b||l.a!==c.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class Lp extends Yo{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class Pc extends Yo{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class Bu extends Yo{getDefault(){return[!0,!0,!0,!0]}set(l){const c=this.current;(l[0]!==c[0]||l[1]!==c[1]||l[2]!==c[2]||l[3]!==c[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class Fd extends Yo{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class Ud extends Yo{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class uc extends Yo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){const c=this.current;(l.func!==c.func||l.ref!==c.ref||l.mask!==c.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class jd extends Yo{getDefault(){const l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){const c=this.current;(l[0]!==c[0]||l[1]!==c[1]||l[2]!==c[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class Nh extends Yo{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;l?c.enable(c.STENCIL_TEST):c.disable(c.STENCIL_TEST),this.current=l,this.dirty=!1}}class Ac extends Yo{getDefault(){return[0,1]}set(l){const c=this.current;(l[0]!==c[0]||l[1]!==c[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class Au extends Yo{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;l?c.enable(c.DEPTH_TEST):c.disable(c.DEPTH_TEST),this.current=l,this.dirty=!1}}class Ht extends Yo{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class Pn extends Yo{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;l?c.enable(c.BLEND):c.disable(c.BLEND),this.current=l,this.dirty=!1}}class sn extends Yo{getDefault(){const l=this.gl;return[l.ONE,l.ZERO]}set(l){const c=this.current;(l[0]!==c[0]||l[1]!==c[1]||this.dirty)&&(this.gl.blendFunc(l[0],l[1]),this.current=l,this.dirty=!1)}}class Kr extends Yo{getDefault(){return a.b4.transparent}set(l){const c=this.current;(l.r!==c.r||l.g!==c.g||l.b!==c.b||l.a!==c.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class bi extends Yo{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquation(l),this.current=l,this.dirty=!1)}}class Co extends Yo{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;l?c.enable(c.CULL_FACE):c.disable(c.CULL_FACE),this.current=l,this.dirty=!1}}class is extends Yo{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class $o extends Yo{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}class UA extends Yo{getDefault(){return null}set(l){(l!==this.current||this.dirty)&&(this.gl.useProgram(l),this.current=l,this.dirty=!1)}}class Xf extends Yo{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class wl extends Yo{getDefault(){const l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){const c=this.current;(l[0]!==c[0]||l[1]!==c[1]||l[2]!==c[2]||l[3]!==c[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class cu extends Yo{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.bindFramebuffer(c.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class jA extends Yo{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.bindRenderbuffer(c.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Ml extends Yo{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.bindTexture(c.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class Qi extends Yo{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.bindBuffer(c.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class zA extends Yo{getDefault(){return null}set(l){const c=this.gl;c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Fo extends Yo{getDefault(){return null}set(l){var c;if(l===this.current&&!this.dirty)return;const C=this.gl;Di(C)?C.bindVertexArray(l):(c=C.getExtension("OES_vertex_array_object"))===null||c===void 0||c.bindVertexArrayOES(l),this.current=l,this.dirty=!1}}class Kc extends Yo{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.pixelStorei(c.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class NA extends Yo{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class pA extends Yo{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const c=this.gl;c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class rA extends Yo{constructor(l,c){super(l),this.context=l,this.parent=c}getDefault(){return null}}class Sl extends rA{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const c=this.gl;c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class cc extends rA{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const c=this.gl;c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class du extends rA{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const c=this.gl;c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_STENCIL_ATTACHMENT,c.RENDERBUFFER,l),this.current=l,this.dirty=!1}}const Ll="Framebuffer is not complete";class Rc{constructor(l,c,C,M,K){this.context=l,this.width=c,this.height=C;const z=l.gl,Y=this.framebuffer=z.createFramebuffer();if(this.colorAttachment=new Sl(l,Y),M)this.depthAttachment=K?new du(l,Y):new cc(l,Y);else if(K)throw new Error("Stencil cannot be set without depth");if(z.checkFramebufferStatus(z.FRAMEBUFFER)!==z.FRAMEBUFFER_COMPLETE)throw new Error(Ll)}destroy(){const l=this.context.gl,c=this.colorAttachment.get();if(c&&l.deleteTexture(c),this.depthAttachment){const C=this.depthAttachment.get();C&&l.deleteRenderbuffer(C)}l.deleteFramebuffer(this.framebuffer)}}class zd{constructor(l){var c,C;if(this.gl=l,this.clearColor=new ph(this),this.clearDepth=new Lp(this),this.clearStencil=new Pc(this),this.colorMask=new Bu(this),this.depthMask=new Fd(this),this.stencilMask=new Ud(this),this.stencilFunc=new uc(this),this.stencilOp=new jd(this),this.stencilTest=new Nh(this),this.depthRange=new Ac(this),this.depthTest=new Au(this),this.depthFunc=new Ht(this),this.blend=new Pn(this),this.blendFunc=new sn(this),this.blendColor=new Kr(this),this.blendEquation=new bi(this),this.cullFace=new Co(this),this.cullFaceSide=new is(this),this.frontFace=new $o(this),this.program=new UA(this),this.activeTexture=new Xf(this),this.viewport=new wl(this),this.bindFramebuffer=new cu(this),this.bindRenderbuffer=new jA(this),this.bindTexture=new Ml(this),this.bindVertexBuffer=new Qi(this),this.bindElementBuffer=new zA(this),this.bindVertexArray=new Fo(this),this.pixelStoreUnpack=new Kc(this),this.pixelStoreUnpackPremultiplyAlpha=new NA(this),this.pixelStoreUnpackFlipY=new pA(this),this.extTextureFilterAnisotropic=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=l.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=l.getParameter(l.MAX_TEXTURE_SIZE),Di(l)){this.HALF_FLOAT=l.HALF_FLOAT;const M=l.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(c=l.RGBA16F)!==null&&c!==void 0?c:M==null?void 0:M.RGBA16F_EXT,this.RGB16F=(C=l.RGB16F)!==null&&C!==void 0?C:M==null?void 0:M.RGB16F_EXT,l.getExtension("EXT_color_buffer_float")}else{l.getExtension("EXT_color_buffer_half_float"),l.getExtension("OES_texture_half_float_linear");const M=l.getExtension("OES_texture_half_float");this.HALF_FLOAT=M==null?void 0:M.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(l,c){return new fA(this,l,c)}createVertexBuffer(l,c,C){return new xl(this,l,c,C)}createRenderbuffer(l,c,C){const M=this.gl,K=M.createRenderbuffer();return this.bindRenderbuffer.set(K),M.renderbufferStorage(M.RENDERBUFFER,l,c,C),this.bindRenderbuffer.set(null),K}createFramebuffer(l,c,C,M){return new Rc(this,l,c,C,M)}clear({color:l,depth:c,stencil:C}){const M=this.gl;let K=0;l&&(K|=M.COLOR_BUFFER_BIT,this.clearColor.set(l),this.colorMask.set([!0,!0,!0,!0])),c!==void 0&&(K|=M.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(c),this.depthMask.set(!0)),C!==void 0&&(K|=M.STENCIL_BUFFER_BIT,this.clearStencil.set(C),this.stencilMask.set(255)),M.clear(K)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){a.bz(l.blendFunction,Ji.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(l.blendFunction),this.blendColor.set(l.blendColor)),this.colorMask.set(l.mask)}createVertexArray(){var l;return Di(this.gl)?this.gl.createVertexArray():(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.createVertexArrayOES()}deleteVertexArray(l){var c;return Di(this.gl)?this.gl.deleteVertexArray(l):(c=this.gl.getExtension("OES_vertex_array_object"))===null||c===void 0?void 0:c.deleteVertexArrayOES(l)}unbindVAO(){this.bindVertexArray.set(null)}}let Rs;function id(k,l,c,C,M){const K=k.context,z=k.transform,Y=K.gl,ne=k.useProgram("collisionBox"),se=[];let be=0,Oe=0;for(let dt=0;dt<C.length;dt++){const gt=C[dt],St=l.getTile(gt).getBucket(c);if(!St)continue;const It=M?St.textCollisionBox:St.iconCollisionBox,Kt=St.collisionCircleArray;Kt.length>0&&(se.push({circleArray:Kt,circleOffset:Oe,coord:gt}),be+=Kt.length/4,Oe=be),It&&ne.draw(K,Y.LINES,Zr.disabled,Wi.disabled,k.colorModeForRenderPass(),zi.disabled,ed(k.transform),k.style.map.terrain&&k.style.map.terrain.getTerrainData(gt),z.getProjectionData({overscaledTileID:gt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c.id,It.layoutVertexBuffer,It.indexBuffer,It.segments,null,k.transform.zoom,null,null,It.collisionVertexBuffer)}if(!M||!se.length)return;const Te=k.useProgram("collisionCircle"),$e=new a.bM;$e.resize(4*be),$e._trim();let He=0;for(const dt of se)for(let gt=0;gt<dt.circleArray.length/4;gt++){const St=4*gt,It=dt.circleArray[St+0],Kt=dt.circleArray[St+1],zt=dt.circleArray[St+2],Tt=dt.circleArray[St+3];$e.emplace(He++,It,Kt,zt,Tt,0),$e.emplace(He++,It,Kt,zt,Tt,1),$e.emplace(He++,It,Kt,zt,Tt,2),$e.emplace(He++,It,Kt,zt,Tt,3)}(!Rs||Rs.length<2*be)&&(Rs=function(dt){const gt=2*dt,St=new a.bO;St.resize(gt),St._trim();for(let It=0;It<gt;It++){const Kt=6*It;St.uint16[Kt+0]=4*It+0,St.uint16[Kt+1]=4*It+1,St.uint16[Kt+2]=4*It+2,St.uint16[Kt+3]=4*It+2,St.uint16[Kt+4]=4*It+3,St.uint16[Kt+5]=4*It+0}return St}(be));const ct=K.createIndexBuffer(Rs,!0),st=K.createVertexBuffer($e,a.bN.members,!0);for(const dt of se){const gt=Uh(k.transform);Te.draw(K,Y.TRIANGLES,Zr.disabled,Wi.disabled,k.colorModeForRenderPass(),zi.disabled,gt,k.style.map.terrain&&k.style.map.terrain.getTerrainData(dt.coord),null,c.id,st,ct,a.aD.simpleSegment(0,2*dt.circleOffset,dt.circleArray.length,dt.circleArray.length/2),null,k.transform.zoom,null,null,null)}st.destroy(),ct.destroy()}const dc=a.aq(new Float32Array(16));function GA(k,l,c,C,M,K){const{horizontalAlign:z,verticalAlign:Y}=a.ay(k);return new a.P((-(z-.5)*l/M+C[0])*K,(-(Y-.5)*c/M+C[1])*K)}function Gh(k,l,c,C,M,K){const z=l.tileAnchorPoint.add(new a.P(l.translation[0],l.translation[1]));if(l.pitchWithMap){let Y=C.mult(K);c||(Y=Y.rotate(-M));const ne=z.add(Y);return Yt(ne.x,ne.y,l.pitchedLabelPlaneMatrix,l.getElevation).point}if(c){const Y=ir(l.tileAnchorPoint.x+1,l.tileAnchorPoint.y,l).point.sub(k),ne=Math.atan(Y.y/Y.x)+(Y.x<0?Math.PI:0);return k.add(C.rotate(ne))}return k.add(C)}function mA(k,l,c,C,M,K,z,Y,ne,se,be,Oe){const Te=k.text.placedSymbolArray,$e=k.text.dynamicLayoutVertexArray,He=k.icon.dynamicLayoutVertexArray,ct={};$e.clear();for(let st=0;st<Te.length;st++){const dt=Te.get(st),gt=dt.hidden||!dt.crossTileID||k.allowVerticalPlacement&&!dt.placedOrientation?null:C[dt.crossTileID];if(gt){const St=new a.P(dt.anchorX,dt.anchorY),It={getElevation:Oe,width:M.width,height:M.height,pitchedLabelPlaneMatrix:K,lineVertexArray:null,pitchWithMap:c,transform:M,projectionCache:null,tileAnchorPoint:St,translation:se,unwrappedTileID:be},Kt=c?fr(St.x,St.y,It):ir(St.x,St.y,It),zt=Gt(M.cameraToCenterDistance,Kt.signedDistanceFromCamera);let Tt=a.aj(k.textSizeData,Y,dt)*zt/a.as;c&&(Tt*=k.tilePixelRatio/z);const{width:tn,height:Zt,anchor:vn,textOffset:_n,textBoxScale:gn}=gt,In=GA(vn,tn,Zt,_n,gn,Tt),Un=M.getPitchedTextCorrection(St.x+se[0],St.y+se[1],be),wn=Gh(Kt.point,It,l,In,-M.bearingInRadians,Un),Or=k.allowVerticalPlacement&&dt.placedOrientation===a.ai.vertical?Math.PI/2:0;for(let Bi=0;Bi<dt.numGlyphs;Bi++)a.ak($e,wn,Or);ne&&dt.associatedIconIndex>=0&&(ct[dt.associatedIconIndex]={shiftedAnchor:wn,angle:Or})}else ri(dt.numGlyphs,$e)}if(ne){He.clear();const st=k.icon.placedSymbolArray;for(let dt=0;dt<st.length;dt++){const gt=st.get(dt);if(gt.hidden)ri(gt.numGlyphs,He);else{const St=ct[dt];if(St)for(let It=0;It<gt.numGlyphs;It++)a.ak(He,St.shiftedAnchor,St.angle);else ri(gt.numGlyphs,He)}}k.icon.dynamicLayoutVertexBuffer.updateData(He)}k.text.dynamicLayoutVertexBuffer.updateData($e)}function WA(k,l,c){return c.iconsInText&&l?"symbolTextAndIcon":k?"symbolSDF":"symbolIcon"}function Dc(k,l,c,C,M,K,z,Y,ne,se,be,Oe,Te){const $e=k.context,He=$e.gl,ct=k.transform,st=Y==="map",dt=ne==="map",gt=Y!=="viewport"&&c.layout.get("symbol-placement")!=="point",St=st&&!dt&&!gt,It=!c.layout.get("symbol-sort-key").isConstant();let Kt=!1;const zt=k.getDepthModeForSublayer(0,Zr.ReadOnly),Tt=c._unevaluatedLayout.hasValue("text-variable-anchor")||c._unevaluatedLayout.hasValue("text-variable-anchor-offset"),tn=[],Zt=ct.getCircleRadiusCorrection();for(const vn of C){const _n=l.getTile(vn),gn=_n.getBucket(c);if(!gn)continue;const In=M?gn.text:gn.icon;if(!In||!In.segments.get().length||!In.hasVisibleVertices)continue;const Un=In.programConfigurations.get(c.id),wn=M||gn.sdfIcons,Or=M?gn.textSizeData:gn.iconSizeData,Bi=dt||ct.pitch!==0,Hi=k.useProgram(WA(wn,M,gn),Un),Oo=a.ah(Or,ct.zoom),Ei=k.style.map.terrain&&k.style.map.terrain.getTerrainData(vn);let jo,zo,xo,go,Es=[0,0],No=null;if(M)zo=_n.glyphAtlasTexture,xo=He.LINEAR,jo=_n.glyphAtlasTexture.size,gn.iconsInText&&(Es=_n.imageAtlasTexture.size,No=_n.imageAtlasTexture,go=Bi||k.options.rotating||k.options.zooming||Or.kind==="composite"||Or.kind==="camera"?He.LINEAR:He.NEAREST);else{const _a=c.layout.get("icon-size").constantOr(0)!==1||gn.iconsNeedLinear;zo=_n.imageAtlasTexture,xo=wn||k.options.rotating||k.options.zooming||_a||Bi?He.LINEAR:He.NEAREST,jo=_n.imageAtlasTexture.size}const ca=a.at(_n,1,k.transform.zoom),Fs=Et(st,k.transform,ca),ju=a.H();a.an(ju,Fs);const al=Ct(dt,st,k.transform,ca),sl=a.au(ct,_n,K,z),tu=ct.getProjectionData({overscaledTileID:vn,applyGlobeMatrix:!Te,applyTerrainMatrix:!0}),xA=Tt&&gn.hasTextData(),wA=c.layout.get("icon-text-fit")!=="none"&&xA&&gn.hasIconData();if(gt){const _a=k.style.map.terrain?($s,Vs)=>k.style.map.terrain.getElevation(vn,$s,Vs):null,Ga=c.layout.get("text-rotation-alignment")==="map";Tn(gn,k,M,Fs,ju,dt,se,Ga,vn.toUnwrapped(),ct.width,ct.height,sl,_a)}const zu=M&&Tt||wA,Xa=gt||zu?dc:dt?Fs:k.transform.clipSpaceToPixelsMatrix,ll=wn&&c.paint.get(M?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let os;os=wn?gn.iconsInText?FA(Or.kind,Oo,St,dt,gt,zu,k,Xa,al,sl,jo,Es,Zt):bl(Or.kind,Oo,St,dt,gt,zu,k,Xa,al,sl,M,jo,0,Zt):Hl(Or.kind,Oo,St,dt,gt,zu,k,Xa,al,sl,M,jo,Zt);const El={program:Hi,buffers:In,uniformValues:os,projectionData:tu,atlasTexture:zo,atlasTextureIcon:No,atlasInterpolation:xo,atlasInterpolationIcon:go,isSDF:wn,hasHalo:ll};if(It&&gn.canOverlap){Kt=!0;const _a=In.segments.get();for(const Ga of _a)tn.push({segments:new a.aD([Ga]),sortKey:Ga.sortKey,state:El,terrainData:Ei})}else tn.push({segments:In.segments,sortKey:0,state:El,terrainData:Ei})}Kt&&tn.sort((vn,_n)=>vn.sortKey-_n.sortKey);for(const vn of tn){const _n=vn.state;if($e.activeTexture.set(He.TEXTURE0),_n.atlasTexture.bind(_n.atlasInterpolation,He.CLAMP_TO_EDGE),_n.atlasTextureIcon&&($e.activeTexture.set(He.TEXTURE1),_n.atlasTextureIcon&&_n.atlasTextureIcon.bind(_n.atlasInterpolationIcon,He.CLAMP_TO_EDGE)),_n.isSDF){const gn=_n.uniformValues;_n.hasHalo&&(gn.u_is_halo=1,Nd(_n.buffers,vn.segments,c,k,_n.program,zt,be,Oe,gn,_n.projectionData,vn.terrainData)),gn.u_is_halo=0}Nd(_n.buffers,vn.segments,c,k,_n.program,zt,be,Oe,_n.uniformValues,_n.projectionData,vn.terrainData)}}function Nd(k,l,c,C,M,K,z,Y,ne,se,be){const Oe=C.context;M.draw(Oe,Oe.gl.TRIANGLES,K,z,Y,zi.backCCW,ne,be,se,c.id,k.layoutVertexBuffer,k.indexBuffer,l,c.paint,C.transform.zoom,k.programConfigurations.get(c.id),k.dynamicLayoutVertexBuffer,k.opacityVertexBuffer)}function Vo(k,l,c,C,M){const K=k.context,z=K.gl,Y=Wi.disabled,ne=new Ji([z.ONE,z.ONE],a.b4.transparent,[!0,!0,!0,!0]),se=l.getBucket(c);if(!se)return;const be=C.key;let Oe=c.heatmapFbos.get(be);Oe||(Oe=QA(K,l.tileSize,l.tileSize),c.heatmapFbos.set(be,Oe)),K.bindFramebuffer.set(Oe.framebuffer),K.viewport.set([0,0,l.tileSize,l.tileSize]),K.clear({color:a.b4.transparent});const Te=se.programConfigurations.get(c.id),$e=k.useProgram("heatmap",Te,!M),He=k.transform.getProjectionData({overscaledTileID:l.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ct=k.style.map.terrain.getTerrainData(C);$e.draw(K,z.TRIANGLES,Zr.disabled,Y,ne,zi.disabled,lc(l,k.transform.zoom,c.paint.get("heatmap-intensity"),1),ct,He,c.id,se.layoutVertexBuffer,se.indexBuffer,se.segments,c.paint,k.transform.zoom,Te)}function Lc(k,l,c,C,M){const K=k.context,z=K.gl,Y=k.transform;K.setColorMode(k.colorModeForRenderPass());const ne=Iu(K,l),se=c.key,be=l.heatmapFbos.get(se);if(!be)return;K.activeTexture.set(z.TEXTURE0),z.bindTexture(z.TEXTURE_2D,be.colorAttachment.get()),K.activeTexture.set(z.TEXTURE1),ne.bind(z.LINEAR,z.CLAMP_TO_EDGE);const Oe=Y.getProjectionData({overscaledTileID:c,applyTerrainMatrix:M,applyGlobeMatrix:!C});k.useProgram("heatmapTexture").draw(K,z.TRIANGLES,Zr.disabled,Wi.disabled,k.colorModeForRenderPass(),zi.disabled,dh(k,l,0,1),null,Oe,l.id,k.rasterBoundsBuffer,k.quadTriangleIndexBuffer,k.rasterBoundsSegments,l.paint,Y.zoom),be.destroy(),l.heatmapFbos.delete(se)}function QA(k,l,c){var C,M;const K=k.gl,z=K.createTexture();K.bindTexture(K.TEXTURE_2D,z),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_S,K.CLAMP_TO_EDGE),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_T,K.CLAMP_TO_EDGE),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MIN_FILTER,K.LINEAR),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MAG_FILTER,K.LINEAR);const Y=(C=k.HALF_FLOAT)!==null&&C!==void 0?C:K.UNSIGNED_BYTE,ne=(M=k.RGBA16F)!==null&&M!==void 0?M:K.RGBA;K.texImage2D(K.TEXTURE_2D,0,ne,l,c,0,K.RGBA,Y,null);const se=k.createFramebuffer(l,c,!1,!1);return se.colorAttachment.set(z),se}function Iu(k,l){return l.colorRampTexture||(l.colorRampTexture=new ae(k,l.colorRamp,k.gl.RGBA)),l.colorRampTexture}function Fc(k,l,c,C,M){if(!c||!C||!C.imageAtlas)return;const K=C.imageAtlas.patternPositions;let z=K[c.to.toString()],Y=K[c.from.toString()];if(!z&&Y&&(z=Y),!Y&&z&&(Y=z),!z||!Y){const ne=M.getPaintProperty(l);z=K[ne],Y=K[ne]}z&&Y&&k.setConstantPatternPositions(z,Y)}function Gd(k,l,c,C,M,K,z,Y){const ne=k.context.gl,se="fill-pattern",be=c.paint.get(se),Oe=be&&be.constantOr(1),Te=c.getCrossfadeParameters();let $e,He,ct,st,dt;const gt=k.transform,St=c.paint.get("fill-translate"),It=c.paint.get("fill-translate-anchor");z?(He=Oe&&!c.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",$e=ne.LINES):(He=Oe?"fillPattern":"fill",$e=ne.TRIANGLES);const Kt=be.constantOr(null);for(const zt of C){const Tt=l.getTile(zt);if(Oe&&!Tt.patternsLoaded())continue;const tn=Tt.getBucket(c);if(!tn)continue;const Zt=tn.programConfigurations.get(c.id),vn=k.useProgram(He,Zt),_n=k.style.map.terrain&&k.style.map.terrain.getTerrainData(zt);Oe&&(k.context.activeTexture.set(ne.TEXTURE0),Tt.imageAtlasTexture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE),Zt.updatePaintBuffers(Te)),Fc(Zt,se,Kt,Tt,c);const gn=gt.getProjectionData({overscaledTileID:zt,applyGlobeMatrix:!Y,applyTerrainMatrix:!0}),In=a.au(gt,Tt,St,It);if(z){st=tn.indexBuffer2,dt=tn.segments2;const wn=[ne.drawingBufferWidth,ne.drawingBufferHeight];ct=He==="fillOutlinePattern"&&Oe?ch(k,Te,Tt,wn,In):Ha(wn,In)}else st=tn.indexBuffer,dt=tn.segments,ct=Oe?sc(k,Te,Tt,In):{u_fill_translate:In};let Un;if(k.renderPass==="translucent"&&Y){const[wn]=k.getStencilConfigForOverlapAndUpdateStencilID(C);Un=wn[zt.overscaledZ]}else Un=k.stencilModeForClipping(zt);vn.draw(k.context,$e,M,Un,K,zi.backCCW,ct,_n,gn,c.id,tn.layoutVertexBuffer,st,dt,c.paint,k.transform.zoom,Zt)}}function Uc(k,l,c,C,M,K,z,Y){const ne=k.context,se=ne.gl,be="fill-extrusion-pattern",Oe=c.paint.get(be),Te=Oe.constantOr(1),$e=c.getCrossfadeParameters(),He=c.paint.get("fill-extrusion-opacity"),ct=Oe.constantOr(null),st=k.transform;for(const dt of C){const gt=l.getTile(dt),St=gt.getBucket(c);if(!St)continue;const It=k.style.map.terrain&&k.style.map.terrain.getTerrainData(dt),Kt=St.programConfigurations.get(c.id),zt=k.useProgram(Te?"fillExtrusionPattern":"fillExtrusion",Kt);Te&&(k.context.activeTexture.set(se.TEXTURE0),gt.imageAtlasTexture.bind(se.LINEAR,se.CLAMP_TO_EDGE),Kt.updatePaintBuffers($e));const Tt=st.getProjectionData({overscaledTileID:dt,applyGlobeMatrix:!Y,applyTerrainMatrix:!0});Fc(Kt,be,ct,gt,c);const tn=a.au(st,gt,c.paint.get("fill-extrusion-translate"),c.paint.get("fill-extrusion-translate-anchor")),Zt=c.paint.get("fill-extrusion-vertical-gradient"),vn=Te?gf(k,Zt,He,tn,dt,$e,gt):Zf(k,Zt,He,tn);zt.draw(ne,ne.gl.TRIANGLES,M,K,z,zi.backCCW,vn,It,Tt,c.id,St.layoutVertexBuffer,St.indexBuffer,St.segments,c.paint,k.transform.zoom,Kt,k.style.map.terrain&&St.centroidVertexBuffer)}}function hc(k,l,c,C,M,K,z,Y,ne){var se;const be=k.style.projection,Oe=k.context,Te=k.transform,$e=Oe.gl,He=k.useProgram("hillshade"),ct=!k.options.moving;for(const st of C){const dt=l.getTile(st),gt=dt.fbo;if(!gt)continue;const St=be.getMeshFromTileID(Oe,st.canonical,Y,!0,"raster"),It=(se=k.style.map.terrain)===null||se===void 0?void 0:se.getTerrainData(st);Oe.activeTexture.set($e.TEXTURE0),$e.bindTexture($e.TEXTURE_2D,gt.colorAttachment.get());const Kt=Te.getProjectionData({overscaledTileID:st,aligned:ct,applyGlobeMatrix:!ne,applyTerrainMatrix:!0});He.draw(Oe,$e.TRIANGLES,K,M[st.overscaledZ],z,zi.backCCW,hh(k,dt,c),It,Kt,c.id,St.vertexBuffer,St.indexBuffer,St.segments)}}const ua=[new a.P(0,0),new a.P(a.X,0),new a.P(a.X,a.X),new a.P(0,a.X)];function Uo(k,l,c,C,M,K,z,Y,ne=!1,se=!1){const be=C[C.length-1].overscaledZ,Oe=k.context,Te=Oe.gl,$e=k.useProgram("raster"),He=k.transform,ct=k.style.projection,st=k.colorModeForRenderPass(),dt=!k.options.moving;for(const gt of C){const St=k.getDepthModeForSublayer(gt.overscaledZ-be,c.paint.get("raster-opacity")===1?Zr.ReadWrite:Zr.ReadOnly,Te.LESS),It=l.getTile(gt);It.registerFadeDuration(c.paint.get("raster-fade-duration"));const Kt=l.findLoadedParent(gt,0),zt=l.findLoadedSibling(gt),Tt=Aa(It,Kt||zt||null,l,c,k.transform,k.style.map.terrain);let tn,Zt;const vn=c.paint.get("raster-resampling")==="nearest"?Te.NEAREST:Te.LINEAR;Oe.activeTexture.set(Te.TEXTURE0),It.texture.bind(vn,Te.CLAMP_TO_EDGE,Te.LINEAR_MIPMAP_NEAREST),Oe.activeTexture.set(Te.TEXTURE1),Kt?(Kt.texture.bind(vn,Te.CLAMP_TO_EDGE,Te.LINEAR_MIPMAP_NEAREST),tn=Math.pow(2,Kt.tileID.overscaledZ-It.tileID.overscaledZ),Zt=[It.tileID.canonical.x*tn%1,It.tileID.canonical.y*tn%1]):It.texture.bind(vn,Te.CLAMP_TO_EDGE,Te.LINEAR_MIPMAP_NEAREST),It.texture.useMipmap&&Oe.extTextureFilterAnisotropic&&k.transform.pitch>20&&Te.texParameterf(Te.TEXTURE_2D,Oe.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Oe.extTextureFilterAnisotropicMax);const _n=k.style.map.terrain&&k.style.map.terrain.getTerrainData(gt),gn=He.getProjectionData({overscaledTileID:gt,aligned:dt,applyGlobeMatrix:!se,applyTerrainMatrix:!0}),In=Ld(Zt||[0,0],tn||1,Tt,c,Y),Un=ct.getMeshFromTileID(Oe,gt.canonical,K,z,"raster");$e.draw(Oe,Te.TRIANGLES,St,M?M[gt.overscaledZ]:Wi.disabled,st,ne?zi.frontCCW:zi.backCCW,In,_n,gn,c.id,Un.vertexBuffer,Un.indexBuffer,Un.segments)}}function Aa(k,l,c,C,M,K){const z=C.paint.get("raster-fade-duration");if(!K&&z>0){const Y=S.now(),ne=(Y-k.timeAdded)/z,se=l?(Y-l.timeAdded)/z:-1,be=c.getSource(),Oe=Ut(M,{tileSize:be.tileSize,roundZoom:be.roundZoom}),Te=!l||Math.abs(l.tileID.overscaledZ-Oe)>Math.abs(k.tileID.overscaledZ-Oe),$e=Te&&k.refreshedUponExpiration?1:a.ab(Te?ne:1-se,0,1);return k.refreshedUponExpiration&&ne>=1&&(k.refreshedUponExpiration=!1),l?{opacity:1,mix:1-$e}:{opacity:$e,mix:0}}return{opacity:1,mix:0}}const vf=new a.b4(1,0,0,1),od=new a.b4(0,1,0,1),ad=new a.b4(0,0,1,1),ku=new a.b4(1,0,1,1),qA=new a.b4(0,1,1,1);function Fl(k,l,c,C){il(k,0,l+c/2,k.transform.width,c,C)}function gA(k,l,c,C){il(k,l-c/2,0,c,k.transform.height,C)}function il(k,l,c,C,M,K){const z=k.context,Y=z.gl;Y.enable(Y.SCISSOR_TEST),Y.scissor(l*k.pixelRatio,c*k.pixelRatio,C*k.pixelRatio,M*k.pixelRatio),z.clear({color:K}),Y.disable(Y.SCISSOR_TEST)}function YA(k,l,c){const C=k.context,M=C.gl,K=k.useProgram("debug"),z=Zr.disabled,Y=Wi.disabled,ne=k.colorModeForRenderPass(),se="$debug",be=k.style.map.terrain&&k.style.map.terrain.getTerrainData(c);C.activeTexture.set(M.TEXTURE0);const Oe=l.getTileByID(c.key).latestRawTileData,Te=Math.floor((Oe&&Oe.byteLength||0)/1024),$e=l.getTile(c).tileSize,He=512/Math.min($e,512)*(c.overscaledZ/k.transform.zoom)*.5;let ct=c.canonical.toString();c.overscaledZ!==c.canonical.z&&(ct+=` => ${c.overscaledZ}`),function(dt,gt){dt.initDebugOverlayCanvas();const St=dt.debugOverlayCanvas,It=dt.context.gl,Kt=dt.debugOverlayCanvas.getContext("2d");Kt.clearRect(0,0,St.width,St.height),Kt.shadowColor="white",Kt.shadowBlur=2,Kt.lineWidth=1.5,Kt.strokeStyle="white",Kt.textBaseline="top",Kt.font="bold 36px Open Sans, sans-serif",Kt.fillText(gt,5,5),Kt.strokeText(gt,5,5),dt.debugOverlayTexture.update(St),dt.debugOverlayTexture.bind(It.LINEAR,It.CLAMP_TO_EDGE)}(k,`${ct} ${Te}kB`);const st=k.transform.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!0,applyTerrainMatrix:!0});K.draw(C,M.TRIANGLES,z,Y,Ji.alphaBlended,zi.disabled,td(a.b4.transparent,He),null,st,se,k.debugBuffer,k.quadTriangleIndexBuffer,k.debugSegments),K.draw(C,M.LINE_STRIP,z,Y,ne,zi.disabled,td(a.b4.red),be,st,se,k.debugBuffer,k.tileBorderIndexBuffer,k.debugSegments)}function Tu(k,l,c,C){const{isRenderingGlobe:M}=C,K=k.context,z=K.gl,Y=k.transform,ne=k.colorModeForRenderPass(),se=k.getDepthModeFor3D(),be=k.useProgram("terrain");K.bindFramebuffer.set(null),K.viewport.set([0,0,k.width,k.height]);for(const Oe of c){const Te=l.getTerrainMesh(Oe.tileID),$e=k.renderToTexture.getTexture(Oe),He=l.getTerrainData(Oe.tileID);K.activeTexture.set(z.TEXTURE0),z.bindTexture(z.TEXTURE_2D,$e.texture);const ct=l.getMeshFrameDelta(Y.zoom),st=Y.calculateFogMatrix(Oe.tileID.toUnwrapped()),dt=Jc(ct,st,k.style.sky,Y.pitch,M),gt=Y.getProjectionData({overscaledTileID:Oe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});be.draw(K,z.TRIANGLES,se,Wi.disabled,ne,zi.backCCW,dt,He,gt,"terrain",Te.vertexBuffer,Te.indexBuffer,Te.segments)}}function sd(k,l){if(!l.mesh){const c=new a.aC;c.emplaceBack(-1,-1),c.emplaceBack(1,-1),c.emplaceBack(1,1),c.emplaceBack(-1,1);const C=new a.aE;C.emplaceBack(0,1,2),C.emplaceBack(0,2,3),l.mesh=new rs(k.createVertexBuffer(c,Ai.members),k.createIndexBuffer(C),a.aD.simpleSegment(0,0,c.length,C.length))}return l.mesh}class Pu{constructor(l,c){this.context=new zd(l),this.transform=c,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.aq(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=fe.maxUnderzooming+fe.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new aa}resize(l,c,C){if(this.width=Math.floor(l*C),this.height=Math.floor(c*C),this.pixelRatio=C,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const M of this.style._order)this.style._layers[M].resize()}setup(){const l=this.context,c=new a.aC;c.emplaceBack(0,0),c.emplaceBack(a.X,0),c.emplaceBack(0,a.X),c.emplaceBack(a.X,a.X),this.tileExtentBuffer=l.createVertexBuffer(c,Ai.members),this.tileExtentSegments=a.aD.simpleSegment(0,0,4,2);const C=new a.aC;C.emplaceBack(0,0),C.emplaceBack(a.X,0),C.emplaceBack(0,a.X),C.emplaceBack(a.X,a.X),this.debugBuffer=l.createVertexBuffer(C,Ai.members),this.debugSegments=a.aD.simpleSegment(0,0,4,5);const M=new a.bT;M.emplaceBack(0,0,0,0),M.emplaceBack(a.X,0,a.X,0),M.emplaceBack(0,a.X,0,a.X),M.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=l.createVertexBuffer(M,wa.members),this.rasterBoundsSegments=a.aD.simpleSegment(0,0,4,2);const K=new a.aC;K.emplaceBack(0,0),K.emplaceBack(a.X,0),K.emplaceBack(0,a.X),K.emplaceBack(a.X,a.X),this.rasterBoundsBufferPosOnly=l.createVertexBuffer(K,Ai.members),this.rasterBoundsSegmentsPosOnly=a.aD.simpleSegment(0,0,4,5);const z=new a.aC;z.emplaceBack(0,0),z.emplaceBack(1,0),z.emplaceBack(0,1),z.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(z,Ai.members),this.viewportSegments=a.aD.simpleSegment(0,0,4,2);const Y=new a.bU;Y.emplaceBack(0),Y.emplaceBack(1),Y.emplaceBack(3),Y.emplaceBack(2),Y.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer(Y);const ne=new a.aE;ne.emplaceBack(1,0,2),ne.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(ne);const se=this.context.gl;this.stencilClearMode=new Wi({func:se.ALWAYS,mask:0},0,255,se.ZERO,se.ZERO,se.ZERO),this.tileExtentMesh=new rs(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const l=this.context,c=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const C=a.H();a.bL(C,0,this.width,this.height,0,0,1),a.K(C,C,[c.drawingBufferWidth,c.drawingBufferHeight,0]);const M={mainMatrix:C,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:C};this.useProgram("clippingMask",null,!0).draw(l,c.TRIANGLES,Zr.disabled,this.stencilClearMode,Ji.disabled,zi.disabled,null,null,M,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(l,c,C){if(this.currentStencilSource===l.source||!l.isTileClipped()||!c||!c.length)return;this.currentStencilSource=l.source,this.nextStencilID+c.length>256&&this.clearStencil();const M=this.context;M.setColorMode(Ji.disabled),M.setDepthMode(Zr.disabled);const K={};for(const z of c)K[z.key]=this.nextStencilID++;this._renderTileMasks(K,c,C,!0),this._renderTileMasks(K,c,C,!1),this._tileClippingMaskIDs=K}_renderTileMasks(l,c,C,M){const K=this.context,z=K.gl,Y=this.style.projection,ne=this.transform,se=this.useProgram("clippingMask");for(const be of c){const Oe=l[be.key],Te=this.style.map.terrain&&this.style.map.terrain.getTerrainData(be),$e=Y.getMeshFromTileID(this.context,be.canonical,M,!0,"stencil"),He=ne.getProjectionData({overscaledTileID:be,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(K,z.TRIANGLES,Zr.disabled,new Wi({func:z.ALWAYS,mask:0},Oe,255,z.KEEP,z.KEEP,z.REPLACE),Ji.disabled,C?zi.disabled:zi.backCCW,null,Te,He,"$clipping",$e.vertexBuffer,$e.indexBuffer,$e.segments)}}_renderTilesDepthBuffer(){const l=this.context,c=l.gl,C=this.style.projection,M=this.transform,K=this.useProgram("depth"),z=this.getDepthModeFor3D(),Y=qe(M,{tileSize:M.tileSize});for(const ne of Y){const se=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ne),be=C.getMeshFromTileID(this.context,ne.canonical,!0,!0,"raster"),Oe=M.getProjectionData({overscaledTileID:ne,applyGlobeMatrix:!0,applyTerrainMatrix:!0});K.draw(l,c.TRIANGLES,z,Wi.disabled,Ji.disabled,zi.backCCW,null,se,Oe,"$clipping",be.vertexBuffer,be.indexBuffer,be.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,c=this.context.gl;return new Wi({func:c.NOTEQUAL,mask:255},l,255,c.KEEP,c.KEEP,c.REPLACE)}stencilModeForClipping(l){const c=this.context.gl;return new Wi({func:c.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,c.KEEP,c.KEEP,c.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(l){const c=this.context.gl,C=l.sort((z,Y)=>Y.overscaledZ-z.overscaledZ),M=C[C.length-1].overscaledZ,K=C[0].overscaledZ-M+1;if(K>1){this.currentStencilSource=void 0,this.nextStencilID+K>256&&this.clearStencil();const z={};for(let Y=0;Y<K;Y++)z[Y+M]=new Wi({func:c.GEQUAL,mask:255},Y+this.nextStencilID,255,c.KEEP,c.KEEP,c.REPLACE);return this.nextStencilID+=K,[z,C]}return[{[M]:Wi.disabled},C]}stencilConfigForOverlapTwoPass(l){const c=this.context.gl,C=l.sort((z,Y)=>Y.overscaledZ-z.overscaledZ),M=C[C.length-1].overscaledZ,K=C[0].overscaledZ-M+1;if(this.clearStencil(),K>1){const z={},Y={};for(let ne=0;ne<K;ne++)z[ne+M]=new Wi({func:c.GREATER,mask:255},K+1+ne,255,c.KEEP,c.KEEP,c.REPLACE),Y[ne+M]=new Wi({func:c.GREATER,mask:255},1+ne,255,c.KEEP,c.KEEP,c.REPLACE);return this.nextStencilID=2*K+1,[z,Y,C]}return this.nextStencilID=3,[{[M]:new Wi({func:c.GREATER,mask:255},2,255,c.KEEP,c.KEEP,c.REPLACE)},{[M]:new Wi({func:c.GREATER,mask:255},1,255,c.KEEP,c.KEEP,c.REPLACE)},C]}colorModeForRenderPass(){const l=this.context.gl;return this._showOverdrawInspector?new Ji([l.CONSTANT_COLOR,l.ONE],new a.b4(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ji.unblended:Ji.alphaBlended}getDepthModeForSublayer(l,c,C){if(!this.opaquePassEnabledForLayer())return Zr.disabled;const M=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new Zr(C||this.context.gl.LEQUAL,c,[M,M])}getDepthModeFor3D(){return new Zr(this.context.gl.LEQUAL,Zr.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(l,c){var C,M;this.style=l,this.options=c,this.lineAtlas=l.lineAtlas,this.imageManager=l.imageManager,this.glyphManager=l.glyphManager,this.symbolFadeChange=l.placement.symbolFadeChange(S.now()),this.imageManager.beginFrame();const K=this.style._order,z=this.style.sourceCaches,Y={},ne={},se={},be={isRenderingToTexture:!1,isRenderingGlobe:((C=l.projection)===null||C===void 0?void 0:C.transitionState)>0};for(const Te in z){const $e=z[Te];$e.used&&$e.prepare(this.context),Y[Te]=$e.getVisibleCoordinates(!1),ne[Te]=Y[Te].slice().reverse(),se[Te]=$e.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Te=0;Te<K.length;Te++)if(this.style._layers[K[Te]].is3D()){this.opaquePassCutoff=Te;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Te of K){const $e=this.style._layers[Te];if(!$e.hasOffscreenPass()||$e.isHidden(this.transform.zoom))continue;const He=ne[$e.source];($e.type==="custom"||He.length)&&this.renderLayer(this,z[$e.source],$e,He,be)}if((M=this.style.projection)===null||M===void 0||M.updateGPUdependent({context:this.context,useProgram:Te=>this.useProgram(Te)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:c.showOverdrawInspector?a.b4.black:a.b4.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(Te,$e){const He=Te.context,ct=He.gl,st=((zt,Tt,tn)=>{const Zt=Math.cos(Tt.rollInRadians),vn=Math.sin(Tt.rollInRadians),_n=Qs(Tt),gn=Tt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:zt.properties.get("sky-color"),u_horizon_color:zt.properties.get("horizon-color"),u_horizon:[(Tt.width/2-_n*vn)*tn,(Tt.height/2+_n*Zt)*tn],u_horizon_normal:[-vn,Zt],u_sky_horizon_blend:zt.properties.get("sky-horizon-blend")*Tt.height/2*tn,u_sky_blend:gn}})($e,Te.style.map.transform,Te.pixelRatio),dt=new Zr(ct.LEQUAL,Zr.ReadWrite,[0,1]),gt=Wi.disabled,St=Te.colorModeForRenderPass(),It=Te.useProgram("sky"),Kt=sd(He,$e);It.draw(He,ct.TRIANGLES,dt,gt,St,zi.disabled,st,null,void 0,"sky",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments)}(this,this.style.sky),this._showOverdrawInspector=c.showOverdrawInspector,this.depthRangeFor3D=[0,1-(l._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=K.length-1;this.currentLayer>=0;this.currentLayer--){const Te=this.style._layers[K[this.currentLayer]],$e=z[Te.source],He=Y[Te.source];this._renderTileClippingMasks(Te,He,!1),this.renderLayer(this,$e,Te,He,be)}this.renderPass="translucent";let Oe=!1;for(this.currentLayer=0;this.currentLayer<K.length;this.currentLayer++){const Te=this.style._layers[K[this.currentLayer]],$e=z[Te.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Te,be))continue;this.opaquePassEnabledForLayer()||Oe||(Oe=!0,be.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const He=(Te.type==="symbol"?se:ne)[Te.source];this._renderTileClippingMasks(Te,Y[Te.source],!1),this.renderLayer(this,$e,Te,He,be)}if(be.isRenderingGlobe&&function(Te,$e,He){const ct=Te.context,st=ct.gl,dt=Te.useProgram("atmosphere"),gt=new Zr(st.LEQUAL,Zr.ReadOnly,[0,1]),St=Te.transform,It=function(gn,In){const Un=gn.properties.get("position"),wn=[-Un.x,-Un.y,-Un.z],Or=a.aq(new Float64Array(16));return gn.properties.get("anchor")==="map"&&(a.aX(Or,Or,In.rollInRadians),a.aY(Or,Or,-In.pitchInRadians),a.aX(Or,Or,In.bearingInRadians),a.aY(Or,Or,In.center.lat*Math.PI/180),a.bj(Or,Or,-In.center.lng*Math.PI/180)),a.bS(wn,wn,Or),wn}(He,Te.transform),Kt=St.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),zt=$e.properties.get("atmosphere-blend")*Kt.projectionTransition;if(zt===0)return;const Tt=Ci(St.worldSize,St.center.lat),tn=St.inverseProjectionMatrix,Zt=new Float64Array(4);Zt[3]=1,a.al(Zt,Zt,St.modelViewProjectionMatrix),Zt[0]/=Zt[3],Zt[1]/=Zt[3],Zt[2]/=Zt[3],Zt[3]=1,a.al(Zt,Zt,tn),Zt[0]/=Zt[3],Zt[1]/=Zt[3],Zt[2]/=Zt[3],Zt[3]=1;const vn=((gn,In,Un,wn,Or)=>({u_sun_pos:gn,u_atmosphere_blend:In,u_globe_position:Un,u_globe_radius:wn,u_inv_proj_matrix:Or}))(It,zt,[Zt[0],Zt[1],Zt[2]],Tt,tn),_n=sd(ct,$e);dt.draw(ct,st.TRIANGLES,gt,Wi.disabled,Ji.alphaBlended,zi.disabled,vn,null,null,"atmosphere",_n.vertexBuffer,_n.indexBuffer,_n.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const Te=function($e,He){let ct=null;const st=Object.values($e._layers).flatMap(It=>It.source&&!It.isHidden(He)?[$e.sourceCaches[It.source]]:[]),dt=st.filter(It=>It.getSource().type==="vector"),gt=st.filter(It=>It.getSource().type!=="vector"),St=It=>{(!ct||ct.getSource().maxzoom<It.getSource().maxzoom)&&(ct=It)};return dt.forEach(It=>St(It)),ct||gt.forEach(It=>St(It)),ct}(this.style,this.transform.zoom);Te&&function($e,He,ct){for(let st=0;st<ct.length;st++)YA($e,He,ct[st])}(this,Te,Te.getVisibleCoordinates())}this.options.showPadding&&function(Te){const $e=Te.transform.padding;Fl(Te,Te.transform.height-($e.top||0),3,vf),Fl(Te,$e.bottom||0,3,od),gA(Te,$e.left||0,3,ad),gA(Te,Te.transform.width-($e.right||0),3,ku);const He=Te.transform.centerPoint;(function(ct,st,dt,gt){il(ct,st-1,dt-10,2,20,gt),il(ct,st-10,dt-1,20,2,gt)})(Te,He.x,Te.transform.height-He.y,qA)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(l){if(!this.style||!this.style.map||!this.style.map.terrain)return;const c=this.terrainFacilitator.matrix,C=this.transform.modelViewProjectionMatrix;let M=this.terrainFacilitator.dirty;M||(M=l?!a.bV(c,C):!a.bW(c,C)),M||(M=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),M&&(a.bX(c,C),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(K,z){const Y=K.context,ne=Y.gl,se=K.transform,be=Ji.unblended,Oe=new Zr(ne.LEQUAL,Zr.ReadWrite,[0,1]),Te=z.sourceCache.getRenderableTiles(),$e=K.useProgram("terrainDepth");Y.bindFramebuffer.set(z.getFramebuffer("depth").framebuffer),Y.viewport.set([0,0,K.width/devicePixelRatio,K.height/devicePixelRatio]),Y.clear({color:a.b4.transparent,depth:1});for(const He of Te){const ct=z.getTerrainMesh(He.tileID),st=z.getTerrainData(He.tileID),dt=se.getProjectionData({overscaledTileID:He.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),gt={u_ele_delta:z.getMeshFrameDelta(se.zoom)};$e.draw(Y,ne.TRIANGLES,Oe,Wi.disabled,be,zi.backCCW,gt,st,dt,"terrain",ct.vertexBuffer,ct.indexBuffer,ct.segments)}Y.bindFramebuffer.set(null),Y.viewport.set([0,0,K.width,K.height])}(this,this.style.map.terrain),function(K,z){const Y=K.context,ne=Y.gl,se=K.transform,be=Ji.unblended,Oe=new Zr(ne.LEQUAL,Zr.ReadWrite,[0,1]),Te=z.getCoordsTexture(),$e=z.sourceCache.getRenderableTiles(),He=K.useProgram("terrainCoords");Y.bindFramebuffer.set(z.getFramebuffer("coords").framebuffer),Y.viewport.set([0,0,K.width/devicePixelRatio,K.height/devicePixelRatio]),Y.clear({color:a.b4.transparent,depth:1}),z.coordsIndex=[];for(const ct of $e){const st=z.getTerrainMesh(ct.tileID),dt=z.getTerrainData(ct.tileID);Y.activeTexture.set(ne.TEXTURE0),ne.bindTexture(ne.TEXTURE_2D,Te.texture);const gt={u_terrain_coords_id:(255-z.coordsIndex.length)/255,u_texture:0,u_ele_delta:z.getMeshFrameDelta(se.zoom)},St=se.getProjectionData({overscaledTileID:ct.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});He.draw(Y,ne.TRIANGLES,Oe,Wi.disabled,be,zi.backCCW,gt,dt,St,"terrain",st.vertexBuffer,st.indexBuffer,st.segments),z.coordsIndex.push(ct.tileID.key)}Y.bindFramebuffer.set(null),Y.viewport.set([0,0,K.width,K.height])}(this,this.style.map.terrain))}renderLayer(l,c,C,M,K){C.isHidden(this.transform.zoom)||(C.type==="background"||C.type==="custom"||(M||[]).length)&&(this.id=C.id,a.bY(C)?function(z,Y,ne,se,be,Oe){if(z.renderPass!=="translucent")return;const{isRenderingToTexture:Te}=Oe,$e=Wi.disabled,He=z.colorModeForRenderPass();(ne._unevaluatedLayout.hasValue("text-variable-anchor")||ne._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ct,st,dt,gt,St,It,Kt,zt,Tt){const tn=st.transform,Zt=st.style.map.terrain,vn=St==="map",_n=It==="map";for(const gn of ct){const In=gt.getTile(gn),Un=In.getBucket(dt);if(!Un||!Un.text||!Un.text.segments.get().length)continue;const wn=a.ah(Un.textSizeData,tn.zoom),Or=a.at(In,1,st.transform.zoom),Bi=Et(vn,st.transform,Or),Hi=dt.layout.get("icon-text-fit")!=="none"&&Un.hasIconData();{const Oo=Math.pow(2,tn.zoom-In.tileID.overscaledZ),Ei=Zt?(jo,zo)=>Zt.getElevation(gn,jo,zo):null;mA(Un,vn,_n,Tt,tn,Bi,Oo,wn,Hi,a.au(tn,In,Kt,zt),gn.toUnwrapped(),Ei)}}}(se,z,ne,Y,ne.layout.get("text-rotation-alignment"),ne.layout.get("text-pitch-alignment"),ne.paint.get("text-translate"),ne.paint.get("text-translate-anchor"),be),ne.paint.get("icon-opacity").constantOr(1)!==0&&Dc(z,Y,ne,se,!1,ne.paint.get("icon-translate"),ne.paint.get("icon-translate-anchor"),ne.layout.get("icon-rotation-alignment"),ne.layout.get("icon-pitch-alignment"),ne.layout.get("icon-keep-upright"),$e,He,Te),ne.paint.get("text-opacity").constantOr(1)!==0&&Dc(z,Y,ne,se,!0,ne.paint.get("text-translate"),ne.paint.get("text-translate-anchor"),ne.layout.get("text-rotation-alignment"),ne.layout.get("text-pitch-alignment"),ne.layout.get("text-keep-upright"),$e,He,Te),Y.map.showCollisionBoxes&&(id(z,Y,ne,se,!0),id(z,Y,ne,se,!1))}(l,c,C,M,this.style.placement.variableOffsets,K):a.bZ(C)?function(z,Y,ne,se,be){if(z.renderPass!=="translucent")return;const{isRenderingToTexture:Oe}=be,Te=ne.paint.get("circle-opacity"),$e=ne.paint.get("circle-stroke-width"),He=ne.paint.get("circle-stroke-opacity"),ct=!ne.layout.get("circle-sort-key").isConstant();if(Te.constantOr(1)===0&&($e.constantOr(1)===0||He.constantOr(1)===0))return;const st=z.context,dt=st.gl,gt=z.transform,St=z.getDepthModeForSublayer(0,Zr.ReadOnly),It=Wi.disabled,Kt=z.colorModeForRenderPass(),zt=[],Tt=gt.getCircleRadiusCorrection();for(let tn=0;tn<se.length;tn++){const Zt=se[tn],vn=Y.getTile(Zt),_n=vn.getBucket(ne);if(!_n)continue;const gn=ne.paint.get("circle-translate"),In=ne.paint.get("circle-translate-anchor"),Un=a.au(gt,vn,gn,In),wn=_n.programConfigurations.get(ne.id),Or=z.useProgram("circle",wn),Bi=_n.layoutVertexBuffer,Hi=_n.indexBuffer,Oo=z.style.map.terrain&&z.style.map.terrain.getTerrainData(Zt),Ei={programConfiguration:wn,program:Or,layoutVertexBuffer:Bi,indexBuffer:Hi,uniformValues:Fh(z,vn,ne,Un,Tt),terrainData:Oo,projectionData:gt.getProjectionData({overscaledTileID:Zt,applyGlobeMatrix:!Oe,applyTerrainMatrix:!0})};if(ct){const jo=_n.segments.get();for(const zo of jo)zt.push({segments:new a.aD([zo]),sortKey:zo.sortKey,state:Ei})}else zt.push({segments:_n.segments,sortKey:0,state:Ei})}ct&&zt.sort((tn,Zt)=>tn.sortKey-Zt.sortKey);for(const tn of zt){const{programConfiguration:Zt,program:vn,layoutVertexBuffer:_n,indexBuffer:gn,uniformValues:In,terrainData:Un,projectionData:wn}=tn.state;vn.draw(st,dt.TRIANGLES,St,It,Kt,zi.backCCW,In,Un,wn,ne.id,_n,gn,tn.segments,ne.paint,z.transform.zoom,Zt)}}(l,c,C,M,K):a.b_(C)?function(z,Y,ne,se,be){if(ne.paint.get("heatmap-opacity")===0)return;const Oe=z.context,{isRenderingToTexture:Te,isRenderingGlobe:$e}=be;if(z.style.map.terrain){for(const He of se){const ct=Y.getTile(He);Y.hasRenderableParent(He)||(z.renderPass==="offscreen"?Vo(z,ct,ne,He,$e):z.renderPass==="translucent"&&Lc(z,ne,He,Te,$e))}Oe.viewport.set([0,0,z.width,z.height])}else z.renderPass==="offscreen"?function(He,ct,st,dt){const gt=He.context,St=gt.gl,It=He.transform,Kt=Wi.disabled,zt=new Ji([St.ONE,St.ONE],a.b4.transparent,[!0,!0,!0,!0]);(function(Tt,tn,Zt){const vn=Tt.gl;Tt.activeTexture.set(vn.TEXTURE1),Tt.viewport.set([0,0,tn.width/4,tn.height/4]);let _n=Zt.heatmapFbos.get(a.bP);_n?(vn.bindTexture(vn.TEXTURE_2D,_n.colorAttachment.get()),Tt.bindFramebuffer.set(_n.framebuffer)):(_n=QA(Tt,tn.width/4,tn.height/4),Zt.heatmapFbos.set(a.bP,_n))})(gt,He,st),gt.clear({color:a.b4.transparent});for(let Tt=0;Tt<dt.length;Tt++){const tn=dt[Tt];if(ct.hasRenderableParent(tn))continue;const Zt=ct.getTile(tn),vn=Zt.getBucket(st);if(!vn)continue;const _n=vn.programConfigurations.get(st.id),gn=He.useProgram("heatmap",_n),In=It.getProjectionData({overscaledTileID:tn,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Un=It.getCircleRadiusCorrection();gn.draw(gt,St.TRIANGLES,Zr.disabled,Kt,zt,zi.backCCW,lc(Zt,It.zoom,st.paint.get("heatmap-intensity"),Un),null,In,st.id,vn.layoutVertexBuffer,vn.indexBuffer,vn.segments,st.paint,It.zoom,_n)}gt.viewport.set([0,0,He.width,He.height])}(z,Y,ne,se):z.renderPass==="translucent"&&function(He,ct){const st=He.context,dt=st.gl;st.setColorMode(He.colorModeForRenderPass());const gt=ct.heatmapFbos.get(a.bP);gt&&(st.activeTexture.set(dt.TEXTURE0),dt.bindTexture(dt.TEXTURE_2D,gt.colorAttachment.get()),st.activeTexture.set(dt.TEXTURE1),Iu(st,ct).bind(dt.LINEAR,dt.CLAMP_TO_EDGE),He.useProgram("heatmapTexture").draw(st,dt.TRIANGLES,Zr.disabled,Wi.disabled,He.colorModeForRenderPass(),zi.disabled,dh(He,ct,0,1),null,null,ct.id,He.viewportBuffer,He.quadTriangleIndexBuffer,He.viewportSegments,ct.paint,He.transform.zoom))}(z,ne)}(l,c,C,M,K):a.b$(C)?function(z,Y,ne,se,be){if(z.renderPass!=="translucent")return;const{isRenderingToTexture:Oe}=be,Te=ne.paint.get("line-opacity"),$e=ne.paint.get("line-width");if(Te.constantOr(1)===0||$e.constantOr(1)===0)return;const He=z.getDepthModeForSublayer(0,Zr.ReadOnly),ct=z.colorModeForRenderPass(),st=ne.paint.get("line-dasharray"),dt=ne.paint.get("line-pattern"),gt=dt.constantOr(1),St=ne.paint.get("line-gradient"),It=ne.getCrossfadeParameters(),Kt=gt?"linePattern":st?"lineSDF":St?"lineGradient":"line",zt=z.context,Tt=zt.gl,tn=z.transform;let Zt=!0;for(const vn of se){const _n=Y.getTile(vn);if(gt&&!_n.patternsLoaded())continue;const gn=_n.getBucket(ne);if(!gn)continue;const In=gn.programConfigurations.get(ne.id),Un=z.context.program.get(),wn=z.useProgram(Kt,In),Or=Zt||wn.program!==Un,Bi=z.style.map.terrain&&z.style.map.terrain.getTerrainData(vn),Hi=dt.constantOr(null);if(Hi&&_n.imageAtlas){const xo=_n.imageAtlas,go=xo.patternPositions[Hi.to.toString()],Es=xo.patternPositions[Hi.from.toString()];go&&Es&&In.setConstantPatternPositions(go,Es)}const Oo=tn.getProjectionData({overscaledTileID:vn,applyGlobeMatrix:!Oe,applyTerrainMatrix:!0}),Ei=tn.getPixelScale(),jo=gt?fh(z,_n,ne,Ei,It):st?uu(z,_n,ne,Ei,st,It):St?lu(z,_n,ne,Ei,gn.lineClipsArray.length):Ic(z,_n,ne,Ei);if(gt)zt.activeTexture.set(Tt.TEXTURE0),_n.imageAtlasTexture.bind(Tt.LINEAR,Tt.CLAMP_TO_EDGE),In.updatePaintBuffers(It);else if(st&&(Or||z.lineAtlas.dirty))zt.activeTexture.set(Tt.TEXTURE0),z.lineAtlas.bind(zt);else if(St){const xo=gn.gradients[ne.id];let go=xo.texture;if(ne.gradientVersion!==xo.version){let Es=256;if(ne.stepInterpolant){const No=Y.getSource().maxzoom,ca=vn.canonical.z===No?Math.ceil(1<<z.transform.maxZoom-vn.canonical.z):1;Es=a.ab(a.bQ(gn.maxLineLength/a.X*1024*ca),256,zt.maxTextureSize)}xo.gradient=a.bR({expression:ne.gradientExpression(),evaluationKey:"lineProgress",resolution:Es,image:xo.gradient||void 0,clips:gn.lineClipsArray}),xo.texture?xo.texture.update(xo.gradient):xo.texture=new ae(zt,xo.gradient,Tt.RGBA),xo.version=ne.gradientVersion,go=xo.texture}zt.activeTexture.set(Tt.TEXTURE0),go.bind(ne.stepInterpolant?Tt.NEAREST:Tt.LINEAR,Tt.CLAMP_TO_EDGE)}let zo;if(Oe){const[xo]=z.getStencilConfigForOverlapAndUpdateStencilID(se);zo=xo[vn.overscaledZ]}else zo=z.stencilModeForClipping(vn);wn.draw(zt,Tt.TRIANGLES,He,zo,ct,zi.disabled,jo,Bi,Oo,ne.id,gn.layoutVertexBuffer,gn.indexBuffer,gn.segments,ne.paint,z.transform.zoom,In,gn.layoutVertexBuffer2),Zt=!1}}(l,c,C,M,K):a.c0(C)?function(z,Y,ne,se,be){const Oe=ne.paint.get("fill-color"),Te=ne.paint.get("fill-opacity");if(Te.constantOr(1)===0)return;const{isRenderingToTexture:$e}=be,He=z.colorModeForRenderPass(),ct=ne.paint.get("fill-pattern"),st=z.opaquePassEnabledForLayer()&&!ct.constantOr(1)&&Oe.constantOr(a.b4.transparent).a===1&&Te.constantOr(0)===1?"opaque":"translucent";if(z.renderPass===st){const dt=z.getDepthModeForSublayer(1,z.renderPass==="opaque"?Zr.ReadWrite:Zr.ReadOnly);Gd(z,Y,ne,se,dt,He,!1,$e)}if(z.renderPass==="translucent"&&ne.paint.get("fill-antialias")){const dt=z.getDepthModeForSublayer(ne.getPaintProperty("fill-outline-color")?2:0,Zr.ReadOnly);Gd(z,Y,ne,se,dt,He,!0,$e)}}(l,c,C,M,K):a.c1(C)?function(z,Y,ne,se,be){const Oe=ne.paint.get("fill-extrusion-opacity");if(Oe===0)return;const{isRenderingToTexture:Te}=be;if(z.renderPass==="translucent"){const $e=new Zr(z.context.gl.LEQUAL,Zr.ReadWrite,z.depthRangeFor3D);if(Oe!==1||ne.paint.get("fill-extrusion-pattern").constantOr(1))Uc(z,Y,ne,se,$e,Wi.disabled,Ji.disabled,Te),Uc(z,Y,ne,se,$e,z.stencilModeFor3D(),z.colorModeForRenderPass(),Te);else{const He=z.colorModeForRenderPass();Uc(z,Y,ne,se,$e,Wi.disabled,He,Te)}}}(l,c,C,M,K):a.c2(C)?function(z,Y,ne,se,be){if(z.renderPass!=="offscreen"&&z.renderPass!=="translucent")return;const{isRenderingToTexture:Oe}=be,Te=z.context,$e=z.style.projection.useSubdivision,He=z.getDepthModeForSublayer(0,Zr.ReadOnly),ct=z.colorModeForRenderPass();if(z.renderPass==="offscreen")(function(st,dt,gt,St,It,Kt,zt){const Tt=st.context,tn=Tt.gl;for(const Zt of gt){const vn=dt.getTile(Zt),_n=vn.dem;if(!_n||!_n.data||!vn.needsHillshadePrepare)continue;const gn=_n.dim,In=_n.stride,Un=_n.getPixels();if(Tt.activeTexture.set(tn.TEXTURE1),Tt.pixelStoreUnpackPremultiplyAlpha.set(!1),vn.demTexture=vn.demTexture||st.getTileTexture(In),vn.demTexture){const Or=vn.demTexture;Or.update(Un,{premultiply:!1}),Or.bind(tn.NEAREST,tn.CLAMP_TO_EDGE)}else vn.demTexture=new ae(Tt,Un,tn.RGBA,{premultiply:!1}),vn.demTexture.bind(tn.NEAREST,tn.CLAMP_TO_EDGE);Tt.activeTexture.set(tn.TEXTURE0);let wn=vn.fbo;if(!wn){const Or=new ae(Tt,{width:gn,height:gn,data:null},tn.RGBA);Or.bind(tn.LINEAR,tn.CLAMP_TO_EDGE),wn=vn.fbo=Tt.createFramebuffer(gn,gn,!0,!1),wn.colorAttachment.set(Or.texture)}Tt.bindFramebuffer.set(wn.framebuffer),Tt.viewport.set([0,0,gn,gn]),st.useProgram("hillshadePrepare").draw(Tt,tn.TRIANGLES,It,Kt,zt,zi.disabled,nd(vn.tileID,_n),null,null,St.id,st.rasterBoundsBuffer,st.quadTriangleIndexBuffer,st.rasterBoundsSegments),vn.needsHillshadePrepare=!1}})(z,Y,se,ne,He,Wi.disabled,ct),Te.viewport.set([0,0,z.width,z.height]);else if(z.renderPass==="translucent")if($e){const[st,dt,gt]=z.stencilConfigForOverlapTwoPass(se);hc(z,Y,ne,gt,st,He,ct,!1,Oe),hc(z,Y,ne,gt,dt,He,ct,!0,Oe)}else{const[st,dt]=z.getStencilConfigForOverlapAndUpdateStencilID(se);hc(z,Y,ne,dt,st,He,ct,!1,Oe)}}(l,c,C,M,K):a.c3(C)?function(z,Y,ne,se,be){if(z.renderPass!=="translucent"||ne.paint.get("raster-opacity")===0||!se.length)return;const{isRenderingToTexture:Oe}=be,Te=Y.getSource(),$e=z.style.projection.useSubdivision;if(Te instanceof ar)Uo(z,Y,ne,se,null,!1,!1,Te.tileCoords,Te.flippedWindingOrder,Oe);else if($e){const[He,ct,st]=z.stencilConfigForOverlapTwoPass(se);Uo(z,Y,ne,st,He,!1,!0,ua,!1,Oe),Uo(z,Y,ne,st,ct,!0,!0,ua,!1,Oe)}else{const[He,ct]=z.getStencilConfigForOverlapAndUpdateStencilID(se);Uo(z,Y,ne,ct,He,!1,!0,ua,!1,Oe)}}(l,c,C,M,K):a.c4(C)?function(z,Y,ne,se,be){const Oe=ne.paint.get("background-color"),Te=ne.paint.get("background-opacity");if(Te===0)return;const{isRenderingToTexture:$e}=be,He=z.context,ct=He.gl,st=z.style.projection,dt=z.transform,gt=dt.tileSize,St=ne.paint.get("background-pattern");if(z.isPatternMissing(St))return;const It=!St&&Oe.a===1&&Te===1&&z.opaquePassEnabledForLayer()?"opaque":"translucent";if(z.renderPass!==It)return;const Kt=Wi.disabled,zt=z.getDepthModeForSublayer(0,It==="opaque"?Zr.ReadWrite:Zr.ReadOnly),Tt=z.colorModeForRenderPass(),tn=z.useProgram(St?"backgroundPattern":"background"),Zt=se||qe(dt,{tileSize:gt,terrain:z.style.map.terrain});St&&(He.activeTexture.set(ct.TEXTURE0),z.imageManager.bind(z.context));const vn=ne.getCrossfadeParameters();for(const _n of Zt){const gn=dt.getProjectionData({overscaledTileID:_n,applyGlobeMatrix:!$e,applyTerrainMatrix:!0}),In=St?zh(Te,z,St,{tileID:_n,tileSize:gt},vn):Tc(Te,Oe),Un=z.style.map.terrain&&z.style.map.terrain.getTerrainData(_n),wn=st.getMeshFromTileID(He,_n.canonical,!1,!0,"raster");tn.draw(He,ct.TRIANGLES,zt,Kt,Tt,zi.backCCW,In,Un,gn,ne.id,wn.vertexBuffer,wn.indexBuffer,wn.segments)}}(l,0,C,M,K):a.c5(C)&&function(z,Y,ne,se){const{isRenderingGlobe:be}=se,Oe=z.context,Te=ne.implementation,$e=z.style.projection,He=z.transform,ct=He.getProjectionDataForCustomLayer(be),st={farZ:He.farZ,nearZ:He.nearZ,fov:He.fov*Math.PI/180,modelViewProjectionMatrix:He.modelViewProjectionMatrix,projectionMatrix:He.projectionMatrix,shaderData:{variantName:$e.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
|
||
uniform mat4 u_projection_matrix;
|
||
${$e.shaderPreludeCode.vertexSource}`,define:$e.shaderDefine},defaultProjectionData:ct},dt=Te.renderingMode?Te.renderingMode:"2d";if(z.renderPass==="offscreen"){const gt=Te.prerender;gt&&(z.setCustomLayerDefaults(),Oe.setColorMode(z.colorModeForRenderPass()),gt.call(Te,Oe.gl,st),Oe.setDirty(),z.setBaseState())}else if(z.renderPass==="translucent"){z.setCustomLayerDefaults(),Oe.setColorMode(z.colorModeForRenderPass()),Oe.setStencilMode(Wi.disabled);const gt=dt==="3d"?z.getDepthModeFor3D():z.getDepthModeForSublayer(0,Zr.ReadOnly);Oe.setDepthMode(gt),Te.render(Oe.gl,st),Oe.setDirty(),z.setBaseState(),Oe.bindFramebuffer.set(null)}}(l,0,C,K))}saveTileTexture(l){const c=this._tileTextures[l.size[0]];c?c.push(l):this._tileTextures[l.size[0]]=[l]}getTileTexture(l){const c=this._tileTextures[l];return c&&c.length>0?c.pop():null}isPatternMissing(l){if(!l)return!1;if(!l.from||!l.to)return!0;const c=this.imageManager.getPattern(l.from.toString()),C=this.imageManager.getPattern(l.to.toString());return!c||!C}useProgram(l,c,C=!1){this.cache=this.cache||{};const M=!!this.style.map.terrain,K=this.style.projection,z=l+(c?c.cacheKey:"")+`/${C?Ju:K.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(M?"/terrain":"");return this.cache[z]||(this.cache[z]=new Dd(this.context,Hr[l],c,rd[l],this._showOverdrawInspector,M,C?Hr.projectionMercator:K.shaderPreludeCode,C?As:K.shaderDefine)),this.cache[z]}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 l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ae(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:l,drawingBufferHeight:c}=this.context.gl;return this.width!==l||this.height!==c}}function Wd(k,l){let c,C=!1,M=null,K=null;const z=()=>{M=null,C&&(k.apply(K,c),M=setTimeout(z,l),C=!1)};return(...Y)=>(C=!0,K=this,c=Y,M||z(),M)}class $A{constructor(l){this._getCurrentHash=()=>{const c=window.location.hash.replace("#","");if(this._hashName){let C;return c.split("&").map(M=>M.split("=")).forEach(M=>{M[0]===this._hashName&&(C=M)}),(C&&C[1]||"").split("/")}return c.split("/")},this._onHashChange=()=>{const c=this._getCurrentHash();if(!this._isValidHash(c))return!1;const C=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:C,pitch:+(c[4]||0)}),!0},this._updateHashUnthrottled=()=>{const c=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,c)},this._removeHash=()=>{const c=this._getCurrentHash();if(c.length===0)return;const C=c.join("/");let M=C;M.split("&").length>0&&(M=M.split("&")[0]),this._hashName&&(M=`${this._hashName}=${C}`);let K=window.location.hash.replace(M,"");K.startsWith("#&")?K=K.slice(0,1)+K.slice(2):K==="#"&&(K="");let z=window.location.href.replace(/(#.+)?$/,K);z=z.replace("&&","&"),window.history.replaceState(window.history.state,null,z)},this._updateHash=Wd(this._updateHashUnthrottled,300),this._hashName=l&&encodeURIComponent(l)}addTo(l){return this._map=l,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(l){const c=this._map.getCenter(),C=Math.round(100*this._map.getZoom())/100,M=Math.ceil((C*Math.LN2+Math.log(512/360/.5))/Math.LN10),K=Math.pow(10,M),z=Math.round(c.lng*K)/K,Y=Math.round(c.lat*K)/K,ne=this._map.getBearing(),se=this._map.getPitch();let be="";if(be+=l?`/${z}/${Y}/${C}`:`${C}/${Y}/${z}`,(ne||se)&&(be+="/"+Math.round(10*ne)/10),se&&(be+=`/${Math.round(se)}`),this._hashName){const Oe=this._hashName;let Te=!1;const $e=window.location.hash.slice(1).split("&").map(He=>{const ct=He.split("=")[0];return ct===Oe?(Te=!0,`${ct}=${be}`):He}).filter(He=>He);return Te||$e.push(`${Oe}=${be}`),`#${$e.join("&")}`}return`#${be}`}_isValidHash(l){if(l.length<3||l.some(isNaN))return!1;try{new a.N(+l[2],+l[1])}catch{return!1}const c=+l[0],C=+(l[3]||0),M=+(l[4]||0);return c>=this._map.getMinZoom()&&c<=this._map.getMaxZoom()&&C>=0&&C<=180&&M>=this._map.getMinPitch()&&M<=this._map.getMaxPitch()}}const Ku={linearity:.3,easing:a.c6(0,0,.3,1)},Ru=a.e({deceleration:2500,maxSpeed:1400},Ku),yA=a.e({deceleration:20,maxSpeed:1400},Ku),fc=a.e({deceleration:1e3,maxSpeed:360},Ku),hu=a.e({deceleration:1e3,maxSpeed:90},Ku),jc=a.e({deceleration:1e3,maxSpeed:360},Ku);class rt{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:S.now(),settings:l})}_drainInertiaBuffer(){const l=this._inertiaBuffer,c=S.now();for(;l.length>0&&c-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const c={zoom:0,bearing:0,pitch:0,roll:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:K}of this._inertiaBuffer)c.zoom+=K.zoomDelta||0,c.bearing+=K.bearingDelta||0,c.pitch+=K.pitchDelta||0,c.roll+=K.rollDelta||0,K.panDelta&&c.pan._add(K.panDelta),K.around&&(c.around=K.around),K.pinchAround&&(c.pinchAround=K.pinchAround);const C=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,M={};if(c.pan.mag()){const K=Eo(c.pan.mag(),C,a.e({},Ru,l||{})),z=c.pan.mult(K.amount/c.pan.mag()),Y=this._map.cameraHelper.handlePanInertia(z,this._map.transform);M.center=Y.easingCenter,M.offset=Y.easingOffset,Ds(M,K)}if(c.zoom){const K=Eo(c.zoom,C,yA);M.zoom=this._map.transform.zoom+K.amount,Ds(M,K)}if(c.bearing){const K=Eo(c.bearing,C,fc);M.bearing=this._map.transform.bearing+a.ab(K.amount,-179,179),Ds(M,K)}if(c.pitch){const K=Eo(c.pitch,C,hu);M.pitch=this._map.transform.pitch+K.amount,Ds(M,K)}if(c.roll){const K=Eo(c.roll,C,jc);M.roll=this._map.transform.roll+a.ab(K.amount,-179,179),Ds(M,K)}if(M.zoom||M.bearing){const K=c.pinchAround===void 0?c.around:c.pinchAround;M.around=K?this._map.unproject(K):this._map.getCenter()}return this.clear(),a.e(M,{noMoveStart:!0})}}function Ds(k,l){(!k.duration||k.duration<l.duration)&&(k.duration=l.duration,k.easing=l.easing)}function Eo(k,l,c){const{maxSpeed:C,linearity:M,deceleration:K}=c,z=a.ab(k*M/(l/1e3),-C,C),Y=Math.abs(z)/(K*M);return{easing:c.easing,duration:1e3*Y,amount:z*(Y/2)}}class Li extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,c,C,M={}){const K=B.mousePos(c.getCanvas(),C),z=c.unproject(K);super(l,a.e({point:K,lngLat:z,originalEvent:C},M)),this._defaultPrevented=!1,this.target=c}}class Wr extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,c,C){const M=l==="touchend"?C.changedTouches:C.touches,K=B.touchPos(c.getCanvasContainer(),M),z=K.map(ne=>c.unproject(ne)),Y=K.reduce((ne,se,be,Oe)=>ne.add(se.div(Oe.length)),new a.P(0,0));super(l,{points:K,point:Y,lngLats:z,lngLat:c.unproject(Y),originalEvent:C}),this._defaultPrevented=!1}}class Ma extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,c,C){super(l,{originalEvent:C}),this._defaultPrevented=!1}}class ld{constructor(l,c){this._map=l,this._clickTolerance=c.clickTolerance}reset(){delete this._mousedownPos}wheel(l){return this._firePreventable(new Ma(l.type,this._map,l))}mousedown(l,c){return this._mousedownPos=c,this._firePreventable(new Li(l.type,this._map,l))}mouseup(l){this._map.fire(new Li(l.type,this._map,l))}click(l,c){this._mousedownPos&&this._mousedownPos.dist(c)>=this._clickTolerance||this._map.fire(new Li(l.type,this._map,l))}dblclick(l){return this._firePreventable(new Li(l.type,this._map,l))}mouseover(l){this._map.fire(new Li(l.type,this._map,l))}mouseout(l){this._map.fire(new Li(l.type,this._map,l))}touchstart(l){return this._firePreventable(new Wr(l.type,this._map,l))}touchmove(l){this._map.fire(new Wr(l.type,this._map,l))}touchend(l){this._map.fire(new Wr(l.type,this._map,l))}touchcancel(l){this._map.fire(new Wr(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Qd{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(l){this._map.fire(new Li(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Li("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._ignoreContextMenu||this._map.fire(new Li(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ms{constructor(l){this._map=l}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(l){return this.transform.screenPointToLocation(a.P.convert(l),this._map.terrain)}}class za{constructor(l,c){this._map=l,this._tr=new Ms(l),this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=c.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,c){this.isEnabled()&&l.shiftKey&&l.button===0&&(B.disableDrag(),this._startPos=this._lastPos=c,this._active=!0)}mousemoveWindow(l,c){if(!this._active)return;const C=c;if(this._lastPos.equals(C)||!this._box&&C.dist(this._startPos)<this._clickTolerance)return;const M=this._startPos;this._lastPos=C,this._box||(this._box=B.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",l));const K=Math.min(M.x,C.x),z=Math.max(M.x,C.x),Y=Math.min(M.y,C.y),ne=Math.max(M.y,C.y);B.setTransform(this._box,`translate(${K}px,${Y}px)`),this._box.style.width=z-K+"px",this._box.style.height=ne-Y+"px"}mouseupWindow(l,c){if(!this._active||l.button!==0)return;const C=this._startPos,M=c;if(this.reset(),B.suppressClick(),C.x!==M.x||C.y!==M.y)return this._map.fire(new a.k("boxzoomend",{originalEvent:l})),{cameraAnimation:K=>K.fitScreenCoordinates(C,M,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",l)}keydown(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(B.remove(this._box),this._box=null),B.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(l,c){return this._map.fire(new a.k(l,{originalEvent:c}))}}function ya(k,l){if(k.length!==l.length)throw new Error(`The number of touches and points are not equal - touches ${k.length}, points ${l.length}`);const c={};for(let C=0;C<k.length;C++)c[k[C].identifier]=l[C];return c}class iA{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(l,c,C){(this.centroid||C.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),C.length===this.numTouches&&(this.centroid=function(M){const K=new a.P(0,0);for(const z of M)K._add(z);return K.div(M.length)}(c),this.touches=ya(C,c)))}touchmove(l,c,C){if(this.aborted||!this.centroid)return;const M=ya(C,c);for(const K in this.touches){const z=M[K];(!z||z.dist(this.touches[K])>30)&&(this.aborted=!0)}}touchend(l,c,C){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),C.length===0){const M=!this.aborted&&this.centroid;if(this.reset(),M)return M}}}class Sa{constructor(l){this.singleTap=new iA(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(l,c,C){this.singleTap.touchstart(l,c,C)}touchmove(l,c,C){this.singleTap.touchmove(l,c,C)}touchend(l,c,C){const M=this.singleTap.touchend(l,c,C);if(M){const K=l.timeStamp-this.lastTime<500,z=!this.lastTap||this.lastTap.dist(M)<30;if(K&&z||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=M,this.count===this.numTaps)return this.reset(),M}}}class dr{constructor(l){this._tr=new Ms(l),this._zoomIn=new Sa({numTouches:1,numTaps:2}),this._zoomOut=new Sa({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,c,C){this._zoomIn.touchstart(l,c,C),this._zoomOut.touchstart(l,c,C)}touchmove(l,c,C){this._zoomIn.touchmove(l,c,C),this._zoomOut.touchmove(l,c,C)}touchend(l,c,C){const M=this._zoomIn.touchend(l,c,C),K=this._zoomOut.touchend(l,c,C),z=this._tr;return M?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Y=>Y.easeTo({duration:300,zoom:z.zoom+1,around:z.unproject(M)},{originalEvent:l})}):K?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Y=>Y.easeTo({duration:300,zoom:z.zoom-1,around:z.unproject(K)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ys{constructor(l){this._enabled=!!l.enable,this._moveStateManager=l.moveStateManager,this._clickTolerance=l.clickTolerance||1,this._moveFunction=l.move,this._activateOnStart=!!l.activateOnStart,l.assignEvents(this),this.reset()}reset(l){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(l)}_move(...l){const c=this._moveFunction(...l);if(c.bearingDelta||c.pitchDelta||c.rollDelta||c.around||c.panDelta)return this._active=!0,c}dragStart(l,c){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(l)&&(this._moveStateManager.startMove(l),this._lastPoint=Array.isArray(c)?c[0]:c,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(l,c){if(!this.isEnabled())return;const C=this._lastPoint;if(!C)return;if(l.preventDefault(),!this._moveStateManager.isValidMoveEvent(l))return void this.reset(l);const M=Array.isArray(c)?c[0]:c;return!this._moved&&M.dist(C)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=M,this._move(C,M))}dragEnd(l){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(l)&&(this._moved&&B.suppressClick(),this.reset(l))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const zc={0:1,2:2};class Ss{constructor(l){this._correctEvent=l.checkCorrectEvent}startMove(l){const c=B.mouseButton(l);this._eventButton=c}endMove(l){delete this._eventButton}isValidStartEvent(l){return this._correctEvent(l)}isValidMoveEvent(l){return!function(c,C){const M=zc[C];return c.buttons===void 0||(c.buttons&M)!==M}(l,this._eventButton)}isValidEndEvent(l){return B.mouseButton(l)===this._eventButton}}class VA{constructor(){this._firstTouch=void 0}_isOneFingerTouch(l){return l.targetTouches.length===1}_isSameTouchEvent(l){return l.targetTouches[0].identifier===this._firstTouch}startMove(l){this._firstTouch=l.targetTouches[0].identifier}endMove(l){delete this._firstTouch}isValidStartEvent(l){return this._isOneFingerTouch(l)}isValidMoveEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}isValidEndEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}}class ud{constructor(l=new Ss({checkCorrectEvent:()=>!0}),c=new VA){this.mouseMoveStateManager=l,this.oneFingerTouchMoveStateManager=c}_executeRelevantHandler(l,c,C){return l instanceof MouseEvent?c(l):typeof TouchEvent<"u"&&l instanceof TouchEvent?C(l):void 0}startMove(l){this._executeRelevantHandler(l,c=>this.mouseMoveStateManager.startMove(c),c=>this.oneFingerTouchMoveStateManager.startMove(c))}endMove(l){this._executeRelevantHandler(l,c=>this.mouseMoveStateManager.endMove(c),c=>this.oneFingerTouchMoveStateManager.endMove(c))}isValidStartEvent(l){return this._executeRelevantHandler(l,c=>this.mouseMoveStateManager.isValidStartEvent(c),c=>this.oneFingerTouchMoveStateManager.isValidStartEvent(c))}isValidMoveEvent(l){return this._executeRelevantHandler(l,c=>this.mouseMoveStateManager.isValidMoveEvent(c),c=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(c))}isValidEndEvent(l){return this._executeRelevantHandler(l,c=>this.mouseMoveStateManager.isValidEndEvent(c),c=>this.oneFingerTouchMoveStateManager.isValidEndEvent(c))}}const Ad=k=>{k.mousedown=k.dragStart,k.mousemoveWindow=k.dragMove,k.mouseup=k.dragEnd,k.contextmenu=l=>{l.preventDefault()}};class Si{constructor(l,c){this._clickTolerance=l.clickTolerance||1,this._map=c,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(l){return l<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(l,c,C){return this._calculateTransform(l,c,C)}touchmove(l,c,C){if(this._active){if(!this._shouldBePrevented(C.length))return l.preventDefault(),this._calculateTransform(l,c,C);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",l)}}touchend(l,c,C){this._calculateTransform(l,c,C),this._active&&this._shouldBePrevented(C.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(l,c,C){C.length>0&&(this._active=!0);const M=ya(C,c),K=new a.P(0,0),z=new a.P(0,0);let Y=0;for(const se in M){const be=M[se],Oe=this._touches[se];Oe&&(K._add(be),z._add(be.sub(Oe)),Y++,M[se]=be)}if(this._touches=M,this._shouldBePrevented(Y)||!z.mag())return;const ne=z.div(Y);return this._sum._add(ne),this._sum.mag()<this._clickTolerance?void 0:{around:K.div(Y),panDelta:ne}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class cd{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(l,c,C){this._firstTwoTouches||C.length<2||(this._firstTwoTouches=[C[0].identifier,C[1].identifier],this._start([c[0],c[1]]))}touchmove(l,c,C){if(!this._firstTwoTouches)return;l.preventDefault();const[M,K]=this._firstTwoTouches,z=Ul(C,c,M),Y=Ul(C,c,K);if(!z||!Y)return;const ne=this._aroundCenter?null:z.add(Y).div(2);return this._move([z,Y],ne,l)}touchend(l,c,C){if(!this._firstTwoTouches)return;const[M,K]=this._firstTwoTouches,z=Ul(C,c,M),Y=Ul(C,c,K);z&&Y||(this._active&&B.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Ul(k,l,c){for(let C=0;C<k.length;C++)if(k[C].identifier===c)return l[C]}function dd(k,l){return Math.log(k/l)/Math.LN2}class hd extends cd{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,c){const C=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(dd(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:dd(this._distance,C),pinchAround:c}}}function vA(k,l){return 180*k.angleWith(l)/Math.PI}class HA extends cd{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,c,C){const M=this._vector;if(this._vector=l[0].sub(l[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:vA(this._vector,M),pinchAround:c}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());const c=25/(Math.PI*this._minDiameter)*360,C=vA(l,this._startVector);return Math.abs(C)<c}}function oA(k){return Math.abs(k.y)>Math.abs(k.x)}class pc extends cd{constructor(l){super(),this._currentTouchCount=0,this._map=l}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(l,c,C){super.touchstart(l,c,C),this._currentTouchCount=C.length}_start(l){this._lastPoints=l,oA(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,c,C){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const M=l[0].sub(this._lastPoints[0]),K=l[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(M,K,C.timeStamp),this._valid?(this._lastPoints=l,this._active=!0,{pitchDelta:(M.y+K.y)/2*-.5}):void 0}gestureBeginsVertically(l,c,C){if(this._valid!==void 0)return this._valid;const M=l.mag()>=2,K=c.mag()>=2;if(!M&&!K)return;if(!M||!K)return this._firstMove===void 0&&(this._firstMove=C),C-this._firstMove<100&&void 0;const z=l.y>0==c.y>0;return oA(l)&&oA(c)&&z}}const Ea={panStep:100,bearingStep:15,pitchStep:10};class bo{constructor(l){this._tr=new Ms(l);const c=Ea;this._panStep=c.panStep,this._bearingStep=c.bearingStep,this._pitchStep=c.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let c=0,C=0,M=0,K=0,z=0;switch(l.keyCode){case 61:case 107:case 171:case 187:c=1;break;case 189:case 109:case 173:c=-1;break;case 37:l.shiftKey?C=-1:(l.preventDefault(),K=-1);break;case 39:l.shiftKey?C=1:(l.preventDefault(),K=1);break;case 38:l.shiftKey?M=1:(l.preventDefault(),z=-1);break;case 40:l.shiftKey?M=-1:(l.preventDefault(),z=1);break;default:return}return this._rotationDisabled&&(C=0,M=0),{cameraAnimation:Y=>{const ne=this._tr;Y.easeTo({duration:300,easeId:"keyboardHandler",easing:fu,zoom:c?Math.round(ne.zoom)+c*(l.shiftKey?2:1):ne.zoom,bearing:ne.bearing+C*this._bearingStep,pitch:ne.pitch+M*this._pitchStep,offset:[-K*this._panStep,-z*this._panStep],center:ne.center},{originalEvent:l})}}}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 fu(k){return k*(2-k)}const Ls=4.000244140625;class Ka{constructor(l,c){this._onTimeout=C=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(C)},this._map=l,this._tr=new Ms(l),this._triggerRenderFrame=c,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&l.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(l){return!!this._map.cooperativeGestures.isEnabled()&&!(l.ctrlKey||this._map.cooperativeGestures.isBypassed(l))}wheel(l){if(!this.isEnabled())return;if(this._shouldBePrevented(l))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",l);let c=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY;const C=S.now(),M=C-(this._lastWheelEventTime||0);this._lastWheelEventTime=C,c!==0&&c%Ls==0?this._type="wheel":c!==0&&Math.abs(c)<4?this._type="trackpad":M>400?(this._type=null,this._lastValue=c,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(M*c)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,c+=this._lastValue)),l.shiftKey&&c&&(c/=4),this._type&&(this._lastWheelEvent=l,this._delta-=c,this._active||this._start(l)),l.preventDefault()}_start(l){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 c=B.mousePos(this._map.getCanvas(),l),C=this._tr;this._aroundPoint=this._aroundCenter?C.transform.locationToScreenPoint(a.N.convert(C.center)):c,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const l=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const Y=l.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=Y),typeof this._targetZoom=="number"&&(this._targetZoom+=Y)}if(this._delta!==0){const Y=this._type==="wheel"&&Math.abs(this._delta)>Ls?this._wheelZoomRate:this._defaultZoomRate;let ne=2/(1+Math.exp(-Math.abs(this._delta*Y)));this._delta<0&&ne!==0&&(ne=1/ne);const se=typeof this._targetZoom!="number"?l.scale:a.aG(this._targetZoom);this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,a.a8(se*ne))),this._type==="wheel"&&(this._startZoom=l.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const c=typeof this._targetZoom!="number"?l.zoom:this._targetZoom,C=this._startZoom,M=this._easing;let K,z=!1;if(this._type==="wheel"&&C&&M){const Y=S.now()-this._lastWheelEventTime,ne=Math.min((Y+5)/200,1),se=M(ne);K=a.y.number(C,c,se),ne<1?this._frameId||(this._frameId=!0):z=!0}else K=c,z=!0;return this._active=!0,z&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=K,{noInertia:!0,needsRenderFrame:!z,zoomDelta:K-l.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let c=a.c8;if(this._prevEase){const C=this._prevEase,M=(S.now()-C.start)/C.duration,K=C.easing(M+.01)-C.easing(M),z=.27/Math.sqrt(K*K+1e-4)*.01,Y=Math.sqrt(.0729-z*z);c=a.c6(z,Y,.25,1)}return this._prevEase={start:S.now(),duration:l,easing:c},c}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ho{constructor(l,c){this._clickZoom=l,this._tapZoom=c}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 Zl{constructor(l){this._tr=new Ms(l),this.reset()}reset(){this._active=!1}dblclick(l,c){return l.preventDefault(),{cameraAnimation:C=>{C.easeTo({duration:300,zoom:this._tr.zoom+(l.shiftKey?-1:1),around:this._tr.unproject(c)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Du{constructor(){this._tap=new Sa({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(l,c,C){if(!this._swipePoint)if(this._tapTime){const M=c[0],K=l.timeStamp-this._tapTime<500,z=this._tapPoint.dist(M)<30;K&&z?C.length>0&&(this._swipePoint=M,this._swipeTouch=C[0].identifier):this.reset()}else this._tap.touchstart(l,c,C)}touchmove(l,c,C){if(this._tapTime){if(this._swipePoint){if(C[0].identifier!==this._swipeTouch)return;const M=c[0],K=M.y-this._swipePoint.y;return this._swipePoint=M,l.preventDefault(),this._active=!0,{zoomDelta:K/128}}}else this._tap.touchmove(l,c,C)}touchend(l,c,C){if(this._tapTime)this._swipePoint&&C.length===0&&this.reset();else{const M=this._tap.touchend(l,c,C);M&&(this._tapTime=l.timeStamp,this._tapPoint=M)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mc{constructor(l,c,C){this._el=l,this._mousePan=c,this._touchPan=C}enable(l){this._inertiaOptions=l||{},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 qd{constructor(l,c,C,M){this._pitchWithRotate=l.pitchWithRotate,this._rollEnabled=l.rollEnabled,this._mouseRotate=c,this._mousePitch=C,this._mouseRoll=M}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class _A{constructor(l,c,C,M){this._el=l,this._touchZoom=c,this._touchRotate=C,this._tapDragZoom=M,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),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 gc{constructor(l,c){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=l,this._options=c,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const l=this._map.getCanvasContainer();l.classList.add("maplibregl-cooperative-gestures"),this._container=B.create("div","maplibregl-cooperative-gesture-screen",l);let c=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(c=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const C=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),M=document.createElement("div");M.className="maplibregl-desktop-message",M.textContent=c,this._container.appendChild(M);const K=document.createElement("div");K.className="maplibregl-mobile-message",K.textContent=C,this._container.appendChild(K),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(B.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(l){return l[this._bypassKey]}notifyGestureBlocked(l,c){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:l,originalEvent:c})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const ma=k=>k.zoom||k.drag||k.roll||k.pitch||k.rotate;class cs extends a.k{}function cr(k){return k.panDelta&&k.panDelta.mag()||k.zoomDelta||k.bearingDelta||k.pitchDelta||k.rollDelta}class qr{constructor(l,c){this.handleWindowEvent=M=>{this.handleEvent(M,`${M.type}Window`)},this.handleEvent=(M,K)=>{if(M.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const z=M.type==="renderFrame"?void 0:M,Y={needsRenderFrame:!1},ne={},se={},be=M.touches,Oe=be?this._getMapTouches(be):void 0,Te=Oe?B.touchPos(this._map.getCanvas(),Oe):B.mousePos(this._map.getCanvas(),M);for(const{handlerName:ct,handler:st,allowed:dt}of this._handlers){if(!st.isEnabled())continue;let gt;this._blockedByActive(se,dt,ct)?st.reset():st[K||M.type]&&(gt=st[K||M.type](M,Te,Oe),this.mergeHandlerResult(Y,ne,gt,ct,z),gt&>.needsRenderFrame&&this._triggerRenderFrame()),(gt||st.isActive())&&(se[ct]=st)}const $e={};for(const ct in this._previousActiveHandlers)se[ct]||($e[ct]=z);this._previousActiveHandlers=se,(Object.keys($e).length||cr(Y))&&(this._changes.push([Y,ne,$e]),this._triggerRenderFrame()),(Object.keys(se).length||cr(Y))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:He}=Y;He&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],He(this._map))},this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rt(l),this._bearingSnap=c.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(c);const C=this._el;this._listeners=[[C,"touchstart",{passive:!0}],[C,"touchmove",{passive:!1}],[C,"touchend",void 0],[C,"touchcancel",void 0],[C,"mousedown",void 0],[C,"mousemove",void 0],[C,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[C,"mouseover",void 0],[C,"mouseout",void 0],[C,"dblclick",void 0],[C,"click",void 0],[C,"keydown",{capture:!1}],[C,"keyup",void 0],[C,"wheel",{passive:!1}],[C,"contextmenu",void 0],[window,"blur",void 0]];for(const[M,K,z]of this._listeners)B.addEventListener(M,K,M===document?this.handleWindowEvent:this.handleEvent,z)}destroy(){for(const[l,c,C]of this._listeners)B.removeEventListener(l,c,l===document?this.handleWindowEvent:this.handleEvent,C)}_addDefaultHandlers(l){const c=this._map,C=c.getCanvasContainer();this._add("mapEvent",new ld(c,l));const M=c.boxZoom=new za(c,l);this._add("boxZoom",M),l.interactive&&l.boxZoom&&M.enable();const K=c.cooperativeGestures=new gc(c,l.cooperativeGestures);this._add("cooperativeGestures",K),l.cooperativeGestures&&K.enable();const z=new dr(c),Y=new Zl(c);c.doubleClickZoom=new Ho(Y,z),this._add("tapZoom",z),this._add("clickZoom",Y),l.interactive&&l.doubleClickZoom&&c.doubleClickZoom.enable();const ne=new Du;this._add("tapDragZoom",ne);const se=c.touchPitch=new pc(c);this._add("touchPitch",se),l.interactive&&l.touchPitch&&c.touchPitch.enable(l.touchPitch);const be=()=>c.project(c.getCenter()),Oe=function({enable:It,clickTolerance:Kt,aroundCenter:zt=!0,minPixelCenterThreshold:Tt=100,rotateDegreesPerPixelMoved:tn=.8},Zt){const vn=new Ss({checkCorrectEvent:_n=>B.mouseButton(_n)===0&&_n.ctrlKey||B.mouseButton(_n)===2&&!_n.ctrlKey});return new ys({clickTolerance:Kt,move:(_n,gn)=>{const In=Zt();if(zt&&Math.abs(In.y-_n.y)>Tt)return{bearingDelta:a.c7(new a.P(_n.x,gn.y),gn,In)};let Un=(gn.x-_n.x)*tn;return zt&&gn.y<In.y&&(Un=-Un),{bearingDelta:Un}},moveStateManager:vn,enable:It,assignEvents:Ad})}(l,be),Te=function({enable:It,clickTolerance:Kt,pitchDegreesPerPixelMoved:zt=-.5}){const Tt=new Ss({checkCorrectEvent:tn=>B.mouseButton(tn)===0&&tn.ctrlKey||B.mouseButton(tn)===2});return new ys({clickTolerance:Kt,move:(tn,Zt)=>({pitchDelta:(Zt.y-tn.y)*zt}),moveStateManager:Tt,enable:It,assignEvents:Ad})}(l),$e=function({enable:It,clickTolerance:Kt,rollDegreesPerPixelMoved:zt=.3},Tt){const tn=new Ss({checkCorrectEvent:Zt=>B.mouseButton(Zt)===2&&Zt.ctrlKey});return new ys({clickTolerance:Kt,move:(Zt,vn)=>{const _n=Tt();let gn=(vn.x-Zt.x)*zt;return vn.y<_n.y&&(gn=-gn),{rollDelta:gn}},moveStateManager:tn,enable:It,assignEvents:Ad})}(l,be);c.dragRotate=new qd(l,Oe,Te,$e),this._add("mouseRotate",Oe,["mousePitch"]),this._add("mousePitch",Te,["mouseRotate","mouseRoll"]),this._add("mouseRoll",$e,["mousePitch"]),l.interactive&&l.dragRotate&&c.dragRotate.enable();const He=function({enable:It,clickTolerance:Kt}){const zt=new Ss({checkCorrectEvent:Tt=>B.mouseButton(Tt)===0&&!Tt.ctrlKey});return new ys({clickTolerance:Kt,move:(Tt,tn)=>({around:tn,panDelta:tn.sub(Tt)}),activateOnStart:!0,moveStateManager:zt,enable:It,assignEvents:Ad})}(l),ct=new Si(l,c);c.dragPan=new mc(C,He,ct),this._add("mousePan",He),this._add("touchPan",ct,["touchZoom","touchRotate"]),l.interactive&&l.dragPan&&c.dragPan.enable(l.dragPan);const st=new HA,dt=new hd;c.touchZoomRotate=new _A(C,dt,st,ne),this._add("touchRotate",st,["touchPan","touchZoom"]),this._add("touchZoom",dt,["touchPan","touchRotate"]),l.interactive&&l.touchZoomRotate&&c.touchZoomRotate.enable(l.touchZoomRotate);const gt=c.scrollZoom=new Ka(c,()=>this._triggerRenderFrame());this._add("scrollZoom",gt,["mousePan"]),l.interactive&&l.scrollZoom&&c.scrollZoom.enable(l.scrollZoom);const St=c.keyboard=new bo(c);this._add("keyboard",St),l.interactive&&l.keyboard&&c.keyboard.enable(),this._add("blockableMapEvent",new Qd(c))}_add(l,c,C){this._handlers.push({handlerName:l,handler:c,allowed:C}),this._handlersById[l]=c}stop(l){if(!this._updatingCamera){for(const{handler:c}of this._handlers)c.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}}isActive(){for(const{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ma(this._eventsInProgress)||this.isZooming()}_blockedByActive(l,c,C){for(const M in l)if(M!==C&&(!c||c.indexOf(M)<0))return!0;return!1}_getMapTouches(l){const c=[];for(const C of l)this._el.contains(C.target)&&c.push(C);return c}mergeHandlerResult(l,c,C,M,K){if(!C)return;a.e(l,C);const z={handlerName:M,originalEvent:C.originalEvent||K};C.zoomDelta!==void 0&&(c.zoom=z),C.panDelta!==void 0&&(c.drag=z),C.rollDelta!==void 0&&(c.roll=z),C.pitchDelta!==void 0&&(c.pitch=z),C.bearingDelta!==void 0&&(c.rotate=z)}_applyChanges(){const l={},c={},C={};for(const[M,K,z]of this._changes)M.panDelta&&(l.panDelta=(l.panDelta||new a.P(0,0))._add(M.panDelta)),M.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+M.zoomDelta),M.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+M.bearingDelta),M.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+M.pitchDelta),M.rollDelta&&(l.rollDelta=(l.rollDelta||0)+M.rollDelta),M.around!==void 0&&(l.around=M.around),M.pinchAround!==void 0&&(l.pinchAround=M.pinchAround),M.noInertia&&(l.noInertia=M.noInertia),a.e(c,K),a.e(C,z);this._updateMapTransform(l,c,C),this._changes=[]}_updateMapTransform(l,c,C){const M=this._map,K=M._getTransformForUpdate(),z=M.terrain;if(!(cr(l)||z&&this._terrainMovement))return this._fireEvents(c,C,!0);M._stop(!0);let{panDelta:Y,zoomDelta:ne,bearingDelta:se,pitchDelta:be,rollDelta:Oe,around:Te,pinchAround:$e}=l;$e!==void 0&&(Te=$e),Te=Te||M.transform.centerPoint,z&&!K.isPointOnMapSurface(Te)&&(Te=K.centerPoint);const He={panDelta:Y,zoomDelta:ne,rollDelta:Oe,pitchDelta:be,bearingDelta:se,around:Te};this._map.cameraHelper.useGlobeControls&&!K.isPointOnMapSurface(Te)&&(Te=K.centerPoint);const ct=Te.distSqr(K.centerPoint)<.01?K.center:K.screenPointToLocation(Y?Te.sub(Y):Te);z?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(He,K),this._terrainMovement||!c.drag&&!c.zoom?c.drag&&this._terrainMovement?K.setCenter(K.screenPointToLocation(K.centerPoint.sub(Y))):this._map.cameraHelper.handleMapControlsPan(He,K,ct):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(He,K,ct))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(He,K),this._map.cameraHelper.handleMapControlsPan(He,K,ct)),M._applyUpdatedTransform(K),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(c,C,!0)}_fireEvents(l,c,C){const M=ma(this._eventsInProgress),K=ma(l),z={};for(const Oe in l){const{originalEvent:Te}=l[Oe];this._eventsInProgress[Oe]||(z[`${Oe}start`]=Te),this._eventsInProgress[Oe]=l[Oe]}!M&&K&&this._fireEvent("movestart",K.originalEvent);for(const Oe in z)this._fireEvent(Oe,z[Oe]);K&&this._fireEvent("move",K.originalEvent);for(const Oe in l){const{originalEvent:Te}=l[Oe];this._fireEvent(Oe,Te)}const Y={};let ne;for(const Oe in this._eventsInProgress){const{handlerName:Te,originalEvent:$e}=this._eventsInProgress[Oe];this._handlersById[Te].isActive()||(delete this._eventsInProgress[Oe],ne=c[Te]||$e,Y[`${Oe}end`]=ne)}for(const Oe in Y)this._fireEvent(Oe,Y[Oe]);const se=ma(this._eventsInProgress),be=(M||K)&&!se;if(be&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Oe=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Oe.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Oe)}if(C&&be){this._updatingCamera=!0;const Oe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Te=$e=>$e!==0&&-this._bearingSnap<$e&&$e<this._bearingSnap;!Oe||!Oe.essential&&S.prefersReducedMotion?(this._map.fire(new a.k("moveend",{originalEvent:ne})),Te(this._map.getBearing())&&this._map.resetNorth()):(Te(Oe.bearing||this._map.getBearing())&&(Oe.bearing=0),Oe.freezeElevation=!0,this._map.easeTo(Oe,{originalEvent:ne})),this._updatingCamera=!1}}_fireEvent(l,c){this._map.fire(new a.k(l,c?{originalEvent:c}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(l=>{delete this._frameId,this.handleEvent(new cs("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Lu extends a.E{constructor(l,c,C){super(),this._renderFrameCallback=()=>{const M=Math.min((S.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(M)),M<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=C.bearingSnap,this.cameraHelper=c,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(l,c){l.apply(this.transform),this.transform=l,this.cameraHelper=c}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(l,c){return this.jumpTo({center:l},c)}getCenterElevation(){return this.transform.elevation}setCenterElevation(l,c){return this.jumpTo({elevation:l},c),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(l){this._centerClampedToGround=l}panBy(l,c,C){return l=a.P.convert(l).mult(-1),this.panTo(this.transform.center,a.e({offset:l},c),C)}panTo(l,c,C){return this.easeTo(a.e({center:l},c),C)}getZoom(){return this.transform.zoom}setZoom(l,c){return this.jumpTo({zoom:l},c),this}zoomTo(l,c,C){return this.easeTo(a.e({zoom:l},c),C)}zoomIn(l,c){return this.zoomTo(this.getZoom()+1,l,c),this}zoomOut(l,c){return this.zoomTo(this.getZoom()-1,l,c),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(l,c){return l!=this.transform.fov&&(this.transform.setFov(l),this.fire(new a.k("movestart",c)).fire(new a.k("move",c)).fire(new a.k("moveend",c))),this}getBearing(){return this.transform.bearing}setBearing(l,c){return this.jumpTo({bearing:l},c),this}getPadding(){return this.transform.padding}setPadding(l,c){return this.jumpTo({padding:l},c),this}rotateTo(l,c,C){return this.easeTo(a.e({bearing:l},c),C)}resetNorth(l,c){return this.rotateTo(0,a.e({duration:1e3},l),c),this}resetNorthPitch(l,c){return this.easeTo(a.e({bearing:0,pitch:0,roll:0,duration:1e3},l),c),this}snapToNorth(l,c){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(l,c):this}getPitch(){return this.transform.pitch}setPitch(l,c){return this.jumpTo({pitch:l},c),this}getRoll(){return this.transform.roll}setRoll(l,c){return this.jumpTo({roll:l},c),this}cameraForBounds(l,c){l=Lt.convert(l).adjustAntiMeridian();const C=c&&c.bearing||0;return this._cameraForBoxAndBearing(l.getNorthWest(),l.getSouthEast(),C,c)}_cameraForBoxAndBearing(l,c,C,M){const K={top:0,bottom:0,right:0,left:0};if(typeof(M=a.e({padding:K,offset:[0,0],maxZoom:this.transform.maxZoom},M)).padding=="number"){const se=M.padding;M.padding={top:se,bottom:se,right:se,left:se}}const z=a.e(K,M.padding);M.padding=z;const Y=this.transform,ne=new Lt(l,c);return this.cameraHelper.cameraForBoxAndBearing(M,z,ne,C,Y)}fitBounds(l,c,C){return this._fitInternal(this.cameraForBounds(l,c),c,C)}fitScreenCoordinates(l,c,C,M,K){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(a.P.convert(l)),this.transform.screenPointToLocation(a.P.convert(c)),C,M),M,K)}_fitInternal(l,c,C){return l?(delete(c=a.e(l,c)).padding,c.linear?this.easeTo(c,C):this.flyTo(c,C)):this}jumpTo(l,c){this.stop();const C=this._getTransformForUpdate();let M=!1,K=!1,z=!1;const Y=C.zoom;this.cameraHelper.handleJumpToCenterZoom(C,l);const ne=C.zoom!==Y;return"elevation"in l&&C.elevation!==+l.elevation&&C.setElevation(+l.elevation),"bearing"in l&&C.bearing!==+l.bearing&&(M=!0,C.setBearing(+l.bearing)),"pitch"in l&&C.pitch!==+l.pitch&&(K=!0,C.setPitch(+l.pitch)),"roll"in l&&C.roll!==+l.roll&&(z=!0,C.setRoll(+l.roll)),l.padding==null||C.isPaddingEqual(l.padding)||C.setPadding(l.padding),this._applyUpdatedTransform(C),this.fire(new a.k("movestart",c)).fire(new a.k("move",c)),ne&&this.fire(new a.k("zoomstart",c)).fire(new a.k("zoom",c)).fire(new a.k("zoomend",c)),M&&this.fire(new a.k("rotatestart",c)).fire(new a.k("rotate",c)).fire(new a.k("rotateend",c)),K&&this.fire(new a.k("pitchstart",c)).fire(new a.k("pitch",c)).fire(new a.k("pitchend",c)),z&&this.fire(new a.k("rollstart",c)).fire(new a.k("roll",c)).fire(new a.k("rollend",c)),this.fire(new a.k("moveend",c))}calculateCameraOptionsFromTo(l,c,C,M=0){const K=a.Y.fromLngLat(l,c),z=a.Y.fromLngLat(C,M),Y=z.x-K.x,ne=z.y-K.y,se=z.z-K.z,be=Math.hypot(Y,ne,se);if(be===0)throw new Error("Can't calculate camera options with same From and To");const Oe=Math.hypot(Y,ne),Te=a.a8(this.transform.cameraToCenterDistance/be/this.transform.tileSize),$e=180*Math.atan2(Y,-ne)/Math.PI;let He=180*Math.acos(Oe/be)/Math.PI;return He=se<0?90-He:90+He,{center:z.toLngLat(),elevation:M,zoom:Te,pitch:He,bearing:$e}}calculateCameraOptionsFromCameraLngLatAltRotation(l,c,C,M,K){const z=this.transform.calculateCenterFromCameraLngLatAlt(l,c,C,M);return{center:z.center,elevation:z.elevation,zoom:z.zoom,bearing:C,pitch:M,roll:K}}easeTo(l,c){this._stop(!1,l.easeId),((l=a.e({offset:[0,0],duration:500,easing:a.c8},l)).animate===!1||!l.essential&&S.prefersReducedMotion)&&(l.duration=0);const C=this._getTransformForUpdate(),M=this.getBearing(),K=C.pitch,z=C.roll,Y="bearing"in l?this._normalizeBearing(l.bearing,M):M,ne="pitch"in l?+l.pitch:K,se="roll"in l?this._normalizeBearing(l.roll,z):z,be="padding"in l?l.padding:C.padding,Oe=a.P.convert(l.offset);let Te,$e;l.around&&(Te=a.N.convert(l.around),$e=C.locationToScreenPoint(Te));const He={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},ct=this.cameraHelper.handleEaseTo(C,{bearing:Y,pitch:ne,roll:se,padding:be,around:Te,aroundPoint:$e,offsetAsPoint:Oe,offset:l.offset,zoom:l.zoom,center:l.center});return this._rotating=this._rotating||M!==Y,this._pitching=this._pitching||ne!==K,this._rolling=this._rolling||se!==z,this._padding=!C.isPaddingEqual(be),this._zooming=this._zooming||ct.isZooming,this._easeId=l.easeId,this._prepareEase(c,l.noMoveStart,He),this.terrain&&this._prepareElevation(ct.elevationCenter),this._ease(st=>{ct.easeFunc(st),this.terrain&&!l.freezeElevation&&this._updateElevation(st),this._applyUpdatedTransform(C),this._fireMoveEvents(c)},st=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(c,st)},l),this}_prepareEase(l,c,C={}){this._moving=!0,c||C.moving||this.fire(new a.k("movestart",l)),this._zooming&&!C.zooming&&this.fire(new a.k("zoomstart",l)),this._rotating&&!C.rotating&&this.fire(new a.k("rotatestart",l)),this._pitching&&!C.pitching&&this.fire(new a.k("pitchstart",l)),this._rolling&&!C.rolling&&this.fire(new a.k("rollstart",l))}_prepareElevation(l){this._elevationCenter=l,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(l){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const c=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(l<1&&c!==this._elevationTarget){const C=this._elevationTarget-this._elevationStart;this._elevationStart+=l*(C-(c-(C*l+this._elevationStart))/(1-l)),this._elevationTarget=c}this.transform.setElevation(a.y.number(this._elevationStart,this._elevationTarget,l))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(l){if(!this.terrain&&l.elevation>=0&&l.pitch<=90)return{};const c=l.getCameraLngLat(),C=l.getCameraAltitude(),M=this.terrain?this.terrain.getElevationForLngLatZoom(c,l.zoom):0;if(C<M){const K=this.calculateCameraOptionsFromTo(c,M,l.center,l.elevation);return{pitch:K.pitch,zoom:K.zoom}}return{}}_applyUpdatedTransform(l){const c=[];if(c.push(M=>this._elevateCameraIfInsideTerrain(M)),this.transformCameraUpdate&&c.push(M=>this.transformCameraUpdate(M)),!c.length)return;const C=l.clone();for(const M of c){const K=C.clone(),{center:z,zoom:Y,roll:ne,pitch:se,bearing:be,elevation:Oe}=M(K);z&&K.setCenter(z),Oe!==void 0&&K.setElevation(Oe),Y!==void 0&&K.setZoom(Y),ne!==void 0&&K.setRoll(ne),se!==void 0&&K.setPitch(se),be!==void 0&&K.setBearing(be),C.apply(K)}this.transform.apply(C)}_fireMoveEvents(l){this.fire(new a.k("move",l)),this._zooming&&this.fire(new a.k("zoom",l)),this._rotating&&this.fire(new a.k("rotate",l)),this._pitching&&this.fire(new a.k("pitch",l)),this._rolling&&this.fire(new a.k("roll",l))}_afterEase(l,c){if(this._easeId&&c&&this._easeId===c)return;delete this._easeId;const C=this._zooming,M=this._rotating,K=this._pitching,z=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,C&&this.fire(new a.k("zoomend",l)),M&&this.fire(new a.k("rotateend",l)),K&&this.fire(new a.k("pitchend",l)),z&&this.fire(new a.k("rollend",l)),this.fire(new a.k("moveend",l))}flyTo(l,c){if(!l.essential&&S.prefersReducedMotion){const gn=a.M(l,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(gn,c)}this.stop(),l=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.c8},l);const C=this._getTransformForUpdate(),M=C.bearing,K=C.pitch,z=C.roll,Y=C.padding,ne="bearing"in l?this._normalizeBearing(l.bearing,M):M,se="pitch"in l?+l.pitch:K,be="roll"in l?this._normalizeBearing(l.roll,z):z,Oe="padding"in l?l.padding:C.padding,Te=a.P.convert(l.offset);let $e=C.centerPoint.add(Te);const He=C.screenPointToLocation($e),ct=this.cameraHelper.handleFlyTo(C,{bearing:ne,pitch:se,roll:be,padding:Oe,locationAtOffset:He,offsetAsPoint:Te,center:l.center,minZoom:l.minZoom,zoom:l.zoom});let st=l.curve;const dt=Math.max(C.width,C.height),gt=dt/ct.scaleOfZoom,St=ct.pixelPathLength;typeof ct.scaleOfMinZoom=="number"&&(st=Math.sqrt(dt/ct.scaleOfMinZoom/St*2));const It=st*st;function Kt(gn){const In=(gt*gt-dt*dt+(gn?-1:1)*It*It*St*St)/(2*(gn?gt:dt)*It*St);return Math.log(Math.sqrt(In*In+1)-In)}function zt(gn){return(Math.exp(gn)-Math.exp(-gn))/2}function Tt(gn){return(Math.exp(gn)+Math.exp(-gn))/2}const tn=Kt(!1);let Zt=function(gn){return Tt(tn)/Tt(tn+st*gn)},vn=function(gn){return dt*((Tt(tn)*(zt(In=tn+st*gn)/Tt(In))-zt(tn))/It)/St;var In},_n=(Kt(!0)-tn)/st;if(Math.abs(St)<2e-6||!isFinite(_n)){if(Math.abs(dt-gt)<1e-6)return this.easeTo(l,c);const gn=gt<dt?-1:1;_n=Math.abs(Math.log(gt/dt))/st,vn=()=>0,Zt=In=>Math.exp(gn*st*In)}return l.duration="duration"in l?+l.duration:1e3*_n/("screenSpeed"in l?+l.screenSpeed/st:+l.speed),l.maxDuration&&l.duration>l.maxDuration&&(l.duration=0),this._zooming=!0,this._rotating=M!==ne,this._pitching=se!==K,this._rolling=be!==z,this._padding=!C.isPaddingEqual(Oe),this._prepareEase(c,!1),this.terrain&&this._prepareElevation(ct.targetCenter),this._ease(gn=>{const In=gn*_n,Un=1/Zt(In),wn=vn(In);this._rotating&&C.setBearing(a.y.number(M,ne,gn)),this._pitching&&C.setPitch(a.y.number(K,se,gn)),this._rolling&&C.setRoll(a.y.number(z,be,gn)),this._padding&&(C.interpolatePadding(Y,Oe,gn),$e=C.centerPoint.add(Te)),ct.easeFunc(gn,Un,wn,$e),this.terrain&&!l.freezeElevation&&this._updateElevation(gn),this._applyUpdatedTransform(C),this._fireMoveEvents(c)},()=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(c)},l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(l,c){var C;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const M=this._onEaseEnd;delete this._onEaseEnd,M.call(this,c)}return l||(C=this.handlers)===null||C===void 0||C.stop(!1),this}_ease(l,c,C){C.animate===!1||C.duration===0?(l(1),c()):(this._easeStart=S.now(),this._easeOptions=C,this._onEaseFrame=l,this._onEaseEnd=c,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(l,c){l=a.aI(l,-180,180);const C=Math.abs(l-c);return Math.abs(l-360-c)<C&&(l-=360),Math.abs(l+360-c)<C&&(l+=360),l}queryTerrainElevation(l){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(l),this.transform.tileZoom):null}}const ZA={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class pu{constructor(l=ZA){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=c=>{!c||c.sourceDataType!=="metadata"&&c.sourceDataType!=="visibility"&&c.dataType!=="style"&&c.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=l}getDefaultPosition(){return"bottom-right"}onAdd(l){return this._map=l,this._compact=this.options.compact,this._container=B.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=B.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=B.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(){B.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._sanitizedAttributionHTML=void 0}_setElementTitle(l,c){const C=this._map._getUIString(`AttributionControl.${c}`);l.title=C,l.setAttribute("aria-label",C)}_updateAttributions(){if(!this._map.style)return;let l=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=l.concat(this.options.customAttribution.map(M=>typeof M!="string"?"":M)):typeof this.options.customAttribution=="string"&&l.push(this.options.customAttribution)),this._map.style.stylesheet){const M=this._map.style.stylesheet;this.styleOwner=M.owner,this.styleId=M.id}const c=this._map.style.sourceCaches;for(const M in c){const K=c[M];if(K.used||K.usedForTerrain){const z=K.getSource();z.attribution&&l.indexOf(z.attribution)<0&&l.push(z.attribution)}}l=l.filter(M=>String(M).trim()),l.sort((M,K)=>M.length-K.length),l=l.filter((M,K)=>{for(let z=K+1;z<l.length;z++)if(l[z].indexOf(M)>=0)return!1;return!0});const C=l.join(" | ");C!==this._sanitizedAttributionHTML&&(this._sanitizedAttributionHTML=B.sanitize(C),l.length?(this._innerContainer.innerHTML=this._sanitizedAttributionHTML,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class va{constructor(l={}){this._updateCompact=()=>{const c=this._container.children;if(c.length){const C=c[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&C.classList.add("maplibregl-compact"):C.classList.remove("maplibregl-compact")}},this.options=l}getDefaultPosition(){return"bottom-left"}onAdd(l){this._map=l,this._compact=this.options&&this.options.compact,this._container=B.create("div","maplibregl-ctrl");const c=B.create("a","maplibregl-ctrl-logo");return c.target="_blank",c.rel="noopener nofollow",c.href="https://maplibre.org/",c.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),c.setAttribute("rel","noopener nofollow"),this._container.appendChild(c),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){B.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class _f{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(l){const c=++this._id;return this._queue.push({callback:l,id:c,cancelled:!1}),c}remove(l){const c=this._currentlyRunning,C=c?this._queue.concat(c):this._queue;for(const M of C)if(M.id===l)return void(M.cancelled=!0)}run(l=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const c=this._currentlyRunning=this._queue;this._queue=[];for(const C of c)if(!C.cancelled&&(C.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Xl=a.aA([{name:"a_pos3d",type:"Int16",components:3}]);class Cf extends a.E{constructor(l){super(),this._lastTilesetChange=S.now(),this.sourceCache=l,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=l._source.tileSize*2**this.deltaZoom,l.usedForTerrain=!0,l.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(l,c){this.sourceCache.update(l,c),this._renderableTilesKeys=[];const C={};for(const M of qe(l,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:c,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))C[M.key]=!0,this._renderableTilesKeys.push(M.key),this._tiles[M.key]||(M.terrainRttPosMatrix32f=new Float64Array(16),a.bL(M.terrainRttPosMatrix32f,0,a.X,a.X,0,0,1),this._tiles[M.key]=new pe(M,this.tileSize),this._lastTilesetChange=S.now());for(const M in this._tiles)C[M]||delete this._tiles[M]}freeRtt(l){for(const c in this._tiles){const C=this._tiles[c];(!l||C.tileID.equals(l)||C.tileID.isChildOf(l)||l.isChildOf(C.tileID))&&(C.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(l=>this.getTileByID(l))}getTileByID(l){return this._tiles[l]}getTerrainCoords(l){const c={};for(const C of this._renderableTilesKeys){const M=this._tiles[C].tileID,K=l.clone(),z=a.a$();if(M.canonical.equals(l.canonical))a.bL(z,0,a.X,a.X,0,0,1);else if(M.canonical.isChildOf(l.canonical)){const Y=M.canonical.z-l.canonical.z,ne=M.canonical.x-(M.canonical.x>>Y<<Y),se=M.canonical.y-(M.canonical.y>>Y<<Y),be=a.X>>Y;a.bL(z,0,be,be,0,0,1),a.J(z,z,[-ne*be,-se*be,0])}else{if(!l.canonical.isChildOf(M.canonical))continue;{const Y=l.canonical.z-M.canonical.z,ne=l.canonical.x-(l.canonical.x>>Y<<Y),se=l.canonical.y-(l.canonical.y>>Y<<Y),be=a.X>>Y;a.bL(z,0,a.X,a.X,0,0,1),a.J(z,z,[ne*be,se*be,0]),a.K(z,z,[1/2**Y,1/2**Y,0])}}K.terrainRttPosMatrix32f=new Float32Array(z),c[C]=K}return c}getSourceTile(l,c){const C=this.sourceCache._source;let M=l.overscaledZ-this.deltaZoom;if(M>C.maxzoom&&(M=C.maxzoom),M<C.minzoom)return null;this._sourceTileCache[l.key]||(this._sourceTileCache[l.key]=l.scaledTo(M).key);let K=this.sourceCache.getTileByID(this._sourceTileCache[l.key]);if((!K||!K.dem)&&c)for(;M>=C.minzoom&&(!K||!K.dem);)K=this.sourceCache.getTileByID(l.scaledTo(M--).key);return K}anyTilesAfterTime(l=Date.now()){return this._lastTilesetChange>=l}}class mu{constructor(l,c,C){this._meshCache={},this.painter=l,this.sourceCache=new Cf(c),this.options=C,this.exaggeration=typeof C.exaggeration=="number"?C.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(l,c,C,M=a.X){var K;if(!(c>=0&&c<M&&C>=0&&C<M))return 0;const z=this.getTerrainData(l),Y=(K=z.tile)===null||K===void 0?void 0:K.dem;if(!Y)return 0;const ne=a.c9([],[c/M*a.X,C/M*a.X],z.u_terrain_matrix),se=[ne[0]*Y.dim,ne[1]*Y.dim],be=Math.floor(se[0]),Oe=Math.floor(se[1]),Te=se[0]-be,$e=se[1]-Oe;return Y.get(be,Oe)*(1-Te)*(1-$e)+Y.get(be+1,Oe)*Te*(1-$e)+Y.get(be,Oe+1)*(1-Te)*$e+Y.get(be+1,Oe+1)*Te*$e}getElevationForLngLatZoom(l,c){if(!a.ca(c,l.wrap()))return 0;const{tileID:C,mercatorX:M,mercatorY:K}=this._getOverscaledTileIDFromLngLatZoom(l,c);return this.getElevation(C,M%a.X,K%a.X,a.X)}getElevation(l,c,C,M=a.X){return this.getDEMElevation(l,c,C,M)*this.exaggeration}getTerrainData(l){if(!this._emptyDemTexture){const M=this.painter.context,K=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new ae(M,K,M.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new ae(M,new a.R({width:1,height:1}),M.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(M.gl.NEAREST,M.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.aq([])}const c=this.sourceCache.getSourceTile(l,!0);if(c&&c.dem&&(!c.demTexture||c.needsTerrainPrepare)){const M=this.painter.context;c.demTexture=this.painter.getTileTexture(c.dem.stride),c.demTexture?c.demTexture.update(c.dem.getPixels(),{premultiply:!1}):c.demTexture=new ae(M,c.dem.getPixels(),M.gl.RGBA,{premultiply:!1}),c.demTexture.bind(M.gl.NEAREST,M.gl.CLAMP_TO_EDGE),c.needsTerrainPrepare=!1}const C=c&&c+c.tileID.key+l.key;if(C&&!this._demMatrixCache[C]){const M=this.sourceCache.sourceCache._source.maxzoom;let K=l.canonical.z-c.tileID.canonical.z;l.overscaledZ>l.canonical.z&&(l.canonical.z>=M?K=l.canonical.z-M:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const z=l.canonical.x-(l.canonical.x>>K<<K),Y=l.canonical.y-(l.canonical.y>>K<<K),ne=a.cb(new Float64Array(16),[1/(a.X<<K),1/(a.X<<K),0]);a.J(ne,ne,[z*a.X,Y*a.X,0]),this._demMatrixCache[l.key]={matrix:ne,coord:l}}return{u_depth:2,u_terrain:3,u_terrain_dim:c&&c.dem&&c.dem.dim||1,u_terrain_matrix:C?this._demMatrixCache[l.key].matrix:this._emptyDemMatrix,u_terrain_unpack:c&&c.dem&&c.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(c&&c.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:c}}getFramebuffer(l){const c=this.painter,C=c.width/devicePixelRatio,M=c.height/devicePixelRatio;return!this._fbo||this._fbo.width===C&&this._fbo.height===M||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new ae(c.context,{width:C,height:M,data:null},c.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(c.context.gl.NEAREST,c.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new ae(c.context,{width:C,height:M,data:null},c.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(c.context.gl.NEAREST,c.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=c.context.createFramebuffer(C,M,!0,!1),this._fbo.depthAttachment.set(c.context.createRenderbuffer(c.context.gl.DEPTH_COMPONENT16,C,M))),this._fbo.colorAttachment.set(l==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const l=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const c=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let K=0,z=0;K<this._coordsTextureSize;K++)for(let Y=0;Y<this._coordsTextureSize;Y++,z+=4)c[z+0]=255&Y,c[z+1]=255&K,c[z+2]=Y>>8<<4|K>>8,c[z+3]=0;const C=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(c.buffer)),M=new ae(l,C,l.gl.RGBA,{premultiply:!1});return M.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._coordsTexture=M,M}pointCoordinate(l){this.painter.maybeDrawDepthAndCoords(!0);const c=new Uint8Array(4),C=this.painter.context,M=C.gl,K=Math.round(l.x*this.painter.pixelRatio/devicePixelRatio),z=Math.round(l.y*this.painter.pixelRatio/devicePixelRatio),Y=Math.round(this.painter.height/devicePixelRatio);C.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),M.readPixels(K,Y-z-1,1,1,M.RGBA,M.UNSIGNED_BYTE,c),C.bindFramebuffer.set(null);const ne=c[0]+(c[2]>>4<<8),se=c[1]+((15&c[2])<<8),be=this.coordsIndex[255-c[3]],Oe=be&&this.sourceCache.getTileByID(be);if(!Oe)return null;const Te=this._coordsTextureSize,$e=(1<<Oe.tileID.canonical.z)*Te;return new a.Y((Oe.tileID.canonical.x*Te+ne)/$e+Oe.tileID.wrap,(Oe.tileID.canonical.y*Te+se)/$e,this.getElevation(Oe.tileID,ne,se,Te))}depthAtPoint(l){const c=new Uint8Array(4),C=this.painter.context,M=C.gl;return C.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),M.readPixels(l.x,this.painter.height/devicePixelRatio-l.y-1,1,1,M.RGBA,M.UNSIGNED_BYTE,c),C.bindFramebuffer.set(null),(c[0]/16777216+c[1]/65536+c[2]/256+c[3])/256}getTerrainMesh(l){var c;const C=((c=this.painter.style.projection)===null||c===void 0?void 0:c.transitionState)>0,M=C&&l.canonical.y===0,K=C&&l.canonical.y===(1<<l.canonical.z)-1,z=`m_${M?"n":""}_${K?"s":""}`;if(this._meshCache[z])return this._meshCache[z];const Y=this.painter.context,ne=new a.cc,se=new a.aE,be=this.meshSize,Oe=a.X/be,Te=be*be;for(let Tt=0;Tt<=be;Tt++)for(let tn=0;tn<=be;tn++)ne.emplaceBack(tn*Oe,Tt*Oe,0);for(let Tt=0;Tt<Te;Tt+=be+1)for(let tn=0;tn<be;tn++)se.emplaceBack(tn+Tt,be+tn+Tt+1,be+tn+Tt+2),se.emplaceBack(tn+Tt,be+tn+Tt+2,tn+Tt+1);const $e=ne.length,He=$e+(be+1),ct=(be+1)*be,st=M?a.b6:0,dt=M?0:1,gt=K?a.b7:a.X,St=K?0:1;for(let Tt=0;Tt<=be;Tt++)ne.emplaceBack(Tt*Oe,st,dt);for(let Tt=0;Tt<=be;Tt++)ne.emplaceBack(Tt*Oe,gt,St);for(let Tt=0;Tt<be;Tt++)se.emplaceBack(ct+Tt,He+Tt,He+Tt+1),se.emplaceBack(ct+Tt,He+Tt+1,ct+Tt+1),se.emplaceBack(0+Tt,$e+Tt+1,$e+Tt),se.emplaceBack(0+Tt,0+Tt+1,$e+Tt+1);const It=ne.length,Kt=It+2*(be+1);for(const Tt of[0,1])for(let tn=0;tn<=be;tn++)for(const Zt of[0,1])ne.emplaceBack(Tt*a.X,tn*Oe,Zt);for(let Tt=0;Tt<2*be;Tt+=2)se.emplaceBack(It+Tt,It+Tt+1,It+Tt+3),se.emplaceBack(It+Tt,It+Tt+3,It+Tt+2),se.emplaceBack(Kt+Tt,Kt+Tt+3,Kt+Tt+1),se.emplaceBack(Kt+Tt,Kt+Tt+2,Kt+Tt+3);const zt=new rs(Y.createVertexBuffer(ne,Xl.members),Y.createIndexBuffer(se),a.aD.simpleSegment(0,0,ne.length,se.length));return this._meshCache[z]=zt,zt}getMeshFrameDelta(l){return 2*Math.PI*a.bo/Math.pow(2,Math.max(l,0))/5}getMinTileElevationForLngLatZoom(l,c){var C;const{tileID:M}=this._getOverscaledTileIDFromLngLatZoom(l,c);return(C=this.getMinMaxElevation(M).minElevation)!==null&&C!==void 0?C:0}getMinMaxElevation(l){const c=this.getTerrainData(l).tile,C={minElevation:null,maxElevation:null};return c&&c.dem&&(C.minElevation=c.dem.min*this.exaggeration,C.maxElevation=c.dem.max*this.exaggeration),C}_getOverscaledTileIDFromLngLatZoom(l,c){const C=a.Y.fromLngLat(l.wrap()),M=(1<<c)*a.X,K=C.x*M,z=C.y*M,Y=Math.floor(K/a.X),ne=Math.floor(z/a.X);return{tileID:new a.S(c,0,c,Y,ne),mercatorX:K,mercatorY:z}}}class To{constructor(l,c,C){this._context=l,this._size=c,this._tileSize=C,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const l of this._objects)l.texture.destroy(),l.fbo.destroy()}_createObject(l){const c=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),C=new ae(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return C.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),c.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),c.colorAttachment.set(C.texture),{id:l,fbo:c,texture:C,stamp:-1,inUse:!1}}getObjectForId(l){return this._objects[l]}useObject(l){l.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(c=>l.id!==c),this._recentlyUsed.push(l.id)}stampObject(l){l.stamp=++this._stamp}getOrCreateFreeObject(){for(const c of this._recentlyUsed)if(!this._objects[c].inUse)return this._objects[c];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const l=this._createObject(this._objects.length);return this._objects.push(l),l}freeObject(l){l.inUse=!1}freeAllObjects(){for(const l of this._objects)this.freeObject(l)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(l=>!l.inUse)===!1}}const Oa={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Yd{constructor(l,c){this.painter=l,this.terrain=c,this.pool=new To(l.context,30,c.sourceCache.tileSize*c.qualityFactor)}destruct(){this.pool.destruct()}getTexture(l){return this.pool.getObjectForId(l.rtt[this._stacks.length-1].id).texture}prepareForRender(l,c){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=l._order.filter(C=>!l._layers[C].isHidden(c)),this._coordsAscending={};for(const C in l.sourceCaches){this._coordsAscending[C]={};const M=l.sourceCaches[C].getVisibleCoordinates();for(const K of M){const z=this.terrain.sourceCache.getTerrainCoords(K);for(const Y in z)this._coordsAscending[C][Y]||(this._coordsAscending[C][Y]=[]),this._coordsAscending[C][Y].push(z[Y])}}this._coordsAscendingStr={};for(const C of l._order){const M=l._layers[C],K=M.source;if(Oa[M.type]&&!this._coordsAscendingStr[K]){this._coordsAscendingStr[K]={};for(const z in this._coordsAscending[K])this._coordsAscendingStr[K][z]=this._coordsAscending[K][z].map(Y=>Y.key).sort().join()}}for(const C of this._renderableTiles)for(const M in this._coordsAscendingStr){const K=this._coordsAscendingStr[M][C.tileID.key];K&&K!==C.rttCoords[M]&&(C.rtt=[])}}renderLayer(l,c){if(l.isHidden(this.painter.transform.zoom))return!1;const C=Object.assign(Object.assign({},c),{isRenderingToTexture:!0}),M=l.type,K=this.painter,z=this._renderableLayerIds[this._renderableLayerIds.length-1]===l.id;if(Oa[M]&&(this._prevType&&Oa[this._prevType]||this._stacks.push([]),this._prevType=M,this._stacks[this._stacks.length-1].push(l.id),!z))return!0;if(Oa[this._prevType]||Oa[M]&&z){this._prevType=M;const Y=this._stacks.length-1,ne=this._stacks[Y]||[];for(const se of this._renderableTiles){if(this.pool.isFull()&&(Tu(this.painter,this.terrain,this._rttTiles,C),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(se),se.rtt[Y]){const Oe=this.pool.getObjectForId(se.rtt[Y].id);if(Oe.stamp===se.rtt[Y].stamp){this.pool.useObject(Oe);continue}}const be=this.pool.getOrCreateFreeObject();this.pool.useObject(be),this.pool.stampObject(be),se.rtt[Y]={id:be.id,stamp:be.stamp},K.context.bindFramebuffer.set(be.fbo.framebuffer),K.context.clear({color:a.b4.transparent,stencil:0}),K.currentStencilSource=void 0;for(let Oe=0;Oe<ne.length;Oe++){const Te=K.style._layers[ne[Oe]],$e=Te.source?this._coordsAscending[Te.source][se.tileID.key]:[se.tileID];K.context.viewport.set([0,0,be.fbo.width,be.fbo.height]),K._renderTileClippingMasks(Te,$e,!0),K.renderLayer(K,K.style.sourceCaches[Te.source],Te,$e,C),Te.source&&(se.rttCoords[Te.source]=this._coordsAscendingStr[Te.source][se.tileID.key])}}return Tu(this.painter,this.terrain,this._rttTiles,C),this._rttTiles=[],this.pool.freeAllObjects(),Oa[M]}return!1}}const CA={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},$d=f,bA={hash:!1,interactive:!0,bearingSnap:7,attributionControl:ZA,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Na={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class yc{constructor(l,c,C=!1){this.mousedown=K=>{this.startMove(K,B.mousePos(this.element,K)),B.addEventListener(window,"mousemove",this.mousemove),B.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=K=>{this.move(K,B.mousePos(this.element,K))},this.mouseup=K=>{this._rotatePitchHanlder.dragEnd(K),this.offTemp()},this.touchstart=K=>{K.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=B.touchPos(this.element,K.targetTouches)[0],this.startMove(K,this._startPos),B.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),B.addEventListener(window,"touchend",this.touchend))},this.touchmove=K=>{K.targetTouches.length!==1?this.reset():(this._lastPos=B.touchPos(this.element,K.targetTouches)[0],this.move(K,this._lastPos))},this.touchend=K=>{K.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._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=c;const M=new ud;this._rotatePitchHanlder=new ys({clickTolerance:3,move:(K,z)=>{const Y=c.getBoundingClientRect(),ne=new a.P((Y.bottom-Y.top)/2,(Y.right-Y.left)/2);return{bearingDelta:a.c7(new a.P(K.x,z.y),z,ne),pitchDelta:C?-.5*(z.y-K.y):void 0}},moveStateManager:M,enable:!0,assignEvents:()=>{}}),this.map=l,B.addEventListener(c,"mousedown",this.mousedown),B.addEventListener(c,"touchstart",this.touchstart,{passive:!1}),B.addEventListener(c,"touchcancel",this.reset)}startMove(l,c){this._rotatePitchHanlder.dragStart(l,c),B.disableDrag()}move(l,c){const C=this.map,{bearingDelta:M,pitchDelta:K}=this._rotatePitchHanlder.dragMove(l,c)||{};M&&C.setBearing(C.getBearing()+M),K&&C.setPitch(C.getPitch()+K)}off(){const l=this.element;B.removeEventListener(l,"mousedown",this.mousedown),B.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),B.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),B.removeEventListener(window,"touchend",this.touchend),B.removeEventListener(l,"touchcancel",this.reset),this.offTemp()}offTemp(){B.enableDrag(),B.removeEventListener(window,"mousemove",this.mousemove),B.removeEventListener(window,"mouseup",this.mouseup),B.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),B.removeEventListener(window,"touchend",this.touchend)}}let jl;function ol(k,l,c){const C=new a.N(k.lng,k.lat);if(k=new a.N(k.lng,k.lat),l){const M=new a.N(k.lng-360,k.lat),K=new a.N(k.lng+360,k.lat),z=c.locationToScreenPoint(k).distSqr(l);c.locationToScreenPoint(M).distSqr(l)<z?k=M:c.locationToScreenPoint(K).distSqr(l)<z&&(k=K)}for(;Math.abs(k.lng-c.center.lng)>180;){const M=c.locationToScreenPoint(k);if(M.x>=0&&M.y>=0&&M.x<=c.width&&M.y<=c.height)break;k.lng>c.center.lng?k.lng-=360:k.lng+=360}return k.lng!==C.lng&&c.isPointOnMapSurface(c.locationToScreenPoint(k))?k:C}const Fu={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 vc(k,l,c){const C=k.classList;for(const M in Fu)C.remove(`maplibregl-${c}-anchor-${M}`);C.add(`maplibregl-${c}-anchor-${l}`)}class gu extends a.E{constructor(l){if(super(),this._onKeyPress=c=>{const C=c.code,M=c.charCode||c.keyCode;C!=="Space"&&C!=="Enter"&&M!==32&&M!==13||this.togglePopup()},this._onMapClick=c=>{const C=c.originalEvent.target,M=this._element;this._popup&&(C===M||M.contains(C))&&this.togglePopup()},this._update=c=>{var C;if(!this._map)return;const M=this._map.loaded()&&!this._map.isMoving();((c==null?void 0:c.type)==="terrain"||(c==null?void 0:c.type)==="render"&&!M)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?ol(this._lngLat,this._flatPos,this._map.transform):(C=this._lngLat)===null||C===void 0?void 0:C.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(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 z="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?z="rotateX(0deg)":this._pitchAlignment==="map"&&(z=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||c&&c.type!=="moveend"||(this._pos=this._pos.round()),B.setTransform(this._element,`${Fu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${z} ${K}`),S.frameAsync(new AbortController).then(()=>{this._updateOpacity(c&&c.type==="moveend")}).catch(()=>{})},this._onMove=c=>{if(!this._isDragging){const C=this._clickTolerance||this._map._clickTolerance;this._isDragging=c.point.dist(this._pointerdownPos)>=C}this._isDragging&&(this._pos=c.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 a.k("dragstart"))),this.fire(new a.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 a.k("dragend")),this._state="inactive"},this._addDragHandler=c=>{this._element.contains(c.originalEvent.target)&&(c.preventDefault(),this._positionDelta=c.point.sub(this._pos).add(this._offset),this._pointerdownPos=c.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=l&&l.anchor||"center",this._color=l&&l.color||"#3FB1CE",this._scale=l&&l.scale||1,this._draggable=l&&l.draggable||!1,this._clickTolerance=l&&l.clickTolerance||0,this._subpixelPositioning=l&&l.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=l&&l.rotation||0,this._rotationAlignment=l&&l.rotationAlignment||"auto",this._pitchAlignment=l&&l.pitchAlignment&&l.pitchAlignment!=="auto"?l.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(l==null?void 0:l.opacity,l==null?void 0:l.opacityWhenCovered),l&&l.element)this._element=l.element,this._offset=a.P.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=B.create("div");const c=B.createNS("http://www.w3.org/2000/svg","svg"),C=41,M=27;c.setAttributeNS(null,"display","block"),c.setAttributeNS(null,"height",`${C}px`),c.setAttributeNS(null,"width",`${M}px`),c.setAttributeNS(null,"viewBox",`0 0 ${M} ${C}`);const K=B.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 z=B.createNS("http://www.w3.org/2000/svg","g");z.setAttributeNS(null,"fill-rule","nonzero");const Y=B.createNS("http://www.w3.org/2000/svg","g");Y.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Y.setAttributeNS(null,"fill","#000000");const ne=[{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 dt of ne){const gt=B.createNS("http://www.w3.org/2000/svg","ellipse");gt.setAttributeNS(null,"opacity","0.04"),gt.setAttributeNS(null,"cx","10.5"),gt.setAttributeNS(null,"cy","5.80029008"),gt.setAttributeNS(null,"rx",dt.rx),gt.setAttributeNS(null,"ry",dt.ry),Y.appendChild(gt)}const se=B.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"fill",this._color);const be=B.createNS("http://www.w3.org/2000/svg","path");be.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"),se.appendChild(be);const Oe=B.createNS("http://www.w3.org/2000/svg","g");Oe.setAttributeNS(null,"opacity","0.25"),Oe.setAttributeNS(null,"fill","#000000");const Te=B.createNS("http://www.w3.org/2000/svg","path");Te.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"),Oe.appendChild(Te);const $e=B.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"transform","translate(6.0, 7.0)"),$e.setAttributeNS(null,"fill","#FFFFFF");const He=B.createNS("http://www.w3.org/2000/svg","g");He.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ct=B.createNS("http://www.w3.org/2000/svg","circle");ct.setAttributeNS(null,"fill","#000000"),ct.setAttributeNS(null,"opacity","0.25"),ct.setAttributeNS(null,"cx","5.5"),ct.setAttributeNS(null,"cy","5.5"),ct.setAttributeNS(null,"r","5.4999962");const st=B.createNS("http://www.w3.org/2000/svg","circle");st.setAttributeNS(null,"fill","#FFFFFF"),st.setAttributeNS(null,"cx","5.5"),st.setAttributeNS(null,"cy","5.5"),st.setAttributeNS(null,"r","5.4999962"),He.appendChild(ct),He.appendChild(st),z.appendChild(Y),z.appendChild(se),z.appendChild(Oe),z.appendChild($e),z.appendChild(He),c.appendChild(z),c.setAttributeNS(null,"height",C*this._scale+"px"),c.setAttributeNS(null,"width",M*this._scale+"px"),this._element.appendChild(c),this._offset=a.P.convert(l&&l.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",c=>{c.preventDefault()}),this._element.addEventListener("mousedown",c=>{c.preventDefault()}),vc(this._element,this._anchor,"marker"),l&&l.className)for(const c of l.className.split(" "))this._element.classList.add(c);this._popup=null}addTo(l){return this.remove(),this._map=l,this._element.setAttribute("aria-label",l._getUIString("Marker.Title")),l.getCanvasContainer().appendChild(this._element),l.on("move",this._update),l.on("moveend",this._update),l.on("terrain",this._update),l.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),B.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=a.N.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(l){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),l){if(!("offset"in l.options)){const M=Math.abs(13.5)/Math.SQRT2;l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[M,-1*(38.1-13.5+M)],"bottom-right":[-M,-1*(38.1-13.5+M)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=l,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(l){return this._subpixelPositioning=l,this}getPopup(){return this._popup}togglePopup(){const l=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:l?(l.isOpen()?l.remove():(l.setLngLat(this._lngLat),l.addTo(this._map)),this):this}_updateOpacity(l=!1){var c,C;if(!(!((c=this._map)===null||c===void 0)&&c.terrain)){const Oe=this._map.transform.isLocationOccluded(this._lngLat)?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Oe&&(this._element.style.opacity=Oe))}if(l)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const M=this._map,K=M.terrain.depthAtPoint(this._pos),z=M.terrain.getElevationForLngLatZoom(this._lngLat,M.transform.tileZoom);if(M.transform.lngLatToCameraDepth(this._lngLat,z)-K<.006)return void(this._element.style.opacity=this._opacity);const Y=-this._offset.y/M.transform.pixelsPerMeter,ne=Math.sin(M.getPitch()*Math.PI/180)*Y,se=M.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),be=M.transform.lngLatToCameraDepth(this._lngLat,z+ne)-se>.006;!((C=this._popup)===null||C===void 0)&&C.isOpen()&&be&&this._popup.remove(),this._element.style.opacity=be?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(l){return this._offset=a.P.convert(l),this._update(),this}addClassName(l){this._element.classList.add(l)}removeClassName(l){this._element.classList.remove(l)}toggleClassName(l){return this._element.classList.toggle(l)}setDraggable(l){return this._draggable=!!l,this._map&&(l?(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(l){return this._rotation=l||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(l){return this._rotationAlignment=l||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(l){return this._pitchAlignment=l&&l!=="auto"?l:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(l,c){return l===void 0&&c===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),l!==void 0&&(this._opacity=l),c!==void 0&&(this._opacityWhenCovered=c),this._map&&this._updateOpacity(!0),this}}const vs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Za=0,Jl=!1;const eu={maxWidth:100,unit:"metric"};function aA(k,l,c){const C=c&&c.maxWidth||100,M=k._container.clientHeight/2,K=k._container.clientWidth/2,z=k.unproject([K-C/2,M]),Y=k.unproject([K+C/2,M]),ne=Math.round(k.project(Y).x-k.project(z).x),se=Math.min(C,ne,k._container.clientWidth),be=z.distanceTo(Y);if(c&&c.unit==="imperial"){const Oe=3.2808*be;Oe>5280?yu(l,se,Oe/5280,k._getUIString("ScaleControl.Miles")):yu(l,se,Oe,k._getUIString("ScaleControl.Feet"))}else c&&c.unit==="nautical"?yu(l,se,be/1852,k._getUIString("ScaleControl.NauticalMiles")):be>=1e3?yu(l,se,be/1e3,k._getUIString("ScaleControl.Kilometers")):yu(l,se,be,k._getUIString("ScaleControl.Meters"))}function yu(k,l,c,C){const M=function(K){const z=Math.pow(10,`${Math.floor(K)}`.length-1);let Y=K/z;return Y=Y>=10?10:Y>=5?5:Y>=3?3:Y>=2?2:Y>=1?1:function(ne){const se=Math.pow(10,Math.ceil(-Math.log(ne)/Math.LN10));return Math.round(ne*se)/se}(Y),z*Y}(c);k.style.width=l*(M/c)+"px",k.innerHTML=`${M} ${C}`}const _c={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Uu=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function zl(k){if(k){if(typeof k=="number"){const l=Math.round(Math.abs(k)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,k),"top-left":new a.P(l,l),"top-right":new a.P(-l,l),bottom:new a.P(0,-k),"bottom-left":new a.P(l,-l),"bottom-right":new a.P(-l,-l),left:new a.P(k,0),right:new a.P(-k,0)}}if(k instanceof a.P||Array.isArray(k)){const l=a.P.convert(k);return{center:l,top:l,"top-left":l,"top-right":l,bottom:l,"bottom-left":l,"bottom-right":l,left:l,right:l}}return{center:a.P.convert(k.center||[0,0]),top:a.P.convert(k.top||[0,0]),"top-left":a.P.convert(k["top-left"]||[0,0]),"top-right":a.P.convert(k["top-right"]||[0,0]),bottom:a.P.convert(k.bottom||[0,0]),"bottom-left":a.P.convert(k["bottom-left"]||[0,0]),"bottom-right":a.P.convert(k["bottom-right"]||[0,0]),left:a.P.convert(k.left||[0,0]),right:a.P.convert(k.right||[0,0])}}return zl(new a.P(0,0))}const fd=f;s.AJAXError=a.cg,s.Event=a.k,s.Evented=a.E,s.LngLat=a.N,s.MercatorCoordinate=a.Y,s.Point=a.P,s.addProtocol=a.ch,s.config=a.a,s.removeProtocol=a.ci,s.AttributionControl=pu,s.BoxZoomHandler=za,s.CanvasSource=br,s.CooperativeGesturesHandler=gc,s.DoubleClickZoomHandler=Ho,s.DragPanHandler=mc,s.DragRotateHandler=qd,s.EdgeInsets=ja,s.FullscreenControl=class extends a.E{constructor(k={}){super(),this._onFullscreenChange=()=>{var l;let c=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((l=c==null?void 0:c.shadowRoot)===null||l===void 0)&&l.fullscreenElement;)c=c.shadowRoot.fullscreenElement;c===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,k&&k.container&&(k.container instanceof HTMLElement?this._container=k.container:a.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(k){return this._map=k,this._container||(this._container=this._map.getContainer()),this._controlContainer=B.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){B.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const k=this._fullscreenButton=B.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);B.create("span","maplibregl-ctrl-icon",k).setAttribute("aria-hidden","true"),k.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const k=this._getTitle();this._fullscreenButton.setAttribute("aria-label",k),this._fullscreenButton.title=k}_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 a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.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()}},s.GeoJSONSource=Bn,s.GeolocateControl=class extends a.E{constructor(k){super(),this._onSuccess=l=>{if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",l)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=l,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(l),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(l),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",l)),this._finish()}},this._updateCamera=l=>{const c=new a.N(l.coords.longitude,l.coords.latitude),C=l.coords.accuracy,M=this._map.getBearing(),K=a.e({bearing:M},this.options.fitBoundsOptions),z=Lt.fromLngLat(c,C);this._map.fitBounds(z,K,{geolocateSource:!0})},this._updateMarker=l=>{if(l){const c=new a.N(l.coords.longitude,l.coords.latitude);this._accuracyCircleMarker.setLngLat(c).addTo(this._map),this._userLocationDotMarker.setLngLat(c).addTo(this._map),this._accuracy=l.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=l=>{if(this._map){if(this.options.trackUserLocation)if(l.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 c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(l.code===3&&Jl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",l)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=B.create("button","maplibregl-ctrl-geolocate",this._container),B.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=l=>{if(this._map){if(l===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");const c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}else{const c=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=B.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new gu({element:this._dotElement}),this._circleElement=B.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new gu({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",c=>{c.geolocateSource||this._watchState!=="ACTIVE_LOCK"||c.originalEvent&&c.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 a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},vs,k)}onAdd(k){return this._map=k,this._container=B.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(l=!1){if(jl!==void 0&&!l)return jl;if(window.navigator.permissions===void 0)return jl=!!window.navigator.geolocation,jl;try{jl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{jl=!!window.navigator.geolocation}return jl})}().then(l=>this._finishSetupUI(l)),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(),B.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Za=0,Jl=!1}_isOutOfMapMaxBounds(k){const l=this._map.getMaxBounds(),c=k.coords;return l&&(c.longitude<l.getWest()||c.longitude>l.getEast()||c.latitude<l.getSouth()||c.latitude>l.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 k=this._map.getBounds(),l=k.getSouthEast(),c=k.getNorthEast(),C=l.distanceTo(c),M=Math.ceil(this._accuracy/(C/this._map._container.clientHeight)*2);this._circleElement.style.width=`${M}px`,this._circleElement.style.height=`${M}px`}trigger(){if(!this._setup)return a.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 a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Za--,Jl=!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 a.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 a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let k;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Za++,Za>1?(k={maximumAge:6e5,timeout:0},Jl=!0):(k=this.options.positionOptions,Jl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,k)}}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)}},s.GlobeControl=class{constructor(){this._toggleProjection=()=>{var k;const l=(k=this._map.getProjection())===null||k===void 0?void 0:k.type;this._map.setProjection(l!=="mercator"&&l?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var k;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((k=this._map.getProjection())===null||k===void 0?void 0:k.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(k){return this._map=k,this._container=B.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=B.create("button","maplibregl-ctrl-globe",this._container),B.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){B.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},s.Hash=$A,s.ImageSource=ar,s.KeyboardHandler=bo,s.LngLatBounds=Lt,s.LogoControl=va,s.Map=class extends Lu{constructor(k){var l,c;a.cd.mark(a.ce.create);const C=Object.assign(Object.assign(Object.assign({},bA),k),{canvasContextAttributes:Object.assign(Object.assign({},bA.canvasContextAttributes),k.canvasContextAttributes)});if(C.minZoom!=null&&C.maxZoom!=null&&C.minZoom>C.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(C.minPitch!=null&&C.maxPitch!=null&&C.minPitch>C.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(C.minPitch!=null&&C.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(C.maxPitch!=null&&C.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const M=new xa,K=new eA;if(C.minZoom!==void 0&&M.setMinZoom(C.minZoom),C.maxZoom!==void 0&&M.setMaxZoom(C.maxZoom),C.minPitch!==void 0&&M.setMinPitch(C.minPitch),C.maxPitch!==void 0&&M.setMaxPitch(C.maxPitch),C.renderWorldCopies!==void 0&&M.setRenderWorldCopies(C.renderWorldCopies),super(M,K,{bearingSnap:C.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new _f,this._controls=[],this._mapId=a.a1(),this._contextLost=Y=>{Y.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:Y}))},this._contextRestored=Y=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:Y}))},this._onMapScroll=Y=>{if(Y.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=C.interactive,this._maxTileCacheSize=C.maxTileCacheSize,this._maxTileCacheZoomLevels=C.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},C.canvasContextAttributes),this._trackResize=C.trackResize===!0,this._bearingSnap=C.bearingSnap,this._centerClampedToGround=C.centerClampedToGround,this._refreshExpiredTiles=C.refreshExpiredTiles===!0,this._fadeDuration=C.fadeDuration,this._crossSourceCollisions=C.crossSourceCollisions===!0,this._collectResourceTiming=C.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},CA),C.locale),this._clickTolerance=C.clickTolerance,this._overridePixelRatio=C.pixelRatio,this._maxCanvasSize=C.maxCanvasSize,this.transformCameraUpdate=C.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=C.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=J.addThrottleControl(()=>this.isMoving()),this._requestManager=new $(C.transformRequest),typeof C.container=="string"){if(this._container=document.getElementById(C.container),!this._container)throw new Error(`Container '${C.container}' not found.`)}else{if(!(C.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=C.container}if(C.maxBounds&&this.setMaxBounds(C.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 Y=!1;const ne=Wd(se=>{this._trackResize&&!this._removed&&(this.resize(se),this.redraw())},50);this._resizeObserver=new ResizeObserver(se=>{Y?ne(se):Y=!0}),this._resizeObserver.observe(this._container)}this.handlers=new qr(this,C),this._hash=C.hash&&new $A(typeof C.hash=="string"&&C.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:C.center,elevation:C.elevation,zoom:C.zoom,bearing:C.bearing,pitch:C.pitch,roll:C.roll}),C.bounds&&(this.resize(),this.fitBounds(C.bounds,a.e({},C.fitBoundsOptions,{duration:0}))));const z=typeof C.style=="string"||((c=(l=C.style)===null||l===void 0?void 0:l.projection)===null||c===void 0?void 0:c.type)!=="globe";this.resize(null,z),this._localIdeographFontFamily=C.localIdeographFontFamily,this._validateStyle=C.validateStyle,C.style&&this.setStyle(C.style,{localIdeographFontFamily:C.localIdeographFontFamily}),C.attributionControl&&this.addControl(new pu(typeof C.attributionControl=="boolean"?void 0:C.attributionControl)),C.maplibreLogo&&this.addControl(new va,C.logoPosition),this.on("style.load",()=>{if(z||this._resizeTransform(),this.transform.unmodified){const Y=a.M(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Y)}}),this.on("data",Y=>{this._update(Y.dataType==="style"),this.fire(new a.k(`${Y.dataType}data`,Y))}),this.on("dataloading",Y=>{this.fire(new a.k(`${Y.dataType}dataloading`,Y))}),this.on("dataabort",Y=>{this.fire(new a.k("sourcedataabort",Y))})}_getMapId(){return this._mapId}addControl(k,l){if(l===void 0&&(l=k.getDefaultPosition?k.getDefaultPosition():"top-right"),!k||!k.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const c=k.onAdd(this);this._controls.push(k);const C=this._controlPositions[l];return l.indexOf("bottom")!==-1?C.insertBefore(c,C.firstChild):C.appendChild(c),this}removeControl(k){if(!k||!k.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const l=this._controls.indexOf(k);return l>-1&&this._controls.splice(l,1),k.onRemove(this),this}hasControl(k){return this._controls.indexOf(k)>-1}calculateCameraOptionsFromTo(k,l,c,C){return C==null&&this.terrain&&(C=this.terrain.getElevationForLngLatZoom(c,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(k,l,c,C)}resize(k,l=!0){const[c,C]=this._containerDimensions(),M=this._getClampedPixelRatio(c,C);if(this._resizeCanvas(c,C,M),this.painter.resize(c,C,M),this.painter.overLimit()){const z=this.painter.context.gl;this._maxCanvasSize=[z.drawingBufferWidth,z.drawingBufferHeight];const Y=this._getClampedPixelRatio(c,C);this._resizeCanvas(c,C,Y),this.painter.resize(c,C,Y)}this._resizeTransform(l);const K=!this._moving;return K&&(this.stop(),this.fire(new a.k("movestart",k)).fire(new a.k("move",k))),this.fire(new a.k("resize",k)),K&&this.fire(new a.k("moveend",k)),this}_resizeTransform(k=!0){var l;const[c,C]=this._containerDimensions();this.transform.resize(c,C,k),(l=this._requestedCameraState)===null||l===void 0||l.resize(c,C,k)}_getClampedPixelRatio(k,l){const{0:c,1:C}=this._maxCanvasSize,M=this.getPixelRatio(),K=k*M,z=l*M;return Math.min(K>c?c/K:1,z>C?C/z:1)*M}getPixelRatio(){var k;return(k=this._overridePixelRatio)!==null&&k!==void 0?k:devicePixelRatio}setPixelRatio(k){this._overridePixelRatio=k,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(k){return this.transform.setMaxBounds(Lt.convert(k)),this._update()}setMinZoom(k){if((k=k??-2)>=-2&&k<=this.transform.maxZoom)return this.transform.setMinZoom(k),this._update(),this.getZoom()<k&&this.setZoom(k),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(k){if((k=k??22)>=this.transform.minZoom)return this.transform.setMaxZoom(k),this._update(),this.getZoom()>k&&this.setZoom(k),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(k){if((k=k??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(k>=0&&k<=this.transform.maxPitch)return this.transform.setMinPitch(k),this._update(),this.getPitch()<k&&this.setPitch(k),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(k){if((k=k??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(k>=this.transform.minPitch)return this.transform.setMaxPitch(k),this._update(),this.getPitch()>k&&this.setPitch(k),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(k){return this.transform.setRenderWorldCopies(k),this._update()}project(k){return this.transform.locationToScreenPoint(a.N.convert(k),this.style&&this.terrain)}unproject(k){return this.transform.screenPointToLocation(a.P.convert(k),this.terrain)}isMoving(){var k;return this._moving||((k=this.handlers)===null||k===void 0?void 0:k.isMoving())}isZooming(){var k;return this._zooming||((k=this.handlers)===null||k===void 0?void 0:k.isZooming())}isRotating(){var k;return this._rotating||((k=this.handlers)===null||k===void 0?void 0:k.isRotating())}_createDelegatedListener(k,l,c){if(k==="mouseenter"||k==="mouseover"){let C=!1;return{layers:l,listener:c,delegates:{mousemove:K=>{const z=l.filter(ne=>this.getLayer(ne)),Y=z.length!==0?this.queryRenderedFeatures(K.point,{layers:z}):[];Y.length?C||(C=!0,c.call(this,new Li(k,this,K.originalEvent,{features:Y}))):C=!1},mouseout:()=>{C=!1}}}}if(k==="mouseleave"||k==="mouseout"){let C=!1;return{layers:l,listener:c,delegates:{mousemove:z=>{const Y=l.filter(ne=>this.getLayer(ne));(Y.length!==0?this.queryRenderedFeatures(z.point,{layers:Y}):[]).length?C=!0:C&&(C=!1,c.call(this,new Li(k,this,z.originalEvent)))},mouseout:z=>{C&&(C=!1,c.call(this,new Li(k,this,z.originalEvent)))}}}}{const C=M=>{const K=l.filter(Y=>this.getLayer(Y)),z=K.length!==0?this.queryRenderedFeatures(M.point,{layers:K}):[];z.length&&(M.features=z,c.call(this,M),delete M.features)};return{layers:l,listener:c,delegates:{[k]:C}}}}_saveDelegatedListener(k,l){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[k]=this._delegatedListeners[k]||[],this._delegatedListeners[k].push(l)}_removeDelegatedListener(k,l,c){if(!this._delegatedListeners||!this._delegatedListeners[k])return;const C=this._delegatedListeners[k];for(let M=0;M<C.length;M++){const K=C[M];if(K.listener===c&&K.layers.length===l.length&&K.layers.every(z=>l.includes(z))){for(const z in K.delegates)this.off(z,K.delegates[z]);return void C.splice(M,1)}}}on(k,l,c){if(c===void 0)return super.on(k,l);const C=typeof l=="string"?[l]:l,M=this._createDelegatedListener(k,C,c);this._saveDelegatedListener(k,M);for(const K in M.delegates)this.on(K,M.delegates[K]);return{unsubscribe:()=>{this._removeDelegatedListener(k,C,c)}}}once(k,l,c){if(c===void 0)return super.once(k,l);const C=typeof l=="string"?[l]:l,M=this._createDelegatedListener(k,C,c);for(const K in M.delegates){const z=M.delegates[K];M.delegates[K]=(...Y)=>{this._removeDelegatedListener(k,C,c),z(...Y)}}this._saveDelegatedListener(k,M);for(const K in M.delegates)this.once(K,M.delegates[K]);return this}off(k,l,c){return c===void 0?super.off(k,l):(this._removeDelegatedListener(k,typeof l=="string"?[l]:l,c),this)}queryRenderedFeatures(k,l){if(!this.style)return[];let c;const C=k instanceof a.P||Array.isArray(k),M=C?k:[[0,0],[this.transform.width,this.transform.height]];if(l=l||(C?{}:k)||{},M instanceof a.P||typeof M[0]=="number")c=[a.P.convert(M)];else{const K=a.P.convert(M[0]),z=a.P.convert(M[1]);c=[K,new a.P(z.x,K.y),z,new a.P(K.x,z.y),K]}return this.style.queryRenderedFeatures(c,l,this.transform)}querySourceFeatures(k,l){return this.style.querySourceFeatures(k,l)}setStyle(k,l){return(l=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},l)).diff!==!1&&l.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&k?(this._diffStyle(k,l),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._updateStyle(k,l))}setTransformRequest(k){return this._requestManager.setTransformRequest(k),this}_getUIString(k){const l=this._locale[k];if(l==null)throw new Error(`Missing UI string '${k}'`);return l}_updateStyle(k,l){var c,C;if(l.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(k,l));const M=this.style&&l.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!k)),k?(this.style=new Ah(this,l||{}),this.style.setEventedParent(this,{style:this.style}),typeof k=="string"?this.style.loadURL(k,l,M):this.style.loadJSON(k,l,M),this):((C=(c=this.style)===null||c===void 0?void 0:c.projection)===null||C===void 0||C.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ah(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(k,l){if(typeof k=="string"){const c=this._requestManager.transformRequest(k,"Style");a.h(c,new AbortController).then(C=>{this._updateDiff(C.data,l)}).catch(C=>{C&&this.fire(new a.j(C))})}else typeof k=="object"&&this._updateDiff(k,l)}_updateDiff(k,l){try{this.style.setState(k,l)&&this._update(!0)}catch(c){a.w(`Unable to perform style diff: ${c.message||c.error||c}. Rebuilding the style from scratch.`),this._updateStyle(k,l)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(k,l){return this._lazyInitEmptyStyle(),this.style.addSource(k,l),this._update(!0)}isSourceLoaded(k){const l=this.style&&this.style.sourceCaches[k];if(l!==void 0)return l.loaded();this.fire(new a.j(new Error(`There is no source with ID '${k}'`)))}setTerrain(k){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),k){const l=this.style.sourceCaches[k.source];if(!l)throw new Error(`cannot load terrain, because there exists no source with ID: ${k.source}`);this.terrain===null&&l.reload();for(const c in this.style._layers){const C=this.style._layers[c];C.type==="hillshade"&&C.source===k.source&&a.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 mu(this.painter,l,k),this.painter.renderToTexture=new Yd(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=c=>{c.dataType==="style"?this.terrain.sourceCache.freeRtt():c.dataType==="source"&&c.tile&&(c.sourceId!==k.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),this.terrain.sourceCache.freeRtt(c.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.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new a.k("terrain",{terrain:k})),this}getTerrain(){var k,l;return(l=(k=this.terrain)===null||k===void 0?void 0:k.options)!==null&&l!==void 0?l:null}areTilesLoaded(){const k=this.style&&this.style.sourceCaches;for(const l in k){const c=k[l]._tiles;for(const C in c){const M=c[C];if(M.state!=="loaded"&&M.state!=="errored")return!1}}return!0}removeSource(k){return this.style.removeSource(k),this._update(!0)}getSource(k){return this.style.getSource(k)}addImage(k,l,c={}){const{pixelRatio:C=1,sdf:M=!1,stretchX:K,stretchY:z,content:Y,textFitWidth:ne,textFitHeight:se}=c;if(this._lazyInitEmptyStyle(),!(l instanceof HTMLImageElement||a.b(l))){if(l.width===void 0||l.height===void 0)return this.fire(new a.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:be,height:Oe,data:Te}=l,$e=l;return this.style.addImage(k,{data:new a.R({width:be,height:Oe},new Uint8Array(Te)),pixelRatio:C,stretchX:K,stretchY:z,content:Y,textFitWidth:ne,textFitHeight:se,sdf:M,version:0,userImage:$e}),$e.onAdd&&$e.onAdd(this,k),this}}{const{width:be,height:Oe,data:Te}=S.getImageData(l);this.style.addImage(k,{data:new a.R({width:be,height:Oe},Te),pixelRatio:C,stretchX:K,stretchY:z,content:Y,textFitWidth:ne,textFitHeight:se,sdf:M,version:0})}}updateImage(k,l){const c=this.style.getImage(k);if(!c)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const C=l instanceof HTMLImageElement||a.b(l)?S.getImageData(l):l,{width:M,height:K,data:z}=C;if(M===void 0||K===void 0)return this.fire(new a.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(M!==c.data.width||K!==c.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const Y=!(l instanceof HTMLImageElement||a.b(l));return c.data.replace(z,Y),this.style.updateImage(k,c),this}getImage(k){return this.style.getImage(k)}hasImage(k){return k?!!this.style.getImage(k):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(k){this.style.removeImage(k)}loadImage(k){return J.getImage(this._requestManager.transformRequest(k,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(k,l){return this._lazyInitEmptyStyle(),this.style.addLayer(k,l),this._update(!0)}moveLayer(k,l){return this.style.moveLayer(k,l),this._update(!0)}removeLayer(k){return this.style.removeLayer(k),this._update(!0)}getLayer(k){return this.style.getLayer(k)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(k,l,c){return this.style.setLayerZoomRange(k,l,c),this._update(!0)}setFilter(k,l,c={}){return this.style.setFilter(k,l,c),this._update(!0)}getFilter(k){return this.style.getFilter(k)}setPaintProperty(k,l,c,C={}){return this.style.setPaintProperty(k,l,c,C),this._update(!0)}getPaintProperty(k,l){return this.style.getPaintProperty(k,l)}setLayoutProperty(k,l,c,C={}){return this.style.setLayoutProperty(k,l,c,C),this._update(!0)}getLayoutProperty(k,l){return this.style.getLayoutProperty(k,l)}setGlyphs(k,l={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(k,l),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(k,l,c={}){return this._lazyInitEmptyStyle(),this.style.addSprite(k,l,c,C=>{C||this._update(!0)}),this}removeSprite(k){return this._lazyInitEmptyStyle(),this.style.removeSprite(k),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(k,l={}){return this._lazyInitEmptyStyle(),this.style.setSprite(k,l,c=>{c||this._update(!0)}),this}setLight(k,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(k,l),this._update(!0)}getLight(){return this.style.getLight()}setSky(k,l={}){return this._lazyInitEmptyStyle(),this.style.setSky(k,l),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(k,l){return this.style.setFeatureState(k,l),this._update()}removeFeatureState(k,l){return this.style.removeFeatureState(k,l),this._update()}getFeatureState(k){return this.style.getFeatureState(k)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let k=0,l=0;return this._container&&(k=this._container.clientWidth||400,l=this._container.clientHeight||300),[k,l]}_setupContainer(){const k=this._container;k.classList.add("maplibregl-map");const l=this._canvasContainer=B.create("div","maplibregl-canvas-container",k);this._interactive&&l.classList.add("maplibregl-interactive"),this._canvas=B.create("canvas","maplibregl-canvas",l),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const c=this._containerDimensions(),C=this._getClampedPixelRatio(c[0],c[1]);this._resizeCanvas(c[0],c[1],C);const M=this._controlContainer=B.create("div","maplibregl-control-container",k),K=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(z=>{K[z]=B.create("div",`maplibregl-ctrl-${z} `,M)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(k,l,c){this._canvas.width=Math.floor(c*k),this._canvas.height=Math.floor(c*l),this._canvas.style.width=`${k}px`,this._canvas.style.height=`${l}px`}_setupPainter(){const k=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let l=null;this._canvas.addEventListener("webglcontextcreationerror",C=>{l={requestedAttributes:k},C&&(l.statusMessage=C.statusMessage,l.type=C.type)},{once:!0});let c=null;if(c=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,k):this._canvas.getContext("webgl2",k)||this._canvas.getContext("webgl",k),!c){const C="Failed to initialize WebGL";throw l?(l.message=C,new Error(JSON.stringify(l))):new Error(C)}this.painter=new Pu(c,this.transform),P.testSupport(c)}migrateProjection(k,l){super.migrateProjection(k,l),this.painter.transform=k,this.fire(new a.k("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(k){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||k,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(k){return this._update(),this._renderTaskQueue.add(k)}_cancelRenderFrame(k){this._renderTaskQueue.remove(k)}_render(k){var l,c,C,M,K;const z=this._idleTriggered?this._fadeDuration:0,Y=((l=this.style.projection)===null||l===void 0?void 0:l.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(k),this._removed)return;let ne=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Oe=this.transform.zoom,Te=S.now();this.style.zoomHistory.update(Oe,Te);const $e=new a.z(Oe,{now:Te,fadeDuration:z,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),He=$e.crossFadingFactor();He===1&&He===this._crossFadingFactor||(ne=!0,this._crossFadingFactor=He),this.style.update($e)}const se=((c=this.style.projection)===null||c===void 0?void 0:c.transitionState)>0!==Y;(C=this.style.projection)===null||C===void 0||C.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((M=this.style.projection)===null||M===void 0?void 0:M.transitionState,(K=this.style.projection)===null||K===void 0?void 0:K.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||se)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,z,this._crossSourceCollisions,se),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:z,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.cd.mark(a.ce.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||ne)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const be=this._sourcesDirty||this._styleDirty||this._placementDirty;return be||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||be||(this._fullyLoaded=!0,a.cd.mark(a.ce.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var k;this._hash&&this._hash.remove();for(const c of this._controls)c.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),J.removeThrottleControl(this._imageQueueHandle),(k=this._resizeObserver)===null||k===void 0||k.disconnect();const l=this.painter.context.gl.getExtension("WEBGL_lose_context");l!=null&&l.loseContext&&l.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),B.remove(this._canvasContainer),B.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),a.cd.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,S.frameAsync(this._frameRequest).then(k=>{a.cd.frame(k),this._frameRequest=null,this._render(k)}).catch(k=>{if(!a.cf(k)&&!function(l){return l.message===Ll}(k))throw k}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(k){this._showTileBoundaries!==k&&(this._showTileBoundaries=k,this._update())}get showPadding(){return!!this._showPadding}set showPadding(k){this._showPadding!==k&&(this._showPadding=k,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(k){this._showCollisionBoxes!==k&&(this._showCollisionBoxes=k,k?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(k){this._showOverdrawInspector!==k&&(this._showOverdrawInspector=k,this._update())}get repaint(){return!!this._repaint}set repaint(k){this._repaint!==k&&(this._repaint=k,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(k){this._vertices=k,this._update()}get version(){return $d}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(k){return this._lazyInitEmptyStyle(),this.style.setProjection(k),this._update(!0)}},s.MapMouseEvent=Li,s.MapTouchEvent=Wr,s.MapWheelEvent=Ma,s.Marker=gu,s.NavigationControl=class{constructor(k){this._updateZoomButtons=()=>{const l=this._map.getZoom(),c=l===this._map.getMaxZoom(),C=l===this._map.getMinZoom();this._zoomInButton.disabled=c,this._zoomOutButton.disabled=C,this._zoomInButton.setAttribute("aria-disabled",c.toString()),this._zoomOutButton.setAttribute("aria-disabled",C.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(l,c)=>{const C=this._map._getUIString(`NavigationControl.${c}`);l.title=C,l.setAttribute("aria-label",C)},this.options=a.e({},Na,k),this._container=B.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",l=>this._map.zoomIn({},{originalEvent:l})),B.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",l=>this._map.zoomOut({},{originalEvent:l})),B.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",l=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:l}):this._map.resetNorth({},{originalEvent:l})}),this._compassIcon=B.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(k){return this._map=k,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new yc(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){B.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.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(k,l){const c=B.create("button",k,this._container);return c.type="button",c.addEventListener("click",l),c}},s.Popup=class extends a.E{constructor(k){super(),this.remove=()=>(this._content&&B.remove(this._content),this._container&&(B.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 a.k("close"))),this),this._onMouseUp=l=>{this._update(l.point)},this._onMouseMove=l=>{this._update(l.point)},this._onDrag=l=>{this._update(l.point)},this._update=l=>{var c;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=B.create("div","maplibregl-popup",this._map.getContainer()),this._tip=B.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Y of this.options.className.split(" "))this._container.classList.add(Y);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?ol(this._lngLat,this._flatPos,this._map.transform):(c=this._lngLat)===null||c===void 0?void 0:c.wrap(),this._trackPointer&&!l)return;const C=this._flatPos=this._pos=this._trackPointer&&l?l:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&l?l:this._map.transform.locationToScreenPoint(this._lngLat));let M=this.options.anchor;const K=zl(this.options.offset);if(!M){const Y=this._container.offsetWidth,ne=this._container.offsetHeight;let se;se=C.y+K.bottom.y<ne?["top"]:C.y>this._map.transform.height-ne?["bottom"]:[],C.x<Y/2?se.push("left"):C.x>this._map.transform.width-Y/2&&se.push("right"),M=se.length===0?"bottom":se.join("-")}let z=C.add(K[M]);this.options.subpixelPositioning||(z=z.round()),B.setTransform(this._container,`${Fu[M]} translate(${z.x}px,${z.y}px)`),vc(this._container,M,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(_c),k)}addTo(k){return this._map&&this.remove(),this._map=k,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 a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(k){return this._lngLat=a.N.convert(k),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(k){return this.setDOMContent(document.createTextNode(k))}setHTML(k){const l=document.createDocumentFragment(),c=document.createElement("body");let C;for(c.innerHTML=k;C=c.firstChild,C;)l.appendChild(C);return this.setDOMContent(l)}getMaxWidth(){var k;return(k=this._container)===null||k===void 0?void 0:k.style.maxWidth}setMaxWidth(k){return this.options.maxWidth=k,this._update(),this}setDOMContent(k){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=B.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(k),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(k){return this._container&&this._container.classList.add(k),this}removeClassName(k){return this._container&&this._container.classList.remove(k),this}setOffset(k){return this.options.offset=k,this._update(),this}toggleClassName(k){if(this._container)return this._container.classList.toggle(k)}setSubpixelPositioning(k){this.options.subpixelPositioning=k}_createCloseButton(){this.options.closeButton&&(this._closeButton=B.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const k=this._container.querySelector(Uu);k&&k.focus()}},s.RasterDEMTileSource=Ar,s.RasterTileSource=Sn,s.ScaleControl=class{constructor(k){this._onMove=()=>{aA(this._map,this._container,this.options)},this.setUnit=l=>{this.options.unit=l,aA(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},eu),k)}getDefaultPosition(){return"bottom-left"}onAdd(k){return this._map=k,this._container=B.create("div","maplibregl-ctrl maplibregl-ctrl-scale",k.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){B.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},s.ScrollZoomHandler=Ka,s.Style=Ah,s.TerrainControl=class{constructor(k){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=k}onAdd(k){return this._map=k,this._container=B.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=B.create("button","maplibregl-ctrl-terrain",this._container),B.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(){B.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},s.TwoFingersTouchPitchHandler=pc,s.TwoFingersTouchRotateHandler=HA,s.TwoFingersTouchZoomHandler=hd,s.TwoFingersTouchZoomRotateHandler=_A,s.VectorTileSource=rn,s.VideoSource=Cr,s.addSourceType=(k,l)=>a._(void 0,void 0,void 0,function*(){if(Jr(k))throw new Error(`A source type called "${k}" already exists.`);((c,C)=>{_r[c]=C})(k,l)}),s.clearPrewarmedResources=function(){const k=Pt;k&&(k.isPreloaded()&&k.numActive()===1?(k.release(ke),Pt=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()"))},s.createTileMesh=ot,s.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},s.getRTLTextPluginStatus=function(){return de().getRTLTextPluginStatus()},s.getVersion=function(){return fd},s.getWorkerCount=function(){return We.workerCount},s.getWorkerUrl=function(){return a.a.WORKER_URL},s.importScriptInWorkers=function(k){return Ke().broadcast("IS",k)},s.prewarm=function(){jt().acquire(ke)},s.setMaxParallelImageRequests=function(k){a.a.MAX_PARALLEL_IMAGE_REQUESTS=k},s.setRTLTextPlugin=function(k,l){return de().setRTLTextPlugin(k,l)},s.setWorkerCount=function(k){We.workerCount=k},s.setWorkerUrl=function(k){a.a.WORKER_URL=k}});var o=e;return o})}(mC)),mC.exports}var Dq=Rq();const Iy=us(Dq);var K_=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function SD(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ky={exports:{}};ky.exports;var pI;function Lq(){return pI||(pI=1,function(r,t){var e=200,n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",f="[object Array]",g="[object AsyncFunction]",b="[object Boolean]",I="[object Date]",S="[object Error]",B="[object Function]",P="[object GeneratorFunction]",U="[object Map]",j="[object Number]",q="[object Null]",W="[object Object]",ee="[object Promise]",J="[object Proxy]",$="[object RegExp]",X="[object Set]",G="[object String]",ae="[object Symbol]",ge="[object Undefined]",he="[object WeakMap]",Ie="[object ArrayBuffer]",re="[object DataView]",oe="[object Float32Array]",Se="[object Float64Array]",ye="[object Int8Array]",nt="[object Int16Array]",Ne="[object Int32Array]",je="[object Uint8Array]",et="[object Uint8ClampedArray]",Ue="[object Uint16Array]",ke="[object Uint32Array]",We=/[\\^$.*+?()[\]{}|]/g,vt=/^\[object .+?Constructor\]$/,Pt=/^(?:0|[1-9]\d*)$/,ut={};ut[oe]=ut[Se]=ut[ye]=ut[nt]=ut[Ne]=ut[je]=ut[et]=ut[Ue]=ut[ke]=!0,ut[a]=ut[f]=ut[Ie]=ut[b]=ut[re]=ut[I]=ut[S]=ut[B]=ut[U]=ut[j]=ut[W]=ut[$]=ut[X]=ut[G]=ut[he]=!1;var jt=typeof K_=="object"&&K_&&K_.Object===Object&&K_,Rt=typeof self=="object"&&self&&self.Object===Object&&self,Ke=jt||Rt||Function("return this")(),we=t&&!t.nodeType&&t,Fe=we&&!0&&r&&!r.nodeType&&r,tt=Fe&&Fe.exports===we,mt=tt&&jt.process,bt=function(){try{return mt&&mt.binding&&mt.binding("util")}catch{}}(),Lt=bt&&bt.isTypedArray;function Vt(te,Ee){for(var ot=-1,$t=te==null?0:te.length,Sr=0,Nn=[];++ot<$t;){var si=te[ot];Ee(si,ot,te)&&(Nn[Sr++]=si)}return Nn}function rn(te,Ee){for(var ot=-1,$t=Ee.length,Sr=te.length;++ot<$t;)te[Sr+ot]=Ee[ot];return te}function Sn(te,Ee){for(var ot=-1,$t=te==null?0:te.length;++ot<$t;)if(Ee(te[ot],ot,te))return!0;return!1}function Ar(te,Ee){for(var ot=-1,$t=Array(te);++ot<te;)$t[ot]=Ee(ot);return $t}function Bn(te){return function(Ee){return te(Ee)}}function ar(te,Ee){return te.has(Ee)}function Cr(te,Ee){return te==null?void 0:te[Ee]}function br(te){var Ee=-1,ot=Array(te.size);return te.forEach(function($t,Sr){ot[++Ee]=[Sr,$t]}),ot}function _r(te,Ee){return function(ot){return te(Ee(ot))}}function Jr(te){var Ee=-1,ot=Array(te.size);return te.forEach(function($t){ot[++Ee]=$t}),ot}var wr=Array.prototype,hi=Function.prototype,Ye=Object.prototype,de=Ke["__core-js_shared__"],pe=hi.toString,Je=Ye.hasOwnProperty,kt=function(){var te=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return te?"Symbol(src)_1."+te:""}(),Xt=Ye.toString,it=RegExp("^"+pe.call(Je).replace(We,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=tt?Ke.Buffer:void 0,qe=Ke.Symbol,fe=Ke.Uint8Array,xe=Ye.propertyIsEnumerable,p=wr.splice,Qe=qe?qe.toStringTag:void 0,pt=Object.getOwnPropertySymbols,ft=Ut?Ut.isBuffer:void 0,Et=_r(Object.keys,Object),Ct=Oi(Ke,"DataView"),nn=Oi(Ke,"Map"),Yt=Oi(Ke,"Promise"),Gt=Oi(Ke,"Set"),wt=Oi(Ke,"WeakMap"),Tn=Oi(Object,"create"),En=co(Ct),sr=co(nn),Pr=co(Yt),an=co(Gt),Wn=co(wt),ir=qe?qe.prototype:void 0,zr=ir?ir.valueOf:void 0;function fr(te){var Ee=-1,ot=te==null?0:te.length;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function hr(){this.__data__=Tn?Tn(null):{},this.size=0}function zn(te){var Ee=this.has(te)&&delete this.__data__[te];return this.size-=Ee?1:0,Ee}function Pi(te){var Ee=this.__data__;if(Tn){var ot=Ee[te];return ot===n?void 0:ot}return Je.call(Ee,te)?Ee[te]:void 0}function po(te){var Ee=this.__data__;return Tn?Ee[te]!==void 0:Je.call(Ee,te)}function ri(te,Ee){var ot=this.__data__;return this.size+=this.has(te)?0:1,ot[te]=Tn&&Ee===void 0?n:Ee,this}fr.prototype.clear=hr,fr.prototype.delete=zn,fr.prototype.get=Pi,fr.prototype.has=po,fr.prototype.set=ri;function Xr(te){var Ee=-1,ot=te==null?0:te.length;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function ii(){this.__data__=[],this.size=0}function mo(te){var Ee=this.__data__,ot=Qn(Ee,te);if(ot<0)return!1;var $t=Ee.length-1;return ot==$t?Ee.pop():p.call(Ee,ot,1),--this.size,!0}function Mi(te){var Ee=this.__data__,ot=Qn(Ee,te);return ot<0?void 0:Ee[ot][1]}function ka(te){return Qn(this.__data__,te)>-1}function ns(te,Ee){var ot=this.__data__,$t=Qn(ot,te);return $t<0?(++this.size,ot.push([te,Ee])):ot[$t][1]=Ee,this}Xr.prototype.clear=ii,Xr.prototype.delete=mo,Xr.prototype.get=Mi,Xr.prototype.has=ka,Xr.prototype.set=ns;function wo(te){var Ee=-1,ot=te==null?0:te.length;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function Ua(){this.size=0,this.__data__={hash:new fr,map:new(nn||Xr),string:new fr}}function Ya(te){var Ee=kr(this,te).delete(te);return this.size-=Ee?1:0,Ee}function Vi(te){return kr(this,te).get(te)}function Rl(te){return kr(this,te).has(te)}function Ps(te,Ee){var ot=kr(this,te),$t=ot.size;return ot.set(te,Ee),this.size+=ot.size==$t?0:1,this}wo.prototype.clear=Ua,wo.prototype.delete=Ya,wo.prototype.get=Vi,wo.prototype.has=Rl,wo.prototype.set=Ps;function ki(te){var Ee=-1,ot=te==null?0:te.length;for(this.__data__=new wo;++Ee<ot;)this.add(te[Ee])}function Mr(te){return this.__data__.set(te,n),this}function ms(te){return this.__data__.has(te)}ki.prototype.add=ki.prototype.push=Mr,ki.prototype.has=ms;function oa(te){var Ee=this.__data__=new Xr(te);this.size=Ee.size}function ba(){this.__data__=new Xr,this.size=0}function Ge(te){var Ee=this.__data__,ot=Ee.delete(te);return this.size=Ee.size,ot}function _t(te){return this.__data__.get(te)}function cn(te){return this.__data__.has(te)}function jn(te,Ee){var ot=this.__data__;if(ot instanceof Xr){var $t=ot.__data__;if(!nn||$t.length<e-1)return $t.push([te,Ee]),this.size=++ot.size,this;ot=this.__data__=new wo($t)}return ot.set(te,Ee),this.size=ot.size,this}oa.prototype.clear=ba,oa.prototype.delete=Ge,oa.prototype.get=_t,oa.prototype.has=cn,oa.prototype.set=jn;function An(te,Ee){var ot=qs(te),$t=!ot&&xa(te),Sr=!ot&&!$t&&Cl(te),Nn=!ot&&!$t&&!Sr&&Vl(te),si=ot||$t||Sr||Nn,fi=si?Ar(te.length,String):[],pr=fi.length;for(var Er in te)Je.call(te,Er)&&!(si&&(Er=="length"||Sr&&(Er=="offset"||Er=="parent")||Nn&&(Er=="buffer"||Er=="byteLength"||Er=="byteOffset")||ja(Er,pr)))&&fi.push(Er);return fi}function Qn(te,Ee){for(var ot=te.length;ot--;)if(pa(te[ot][0],Ee))return ot;return-1}function _i(te,Ee,ot){var $t=Ee(te);return qs(te)?$t:rn($t,ot(te))}function Ki(te){return te==null?te===void 0?ge:q:Qe&&Qe in Object(te)?Qs(te):$a(te)}function Xi(te){return Zr(te)&&Ki(te)==a}function aa(te,Ee,ot,$t,Sr){return te===Ee?!0:te==null||Ee==null||!Zr(te)&&!Zr(Ee)?te!==te&&Ee!==Ee:Mu(te,Ee,ot,$t,aa,Sr)}function Mu(te,Ee,ot,$t,Sr,Nn){var si=qs(te),fi=qs(Ee),pr=si?f:Mo(te),Er=fi?f:Mo(Ee);pr=pr==a?W:pr,Er=Er==a?W:Er;var Ci=pr==W,So=Er==W,Ri=pr==Er;if(Ri&&Cl(te)){if(!Cl(Ee))return!1;si=!0,Ci=!1}if(Ri&&!Ci)return Nn||(Nn=new oa),si||Vl(te)?Ai(te,Ee,ot,$t,Sr,Nn):As(te,Ee,pr,ot,$t,Sr,Nn);if(!(ot&i)){var Nr=Ci&&Je.call(te,"__wrapped__"),eo=So&&Je.call(Ee,"__wrapped__");if(Nr||eo){var to=Nr?te.value():te,la=eo?Ee.value():Ee;return Nn||(Nn=new oa),Sr(to,la,ot,$t,Nn)}}return Ri?(Nn||(Nn=new oa),Ju(te,Ee,ot,$t,Sr,Nn)):!1}function Hr(te){if(!zi(te)||Dl(te))return!1;var Ee=Ji(te)?it:vt;return Ee.test(co(te))}function ci(te){return Zr(te)&&$l(te.length)&&!!ut[Ki(te)]}function rs(te){if(!ea(te))return Et(te);var Ee=[];for(var ot in Object(te))Je.call(te,ot)&&ot!="constructor"&&Ee.push(ot);return Ee}function Ai(te,Ee,ot,$t,Sr,Nn){var si=ot&i,fi=te.length,pr=Ee.length;if(fi!=pr&&!(si&&pr>fi))return!1;var Er=Nn.get(te);if(Er&&Nn.get(Ee))return Er==Ee;var Ci=-1,So=!0,Ri=ot&o?new ki:void 0;for(Nn.set(te,Ee),Nn.set(Ee,te);++Ci<fi;){var Nr=te[Ci],eo=Ee[Ci];if($t)var to=si?$t(eo,Nr,Ci,Ee,te,Nn):$t(Nr,eo,Ci,te,Ee,Nn);if(to!==void 0){if(to)continue;So=!1;break}if(Ri){if(!Sn(Ee,function(la,gs){if(!ar(Ri,gs)&&(Nr===la||Sr(Nr,la,ot,$t,Nn)))return Ri.push(gs)})){So=!1;break}}else if(!(Nr===eo||Sr(Nr,eo,ot,$t,Nn))){So=!1;break}}return Nn.delete(te),Nn.delete(Ee),So}function As(te,Ee,ot,$t,Sr,Nn,si){switch(ot){case re:if(te.byteLength!=Ee.byteLength||te.byteOffset!=Ee.byteOffset)return!1;te=te.buffer,Ee=Ee.buffer;case Ie:return!(te.byteLength!=Ee.byteLength||!Nn(new fe(te),new fe(Ee)));case b:case I:case j:return pa(+te,+Ee);case S:return te.name==Ee.name&&te.message==Ee.message;case $:case G:return te==Ee+"";case U:var fi=br;case X:var pr=$t&i;if(fi||(fi=Jr),te.size!=Ee.size&&!pr)return!1;var Er=si.get(te);if(Er)return Er==Ee;$t|=o,si.set(te,Ee);var Ci=Ai(fi(te),fi(Ee),$t,Sr,Nn,si);return si.delete(te),Ci;case ae:if(zr)return zr.call(te)==zr.call(Ee)}return!1}function Ju(te,Ee,ot,$t,Sr,Nn){var si=ot&i,fi=sa(te),pr=fi.length,Er=sa(Ee),Ci=Er.length;if(pr!=Ci&&!si)return!1;for(var So=pr;So--;){var Ri=fi[So];if(!(si?Ri in Ee:Je.call(Ee,Ri)))return!1}var Nr=Nn.get(te);if(Nr&&Nn.get(Ee))return Nr==Ee;var eo=!0;Nn.set(te,Ee),Nn.set(Ee,te);for(var to=si;++So<pr;){Ri=fi[So];var la=te[Ri],gs=Ee[Ri];if($t)var Ks=si?$t(gs,la,Ri,Ee,te,Nn):$t(la,gs,Ri,te,Ee,Nn);if(!(Ks===void 0?la===gs||Sr(la,gs,ot,$t,Nn):Ks)){eo=!1;break}to||(to=Ri=="constructor")}if(eo&&!to){var su=te.constructor,Va=Ee.constructor;su!=Va&&"constructor"in te&&"constructor"in Ee&&!(typeof su=="function"&&su instanceof su&&typeof Va=="function"&&Va instanceof Va)&&(eo=!1)}return Nn.delete(te),Nn.delete(Ee),eo}function sa(te){return _i(te,Wi,Ta)}function kr(te,Ee){var ot=te.__data__;return au(Ee)?ot[typeof Ee=="string"?"string":"hash"]:ot.map}function Oi(te,Ee){var ot=Cr(te,Ee);return Hr(ot)?ot:void 0}function Qs(te){var Ee=Je.call(te,Qe),ot=te[Qe];try{te[Qe]=void 0;var $t=!0}catch{}var Sr=Xt.call(te);return $t&&(Ee?te[Qe]=ot:delete te[Qe]),Sr}var Ta=pt?function(te){return te==null?[]:(te=Object(te),Vt(pt(te),function(Ee){return xe.call(te,Ee)}))}:lo,Mo=Ki;(Ct&&Mo(new Ct(new ArrayBuffer(1)))!=re||nn&&Mo(new nn)!=U||Yt&&Mo(Yt.resolve())!=ee||Gt&&Mo(new Gt)!=X||wt&&Mo(new wt)!=he)&&(Mo=function(te){var Ee=Ki(te),ot=Ee==W?te.constructor:void 0,$t=ot?co(ot):"";if($t)switch($t){case En:return re;case sr:return U;case Pr:return ee;case an:return X;case Wn:return he}return Ee});function ja(te,Ee){return Ee=Ee??s,!!Ee&&(typeof te=="number"||Pt.test(te))&&te>-1&&te%1==0&&te<Ee}function au(te){var Ee=typeof te;return Ee=="string"||Ee=="number"||Ee=="symbol"||Ee=="boolean"?te!=="__proto__":te===null}function Dl(te){return!!kt&&kt in te}function ea(te){var Ee=te&&te.constructor,ot=typeof Ee=="function"&&Ee.prototype||Ye;return te===ot}function $a(te){return Xt.call(te)}function co(te){if(te!=null){try{return pe.call(te)}catch{}try{return te+""}catch{}}return""}function pa(te,Ee){return te===Ee||te!==te&&Ee!==Ee}var xa=Xi(function(){return arguments}())?Xi:function(te){return Zr(te)&&Je.call(te,"callee")&&!xe.call(te,"callee")},qs=Array.isArray;function Pa(te){return te!=null&&$l(te.length)&&!Ji(te)}var Cl=ft||Di;function eA(te,Ee){return aa(te,Ee)}function Ji(te){if(!zi(te))return!1;var Ee=Ki(te);return Ee==B||Ee==P||Ee==g||Ee==J}function $l(te){return typeof te=="number"&&te>-1&&te%1==0&&te<=s}function zi(te){var Ee=typeof te;return te!=null&&(Ee=="object"||Ee=="function")}function Zr(te){return te!=null&&typeof te=="object"}var Vl=Lt?Bn(Lt):ci;function Wi(te){return Pa(te)?An(te):rs(te)}function lo(){return[]}function Di(){return!1}r.exports=eA}(ky,ky.exports)),ky.exports}var Fq=Lq(),Uq=SD(Fq);function MS(r,t,e){const n={id:[t,e,"circle"].join("_"),source:t,type:"circle",paint:{"circle-color":r,"circle-radius":2},filter:["==","$type","Point"]};return e&&(n["source-layer"]=e),n}function SS(r,t,e,n){const i={id:[e,n,"polygon"].join("_"),source:e,type:"fill",paint:{"fill-color":r,"fill-antialias":!0,"fill-outline-color":r},filter:["==","$type","Polygon"]};return n&&(i["source-layer"]=n),i}function ES(r,t,e){const n={id:[t,e,"line"].join("_"),source:t,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":r},filter:["==","$type","LineString"]};return e&&(n["source-layer"]=e),n}function jq(r,t){const e=[],n=[],i=[];function o(s){return{circle:t(s,.8),line:t(s,.6),polygon:t(s,.3),polygonOutline:t(s,.6),default:t(s,1)}}return Object.keys(r).forEach(s=>{const a=r[s];if(!a||a.length===0){const f=o(s);n.push(MS(f.circle,s)),i.push(ES(f.line,s)),e.push(SS(f.polygon,f.polygonOutline,s))}else a.forEach(f=>{const g=o(f);n.push(MS(g.circle,s,f)),i.push(ES(g.line,s,f)),e.push(SS(g.polygon,g.polygonOutline,s,f))})}),e.concat(i).concat(n)}function zq(r,t,e){e=Object.assign({backgroundColor:"#fff"},e);const n={id:"background",type:"background",paint:{"background-color":e.backgroundColor}},i={};return Object.keys(r.sources).forEach(o=>{const s=r.sources[o];(s.type==="vector"||s.type==="geojson")&&(i[o]=s)}),Object.assign(r,{layers:[n].concat(t),sources:i})}var mI={polygonLayer:SS,lineLayer:ES,circleLayer:MS,generateInspectStyle:zq,generateColoredLayers:jq};class Nq{constructor(t){t=Object.assign({show:!0,onToggle(){}},t),this._btn=this.createButton(),this._btn.onclick=t.onToggle,this.elem=this.createContainer(this._btn,t.show)}createButton(){const t=document.createElement("button");return t.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect",t.type="button",t.title="Toggle Inspect",t.setAttribute("aria-label","Toggle Inspect"),t}createContainer(t,e){const n=document.createElement("div");return n.className="maplibregl-ctrl maplibregl-ctrl-group",n.appendChild(t),e||(n.style.display="none"),n}setInspectIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect"}setMapIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-map"}}function Gq(r){return typeof r>"u"||r===null?r:r instanceof Date?r.toLocaleString():typeof r=="object"||typeof r=="number"||typeof r=="string"?r.toString():r}function kx(r,t){return`<div class="maplibregl-inspect_property"><div class="maplibregl-inspect_property-name">${r}</div><div class="maplibregl-inspect_property-value">${Gq(t)}</div></div>`}function Wq(r){return`<div class="maplibregl-inspect_layer">${r}</div>`}function Qq(r){const t=Wq(r.layer["source-layer"]||r.layer.source),e=kx("$id",r.id),n=kx("$type",r.geometry.type),i=Object.keys(r.properties).map(o=>kx(o,r.properties[o]));return[t,e,n].concat(i).join("")}function qq(r){return r.map(t=>`<div class="maplibregl-inspect_feature">${Qq(t)}</div>`).join("")}function Yq(r){return`<div class="maplibregl-inspect_popup">${qq(r)}</div>`}var Ty={exports:{}},$q=Ty.exports,gI;function Vq(){return gI||(gI=1,function(r,t){(function(e,n){{var i=n();r.exports&&(t=r.exports=i),t.randomColor=i}})($q,function(){var e=null,n={};q();var i=[],o=function(G){if(G=G||{},G.seed!==void 0&&G.seed!==null&&G.seed===parseInt(G.seed,10))e=G.seed;else if(typeof G.seed=="string")e=$(G.seed);else{if(G.seed!==void 0&&G.seed!==null)throw new TypeError("The seed value must be an integer or string");e=null}var ae,ge,he;if(G.count!==null&&G.count!==void 0){for(var Ie=G.count,re=[],oe=0;oe<G.count;oe++)i.push(!1);for(G.count=null;Ie>re.length;){var Se=o(G);e!==null&&(G.seed=e),re.push(Se)}return G.count=Ie,re}return ae=s(G),ge=a(ae,G),he=f(ae,ge,G),g([ae,ge,he],G)};function s(G){if(i.length>0){var ae=X(G.hue),ge=P(ae),he=(ae[1]-ae[0])/i.length,Ie=parseInt((ge-ae[0])/he);i[Ie]===!0?Ie=(Ie+2)%i.length:i[Ie]=!0;var re=(ae[0]+Ie*he)%359,oe=(ae[0]+(Ie+1)*he)%359;return ae=[re,oe],ge=P(ae),ge<0&&(ge=360+ge),ge}else{var ae=I(G.hue);return ge=P(ae),ge<0&&(ge=360+ge),ge}}function a(G,ae){if(ae.hue==="monochrome")return 0;if(ae.luminosity==="random")return P([0,100]);var ge=S(G),he=ge[0],Ie=ge[1];switch(ae.luminosity){case"bright":he=55;break;case"dark":he=Ie-10;break;case"light":Ie=55;break}return P([he,Ie])}function f(G,ae,ge){var he=b(G,ae),Ie=100;switch(ge.luminosity){case"dark":Ie=he+20;break;case"light":he=(Ie+he)/2;break;case"random":he=0,Ie=100;break}return P([he,Ie])}function g(G,ae){switch(ae.format){case"hsvArray":return G;case"hslArray":return J(G);case"hsl":var ge=J(G);return"hsl("+ge[0]+", "+ge[1]+"%, "+ge[2]+"%)";case"hsla":var he=J(G),oe=ae.alpha||Math.random();return"hsla("+he[0]+", "+he[1]+"%, "+he[2]+"%, "+oe+")";case"rgbArray":return W(G);case"rgb":var Ie=W(G);return"rgb("+Ie.join(", ")+")";case"rgba":var re=W(G),oe=ae.alpha||Math.random();return"rgba("+re.join(", ")+", "+oe+")";default:return U(G)}}function b(G,ae){for(var ge=B(G).lowerBounds,he=0;he<ge.length-1;he++){var Ie=ge[he][0],re=ge[he][1],oe=ge[he+1][0],Se=ge[he+1][1];if(ae>=Ie&&ae<=oe){var ye=(Se-re)/(oe-Ie),nt=re-ye*Ie;return ye*ae+nt}}return 0}function I(G){if(typeof parseInt(G)=="number"){var ae=parseInt(G);if(ae<360&&ae>0)return[ae,ae]}if(typeof G=="string"){if(n[G]){var ge=n[G];if(ge.hueRange)return ge.hueRange}else if(G.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var he=ee(G)[0];return[he,he]}}return[0,360]}function S(G){return B(G).saturationRange}function B(G){G>=334&&G<=360&&(G-=360);for(var ae in n){var ge=n[ae];if(ge.hueRange&&G>=ge.hueRange[0]&&G<=ge.hueRange[1])return n[ae]}return"Color not found"}function P(G){if(e===null){var ae=.618033988749895,ge=Math.random();return ge+=ae,ge%=1,Math.floor(G[0]+ge*(G[1]+1-G[0]))}else{var he=G[1]||1,Ie=G[0]||0;e=(e*9301+49297)%233280;var re=e/233280;return Math.floor(Ie+re*(he-Ie))}}function U(G){var ae=W(G);function ge(Ie){var re=Ie.toString(16);return re.length==1?"0"+re:re}var he="#"+ge(ae[0])+ge(ae[1])+ge(ae[2]);return he}function j(G,ae,ge){var he=ge[0][0],Ie=ge[ge.length-1][0],re=ge[ge.length-1][1],oe=ge[0][1];n[G]={hueRange:ae,lowerBounds:ge,saturationRange:[he,Ie],brightnessRange:[re,oe]}}function q(){j("monochrome",null,[[0,0],[100,0]]),j("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),j("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),j("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),j("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),j("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),j("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),j("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function W(G){var ae=G[0];ae===0&&(ae=1),ae===360&&(ae=359),ae=ae/360;var ge=G[1]/100,he=G[2]/100,Ie=Math.floor(ae*6),re=ae*6-Ie,oe=he*(1-ge),Se=he*(1-re*ge),ye=he*(1-(1-re)*ge),nt=256,Ne=256,je=256;switch(Ie){case 0:nt=he,Ne=ye,je=oe;break;case 1:nt=Se,Ne=he,je=oe;break;case 2:nt=oe,Ne=he,je=ye;break;case 3:nt=oe,Ne=Se,je=he;break;case 4:nt=ye,Ne=oe,je=he;break;case 5:nt=he,Ne=oe,je=Se;break}var et=[Math.floor(nt*255),Math.floor(Ne*255),Math.floor(je*255)];return et}function ee(G){G=G.replace(/^#/,""),G=G.length===3?G.replace(/(.)/g,"$1$1"):G;var ae=parseInt(G.substr(0,2),16)/255,ge=parseInt(G.substr(2,2),16)/255,he=parseInt(G.substr(4,2),16)/255,Ie=Math.max(ae,ge,he),re=Ie-Math.min(ae,ge,he),oe=Ie?re/Ie:0;switch(Ie){case ae:return[60*((ge-he)/re%6)||0,oe,Ie];case ge:return[60*((he-ae)/re+2)||0,oe,Ie];case he:return[60*((ae-ge)/re+4)||0,oe,Ie]}}function J(G){var ae=G[0],ge=G[1]/100,he=G[2]/100,Ie=(2-ge)*he;return[ae,Math.round(ge*he/(Ie<1?Ie:2-Ie)*1e4)/100,Ie/2*100]}function $(G){for(var ae=0,ge=0;ge!==G.length&&!(ae>=Number.MAX_SAFE_INTEGER);ge++)ae+=G.charCodeAt(ge);return ae}function X(G){if(isNaN(G)){if(typeof G=="string"){if(n[G]){var ge=n[G];if(ge.hueRange)return ge.hueRange}else if(G.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var he=ee(G)[0];return B(he).hueRange}}}else{var ae=parseInt(G);if(ae<360&&ae>0)return B(G).hueRange}return[0,360]}return o})}(Ty,Ty.exports)),Ty.exports}var Hq=Vq(),Zq=SD(Hq);function Xq(r,t){let e="bright",n;return/water|ocean|lake|sea|river/.test(r)&&(n="blue"),/state|country|place/.test(r)&&(n="pink"),/road|highway|transport|streets/.test(r)&&(n="orange"),/contour|building|earth/.test(r)&&(n="monochrome"),/building/.test(r)&&(e="dark"),/earth/.test(r)&&(e="light"),/contour|landuse/.test(r)&&(n="yellow"),/wood|forest|park|landcover|land|natural/.test(r)&&(n="green"),`rgba(${Zq({luminosity:e,hue:n,seed:r,format:"rgbArray"}).join(", ")}, ${t||"1"})`}var Jq={brightColor:Xq};function eY(r){return r.metadata&&r.metadata["maplibregl-inspect:inspect"]}function tY(r){return Object.assign(r,{metadata:Object.assign({},r.metadata,{"maplibregl-inspect:inspect":!0})})}class ZE{constructor(t){if(this._onSourceChange=n=>{if(n.sourceDataType==="visibility"||!n.isSourceLoaded)return;const i=Object.assign({},this.sources);this._setSourcesFromMap(),!Uq(i,this.sources)&&Object.keys(this.sources).length>0&&setTimeout(()=>this.render(),1e3)},this._onStyleChange=()=>{const n=this._map.getStyle();eY(n)||(this._originalStyle=n)},this._onRightClick=()=>{!this.options.showMapPopupOnHover&&!this.options.showInspectMapPopupOnHover&&!this.options.blockHoverPopupOnClick&&this._popup&&this._popup.remove()},this._onMousemove=n=>{if(this._showInspectMap){if(!this.options.showInspectMapPopup||n.type==="mousemove"&&!this.options.showInspectMapPopupOnHover)return;n.type==="click"&&this.options.showInspectMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}else{if(!this.options.showMapPopup||n.type==="mousemove"&&!this.options.showMapPopupOnHover)return;n.type==="click"&&this.options.showMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}if(!this._popupBlocked&&this._popup){let i;this.options.selectThreshold===0?i=n.point:i=[[n.point.x-this.options.selectThreshold,n.point.y+this.options.selectThreshold],[n.point.x+this.options.selectThreshold,n.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(n.lngLat);const s=this.options.renderPopup(o);typeof s=="string"?this._popup.setHTML(s):this._popup.setDOMContent(s),this._popup.addTo(this._map)}}},!(this instanceof ZE))throw new Error("MaplibreInspect needs to be called with the new keyword");let e=null;window.maplibregl?e=new window.maplibregl.Popup({closeButton:!1,closeOnClick:!1}):t.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:Jq.brightColor,buildInspectStyle:mI.generateInspectStyle,renderPopup:Yq,popup:e,selectThreshold:5,useInspectStyle:!0,queryParameters:{},sources:{},toggleCallback(){},manageStyleOutside:!1},t),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 Nq({show:this.options.showInspectButton,onToggle:()=>this.toggleInspector()})}toggleInspector(){this._showInspectMap=!this._showInspectMap,this._popupBlocked=!1,this.options.toggleCallback(this._showInspectMap),this.render()}_inspectStyle(){const t=mI.generateColoredLayers(this.sources,this.assignLayerColor);return this.options.buildInspectStyle(this._map.getStyle(),t,{backgroundColor:this.options.backgroundColor})}render(){this._showInspectMap?(this.options.useInspectStyle&&this._map.setStyle(tY(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 t=Object.keys(this._map.getStyle().sources);Object.keys(this._map.style.sourceCaches).forEach(e=>{const n=this._map.style.sourceCaches[e]||{_source:{}},i=n._source.vectorLayerIds;i?this.sources[e]=i:n._source.type==="geojson"&&(this.sources[e]=[])}),Object.keys(this.sources).forEach(e=>{t.indexOf(e)===-1&&delete this.sources[e]})}setOriginalStyle(t){this._originalStyle=t,this._setSourcesFromMap()}onAdd(t){return this._map=t,Object.keys(this.sources).length===0&&(t.on("tiledata",this._onSourceChange),t.on("sourcedata",this._onSourceChange)),t.on("styledata",this._onStyleChange),t.on("load",this._onStyleChange),t.on("mousemove",this._onMousemove),t.on("click",this._onMousemove),t.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 t=this._toggle.elem;t.parentNode.removeChild(t),this._map=void 0}}var Py={exports:{}},nY=Py.exports,yI;function rY(){return yI||(yI=1,function(r,t){(function(e,n){{var i=n();r.exports&&(t=r.exports=i),t.randomColor=i}})(nY,function(){var e=null,n={};q();var i=[],o=function(G){if(G=G||{},G.seed!==void 0&&G.seed!==null&&G.seed===parseInt(G.seed,10))e=G.seed;else if(typeof G.seed=="string")e=$(G.seed);else{if(G.seed!==void 0&&G.seed!==null)throw new TypeError("The seed value must be an integer or string");e=null}var ae,ge,he;if(G.count!==null&&G.count!==void 0){for(var Ie=G.count,re=[],oe=0;oe<G.count;oe++)i.push(!1);for(G.count=null;Ie>re.length;){var Se=o(G);e!==null&&(G.seed=e),re.push(Se)}return G.count=Ie,re}return ae=s(G),ge=a(ae,G),he=f(ae,ge,G),g([ae,ge,he],G)};function s(G){if(i.length>0){var ae=X(G.hue),ge=P(ae),he=(ae[1]-ae[0])/i.length,Ie=parseInt((ge-ae[0])/he);i[Ie]===!0?Ie=(Ie+2)%i.length:i[Ie]=!0;var re=(ae[0]+Ie*he)%359,oe=(ae[0]+(Ie+1)*he)%359;return ae=[re,oe],ge=P(ae),ge<0&&(ge=360+ge),ge}else{var ae=I(G.hue);return ge=P(ae),ge<0&&(ge=360+ge),ge}}function a(G,ae){if(ae.hue==="monochrome")return 0;if(ae.luminosity==="random")return P([0,100]);var ge=S(G),he=ge[0],Ie=ge[1];switch(ae.luminosity){case"bright":he=55;break;case"dark":he=Ie-10;break;case"light":Ie=55;break}return P([he,Ie])}function f(G,ae,ge){var he=b(G,ae),Ie=100;switch(ge.luminosity){case"dark":Ie=he+20;break;case"light":he=(Ie+he)/2;break;case"random":he=0,Ie=100;break}return P([he,Ie])}function g(G,ae){switch(ae.format){case"hsvArray":return G;case"hslArray":return J(G);case"hsl":var ge=J(G);return"hsl("+ge[0]+", "+ge[1]+"%, "+ge[2]+"%)";case"hsla":var he=J(G),oe=ae.alpha||Math.random();return"hsla("+he[0]+", "+he[1]+"%, "+he[2]+"%, "+oe+")";case"rgbArray":return W(G);case"rgb":var Ie=W(G);return"rgb("+Ie.join(", ")+")";case"rgba":var re=W(G),oe=ae.alpha||Math.random();return"rgba("+re.join(", ")+", "+oe+")";default:return U(G)}}function b(G,ae){for(var ge=B(G).lowerBounds,he=0;he<ge.length-1;he++){var Ie=ge[he][0],re=ge[he][1],oe=ge[he+1][0],Se=ge[he+1][1];if(ae>=Ie&&ae<=oe){var ye=(Se-re)/(oe-Ie),nt=re-ye*Ie;return ye*ae+nt}}return 0}function I(G){if(typeof parseInt(G)=="number"){var ae=parseInt(G);if(ae<360&&ae>0)return[ae,ae]}if(typeof G=="string"){if(n[G]){var ge=n[G];if(ge.hueRange)return ge.hueRange}else if(G.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var he=ee(G)[0];return[he,he]}}return[0,360]}function S(G){return B(G).saturationRange}function B(G){G>=334&&G<=360&&(G-=360);for(var ae in n){var ge=n[ae];if(ge.hueRange&&G>=ge.hueRange[0]&&G<=ge.hueRange[1])return n[ae]}return"Color not found"}function P(G){if(e===null){var ae=.618033988749895,ge=Math.random();return ge+=ae,ge%=1,Math.floor(G[0]+ge*(G[1]+1-G[0]))}else{var he=G[1]||1,Ie=G[0]||0;e=(e*9301+49297)%233280;var re=e/233280;return Math.floor(Ie+re*(he-Ie))}}function U(G){var ae=W(G);function ge(Ie){var re=Ie.toString(16);return re.length==1?"0"+re:re}var he="#"+ge(ae[0])+ge(ae[1])+ge(ae[2]);return he}function j(G,ae,ge){var he=ge[0][0],Ie=ge[ge.length-1][0],re=ge[ge.length-1][1],oe=ge[0][1];n[G]={hueRange:ae,lowerBounds:ge,saturationRange:[he,Ie],brightnessRange:[re,oe]}}function q(){j("monochrome",null,[[0,0],[100,0]]),j("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),j("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),j("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),j("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),j("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),j("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),j("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function W(G){var ae=G[0];ae===0&&(ae=1),ae===360&&(ae=359),ae=ae/360;var ge=G[1]/100,he=G[2]/100,Ie=Math.floor(ae*6),re=ae*6-Ie,oe=he*(1-ge),Se=he*(1-re*ge),ye=he*(1-(1-re)*ge),nt=256,Ne=256,je=256;switch(Ie){case 0:nt=he,Ne=ye,je=oe;break;case 1:nt=Se,Ne=he,je=oe;break;case 2:nt=oe,Ne=he,je=ye;break;case 3:nt=oe,Ne=Se,je=he;break;case 4:nt=ye,Ne=oe,je=he;break;case 5:nt=he,Ne=oe,je=Se;break}var et=[Math.floor(nt*255),Math.floor(Ne*255),Math.floor(je*255)];return et}function ee(G){G=G.replace(/^#/,""),G=G.length===3?G.replace(/(.)/g,"$1$1"):G;var ae=parseInt(G.substr(0,2),16)/255,ge=parseInt(G.substr(2,2),16)/255,he=parseInt(G.substr(4,2),16)/255,Ie=Math.max(ae,ge,he),re=Ie-Math.min(ae,ge,he),oe=Ie?re/Ie:0;switch(Ie){case ae:return[60*((ge-he)/re%6)||0,oe,Ie];case ge:return[60*((he-ae)/re+2)||0,oe,Ie];case he:return[60*((ae-ge)/re+4)||0,oe,Ie]}}function J(G){var ae=G[0],ge=G[1]/100,he=G[2]/100,Ie=(2-ge)*he;return[ae,Math.round(ge*he/(Ie<1?Ie:2-Ie)*1e4)/100,Ie/2*100]}function $(G){for(var ae=0,ge=0;ge!==G.length&&!(ae>=Number.MAX_SAFE_INTEGER);ge++)ae+=G.charCodeAt(ge);return ae}function X(G){if(isNaN(G)){if(typeof G=="string"){if(n[G]){var ge=n[G];if(ge.hueRange)return ge.hueRange}else if(G.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var he=ee(G)[0];return B(he).hueRange}}}else{var ae=parseInt(G);if(ae<360&&ae>0)return B(G).hueRange}return[0,360]}return o})}(Py,Py.exports)),Py.exports}var iY=rY();const oY=us(iY);function aY(r,t){let e="bright",n;return/water|ocean|lake|sea|river/.test(r)&&(n="blue"),/state|country|place/.test(r)&&(n="pink"),/road|highway|transport|streets/.test(r)&&(n="orange"),/contour|building|earth/.test(r)&&(n="monochrome"),/building/.test(r)&&(e="dark"),/earth/.test(r)&&(e="light"),/contour|landuse/.test(r)&&(n="yellow"),/wood|forest|park|landcover|land|natural/.test(r)&&(n="green"),`rgba(${oY({luminosity:e,hue:n,seed:r,format:"rgbArray"}).join(", ")}, ${t||"1"})`}const ED={brightColor:aY};var Tx={exports:{}},Px,vI;function sY(){if(vI)return Px;vI=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Px=r,Px}var Kx,_I;function lY(){if(_I)return Kx;_I=1;var r=sY();function t(){}function e(){}return e.resetWarningCache=t,Kx=function(){function n(s,a,f,g,b,I){if(I!==r){var S=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 S.name="Invariant Violation",S}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:e,resetWarningCache:t};return o.PropTypes=o,o},Kx}var CI;function qf(){return CI||(CI=1,Tx.exports=lY()()),Tx.exports}var uY=qf();const mi=us(uY);var bI=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r};function AY(r,t){var e={};for(var n in r)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}var o0=function(t,e){var n=t.children,i=t.color,o=t.size,s=t.style,a=t.width,f=t.height,g=AY(t,["children","color","size","style","width","height"]),b=e.reactIconBase,I=b===void 0?{}:b,S=o||I.size||"1em";return Zn.createElement("svg",bI({children:n,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:f||S,width:a||S},I,g,{style:bI({verticalAlign:"middle",color:i||I.color},I.style||{},s)}))};o0.propTypes={color:mi.string,size:mi.oneOfType([mi.string,mi.number]),width:mi.oneOfType([mi.string,mi.number]),height:mi.oneOfType([mi.string,mi.number]),style:mi.object};o0.contextTypes={reactIconBase:mi.shape(o0.propTypes)};function zC(){var r="/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx",t="ace6118dd0ae83e2ceb20b70664ae2267741d924",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return zC=function(){return s},s}zC();class cY extends Zn.Component{render(){return zC().f[0]++,zC().s[0]++,ue.jsx(o0,{viewBox:"0 0 20 20",...this.props,children:ue.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 NC(){var r="/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx",t="8b9fc49e8fc93b42e35f3a9b2accdbccf6dcdb84",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return NC=function(){return s},s}NC();class R_ extends Zn.Component{render(){return NC().f[0]++,NC().s[0]++,ue.jsx(o0,{viewBox:"0 0 20 20",...this.props,children:ue.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 GC(){var r="/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx",t="6ac2e596376f8b8c2e117c4345e33d1afb8f583b",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return GC=function(){return s},s}GC();class dY extends Zn.Component{render(){return GC().f[0]++,GC().s[0]++,ue.jsx(o0,{viewBox:"0 0 20 20",...this.props,children:ue.jsx("g",{transform:"matrix(1.2718518,0,0,1.2601269,16.559526,-7.4065264)",children:ue.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 WC(){var r="/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx",t="f8813cd7d4a9138ff3fc7253bc195b86370ed6cf",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return WC=function(){return s},s}WC();class xI extends Zn.Component{render(){return WC().f[0]++,WC().s[0]++,ue.jsx(o0,{viewBox:"0 0 20 20",...this.props,children:ue.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 QC(){var r="/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx",t="35a8c3687dcdeffeb7f2fe2d9c05ced9e802b5ca",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return QC=function(){return s},s}QC();class hY extends Zn.Component{render(){return QC().f[0]++,QC().s[0]++,ue.jsx(o0,{viewBox:"0 0 20 20",...this.props,children:ue.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 Y1(r){return Yl({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:[]}]})(r)}function fY(r){return Yl({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:[]}]})(r)}function pY(r){return Yl({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:[]}]})(r)}function mY(r){return Yl({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:[]}]})(r)}function gY(r){return Yl({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:[]}]})(r)}function yY(r){return Yl({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:[]}]})(r)}function vY(r){return Yl({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:[]}]})(r)}function _Y(r){return Yl({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:[]}]})(r)}function CY(r){return Yl({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:[]}]})(r)}function bY(r){return Yl({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:[]}]})(r)}function OD(r){return Yl({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:[]}]})(r)}function xY(r){return Yl({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:[]}]})(r)}function OS(r){return Yl({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(r)}function wY(r){return Yl({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:[]}]})(r)}function MY(r){return Yl({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:[]}]})(r)}function SY(r){return Yl({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:[]}]})(r)}function wI(r){return Yl({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:[]}]})(r)}function EY(r){return Yl({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:[]}]})(r)}function OY(r){return Yl({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"},child:[]}]})(r)}function BY(r){return Yl({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:[]}]})(r)}function IY(r){return Yl({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:[]}]})(r)}function kY(r){return Yl({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:[]}]})(r)}function TY(r){return Yl({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:[]}]})(r)}function PY(r){return Yl({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:[]}]})(r)}function qC(){var r="/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx",t="90c8ed80956547e1dbbdff164a42850c33eed62e",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return qC=function(){return s},s}qC();class KY extends Zn.Component{render(){return qC().f[0]++,qC().s[0]++,ue.jsx(PY,{...this.props})}}function Il(){var r="/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",t="89bd7eb08374d10a1476c7cf1e0e39f530ce1ff1",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Il=function(){return s},s}Il();class BD extends Zn.Component{render(){Il().f[0]++;const t=(Il().s[0]++,{style:this.props.style});switch(Il().s[1]++,this.props.type){case"fill-extrusion":return Il().b[0][0]++,Il().s[2]++,ue.jsx(xI,{...t});case"raster":return Il().b[0][1]++,Il().s[3]++,ue.jsx(R_,{...t});case"hillshade":return Il().b[0][2]++,Il().s[4]++,ue.jsx(R_,{...t});case"heatmap":return Il().b[0][3]++,Il().s[5]++,ue.jsx(R_,{...t});case"fill":return Il().b[0][4]++,Il().s[6]++,ue.jsx(R_,{...t});case"background":return Il().b[0][5]++,Il().s[7]++,ue.jsx(xI,{...t});case"line":return Il().b[0][6]++,Il().s[8]++,ue.jsx(cY,{...t});case"symbol":return Il().b[0][7]++,Il().s[9]++,ue.jsx(dY,{...t});case"circle":return Il().b[0][8]++,Il().s[10]++,ue.jsx(hY,{...t});default:return Il().b[0][9]++,Il().s[11]++,ue.jsx(KY,{...t})}}}function ti(){var r="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",t="ea1e9940e142b9a2a1c672f6983f6f5748c841e6",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ti=function(){return s},s}ti();function RY(r){ti().f[0]++;const t=(ti().s[0]++,{}),e=(ti().s[1]++,{});return ti().s[2]++,r.forEach(n=>{ti().f[1]++;const i=(ti().s[3]++,n.layer["source-layer"]);if(ti().s[4]++,Object.prototype.hasOwnProperty.call(e,n.layer.id)){ti().b[0][0]++,ti().s[5]++,e[n.layer.id]++;const o=(ti().s[6]++,t[i].find(s=>(ti().f[2]++,ti().s[7]++,s.layer.id===n.layer.id)));ti().s[8]++,o.counter=e[n.layer.id]}else ti().b[0][1]++,ti().s[9]++,t[i]=(ti().b[1][0]++,t[i]||(ti().b[1][1]++,[])),ti().s[10]++,t[i].push(n),ti().s[11]++,e[n.layer.id]=1}),ti().s[12]++,t}class ID extends Zn.Component{_getFeatureColor(t,e){if(ti().f[3]++,ti().s[13]++,t.layer.paint)ti().b[2][1]++;else{ti().b[2][0]++,ti().s[14]++;return}ti().s[15]++;try{const n=(ti().s[16]++,t.layer.paint);return ti().s[17]++,ti().b[4][0]++,"text-color"in n&&(ti().b[4][1]++,n["text-color"])?(ti().b[3][0]++,ti().s[18]++,String(n["text-color"])):(ti().b[3][1]++,ti().s[19]++,ti().b[6][0]++,"fill-color"in n&&(ti().b[6][1]++,n["fill-color"])?(ti().b[5][0]++,ti().s[20]++,String(n["fill-color"])):(ti().b[5][1]++,ti().s[21]++,ti().b[8][0]++,"line-color"in n&&(ti().b[8][1]++,n["line-color"])?(ti().b[7][0]++,ti().s[22]++,String(n["line-color"])):(ti().b[7][1]++,ti().s[23]++,ti().b[10][0]++,"fill-extrusion-color"in n&&(ti().b[10][1]++,n["fill-extrusion-color"])?(ti().b[9][0]++,ti().s[24]++,String(n["fill-extrusion-color"])):(ti().b[9][1]++,ti().s[25]++,"black"))))}catch(n){return ti().s[26]++,console.warn("Unable to get feature color, error:",n),ti().s[27]++,"black"}}render(){ti().f[4]++;const t=(ti().s[28]++,RY(this.props.features)),e=(ti().s[29]++,Object.keys(t).map(n=>{ti().f[5]++;const i=(ti().s[30]++,t[n].map((o,s)=>{ti().f[6]++;const a=(ti().s[31]++,this._getFeatureColor(o,this.props.zoom));return ti().s[32]++,ue.jsxs("div",{className:"maputnik-popup-layer",children:[ue.jsx("div",{className:"maputnik-popup-layer__swatch",style:{background:a}}),ue.jsxs("label",{className:"maputnik-popup-layer__label",onClick:()=>{ti().f[7]++,ti().s[33]++,this.props.onLayerSelect(o.layer.id)},children:[(ti().b[11][0]++,o.layer.type&&(ti().b[11][1]++,ue.jsx(BD,{type:o.layer.type,style:{width:14,height:14,paddingRight:3}}))),o.layer.id,(ti().b[12][0]++,o.counter&&(ti().b[12][1]++,ue.jsxs("span",{children:[" × ",o.counter]})))]})]},s)}));return ti().s[34]++,ue.jsxs("div",{children:[ue.jsx("div",{className:"maputnik-popup-layer-id",children:n}),i]},n)}));return ti().s[35]++,ue.jsx("div",{className:"maputnik-feature-layer-popup",children:e})}}function $i(){var r="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",t="72aafaa905031d9408c36c83b71947160ac6dbad",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",statementMap:{0:{start:{line:4,column:2},end:{line:4,column:67}},1:{start:{line:4,column:54},end:{line:4,column:67}},2:{start:{line:5,column:2},end:{line:5,column:59}},3:{start:{line:5,column:29},end:{line:5,column:59}},4:{start:{line:6,column:2},end:{line:6,column:115}},5:{start:{line:6,column:91},end:{line:6,column:115}},6:{start:{line:7,column:2},end:{line:7,column:15}},7:{start:{line:10,column:2},end:{line:13,column:12}},8:{start:{line:16,column:2},end:{line:32,column:12}},9:{start:{line:29,column:23},end:{line:29,column:55}},10:{start:{line:30,column:6},end:{line:30,column:74}},11:{start:{line:35,column:25},end:{line:35,column:27}},12:{start:{line:36,column:2},end:{line:49,column:5}},13:{start:{line:37,column:25},end:{line:39,column:6}},14:{start:{line:38,column:6},end:{line:38,column:156}},15:{start:{line:40,column:4},end:{line:48,column:5}},16:{start:{line:41,column:6},end:{line:41,column:35}},17:{start:{line:43,column:6},end:{line:47,column:7}},18:{start:{line:44,column:8},end:{line:44,column:58}},19:{start:{line:46,column:8},end:{line:46,column:60}},20:{start:{line:50,column:2},end:{line:50,column:24}},21:{start:{line:54,column:21},end:{line:54,column:66}},22:{start:{line:55,column:4},end:{line:55,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:8,column:1}},line:3},1:{name:"renderKeyValueTableRow",decl:{start:{line:9,column:9},end:{line:9,column:31}},loc:{start:{line:9,column:44},end:{line:14,column:1}},line:9},2:{name:"renderFeature",decl:{start:{line:15,column:9},end:{line:15,column:22}},loc:{start:{line:15,column:37},end:{line:33,column:1}},line:15},3:{name:"(anonymous_3)",decl:{start:{line:28,column:40},end:{line:28,column:41}},loc:{start:{line:28,column:58},end:{line:31,column:5}},line:28},4:{name:"removeDuplicatedFeatures",decl:{start:{line:34,column:9},end:{line:34,column:33}},loc:{start:{line:34,column:44},end:{line:51,column:1}},line:34},5:{name:"(anonymous_5)",decl:{start:{line:36,column:19},end:{line:36,column:20}},loc:{start:{line:36,column:32},end:{line:49,column:3}},line:36},6:{name:"(anonymous_6)",decl:{start:{line:37,column:50},end:{line:37,column:51}},loc:{start:{line:37,column:64},end:{line:39,column:5}},line:37},7:{name:"(anonymous_7)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:56,column:3}},line:53}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:4,column:67}},type:"if",locations:[{start:{line:4,column:2},end:{line:4,column:67}},{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:5,column:2},end:{line:5,column:59}},type:"if",locations:[{start:{line:5,column:2},end:{line:5,column:59}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5},3:{loc:{start:{line:6,column:2},end:{line:6,column:115}},type:"if",locations:[{start:{line:6,column:2},end:{line:6,column:115}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},4:{loc:{start:{line:6,column:6},end:{line:6,column:89}},type:"binary-expr",locations:[{start:{line:6,column:6},end:{line:6,column:31}},{start:{line:6,column:35},end:{line:6,column:60}},{start:{line:6,column:64},end:{line:6,column:89}}],line:6},5:{loc:{start:{line:21,column:6},end:{line:24,column:10}},type:"binary-expr",locations:[{start:{line:21,column:6},end:{line:21,column:32}},{start:{line:21,column:52},end:{line:24,column:10}}],line:21},6:{loc:{start:{line:38,column:13},end:{line:38,column:155}},type:"binary-expr",locations:[{start:{line:38,column:13},end:{line:38,column:77}},{start:{line:38,column:81},end:{line:38,column:155}}],line:38},7:{loc:{start:{line:40,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:40,column:4},end:{line:48,column:5}},{start:{line:42,column:11},end:{line:48,column:5}}],line:40},8:{loc:{start:{line:43,column:6},end:{line:47,column:7}},type:"if",locations:[{start:{line:43,column:6},end:{line:47,column:7}},{start:{line:45,column:13},end:{line:47,column:7}}],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},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,KAAM,QAAO;AAC3D,MAAI,iBAAiB,KAAM,QAAO,MAAM,eAAe;AACvD,MAAI,OAAO,UAAU,YACb,OAAO,UAAU,YACjB,OAAO,UAAU,SAAU,QAAO,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:"72aafaa905031d9408c36c83b71947160ac6dbad"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return $i=function(){return s},s}$i();function MI(r){return $i().f[0]++,$i().s[0]++,$i().b[1][0]++,typeof r>"u"||($i().b[1][1]++,r===null)?($i().b[0][0]++,$i().s[1]++,r):($i().b[0][1]++,$i().s[2]++,r instanceof Date?($i().b[2][0]++,$i().s[3]++,r.toLocaleString()):($i().b[2][1]++,$i().s[4]++,$i().b[4][0]++,typeof r=="object"||($i().b[4][1]++,typeof r=="number")||($i().b[4][2]++,typeof r=="string")?($i().b[3][0]++,$i().s[5]++,r.toString()):($i().b[3][1]++,$i().s[6]++,r)))}function Rx(r,t){return $i().f[1]++,$i().s[7]++,ue.jsxs("tr",{children:[ue.jsx("td",{className:"maputnik-popup-table-cell",children:r}),ue.jsx("td",{className:"maputnik-popup-table-cell",children:t})]},r)}function DY(r,t){return $i().f[2]++,$i().s[8]++,ue.jsxs(Zn.Fragment,{children:[ue.jsx("tr",{children:ue.jsxs("td",{colSpan:2,className:"maputnik-popup-layer-id",children:[r.layer.source,": ",r.layer["source-layer"],($i().b[5][0]++,r.inspectModeCounter&&($i().b[5][1]++,ue.jsxs("span",{children:[" × ",r.inspectModeCounter]})))]})}),Rx("$type",r.geometry.type),Rx("$id",MI(r.id)),Object.keys(r.properties).map(e=>{$i().f[3]++;const n=($i().s[9]++,r.properties[e]);return $i().s[10]++,Rx(e,MI(n))})]},t)}function LY(r){$i().f[4]++;const t=($i().s[11]++,[]);return $i().s[12]++,r.forEach(e=>{$i().f[5]++;const n=($i().s[13]++,t.findIndex(i=>($i().f[6]++,$i().s[14]++,$i().b[6][0]++,e.layer["source-layer"]===i.layer["source-layer"]&&($i().b[6][1]++,JSON.stringify(e.properties)===JSON.stringify(i.properties)))));$i().s[15]++,n===-1?($i().b[7][0]++,$i().s[16]++,t.push(e)):($i().b[7][1]++,$i().s[17]++,"inspectModeCounter"in t[n]?($i().b[8][0]++,$i().s[18]++,t[n].inspectModeCounter++):($i().b[8][1]++,$i().s[19]++,t[n].inspectModeCounter=2))}),$i().s[20]++,t}class FY extends Zn.Component{render(){$i().f[7]++;const t=($i().s[21]++,LY(this.props.features));return $i().s[22]++,ue.jsx("div",{className:"maputnik-feature-property-popup",children:ue.jsx("table",{className:"maputnik-popup-table",children:ue.jsx("tbody",{children:t.map(DY)})})})}}var Dx={exports:{}},Lx,SI;function kD(){return SI||(SI=1,Lx={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]}),Lx}var Fx={exports:{}},Ux,EI;function UY(){return EI||(EI=1,Ux=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}),Ux}var OI;function jY(){if(OI)return Fx.exports;OI=1;var r=UY(),t=Array.prototype.concat,e=Array.prototype.slice,n=Fx.exports=function(o){for(var s=[],a=0,f=o.length;a<f;a++){var g=o[a];r(g)?s=t.call(s,e.call(g)):s.push(g)}return s};return n.wrap=function(i){return function(){return i(n(arguments))}},Fx.exports}var BI;function zY(){if(BI)return Dx.exports;BI=1;var r=kD(),t=jY(),e=Object.hasOwnProperty,n=Object.create(null);for(var i in r)e.call(r,i)&&(n[r[i]]=i);var o=Dx.exports={to:{},get:{}};o.get=function(f){var g=f.substring(0,3).toLowerCase(),b,I;switch(g){case"hsl":b=o.get.hsl(f),I="hsl";break;case"hwb":b=o.get.hwb(f),I="hwb";break;default:b=o.get.rgb(f),I="rgb";break}return b?{model:I,value:b}:null},o.get.rgb=function(f){if(!f)return null;var g=/^#([a-f0-9]{3,4})$/i,b=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,I=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,S=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,B=/^(\w+)$/,P=[0,0,0,1],U,j,q;if(U=f.match(b)){for(q=U[2],U=U[1],j=0;j<3;j++){var W=j*2;P[j]=parseInt(U.slice(W,W+2),16)}q&&(P[3]=parseInt(q,16)/255)}else if(U=f.match(g)){for(U=U[1],q=U[3],j=0;j<3;j++)P[j]=parseInt(U[j]+U[j],16);q&&(P[3]=parseInt(q+q,16)/255)}else if(U=f.match(I)){for(j=0;j<3;j++)P[j]=parseInt(U[j+1],0);U[4]&&(U[5]?P[3]=parseFloat(U[4])*.01:P[3]=parseFloat(U[4]))}else if(U=f.match(S)){for(j=0;j<3;j++)P[j]=Math.round(parseFloat(U[j+1])*2.55);U[4]&&(U[5]?P[3]=parseFloat(U[4])*.01:P[3]=parseFloat(U[4]))}else return(U=f.match(B))?U[1]==="transparent"?[0,0,0,0]:e.call(r,U[1])?(P=r[U[1]],P[3]=1,P):null:null;for(j=0;j<3;j++)P[j]=s(P[j],0,255);return P[3]=s(P[3],0,1),P},o.get.hsl=function(f){if(!f)return null;var g=/^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*)?\)$/,b=f.match(g);if(b){var I=parseFloat(b[4]),S=(parseFloat(b[1])%360+360)%360,B=s(parseFloat(b[2]),0,100),P=s(parseFloat(b[3]),0,100),U=s(isNaN(I)?1:I,0,1);return[S,B,P,U]}return null},o.get.hwb=function(f){if(!f)return null;var g=/^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*)?\)$/,b=f.match(g);if(b){var I=parseFloat(b[4]),S=(parseFloat(b[1])%360+360)%360,B=s(parseFloat(b[2]),0,100),P=s(parseFloat(b[3]),0,100),U=s(isNaN(I)?1:I,0,1);return[S,B,P,U]}return null},o.to.hex=function(){var f=t(arguments);return"#"+a(f[0])+a(f[1])+a(f[2])+(f[3]<1?a(Math.round(f[3]*255)):"")},o.to.rgb=function(){var f=t(arguments);return f.length<4||f[3]===1?"rgb("+Math.round(f[0])+", "+Math.round(f[1])+", "+Math.round(f[2])+")":"rgba("+Math.round(f[0])+", "+Math.round(f[1])+", "+Math.round(f[2])+", "+f[3]+")"},o.to.rgb.percent=function(){var f=t(arguments),g=Math.round(f[0]/255*100),b=Math.round(f[1]/255*100),I=Math.round(f[2]/255*100);return f.length<4||f[3]===1?"rgb("+g+"%, "+b+"%, "+I+"%)":"rgba("+g+"%, "+b+"%, "+I+"%, "+f[3]+")"},o.to.hsl=function(){var f=t(arguments);return f.length<4||f[3]===1?"hsl("+f[0]+", "+f[1]+"%, "+f[2]+"%)":"hsla("+f[0]+", "+f[1]+"%, "+f[2]+"%, "+f[3]+")"},o.to.hwb=function(){var f=t(arguments),g="";return f.length>=4&&f[3]!==1&&(g=", "+f[3]),"hwb("+f[0]+", "+f[1]+"%, "+f[2]+"%"+g+")"},o.to.keyword=function(f){return n[f.slice(0,3)]};function s(f,g,b){return Math.min(Math.max(g,f),b)}function a(f){var g=Math.round(f).toString(16).toUpperCase();return g.length<2?"0"+g:g}return Dx.exports}var jx,II;function TD(){if(II)return jx;II=1;const r=kD(),t={};for(const i of Object.keys(r))t[r[i]]=i;const e={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"]}};jx=e;for(const i of Object.keys(e)){if(!("channels"in e[i]))throw new Error("missing channels property: "+i);if(!("labels"in e[i]))throw new Error("missing channel labels property: "+i);if(e[i].labels.length!==e[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:o,labels:s}=e[i];delete e[i].channels,delete e[i].labels,Object.defineProperty(e[i],"channels",{value:o}),Object.defineProperty(e[i],"labels",{value:s})}e.rgb.hsl=function(i){const o=i[0]/255,s=i[1]/255,a=i[2]/255,f=Math.min(o,s,a),g=Math.max(o,s,a),b=g-f;let I,S;g===f?I=0:o===g?I=(s-a)/b:s===g?I=2+(a-o)/b:a===g&&(I=4+(o-s)/b),I=Math.min(I*60,360),I<0&&(I+=360);const B=(f+g)/2;return g===f?S=0:B<=.5?S=b/(g+f):S=b/(2-g-f),[I,S*100,B*100]},e.rgb.hsv=function(i){let o,s,a,f,g;const b=i[0]/255,I=i[1]/255,S=i[2]/255,B=Math.max(b,I,S),P=B-Math.min(b,I,S),U=function(j){return(B-j)/6/P+1/2};return P===0?(f=0,g=0):(g=P/B,o=U(b),s=U(I),a=U(S),b===B?f=a-s:I===B?f=1/3+o-a:S===B&&(f=2/3+s-o),f<0?f+=1:f>1&&(f-=1)),[f*360,g*100,B*100]},e.rgb.hwb=function(i){const o=i[0],s=i[1];let a=i[2];const f=e.rgb.hsl(i)[0],g=1/255*Math.min(o,Math.min(s,a));return a=1-1/255*Math.max(o,Math.max(s,a)),[f,g*100,a*100]},e.rgb.cmyk=function(i){const o=i[0]/255,s=i[1]/255,a=i[2]/255,f=Math.min(1-o,1-s,1-a),g=(1-o-f)/(1-f)||0,b=(1-s-f)/(1-f)||0,I=(1-a-f)/(1-f)||0;return[g*100,b*100,I*100,f*100]};function n(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}return e.rgb.keyword=function(i){const o=t[i];if(o)return o;let s=1/0,a;for(const f of Object.keys(r)){const g=r[f],b=n(i,g);b<s&&(s=b,a=f)}return a},e.keyword.rgb=function(i){return r[i]},e.rgb.xyz=function(i){let o=i[0]/255,s=i[1]/255,a=i[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const f=o*.4124+s*.3576+a*.1805,g=o*.2126+s*.7152+a*.0722,b=o*.0193+s*.1192+a*.9505;return[f*100,g*100,b*100]},e.rgb.lab=function(i){const o=e.rgb.xyz(i);let s=o[0],a=o[1],f=o[2];s/=95.047,a/=100,f/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,f=f>.008856?f**(1/3):7.787*f+16/116;const g=116*a-16,b=500*(s-a),I=200*(a-f);return[g,b,I]},e.hsl.rgb=function(i){const o=i[0]/360,s=i[1]/100,a=i[2]/100;let f,g,b;if(s===0)return b=a*255,[b,b,b];a<.5?f=a*(1+s):f=a+s-a*s;const I=2*a-f,S=[0,0,0];for(let B=0;B<3;B++)g=o+1/3*-(B-1),g<0&&g++,g>1&&g--,6*g<1?b=I+(f-I)*6*g:2*g<1?b=f:3*g<2?b=I+(f-I)*(2/3-g)*6:b=I,S[B]=b*255;return S},e.hsl.hsv=function(i){const o=i[0];let s=i[1]/100,a=i[2]/100,f=s;const g=Math.max(a,.01);a*=2,s*=a<=1?a:2-a,f*=g<=1?g:2-g;const b=(a+s)/2,I=a===0?2*f/(g+f):2*s/(a+s);return[o,I*100,b*100]},e.hsv.rgb=function(i){const o=i[0]/60,s=i[1]/100;let a=i[2]/100;const f=Math.floor(o)%6,g=o-Math.floor(o),b=255*a*(1-s),I=255*a*(1-s*g),S=255*a*(1-s*(1-g));switch(a*=255,f){case 0:return[a,S,b];case 1:return[I,a,b];case 2:return[b,a,S];case 3:return[b,I,a];case 4:return[S,b,a];case 5:return[a,b,I]}},e.hsv.hsl=function(i){const o=i[0],s=i[1]/100,a=i[2]/100,f=Math.max(a,.01);let g,b;b=(2-s)*a;const I=(2-s)*f;return g=s*f,g/=I<=1?I:2-I,g=g||0,b/=2,[o,g*100,b*100]},e.hwb.rgb=function(i){const o=i[0]/360;let s=i[1]/100,a=i[2]/100;const f=s+a;let g;f>1&&(s/=f,a/=f);const b=Math.floor(6*o),I=1-a;g=6*o-b,b&1&&(g=1-g);const S=s+g*(I-s);let B,P,U;switch(b){default:case 6:case 0:B=I,P=S,U=s;break;case 1:B=S,P=I,U=s;break;case 2:B=s,P=I,U=S;break;case 3:B=s,P=S,U=I;break;case 4:B=S,P=s,U=I;break;case 5:B=I,P=s,U=S;break}return[B*255,P*255,U*255]},e.cmyk.rgb=function(i){const o=i[0]/100,s=i[1]/100,a=i[2]/100,f=i[3]/100,g=1-Math.min(1,o*(1-f)+f),b=1-Math.min(1,s*(1-f)+f),I=1-Math.min(1,a*(1-f)+f);return[g*255,b*255,I*255]},e.xyz.rgb=function(i){const o=i[0]/100,s=i[1]/100,a=i[2]/100;let f,g,b;return f=o*3.2406+s*-1.5372+a*-.4986,g=o*-.9689+s*1.8758+a*.0415,b=o*.0557+s*-.204+a*1.057,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,g=g>.0031308?1.055*g**(1/2.4)-.055:g*12.92,b=b>.0031308?1.055*b**(1/2.4)-.055:b*12.92,f=Math.min(Math.max(0,f),1),g=Math.min(Math.max(0,g),1),b=Math.min(Math.max(0,b),1),[f*255,g*255,b*255]},e.xyz.lab=function(i){let o=i[0],s=i[1],a=i[2];o/=95.047,s/=100,a/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const f=116*s-16,g=500*(o-s),b=200*(s-a);return[f,g,b]},e.lab.xyz=function(i){const o=i[0],s=i[1],a=i[2];let f,g,b;g=(o+16)/116,f=s/500+g,b=g-a/200;const I=g**3,S=f**3,B=b**3;return g=I>.008856?I:(g-16/116)/7.787,f=S>.008856?S:(f-16/116)/7.787,b=B>.008856?B:(b-16/116)/7.787,f*=95.047,g*=100,b*=108.883,[f,g,b]},e.lab.lch=function(i){const o=i[0],s=i[1],a=i[2];let f;f=Math.atan2(a,s)*360/2/Math.PI,f<0&&(f+=360);const b=Math.sqrt(s*s+a*a);return[o,b,f]},e.lch.lab=function(i){const o=i[0],s=i[1],f=i[2]/360*2*Math.PI,g=s*Math.cos(f),b=s*Math.sin(f);return[o,g,b]},e.rgb.ansi16=function(i,o=null){const[s,a,f]=i;let g=o===null?e.rgb.hsv(i)[2]:o;if(g=Math.round(g/50),g===0)return 30;let b=30+(Math.round(f/255)<<2|Math.round(a/255)<<1|Math.round(s/255));return g===2&&(b+=60),b},e.hsv.ansi16=function(i){return e.rgb.ansi16(e.hsv.rgb(i),i[2])},e.rgb.ansi256=function(i){const o=i[0],s=i[1],a=i[2];return o===s&&s===a?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(s/255*5)+Math.round(a/255*5)},e.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const s=(~~(i>50)+1)*.5,a=(o&1)*s*255,f=(o>>1&1)*s*255,g=(o>>2&1)*s*255;return[a,f,g]},e.ansi256.rgb=function(i){if(i>=232){const g=(i-232)*10+8;return[g,g,g]}i-=16;let o;const s=Math.floor(i/36)/5*255,a=Math.floor((o=i%36)/6)/5*255,f=o%6/5*255;return[s,a,f]},e.rgb.hex=function(i){const s=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},e.hex.rgb=function(i){const o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let s=o[0];o[0].length===3&&(s=s.split("").map(I=>I+I).join(""));const a=parseInt(s,16),f=a>>16&255,g=a>>8&255,b=a&255;return[f,g,b]},e.rgb.hcg=function(i){const o=i[0]/255,s=i[1]/255,a=i[2]/255,f=Math.max(Math.max(o,s),a),g=Math.min(Math.min(o,s),a),b=f-g;let I,S;return b<1?I=g/(1-b):I=0,b<=0?S=0:f===o?S=(s-a)/b%6:f===s?S=2+(a-o)/b:S=4+(o-s)/b,S/=6,S%=1,[S*360,b*100,I*100]},e.hsl.hcg=function(i){const o=i[1]/100,s=i[2]/100,a=s<.5?2*o*s:2*o*(1-s);let f=0;return a<1&&(f=(s-.5*a)/(1-a)),[i[0],a*100,f*100]},e.hsv.hcg=function(i){const o=i[1]/100,s=i[2]/100,a=o*s;let f=0;return a<1&&(f=(s-a)/(1-a)),[i[0],a*100,f*100]},e.hcg.rgb=function(i){const o=i[0]/360,s=i[1]/100,a=i[2]/100;if(s===0)return[a*255,a*255,a*255];const f=[0,0,0],g=o%1*6,b=g%1,I=1-b;let S=0;switch(Math.floor(g)){case 0:f[0]=1,f[1]=b,f[2]=0;break;case 1:f[0]=I,f[1]=1,f[2]=0;break;case 2:f[0]=0,f[1]=1,f[2]=b;break;case 3:f[0]=0,f[1]=I,f[2]=1;break;case 4:f[0]=b,f[1]=0,f[2]=1;break;default:f[0]=1,f[1]=0,f[2]=I}return S=(1-s)*a,[(s*f[0]+S)*255,(s*f[1]+S)*255,(s*f[2]+S)*255]},e.hcg.hsv=function(i){const o=i[1]/100,s=i[2]/100,a=o+s*(1-o);let f=0;return a>0&&(f=o/a),[i[0],f*100,a*100]},e.hcg.hsl=function(i){const o=i[1]/100,a=i[2]/100*(1-o)+.5*o;let f=0;return a>0&&a<.5?f=o/(2*a):a>=.5&&a<1&&(f=o/(2*(1-a))),[i[0],f*100,a*100]},e.hcg.hwb=function(i){const o=i[1]/100,s=i[2]/100,a=o+s*(1-o);return[i[0],(a-o)*100,(1-a)*100]},e.hwb.hcg=function(i){const o=i[1]/100,a=1-i[2]/100,f=a-o;let g=0;return f<1&&(g=(a-f)/(1-f)),[i[0],f*100,g*100]},e.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},e.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},e.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},e.gray.hsl=function(i){return[0,0,i[0]]},e.gray.hsv=e.gray.hsl,e.gray.hwb=function(i){return[0,100,i[0]]},e.gray.cmyk=function(i){return[0,0,0,i[0]]},e.gray.lab=function(i){return[i[0],0,0]},e.gray.hex=function(i){const o=Math.round(i[0]/100*255)&255,a=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(a.length)+a},e.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},jx}var zx,kI;function NY(){if(kI)return zx;kI=1;const r=TD();function t(){const o={},s=Object.keys(r);for(let a=s.length,f=0;f<a;f++)o[s[f]]={distance:-1,parent:null};return o}function e(o){const s=t(),a=[o];for(s[o].distance=0;a.length;){const f=a.pop(),g=Object.keys(r[f]);for(let b=g.length,I=0;I<b;I++){const S=g[I],B=s[S];B.distance===-1&&(B.distance=s[f].distance+1,B.parent=f,a.unshift(S))}}return s}function n(o,s){return function(a){return s(o(a))}}function i(o,s){const a=[s[o].parent,o];let f=r[s[o].parent][o],g=s[o].parent;for(;s[g].parent;)a.unshift(s[g].parent),f=n(r[s[g].parent][g],f),g=s[g].parent;return f.conversion=a,f}return zx=function(o){const s=e(o),a={},f=Object.keys(s);for(let g=f.length,b=0;b<g;b++){const I=f[b];s[I].parent!==null&&(a[I]=i(I,s))}return a},zx}var Nx,TI;function GY(){if(TI)return Nx;TI=1;const r=TD(),t=NY(),e={},n=Object.keys(r);function i(s){const a=function(...f){const g=f[0];return g==null?g:(g.length>1&&(f=g),s(f))};return"conversion"in s&&(a.conversion=s.conversion),a}function o(s){const a=function(...f){const g=f[0];if(g==null)return g;g.length>1&&(f=g);const b=s(f);if(typeof b=="object")for(let I=b.length,S=0;S<I;S++)b[S]=Math.round(b[S]);return b};return"conversion"in s&&(a.conversion=s.conversion),a}return n.forEach(s=>{e[s]={},Object.defineProperty(e[s],"channels",{value:r[s].channels}),Object.defineProperty(e[s],"labels",{value:r[s].labels});const a=t(s);Object.keys(a).forEach(g=>{const b=a[g];e[s][g]=o(b),e[s][g].raw=i(b)})}),Nx=e,Nx}var Gx,PI;function WY(){if(PI)return Gx;PI=1;const r=zY(),t=GY(),e=["keyword","gray","hex"],n={};for(const S of Object.keys(t))n[[...t[S].labels].sort().join("")]=S;const i={};function o(S,B){if(!(this instanceof o))return new o(S,B);if(B&&B in e&&(B=null),B&&!(B in t))throw new Error("Unknown model: "+B);let P,U;if(S==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(S instanceof o)this.model=S.model,this.color=[...S.color],this.valpha=S.valpha;else if(typeof S=="string"){const j=r.get(S);if(j===null)throw new Error("Unable to parse color from string: "+S);this.model=j.model,U=t[this.model].channels,this.color=j.value.slice(0,U),this.valpha=typeof j.value[U]=="number"?j.value[U]:1}else if(S.length>0){this.model=B||"rgb",U=t[this.model].channels;const j=Array.prototype.slice.call(S,0,U);this.color=I(j,U),this.valpha=typeof S[U]=="number"?S[U]:1}else if(typeof S=="number")this.model="rgb",this.color=[S>>16&255,S>>8&255,S&255],this.valpha=1;else{this.valpha=1;const j=Object.keys(S);"alpha"in S&&(j.splice(j.indexOf("alpha"),1),this.valpha=typeof S.alpha=="number"?S.alpha:0);const q=j.sort().join("");if(!(q in n))throw new Error("Unable to parse color from object: "+JSON.stringify(S));this.model=n[q];const{labels:W}=t[this.model],ee=[];for(P=0;P<W.length;P++)ee.push(S[W[P]]);this.color=I(ee)}if(i[this.model])for(U=t[this.model].channels,P=0;P<U;P++){const j=i[this.model][P];j&&(this.color[P]=j(this.color[P]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(S){let B=this.model in r.to?this:this.rgb();B=B.round(typeof S=="number"?S:1);const P=B.valpha===1?B.color:[...B.color,this.valpha];return r.to[B.model](P)},percentString(S){const B=this.rgb().round(typeof S=="number"?S:1),P=B.valpha===1?B.color:[...B.color,this.valpha];return r.to.rgb.percent(P)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const S={},{channels:B}=t[this.model],{labels:P}=t[this.model];for(let U=0;U<B;U++)S[P[U]]=this.color[U];return this.valpha!==1&&(S.alpha=this.valpha),S},unitArray(){const S=this.rgb().color;return S[0]/=255,S[1]/=255,S[2]/=255,this.valpha!==1&&S.push(this.valpha),S},unitObject(){const S=this.rgb().object();return S.r/=255,S.g/=255,S.b/=255,this.valpha!==1&&(S.alpha=this.valpha),S},round(S){return S=Math.max(S||0,0),new o([...this.color.map(a(S)),this.valpha],this.model)},alpha(S){return S!==void 0?new o([...this.color,Math.max(0,Math.min(1,S))],this.model):this.valpha},red:f("rgb",0,g(255)),green:f("rgb",1,g(255)),blue:f("rgb",2,g(255)),hue:f(["hsl","hsv","hsl","hwb","hcg"],0,S=>(S%360+360)%360),saturationl:f("hsl",1,g(100)),lightness:f("hsl",2,g(100)),saturationv:f("hsv",1,g(100)),value:f("hsv",2,g(100)),chroma:f("hcg",1,g(100)),gray:f("hcg",2,g(100)),white:f("hwb",1,g(100)),wblack:f("hwb",2,g(100)),cyan:f("cmyk",0,g(100)),magenta:f("cmyk",1,g(100)),yellow:f("cmyk",2,g(100)),black:f("cmyk",3,g(100)),x:f("xyz",0,g(95.047)),y:f("xyz",1,g(100)),z:f("xyz",2,g(108.833)),l:f("lab",0,g(100)),a:f("lab",1),b:f("lab",2),keyword(S){return S!==void 0?new o(S):t[this.model].keyword(this.color)},hex(S){return S!==void 0?new o(S):r.to.hex(this.rgb().round().color)},hexa(S){if(S!==void 0)return new o(S);const B=this.rgb().round().color;let P=Math.round(this.valpha*255).toString(16).toUpperCase();return P.length===1&&(P="0"+P),r.to.hex(B)+P},rgbNumber(){const S=this.rgb().color;return(S[0]&255)<<16|(S[1]&255)<<8|S[2]&255},luminosity(){const S=this.rgb().color,B=[];for(const[P,U]of S.entries()){const j=U/255;B[P]=j<=.04045?j/12.92:((j+.055)/1.055)**2.4}return .2126*B[0]+.7152*B[1]+.0722*B[2]},contrast(S){const B=this.luminosity(),P=S.luminosity();return B>P?(B+.05)/(P+.05):(P+.05)/(B+.05)},level(S){const B=this.contrast(S);return B>=7?"AAA":B>=4.5?"AA":""},isDark(){const S=this.rgb().color;return(S[0]*2126+S[1]*7152+S[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const S=this.rgb();for(let B=0;B<3;B++)S.color[B]=255-S.color[B];return S},lighten(S){const B=this.hsl();return B.color[2]+=B.color[2]*S,B},darken(S){const B=this.hsl();return B.color[2]-=B.color[2]*S,B},saturate(S){const B=this.hsl();return B.color[1]+=B.color[1]*S,B},desaturate(S){const B=this.hsl();return B.color[1]-=B.color[1]*S,B},whiten(S){const B=this.hwb();return B.color[1]+=B.color[1]*S,B},blacken(S){const B=this.hwb();return B.color[2]+=B.color[2]*S,B},grayscale(){const S=this.rgb().color,B=S[0]*.3+S[1]*.59+S[2]*.11;return o.rgb(B,B,B)},fade(S){return this.alpha(this.valpha-this.valpha*S)},opaquer(S){return this.alpha(this.valpha+this.valpha*S)},rotate(S){const B=this.hsl();let P=B.color[0];return P=(P+S)%360,P=P<0?360+P:P,B.color[0]=P,B},mix(S,B){if(!S||!S.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof S);const P=S.rgb(),U=this.rgb(),j=B===void 0?.5:B,q=2*j-1,W=P.alpha()-U.alpha(),ee=((q*W===-1?q:(q+W)/(1+q*W))+1)/2,J=1-ee;return o.rgb(ee*P.red()+J*U.red(),ee*P.green()+J*U.green(),ee*P.blue()+J*U.blue(),P.alpha()*j+U.alpha()*(1-j))}};for(const S of Object.keys(t)){if(e.includes(S))continue;const{channels:B}=t[S];o.prototype[S]=function(...P){return this.model===S?new o(this):P.length>0?new o(P,S):new o([...b(t[this.model][S].raw(this.color)),this.valpha],S)},o[S]=function(...P){let U=P[0];return typeof U=="number"&&(U=I(P,B)),new o(U,S)}}function s(S,B){return Number(S.toFixed(B))}function a(S){return function(B){return s(B,S)}}function f(S,B,P){S=Array.isArray(S)?S:[S];for(const U of S)(i[U]||(i[U]=[]))[B]=P;return S=S[0],function(U){let j;return U!==void 0?(P&&(U=P(U)),j=this[S](),j.color[B]=U,j):(j=this[S]().color[B],P&&(j=P(j)),j)}}function g(S){return function(B){return Math.max(0,Math.min(S,B))}}function b(S){return Array.isArray(S)?S:[S]}function I(S,B){for(let P=0;P<B;P++)typeof S[P]!="number"&&(S[P]=0);return S}return Gx=o,Gx}var QY=WY();const BS=us(QY);function Ja(){var r="/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",t="9dd3eea5f46b0cc48ff3173a7af02bc32aa63f10",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",statementMap:{0:{start:{line:2,column:9},end:{line:2,column:15}},1:{start:{line:3,column:15},end:{line:3,column:21}},2:{start:{line:4,column:12},end:{line:4,column:16}},3:{start:{line:8,column:4},end:{line:8,column:20}},4:{start:{line:9,column:4},end:{line:9,column:52}},5:{start:{line:10,column:4},end:{line:10,column:93}},6:{start:{line:11,column:4},end:{line:11,column:70}},7:{start:{line:12,column:4},end:{line:12,column:27}},8:{start:{line:13,column:4},end:{line:13,column:29}},9:{start:{line:14,column:4},end:{line:14,column:27}},10:{start:{line:17,column:4},end:{line:17,column:60}},11:{start:{line:20,column:4},end:{line:22,column:6}},12:{start:{line:23,column:4},end:{line:23,column:57}},13:{start:{line:24,column:4},end:{line:24,column:27}},14:{start:{line:27,column:4},end:{line:27,column:57}},15:{start:{line:27,column:33},end:{line:27,column:55}},16:{start:{line:28,column:4},end:{line:28,column:57}},17:{start:{line:28,column:33},end:{line:28,column:55}},18:{start:{line:29,column:4},end:{line:29,column:58}},19:{start:{line:29,column:34},end:{line:29,column:56}},20:{start:{line:32,column:4},end:{line:32,column:60}},21:{start:{line:33,column:4},end:{line:33,column:23}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:16},end:{line:6,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:13},end:{line:15,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:20},end:{line:18,column:3}},line:16},3:{name:"(anonymous_3)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:18},end:{line:25,column:3}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:26,column:2},end:{line:26,column:3}},loc:{start:{line:26,column:22},end:{line:30,column:3}},line:26},5:{name:"(anonymous_5)",decl:{start:{line:27,column:27},end:{line:27,column:28}},loc:{start:{line:27,column:33},end:{line:27,column:55}},line:27},6:{name:"(anonymous_6)",decl:{start:{line:28,column:27},end:{line:28,column:28}},loc:{start:{line:28,column:33},end:{line:28,column:55}},line:28},7:{name:"(anonymous_7)",decl:{start:{line:29,column:28},end:{line:29,column:29}},loc:{start:{line:29,column:34},end:{line:29,column:56}},line:29},8:{name:"(anonymous_8)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:13},end:{line:34,column:3}},line:31}},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,21:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts"],names:[],mappings:"AAEA,qBAAqB,YAAY;AAAA,EAC/B,OAAuB;AAAA,EACvB,aAAyC;AAAA,EACzC,UAAkC;AAAA,EAElC,cAAc;AAAA,EAAC;AAAA,EAEf,MAAM,KAAU;AACd,SAAK,OAAO;AACZ,SAAK,aAAa,SAAS,cAAc,KAAK;AAC9C,SAAK,WAAW,YAAY;AAC5B,SAAK,WAAW,aAAa,eAAe,oBAAoB;AAChE,SAAK,SAAS,OAAO;AACrB,SAAK,kBAAkB;AAEvB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,kBAAkB;AAChB,SAAK,QAAS,YAAY,KAAK,KAAM,QAAQ,EAAE,QAAQ,CAAC;AAAA,EAC1D;AAAA,EAEA,SAAS,OAAe;AACtB,SAAK,WAAY,YAAY;AAAA,QACzB,KAAK;AAAA;AAET,SAAK,UAAU,KAAK,WAAY,cAAc,MAAM;AACpD,SAAK,gBAAgB;AAAA,EACvB;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:"9dd3eea5f46b0cc48ff3173a7af02bc32aa63f10"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ja=function(){return s},s}Ja();class qY{constructor(){Kn(this,"_map",(Ja().s[0]++,void 0));Kn(this,"_container",(Ja().s[1]++,void 0));Kn(this,"_textEl",(Ja().s[2]++,null));Ja().f[0]++}onAdd(t){return Ja().f[1]++,Ja().s[3]++,this._map=t,Ja().s[4]++,this._container=document.createElement("div"),Ja().s[5]++,this._container.className="maplibregl-ctrl maplibregl-ctrl-group maplibregl-ctrl-zoom",Ja().s[6]++,this._container.setAttribute("data-wd-key","maplibre:ctrl-zoom"),Ja().s[7]++,this.setLabel("Zoom:"),Ja().s[8]++,this.addEventListeners(),Ja().s[9]++,this._container}updateZoomLevel(){Ja().f[2]++,Ja().s[10]++,this._textEl.innerHTML=this._map.getZoom().toFixed(2)}setLabel(t){Ja().f[3]++,Ja().s[11]++,this._container.innerHTML=`
|
||
${t} <span></span>
|
||
`,Ja().s[12]++,this._textEl=this._container.querySelector("span"),Ja().s[13]++,this.updateZoomLevel()}addEventListeners(){Ja().f[4]++,Ja().s[14]++,this._map.on("render",()=>(Ja().f[5]++,Ja().s[15]++,this.updateZoomLevel())),Ja().s[16]++,this._map.on("zoomIn",()=>(Ja().f[6]++,Ja().s[17]++,this.updateZoomLevel())),Ja().s[18]++,this._map.on("zoomOut",()=>(Ja().f[7]++,Ja().s[19]++,this.updateZoomLevel()))}onRemove(){Ja().f[8]++,Ja().s[20]++,this._container.parentNode.removeChild(this._container),Ja().s[21]++,this._map=void 0}}function IS(r,t,e){const n={id:[t,e,"circle"].join("_"),source:t,type:"circle",paint:{"circle-color":r,"circle-radius":2},filter:["==","$type","Point"]};return e&&(n["source-layer"]=e),n}function kS(r,t,e,n){const i={id:[e,n,"polygon"].join("_"),source:e,type:"fill",paint:{"fill-color":r,"fill-antialias":!0,"fill-outline-color":r},filter:["==","$type","Polygon"]};return n&&(i["source-layer"]=n),i}function TS(r,t,e){const n={id:[t,e,"line"].join("_"),source:t,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":r},filter:["==","$type","LineString"]};return e&&(n["source-layer"]=e),n}function YY(r,t){const e=[],n=[],i=[];function o(s){return{circle:t(s,.8),line:t(s,.6),polygon:t(s,.3),polygonOutline:t(s,.6),default:t(s,1)}}return Object.keys(r).forEach(s=>{const a=r[s];if(!a||a.length===0){const f=o(s);n.push(IS(f.circle,s)),i.push(TS(f.line,s)),e.push(kS(f.polygon,f.polygonOutline,s))}else a.forEach(f=>{const g=o(f);n.push(IS(g.circle,s,f)),i.push(TS(g.line,s,f)),e.push(kS(g.polygon,g.polygonOutline,s,f))})}),e.concat(i).concat(n)}function $Y(r,t,e){e=Object.assign({backgroundColor:"#fff"},e);const n={id:"background",type:"background",paint:{"background-color":e.backgroundColor}},i={};return Object.keys(r.sources).forEach(o=>{const s=r.sources[o];(s.type==="vector"||s.type==="geojson")&&(i[o]=s)}),Object.assign(r,{layers:[n].concat(t),sources:i})}const Wx={polygonLayer:kS,lineLayer:TS,circleLayer:IS,generateInspectStyle:$Y,generateColoredLayers:YY};function fo(){var r="/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",t="aec0f701e803624fae461cc89b5fc887ff556587",e=globalThis,n="__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:18,column:84}},10:{start:{line:18,column:72},end:{line:18,column:84}},11:{start:{line:19,column:24},end:{line:19,column:51}},12:{start:{line:20,column:16},end:{line:20,column:52}},13:{start:{line:21,column:2},end:{line:23,column:3}},14:{start:{line:22,column:4},end:{line:22,column:104}},15:{start:{line:24,column:2},end:{line:26,column:3}},16:{start:{line:25,column:4},end:{line:25,column:96}},17:{start:{line:27,column:2},end:{line:29,column:3}},18:{start:{line:28,column:4},end:{line:28,column:94}},19:{start:{line:30,column:2},end:{line:30,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:31,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:18,column:84}},type:"if",locations:[{start:{line:18,column:2},end:{line:18,column:84}},{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:19,column:24},end:{line:19,column:51}},type:"binary-expr",locations:[{start:{line:19,column:24},end:{line:19,column:45}},{start:{line:19,column:49},end:{line:19,column:51}}],line:19},6:{loc:{start:{line:21,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:23,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:21},7:{loc:{start:{line:21,column:6},end:{line:21,column:62}},type:"binary-expr",locations:[{start:{line:21,column:6},end:{line:21,column:27}},{start:{line:21,column:31},end:{line:21,column:62}}],line:21},8:{loc:{start:{line:24,column:2},end:{line:26,column:3}},type:"if",locations:[{start:{line:24,column:2},end:{line:26,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:24},9:{loc:{start:{line:24,column:6},end:{line:24,column:56}},type:"binary-expr",locations:[{start:{line:24,column:6},end:{line:24,column:29}},{start:{line:24,column:33},end:{line:24,column:56}}],line:24},10:{loc:{start:{line:27,column:2},end:{line:29,column:3}},type:"if",locations:[{start:{line:27,column:2},end:{line:29,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:27}},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,SAAU,QAAO;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:"aec0f701e803624fae461cc89b5fc887ff556587"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return fo=function(){return s},s}fo();function Qx(r,t){return fo().f[0]++,fo().s[0]++,r.type==="circle"?(fo().b[0][0]++,fo().s[1]++,r.paint["circle-radius"]=3):(fo().b[0][1]++,fo().s[2]++,r.type==="line"?(fo().b[1][0]++,fo().s[3]++,r.paint["line-width"]=2):fo().b[1][1]++),fo().s[4]++,"filter"in t?(fo().b[2][0]++,fo().s[5]++,r.filter=t.filter):(fo().b[2][1]++,fo().s[6]++,delete r.filter),fo().s[7]++,r.id=r.id+"_highlight",fo().s[8]++,r}function VY(r){if(fo().f[1]++,fo().s[9]++,fo().b[4][0]++,!r||(fo().b[4][1]++,r.type==="background")||(fo().b[4][2]++,r.type==="raster"))return fo().b[3][0]++,fo().s[10]++,null;fo().b[3][1]++;const t=(fo().s[11]++,fo().b[5][0]++,r["source-layer"]||(fo().b[5][1]++,"")),e=(fo().s[12]++,ED.brightColor(t,1));return fo().s[13]++,fo().b[7][0]++,r.type==="fill"||(fo().b[7][1]++,r.type==="fill-extrusion")?(fo().b[6][0]++,fo().s[14]++,Qx(Wx.polygonLayer(e,e,r.source,r["source-layer"]),r)):(fo().b[6][1]++,fo().s[15]++,fo().b[9][0]++,r.type==="symbol"||(fo().b[9][1]++,r.type==="circle")?(fo().b[8][0]++,fo().s[16]++,Qx(Wx.circleLayer(e,r.source,r["source-layer"]),r)):(fo().b[8][1]++,fo().s[17]++,r.type==="line"?(fo().b[10][0]++,fo().s[18]++,Qx(Wx.lineLayer(e,r.source,r["source-layer"]),r)):(fo().b[10][1]++,fo().s[19]++,null)))}function XE(){var r="/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",t="a9dc98f82c73787713de0672aff7a601bfeb069d",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return XE=function(){return s},s}XE();XE().s[0]++;Iy.setRTLTextPlugin("https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js",!1);/*! *****************************************************************************
|
||
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.
|
||
***************************************************************************** */function qx(r,t,e,n){return new(e||(e=Promise))(function(i,o){function s(g){try{f(n.next(g))}catch(b){o(b)}}function a(g){try{f(n.throw(g))}catch(b){o(b)}}function f(g){g.done?i(g.value):new e(function(b){b(g.value)}).then(s,a)}f((n=n.apply(r,t||[])).next())})}var D_=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function e2(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Yx,KI;function PD(){if(KI)return Yx;KI=1,Yx=t;var r=Object.prototype.hasOwnProperty;function t(){for(var e={},n=0;n<arguments.length;n++){var i=arguments[n];for(var o in i)r.call(i,o)&&(e[o]=i[o])}return e}return Yx}var $x={exports:{}},RI;function HY(){return RI||(RI=1,function(r,t){(function(){var e={};r.exports=e,e.simpleFilter=function(n,i){return i.filter(function(o){return e.test(n,o)})},e.test=function(n,i){return e.match(n,i)!==null},e.match=function(n,i,o){o=o||{};var s=0,a=[],f=i.length,g=0,b=0,I=o.pre||"",S=o.post||"",B=o.caseSensitive&&i||i.toLowerCase(),P;n=o.caseSensitive&&n||n.toLowerCase();for(var U=0;U<f;U++)P=i[U],B[U]===n[s]?(P=I+P+S,s+=1,b+=1+b):b=0,g+=b,a[a.length]=P;return s===n.length?(g=B===n?1/0:g,{rendered:a.join(""),score:g}):null},e.filter=function(n,i,o){return!i||i.length===0?[]:typeof n!="string"?i:(o=o||{},i.reduce(function(s,a,f,g){var b=a;o.extract&&(b=o.extract(a));var I=e.match(n,b,o);return I!=null&&(s[s.length]={string:I.rendered,score:I.score,index:f,original:a}),s},[]).sort(function(s,a){var f=a.score-s.score;return f||s.index-a.index}))}})()}($x)),$x.exports}var Vx,DI;function ZY(){if(DI)return Vx;DI=1;var r=function(t){return this.component=t,this.items=[],this.active=t.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,t.el.parentNode.insertBefore(this.wrapper,t.el.nextSibling),this};return r.prototype.show=function(){this.element.style.display="block"},r.prototype.hide=function(){this.element.style.display="none"},r.prototype.add=function(t){this.items.push(t)},r.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},r.prototype.isEmpty=function(){return!this.items.length},r.prototype.isVisible=function(){return this.element.style.display==="block"},r.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var t=0;t<this.items.length;t++)this.drawItem(this.items[t],this.active===t);this.show()},r.prototype.drawItem=function(t,e){var n=document.createElement("li"),i=document.createElement("a");e&&(n.className+=" active"),i.innerHTML=t.string,n.appendChild(i),this.element.appendChild(n),n.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),n.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,t)}).bind(this))},r.prototype.handleMouseUp=function(t){this.selectingListItem=!1,this.component.value(t.original),this.clear(),this.draw()},r.prototype.move=function(t){this.active=t,this.draw()},r.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},r.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},r.prototype.drawError=function(t){var e=document.createElement("li");e.innerHTML=t,this.element.appendChild(e),this.show()},Vx=r,Vx}var Hx,LI;function XY(){if(LI)return Hx;LI=1;var r=PD(),t=HY(),e=ZY(),n=function(i,o,s){return s=s||{},this.options=r({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},s),this.el=i,this.data=o||[],this.list=new e(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(a){this.handleKeyUp(a.keyCode,a)}).bind(this),!1),this.el.addEventListener("keydown",(function(a){this.handleKeyDown(a)}).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(a){this.handlePaste(a)}).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};return n.prototype.handleKeyUp=function(i,o){if(!(i===40||i===38||i===27||i===9)){if(i===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),o.stopPropagation());return}this.handleInputChange(this.el.value)}},n.prototype.handleKeyDown=function(i){switch(i.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&i.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}},n.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},n.prototype.handlePaste=function(i){if(i.clipboardData)this.handleInputChange(i.clipboardData.getData("Text"));else{var o=this;setTimeout(function(){o.handleInputChange(i.target.value)},100)}},n.prototype.handleInputChange=function(i){if(this.query=this.normalize(i),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(o){for(var s=0;s<o.length&&(this.list.add(o[s]),s!==this.options.limit-1);s++);this.list.draw()}).bind(this))},n.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},n.prototype.update=function(i){this.data=i,this.handleKeyUp()},n.prototype.clear=function(){this.data=[],this.list.clear()},n.prototype.normalize=function(i){return i=i.toLowerCase(),i},n.prototype.match=function(i,o){return i.indexOf(o)>-1},n.prototype.value=function(i){if(this.selected=i,this.el.value=this.getItemValue(i||{place_name:this.query}),document.createEvent){var o=document.createEvent("HTMLEvents");o.initEvent("change",!0,!1),this.el.dispatchEvent(o)}else this.el.fireEvent("onchange")},n.prototype.getCandidates=function(i){var o={pre:"<strong>",post:"</strong>",extract:(function(a){return this.getItemValue(a)}).bind(this)},s;this.options.filter?(s=t.filter(this.query,this.data,o),s=s.map((function(a){return{original:a.original,string:this.render(a.original,a.string)}}).bind(this))):s=this.data.map((function(a){var f=this.render(a);return{original:a,string:f}}).bind(this)),i(s)},n.prototype.getItemValue=function(i){return i},n.prototype.render=function(i,o){if(o)return o;for(var s=i.original?this.getItemValue(i.original):this.getItemValue(i),a=this.normalize(s),f=a.lastIndexOf(this.query);f>-1;){var g=f+this.query.length;s=s.slice(0,f)+"<strong>"+s.slice(f,g)+"</strong>"+s.slice(g),f=a.slice(0,f).lastIndexOf(this.query)}return s},n.prototype.renderError=function(i){this.list.drawError(i)},Hx=n,Hx}var Zx,FI;function JY(){if(FI)return Zx;FI=1;var r=XY();return Zx=r,typeof window<"u"&&(window.Suggestions=r),Zx}var e$=JY(),t$=e2(e$),gC={exports:{}},n$=gC.exports,UI;function r$(){return UI||(UI=1,function(r){(function(t,e,n){r.exports?r.exports=n():t[e]=n()})(n$,"subtag",function(){var t="",e=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function n(f){return f.match(e)||[]}function i(f){return n(f).filter(function(g,b){return g&&b})}function o(f){return f=n(f),{language:f[1]||t,extlang:f[2]||t,script:f[3]||t,region:f[4]||t}}function s(f,g,b){Object.defineProperty(f,g,{value:b,enumerable:!0})}function a(f,g,b){function I(S){return n(S)[f]||t}s(I,"pattern",g),s(o,b,I)}return a(1,/^[a-zA-Z]{2,3}$/,"language"),a(2,/^[a-zA-Z]{3}$/,"extlang"),a(3,/^[a-zA-Z]{4}$/,"script"),a(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),s(o,"split",i),o})}(gC)),gC.exports}var i$=r$(),o$=e2(i$),Xx,jI;function a$(){if(jI)return Xx;jI=1;var r="Expected a function",t=NaN,e="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,f=typeof D_=="object"&&D_&&D_.Object===Object&&D_,g=typeof self=="object"&&self&&self.Object===Object&&self,b=f||g||Function("return this")(),I=Object.prototype,S=I.toString,B=Math.max,P=Math.min,U=function(){return b.Date.now()};function j($,X,G){var ae,ge,he,Ie,re,oe,Se=0,ye=!1,nt=!1,Ne=!0;if(typeof $!="function")throw new TypeError(r);X=J(X)||0,q(G)&&(ye=!!G.leading,nt="maxWait"in G,he=nt?B(J(G.maxWait)||0,X):he,Ne="trailing"in G?!!G.trailing:Ne);function je(Rt){var Ke=ae,we=ge;return ae=ge=void 0,Se=Rt,Ie=$.apply(we,Ke),Ie}function et(Rt){return Se=Rt,re=setTimeout(We,X),ye?je(Rt):Ie}function Ue(Rt){var Ke=Rt-oe,we=Rt-Se,Fe=X-Ke;return nt?P(Fe,he-we):Fe}function ke(Rt){var Ke=Rt-oe,we=Rt-Se;return oe===void 0||Ke>=X||Ke<0||nt&&we>=he}function We(){var Rt=U();if(ke(Rt))return vt(Rt);re=setTimeout(We,Ue(Rt))}function vt(Rt){return re=void 0,Ne&&ae?je(Rt):(ae=ge=void 0,Ie)}function Pt(){re!==void 0&&clearTimeout(re),Se=0,ae=oe=ge=re=void 0}function ut(){return re===void 0?Ie:vt(U())}function jt(){var Rt=U(),Ke=ke(Rt);if(ae=arguments,ge=this,oe=Rt,Ke){if(re===void 0)return et(oe);if(nt)return re=setTimeout(We,X),je(oe)}return re===void 0&&(re=setTimeout(We,X)),Ie}return jt.cancel=Pt,jt.flush=ut,jt}function q($){var X=typeof $;return!!$&&(X=="object"||X=="function")}function W($){return!!$&&typeof $=="object"}function ee($){return typeof $=="symbol"||W($)&&S.call($)==e}function J($){if(typeof $=="number")return $;if(ee($))return t;if(q($)){var X=typeof $.valueOf=="function"?$.valueOf():$;$=q(X)?X+"":X}if(typeof $!="string")return $===0?$:+$;$=$.replace(n,"");var G=o.test($);return G||s.test($)?a($.slice(2),G?2:8):i.test($)?t:+$}return Xx=j,Xx}var s$=a$(),l$=e2(s$),u$=PD(),Df=e2(u$),L_={exports:{}},zI;function A$(){if(zI)return L_.exports;zI=1;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function($,X,G){return Function.prototype.apply.call($,X,G)},e;r&&typeof r.ownKeys=="function"?e=r.ownKeys:Object.getOwnPropertySymbols?e=function($){return Object.getOwnPropertyNames($).concat(Object.getOwnPropertySymbols($))}:e=function($){return Object.getOwnPropertyNames($)};function n(J){console&&console.warn&&console.warn(J)}var i=Number.isNaN||function($){return $!==$};function o(){o.init.call(this)}L_.exports=o,L_.exports.once=q,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(J){if(typeof J!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof J)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(J){if(typeof J!="number"||J<0||i(J))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+J+".");s=J}}),o.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},o.prototype.setMaxListeners=function($){if(typeof $!="number"||$<0||i($))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+$+".");return this._maxListeners=$,this};function f(J){return J._maxListeners===void 0?o.defaultMaxListeners:J._maxListeners}o.prototype.getMaxListeners=function(){return f(this)},o.prototype.emit=function($){for(var X=[],G=1;G<arguments.length;G++)X.push(arguments[G]);var ae=$==="error",ge=this._events;if(ge!==void 0)ae=ae&&ge.error===void 0;else if(!ae)return!1;if(ae){var he;if(X.length>0&&(he=X[0]),he instanceof Error)throw he;var Ie=new Error("Unhandled error."+(he?" ("+he.message+")":""));throw Ie.context=he,Ie}var re=ge[$];if(re===void 0)return!1;if(typeof re=="function")t(re,this,X);else for(var oe=re.length,Se=P(re,oe),G=0;G<oe;++G)t(Se[G],this,X);return!0};function g(J,$,X,G){var ae,ge,he;if(a(X),ge=J._events,ge===void 0?(ge=J._events=Object.create(null),J._eventsCount=0):(ge.newListener!==void 0&&(J.emit("newListener",$,X.listener?X.listener:X),ge=J._events),he=ge[$]),he===void 0)he=ge[$]=X,++J._eventsCount;else if(typeof he=="function"?he=ge[$]=G?[X,he]:[he,X]:G?he.unshift(X):he.push(X),ae=f(J),ae>0&&he.length>ae&&!he.warned){he.warned=!0;var Ie=new Error("Possible EventEmitter memory leak detected. "+he.length+" "+String($)+" listeners added. Use emitter.setMaxListeners() to increase limit");Ie.name="MaxListenersExceededWarning",Ie.emitter=J,Ie.type=$,Ie.count=he.length,n(Ie)}return J}o.prototype.addListener=function($,X){return g(this,$,X,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function($,X){return g(this,$,X,!0)};function b(){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 I(J,$,X){var G={fired:!1,wrapFn:void 0,target:J,type:$,listener:X},ae=b.bind(G);return ae.listener=X,G.wrapFn=ae,ae}o.prototype.once=function($,X){return a(X),this.on($,I(this,$,X)),this},o.prototype.prependOnceListener=function($,X){return a(X),this.prependListener($,I(this,$,X)),this},o.prototype.removeListener=function($,X){var G,ae,ge,he,Ie;if(a(X),ae=this._events,ae===void 0)return this;if(G=ae[$],G===void 0)return this;if(G===X||G.listener===X)--this._eventsCount===0?this._events=Object.create(null):(delete ae[$],ae.removeListener&&this.emit("removeListener",$,G.listener||X));else if(typeof G!="function"){for(ge=-1,he=G.length-1;he>=0;he--)if(G[he]===X||G[he].listener===X){Ie=G[he].listener,ge=he;break}if(ge<0)return this;ge===0?G.shift():U(G,ge),G.length===1&&(ae[$]=G[0]),ae.removeListener!==void 0&&this.emit("removeListener",$,Ie||X)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function($){var X,G,ae;if(G=this._events,G===void 0)return this;if(G.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):G[$]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete G[$]),this;if(arguments.length===0){var ge=Object.keys(G),he;for(ae=0;ae<ge.length;++ae)he=ge[ae],he!=="removeListener"&&this.removeAllListeners(he);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(X=G[$],typeof X=="function")this.removeListener($,X);else if(X!==void 0)for(ae=X.length-1;ae>=0;ae--)this.removeListener($,X[ae]);return this};function S(J,$,X){var G=J._events;if(G===void 0)return[];var ae=G[$];return ae===void 0?[]:typeof ae=="function"?X?[ae.listener||ae]:[ae]:X?j(ae):P(ae,ae.length)}o.prototype.listeners=function($){return S(this,$,!0)},o.prototype.rawListeners=function($){return S(this,$,!1)},o.listenerCount=function(J,$){return typeof J.listenerCount=="function"?J.listenerCount($):B.call(J,$)},o.prototype.listenerCount=B;function B(J){var $=this._events;if($!==void 0){var X=$[J];if(typeof X=="function")return 1;if(X!==void 0)return X.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function P(J,$){for(var X=new Array($),G=0;G<$;++G)X[G]=J[G];return X}function U(J,$){for(;$+1<J.length;$++)J[$]=J[$+1];J.pop()}function j(J){for(var $=new Array(J.length),X=0;X<$.length;++X)$[X]=J[X].listener||J[X];return $}function q(J,$){return new Promise(function(X,G){function ae(he){J.removeListener($,ge),G(he)}function ge(){typeof J.removeListener=="function"&&J.removeListener("error",ae),X([].slice.call(arguments))}ee(J,$,ge,{once:!0}),$!=="error"&&W(J,ae,{once:!0})})}function W(J,$,X){typeof J.on=="function"&&ee(J,"error",$,X)}function ee(J,$,X,G){if(typeof J.on=="function")G.once?J.once($,X):J.on($,X);else if(typeof J.addEventListener=="function")J.addEventListener($,function ae(ge){G.once&&J.removeEventListener($,ae),X(ge)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof J)}return L_.exports}var c$=A$();const NI={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]]}},d$={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:"Поиск"},h$=/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/;class f${constructor(t,e){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,proximityMinZoom:9,getItemValue:n=>n.text!==void 0?n.text:n.place_name,render:function(n){if(!n.geometry){const o=n.text,s=o.toLowerCase().indexOf(this.query.toLowerCase()),a=this.query.length,f=o.substring(0,s),g=o.substring(s,s+a),b=o.substring(s+a);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">'+f+'<span class="maplibregl-ctrl-geocoder--suggestion-match">'+g+"</span>"+b+"</div></div></div>"}const i=n.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:n=>{const i=n.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 c$.EventEmitter,this.options=Df({},this.options,e),this.fresh=!0,this.lastSelected=null,this.geocoderApi=t}addTo(t){function e(n,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const o=n.onAdd();i.appendChild(o)}if(t instanceof HTMLElement)e(this,t);else if(typeof t=="string"){const n=document.querySelectorAll(t);if(n.length===0)throw new Error("Element "+t+"not found.");if(n.length>1)throw new Error("Geocoder can only be added to a single html element");e(this,n[0])}else if("addControl"in t)t.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(t){if(t&&typeof t!="string"&&(this._map=t),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 e=this.container=document.createElement("div");e.className="maplibregl-ctrl-geocoder maplibregl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";const n=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",l$(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),e.appendChild(n),e.appendChild(this._inputEl),e.appendChild(i),this._typeahead=new t$(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)),e}createIcon(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");if(n.setAttribute("class","maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+t),n.setAttribute("viewBox","0 0 18 18"),n.setAttribute("xml:space","preserve"),n.setAttribute("width","18"),n.setAttribute("height","18"),"innerHTML"in n)n.innerHTML=e;else{const i=document.createElement("div");i.innerHTML="<svg>"+e.valueOf().toString()+"</svg>";const o=i.firstChild,s=o.firstChild;n.appendChild(s)}return n}onRemove(){return this.container.remove(),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this}_onPaste(t){const e=(t.clipboardData||window.clipboardData).getData("text");e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e)}_onKeyDown(t){if(t.keyCode===27&&this.options.clearAndBlurOnEsc)return this._clear(t),this._inputEl.blur();const o=t.target&&t.target.shadowRoot?t.target.shadowRoot.activeElement:t.target;if(!(o?o.value:""))return this.fresh=!0,t.keyCode!==9&&this.clear(t),this._clearEl.style.display="none";if(!(t.metaKey||[9,27,37,39,38,40].indexOf(t.keyCode)!==-1)){if(t.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(o.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(o.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}o.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(o.value)}}_showButton(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")}_hideButton(){this._typeahead.selected&&(this._clearEl.style.display="none")}_onBlur(t){this.options.clearOnBlur&&this._clearOnBlur(t),this.options.collapsed&&this._collapse()}_onChange(){const t=this._typeahead.selected;if(t&&!t.geometry)t.placeId?this._geocode(t.placeId,!0,!0):this._geocode(t.text,!0);else if(t&&JSON.stringify(t)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){let e;if(this._removeResultMarkers(),t.properties&&NI[t.properties.short_code])e=Df({},this.options.flyTo),this._map&&this._map.fitBounds(NI[t.properties.short_code].bbox,e);else if(t.bbox){const n=t.bbox;e=Df({},this.options.flyTo),this._map&&this._map.fitBounds([[n[0],n[1]],[n[2],n[3]]],e)}else{const n={zoom:this.options.zoom};e=Df({},n,this.options.flyTo),t.center?e.center=t.center:t.geometry&&t.geometry.type&&t.geometry.type==="Point"&&t.geometry.coordinates&&(e.center=t.geometry.coordinates),this._map&&this._map.flyTo(e)}}this.options.marker&&this._maplibregl&&this._handleMarker(t),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(t),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:t})}}_getConfigForRequest(){return["bbox","limit","proximity","countries","types","language","reverseMode"].reduce((n,i)=>(this.options[i]&&(["countries","types","language"].indexOf(i)>-1?n[i]=this.options[i].split(/[\s,]+/):n[i]=this.options[i],i==="proximity"&&this.options[i]&&typeof this.options[i].longitude=="number"&&typeof this.options[i].latitude=="number"&&(n[i]=[this.options[i].longitude,this.options[i].latitude])),n),{})}_geocode(t){return qx(this,arguments,void 0,function*(e,n=!1,i=!1){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:e});const o=this._getConfigForRequest(),s=this._createGeocodeRequest(o,e,n,i),a=this.options.localGeocoder?this.options.localGeocoder(e)||[]:[];try{const f=yield s;yield this._handleGeocodeResponse(f,o,e,n,a)}catch(f){this._handleGeocodeErrorResponse(f,a)}return s})}_createGeocodeRequest(t,e,n,i){return this.options.localGeocoderOnly?Promise.resolve({}):this.options.reverseGeocode&&h$.test(e)?this._createReverseGeocodeRequest(e,t):(t.query=e,this.geocoderApi.getSuggestions?n?this.geocoderApi.searchByPlaceId&&i?this.geocoderApi.searchByPlaceId(t):this.geocoderApi.forwardGeocode(t):this.geocoderApi.getSuggestions(t):this.geocoderApi.forwardGeocode(t))}_createReverseGeocodeRequest(t,e){const n=t.split(/[\s(,)?]+/).map(i=>parseFloat(i)).reverse();return e.query=n,e.limit=1,"proximity"in e&&delete e.proximity,this.geocoderApi.reverseGeocode(e)}_handleGeocodeResponse(t,e,n,i,o){return qx(this,void 0,void 0,function*(){this._loadingEl.style.display="none";let s={};t?s=t:s={type:"FeatureCollection",features:[]},s.config=e,this.fresh&&(this.fresh=!1),s.features=s.features?o.concat(s.features):o;const a=this.options.externalGeocoder?this.options.externalGeocoder(n,s.features,e)||Promise.resolve([]):Promise.resolve([]);try{const g=yield a;s.features=s.features?g.concat(s.features):g}catch{}this.options.filter&&s.features.length&&(s.features=s.features.filter(this.options.filter));let f=[];"suggestions"in s?f=s.suggestions:"place"in s?f=[s.place]:f=s.features,f.length?(this._clearEl.style.display="block",this._typeahead.update(f),(!this.options.showResultsWhileTyping||i)&&this.options.showResultMarkers&&(s.features.length>0||"place"in s)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",s)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",s))})}_handleGeocodeErrorResponse(t,e){this._loadingEl.style.display="none",e.length&&this.options.localGeocoder?(this._clearEl.style.display="block",this._typeahead.update(e)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:e}),this._eventEmitter.emit("error",{error:t})}_clear(t){t&&t.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(t){this._clear(t),this._inputEl.focus()}_clearOnBlur(t){t.relatedTarget&&this._clear(t)}_onQueryResult(t){if(!("features"in t)||!t.features.length)return;const e=t.features[0];this._typeahead.selected=e,this._inputEl.value=e.place_name,this._onChange()}_updateProximity(){if(this._map)if(this._map.getZoom()>this.options.proximityMinZoom){const t=this._map.getCenter().wrap();this.setProximity({longitude:t.lng,latitude:t.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(t){return qx(this,void 0,void 0,function*(){const e=yield this._geocode(t);this._onQueryResult(e)})}_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(t){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(t)}_getPlaceholderText(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){const t=this.options.language.split(",")[0],e=o$.language(t),n=d$[e];if(n)return n}return"Search"}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;const t=this._typeahead.data.filter(e=>typeof e!="string").slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){const n=Df({},{padding:100},this.options.flyTo),i=new this._maplibregl.LngLatBounds;for(const o of t)i.extend(o.geometry.coordinates);this._map.fitBounds(i,n)}return t.length>0&&this._maplibregl&&this._handleResultMarkers(t),this}setInput(t){return this._inputEl.value=t,this._typeahead.selected=null,this._typeahead.clear(),t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t),this}setProximity(t){return this.options.proximity=t,this}getProximity(){return this.options.proximity}setRenderFunction(t){return t&&typeof t=="function"&&(this._typeahead.render=t),this}getRenderFunction(){return this._typeahead.render}setLanguage(t){return this.options.language=t||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(t){return this.options.zoom=t,this}getFlyTo(){return this.options.flyTo}setFlyTo(t){return this.options.flyTo=t,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(t){return this.placeholder=t||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this}getBbox(){return this.options.bbox}setBbox(t){return this.options.bbox=t,this}getCountries(){return this.options.countries}setCountries(t){return this.options.countries=t,this}getTypes(){return this.options.types}setTypes(t){return this.options.types=t,this}getMinLength(){return this.options.minLength}setMinLength(t){return this.options.minLength=t,this._typeahead&&(this._typeahead.options.minLength=t),this}getLimit(){return this.options.limit}setLimit(t){return this.options.limit=t,this._typeahead&&(this._typeahead.options.limit=t),this}getFilter(){return this.options.filter}setFilter(t){return this.options.filter=t,this}setGeocoderApi(t){return this.geocoderApi=t,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(t){if(!this._map)return;this._removeMarker();const n=Df({},{color:"#4668F2"},this.options.marker);this.mapMarker=new this._maplibregl.Marker(n);let i;if(this.options.popup){const s=Df({},{},this.options.popup);i=new this._maplibregl.Popup(s).setHTML(this.options.popupRender(t))}return t.center?(this.mapMarker.setLngLat(t.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)):t.geometry&&t.geometry.type&&t.geometry.type==="Point"&&t.geometry.coordinates&&(this.mapMarker.setLngLat(t.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)),this}_removeMarker(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)}_handleResultMarkers(t){if(!this._map)return;this._removeResultMarkers();let n=Df({},{color:"#4668F2"},this.options.showResultMarkers);for(const i of t){let o;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(o=this.options.showResultMarkers.element.cloneNode(!0),n=Df(n,{element:o}));const s=new this._maplibregl.Marker(Df({},n,{element:o}));let a;if(this.options.popup){const g=Df({},{},this.options.popup);a=new this._maplibregl.Popup(g).setHTML(this.options.popupRender(i))}i.center?(s.setLngLat(i.center).addTo(this._map),this.options.popup&&s.setPopup(a)):i.geometry&&i.geometry.type&&i.geometry.type==="Point"&&i.geometry.coordinates&&(s.setLngLat(i.geometry.coordinates).addTo(this._map),this.options.popup&&s.setPopup(a)),this.resultMarkers.push(s)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(t){t.remove()}),this.resultMarkers=[])}on(t,e){return this._eventEmitter.on(t,e),this}once(t){return new Promise(e=>{this._eventEmitter.once(t,e)})}off(t,e){return this._eventEmitter.removeListener(t,e),this}}function Mn(){var r="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",t="3c5cfb4afb5483770f6919f2f66d47734075cb05",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",statementMap:{0:{start:{line:20,column:2},end:{line:20,column:36}},1:{start:{line:21,column:2},end:{line:21,column:19}},2:{start:{line:24,column:26},end:{line:30,column:3}},3:{start:{line:31,column:16},end:{line:31,column:55}},4:{start:{line:32,column:2},end:{line:34,column:3}},5:{start:{line:33,column:4},end:{line:33,column:30}},6:{start:{line:35,column:18},end:{line:35,column:20}},7:{start:{line:36,column:2},end:{line:41,column:5}},8:{start:{line:37,column:19},end:{line:37,column:53}},9:{start:{line:38,column:4},end:{line:40,column:5}},10:{start:{line:39,column:6},end:{line:39,column:33}},11:{start:{line:42,column:23},end:{line:46,column:3}},12:{start:{line:47,column:2},end:{line:47,column:22}},13:{start:{line:50,column:24},end:{line:60,column:3}},14:{start:{line:61,column:14},end:{line:61,column:18}},15:{start:{line:63,column:4},end:{line:63,column:17}},16:{start:{line:64,column:4},end:{line:69,column:6}},17:{start:{line:70,column:4},end:{line:72,column:7}},18:{start:{line:71,column:6},end:{line:71,column:25}},19:{start:{line:75,column:17},end:{line:75,column:22}},20:{start:{line:76,column:4},end:{line:79,column:5}},21:{start:{line:77,column:6},end:{line:77,column:132}},22:{start:{line:80,column:4},end:{line:80,column:18}},23:{start:{line:83,column:16},end:{line:83,column:30}},24:{start:{line:84,column:28},end:{line:84,column:79}},25:{start:{line:85,column:4},end:{line:90,column:5}},26:{start:{line:86,column:6},end:{line:86,column:52}},27:{start:{line:87,column:6},end:{line:87,column:70}},28:{start:{line:88,column:6},end:{line:88,column:70}},29:{start:{line:89,column:6},end:{line:89,column:76}},30:{start:{line:91,column:4},end:{line:93,column:5}},31:{start:{line:92,column:6},end:{line:92,column:43}},32:{start:{line:94,column:4},end:{line:99,column:5}},33:{start:{line:95,column:6},end:{line:95,column:59}},34:{start:{line:96,column:6},end:{line:98,column:14}},35:{start:{line:97,column:8},end:{line:97,column:36}},36:{start:{line:102,column:20},end:{line:111,column:5}},37:{start:{line:112,column:16},end:{line:112,column:43}},38:{start:{line:113,column:26},end:{line:117,column:5}},39:{start:{line:114,column:21},end:{line:114,column:36}},40:{start:{line:115,column:19},end:{line:115,column:32}},41:{start:{line:116,column:6},end:{line:116,column:44}},42:{start:{line:118,column:4},end:{line:118,column:20}},43:{start:{line:119,column:4},end:{line:119,column:56}},44:{start:{line:120,column:4},end:{line:120,column:56}},45:{start:{line:121,column:4},end:{line:121,column:62}},46:{start:{line:122,column:19},end:{line:122,column:41}},47:{start:{line:123,column:24},end:{line:123,column:41}},48:{start:{line:124,column:4},end:{line:124,column:45}},49:{start:{line:125,column:16},end:{line:125,column:74}},50:{start:{line:126,column:4},end:{line:126,column:37}},51:{start:{line:127,column:20},end:{line:127,column:49}},52:{start:{line:128,column:20},end:{line:148,column:6}},53:{start:{line:138,column:8},end:{line:138,column:82}},54:{start:{line:140,column:62},end:{line:140,column:141}},55:{start:{line:142,column:8},end:{line:146,column:9}},56:{start:{line:143,column:10},end:{line:143,column:108}},57:{start:{line:145,column:10},end:{line:145,column:160}},58:{start:{line:149,column:4},end:{line:149,column:28}},59:{start:{line:150,column:4},end:{line:158,column:7}},60:{start:{line:151,column:6},end:{line:157,column:9}},61:{start:{line:159,column:4},end:{line:164,column:7}},62:{start:{line:160,column:6},end:{line:160,column:40}},63:{start:{line:160,column:33},end:{line:160,column:40}},64:{start:{line:161,column:6},end:{line:163,column:9}},65:{start:{line:165,column:4},end:{line:167,column:7}},66:{start:{line:166,column:6},end:{line:166,column:30}},67:{start:{line:168,column:4},end:{line:172,column:7}},68:{start:{line:169,column:6},end:{line:171,column:9}},69:{start:{line:173,column:4},end:{line:173,column:37}},70:{start:{line:174,column:4},end:{line:174,column:37}},71:{start:{line:176,column:22},end:{line:179,column:3}},72:{start:{line:177,column:18},end:{line:177,column:82}},73:{start:{line:177,column:66},end:{line:177,column:81}},74:{start:{line:178,column:4},end:{line:178,column:36}},75:{start:{line:181,column:27},end:{line:214,column:5}},76:{start:{line:183,column:25},end:{line:183,column:27}},77:{start:{line:184,column:8},end:{line:209,column:9}},78:{start:{line:185,column:26},end:{line:185,column:138}},79:{start:{line:186,column:27},end:{line:186,column:47}},80:{start:{line:187,column:26},end:{line:187,column:47}},81:{start:{line:188,column:10},end:{line:206,column:11}},82:{start:{line:189,column:27},end:{line:192,column:13}},83:{start:{line:193,column:26},end:{line:204,column:13}},84:{start:{line:205,column:12},end:{line:205,column:33}},85:{start:{line:208,column:10},end:{line:208,column:69}},86:{start:{line:210,column:8},end:{line:212,column:10}},87:{start:{line:215,column:21},end:{line:218,column:6}},88:{start:{line:219,column:4},end:{line:219,column:41}},89:{start:{line:220,column:4},end:{line:220,column:20}},90:{start:{line:223,column:14},end:{line:223,column:26}},91:{start:{line:224,column:4},end:{line:224,column:53}},92:{start:{line:225,column:4},end:{line:225,column:49}},93:{start:{line:226,column:4},end:{line:235,column:6}},94:{start:{line:232,column:20},end:{line:232,column:38}},95:{start:{line:238,column:22},end:{line:238,column:62}}},fnMap:{0:{name:"renderPopup",decl:{start:{line:19,column:9},end:{line:19,column:20}},loc:{start:{line:19,column:39},end:{line:22,column:1}},line:19},1:{name:"buildInspectStyle",decl:{start:{line:23,column:9},end:{line:23,column:26}},loc:{start:{line:23,column:78},end:{line:48,column:1}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:36,column:48},end:{line:36,column:49}},loc:{start:{line:36,column:62},end:{line:41,column:3}},line:36},3:{name:"(anonymous_3)",decl:{start:{line:51,column:17},end:{line:51,column:18}},loc:{start:{line:51,column:23},end:{line:52,column:5}},line:51},4:{name:"(anonymous_4)",decl:{start:{line:53,column:18},end:{line:53,column:19}},loc:{start:{line:53,column:24},end:{line:54,column:5}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:55,column:19},end:{line:55,column:20}},loc:{start:{line:55,column:25},end:{line:56,column:5}},line:55},6:{name:"(anonymous_6)",decl:{start:{line:57,column:14},end:{line:57,column:15}},loc:{start:{line:57,column:20},end:{line:58,column:5}},line:57},7:{name:"(anonymous_7)",decl:{start:{line:62,column:2},end:{line:62,column:3}},loc:{start:{line:62,column:21},end:{line:73,column:3}},line:62},8:{name:"(anonymous_8)",decl:{start:{line:70,column:34},end:{line:70,column:35}},loc:{start:{line:70,column:40},end:{line:72,column:5}},line:70},9:{name:"(anonymous_9)",decl:{start:{line:74,column:2},end:{line:74,column:3}},loc:{start:{line:74,column:46},end:{line:81,column:3}},line:74},10:{name:"(anonymous_10)",decl:{start:{line:82,column:2},end:{line:82,column:3}},loc:{start:{line:82,column:23},end:{line:100,column:3}},line:82},11:{name:"(anonymous_11)",decl:{start:{line:96,column:17},end:{line:96,column:18}},loc:{start:{line:96,column:23},end:{line:98,column:7}},line:96},12:{name:"(anonymous_12)",decl:{start:{line:101,column:2},end:{line:101,column:3}},loc:{start:{line:101,column:22},end:{line:175,column:3}},line:101},13:{name:"(anonymous_13)",decl:{start:{line:113,column:26},end:{line:113,column:27}},loc:{start:{line:113,column:32},end:{line:117,column:5}},line:113},14:{name:"(anonymous_14)",decl:{start:{line:137,column:24},end:{line:137,column:25}},loc:{start:{line:137,column:44},end:{line:139,column:7}},line:137},15:{name:"(anonymous_15)",decl:{start:{line:140,column:25},end:{line:140,column:26}},loc:{start:{line:140,column:62},end:{line:140,column:141}},line:140},16:{name:"(anonymous_16)",decl:{start:{line:141,column:19},end:{line:141,column:20}},loc:{start:{line:141,column:33},end:{line:147,column:7}},line:141},17:{name:"(anonymous_17)",decl:{start:{line:150,column:25},end:{line:150,column:26}},loc:{start:{line:150,column:31},end:{line:158,column:5}},line:150},18:{name:"(anonymous_18)",decl:{start:{line:159,column:19},end:{line:159,column:20}},loc:{start:{line:159,column:26},end:{line:164,column:5}},line:159},19:{name:"(anonymous_19)",decl:{start:{line:165,column:20},end:{line:165,column:21}},loc:{start:{line:165,column:27},end:{line:167,column:5}},line:165},20:{name:"(anonymous_20)",decl:{start:{line:168,column:19},end:{line:168,column:20}},loc:{start:{line:168,column:27},end:{line:172,column:5}},line:168},21:{name:"(anonymous_21)",decl:{start:{line:176,column:22},end:{line:176,column:23}},loc:{start:{line:176,column:30},end:{line:179,column:3}},line:176},22:{name:"(anonymous_22)",decl:{start:{line:177,column:55},end:{line:177,column:56}},loc:{start:{line:177,column:66},end:{line:177,column:81}},line:177},23:{name:"(anonymous_23)",decl:{start:{line:180,column:2},end:{line:180,column:3}},loc:{start:{line:180,column:20},end:{line:221,column:3}},line:180},24:{name:"(anonymous_24)",decl:{start:{line:182,column:22},end:{line:182,column:23}},loc:{start:{line:182,column:40},end:{line:213,column:7}},line:182},25:{name:"(anonymous_25)",decl:{start:{line:222,column:2},end:{line:222,column:3}},loc:{start:{line:222,column:11},end:{line:236,column:3}},line:222},26:{name:"(anonymous_26)",decl:{start:{line:232,column:13},end:{line:232,column:14}},loc:{start:{line:232,column:20},end:{line:232,column:38}},line:232}},branchMap:{0:{loc:{start:{line:32,column:2},end:{line:34,column:3}},type:"if",locations:[{start:{line:32,column:2},end:{line:34,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:32},1:{loc:{start:{line:38,column:4},end:{line:40,column:5}},type:"if",locations:[{start:{line:38,column:4},end:{line:40,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},2:{loc:{start:{line:38,column:8},end:{line:38,column:64}},type:"binary-expr",locations:[{start:{line:38,column:8},end:{line:38,column:32}},{start:{line:38,column:36},end:{line:38,column:64}}],line:38},3:{loc:{start:{line:77,column:15},end:{line:77,column:131}},type:"binary-expr",locations:[{start:{line:77,column:15},end:{line:77,column:71}},{start:{line:77,column:75},end:{line:77,column:131}}],line:77},4:{loc:{start:{line:85,column:4},end:{line:90,column:5}},type:"if",locations:[{start:{line:85,column:4},end:{line:90,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:85},5:{loc:{start:{line:91,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:91,column:4},end:{line:93,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:91},6:{loc:{start:{line:91,column:8},end:{line:91,column:98}},type:"binary-expr",locations:[{start:{line:91,column:8},end:{line:91,column:26}},{start:{line:91,column:30},end:{line:91,column:98}}],line:91},7:{loc:{start:{line:94,column:4},end:{line:99,column:5}},type:"if",locations:[{start:{line:94,column:4},end:{line:99,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:94},8:{loc:{start:{line:94,column:8},end:{line:94,column:59}},type:"binary-expr",locations:[{start:{line:94,column:8},end:{line:94,column:26}},{start:{line:94,column:30},end:{line:94,column:59}}],line:94},9:{loc:{start:{line:142,column:8},end:{line:146,column:9}},type:"if",locations:[{start:{line:142,column:8},end:{line:146,column:9}},{start:{line:144,column:15},end:{line:146,column:9}}],line:142},10:{loc:{start:{line:160,column:6},end:{line:160,column:40}},type:"if",locations:[{start:{line:160,column:6},end:{line:160,column:40}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:160}},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},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],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:"AA4L6B;AA5L7B,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;AACjD,OAAO,aAAa;AAEpB,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;AAyBA,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,MACT,UAAU;AAAA,MACV,aAAa;AAAA,IACf;AACA,YAAQ,GAAG,mBAAmB,MAAM;AAClC,WAAK,YAAY;AAAA,IACnB,CAAC;AAAA,EACH;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,EAEF;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,QAAI,WAAW,KAAK,aAAa,GAAG;AAEpC,UAAM,cAAc,IAAI,YAAY;AACpC,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;AAAA,QACA;AAAA,QACA,MAAM,IAAI,QAAQ;AAAA,MACpB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,QAAQ,OAAK;AAClB,UAAG,EAAE,aAAa,OAAQ;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;AACnC,WAAO;AAAA,EACT;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,SAAK,MAAM,UAAU,eAAe,EAAE,QAAQ,CAAC;AAC/C,SAAK,MAAM,aAAa,SAAS,EAAE,OAAO,CAAC;AAC3C,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:"3c5cfb4afb5483770f6919f2f66d47734075cb05"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Mn=function(){return s},s}Mn();function GI(r,t){return Mn().f[0]++,Mn().s[0]++,Pq.render(r,t),Mn().s[1]++,t}function p$(r,t,e){Mn().f[1]++;const n=(Mn().s[2]++,{id:"background",type:"background",paint:{"background-color":"#1c1f24"}}),i=(Mn().s[3]++,VY(e));Mn().s[4]++,i?(Mn().b[0][0]++,Mn().s[5]++,t.push(i)):Mn().b[0][1]++;const o=(Mn().s[6]++,{});Mn().s[7]++,Object.keys(r.sources).forEach(a=>{Mn().f[2]++;const f=(Mn().s[8]++,r.sources[a]);Mn().s[9]++,Mn().b[2][0]++,f.type!=="raster"&&(Mn().b[2][1]++,f.type!=="raster-dem")?(Mn().b[1][0]++,Mn().s[10]++,o[a]=f):Mn().b[1][1]++});const s=(Mn().s[11]++,{...r,sources:o,layers:[n].concat(t)});return Mn().s[12]++,s}class KD extends Zn.Component{constructor(e){Mn().f[7]++,Mn().s[15]++;super(e);Kn(this,"container",(Mn().s[14]++,null));Kn(this,"onLayerSelectById",(Mn().s[71]++,e=>{Mn().f[21]++;const n=(Mn().s[72]++,this.props.mapStyle.layers.findIndex(i=>(Mn().f[22]++,Mn().s[73]++,i.id===e)));Mn().s[74]++,this.props.onLayerSelect(n)}));Mn().s[16]++,this.state={map:null,inspect:null,geocoder:null,zoomControl:null},Mn().s[17]++,Oc.on("languageChanged",()=>{Mn().f[8]++,Mn().s[18]++,this.forceUpdate()})}shouldComponentUpdate(e,n){Mn().f[9]++;let i=(Mn().s[19]++,!1);Mn().s[20]++;try{Mn().s[21]++,i=(Mn().b[3][0]++,JSON.stringify(this.props)!==JSON.stringify(e)||(Mn().b[3][1]++,JSON.stringify(this.state)!==JSON.stringify(n)))}catch{}return Mn().s[22]++,i}componentDidUpdate(){var i,o,s;Mn().f[10]++;const e=(Mn().s[23]++,this.state.map),n=(Mn().s[24]++,this.props.replaceAccessTokens(this.props.mapStyle));Mn().s[25]++,e?(Mn().b[4][0]++,Mn().s[26]++,e.setStyle(n,{diff:!0}),Mn().s[27]++,e.showTileBoundaries=(i=this.props.options)==null?void 0:i.showTileBoundaries,Mn().s[28]++,e.showCollisionBoxes=(o=this.props.options)==null?void 0:o.showCollisionBoxes,Mn().s[29]++,e.showOverdrawInspector=(s=this.props.options)==null?void 0:s.showOverdrawInspector):Mn().b[4][1]++,Mn().s[30]++,Mn().b[6][0]++,this.state.inspect&&(Mn().b[6][1]++,this.props.inspectModeEnabled!==this.state.inspect._showInspectMap)?(Mn().b[5][0]++,Mn().s[31]++,this.state.inspect.toggleInspector()):Mn().b[5][1]++,Mn().s[32]++,Mn().b[8][0]++,this.state.inspect&&(Mn().b[8][1]++,this.props.inspectModeEnabled)?(Mn().b[7][0]++,Mn().s[33]++,this.state.inspect.setOriginalStyle(n),Mn().s[34]++,setTimeout(()=>{Mn().f[11]++,Mn().s[35]++,this.state.inspect.render()},500)):Mn().b[7][1]++}componentDidMount(){Mn().f[12]++;const e=(Mn().s[36]++,{...this.props.options,container:this.container,style:this.props.mapStyle,hash:!0,maxZoom:24,localIdeographFontFamily:!1}),n=(Mn().s[37]++,new Iy.Map(e));Mn().s[38]++;const i=()=>{Mn().f[13]++;const b=(Mn().s[39]++,n.getCenter()),I=(Mn().s[40]++,n.getZoom());Mn().s[41]++,this.props.onChange({center:b,zoom:I})};Mn().s[42]++,i(),Mn().s[43]++,n.showTileBoundaries=e.showTileBoundaries,Mn().s[44]++,n.showCollisionBoxes=e.showCollisionBoxes,Mn().s[45]++,n.showOverdrawInspector=e.showOverdrawInspector;let o=(Mn().s[46]++,this.initGeocoder(n));const s=(Mn().s[47]++,new qY);Mn().s[48]++,n.addControl(s,"top-right");const a=(Mn().s[49]++,new Iy.NavigationControl({visualizePitch:!0}));Mn().s[50]++,n.addControl(a,"top-right");const f=(Mn().s[51]++,document.createElement("div")),g=(Mn().s[52]++,new ZE({popup:new Iy.Popup({closeOnClick:!1}),showMapPopup:!0,showMapPopupOnHover:!1,showInspectMapPopupOnHover:!0,showInspectButton:!1,blockHoverPopupOnClick:!0,assignLayerColor:(b,I)=>(Mn().f[14]++,Mn().s[53]++,BS(ED.brightColor(b,I)).desaturate(.5).string()),buildInspectStyle:(b,I)=>(Mn().f[15]++,Mn().s[54]++,p$(b,I,this.props.highlightedLayer)),renderPopup:b=>(Mn().f[16]++,Mn().s[55]++,this.props.inspectModeEnabled?(Mn().b[9][0]++,Mn().s[56]++,GI(ue.jsx(FY,{features:b}),f)):(Mn().b[9][1]++,Mn().s[57]++,GI(ue.jsx(ID,{features:b,onLayerSelect:this.onLayerSelectById,zoom:this.state.zoom}),f)))}));Mn().s[58]++,n.addControl(g),Mn().s[59]++,n.on("style.load",()=>{Mn().f[17]++,Mn().s[60]++,this.setState({map:n,inspect:g,geocoder:o,zoomControl:s,zoom:n.getZoom()})}),Mn().s[61]++,n.on("data",b=>{if(Mn().f[18]++,Mn().s[62]++,b.dataType!=="tile"){Mn().b[10][0]++,Mn().s[63]++;return}else Mn().b[10][1]++;Mn().s[64]++,this.props.onDataChange({map:this.state.map})}),Mn().s[65]++,n.on("error",b=>{Mn().f[19]++,Mn().s[66]++,console.log("ERROR",b)}),Mn().s[67]++,n.on("zoom",b=>{Mn().f[20]++,Mn().s[68]++,this.setState({zoom:n.getZoom()})}),Mn().s[69]++,n.on("dragend",i),Mn().s[70]++,n.on("zoomend",i)}initGeocoder(e){Mn().f[23]++;const n=(Mn().s[75]++,{forwardGeocode:async o=>{Mn().f[24]++;const s=(Mn().s[76]++,[]);Mn().s[77]++;try{const a=(Mn().s[78]++,`https://nominatim.openstreetmap.org/search?q=${o.query}&format=geojson&polygon_geojson=1&addressdetails=1`),f=(Mn().s[79]++,await fetch(a)),g=(Mn().s[80]++,await f.json());Mn().s[81]++;for(const b of g.features){const I=(Mn().s[82]++,[b.bbox[0]+(b.bbox[2]-b.bbox[0])/2,b.bbox[1]+(b.bbox[3]-b.bbox[1])/2]),S=(Mn().s[83]++,{type:"Feature",geometry:{type:"Point",coordinates:I},place_name:b.properties.display_name,properties:b.properties,text:b.properties.display_name,place_type:["place"],center:I});Mn().s[84]++,s.push(S)}}catch(a){Mn().s[85]++,console.error(`Failed to forwardGeocode with error: ${a}`)}return Mn().s[86]++,{features:s}}}),i=(Mn().s[87]++,new f$(n,{placeholder:this.props.t("Search"),maplibregl:Iy}));return Mn().s[88]++,e.addControl(i,"top-left"),Mn().s[89]++,i}render(){var n,i;Mn().f[25]++;const e=(Mn().s[90]++,this.props.t);return Mn().s[91]++,(n=this.state.geocoder)==null||n.setPlaceholder(e("Search")),Mn().s[92]++,(i=this.state.zoomControl)==null||i.setLabel(e("Zoom:")),Mn().s[93]++,ue.jsx("div",{className:"maputnik-map__map",role:"region","aria-label":e("Map view"),ref:o=>(Mn().f[26]++,Mn().s[94]++,this.container=o),"data-wd-key":"maplibre:map"})}}Kn(KD,"defaultProps",(Mn().s[13]++,{onMapLoaded:()=>{Mn().f[3]++},onDataChange:()=>{Mn().f[4]++},onLayerSelect:()=>{Mn().f[5]++},onChange:()=>{Mn().f[6]++},options:{}}));const m$=(Mn().s[95]++,qa()(KD));var _m=function(){function r(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0},r}();const R1={PROPERTYCHANGE:"propertychange"};var JE=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}();function g$(r,t,e){for(var n,i,o=D1,s=0,a=r.length,f=!1;s<a;)n=s+(a-s>>1),i=+o(r[n],t),i<0?s=n+1:(a=n,f=!i);return f?s:~s}function D1(r,t){return r>t?1:r<t?-1:0}function e6(r,t,e){var n=r.length;if(r[0]<=t)return 0;if(t<=r[n-1])return n-1;var i=void 0;if(e>0){for(i=1;i<n;++i)if(r[i]<t)return i-1}else if(e<0){for(i=1;i<n;++i)if(r[i]<=t)return i}else for(i=1;i<n;++i){if(r[i]==t)return i;if(r[i]<t)return typeof e=="function"?e(t,r[i-1],r[i])>0?i-1:i:r[i-1]-t<t-r[i]?i-1:i}return n-1}function y$(r,t,e){for(;t<e;){var n=r[t];r[t]=r[e],r[e]=n,++t,--e}}function Ep(r,t){for(var e=Array.isArray(t)?t:[t],n=e.length,i=0;i<n;i++)r[r.length]=e[i]}function lg(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function v$(r,t,e){var n=t;return r.every(function(i,o){if(o===0)return!0;var s=n(r[o-1],i);return!(s>0||s===0)})}function _1(){return!0}function t2(){return!1}function ng(){}function _$(r){var t=!1,e,n,i;return function(){var o=Array.prototype.slice.call(arguments);return(!t||this!==i||!lg(o,n))&&(t=!0,i=this,n=o,e=r.apply(this,arguments)),e}}var Zu=typeof Object.assign=="function"?Object.assign:function(r,t){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(r),n=1,i=arguments.length;n<i;++n){var o=arguments[n];if(o!=null)for(var s in o)o.hasOwnProperty(s)&&(e[s]=o[s])}return e};function Fv(r){for(var t in r)delete r[t]}var RD=typeof Object.values=="function"?Object.values:function(r){var t=[];for(var e in r)t.push(r[e]);return t};function rg(r){var t;for(t in r)return!1;return!t}var C$=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),$1=function(r){C$(t,r);function t(e){var n=r.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return t.prototype.addEventListener=function(e,n){if(!(!e||!n)){var i=this.listeners_||(this.listeners_={}),o=i[e]||(i[e]=[]);o.indexOf(n)===-1&&o.push(n)}},t.prototype.dispatchEvent=function(e){var n=typeof e=="string",i=n?e:e.type,o=this.listeners_&&this.listeners_[i];if(o){var s=n?new _m(e):e;s.target||(s.target=this.eventTarget_||this);var a=this.dispatching_||(this.dispatching_={}),f=this.pendingRemovals_||(this.pendingRemovals_={});i in a||(a[i]=0,f[i]=0),++a[i];for(var g,b=0,I=o.length;b<I;++b)if("handleEvent"in o[b]?g=o[b].handleEvent(s):g=o[b].call(this,s),g===!1||s.propagationStopped){g=!1;break}if(--a[i]===0){var S=f[i];for(delete f[i];S--;)this.removeEventListener(i,ng);delete a[i]}return g}},t.prototype.disposeInternal=function(){this.listeners_&&Fv(this.listeners_)},t.prototype.getListeners=function(e){return this.listeners_&&this.listeners_[e]||void 0},t.prototype.hasListener=function(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1},t.prototype.removeEventListener=function(e,n){var i=this.listeners_&&this.listeners_[e];if(i){var o=i.indexOf(n);o!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[o]=ng,++this.pendingRemovals_[e]):(i.splice(o,1),i.length===0&&delete this.listeners_[e]))}},t}(JE);const _o={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 Ia(r,t,e,n,i){if(n&&n!==r&&(e=e.bind(n)),i){var o=e;e=function(){r.removeEventListener(t,e),o.apply(this,arguments)}}var s={target:r,type:t,listener:e};return r.addEventListener(t,e),s}function YC(r,t,e,n){return Ia(r,t,e,n,!0)}function _l(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Fv(r))}var b$=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Uv=function(r){b$(t,r);function t(){var e=r.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return t.prototype.changed=function(){++this.revision_,this.dispatchEvent(_o.CHANGE)},t.prototype.getRevision=function(){return this.revision_},t.prototype.onInternal=function(e,n){if(Array.isArray(e)){for(var i=e.length,o=new Array(i),s=0;s<i;++s)o[s]=Ia(this,e[s],n);return o}else return Ia(this,e,n)},t.prototype.onceInternal=function(e,n){var i;if(Array.isArray(e)){var o=e.length;i=new Array(o);for(var s=0;s<o;++s)i[s]=YC(this,e[s],n)}else i=YC(this,e,n);return n.ol_key=i,i},t.prototype.unInternal=function(e,n){var i=n.ol_key;if(i)cv(i);else if(Array.isArray(e))for(var o=0,s=e.length;o<s;++o)this.removeEventListener(e[o],n);else this.removeEventListener(e,n)},t}($1);Uv.prototype.on;Uv.prototype.once;Uv.prototype.un;function cv(r){if(Array.isArray(r))for(var t=0,e=r.length;t<e;++t)_l(r[t]);else _l(r)}function Zi(){return function(){throw new Error("Unimplemented abstract method.")}()}var x$=0;function Lo(r){return r.ol_uid||(r.ol_uid=String(++x$))}var w$="6.15.1",DD=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),WI=function(r){DD(t,r);function t(e,n,i){var o=r.call(this,e)||this;return o.key=n,o.oldValue=i,o}return t}(_m),Yf=function(r){DD(t,r);function t(e){var n=r.call(this)||this;return n.on,n.once,n.un,Lo(n),n.values_=null,e!==void 0&&n.setProperties(e),n}return t.prototype.get=function(e){var n;return this.values_&&this.values_.hasOwnProperty(e)&&(n=this.values_[e]),n},t.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},t.prototype.getProperties=function(){return this.values_&&Zu({},this.values_)||{}},t.prototype.hasProperties=function(){return!!this.values_},t.prototype.notify=function(e,n){var i;i="change:".concat(e),this.hasListener(i)&&this.dispatchEvent(new WI(i,e,n)),i=R1.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new WI(i,e,n))},t.prototype.addChangeListener=function(e,n){this.addEventListener("change:".concat(e),n)},t.prototype.removeChangeListener=function(e,n){this.removeEventListener("change:".concat(e),n)},t.prototype.set=function(e,n,i){var o=this.values_||(this.values_={});if(i)o[e]=n;else{var s=o[e];o[e]=n,s!==n&&this.notify(e,s)}},t.prototype.setProperties=function(e,n){for(var i in e)this.set(i,e[i],n)},t.prototype.applyProperties=function(e){e.values_&&Zu(this.values_||(this.values_={}),e.values_)},t.prototype.unset=function(e,n){if(this.values_&&e in this.values_){var i=this.values_[e];delete this.values_[e],rg(this.values_)&&(this.values_=null),n||this.notify(e,i)}},t}(Uv),M$=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),LD=function(r){M$(t,r);function t(e){var n=this,i="v"+w$.split("-")[0],o="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+e+" for details.";return n=r.call(this,o)||this,n.code=e,n.name="AssertionError",n.message=o,n}return t}(Error);function fa(r,t){if(!r)throw new LD(t)}var S$=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),E$=function(r){S$(t,r);function t(e){var n=r.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){var i=e;n.setGeometry(i)}else{var o=e;n.setProperties(o)}return n}return t.prototype.clone=function(){var e=new t(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&e.setGeometry(n.clone());var i=this.getStyle();return i&&e.setStyle(i),e},t.prototype.getGeometry=function(){return this.get(this.geometryName_)},t.prototype.getId=function(){return this.id_},t.prototype.getGeometryName=function(){return this.geometryName_},t.prototype.getStyle=function(){return this.style_},t.prototype.getStyleFunction=function(){return this.styleFunction_},t.prototype.handleGeometryChange_=function(){this.changed()},t.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(_l(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=Ia(e,_o.CHANGE,this.handleGeometryChange_,this)),this.changed()},t.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?O$(e):void 0,this.changed()},t.prototype.setId=function(e){this.id_=e,this.changed()},t.prototype.setGeometryName=function(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},t}(Yf);function O$(r){if(typeof r=="function")return r;var t;if(Array.isArray(r))t=r;else{fa(typeof r.getZIndex=="function",41);var e=r;t=[e]}return function(){return t}}var Rd={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},l0={};l0[Rd.RADIANS]=6370997/(2*Math.PI);l0[Rd.DEGREES]=2*Math.PI*6370997/360;l0[Rd.FEET]=.3048;l0[Rd.METERS]=1;l0[Rd.USFEET]=1200/3937;var a0=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",B$=a0.indexOf("firefox")!==-1,I$=a0.indexOf("safari")!==-1&&a0.indexOf("chrom")==-1;I$&&(a0.indexOf("version/15.4")>=0||a0.match(/cpu (os|iphone os) 15_4 like mac os x/));var k$=a0.indexOf("webkit")!==-1&&a0.indexOf("edge")==-1,T$=a0.indexOf("macintosh")!==-1,FD=typeof devicePixelRatio<"u"?devicePixelRatio:1,n2=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,P$=typeof Image<"u"&&Image.prototype.decode,UD=function(){var r=!1;try{var t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r}(),jD=new Array(6);function df(){return[1,0,0,1,0,0]}function QI(r){return r2(r,1,0,0,1,0,0)}function t6(r,t){var e=r[0],n=r[1],i=r[2],o=r[3],s=r[4],a=r[5],f=t[0],g=t[1],b=t[2],I=t[3],S=t[4],B=t[5];return r[0]=e*f+i*g,r[1]=n*f+o*g,r[2]=e*b+i*I,r[3]=n*b+o*I,r[4]=e*S+i*B+s,r[5]=n*S+o*B+a,r}function r2(r,t,e,n,i,o,s){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=o,r[5]=s,r}function K$(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Vu(r,t){var e=t[0],n=t[1];return t[0]=r[0]*e+r[2]*n+r[4],t[1]=r[1]*e+r[3]*n+r[5],t}function Jx(r,t,e){return t6(r,r2(jD,t,0,0,e,0,0))}function R$(r,t,e){return r2(r,t,0,0,e,0,0)}function D$(r,t,e){return t6(r,r2(jD,1,0,0,1,t,e))}function Op(r,t,e,n,i,o,s,a){var f=Math.sin(o),g=Math.cos(o);return r[0]=n*g,r[1]=i*f,r[2]=-n*f,r[3]=i*g,r[4]=s*n*g-a*n*f+t,r[5]=s*i*f+a*i*g+e,r}function n6(r,t){var e=L$(t);fa(e!==0,32);var n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],f=t[5];return r[0]=s/e,r[1]=-i/e,r[2]=-o/e,r[3]=n/e,r[4]=(o*f-s*a)/e,r[5]=-(n*f-i*a)/e,r}function L$(r){return r[0]*r[3]-r[1]*r[2]}var qI;function zD(r){var t="matrix("+r.join(", ")+")";if(n2)return t;var e=qI||(qI=document.createElement("div"));return e.style.transform=t,e.style.transform}const ic={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function PS(r){for(var t=hf(),e=0,n=r.length;e<n;++e)Hy(t,r[e]);return t}function F$(r,t,e){var n=Math.min.apply(null,r),i=Math.min.apply(null,t),o=Math.max.apply(null,r),s=Math.max.apply(null,t);return Bp(n,i,o,s,e)}function t0(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function ND(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function ug(r,t,e){var n,i;return t<r[0]?n=r[0]-t:r[2]<t?n=t-r[2]:n=0,e<r[1]?i=r[1]-e:r[3]<e?i=e-r[3]:i=0,n*n+i*i}function jv(r,t){return r6(r,t[0],t[1])}function $m(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function r6(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function KS(r,t){var e=r[0],n=r[1],i=r[2],o=r[3],s=t[0],a=t[1],f=ic.UNKNOWN;return s<e?f=f|ic.LEFT:s>i&&(f=f|ic.RIGHT),a<n?f=f|ic.BELOW:a>o&&(f=f|ic.ABOVE),f===ic.UNKNOWN&&(f=ic.INTERSECTING),f}function hf(){return[1/0,1/0,-1/0,-1/0]}function Bp(r,t,e,n,i){return i?(i[0]=r,i[1]=t,i[2]=e,i[3]=n,i):[r,t,e,n]}function zv(r){return Bp(1/0,1/0,-1/0,-1/0,r)}function GD(r,t){var e=r[0],n=r[1];return Bp(e,n,e,n,t)}function i6(r,t,e,n,i){var o=zv(i);return QD(o,r,t,e,n)}function L1(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function WD(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function Hy(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function QD(r,t,e,n,i){for(;e<n;e+=i)U$(r,t[e],t[e+1]);return r}function U$(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function qD(r,t){var e;return e=t(o6(r)),e||(e=t(a6(r)),e)||(e=t(s6(r)),e)||(e=t(u0(r)),e)?e:!1}function RS(r){var t=0;return l6(r)||(t=Pl(r)*sh(r)),t}function o6(r){return[r[0],r[1]]}function a6(r){return[r[2],r[1]]}function s0(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function j$(r,t){var e;return e=u0(r),e}function DS(r,t,e,n,i){var o=LS(r,t,e,n),s=o[0],a=o[1],f=o[2],g=o[3],b=o[4],I=o[5],S=o[6],B=o[7];return Bp(Math.min(s,f,b,S),Math.min(a,g,I,B),Math.max(s,f,b,S),Math.max(a,g,I,B),i)}function LS(r,t,e,n){var i=t*n[0]/2,o=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),f=i*s,g=i*a,b=o*s,I=o*a,S=r[0],B=r[1];return[S-f+I,B-g-b,S-f-I,B-g+b,S+f-I,B+g+b,S+f+I,B+g-b,S-f+I,B-g-b]}function sh(r){return r[3]-r[1]}function H0(r,t,e){var n=e||hf();return Hu(r,t)?(r[0]>t[0]?n[0]=r[0]:n[0]=t[0],r[1]>t[1]?n[1]=r[1]:n[1]=t[1],r[2]<t[2]?n[2]=r[2]:n[2]=t[2],r[3]<t[3]?n[3]=r[3]:n[3]=t[3]):zv(n),n}function u0(r){return[r[0],r[3]]}function s6(r){return[r[2],r[3]]}function Pl(r){return r[2]-r[0]}function Hu(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function l6(r){return r[2]<r[0]||r[3]<r[1]}function z$(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function N$(r,t,e){var n=!1,i=KS(r,t),o=KS(r,e);if(i===ic.INTERSECTING||o===ic.INTERSECTING)n=!0;else{var s=r[0],a=r[1],f=r[2],g=r[3],b=t[0],I=t[1],S=e[0],B=e[1],P=(B-I)/(S-b),U=void 0,j=void 0;o&ic.ABOVE&&!(i&ic.ABOVE)&&(U=S-(B-g)/P,n=U>=s&&U<=f),!n&&o&ic.RIGHT&&!(i&ic.RIGHT)&&(j=B-(S-f)*P,n=j>=a&&j<=g),!n&&o&ic.BELOW&&!(i&ic.BELOW)&&(U=S-(B-a)/P,n=U>=s&&U<=f),!n&&o&ic.LEFT&&!(i&ic.LEFT)&&(j=B-(S-s)*P,n=j>=a&&j<=g)}return n}function G$(r,t,e,n){var i=[],o;i=[r[0],r[1],r[2],r[1],r[2],r[3],r[0],r[3]],t(i,i,2);for(var s=[],a=[],o=0,f=i.length;o<f;o+=2)s.push(i[o]),a.push(i[o+1]);return F$(s,a,e)}function YD(r,t){var e=t.getExtent(),n=s0(r);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){var i=Pl(e),o=Math.floor((n[0]-e[0])/i),s=o*i;r[0]-=s,r[2]-=s}return r}function W$(r,t){if(t.canWrapX()){var e=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[e[0],r[1],e[2],r[3]]];YD(r,t);var n=Pl(e);if(Pl(r)>n)return[[e[0],r[1],e[2],r[3]]];if(r[0]<e[0])return[[r[0]+n,r[1],e[2],r[3]],[e[0],r[1],r[2],r[3]]];if(r[2]>e[2])return[[r[0],r[1],e[2],r[3]],[e[0],r[1],r[2]-n,r[3]]]}return[r]}var u6=function(){function r(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return r.prototype.canWrapX=function(){return this.canWrapX_},r.prototype.getCode=function(){return this.code_},r.prototype.getExtent=function(){return this.extent_},r.prototype.getUnits=function(){return this.units_},r.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||l0[this.units_]},r.prototype.getWorldExtent=function(){return this.worldExtent_},r.prototype.getAxisOrientation=function(){return this.axisOrientation_},r.prototype.isGlobal=function(){return this.global_},r.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)},r.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},r.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},r.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)},r.prototype.setWorldExtent=function(t){this.worldExtent_=t},r.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},r.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},r}();function hA(r,t,e){return Math.min(Math.max(r,t),e)}var Q$=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(t){var e=Math.exp(t);return(e+1/e)/2},r}(),q$=function(){var r;return"log2"in Math?r=Math.log2:r=function(t){return Math.log(t)*Math.LOG2E},r}();function Y$(r,t,e,n,i,o){var s=i-e,a=o-n;if(s!==0||a!==0){var f=((r-e)*s+(t-n)*a)/(s*s+a*a);f>1?(e=i,n=o):f>0&&(e+=s*f,n+=a*f)}return Z0(r,t,e,n)}function Z0(r,t,e,n){var i=e-r,o=n-t;return i*i+o*o}function $$(r){for(var t=r.length,e=0;e<t;e++){for(var n=e,i=Math.abs(r[e][e]),o=e+1;o<t;o++){var s=Math.abs(r[o][e]);s>i&&(i=s,n=o)}if(i===0)return null;var a=r[n];r[n]=r[e],r[e]=a;for(var f=e+1;f<t;f++)for(var g=-r[f][e]/r[e][e],b=e;b<t+1;b++)e==b?r[f][b]=0:r[f][b]+=g*r[e][b]}for(var I=new Array(t),S=t-1;S>=0;S--){I[S]=r[S][t]/r[S][S];for(var B=S-1;B>=0;B--)r[B][t]-=r[B][S]*I[S]}return I}function yC(r){return r*Math.PI/180}function X0(r,t){var e=r%t;return e*t<0?e+t:e}function um(r,t,e){return r+e*(t-r)}function $D(r,t){var e=Math.pow(10,t);return Math.round(r*e)/e}function F_(r,t){return Math.floor($D(r,t))}function U_(r,t){return Math.ceil($D(r,t))}var V$=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Nv=6378137,l1=Math.PI*Nv,H$=[-l1,-l1,l1,l1],Z$=[-180,-85,180,85],j_=Nv*Math.log(Math.tan(Math.PI/2)),Bg=function(r){V$(t,r);function t(e){return r.call(this,{code:e,units:Rd.METERS,extent:H$,global:!0,worldExtent:Z$,getPointResolution:function(n,i){return n/Q$(i[1]/Nv)}})||this}return t}(u6),YI=[new Bg("EPSG:3857"),new Bg("EPSG:102100"),new Bg("EPSG:102113"),new Bg("EPSG:900913"),new Bg("http://www.opengis.net/def/crs/EPSG/0/3857"),new Bg("http://www.opengis.net/gml/srs/epsg.xml#3857")];function X$(r,t,e){var n=r.length,i=e>1?e:2,o=t;o===void 0&&(i>2?o=r.slice():o=new Array(n));for(var s=0;s<n;s+=i){o[s]=l1*r[s]/180;var a=Nv*Math.log(Math.tan(Math.PI*(+r[s+1]+90)/360));a>j_?a=j_:a<-j_&&(a=-j_),o[s+1]=a}return o}function J$(r,t,e){var n=r.length,i=e>1?e:2,o=t;o===void 0&&(i>2?o=r.slice():o=new Array(n));for(var s=0;s<n;s+=i)o[s]=180*r[s]/l1,o[s+1]=360*Math.atan(Math.exp(r[s+1]/Nv))/Math.PI-90;return o}var eV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),tV=6378137,$I=[-180,-90,180,90],nV=Math.PI*tV/180,S0=function(r){eV(t,r);function t(e,n){return r.call(this,{code:e,units:Rd.DEGREES,extent:$I,axisOrientation:n,global:!0,metersPerUnit:nV,worldExtent:$I})||this}return t}(u6),VI=[new S0("CRS:84"),new S0("EPSG:4326","neu"),new S0("urn:ogc:def:crs:OGC:1.3:CRS84"),new S0("urn:ogc:def:crs:OGC:2:84"),new S0("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new S0("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new S0("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],FS={};function rV(r){return FS[r]||FS[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function iV(r,t){FS[r]=t}var C1={};function $C(r,t,e){var n=r.getCode(),i=t.getCode();n in C1||(C1[n]={}),C1[n][i]=e}function oV(r,t){var e;return r in C1&&t in C1[r]&&(e=C1[r][t]),e}function aV(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function VC(r,t){for(var e=!0,n=r.length-1;n>=0;--n)if(r[n]!=t[n]){e=!1;break}return e}function A6(r,t){var e=Math.cos(t),n=Math.sin(t),i=r[0]*e-r[1]*n,o=r[1]*e+r[0]*n;return r[0]=i,r[1]=o,r}function sV(r,t){return r[0]*=t,r[1]*=t,r}function c6(r,t){if(t.canWrapX()){var e=Pl(t.getExtent()),n=lV(r,t,e);n&&(r[0]-=n*e)}return r}function lV(r,t,e){var n=t.getExtent(),i=0;if(t.canWrapX()&&(r[0]<n[0]||r[0]>n[2])){var o=e||Pl(n);i=Math.floor((r[0]-n[0])/o)}return i}var uV=63710088e-1;function HI(r,t,e){var n=uV,i=yC(r[1]),o=yC(t[1]),s=(o-i)/2,a=yC(t[0]-r[0])/2,f=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}var US=!0;function VD(r){US=!1}function d6(r,t,e){var n;if(t!==void 0){for(var i=0,o=r.length;i<o;++i)t[i]=r[i];n=t}else n=r.slice();return n}function HD(r,t,e){if(t!==void 0&&r!==t){for(var n=0,i=r.length;n<i;++n)t[n]=r[n];r=t}return r}function AV(r){iV(r.getCode(),r),$C(r,r,d6)}function cV(r){r.forEach(AV)}function ou(r){return typeof r=="string"?rV(r):r||null}function ZI(r,t,e,n){r=ou(r);var i,o=r.getPointResolutionFunc();if(o){i=o(t,e);var s}else{var a=r.getUnits();if(a==Rd.DEGREES||n==Rd.DEGREES)i=t;else{var f=i2(r,ou("EPSG:4326"));if(f===HD&&a!==Rd.DEGREES)i=t*r.getMetersPerUnit();else{var g=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];g=f(g,g,2);var b=HI(g.slice(0,2),g.slice(2,4)),I=HI(g.slice(4,6),g.slice(6,8));i=(b+I)/2}var s=r.getMetersPerUnit();s!==void 0&&(i/=s)}}return i}function XI(r){cV(r),r.forEach(function(t){r.forEach(function(e){t!==e&&$C(t,e,d6)})})}function dV(r,t,e,n){r.forEach(function(i){t.forEach(function(o){$C(i,o,e),$C(o,i,n)})})}function h6(r,t){return r?typeof r=="string"?ou(r):r:ou(t)}function jS(r,t){return VD(),f6(r,"EPSG:4326","EPSG:3857")}function e3(r,t){var e=f6(r,"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=X0(n+180,360)-180),e}function F0(r,t){if(r===t)return!0;var e=r.getUnits()===t.getUnits();if(r.getCode()===t.getCode())return e;var n=i2(r,t);return n===d6&&e}function i2(r,t){var e=r.getCode(),n=t.getCode(),i=oV(e,n);return i||(i=HD),i}function HC(r,t){var e=ou(r),n=ou(t);return i2(e,n)}function f6(r,t,e){var n=HC(t,e);return n(r,void 0,r.length)}var hV=null;function fV(){return hV}function zS(r,t){return r}function am(r,t){return US&&!VC(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(US=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function ZD(r,t){return r}function N0(r,t){return r}function pV(){XI(YI),XI(VI),dV(VI,YI,X$,J$)}pV();function n0(r,t,e,n,i,o){for(var s=o||[],a=0,f=t;f<e;f+=n){var g=r[f],b=r[f+1];s[a++]=i[0]*g+i[2]*b+i[4],s[a++]=i[1]*g+i[3]*b+i[5]}return o&&s.length!=a&&(s.length=a),s}function XD(r,t,e,n,i,o,s){for(var a=s||[],f=Math.cos(i),g=Math.sin(i),b=o[0],I=o[1],S=0,B=t;B<e;B+=n){var P=r[B]-b,U=r[B+1]-I;a[S++]=b+P*f-U*g,a[S++]=I+P*g+U*f;for(var j=B+2;j<B+n;++j)a[S++]=r[j]}return s&&a.length!=S&&(a.length=S),a}function mV(r,t,e,n,i,o,s,a){for(var f=a||[],g=s[0],b=s[1],I=0,S=t;S<e;S+=n){var B=r[S]-g,P=r[S+1]-b;f[I++]=g+i*B,f[I++]=b+o*P;for(var U=S+2;U<S+n;++U)f[I++]=r[U]}return a&&f.length!=I&&(f.length=I),f}function gV(r,t,e,n,i,o,s){for(var a=s||[],f=0,g=t;g<e;g+=n){a[f++]=r[g]+i,a[f++]=r[g+1]+o;for(var b=g+2;b<g+n;++b)a[f++]=r[b]}return s&&a.length!=f&&(a.length=f),a}var yV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),JI=df(),JD=function(r){yV(t,r);function t(){var e=r.call(this)||this;return e.extent_=hf(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=_$(function(n,i,o){if(!o)return this.getSimplifiedGeometry(i);var s=this.clone();return s.applyTransform(o),s.getSimplifiedGeometry(i)}),e}return t.prototype.simplifyTransformed=function(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)},t.prototype.clone=function(){return Zi()},t.prototype.closestPointXY=function(e,n,i,o){return Zi()},t.prototype.containsXY=function(e,n){var i=this.getClosestPoint([e,n]);return i[0]===e&&i[1]===n},t.prototype.getClosestPoint=function(e,n){var i=n||[NaN,NaN];return this.closestPointXY(e[0],e[1],i,1/0),i},t.prototype.intersectsCoordinate=function(e){return this.containsXY(e[0],e[1])},t.prototype.computeExtent=function(e){return Zi()},t.prototype.getExtent=function(e){if(this.extentRevision_!=this.getRevision()){var n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&zv(n),this.extentRevision_=this.getRevision()}return z$(this.extent_,e)},t.prototype.rotate=function(e,n){Zi()},t.prototype.scale=function(e,n,i){Zi()},t.prototype.simplify=function(e){return this.getSimplifiedGeometry(e*e)},t.prototype.getSimplifiedGeometry=function(e){return Zi()},t.prototype.getType=function(){return Zi()},t.prototype.applyTransform=function(e){Zi()},t.prototype.intersectsExtent=function(e){return Zi()},t.prototype.translate=function(e,n){Zi()},t.prototype.transform=function(e,n){var i=ou(e),o=i.getUnits()==Rd.TILE_PIXELS?function(s,a,f){var g=i.getExtent(),b=i.getWorldExtent(),I=sh(b)/sh(g);return Op(JI,b[0],b[3],I,-I,0,0,0),n0(s,0,s.length,f,JI,a),HC(i,n)(s,a,f)}:HC(i,n);return this.applyTransform(o),this},t}(Yf),vV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),_V=function(r){vV(t,r);function t(e){var n=r.call(this)||this;return n.geometries_=e||null,n.changeEventsKeys_=[],n.listenGeometriesChange_(),n}return t.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(_l),this.changeEventsKeys_.length=0},t.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var e=0,n=this.geometries_.length;e<n;++e)this.changeEventsKeys_.push(Ia(this.geometries_[e],_o.CHANGE,this.changed,this))},t.prototype.clone=function(){var e=new t(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e},t.prototype.closestPointXY=function(e,n,i,o){if(o<ug(this.getExtent(),e,n))return o;for(var s=this.geometries_,a=0,f=s.length;a<f;++a)o=s[a].closestPointXY(e,n,i,o);return o},t.prototype.containsXY=function(e,n){for(var i=this.geometries_,o=0,s=i.length;o<s;++o)if(i[o].containsXY(e,n))return!0;return!1},t.prototype.computeExtent=function(e){zv(e);for(var n=this.geometries_,i=0,o=n.length;i<o;++i)WD(e,n[i].getExtent());return e},t.prototype.getGeometries=function(){return e8(this.geometries_)},t.prototype.getGeometriesArray=function(){return this.geometries_},t.prototype.getGeometriesArrayRecursive=function(){for(var e=[],n=this.geometries_,i=0,o=n.length;i<o;++i)n[i].getType()===this.getType()?e=e.concat(n[i].getGeometriesArrayRecursive()):e.push(n[i]);return e},t.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var n=[],i=this.geometries_,o=!1,s=0,a=i.length;s<a;++s){var f=i[s],g=f.getSimplifiedGeometry(e);n.push(g),g!==f&&(o=!0)}if(o){var b=new t(null);return b.setGeometriesArray(n),b}else return this.simplifiedGeometryMaxMinSquaredTolerance=e,this},t.prototype.getType=function(){return"GeometryCollection"},t.prototype.intersectsExtent=function(e){for(var n=this.geometries_,i=0,o=n.length;i<o;++i)if(n[i].intersectsExtent(e))return!0;return!1},t.prototype.isEmpty=function(){return this.geometries_.length===0},t.prototype.rotate=function(e,n){for(var i=this.geometries_,o=0,s=i.length;o<s;++o)i[o].rotate(e,n);this.changed()},t.prototype.scale=function(e,n,i){var o=i;o||(o=s0(this.getExtent()));for(var s=this.geometries_,a=0,f=s.length;a<f;++a)s[a].scale(e,n,o);this.changed()},t.prototype.setGeometries=function(e){this.setGeometriesArray(e8(e))},t.prototype.setGeometriesArray=function(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()},t.prototype.applyTransform=function(e){for(var n=this.geometries_,i=0,o=n.length;i<o;++i)n[i].applyTransform(e);this.changed()},t.prototype.translate=function(e,n){for(var i=this.geometries_,o=0,s=i.length;o<s;++o)i[o].translate(e,n);this.changed()},t.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),r.prototype.disposeInternal.call(this)},t}(JD);function e8(r){for(var t=[],e=0,n=r.length;e<n;++e)t.push(r[e].clone());return t}var eL=function(){function r(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return r.prototype.getReadOptions=function(t,e){var n;if(e){var i=e.dataProjection?ou(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()===Rd.TILE_PIXELS&&(i=ou(i),i.setWorldExtent(e.extent)),n={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(n)},r.prototype.adaptOptions=function(t){return Zu({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},r.prototype.getType=function(){return Zi()},r.prototype.readFeature=function(t,e){return Zi()},r.prototype.readFeatures=function(t,e){return Zi()},r.prototype.readGeometry=function(t,e){return Zi()},r.prototype.readProjection=function(t){return Zi()},r.prototype.writeFeature=function(t,e){return Zi()},r.prototype.writeFeatures=function(t,e){return Zi()},r.prototype.writeGeometry=function(t,e){return Zi()},r}();function p6(r,t,e){var n=e?ou(e.featureProjection):null,i=e?ou(e.dataProjection):null,o;if(n&&i&&!F0(n,i)?o=(t?r.clone():r).transform(t?n:i,t?i:n):o=r,t&&e&&e.decimals!==void 0){var s=Math.pow(10,e.decimals),a=function(f){for(var g=0,b=f.length;g<b;++g)f[g]=Math.round(f[g]*s)/s;return f};o===r&&(o=r.clone()),o.applyTransform(a)}return o}var CV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),bV=function(r){CV(t,r);function t(){return r.call(this)||this}return t.prototype.getType=function(){return"json"},t.prototype.readFeature=function(e,n){return this.readFeatureFromObject(z_(e),this.getReadOptions(e,n))},t.prototype.readFeatures=function(e,n){return this.readFeaturesFromObject(z_(e),this.getReadOptions(e,n))},t.prototype.readFeatureFromObject=function(e,n){return Zi()},t.prototype.readFeaturesFromObject=function(e,n){return Zi()},t.prototype.readGeometry=function(e,n){return this.readGeometryFromObject(z_(e),this.getReadOptions(e,n))},t.prototype.readGeometryFromObject=function(e,n){return Zi()},t.prototype.readProjection=function(e){return this.readProjectionFromObject(z_(e))},t.prototype.readProjectionFromObject=function(e){return Zi()},t.prototype.writeFeature=function(e,n){return JSON.stringify(this.writeFeatureObject(e,n))},t.prototype.writeFeatureObject=function(e,n){return Zi()},t.prototype.writeFeatures=function(e,n){return JSON.stringify(this.writeFeaturesObject(e,n))},t.prototype.writeFeaturesObject=function(e,n){return Zi()},t.prototype.writeGeometry=function(e,n){return JSON.stringify(this.writeGeometryObject(e,n))},t.prototype.writeGeometryObject=function(e,n){return Zi()},t}(eL);function z_(r){if(typeof r=="string"){var t=JSON.parse(r);return t||null}else return r!==null?r:null}const nl={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};var xV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ag=function(r){xV(t,r);function t(){var e=r.call(this)||this;return e.layout=nl.XY,e.stride=2,e.flatCoordinates=null,e}return t.prototype.computeExtent=function(e){return i6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t.prototype.getCoordinates=function(){return Zi()},t.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t.prototype.getLayout=function(){return this.layout},t.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var n=this.getSimplifiedGeometryInternal(e),i=n.getFlatCoordinates();return i.length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)},t.prototype.getSimplifiedGeometryInternal=function(e){return this},t.prototype.getStride=function(){return this.stride},t.prototype.setFlatCoordinates=function(e,n){this.stride=t8(e),this.layout=e,this.flatCoordinates=n},t.prototype.setCoordinates=function(e,n){Zi()},t.prototype.setLayout=function(e,n,i){var o;if(e)o=t8(e);else{for(var s=0;s<i;++s)if(n.length===0){this.layout=nl.XY,this.stride=2;return}else n=n[0];o=n.length,e=wV(o)}this.layout=e,this.stride=o},t.prototype.applyTransform=function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t.prototype.rotate=function(e,n){var i=this.getFlatCoordinates();if(i){var o=this.getStride();XD(i,0,i.length,o,e,n,i),this.changed()}},t.prototype.scale=function(e,n,i){var o=n;o===void 0&&(o=e);var s=i;s||(s=s0(this.getExtent()));var a=this.getFlatCoordinates();if(a){var f=this.getStride();mV(a,0,a.length,f,e,o,s,a),this.changed()}},t.prototype.translate=function(e,n){var i=this.getFlatCoordinates();if(i){var o=this.getStride();gV(i,0,i.length,o,e,n,i),this.changed()}},t}(JD);function wV(r){var t;return r==2?t=nl.XY:r==3?t=nl.XYZ:r==4&&(t=nl.XYZM),t}function t8(r){var t;return r==nl.XY?t=2:r==nl.XYZ||r==nl.XYM?t=3:r==nl.XYZM&&(t=4),t}function MV(r,t,e){var n=r.getFlatCoordinates();if(n){var i=r.getStride();return n0(n,0,n.length,i,t,e)}else return null}function n8(r,t,e,n,i,o,s){var a=r[t],f=r[t+1],g=r[e]-a,b=r[e+1]-f,I;if(g===0&&b===0)I=t;else{var S=((i-a)*g+(o-f)*b)/(g*g+b*b);if(S>1)I=e;else if(S>0){for(var B=0;B<n;++B)s[B]=um(r[t+B],r[e+B],S);s.length=n;return}else I=t}for(var B=0;B<n;++B)s[B]=r[I+B];s.length=n}function m6(r,t,e,n,i){var o=r[t],s=r[t+1];for(t+=n;t<e;t+=n){var a=r[t],f=r[t+1],g=Z0(o,s,a,f);g>i&&(i=g),o=a,s=f}return i}function g6(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];i=m6(r,t,a,n,i),t=a}return i}function SV(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];i=g6(r,t,a,n,i),t=a[a.length-1]}return i}function y6(r,t,e,n,i,o,s,a,f,g,b){if(t==e)return g;var I,S;if(i===0)if(S=Z0(s,a,r[t],r[t+1]),S<g){for(I=0;I<n;++I)f[I]=r[t+I];return f.length=n,S}else return g;for(var B=b||[NaN,NaN],P=t+n;P<e;)if(n8(r,P-n,P,n,s,a,B),S=Z0(s,a,B[0],B[1]),S<g){for(g=S,I=0;I<n;++I)f[I]=B[I];f.length=n,P+=n}else P+=n*Math.max((Math.sqrt(S)-Math.sqrt(g))/i|0,1);if(o&&(n8(r,e-n,t,n,s,a,B),S=Z0(s,a,B[0],B[1]),S<g)){for(g=S,I=0;I<n;++I)f[I]=B[I];f.length=n}return g}function v6(r,t,e,n,i,o,s,a,f,g,b){for(var I=b||[NaN,NaN],S=0,B=e.length;S<B;++S){var P=e[S];g=y6(r,t,P,n,i,o,s,a,f,g,I),t=P}return g}function EV(r,t,e,n,i,o,s,a,f,g,b){for(var I=[NaN,NaN],S=0,B=e.length;S<B;++S){var P=e[S];g=v6(r,t,P,n,i,o,s,a,f,g,I),t=P[P.length-1]}return g}function OV(r,t,e,n){for(var i=0,o=e.length;i<o;++i)r[t++]=e[i];return t}function o2(r,t,e,n){for(var i=0,o=e.length;i<o;++i)for(var s=e[i],a=0;a<n;++a)r[t++]=s[a];return t}function _6(r,t,e,n,i){for(var o=i||[],s=0,a=0,f=e.length;a<f;++a){var g=o2(r,t,e[a],n);o[s++]=g,t=g}return o.length=s,o}function BV(r,t,e,n,i){for(var o=i||[],s=0,a=0,f=e.length;a<f;++a){var g=_6(r,t,e[a],n,o[s]);o[s++]=g,t=g[g.length-1]}return o.length=s,o}function C6(r,t,e,n,i,o,s){var a=(e-t)/n;if(a<3){for(;t<e;t+=n)o[s++]=r[t],o[s++]=r[t+1];return s}var f=new Array(a);f[0]=1,f[a-1]=1;for(var g=[t,e-n],b=0;g.length>0;){for(var I=g.pop(),S=g.pop(),B=0,P=r[S],U=r[S+1],j=r[I],q=r[I+1],W=S+n;W<I;W+=n){var ee=r[W],J=r[W+1],$=Y$(ee,J,P,U,j,q);$>B&&(b=W,B=$)}B>i&&(f[(b-t)/n]=1,S+n<b&&g.push(S,b),b+n<I&&g.push(b,I))}for(var W=0;W<a;++W)f[W]&&(o[s++]=r[t+W*n],o[s++]=r[t+W*n+1]);return s}function IV(r,t,e,n,i,o,s,a){for(var f=0,g=e.length;f<g;++f){var b=e[f];s=C6(r,t,b,n,i,o,s),a.push(s),t=b}return s}function K0(r,t){return t*Math.round(r/t)}function kV(r,t,e,n,i,o,s){if(t==e)return s;var a=K0(r[t],i),f=K0(r[t+1],i);t+=n,o[s++]=a,o[s++]=f;var g,b;do if(g=K0(r[t],i),b=K0(r[t+1],i),t+=n,t==e)return o[s++]=g,o[s++]=b,s;while(g==a&&b==f);for(;t<e;){var I=K0(r[t],i),S=K0(r[t+1],i);if(t+=n,!(I==g&&S==b)){var B=g-a,P=b-f,U=I-a,j=S-f;if(B*j==P*U&&(B<0&&U<B||B==U||B>0&&U>B)&&(P<0&&j<P||P==j||P>0&&j>P)){g=I,b=S;continue}o[s++]=g,o[s++]=b,a=g,f=b,g=I,b=S}}return o[s++]=g,o[s++]=b,s}function tL(r,t,e,n,i,o,s,a){for(var f=0,g=e.length;f<g;++f){var b=e[f];s=kV(r,t,b,n,i,o,s),a.push(s),t=b}return s}function TV(r,t,e,n,i,o,s,a){for(var f=0,g=e.length;f<g;++f){var b=e[f],I=[];s=tL(r,t,b,n,i,o,s,I),a.push(I),t=b[b.length-1]}return s}function nL(r,t,e,n,i){var o;for(t+=n;t<e;t+=n)if(o=i(r.slice(t-n,t),r.slice(t,t+n)),o)return o;return!1}function Vm(r,t,e,n,i){for(var o=i!==void 0?i:[],s=0,a=t;a<e;a+=n)o[s++]=r.slice(a,a+n);return o.length=s,o}function dv(r,t,e,n,i){for(var o=i!==void 0?i:[],s=0,a=0,f=e.length;a<f;++a){var g=e[a];o[s++]=Vm(r,t,g,n,o[s]),t=g}return o.length=s,o}function NS(r,t,e,n,i){for(var o=i!==void 0?i:[],s=0,a=0,f=e.length;a<f;++a){var g=e[a];o[s++]=dv(r,t,g,n,o[s]),t=g[g.length-1]}return o.length=s,o}function ZC(r,t,e,n,i,o,s){var a,f,g=(e-t)/n;if(g===1)a=t;else if(g===2)a=t,f=i;else if(g!==0){for(var b=r[t],I=r[t+1],S=0,B=[0],P=t+n;P<e;P+=n){var U=r[P],j=r[P+1];S+=Math.sqrt((U-b)*(U-b)+(j-I)*(j-I)),B.push(S),b=U,I=j}var q=i*S,W=g$(B,q);W<0?(f=(q-B[-W-2])/(B[-W-1]-B[-W-2]),a=t+(-W-2)*n):a=t+W*n}for(var ee=s>1?s:2,J=o||new Array(ee),P=0;P<ee;++P)J[P]=a===void 0?NaN:f===void 0?r[a+P]:um(r[a+P],r[a+n+P],f);return J}function GS(r,t,e,n,i,o){if(e==t)return null;var s;if(i<r[t+n-1])return o?(s=r.slice(t,t+n),s[n-1]=i,s):null;if(r[e-1]<i)return o?(s=r.slice(e-n,e),s[n-1]=i,s):null;if(i==r[t+n-1])return r.slice(t,t+n);for(var a=t/n,f=e/n;a<f;){var g=a+f>>1;i<r[(g+1)*n-1]?f=g:a=g+1}var b=r[a*n-1];if(i==b)return r.slice((a-1)*n,(a-1)*n+n);var I=r[(a+1)*n-1],S=(i-b)/(I-b);s=[];for(var B=0;B<n-1;++B)s.push(um(r[(a-1)*n+B],r[a*n+B],S));return s.push(i),s}function PV(r,t,e,n,i,o,s){if(s)return GS(r,t,e[e.length-1],n,i,o);var a;if(i<r[n-1])return o?(a=r.slice(0,n),a[n-1]=i,a):null;if(r[r.length-1]<i)return o?(a=r.slice(r.length-n),a[n-1]=i,a):null;for(var f=0,g=e.length;f<g;++f){var b=e[f];if(t!=b){if(i<r[t+n-1])return null;if(i<=r[b-1])return GS(r,t,b,n,i,!1);t=b}}return null}function KV(r,t,e,n,i){var o=qD(i,function(s){return!G0(r,t,e,n,s[0],s[1])});return!o}function G0(r,t,e,n,i,o){for(var s=0,a=r[e-n],f=r[e-n+1];t<e;t+=n){var g=r[t],b=r[t+1];f<=o?b>o&&(g-a)*(o-f)-(i-a)*(b-f)>0&&s++:b<=o&&(g-a)*(o-f)-(i-a)*(b-f)<0&&s--,a=g,f=b}return s!==0}function b6(r,t,e,n,i,o){if(e.length===0||!G0(r,t,e[0],n,i,o))return!1;for(var s=1,a=e.length;s<a;++s)if(G0(r,e[s-1],e[s],n,i,o))return!1;return!0}function RV(r,t,e,n,i,o){if(e.length===0)return!1;for(var s=0,a=e.length;s<a;++s){var f=e[s];if(b6(r,t,f,n,i,o))return!0;t=f[f.length-1]}return!1}function a2(r,t,e,n,i){var o=QD(hf(),r,t,e,n);return Hu(i,o)?$m(i,o)||o[0]>=i[0]&&o[2]<=i[2]||o[1]>=i[1]&&o[3]<=i[3]?!0:nL(r,t,e,n,function(s,a){return N$(i,s,a)}):!1}function DV(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o){if(a2(r,t,e[o],n,i))return!0;t=e[o]}return!1}function rL(r,t,e,n,i){return!!(a2(r,t,e,n,i)||G0(r,t,e,n,i[0],i[1])||G0(r,t,e,n,i[0],i[3])||G0(r,t,e,n,i[2],i[1])||G0(r,t,e,n,i[2],i[3]))}function iL(r,t,e,n,i){if(!rL(r,t,e[0],n,i))return!1;if(e.length===1)return!0;for(var o=1,s=e.length;o<s;++o)if(KV(r,e[o-1],e[o],n,i)&&!a2(r,e[o-1],e[o],n,i))return!1;return!0}function LV(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];if(iL(r,t,a,n,i))return!0;t=a[a.length-1]}return!1}function oL(r,t,e,n){for(var i=r[t],o=r[t+1],s=0,a=t+n;a<e;a+=n){var f=r[a],g=r[a+1];s+=Math.sqrt((f-i)*(f-i)+(g-o)*(g-o)),i=f,o=g}return s}var FV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),XC=function(r){FV(t,r);function t(e,n){var i=r.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?i.setFlatCoordinates(n,e):i.setCoordinates(e,n),i}return t.prototype.appendCoordinate=function(e){this.flatCoordinates?Ep(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t.prototype.clone=function(){var e=new t(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e},t.prototype.closestPointXY=function(e,n,i,o){return o<ug(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(m6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),y6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,n,i,o))},t.prototype.forEachSegment=function(e){return nL(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t.prototype.getCoordinateAtM=function(e,n){if(this.layout!=nl.XYM&&this.layout!=nl.XYZM)return null;var i=n!==void 0?n:!1;return GS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i)},t.prototype.getCoordinates=function(){return Vm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getCoordinateAt=function(e,n){return ZC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,this.stride)},t.prototype.getLength=function(){return oL(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t.prototype.getSimplifiedGeometryInternal=function(e){var n=[];return n.length=C6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new t(n,nl.XY)},t.prototype.getType=function(){return"LineString"},t.prototype.intersectsExtent=function(e){return a2(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=o2(this.flatCoordinates,0,e,this.stride),this.changed()},t}(Ag),UV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),aL=function(r){UV(t,r);function t(e,n,i){var o=r.call(this)||this;if(o.ends_=[],o.maxDelta_=-1,o.maxDeltaRevision_=-1,Array.isArray(e[0]))o.setCoordinates(e,n);else if(n!==void 0&&i)o.setFlatCoordinates(n,e),o.ends_=i;else{for(var s=o.getLayout(),a=e,f=[],g=[],b=0,I=a.length;b<I;++b){var S=a[b];b===0&&(s=S.getLayout()),Ep(f,S.getFlatCoordinates()),g.push(f.length)}o.setFlatCoordinates(s,f),o.ends_=g}return o}return t.prototype.appendLineString=function(e){this.flatCoordinates?Ep(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t.prototype.clone=function(){var e=new t(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e},t.prototype.closestPointXY=function(e,n,i,o){return o<ug(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(g6(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),v6(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,n,i,o))},t.prototype.getCoordinateAtM=function(e,n,i){if(this.layout!=nl.XYM&&this.layout!=nl.XYZM||this.flatCoordinates.length===0)return null;var o=n!==void 0?n:!1,s=i!==void 0?i:!1;return PV(this.flatCoordinates,0,this.ends_,this.stride,e,o,s)},t.prototype.getCoordinates=function(){return dv(this.flatCoordinates,0,this.ends_,this.stride)},t.prototype.getEnds=function(){return this.ends_},t.prototype.getLineString=function(e){return e<0||this.ends_.length<=e?null:new XC(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)},t.prototype.getLineStrings=function(){for(var e=this.flatCoordinates,n=this.ends_,i=this.layout,o=[],s=0,a=0,f=n.length;a<f;++a){var g=n[a],b=new XC(e.slice(s,g),i);o.push(b),s=g}return o},t.prototype.getFlatMidpoints=function(){for(var e=[],n=this.flatCoordinates,i=0,o=this.ends_,s=this.stride,a=0,f=o.length;a<f;++a){var g=o[a],b=ZC(n,i,g,s,.5);Ep(e,b),i=g}return e},t.prototype.getSimplifiedGeometryInternal=function(e){var n=[],i=[];return n.length=IV(this.flatCoordinates,0,this.ends_,this.stride,e,n,0,i),new t(n,nl.XY,i)},t.prototype.getType=function(){return"MultiLineString"},t.prototype.intersectsExtent=function(e){return DV(this.flatCoordinates,0,this.ends_,this.stride,e)},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=_6(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},t}(Ag),jV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),hv=function(r){jV(t,r);function t(e,n){var i=r.call(this)||this;return i.setCoordinates(e,n),i}return t.prototype.clone=function(){var e=new t(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e},t.prototype.closestPointXY=function(e,n,i,o){var s=this.flatCoordinates,a=Z0(e,n,s[0],s[1]);if(a<o){for(var f=this.stride,g=0;g<f;++g)i[g]=s[g];return i.length=f,a}else return o},t.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t.prototype.computeExtent=function(e){return GD(this.flatCoordinates,e)},t.prototype.getType=function(){return"Point"},t.prototype.intersectsExtent=function(e){return r6(e,this.flatCoordinates[0],this.flatCoordinates[1])},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=OV(this.flatCoordinates,0,e,this.stride),this.changed()},t}(Ag),zV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),x6=function(r){zV(t,r);function t(e,n){var i=r.call(this)||this;return n&&!Array.isArray(e[0])?i.setFlatCoordinates(n,e):i.setCoordinates(e,n),i}return t.prototype.appendPoint=function(e){this.flatCoordinates?Ep(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t.prototype.clone=function(){var e=new t(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e},t.prototype.closestPointXY=function(e,n,i,o){if(o<ug(this.getExtent(),e,n))return o;for(var s=this.flatCoordinates,a=this.stride,f=0,g=s.length;f<g;f+=a){var b=Z0(e,n,s[f],s[f+1]);if(b<o){o=b;for(var I=0;I<a;++I)i[I]=s[f+I];i.length=a}}return o},t.prototype.getCoordinates=function(){return Vm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getPoint=function(e){var n=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||n<=e?null:new hv(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)},t.prototype.getPoints=function(){for(var e=this.flatCoordinates,n=this.layout,i=this.stride,o=[],s=0,a=e.length;s<a;s+=i){var f=new hv(e.slice(s,s+i),n);o.push(f)}return o},t.prototype.getType=function(){return"MultiPoint"},t.prototype.intersectsExtent=function(e){for(var n=this.flatCoordinates,i=this.stride,o=0,s=n.length;o<s;o+=i){var a=n[o],f=n[o+1];if(r6(e,a,f))return!0}return!1},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=o2(this.flatCoordinates,0,e,this.stride),this.changed()},t}(Ag);function sL(r,t,e,n){for(var i=0,o=r[e-n],s=r[e-n+1];t<e;t+=n){var a=r[t],f=r[t+1];i+=s*a-o*f,o=a,s=f}return i/2}function lL(r,t,e,n){for(var i=0,o=0,s=e.length;o<s;++o){var a=e[o];i+=sL(r,t,a,n),t=a}return i}function NV(r,t,e,n){for(var i=0,o=0,s=e.length;o<s;++o){var a=e[o];i+=lL(r,t,a,n),t=a[a.length-1]}return i}var GV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),r8=function(r){GV(t,r);function t(e,n){var i=r.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?i.setFlatCoordinates(n,e):i.setCoordinates(e,n),i}return t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(e,n,i,o){return o<ug(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(m6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),y6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,n,i,o))},t.prototype.getArea=function(){return sL(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getCoordinates=function(){return Vm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t.prototype.getSimplifiedGeometryInternal=function(e){var n=[];return n.length=C6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new t(n,nl.XY)},t.prototype.getType=function(){return"LinearRing"},t.prototype.intersectsExtent=function(e){return!1},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=o2(this.flatCoordinates,0,e,this.stride),this.changed()},t}(Ag);function w6(r,t,e,n,i,o,s){for(var a,f,g,b,I,S,B,P=i[o+1],U=[],j=0,q=e.length;j<q;++j){var W=e[j];for(b=r[W-n],S=r[W-n+1],a=t;a<W;a+=n)I=r[a],B=r[a+1],(P<=S&&B<=P||S<=P&&P<=B)&&(g=(P-S)/(B-S)*(I-b)+b,U.push(g)),b=I,S=B}var ee=NaN,J=-1/0;for(U.sort(D1),b=U[0],a=1,f=U.length;a<f;++a){I=U[a];var $=Math.abs(I-b);$>J&&(g=(b+I)/2,b6(r,t,e,n,g,P)&&(ee=g,J=$)),b=I}return isNaN(ee)&&(ee=i[o]),s?(s.push(ee,P,J),s):[ee,P,J]}function uL(r,t,e,n,i){for(var o=[],s=0,a=e.length;s<a;++s){var f=e[s];o=w6(r,t,f,n,i,2*s,o),t=f[f.length-1]}return o}function WV(r,t,e,n){for(;t<e-n;){for(var i=0;i<n;++i){var o=r[t+i];r[t+i]=r[e-n+i],r[e-n+i]=o}t+=n,e-=n}}function M6(r,t,e,n){for(var i=0,o=r[e-n],s=r[e-n+1];t<e;t+=n){var a=r[t],f=r[t+1];i+=(a-o)*(f+s),o=a,s=f}return i===0?void 0:i>0}function AL(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o){var a=e[o],f=M6(r,t,a,n);if(o===0){if(!f)return!1}else if(f)return!1;t=a}return!0}function QV(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];if(!AL(r,t,a,n))return!1;a.length&&(t=a[a.length-1])}return!0}function WS(r,t,e,n,i){for(var o=i!==void 0?i:!1,s=0,a=e.length;s<a;++s){var f=e[s],g=M6(r,t,f,n),b=s===0?o&&g||!o&&!g:o&&!g||!o&&g;b&&WV(r,t,f,n),t=f}return t}function i8(r,t,e,n,i){for(var o=0,s=e.length;o<s;++o)t=WS(r,t,e[o],n,i);return t}function qV(r,t){for(var e=[],n=0,i=0,o=0,s=t.length;o<s;++o){var a=t[o];if(!M6(r,n,a,2))e.push(t.slice(i,o+1));else{if(e.length===0)continue;e[e.length-1].push(t[i])}i=o+1,n=a}return e}var YV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),F1=function(r){YV(t,r);function t(e,n,i){var o=r.call(this)||this;return o.ends_=[],o.flatInteriorPointRevision_=-1,o.flatInteriorPoint_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,n!==void 0&&i?(o.setFlatCoordinates(n,e),o.ends_=i):o.setCoordinates(e,n),o}return t.prototype.appendLinearRing=function(e){this.flatCoordinates?Ep(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t.prototype.clone=function(){var e=new t(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e},t.prototype.closestPointXY=function(e,n,i,o){return o<ug(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(g6(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),v6(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,n,i,o))},t.prototype.containsXY=function(e,n){return b6(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,n)},t.prototype.getArea=function(){return lL(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t.prototype.getCoordinates=function(e){var n;return e!==void 0?(n=this.getOrientedFlatCoordinates().slice(),WS(n,0,this.ends_,this.stride,e)):n=this.flatCoordinates,dv(n,0,this.ends_,this.stride)},t.prototype.getEnds=function(){return this.ends_},t.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=s0(this.getExtent());this.flatInteriorPoint_=w6(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t.prototype.getInteriorPoint=function(){return new hv(this.getFlatInteriorPoint(),nl.XYM)},t.prototype.getLinearRingCount=function(){return this.ends_.length},t.prototype.getLinearRing=function(e){return e<0||this.ends_.length<=e?null:new r8(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)},t.prototype.getLinearRings=function(){for(var e=this.layout,n=this.flatCoordinates,i=this.ends_,o=[],s=0,a=0,f=i.length;a<f;++a){var g=i[a],b=new r8(n.slice(s,g),e);o.push(b),s=g}return o},t.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;AL(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=WS(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t.prototype.getSimplifiedGeometryInternal=function(e){var n=[],i=[];return n.length=tL(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),n,0,i),new t(n,nl.XY,i)},t.prototype.getType=function(){return"Polygon"},t.prototype.intersectsExtent=function(e){return iL(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=_6(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},t}(Ag);function o8(r){var t=r[0],e=r[1],n=r[2],i=r[3],o=[t,e,t,i,n,i,n,e,t,e];return new F1(o,nl.XY,[o.length])}function cL(r,t,e,n){for(var i=[],o=hf(),s=0,a=e.length;s<a;++s){var f=e[s];o=i6(r,t,f[0],n),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=f[f.length-1]}return i}var $V=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),dL=function(r){$V(t,r);function t(e,n,i){var o=r.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(e[0])){for(var s=o.getLayout(),a=e,f=[],g=[],b=0,I=a.length;b<I;++b){var S=a[b];b===0&&(s=S.getLayout());for(var B=f.length,P=S.getEnds(),U=0,j=P.length;U<j;++U)P[U]+=B;Ep(f,S.getFlatCoordinates()),g.push(P)}n=s,e=f,i=g}return n!==void 0&&i?(o.setFlatCoordinates(n,e),o.endss_=i):o.setCoordinates(e,n),o}return t.prototype.appendPolygon=function(e){var n;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),n=e.getEnds().slice(),this.endss_.push();else{var i=this.flatCoordinates.length;Ep(this.flatCoordinates,e.getFlatCoordinates()),n=e.getEnds().slice();for(var o=0,s=n.length;o<s;++o)n[o]+=i}this.endss_.push(n),this.changed()},t.prototype.clone=function(){for(var e=this.endss_.length,n=new Array(e),i=0;i<e;++i)n[i]=this.endss_[i].slice();var o=new t(this.flatCoordinates.slice(),this.layout,n);return o.applyProperties(this),o},t.prototype.closestPointXY=function(e,n,i,o){return o<ug(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(SV(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),EV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,n,i,o))},t.prototype.containsXY=function(e,n){return RV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,n)},t.prototype.getArea=function(){return NV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t.prototype.getCoordinates=function(e){var n;return e!==void 0?(n=this.getOrientedFlatCoordinates().slice(),i8(n,0,this.endss_,this.stride,e)):n=this.flatCoordinates,NS(n,0,this.endss_,this.stride)},t.prototype.getEndss=function(){return this.endss_},t.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=cL(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=uL(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t.prototype.getInteriorPoints=function(){return new x6(this.getFlatInteriorPoints().slice(),nl.XYM)},t.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;QV(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=i8(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t.prototype.getSimplifiedGeometryInternal=function(e){var n=[],i=[];return n.length=TV(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),n,0,i),new t(n,nl.XY,i)},t.prototype.getPolygon=function(e){if(e<0||this.endss_.length<=e)return null;var n;if(e===0)n=0;else{var i=this.endss_[e-1];n=i[i.length-1]}var o=this.endss_[e].slice(),s=o[o.length-1];if(n!==0)for(var a=0,f=o.length;a<f;++a)o[a]-=n;return new F1(this.flatCoordinates.slice(n,s),this.layout,o)},t.prototype.getPolygons=function(){for(var e=this.layout,n=this.flatCoordinates,i=this.endss_,o=[],s=0,a=0,f=i.length;a<f;++a){var g=i[a].slice(),b=g[g.length-1];if(s!==0)for(var I=0,S=g.length;I<S;++I)g[I]-=s;var B=new F1(n.slice(s,b),e,g);o.push(B),s=b}return o},t.prototype.getType=function(){return"MultiPolygon"},t.prototype.intersectsExtent=function(e){return LV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)},t.prototype.setCoordinates=function(e,n){this.setLayout(n,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=BV(this.flatCoordinates,0,e,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()},t}(Ag),VV=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),HV=function(r){VV(t,r);function t(e){var n=this,i=e||{};return n=r.call(this)||this,n.dataProjection=ou(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=ou(i.featureProjection)),n.geometryName_=i.geometryName,n.extractGeometryName_=i.extractGeometryName,n.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],n}return t.prototype.readFeatureFromObject=function(e,n){var i=null;e.type==="Feature"?i=e:i={type:"Feature",geometry:e,properties:null};var o=QS(i.geometry,n),s=new E$;return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&s.setGeometryName(i.geometry_name),s.setGeometry(o),"id"in i&&s.setId(i.id),i.properties&&s.setProperties(i.properties,!0),s},t.prototype.readFeaturesFromObject=function(e,n){var i=e,o=null;if(i.type==="FeatureCollection"){var s=e;o=[];for(var a=s.features,f=0,g=a.length;f<g;++f)o.push(this.readFeatureFromObject(a[f],n))}else o=[this.readFeatureFromObject(e,n)];return o},t.prototype.readGeometryFromObject=function(e,n){return QS(e,n)},t.prototype.readProjectionFromObject=function(e){var n=e.crs,i;return n?n.type=="name"?i=ou(n.properties.name):n.type==="EPSG"?i=ou("EPSG:"+n.properties.code):fa(!1,36):i=this.dataProjection,i},t.prototype.writeFeatureObject=function(e,n){n=this.adaptOptions(n);var i={type:"Feature",geometry:null,properties:null},o=e.getId();if(o!==void 0&&(i.id=o),!e.hasProperties())return i;var s=e.getProperties(),a=e.getGeometry();return a&&(i.geometry=qS(a,n),delete s[e.getGeometryName()]),rg(s)||(i.properties=s),i},t.prototype.writeFeaturesObject=function(e,n){n=this.adaptOptions(n);for(var i=[],o=0,s=e.length;o<s;++o)i.push(this.writeFeatureObject(e[o],n));return{type:"FeatureCollection",features:i}},t.prototype.writeGeometryObject=function(e,n){return qS(e,this.adaptOptions(n))},t}(bV);function QS(r,t){if(!r)return null;var e;switch(r.type){case"Point":{e=XV(r);break}case"LineString":{e=JV(r);break}case"Polygon":{e=rH(r);break}case"MultiPoint":{e=tH(r);break}case"MultiLineString":{e=eH(r);break}case"MultiPolygon":{e=nH(r);break}case"GeometryCollection":{e=ZV(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return p6(e,!1,t)}function ZV(r,t){var e=r.geometries.map(function(n){return QS(n,t)});return new _V(e)}function XV(r){return new hv(r.coordinates)}function JV(r){return new XC(r.coordinates)}function eH(r){return new aL(r.coordinates)}function tH(r){return new x6(r.coordinates)}function nH(r){return new dL(r.coordinates)}function rH(r){return new F1(r.coordinates)}function qS(r,t){r=p6(r,!0,t);var e=r.getType(),n;switch(e){case"Point":{n=uH(r);break}case"LineString":{n=oH(r);break}case"Polygon":{n=AH(r,t);break}case"MultiPoint":{n=sH(r);break}case"MultiLineString":{n=aH(r);break}case"MultiPolygon":{n=lH(r,t);break}case"GeometryCollection":{n=iH(r,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function iH(r,t){var e=r.getGeometriesArray().map(function(n){var i=Zu({},t);return delete i.featureProjection,qS(n,i)});return{type:"GeometryCollection",geometries:e}}function oH(r,t){return{type:"LineString",coordinates:r.getCoordinates()}}function aH(r,t){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function sH(r,t){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function lH(r,t){var e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(e)}}function uH(r,t){return{type:"Point",coordinates:r.getCoordinates()}}function AH(r,t){var e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(e)}}var t3,a8;function cH(){if(a8)return t3;a8=1,t3=t;var r=fR();function t(re){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(re)?re:new Uint8Array(re||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var e=65536*65536,n=1/e,i=12,o=typeof TextDecoder>"u"?null:new TextDecoder("utf8");t.prototype={destroy:function(){this.buf=null},readFields:function(re,oe,Se){for(Se=Se||this.length;this.pos<Se;){var ye=this.readVarint(),nt=ye>>3,Ne=this.pos;this.type=ye&7,re(nt,oe,this),this.pos===Ne&&this.skip(ye)}return oe},readMessage:function(re,oe){return this.readFields(re,oe,this.readVarint()+this.pos)},readFixed32:function(){var re=X(this.buf,this.pos);return this.pos+=4,re},readSFixed32:function(){var re=ae(this.buf,this.pos);return this.pos+=4,re},readFixed64:function(){var re=X(this.buf,this.pos)+X(this.buf,this.pos+4)*e;return this.pos+=8,re},readSFixed64:function(){var re=X(this.buf,this.pos)+ae(this.buf,this.pos+4)*e;return this.pos+=8,re},readFloat:function(){var re=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,re},readDouble:function(){var re=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,re},readVarint:function(re){var oe=this.buf,Se,ye;return ye=oe[this.pos++],Se=ye&127,ye<128||(ye=oe[this.pos++],Se|=(ye&127)<<7,ye<128)||(ye=oe[this.pos++],Se|=(ye&127)<<14,ye<128)||(ye=oe[this.pos++],Se|=(ye&127)<<21,ye<128)?Se:(ye=oe[this.pos],Se|=(ye&15)<<28,s(Se,re,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var re=this.readVarint();return re%2===1?(re+1)/-2:re/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var re=this.readVarint()+this.pos,oe=this.pos;return this.pos=re,re-oe>=i&&o?he(this.buf,oe,re):ge(this.buf,oe,re)},readBytes:function(){var re=this.readVarint()+this.pos,oe=this.buf.subarray(this.pos,re);return this.pos=re,oe},readPackedVarint:function(re,oe){if(this.type!==t.Bytes)return re.push(this.readVarint(oe));var Se=a(this);for(re=re||[];this.pos<Se;)re.push(this.readVarint(oe));return re},readPackedSVarint:function(re){if(this.type!==t.Bytes)return re.push(this.readSVarint());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readSVarint());return re},readPackedBoolean:function(re){if(this.type!==t.Bytes)return re.push(this.readBoolean());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readBoolean());return re},readPackedFloat:function(re){if(this.type!==t.Bytes)return re.push(this.readFloat());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readFloat());return re},readPackedDouble:function(re){if(this.type!==t.Bytes)return re.push(this.readDouble());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readDouble());return re},readPackedFixed32:function(re){if(this.type!==t.Bytes)return re.push(this.readFixed32());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readFixed32());return re},readPackedSFixed32:function(re){if(this.type!==t.Bytes)return re.push(this.readSFixed32());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readSFixed32());return re},readPackedFixed64:function(re){if(this.type!==t.Bytes)return re.push(this.readFixed64());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readFixed64());return re},readPackedSFixed64:function(re){if(this.type!==t.Bytes)return re.push(this.readSFixed64());var oe=a(this);for(re=re||[];this.pos<oe;)re.push(this.readSFixed64());return re},skip:function(re){var oe=re&7;if(oe===t.Varint)for(;this.buf[this.pos++]>127;);else if(oe===t.Bytes)this.pos=this.readVarint()+this.pos;else if(oe===t.Fixed32)this.pos+=4;else if(oe===t.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+oe)},writeTag:function(re,oe){this.writeVarint(re<<3|oe)},realloc:function(re){for(var oe=this.length||16;oe<this.pos+re;)oe*=2;if(oe!==this.length){var Se=new Uint8Array(oe);Se.set(this.buf),this.buf=Se,this.length=oe}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(re){this.realloc(4),G(this.buf,re,this.pos),this.pos+=4},writeSFixed32:function(re){this.realloc(4),G(this.buf,re,this.pos),this.pos+=4},writeFixed64:function(re){this.realloc(8),G(this.buf,re&-1,this.pos),G(this.buf,Math.floor(re*n),this.pos+4),this.pos+=8},writeSFixed64:function(re){this.realloc(8),G(this.buf,re&-1,this.pos),G(this.buf,Math.floor(re*n),this.pos+4),this.pos+=8},writeVarint:function(re){if(re=+re||0,re>268435455||re<0){g(re,this);return}this.realloc(4),this.buf[this.pos++]=re&127|(re>127?128:0),!(re<=127)&&(this.buf[this.pos++]=(re>>>=7)&127|(re>127?128:0),!(re<=127)&&(this.buf[this.pos++]=(re>>>=7)&127|(re>127?128:0),!(re<=127)&&(this.buf[this.pos++]=re>>>7&127)))},writeSVarint:function(re){this.writeVarint(re<0?-re*2-1:re*2)},writeBoolean:function(re){this.writeVarint(!!re)},writeString:function(re){re=String(re),this.realloc(re.length*4),this.pos++;var oe=this.pos;this.pos=Ie(this.buf,re,this.pos);var Se=this.pos-oe;Se>=128&&S(oe,Se,this),this.pos=oe-1,this.writeVarint(Se),this.pos+=Se},writeFloat:function(re){this.realloc(4),r.write(this.buf,re,this.pos,!0,23,4),this.pos+=4},writeDouble:function(re){this.realloc(8),r.write(this.buf,re,this.pos,!0,52,8),this.pos+=8},writeBytes:function(re){var oe=re.length;this.writeVarint(oe),this.realloc(oe);for(var Se=0;Se<oe;Se++)this.buf[this.pos++]=re[Se]},writeRawMessage:function(re,oe){this.pos++;var Se=this.pos;re(oe,this);var ye=this.pos-Se;ye>=128&&S(Se,ye,this),this.pos=Se-1,this.writeVarint(ye),this.pos+=ye},writeMessage:function(re,oe,Se){this.writeTag(re,t.Bytes),this.writeRawMessage(oe,Se)},writePackedVarint:function(re,oe){oe.length&&this.writeMessage(re,B,oe)},writePackedSVarint:function(re,oe){oe.length&&this.writeMessage(re,P,oe)},writePackedBoolean:function(re,oe){oe.length&&this.writeMessage(re,q,oe)},writePackedFloat:function(re,oe){oe.length&&this.writeMessage(re,U,oe)},writePackedDouble:function(re,oe){oe.length&&this.writeMessage(re,j,oe)},writePackedFixed32:function(re,oe){oe.length&&this.writeMessage(re,W,oe)},writePackedSFixed32:function(re,oe){oe.length&&this.writeMessage(re,ee,oe)},writePackedFixed64:function(re,oe){oe.length&&this.writeMessage(re,J,oe)},writePackedSFixed64:function(re,oe){oe.length&&this.writeMessage(re,$,oe)},writeBytesField:function(re,oe){this.writeTag(re,t.Bytes),this.writeBytes(oe)},writeFixed32Field:function(re,oe){this.writeTag(re,t.Fixed32),this.writeFixed32(oe)},writeSFixed32Field:function(re,oe){this.writeTag(re,t.Fixed32),this.writeSFixed32(oe)},writeFixed64Field:function(re,oe){this.writeTag(re,t.Fixed64),this.writeFixed64(oe)},writeSFixed64Field:function(re,oe){this.writeTag(re,t.Fixed64),this.writeSFixed64(oe)},writeVarintField:function(re,oe){this.writeTag(re,t.Varint),this.writeVarint(oe)},writeSVarintField:function(re,oe){this.writeTag(re,t.Varint),this.writeSVarint(oe)},writeStringField:function(re,oe){this.writeTag(re,t.Bytes),this.writeString(oe)},writeFloatField:function(re,oe){this.writeTag(re,t.Fixed32),this.writeFloat(oe)},writeDoubleField:function(re,oe){this.writeTag(re,t.Fixed64),this.writeDouble(oe)},writeBooleanField:function(re,oe){this.writeVarintField(re,!!oe)}};function s(re,oe,Se){var ye=Se.buf,nt,Ne;if(Ne=ye[Se.pos++],nt=(Ne&112)>>4,Ne<128||(Ne=ye[Se.pos++],nt|=(Ne&127)<<3,Ne<128)||(Ne=ye[Se.pos++],nt|=(Ne&127)<<10,Ne<128)||(Ne=ye[Se.pos++],nt|=(Ne&127)<<17,Ne<128)||(Ne=ye[Se.pos++],nt|=(Ne&127)<<24,Ne<128)||(Ne=ye[Se.pos++],nt|=(Ne&1)<<31,Ne<128))return f(re,nt,oe);throw new Error("Expected varint not more than 10 bytes")}function a(re){return re.type===t.Bytes?re.readVarint()+re.pos:re.pos+1}function f(re,oe,Se){return Se?oe*4294967296+(re>>>0):(oe>>>0)*4294967296+(re>>>0)}function g(re,oe){var Se,ye;if(re>=0?(Se=re%4294967296|0,ye=re/4294967296|0):(Se=~(-re%4294967296),ye=~(-re/4294967296),Se^4294967295?Se=Se+1|0:(Se=0,ye=ye+1|0)),re>=18446744073709552e3||re<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");oe.realloc(10),b(Se,ye,oe),I(ye,oe)}function b(re,oe,Se){Se.buf[Se.pos++]=re&127|128,re>>>=7,Se.buf[Se.pos++]=re&127|128,re>>>=7,Se.buf[Se.pos++]=re&127|128,re>>>=7,Se.buf[Se.pos++]=re&127|128,re>>>=7,Se.buf[Se.pos]=re&127}function I(re,oe){var Se=(re&7)<<4;oe.buf[oe.pos++]|=Se|((re>>>=3)?128:0),re&&(oe.buf[oe.pos++]=re&127|((re>>>=7)?128:0),re&&(oe.buf[oe.pos++]=re&127|((re>>>=7)?128:0),re&&(oe.buf[oe.pos++]=re&127|((re>>>=7)?128:0),re&&(oe.buf[oe.pos++]=re&127|((re>>>=7)?128:0),re&&(oe.buf[oe.pos++]=re&127)))))}function S(re,oe,Se){var ye=oe<=16383?1:oe<=2097151?2:oe<=268435455?3:Math.floor(Math.log(oe)/(Math.LN2*7));Se.realloc(ye);for(var nt=Se.pos-1;nt>=re;nt--)Se.buf[nt+ye]=Se.buf[nt]}function B(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeVarint(re[Se])}function P(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeSVarint(re[Se])}function U(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeFloat(re[Se])}function j(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeDouble(re[Se])}function q(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeBoolean(re[Se])}function W(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeFixed32(re[Se])}function ee(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeSFixed32(re[Se])}function J(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeFixed64(re[Se])}function $(re,oe){for(var Se=0;Se<re.length;Se++)oe.writeSFixed64(re[Se])}function X(re,oe){return(re[oe]|re[oe+1]<<8|re[oe+2]<<16)+re[oe+3]*16777216}function G(re,oe,Se){re[Se]=oe,re[Se+1]=oe>>>8,re[Se+2]=oe>>>16,re[Se+3]=oe>>>24}function ae(re,oe){return(re[oe]|re[oe+1]<<8|re[oe+2]<<16)+(re[oe+3]<<24)}function ge(re,oe,Se){for(var ye="",nt=oe;nt<Se;){var Ne=re[nt],je=null,et=Ne>239?4:Ne>223?3:Ne>191?2:1;if(nt+et>Se)break;var Ue,ke,We;et===1?Ne<128&&(je=Ne):et===2?(Ue=re[nt+1],(Ue&192)===128&&(je=(Ne&31)<<6|Ue&63,je<=127&&(je=null))):et===3?(Ue=re[nt+1],ke=re[nt+2],(Ue&192)===128&&(ke&192)===128&&(je=(Ne&15)<<12|(Ue&63)<<6|ke&63,(je<=2047||je>=55296&&je<=57343)&&(je=null))):et===4&&(Ue=re[nt+1],ke=re[nt+2],We=re[nt+3],(Ue&192)===128&&(ke&192)===128&&(We&192)===128&&(je=(Ne&15)<<18|(Ue&63)<<12|(ke&63)<<6|We&63,(je<=65535||je>=1114112)&&(je=null))),je===null?(je=65533,et=1):je>65535&&(je-=65536,ye+=String.fromCharCode(je>>>10&1023|55296),je=56320|je&1023),ye+=String.fromCharCode(je),nt+=et}return ye}function he(re,oe,Se){return o.decode(re.subarray(oe,Se))}function Ie(re,oe,Se){for(var ye=0,nt,Ne;ye<oe.length;ye++){if(nt=oe.charCodeAt(ye),nt>55295&&nt<57344)if(Ne)if(nt<56320){re[Se++]=239,re[Se++]=191,re[Se++]=189,Ne=nt;continue}else nt=Ne-55296<<10|nt-56320|65536,Ne=null;else{nt>56319||ye+1===oe.length?(re[Se++]=239,re[Se++]=191,re[Se++]=189):Ne=nt;continue}else Ne&&(re[Se++]=239,re[Se++]=191,re[Se++]=189,Ne=null);nt<128?re[Se++]=nt:(nt<2048?re[Se++]=nt>>6|192:(nt<65536?re[Se++]=nt>>12|224:(re[Se++]=nt>>18|240,re[Se++]=nt>>12&63|128),re[Se++]=nt>>6&63|128),re[Se++]=nt&63|128)}return Se}return t3}var dH=cH();const hH=us(dH);var s8=df(),ig=function(){function r(t,e,n,i,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=i}return r.prototype.get=function(t){return this.properties_[t]},r.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_==="Point"?GD(this.flatCoordinates_):i6(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=s0(this.getExtent());this.flatInteriorPoints_=w6(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=cL(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=uL(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=ZC(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},r.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,n=this.ends_,i=0,o=n.length;i<o;++i){var s=n[i],a=ZC(t,e,s,2,.5);Ep(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_},r.prototype.getId=function(){return this.id_},r.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},r.prototype.getGeometry=function(){return this},r.prototype.getSimplifiedGeometry=function(t){return this},r.prototype.simplifyTransformed=function(t,e){return this},r.prototype.getProperties=function(){return this.properties_},r.prototype.getStride=function(){return 2},r.prototype.getStyleFunction=function(){return this.styleFunction},r.prototype.getType=function(){return this.type_},r.prototype.transform=function(t){t=ou(t);var e=t.getExtent(),n=t.getWorldExtent();if(e&&n){var i=sh(n)/sh(e);Op(s8,n[0],n[3],i,-i,0,0,0),n0(this.flatCoordinates_,0,this.flatCoordinates_.length,2,s8,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();ig.prototype.getEndss=ig.prototype.getEnds;ig.prototype.getFlatCoordinates=ig.prototype.getOrientedFlatCoordinates;var fH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),pH=function(r){fH(t,r);function t(e){var n=r.call(this)||this,i=e||{};return n.dataProjection=new u6({code:"",units:Rd.TILE_PIXELS}),n.featureClass_=i.featureClass?i.featureClass:ig,n.geometryName_=i.geometryName,n.layerName_=i.layerName?i.layerName:"layer",n.layers_=i.layers?i.layers:null,n.idProperty_=i.idProperty,n.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],n}return t.prototype.readRawGeometry_=function(e,n,i,o){e.pos=n.geometry;for(var s=e.readVarint()+e.pos,a=1,f=0,g=0,b=0,I=0,S=0;e.pos<s;){if(!f){var B=e.readVarint();a=B&7,f=B>>3}f--,a===1||a===2?(g+=e.readSVarint(),b+=e.readSVarint(),a===1&&I>S&&(o.push(I),S=I),i.push(g,b),I+=2):a===7?I>S&&(i.push(i[S],i[S+1]),I+=2):fa(!1,59)}I>S&&(o.push(I),S=I)},t.prototype.createFeature_=function(e,n,i){var o=n.type;if(o===0)return null;var s,a=n.properties,f;this.idProperty_?(f=a[this.idProperty_],delete a[this.idProperty_]):f=n.id,a[this.layerName_]=n.layer.name;var g=[],b=[];this.readRawGeometry_(e,n,g,b);var I=_H(o,b.length);if(this.featureClass_===ig)s=new this.featureClass_(I,g,b,a,f),s.transform(i.dataProjection);else{var S=void 0;if(I=="Polygon"){var B=qV(g,b);S=B.length>1?new dL(g,nl.XY,B):new F1(g,nl.XY,b)}else S=I==="Point"?new hv(g,nl.XY):I==="LineString"?new XC(g,nl.XY):I==="MultiPoint"?new x6(g,nl.XY):I==="MultiLineString"?new aL(g,nl.XY,b):null;var P=this.featureClass_;s=new P,this.geometryName_&&s.setGeometryName(this.geometryName_);var U=p6(S,!1,i);s.setGeometry(U),f!==void 0&&s.setId(f),s.setProperties(a,!0)}return s},t.prototype.getType=function(){return"arraybuffer"},t.prototype.readFeatures=function(e,n){var i=this.layers_,o=this.adaptOptions(n),s=ou(o.dataProjection);s.setWorldExtent(o.extent),o.dataProjection=s;var a=new hH(e),f=a.readFields(mH,{}),g=[];for(var b in f)if(!(i&&i.indexOf(b)==-1)){var I=f[b],S=I?[0,0,I.extent,I.extent]:null;s.setExtent(S);for(var B=0,P=I.length;B<P;++B){var U=vH(a,I,B),j=this.createFeature_(a,U,o);j!==null&&g.push(j)}}return g},t.prototype.readProjection=function(e){return this.dataProjection},t.prototype.setLayers=function(e){this.layers_=e},t}(eL);function mH(r,t,e){if(r===3){var n={keys:[],values:[],features:[]},i=e.readVarint()+e.pos;e.readFields(gH,n,i),n.length=n.features.length,n.length&&(t[n.name]=n)}}function gH(r,t,e){if(r===15)t.version=e.readVarint();else if(r===1)t.name=e.readString();else if(r===5)t.extent=e.readVarint();else if(r===2)t.features.push(e.pos);else if(r===3)t.keys.push(e.readString());else if(r===4){for(var n=null,i=e.readVarint()+e.pos;e.pos<i;)r=e.readVarint()>>3,n=r===1?e.readString():r===2?e.readFloat():r===3?e.readDouble():r===4?e.readVarint64():r===5?e.readVarint():r===6?e.readSVarint():r===7?e.readBoolean():null;t.values.push(n)}}function yH(r,t,e){if(r==1)t.id=e.readVarint();else if(r==2)for(var n=e.readVarint()+e.pos;e.pos<n;){var i=t.layer.keys[e.readVarint()],o=t.layer.values[e.readVarint()];t.properties[i]=o}else r==3?t.type=e.readVarint():r==4&&(t.geometry=e.pos)}function vH(r,t,e){r.pos=t.features[e];var n=r.readVarint()+r.pos,i={layer:t,type:0,properties:{}};return r.readFields(yH,i,n),i}function _H(r,t){var e;return r===1?e=t===1?"Point":"MultiPoint":r===2?e=t===1?"LineString":"MultiLineString":r===3&&(e="Polygon"),e}var CH=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,bH=/^([a-z]*)$|^hsla?\(.*\)$/i;function hL(r){return typeof r=="string"?r:fL(r)}function xH(r){var t=document.createElement("div");if(t.style.color=r,t.style.color!==""){document.body.appendChild(t);var e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}var wH=function(){var r=1024,t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=r){var o=0;for(var s in t)o++&3||(delete t[s],--e)}i=MH(n),t[n]=i,++e}return i}}();function JC(r){return Array.isArray(r)?r:wH(r)}function MH(r){var t,e,n,i,o;if(bH.exec(r)&&(r=xH(r)),CH.exec(r)){var s=r.length-1,a=void 0;s<=4?a=1:a=2;var f=s===4||s===8;t=parseInt(r.substr(1+0*a,a),16),e=parseInt(r.substr(1+1*a,a),16),n=parseInt(r.substr(1+2*a,a),16),f?i=parseInt(r.substr(1+3*a,a),16):i=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,f&&(i=(i<<4)+i)),o=[t,e,n,i/255]}else r.indexOf("rgba(")==0?(o=r.slice(5,-1).split(",").map(Number),l8(o)):r.indexOf("rgb(")==0?(o=r.slice(4,-1).split(",").map(Number),o.push(1),l8(o)):fa(!1,14);return o}function l8(r){return r[0]=hA(r[0]+.5|0,0,255),r[1]=hA(r[1]+.5|0,0,255),r[2]=hA(r[2]+.5|0,0,255),r[3]=hA(r[3],0,1),r}function fL(r){var t=r[0];t!=(t|0)&&(t=t+.5|0);var e=r[1];e!=(e|0)&&(e=e+.5|0);var n=r[2];n!=(n|0)&&(n=n+.5|0);var i=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+t+","+e+","+n+","+i+")"}var SH=function(){function r(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return r.prototype.clear=function(){this.cache_={},this.cacheSize_=0},r.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},r.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}},r.prototype.get=function(t,e,n){var i=u8(t,e,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(t,e,n,i){var o=u8(t,e,n);this.cache_[o]=i,++this.cacheSize_},r.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},r}();function u8(r,t,e){var n=e?hL(e):"null";return t+":"+r+":"+n}var eb=new SH;const Is={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 EH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),pL=function(r){EH(t,r);function t(e){var n=r.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var i=Zu({},e);return typeof e.properties=="object"&&(delete i.properties,Zu(i,e.properties)),i[Is.OPACITY]=e.opacity!==void 0?e.opacity:1,fa(typeof i[Is.OPACITY]=="number",64),i[Is.VISIBLE]=e.visible!==void 0?e.visible:!0,i[Is.Z_INDEX]=e.zIndex,i[Is.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,i[Is.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,i[Is.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,i[Is.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,n.className_=i.className!==void 0?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return t.prototype.getBackground=function(){return this.background_},t.prototype.getClassName=function(){return this.className_},t.prototype.getLayerState=function(e){var n=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return n.opacity=hA(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n},t.prototype.getLayersArray=function(e){return Zi()},t.prototype.getLayerStatesArray=function(e){return Zi()},t.prototype.getExtent=function(){return this.get(Is.EXTENT)},t.prototype.getMaxResolution=function(){return this.get(Is.MAX_RESOLUTION)},t.prototype.getMinResolution=function(){return this.get(Is.MIN_RESOLUTION)},t.prototype.getMinZoom=function(){return this.get(Is.MIN_ZOOM)},t.prototype.getMaxZoom=function(){return this.get(Is.MAX_ZOOM)},t.prototype.getOpacity=function(){return this.get(Is.OPACITY)},t.prototype.getSourceState=function(){return Zi()},t.prototype.getVisible=function(){return this.get(Is.VISIBLE)},t.prototype.getZIndex=function(){return this.get(Is.Z_INDEX)},t.prototype.setBackground=function(e){this.background_=e,this.changed()},t.prototype.setExtent=function(e){this.set(Is.EXTENT,e)},t.prototype.setMaxResolution=function(e){this.set(Is.MAX_RESOLUTION,e)},t.prototype.setMinResolution=function(e){this.set(Is.MIN_RESOLUTION,e)},t.prototype.setMaxZoom=function(e){this.set(Is.MAX_ZOOM,e)},t.prototype.setMinZoom=function(e){this.set(Is.MIN_ZOOM,e)},t.prototype.setOpacity=function(e){fa(typeof e=="number",64),this.set(Is.OPACITY,e)},t.prototype.setVisible=function(e){this.set(Is.VISIBLE,e)},t.prototype.setZIndex=function(e){this.set(Is.Z_INDEX,e)},t.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},t}(Yf);const r0={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var OH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),s2=function(r){OH(t,r);function t(e){var n=this,i=Zu({},e);delete i.source,n=r.call(this,i)||this,n.on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(Is.SOURCE,n.handleSourcePropertyChange_);var o=e.source?e.source:null;return n.setSource(o),n}return t.prototype.getLayersArray=function(e){var n=e||[];return n.push(this),n},t.prototype.getLayerStatesArray=function(e){var n=e||[];return n.push(this.getLayerState()),n},t.prototype.getSource=function(){return this.get(Is.SOURCE)||null},t.prototype.getRenderSource=function(){return this.getSource()},t.prototype.getSourceState=function(){var e=this.getSource();return e?e.getState():"undefined"},t.prototype.handleSourceChange_=function(){this.changed()},t.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(_l(this.sourceChangeKey_),this.sourceChangeKey_=null);var e=this.getSource();e&&(this.sourceChangeKey_=Ia(e,_o.CHANGE,this.handleSourceChange_,this)),this.changed()},t.prototype.getFeatures=function(e){return this.renderer_?this.renderer_.getFeatures(e):new Promise(function(n){return n([])})},t.prototype.getData=function(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)},t.prototype.render=function(e,n){var i=this.getRenderer();if(i.prepareFrame(e))return this.rendered=!0,i.renderFrame(e,n)},t.prototype.unrender=function(){this.rendered=!1},t.prototype.setMapInternal=function(e){e||this.unrender(),this.set(Is.MAP,e)},t.prototype.getMapInternal=function(){return this.get(Is.MAP)},t.prototype.setMap=function(e){this.mapPrecomposeKey_&&(_l(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(_l(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=Ia(e,r0.PRECOMPOSE,function(n){var i=n,o=i.frameState.layerStatesArray,s=this.getLayerState(!1);fa(!o.some(function(a){return a.layer===s.layer}),67),o.push(s)},this),this.mapRenderKey_=Ia(this,_o.CHANGE,e.render,e),this.changed())},t.prototype.setSource=function(e){this.set(Is.SOURCE,e)},t.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},t.prototype.hasRenderer=function(){return!!this.renderer_},t.prototype.createRenderer=function(){return null},t.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),r.prototype.disposeInternal.call(this)},t}(pL);function tb(r,t){if(!r.visible)return!1;var e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;var n=t.zoom;return n>r.minZoom&&n<=r.maxZoom}var BH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),IH=function(r){BH(t,r);function t(e){var n=r.call(this)||this;return n.map_=e,n}return t.prototype.dispatchRenderEvent=function(e,n){Zi()},t.prototype.calculateMatrices2D=function(e){var n=e.viewState,i=e.coordinateToPixelTransform,o=e.pixelToCoordinateTransform;Op(i,e.size[0]/2,e.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),n6(o,i)},t.prototype.forEachFeatureAtCoordinate=function(e,n,i,o,s,a,f,g){var b,I=n.viewState;function S(ye,nt,Ne,je){return s.call(a,nt,ye?Ne:null,je)}var B=I.projection,P=c6(e.slice(),B),U=[[0,0]];if(B.canWrapX()&&o){var j=B.getExtent(),q=Pl(j);U.push([-q,0],[q,0])}for(var W=n.layerStatesArray,ee=W.length,J=[],$=[],X=0;X<U.length;X++)for(var G=ee-1;G>=0;--G){var ae=W[G],ge=ae.layer;if(ge.hasRenderer()&&tb(ae,I)&&f.call(g,ge)){var he=ge.getRenderer(),Ie=ge.getSource();if(he&&Ie){var re=Ie.getWrapX()?P:e,oe=S.bind(null,ae.managed);$[0]=re[0]+U[X][0],$[1]=re[1]+U[X][1],b=he.forEachFeatureAtCoordinate($,n,i,oe,J)}if(b)return b}}if(J.length!==0){var Se=1/J.length;return J.forEach(function(ye,nt){return ye.distanceSq+=nt*Se}),J.sort(function(ye,nt){return ye.distanceSq-nt.distanceSq}),J.some(function(ye){return b=ye.callback(ye.feature,ye.layer,ye.geometry)}),b}},t.prototype.forEachLayerAtPixel=function(e,n,i,o,s){return Zi()},t.prototype.hasFeatureAtCoordinate=function(e,n,i,o,s,a){var f=this.forEachFeatureAtCoordinate(e,n,i,o,_1,this,s,a);return f!==void 0},t.prototype.getMap=function(){return this.map_},t.prototype.renderFrame=function(e){Zi()},t.prototype.scheduleExpireIconCache=function(e){eb.canExpireCache()&&e.postRenderFunctions.push(kH)},t}(JE);function kH(r,t){eb.expire()}var TH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),mL=function(r){TH(t,r);function t(e,n,i,o){var s=r.call(this,e)||this;return s.inversePixelTransform=n,s.frameState=i,s.context=o,s}return t}(_m),N_="ol-hidden",PH="ol-selectable",l2="ol-unselectable",S6="ol-control",A8="ol-collapsed",KH=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"),c8=["style","variant","weight","size","lineHeight","family"],gL=function(r){var t=r.match(KH);if(!t)return null;for(var e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=c8.length;n<i;++n){var o=t[n+1];o!==void 0&&(e[c8[n]]=o)}return e.families=e.family.split(/,\s?/),e};function lh(r,t,e,n){var i;return e&&e.length?i=e.shift():n2?i=new OffscreenCanvas(r||300,t||300):i=document.createElement("canvas"),r&&(i.width=r),t&&(i.height=t),i.getContext("2d",n)}function E6(r){var t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function RH(r){var t=r.offsetWidth,e=getComputedStyle(r);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function DH(r){var t=r.offsetHeight,e=getComputedStyle(r);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function d8(r,t){var e=t.parentNode;e&&e.replaceChild(r,t)}function nb(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function yL(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function LH(r,t){for(var e=r.childNodes,n=0;;++n){var i=e[n],o=t[n];if(!i&&!o)break;if(i!==o){if(!i){r.appendChild(o);continue}if(!o){r.removeChild(i),--n;continue}r.insertBefore(o,i)}}}var vL="10px sans-serif",pm="#000",rb="round",fv=[],pv=0,U1="round",mv=10,gv="#000",yv="center",ib="middle",W0=[0,0,0,0],vv=1,sm=new Yf,YS=new $1;YS.setSize=function(){console.warn("labelCache is deprecated.")};var e1=null,$S,VS={},FH=function(){var r=100,t="32px ",e=["monospace","serif"],n=e.length,i="wmytzilWMYTZIL@#/&?$%10",o,s;function a(g,b,I){for(var S=!0,B=0;B<n;++B){var P=e[B];if(s=ob(g+" "+b+" "+t+P,i),I!=P){var U=ob(g+" "+b+" "+t+I+","+P,i);S=S&&U!=s}}return!!S}function f(){for(var g=!0,b=sm.getKeys(),I=0,S=b.length;I<S;++I){var B=b[I];sm.get(B)<r&&(a.apply(this,B.split(`
|
||
`))?(Fv(VS),e1=null,$S=void 0,sm.set(B,r)):(sm.set(B,sm.get(B)+1,!0),g=!1))}g&&(clearInterval(o),o=void 0)}return function(g){var b=gL(g);if(b)for(var I=b.families,S=0,B=I.length;S<B;++S){var P=I[S],U=b.style+`
|
||
`+b.weight+`
|
||
`+P;sm.get(U)===void 0&&(sm.set(U,r,!0),a(b.style,b.weight,P)||(sm.set(U,0,!0),o===void 0&&(o=setInterval(f,32))))}}}(),UH=function(){var r;return function(t){var e=VS[t];if(e==null){if(n2){var n=gL(t),i=_L(t,"Žg"),o=isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight);e=o*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=t,document.body.appendChild(r),e=r.offsetHeight,document.body.removeChild(r);VS[t]=e}return e}}();function _L(r,t){return e1||(e1=lh(1,1)),r!=$S&&(e1.font=r,$S=e1.font),e1.measureText(t)}function ob(r,t){return _L(r,t).width}function h8(r,t,e){if(t in e)return e[t];var n=t.split(`
|
||
`).reduce(function(i,o){return Math.max(i,ob(r,o))},0);return e[t]=n,n}function jH(r,t){for(var e=[],n=[],i=[],o=0,s=0,a=0,f=0,g=0,b=t.length;g<=b;g+=2){var I=t[g];if(I===`
|
||
`||g===b){o=Math.max(o,s),i.push(s),s=0,a+=f;continue}var S=t[g+1]||r.font,B=ob(S,I);e.push(B),s+=B;var P=UH(S);n.push(P),f=Math.max(f,P)}return{width:o,height:a,widths:e,heights:n,lineWidths:i}}function zH(r,t,e,n,i,o,s,a,f,g,b){r.save(),e!==1&&(r.globalAlpha*=e),t&&r.setTransform.apply(r,t),n.contextInstructions?(r.translate(f,g),r.scale(b[0],b[1]),NH(n,r)):b[0]<0||b[1]<0?(r.translate(f,g),r.scale(b[0],b[1]),r.drawImage(n,i,o,s,a,0,0,s,a)):r.drawImage(n,i,o,s,a,f,g,s*b[0],a*b[1]),r.restore()}function NH(r,t){for(var e=r.contextInstructions,n=0,i=e.length;n<i;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}var GH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),WH=function(r){GH(t,r);function t(e){var n=r.call(this,e)||this;n.fontChangeListenerKey_=Ia(sm,R1.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className=l2+" ol-layers";var o=e.getViewport();return o.insertBefore(n.element_,o.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return t.prototype.dispatchRenderEvent=function(e,n){var i=this.getMap();if(i.hasListener(e)){var o=new mL(e,void 0,n);i.dispatchEvent(o)}},t.prototype.disposeInternal=function(){_l(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),r.prototype.disposeInternal.call(this)},t.prototype.renderFrame=function(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(r0.PRECOMPOSE,e);var n=e.layerStatesArray.sort(function(B,P){return B.zIndex-P.zIndex}),i=e.viewState;this.children_.length=0;for(var o=[],s=null,a=0,f=n.length;a<f;++a){var g=n[a];e.layerIndex=a;var b=g.layer,I=b.getSourceState();if(!tb(g,i)||I!="ready"&&I!="undefined"){b.unrender();continue}var S=b.render(e,s);S&&(S!==s&&(this.children_.push(S),s=S),"getDeclutter"in b&&o.push(b))}for(var a=o.length-1;a>=0;--a)o[a].renderDeclutter(e);LH(this.element_,this.children_),this.dispatchRenderEvent(r0.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)},t.prototype.forEachLayerAtPixel=function(e,n,i,o,s){for(var a=n.viewState,f=n.layerStatesArray,g=f.length,b=g-1;b>=0;--b){var I=f[b],S=I.layer;if(S.hasRenderer()&&tb(I,a)&&s(S)){var B=S.getRenderer(),P=B.getDataAtPixel(e,n,i);if(P){var U=o(S,P);if(U)return U}}}},t}(IH);const ah={ADD:"add",REMOVE:"remove"};var CL=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),f8={LENGTH:"length"},G_=function(r){CL(t,r);function t(e,n,i){var o=r.call(this,e)||this;return o.element=n,o.index=i,o}return t}(_m),Af=function(r){CL(t,r);function t(e,n){var i=r.call(this)||this;i.on,i.once,i.un;var o=n||{};if(i.unique_=!!o.unique,i.array_=e||[],i.unique_)for(var s=0,a=i.array_.length;s<a;++s)i.assertUnique_(i.array_[s],s);return i.updateLength_(),i}return t.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},t.prototype.extend=function(e){for(var n=0,i=e.length;n<i;++n)this.push(e[n]);return this},t.prototype.forEach=function(e){for(var n=this.array_,i=0,o=n.length;i<o;++i)e(n[i],i,n)},t.prototype.getArray=function(){return this.array_},t.prototype.item=function(e){return this.array_[e]},t.prototype.getLength=function(){return this.get(f8.LENGTH)},t.prototype.insertAt=function(e,n){this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new G_(ah.ADD,n,e))},t.prototype.pop=function(){return this.removeAt(this.getLength()-1)},t.prototype.push=function(e){this.unique_&&this.assertUnique_(e);var n=this.getLength();return this.insertAt(n,e),this.getLength()},t.prototype.remove=function(e){for(var n=this.array_,i=0,o=n.length;i<o;++i)if(n[i]===e)return this.removeAt(i)},t.prototype.removeAt=function(e){var n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new G_(ah.REMOVE,n,e)),n},t.prototype.setAt=function(e,n){var i=this.getLength();if(e<i){this.unique_&&this.assertUnique_(n,e);var o=this.array_[e];this.array_[e]=n,this.dispatchEvent(new G_(ah.REMOVE,o,e)),this.dispatchEvent(new G_(ah.ADD,n,e))}else{for(var s=i;s<e;++s)this.insertAt(s,void 0);this.insertAt(e,n)}},t.prototype.updateLength_=function(){this.set(f8.LENGTH,this.array_.length)},t.prototype.assertUnique_=function(e,n){for(var i=0,o=this.array_.length;i<o;++i)if(this.array_[i]===e&&i!==n)throw new LD(58)},t}(Yf),bL=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Qm=function(r){bL(t,r);function t(e,n){var i=r.call(this,e)||this;return i.layer=n,i}return t}(_m),n3={LAYERS:"layers"},u2=function(r){bL(t,r);function t(e){var n=this,i=e||{},o=Zu({},i);delete o.layers;var s=i.layers;return n=r.call(this,o)||this,n.on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(n3.LAYERS,n.handleLayersChanged_),s?Array.isArray(s)?s=new Af(s.slice(),{unique:!0}):fa(typeof s.getArray=="function",43):s=new Af(void 0,{unique:!0}),n.setLayers(s),n}return t.prototype.handleLayerChange_=function(){this.changed()},t.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(_l),this.layersListenerKeys_.length=0;var e=this.getLayers();this.layersListenerKeys_.push(Ia(e,ah.ADD,this.handleLayersAdd_,this),Ia(e,ah.REMOVE,this.handleLayersRemove_,this));for(var n in this.listenerKeys_)this.listenerKeys_[n].forEach(_l);Fv(this.listenerKeys_);for(var i=e.getArray(),o=0,s=i.length;o<s;o++){var a=i[o];this.registerLayerListeners_(a),this.dispatchEvent(new Qm("addlayer",a))}this.changed()},t.prototype.registerLayerListeners_=function(e){var n=[Ia(e,R1.PROPERTYCHANGE,this.handleLayerChange_,this),Ia(e,_o.CHANGE,this.handleLayerChange_,this)];e instanceof t&&n.push(Ia(e,"addlayer",this.handleLayerGroupAdd_,this),Ia(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Lo(e)]=n},t.prototype.handleLayerGroupAdd_=function(e){this.dispatchEvent(new Qm("addlayer",e.layer))},t.prototype.handleLayerGroupRemove_=function(e){this.dispatchEvent(new Qm("removelayer",e.layer))},t.prototype.handleLayersAdd_=function(e){var n=e.element;this.registerLayerListeners_(n),this.dispatchEvent(new Qm("addlayer",n)),this.changed()},t.prototype.handleLayersRemove_=function(e){var n=e.element,i=Lo(n);this.listenerKeys_[i].forEach(_l),delete this.listenerKeys_[i],this.dispatchEvent(new Qm("removelayer",n)),this.changed()},t.prototype.getLayers=function(){return this.get(n3.LAYERS)},t.prototype.setLayers=function(e){var n=this.getLayers();if(n)for(var i=n.getArray(),o=0,s=i.length;o<s;++o)this.dispatchEvent(new Qm("removelayer",i[o]));this.set(n3.LAYERS,e)},t.prototype.getLayersArray=function(e){var n=e!==void 0?e:[];return this.getLayers().forEach(function(i){i.getLayersArray(n)}),n},t.prototype.getLayerStatesArray=function(e){var n=e!==void 0?e:[],i=n.length;this.getLayers().forEach(function(b){b.getLayerStatesArray(n)});var o=this.getLayerState(),s=o.zIndex;!e&&o.zIndex===void 0&&(s=0);for(var a=i,f=n.length;a<f;a++){var g=n[a];g.opacity*=o.opacity,g.visible=g.visible&&o.visible,g.maxResolution=Math.min(g.maxResolution,o.maxResolution),g.minResolution=Math.max(g.minResolution,o.minResolution),g.minZoom=Math.max(g.minZoom,o.minZoom),g.maxZoom=Math.min(g.maxZoom,o.maxZoom),o.extent!==void 0&&(g.extent!==void 0?g.extent=H0(g.extent,o.extent):g.extent=o.extent),g.zIndex===void 0&&(g.zIndex=s)}return n},t.prototype.getSourceState=function(){return"ready"},t}(pL),QH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),t1=function(r){QH(t,r);function t(e,n,i){var o=r.call(this,e)||this;return o.map=n,o.frameState=i!==void 0?i:null,o}return t}(_m),qH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Gm=function(r){qH(t,r);function t(e,n,i,o,s,a){var f=r.call(this,e,n,s)||this;return f.originalEvent=i,f.pixel_=null,f.coordinate_=null,f.dragging=o!==void 0?o:!1,f.activePointers=a,f}return Object.defineProperty(t.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(e){this.pixel_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(e){this.coordinate_=e},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){r.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){r.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},t}(t1);const bu={SINGLECLICK:"singleclick",CLICK:_o.CLICK,DBLCLICK:_o.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},HS={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var YH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),$H=function(r){YH(t,r);function t(e,n){var i=r.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=n===void 0?1:n,i.down_=null;var o=i.map_.getViewport();return i.activePointers_=[],i.trackedTouches_={},i.element_=o,i.pointerdownListenerKey_=Ia(o,HS.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=Ia(o,HS.POINTERMOVE,i.relayMoveEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(_o.TOUCHMOVE,i.boundHandleTouchMove_,UD?{passive:!1}:!1),i}return t.prototype.emulateClick_=function(e){var n=new Gm(bu.CLICK,this.map_,e);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new Gm(bu.DBLCLICK,this.map_,e),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout((function(){this.clickTimeoutId_=void 0;var i=new Gm(bu.SINGLECLICK,this.map_,e);this.dispatchEvent(i)}).bind(this),250)},t.prototype.updateActivePointers_=function(e){var n=e,i=n.pointerId;if(n.type==bu.POINTERUP||n.type==bu.POINTERCANCEL){delete this.trackedTouches_[i];for(var o in this.trackedTouches_)if(this.trackedTouches_[o].target!==n.target){delete this.trackedTouches_[o];break}}else(n.type==bu.POINTERDOWN||n.type==bu.POINTERMOVE)&&(this.trackedTouches_[i]=n);this.activePointers_=RD(this.trackedTouches_)},t.prototype.handlePointerUp_=function(e){this.updateActivePointers_(e);var n=new Gm(bu.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(_l),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},t.prototype.isMouseActionButton_=function(e){return e.button===0},t.prototype.handlePointerDown_=function(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);var n=new Gm(bu.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(n),this.down_={};for(var i in e){var o=e[i];this.down_[i]=typeof o=="function"?ng:o}if(this.dragListenerKeys_.length===0){var s=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Ia(s,bu.POINTERMOVE,this.handlePointerMove_,this),Ia(s,bu.POINTERUP,this.handlePointerUp_,this),Ia(this.element_,bu.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==s&&this.dragListenerKeys_.push(Ia(this.element_.getRootNode(),bu.POINTERUP,this.handlePointerUp_,this))}},t.prototype.handlePointerMove_=function(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;var n=new Gm(bu.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(n)}},t.prototype.relayMoveEvent_=function(e){this.originalPointerMoveEvent_=e;var n=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new Gm(bu.POINTERMOVE,this.map_,e,n))},t.prototype.handleTouchMove_=function(e){var n=this.originalPointerMoveEvent_;(!n||n.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()},t.prototype.isMoving_=function(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_},t.prototype.disposeInternal=function(){this.relayedListenerKey_&&(_l(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(_o.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(_l(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(_l),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},t}($1);const lm={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Hc={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};var ab=1/0,VH=function(){function r(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return r.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,Fv(this.queuedElements_)},r.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},r.prototype.enqueue=function(t){fa(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=ab?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1},r.prototype.getCount=function(){return this.elements_.length},r.prototype.getLeftChildIndex_=function(t){return t*2+1},r.prototype.getRightChildIndex_=function(t){return t*2+2},r.prototype.getParentIndex_=function(t){return t-1>>1},r.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},r.prototype.isEmpty=function(){return this.elements_.length===0},r.prototype.isKeyQueued=function(t){return t in this.queuedElements_},r.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},r.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,i=e.length,o=e[t],s=n[t],a=t;t<i>>1;){var f=this.getLeftChildIndex_(t),g=this.getRightChildIndex_(t),b=g<i&&n[g]<n[f]?g:f;e[t]=e[b],n[t]=n[b],t=b}e[t]=o,n[t]=s,this.siftDown_(a,t)},r.prototype.siftDown_=function(t,e){for(var n=this.elements_,i=this.priorities_,o=n[e],s=i[e];e>t;){var a=this.getParentIndex_(e);if(i[a]>s)n[e]=n[a],i[e]=i[a],e=a;else break}n[e]=o,i[e]=s},r.prototype.reprioritize=function(){var t=this.priorityFunction_,e=this.elements_,n=this.priorities_,i=0,o=e.length,s,a,f;for(a=0;a<o;++a)s=e[a],f=t(s),f==ab?delete this.queuedElements_[this.keyFunction_(s)]:(n[i]=f,e[i++]=s);e.length=i,n.length=i,this.heapify_()},r}();const Vr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var HH=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ZH=function(r){HH(t,r);function t(e,n){var i=r.call(this,function(o){return e.apply(null,o)},function(o){return o[0].getKey()})||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return t.prototype.enqueue=function(e){var n=r.prototype.enqueue.call(this,e);if(n){var i=e[0];i.addEventListener(_o.CHANGE,this.boundHandleTileChange_)}return n},t.prototype.getTilesLoading=function(){return this.tilesLoading_},t.prototype.handleTileChange=function(e){var n=e.target,i=n.getState();if(i===Vr.LOADED||i===Vr.ERROR||i===Vr.EMPTY){n.removeEventListener(_o.CHANGE,this.boundHandleTileChange_);var o=n.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}},t.prototype.loadMoreTiles=function(e,n){for(var i=0,o,s,a;this.tilesLoading_<e&&i<n&&this.getCount()>0;)s=this.dequeue()[0],a=s.getKey(),o=s.getState(),o===Vr.IDLE&&!(a in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[a]=!0,++this.tilesLoading_,++i,s.load())},t}(VH);function XH(r,t,e,n,i){if(!r||!(e in r.wantedTiles)||!r.wantedTiles[e][t.getKey()])return ab;var o=r.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}const xu={ANIMATING:0,INTERACTING:1},Lf={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var xL=42,O6=256;function p8(r,t,e){return function(n,i,o,s,a){if(n){if(!i&&!t)return n;var f=t?0:o[0]*i,g=t?0:o[1]*i,b=a?a[0]:0,I=a?a[1]:0,S=r[0]+f/2+b,B=r[2]-f/2+b,P=r[1]+g/2+I,U=r[3]-g/2+I;S>B&&(S=(B+S)/2,B=S),P>U&&(P=(U+P)/2,U=P);var j=hA(n[0],S,B),q=hA(n[1],P,U);if(s&&e&&i){var W=30*i;j+=-W*Math.log(1+Math.max(0,S-n[0])/W)+W*Math.log(1+Math.max(0,n[0]-B)/W),q+=-W*Math.log(1+Math.max(0,P-n[1])/W)+W*Math.log(1+Math.max(0,n[1]-U)/W)}return[j,q]}}}function JH(r){return r}function B6(r,t,e,n){var i=Pl(t)/e[0],o=sh(t)/e[1];return n?Math.min(r,Math.max(i,o)):Math.min(r,Math.min(i,o))}function I6(r,t,e){var n=Math.min(r,t),i=50;return n*=Math.log(1+i*Math.max(0,r/t-1))/i+1,e&&(n=Math.max(n,e),n/=Math.log(1+i*Math.max(0,e/r-1))/i+1),hA(n,e/2,t*2)}function eZ(r,t,e,n){return function(i,o,s,a){if(i!==void 0){var f=r[0],g=r[r.length-1],b=e?B6(f,e,s,n):f;if(a){var I=t!==void 0?t:!0;return I?I6(i,b,g):hA(i,g,b)}var S=Math.min(b,i),B=Math.floor(e6(r,S,o));return r[B]>b&&B<r.length-1?r[B+1]:r[B]}else return}}function tZ(r,t,e,n,i,o){return function(s,a,f,g){if(s!==void 0){var b=i?B6(t,i,f,o):t,I=e!==void 0?e:0;if(g){var S=n!==void 0?n:!0;return S?I6(s,b,I):hA(s,I,b)}var B=1e-9,P=Math.ceil(Math.log(t/b)/Math.log(r)-B),U=-a*(.5-B)+.5,j=Math.min(b,s),q=Math.floor(Math.log(t/j)/Math.log(r)+U),W=Math.max(P,q),ee=t/Math.pow(r,W);return hA(ee,I,b)}else return}}function m8(r,t,e,n,i){return function(o,s,a,f){if(o!==void 0){var g=n?B6(r,n,a,i):r,b=e!==void 0?e:!0;return!b||!f?hA(o,t,g):I6(o,g,t)}else return}}function k6(r){if(r!==void 0)return 0}function g8(r){if(r!==void 0)return r}function nZ(r){var t=2*Math.PI/r;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function rZ(r){var t=yC(5);return function(e,n){if(n)return e;if(e!==void 0)return Math.abs(e)<=t?0:e}}function wL(r){return Math.pow(r,3)}function V1(r){return 1-wL(1-r)}function iZ(r){return 3*r*r-2*r*r*r}function oZ(r){return r}var aZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),r3=0,dm=function(r){aZ(t,r);function t(e){var n=r.call(this)||this;n.on,n.once,n.un;var i=Zu({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=h6(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&VD(),i.center&&(i.center=am(i.center,n.projection_)),i.extent&&(i.extent=N0(i.extent,n.projection_)),n.applyOptions_(i),n}return t.prototype.applyOptions_=function(e){var n=Zu({},e);for(var i in Lf)delete n[i];this.setProperties(n,!0);var o=lZ(e);this.maxResolution_=o.maxResolution,this.minResolution_=o.minResolution,this.zoomFactor_=o.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=o.minZoom;var s=sZ(e),a=o.constraint,f=uZ(e);this.constraints_={center:s,resolution:a,rotation:f},this.setRotation(e.rotation!==void 0?e.rotation:0),this.setCenterInternal(e.center!==void 0?e.center:null),e.resolution!==void 0?this.setResolution(e.resolution):e.zoom!==void 0&&this.setZoom(e.zoom)},Object.defineProperty(t.prototype,"padding",{get:function(){return this.padding_},set:function(e){var n=this.padding_;this.padding_=e;var i=this.getCenter();if(i){var o=e||[0,0,0,0];n=n||[0,0,0,0];var s=this.getResolution(),a=s/2*(o[3]-n[3]+n[1]-o[1]),f=s/2*(o[0]-n[0]+n[2]-o[2]);this.setCenterInternal([i[0]+a,i[1]-f])}},enumerable:!1,configurable:!0}),t.prototype.getUpdatedOptions_=function(e){var n=this.getProperties();return n.resolution!==void 0?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),Zu({},n,e)},t.prototype.animate=function(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var n=new Array(arguments.length),i=0;i<n.length;++i){var o=arguments[i];o.center&&(o=Zu({},o),o.center=am(o.center,this.getProjection())),o.anchor&&(o=Zu({},o),o.anchor=am(o.anchor,this.getProjection())),n[i]=o}this.animateInternal.apply(this,n)},t.prototype.animateInternal=function(e){var n=arguments.length,i;n>1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);for(var o=0;o<n&&!this.isDef();++o){var s=arguments[o];s.center&&this.setCenterInternal(s.center),s.zoom!==void 0?this.setZoom(s.zoom):s.resolution&&this.setResolution(s.resolution),s.rotation!==void 0&&this.setRotation(s.rotation)}if(o===n){i&&W_(i,!0);return}for(var a=Date.now(),f=this.targetCenter_.slice(),g=this.targetResolution_,b=this.targetRotation_,I=[];o<n;++o){var S=arguments[o],B={start:a,complete:!1,anchor:S.anchor,duration:S.duration!==void 0?S.duration:1e3,easing:S.easing||iZ,callback:i};if(S.center&&(B.sourceCenter=f,B.targetCenter=S.center.slice(),f=B.targetCenter),S.zoom!==void 0?(B.sourceResolution=g,B.targetResolution=this.getResolutionForZoom(S.zoom),g=B.targetResolution):S.resolution&&(B.sourceResolution=g,B.targetResolution=S.resolution,g=B.targetResolution),S.rotation!==void 0){B.sourceRotation=b;var P=X0(S.rotation-b+Math.PI,2*Math.PI)-Math.PI;B.targetRotation=b+P,b=B.targetRotation}AZ(B)?B.complete=!0:a+=B.duration,I.push(B)}this.animations_.push(I),this.setHint(xu.ANIMATING,1),this.updateAnimations_()},t.prototype.getAnimating=function(){return this.hints_[xu.ANIMATING]>0},t.prototype.getInteracting=function(){return this.hints_[xu.INTERACTING]>0},t.prototype.cancelAnimations=function(){this.setHint(xu.ANIMATING,-this.hints_[xu.ANIMATING]);for(var e,n=0,i=this.animations_.length;n<i;++n){var o=this.animations_[n];if(o[0].callback&&W_(o[0].callback,!1),!e)for(var s=0,a=o.length;s<a;++s){var f=o[s];if(!f.complete){e=f.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},t.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!!this.getAnimating()){for(var e=Date.now(),n=!1,i=this.animations_.length-1;i>=0;--i){for(var o=this.animations_[i],s=!0,a=0,f=o.length;a<f;++a){var g=o[a];if(!g.complete){var b=e-g.start,I=g.duration>0?b/g.duration:1;I>=1?(g.complete=!0,I=1):s=!1;var S=g.easing(I);if(g.sourceCenter){var B=g.sourceCenter[0],P=g.sourceCenter[1],U=g.targetCenter[0],j=g.targetCenter[1];this.nextCenter_=g.targetCenter;var q=B+S*(U-B),W=P+S*(j-P);this.targetCenter_=[q,W]}if(g.sourceResolution&&g.targetResolution){var ee=S===1?g.targetResolution:g.sourceResolution+S*(g.targetResolution-g.sourceResolution);if(g.anchor){var J=this.getViewportSize_(this.getRotation()),$=this.constraints_.resolution(ee,0,J,!0);this.targetCenter_=this.calculateCenterZoom($,g.anchor)}this.nextResolution_=g.targetResolution,this.targetResolution_=ee,this.applyTargetState_(!0)}if(g.sourceRotation!==void 0&&g.targetRotation!==void 0){var X=S===1?X0(g.targetRotation+Math.PI,2*Math.PI)-Math.PI:g.sourceRotation+S*(g.targetRotation-g.sourceRotation);if(g.anchor){var G=this.constraints_.rotation(X,!0);this.targetCenter_=this.calculateCenterRotate(G,g.anchor)}this.nextRotation_=g.targetRotation,this.targetRotation_=X}if(this.applyTargetState_(!0),n=!0,!g.complete)break}}if(s){this.animations_[i]=null,this.setHint(xu.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var ae=o[0].callback;ae&&W_(ae,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},t.prototype.calculateCenterRotate=function(e,n){var i,o=this.getCenterInternal();return o!==void 0&&(i=[o[0]-n[0],o[1]-n[1]],A6(i,e-this.getRotation()),aV(i,n)),i},t.prototype.calculateCenterZoom=function(e,n){var i,o=this.getCenterInternal(),s=this.getResolution();if(o!==void 0&&s!==void 0){var a=n[0]-e*(n[0]-o[0])/s,f=n[1]-e*(n[1]-o[1])/s;i=[a,f]}return i},t.prototype.getViewportSize_=function(e){var n=this.viewportSize_;if(e){var i=n[0],o=n[1];return[Math.abs(i*Math.cos(e))+Math.abs(o*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(o*Math.cos(e))]}else return n},t.prototype.setViewportSize=function(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},t.prototype.getCenter=function(){var e=this.getCenterInternal();return e&&zS(e,this.getProjection())},t.prototype.getCenterInternal=function(){return this.get(Lf.CENTER)},t.prototype.getConstraints=function(){return this.constraints_},t.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},t.prototype.getHints=function(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()},t.prototype.calculateExtent=function(e){var n=this.calculateExtentInternal(e);return ZD(n,this.getProjection())},t.prototype.calculateExtentInternal=function(e){var n=e||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();fa(i,1);var o=this.getResolution();fa(o!==void 0,2);var s=this.getRotation();return fa(s!==void 0,3),DS(i,o,s,n)},t.prototype.getMaxResolution=function(){return this.maxResolution_},t.prototype.getMinResolution=function(){return this.minResolution_},t.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},t.prototype.setMaxZoom=function(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))},t.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},t.prototype.setMinZoom=function(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))},t.prototype.setConstrainResolution=function(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))},t.prototype.getProjection=function(){return this.projection_},t.prototype.getResolution=function(){return this.get(Lf.RESOLUTION)},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getResolutionForExtent=function(e,n){return this.getResolutionForExtentInternal(N0(e,this.getProjection()),n)},t.prototype.getResolutionForExtentInternal=function(e,n){var i=n||this.getViewportSizeMinusPadding_(),o=Pl(e)/i[0],s=sh(e)/i[1];return Math.max(o,s)},t.prototype.getResolutionForValueFunction=function(e){var n=e||2,i=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,s=Math.log(i/o)/Math.log(n);return function(a){var f=i/Math.pow(n,a*s);return f}},t.prototype.getRotation=function(){return this.get(Lf.ROTATION)},t.prototype.getValueForResolutionFunction=function(e){var n=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,s=Math.log(i/o)/n;return function(a){var f=Math.log(i/a)/n/s;return f}},t.prototype.getViewportSizeMinusPadding_=function(e){var n=this.getViewportSize_(e),i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},t.prototype.getState=function(){var e=this.getProjection(),n=this.getResolution(),i=this.getRotation(),o=this.getCenterInternal(),s=this.padding_;if(s){var a=this.getViewportSizeMinusPadding_();o=i3(o,this.getViewportSize_(),[a[0]/2+s[3],a[1]/2+s[0]],n,i)}return{center:o.slice(0),projection:e!==void 0?e:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},t.prototype.getZoom=function(){var e,n=this.getResolution();return n!==void 0&&(e=this.getZoomForResolution(n)),e},t.prototype.getZoomForResolution=function(e){var n=this.minZoom_||0,i,o;if(this.resolutions_){var s=e6(this.resolutions_,e,1);n=s,i=this.resolutions_[s],s==this.resolutions_.length-1?o=2:o=i/this.resolutions_[s+1]}else i=this.maxResolution_,o=this.zoomFactor_;return n+Math.log(i/e)/Math.log(o)},t.prototype.getResolutionForZoom=function(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var n=hA(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,hA(e-n,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)},t.prototype.fit=function(e,n){var i;if(fa(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function",24),Array.isArray(e)){fa(!l6(e),25);var o=N0(e,this.getProjection());i=o8(o)}else if(e.getType()==="Circle"){var o=N0(e.getExtent(),this.getProjection());i=o8(o),i.rotate(this.getRotation(),s0(o))}else{var s=fV();s?i=e.clone().transform(s,this.getProjection()):i=e}this.fitInternal(i,n)},t.prototype.rotatedExtentForGeometry=function(e){for(var n=this.getRotation(),i=Math.cos(n),o=Math.sin(-n),s=e.getFlatCoordinates(),a=e.getStride(),f=1/0,g=1/0,b=-1/0,I=-1/0,S=0,B=s.length;S<B;S+=a){var P=s[S]*i-s[S+1]*o,U=s[S]*o+s[S+1]*i;f=Math.min(f,P),g=Math.min(g,U),b=Math.max(b,P),I=Math.max(I,U)}return[f,g,b,I]},t.prototype.fitInternal=function(e,n){var i=n||{},o=i.size;o||(o=this.getViewportSizeMinusPadding_());var s=i.padding!==void 0?i.padding:[0,0,0,0],a=i.nearest!==void 0?i.nearest:!1,f;i.minResolution!==void 0?f=i.minResolution:i.maxZoom!==void 0?f=this.getResolutionForZoom(i.maxZoom):f=0;var g=this.rotatedExtentForGeometry(e),b=this.getResolutionForExtentInternal(g,[o[0]-s[1]-s[3],o[1]-s[0]-s[2]]);b=isNaN(b)?f:Math.max(b,f),b=this.getConstrainedResolution(b,a?0:1);var I=this.getRotation(),S=Math.sin(I),B=Math.cos(I),P=s0(g);P[0]+=(s[1]-s[3])/2*b,P[1]+=(s[0]-s[2])/2*b;var U=P[0]*B-P[1]*S,j=P[1]*B+P[0]*S,q=this.getConstrainedCenter([U,j],b),W=i.callback?i.callback:ng;i.duration!==void 0?this.animateInternal({resolution:b,center:q,duration:i.duration,easing:i.easing},W):(this.targetResolution_=b,this.targetCenter_=q,this.applyTargetState_(!1,!0),W_(W,!0))},t.prototype.centerOn=function(e,n,i){this.centerOnInternal(am(e,this.getProjection()),n,i)},t.prototype.centerOnInternal=function(e,n,i){this.setCenterInternal(i3(e,n,i,this.getResolution(),this.getRotation()))},t.prototype.calculateCenterShift=function(e,n,i,o){var s,a=this.padding_;if(a&&e){var f=this.getViewportSizeMinusPadding_(-i),g=i3(e,o,[f[0]/2+a[3],f[1]/2+a[0]],n,i);s=[e[0]-g[0],e[1]-g[1]]}return s},t.prototype.isDef=function(){return!!this.getCenterInternal()&&this.getResolution()!==void 0},t.prototype.adjustCenter=function(e){var n=zS(this.targetCenter_,this.getProjection());this.setCenter([n[0]+e[0],n[1]+e[1]])},t.prototype.adjustCenterInternal=function(e){var n=this.targetCenter_;this.setCenterInternal([n[0]+e[0],n[1]+e[1]])},t.prototype.adjustResolution=function(e,n){var i=n&&am(n,this.getProjection());this.adjustResolutionInternal(e,i)},t.prototype.adjustResolutionInternal=function(e,n){var i=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*e,0,o,i);n&&(this.targetCenter_=this.calculateCenterZoom(s,n)),this.targetResolution_*=e,this.applyTargetState_()},t.prototype.adjustZoom=function(e,n){this.adjustResolution(Math.pow(this.zoomFactor_,-e),n)},t.prototype.adjustRotation=function(e,n){n&&(n=am(n,this.getProjection())),this.adjustRotationInternal(e,n)},t.prototype.adjustRotationInternal=function(e,n){var i=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+e,i);n&&(this.targetCenter_=this.calculateCenterRotate(o,n)),this.targetRotation_+=e,this.applyTargetState_()},t.prototype.setCenter=function(e){this.setCenterInternal(e&&am(e,this.getProjection()))},t.prototype.setCenterInternal=function(e){this.targetCenter_=e,this.applyTargetState_()},t.prototype.setHint=function(e,n){return this.hints_[e]+=n,this.changed(),this.hints_[e]},t.prototype.setResolution=function(e){this.targetResolution_=e,this.applyTargetState_()},t.prototype.setRotation=function(e){this.targetRotation_=e,this.applyTargetState_()},t.prototype.setZoom=function(e){this.setResolution(this.getResolutionForZoom(e))},t.prototype.applyTargetState_=function(e,n){var i=this.getAnimating()||this.getInteracting()||n,o=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,0,s,i),f=this.constraints_.center(this.targetCenter_,a,s,i,this.calculateCenterShift(this.targetCenter_,a,o,s));this.get(Lf.ROTATION)!==o&&this.set(Lf.ROTATION,o),this.get(Lf.RESOLUTION)!==a&&(this.set(Lf.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),(!f||!this.get(Lf.CENTER)||!VC(this.get(Lf.CENTER),f))&&this.set(Lf.CENTER,f),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0},t.prototype.resolveConstraints=function(e,n,i){var o=e!==void 0?e:200,s=n||0,a=this.constraints_.rotation(this.targetRotation_),f=this.getViewportSize_(a),g=this.constraints_.resolution(this.targetResolution_,s,f),b=this.constraints_.center(this.targetCenter_,g,f,!1,this.calculateCenterShift(this.targetCenter_,g,a,f));if(o===0&&!this.cancelAnchor_){this.targetResolution_=g,this.targetRotation_=a,this.targetCenter_=b,this.applyTargetState_();return}var I=i||(o===0?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,(this.getResolution()!==g||this.getRotation()!==a||!this.getCenterInternal()||!VC(this.getCenterInternal(),b))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:a,center:b,resolution:g,duration:o,easing:V1,anchor:I}))},t.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(xu.INTERACTING,1)},t.prototype.endInteraction=function(e,n,i){var o=i&&am(i,this.getProjection());this.endInteractionInternal(e,n,o)},t.prototype.endInteractionInternal=function(e,n,i){this.setHint(xu.INTERACTING,-1),this.resolveConstraints(e,n,i)},t.prototype.getConstrainedCenter=function(e,n){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,n||this.getResolution(),i)},t.prototype.getConstrainedZoom=function(e,n){var i=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(i,n))},t.prototype.getConstrainedResolution=function(e,n){var i=n||0,o=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,i,o)},t}(Yf);function W_(r,t){setTimeout(function(){r(t)},0)}function sZ(r){if(r.extent!==void 0){var t=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return p8(r.extent,r.constrainOnlyCenter,t)}var e=h6(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&e.isGlobal()){var n=e.getExtent().slice();return n[0]=-1/0,n[2]=1/0,p8(n,!1,!1)}return JH}function lZ(r){var t,e,n,i=28,o=2,s=r.minZoom!==void 0?r.minZoom:r3,a=r.maxZoom!==void 0?r.maxZoom:i,f=r.zoomFactor!==void 0?r.zoomFactor:o,g=r.multiWorld!==void 0?r.multiWorld:!1,b=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,I=r.showFullExtent!==void 0?r.showFullExtent:!1,S=h6(r.projection,"EPSG:3857"),B=S.getExtent(),P=r.constrainOnlyCenter,U=r.extent;if(!g&&!U&&S.isGlobal()&&(P=!1,U=B),r.resolutions!==void 0){var j=r.resolutions;e=j[s],n=j[a]!==void 0?j[a]:j[j.length-1],r.constrainResolution?t=eZ(j,b,!P&&U,I):t=m8(e,n,b,!P&&U,I)}else{var q=B?Math.max(Pl(B),sh(B)):360*l0[Rd.DEGREES]/S.getMetersPerUnit(),W=q/O6/Math.pow(o,r3),ee=W/Math.pow(o,i-r3);e=r.maxResolution,e!==void 0?s=0:e=W/Math.pow(f,s),n=r.minResolution,n===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?n=e/Math.pow(f,a):n=W/Math.pow(f,a):n=ee),a=s+Math.floor(Math.log(e/n)/Math.log(f)),n=e/Math.pow(f,a-s),r.constrainResolution?t=tZ(f,e,n,b,!P&&U,I):t=m8(e,n,b,!P&&U,I)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:f}}function uZ(r){var t=r.enableRotation!==void 0?r.enableRotation:!0;if(t){var e=r.constrainRotation;return e===void 0||e===!0?rZ():e===!1?g8:typeof e=="number"?nZ(e):g8}else return k6}function AZ(r){return!(r.sourceCenter&&r.targetCenter&&!VC(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function i3(r,t,e,n,i){var o=Math.cos(-i),s=Math.sin(-i),a=r[0]*o-r[1]*s,f=r[1]*o+r[0]*s;a+=(t[0]/2-e[0])*n,f+=(e[1]-t[1]/2)*n,s=-s;var g=a*o-f*s,b=f*o+a*s;return[g,b]}function y8(r){return r[0]>0&&r[1]>0}function cZ(r,t,e){return e===void 0&&(e=[0,0]),e[0]=r[0]*t+.5|0,e[1]=r[1]*t+.5|0,e}function Td(r,t){return Array.isArray(r)?r:(t===void 0?t=[r,r]:(t[0]=r,t[1]=r),t)}var dZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();function ML(r){if(r instanceof s2){r.setMapInternal(null);return}r instanceof u2&&r.getLayers().forEach(ML)}function SL(r,t){if(r instanceof s2){r.setMapInternal(t);return}if(r instanceof u2)for(var e=r.getLayers().getArray(),n=0,i=e.length;n<i;++n)SL(e[n],t)}var hZ=function(r){dZ(t,r);function t(e){var n=r.call(this)||this;n.on,n.once,n.un;var i=fZ(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,n.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:FD,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=(function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}).bind(n),n.coordinateToPixelTransform_=df(),n.pixelToCoordinateTransform_=df(),n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=i.controls||new Af,n.interactions=i.interactions||new Af,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new ZH(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(Hc.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(Hc.VIEW,n.handleViewChanged_),n.addChangeListener(Hc.SIZE,n.handleSizeChanged_),n.addChangeListener(Hc.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var o=n;return e.view&&!(e.view instanceof dm)&&e.view.then(function(s){o.setView(new dm(s))}),n.controls.addEventListener(ah.ADD,(function(s){s.element.setMap(this)}).bind(n)),n.controls.addEventListener(ah.REMOVE,(function(s){s.element.setMap(null)}).bind(n)),n.interactions.addEventListener(ah.ADD,(function(s){s.element.setMap(this)}).bind(n)),n.interactions.addEventListener(ah.REMOVE,(function(s){s.element.setMap(null)}).bind(n)),n.overlays_.addEventListener(ah.ADD,(function(s){this.addOverlayInternal_(s.element)}).bind(n)),n.overlays_.addEventListener(ah.REMOVE,(function(s){var a=s.element,f=a.getId();f!==void 0&&delete this.overlayIdIndex_[f.toString()],s.element.setMap(null)}).bind(n)),n.controls.forEach((function(s){s.setMap(this)}).bind(n)),n.interactions.forEach((function(s){s.setMap(this)}).bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return t.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},t.prototype.addControl=function(e){this.getControls().push(e)},t.prototype.addInteraction=function(e){this.getInteractions().push(e)},t.prototype.addLayer=function(e){var n=this.getLayerGroup().getLayers();n.push(e)},t.prototype.handleLayerAdd_=function(e){SL(e.layer,this)},t.prototype.addOverlay=function(e){this.getOverlays().push(e)},t.prototype.addOverlayInternal_=function(e){var n=e.getId();n!==void 0&&(this.overlayIdIndex_[n.toString()]=e),e.setMap(this)},t.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),r.prototype.disposeInternal.call(this)},t.prototype.forEachFeatureAtPixel=function(e,n,i){if(!(!this.frameState_||!this.renderer_)){var o=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};var s=i.hitTolerance!==void 0?i.hitTolerance:0,a=i.layerFilter!==void 0?i.layerFilter:_1,f=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(o,this.frameState_,s,f,n,null,a,null)}},t.prototype.getFeaturesAtPixel=function(e,n){var i=[];return this.forEachFeatureAtPixel(e,function(o){i.push(o)},n),i},t.prototype.getAllLayers=function(){var e=[];function n(i){i.forEach(function(o){o instanceof u2?n(o.getLayers()):e.push(o)})}return n(this.getLayers()),e},t.prototype.forEachLayerAtPixel=function(e,n,i){if(!(!this.frameState_||!this.renderer_)){var o=i||{},s=o.hitTolerance!==void 0?o.hitTolerance:0,a=o.layerFilter||_1;return this.renderer_.forEachLayerAtPixel(e,this.frameState_,s,n,a)}},t.prototype.hasFeatureAtPixel=function(e,n){if(!this.frameState_||!this.renderer_)return!1;var i=this.getCoordinateFromPixelInternal(e);n=n!==void 0?n:{};var o=n.layerFilter!==void 0?n.layerFilter:_1,s=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,a,o,null)},t.prototype.getEventCoordinate=function(e){return this.getCoordinateFromPixel(this.getEventPixel(e))},t.prototype.getEventCoordinateInternal=function(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))},t.prototype.getEventPixel=function(e){var n=this.viewport_.getBoundingClientRect(),i="changedTouches"in e?e.changedTouches[0]:e;return[i.clientX-n.left,i.clientY-n.top]},t.prototype.getTarget=function(){return this.get(Hc.TARGET)},t.prototype.getTargetElement=function(){var e=this.getTarget();return e!==void 0?typeof e=="string"?document.getElementById(e):e:null},t.prototype.getCoordinateFromPixel=function(e){return zS(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())},t.prototype.getCoordinateFromPixelInternal=function(e){var n=this.frameState_;return n?Vu(n.pixelToCoordinateTransform,e.slice()):null},t.prototype.getControls=function(){return this.controls},t.prototype.getOverlays=function(){return this.overlays_},t.prototype.getOverlayById=function(e){var n=this.overlayIdIndex_[e.toString()];return n!==void 0?n:null},t.prototype.getInteractions=function(){return this.interactions},t.prototype.getLayerGroup=function(){return this.get(Hc.LAYERGROUP)},t.prototype.setLayers=function(e){var n=this.getLayerGroup();if(e instanceof Af){n.setLayers(e);return}var i=n.getLayers();i.clear(),i.extend(e)},t.prototype.getLayers=function(){var e=this.getLayerGroup().getLayers();return e},t.prototype.getLoadingOrNotReady=function(){for(var e=this.getLayerGroup().getLayerStatesArray(),n=0,i=e.length;n<i;++n){var o=e[n];if(o.visible){var s=o.layer.getRenderer();if(s&&!s.ready)return!0;var a=o.layer.getSource();if(a&&a.loading)return!0}}return!1},t.prototype.getPixelFromCoordinate=function(e){var n=am(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},t.prototype.getPixelFromCoordinateInternal=function(e){var n=this.frameState_;return n?Vu(n.coordinateToPixelTransform,e.slice(0,2)):null},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.getSize=function(){return this.get(Hc.SIZE)},t.prototype.getView=function(){return this.get(Hc.VIEW)},t.prototype.getViewport=function(){return this.viewport_},t.prototype.getOverlayContainer=function(){return this.overlayContainer_},t.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},t.prototype.getOwnerDocument=function(){var e=this.getTargetElement();return e?e.ownerDocument:document},t.prototype.getTilePriority=function(e,n,i,o){return XH(this.frameState_,e,n,i,o)},t.prototype.handleBrowserEvent=function(e,n){var i=n||e.type,o=new Gm(i,this,e);this.handleMapBrowserEvent(o)},t.prototype.handleMapBrowserEvent=function(e){if(this.frameState_){var n=e.originalEvent,i=n.type;if(i===HS.POINTERDOWN||i===_o.WHEEL||i===_o.KEYDOWN){var o=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():o,a=n.target;if(this.overlayContainerStopEvent_.contains(a)||!(s===o?o.documentElement:s).contains(a))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1)for(var f=this.getInteractions().getArray().slice(),g=f.length-1;g>=0;g--){var b=f[g];if(!(b.getMap()!==this||!b.getActive()||!this.getTargetElement())){var I=b.handleEvent(e);if(!I||e.propagationStopped)break}}}},t.prototype.handlePostRender=function(){var e=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){var i=this.maxTilesLoading_,o=i;if(e){var s=e.viewHints;if(s[xu.ANIMATING]||s[xu.INTERACTING]){var a=Date.now()-e.time>8;i=a?0:8,o=a?0:2}}n.getTilesLoading()<i&&(n.reprioritize(),n.loadMoreTiles(i,o))}e&&this.renderer_&&!e.animate&&(this.renderComplete_===!0?(this.hasListener(r0.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(r0.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new t1(lm.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new t1(lm.LOADSTART,this,e))));for(var f=this.postRenderFunctions_,g=0,b=f.length;g<b;++g)f[g](this,e);f.length=0},t.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},t.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var e=0,n=this.targetChangeHandlerKeys_.length;e<n;++e)_l(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(_o.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(_o.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,nb(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 $H(this,this.moveTolerance_);for(var o in bu)this.mapBrowserEventHandler_.addEventListener(bu[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(_o.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(_o.WHEEL,this.boundHandleBrowserEvent_,UD?{passive:!1}:!1);var s=this.getOwnerDocument().defaultView,a=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[Ia(a,_o.KEYDOWN,this.handleBrowserEvent,this),Ia(a,_o.KEYPRESS,this.handleBrowserEvent,this),Ia(s,_o.RESIZE,this.updateSize,this)]}this.updateSize()},t.prototype.handleTileChange_=function(){this.render()},t.prototype.handleViewPropertyChanged_=function(){this.render()},t.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(_l(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(_l(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=Ia(e,R1.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Ia(e,_o.CHANGE,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()},t.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(_l),this.layerGroupPropertyListenerKeys_=null);var e=this.getLayerGroup();e&&(this.handleLayerAdd_(new Qm("addlayer",e)),this.layerGroupPropertyListenerKeys_=[Ia(e,R1.PROPERTYCHANGE,this.render,this),Ia(e,_o.CHANGE,this.render,this),Ia(e,"addlayer",this.handleLayerAdd_,this),Ia(e,"removelayer",this.handleLayerRemove_,this)]),this.render()},t.prototype.isRendered=function(){return!!this.frameState_},t.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},t.prototype.redrawText=function(){for(var e=this.getLayerGroup().getLayerStatesArray(),n=0,i=e.length;n<i;++n){var o=e[n].layer;o.hasRenderer()&&o.getRenderer().handleFontsChanged()}},t.prototype.render=function(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},t.prototype.removeControl=function(e){return this.getControls().remove(e)},t.prototype.removeInteraction=function(e){return this.getInteractions().remove(e)},t.prototype.removeLayer=function(e){var n=this.getLayerGroup().getLayers();return n.remove(e)},t.prototype.handleLayerRemove_=function(e){ML(e.layer)},t.prototype.removeOverlay=function(e){return this.getOverlays().remove(e)},t.prototype.renderFrame_=function(e){var n=this,i=this.getSize(),o=this.getView(),s=this.frameState_,a=null;if(i!==void 0&&y8(i)&&o&&o.isDef()){var f=o.getHints(this.frameState_?this.frameState_.viewHints:void 0),g=o.getState();if(a={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:DS(g.center,g.resolution,g.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:g,viewHints:f,wantedTiles:{},mapId:Lo(this),renderTargets:{}},g.nextCenter&&g.nextResolution){var b=isNaN(g.nextRotation)?g.rotation:g.nextRotation;a.nextExtent=DS(g.nextCenter,g.nextResolution,b,i)}}if(this.frameState_=a,this.renderer_.renderFrame(a),a){if(a.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,a.postRenderFunctions),s){var I=!this.previousExtent_||!l6(this.previousExtent_)&&!L1(a.extent,this.previousExtent_);I&&(this.dispatchEvent(new t1(lm.MOVESTART,this,s)),this.previousExtent_=zv(this.previousExtent_))}var S=this.previousExtent_&&!a.viewHints[xu.ANIMATING]&&!a.viewHints[xu.INTERACTING]&&!L1(a.extent,this.previousExtent_);S&&(this.dispatchEvent(new t1(lm.MOVEEND,this,a)),ND(a.extent,this.previousExtent_))}this.dispatchEvent(new t1(lm.POSTRENDER,this,a)),this.renderComplete_=this.hasListener(lm.LOADSTART)||this.hasListener(lm.LOADEND)||this.hasListener(r0.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){n.postRenderTimeoutHandle_=void 0,n.handlePostRender()},0))},t.prototype.setLayerGroup=function(e){var n=this.getLayerGroup();n&&this.handleLayerRemove_(new Qm("removelayer",n)),this.set(Hc.LAYERGROUP,e)},t.prototype.setSize=function(e){this.set(Hc.SIZE,e)},t.prototype.setTarget=function(e){this.set(Hc.TARGET,e)},t.prototype.setView=function(e){if(!e||e instanceof dm){this.set(Hc.VIEW,e);return}this.set(Hc.VIEW,new dm);var n=this;e.then(function(i){n.setView(new dm(i))})},t.prototype.updateSize=function(){var e=this.getTargetElement(),n=void 0;if(e){var i=getComputedStyle(e),o=e.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=e.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(o)&&!isNaN(s)&&(n=[o,s],!y8(n)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(n),this.updateViewportSize_()},t.prototype.updateViewportSize_=function(){var e=this.getView();if(e){var n=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(n=[parseInt(i.width,10),parseInt(i.height,10)]),e.setViewportSize(n)}},t}(Yf);function fZ(r){var t=null;r.keyboardEventTarget!==void 0&&(t=typeof r.keyboardEventTarget=="string"?document.getElementById(r.keyboardEventTarget):r.keyboardEventTarget);var e={},n=r.layers&&typeof r.layers.getLayers=="function"?r.layers:new u2({layers:r.layers});e[Hc.LAYERGROUP]=n,e[Hc.TARGET]=r.target,e[Hc.VIEW]=r.view instanceof dm?r.view:new dm;var i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new Af(r.controls.slice()):(fa(typeof r.controls.getArray=="function",47),i=r.controls));var o;r.interactions!==void 0&&(Array.isArray(r.interactions)?o=new Af(r.interactions.slice()):(fa(typeof r.interactions.getArray=="function",48),o=r.interactions));var s;return r.overlays!==void 0?Array.isArray(r.overlays)?s=new Af(r.overlays.slice()):(fa(typeof r.overlays.getArray=="function",49),s=r.overlays):s=new Af,{controls:i,interactions:o,keyboardEventTarget:t,overlays:s,values:e}}var pZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),T6=function(r){pZ(t,r);function t(e){var n=r.call(this)||this,i=e.element;return i&&!e.target&&!i.style.pointerEvents&&(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return t.prototype.disposeInternal=function(){nb(this.element),r.prototype.disposeInternal.call(this)},t.prototype.getMap=function(){return this.map_},t.prototype.setMap=function(e){this.map_&&nb(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)_l(this.listenerKeys[n]);if(this.listenerKeys.length=0,this.map_=e,e){var o=this.target_?this.target_:e.getOverlayContainerStopEvent();o.appendChild(this.element),this.render!==ng&&this.listenerKeys.push(Ia(e,lm.POSTRENDER,this.render,this)),e.render()}},t.prototype.render=function(e){},t.prototype.setTarget=function(e){this.target_=typeof e=="string"?document.getElementById(e):e},t}(Yf),mZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),gZ=function(r){mZ(t,r);function t(e){var n=this,i=e||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.ulElement_=document.createElement("ul"),n.collapsed_=i.collapsed!==void 0?i.collapsed:!0,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=i.collapsible!==void 0,n.collapsible_=i.collapsible!==void 0?i.collapsible:!0,n.collapsible_||(n.collapsed_=!1);var o=i.className!==void 0?i.className:"ol-attribution",s=i.tipLabel!==void 0?i.tipLabel:"Attributions",a=i.expandClassName!==void 0?i.expandClassName:o+"-expand",f=i.collapseLabel!==void 0?i.collapseLabel:"›",g=i.collapseClassName!==void 0?i.collapseClassName:o+"-collapse";typeof f=="string"?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=f,n.collapseLabel_.className=g):n.collapseLabel_=f;var b=i.label!==void 0?i.label:"i";typeof b=="string"?(n.label_=document.createElement("span"),n.label_.textContent=b,n.label_.className=a):n.label_=b;var I=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=s,n.toggleButton_.appendChild(I),n.toggleButton_.addEventListener(_o.CLICK,n.handleClick_.bind(n),!1);var S=o+" "+l2+" "+S6+(n.collapsed_&&n.collapsible_?" "+A8:"")+(n.collapsible_?"":" ol-uncollapsible"),B=n.element;return B.className=S,B.appendChild(n.toggleButton_),B.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return t.prototype.collectSourceAttributions_=function(e){for(var n={},i=[],o=!0,s=e.layerStatesArray,a=0,f=s.length;a<f;++a){var g=s[a];if(tb(g,e.viewState)){var b=g.layer.getSource();if(b){var I=b.getAttributions();if(I){var S=I(e);if(S)if(o=o&&b.getAttributionsCollapsible()!==!1,Array.isArray(S))for(var B=0,P=S.length;B<P;++B)S[B]in n||(i.push(S[B]),n[S[B]]=!0);else S in n||(i.push(S),n[S]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(o),i},t.prototype.updateElement_=function(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var n=this.collectSourceAttributions_(e),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!lg(n,this.renderedAttributions_)){yL(this.ulElement_);for(var o=0,s=n.length;o<s;++o){var a=document.createElement("li");a.innerHTML=n[o],this.ulElement_.appendChild(a)}this.renderedAttributions_=n}},t.prototype.handleClick_=function(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},t.prototype.handleToggle_=function(){this.element.classList.toggle(A8),this.collapsed_?d8(this.collapseLabel_,this.label_):d8(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},t.prototype.getCollapsible=function(){return this.collapsible_},t.prototype.setCollapsible=function(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},t.prototype.setCollapsed=function(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()},t.prototype.getCollapsed=function(){return this.collapsed_},t.prototype.render=function(e){this.updateElement_(e.frameState)},t}(T6),yZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),vZ=function(r){yZ(t,r);function t(e){var n=this,i=e||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var o=i.className!==void 0?i.className:"ol-rotate",s=i.label!==void 0?i.label:"⇧",a=i.compassClassName!==void 0?i.compassClassName:"ol-compass";n.label_=null,typeof s=="string"?(n.label_=document.createElement("span"),n.label_.className=a,n.label_.textContent=s):(n.label_=s,n.label_.classList.add(a));var f=i.tipLabel?i.tipLabel:"Reset rotation",g=document.createElement("button");g.className=o+"-reset",g.setAttribute("type","button"),g.title=f,g.appendChild(n.label_),g.addEventListener(_o.CLICK,n.handleClick_.bind(n),!1);var b=o+" "+l2+" "+S6,I=n.element;return I.className=b,I.appendChild(g),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=i.duration!==void 0?i.duration:250,n.autoHide_=i.autoHide!==void 0?i.autoHide:!0,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(N_),n}return t.prototype.handleClick_=function(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()},t.prototype.resetNorth_=function(){var e=this.getMap(),n=e.getView();if(n){var i=n.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:V1}):n.setRotation(0))}},t.prototype.render=function(e){var n=e.frameState;if(n){var i=n.viewState.rotation;if(i!=this.rotation_){var o="rotate("+i+"rad)";if(this.autoHide_){var s=this.element.classList.contains(N_);!s&&i===0?this.element.classList.add(N_):s&&i!==0&&this.element.classList.remove(N_)}this.label_.style.transform=o}this.rotation_=i}},t}(T6),_Z=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),CZ=function(r){_Z(t,r);function t(e){var n=this,i=e||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this;var o=i.className!==void 0?i.className:"ol-zoom",s=i.delta!==void 0?i.delta:1,a=i.zoomInClassName!==void 0?i.zoomInClassName:o+"-in",f=i.zoomOutClassName!==void 0?i.zoomOutClassName:o+"-out",g=i.zoomInLabel!==void 0?i.zoomInLabel:"+",b=i.zoomOutLabel!==void 0?i.zoomOutLabel:"–",I=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",S=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",B=document.createElement("button");B.className=a,B.setAttribute("type","button"),B.title=I,B.appendChild(typeof g=="string"?document.createTextNode(g):g),B.addEventListener(_o.CLICK,n.handleClick_.bind(n,s),!1);var P=document.createElement("button");P.className=f,P.setAttribute("type","button"),P.title=S,P.appendChild(typeof b=="string"?document.createTextNode(b):b),P.addEventListener(_o.CLICK,n.handleClick_.bind(n,-s),!1);var U=o+" "+l2+" "+S6,j=n.element;return j.className=U,j.appendChild(B),j.appendChild(P),n.duration_=i.duration!==void 0?i.duration:250,n}return t.prototype.handleClick_=function(e,n){n.preventDefault(),this.zoomByDelta_(e)},t.prototype.zoomByDelta_=function(e){var n=this.getMap(),i=n.getView();if(i){var o=i.getZoom();if(o!==void 0){var s=i.getConstrainedZoom(o+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:s,duration:this.duration_,easing:V1})):i.setZoom(s)}}},t}(T6),bZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Vc={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},xZ=function(r){bZ(t,r);function t(e){var n=r.call(this)||this;n.on,n.once,n.un,n.options=e,n.id=e.id,n.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,n.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,n.element=document.createElement("div"),n.element.className=e.className!==void 0?e.className:"ol-overlay-container "+PH,n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=e.autoPan;return i&&typeof i!="object"&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(Vc.ELEMENT,n.handleElementChanged),n.addChangeListener(Vc.MAP,n.handleMapChanged),n.addChangeListener(Vc.OFFSET,n.handleOffsetChanged),n.addChangeListener(Vc.POSITION,n.handlePositionChanged),n.addChangeListener(Vc.POSITIONING,n.handlePositioningChanged),e.element!==void 0&&n.setElement(e.element),n.setOffset(e.offset!==void 0?e.offset:[0,0]),n.setPositioning(e.positioning||"top-left"),e.position!==void 0&&n.setPosition(e.position),n}return t.prototype.getElement=function(){return this.get(Vc.ELEMENT)},t.prototype.getId=function(){return this.id},t.prototype.getMap=function(){return this.get(Vc.MAP)||null},t.prototype.getOffset=function(){return this.get(Vc.OFFSET)},t.prototype.getPosition=function(){return this.get(Vc.POSITION)},t.prototype.getPositioning=function(){return this.get(Vc.POSITIONING)},t.prototype.handleElementChanged=function(){yL(this.element);var e=this.getElement();e&&this.element.appendChild(e)},t.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(nb(this.element),_l(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var e=this.getMap();if(e){this.mapPostrenderListenerKey=Ia(e,lm.POSTRENDER,this.render,this),this.updatePixelPosition();var n=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},t.prototype.render=function(){this.updatePixelPosition()},t.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},t.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},t.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},t.prototype.setElement=function(e){this.set(Vc.ELEMENT,e)},t.prototype.setMap=function(e){this.set(Vc.MAP,e)},t.prototype.setOffset=function(e){this.set(Vc.OFFSET,e)},t.prototype.setPosition=function(e){this.set(Vc.POSITION,e)},t.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},t.prototype.panIntoView=function(e){var n=this.getMap();if(!(!n||!n.getTargetElement()||!this.get(Vc.POSITION))){var i=this.getRect(n.getTargetElement(),n.getSize()),o=this.getElement(),s=this.getRect(o,[RH(o),DH(o)]),a=e||{},f=a.margin===void 0?20:a.margin;if(!$m(i,s)){var g=s[0]-i[0],b=i[2]-s[2],I=s[1]-i[1],S=i[3]-s[3],B=[0,0];if(g<0?B[0]=g-f:b<0&&(B[0]=Math.abs(b)+f),I<0?B[1]=I-f:S<0&&(B[1]=Math.abs(S)+f),B[0]!==0||B[1]!==0){var P=n.getView().getCenterInternal(),U=n.getPixelFromCoordinateInternal(P);if(!U)return;var j=[U[0]+B[0],U[1]+B[1]],q=a.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(j),duration:q.duration,easing:q.easing})}}}},t.prototype.getRect=function(e,n){var i=e.getBoundingClientRect(),o=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[o,s,o+n[0],s+n[1]]},t.prototype.setPositioning=function(e){this.set(Vc.POSITIONING,e)},t.prototype.setVisible=function(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)},t.prototype.updatePixelPosition=function(){var e=this.getMap(),n=this.getPosition();if(!e||!e.isRendered()||!n){this.setVisible(!1);return}var i=e.getPixelFromCoordinate(n),o=e.getSize();this.updateRenderedPosition(i,o)},t.prototype.updateRenderedPosition=function(e,n){var i=this.element.style,o=this.getOffset(),s=this.getPositioning();this.setVisible(!0);var a=Math.round(e[0]+o[0])+"px",f=Math.round(e[1]+o[1])+"px",g="0%",b="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?g="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(g="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?b="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(b="-50%");var I="translate(".concat(g,", ").concat(b,") translate(").concat(a,", ").concat(f,")");this.rendered.transform_!=I&&(this.rendered.transform_=I,i.transform=I,i.msTransform=I)},t.prototype.getOptions=function(){return this.options},t}(Yf);function wZ(r){var t={},e=new Af,n=t.zoom!==void 0?t.zoom:!0;n&&e.push(new CZ(t.zoomOptions));var i=t.rotate!==void 0?t.rotate:!0;i&&e.push(new vZ(t.rotateOptions));var o=t.attribution!==void 0?t.attribution:!0;return o&&e.push(new gZ(t.attributionOptions)),e}const v8={ACTIVE:"active"};var MZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Gv=function(r){MZ(t,r);function t(e){var n=r.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return t.prototype.getActive=function(){return this.get(v8.ACTIVE)},t.prototype.getMap=function(){return this.map_},t.prototype.handleEvent=function(e){return!0},t.prototype.setActive=function(e){this.set(v8.ACTIVE,e)},t.prototype.setMap=function(e){this.map_=e},t}(Yf);function SZ(r,t,e){var n=r.getCenterInternal();if(n){var i=[n[0]+t[0],n[1]+t[1]];r.animateInternal({duration:e!==void 0?e:250,easing:oZ,center:r.getConstrainedCenter(i)})}}function P6(r,t,e,n){var i=r.getZoom();if(i!==void 0){var o=r.getConstrainedZoom(i+t),s=r.getResolutionForZoom(o);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:V1})}}var EZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),OZ=function(r){EZ(t,r);function t(e){var n=r.call(this)||this,i=e||{};return n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:250,n}return t.prototype.handleEvent=function(e){var n=!1;if(e.type==bu.DBLCLICK){var i=e.originalEvent,o=e.map,s=e.coordinate,a=i.shiftKey?-this.delta_:this.delta_,f=o.getView();P6(f,a,s,this.duration_),i.preventDefault(),n=!0}return!n},t}(Gv),BZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Wv=function(r){BZ(t,r);function t(e){var n=this,i=e||{};return n=r.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.targetPointers=[],n}return t.prototype.getPointerCount=function(){return this.targetPointers.length},t.prototype.handleDownEvent=function(e){return!1},t.prototype.handleDragEvent=function(e){},t.prototype.handleEvent=function(e){if(!e.originalEvent)return!0;var n=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==bu.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==bu.POINTERUP){var i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==bu.POINTERDOWN){var o=this.handleDownEvent(e);this.handlingDownUpSequence=o,n=this.stopDown(o)}else e.type==bu.POINTERMOVE&&this.handleMoveEvent(e);return!n},t.prototype.handleMoveEvent=function(e){},t.prototype.handleUpEvent=function(e){return!1},t.prototype.stopDown=function(e){return e},t.prototype.updateTrackedPointers_=function(e){e.activePointers&&(this.targetPointers=e.activePointers)},t}(Gv);function K6(r){for(var t=r.length,e=0,n=0,i=0;i<t;i++)e+=r[i].clientX,n+=r[i].clientY;return[e/t,n/t]}function ZS(r){var t=arguments;return function(e){for(var n=!0,i=0,o=t.length;i<o&&(n=n&&t[i](e),!!n);++i);return n}}var IZ=function(r){var t=r.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},kZ=function(r){var t=r.map.getTargetElement(),e=r.map.getOwnerDocument().activeElement;return t.contains(e)},EL=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?kZ(r):!0},TZ=_1,OL=function(r){var t=r.originalEvent;return t.button==0&&!(k$&&T$&&t.ctrlKey)},BL=function(r){var t=r.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},PZ=function(r){var t=r.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},IL=function(r){var t=r.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},o3=function(r){var t=r.originalEvent;return fa(t!==void 0,56),t.pointerType=="mouse"},KZ=function(r){var t=r.originalEvent;return fa(t!==void 0,56),t.isPrimary&&t.button===0},RZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),DZ=function(r){RZ(t,r);function t(e){var n=r.call(this,{stopDown:t2})||this,i=e||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var o=i.condition?i.condition:ZS(BL,KZ);return n.condition_=i.onFocusOnly?ZS(EL,o):o,n.noKinetic_=!1,n}return t.prototype.handleDragEvent=function(e){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=K6(n);if(n.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]],s=e.map,a=s.getView();sV(o,a.getResolution()),A6(o,a.getRotation()),a.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,e.originalEvent.preventDefault()},t.prototype.handleUpEvent=function(e){var n=e.map,i=n.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var o=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),a=i.getCenterInternal(),f=n.getPixelFromCoordinateInternal(a),g=n.getCoordinateFromPixelInternal([f[0]-o*Math.cos(s),f[1]-o*Math.sin(s)]);i.animateInternal({center:i.getConstrainedCenter(g),duration:500,easing:V1})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},t.prototype.handleDownEvent=function(e){if(this.targetPointers.length>0&&this.condition_(e)){var n=e.map,i=n.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1},t}(Wv),LZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),FZ=function(r){LZ(t,r);function t(e){var n=this,i=e||{};return n=r.call(this,{stopDown:t2})||this,n.condition_=i.condition?i.condition:IZ,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return t.prototype.handleDragEvent=function(e){if(o3(e)){var n=e.map,i=n.getView();if(i.getConstraints().rotation!==k6){var o=n.getSize(),s=e.pixel,a=Math.atan2(o[1]/2-s[1],s[0]-o[0]/2);if(this.lastAngle_!==void 0){var f=a-this.lastAngle_;i.adjustRotationInternal(-f)}this.lastAngle_=a}}},t.prototype.handleUpEvent=function(e){if(!o3(e))return!0;var n=e.map,i=n.getView();return i.endInteraction(this.duration_),!1},t.prototype.handleDownEvent=function(e){if(!o3(e))return!1;if(OL(e)&&this.condition_(e)){var n=e.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},t}(Wv),UZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),jZ=function(r){UZ(t,r);function t(e){var n=r.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return t.prototype.disposeInternal=function(){this.setMap(null)},t.prototype.render_=function(){var e=this.startPixel_,n=this.endPixel_,i="px",o=this.element_.style;o.left=Math.min(e[0],n[0])+i,o.top=Math.min(e[1],n[1])+i,o.width=Math.abs(n[0]-e[0])+i,o.height=Math.abs(n[1]-e[1])+i},t.prototype.setMap=function(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},t.prototype.setPixels=function(e,n){this.startPixel_=e,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()},t.prototype.createOrUpdateGeometry=function(){var e=this.startPixel_,n=this.endPixel_,i=[e,[e[0],n[1]],n,[n[0],e[1]]],o=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);o[4]=o[0].slice(),this.geometry_?this.geometry_.setCoordinates([o]):this.geometry_=new F1([o])},t.prototype.getGeometry=function(){return this.geometry_},t}(JE),kL=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Q_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},a3=function(r){kL(t,r);function t(e,n,i){var o=r.call(this,e)||this;return o.coordinate=n,o.mapBrowserEvent=i,o}return t}(_m),zZ=function(r){kL(t,r);function t(e){var n=r.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new jZ(i.className||"ol-dragbox"),n.minArea_=i.minArea!==void 0?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:OL,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return t.prototype.defaultBoxEndCondition=function(e,n,i){var o=i[0]-n[0],s=i[1]-n[1];return o*o+s*s>=this.minArea_},t.prototype.getGeometry=function(){return this.box_.getGeometry()},t.prototype.handleDragEvent=function(e){this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new a3(Q_.BOXDRAG,e.coordinate,e))},t.prototype.handleUpEvent=function(e){this.box_.setMap(null);var n=this.boxEndCondition_(e,this.startPixel_,e.pixel);return n&&this.onBoxEnd(e),this.dispatchEvent(new a3(n?Q_.BOXEND:Q_.BOXCANCEL,e.coordinate,e)),!1},t.prototype.handleDownEvent=function(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new a3(Q_.BOXSTART,e.coordinate,e)),!0):!1},t.prototype.onBoxEnd=function(e){},t}(Wv),NZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),GZ=function(r){NZ(t,r);function t(e){var n=this,i=e||{},o=i.condition?i.condition:PZ;return n=r.call(this,{condition:o,className:i.className||"ol-dragzoom",minArea:i.minArea})||this,n.duration_=i.duration!==void 0?i.duration:200,n.out_=i.out!==void 0?i.out:!1,n}return t.prototype.onBoxEnd=function(e){var n=this.getMap(),i=n.getView(),o=this.getGeometry();if(this.out_){var s=i.rotatedExtentForGeometry(o),a=i.getResolutionForExtentInternal(s),f=i.getResolution()/a;o=o.clone(),o.scale(f*f)}i.fitInternal(o,{duration:this.duration_,easing:V1})},t}(zZ);const E0={LEFT:37,UP:38,RIGHT:39,DOWN:40};var WZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),QZ=function(r){WZ(t,r);function t(e){var n=r.call(this)||this,i=e||{};return n.defaultCondition_=function(o){return BL(o)&&IL(o)},n.condition_=i.condition!==void 0?i.condition:n.defaultCondition_,n.duration_=i.duration!==void 0?i.duration:100,n.pixelDelta_=i.pixelDelta!==void 0?i.pixelDelta:128,n}return t.prototype.handleEvent=function(e){var n=!1;if(e.type==_o.KEYDOWN){var i=e.originalEvent,o=i.keyCode;if(this.condition_(e)&&(o==E0.DOWN||o==E0.LEFT||o==E0.RIGHT||o==E0.UP)){var s=e.map,a=s.getView(),f=a.getResolution()*this.pixelDelta_,g=0,b=0;o==E0.DOWN?b=-f:o==E0.LEFT?g=-f:o==E0.RIGHT?g=f:b=f;var I=[g,b];A6(I,a.getRotation()),SZ(a,I,this.duration_),i.preventDefault(),n=!0}}return!n},t}(Gv),qZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),YZ=function(r){qZ(t,r);function t(e){var n=r.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:IL,n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:100,n}return t.prototype.handleEvent=function(e){var n=!1;if(e.type==_o.KEYDOWN||e.type==_o.KEYPRESS){var i=e.originalEvent,o=i.charCode;if(this.condition_(e)&&(o==43||o==45)){var s=e.map,a=o==43?this.delta_:-this.delta_,f=s.getView();P6(f,a,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},t}(Gv),$Z=function(){function r(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return r.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},r.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},r.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var o=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/i,this.initialVelocity_>this.minVelocity_},r.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},r.prototype.getAngle=function(){return this.angle_},r}(),VZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),s3={TRACKPAD:"trackpad",WHEEL:"wheel"},HZ=function(r){VZ(t,r);function t(e){var n=this,i=e||{};n=r.call(this,i)||this,n.totalDelta_=0,n.lastDelta_=0,n.maxDelta_=i.maxDelta!==void 0?i.maxDelta:1,n.duration_=i.duration!==void 0?i.duration:250,n.timeout_=i.timeout!==void 0?i.timeout:80,n.useAnchor_=i.useAnchor!==void 0?i.useAnchor:!0,n.constrainResolution_=i.constrainResolution!==void 0?i.constrainResolution:!1;var o=i.condition?i.condition:TZ;return n.condition_=i.onFocusOnly?ZS(EL,o):o,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return t.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var e=this.getMap();if(e){var n=e.getView();n.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}},t.prototype.handleEvent=function(e){if(!this.condition_(e))return!0;var n=e.type;if(n!==_o.WHEEL)return!0;var i=e.map,o=e.originalEvent;o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate);var s;if(e.type==_o.WHEEL&&(s=o.deltaY,B$&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=FD),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;var a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?s3.TRACKPAD:s3.WHEEL);var f=i.getView();if(this.mode_===s3.TRACKPAD&&!(f.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(f.getAnimating()&&f.cancelAnimations(),f.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),f.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=s;var g=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),g),!1},t.prototype.handleWheelZoom_=function(e){var n=e.getView();n.getAnimating()&&n.cancelAnimations();var i=-hA(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),P6(n,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},t.prototype.setMouseAnchor=function(e){this.useAnchor_=e,e||(this.lastAnchor_=null)},t}(Gv),ZZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),XZ=function(r){ZZ(t,r);function t(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=t2),n=r.call(this,o)||this,n.anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=i.threshold!==void 0?i.threshold:.3,n.duration_=i.duration!==void 0?i.duration:250,n}return t.prototype.handleDragEvent=function(e){var n=0,i=this.targetPointers[0],o=this.targetPointers[1],s=Math.atan2(o.clientY-i.clientY,o.clientX-i.clientX);if(this.lastAngle_!==void 0){var a=s-this.lastAngle_;this.rotationDelta_+=a,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=a}this.lastAngle_=s;var f=e.map,g=f.getView();if(g.getConstraints().rotation!==k6){var b=f.getViewport().getBoundingClientRect(),I=K6(this.targetPointers);I[0]-=b.left,I[1]-=b.top,this.anchor_=f.getCoordinateFromPixelInternal(I),this.rotating_&&(f.render(),g.adjustRotationInternal(n,this.anchor_))}},t.prototype.handleUpEvent=function(e){if(this.targetPointers.length<2){var n=e.map,i=n.getView();return i.endInteraction(this.duration_),!1}else return!0},t.prototype.handleDownEvent=function(e){if(this.targetPointers.length>=2){var n=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},t}(Wv),JZ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),eX=function(r){JZ(t,r);function t(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=t2),n=r.call(this,o)||this,n.anchor_=null,n.duration_=i.duration!==void 0?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return t.prototype.handleDragEvent=function(e){var n=1,i=this.targetPointers[0],o=this.targetPointers[1],s=i.clientX-o.clientX,a=i.clientY-o.clientY,f=Math.sqrt(s*s+a*a);this.lastDistance_!==void 0&&(n=this.lastDistance_/f),this.lastDistance_=f;var g=e.map,b=g.getView();n!=1&&(this.lastScaleDelta_=n);var I=g.getViewport().getBoundingClientRect(),S=K6(this.targetPointers);S[0]-=I.left,S[1]-=I.top,this.anchor_=g.getCoordinateFromPixelInternal(S),g.render(),b.adjustResolutionInternal(n,this.anchor_)},t.prototype.handleUpEvent=function(e){if(this.targetPointers.length<2){var n=e.map,i=n.getView(),o=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,o),!1}else return!0},t.prototype.handleDownEvent=function(e){if(this.targetPointers.length>=2){var n=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},t}(Wv);function tX(r,t,e,n,i){TL(r,t,e||0,n||r.length-1,i||nX)}function TL(r,t,e,n,i){for(;n>e;){if(n-e>600){var o=n-e+1,s=t-e+1,a=Math.log(o),f=.5*Math.exp(2*a/3),g=.5*Math.sqrt(a*f*(o-f)/o)*(s-o/2<0?-1:1),b=Math.max(e,Math.floor(t-s*f/o+g)),I=Math.min(n,Math.floor(t+(o-s)*f/o+g));TL(r,t,b,I,i)}var S=r[t],B=e,P=n;for(_y(r,e,t),i(r[n],S)>0&&_y(r,e,n);B<P;){for(_y(r,B,P),B++,P--;i(r[B],S)<0;)B++;for(;i(r[P],S)>0;)P--}i(r[e],S)===0?_y(r,e,P):(P++,_y(r,P,n)),P<=t&&(e=P+1),t<=P&&(n=P-1)}}function _y(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function nX(r,t){return r<t?-1:r>t?1:0}let PL=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!Y_(t,e))return n;const i=this.toBBox,o=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],f=e.leaf?i(a):a;Y_(t,f)&&(e.leaf?n.push(a):u3(t,f)?this._all(a,n):o.push(a))}e=o.pop()}return n}collides(t){let e=this.data;if(!Y_(t,e))return!1;const n=[];for(;e;){for(let i=0;i<e.children.length;i++){const o=e.children[i],s=e.leaf?this.toBBox(o):o;if(Y_(t,s)){if(e.leaf||u3(t,s))return!0;n.push(o)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=n1([]),this}remove(t,e){if(!t)return this;let n=this.data;const i=this.toBBox(t),o=[],s=[];let a,f,g;for(;n||o.length;){if(n||(n=o.pop(),f=o[o.length-1],a=s.pop(),g=!0),n.leaf){const b=rX(t,n.children,e);if(b!==-1)return n.children.splice(b,1),o.push(n),this._condense(o),this}!g&&!n.leaf&&u3(n,i)?(o.push(n),s.push(a),a=0,f=n,n=n.children[0]):f?(a++,n=f.children[a],g=!1):n=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,i){const o=n-e+1;let s=this._maxEntries,a;if(o<=s)return a=n1(t.slice(e,n+1)),Ig(a,this.toBBox),a;i||(i=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,i-1))),a=n1([]),a.leaf=!1,a.height=i;const f=Math.ceil(o/s),g=f*Math.ceil(Math.sqrt(s));_8(t,e,n,g,this.compareMinX);for(let b=e;b<=n;b+=g){const I=Math.min(b+g-1,n);_8(t,b,I,f,this.compareMinY);for(let S=b;S<=I;S+=f){const B=Math.min(S+f-1,I);a.children.push(this._build(t,S,B,i-1))}}return Ig(a,this.toBBox),a}_chooseSubtree(t,e,n,i){for(;i.push(e),!(e.leaf||i.length-1===n);){let o=1/0,s=1/0,a;for(let f=0;f<e.children.length;f++){const g=e.children[f],b=l3(g),I=aX(t,g)-b;I<s?(s=I,o=b<o?b:o,a=g):I===s&&b<o&&(o=b,a=g)}e=a||e.children[0]}return e}_insert(t,e,n){const i=n?t:this.toBBox(t),o=[],s=this._chooseSubtree(i,this.data,e,o);for(s.children.push(t),Ry(s,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)}_split(t,e){const n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);const s=this._chooseSplitIndex(n,o,i),a=n1(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Ig(n,this.toBBox),Ig(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=n1([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Ig(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let i,o=1/0,s=1/0;for(let a=e;a<=n-e;a++){const f=Ky(t,0,a,this.toBBox),g=Ky(t,a,n,this.toBBox),b=sX(f,g),I=l3(f)+l3(g);b<o?(o=b,i=a,s=I<s?I:s):b===o&&I<s&&(s=I,i=a)}return i||n-e}_chooseSplitAxis(t,e,n){const i=t.leaf?this.compareMinX:iX,o=t.leaf?this.compareMinY:oX,s=this._allDistMargin(t,e,n,i),a=this._allDistMargin(t,e,n,o);s<a&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);const o=this.toBBox,s=Ky(t,0,e,o),a=Ky(t,n-e,n,o);let f=q_(s)+q_(a);for(let g=e;g<n-e;g++){const b=t.children[g];Ry(s,t.leaf?o(b):b),f+=q_(s)}for(let g=n-e-1;g>=e;g--){const b=t.children[g];Ry(a,t.leaf?o(b):b),f+=q_(a)}return f}_adjustParentBBoxes(t,e,n){for(let i=n;i>=0;i--)Ry(e[i],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Ig(t[e],this.toBBox)}};function rX(r,t,e){if(!e)return t.indexOf(r);for(let n=0;n<t.length;n++)if(e(r,t[n]))return n;return-1}function Ig(r,t){Ky(r,0,r.children.length,t,r)}function Ky(r,t,e,n,i){i||(i=n1(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=t;o<e;o++){const s=r.children[o];Ry(i,r.leaf?n(s):s)}return i}function Ry(r,t){return r.minX=Math.min(r.minX,t.minX),r.minY=Math.min(r.minY,t.minY),r.maxX=Math.max(r.maxX,t.maxX),r.maxY=Math.max(r.maxY,t.maxY),r}function iX(r,t){return r.minX-t.minX}function oX(r,t){return r.minY-t.minY}function l3(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function q_(r){return r.maxX-r.minX+(r.maxY-r.minY)}function aX(r,t){return(Math.max(t.maxX,r.maxX)-Math.min(t.minX,r.minX))*(Math.max(t.maxY,r.maxY)-Math.min(t.minY,r.minY))}function sX(r,t){const e=Math.max(r.minX,t.minX),n=Math.max(r.minY,t.minY),i=Math.min(r.maxX,t.maxX),o=Math.min(r.maxY,t.maxY);return Math.max(0,i-e)*Math.max(0,o-n)}function u3(r,t){return r.minX<=t.minX&&r.minY<=t.minY&&t.maxX<=r.maxX&&t.maxY<=r.maxY}function Y_(r,t){return t.minX<=r.maxX&&t.minY<=r.maxY&&t.maxX>=r.minX&&t.maxY>=r.minY}function n1(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _8(r,t,e,n,i){const o=[t,e];for(;o.length;){if(e=o.pop(),t=o.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;tX(r,s,t,e,i),o.push(t,s,s,e)}}const vl={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var KL=function(){function r(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Td(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}return r.prototype.clone=function(){var t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},r.prototype.getOpacity=function(){return this.opacity_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getDisplacement=function(){return this.displacement_},r.prototype.getDeclutterMode=function(){return this.declutterMode_},r.prototype.getAnchor=function(){return Zi()},r.prototype.getImage=function(t){return Zi()},r.prototype.getHitDetectionImage=function(){return Zi()},r.prototype.getPixelRatio=function(t){return 1},r.prototype.getImageState=function(){return Zi()},r.prototype.getImageSize=function(){return Zi()},r.prototype.getOrigin=function(){return Zi()},r.prototype.getSize=function(){return Zi()},r.prototype.setDisplacement=function(t){this.displacement_=t},r.prototype.setOpacity=function(t){this.opacity_=t},r.prototype.setRotateWithView=function(t){this.rotateWithView_=t},r.prototype.setRotation=function(t){this.rotation_=t},r.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Td(t)},r.prototype.listenImageChange=function(t){Zi()},r.prototype.load=function(){Zi()},r.prototype.unlistenImageChange=function(t){Zi()},r}();function wp(r){return Array.isArray(r)?fL(r):r}var lX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),uX=function(r){lX(t,r);function t(e){var n=this,i=e.rotateWithView!==void 0?e.rotateWithView:!1;return n=r.call(this,{opacity:1,rotateWithView:i,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})||this,n.canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=e.fill!==void 0?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=e.radius!==void 0?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=e.angle!==void 0?e.angle:0,n.stroke_=e.stroke!==void 0?e.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return t.prototype.clone=function(){var e=this.getScale(),n=new t({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(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n},t.prototype.getAnchor=function(){var e=this.size_;if(!e)return null;var n=this.getDisplacement();return[e[0]/2-n[0],e[1]/2+n[1]]},t.prototype.getAngle=function(){return this.angle_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(e){this.fill_=e,this.render()},t.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},t.prototype.getImage=function(e){var n=this.canvas_[e];if(!n){var i=this.renderOptions_,o=lh(i.size*e,i.size*e);this.draw_(i,o,e),n=o.canvas,this.canvas_[e]=n}return n},t.prototype.getPixelRatio=function(e){return e},t.prototype.getImageSize=function(){return this.size_},t.prototype.getImageState=function(){return vl.LOADED},t.prototype.getOrigin=function(){return this.origin_},t.prototype.getPoints=function(){return this.points_},t.prototype.getRadius=function(){return this.radius_},t.prototype.getRadius2=function(){return this.radius2_},t.prototype.getSize=function(){return this.size_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(e){this.stroke_=e,this.render()},t.prototype.listenImageChange=function(e){},t.prototype.load=function(){},t.prototype.unlistenImageChange=function(e){},t.prototype.calculateLineJoinSize_=function(e,n,i){if(n===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return n;var o=this.radius_,s=this.radius2_===void 0?o:this.radius2_;if(o<s){var a=o;o=s,s=a}var f=this.radius2_===void 0?this.points_:this.points_*2,g=2*Math.PI/f,b=s*Math.sin(g),I=Math.sqrt(s*s-b*b),S=o-I,B=Math.sqrt(b*b+S*S),P=B/b;if(e==="miter"&&P<=i)return P*n;var U=n/2/P,j=n/2*(S/B),q=Math.sqrt((o+U)*(o+U)+j*j),W=q-o;if(this.radius2_===void 0||e==="bevel")return W*2;var ee=o*Math.sin(g),J=Math.sqrt(o*o-ee*ee),$=s-J,X=Math.sqrt(ee*ee+$*$),G=X/ee;if(G<=i){var ae=G*n/2-s-o;return 2*Math.max(W,ae)}return W*2},t.prototype.createRenderOptions=function(){var e=U1,n=0,i=null,o=0,s,a=0;this.stroke_&&(s=this.stroke_.getColor(),s===null&&(s=gv),s=wp(s),a=this.stroke_.getWidth(),a===void 0&&(a=vv),i=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),e===void 0&&(e=U1),n=this.stroke_.getMiterLimit(),n===void 0&&(n=mv));var f=this.calculateLineJoinSize_(e,a,n),g=Math.max(this.radius_,this.radius2_||0),b=Math.ceil(2*g+f);return{strokeStyle:s,strokeWidth:a,size:b,lineDash:i,lineDashOffset:o,lineJoin:e,miterLimit:n}},t.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var e=this.renderOptions_.size;this.canvas_={},this.size_=[e,e]},t.prototype.draw_=function(e,n,i){if(n.scale(i,i),n.translate(e.size/2,e.size/2),this.createPath_(n),this.fill_){var o=this.fill_.getColor();o===null&&(o=pm),n.fillStyle=wp(o),n.fill()}this.stroke_&&(n.strokeStyle=e.strokeStyle,n.lineWidth=e.strokeWidth,n.setLineDash&&e.lineDash&&(n.setLineDash(e.lineDash),n.lineDashOffset=e.lineDashOffset),n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit,n.stroke())},t.prototype.createHitDetectionCanvas_=function(e){if(this.fill_){var n=this.fill_.getColor(),i=0;if(typeof n=="string"&&(n=JC(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0){var o=lh(e.size,e.size);this.hitDetectionCanvas_=o.canvas,this.drawHitDetectionCanvas_(e,o)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},t.prototype.createPath_=function(e){var n=this.points_,i=this.radius_;if(n===1/0)e.arc(0,0,i,0,2*Math.PI);else{var o=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(n*=2);for(var s=this.angle_-Math.PI/2,a=2*Math.PI/n,f=0;f<n;f++){var g=s+f*a,b=f%2===0?i:o;e.lineTo(b*Math.cos(g),b*Math.sin(g))}e.closePath()}},t.prototype.drawHitDetectionCanvas_=function(e,n){n.translate(e.size/2,e.size/2),this.createPath_(n),n.fillStyle=pm,n.fill(),this.stroke_&&(n.strokeStyle=e.strokeStyle,n.lineWidth=e.strokeWidth,e.lineDash&&(n.setLineDash(e.lineDash),n.lineDashOffset=e.lineDashOffset),n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit,n.stroke())},t}(KL),AX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),RL=function(r){AX(t,r);function t(e){var n=e||{};return r.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:n.scale!==void 0?n.scale:1,rotation:n.rotation!==void 0?n.rotation:0,rotateWithView:n.rotateWithView!==void 0?n.rotateWithView:!1,displacement:n.displacement!==void 0?n.displacement:[0,0],declutterMode:n.declutterMode})||this}return t.prototype.clone=function(){var e=this.getScale(),n=new t({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n},t.prototype.setRadius=function(e){this.radius_=e,this.render()},t}(uX),u1=function(){function r(t){var e=t||{};this.color_=e.color!==void 0?e.color:null}return r.prototype.clone=function(){var t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})},r.prototype.getColor=function(){return this.color_},r.prototype.setColor=function(t){this.color_=t},r}(),Dy=function(){function r(t){var e=t||{};this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return r.prototype.clone=function(){var t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||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()})},r.prototype.getColor=function(){return this.color_},r.prototype.getLineCap=function(){return this.lineCap_},r.prototype.getLineDash=function(){return this.lineDash_},r.prototype.getLineDashOffset=function(){return this.lineDashOffset_},r.prototype.getLineJoin=function(){return this.lineJoin_},r.prototype.getMiterLimit=function(){return this.miterLimit_},r.prototype.getWidth=function(){return this.width_},r.prototype.setColor=function(t){this.color_=t},r.prototype.setLineCap=function(t){this.lineCap_=t},r.prototype.setLineDash=function(t){this.lineDash_=t},r.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},r.prototype.setLineJoin=function(t){this.lineJoin_=t},r.prototype.setMiterLimit=function(t){this.miterLimit_=t},r.prototype.setWidth=function(t){this.width_=t},r}(),R0=function(){function r(t){var e=t||{};this.geometry_=null,this.geometryFunction_=C8,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}return r.prototype.clone=function(){var t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new r({geometry:t,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()})},r.prototype.getRenderer=function(){return this.renderer_},r.prototype.setRenderer=function(t){this.renderer_=t},r.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},r.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},r.prototype.getGeometry=function(){return this.geometry_},r.prototype.getGeometryFunction=function(){return this.geometryFunction_},r.prototype.getFill=function(){return this.fill_},r.prototype.setFill=function(t){this.fill_=t},r.prototype.getImage=function(){return this.image_},r.prototype.setImage=function(t){this.image_=t},r.prototype.getStroke=function(){return this.stroke_},r.prototype.setStroke=function(t){this.stroke_=t},r.prototype.getText=function(){return this.text_},r.prototype.setText=function(t){this.text_=t},r.prototype.getZIndex=function(){return this.zIndex_},r.prototype.setGeometry=function(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=C8,this.geometry_=t},r.prototype.setZIndex=function(t){this.zIndex_=t},r}();function cX(r){var t;if(typeof r=="function")t=r;else{var e;if(Array.isArray(r))e=r;else{fa(typeof r.getZIndex=="function",41);var n=r;e=[n]}t=function(){return e}}return t}var A3=null;function dX(r,t){if(!A3){var e=new u1({color:"rgba(255,255,255,0.4)"}),n=new Dy({color:"#3399CC",width:1.25});A3=[new R0({image:new RL({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return A3}function C8(r){return r.getGeometry()}var hX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),b8={RENDER_ORDER:"renderOrder"},DL=function(r){hX(t,r);function t(e){var n=this,i=e||{},o=Zu({},i);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,n=r.call(this,o)||this,n.declutter_=i.declutter!==void 0?i.declutter:!1,n.renderBuffer_=i.renderBuffer!==void 0?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=i.updateWhileAnimating!==void 0?i.updateWhileAnimating:!1,n.updateWhileInteracting_=i.updateWhileInteracting!==void 0?i.updateWhileInteracting:!1,n}return t.prototype.getDeclutter=function(){return this.declutter_},t.prototype.getFeatures=function(e){return r.prototype.getFeatures.call(this,e)},t.prototype.getRenderBuffer=function(){return this.renderBuffer_},t.prototype.getRenderOrder=function(){return this.get(b8.RENDER_ORDER)},t.prototype.getStyle=function(){return this.style_},t.prototype.getStyleFunction=function(){return this.styleFunction_},t.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},t.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},t.prototype.renderDeclutter=function(e){e.declutterTree||(e.declutterTree=new PL(9)),this.getRenderer().renderDeclutter(e)},t.prototype.setRenderOrder=function(e){this.set(b8.RENDER_ORDER,e)},t.prototype.setStyle=function(e){this.style_=e!==void 0?e:dX,this.styleFunction_=e===null?void 0:cX(this.style_),this.changed()},t}(s2),Yi={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},$_=[Yi.FILL],Hm=[Yi.STROKE],Q0=[Yi.BEGIN_PATH],x8=[Yi.CLOSE_PATH],LL=function(){function r(){}return r.prototype.drawCustom=function(t,e,n,i){},r.prototype.drawGeometry=function(t){},r.prototype.setStyle=function(t){},r.prototype.drawCircle=function(t,e){},r.prototype.drawFeature=function(t,e){},r.prototype.drawGeometryCollection=function(t,e){},r.prototype.drawLineString=function(t,e){},r.prototype.drawMultiLineString=function(t,e){},r.prototype.drawMultiPoint=function(t,e){},r.prototype.drawMultiPolygon=function(t,e){},r.prototype.drawPoint=function(t,e){},r.prototype.drawPolygon=function(t,e){},r.prototype.drawText=function(t,e){},r.prototype.setFillStrokeStyle=function(t,e){},r.prototype.setImageStyle=function(t,e){},r.prototype.setTextStyle=function(t,e){},r}(),fX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Qv=function(r){fX(t,r);function t(e,n,i,o){var s=r.call(this)||this;return s.tolerance=e,s.maxExtent=n,s.pixelRatio=o,s.maxLineWidth=0,s.resolution=i,s.beginGeometryInstruction1_=null,s.beginGeometryInstruction2_=null,s.bufferedMaxExtent_=null,s.instructions=[],s.coordinates=[],s.tmpCoordinate_=[],s.hitDetectionInstructions=[],s.state={},s}return t.prototype.applyPixelRatio=function(e){var n=this.pixelRatio;return n==1?e:e.map(function(i){return i*n})},t.prototype.appendFlatPointCoordinates=function(e,n){for(var i=this.getBufferedMaxExtent(),o=this.tmpCoordinate_,s=this.coordinates,a=s.length,f=0,g=e.length;f<g;f+=n)o[0]=e[f],o[1]=e[f+1],jv(i,o)&&(s[a++]=o[0],s[a++]=o[1]);return a},t.prototype.appendFlatLineCoordinates=function(e,n,i,o,s,a){var f=this.coordinates,g=f.length,b=this.getBufferedMaxExtent();a&&(n+=o);var I=e[n],S=e[n+1],B=this.tmpCoordinate_,P=!0,U,j,q;for(U=n+o;U<i;U+=o)B[0]=e[U],B[1]=e[U+1],q=KS(b,B),q!==j?(P&&(f[g++]=I,f[g++]=S,P=!1),f[g++]=B[0],f[g++]=B[1]):q===ic.INTERSECTING?(f[g++]=B[0],f[g++]=B[1],P=!1):P=!0,I=B[0],S=B[1],j=q;return(s&&P||U===n+o)&&(f[g++]=I,f[g++]=S),g},t.prototype.drawCustomCoordinates_=function(e,n,i,o,s){for(var a=0,f=i.length;a<f;++a){var g=i[a],b=this.appendFlatLineCoordinates(e,n,g,o,!1,!1);s.push(b),n=g}return n},t.prototype.drawCustom=function(e,n,i,o){this.beginGeometry(e,n);var s=e.getType(),a=e.getStride(),f=this.coordinates.length,g,b,I,S,B;switch(s){case"MultiPolygon":g=e.getOrientedFlatCoordinates(),S=[];var P=e.getEndss();B=0;for(var U=0,j=P.length;U<j;++U){var q=[];B=this.drawCustomCoordinates_(g,B,P[U],a,q),S.push(q)}this.instructions.push([Yi.CUSTOM,f,S,e,i,NS]),this.hitDetectionInstructions.push([Yi.CUSTOM,f,S,e,o||i,NS]);break;case"Polygon":case"MultiLineString":I=[],g=s=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),B=this.drawCustomCoordinates_(g,0,e.getEnds(),a,I),this.instructions.push([Yi.CUSTOM,f,I,e,i,dv]),this.hitDetectionInstructions.push([Yi.CUSTOM,f,I,e,o||i,dv]);break;case"LineString":case"Circle":g=e.getFlatCoordinates(),b=this.appendFlatLineCoordinates(g,0,g.length,a,!1,!1),this.instructions.push([Yi.CUSTOM,f,b,e,i,Vm]),this.hitDetectionInstructions.push([Yi.CUSTOM,f,b,e,o||i,Vm]);break;case"MultiPoint":g=e.getFlatCoordinates(),b=this.appendFlatPointCoordinates(g,a),b>f&&(this.instructions.push([Yi.CUSTOM,f,b,e,i,Vm]),this.hitDetectionInstructions.push([Yi.CUSTOM,f,b,e,o||i,Vm]));break;case"Point":g=e.getFlatCoordinates(),this.coordinates.push(g[0],g[1]),b=this.coordinates.length,this.instructions.push([Yi.CUSTOM,f,b,e,i]),this.hitDetectionInstructions.push([Yi.CUSTOM,f,b,e,o||i]);break}this.endGeometry(n)},t.prototype.beginGeometry=function(e,n){this.beginGeometryInstruction1_=[Yi.BEGIN_GEOMETRY,n,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Yi.BEGIN_GEOMETRY,n,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},t.prototype.reverseHitDetectionInstructions=function(){var e=this.hitDetectionInstructions;e.reverse();var n,i=e.length,o,s,a=-1;for(n=0;n<i;++n)o=e[n],s=o[0],s==Yi.END_GEOMETRY?a=n:s==Yi.BEGIN_GEOMETRY&&(o[2]=n,y$(this.hitDetectionInstructions,a,n),a=-1)},t.prototype.setFillStrokeStyle=function(e,n){var i=this.state;if(e){var o=e.getColor();i.fillStyle=wp(o||pm)}else i.fillStyle=void 0;if(n){var s=n.getColor();i.strokeStyle=wp(s||gv);var a=n.getLineCap();i.lineCap=a!==void 0?a:rb;var f=n.getLineDash();i.lineDash=f?f.slice():fv;var g=n.getLineDashOffset();i.lineDashOffset=g||pv;var b=n.getLineJoin();i.lineJoin=b!==void 0?b:U1;var I=n.getWidth();i.lineWidth=I!==void 0?I:vv;var S=n.getMiterLimit();i.miterLimit=S!==void 0?S:mv,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},t.prototype.createFill=function(e){var n=e.fillStyle,i=[Yi.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(!0),i},t.prototype.applyStroke=function(e){this.instructions.push(this.createStroke(e))},t.prototype.createStroke=function(e){return[Yi.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]},t.prototype.updateFillStyle=function(e,n){var i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,e)),e.currentFillStyle=i)},t.prototype.updateStrokeStyle=function(e,n){var i=e.strokeStyle,o=e.lineCap,s=e.lineDash,a=e.lineDashOffset,f=e.lineJoin,g=e.lineWidth,b=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=o||s!=e.currentLineDash&&!lg(e.currentLineDash,s)||e.currentLineDashOffset!=a||e.currentLineJoin!=f||e.currentLineWidth!=g||e.currentMiterLimit!=b)&&(i!==void 0&&n.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=o,e.currentLineDash=s,e.currentLineDashOffset=a,e.currentLineJoin=f,e.currentLineWidth=g,e.currentMiterLimit=b)},t.prototype.endGeometry=function(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var n=[Yi.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)},t.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ND(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;t0(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t}(LL),pX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),mX=function(r){pX(t,r);function t(e,n,i,o){var s=r.call(this,e,n,i,o)||this;return s.hitDetectionImage_=null,s.image_=null,s.imagePixelRatio_=void 0,s.anchorX_=void 0,s.anchorY_=void 0,s.height_=void 0,s.opacity_=void 0,s.originX_=void 0,s.originY_=void 0,s.rotateWithView_=void 0,s.rotation_=void 0,s.scale_=void 0,s.width_=void 0,s.declutterMode_=void 0,s.declutterImageWithText_=void 0,s}return t.prototype.drawPoint=function(e,n){if(this.image_){this.beginGeometry(e,n);var i=e.getFlatCoordinates(),o=e.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(i,o);this.instructions.push([Yi.DRAW_IMAGE,s,a,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([Yi.DRAW_IMAGE,s,a,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(n)}},t.prototype.drawMultiPoint=function(e,n){if(this.image_){this.beginGeometry(e,n);var i=e.getFlatCoordinates(),o=e.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(i,o);this.instructions.push([Yi.DRAW_IMAGE,s,a,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([Yi.DRAW_IMAGE,s,a,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(n)}},t.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,r.prototype.finish.call(this)},t.prototype.setImageStyle=function(e,n){var i=e.getAnchor(),o=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=o[1],this.opacity_=e.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=o[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=n},t}(Qv),gX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),yX=function(r){gX(t,r);function t(e,n,i,o){return r.call(this,e,n,i,o)||this}return t.prototype.drawFlatCoordinates_=function(e,n,i,o){var s=this.coordinates.length,a=this.appendFlatLineCoordinates(e,n,i,o,!1,!1),f=[Yi.MOVE_TO_LINE_TO,s,a];return this.instructions.push(f),this.hitDetectionInstructions.push(f),i},t.prototype.drawLineString=function(e,n){var i=this.state,o=i.strokeStyle,s=i.lineWidth;if(!(o===void 0||s===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,n),this.hitDetectionInstructions.push([Yi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,fv,pv],Q0);var a=e.getFlatCoordinates(),f=e.getStride();this.drawFlatCoordinates_(a,0,a.length,f),this.hitDetectionInstructions.push(Hm),this.endGeometry(n)}},t.prototype.drawMultiLineString=function(e,n){var i=this.state,o=i.strokeStyle,s=i.lineWidth;if(!(o===void 0||s===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,n),this.hitDetectionInstructions.push([Yi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Q0);for(var a=e.getEnds(),f=e.getFlatCoordinates(),g=e.getStride(),b=0,I=0,S=a.length;I<S;++I)b=this.drawFlatCoordinates_(f,b,a[I],g);this.hitDetectionInstructions.push(Hm),this.endGeometry(n)}},t.prototype.finish=function(){var e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Hm),this.reverseHitDetectionInstructions(),this.state=null,r.prototype.finish.call(this)},t.prototype.applyStroke=function(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Hm),e.lastStroke=this.coordinates.length),e.lastStroke=0,r.prototype.applyStroke.call(this,e),this.instructions.push(Q0)},t}(Qv),vX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),w8=function(r){vX(t,r);function t(e,n,i,o){return r.call(this,e,n,i,o)||this}return t.prototype.drawFlatCoordinatess_=function(e,n,i,o){var s=this.state,a=s.fillStyle!==void 0,f=s.strokeStyle!==void 0,g=i.length;this.instructions.push(Q0),this.hitDetectionInstructions.push(Q0);for(var b=0;b<g;++b){var I=i[b],S=this.coordinates.length,B=this.appendFlatLineCoordinates(e,n,I,o,!0,!f),P=[Yi.MOVE_TO_LINE_TO,S,B];this.instructions.push(P),this.hitDetectionInstructions.push(P),f&&(this.instructions.push(x8),this.hitDetectionInstructions.push(x8)),n=I}return a&&(this.instructions.push($_),this.hitDetectionInstructions.push($_)),f&&(this.instructions.push(Hm),this.hitDetectionInstructions.push(Hm)),n},t.prototype.drawCircle=function(e,n){var i=this.state,o=i.fillStyle,s=i.strokeStyle;if(!(o===void 0&&s===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(e,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Yi.SET_FILL_STYLE,pm]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Yi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var a=e.getFlatCoordinates(),f=e.getStride(),g=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,f,!1,!1);var b=[Yi.CIRCLE,g];this.instructions.push(Q0,b),this.hitDetectionInstructions.push(Q0,b),i.fillStyle!==void 0&&(this.instructions.push($_),this.hitDetectionInstructions.push($_)),i.strokeStyle!==void 0&&(this.instructions.push(Hm),this.hitDetectionInstructions.push(Hm)),this.endGeometry(n)}},t.prototype.drawPolygon=function(e,n){var i=this.state,o=i.fillStyle,s=i.strokeStyle;if(!(o===void 0&&s===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(e,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Yi.SET_FILL_STYLE,pm]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Yi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var a=e.getEnds(),f=e.getOrientedFlatCoordinates(),g=e.getStride();this.drawFlatCoordinatess_(f,0,a,g),this.endGeometry(n)}},t.prototype.drawMultiPolygon=function(e,n){var i=this.state,o=i.fillStyle,s=i.strokeStyle;if(!(o===void 0&&s===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(e,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Yi.SET_FILL_STYLE,pm]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Yi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var a=e.getEndss(),f=e.getOrientedFlatCoordinates(),g=e.getStride(),b=0,I=0,S=a.length;I<S;++I)b=this.drawFlatCoordinatess_(f,b,a[I],g);this.endGeometry(n)}},t.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(e!==0)for(var n=this.coordinates,i=0,o=n.length;i<o;++i)n[i]=K0(n[i],e);return r.prototype.finish.call(this)},t.prototype.setFillStrokeStyles_=function(){var e=this.state,n=e.fillStyle;n!==void 0&&this.updateFillStyle(e,this.createFill),e.strokeStyle!==void 0&&this.updateStrokeStyle(e,this.applyStroke)},t}(Qv);const FL={POINT:"point",LINE:"line"};function _X(r,t,e,n,i){var o=e,s=e,a=0,f=0,g=e,b,I,S,B,P,U,j,q,W,ee;for(I=e;I<n;I+=i){var J=t[I],$=t[I+1];P!==void 0&&(W=J-P,ee=$-U,B=Math.sqrt(W*W+ee*ee),j!==void 0&&(f+=S,b=Math.acos((j*W+q*ee)/(S*B)),b>r&&(f>a&&(a=f,o=g,s=I),f=0,g=I-i)),S=B,j=W,q=ee),P=J,U=$}return f+=B,f>a?[g,I]:[o,s]}var CX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Zy={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},bX=function(r){CX(t,r);function t(e,n,i,o){var s=r.call(this,e,n,i,o)||this;return s.labels_=null,s.text_="",s.textOffsetX_=0,s.textOffsetY_=0,s.textRotateWithView_=void 0,s.textRotation_=0,s.textFillState_=null,s.fillStates={},s.textStrokeState_=null,s.strokeStates={},s.textState_={},s.textStates={},s.textKey_="",s.fillKey_="",s.strokeKey_="",s.declutterImageWithText_=void 0,s}return t.prototype.finish=function(){var e=r.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},t.prototype.drawText=function(e,n){var i=this.textFillState_,o=this.textStrokeState_,s=this.textState_;if(!(this.text_===""||!s||!i&&!o)){var a=this.coordinates,f=a.length,g=e.getType(),b=null,I=e.getStride();if(s.placement===FL.LINE&&(g=="LineString"||g=="MultiLineString"||g=="Polygon"||g=="MultiPolygon")){if(!Hu(this.getBufferedMaxExtent(),e.getExtent()))return;var S=void 0;if(b=e.getFlatCoordinates(),g=="LineString")S=[b.length];else if(g=="MultiLineString")S=e.getEnds();else if(g=="Polygon")S=e.getEnds().slice(0,1);else if(g=="MultiPolygon"){var B=e.getEndss();S=[];for(var P=0,U=B.length;P<U;++P)S.push(B[P][0])}this.beginGeometry(e,n);for(var j=s.textAlign,q=0,W=void 0,ee=0,J=S.length;ee<J;++ee){if(j==null){var $=_X(s.maxAngle,b,q,S[ee],I);q=$[0],W=$[1]}else W=S[ee];for(var P=q;P<W;P+=I)a.push(b[P],b[P+1]);var X=a.length;q=S[ee],this.drawChars_(f,X),f=X}this.endGeometry(n)}else{var G=s.overflow?null:[];switch(g){case"Point":case"MultiPoint":b=e.getFlatCoordinates();break;case"LineString":b=e.getFlatMidpoint();break;case"Circle":b=e.getCenter();break;case"MultiLineString":b=e.getFlatMidpoints(),I=2;break;case"Polygon":b=e.getFlatInteriorPoint(),s.overflow||G.push(b[2]/this.resolution),I=3;break;case"MultiPolygon":var ae=e.getFlatInteriorPoints();b=[];for(var P=0,U=ae.length;P<U;P+=3)s.overflow||G.push(ae[P+2]/this.resolution),b.push(ae[P],ae[P+1]);if(b.length===0)return;I=2;break}var X=this.appendFlatPointCoordinates(b,I);if(X===f)return;if(G&&(X-f)/2!==b.length/I){var ge=f/2;G=G.filter(function(je,et){var Ue=a[(ge+et)*2]===b[et*I]&&a[(ge+et)*2+1]===b[et*I+1];return Ue||--ge,Ue})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,n);var he=s.padding;if(he!=W0&&(s.scale[0]<0||s.scale[1]<0)){var Ie=s.padding[0],re=s.padding[1],oe=s.padding[2],Se=s.padding[3];s.scale[0]<0&&(re=-re,Se=-Se),s.scale[1]<0&&(Ie=-Ie,oe=-oe),he=[Ie,re,oe,Se]}var ye=this.pixelRatio;this.instructions.push([Yi.DRAW_IMAGE,f,X,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,he==W0?W0:he.map(function(je){return je*ye}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,G]);var nt=1/ye;this.hitDetectionInstructions.push([Yi.DRAW_IMAGE,f,X,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[nt,nt],NaN,void 0,this.declutterImageWithText_,he,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,G]),this.endGeometry(n)}}},t.prototype.saveTextStates_=function(){var e=this.textStrokeState_,n=this.textState_,i=this.textFillState_,o=this.strokeKey_;e&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));var s=this.textKey_;s in this.textStates||(this.textStates[s]={font:n.font,textAlign:n.textAlign||yv,justify:n.justify,textBaseline:n.textBaseline||ib,scale:n.scale});var a=this.fillKey_;i&&(a in this.fillStates||(this.fillStates[a]={fillStyle:i.fillStyle}))},t.prototype.drawChars_=function(e,n){var i=this.textStrokeState_,o=this.textState_,s=this.strokeKey_,a=this.textKey_,f=this.fillKey_;this.saveTextStates_();var g=this.pixelRatio,b=Zy[o.textBaseline],I=this.textOffsetY_*g,S=this.text_,B=i?i.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([Yi.DRAW_CHARS,e,n,b,o.overflow,f,o.maxAngle,g,I,s,B*g,S,a,1]),this.hitDetectionInstructions.push([Yi.DRAW_CHARS,e,n,b,o.overflow,f,o.maxAngle,1,I,s,B,S,a,1/g])},t.prototype.setTextStyle=function(e,n){var i,o,s;if(!e)this.text_="";else{var a=e.getFill();a?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=wp(a.getColor()||pm)):(o=null,this.textFillState_=o);var f=e.getStroke();if(!f)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);var g=f.getLineDash(),b=f.getLineDashOffset(),I=f.getWidth(),S=f.getMiterLimit();s.lineCap=f.getLineCap()||rb,s.lineDash=g?g.slice():fv,s.lineDashOffset=b===void 0?pv:b,s.lineJoin=f.getLineJoin()||U1,s.lineWidth=I===void 0?vv:I,s.miterLimit=S===void 0?mv:S,s.strokeStyle=wp(f.getColor()||gv)}i=this.textState_;var B=e.getFont()||vL;FH(B);var P=e.getScaleArray();i.overflow=e.getOverflow(),i.font=B,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||ib,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||W0,i.scale=P===void 0?[1,1]:P;var U=e.getOffsetX(),j=e.getOffsetY(),q=e.getRotateWithView(),W=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=U===void 0?0:U,this.textOffsetY_=j===void 0?0:j,this.textRotateWithView_=q===void 0?!1:q,this.textRotation_=W===void 0?0:W,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:Lo(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=o?typeof o.fillStyle=="string"?o.fillStyle:"|"+Lo(o.fillStyle):""}this.declutterImageWithText_=n},t}(Qv),xX={Circle:w8,Default:Qv,Image:mX,LineString:yX,Polygon:w8,Text:bX},sb=function(){function r(t,e,n,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}return r.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var i in n){var o=n[i].finish();t[e][i]=o}}return t},r.prototype.getBuilder=function(t,e){var n=t!==void 0?t.toString():"0",i=this.buildersByZIndex_[n];i===void 0&&(i={},this.buildersByZIndex_[n]=i);var o=i[e];if(o===void 0){var s=xX[e];o=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=o}return o},r}(),wX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),MX=function(r){wX(t,r);function t(e){var n=r.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return t.prototype.getFeatures=function(e){return Zi()},t.prototype.getData=function(e){return null},t.prototype.prepareFrame=function(e){return Zi()},t.prototype.renderFrame=function(e,n){return Zi()},t.prototype.loadedTileCallback=function(e,n,i){e[n]||(e[n]={}),e[n][i.tileCoord.toString()]=i},t.prototype.createLoadedTileFinder=function(e,n,i){return(function(o,s){var a=this.loadedTileCallback.bind(this,i,o);return e.forEachLoadedTile(n,o,s,a)}).bind(this)},t.prototype.forEachFeatureAtCoordinate=function(e,n,i,o,s){},t.prototype.getDataAtPixel=function(e,n,i){return null},t.prototype.getLayer=function(){return this.layer_},t.prototype.handleFontsChanged=function(){},t.prototype.handleImageChange_=function(e){var n=e.target;n.getState()===vl.LOADED&&this.renderIfReadyAndVisible()},t.prototype.loadImage=function(e){var n=e.getState();return n!=vl.LOADED&&n!=vl.ERROR&&e.addEventListener(_o.CHANGE,this.boundHandleImageChange_),n==vl.IDLE&&(e.load(),n=e.getState()),n==vl.LOADED},t.prototype.renderIfReadyAndVisible=function(){var e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()},t.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},t}(Uv),SX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),M8=[],r1=null;function EX(){var r=document.createElement("canvas");r.width=1,r.height=1,r1=r.getContext("2d")}var UL=function(r){SX(t,r);function t(e){var n=r.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=df(),n.pixelTransform=df(),n.inversePixelTransform=df(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return t.prototype.getImageData=function(e,n,i){r1||EX(),r1.clearRect(0,0,1,1);var o;try{r1.drawImage(e,n,i,1,1,0,0,1,1),o=r1.getImageData(0,0,1,1).data}catch{return r1=null,null}return o},t.prototype.getBackground=function(e){var n=this.getLayer(),i=n.getBackground();return typeof i=="function"&&(i=i(e.viewState.resolution)),i||void 0},t.prototype.useContainer=function(e,n,i){var o=this.getLayer().getClassName(),s,a;if(e&&e.className===o&&(!i||e&&e.style.backgroundColor&&lg(JC(e.style.backgroundColor),JC(i)))){var f=e.firstElementChild;f instanceof HTMLCanvasElement&&(a=f.getContext("2d"))}if(a&&a.canvas.style.transform===n?(this.container=e,this.context=a,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){s=document.createElement("div"),s.className=o;var g=s.style;g.position="absolute",g.width="100%",g.height="100%",a=lh();var f=a.canvas;s.appendChild(f),g=f.style,g.position="absolute",g.left="0",g.transformOrigin="top left",this.container=s,this.context=a}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)},t.prototype.clipUnrotated=function(e,n,i){var o=u0(i),s=s6(i),a=a6(i),f=o6(i);Vu(n.coordinateToPixelTransform,o),Vu(n.coordinateToPixelTransform,s),Vu(n.coordinateToPixelTransform,a),Vu(n.coordinateToPixelTransform,f);var g=this.inversePixelTransform;Vu(g,o),Vu(g,s),Vu(g,a),Vu(g,f),e.save(),e.beginPath(),e.moveTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.lineTo(Math.round(f[0]),Math.round(f[1])),e.clip()},t.prototype.dispatchRenderEvent_=function(e,n,i){var o=this.getLayer();if(o.hasListener(e)){var s=new mL(e,this.inversePixelTransform,i,n);o.dispatchEvent(s)}},t.prototype.preRender=function(e,n){this.frameState=n,this.dispatchRenderEvent_(r0.PRERENDER,e,n)},t.prototype.postRender=function(e,n){this.dispatchRenderEvent_(r0.POSTRENDER,e,n)},t.prototype.getRenderTransform=function(e,n,i,o,s,a,f){var g=s/2,b=a/2,I=o/n,S=-I,B=-e[0]+f,P=-e[1];return Op(this.tempTransform,g,b,I,S,-i,B,P)},t.prototype.getDataAtPixel=function(e,n,i){var o=Vu(this.inversePixelTransform,e.slice()),s=this.context,a=this.getLayer(),f=a.getExtent();if(f){var g=Vu(n.pixelToCoordinateTransform,e.slice());if(!jv(f,g))return null}var b=Math.round(o[0]),I=Math.round(o[1]),S=this.pixelContext_;if(!S){var B=document.createElement("canvas");B.width=1,B.height=1,S=B.getContext("2d"),this.pixelContext_=S}S.clearRect(0,0,1,1);var P;try{S.drawImage(s.canvas,b,I,1,1,0,0,1,1),P=S.getImageData(0,0,1,1).data}catch(U){return U.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):P}return P[3]===0?null:P},t.prototype.disposeInternal=function(){delete this.frameState,r.prototype.disposeInternal.call(this)},t}(MX);function OX(r,t,e,n,i,o,s,a,f,g,b,I){var S=r[t],B=r[t+1],P=0,U=0,j=0,q=0;function W(){P=S,U=B,t+=n,S=r[t],B=r[t+1],q+=j,j=Math.sqrt((S-P)*(S-P)+(B-U)*(B-U))}do W();while(t<e-n&&q+j<o);for(var ee=j===0?0:(o-q)/j,J=um(P,S,ee),$=um(U,B,ee),X=t-n,G=q,ae=o+a*f(g,i,b);t<e-n&&q+j<ae;)W();ee=j===0?0:(ae-q)/j;var ge=um(P,S,ee),he=um(U,B,ee),Ie;if(I){var re=[J,$,ge,he];XD(re,0,4,2,I,re,re),Ie=re[0]>re[2]}else Ie=J>ge;var oe=Math.PI,Se=[],ye=X+n===t;t=X,j=0,q=G,S=r[t],B=r[t+1];var nt;if(ye){W(),nt=Math.atan2(B-U,S-P),Ie&&(nt+=nt>0?-oe:oe);var Ne=(ge+J)/2,je=(he+$)/2;return Se[0]=[Ne,je,(ae-o)/2,nt,i],Se}i=i.replace(/\n/g," ");for(var et=0,Ue=i.length;et<Ue;){W();var ke=Math.atan2(B-U,S-P);if(Ie&&(ke+=ke>0?-oe:oe),nt!==void 0){var We=ke-nt;if(We+=We>oe?-2*oe:We<-oe?2*oe:0,Math.abs(We)>s)return null}nt=ke;for(var vt=et,Pt=0;et<Ue;++et){var ut=Ie?Ue-et-1:et,jt=a*f(g,i[ut],b);if(t+n<e&&q+j<o+Pt+jt/2)break;Pt+=jt}if(et!==vt){var Rt=Ie?i.substring(Ue-vt,Ue-et):i.substring(vt,et);ee=j===0?0:(o+Pt/2-q)/j;var Ne=um(P,S,ee),je=um(U,B,ee);Se.push([Ne,je,Pt/2,ke,Rt]),o+=Pt}}return Se}var kg=hf(),Fm=[],rm=[],im=[],Um=[];function S8(r){return r[3].declutterBox}var BX=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function E8(r,t){return(t==="start"||t==="end")&&!BX.test(r)&&(t=t==="start"?"left":"right"),Zy[t]}function IX(r,t,e){return e>0&&r.push(`
|
||
`,""),r.push(t,""),r}var kX=function(){function r(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=df(),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 r.prototype.createLabel=function(t,e,n,i){var o=t+e+n+i;if(this.labels_[o])return this.labels_[o];var s=i?this.strokeStates[i]:null,a=n?this.fillStates[n]:null,f=this.textStates[e],g=this.pixelRatio,b=[f.scale[0]*g,f.scale[1]*g],I=Array.isArray(t),S=f.justify?Zy[f.justify]:E8(Array.isArray(t)?t[0]:t,f.textAlign||yv),B=i&&s.lineWidth?s.lineWidth:0,P=I?t:t.split(`
|
||
`).reduce(IX,[]),U=jH(f,P),j=U.width,q=U.height,W=U.widths,ee=U.heights,J=U.lineWidths,$=j+B,X=[],G=($+2)*b[0],ae=(q+B)*b[1],ge={width:G<0?Math.floor(G):Math.ceil(G),height:ae<0?Math.floor(ae):Math.ceil(ae),contextInstructions:X};if((b[0]!=1||b[1]!=1)&&X.push("scale",b),i){X.push("strokeStyle",s.strokeStyle),X.push("lineWidth",B),X.push("lineCap",s.lineCap),X.push("lineJoin",s.lineJoin),X.push("miterLimit",s.miterLimit);var he=n2?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;he.prototype.setLineDash&&(X.push("setLineDash",[s.lineDash]),X.push("lineDashOffset",s.lineDashOffset))}n&&X.push("fillStyle",a.fillStyle),X.push("textBaseline","middle"),X.push("textAlign","center");for(var Ie=.5-S,re=S*$+Ie*B,oe=[],Se=[],ye=0,nt=0,Ne=0,je=0,et,Ue=0,ke=P.length;Ue<ke;Ue+=2){var We=P[Ue];if(We===`
|
||
`){nt+=ye,ye=0,re=S*$+Ie*B,++je;continue}var vt=P[Ue+1]||f.font;vt!==et&&(i&&oe.push("font",vt),n&&Se.push("font",vt),et=vt),ye=Math.max(ye,ee[Ne]);var Pt=[We,re+Ie*W[Ne]+S*(W[Ne]-J[je]),.5*(B+ye)+nt];re+=W[Ne],i&&oe.push("strokeText",Pt),n&&Se.push("fillText",Pt),++Ne}return Array.prototype.push.apply(X,oe),Array.prototype.push.apply(X,Se),this.labels_[o]=ge,ge},r.prototype.replayTextBackground_=function(t,e,n,i,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,o),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},r.prototype.calculateImageOrLabelDimensions_=function(t,e,n,i,o,s,a,f,g,b,I,S,B,P,U,j){a*=S[0],f*=S[1];var q=n-a,W=i-f,ee=o+g>t?t-g:o,J=s+b>e?e-b:s,$=P[3]+ee*S[0]+P[1],X=P[0]+J*S[1]+P[2],G=q-P[3],ae=W-P[0];(U||I!==0)&&(Fm[0]=G,Um[0]=G,Fm[1]=ae,rm[1]=ae,rm[0]=G+$,im[0]=rm[0],im[1]=ae+X,Um[1]=im[1]);var ge;return I!==0?(ge=Op(df(),n,i,1,1,I,-n,-i),Vu(ge,Fm),Vu(ge,rm),Vu(ge,im),Vu(ge,Um),Bp(Math.min(Fm[0],rm[0],im[0],Um[0]),Math.min(Fm[1],rm[1],im[1],Um[1]),Math.max(Fm[0],rm[0],im[0],Um[0]),Math.max(Fm[1],rm[1],im[1],Um[1]),kg)):Bp(Math.min(G,G+$),Math.min(ae,ae+X),Math.max(G,G+$),Math.max(ae,ae+X),kg),B&&(q=Math.round(q),W=Math.round(W)),{drawImageX:q,drawImageY:W,drawImageW:ee,drawImageH:J,originX:g,originY:b,declutterBox:{minX:kg[0],minY:kg[1],maxX:kg[2],maxY:kg[3],value:j},canvasTransform:ge,scale:S}},r.prototype.replayImageOrLabel_=function(t,e,n,i,o,s,a){var f=!!(s||a),g=i.declutterBox,b=t.canvas,I=a?a[2]*i.scale[0]/2:0,S=g.minX-I<=b.width/e&&g.maxX+I>=0&&g.minY-I<=b.height/e&&g.maxY+I>=0;return S&&(f&&this.replayTextBackground_(t,Fm,rm,im,Um,s,a),zH(t,i.canvasTransform,o,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},r.prototype.fill_=function(t){if(this.alignFill_){var e=Vu(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},r.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},r.prototype.drawLabelWithPointPlacement_=function(t,e,n,i){var o=this.textStates[e],s=this.createLabel(t,e,i,n),a=this.strokeStates[n],f=this.pixelRatio,g=E8(Array.isArray(t)?t[0]:t,o.textAlign||yv),b=Zy[o.textBaseline||ib],I=a&&a.lineWidth?a.lineWidth:0,S=s.width/f-2*o.scale[0],B=g*S+2*(.5-g)*I,P=b*s.height/f+2*(.5-b)*I;return{label:s,anchorX:B,anchorY:P}},r.prototype.execute_=function(t,e,n,i,o,s,a,f){var g;this.pixelCoordinates_&&lg(n,this.renderedTransform_)?g=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),g=n0(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),K$(this.renderedTransform_,n));for(var b=0,I=i.length,S=0,B,P,U,j,q,W,ee,J,$,X,G,ae,ge=0,he=0,Ie=null,re=null,oe=this.coordinateCache_,Se=this.viewRotation_,ye=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,nt={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:Se},Ne=this.instructions!=i||this.overlaps?0:200,je,et,Ue,ke;b<I;){var We=i[b],vt=We[0];switch(vt){case Yi.BEGIN_GEOMETRY:je=We[1],ke=We[3],je.getGeometry()?a!==void 0&&!Hu(a,ke.getExtent())?b=We[2]+1:++b:b=We[2];break;case Yi.BEGIN_PATH:ge>Ne&&(this.fill_(t),ge=0),he>Ne&&(t.stroke(),he=0),!ge&&!he&&(t.beginPath(),j=NaN,q=NaN),++b;break;case Yi.CIRCLE:S=We[1];var Pt=g[S],ut=g[S+1],jt=g[S+2],Rt=g[S+3],Ke=jt-Pt,we=Rt-ut,Fe=Math.sqrt(Ke*Ke+we*we);t.moveTo(Pt+Fe,ut),t.arc(Pt,ut,Fe,0,2*Math.PI,!0),++b;break;case Yi.CLOSE_PATH:t.closePath(),++b;break;case Yi.CUSTOM:S=We[1],B=We[2];var tt=We[3],mt=We[4],bt=We.length==6?We[5]:void 0;nt.geometry=tt,nt.feature=je,b in oe||(oe[b]=[]);var Lt=oe[b];bt?bt(g,S,B,2,Lt):(Lt[0]=g[S],Lt[1]=g[S+1],Lt.length=2),mt(Lt,nt),++b;break;case Yi.DRAW_IMAGE:S=We[1],B=We[2],J=We[3],P=We[4],U=We[5];var Vt=We[6],rn=We[7],Sn=We[8],Ar=We[9],Bn=We[10],ar=We[11],Cr=We[12],br=We[13],_r=We[14],Jr=We[15];if(!J&&We.length>=20){$=We[19],X=We[20],G=We[21],ae=We[22];var wr=this.drawLabelWithPointPlacement_($,X,G,ae);J=wr.label,We[3]=J;var hi=We[23];P=(wr.anchorX-hi)*this.pixelRatio,We[4]=P;var Ye=We[24];U=(wr.anchorY-Ye)*this.pixelRatio,We[5]=U,Vt=J.height,We[6]=Vt,br=J.width,We[13]=br}var de=void 0;We.length>25&&(de=We[25]);var pe=void 0,Je=void 0,kt=void 0;We.length>17?(pe=We[16],Je=We[17],kt=We[18]):(pe=W0,Je=!1,kt=!1),Bn&&ye?ar+=Se:!Bn&&!ye&&(ar-=Se);for(var Xt=0;S<B;S+=2)if(!(de&&de[Xt++]<br/this.pixelRatio)){var it=this.calculateImageOrLabelDimensions_(J.width,J.height,g[S],g[S+1],br,Vt,P,U,Sn,Ar,ar,Cr,o,pe,Je||kt,je),Ut=[t,e,J,it,rn,Je?Ie:null,kt?re:null];if(f){if(_r==="none")continue;if(_r==="obstacle"){f.insert(it.declutterBox);continue}else{var qe=void 0,fe=void 0;if(Jr){var xe=B-S;if(!Jr[xe]){Jr[xe]=Ut;continue}if(qe=Jr[xe],delete Jr[xe],fe=S8(qe),f.collides(fe))continue}if(f.collides(it.declutterBox))continue;qe&&(f.insert(fe),this.replayImageOrLabel_.apply(this,qe)),f.insert(it.declutterBox)}}this.replayImageOrLabel_.apply(this,Ut)}++b;break;case Yi.DRAW_CHARS:var p=We[1],Qe=We[2],pt=We[3],ft=We[4];ae=We[5];var Et=We[6],Ct=We[7],nn=We[8];G=We[9];var Yt=We[10];$=We[11],X=We[12];var Gt=[We[13],We[13]],wt=this.textStates[X],Tn=wt.font,En=[wt.scale[0]*Ct,wt.scale[1]*Ct],sr=void 0;Tn in this.widths_?sr=this.widths_[Tn]:(sr={},this.widths_[Tn]=sr);var Pr=oL(g,p,Qe,2),an=Math.abs(En[0])*h8(Tn,$,sr);if(ft||an<=Pr){var Wn=this.textStates[X].textAlign,ir=(Pr-an)*Zy[Wn],zr=OX(g,p,Qe,2,$,ir,Et,Math.abs(En[0]),h8,Tn,sr,ye?0:this.viewRotation_);e:if(zr){var fr=[],hr=void 0,zn=void 0,Pi=void 0,po=void 0,ri=void 0;if(G)for(hr=0,zn=zr.length;hr<zn;++hr){ri=zr[hr],Pi=ri[4],po=this.createLabel(Pi,X,"",G),P=ri[2]+(En[0]<0?-Yt:Yt),U=pt*po.height+(.5-pt)*2*Yt*En[1]/En[0]-nn;var it=this.calculateImageOrLabelDimensions_(po.width,po.height,ri[0],ri[1],po.width,po.height,P,U,0,0,ri[3],Gt,!1,W0,!1,je);if(f&&f.collides(it.declutterBox))break e;fr.push([t,e,po,it,1,null,null])}if(ae)for(hr=0,zn=zr.length;hr<zn;++hr){ri=zr[hr],Pi=ri[4],po=this.createLabel(Pi,X,ae,""),P=ri[2],U=pt*po.height-nn;var it=this.calculateImageOrLabelDimensions_(po.width,po.height,ri[0],ri[1],po.width,po.height,P,U,0,0,ri[3],Gt,!1,W0,!1,je);if(f&&f.collides(it.declutterBox))break e;fr.push([t,e,po,it,1,null,null])}f&&f.load(fr.map(S8));for(var Xr=0,ii=fr.length;Xr<ii;++Xr)this.replayImageOrLabel_.apply(this,fr[Xr])}}++b;break;case Yi.END_GEOMETRY:if(s!==void 0){je=We[1];var mo=s(je,ke);if(mo)return mo}++b;break;case Yi.FILL:Ne?ge++:this.fill_(t),++b;break;case Yi.MOVE_TO_LINE_TO:for(S=We[1],B=We[2],et=g[S],Ue=g[S+1],W=et+.5|0,ee=Ue+.5|0,(W!==j||ee!==q)&&(t.moveTo(et,Ue),j=W,q=ee),S+=2;S<B;S+=2)et=g[S],Ue=g[S+1],W=et+.5|0,ee=Ue+.5|0,(S==B-2||W!==j||ee!==q)&&(t.lineTo(et,Ue),j=W,q=ee);++b;break;case Yi.SET_FILL_STYLE:Ie=We,this.alignFill_=We[2],ge&&(this.fill_(t),ge=0,he&&(t.stroke(),he=0)),t.fillStyle=We[1],++b;break;case Yi.SET_STROKE_STYLE:re=We,he&&(t.stroke(),he=0),this.setStrokeStyle_(t,We),++b;break;case Yi.STROKE:Ne?he++:t.stroke(),++b;break;default:++b;break}}ge&&this.fill_(t),he&&t.stroke()},r.prototype.execute=function(t,e,n,i,o,s){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,o,void 0,void 0,s)},r.prototype.executeHitDetection=function(t,e,n,i,o){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,o)},r}(),c3=["Polygon","Circle","LineString","Image","Text","Default"],lb=function(){function r(t,e,n,i,o,s){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=df(),this.createExecutors_(o)}return r.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},r.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);var i=t[e];for(var o in i){var s=i[o];n[o]=new kX(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}},r.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],i=0,o=t.length;i<o;++i)if(t[i]in n)return!0;return!1},r.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o,s){i=Math.round(i);var a=i*2+1,f=Op(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),g=!this.hitDetectionContext_;g&&(this.hitDetectionContext_=lh(a,a));var b=this.hitDetectionContext_;b.canvas.width!==a||b.canvas.height!==a?(b.canvas.width=a,b.canvas.height=a):g||b.clearRect(0,0,a,a);var I;this.renderBuffer_!==void 0&&(I=hf(),Hy(I,t),t0(I,e*(this.renderBuffer_+i),I));var S=TX(i),B;function P(X,G){for(var ae=b.getImageData(0,0,a,a).data,ge=0,he=S.length;ge<he;ge++)if(ae[S[ge]]>0){if(!s||B!=="Image"&&B!=="Text"||s.indexOf(X)!==-1){var Ie=(S[ge]-3)/4,re=i-Ie%a,oe=i-(Ie/a|0),Se=o(X,G,re*re+oe*oe);if(Se)return Se}b.clearRect(0,0,a,a);break}}var U=Object.keys(this.executorsByZIndex_).map(Number);U.sort(D1);var j,q,W,ee,J;for(j=U.length-1;j>=0;--j){var $=U[j].toString();for(W=this.executorsByZIndex_[$],q=c3.length-1;q>=0;--q)if(B=c3[q],ee=W[B],ee!==void 0&&(J=ee.executeHitDetection(b,f,n,P,I),J))return J}},r.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],o=e[2],s=e[3],a=[n,i,n,s,o,s,o,i];return n0(a,0,8,2,t,a),a},r.prototype.isEmpty=function(){return rg(this.executorsByZIndex_)},r.prototype.execute=function(t,e,n,i,o,s,a){var f=Object.keys(this.executorsByZIndex_).map(Number);f.sort(D1),this.maxExtent_&&(t.save(),this.clip(t,n));var g=s||c3,b,I,S,B,P,U;for(a&&f.reverse(),b=0,I=f.length;b<I;++b){var j=f[b].toString();for(P=this.executorsByZIndex_[j],S=0,B=g.length;S<B;++S){var q=g[S];U=P[q],U!==void 0&&U.execute(t,e,n,i,o,a)}}this.maxExtent_&&t.restore()},r}(),d3={};function TX(r){if(d3[r]!==void 0)return d3[r];for(var t=r*2+1,e=r*r,n=new Array(e+1),i=0;i<=r;++i)for(var o=0;o<=r;++o){var s=i*i+o*o;if(s>e)break;var a=n[s];a||(a=[],n[s]=a),a.push(((r+i)*t+(r+o))*4+3),i>0&&a.push(((r-i)*t+(r+o))*4+3),o>0&&(a.push(((r+i)*t+(r-o))*4+3),i>0&&a.push(((r-i)*t+(r-o))*4+3))}for(var f=[],i=0,g=n.length;i<g;++i)n[i]&&f.push.apply(f,n[i]);return d3[r]=f,f}var PX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),KX=function(r){PX(t,r);function t(e,n,i,o,s,a,f){var g=r.call(this)||this;return g.context_=e,g.pixelRatio_=n,g.extent_=i,g.transform_=o,g.viewRotation_=s,g.squaredTolerance_=a,g.userTransform_=f,g.contextFillState_=null,g.contextStrokeState_=null,g.contextTextState_=null,g.fillState_=null,g.strokeState_=null,g.image_=null,g.imageAnchorX_=0,g.imageAnchorY_=0,g.imageHeight_=0,g.imageOpacity_=0,g.imageOriginX_=0,g.imageOriginY_=0,g.imageRotateWithView_=!1,g.imageRotation_=0,g.imageScale_=[0,0],g.imageWidth_=0,g.text_="",g.textOffsetX_=0,g.textOffsetY_=0,g.textRotateWithView_=!1,g.textRotation_=0,g.textScale_=[0,0],g.textFillState_=null,g.textStrokeState_=null,g.textState_=null,g.pixelCoordinates_=[],g.tmpLocalTransform_=df(),g}return t.prototype.drawImages_=function(e,n,i,o){if(this.image_){var s=n0(e,n,i,o,this.transform_,this.pixelCoordinates_),a=this.context_,f=this.tmpLocalTransform_,g=a.globalAlpha;this.imageOpacity_!=1&&(a.globalAlpha=g*this.imageOpacity_);var b=this.imageRotation_;this.imageRotateWithView_&&(b+=this.viewRotation_);for(var I=0,S=s.length;I<S;I+=2){var B=s[I]-this.imageAnchorX_,P=s[I+1]-this.imageAnchorY_;if(b!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var U=B+this.imageAnchorX_,j=P+this.imageAnchorY_;Op(f,U,j,1,1,b,-U,-j),a.setTransform.apply(a,f),a.translate(U,j),a.scale(this.imageScale_[0],this.imageScale_[1]),a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),a.setTransform(1,0,0,1,0,0)}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,B,P,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(a.globalAlpha=g)}},t.prototype.drawText_=function(e,n,i,o){if(!(!this.textState_||this.text_==="")){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var s=n0(e,n,i,o,this.transform_,this.pixelCoordinates_),a=this.context_,f=this.textRotation_;for(this.textRotateWithView_&&(f+=this.viewRotation_);n<i;n+=o){var g=s[n]+this.textOffsetX_,b=s[n+1]+this.textOffsetY_;if(f!==0||this.textScale_[0]!=1||this.textScale_[1]!=1){var I=Op(this.tmpLocalTransform_,g,b,1,1,f,-g,-b);a.setTransform.apply(a,I),a.translate(g,b),a.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&a.strokeText(this.text_,0,0),this.textFillState_&&a.fillText(this.text_,0,0),a.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&a.strokeText(this.text_,g,b),this.textFillState_&&a.fillText(this.text_,g,b)}}},t.prototype.moveToLineTo_=function(e,n,i,o,s){var a=this.context_,f=n0(e,n,i,o,this.transform_,this.pixelCoordinates_);a.moveTo(f[0],f[1]);var g=f.length;s&&(g-=2);for(var b=2;b<g;b+=2)a.lineTo(f[b],f[b+1]);return s&&a.closePath(),i},t.prototype.drawRings_=function(e,n,i,o){for(var s=0,a=i.length;s<a;++s)n=this.moveToLineTo_(e,n,i[s],o,!0);return n},t.prototype.drawCircle=function(e){if(Hu(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=MV(e,this.transform_,this.pixelCoordinates_),i=n[2]-n[0],o=n[3]-n[1],s=Math.sqrt(i*i+o*o),a=this.context_;a.beginPath(),a.arc(n[0],n[1],s,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}},t.prototype.setStyle=function(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())},t.prototype.setTransform=function(e){this.transform_=e},t.prototype.drawGeometry=function(e){var n=e.getType();switch(n){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e);break}},t.prototype.drawFeature=function(e,n){var i=n.getGeometryFunction()(e);!i||!Hu(this.extent_,i.getExtent())||(this.setStyle(n),this.drawGeometry(i))},t.prototype.drawGeometryCollection=function(e){for(var n=e.getGeometriesArray(),i=0,o=n.length;i<o;++i)this.drawGeometry(n[i])},t.prototype.drawPoint=function(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(n,0,n.length,i),this.text_!==""&&this.drawText_(n,0,n.length,i)},t.prototype.drawMultiPoint=function(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(n,0,n.length,i),this.text_!==""&&this.drawText_(n,0,n.length,i)},t.prototype.drawLineString=function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Hu(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=e.getFlatCoordinates();n.beginPath(),this.moveToLineTo_(i,0,i.length,e.getStride(),!1),n.stroke()}if(this.text_!==""){var o=e.getFlatMidpoint();this.drawText_(o,0,2,2)}}},t.prototype.drawMultiLineString=function(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=e.getExtent();if(Hu(this.extent_,n)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,o=e.getFlatCoordinates(),s=0,a=e.getEnds(),f=e.getStride();i.beginPath();for(var g=0,b=a.length;g<b;++g)s=this.moveToLineTo_(o,s,a[g],f,!1);i.stroke()}if(this.text_!==""){var I=e.getFlatMidpoints();this.drawText_(I,0,I.length,2)}}},t.prototype.drawPolygon=function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Hu(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=this.context_;n.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){var i=e.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},t.prototype.drawMultiPolygon=function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Hu(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=e.getOrientedFlatCoordinates(),o=0,s=e.getEndss(),a=e.getStride();n.beginPath();for(var f=0,g=s.length;f<g;++f){var b=s[f];o=this.drawRings_(i,o,b,a)}this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){var I=e.getFlatInteriorPoints();this.drawText_(I,0,I.length,2)}}},t.prototype.setContextFillState_=function(e){var n=this.context_,i=this.contextFillState_;i?i.fillStyle!=e.fillStyle&&(i.fillStyle=e.fillStyle,n.fillStyle=e.fillStyle):(n.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})},t.prototype.setContextStrokeState_=function(e){var n=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=e.lineCap&&(i.lineCap=e.lineCap,n.lineCap=e.lineCap),n.setLineDash&&(lg(i.lineDash,e.lineDash)||n.setLineDash(i.lineDash=e.lineDash),i.lineDashOffset!=e.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset,n.lineDashOffset=e.lineDashOffset)),i.lineJoin!=e.lineJoin&&(i.lineJoin=e.lineJoin,n.lineJoin=e.lineJoin),i.lineWidth!=e.lineWidth&&(i.lineWidth=e.lineWidth,n.lineWidth=e.lineWidth),i.miterLimit!=e.miterLimit&&(i.miterLimit=e.miterLimit,n.miterLimit=e.miterLimit),i.strokeStyle!=e.strokeStyle&&(i.strokeStyle=e.strokeStyle,n.strokeStyle=e.strokeStyle)):(n.lineCap=e.lineCap,n.setLineDash&&(n.setLineDash(e.lineDash),n.lineDashOffset=e.lineDashOffset),n.lineJoin=e.lineJoin,n.lineWidth=e.lineWidth,n.miterLimit=e.miterLimit,n.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})},t.prototype.setContextTextState_=function(e){var n=this.context_,i=this.contextTextState_,o=e.textAlign?e.textAlign:yv;i?(i.font!=e.font&&(i.font=e.font,n.font=e.font),i.textAlign!=o&&(i.textAlign=o,n.textAlign=o),i.textBaseline!=e.textBaseline&&(i.textBaseline=e.textBaseline,n.textBaseline=e.textBaseline)):(n.font=e.font,n.textAlign=o,n.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:o,textBaseline:e.textBaseline})},t.prototype.setFillStrokeStyle=function(e,n){var i=this;if(!e)this.fillState_=null;else{var o=e.getColor();this.fillState_={fillStyle:wp(o||pm)}}if(!n)this.strokeState_=null;else{var s=n.getColor(),a=n.getLineCap(),f=n.getLineDash(),g=n.getLineDashOffset(),b=n.getLineJoin(),I=n.getWidth(),S=n.getMiterLimit(),B=f||fv;this.strokeState_={lineCap:a!==void 0?a:rb,lineDash:this.pixelRatio_===1?B:B.map(function(P){return P*i.pixelRatio_}),lineDashOffset:(g||pv)*this.pixelRatio_,lineJoin:b!==void 0?b:U1,lineWidth:(I!==void 0?I:vv)*this.pixelRatio_,miterLimit:S!==void 0?S:mv,strokeStyle:wp(s||gv)}}},t.prototype.setImageStyle=function(e){var n;if(!e||!(n=e.getSize())){this.image_=null;return}var i=e.getAnchor(),o=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=n[1]*this.pixelRatio_,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation(),this.imageScale_=e.getScaleArray(),this.imageWidth_=n[0]*this.pixelRatio_},t.prototype.setTextStyle=function(e){if(!e)this.text_="";else{var n=e.getFill();if(!n)this.textFillState_=null;else{var i=n.getColor();this.textFillState_={fillStyle:wp(i||pm)}}var o=e.getStroke();if(!o)this.textStrokeState_=null;else{var s=o.getColor(),a=o.getLineCap(),f=o.getLineDash(),g=o.getLineDashOffset(),b=o.getLineJoin(),I=o.getWidth(),S=o.getMiterLimit();this.textStrokeState_={lineCap:a!==void 0?a:rb,lineDash:f||fv,lineDashOffset:g||pv,lineJoin:b!==void 0?b:U1,lineWidth:I!==void 0?I:vv,miterLimit:S!==void 0?S:mv,strokeStyle:wp(s||gv)}}var B=e.getFont(),P=e.getOffsetX(),U=e.getOffsetY(),j=e.getRotateWithView(),q=e.getRotation(),W=e.getScaleArray(),ee=e.getText(),J=e.getTextAlign(),$=e.getTextBaseline();this.textState_={font:B!==void 0?B:vL,textAlign:J!==void 0?J:yv,textBaseline:$!==void 0?$:ib},this.text_=ee!==void 0?Array.isArray(ee)?ee.reduce(function(X,G,ae){return X+=ae%2?" ":G},""):ee:"",this.textOffsetX_=P!==void 0?this.pixelRatio_*P:0,this.textOffsetY_=U!==void 0?this.pixelRatio_*U:0,this.textRotateWithView_=j!==void 0?j:!1,this.textRotation_=q!==void 0?q:0,this.textScale_=[this.pixelRatio_*W[0],this.pixelRatio_*W[1]]}},t}(LL);const qm={FRACTION:"fraction",PIXELS:"pixels"},nf={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var RX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),DX=function(r){RX(t,r);function t(e,n,i,o){var s=r.call(this)||this;return s.extent=e,s.pixelRatio_=i,s.resolution=n,s.state=o,s}return t.prototype.changed=function(){this.dispatchEvent(_o.CHANGE)},t.prototype.getExtent=function(){return this.extent},t.prototype.getImage=function(){return Zi()},t.prototype.getPixelRatio=function(){return this.pixelRatio_},t.prototype.getResolution=function(){return this.resolution},t.prototype.getState=function(){return this.state},t.prototype.load=function(){Zi()},t}($1),LX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){LX(t,r);function t(e,n,i,o,s,a){var f=r.call(this,e,n,i,vl.IDLE)||this;return f.src_=o,f.image_=new Image,s!==null&&(f.image_.crossOrigin=s),f.unlisten_=null,f.state=vl.IDLE,f.imageLoadFunction_=a,f}return t.prototype.getImage=function(){return this.image_},t.prototype.handleImageError_=function(){this.state=vl.ERROR,this.unlistenImage_(),this.changed()},t.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=sh(this.extent)/this.image_.height),this.state=vl.LOADED,this.unlistenImage_(),this.changed()},t.prototype.load=function(){(this.state==vl.IDLE||this.state==vl.ERROR)&&(this.state=vl.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=R6(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},t.prototype.setImage=function(e){this.image_=e,this.resolution=sh(this.extent)/this.image_.height},t.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},t})(DX);function R6(r,t,e){var n=r,i=!0,o=!1,s=!1,a=[YC(n,_o.LOAD,function(){s=!0,o||t()})];return n.src&&P$?(o=!0,n.decode().then(function(){i&&t()}).catch(function(f){i&&(s?t():e())})):a.push(YC(n,_o.ERROR,e)),function(){i=!1,a.forEach(_l)}}var FX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Cy=null,UX=function(r){FX(t,r);function t(e,n,i,o,s,a){var f=r.call(this)||this;return f.hitDetectionImage_=null,f.image_=e||new Image,o!==null&&(f.image_.crossOrigin=o),f.canvas_={},f.color_=a,f.unlisten_=null,f.imageState_=s,f.size_=i,f.src_=n,f.tainted_,f}return t.prototype.isTainted_=function(){if(this.tainted_===void 0&&this.imageState_===vl.LOADED){Cy||(Cy=lh(1,1)),Cy.drawImage(this.image_,0,0);try{Cy.getImageData(0,0,1,1),this.tainted_=!1}catch{Cy=null,this.tainted_=!0}}return this.tainted_===!0},t.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(_o.CHANGE)},t.prototype.handleImageError_=function(){this.imageState_=vl.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},t.prototype.handleImageLoad_=function(){this.imageState_=vl.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_()},t.prototype.getImage=function(e){return this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_},t.prototype.getPixelRatio=function(e){return this.replaceColor_(e),this.canvas_[e]?e:1},t.prototype.getImageState=function(){return this.imageState_},t.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var e=this.size_[0],n=this.size_[1],i=lh(e,n);i.fillRect(0,0,e,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t.prototype.getSize=function(){return this.size_},t.prototype.getSrc=function(){return this.src_},t.prototype.load=function(){if(this.imageState_==vl.IDLE){this.imageState_=vl.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=R6(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},t.prototype.replaceColor_=function(e){if(!(!this.color_||this.canvas_[e]||this.imageState_!==vl.LOADED)){var n=document.createElement("canvas");this.canvas_[e]=n,n.width=Math.ceil(this.image_.width*e),n.height=Math.ceil(this.image_.height*e);var i=n.getContext("2d");if(i.scale(e,e),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply",i.globalCompositeOperation==="multiply"||this.isTainted_())i.fillStyle=hL(this.color_),i.fillRect(0,0,n.width/e,n.height/e),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var o=i.getImageData(0,0,n.width,n.height),s=o.data,a=this.color_[0]/255,f=this.color_[1]/255,g=this.color_[2]/255,b=this.color_[3],I=0,S=s.length;I<S;I+=4)s[I]*=a,s[I+1]*=f,s[I+2]*=g,s[I+3]*=b;i.putImageData(o,0,0)}}},t.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},t}($1);function jX(r,t,e,n,i,o){var s=eb.get(t,n,o);return s||(s=new UX(r,t,e,n,i,o),eb.set(t,n,o,s)),s}var zX=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),jL=function(r){zX(t,r);function t(e){var n=this,i=e||{},o=i.opacity!==void 0?i.opacity:1,s=i.rotation!==void 0?i.rotation:0,a=i.scale!==void 0?i.scale:1,f=i.rotateWithView!==void 0?i.rotateWithView:!1;n=r.call(this,{opacity:o,rotation:s,scale:a,displacement:i.displacement!==void 0?i.displacement:[0,0],rotateWithView:f,declutterMode:i.declutterMode})||this,n.anchor_=i.anchor!==void 0?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=i.anchorOrigin!==void 0?i.anchorOrigin:nf.TOP_LEFT,n.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:qm.FRACTION,n.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:qm.FRACTION,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null;var g=i.img!==void 0?i.img:null;n.imgSize_=i.imgSize;var b=i.src;fa(!(b!==void 0&&g),4),fa(!g||g&&n.imgSize_,5),(b===void 0||b.length===0)&&g&&(b=g.src||Lo(g)),fa(b!==void 0&&b.length>0,6);var I=i.src!==void 0?vl.IDLE:vl.LOADED;return n.color_=i.color!==void 0?JC(i.color):null,n.iconImage_=jX(g,b,n.imgSize_!==void 0?n.imgSize_:null,n.crossOrigin_,I,n.color_),n.offset_=i.offset!==void 0?i.offset:[0,0],n.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:nf.TOP_LEFT,n.origin_=null,n.size_=i.size!==void 0?i.size:null,n}return t.prototype.clone=function(){var e=this.getScale();return new t({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(e)?e.slice():e,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},t.prototype.getAnchor=function(){var e=this.normalizedAnchor_;if(!e){e=this.anchor_;var n=this.getSize();if(this.anchorXUnits_==qm.FRACTION||this.anchorYUnits_==qm.FRACTION){if(!n)return null;e=this.anchor_.slice(),this.anchorXUnits_==qm.FRACTION&&(e[0]*=n[0]),this.anchorYUnits_==qm.FRACTION&&(e[1]*=n[1])}if(this.anchorOrigin_!=nf.TOP_LEFT){if(!n)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_==nf.TOP_RIGHT||this.anchorOrigin_==nf.BOTTOM_RIGHT)&&(e[0]=-e[0]+n[0]),(this.anchorOrigin_==nf.BOTTOM_LEFT||this.anchorOrigin_==nf.BOTTOM_RIGHT)&&(e[1]=-e[1]+n[1])}this.normalizedAnchor_=e}var i=this.getDisplacement();return[e[0]-i[0],e[1]+i[1]]},t.prototype.setAnchor=function(e){this.anchor_=e,this.normalizedAnchor_=null},t.prototype.getColor=function(){return this.color_},t.prototype.getImage=function(e){return this.iconImage_.getImage(e)},t.prototype.getPixelRatio=function(e){return this.iconImage_.getPixelRatio(e)},t.prototype.getImageSize=function(){return this.iconImage_.getSize()},t.prototype.getImageState=function(){return this.iconImage_.getImageState()},t.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},t.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var e=this.offset_;if(this.offsetOrigin_!=nf.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;e=e.slice(),(this.offsetOrigin_==nf.TOP_RIGHT||this.offsetOrigin_==nf.BOTTOM_RIGHT)&&(e[0]=i[0]-n[0]-e[0]),(this.offsetOrigin_==nf.BOTTOM_LEFT||this.offsetOrigin_==nf.BOTTOM_RIGHT)&&(e[1]=i[1]-n[1]-e[1])}return this.origin_=e,this.origin_},t.prototype.getSrc=function(){return this.iconImage_.getSrc()},t.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t.prototype.listenImageChange=function(e){this.iconImage_.addEventListener(_o.CHANGE,e)},t.prototype.load=function(){this.iconImage_.load()},t.prototype.unlistenImageChange=function(e){this.iconImage_.removeEventListener(_o.CHANGE,e)},t}(KL),NX="#333",GX=function(){function r(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=Td(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new u1({color:NX}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:FL.POINT,this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding}return r.prototype.clone=function(){var t=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,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})},r.prototype.getOverflow=function(){return this.overflow_},r.prototype.getFont=function(){return this.font_},r.prototype.getMaxAngle=function(){return this.maxAngle_},r.prototype.getPlacement=function(){return this.placement_},r.prototype.getOffsetX=function(){return this.offsetX_},r.prototype.getOffsetY=function(){return this.offsetY_},r.prototype.getFill=function(){return this.fill_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getStroke=function(){return this.stroke_},r.prototype.getText=function(){return this.text_},r.prototype.getTextAlign=function(){return this.textAlign_},r.prototype.getJustify=function(){return this.justify_},r.prototype.getTextBaseline=function(){return this.textBaseline_},r.prototype.getBackgroundFill=function(){return this.backgroundFill_},r.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},r.prototype.getPadding=function(){return this.padding_},r.prototype.setOverflow=function(t){this.overflow_=t},r.prototype.setFont=function(t){this.font_=t},r.prototype.setMaxAngle=function(t){this.maxAngle_=t},r.prototype.setOffsetX=function(t){this.offsetX_=t},r.prototype.setOffsetY=function(t){this.offsetY_=t},r.prototype.setPlacement=function(t){this.placement_=t},r.prototype.setRotateWithView=function(t){this.rotateWithView_=t},r.prototype.setFill=function(t){this.fill_=t},r.prototype.setRotation=function(t){this.rotation_=t},r.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Td(t!==void 0?t:1)},r.prototype.setStroke=function(t){this.stroke_=t},r.prototype.setText=function(t){this.text_=t},r.prototype.setTextAlign=function(t){this.textAlign_=t},r.prototype.setJustify=function(t){this.justify_=t},r.prototype.setTextBaseline=function(t){this.textBaseline_=t},r.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},r.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},r.prototype.setPadding=function(t){this.padding_=t},r}(),Kh=.5;function zL(r,t,e,n,i,o,s){var a=r[0]*Kh,f=r[1]*Kh,g=lh(a,f);g.imageSmoothingEnabled=!1;for(var b=g.canvas,I=new KX(g,Kh,i,null,s),S=e.length,B=Math.floor((256*256*256-1)/S),P={},U=1;U<=S;++U){var j=e[U-1],q=j.getStyleFunction()||n;if(n){var W=q(j,o);if(W){Array.isArray(W)||(W=[W]);for(var ee=U*B,J="#"+("000000"+ee.toString(16)).slice(-6),$=0,X=W.length;$<X;++$){var G=W[$],ae=G.getGeometryFunction()(j);if(!(!ae||!Hu(i,ae.getExtent()))){var ge=G.clone(),he=ge.getFill();he&&he.setColor(J);var Ie=ge.getStroke();Ie&&(Ie.setColor(J),Ie.setLineDash(null)),ge.setText(void 0);var re=G.getImage();if(re&&re.getOpacity()!==0){var oe=re.getImageSize();if(!oe)continue;var Se=lh(oe[0],oe[1],void 0,{alpha:!1}),ye=Se.canvas;Se.fillStyle=J,Se.fillRect(0,0,ye.width,ye.height),ge.setImage(new jL({img:ye,imgSize:oe,anchor:re.getAnchor(),anchorXUnits:qm.PIXELS,anchorYUnits:qm.PIXELS,offset:re.getOrigin(),opacity:1,size:re.getSize(),scale:re.getScale(),rotation:re.getRotation(),rotateWithView:re.getRotateWithView()}))}var nt=ge.getZIndex()||0,Ne=P[nt];Ne||(Ne={},P[nt]=Ne,Ne.Polygon=[],Ne.Circle=[],Ne.LineString=[],Ne.Point=[]),Ne[ae.getType().replace("Multi","")].push(ae,ge)}}}}}for(var je=Object.keys(P).map(Number).sort(D1),U=0,et=je.length;U<et;++U){var Ne=P[je[U]];for(var Ue in Ne)for(var ke=Ne[Ue],$=0,X=ke.length;$<X;$+=2){I.setStyle(ke[$+1]);for(var We=0,vt=t.length;We<vt;++We)I.setTransform(t[We]),I.drawGeometry(ke[$])}}return g.getImageData(0,0,b.width,b.height)}function NL(r,t,e){var n=[];if(e){var i=Math.floor(Math.round(r[0])*Kh),o=Math.floor(Math.round(r[1])*Kh),s=(hA(i,0,e.width-1)+hA(o,0,e.height-1)*e.width)*4,a=e.data[s],f=e.data[s+1],g=e.data[s+2],b=g+256*(f+256*a),I=Math.floor((256*256*256-1)/t.length);b&&b%I===0&&n.push(t[b/I-1])}return n}var WX=.5,GL={Point:XX,LineString:VX,Polygon:eJ,MultiPoint:JX,MultiLineString:HX,MultiPolygon:ZX,GeometryCollection:$X,Circle:qX};function QX(r,t){return parseInt(Lo(r),10)-parseInt(Lo(t),10)}function WL(r,t){var e=XS(r,t);return e*e}function XS(r,t){return WX*r/t}function qX(r,t,e,n,i){var o=e.getFill(),s=e.getStroke();if(o||s){var a=r.getBuilder(e.getZIndex(),"Circle");a.setFillStrokeStyle(o,s),a.drawCircle(t,n)}var f=e.getText();if(f&&f.getText()){var g=(i||r).getBuilder(e.getZIndex(),"Text");g.setTextStyle(f),g.drawText(t,n)}}function ub(r,t,e,n,i,o,s){var a=!1,f=e.getImage();if(f){var g=f.getImageState();g==vl.LOADED||g==vl.ERROR?f.unlistenImageChange(i):(g==vl.IDLE&&f.load(),f.listenImageChange(i),a=!0)}return YX(r,t,e,n,o,s),a}function YX(r,t,e,n,i,o){var s=e.getGeometryFunction()(t);if(s){var a=s.simplifyTransformed(n,i),f=e.getRenderer();if(f)QL(r,a,e,t);else{var g=GL[a.getType()];g(r,a,e,t,o)}}}function QL(r,t,e,n){if(t.getType()=="GeometryCollection"){for(var i=t.getGeometries(),o=0,s=i.length;o<s;++o)QL(r,i[o],e,n);return}var a=r.getBuilder(e.getZIndex(),"Default");a.drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function $X(r,t,e,n,i){var o=t.getGeometriesArray(),s,a;for(s=0,a=o.length;s<a;++s){var f=GL[o[s].getType()];f(r,o[s],e,n,i)}}function VX(r,t,e,n,i){var o=e.getStroke();if(o){var s=r.getBuilder(e.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(t,n)}var a=e.getText();if(a&&a.getText()){var f=(i||r).getBuilder(e.getZIndex(),"Text");f.setTextStyle(a),f.drawText(t,n)}}function HX(r,t,e,n,i){var o=e.getStroke();if(o){var s=r.getBuilder(e.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(t,n)}var a=e.getText();if(a&&a.getText()){var f=(i||r).getBuilder(e.getZIndex(),"Text");f.setTextStyle(a),f.drawText(t,n)}}function ZX(r,t,e,n,i){var o=e.getFill(),s=e.getStroke();if(s||o){var a=r.getBuilder(e.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawMultiPolygon(t,n)}var f=e.getText();if(f&&f.getText()){var g=(i||r).getBuilder(e.getZIndex(),"Text");g.setTextStyle(f),g.drawText(t,n)}}function XX(r,t,e,n,i){var o=e.getImage(),s=e.getText(),a;if(o){if(o.getImageState()!=vl.LOADED)return;var f=r;if(i){var g=o.getDeclutterMode();if(g!=="none")if(f=i,g==="obstacle"){var b=r.getBuilder(e.getZIndex(),"Image");b.setImageStyle(o,a),b.drawPoint(t,n)}else s&&s.getText()&&(a={})}var I=f.getBuilder(e.getZIndex(),"Image");I.setImageStyle(o,a),I.drawPoint(t,n)}if(s&&s.getText()){var S=r;i&&(S=i);var B=S.getBuilder(e.getZIndex(),"Text");B.setTextStyle(s,a),B.drawText(t,n)}}function JX(r,t,e,n,i){var o=e.getImage(),s=e.getText(),a;if(o){if(o.getImageState()!=vl.LOADED)return;var f=r;if(i){var g=o.getDeclutterMode();if(g!=="none")if(f=i,g==="obstacle"){var b=r.getBuilder(e.getZIndex(),"Image");b.setImageStyle(o,a),b.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}var I=f.getBuilder(e.getZIndex(),"Image");I.setImageStyle(o,a),I.drawMultiPoint(t,n)}if(s&&s.getText()){var S=r;i&&(S=i);var B=S.getBuilder(e.getZIndex(),"Text");B.setTextStyle(s,a),B.drawText(t,n)}}function eJ(r,t,e,n,i){var o=e.getFill(),s=e.getStroke();if(o||s){var a=r.getBuilder(e.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawPolygon(t,n)}var f=e.getText();if(f&&f.getText()){var g=(i||r).getBuilder(e.getZIndex(),"Text");g.setTextStyle(f),g.drawText(t,n)}}var tJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),nJ=function(r){tJ(t,r);function t(e){var n=r.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=hf(),n.wrappedRenderedExtent_=hf(),n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n.compositionContext_=null,n.opacity_=1,n}return t.prototype.renderWorlds=function(e,n,i){var o=n.extent,s=n.viewState,a=s.center,f=s.resolution,g=s.projection,b=s.rotation,I=g.getExtent(),S=this.getLayer().getSource(),B=n.pixelRatio,P=n.viewHints,U=!(P[xu.ANIMATING]||P[xu.INTERACTING]),j=this.compositionContext_,q=Math.round(n.size[0]*B),W=Math.round(n.size[1]*B),ee=S.getWrapX()&&g.canWrapX(),J=ee?Pl(I):null,$=ee?Math.ceil((o[2]-I[2])/J)+1:1,X=ee?Math.floor((o[0]-I[0])/J):0;do{var G=this.getRenderTransform(a,f,b,B,q,W,X*J);e.execute(j,1,G,b,U,void 0,i)}while(++X<$)},t.prototype.setupCompositionContext_=function(){if(this.opacity_!==1){var e=lh(this.context.canvas.width,this.context.canvas.height,M8);this.compositionContext_=e}else this.compositionContext_=this.context},t.prototype.releaseCompositionContext_=function(){if(this.opacity_!==1){var e=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=e,E6(this.compositionContext_),M8.push(this.compositionContext_.canvas),this.compositionContext_=null}},t.prototype.renderDeclutter=function(e){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree),this.releaseCompositionContext_())},t.prototype.renderFrame=function(e,n){var i=e.pixelRatio,o=e.layerStatesArray[e.layerIndex];R$(this.pixelTransform,1/i,1/i),n6(this.inversePixelTransform,this.pixelTransform);var s=zD(this.pixelTransform);this.useContainer(n,s,this.getBackground(e));var a=this.context,f=a.canvas,g=this.replayGroup_,b=this.declutterExecutorGroup;if((!g||g.isEmpty())&&(!b||b.isEmpty()))return null;var I=Math.round(e.size[0]*i),S=Math.round(e.size[1]*i);f.width!=I||f.height!=S?(f.width=I,f.height=S,f.style.transform!==s&&(f.style.transform=s)):this.containerReused||a.clearRect(0,0,I,S),this.preRender(a,e);var B=e.viewState;B.projection,this.opacity_=o.opacity,this.setupCompositionContext_();var P=!1,U=!0;if(o.extent&&this.clipping){var j=N0(o.extent);U=Hu(j,e.extent),P=U&&!$m(j,e.extent),P&&this.clipUnrotated(this.compositionContext_,e,j)}return U&&this.renderWorlds(g,e),P&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(a,e),this.renderedRotation_!==B.rotation&&(this.renderedRotation_=B.rotation,this.hitDetectionImageData_=null),this.container},t.prototype.getFeatures=function(e){return new Promise((function(n){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];Vu(this.pixelTransform,i);var o=this.renderedCenter_,s=this.renderedResolution_,a=this.renderedRotation_,f=this.renderedProjection_,g=this.wrappedRenderedExtent_,b=this.getLayer(),I=[],S=i[0]*Kh,B=i[1]*Kh;I.push(this.getRenderTransform(o,s,a,Kh,S,B,0).slice());var P=b.getSource(),U=f.getExtent();if(P.getWrapX()&&f.canWrapX()&&!$m(U,g)){for(var j=g[0],q=Pl(U),W=0,ee=void 0;j<U[0];)--W,ee=q*W,I.push(this.getRenderTransform(o,s,a,Kh,S,B,ee).slice()),j+=q;for(W=0,j=g[2];j>U[2];)++W,ee=q*W,I.push(this.getRenderTransform(o,s,a,Kh,S,B,ee).slice()),j-=q}this.hitDetectionImageData_=zL(i,I,this.renderedFeatures_,b.getStyleFunction(),g,s,a)}n(NL(e,this.renderedFeatures_,this.hitDetectionImageData_))}).bind(this))},t.prototype.forEachFeatureAtCoordinate=function(e,n,i,o,s){var a=this;if(this.replayGroup_){var f=n.viewState.resolution,g=n.viewState.rotation,b=this.getLayer(),I={},S=function(U,j,q){var W=Lo(U),ee=I[W];if(ee){if(ee!==!0&&q<ee.distanceSq){if(q===0)return I[W]=!0,s.splice(s.lastIndexOf(ee),1),o(U,b,j);ee.geometry=j,ee.distanceSq=q}}else{if(q===0)return I[W]=!0,o(U,b,j);s.push(I[W]={feature:U,layer:b,geometry:j,distanceSq:q,callback:o})}},B,P=[this.replayGroup_];return this.declutterExecutorGroup&&P.push(this.declutterExecutorGroup),P.some(function(U){return B=U.forEachFeatureAtCoordinate(e,f,g,i,S,U===a.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map(function(j){return j.value}):null)}),B}},t.prototype.handleFontsChanged=function(){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},t.prototype.handleStyleImageChange_=function(e){this.renderIfReadyAndVisible()},t.prototype.prepareFrame=function(e){var n=this.getLayer(),i=n.getSource();if(!i)return!1;var o=e.viewHints[xu.ANIMATING],s=e.viewHints[xu.INTERACTING],a=n.getUpdateWhileAnimating(),f=n.getUpdateWhileInteracting();if(this.ready&&!a&&o||!f&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var g=e.extent,b=e.viewState,I=b.projection,S=b.resolution,B=e.pixelRatio,P=n.getRevision(),U=n.getRenderBuffer(),j=n.getRenderOrder();j===void 0&&(j=QX);var q=b.center.slice(),W=t0(g,U*S),ee=W.slice(),J=[W.slice()],$=I.getExtent();if(i.getWrapX()&&I.canWrapX()&&!$m($,e.extent)){var X=Pl($),G=Math.max(Pl(W)/2,X);W[0]=$[0]-G,W[2]=$[2]+G,c6(q,I);var ae=YD(J[0],I);ae[0]<$[0]&&ae[2]<$[2]?J.push([ae[0]+X,ae[1],ae[2]+X,ae[3]]):ae[0]>$[0]&&ae[2]>$[2]&&J.push([ae[0]-X,ae[1],ae[2]-X,ae[3]])}if(this.ready&&this.renderedResolution_==S&&this.renderedRevision_==P&&this.renderedRenderOrder_==j&&$m(this.wrappedRenderedExtent_,W))return lg(this.renderedExtent_,ee)||(this.hitDetectionImageData_=null,this.renderedExtent_=ee),this.renderedCenter_=q,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var ge=new sb(XS(S,B),W,S,B),he;this.getLayer().getDeclutter()&&(he=new sb(XS(S,B),W,S,B));for(var Ie,re,oe,re=0,oe=J.length;re<oe;++re)i.loadFeatures(J[re],S,I);var Se=WL(S,B),ye=!0,nt=(function(ke){var We,vt=ke.getStyleFunction()||n.getStyleFunction();if(vt&&(We=vt(ke,S)),We){var Pt=this.renderFeature(ke,Se,We,ge,Ie,he);ye=ye&&!Pt}}).bind(this),Ne=ZD(W),je=i.getFeaturesInExtent(Ne);j&&je.sort(j);for(var re=0,oe=je.length;re<oe;++re)nt(je[re]);this.renderedFeatures_=je,this.ready=ye;var et=ge.finish(),Ue=new lb(W,S,B,i.getOverlaps(),et,n.getRenderBuffer());return he&&(this.declutterExecutorGroup=new lb(W,S,B,i.getOverlaps(),he.finish(),n.getRenderBuffer())),this.renderedResolution_=S,this.renderedRevision_=P,this.renderedRenderOrder_=j,this.renderedExtent_=ee,this.wrappedRenderedExtent_=W,this.renderedCenter_=q,this.renderedProjection_=I,this.replayGroup_=Ue,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},t.prototype.renderFeature=function(e,n,i,o,s,a){if(!i)return!1;var f=!1;if(Array.isArray(i))for(var g=0,b=i.length;g<b;++g)f=ub(o,e,i[g],n,this.boundHandleStyleImageChange_,s,a)||f;else f=ub(o,e,i,n,this.boundHandleStyleImageChange_,s,a);return f},t}(UL),rJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),qL=function(r){rJ(t,r);function t(e){return r.call(this,e)||this}return t.prototype.createRenderer=function(){return new nJ(this)},t}(DL),O8=function(){function r(t){this.rbush_=new PL(t),this.items_={}}return r.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[Lo(e)]=n},r.prototype.load=function(t,e){for(var n=new Array(e.length),i=0,o=e.length;i<o;i++){var s=t[i],a=e[i],f={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[i]=f,this.items_[Lo(a)]=f}this.rbush_.load(n)},r.prototype.remove=function(t){var e=Lo(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null},r.prototype.update=function(t,e){var n=this.items_[Lo(e)],i=[n.minX,n.minY,n.maxX,n.maxY];L1(i,t)||(this.remove(e),this.insert(t,e))},r.prototype.getAll=function(){var t=this.rbush_.all();return t.map(function(e){return e.value})},r.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]},n=this.rbush_.search(e);return n.map(function(i){return i.value})},r.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},r.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},r.prototype.forEach_=function(t,e){for(var n,i=0,o=t.length;i<o;i++)if(n=e(t[i]),n)return n;return n},r.prototype.isEmpty=function(){return rg(this.items_)},r.prototype.clear=function(){this.rbush_.clear(),this.items_={}},r.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Bp(e.minX,e.minY,e.maxX,e.maxY,t)},r.prototype.concat=function(t){this.rbush_.load(t.rbush_.all());for(var e in t.items_)this.items_[e]=t.items_[e]},r}(),iJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),YL=function(r){iJ(t,r);function t(e){var n=r.call(this)||this;n.projection=ou(e.projection),n.attributions_=B8(e.attributions),n.attributionsCollapsible_=e.attributionsCollapsible!==void 0?e.attributionsCollapsible:!0,n.loading=!1,n.state_=e.state!==void 0?e.state:"ready",n.wrapX_=e.wrapX!==void 0?e.wrapX:!1,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise(function(o,s){i.viewResolver=o,i.viewRejector=s}),n}return t.prototype.getAttributions=function(){return this.attributions_},t.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},t.prototype.getProjection=function(){return this.projection},t.prototype.getResolutions=function(){return Zi()},t.prototype.getView=function(){return this.viewPromise_},t.prototype.getState=function(){return this.state_},t.prototype.getWrapX=function(){return this.wrapX_},t.prototype.getInterpolate=function(){return this.interpolate_},t.prototype.refresh=function(){this.changed()},t.prototype.setAttributions=function(e){this.attributions_=B8(e),this.changed()},t.prototype.setState=function(e){this.state_=e,this.changed()},t}(Yf);function B8(r){return r?Array.isArray(r)?function(t){return r}:typeof r=="function"?r:function(t){return[r]}:null}const Ff={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function oJ(r,t){return[[-1/0,-1/0,1/0,1/0]]}var aJ=!1;function $L(r,t,e,n,i,o,s){var a=new XMLHttpRequest;a.open("GET",typeof r=="function"?r(e,n,i):r,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=aJ,a.onload=function(f){if(!a.status||a.status>=200&&a.status<300){var g=t.getType(),b=void 0;g=="json"||g=="text"?b=a.responseText:g=="xml"?(b=a.responseXML,b||(b=new DOMParser().parseFromString(a.responseText,"application/xml"))):g=="arraybuffer"&&(b=a.response),b?o(t.readFeatures(b,{extent:e,featureProjection:i}),t.readProjection(b)):s()}else s()},a.onerror=s,a.send()}function I8(r,t){return function(e,n,i,o,s){var a=this;$L(r,t,e,n,i,function(f,g){a.addFeatures(f),o!==void 0&&o(f)},s||ng)}}var VL=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),jm=function(r){VL(t,r);function t(e,n,i){var o=r.call(this,e)||this;return o.feature=n,o.features=i,o}return t}(_m),HL=function(r){VL(t,r);function t(e){var n=this,i=e||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=ng,n.format_=i.format,n.overlaps_=i.overlaps===void 0?!0:i.overlaps,n.url_=i.url,i.loader!==void 0?n.loader_=i.loader:n.url_!==void 0&&(fa(n.format_,7),n.loader_=I8(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:oJ;var o=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=o?new O8:null,n.loadedExtentsRtree_=new O8,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null;var s,a;return Array.isArray(i.features)?a=i.features:i.features&&(s=i.features,a=s.getArray()),!o&&s===void 0&&(s=new Af(a)),a!==void 0&&n.addFeaturesInternal(a),s!==void 0&&n.bindFeaturesCollection_(s),n}return t.prototype.addFeature=function(e){this.addFeatureInternal(e),this.changed()},t.prototype.addFeatureInternal=function(e){var n=Lo(e);if(!this.addToIndex_(n,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(n,e);var i=e.getGeometry();if(i){var o=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,e)}else this.nullGeometryFeatures_[n]=e;this.dispatchEvent(new jm(Ff.ADDFEATURE,e))},t.prototype.setupChangeEvents_=function(e,n){this.featureChangeKeys_[e]=[Ia(n,_o.CHANGE,this.handleFeatureChange_,this),Ia(n,R1.PROPERTYCHANGE,this.handleFeatureChange_,this)]},t.prototype.addToIndex_=function(e,n){var i=!0,o=n.getId();return o!==void 0&&(o.toString()in this.idIndex_?i=!1:this.idIndex_[o.toString()]=n),i&&(fa(!(e in this.uidIndex_),30),this.uidIndex_[e]=n),i},t.prototype.addFeatures=function(e){this.addFeaturesInternal(e),this.changed()},t.prototype.addFeaturesInternal=function(e){for(var n=[],i=[],o=[],s=0,a=e.length;s<a;s++){var f=e[s],g=Lo(f);this.addToIndex_(g,f)&&i.push(f)}for(var s=0,b=i.length;s<b;s++){var f=i[s],g=Lo(f);this.setupChangeEvents_(g,f);var I=f.getGeometry();if(I){var S=I.getExtent();n.push(S),o.push(f)}else this.nullGeometryFeatures_[g]=f}if(this.featuresRtree_&&this.featuresRtree_.load(n,o),this.hasListener(Ff.ADDFEATURE))for(var s=0,B=i.length;s<B;s++)this.dispatchEvent(new jm(Ff.ADDFEATURE,i[s]))},t.prototype.bindFeaturesCollection_=function(e){var n=!1;this.addEventListener(Ff.ADDFEATURE,function(i){n||(n=!0,e.push(i.feature),n=!1)}),this.addEventListener(Ff.REMOVEFEATURE,function(i){n||(n=!0,e.remove(i.feature),n=!1)}),e.addEventListener(ah.ADD,(function(i){n||(n=!0,this.addFeature(i.element),n=!1)}).bind(this)),e.addEventListener(ah.REMOVE,(function(i){n||(n=!0,this.removeFeature(i.element),n=!1)}).bind(this)),this.featuresCollection_=e},t.prototype.clear=function(e){if(e){for(var n in this.featureChangeKeys_){var i=this.featureChangeKeys_[n];i.forEach(_l)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var o=(function(f){this.removeFeatureInternal(f)}).bind(this);this.featuresRtree_.forEach(o);for(var s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var a=new jm(Ff.CLEAR);this.dispatchEvent(a),this.changed()},t.prototype.forEachFeature=function(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},t.prototype.forEachFeatureAtCoordinateDirect=function(e,n){var i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(o){var s=o.getGeometry();if(s.intersectsCoordinate(e))return n(o)})},t.prototype.forEachFeatureInExtent=function(e,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)},t.prototype.forEachFeatureIntersectingExtent=function(e,n){return this.forEachFeatureInExtent(e,function(i){var o=i.getGeometry();if(o.intersectsExtent(e)){var s=n(i);if(s)return s}})},t.prototype.getFeaturesCollection=function(){return this.featuresCollection_},t.prototype.getFeatures=function(){var e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),rg(this.nullGeometryFeatures_)||Ep(e,RD(this.nullGeometryFeatures_))),e},t.prototype.getFeaturesAtCoordinate=function(e){var n=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){n.push(i)}),n},t.prototype.getFeaturesInExtent=function(e,n){var i=this;if(this.featuresRtree_){var o=n&&n.canWrapX()&&this.getWrapX();if(!o)return this.featuresRtree_.getInExtent(e);var s=W$(e,n);return[].concat.apply([],s.map(function(a){return i.featuresRtree_.getInExtent(a)}))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},t.prototype.getClosestFeatureToCoordinate=function(e,n){var i=e[0],o=e[1],s=null,a=[NaN,NaN],f=1/0,g=[-1/0,-1/0,1/0,1/0],b=n||_1;return this.featuresRtree_.forEachInExtent(g,function(I){if(b(I)){var S=I.getGeometry(),B=f;if(f=S.closestPointXY(i,o,a,f),f<B){s=I;var P=Math.sqrt(f);g[0]=i-P,g[1]=o-P,g[2]=i+P,g[3]=o+P}}}),s},t.prototype.getExtent=function(e){return this.featuresRtree_.getExtent(e)},t.prototype.getFeatureById=function(e){var n=this.idIndex_[e.toString()];return n!==void 0?n:null},t.prototype.getFeatureByUid=function(e){var n=this.uidIndex_[e];return n!==void 0?n:null},t.prototype.getFormat=function(){return this.format_},t.prototype.getOverlaps=function(){return this.overlaps_},t.prototype.getUrl=function(){return this.url_},t.prototype.handleFeatureChange_=function(e){var n=e.target,i=Lo(n),o=n.getGeometry();if(!o)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(n),this.nullGeometryFeatures_[i]=n);else{var s=o.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(s,n)):this.featuresRtree_&&this.featuresRtree_.update(s,n)}var a=n.getId();if(a!==void 0){var f=a.toString();this.idIndex_[f]!==n&&(this.removeFromIdIndex_(n),this.idIndex_[f]=n)}else this.removeFromIdIndex_(n),this.uidIndex_[i]=n;this.changed(),this.dispatchEvent(new jm(Ff.CHANGEFEATURE,n))},t.prototype.hasFeature=function(e){var n=e.getId();return n!==void 0?n in this.idIndex_:Lo(e)in this.uidIndex_},t.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&rg(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0},t.prototype.loadFeatures=function(e,n,i){for(var o=this.loadedExtentsRtree_,s=this.strategy_(e,n,i),a=function(I,S){var B=s[I],P=o.forEachInExtent(B,function(U){return $m(U.extent,B)});P||(++f.loadingExtentsCount_,f.dispatchEvent(new jm(Ff.FEATURESLOADSTART)),f.loader_.call(f,B,n,i,(function(U){--this.loadingExtentsCount_,this.dispatchEvent(new jm(Ff.FEATURESLOADEND,void 0,U))}).bind(f),(function(){--this.loadingExtentsCount_,this.dispatchEvent(new jm(Ff.FEATURESLOADERROR))}).bind(f)),o.insert(B,{extent:B.slice()}))},f=this,g=0,b=s.length;g<b;++g)a(g);this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0},t.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),r.prototype.refresh.call(this)},t.prototype.removeLoadedExtent=function(e){var n=this.loadedExtentsRtree_,i;n.forEachInExtent(e,function(o){if(L1(o.extent,e))return i=o,!0}),i&&n.remove(i)},t.prototype.removeFeature=function(e){if(e){var n=Lo(e);n in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[n]:this.featuresRtree_&&this.featuresRtree_.remove(e);var i=this.removeFeatureInternal(e);i&&this.changed()}},t.prototype.removeFeatureInternal=function(e){var n=Lo(e),i=this.featureChangeKeys_[n];if(i){i.forEach(_l),delete this.featureChangeKeys_[n];var o=e.getId();return o!==void 0&&delete this.idIndex_[o.toString()],delete this.uidIndex_[n],this.dispatchEvent(new jm(Ff.REMOVEFEATURE,e)),e}},t.prototype.removeFromIdIndex_=function(e){var n=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===e){delete this.idIndex_[i],n=!0;break}return n},t.prototype.setLoader=function(e){this.loader_=e},t.prototype.setUrl=function(e){fa(this.format_,7),this.url_=e,this.setLoader(I8(e,this.format_))},t}(YL);function sJ(r){var t=r,e=new Af,n=new $Z(-.005,.05,100),i=t.altShiftDragRotate!==void 0?t.altShiftDragRotate:!0;i&&e.push(new FZ);var o=t.doubleClickZoom!==void 0?t.doubleClickZoom:!0;o&&e.push(new OZ({delta:t.zoomDelta,duration:t.zoomDuration}));var s=t.dragPan!==void 0?t.dragPan:!0;s&&e.push(new DZ({onFocusOnly:t.onFocusOnly,kinetic:n}));var a=t.pinchRotate!==void 0?t.pinchRotate:!0;a&&e.push(new XZ);var f=t.pinchZoom!==void 0?t.pinchZoom:!0;f&&e.push(new eX({duration:t.zoomDuration}));var g=t.keyboard!==void 0?t.keyboard:!0;g&&(e.push(new QZ),e.push(new YZ({delta:t.zoomDelta,duration:t.zoomDuration})));var b=t.mouseWheelZoom!==void 0?t.mouseWheelZoom:!0;b&&e.push(new HZ({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration}));var I=t.shiftDragZoom!==void 0?t.shiftDragZoom:!0;return I&&e.push(new GZ({duration:t.zoomDuration})),e}var lJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),D6=function(r){lJ(t,r);function t(e){return e=Zu({},e),e.controls||(e.controls=wZ()),e.interactions||(e.interactions=sJ({onFocusOnly:!0})),r.call(this,e)||this}return t.prototype.createRenderer=function(){return new WH(this)},t}(hZ),L6=function(){function r(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}return r.prototype.contains=function(t){return this.containsXY(t[1],t[2])},r.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},r.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},r.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},r.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},r}();function Tg(r,t,e,n,i){return i!==void 0?(i.minX=r,i.maxX=t,i.minY=e,i.maxY=n,i):new L6(r,t,e,n)}function k8(r,t,e,n){return n!==void 0?(n[0]=r,n[1]=t,n[2]=e,n):[r,t,e]}function H1(r,t,e){return r+"/"+t+"/"+e}function ZL(r){return H1(r[0],r[1],r[2])}function uJ(r){var t=r.substring(r.lastIndexOf("/")+1,r.length).split(",").map(Number),e=t[0],n=t[1],i=t[2];return H1(e,n,i)}function XL(r){return r.split("/").map(Number)}function AJ(r){return(r[1]<<r[0])+r[2]}function cJ(r,t){var e=r[0],n=r[1],i=r[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;var o=t.getFullTileRange(e);return o?o.containsXY(n,i):!0}var dJ=[0,0,0],zm=5,qv=function(){function r(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,fa(v$(this.resolutions_,function(s,a){return a-s}),17);var e;if(!t.origins){for(var n=0,i=this.resolutions_.length-1;n<i;++n)if(!e)e=this.resolutions_[n]/this.resolutions_[n+1];else if(this.resolutions_[n]/this.resolutions_[n+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,fa(this.origins_.length==this.resolutions_.length,20));var o=t.extent;o!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=u0(o)),fa(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,fa(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:O6,fa(!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],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(s,a){var f=new L6(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(o){var g=this.getTileRangeForExtentAndZ(o,a);f.minX=Math.max(g.minX,f.minX),f.maxX=Math.min(g.maxX,f.maxX),f.minY=Math.max(g.minY,f.minY),f.maxY=Math.min(g.maxY,f.maxY)}return f},this):o&&this.calculateTileRanges_(o)}return r.prototype.forEachTileCoord=function(t,e,n){for(var i=this.getTileRangeForExtentAndZ(t,e),o=i.minX,s=i.maxX;o<=s;++o)for(var a=i.minY,f=i.maxY;a<=f;++a)n([e,o,a])},r.prototype.forEachTileCoordParentTileRange=function(t,e,n,i){var o,s,a,f=null,g=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):f=this.getTileCoordExtent(t,i);g>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),o=Tg(s,s,a,a,n)):o=this.getTileRangeForExtentAndZ(f,g,n),e(g,o))return!0;--g}return!1},r.prototype.getExtent=function(){return this.extent_},r.prototype.getMaxZoom=function(){return this.maxZoom},r.prototype.getMinZoom=function(){return this.minZoom},r.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},r.prototype.getResolution=function(t){return this.resolutions_[t]},r.prototype.getResolutions=function(){return this.resolutions_},r.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){var i=t[1]*2,o=t[2]*2;return Tg(i,i+1,o,o+1,e)}var s=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(s,t[0]+1,e)}return null},r.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var i=t[0],o=t[1],s=t[2];if(e===i)return Tg(o,s,o,s,n);if(this.zoomFactor_){var a=Math.pow(this.zoomFactor_,e-i),f=Math.floor(o*a),g=Math.floor(s*a);if(e<i)return Tg(f,f,g,g,n);var b=Math.floor(a*(o+1))-1,I=Math.floor(a*(s+1))-1;return Tg(f,b,g,I,n)}var S=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(S,e,n)},r.prototype.getTileRangeExtent=function(t,e,n){var i=this.getOrigin(t),o=this.getResolution(t),s=Td(this.getTileSize(t),this.tmpSize_),a=i[0]+e.minX*s[0]*o,f=i[0]+(e.maxX+1)*s[0]*o,g=i[1]+e.minY*s[1]*o,b=i[1]+(e.maxY+1)*s[1]*o;return Bp(a,g,f,b,n)},r.prototype.getTileRangeForExtentAndZ=function(t,e,n){var i=dJ;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var o=i[1],s=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),Tg(o,i[1],s,i[2],n)},r.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=Td(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*n,e[1]-(t[2]+.5)*i[1]*n]},r.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),i=this.getResolution(t[0]),o=Td(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*o[0]*i,a=n[1]-(t[2]+1)*o[1]*i,f=s+o[0]*i,g=a+o[1]*i;return Bp(s,a,f,g,e)},r.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},r.prototype.getTileCoordForXYAndResolution_=function(t,e,n,i,o){var s=this.getZForResolution(n),a=n/this.getResolution(s),f=this.getOrigin(s),g=Td(this.getTileSize(s),this.tmpSize_),b=a*(t-f[0])/n/g[0],I=a*(f[1]-e)/n/g[1];return i?(b=U_(b,zm)-1,I=U_(I,zm)-1):(b=F_(b,zm),I=F_(I,zm)),k8(s,b,I,o)},r.prototype.getTileCoordForXYAndZ_=function(t,e,n,i,o){var s=this.getOrigin(n),a=this.getResolution(n),f=Td(this.getTileSize(n),this.tmpSize_),g=(t-s[0])/a/f[0],b=(s[1]-e)/a/f[1];return i?(g=U_(g,zm)-1,b=U_(b,zm)-1):(g=F_(g,zm),b=F_(b,zm)),k8(n,g,b,o)},r.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},r.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},r.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},r.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},r.prototype.getZForResolution=function(t,e){var n=e6(this.resolutions_,t,e||0);return hA(n,this.minZoom,this.maxZoom)},r.prototype.tileCoordIntersectsViewport=function(t,e){return rL(e,0,e.length,2,this.getTileCoordExtent(t))},r.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),i=this.minZoom;i<e;++i)n[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=n},r}(),hJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),A2=function(r){hJ(t,r);function t(e,n,i){var o=r.call(this)||this,s=i||{};return o.tileCoord=e,o.state=n,o.interimTile=null,o.key="",o.transition_=s.transition===void 0?250:s.transition,o.transitionStarts_={},o.interpolate=!!s.interpolate,o}return t.prototype.changed=function(){this.dispatchEvent(_o.CHANGE)},t.prototype.release=function(){},t.prototype.getKey=function(){return this.key+"/"+this.tileCoord},t.prototype.getInterimTile=function(){if(!this.interimTile)return this;var e=this.interimTile;do{if(e.getState()==Vr.LOADED)return this.transition_=0,e;e=e.interimTile}while(e);return this},t.prototype.refreshInterimChain=function(){if(this.interimTile){var e=this.interimTile,n=this;do{if(e.getState()==Vr.LOADED){e.interimTile=null;break}else e.getState()==Vr.LOADING?n=e:e.getState()==Vr.IDLE?n.interimTile=e.interimTile:n=e;e=n.interimTile}while(e)}},t.prototype.getTileCoord=function(){return this.tileCoord},t.prototype.getState=function(){return this.state},t.prototype.setState=function(e){if(this.state!==Vr.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()},t.prototype.load=function(){Zi()},t.prototype.getAlpha=function(e,n){if(!this.transition_)return 1;var i=this.transitionStarts_[e];if(!i)i=n,this.transitionStarts_[e]=i;else if(i===-1)return 1;var o=n-i+1e3/60;return o>=this.transition_?1:wL(o/this.transition_)},t.prototype.inTransition=function(e){return this.transition_?this.transitionStarts_[e]!==-1:!1},t.prototype.endTransition=function(e){this.transition_&&(this.transitionStarts_[e]=-1)},t}($1),fJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),JL=function(r){fJ(t,r);function t(e,n,i,o,s,a){var f=r.call(this,e,n,a)||this;return f.crossOrigin_=o,f.src_=i,f.key=i,f.image_=new Image,o!==null&&(f.image_.crossOrigin=o),f.unlisten_=null,f.tileLoadFunction_=s,f}return t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(e){this.image_=e,this.state=Vr.LOADED,this.unlistenImage_(),this.changed()},t.prototype.handleImageError_=function(){this.state=Vr.ERROR,this.unlistenImage_(),this.image_=pJ(),this.changed()},t.prototype.handleImageLoad_=function(){var e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=Vr.LOADED:this.state=Vr.EMPTY,this.unlistenImage_(),this.changed()},t.prototype.load=function(){this.state==Vr.ERROR&&(this.state=Vr.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Vr.IDLE&&(this.state=Vr.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=R6(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},t.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},t}(A2);function pJ(){var r=lh(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var mJ=.5,gJ=10,T8=.25,yJ=function(){function r(t,e,n,i,o,s){this.sourceProj_=t,this.targetProj_=e;var a={},f=HC(this.targetProj_,this.sourceProj_);this.transformInv_=function(ee){var J=ee[0]+"/"+ee[1];return a[J]||(a[J]=f(ee)),a[J]},this.maxSourceExtent_=i,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Pl(i)==Pl(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Pl(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Pl(this.targetProj_.getExtent()):null;var g=u0(n),b=s6(n),I=a6(n),S=o6(n),B=this.transformInv_(g),P=this.transformInv_(b),U=this.transformInv_(I),j=this.transformInv_(S),q=gJ+(s?Math.max(0,Math.ceil(q$(RS(n)/(s*s*256*256)))):0);if(this.addQuad_(g,b,I,S,B,P,U,j,q),this.wrapsXInSource_){var W=1/0;this.triangles_.forEach(function(ee,J,$){W=Math.min(W,ee.source[0][0],ee.source[1][0],ee.source[2][0])}),this.triangles_.forEach((function(ee){if(Math.max(ee.source[0][0],ee.source[1][0],ee.source[2][0])-W>this.sourceWorldWidth_/2){var J=[[ee.source[0][0],ee.source[0][1]],[ee.source[1][0],ee.source[1][1]],[ee.source[2][0],ee.source[2][1]]];J[0][0]-W>this.sourceWorldWidth_/2&&(J[0][0]-=this.sourceWorldWidth_),J[1][0]-W>this.sourceWorldWidth_/2&&(J[1][0]-=this.sourceWorldWidth_),J[2][0]-W>this.sourceWorldWidth_/2&&(J[2][0]-=this.sourceWorldWidth_);var $=Math.min(J[0][0],J[1][0],J[2][0]),X=Math.max(J[0][0],J[1][0],J[2][0]);X-$<this.sourceWorldWidth_/2&&(ee.source=J)}}).bind(this))}a={}}return r.prototype.addTriangle_=function(t,e,n,i,o,s){this.triangles_.push({source:[i,o,s],target:[t,e,n]})},r.prototype.addQuad_=function(t,e,n,i,o,s,a,f,g){var b=PS([o,s,a,f]),I=this.sourceWorldWidth_?Pl(b)/this.sourceWorldWidth_:null,S=this.sourceWorldWidth_,B=this.sourceProj_.canWrapX()&&I>.5&&I<1,P=!1;if(g>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var U=PS([t,e,n,i]),j=Pl(U)/this.targetWorldWidth_;P=j>T8||P}!B&&this.sourceProj_.isGlobal()&&I&&(P=I>T8||P)}if(!(!P&&this.maxSourceExtent_&&isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])&&isFinite(b[3])&&!Hu(b,this.maxSourceExtent_))){var q=0;if(!P&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(f[0])||!isFinite(f[1]))){if(g>0)P=!0;else if(q=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(f[0])||!isFinite(f[1])?1:0),q!=1&&q!=2&&q!=4&&q!=8)return}if(g>0){if(!P){var W=[(t[0]+n[0])/2,(t[1]+n[1])/2],ee=this.transformInv_(W),J=void 0;if(B){var $=(X0(o[0],S)+X0(a[0],S))/2;J=$-X0(ee[0],S)}else J=(o[0]+a[0])/2-ee[0];var X=(o[1]+a[1])/2-ee[1],G=J*J+X*X;P=G>this.errorThresholdSquared_}if(P){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var ae=[(e[0]+n[0])/2,(e[1]+n[1])/2],ge=this.transformInv_(ae),he=[(i[0]+t[0])/2,(i[1]+t[1])/2],Ie=this.transformInv_(he);this.addQuad_(t,e,ae,he,o,s,ge,Ie,g-1),this.addQuad_(he,ae,n,i,Ie,ge,a,f,g-1)}else{var re=[(t[0]+e[0])/2,(t[1]+e[1])/2],oe=this.transformInv_(re),Se=[(n[0]+i[0])/2,(n[1]+i[1])/2],ye=this.transformInv_(Se);this.addQuad_(t,re,Se,i,o,oe,ye,f,g-1),this.addQuad_(re,e,n,Se,oe,s,a,ye,g-1)}return}}if(B){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}q&11||this.addTriangle_(t,n,i,o,a,f),q&14||this.addTriangle_(t,n,e,o,a,s),q&&(q&13||this.addTriangle_(e,i,t,s,f,o),q&7||this.addTriangle_(e,i,n,s,f,a))}},r.prototype.calculateSourceExtent=function(){var t=hf();return this.triangles_.forEach(function(e,n,i){var o=e.source;Hy(t,o[0]),Hy(t,o[1]),Hy(t,o[2])}),t},r.prototype.getTriangles=function(){return this.triangles_},r}(),JS={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},vJ={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},h3,eF=[];function P8(r,t,e,n,i){r.beginPath(),r.moveTo(0,0),r.lineTo(t,e),r.lineTo(n,i),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(t,n)+1,Math.max(e,i)),r.restore()}function f3(r,t){return Math.abs(r[t*4]-210)>2||Math.abs(r[t*4+3]-.75*255)>2}function _J(){if(h3===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",P8(r,4,5,4,0),P8(r,4,5,0,5);var t=r.getImageData(0,0,3,3).data;h3=f3(t,0)||f3(t,4)||f3(t,8)}return h3}function K8(r,t,e,n){var i=f6(e,t,r),o=ZI(t,n,e),s=t.getMetersPerUnit();s!==void 0&&(o*=s);var a=r.getMetersPerUnit();a!==void 0&&(o/=a);var f=r.getExtent();if(!f||jv(f,i)){var g=ZI(r,o,i)/o;isFinite(g)&&g>0&&(o/=g)}return o}function CJ(r,t,e,n){var i=s0(e),o=K8(r,t,i,n);return(!isFinite(o)||o<=0)&&qD(e,function(s){return o=K8(r,t,s,n),isFinite(o)&&o>0}),o}function bJ(r,t,e,n,i,o,s,a,f,g,b,I){var S=lh(Math.round(e*r),Math.round(e*t),eF);if(I||Zu(S,JS),f.length===0)return S.canvas;S.scale(e,e);function B(J){return Math.round(J*e)/e}S.globalCompositeOperation="lighter";var P=hf();f.forEach(function(J,$,X){WD(P,J.extent)});var U=Pl(P),j=sh(P),q=lh(Math.round(e*U/n),Math.round(e*j/n));I||Zu(q,JS);var W=e/n;f.forEach(function(J,$,X){var G=J.extent[0]-P[0],ae=-(J.extent[3]-P[3]),ge=Pl(J.extent),he=sh(J.extent);J.image.width>0&&J.image.height>0&&q.drawImage(J.image,g,g,J.image.width-2*g,J.image.height-2*g,G*W,ae*W,ge*W,he*W)});var ee=u0(s);return a.getTriangles().forEach(function(J,$,X){var G=J.source,ae=J.target,ge=G[0][0],he=G[0][1],Ie=G[1][0],re=G[1][1],oe=G[2][0],Se=G[2][1],ye=B((ae[0][0]-ee[0])/o),nt=B(-(ae[0][1]-ee[1])/o),Ne=B((ae[1][0]-ee[0])/o),je=B(-(ae[1][1]-ee[1])/o),et=B((ae[2][0]-ee[0])/o),Ue=B(-(ae[2][1]-ee[1])/o),ke=ge,We=he;ge=0,he=0,Ie-=ke,re-=We,oe-=ke,Se-=We;var vt=[[Ie,re,0,0,Ne-ye],[oe,Se,0,0,et-ye],[0,0,Ie,re,je-nt],[0,0,oe,Se,Ue-nt]],Pt=$$(vt);if(Pt){if(S.save(),S.beginPath(),_J()||!I){S.moveTo(Ne,je);for(var ut=4,jt=ye-Ne,Rt=nt-je,Ke=0;Ke<ut;Ke++)S.lineTo(Ne+B((Ke+1)*jt/ut),je+B(Ke*Rt/(ut-1))),Ke!=ut-1&&S.lineTo(Ne+B((Ke+1)*jt/ut),je+B((Ke+1)*Rt/(ut-1)));S.lineTo(et,Ue)}else S.moveTo(Ne,je),S.lineTo(ye,nt),S.lineTo(et,Ue);S.clip(),S.transform(Pt[0],Pt[2],Pt[1],Pt[3],ye,nt),S.translate(P[0]-ke,P[3]-We),S.scale(n/e,-n/e),S.drawImage(q.canvas,0,0),S.restore()}}),b&&(S.save(),S.globalCompositeOperation="source-over",S.strokeStyle="black",S.lineWidth=1,a.getTriangles().forEach(function(J,$,X){var G=J.target,ae=(G[0][0]-ee[0])/o,ge=-(G[0][1]-ee[1])/o,he=(G[1][0]-ee[0])/o,Ie=-(G[1][1]-ee[1])/o,re=(G[2][0]-ee[0])/o,oe=-(G[2][1]-ee[1])/o;S.beginPath(),S.moveTo(he,Ie),S.lineTo(ae,ge),S.lineTo(re,oe),S.closePath(),S.stroke()}),S.restore()),S.canvas}var xJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),tF=function(r){xJ(t,r);function t(e,n,i,o,s,a,f,g,b,I,S,B){var P=r.call(this,s,Vr.IDLE,{interpolate:!!B})||this;P.renderEdges_=S!==void 0?S:!1,P.pixelRatio_=f,P.gutter_=g,P.canvas_=null,P.sourceTileGrid_=n,P.targetTileGrid_=o,P.wrappedTileCoord_=a||s,P.sourceTiles_=[],P.sourcesListenerKeys_=null,P.sourceZ_=0;var U=o.getTileCoordExtent(P.wrappedTileCoord_),j=P.targetTileGrid_.getExtent(),q=P.sourceTileGrid_.getExtent(),W=j?H0(U,j):U;if(RS(W)===0)return P.state=Vr.EMPTY,P;var ee=e.getExtent();ee&&(q?q=H0(q,ee):q=ee);var J=o.getResolution(P.wrappedTileCoord_[0]),$=CJ(e,i,W,J);if(!isFinite($)||$<=0)return P.state=Vr.EMPTY,P;var X=I!==void 0?I:mJ;if(P.triangulation_=new yJ(e,i,W,q,$*X,J),P.triangulation_.getTriangles().length===0)return P.state=Vr.EMPTY,P;P.sourceZ_=n.getZForResolution($);var G=P.triangulation_.calculateSourceExtent();if(q&&(e.canWrapX()?(G[1]=hA(G[1],q[1],q[3]),G[3]=hA(G[3],q[1],q[3])):G=H0(G,q)),!RS(G))P.state=Vr.EMPTY;else{for(var ae=n.getTileRangeForExtentAndZ(G,P.sourceZ_),ge=ae.minX;ge<=ae.maxX;ge++)for(var he=ae.minY;he<=ae.maxY;he++){var Ie=b(P.sourceZ_,ge,he,f);Ie&&P.sourceTiles_.push(Ie)}P.sourceTiles_.length===0&&(P.state=Vr.EMPTY)}return P}return t.prototype.getImage=function(){return this.canvas_},t.prototype.reproject_=function(){var e=[];if(this.sourceTiles_.forEach((function(b,I,S){b&&b.getState()==Vr.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(b.tileCoord),image:b.getImage()})}).bind(this)),this.sourceTiles_.length=0,e.length===0)this.state=Vr.ERROR;else{var n=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(n),o=typeof i=="number"?i:i[0],s=typeof i=="number"?i:i[1],a=this.targetTileGrid_.getResolution(n),f=this.sourceTileGrid_.getResolution(this.sourceZ_),g=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=bJ(o,s,this.pixelRatio_,f,this.sourceTileGrid_.getExtent(),a,g,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=Vr.LOADED}this.changed()},t.prototype.load=function(){if(this.state==Vr.IDLE){this.state=Vr.LOADING,this.changed();var e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((function(n,i,o){var s=n.getState();if(s==Vr.IDLE||s==Vr.LOADING){e++;var a=Ia(n,_o.CHANGE,function(f){var g=n.getState();(g==Vr.LOADED||g==Vr.ERROR||g==Vr.EMPTY)&&(_l(a),e--,e===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(a)}}).bind(this)),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(n,i,o){var s=n.getState();s==Vr.IDLE&&n.load()})}},t.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(_l),this.sourcesListenerKeys_=null},t.prototype.release=function(){this.canvas_&&(E6(this.canvas_.getContext("2d")),eF.push(this.canvas_),this.canvas_=null),r.prototype.release.call(this)},t}(A2),wJ=function(){function r(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return r.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},r.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},r.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},r.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},r.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},r.prototype.get=function(t,e){var n=this.entries_[t];return fa(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},r.prototype.remove=function(t){var e=this.entries_[t];return fa(e!==void 0,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},r.prototype.getCount=function(){return this.count_},r.prototype.getKeys=function(){var t=new Array(this.count_),e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t},r.prototype.getValues=function(){var t=new Array(this.count_),e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t},r.prototype.peekLast=function(){return this.oldest_.value_},r.prototype.peekLastKey=function(){return this.oldest_.key_},r.prototype.peekFirstKey=function(){return this.newest_.key_},r.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},r.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},r.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},r.prototype.set=function(t,e){fa(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},r.prototype.setSize=function(t){this.highWaterMark=t},r}(),MJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),F6=function(r){MJ(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.expireCache=function(e){for(;this.canExpireCache();){var n=this.peekLast();if(n.getKey()in e)break;this.pop().release()}},t.prototype.pruneExceptNewestZ=function(){if(this.getCount()!==0){var e=this.peekFirstKey(),n=XL(e),i=n[0];this.forEach((function(o){o.tileCoord[0]!==i&&(this.remove(ZL(o.tileCoord)),o.release())}).bind(this))}},t}(wJ);const p3={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function nF(r){var t=r.getDefaultTileGrid();return t||(t=OJ(r),r.setDefaultTileGrid(t)),t}function SJ(r,t,e){var n=t[0],i=r.getTileCoordCenter(t),o=c2(e);if(jv(o,i))return t;var s=Pl(o),a=Math.ceil((o[0]-i[0])/s);return i[0]+=s*a,r.getTileCoordForCoordAndZ(i,n)}function EJ(r,t,e,n){var i=rF(r,t,e);return new qv({extent:r,origin:j$(r),resolutions:i,tileSize:e})}function U6(r){var t=r||{},e=t.extent||ou("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:rF(e,t.maxZoom,t.tileSize,t.maxResolution)};return new qv(n)}function rF(r,t,e,n){for(var i=t!==void 0?t:xL,o=sh(r),s=Pl(r),a=Td(e!==void 0?e:O6),f=n>0?n:Math.max(s/a[0],o/a[1]),g=i+1,b=new Array(g),I=0;I<g;++I)b[I]=f/Math.pow(2,I);return b}function OJ(r,t,e,n){var i=c2(r);return EJ(i,t,e)}function c2(r){r=ou(r);var t=r.getExtent();if(!t){var e=180*l0[Rd.DEGREES]/r.getMetersPerUnit();t=Bp(-e,-e,e,e)}return t}var iF=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),BJ=function(r){iF(t,r);function t(e){var n=r.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;n.on,n.once,n.un,n.opaque_=e.opaque!==void 0?e.opaque:!1,n.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,n.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;var i=[256,256];return n.tileGrid&&Td(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),i),n.tileCache=new F6(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return t.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},t.prototype.expireCache=function(e,n){var i=this.getTileCacheForProjection(e);i&&i.expireCache(n)},t.prototype.forEachLoadedTile=function(e,n,i,o){var s=this.getTileCacheForProjection(e);if(!s)return!1;for(var a=!0,f,g,b,I=i.minX;I<=i.maxX;++I)for(var S=i.minY;S<=i.maxY;++S)g=H1(n,I,S),b=!1,s.containsKey(g)&&(f=s.get(g),b=f.getState()===Vr.LOADED,b&&(b=o(f)!==!1)),b||(a=!1);return a},t.prototype.getGutterForProjection=function(e){return 0},t.prototype.getKey=function(){return this.key_},t.prototype.setKey=function(e){this.key_!==e&&(this.key_=e,this.changed())},t.prototype.getOpaque=function(e){return this.opaque_},t.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},t.prototype.getTile=function(e,n,i,o,s){return Zi()},t.prototype.getTileGrid=function(){return this.tileGrid},t.prototype.getTileGridForProjection=function(e){return this.tileGrid?this.tileGrid:nF(e)},t.prototype.getTileCacheForProjection=function(e){var n=this.getProjection();return fa(n===null||F0(n,e),68),this.tileCache},t.prototype.getTilePixelRatio=function(e){return this.tilePixelRatio_},t.prototype.getTilePixelSize=function(e,n,i){var o=this.getTileGridForProjection(i),s=this.getTilePixelRatio(n),a=Td(o.getTileSize(e),this.tmpSize);return s==1?a:cZ(a,s,this.tmpSize)},t.prototype.getTileCoordForTileUrlFunction=function(e,n){var i=n!==void 0?n:this.getProjection(),o=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(e=SJ(o,e,i)),cJ(e,o)?e:null},t.prototype.clear=function(){this.tileCache.clear()},t.prototype.refresh=function(){this.clear(),r.prototype.refresh.call(this)},t.prototype.updateCacheSize=function(e,n){var i=this.getTileCacheForProjection(n);e>i.highWaterMark&&(i.highWaterMark=e)},t.prototype.useTile=function(e,n,i,o){},t}(YL),IJ=function(r){iF(t,r);function t(e,n){var i=r.call(this,e)||this;return i.tile=n,i}return t}(_m);function kJ(r,t){var e=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(s,a,f){if(s)return r.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(i,s[2].toString()).replace(o,function(){var g=s[0],b=t.getFullTileRange(g);fa(b,55);var I=b.getHeight()-s[2]-1;return I.toString()})}}function oF(r,t){for(var e=r.length,n=new Array(e),i=0;i<e;++i)n[i]=kJ(r[i],t);return TJ(n)}function TJ(r){return r.length===1?r[0]:function(t,e,n){if(t){var i=AJ(t),o=X0(i,r.length);return r[o](t,e,n)}else return}}function PJ(r){var t=[],e=/\{([a-z])-([a-z])\}/.exec(r);if(e){var n=e[1].charCodeAt(0),i=e[2].charCodeAt(0),o=void 0;for(o=n;o<=i;++o)t.push(r.replace(e[0],String.fromCharCode(o)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(r),e){for(var s=parseInt(e[2],10),a=parseInt(e[1],10);a<=s;a++)t.push(r.replace(e[0],a.toString()));return t}return t.push(r),t}var KJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),aF=function(r){KJ(t,r);function t(e){var n=r.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===t.prototype.tileUrlFunction,n.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(n.tileUrlFunction=e.tileUrlFunction),n.urls=null,e.urls?n.setUrls(e.urls):e.url&&n.setUrl(e.url),n.tileLoadingKeys_={},n}return t.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},t.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},t.prototype.getUrls=function(){return this.urls},t.prototype.handleTileChange=function(e){var n=e.target,i=Lo(n),o=n.getState(),s;o==Vr.LOADING?(this.tileLoadingKeys_[i]=!0,s=p3.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=o==Vr.ERROR?p3.TILELOADERROR:o==Vr.LOADED?p3.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new IJ(s,n))},t.prototype.setTileLoadFunction=function(e){this.tileCache.clear(),this.tileLoadFunction=e,this.changed()},t.prototype.setTileUrlFunction=function(e,n){this.tileUrlFunction=e,this.tileCache.pruneExceptNewestZ(),typeof n<"u"?this.setKey(n):this.changed()},t.prototype.setUrl=function(e){var n=PJ(e);this.urls=n,this.setUrls(n)},t.prototype.setUrls=function(e){this.urls=e;var n=e.join(`
|
||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(oF(e,this.tileGrid),n):this.setKey(n)},t.prototype.tileUrlFunction=function(e,n,i){},t.prototype.useTile=function(e,n,i){var o=H1(e,n,i);this.tileCache.containsKey(o)&&this.tileCache.get(o)},t}(BJ),RJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),DJ=function(r){RJ(t,r);function t(e){var n=this,i=e.imageSmoothing!==void 0?e.imageSmoothing:!0;return e.interpolate!==void 0&&(i=e.interpolate),n=r.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:LJ,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:i,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this,n.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,n.tileClass=e.tileClass!==void 0?e.tileClass:JL,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return t.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},t.prototype.expireCache=function(e,n){var i=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==i?n:{});for(var o in this.tileCacheForProjection){var s=this.tileCacheForProjection[o];s.expireCache(s==i?n:{})}},t.prototype.getGutterForProjection=function(e){return this.getProjection()&&e&&!F0(this.getProjection(),e)?0:this.getGutter()},t.prototype.getGutter=function(){return 0},t.prototype.getKey=function(){var e=r.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},t.prototype.getOpaque=function(e){return this.getProjection()&&e&&!F0(this.getProjection(),e)?!1:r.prototype.getOpaque.call(this,e)},t.prototype.getTileGridForProjection=function(e){var n=this.getProjection();if(this.tileGrid&&(!n||F0(n,e)))return this.tileGrid;var i=Lo(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=nF(e)),this.tileGridForProjection[i]},t.prototype.getTileCacheForProjection=function(e){var n=this.getProjection();if(!n||F0(n,e))return this.tileCache;var i=Lo(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new F6(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},t.prototype.createTile_=function(e,n,i,o,s,a){var f=[e,n,i],g=this.getTileCoordForTileUrlFunction(f,s),b=g?this.tileUrlFunction(g,o,s):void 0,I=new this.tileClass(f,b!==void 0?Vr.IDLE:Vr.EMPTY,b!==void 0?b:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return I.key=a,I.addEventListener(_o.CHANGE,this.handleTileChange.bind(this)),I},t.prototype.getTile=function(e,n,i,o,s){var a=this.getProjection();if(!a||!s||F0(a,s))return this.getTileInternal(e,n,i,o,a||s);var f=this.getTileCacheForProjection(s),g=[e,n,i],b=void 0,I=ZL(g);f.containsKey(I)&&(b=f.get(I));var S=this.getKey();if(b&&b.key==S)return b;var B=this.getTileGridForProjection(a),P=this.getTileGridForProjection(s),U=this.getTileCoordForTileUrlFunction(g,s),j=new tF(a,B,s,P,g,U,this.getTilePixelRatio(o),this.getGutter(),(function(q,W,ee,J){return this.getTileInternal(q,W,ee,J,a)}).bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return j.key=S,b?(j.interimTile=b,j.refreshInterimChain(),f.replace(I,j)):f.set(I,j),j},t.prototype.getTileInternal=function(e,n,i,o,s){var a=null,f=H1(e,n,i),g=this.getKey();if(!this.tileCache.containsKey(f))a=this.createTile_(e,n,i,o,s,g),this.tileCache.set(f,a);else if(a=this.tileCache.get(f),a.key!=g){var b=a;a=this.createTile_(e,n,i,o,s,g),b.getState()==Vr.IDLE?a.interimTile=b.interimTile:a.interimTile=b,a.refreshInterimChain(),this.tileCache.replace(f,a)}return a},t.prototype.setRenderReprojectionEdges=function(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(var n in this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},t.prototype.setTileGridForProjection=function(e,n){{var i=ou(e);if(i){var o=Lo(i);o in this.tileGridForProjection||(this.tileGridForProjection[o]=n)}}},t}(aF);function LJ(r,t){r.getImage().src=t}var sF=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();function FJ(r,t,e,n){var i=document.createElement("script"),o="olc_"+Lo(t);function s(){delete window[o],i.parentNode.removeChild(i)}i.async=!0,i.src=r+(r.indexOf("?")==-1?"?":"&")+"callback="+o;var a=setTimeout(function(){s(),e&&e()},1e4);window[o]=function(f){clearTimeout(a),s(),t(f)},document.head.appendChild(i)}(function(r){sF(t,r);function t(e){var n=this,i="Unexpected response status: "+e.status;return n=r.call(this,i)||this,n.name="ResponseError",n.response=e,n}return t})(Error);(function(r){sF(t,r);function t(e){var n=r.call(this,"Failed to issue request")||this;return n.name="ClientError",n.client=e,n}return t})(Error);var UJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),lF=function(r){UJ(t,r);function t(e){var n=this,i=e.imageSmoothing!==void 0?e.imageSmoothing:!0;if(e.interpolate!==void 0&&(i=e.interpolate),n=r.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:i,projection:ou("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,zDirection:e.zDirection})||this,n.tileJSON_=null,n.tileSize_=e.tileSize,e.url)if(e.jsonp)FJ(e.url,n.handleTileJSONResponse.bind(n),n.handleTileJSONError.bind(n));else{var o=new XMLHttpRequest;o.addEventListener("load",n.onXHRLoad_.bind(n)),o.addEventListener("error",n.onXHRError_.bind(n)),o.open("GET",e.url),o.send()}else e.tileJSON?n.handleTileJSONResponse(e.tileJSON):fa(!1,51);return n}return t.prototype.onXHRLoad_=function(e){var n=e.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},t.prototype.onXHRError_=function(e){this.handleTileJSONError()},t.prototype.getTileJSON=function(){return this.tileJSON_},t.prototype.handleTileJSONResponse=function(e){var n=ou("EPSG:4326"),i=this.getProjection(),o;if(e.bounds!==void 0){var s=i2(n,i);o=G$(e.bounds,s)}var a=c2(i),f=e.minzoom||0,g=e.maxzoom||22,b=U6({extent:a,maxZoom:g,minZoom:f,tileSize:this.tileSize_});if(this.tileGrid=b,this.tileUrlFunction=oF(e.tiles,b),e.attribution!==void 0&&!this.getAttributions()){var I=o!==void 0?o:a;this.setAttributions(function(S){return Hu(I,S.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")},t.prototype.handleTileJSONError=function(){this.setState("error")},t}(DJ);const Zm={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};var jJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),zJ=function(r){jJ(t,r);function t(e){var n=this,i=e||{},o=Zu({},i);return delete o.preload,delete o.useInterimTilesOnError,n=r.call(this,o)||this,n.on,n.once,n.un,n.setPreload(i.preload!==void 0?i.preload:0),n.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),n}return t.prototype.getPreload=function(){return this.get(Zm.PRELOAD)},t.prototype.setPreload=function(e){this.set(Zm.PRELOAD,e)},t.prototype.getUseInterimTilesOnError=function(){return this.get(Zm.USE_INTERIM_TILES_ON_ERROR)},t.prototype.setUseInterimTilesOnError=function(e){this.set(Zm.USE_INTERIM_TILES_ON_ERROR,e)},t.prototype.getData=function(e){return r.prototype.getData.call(this,e)},t}(s2),NJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),uF=function(r){NJ(t,r);function t(e){var n=r.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=hf(),n.tmpTileRange_=new L6(0,0,0,0),n}return t.prototype.isDrawableTile=function(e){var n=this.getLayer(),i=e.getState(),o=n.getUseInterimTilesOnError();return i==Vr.LOADED||i==Vr.EMPTY||i==Vr.ERROR&&!o},t.prototype.getTile=function(e,n,i,o){var s=o.pixelRatio,a=o.viewState.projection,f=this.getLayer(),g=f.getSource(),b=g.getTile(e,n,i,s,a);return b.getState()==Vr.ERROR&&(f.getUseInterimTilesOnError()?f.getPreload()>0&&(this.newTiles_=!0):b.setState(Vr.LOADED)),this.isDrawableTile(b)||(b=b.getInterimTile()),b},t.prototype.getData=function(e){var n=this.frameState;if(!n)return null;var i=this.getLayer(),o=Vu(n.pixelToCoordinateTransform,e.slice()),s=i.getExtent();if(s&&!jv(s,o))return null;for(var a=n.pixelRatio,f=n.viewState.projection,g=n.viewState,b=i.getRenderSource(),I=b.getTileGridForProjection(g.projection),S=b.getTilePixelRatio(n.pixelRatio),B=I.getZForResolution(g.resolution);B>=I.getMinZoom();--B){var P=I.getTileCoordForCoordAndZ(o,B),U=b.getTile(B,P[1],P[2],a,f);if(!(U instanceof JL||U instanceof tF))return null;if(U.getState()===Vr.LOADED){var j=I.getOrigin(B),q=Td(I.getTileSize(B)),W=I.getResolution(B),ee=Math.floor(S*((o[0]-j[0])/W-P[1]*q[0])),J=Math.floor(S*((j[1]-o[1])/W-P[2]*q[1])),$=Math.round(S*b.getGutterForProjection(g.projection));return this.getImageData(U.getImage(),ee+$,J+$)}}return null},t.prototype.loadedTileCallback=function(e,n,i){return this.isDrawableTile(i)?r.prototype.loadedTileCallback.call(this,e,n,i):!1},t.prototype.prepareFrame=function(e){return!!this.getLayer().getSource()},t.prototype.renderFrame=function(e,n){var i=e.layerStatesArray[e.layerIndex],o=e.viewState,s=o.projection,a=o.resolution,f=o.center,g=o.rotation,b=e.pixelRatio,I=this.getLayer(),S=I.getSource(),B=S.getRevision(),P=S.getTileGridForProjection(s),U=P.getZForResolution(a,S.zDirection),j=P.getResolution(U),q=e.extent,W=e.viewState.resolution,ee=S.getTilePixelRatio(b),J=Math.round(Pl(q)/W*b),$=Math.round(sh(q)/W*b),X=i.extent&&N0(i.extent);X&&(q=H0(q,N0(i.extent)));var G=j*J/2/ee,ae=j*$/2/ee,ge=[f[0]-G,f[1]-ae,f[0]+G,f[1]+ae],he=P.getTileRangeForExtentAndZ(q,U),Ie={};Ie[U]={};var re=this.createLoadedTileFinder(S,s,Ie),oe=this.tmpExtent,Se=this.tmpTileRange_;this.newTiles_=!1;for(var ye=g?LS(o.center,W,g,e.size):void 0,nt=he.minX;nt<=he.maxX;++nt)for(var Ne=he.minY;Ne<=he.maxY;++Ne)if(!(g&&!P.tileCoordIntersectsViewport([U,nt,Ne],ye))){var je=this.getTile(U,nt,Ne,e);if(this.isDrawableTile(je)){var et=Lo(this);if(je.getState()==Vr.LOADED){Ie[U][je.tileCoord.toString()]=je;var Ue=je.inTransition(et);Ue&&i.opacity!==1&&(je.endTransition(et),Ue=!1),!this.newTiles_&&(Ue||this.renderedTiles.indexOf(je)===-1)&&(this.newTiles_=!0)}if(je.getAlpha(et,e.time)===1)continue}var ke=P.getTileCoordChildTileRange(je.tileCoord,Se,oe),We=!1;ke&&(We=re(U+1,ke)),We||P.forEachTileCoordParentTileRange(je.tileCoord,re,Se,oe)}var vt=j/a*b/ee;Op(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/b,1/b,g,-J/2,-$/2);var Pt=zD(this.pixelTransform);this.useContainer(n,Pt,this.getBackground(e));var ut=this.context,jt=ut.canvas;n6(this.inversePixelTransform,this.pixelTransform),Op(this.tempTransform,J/2,$/2,vt,vt,0,-J/2,-$/2),jt.width!=J||jt.height!=$?(jt.width=J,jt.height=$):this.containerReused||ut.clearRect(0,0,J,$),X&&this.clipUnrotated(ut,e,X),S.getInterpolate()||Zu(ut,JS),this.preRender(ut,e),this.renderedTiles.length=0;var Rt=Object.keys(Ie).map(Number);Rt.sort(D1);var Ke,we,Fe;i.opacity===1&&(!this.containerReused||S.getOpaque(e.viewState.projection))?Rt=Rt.reverse():(Ke=[],we=[]);for(var tt=Rt.length-1;tt>=0;--tt){var mt=Rt[tt],bt=S.getTilePixelSize(mt,b,s),Lt=P.getResolution(mt),Vt=Lt/j,rn=bt[0]*Vt*vt,Sn=bt[1]*Vt*vt,Ar=P.getTileCoordForCoordAndZ(u0(ge),mt),Bn=P.getTileCoordExtent(Ar),ar=Vu(this.tempTransform,[ee*(Bn[0]-ge[0])/j,ee*(ge[3]-Bn[3])/j]),Cr=ee*S.getGutterForProjection(s),br=Ie[mt];for(var _r in br){var je=br[_r],Jr=je.tileCoord,wr=Ar[1]-Jr[1],hi=Math.round(ar[0]-(wr-1)*rn),Ye=Ar[2]-Jr[2],de=Math.round(ar[1]-(Ye-1)*Sn),nt=Math.round(ar[0]-wr*rn),Ne=Math.round(ar[1]-Ye*Sn),pe=hi-nt,Je=de-Ne,kt=U===mt,Ue=kt&&je.getAlpha(Lo(this),e.time)!==1,Xt=!1;if(!Ue)if(Ke){Fe=[nt,Ne,nt+pe,Ne,nt+pe,Ne+Je,nt,Ne+Je];for(var it=0,Ut=Ke.length;it<Ut;++it)if(U!==mt&&mt<we[it]){var qe=Ke[it];Hu([nt,Ne,nt+pe,Ne+Je],[qe[0],qe[3],qe[4],qe[7]])&&(Xt||(ut.save(),Xt=!0),ut.beginPath(),ut.moveTo(Fe[0],Fe[1]),ut.lineTo(Fe[2],Fe[3]),ut.lineTo(Fe[4],Fe[5]),ut.lineTo(Fe[6],Fe[7]),ut.moveTo(qe[6],qe[7]),ut.lineTo(qe[4],qe[5]),ut.lineTo(qe[2],qe[3]),ut.lineTo(qe[0],qe[1]),ut.clip())}Ke.push(Fe),we.push(mt)}else ut.clearRect(nt,Ne,pe,Je);this.drawTileImage(je,e,nt,Ne,pe,Je,Cr,kt),Ke&&!Ue?(Xt&&ut.restore(),this.renderedTiles.unshift(je)):this.renderedTiles.push(je),this.updateUsedTiles(e.usedTiles,S,je)}}return this.renderedRevision=B,this.renderedResolution=j,this.extentChanged=!this.renderedExtent_||!L1(this.renderedExtent_,ge),this.renderedExtent_=ge,this.renderedPixelRatio=b,this.renderedProjection=s,this.manageTilePyramid(e,S,P,b,s,q,U,I.getPreload()),this.scheduleExpireCache(e,S),this.postRender(ut,e),i.extent&&ut.restore(),Zu(ut,vJ),Pt!==jt.style.transform&&(jt.style.transform=Pt),this.container},t.prototype.drawTileImage=function(e,n,i,o,s,a,f,g){var b=this.getTileImage(e);if(b){var I=Lo(this),S=n.layerStatesArray[n.layerIndex],B=S.opacity*(g?e.getAlpha(I,n.time):1),P=B!==this.context.globalAlpha;P&&(this.context.save(),this.context.globalAlpha=B),this.context.drawImage(b,f,f,b.width-2*f,b.height-2*f,i,o,s,a),P&&this.context.restore(),B!==S.opacity?n.animate=!0:g&&e.endTransition(I)}},t.prototype.getImage=function(){var e=this.context;return e?e.canvas:null},t.prototype.getTileImage=function(e){return e.getImage()},t.prototype.scheduleExpireCache=function(e,n){if(n.canExpireCache()){var i=(function(o,s,a){var f=Lo(o);f in a.usedTiles&&o.expireCache(a.viewState.projection,a.usedTiles[f])}).bind(null,n);e.postRenderFunctions.push(i)}},t.prototype.updateUsedTiles=function(e,n,i){var o=Lo(n);o in e||(e[o]={}),e[o][i.getKey()]=!0},t.prototype.manageTilePyramid=function(e,n,i,o,s,a,f,g,b){var I=Lo(n);I in e.wantedTiles||(e.wantedTiles[I]={});var S=e.wantedTiles[I],B=e.tileQueue,P=i.getMinZoom(),U=e.viewState.rotation,j=U?LS(e.viewState.center,e.viewState.resolution,U,e.size):void 0,q=0,W,ee,J,$,X,G;for(G=P;G<=f;++G)for(ee=i.getTileRangeForExtentAndZ(a,G,ee),J=i.getResolution(G),$=ee.minX;$<=ee.maxX;++$)for(X=ee.minY;X<=ee.maxY;++X)U&&!i.tileCoordIntersectsViewport([G,$,X],j)||(f-G<=g?(++q,W=n.getTile(G,$,X,o,s),W.getState()==Vr.IDLE&&(S[W.getKey()]=!0,B.isKeyQueued(W.getKey())||B.enqueue([W,I,i.getTileCoordCenter(W.tileCoord),J])),b!==void 0&&b(W)):n.useTile(G,$,X,s));n.updateCacheSize(q,s)},t}(UL),GJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),WJ=function(r){GJ(t,r);function t(e){return r.call(this,e)||this}return t.prototype.createRenderer=function(){return new uF(this)},t}(zJ);const Xm={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"};var QJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),qJ={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},YJ={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},$J=function(r){QJ(t,r);function t(e){var n=r.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.renderedLayerRevision_,n.renderedPixelToCoordinateTransform_=null,n.renderedRotation_,n.tmpTransform_=df(),n}return t.prototype.prepareTile=function(e,n,i){var o,s=e.getState();return(s===Vr.LOADED||s===Vr.ERROR)&&(this.updateExecutorGroup_(e,n,i),this.tileImageNeedsRender_(e)&&(o=!0)),o},t.prototype.getTile=function(e,n,i,o){var s=o.pixelRatio,a=o.viewState,f=a.resolution,g=a.projection,b=this.getLayer(),I=b.getSource().getTile(e,n,i,s,g),S=o.viewHints,B=!(S[xu.ANIMATING]||S[xu.INTERACTING]);(B||!I.wantedResolution)&&(I.wantedResolution=f);var P=this.prepareTile(I,s,g);return P&&(B||Date.now()-o.time<8)&&b.getRenderMode()!==Xm.VECTOR&&this.renderTileImage_(I,o),r.prototype.getTile.call(this,e,n,i,o)},t.prototype.isDrawableTile=function(e){var n=this.getLayer();return r.prototype.isDrawableTile.call(this,e)&&(n.getRenderMode()===Xm.VECTOR?Lo(n)in e.executorGroups:e.hasContext(n))},t.prototype.getTileImage=function(e){return e.getImage(this.getLayer())},t.prototype.prepareFrame=function(e){var n=this.getLayer().getRevision();return this.renderedLayerRevision_!==n&&(this.renderedLayerRevision_=n,this.renderedTiles.length=0),r.prototype.prepareFrame.call(this,e)},t.prototype.updateExecutorGroup_=function(e,n,i){var o=this.getLayer(),s=o.getRevision(),a=o.getRenderOrder()||null,f=e.wantedResolution,g=e.getReplayState(o);if(!(!g.dirty&&g.renderedResolution===f&&g.renderedRevision==s&&g.renderedRenderOrder==a)){var b=o.getSource(),I=o.getDeclutter(),S=b.getTileGrid(),B=b.getTileGridForProjection(i),P=B.getTileCoordExtent(e.wrappedTileCoord),U=b.getSourceTiles(n,i,e),j=Lo(o);delete e.hitDetectionImageData[j],e.executorGroups[j]=[],I&&(e.declutterExecutorGroups[j]=[]),g.dirty=!1;for(var q=function($,X){var G=U[$];if(G.getState()!=Vr.LOADED)return"continue";var ae=G.tileCoord,ge=S.getTileCoordExtent(ae),he=H0(P,ge),Ie=t0(he,o.getRenderBuffer()*f,W.tmpExtent),re=L1(ge,he)?null:Ie,oe=new sb(0,Ie,f,n),Se=I?new sb(0,he,f,n):void 0,ye=WL(f,n),nt=function(ut){var jt,Rt=ut.getStyleFunction()||o.getStyleFunction();if(Rt&&(jt=Rt(ut,f)),jt){var Ke=this.renderFeature(ut,ye,jt,oe,Se);g.dirty=g.dirty||Ke}},Ne=G.getFeatures();a&&a!==g.renderedRenderOrder&&Ne.sort(a);for(var je=0,et=Ne.length;je<et;++je){var Ue=Ne[je];(!re||Hu(re,Ue.getGeometry().getExtent()))&&nt.call(W,Ue)}var ke=oe.finish(),We=o.getRenderMode()!==Xm.VECTOR&&I&&U.length===1?null:he,vt=new lb(We,f,n,b.getOverlaps(),ke,o.getRenderBuffer());if(e.executorGroups[j].push(vt),Se){var Pt=new lb(null,f,n,b.getOverlaps(),Se.finish(),o.getRenderBuffer());e.declutterExecutorGroups[j].push(Pt)}},W=this,ee=0,J=U.length;ee<J;++ee)q(ee);g.renderedRevision=s,g.renderedRenderOrder=a,g.renderedResolution=f}},t.prototype.forEachFeatureAtCoordinate=function(e,n,i,o,s){var a=n.viewState.resolution,f=n.viewState.rotation;i=i??0;var g=this.getLayer(),b=g.getSource(),I=b.getTileGridForProjection(n.viewState.projection),S=PS([e]);t0(S,a*i,S);for(var B={},P=function(J,$,X){var G=J.getId();G===void 0&&(G=Lo(J));var ae=B[G];if(ae){if(ae!==!0&&X<ae.distanceSq){if(X===0)return B[G]=!0,s.splice(s.lastIndexOf(ae),1),o(J,g,$);ae.geometry=$,ae.distanceSq=X}}else{if(X===0)return B[G]=!0,o(J,g,$);s.push(B[G]={feature:J,layer:g,geometry:$,distanceSq:X,callback:o})}},U=this.renderedTiles,j,q=function(J,$){var X=U[J],G=I.getTileCoordExtent(X.wrappedTileCoord);if(!Hu(G,S))return"continue";var ae=Lo(g),ge=[X.executorGroups[ae]],he=X.declutterExecutorGroups[ae];he&&ge.push(he),ge.some(function(Ie){for(var re=Ie===he?n.declutterTree.all().map(function(nt){return nt.value}):null,oe=0,Se=Ie.length;oe<Se;++oe){var ye=Ie[oe];if(j=ye.forEachFeatureAtCoordinate(e,a,f,i,P,re),j)return!0}})},W=0,ee=U.length;!j&&W<ee;++W)q(W);return j},t.prototype.getFeatures=function(e){return new Promise((function(n,i){for(var o=this.getLayer(),s=Lo(o),a=o.getSource(),f=this.renderedProjection,g=f.getExtent(),b=this.renderedResolution,I=a.getTileGridForProjection(f),S=Vu(this.renderedPixelToCoordinateTransform_,e.slice()),B=I.getTileCoordForCoordAndResolution(S,b),P,U=0,j=this.renderedTiles.length;U<j;++U)if(B.toString()===this.renderedTiles[U].tileCoord.toString()){if(P=this.renderedTiles[U],P.getState()===Vr.LOADED){var q=I.getTileCoordExtent(P.tileCoord);a.getWrapX()&&f.canWrapX()&&!$m(g,q)&&c6(S,f);break}P=void 0}if(!P||P.loadingSourceTiles>0){n([]);return}var W=I.getTileCoordExtent(P.wrappedTileCoord),ee=u0(W),J=[(S[0]-ee[0])/b,(ee[1]-S[1])/b],$=P.getSourceTiles().reduce(function(he,Ie){return he.concat(Ie.getFeatures())},[]),X=P.hitDetectionImageData[s];if(!X&&!this.animatingOrInteracting_){var G=Td(I.getTileSize(I.getZForResolution(b,a.zDirection))),ae=this.renderedRotation_,ge=[this.getRenderTransform(I.getTileCoordCenter(P.wrappedTileCoord),b,0,Kh,G[0]*Kh,G[1]*Kh,0)];X=zL(G,ge,$,o.getStyleFunction(),I.getTileCoordExtent(P.wrappedTileCoord),P.getReplayState(o).renderedResolution,ae),P.hitDetectionImageData[s]=X}n(NL(J,$,X))}).bind(this))},t.prototype.handleFontsChanged=function(){var e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()},t.prototype.handleStyleImageChange_=function(e){this.renderIfReadyAndVisible()},t.prototype.renderDeclutter=function(e){var n=this.context,i=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var o=e.viewHints,s=!(o[xu.ANIMATING]||o[xu.INTERACTING]),a=this.renderedTiles,f=0,g=a.length;f<g;++f){var b=a[f],I=b.declutterExecutorGroups[Lo(this.getLayer())];if(I)for(var S=I.length-1;S>=0;--S)I[S].execute(this.context,1,this.getTileRenderTransform(b,e),e.viewState.rotation,s,void 0,e.declutterTree)}n.globalAlpha=i},t.prototype.getTileRenderTransform=function(e,n){var i=n.pixelRatio,o=n.viewState,s=o.center,a=o.resolution,f=o.rotation,g=n.size,b=Math.round(g[0]*i),I=Math.round(g[1]*i),S=this.getLayer().getSource(),B=S.getTileGridForProjection(n.viewState.projection),P=e.tileCoord,U=B.getTileCoordExtent(e.wrappedTileCoord),j=B.getTileCoordExtent(P,this.tmpExtent)[0]-U[0],q=t6(Jx(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(s,a,f,i,b,I,j));return q},t.prototype.renderFrame=function(e,n){var i=e.viewHints,o=!(i[xu.ANIMATING]||i[xu.INTERACTING]);r.prototype.renderFrame.call(this,e,n),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode(),f=this.context,g=f.globalAlpha;f.globalAlpha=s.getOpacity();for(var b=YJ[a],I=e.viewState,S=I.rotation,B=s.getSource(),P=B.getTileGridForProjection(I.projection),U=P.getZForResolution(I.resolution,B.zDirection),j=this.renderedTiles,q=[],W=[],ee=!0,J=j.length-1;J>=0;--J){var $=j[J];ee=ee&&!$.getReplayState(s).dirty;var X=$.executorGroups[Lo(s)].filter(function(Ne){return Ne.hasExecutors(b)});if(X.length!==0){var G=this.getTileRenderTransform($,e),ae=$.tileCoord[0],ge=!1,he=X[0].getClipCoords(G);if(he){for(var Ie=0,re=q.length;Ie<re;++Ie)if(U!==ae&&ae<W[Ie]){var oe=q[Ie];Hu([he[0],he[3],he[4],he[7]],[oe[0],oe[3],oe[4],oe[7]])&&(ge||(f.save(),ge=!0),f.beginPath(),f.moveTo(he[0],he[1]),f.lineTo(he[2],he[3]),f.lineTo(he[4],he[5]),f.lineTo(he[6],he[7]),f.moveTo(oe[6],oe[7]),f.lineTo(oe[4],oe[5]),f.lineTo(oe[2],oe[3]),f.lineTo(oe[0],oe[1]),f.clip())}q.push(he),W.push(ae)}for(var Se=0,ye=X.length;Se<ye;++Se){var nt=X[Se];nt.execute(f,1,G,S,o,b)}ge&&f.restore()}}return f.globalAlpha=g,this.ready=ee,this.container},t.prototype.renderFeature=function(e,n,i,o,s){if(!i)return!1;var a=!1;if(Array.isArray(i))for(var f=0,g=i.length;f<g;++f)a=ub(o,e,i[f],n,this.boundHandleStyleImageChange_,void 0,s)||a;else a=ub(o,e,i,n,this.boundHandleStyleImageChange_,void 0,s);return a},t.prototype.tileImageNeedsRender_=function(e){var n=this.getLayer();if(n.getRenderMode()===Xm.VECTOR)return!1;var i=e.getReplayState(n),o=n.getRevision(),s=e.wantedResolution;return i.renderedTileResolution!==s||i.renderedTileRevision!==o},t.prototype.renderTileImage_=function(e,n){var i=this.getLayer(),o=e.getReplayState(i),s=i.getRevision(),a=e.executorGroups[Lo(i)];o.renderedTileRevision=s;var f=e.wrappedTileCoord,g=f[0],b=i.getSource(),I=n.pixelRatio,S=n.viewState,B=S.projection,P=b.getTileGridForProjection(B),U=P.getResolution(e.tileCoord[0]),j=n.pixelRatio/e.wantedResolution*U,q=P.getResolution(g),W=e.getContext(i);I=Math.round(Math.max(I,j/I));var ee=b.getTilePixelSize(g,I,B);W.canvas.width=ee[0],W.canvas.height=ee[1];var J=I/j;if(J!==1){var $=QI(this.tmpTransform_);Jx($,J,J),W.setTransform.apply(W,$)}var X=P.getTileCoordExtent(f,this.tmpExtent),G=j/q,ae=QI(this.tmpTransform_);Jx(ae,G,-G),D$(ae,-X[0],-X[3]);for(var ge=0,he=a.length;ge<he;++ge){var Ie=a[ge];Ie.execute(W,J,ae,0,!0,qJ[i.getRenderMode()])}o.renderedTileResolution=e.wantedResolution},t}(uF),VJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),AF=function(r){VJ(t,r);function t(e){var n=this,i=e||{},o=Zu({},i);delete o.preload,delete o.useInterimTilesOnError,n=r.call(this,o)||this,n.on,n.once,n.un,i.renderMode===Xm.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var s=i.renderMode||Xm.HYBRID;return fa(s==Xm.HYBRID||s==Xm.VECTOR,28),n.renderMode_=s,n.setPreload(i.preload?i.preload:0),n.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),n.getBackground,n.setBackground,n}return t.prototype.createRenderer=function(){return new $J(this)},t.prototype.getFeatures=function(e){return r.prototype.getFeatures.call(this,e)},t.prototype.getRenderMode=function(){return this.renderMode_},t.prototype.getPreload=function(){return this.get(Zm.PRELOAD)},t.prototype.getUseInterimTilesOnError=function(){return this.get(Zm.USE_INTERIM_TILES_ON_ERROR)},t.prototype.setPreload=function(e){this.set(Zm.PRELOAD,e)},t.prototype.setUseInterimTilesOnError=function(e){this.set(Zm.USE_INTERIM_TILES_ON_ERROR,e)},t}(DL),HJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ZJ=function(r){HJ(t,r);function t(e,n,i,o,s,a){var f=r.call(this,e,n,a)||this;return f.extent=null,f.format_=o,f.features_=null,f.loader_,f.projection=null,f.resolution,f.tileLoadFunction_=s,f.url_=i,f.key=i,f}return t.prototype.getFormat=function(){return this.format_},t.prototype.getFeatures=function(){return this.features_},t.prototype.load=function(){this.state==Vr.IDLE&&(this.setState(Vr.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},t.prototype.onLoad=function(e,n){this.setFeatures(e)},t.prototype.onError=function(){this.setState(Vr.ERROR)},t.prototype.setFeatures=function(e){this.features_=e,this.setState(Vr.LOADED)},t.prototype.setLoader=function(e){this.loader_=e},t}(A2),XJ=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),R8=[],JJ=function(r){XJ(t,r);function t(e,n,i,o){var s=r.call(this,e,n,{transition:0})||this;return s.context_={},s.executorGroups={},s.declutterExecutorGroups={},s.loadingSourceTiles=0,s.hitDetectionImageData={},s.replayState_={},s.sourceTiles=[],s.errorTileKeys={},s.wantedResolution,s.getSourceTiles=o.bind(void 0,s),s.wrappedTileCoord=i,s}return t.prototype.getContext=function(e){var n=Lo(e);return n in this.context_||(this.context_[n]=lh(1,1,R8)),this.context_[n]},t.prototype.hasContext=function(e){return Lo(e)in this.context_},t.prototype.getImage=function(e){return this.hasContext(e)?this.getContext(e).canvas:null},t.prototype.getReplayState=function(e){var n=Lo(e);return n in this.replayState_||(this.replayState_[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[n]},t.prototype.load=function(){this.getSourceTiles()},t.prototype.release=function(){for(var e in this.context_){var n=this.context_[e];E6(n),R8.push(n.canvas),delete this.context_[e]}r.prototype.release.call(this)},t}(A2),eee=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),cF=function(r){eee(t,r);function t(e){var n=this,i=e.projection||"EPSG:3857",o=e.extent||c2(i),s=e.tileGrid||U6({extent:o,maxResolution:e.maxResolution,maxZoom:e.maxZoom!==void 0?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return n=r.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:i,state:e.state,tileGrid:s,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:tee,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,zDirection:e.zDirection===void 0?1:e.zDirection})||this,n.format_=e.format?e.format:null,n.sourceTileCache=new F6(n.tileCache.highWaterMark),n.overlaps_=e.overlaps==null?!0:e.overlaps,n.tileClass=e.tileClass?e.tileClass:ZJ,n.tileGrids_={},n}return t.prototype.getFeaturesInExtent=function(e){var n=[],i=this.tileCache;if(i.getCount()===0)return n;var o=XL(i.peekFirstKey())[0],s=this.tileGrid;return i.forEach(function(a){if(!(a.tileCoord[0]!==o||a.getState()!==Vr.LOADED))for(var f=a.getSourceTiles(),g=0,b=f.length;g<b;++g){var I=f[g],S=I.tileCoord;if(Hu(e,s.getTileCoordExtent(S))){var B=I.getFeatures();if(B)for(var P=0,U=B.length;P<U;++P){var j=B[P],q=j.getGeometry();Hu(e,q.getExtent())&&n.push(j)}}}}),n},t.prototype.getOverlaps=function(){return this.overlaps_},t.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},t.prototype.expireCache=function(e,n){var i=this.getTileCacheForProjection(e),o=Object.keys(n).reduce(function(s,a){var f=uJ(a),g=i.peek(f);if(g)for(var b=g.sourceTiles,I=0,S=b.length;I<S;++I)s[b[I].getKey()]=!0;return s},{});r.prototype.expireCache.call(this,e,n),this.sourceTileCache.expireCache(o)},t.prototype.getSourceTiles=function(e,n,i){var o=this;if(i.getState()===Vr.IDLE){i.setState(Vr.LOADING);var s=i.wrappedTileCoord,a=this.getTileGridForProjection(n),f=a.getTileCoordExtent(s),g=s[0],b=a.getResolution(g);t0(f,-b,f);var I=this.tileGrid,S=I.getExtent();S&&H0(f,S,f);var B=I.getZForResolution(b,this.zDirection);I.forEachTileCoord(f,B,function(P){var U=o.tileUrlFunction(P,e,n),j=o.sourceTileCache.containsKey(U)?o.sourceTileCache.get(U):new o.tileClass(P,U?Vr.IDLE:Vr.EMPTY,U,o.format_,o.tileLoadFunction);i.sourceTiles.push(j);var q=j.getState();if(q<Vr.LOADED){var W=function(ee){o.handleTileChange(ee);var J=j.getState();if(J===Vr.LOADED||J===Vr.ERROR){var $=j.getKey();$ in i.errorTileKeys?j.getState()===Vr.LOADED&&delete i.errorTileKeys[$]:i.loadingSourceTiles--,J===Vr.ERROR?i.errorTileKeys[$]=!0:j.removeEventListener(_o.CHANGE,W),i.loadingSourceTiles===0&&i.setState(rg(i.errorTileKeys)?Vr.LOADED:Vr.ERROR)}};j.addEventListener(_o.CHANGE,W),i.loadingSourceTiles++}q===Vr.IDLE&&(j.extent=I.getTileCoordExtent(P),j.projection=n,j.resolution=I.getResolution(P[0]),o.sourceTileCache.set(U,j),j.load())}),i.loadingSourceTiles||i.setState(i.sourceTiles.some(function(P){return P.getState()===Vr.ERROR})?Vr.ERROR:Vr.LOADED)}return i.sourceTiles},t.prototype.getTile=function(e,n,i,o,s){var a=H1(e,n,i),f=this.getKey(),g;if(this.tileCache.containsKey(a)&&(g=this.tileCache.get(a),g.key===f))return g;var b=[e,n,i],I=this.getTileCoordForTileUrlFunction(b,s),S=this.getTileGrid().getExtent(),B=this.getTileGridForProjection(s);if(I&&S){var P=B.getTileCoordExtent(I);t0(P,-B.getResolution(e),P),Hu(S,P)||(I=null)}var U=!0;if(I!==null){var j=this.tileGrid,q=B.getResolution(e),W=j.getZForResolution(q,1),ee=B.getTileCoordExtent(I);t0(ee,-q,ee),j.forEachTileCoord(ee,W,(function($){U=U&&!this.tileUrlFunction($,o,s)}).bind(this))}var J=new JJ(b,U?Vr.EMPTY:Vr.IDLE,I,this.getSourceTiles.bind(this,o,s));return J.key=f,g?(J.interimTile=g,J.refreshInterimChain(),this.tileCache.replace(a,J)):this.tileCache.set(a,J),J},t.prototype.getTileGridForProjection=function(e){var n=e.getCode(),i=this.tileGrids_[n];if(!i){for(var o=this.tileGrid,s=o.getResolutions().slice(),a=s.map(function(I,S){return o.getOrigin(S)}),f=s.map(function(I,S){return o.getTileSize(S)}),g=xL+1,b=s.length;b<g;++b)s.push(s[b-1]/2),a.push(a[b-1]),f.push(f[b-1]);i=new qv({extent:o.getExtent(),origins:a,resolutions:s,tileSizes:f}),this.tileGrids_[n]=i}return i},t.prototype.getTilePixelRatio=function(e){return e},t.prototype.getTilePixelSize=function(e,n,i){var o=this.getTileGridForProjection(i),s=Td(o.getTileSize(e),this.tmpSize);return[Math.round(s[0]*n),Math.round(s[1]*n)]},t.prototype.updateCacheSize=function(e,n){r.prototype.updateCacheSize.call(this,e*2,n),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(n).highWaterMark},t}(aF);function tee(r,t){r.setLoader(function(e,n,i){$L(t,r.getFormat(),e,n,i,r.onLoad.bind(r),r.onError.bind(r))})}var m3,D8;function nee(){if(D8)return m3;D8=1;var r={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},t=" ",e=/(italic|oblique)$/i,n={};return m3=function(i,o,s){var a=n[i];if(!a){Array.isArray(i)||(i=[i]);for(var f=400,g="normal",b=[],I,S,B=0,P=i.length;B<P;++B){var U=i[B],j=U.split(" "),q=j[j.length-1].toLowerCase();q=="normal"||q=="italic"||q=="oblique"?(g=S?g:q,S=!0,j.pop(),q=j[j.length-1].toLowerCase()):e.test(q)&&(q=q.replace(e,""),g=S?g:j[j.length-1].replace(q,""),S=!0);for(var W in r){var ee=j.length>1?j[j.length-2].toLowerCase():"";if(q==W||q==W.replace("-","")||ee+"-"+q==W){f=I?f:r[W],j.pop(),ee&&W.startsWith(ee)&&j.pop();break}}!I&&typeof q=="number"&&(f=q,I=!0);var J=j.join(t).replace("Klokantech Noto Sans","Noto Sans");J.indexOf(t)!==-1&&(J='"'+J+'"'),b.push(J)}a=n[i]=[g,f,b]}return a[0]+t+a[1]+t+o+"px"+(s?"/"+s:"")+t+a[2]},m3}var ree=nee();const eE=us(ree);var iee=8,oee={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"}}]}},aee={"*":{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."}},see=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],lee={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."}},uee={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."}},Aee={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."}},cee={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>}`."}},dee={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."}}},hee={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."}}},fee={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."}},pee=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],mee={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"}},gee={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"}},yee={"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"}},vee={"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"}},_ee={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"}},Cee={"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"}},bee={"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"}},xee={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"}},wee={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"}},Mee={type:"array",value:"*",doc:"A filter selects specific features from a layer."},See={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"]}},Eee={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"]}},Oee={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"]}},Bee={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"]}},Iee={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"]}},kee={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."},Tee={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."},Pee={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},Kee={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},Ree={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"}}}}},Dee={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"}}}},Lee={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"}}}},Fee={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"}}}},Uee={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"}}}},jee=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],zee={"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"}},Nee={"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"}},Gee={"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"}},Wee={"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"}},Qee={"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"}},qee={"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"}},Yee={"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"}},$ee={"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"}},Vee={"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"}},Hee={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."}},Zee={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},dF={$version:iee,$root:oee,sources:aee,source:see,source_vector:lee,source_raster:uee,source_raster_dem:Aee,source_geojson:cee,source_video:dee,source_image:hee,layer:fee,layout:pee,layout_background:mee,layout_sky:gee,layout_fill:yee,layout_circle:vee,layout_heatmap:_ee,"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:Cee,layout_symbol:bee,layout_raster:xee,layout_hillshade:wee,filter:Mee,filter_symbol:See,filter_fill:Eee,filter_line:Oee,filter_circle:Bee,"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:Iee,filter_operator:kee,geometry_type:Tee,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:Pee,expression:Kee,expression_name:Ree,fog:Dee,light:Lee,projection:Fee,terrain:Uee,paint:jee,paint_fill:zee,"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:Nee,paint_circle:Gee,paint_heatmap:Wee,paint_symbol:Qee,paint_raster:qee,paint_hillshade:Yee,paint_background:$ee,paint_sky:Vee,transition:Hee,"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:Zee},g3=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{},tE={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */(function(r,t){(function(e){var n=t&&!t.nodeType&&t,i=!r.nodeType&&r,o=typeof g3=="object"&&g3;(o.global===o||o.window===o||o.self===o)&&(e=o);var s,a=2147483647,f=36,g=1,b=26,I=38,S=700,B=72,P=128,U="-",j=/^xn--/,q=/[^\x20-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,ee={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},J=f-g,$=Math.floor,X=String.fromCharCode,G;function ae(Ue){throw RangeError(ee[Ue])}function ge(Ue,ke){for(var We=Ue.length,vt=[];We--;)vt[We]=ke(Ue[We]);return vt}function he(Ue,ke){var We=Ue.split("@"),vt="";We.length>1&&(vt=We[0]+"@",Ue=We[1]),Ue=Ue.replace(W,".");var Pt=Ue.split("."),ut=ge(Pt,ke).join(".");return vt+ut}function Ie(Ue){for(var ke=[],We=0,vt=Ue.length,Pt,ut;We<vt;)Pt=Ue.charCodeAt(We++),Pt>=55296&&Pt<=56319&&We<vt?(ut=Ue.charCodeAt(We++),(ut&64512)==56320?ke.push(((Pt&1023)<<10)+(ut&1023)+65536):(ke.push(Pt),We--)):ke.push(Pt);return ke}function re(Ue){return ge(Ue,function(ke){var We="";return ke>65535&&(ke-=65536,We+=X(ke>>>10&1023|55296),ke=56320|ke&1023),We+=X(ke),We}).join("")}function oe(Ue){return Ue-48<10?Ue-22:Ue-65<26?Ue-65:Ue-97<26?Ue-97:f}function Se(Ue,ke){return Ue+22+75*(Ue<26)-((ke!=0)<<5)}function ye(Ue,ke,We){var vt=0;for(Ue=We?$(Ue/S):Ue>>1,Ue+=$(Ue/ke);Ue>J*b>>1;vt+=f)Ue=$(Ue/J);return $(vt+(J+1)*Ue/(Ue+I))}function nt(Ue){var ke=[],We=Ue.length,vt,Pt=0,ut=P,jt=B,Rt,Ke,we,Fe,tt,mt,bt,Lt,Vt;for(Rt=Ue.lastIndexOf(U),Rt<0&&(Rt=0),Ke=0;Ke<Rt;++Ke)Ue.charCodeAt(Ke)>=128&&ae("not-basic"),ke.push(Ue.charCodeAt(Ke));for(we=Rt>0?Rt+1:0;we<We;){for(Fe=Pt,tt=1,mt=f;we>=We&&ae("invalid-input"),bt=oe(Ue.charCodeAt(we++)),(bt>=f||bt>$((a-Pt)/tt))&&ae("overflow"),Pt+=bt*tt,Lt=mt<=jt?g:mt>=jt+b?b:mt-jt,!(bt<Lt);mt+=f)Vt=f-Lt,tt>$(a/Vt)&&ae("overflow"),tt*=Vt;vt=ke.length+1,jt=ye(Pt-Fe,vt,Fe==0),$(Pt/vt)>a-ut&&ae("overflow"),ut+=$(Pt/vt),Pt%=vt,ke.splice(Pt++,0,ut)}return re(ke)}function Ne(Ue){var ke,We,vt,Pt,ut,jt,Rt,Ke,we,Fe,tt,mt=[],bt,Lt,Vt,rn;for(Ue=Ie(Ue),bt=Ue.length,ke=P,We=0,ut=B,jt=0;jt<bt;++jt)tt=Ue[jt],tt<128&&mt.push(X(tt));for(vt=Pt=mt.length,Pt&&mt.push(U);vt<bt;){for(Rt=a,jt=0;jt<bt;++jt)tt=Ue[jt],tt>=ke&&tt<Rt&&(Rt=tt);for(Lt=vt+1,Rt-ke>$((a-We)/Lt)&&ae("overflow"),We+=(Rt-ke)*Lt,ke=Rt,jt=0;jt<bt;++jt)if(tt=Ue[jt],tt<ke&&++We>a&&ae("overflow"),tt==ke){for(Ke=We,we=f;Fe=we<=ut?g:we>=ut+b?b:we-ut,!(Ke<Fe);we+=f)rn=Ke-Fe,Vt=f-Fe,mt.push(X(Se(Fe+rn%Vt,0))),Ke=$(rn/Vt);mt.push(X(Se(Ke,0))),ut=ye(We,Lt,vt==Pt),We=0,++vt}++We,++ke}return mt.join("")}function je(Ue){return he(Ue,function(ke){return j.test(ke)?nt(ke.slice(4).toLowerCase()):ke})}function et(Ue){return he(Ue,function(ke){return q.test(ke)?"xn--"+Ne(ke):ke})}if(s={version:"1.3.2",ucs2:{decode:Ie,encode:re},decode:nt,encode:Ne,toASCII:et,toUnicode:je},n&&i)if(r.exports==n)i.exports=s;else for(G in s)s.hasOwnProperty(G)&&(n[G]=s[G]);else e.punycode=s})(g3)})(tE,tE.exports);var Xee={isString:function(r){return typeof r=="string"},isObject:function(r){return typeof r=="object"&&r!==null},isNull:function(r){return r===null},isNullOrUndefined:function(r){return r==null}},_v={};function Jee(r,t){return Object.prototype.hasOwnProperty.call(r,t)}var ete=function(r,t,e,n){t=t||"&",e=e||"=";var i={};if(typeof r!="string"||r.length===0)return i;var o=/\+/g;r=r.split(t);var s=1e3;n&&typeof n.maxKeys=="number"&&(s=n.maxKeys);var a=r.length;s>0&&a>s&&(a=s);for(var f=0;f<a;++f){var g=r[f].replace(o,"%20"),b=g.indexOf(e),I,S,B,P;b>=0?(I=g.substr(0,b),S=g.substr(b+1)):(I=g,S=""),B=decodeURIComponent(I),P=decodeURIComponent(S),Jee(i,B)?Array.isArray(i[B])?i[B].push(P):i[B]=[i[B],P]:i[B]=P}return i},by=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}},tte=function(r,t,e,n){return t=t||"&",e=e||"=",r===null&&(r=void 0),typeof r=="object"?Object.keys(r).map(function(i){var o=encodeURIComponent(by(i))+e;return Array.isArray(r[i])?r[i].map(function(s){return o+encodeURIComponent(by(s))}).join(t):o+encodeURIComponent(by(r[i]))}).join(t):n?encodeURIComponent(by(n))+e+encodeURIComponent(by(r)):""};_v.decode=_v.parse=ete;_v.encode=_v.stringify=tte;var nte=tE.exports,Am=Xee;function mm(){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 rte=/^([a-z0-9.+-]+:)/i,ite=/:[0-9]*$/,ote=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ate=["<",">",'"',"`"," ","\r",`
|
||
`," "],ste=["{","}","|","\\","^","`"].concat(ate),nE=["'"].concat(ste),L8=["%","/","?",";","#"].concat(nE),F8=["/","?","#"],lte=255,U8=/^[+a-z0-9A-Z_-]{0,63}$/,ute=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ate={javascript:!0,"javascript:":!0},rE={javascript:!0,"javascript:":!0},b1={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},iE=_v;function cte(r,t,e){if(r&&Am.isObject(r)&&r instanceof mm)return r;var n=new mm;return n.parse(r,t,e),n}mm.prototype.parse=function(r,t,e){if(!Am.isString(r))throw new TypeError("Parameter 'url' must be a string, not "+typeof r);var n=r.indexOf("?"),i=n!==-1&&n<r.indexOf("#")?"?":"#",o=r.split(i),s=/\\/g;o[0]=o[0].replace(s,"/"),r=o.join(i);var a=r;if(a=a.trim(),!e&&r.split("#").length===1){var f=ote.exec(a);if(f)return this.path=a,this.href=a,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=iE.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var g=rte.exec(a);if(g){g=g[0];var b=g.toLowerCase();this.protocol=b,a=a.substr(g.length)}if(e||g||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var I=a.substr(0,2)==="//";I&&!(g&&rE[g])&&(a=a.substr(2),this.slashes=!0)}if(!rE[g]&&(I||g&&!b1[g])){for(var S=-1,B=0;B<F8.length;B++){var P=a.indexOf(F8[B]);P!==-1&&(S===-1||P<S)&&(S=P)}var U,j;S===-1?j=a.lastIndexOf("@"):j=a.lastIndexOf("@",S),j!==-1&&(U=a.slice(0,j),a=a.slice(j+1),this.auth=decodeURIComponent(U)),S=-1;for(var B=0;B<L8.length;B++){var P=a.indexOf(L8[B]);P!==-1&&(S===-1||P<S)&&(S=P)}S===-1&&(S=a.length),this.host=a.slice(0,S),a=a.slice(S),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var W=this.hostname.split(/\./),B=0,ee=W.length;B<ee;B++){var J=W[B];if(J&&!J.match(U8)){for(var $="",X=0,G=J.length;X<G;X++)J.charCodeAt(X)>127?$+="x":$+=J[X];if(!$.match(U8)){var ae=W.slice(0,B),ge=W.slice(B+1),he=J.match(ute);he&&(ae.push(he[1]),ge.unshift(he[2])),ge.length&&(a="/"+ge.join(".")+a),this.hostname=ae.join(".");break}}}this.hostname.length>lte?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=nte.toASCII(this.hostname));var Ie=this.port?":"+this.port:"",re=this.hostname||"";this.host=re+Ie,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a))}if(!Ate[b])for(var B=0,ee=nE.length;B<ee;B++){var oe=nE[B];if(a.indexOf(oe)!==-1){var Se=encodeURIComponent(oe);Se===oe&&(Se=escape(oe)),a=a.split(oe).join(Se)}}var ye=a.indexOf("#");ye!==-1&&(this.hash=a.substr(ye),a=a.slice(0,ye));var nt=a.indexOf("?");if(nt!==-1?(this.search=a.substr(nt),this.query=a.substr(nt+1),t&&(this.query=iE.parse(this.query)),a=a.slice(0,nt)):t&&(this.search="",this.query={}),a&&(this.pathname=a),b1[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Ie=this.pathname||"",Ne=this.search||"";this.path=Ie+Ne}return this.href=this.format(),this};mm.prototype.format=function(){var r=this.auth||"";r&&(r=encodeURIComponent(r),r=r.replace(/%3A/i,":"),r+="@");var t=this.protocol||"",e=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=r+this.host:this.hostname&&(i=r+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&Am.isObject(this.query)&&Object.keys(this.query).length&&(o=iE.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||b1[t])&&i!==!1?(i="//"+(i||""),e&&e.charAt(0)!=="/"&&(e="/"+e)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),s&&s.charAt(0)!=="?"&&(s="?"+s),e=e.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),s=s.replace("#","%23"),t+i+e+s+n};mm.prototype.resolve=function(r){return this.resolveObject(cte(r,!1,!0)).format()};mm.prototype.resolveObject=function(r){if(Am.isString(r)){var t=new mm;t.parse(r,!1,!0),r=t}for(var e=new mm,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];e[o]=this[o]}if(e.hash=r.hash,r.href==="")return e.href=e.format(),e;if(r.slashes&&!r.protocol){for(var s=Object.keys(r),a=0;a<s.length;a++){var f=s[a];f!=="protocol"&&(e[f]=r[f])}return b1[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(r.protocol&&r.protocol!==e.protocol){if(!b1[r.protocol]){for(var g=Object.keys(r),b=0;b<g.length;b++){var I=g[b];e[I]=r[I]}return e.href=e.format(),e}if(e.protocol=r.protocol,!r.host&&!rE[r.protocol]){for(var ee=(r.pathname||"").split("/");ee.length&&!(r.host=ee.shift()););r.host||(r.host=""),r.hostname||(r.hostname=""),ee[0]!==""&&ee.unshift(""),ee.length<2&&ee.unshift(""),e.pathname=ee.join("/")}else e.pathname=r.pathname;if(e.search=r.search,e.query=r.query,e.host=r.host||"",e.auth=r.auth,e.hostname=r.hostname||r.host,e.port=r.port,e.pathname||e.search){var S=e.pathname||"",B=e.search||"";e.path=S+B}return e.slashes=e.slashes||r.slashes,e.href=e.format(),e}var P=e.pathname&&e.pathname.charAt(0)==="/",U=r.host||r.pathname&&r.pathname.charAt(0)==="/",j=U||P||e.host&&r.pathname,q=j,W=e.pathname&&e.pathname.split("/")||[],ee=r.pathname&&r.pathname.split("/")||[],J=e.protocol&&!b1[e.protocol];if(J&&(e.hostname="",e.port=null,e.host&&(W[0]===""?W[0]=e.host:W.unshift(e.host)),e.host="",r.protocol&&(r.hostname=null,r.port=null,r.host&&(ee[0]===""?ee[0]=r.host:ee.unshift(r.host)),r.host=null),j=j&&(ee[0]===""||W[0]==="")),U)e.host=r.host||r.host===""?r.host:e.host,e.hostname=r.hostname||r.hostname===""?r.hostname:e.hostname,e.search=r.search,e.query=r.query,W=ee;else if(ee.length)W||(W=[]),W.pop(),W=W.concat(ee),e.search=r.search,e.query=r.query;else if(!Am.isNullOrUndefined(r.search)){if(J){e.hostname=e.host=W.shift();var $=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;$&&(e.auth=$.shift(),e.host=e.hostname=$.shift())}return e.search=r.search,e.query=r.query,(!Am.isNull(e.pathname)||!Am.isNull(e.search))&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!W.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var X=W.slice(-1)[0],G=(e.host||r.host||W.length>1)&&(X==="."||X==="..")||X==="",ae=0,ge=W.length;ge>=0;ge--)X=W[ge],X==="."?W.splice(ge,1):X===".."?(W.splice(ge,1),ae++):ae&&(W.splice(ge,1),ae--);if(!j&&!q)for(;ae--;ae)W.unshift("..");j&&W[0]!==""&&(!W[0]||W[0].charAt(0)!=="/")&&W.unshift(""),G&&W.join("/").substr(-1)!=="/"&&W.push("");var he=W[0]===""||W[0]&&W[0].charAt(0)==="/";if(J){e.hostname=e.host=he?"":W.length?W.shift():"";var $=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;$&&(e.auth=$.shift(),e.host=e.hostname=$.shift())}return j=j||e.host&&W.length,j&&!he&&W.unshift(""),W.length?e.pathname=W.join("/"):(e.pathname=null,e.path=null),(!Am.isNull(e.pathname)||!Am.isNull(e.search))&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=r.auth||e.auth,e.slashes=e.slashes||r.slashes,e.href=e.format(),e};mm.prototype.parseHost=function(){var r=this.host,t=ite.exec(r);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),r=r.substr(0,r.length-t.length)),r&&(this.hostname=r)};function hF(r,...t){for(const e of t)for(const n in e)r[n]=e[n];return r}class dte extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}var bp=dte;class j6{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[n,i]of e)this.bindings[n]=i}concat(t){return new j6(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1}}var hte=j6;const d2={kind:"null"},Br={kind:"number"},ia={kind:"string"},Wo={kind:"boolean"},gm={kind:"color"},x1={kind:"object"},qo={kind:"value"},fte={kind:"error"},h2={kind:"collator"},f2={kind:"formatted"},Yv={kind:"resolvedImage"};function lf(r,t){return{kind:"array",itemType:r,N:t}}function ql(r){if(r.kind==="array"){const t=ql(r.itemType);return typeof r.N=="number"?`array<${t}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${t}>`}else return r.kind}const pte=[d2,Br,ia,Wo,gm,f2,x1,lf(qo),Yv];function Cv(r,t){if(t.kind==="error")return null;if(r.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Cv(r.itemType,t.itemType))&&(typeof r.N!="number"||r.N===t.N))return null}else{if(r.kind===t.kind)return null;if(r.kind==="value"){for(const e of pte)if(!Cv(e,t))return null}}return`Expected ${ql(r)} but found ${ql(t)} instead.`}function z6(r,t){return t.some(e=>e.kind===r.kind)}function bv(r,t){return t.some(e=>e==="null"?r===null:e==="array"?Array.isArray(r):e==="object"?r&&!Array.isArray(r)&&typeof r=="object":e===typeof r)}var mte={},fF,j8={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 Xy(r){return r=Math.round(r),r<0?0:r>255?255:r}function z8(r){return r<0?0:r>1?1:r}function y3(r){return r[r.length-1]==="%"?Xy(parseFloat(r)/100*255):Xy(parseInt(r))}function V_(r){return r[r.length-1]==="%"?z8(parseFloat(r)/100):z8(parseFloat(r))}function v3(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function gte(r){var t=r.replace(/ /g,"").toLowerCase();if(t in j8)return j8[t].slice();if(t[0]==="#"){if(t.length===4){var e=parseInt(t.substr(1),16);return e>=0&&e<=4095?[(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,1]:null}else if(t.length===7){var e=parseInt(t.substr(1),16);return e>=0&&e<=16777215?[(e&16711680)>>16,(e&65280)>>8,e&255,1]:null}return null}var n=t.indexOf("("),i=t.indexOf(")");if(n!==-1&&i+1===t.length){var o=t.substr(0,n),s=t.substr(n+1,i-(n+1)).split(","),a=1;switch(o){case"rgba":if(s.length!==4)return null;a=V_(s.pop());case"rgb":return s.length!==3?null:[y3(s[0]),y3(s[1]),y3(s[2]),a];case"hsla":if(s.length!==4)return null;a=V_(s.pop());case"hsl":if(s.length!==3)return null;var f=(parseFloat(s[0])%360+360)%360/360,g=V_(s[1]),b=V_(s[2]),I=b<=.5?b*(g+1):b+g-b*g,S=b*2-I;return[Xy(v3(S,I,f+1/3)*255),Xy(v3(S,I,f)*255),Xy(v3(S,I,f-1/3)*255),a];default:return null}}return null}try{fF=mte.parseCSSColor=gte}catch{}class uh{constructor(t,e,n,i=1){this.r=t,this.g=e,this.b=n,this.a=i}static parse(t){if(!t)return;if(t instanceof uh)return t;if(typeof t!="string")return;const e=fF(t);if(e)return new uh(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}toString(){const[t,e,n,i]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(n)},${i})`}toArray(){const{r:t,g:e,b:n,a:i}=this;return i===0?[0,0,0,0]:[t*255/i,e*255/i,n*255/i,i]}toArray01(){const{r:t,g:e,b:n,a:i}=this;return i===0?[0,0,0,0]:[t/i,e/i,n/i,i]}toArray01PremultipliedAlpha(){const{r:t,g:e,b:n,a:i}=this;return[t,e,n,i]}}uh.black=new uh(0,0,0,1);uh.white=new uh(1,1,1,1);uh.transparent=new uh(0,0,0,0);uh.red=new uh(1,0,0,1);uh.blue=new uh(0,0,1,1);var LA=uh;class N6{constructor(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class oE{constructor(t,e,n,i,o){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=i,this.textColor=o}}class Qf{constructor(t){this.sections=t}static fromString(t){return new Qf([new oE(t,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof Qf?t:Qf.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const n={};e.fontStack&&(n["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(n["font-scale"]=e.scale),e.textColor&&(n["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(n)}return t}}class Cm{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Cm({name:t,available:!1}):null}serialize(){return["image",this.name]}}function pF(r,t,e,n){return typeof r=="number"&&r>=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255?typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[r,t,e,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[r,t,e,n]:[r,t,e]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ab(r){if(r===null)return!0;if(typeof r=="string")return!0;if(typeof r=="boolean")return!0;if(typeof r=="number")return!0;if(r instanceof LA)return!0;if(r instanceof N6)return!0;if(r instanceof Qf)return!0;if(r instanceof Cm)return!0;if(Array.isArray(r)){for(const t of r)if(!Ab(t))return!1;return!0}else if(typeof r=="object"){for(const t in r)if(!Ab(r[t]))return!1;return!0}else return!1}function DA(r){if(r===null)return d2;if(typeof r=="string")return ia;if(typeof r=="boolean")return Wo;if(typeof r=="number")return Br;if(r instanceof LA)return gm;if(r instanceof N6)return h2;if(r instanceof Qf)return f2;if(r instanceof Cm)return Yv;if(Array.isArray(r)){const t=r.length;let e;for(const n of r){const i=DA(n);if(!e)e=i;else{if(e===i)continue;e=qo;break}}return lf(e||qo,t)}else return x1}function Jy(r){const t=typeof r;return r===null?"":t==="string"||t==="number"||t==="boolean"?String(r):r instanceof LA||r instanceof Qf||r instanceof Cm?r.toString():JSON.stringify(r)}class G6{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(t.length!==2)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Ab(t[1]))return e.error("invalid value");const n=t[1];let i=DA(n);const o=e.expectedType;return i.kind==="array"&&i.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(i=o),new G6(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof LA?["rgba"].concat(this.value.toArray()):this.value instanceof Qf?this.value.serialize():this.value}}var cb=G6;class yte{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}var Ec=yte;const _3={string:ia,number:Br,boolean:Wo,object:x1};class W6{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let n=1,i;const o=t[0];if(o==="array"){let a;if(t.length>2){const g=t[1];if(typeof g!="string"||!(g in _3)||g==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=_3[g],n++}else a=qo;let f;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);f=t[2],n++}i=lf(a,f)}else i=_3[o];const s=[];for(;n<t.length;n++){const a=e.parse(t[n],n,qo);if(!a)return null;s.push(a)}return new W6(i,s)}evaluate(t){for(let e=0;e<this.args.length;e++){const n=this.args[e].evaluate(t);if(Cv(this.type,DA(n))){if(e===this.args.length-1)throw new Ec(`Expected value to be of type ${ql(this.type)}, but found ${ql(DA(n))} instead.`)}else return n}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}serialize(){const t=this.type,e=[t.kind];if(t.kind==="array"){const n=t.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){e.push(n.kind);const i=t.N;(typeof i=="number"||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map(n=>n.serialize()))}}var hm=W6;class p2{constructor(t){this.type=f2,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");const i=[];let o=!1;for(let s=1;s<=t.length-1;++s){const a=t[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;let f=null;if(a["font-scale"]&&(f=e.parse(a["font-scale"],1,Br),!f))return null;let g=null;if(a["text-font"]&&(g=e.parse(a["text-font"],1,lf(ia)),!g))return null;let b=null;if(a["text-color"]&&(b=e.parse(a["text-color"],1,gm),!b))return null;const I=i[i.length-1];I.scale=f,I.font=g,I.textColor=b}else{const f=e.parse(t[s],1,qo);if(!f)return null;const g=f.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:f,scale:null,font:null,textColor:null})}}return new p2(i)}evaluate(t){const e=n=>{const i=n.content.evaluate(t);return DA(i)===Yv?new oE("",i,null,null,null):new oE(Jy(i),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)};return new Qf(this.sections.map(e))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const n={};e.scale&&(n["font-scale"]=e.scale.serialize()),e.font&&(n["text-font"]=e.font.serialize()),e.textColor&&(n["text-color"]=e.textColor.serialize()),t.push(n)}return t}}class m2{constructor(t){this.type=Yv,this.input=t}static parse(t,e){if(t.length!==2)return e.error("Expected two arguments.");const n=e.parse(t[1],1,ia);return n?new m2(n):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),n=Cm.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const vte={"to-boolean":Wo,"to-color":gm,"to-number":Br,"to-string":ia};class Q6{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const n=t[0];if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");const i=vte[n],o=[];for(let s=1;s<t.length;s++){const a=e.parse(t[s],s,qo);if(!a)return null;o.push(a)}return new Q6(i,o)}evaluate(t){if(this.type.kind==="boolean")return!!this.args[0].evaluate(t);if(this.type.kind==="color"){let e,n;for(const i of this.args){if(e=i.evaluate(t),n=null,e instanceof LA)return e;if(typeof e=="string"){const o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&(e.length<3||e.length>4?n=`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:n=pF(e[0],e[1],e[2],e[3]),!n))return new LA(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Ec(n||`Could not parse color from value '${typeof e=="string"?e:String(JSON.stringify(e))}'`)}else if(this.type.kind==="number"){let e=null;for(const n of this.args){if(e=n.evaluate(t),e===null)return 0;const i=Number(e);if(!isNaN(i))return i}throw new Ec(`Could not convert ${JSON.stringify(e)} to number.`)}else return this.type.kind==="formatted"?Qf.fromString(Jy(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?Cm.fromString(Jy(this.args[0].evaluate(t))):Jy(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}serialize(){if(this.type.kind==="formatted")return new p2([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new m2(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild(e=>{t.push(e.serialize())}),t}}var A1=Q6;const _te=["Unknown","Point","LineString","Polygon"];class Cte{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"?_te[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 t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:n,y:i}=this.featureTileCoord,o=n*e-t[0],s=i*e-t[1],a=this.featureDistanceData.bearing[0],f=this.featureDistanceData.bearing[1];return a*o+f*s}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=LA.parse(t)),e}}var mF=Cte;class c1{constructor(t,e,n,i){this.name=t,this.type=e,this._evaluate=n,this.args=i}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(t=>t.serialize()))}static parse(t,e){const n=t[0],i=c1.definitions[n];if(!i)return e.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(i)?i[0]:i.type,s=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,a=s.filter(([g])=>!Array.isArray(g)||g.length===t.length-1);let f=null;for(const[g,b]of a){f=new CF(e.registry,e.path,null,e.scope);const I=[];let S=!1;for(let B=1;B<t.length;B++){const P=t[B],U=Array.isArray(g)?g[B-1]:g.type,j=f.parse(P,1+I.length,U);if(!j){S=!0;break}I.push(j)}if(!S){if(Array.isArray(g)&&g.length!==I.length){f.error(`Expected ${g.length} arguments, but found ${I.length} instead.`);continue}for(let B=0;B<I.length;B++){const P=Array.isArray(g)?g[B]:g.type,U=I[B];f.concat(B+1).checkSubtype(P,U.type)}if(f.errors.length===0)return new c1(n,o,b,I)}}if(a.length===1)e.errors.push(...f.errors);else{const b=(a.length?a:s).map(([S])=>bte(S)).join(" | "),I=[];for(let S=1;S<t.length;S++){const B=e.parse(t[S],1+I.length);if(!B)return null;I.push(ql(B.type))}e.error(`Expected arguments of type ${b}, but found (${I.join(", ")}) instead.`)}return null}static register(t,e){c1.definitions=e;for(const n in e)t[n]=c1}}function bte(r){return Array.isArray(r)?`(${r.map(ql).join(", ")})`:`(${ql(r.type)}...)`}var Z1=c1;class g2{constructor(t,e,n){this.type=h2,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(t.length!==2)return e.error("Expected one argument.");const n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");const i=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,Wo);if(!i)return null;const o=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,Wo);if(!o)return null;let s=null;return n.locale&&(s=e.parse(n.locale,1,ia),!s)?null:new g2(i,o,s)}evaluate(t){return new N6(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}serialize(){const t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}const i0=8192;function q6(r,t){r[0]=Math.min(r[0],t[0]),r[1]=Math.min(r[1],t[1]),r[2]=Math.max(r[2],t[0]),r[3]=Math.max(r[3],t[1])}function xte(r){return(180+r)/360}function wte(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function db(r,t){return!(r[0]<=t[0]||r[2]>=t[2]||r[1]<=t[1]||r[3]>=t[3])}function Mte(r,t){const e=xte(r[0]),n=wte(r[1]),i=Math.pow(2,t.z);return[Math.round(e*i*i0),Math.round(n*i*i0)]}function Ste(r,t,e){const n=r[0]-t[0],i=r[1]-t[1],o=r[0]-e[0],s=r[1]-e[1];return n*s-o*i===0&&n*o<=0&&i*s<=0}function Ete(r,t,e){return t[1]>r[1]!=e[1]>r[1]&&r[0]<(e[0]-t[0])*(r[1]-t[1])/(e[1]-t[1])+t[0]}function Y6(r,t){let e=!1;for(let n=0,i=t.length;n<i;n++){const o=t[n];for(let s=0,a=o.length;s<a-1;s++){if(Ste(r,o[s],o[s+1]))return!1;Ete(r,o[s],o[s+1])&&(e=!e)}}return e}function Ote(r,t){for(let e=0;e<t.length;e++)if(Y6(r,t[e]))return!0;return!1}function Bte(r,t){return r[0]*t[1]-r[1]*t[0]}function N8(r,t,e,n){const i=r[0]-e[0],o=r[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],f=n[0]-e[0],g=n[1]-e[1],b=i*g-f*o,I=s*g-f*a;return b>0&&I<0||b<0&&I>0}function Ite(r,t,e,n){const i=[t[0]-r[0],t[1]-r[1]],o=[n[0]-e[0],n[1]-e[1]];return Bte(o,i)===0?!1:!!(N8(r,t,e,n)&&N8(e,n,r,t))}function kte(r,t,e){for(const n of e)for(let i=0;i<n.length-1;++i)if(Ite(r,t,n[i],n[i+1]))return!0;return!1}function gF(r,t){for(let e=0;e<r.length;++e)if(!Y6(r[e],t))return!1;for(let e=0;e<r.length-1;++e)if(kte(r[e],r[e+1],t))return!1;return!0}function Tte(r,t){for(let e=0;e<t.length;e++)if(gF(r,t[e]))return!0;return!1}function $6(r,t,e){const n=[];for(let i=0;i<r.length;i++){const o=[];for(let s=0;s<r[i].length;s++){const a=Mte(r[i][s],e);q6(t,a),o.push(a)}n.push(o)}return n}function yF(r,t,e){const n=[];for(let i=0;i<r.length;i++){const o=$6(r[i],t,e);n.push(o)}return n}function vF(r,t,e,n){if(r[0]<e[0]||r[0]>e[2]){const i=n*.5;let o=r[0]-e[0]>i?-n:e[0]-r[0]>i?n:0;o===0&&(o=r[0]-e[2]>i?-n:e[2]-r[0]>i?n:0),r[0]+=o}q6(t,r)}function Pte(r){r[0]=r[1]=1/0,r[2]=r[3]=-1/0}function G8(r,t,e,n){const i=Math.pow(2,n.z)*i0,o=[n.x*i0,n.y*i0],s=[];if(!r)return s;for(const a of r)for(const f of a){const g=[f.x+o[0],f.y+o[1]];vF(g,t,e,i),s.push(g)}return s}function W8(r,t,e,n){const i=Math.pow(2,n.z)*i0,o=[n.x*i0,n.y*i0],s=[];if(!r)return s;for(const a of r){const f=[];for(const g of a){const b=[g.x+o[0],g.y+o[1]];q6(t,b),f.push(b)}s.push(f)}if(t[2]-t[0]<=i/2){Pte(t);for(const a of s)for(const f of a)vF(f,t,e,i)}return s}function Kte(r,t){const e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=r.canonicalID();if(!i)return!1;if(t.type==="Polygon"){const o=$6(t.coordinates,n,i),s=G8(r.geometry(),e,n,i);if(!db(e,n))return!1;for(const a of s)if(!Y6(a,o))return!1}if(t.type==="MultiPolygon"){const o=yF(t.coordinates,n,i),s=G8(r.geometry(),e,n,i);if(!db(e,n))return!1;for(const a of s)if(!Ote(a,o))return!1}return!0}function Rte(r,t){const e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=r.canonicalID();if(!i)return!1;if(t.type==="Polygon"){const o=$6(t.coordinates,n,i),s=W8(r.geometry(),e,n,i);if(!db(e,n))return!1;for(const a of s)if(!gF(a,o))return!1}if(t.type==="MultiPolygon"){const o=yF(t.coordinates,n,i),s=W8(r.geometry(),e,n,i);if(!db(e,n))return!1;for(const a of s)if(!Tte(a,o))return!1}return!0}class ev{constructor(t,e){this.type=Wo,this.geojson=t,this.geometries=e}static parse(t,e){if(t.length!==2)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ab(t[1])){const n=t[1];if(n.type==="FeatureCollection")for(let i=0;i<n.features.length;++i){const o=n.features[i].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new ev(n,n.features[i].geometry)}else if(n.type==="Feature"){const i=n.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new ev(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ev(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return Kte(t,this.geometries);if(t.geometryType()==="LineString")return Rte(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var V6=ev;function y2(r){if(r instanceof Z1){if(r.name==="get"&&r.args.length===1)return!1;if(r.name==="feature-state")return!1;if(r.name==="has"&&r.args.length===1)return!1;if(r.name==="properties"||r.name==="geometry-type"||r.name==="id")return!1;if(/^filter-/.test(r.name))return!1}if(r instanceof V6)return!1;let t=!0;return r.eachChild(e=>{t&&!y2(e)&&(t=!1)}),t}function H6(r){if(r instanceof Z1&&r.name==="feature-state")return!1;let t=!0;return r.eachChild(e=>{t&&!H6(e)&&(t=!1)}),t}function Z6(r,t){if(r instanceof Z1&&t.indexOf(r.name)>=0)return!1;let e=!0;return r.eachChild(n=>{e&&!Z6(n,t)&&(e=!1)}),e}class X6{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");const n=t[1];return e.scope.has(n)?new X6(n,e.scope.get(n)):e.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var _F=X6;class J6{constructor(t,e=[],n,i=new hte,o=[]){this.registry=t,this.path=e,this.key=e.map(s=>`[${s}]`).join(""),this.scope=i,this.errors=o,this.expectedType=n}parse(t,e,n,i,o={}){return e?this.concat(e,n,i)._parse(t,o):this._parse(t,o)}_parse(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(i,o,s){return s==="assert"?new hm(o,[i]):s==="coerce"?new A1(o,[i]):i}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=t[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 s=o.parse(t,this);if(!s)return null;if(this.expectedType){const a=this.expectedType,f=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&f.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(f.kind==="value"||f.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,f))return null}if(!(s instanceof cb)&&s.type.kind!=="resolvedImage"&&aE(s)){const a=new mF;try{s=new cb(s.type,s.evaluate(a))}catch(f){return this.error(f.message),null}}return s}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,n){const i=typeof t=="number"?this.path.concat(t):this.path,o=n?this.scope.concat(n):this.scope;return new J6(this.registry,i,e||null,o,this.errors)}error(t,...e){const n=`${this.key}${e.map(i=>`[${i}]`).join("")}`;this.errors.push(new bp(n,t))}checkSubtype(t,e){const n=Cv(t,e);return n&&this.error(n),n}}var CF=J6;function aE(r){if(r instanceof _F)return aE(r.boundExpression);if(r instanceof Z1&&r.name==="error")return!1;if(r instanceof g2)return!1;if(r instanceof V6)return!1;const t=r instanceof A1||r instanceof hm;let e=!0;return r.eachChild(n=>{t?e=e&&aE(n):e=e&&n instanceof cb}),e?y2(r)&&Z6(r,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function v2(r,t){const e=r.length-1;let n=0,i=e,o=0,s,a;for(;n<=i;)if(o=Math.floor((n+i)/2),s=r[o],a=r[o+1],s<=t){if(o===e||t<a)return o;n=o+1}else if(s>t)i=o-1;else throw new Ec("Input is not a number.");return 0}class eO{constructor(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[i,o]of n)this.labels.push(i),this.outputs.push(o)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");const n=e.parse(t[1],1,Br);if(!n)return null;const i=[];let o=null;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(let s=1;s<t.length;s+=2){const a=s===1?-1/0:t[s],f=t[s+1],g=s,b=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(i.length&&i[i.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);const I=e.parse(f,b,o);if(!I)return null;o=o||I.type,i.push([a,I])}return new eO(o,n,i)}evaluate(t){const e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);const i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);const o=e.length;if(i>=e[o-1])return n[o-1].evaluate(t);const s=v2(e,i);return n[s].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}serialize(){const t=["step",this.input.serialize()];for(let e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var bF=eO,Dte=xF;function xF(r,t,e,n){this.cx=3*r,this.bx=3*(e-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=t,this.p2x=e,this.p2y=n}xF.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,t){if(t===void 0&&(t=1e-6),r<0)return 0;if(r>1)return 1;for(var e=r,n=0;n<8;n++){var i=this.sampleCurveX(e)-r;if(Math.abs(i)<t)return e;var o=this.sampleCurveDerivativeX(e);if(Math.abs(o)<1e-6)break;e=e-i/o}var s=0,a=1;for(e=r,n=0;n<20&&(i=this.sampleCurveX(e),!(Math.abs(i-r)<t));n++)r>i?s=e:a=e,e=(a-s)*.5+s;return e},solve:function(r,t){return this.sampleCurveY(this.solveCurveX(r,t))}};function Rh(r,t,e){return r*(1-e)+t*e}function Lte(r,t,e){return new LA(Rh(r.r,t.r,e),Rh(r.g,t.g,e),Rh(r.b,t.b,e),Rh(r.a,t.a,e))}function Fte(r,t,e){return r.map((n,i)=>Rh(n,t[i],e))}var wF=Object.freeze({__proto__:null,number:Rh,color:Lte,array:Fte});const MF=.95047,SF=1,EF=1.08883,OF=4/29,w1=6/29,BF=3*w1*w1,Ute=w1*w1*w1,jte=Math.PI/180,zte=180/Math.PI;function C3(r){return r>Ute?Math.pow(r,1/3):r/BF+OF}function b3(r){return r>w1?r*r*r:BF*(r-OF)}function x3(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function w3(r){return r/=255,r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function IF(r){const t=w3(r.r),e=w3(r.g),n=w3(r.b),i=C3((.4124564*t+.3575761*e+.1804375*n)/MF),o=C3((.2126729*t+.7151522*e+.072175*n)/SF),s=C3((.0193339*t+.119192*e+.9503041*n)/EF);return{l:116*o-16,a:500*(i-o),b:200*(o-s),alpha:r.a}}function kF(r){let t=(r.l+16)/116,e=isNaN(r.a)?t:t+r.a/500,n=isNaN(r.b)?t:t-r.b/200;return t=SF*b3(t),e=MF*b3(e),n=EF*b3(n),new LA(x3(3.2404542*e-1.5371385*t-.4985314*n),x3(-.969266*e+1.8760108*t+.041556*n),x3(.0556434*e-.2040259*t+1.0572252*n),r.alpha)}function Nte(r,t,e){return{l:Rh(r.l,t.l,e),a:Rh(r.a,t.a,e),b:Rh(r.b,t.b,e),alpha:Rh(r.alpha,t.alpha,e)}}function Gte(r){const{l:t,a:e,b:n}=IF(r),i=Math.atan2(n,e)*zte;return{h:i<0?i+360:i,c:Math.sqrt(e*e+n*n),l:t,alpha:r.a}}function Wte(r){const t=r.h*jte,e=r.c,n=r.l;return kF({l:n,a:Math.cos(t)*e,b:Math.sin(t)*e,alpha:r.alpha})}function Qte(r,t,e){const n=t-r;return r+e*(n>180||n<-180?n-360*Math.round(n/360):n)}function qte(r,t,e){return{h:Qte(r.h,t.h,e),c:Rh(r.c,t.c,e),l:Rh(r.l,t.l,e),alpha:Rh(r.alpha,t.alpha,e)}}const Ly={forward:IF,reverse:kF,interpolate:Nte},Fy={forward:Gte,reverse:Wte,interpolate:qte};var TF=Object.freeze({__proto__:null,lab:Ly,hcl:Fy});class hb{constructor(t,e,n,i,o){this.type=t,this.operator=e,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(const[s,a]of o)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(t,e,n,i){let o=0;if(t.name==="exponential")o=M3(e,t.base,n,i);else if(t.name==="linear")o=M3(e,1,n,i);else if(t.name==="cubic-bezier"){const s=t.controlPoints;o=new Dte(s[0],s[1],s[2],s[3]).solve(M3(e,1,n,i))}return o}static parse(t,e){let[n,i,o,...s]=t;if(!Array.isArray(i)||i.length===0)return e.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const g=i[1];if(typeof g!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:g}}else if(i[0]==="cubic-bezier"){const g=i.slice(1);if(g.length!==4||g.some(b=>typeof b!="number"||b<0||b>1))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:g}}else return e.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,Br),!o)return null;const a=[];let f=null;n==="interpolate-hcl"||n==="interpolate-lab"?f=gm:e.expectedType&&e.expectedType.kind!=="value"&&(f=e.expectedType);for(let g=0;g<s.length;g+=2){const b=s[g],I=s[g+1],S=g+3,B=g+4;if(typeof b!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',S);if(a.length&&a[a.length-1][0]>=b)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',S);const P=e.parse(I,B,f);if(!P)return null;f=f||P.type,a.push([b,P])}return f.kind!=="number"&&f.kind!=="color"&&!(f.kind==="array"&&f.itemType.kind==="number"&&typeof f.N=="number")?e.error(`Type ${ql(f)} is not interpolatable.`):new hb(f,n,i,o,a)}evaluate(t){const e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);const i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);const o=e.length;if(i>=e[o-1])return n[o-1].evaluate(t);const s=v2(e,i),a=e[s],f=e[s+1],g=hb.interpolationFactor(this.interpolation,i,a,f),b=n[s].evaluate(t),I=n[s+1].evaluate(t);return this.operator==="interpolate"?wF[this.type.kind.toLowerCase()](b,I,g):this.operator==="interpolate-hcl"?Fy.reverse(Fy.interpolate(Fy.forward(b),Fy.forward(I),g)):Ly.reverse(Ly.interpolate(Ly.forward(b),Ly.forward(I),g))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}serialize(){let t;this.interpolation.name==="linear"?t=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?t=["linear"]:t=["exponential",this.interpolation.base]:t=["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e}}function M3(r,t,e,n){const i=n-e,o=r-e;return i===0?0:t===1?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}var ym=hb;class fb{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let n=null;const i=e.expectedType;i&&i.kind!=="value"&&(n=i);const o=[];for(const a of t.slice(1)){const f=e.parse(a,1+o.length,n,void 0,{typeAnnotation:"omit"});if(!f)return null;n=n||f.type,o.push(f)}return i&&o.some(a=>Cv(i,a.type))?new fb(qo,o):new fb(n,o)}evaluate(t){let e=null,n=0,i;for(const o of this.args){if(n++,e=o.evaluate(t),e&&e instanceof Cm&&!e.available&&(i||(i=e),e=null,n===this.args.length))return i;if(e!==null)break}return e}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}serialize(){const t=["coalesce"];return this.eachChild(e=>{t.push(e.serialize())}),t}}var PF=fb;class tO{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const n=[];for(let o=1;o<t.length-1;o+=2){const s=t[o];if(typeof s!="string")return e.error(`Expected string, but found ${typeof s} instead.`,o);if(/[^a-zA-Z0-9_]/.test(s))return e.error("Variable names must contain only alphanumeric characters or '_'.",o);const a=e.parse(t[o+1],o+1);if(!a)return null;n.push([s,a])}const i=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return i?new tO(n,i):null}outputDefined(){return this.result.outputDefined()}serialize(){const t=["let"];for(const[e,n]of this.bindings)t.push(e,n.serialize());return t.push(this.result.serialize()),t}}var KF=tO;class nO{constructor(t,e,n){this.type=t,this.index=e,this.input=n}static parse(t,e){if(t.length!==3)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,Br),i=e.parse(t[2],2,lf(e.expectedType||qo));if(!n||!i)return null;const o=i.type;return new nO(o.itemType,n,i)}evaluate(t){const e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new Ec(`Array index out of bounds: ${e} < 0.`);if(e>=n.length)throw new Ec(`Array index out of bounds: ${e} > ${n.length-1}.`);if(e!==Math.floor(e))throw new Ec(`Array index must be an integer, but found ${e} instead.`);return n[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Yte=nO;class rO{constructor(t,e){this.type=Wo,this.needle=t,this.haystack=e}static parse(t,e){if(t.length!==3)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,qo),i=e.parse(t[2],2,qo);return!n||!i?null:z6(n.type,[Wo,ia,Br,d2,qo])?new rO(n,i):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${ql(n.type)} instead`)}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!bv(e,["boolean","string","number","null"]))throw new Ec(`Expected first argument to be of type boolean, string, number or null, but found ${ql(DA(e))} instead.`);if(!bv(n,["string","array"]))throw new Ec(`Expected second argument to be of type array or string, but found ${ql(DA(n))} instead.`);return n.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var $te=rO;class pb{constructor(t,e,n){this.type=Br,this.needle=t,this.haystack=e,this.fromIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,qo),i=e.parse(t[2],2,qo);if(!n||!i)return null;if(!z6(n.type,[Wo,ia,Br,d2,qo]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${ql(n.type)} instead`);if(t.length===4){const o=e.parse(t[3],3,Br);return o?new pb(n,i,o):null}else return new pb(n,i)}evaluate(t){const e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!bv(e,["boolean","string","number","null"]))throw new Ec(`Expected first argument to be of type boolean, string, number or null, but found ${ql(DA(e))} instead.`);if(!bv(n,["string","array"]))throw new Ec(`Expected second argument to be of type array or string, but found ${ql(DA(n))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(t);return n.indexOf(e,i)}return n.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var Vte=pb;class iO{constructor(t,e,n,i,o,s){this.inputType=t,this.type=e,this.input=n,this.cases=i,this.outputs=o,this.otherwise=s}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!==1)return e.error("Expected an even number of arguments.");let n,i;e.expectedType&&e.expectedType.kind!=="value"&&(i=e.expectedType);const o={},s=[];for(let g=2;g<t.length-1;g+=2){let b=t[g];const I=t[g+1];Array.isArray(b)||(b=[b]);const S=e.concat(g);if(b.length===0)return S.error("Expected at least one branch label.");for(const P of b){if(typeof P!="number"&&typeof P!="string")return S.error("Branch labels must be numbers or strings.");if(typeof P=="number"&&Math.abs(P)>Number.MAX_SAFE_INTEGER)return S.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof P=="number"&&Math.floor(P)!==P)return S.error("Numeric branch labels must be integer values.");if(!n)n=DA(P);else if(S.checkSubtype(n,DA(P)))return null;if(typeof o[String(P)]<"u")return S.error("Branch labels must be unique.");o[String(P)]=s.length}const B=e.parse(I,g,i);if(!B)return null;i=i||B.type,s.push(B)}const a=e.parse(t[1],1,qo);if(!a)return null;const f=e.parse(t[t.length-1],t.length-1,i);return!f||a.type.kind!=="value"&&e.concat(1).checkSubtype(n,a.type)?null:new iO(n,i,a,o,s,f)}evaluate(t){const e=this.input.evaluate(t);return(DA(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),n=[],i={};for(const s of e){const a=i[this.cases[s]];a===void 0?(i[this.cases[s]]=n.length,n.push([this.cases[s],[s]])):n[a][1].push(s)}const o=s=>this.inputType.kind==="number"?Number(s):s;for(const[s,a]of n)a.length===1?t.push(o(a[0])):t.push(a.map(o)),t.push(this.outputs[s].serialize());return t.push(this.otherwise.serialize()),t}}var Hte=iO;class oO{constructor(t,e,n){this.type=t,this.branches=e,this.otherwise=n}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!==0)return e.error("Expected an odd number of arguments.");let n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);const i=[];for(let s=1;s<t.length-1;s+=2){const a=e.parse(t[s],s,Wo);if(!a)return null;const f=e.parse(t[s+1],s+1,n);if(!f)return null;i.push([a,f]),n=n||f.type}const o=e.parse(t[t.length-1],t.length-1,n);return o?new oO(n,i,o):null}evaluate(t){for(const[e,n]of this.branches)if(e.evaluate(t))return n.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,n]of this.branches)t(e),t(n);t(this.otherwise)}outputDefined(){return this.branches.every(([t,e])=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild(e=>{t.push(e.serialize())}),t}}var Zte=oO;class mb{constructor(t,e,n,i){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const n=e.parse(t[1],1,qo),i=e.parse(t[2],2,Br);if(!n||!i)return null;if(!z6(n.type,[lf(qo),ia,qo]))return e.error(`Expected first argument to be of type array or string, but found ${ql(n.type)} instead`);if(t.length===4){const o=e.parse(t[3],3,Br);return o?new mb(n.type,n,i,o):null}else return new mb(n.type,n,i)}evaluate(t){const e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!bv(e,["string","array"]))throw new Ec(`Expected first argument to be of type array or string, but found ${ql(DA(e))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(t);return e.slice(n,i)}return e.slice(n)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Xte=mb;function Q8(r,t){return r==="=="||r==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Jte(r,t,e){return t===e}function ene(r,t,e){return t!==e}function tne(r,t,e){return t<e}function nne(r,t,e){return t>e}function rne(r,t,e){return t<=e}function ine(r,t,e){return t>=e}function RF(r,t,e,n){return n.compare(t,e)===0}function one(r,t,e,n){return!RF(r,t,e,n)}function ane(r,t,e,n){return n.compare(t,e)<0}function sne(r,t,e,n){return n.compare(t,e)>0}function lne(r,t,e,n){return n.compare(t,e)<=0}function une(r,t,e,n){return n.compare(t,e)>=0}function X1(r,t,e){const n=r!=="=="&&r!=="!=";return class DF{constructor(o,s,a){this.type=Wo,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}static parse(o,s){if(o.length!==3&&o.length!==4)return s.error("Expected two or three arguments.");const a=o[0];let f=s.parse(o[1],1,qo);if(!f)return null;if(!Q8(a,f.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${ql(f.type)}'.`);let g=s.parse(o[2],2,qo);if(!g)return null;if(!Q8(a,g.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${ql(g.type)}'.`);if(f.type.kind!==g.type.kind&&f.type.kind!=="value"&&g.type.kind!=="value")return s.error(`Cannot compare types '${ql(f.type)}' and '${ql(g.type)}'.`);n&&(f.type.kind==="value"&&g.type.kind!=="value"?f=new hm(g.type,[f]):f.type.kind!=="value"&&g.type.kind==="value"&&(g=new hm(f.type,[g])));let b=null;if(o.length===4){if(f.type.kind!=="string"&&g.type.kind!=="string"&&f.type.kind!=="value"&&g.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(b=s.parse(o[3],3,h2),!b)return null}return new DF(f,g,b)}evaluate(o){const s=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const f=DA(s),g=DA(a);if(f.kind!==g.kind||!(f.kind==="string"||f.kind==="number"))throw new Ec(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${f.kind}, ${g.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const f=DA(s),g=DA(a);if(f.kind!=="string"||g.kind!=="string")return t(o,s,a)}return this.collator?e(o,s,a,this.collator.evaluate(o)):t(o,s,a)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}serialize(){const o=[r];return this.eachChild(s=>{o.push(s.serialize())}),o}}}const Ane=X1("==",Jte,RF),cne=X1("!=",ene,one),dne=X1("<",tne,ane),hne=X1(">",nne,sne),fne=X1("<=",rne,lne),pne=X1(">=",ine,une);class aO{constructor(t,e,n,i,o,s){this.type=ia,this.number=t,this.locale=e,this.currency=n,this.unit=i,this.minFractionDigits=o,this.maxFractionDigits=s}static parse(t,e){if(t.length!==3)return e.error("Expected two arguments.");const n=e.parse(t[1],1,Br);if(!n)return null;const i=t[2];if(typeof i!="object"||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=e.parse(i.locale,1,ia),!o))return null;let s=null;if(i.currency&&(s=e.parse(i.currency,1,ia),!s))return null;let a=null;if(i.unit&&(a=e.parse(i.unit,1,ia),!a))return null;let f=null;if(i["min-fraction-digits"]&&(f=e.parse(i["min-fraction-digits"],1,Br),!f))return null;let g=null;return i["max-fraction-digits"]&&(g=e.parse(i["max-fraction-digits"],1,Br),!g)?null:new aO(n,o,s,a,f,g)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class sO{constructor(t){this.type=Br,this.input=t}static parse(t,e){if(t.length!==2)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error(`Expected argument of type string or array, but found ${ql(n.type)} instead.`):new sO(n):null}evaluate(t){const e=this.input.evaluate(t);if(typeof e=="string")return e.length;if(Array.isArray(e))return e.length;throw new Ec(`Expected value to be of type string or array, but found ${ql(DA(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild(e=>{t.push(e.serialize())}),t}}var mne=sO;const LF={"==":Ane,"!=":cne,">":hne,"<":dne,">=":pne,"<=":fne,array:hm,at:Yte,boolean:hm,case:Zte,coalesce:PF,collator:g2,format:p2,image:m2,in:$te,"index-of":Vte,interpolate:ym,"interpolate-hcl":ym,"interpolate-lab":ym,length:mne,let:KF,literal:cb,match:Hte,number:hm,"number-format":aO,object:hm,slice:Xte,step:bF,string:hm,"to-boolean":A1,"to-color":A1,"to-number":A1,"to-string":A1,var:_F,within:V6};function q8(r,[t,e,n,i]){t=t.evaluate(r),e=e.evaluate(r),n=n.evaluate(r);const o=i?i.evaluate(r):1,s=pF(t,e,n,o);if(s)throw new Ec(s);return new LA(t/255*o,e/255*o,n/255*o,o)}function Y8(r,t){return r in t}function S3(r,t){const e=t[r];return typeof e>"u"?null:e}function gne(r,t,e,n){for(;e<=n;){const i=e+n>>1;if(t[i]===r)return!0;t[i]>r?n=i-1:e=i+1}return!1}function O0(r){return{type:r}}Z1.register(LF,{error:[fte,[ia],(r,[t])=>{throw new Ec(t.evaluate(r))}],typeof:[ia,[qo],(r,[t])=>ql(DA(t.evaluate(r)))],"to-rgba":[lf(Br,4),[gm],(r,[t])=>t.evaluate(r).toArray()],rgb:[gm,[Br,Br,Br],q8],rgba:[gm,[Br,Br,Br,Br],q8],has:{type:Wo,overloads:[[[ia],(r,[t])=>Y8(t.evaluate(r),r.properties())],[[ia,x1],(r,[t,e])=>Y8(t.evaluate(r),e.evaluate(r))]]},get:{type:qo,overloads:[[[ia],(r,[t])=>S3(t.evaluate(r),r.properties())],[[ia,x1],(r,[t,e])=>S3(t.evaluate(r),e.evaluate(r))]]},"feature-state":[qo,[ia],(r,[t])=>S3(t.evaluate(r),r.featureState||{})],properties:[x1,[],r=>r.properties()],"geometry-type":[ia,[],r=>r.geometryType()],id:[qo,[],r=>r.id()],zoom:[Br,[],r=>r.globals.zoom],pitch:[Br,[],r=>r.globals.pitch||0],"distance-from-center":[Br,[],r=>r.distanceFromCenter()],"heatmap-density":[Br,[],r=>r.globals.heatmapDensity||0],"line-progress":[Br,[],r=>r.globals.lineProgress||0],"sky-radial-progress":[Br,[],r=>r.globals.skyRadialProgress||0],accumulated:[qo,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[Br,O0(Br),(r,t)=>{let e=0;for(const n of t)e+=n.evaluate(r);return e}],"*":[Br,O0(Br),(r,t)=>{let e=1;for(const n of t)e*=n.evaluate(r);return e}],"-":{type:Br,overloads:[[[Br,Br],(r,[t,e])=>t.evaluate(r)-e.evaluate(r)],[[Br],(r,[t])=>-t.evaluate(r)]]},"/":[Br,[Br,Br],(r,[t,e])=>t.evaluate(r)/e.evaluate(r)],"%":[Br,[Br,Br],(r,[t,e])=>t.evaluate(r)%e.evaluate(r)],ln2:[Br,[],()=>Math.LN2],pi:[Br,[],()=>Math.PI],e:[Br,[],()=>Math.E],"^":[Br,[Br,Br],(r,[t,e])=>Math.pow(t.evaluate(r),e.evaluate(r))],sqrt:[Br,[Br],(r,[t])=>Math.sqrt(t.evaluate(r))],log10:[Br,[Br],(r,[t])=>Math.log(t.evaluate(r))/Math.LN10],ln:[Br,[Br],(r,[t])=>Math.log(t.evaluate(r))],log2:[Br,[Br],(r,[t])=>Math.log(t.evaluate(r))/Math.LN2],sin:[Br,[Br],(r,[t])=>Math.sin(t.evaluate(r))],cos:[Br,[Br],(r,[t])=>Math.cos(t.evaluate(r))],tan:[Br,[Br],(r,[t])=>Math.tan(t.evaluate(r))],asin:[Br,[Br],(r,[t])=>Math.asin(t.evaluate(r))],acos:[Br,[Br],(r,[t])=>Math.acos(t.evaluate(r))],atan:[Br,[Br],(r,[t])=>Math.atan(t.evaluate(r))],min:[Br,O0(Br),(r,t)=>Math.min(...t.map(e=>e.evaluate(r)))],max:[Br,O0(Br),(r,t)=>Math.max(...t.map(e=>e.evaluate(r)))],abs:[Br,[Br],(r,[t])=>Math.abs(t.evaluate(r))],round:[Br,[Br],(r,[t])=>{const e=t.evaluate(r);return e<0?-Math.round(-e):Math.round(e)}],floor:[Br,[Br],(r,[t])=>Math.floor(t.evaluate(r))],ceil:[Br,[Br],(r,[t])=>Math.ceil(t.evaluate(r))],"filter-==":[Wo,[ia,qo],(r,[t,e])=>r.properties()[t.value]===e.value],"filter-id-==":[Wo,[qo],(r,[t])=>r.id()===t.value],"filter-type-==":[Wo,[ia],(r,[t])=>r.geometryType()===t.value],"filter-<":[Wo,[ia,qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n<i}],"filter-id-<":[Wo,[qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e<n}],"filter->":[Wo,[ia,qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n>i}],"filter-id->":[Wo,[qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e>n}],"filter-<=":[Wo,[ia,qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[Wo,[qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e<=n}],"filter->=":[Wo,[ia,qo],(r,[t,e])=>{const n=r.properties()[t.value],i=e.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[Wo,[qo],(r,[t])=>{const e=r.id(),n=t.value;return typeof e==typeof n&&e>=n}],"filter-has":[Wo,[qo],(r,[t])=>t.value in r.properties()],"filter-has-id":[Wo,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[Wo,[lf(ia)],(r,[t])=>t.value.indexOf(r.geometryType())>=0],"filter-id-in":[Wo,[lf(qo)],(r,[t])=>t.value.indexOf(r.id())>=0],"filter-in-small":[Wo,[ia,lf(qo)],(r,[t,e])=>e.value.indexOf(r.properties()[t.value])>=0],"filter-in-large":[Wo,[ia,lf(qo)],(r,[t,e])=>gne(r.properties()[t.value],e.value,0,e.value.length-1)],all:{type:Wo,overloads:[[[Wo,Wo],(r,[t,e])=>t.evaluate(r)&&e.evaluate(r)],[O0(Wo),(r,t)=>{for(const e of t)if(!e.evaluate(r))return!1;return!0}]]},any:{type:Wo,overloads:[[[Wo,Wo],(r,[t,e])=>t.evaluate(r)||e.evaluate(r)],[O0(Wo),(r,t)=>{for(const e of t)if(e.evaluate(r))return!0;return!1}]]},"!":[Wo,[Wo],(r,[t])=>!t.evaluate(r)],"is-supported-script":[Wo,[ia],(r,[t])=>{const e=r.globals&&r.globals.isSupportedScript;return e?e(t.evaluate(r)):!0}],upcase:[ia,[ia],(r,[t])=>t.evaluate(r).toUpperCase()],downcase:[ia,[ia],(r,[t])=>t.evaluate(r).toLowerCase()],concat:[ia,O0(qo),(r,t)=>t.map(e=>Jy(e.evaluate(r))).join("")],"resolved-locale":[ia,[h2],(r,[t])=>t.evaluate(r).resolvedLocale()]});var FF=LF;function sE(r){return{result:"success",value:r}}function i1(r){return{result:"error",value:r}}function yne(r){return r["property-type"]==="data-driven"}function vne(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function UF(r){return!!r.expression&&r.expression.interpolated}function lO(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function uO(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function _ne(r){return r}function AO(r,t){const e=t.type==="color",n=r.stops&&typeof r.stops[0][0]=="object",i=n||r.property!==void 0,o=n||!i,s=r.type||(UF(t)?"exponential":"interval");if(e&&(r=hF({},r),r.stops&&(r.stops=r.stops.map(b=>[b[0],LA.parse(b[1])])),r.default?r.default=LA.parse(r.default):r.default=LA.parse(t.default)),r.colorSpace&&r.colorSpace!=="rgb"&&!TF[r.colorSpace])throw new Error(`Unknown color space: ${r.colorSpace}`);let a,f,g;if(s==="exponential")a=$8;else if(s==="interval")a=bne;else if(s==="categorical"){a=Cne,f=Object.create(null);for(const b of r.stops)f[b[0]]=b[1];g=typeof r.stops[0][0]}else if(s==="identity")a=xne;else throw new Error(`Unknown function type "${s}"`);if(n){const b={},I=[];for(let P=0;P<r.stops.length;P++){const U=r.stops[P],j=U[0].zoom;b[j]===void 0&&(b[j]={zoom:j,type:r.type,property:r.property,default:r.default,stops:[]},I.push(j)),b[j].stops.push([U[0].value,U[1]])}const S=[];for(const P of I)S.push([b[P].zoom,AO(b[P],t)]);const B={name:"linear"};return{kind:"composite",interpolationType:B,interpolationFactor:ym.interpolationFactor.bind(void 0,B),zoomStops:S.map(P=>P[0]),evaluate({zoom:P},U){return $8({stops:S,base:r.base},t,P).evaluate(P,U)}}}else if(o){const b=s==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:b,interpolationFactor:ym.interpolationFactor.bind(void 0,b),zoomStops:r.stops.map(I=>I[0]),evaluate:({zoom:I})=>a(r,t,I,f,g)}}else return{kind:"source",evaluate(b,I){const S=I&&I.properties?I.properties[r.property]:void 0;return S===void 0?$v(r.default,t.default):a(r,t,S,f,g)}}}function $v(r,t,e){if(r!==void 0)return r;if(t!==void 0)return t;if(e!==void 0)return e}function Cne(r,t,e,n,i){const o=typeof e===i?n[e]:void 0;return $v(o,r.default,t.default)}function bne(r,t,e){if(lO(e)!=="number")return $v(r.default,t.default);const n=r.stops.length;if(n===1||e<=r.stops[0][0])return r.stops[0][1];if(e>=r.stops[n-1][0])return r.stops[n-1][1];const i=v2(r.stops.map(o=>o[0]),e);return r.stops[i][1]}function $8(r,t,e){const n=r.base!==void 0?r.base:1;if(lO(e)!=="number")return $v(r.default,t.default);const i=r.stops.length;if(i===1||e<=r.stops[0][0])return r.stops[0][1];if(e>=r.stops[i-1][0])return r.stops[i-1][1];const o=v2(r.stops.map(b=>b[0]),e),s=wne(e,n,r.stops[o][0],r.stops[o+1][0]),a=r.stops[o][1],f=r.stops[o+1][1];let g=wF[t.type]||_ne;if(r.colorSpace&&r.colorSpace!=="rgb"){const b=TF[r.colorSpace];g=(I,S)=>b.reverse(b.interpolate(b.forward(I),b.forward(S),s))}return typeof a.evaluate=="function"?{evaluate(...b){const I=a.evaluate.apply(void 0,b),S=f.evaluate.apply(void 0,b);if(!(I===void 0||S===void 0))return g(I,S,s)}}:g(a,f,s)}function xne(r,t,e){return t.type==="color"?e=LA.parse(e):t.type==="formatted"?e=Qf.fromString(e.toString()):t.type==="resolvedImage"?e=Cm.fromString(e.toString()):lO(e)!==t.type&&(t.type!=="enum"||!t.values[e])&&(e=void 0),$v(e,r.default,t.default)}function wne(r,t,e,n){const i=n-e,o=r-e;return i===0?0:t===1?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}class jF{constructor(t,e){this.expression=t,this._warningHistory={},this._evaluator=new mF,this._defaultValue=e?Ene(e):null,this._enumValues=e&&e.type==="enum"?e.values:null}evaluateWithoutErrorHandling(t,e,n,i,o,s,a,f){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=f||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,n,i,o,s,a,f){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=f||null;try{const g=this.expression.evaluate(this._evaluator);if(g==null||typeof g=="number"&&g!==g)return this._defaultValue;if(this._enumValues&&!(g in this._enumValues))throw new Ec(`Expected value to be one of ${Object.keys(this._enumValues).map(b=>JSON.stringify(b)).join(", ")}, but found ${JSON.stringify(g)} instead.`);return g}catch(g){return this._warningHistory[g.message]||(this._warningHistory[g.message]=!0,typeof console<"u"&&console.warn(g.message)),this._defaultValue}}}function zF(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in FF}function gb(r,t){const e=new CF(FF,[],t?Sne(t):void 0),n=e.parse(r,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?sE(new jF(n,t)):i1(e.errors)}class lE{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!H6(e.expression)}evaluateWithoutErrorHandling(t,e,n,i,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,i,o,s)}evaluate(t,e,n,i,o,s){return this._styleExpression.evaluate(t,e,n,i,o,s)}}class uE{constructor(t,e,n,i){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!H6(e.expression),this.interpolationType=i}evaluateWithoutErrorHandling(t,e,n,i,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,i,o,s)}evaluate(t,e,n,i,o,s){return this._styleExpression.evaluate(t,e,n,i,o,s)}interpolationFactor(t,e,n){return this.interpolationType?ym.interpolationFactor(this.interpolationType,t,e,n):0}}function NF(r,t){if(r=gb(r,t),r.result==="error")return r;const e=r.value.expression,n=y2(e);if(!n&&!yne(t))return i1([new bp("","data expressions not supported")]);const i=Z6(e,["zoom","pitch","distance-from-center"]);if(!i&&!vne(t))return i1([new bp("","zoom expressions not supported")]);const o=vC(e);if(!o&&!i)return i1([new bp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof bp)return i1([o]);if(o instanceof ym&&!UF(t))return i1([new bp("",'"interpolate" expressions cannot be used with this property')]);if(!o)return sE(n?new lE("constant",r.value):new lE("source",r.value));const s=o instanceof ym?o.interpolation:void 0;return sE(n?new uE("camera",r.value,o.labels,s):new uE("composite",r.value,o.labels,s))}class _2{constructor(t,e){this._parameters=t,this._specification=e,hF(this,AO(this._parameters,this._specification))}static deserialize(t){return new _2(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Mne(r,t){if(uO(r))return new _2(r,t);if(zF(r)){const e=NF(r,t);if(e.result==="error")throw new Error(e.value.map(n=>`${n.key}: ${n.message}`).join(", "));return e.value}else{let e=r;return typeof r=="string"&&t.type==="color"&&(e=LA.parse(r)),{kind:"constant",evaluate:()=>e}}}function vC(r){let t=null;if(r instanceof KF)t=vC(r.result);else if(r instanceof PF){for(const e of r.args)if(t=vC(e),t)break}else(r instanceof bF||r instanceof ym)&&r.input instanceof Z1&&r.input.name==="zoom"&&(t=r);return t instanceof bp||r.eachChild(e=>{const n=vC(e);n instanceof bp?t=n:!t&&n?t=new bp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new bp("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Sne(r){const t={color:gm,string:ia,number:Br,enum:ia,boolean:Wo,formatted:f2,resolvedImage:Yv};return r.type==="array"?lf(t[r.value]||qo,r.length):t[r.type]}function Ene(r){return r.type==="color"&&(uO(r.default)||Array.isArray(r.default))?new LA(0,0,0,0):r.type==="color"?LA.parse(r.default)||null:r.default===void 0?null:r.default}function xv(r){return typeof r=="object"?["literal",r]:r}function One(r,t){let e=r.stops;if(!e)return Bne(r,t);const n=e&&typeof e[0][0]=="object",i=n||r.property!==void 0,o=n||!i;return e=e.map(s=>!i&&t.tokens&&typeof s[1]=="string"?[s[0],Pne(s[1])]:[s[0],xv(s[1])]),n?Ine(r,t,e):o?Tne(r,t,e):AE(r,t,e)}function Bne(r,t){const e=["get",r.property];if(r.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,r.default];{const n=[t.type==="color"?"to-color":t.type,e,xv(r.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}}function cO(r){switch(r.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Ine(r,t,e){const n={},i={},o=[];for(let a=0;a<e.length;a++){const f=e[a],g=f[0].zoom;n[g]===void 0&&(n[g]={zoom:g,type:r.type,property:r.property,default:r.default},i[g]=[],o.push(g)),i[g].push([f[0].value,f[1]])}if(hO({},t)==="exponential"){const a=[cO(r),["linear"],["zoom"]];for(const f of o){const g=AE(n[f],t,i[f]);M1(a,f,g,!1)}return a}else{const a=["step",["zoom"]];for(const f of o){const g=AE(n[f],t,i[f]);M1(a,f,g,!0)}return dO(a),a}}function kne(r,t){if(r!==void 0)return r;if(t!==void 0)return t}function V8(r,t){const e=xv(kne(r.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function AE(r,t,e){const n=hO(r,t),i=["get",r.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){const o=["case"];for(const s of e)o.push(["==",i,s[0]],s[1]);return o.push(V8(r,t)),o}else if(n==="categorical"){const o=["match",i];for(const s of e)M1(o,s[0],s[1],!1);return o.push(V8(r,t)),o}else if(n==="interval"){const o=["step",["number",i]];for(const s of e)M1(o,s[0],s[1],!0);return dO(o),r.default===void 0?o:["case",["==",["typeof",i],"number"],o,xv(r.default)]}else if(n==="exponential"){const o=r.base!==void 0?r.base:1,s=[cO(r),o===1?["linear"]:["exponential",o],["number",i]];for(const a of e)M1(s,a[0],a[1],!1);return r.default===void 0?s:["case",["==",["typeof",i],"number"],s,xv(r.default)]}else throw new Error(`Unknown property function type ${n}`)}function Tne(r,t,e,n=["zoom"]){const i=hO(r,t);let o,s=!1;if(i==="interval")o=["step",n],s=!0;else if(i==="exponential"){const a=r.base!==void 0?r.base:1;o=[cO(r),a===1?["linear"]:["exponential",a],n]}else throw new Error(`Unknown zoom function type "${i}"`);for(const a of e)M1(o,a[0],a[1],s);return dO(o),o}function dO(r){r[0]==="step"&&r.length===3&&(r.push(0),r.push(r[3]))}function M1(r,t,e,n){r.length>3&&t===r[r.length-2]||(n&&r.length===2||r.push(t),r.push(e))}function hO(r,t){return r.type?r.type:t.expression.interpolated?"exponential":"interval"}function Pne(r){const t=["concat"],e=/{([^{}]+)}/g;let n=0;for(let i=e.exec(r);i!==null;i=e.exec(r)){const o=r.slice(n,e.lastIndex-i[0].length);n=e.lastIndex,o.length>0&&t.push(o),t.push(["get",i[1]])}if(t.length===1)return r;if(n<r.length)t.push(r.slice(n));else if(t.length===2)return["to-string",t[1]];return t}function Kne(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function cE(r){if(Array.isArray(r))return r.map(cE);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const t={};for(const e in r)t[e]=cE(r[e]);return t}return Kne(r)}function fO(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const t of r.slice(1))if(!fO(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}function Rne(r,t="fill"){if(r==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};fO(r)||(r=yb(r));const e=r;let n=!0;try{n=Dne(e)}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(e,null,2)}
|
||
`)}const i=dF[`filter_${t}`],o=gb(n,i);let s=null;if(o.result==="error")throw new Error(o.value.map(b=>`${b.key}: ${b.message}`).join(", "));s=(b,I,S)=>o.value.evaluate(b,I,{},S);let a=null,f=null;if(n!==e){const b=gb(e,i);if(b.result==="error")throw new Error(b.value.map(I=>`${I.key}: ${I.message}`).join(", "));a=(I,S,B,P,U)=>b.value.evaluate(I,S,{},B,void 0,void 0,P,U),f=!y2(b.value.expression)}s=s;const g=QF(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:g,needFeature:!!f}}function Dne(r){if(!S1(r))return r;let t=cE(r);return WF(t),t=GF(t),t}function GF(r){if(!Array.isArray(r))return r;const t=Une(r);return t===!0?t:t.map(e=>GF(e))}function WF(r){let t=!1;const e=[];if(r[0]==="case"){for(let n=1;n<r.length-1;n+=2)t=t||S1(r[n]),e.push(r[n+1]);e.push(r[r.length-1])}else if(r[0]==="match"){t=t||S1(r[1]);for(let n=2;n<r.length-1;n+=2)e.push(r[n+1]);e.push(r[r.length-1])}else if(r[0]==="step"){t=t||S1(r[1]);for(let n=1;n<r.length-1;n+=2)e.push(r[n+1])}t&&(r.length=0,r.push("any",...e));for(let n=1;n<r.length;n++)WF(r[n])}function S1(r){if(!Array.isArray(r))return!1;if(Lne(r[0]))return!0;for(let t=1;t<r.length;t++){const e=r[t];if(S1(e))return!0}return!1}function Lne(r){return r==="pitch"||r==="distance-from-center"}const Fne=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Une(r){if(Fne.has(r[0]))for(let t=1;t<r.length;t++){const e=r[t];if(S1(e))return!0}return r}function jne(r,t){return r<t?-1:r>t?1:0}function QF(r){if(!Array.isArray(r))return!1;if(r[0]==="within")return!0;for(let t=1;t<r.length;t++)if(QF(r[t]))return!0;return!1}function yb(r){if(!r)return!0;const t=r[0];return r.length<=1?t!=="any":t==="=="?E3(r[1],r[2],"=="):t==="!="?H_(E3(r[1],r[2],"==")):t==="<"||t===">"||t==="<="||t===">="?E3(r[1],r[2],t):t==="any"?zne(r.slice(1)):t==="all"?["all"].concat(r.slice(1).map(yb)):t==="none"?["all"].concat(r.slice(1).map(yb).map(H_)):t==="in"?H8(r[1],r.slice(2)):t==="!in"?H_(H8(r[1],r.slice(2))):t==="has"?Z8(r[1]):t==="!has"?H_(Z8(r[1])):t==="within"?r:!0}function E3(r,t,e){switch(r){case"$type":return[`filter-type-${e}`,t];case"$id":return[`filter-id-${e}`,t];default:return[`filter-${e}`,r,t]}}function zne(r){return["any"].concat(r.map(yb))}function H8(r,t){if(t.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",r,["literal",t.sort(jne)]]:["filter-in-small",r,["literal",t]]}}function Z8(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function H_(r){return["!",r]}var Nne=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Gne(r,t){const e={};for(const n in r)n!=="ref"&&(e[n]=r[n]);return Nne.forEach(n=>{n in t&&(e[n]=t[n])}),e}function Wne(r){r=r.slice();const t=Object.create(null);for(let e=0;e<r.length;e++)t[r[e].id]=r[e];for(let e=0;e<r.length;e++)"ref"in r[e]&&(r[e]=Gne(r[e],t[r[e].ref]));return r}function Qne(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qne={};(function(r){var t=function(){var e=function(j,q,W,ee){for(W=W||{},ee=j.length;ee--;W[j[ee]]=q);return W},n=[1,12],i=[1,13],o=[1,9],s=[1,10],a=[1,11],f=[1,14],g=[1,15],b=[14,18,22,24],I=[18,22],S=[22,24],B={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,W,ee,J,$,X,G){var ae=X.length-1;switch($){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.$=X[ae-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=X[ae-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[X[ae-2],X[ae]];break;case 16:this.$={},this.$[X[ae][0]]=X[ae][1];break;case 17:this.$=X[ae-2],X[ae-2][X[ae][0]]=X[ae][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[X[ae]];break;case 21:this.$=X[ae-2],X[ae-2].push(X[ae]);break}},table:[{3:5,4:n,5:6,6:i,7:3,8:o,9:4,10:s,11:a,12:1,13:2,15:7,16:8,17:f,23:g},{1:[3]},{14:[1,16]},e(b,[2,7]),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(b,[2,11]),e(b,[2,12]),e(b,[2,3]),e(b,[2,4]),e(b,[2,5]),e([14,18,21,22,24],[2,1]),e(b,[2,2]),{3:20,4:n,18:[1,17],19:18,20:19},{3:5,4:n,5:6,6:i,7:3,8:o,9:4,10:s,11:a,13:23,15:7,16:8,17:f,23:g,24:[1,21],25:22},{1:[2,6]},e(b,[2,13]),{18:[1,24],22:[1,25]},e(I,[2,16]),{21:[1,26]},e(b,[2,18]),{22:[1,28],24:[1,27]},e(S,[2,20]),e(b,[2,14]),{3:20,4:n,20:29},{3:5,4:n,5:6,6:i,7:3,8:o,9:4,10:s,11:a,13:30,15:7,16:8,17:f,23:g},e(b,[2,19]),{3:5,4:n,5:6,6:i,7:3,8:o,9:4,10:s,11:a,13:31,15:7,16:8,17:f,23:g},e(I,[2,17]),e(I,[2,15]),e(S,[2,21])],defaultActions:{16:[2,6]},parseError:function(q,W){if(W.recoverable)this.trace(q);else throw new Error(q)},parse:function(q){var W=this,ee=[0],J=[null],$=[],X=this.table,G="",ae=0,ge=0,he=2,Ie=1,re=$.slice.call(arguments,1),oe=Object.create(this.lexer),Se={yy:{}};for(var ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ye)&&(Se.yy[ye]=this.yy[ye]);oe.setInput(q,Se.yy),Se.yy.lexer=oe,Se.yy.parser=this,typeof oe.yylloc>"u"&&(oe.yylloc={});var nt=oe.yylloc;$.push(nt);var Ne=oe.options&&oe.options.ranges;typeof Se.yy.parseError=="function"?this.parseError=Se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(){var we;return we=oe.lex()||Ie,typeof we!="number"&&(we=W.symbols_[we]||we),we}for(var et,Ue,ke,We,vt={},Pt,ut,jt,Rt;;){if(Ue=ee[ee.length-1],this.defaultActions[Ue]?ke=this.defaultActions[Ue]:((et===null||typeof et>"u")&&(et=je()),ke=X[Ue]&&X[Ue][et]),typeof ke>"u"||!ke.length||!ke[0]){var Ke="";Rt=[];for(Pt in X[Ue])this.terminals_[Pt]&&Pt>he&&Rt.push("'"+this.terminals_[Pt]+"'");oe.showPosition?Ke="Parse error on line "+(ae+1)+`:
|
||
`+oe.showPosition()+`
|
||
Expecting `+Rt.join(", ")+", got '"+(this.terminals_[et]||et)+"'":Ke="Parse error on line "+(ae+1)+": Unexpected "+(et==Ie?"end of input":"'"+(this.terminals_[et]||et)+"'"),this.parseError(Ke,{text:oe.match,token:this.terminals_[et]||et,line:oe.yylineno,loc:nt,expected:Rt})}if(ke[0]instanceof Array&&ke.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ue+", token: "+et);switch(ke[0]){case 1:ee.push(et),J.push(oe.yytext),$.push(oe.yylloc),ee.push(ke[1]),et=null,ge=oe.yyleng,G=oe.yytext,ae=oe.yylineno,nt=oe.yylloc;break;case 2:if(ut=this.productions_[ke[1]][1],vt.$=J[J.length-ut],vt._$={first_line:$[$.length-(ut||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(ut||1)].first_column,last_column:$[$.length-1].last_column},Ne&&(vt._$.range=[$[$.length-(ut||1)].range[0],$[$.length-1].range[1]]),We=this.performAction.apply(vt,[G,ge,ae,Se.yy,ke[1],J,$].concat(re)),typeof We<"u")return We;ut&&(ee=ee.slice(0,-1*ut*2),J=J.slice(0,-1*ut),$=$.slice(0,-1*ut)),ee.push(this.productions_[ke[1]][0]),J.push(vt.$),$.push(vt._$),jt=X[ee[ee.length-2]][ee[ee.length-1]],ee.push(jt);break;case 3:return!0}}return!0}},P=function(){var j={EOF:1,parseError:function(W,ee){if(this.yy.parser)this.yy.parser.parseError(W,ee);else throw new Error(W)},setInput:function(q,W){return this.yy=W||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 W=q.match(/(?:\r\n?|\n).*/g);return W?(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 W=q.length,ee=q.split(/(?:\r\n?|\n)/g);this._input=q+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-W),this.offset-=W;var J=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),ee.length-1&&(this.yylineno-=ee.length-1);var $=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:ee?(ee.length===J.length?this.yylloc.first_column:0)+J[J.length-ee.length].length-ee[0].length:this.yylloc.first_column-W},this.options.ranges&&(this.yylloc.range=[$[0],$[0]+this.yyleng-W]),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(),W=new Array(q.length+1).join("-");return q+this.upcomingInput()+`
|
||
`+W+"^"},test_match:function(q,W){var ee,J,$;if(this.options.backtrack_lexer&&($={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&&($.yylloc.range=this.yylloc.range.slice(0))),J=q[0].match(/(?:\r\n?|\n).*/g),J&&(this.yylineno+=J.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:J?J[J.length-1].length-J[J.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],ee=this.performAction.call(this,this.yy,this,W,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ee)return ee;if(this._backtrack){for(var X in $)this[X]=$[X];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var q,W,ee,J;this._more||(this.yytext="",this.match="");for(var $=this._currentRules(),X=0;X<$.length;X++)if(ee=this._input.match(this.rules[$[X]]),ee&&(!W||ee[0].length>W[0].length)){if(W=ee,J=X,this.options.backtrack_lexer){if(q=this.test_match(ee,$[X]),q!==!1)return q;if(this._backtrack){W=!1;continue}else return!1}else if(!this.options.flex)break}return W?(q=this.test_match(W,$[J]),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 W=this.next();return W||this.lex()},begin:function(W){this.conditionStack.push(W)},popState:function(){var W=this.conditionStack.length-1;return W>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(W){return W=this.conditionStack.length-1-Math.abs(W||0),W>=0?this.conditionStack[W]:"INITIAL"},pushState:function(W){this.begin(W)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(W,ee,J,$){switch(J){case 0:break;case 1:return 6;case 2:return ee.yytext=ee.yytext.substr(1,ee.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 j}();B.lexer=P;function U(){this.yy={}}return U.prototype=B,B.Parser=U,new U}();typeof Qne<"u"&&(r.parser=t,r.Parser=t.Parser,r.parse=function(){return t.parse.apply(t,arguments)})})(qne);const qF={StyleExpression:jF,isExpression:zF,isExpressionFilter:fO,createExpression:gb,createPropertyExpression:NF,normalizePropertyExpression:Mne,ZoomConstantExpression:lE,ZoomDependentExpression:uE,StylePropertyFunction:_2},YF={convertFunction:One,createFunction:AO,isFunction:uO};var $F=typeof Object.assign=="function"?Object.assign:function(r,t){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(r),n=1,i=arguments.length;n<i;++n){var o=arguments[n];if(o!=null)for(var s in o)o.hasOwnProperty(s)&&(e[s]=o[s])}return e};function O3(r){return r*Math.PI/180}var j1=function(){for(var r=[],t=78271.51696402048;r.length<=24;t/=2)r.push(t);return r}();function VF(r,t){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(r,t);var e=document.createElement("canvas");return e.width=r,e.height=t,e}function Yne(r,t){for(var e=0,n=t.length;e<n;++e){var i=t[e];if(i<r&&e+1<n){var o=t[e]/t[e+1];return e+Math.log(t[e]/r)/Math.log(o)}}return n-1}var $ne=Array(256).join(" ");function dE(r,t){if(t>=.05){for(var e="",n=r.split(`
|
||
`),i=$ne.slice(0,Math.round(t/.1)),o=0,s=n.length;o<s;++o)o>0&&(e+=`
|
||
`),e+=n[o].split("").join(i);return e}return r}var B3;function HF(){return B3||(B3=VF(1,1).getContext("2d")),B3}function B0(r,t){return HF().measureText(r).width+(r.length-1)*t}var hE={};YS&&Ia(YS,_o.CLEAR,function(){hE={}});function fE(r,t,e,n){if(r.indexOf(`
|
||
`)!==-1){for(var i=r.split(`
|
||
`),o=[],s=0,a=i.length;s<a;++s)o.push(fE(i[s],t,e,n));return o.join(`
|
||
`)}var f=e+","+t+","+r+","+n,g=hE[f];if(!g){var b=r.split(" ");if(b.length>1){var I=HF();I.font=t;for(var S=I.measureText("M").width,B=S*e,P="",o=[],s=0,a=b.length;s<a;++s){var U=b[s],j=P+(P?" ":"")+U;B0(j,n)<=B?P=j:(P&&o.push(P),P=U)}P&&o.push(P);for(var s=0,a=o.length;s<a&&a>1;++s){var q=o[s];if(B0(q,n)<B*.35){var W=s>0?B0(o[s-1],n):1/0,ee=s<a-1?B0(o[s+1],n):1/0;o.splice(s,1),a-=1,W<ee?(o[s-1]+=" "+q,s-=1):o[s]=q+" "+o[s]}}for(var s=0,a=o.length-1;s<a;++s){var J=o[s],$=o[s+1];if(B0(J,n)>B*.7&&B0($,n)<B*.6){var X=J.split(" "),G=X.pop();B0(G,n)<B*.2&&(o[s]=X.join(" "),o[s+1]=G+" "+$),a-=1}}g=o.join(`
|
||
`)}else g=r;g=dE(g,n),hE[f]=g}return g}var Vne=YF.isFunction,Hne=YF.convertFunction,Zne=qF.isExpression,Xne=qF.createPropertyExpression,Jne={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ere={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]},tre=function(r,t){var e=Xne(r,t);if(e.result==="error")throw new Error(e.value.map(function(n){return"".concat(n.key,": ").concat(n.message)}).join(", "));return e.value},pE={},vb={zoom:0},Z_,I3;function ho(r,t,e,n,i,o){var s=r.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[s]||(o[s]={});var a=o[s];if(!a[e]){var f=(r[t]||pE)[e],g=dF["".concat(t,"_").concat(r.type)][e];f===void 0&&(f=g.default);var b=Zne(f);if(!b&&Vne(f)&&(f=Hne(f,g),b=!0),b){var I=tre(f,g);a[e]=I.evaluate.bind(I)}else g.type=="color"&&(f=LA.parse(f)),a[e]=function(){return f}}return vb.zoom=n,a[e](vb,i)}function nre(r,t,e,n,i){return i||console.warn("No filterCache provided to evaluateFilter()"),r in i||(i[r]=Rne(t).filter),vb.zoom=n,i[r](vb,e)}function Wm(r,t){if(r){if(r.a===0||t===0)return;var e=r.a;return t=t===void 0?1:t,e===0?"transparent":"rgba("+Math.round(r.r*255/e)+","+Math.round(r.g*255/e)+","+Math.round(r.b*255/e)+","+e*t+")"}return r}var rre=/^([^]*)\{(.*)\}([^]*)$/;function k3(r,t){var e;do if(e=r.match(rre),e){var n=t[e[2]]||"";r=e[1]+n+e[3]}while(e);return r}function ire(r,t,e,n,i,o,s){if(n===void 0&&(n=j1),typeof t=="string"&&(t=JSON.parse(t)),t.version!=8)throw new Error("glStyle version 8 required.");var a,f;if(o){if(typeof Image<"u"){var g=new Image;g.crossOrigin="anonymous",g.onload=function(){a=g,f=[g.width,g.height],r.changed(),g.onload=null},g.src=o}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var b=self;b.postMessage({action:"loadImage",src:o}),b.addEventListener("message",function(nt){nt.data.action==="imageLoaded"&&nt.data.src===o&&(a=nt.data.image,f=[a.width,a.height])})}}for(var I=Wne(t.layers),S={},B=[],P={},U={},j={},q={},W,ee=0,J=I.length;ee<J;++ee){var $=I[ee],X=$.id;if(typeof e=="string"&&$.source==e||e.indexOf(X)!==-1){var G=$["source-layer"];if(!W){W=$.source;var ae=t.sources[W];if(!ae)throw new Error('Source "'.concat(W,'" is not defined'));var ge=ae.type;if(ge!=="vector"&&ge!=="geojson")throw new Error('Source "'.concat(W,'" is not of type "vector" or "geojson", but "').concat(ge,'"'))}var he=S[G];he||(he=[],S[G]=he),he.push({layer:$,index:ee}),B.push(X)}}var Ie=new Dy,re=new u1,oe=[],Se=function(ye,nt){var Ne=ye.getProperties(),je=S[Ne.layer];if(je){var et=n.indexOf(nt);et==-1&&(et=Yne(nt,n));for(var Ue=Jne[ye.getGeometry().getType()],ke={properties:Ne,type:Ue},We=-1,vt=function(jt,Rt){var Ke=je[jt],we=Ke.layer,Fe=we.id,tt=we.layout||pE,mt=we.paint||pE;if(tt.visibility==="none"||"minzoom"in we&&et<we.minzoom||"maxzoom"in we&&et>=we.maxzoom)return"continue";var bt=we.filter;if(!bt||nre(Fe,bt,ke,et,q)){var Lt=void 0,Vt=void 0,rn=void 0,Sn=void 0,Ar=void 0,Bn=void 0,ar=Ke.index;if(Ue==3&&(we.type=="fill"||we.type=="fill-extrusion"))if(Vt=ho(we,"paint",we.type+"-opacity",et,ke,j),we.type+"-pattern"in mt){var Cr=ho(we,"paint",we.type+"-pattern",et,ke,j);if(Cr){var br=typeof Cr=="string"?k3(Cr,Ne):Cr.toString();if(a&&i&&i[br]){++We,Bn=oe[We],(!Bn||!Bn.getFill()||Bn.getStroke()||Bn.getText())&&(Bn=new R0({fill:new u1}),oe[We]=Bn),rn=Bn.getFill(),Bn.setZIndex(ar);var _r=br+"."+Vt,Jr=U[_r];if(!Jr){var wr=i[br],hi=VF(wr.width,wr.height),Ye=hi.getContext("2d");Ye.globalAlpha=Vt,Ye.drawImage(a,wr.x,wr.y,wr.width,wr.height,0,0,wr.width,wr.height),Jr=Ye.createPattern(hi,"repeat"),U[_r]=Jr}rn.setColor(Jr)}}}else Lt=Wm(ho(we,"paint",we.type+"-color",et,ke,j),Vt),we.type+"-outline-color"in mt&&(Ar=Wm(ho(we,"paint",we.type+"-outline-color",et,ke,j),Vt)),Ar||(Ar=Lt),(Lt||Ar)&&(++We,Bn=oe[We],(!Bn||Lt&&!Bn.getFill()||!Lt&&Bn.getFill()||Ar&&!Bn.getStroke()||!Ar&&Bn.getStroke()||Bn.getText())&&(Bn=new R0({fill:Lt?new u1:void 0,stroke:Ar?new Dy:void 0}),oe[We]=Bn),Lt&&(rn=Bn.getFill(),rn.setColor(Lt)),Ar&&(Sn=Bn.getStroke(),Sn.setColor(Ar),Sn.setWidth(.5)),Bn.setZIndex(ar));if(Ue!=1&&we.type=="line"){Lt=!("line-pattern"in mt)&&"line-color"in mt?Wm(ho(we,"paint","line-color",et,ke,j),ho(we,"paint","line-opacity",et,ke,j)):void 0;var de=ho(we,"paint","line-width",et,ke,j);Lt&&de>0&&(++We,Bn=oe[We],(!Bn||!Bn.getStroke()||Bn.getFill()||Bn.getText())&&(Bn=new R0({stroke:new Dy}),oe[We]=Bn),Sn=Bn.getStroke(),Sn.setLineCap(ho(we,"layout","line-cap",et,ke,j)),Sn.setLineJoin(ho(we,"layout","line-join",et,ke,j)),Sn.setMiterLimit(ho(we,"layout","line-miter-limit",et,ke,j)),Sn.setColor(Lt),Sn.setWidth(de),Sn.setLineDash(mt["line-dasharray"]?ho(we,"paint","line-dasharray",et,ke,j).map(function(Ki){return Ki*de}):null),Bn.setZIndex(ar))}var pe=!1,Je=null,kt=0,Xt=void 0,it=void 0,Ut=void 0;if((Ue==1||Ue==2)&&"icon-image"in tt){var qe=ho(we,"layout","icon-image",et,ke,j);if(qe){Xt=typeof qe=="string"?k3(qe,Ne):qe.toString();var fe=void 0;if(a&&i&&i[Xt]){var xe=ho(we,"layout","icon-rotation-alignment",et,ke,j);if(Ue==2){var p=ye.getGeometry();if(p.getFlatMidpoint||p.getFlatMidpoints){var Qe=p.getExtent(),pt=Math.sqrt(Math.max(Math.pow((Qe[2]-Qe[0])/nt,2),Math.pow((Qe[3]-Qe[1])/nt,2)));if(pt>150){var ft=p.getType()==="MultiLineString"?p.getFlatMidpoints():p.getFlatMidpoint();I3||(Z_=[NaN,NaN],I3=new ig("Point",Z_,[],{},null)),fe=I3,Z_[0]=ft[0],Z_[1]=ft[1];var Et=ho(we,"layout","symbol-placement",et,ke,j);if(Et==="line"&&xe==="map")for(var Ct=p.getStride(),nn=p.getFlatCoordinates(),Yt=0,Gt=nn.length-Ct;Yt<Gt;Yt+=Ct){var wt=nn[Yt],Tn=nn[Yt+1],En=nn[Yt+Ct],sr=nn[Yt+Ct+1],Pr=Math.min(wt,En),an=Math.min(Tn,sr),Wn=Math.max(wt,En),ir=Math.max(Tn,sr);if(ft[0]>=Pr&&ft[0]<=Wn&&ft[1]>=an&&ft[1]<=ir){kt=Math.atan2(Tn-sr,En-wt);break}}}}}if(Ue!==2||fe){var zr=ho(we,"layout","icon-size",et,ke,j),fr=mt["icon-color"]!==void 0?ho(we,"paint","icon-color",et,ke,j):null;if(!fr||fr.a!==0){var _r=Xt+"."+zr;if(fr!==null&&(_r+="."+fr),it=P[_r],!it){var hr=i[Xt];it=new jL({color:fr?[fr.r*255,fr.g*255,fr.b*255,fr.a]:void 0,img:a,imgSize:f,size:[hr.width,hr.height],offset:[hr.x,hr.y],rotateWithView:xe==="map",scale:zr/hr.pixelRatio,displacement:"icon-offset"in tt?ho(we,"layout","icon-offset",et,ke,j).map(function(Xi){return-Xi*hr.pixelRatio}):void 0}),P[_r]=it}}it&&(++We,Bn=oe[We],(!Bn||!Bn.getImage()||Bn.getFill()||Bn.getStroke())&&(Bn=new R0,oe[We]=Bn),Bn.setGeometry(fe),it.setRotation(kt+O3(ho(we,"layout","icon-rotate",et,ke,j))),it.setOpacity(ho(we,"paint","icon-opacity",et,ke,j)),it.setAnchor(ere[ho(we,"layout","icon-anchor",et,ke,j)]),Bn.setImage(it),Je=Bn.getText(),Bn.setText(void 0),Bn.setZIndex(ar),pe=!0,Ut=!1)}else Ut=!0}}}if(Ue==1&&we.type==="circle"){++We,Bn=oe[We],(!Bn||!Bn.getImage()||Bn.getFill()||Bn.getStroke())&&(Bn=new R0,oe[We]=Bn);var zn="circle-radius"in mt?ho(we,"paint","circle-radius",et,ke,j):5,Pi=Wm(ho(we,"paint","circle-stroke-color",et,ke,j),ho(we,"paint","circle-stroke-opacity",et,ke,j)),po=Wm(ho(we,"paint","circle-color",et,ke,j),ho(we,"paint","circle-opacity",et,ke,j)),ri=ho(we,"paint","circle-stroke-width",et,ke,j),Xr=zn+"."+Pi+"."+po+"."+ri;it=P[Xr],it||(it=new RL({radius:zn,stroke:Pi&&ri>0?new Dy({width:ri,color:Pi}):void 0,fill:po?new u1({color:po}):void 0}),P[Xr]=it),Bn.setImage(it),Je=Bn.getText(),Bn.setText(void 0),Bn.setGeometry(void 0),Bn.setZIndex(ar),pe=!0}var ii=void 0,mo=void 0,Mi,ka,ns,wo;if("text-field"in tt){ka=Math.round(ho(we,"layout","text-size",et,ke,j));var Ua=ho(we,"layout","text-font",et,ke,j);Mi=ho(we,"layout","text-line-height",et,ke,j),mo=eE(s(Ua),ka,Mi),ns=ho(we,"layout","text-letter-spacing",et,ke,j),wo=ho(we,"layout","text-max-width",et,ke,j);var Ya=ho(we,"layout","text-field",et,ke,j);typeof Ya=="object"&&Ya.sections?Ya.sections.length===1?ii=Ya.toString():ii=Ya.sections.reduce(function(Ki,Xi,aa){var Mu=Xi.fontStack?Xi.fontStack.split(","):Ua,Hr=eE(s(Mu),ka*(Xi.scale||1),Mi),ci=Xi.text;if(ci===`
|
||
`)return Ki.push(`
|
||
`,""),Ki;if(Ue==2){Ki.push(dE(ci,ns),Hr);return}ci=fE(ci,Hr,wo,ns).split(`
|
||
`);for(var rs=0,Ai=ci.length;rs<Ai;++rs)rs>0&&Ki.push(`
|
||
`,""),Ki.push(ci[rs],Hr);return Ki},[]):ii=k3(Ya,Ne).trim(),Vt=ho(we,"paint","text-opacity",et,ke,j)}if(ii&&Vt&&!Ut){pe||(++We,Bn=oe[We],(!Bn||!Bn.getText()||Bn.getFill()||Bn.getStroke())&&(Bn=new R0,oe[We]=Bn),Bn.setImage(void 0),Bn.setGeometry(void 0)),Bn.getText()||Bn.setText(Je||new GX({padding:[2,2,2,2]})),Je=Bn.getText();var Vi=tt["text-transform"];Vi=="uppercase"?ii=Array.isArray(ii)?ii.map(function(Xi,aa){return aa%2?Xi:Xi.toUpperCase()}):ii.toUpperCase():Vi=="lowercase"&&(ii=Array.isArray(ii)?ii.map(function(Xi,aa){return aa%2?Xi:Xi.toLowerCase()}):ii.toLowerCase());var Rl=Array.isArray(ii)?ii:Ue==2?dE(ii,ns):fE(ii,mo,wo,ns);Je.setText(Rl),Je.setFont(mo),Je.setRotation(O3(ho(we,"layout","text-rotate",et,ke,j)));var Ps=ho(we,"layout","text-anchor",et,ke,j),Et=pe||Ue==1?"point":ho(we,"layout","symbol-placement",et,ke,j);Je.setPlacement(Et),Je.setOverflow(Et==="point");var ki=ho(we,"paint","text-halo-width",et,ke,j),Mr=ho(we,"layout","text-offset",et,ke,j),ms=ho(we,"paint","text-translate",et,ke,j),oa=0,ba=0;if(Et=="point"){var Ge="center";Ps.indexOf("left")!==-1?(Ge="left",ba=ki):Ps.indexOf("right")!==-1&&(Ge="right",ba=-ki),Je.setTextAlign(Ge);var _t=ho(we,"layout","text-rotation-alignment",et,ke,j);Je.setRotateWithView(_t=="map")}else Je.setMaxAngle(O3(ho(we,"layout","text-max-angle",et,ke,j))*ii.length/Rl.length),Je.setTextAlign(),Je.setRotateWithView(!1);var cn="middle";Ps.indexOf("bottom")==0?(cn="bottom",oa=-ki-.5*(Mi-1)*ka):Ps.indexOf("top")==0&&(cn="top",oa=ki+.5*(Mi-1)*ka),Je.setTextBaseline(cn),Je.setOffsetX(Mr[0]*ka+ba+ms[0]),Je.setOffsetY(Mr[1]*ka+oa+ms[1]),re.setColor(Wm(ho(we,"paint","text-color",et,ke,j),Vt)),Je.setFill(re);var jn=Wm(ho(we,"paint","text-halo-color",et,ke,j),Vt);if(jn){Ie.setColor(jn),ki*=2;var An=.5*ka;Ie.setWidth(ki<=An?ki:An),Je.setStroke(Ie)}else Je.setStroke(void 0);var Qn=ho(we,"layout","text-padding",et,ke,j),_i=Je.getPadding();Qn!==_i[0]&&(_i[0]=Qn,_i[1]=Qn,_i[2]=Qn,_i[3]=Qn),Bn.setZIndex(ar)}}},Pt=0,ut=je.length;Pt<ut;++Pt)vt(Pt);if(We>-1)return oe.length=We+1,oe}};return r.setStyle(Se),r.set("mapbox-source",W),r.set("mapbox-layers",B),Se}var _C={exports:{}},ore=_C.exports,X8;function are(){return X8||(X8=1,(function(){var r;_C.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return r},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},r=["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(ore)),_C.exports}var sre=are();const lre=us(sre);var J8={},ure=/font-family: ?([^;]*);/,Are=/("|')/g,X_;function cre(r){if(!X_){X_={};for(var t=document.styleSheets,e=0,n=t.length;e<n;++e){var i=t[e];try{var o=i.rules||i.cssRules;if(o)for(var s=0,a=o.length;s<a;++s){var f=o[s];if(f.type==5){var g=f.cssText.match(ure);X_[g[1].replace(Are,"")]=!0}}}catch{}}}return r in X_}var e7={},dre=lre.getNames();function hre(r){var t=r.toString();if(t in e7)return r;for(var e=r.map(function(g){var b=eE(g,1).split(" ");return[b.slice(3).join(" ").replace(/"/g,""),b[1]+b[0]]}),n=0,i=e.length;n<i;++n){var o=e[n],s=o[0];if(!cre(s)&&dre.indexOf(s)!==-1){var a="https://fonts.googleapis.com/css?family="+s.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+a+'"]')){var f=document.createElement("link");f.href=a,f.rel="stylesheet",document.head.appendChild(f)}}}return e7[t]=!0,r}var ZF=/^(.*)(\?.*)$/;function _b(r,t){return t&&r.indexOf(".")===0&&(r=t+r),r}function T3(r,t,e){r=_b(r,t);var n=r.match(ZF);return n?n[1]+e+(n.length>2?n[2]:""):r+e}function fre(r,t,e,n,i){return new Promise(function(o,s){if(typeof t!="object"&&(t=JSON.parse(t)),t.version!=8)return s(new Error("glStyle version 8 required."));if(!(r instanceof qL||r instanceof AF))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,f,g,b;function I(){!b&&(!t.sprite||f)?(b=ire(r,t,e,i,f,g,hre),r.getStyle()?o():s(new Error("Nothing to show for source [".concat(e,"]")))):b?(r.setStyle(b),o()):s(new Error("Something went wrong trying to apply style."))}if(t.sprite){a=window.devicePixelRatio>=1.5?.5:1;var S=a==.5?"@2x":"",B=T3(t.sprite,n,S+".json");fetch(B,{credentials:"same-origin"}).then(function(P){return!P.ok&&S!==""?(B=T3(t.sprite,n,".json"),fetch(B,{credentials:"same-origin"})):P}).then(function(P){if(P.ok)return P.json();s(new Error("Problem fetching sprite from ".concat(B,": ").concat(P.statusText)))}).then(function(P){if(P===void 0)return s(new Error("No sprites found."));f=P,g=T3(t.sprite,n,S+".png"),I()}).catch(function(P){s(new Error("Sprites cannot be loaded: ".concat(B,": ").concat(P.message)))})}else I()})}var mE={};function pre(r,t){var e={id:t.id,type:t.type},n={};function i(o){var s=t.layout||{},a=t.paint||{};e.paint=a;var f=typeof r.getSource=="function"?r.getSource().getTileGrid().getZForResolution(o):r.getView().getZoom(),g=typeof r.getTargetElement=="function"?r.getTargetElement():void 0,b,I;if(a["background-color"]!==void 0&&(b=ho(e,"paint","background-color",f,mE,n),g&&(g.style.background=LA.parse(b).toString())),a["background-opacity"]!==void 0&&(I=ho(e,"paint","background-opacity",f,mE,n),g&&(g.style.opacity=I)),s.visibility=="none"){g&&(g.style.backgroundColor="",g.style.opacity="");return}return Wm(b,I)}if(typeof r.getTargetElement=="function")r.getTargetElement()&&i(),r.on(["change:resolution","change:target"],i);else if(typeof r.setBackground=="function")r.setBackground(i);else throw new Error("Unable to apply background.")}function mre(r,t){var e;return r.some(function(n){if(n.id==t)return e=n.source,!0}),e}function XF(r){var t=r.bounds;if(t){var e=jS([t[0],t[1]]),n=jS([t[2],t[3]]);return[e[0],e[1],n[0],n[1]]}}function gre(r,t){r=$F({},r);var e=[t,JSON.stringify(r)].toString(),n=J8[e];return n||(n=new lF({url:r.tiles?void 0:t,tileJSON:r.tiles?r:void 0}),J8[e]=n),new Promise(function(i){var o=n.on("change",function(){var s=n.getState();if(s==="ready"){var a=n.getTileJSON(),f=Array.isArray(a.tiles)?a.tiles:[a.tiles];if(t)for(var g=0,b=f.length;g<b;++g)f[g]=decodeURI(new URL(f[g],t).href);var I=n.getTileGrid(),S=XF(a),B=a.minzoom||0,P=a.maxzoom||22,U=n.get("ol-source");U===void 0&&(U=new cF({attributions:n.getAttributions(),format:new pH,tileGrid:new qv({origin:I.getOrigin(0),extent:S||I.getExtent(),minZoom:B,resolutions:j1.slice(0,P+1),tileSize:512}),urls:f}),n.set("ol-source",U)),cv(o),i(U)}else s==="error"&&(n.set("ol-source",null),cv(o),i(void 0))});n.getState()==="ready"&&n.changed()})}function yre(r,t){var e=new AF({declutter:!0,visible:!1});return gre(r,t).then(function(n){e.setSource(n)}),e}function vre(r,t){var e=new WJ,n=new lF({transition:0,url:r.tiles?void 0:t,tileJSON:r.tiles?r:void 0,crossOrigin:"anonymous"}),i=n.on("change",function(){var o=n.getState();if(o==="ready"){cv(i);var s=n.getTileJSON(),a=XF(s),f=n.getTileGrid(),g=r.tileSize||s.tileSize||512,b=s.minzoom||0,I=s.maxzoom||22;n.tileGrid=new qv({origin:f.getOrigin(0),extent:a||f.getExtent(),minZoom:b,resolutions:U6({maxZoom:I,tileSize:g}).getResolutions(),tileSize:g}),e.setSource(n)}else o==="error"&&(cv(i),e.setSource(void 0))});return n.setTileLoadFunction(function(o,s){if(s.indexOf("{bbox-epsg-3857}")!=-1){var a=n.getTileGrid().getTileCoordExtent(o.getTileCoord());s=s.replace("{bbox-epsg-3857}",a.toString())}var f=o.getImage();f.src=s}),e}var t7=new HV;function _re(r,t){var e=r.data,n,i;return typeof e=="string"?i=_b(e,t):n=t7.readFeatures(e,{featureProjection:"EPSG:3857"}),new qL({declutter:!0,source:new HL({attributions:r.attribution,features:n,format:t7,url:i}),visible:!1})}function n7(r,t,e,n){var i=e.getZoom(),o=ho(r,"paint","raster-opacity",i,mE,n);t.setOpacity(o)}function r7(r,t,e,n,i,o){o===void 0&&(o="");var s=[],a=t.getView();!a.isDef()&&!a.getRotation()&&!a.getResolutions()&&(a=new dm($F(a.getProperties(),{maxResolution:j1[0]})),t.setView(a)),"center"in r&&!a.getCenter()&&a.setCenter(jS(r.center)),"zoom"in r&&a.getZoom()===void 0&&a.setResolution(j1[0]/Math.pow(2,r.zoom)),(!a.getCenter()||a.getZoom()===void 0)&&a.fit(a.getProjection().getExtent(),{nearest:!0,size:t.getSize()}),r.sprite&&(r.sprite.indexOf("mapbox://")==0?r.sprite=e+"/sprite"+o:r.sprite.indexOf("http")!=0&&(r.sprite=(n?n+i:"")+r.sprite+o));for(var f=r.layers,g=[],b,I,S,B,P,U,j=function(J,$){b=f[J];var X=b.type;if(!(X=="heatmap"||X=="hillshade"))if(X=="background")pre(t,b);else{if(B=b.source||mre(f,b.ref),B!=S){if(g.length&&(s.push(i7(P,g,r,i,t)),g=[]),I=r.sources[B],U=I.url,U)if(U=_b(U,i),U.indexOf("mapbox://")==0){var G=U.replace("mapbox://","");I.tiles=["a","b","c","d"].map(function(ge){return"https://"+ge+".tiles.mapbox.com/v4/"+G+"/{z}/{x}/{y}."+(I.type=="vector"?"vector.pbf":"png")+o})}else U.indexOf("/")===0&&n.indexOf("http")===0&&(U=n+U);if(I.tiles&&(I.tiles=I.tiles.map(function(ge){return _b(ge,i)})),I.type=="vector")P=yre(I,U);else if(I.type=="raster"){P=vre(I,U),P.setVisible(b.layout?b.layout.visibility!=="none":!0);var ae={};a.on("change:resolution",n7.bind(q,b,P,a,ae)),n7(b,P,a,ae)}else I.type=="geojson"&&(P=_re(I,i));S=B,P&&P.set("mapbox-source",S)}g.push(b.id)}},q=this,W=0,ee=f.length;W<ee;++W)j(W);return s.push(i7(P,g,r,i,t)),t.set("mapbox-style",r),Promise.all(s)}function Cre(r,t){var e,n="",i="",o="",s="";if((typeof r=="string"||r instanceof HTMLElement)&&(r=new D6({target:r})),typeof t=="string"){var a=t.match(ZF);a&&(i=a[1],n=a.length>2?a[2]:""),e=new Promise(function(f,g){fetch(t,{credentials:"same-origin"}).then(function(b){return b.json()}).then(function(b){var I=document.createElement("A");I.href=t;var S=I.href;s=I.pathname.split("/").slice(0,-1).join("/")+"/",o=S.substr(0,S.indexOf(s)),r7(b,r,i,o,s,n).then(function(){f(r)}).catch(g)}).catch(function(b){g(new Error("Could not load ".concat(t,": ").concat(b.message)))})})}else e=new Promise(function(f,g){r7(t,r).then(function(){f(r)}).catch(g)});return e}function bre(r,t){return(typeof r=="string"||r instanceof HTMLElement)&&(r=new D6({target:r})),setTimeout(function(){Cre(r,t)},0),r}function i7(r,t,e,n,i){for(var o=24,s=0,a=e.layers,f=0,g=a.length;f<g;++f){var b=a[f];t.indexOf(b.id)!==-1&&(o=Math.min("minzoom"in b?b.minzoom:0,o),s=Math.max("maxzoom"in b?b.maxzoom:24,s))}return new Promise(function(I,S){var B=function(){var P=r.getSource();if(!P||P.getState()==="error"){S(new Error("Error accessing data for source "+r.get("mapbox-source")));return}if("getTileGrid"in P){var U=P.getTileGrid();if(U){var j=U.getMinZoom();(o>0||j>0)&&r.setMaxResolution(Math.min(j1[o],U.getResolution(j))+1e-9),s<24&&r.setMinResolution(j1[s]+1e-9)}}P instanceof HL||P instanceof cF?fre(r,e,t,n).then(function(){r.setVisible(!0),I()},function(q){S(q)}):I()};r.set("mapbox-layers",t),i.getLayers().getArray().indexOf(r)===-1&&i.addLayer(r),r.getSource()?B():r.once("change:source",B)})}function ai(){var r="/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",t="7dfd17e1d8192e9d94618577798e5822b83d8c7d",e=globalThis,n="__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:42,column:26}},11:{start:{line:42,column:19},end:{line:42,column:26}},12:{start:{line:43,column:4},end:{line:43,column:33}},13:{start:{line:44,column:4},end:{line:44,column:33}},14:{start:{line:47,column:4},end:{line:51,column:5}},15:{start:{line:48,column:6},end:{line:50,column:8}},16:{start:{line:54,column:4},end:{line:60,column:7}},17:{start:{line:61,column:16},end:{line:68,column:6}},18:{start:{line:69,column:4},end:{line:77,column:7}},19:{start:{line:70,column:21},end:{line:70,column:45}},20:{start:{line:71,column:6},end:{line:76,column:9}},21:{start:{line:78,column:22},end:{line:88,column:5}},22:{start:{line:79,column:19},end:{line:79,column:42}},23:{start:{line:80,column:21},end:{line:80,column:56}},24:{start:{line:81,column:6},end:{line:87,column:9}},25:{start:{line:89,column:4},end:{line:89,column:16}},26:{start:{line:90,column:4},end:{line:90,column:33}},27:{start:{line:91,column:4},end:{line:101,column:7}},28:{start:{line:92,column:21},end:{line:92,column:56}},29:{start:{line:93,column:6},end:{line:100,column:9}},30:{start:{line:102,column:4},end:{line:102,column:19}},31:{start:{line:103,column:4},end:{line:105,column:6}},32:{start:{line:107,column:17},end:{line:110,column:3}},33:{start:{line:108,column:4},end:{line:108,column:20}},34:{start:{line:109,column:4},end:{line:109,column:37}},35:{start:{line:112,column:14},end:{line:112,column:26}},36:{start:{line:113,column:4},end:{line:180,column:9}},37:{start:{line:117,column:22},end:{line:117,column:45}},38:{start:{line:172,column:22},end:{line:172,column:40}},39:{start:{line:183,column:22},end:{line:183,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:45,column:3}},line:41},7:{name:"(anonymous_7)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:32},end:{line:52,column:3}},line:46},8:{name:"(anonymous_8)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:22},end:{line:106,column:3}},line:53},9:{name:"(anonymous_9)",decl:{start:{line:69,column:26},end:{line:69,column:27}},loc:{start:{line:69,column:35},end:{line:77,column:5}},line:69},10:{name:"(anonymous_10)",decl:{start:{line:78,column:22},end:{line:78,column:23}},loc:{start:{line:78,column:28},end:{line:88,column:5}},line:78},11:{name:"(anonymous_11)",decl:{start:{line:91,column:25},end:{line:91,column:26}},loc:{start:{line:91,column:33},end:{line:101,column:5}},line:91},12:{name:"(anonymous_12)",decl:{start:{line:107,column:17},end:{line:107,column:18}},loc:{start:{line:107,column:24},end:{line:110,column:3}},line:107},13:{name:"(anonymous_13)",decl:{start:{line:111,column:2},end:{line:111,column:3}},loc:{start:{line:111,column:11},end:{line:181,column:3}},line:111},14:{name:"(anonymous_14)",decl:{start:{line:117,column:15},end:{line:117,column:16}},loc:{start:{line:117,column:22},end:{line:117,column:45}},line:117},15:{name:"(anonymous_15)",decl:{start:{line:172,column:15},end:{line:172,column:16}},loc:{start:{line:172,column:22},end:{line:172,column:40}},line:172}},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:42,column:26}},type:"if",locations:[{start:{line:42,column:4},end:{line:42,column:26}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},3:{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:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:47},4:{loc:{start:{line:133,column:26},end:{line:133,column:59}},type:"binary-expr",locations:[{start:{line:133,column:26},end:{line:133,column:53}},{start:{line:133,column:57},end:{line:133,column:59}}],line:133},5:{loc:{start:{line:145,column:6},end:{line:167,column:10}},type:"binary-expr",locations:[{start:{line:145,column:6},end:{line:145,column:29}},{start:{line:145,column:49},end:{line:167,column:10}}],line:145}},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,IAAK;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:"7dfd17e1d8192e9d94618577798e5822b83d8c7d"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ai=function(){return s},s}ai();function o7(r){return ai().f[0]++,ai().s[0]++,ai().b[1][0]++,!r||(ai().b[1][1]++,r.length<2)?(ai().b[0][0]++,ai().s[1]++,null):(ai().b[0][1]++,ai().s[2]++,ue.jsx("span",{className:"maputnik-coords",children:r.map(t=>(ai().f[1]++,ai().s[3]++,String(t).padStart(7," "))).join(", ")}))}class JF extends Zn.Component{constructor(e){ai().f[5]++,ai().s[7]++;super(e);Kn(this,"updateStyle");Kn(this,"map");Kn(this,"container",(ai().s[5]++,null));Kn(this,"overlay");Kn(this,"popupContainer",(ai().s[6]++,null));Kn(this,"closeOverlay",(ai().s[32]++,e=>{ai().f[12]++,ai().s[33]++,e.target.blur(),ai().s[34]++,this.overlay.setPosition(void 0)}));ai().s[8]++,this.state={zoom:"0",rotation:"0",cursor:[],center:[]},ai().s[9]++,this.updateStyle=zb.throttle(this._updateStyle.bind(this),200)}_updateStyle(e){if(ai().f[6]++,ai().s[10]++,this.map)ai().b[2][1]++;else{ai().b[2][0]++,ai().s[11]++;return}ai().s[12]++,this.map.getLayers().clear(),ai().s[13]++,bre(this.map,e)}componentDidUpdate(e){ai().f[7]++,ai().s[14]++,this.props.mapStyle!==e.mapStyle?(ai().b[3][0]++,ai().s[15]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))):ai().b[3][1]++}componentDidMount(){ai().f[8]++,ai().s[16]++,this.overlay=new xZ({element:this.popupContainer,autoPan:!0,autoPanAnimation:{duration:250}});const e=(ai().s[17]++,new D6({target:this.container,overlays:[this.overlay],view:new dm({zoom:1,center:[180,-90]})}));ai().s[18]++,e.on("pointermove",i=>{ai().f[9]++;const o=(ai().s[19]++,e3(i.coordinate));ai().s[20]++,this.setState({cursor:[o[0].toFixed(2),o[1].toFixed(2)]})}),ai().s[21]++;const n=()=>{ai().f[10]++;const i=(ai().s[22]++,e.getView().getZoom()),o=(ai().s[23]++,e3(e.getView().getCenter()));ai().s[24]++,this.props.onChange({zoom:i,center:{lng:o[0],lat:o[1]}})};ai().s[25]++,n(),ai().s[26]++,e.on("moveend",n),ai().s[27]++,e.on("postrender",i=>{ai().f[11]++;const o=(ai().s[28]++,e3(e.getView().getCenter()));ai().s[29]++,this.setState({center:[o[0].toFixed(2),o[1].toFixed(2)],rotation:e.getView().getRotation().toFixed(2),zoom:e.getView().getZoom().toFixed(2)})}),ai().s[30]++,this.map=e,ai().s[31]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))}render(){ai().f[13]++;const e=(ai().s[35]++,this.props.t);return ai().s[36]++,ue.jsxs("div",{className:"maputnik-ol-container",children:[ue.jsxs("div",{ref:n=>(ai().f[14]++,ai().s[37]++,this.popupContainer=n),style:{background:"black"},className:"maputnik-popup",children:[ue.jsx("button",{className:"maplibregl-popup-close-button",onClick:this.closeOverlay,"aria-label":e("Close popup"),children:"×"}),ue.jsx(ID,{features:(ai().b[4][0]++,this.state.selectedFeatures||(ai().b[4][1]++,[])),onLayerSelect:this.props.onLayerSelect})]}),ue.jsxs("div",{className:"maputnik-ol-zoom",children:[e("Zoom:")," ",this.state.zoom]}),(ai().b[5][0]++,this.props.debugToolbox&&(ai().b[5][1]++,ue.jsxs("div",{className:"maputnik-ol-debug",children:[ue.jsxs("div",{children:[ue.jsxs("label",{children:[e("cursor:")," "]}),ue.jsx("span",{children:o7(this.state.cursor)})]}),ue.jsxs("div",{children:[ue.jsxs("label",{children:[e("center:")," "]}),ue.jsx("span",{children:o7(this.state.center)})]}),ue.jsxs("div",{children:[ue.jsxs("label",{children:[e("rotation:")," "]}),ue.jsx("span",{children:this.state.rotation})]})]}))),ue.jsx("div",{className:"maputnik-ol",ref:n=>(ai().f[15]++,ai().s[38]++,this.container=n),role:"region","aria-label":e("Map view"),style:{...this.props.style}})]})}}Kn(JF,"defaultProps",(ai().s[4]++,{onMapLoaded:()=>{ai().f[2]++},onDataChange:()=>{ai().f[3]++},onLayerSelect:()=>{ai().f[4]++}}));const xre=(ai().s[39]++,qa()(JF));var P3={exports:{}};/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/var a7;function wre(){return a7||(a7=1,function(r){(function(){var t={}.hasOwnProperty;function e(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return e.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}r.exports?(e.default=e,r.exports=e):window.classNames=e})()}(P3)),P3.exports}var Mre=wre();const Ip=us(Mre);function U0(){var r="/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",t="e73e8fb606fcd7318a8222b2e50c576ed3ad8702",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return U0=function(){return s},s}U0();class Sre extends Zn.Component{render(){U0().f[0]++;const t=(U0().s[0]++,{width:20,height:20,...this.props.style});return U0().s[1]++,this.props.isCollapsed?(U0().b[0][0]++,ue.jsx(IY,{style:t})):(U0().b[0][1]++,ue.jsx(BY,{style:t}))}}function d1(){var r="/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",t="b04bfec534013c327fd210571832bbd2813a944a",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return d1=function(){return s},s}d1();class Ere extends Zn.Component{render(){return d1().f[0]++,d1().s[0]++,ue.jsx("li",{className:"maputnik-layer-list-group",children:ue.jsxs("div",{className:"maputnik-layer-list-group-header","data-wd-key":"layer-list-group:"+this.props["data-wd-key"],onClick:t=>(d1().f[1]++,d1().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:[ue.jsx("button",{className:"maputnik-layer-list-group-title","aria-controls":this.props["aria-controls"],"aria-expanded":this.props.isActive,children:this.props.title}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx(Sre,{style:{height:14,width:14},isCollapsed:this.props.isActive})]})})}}function wv(){return wv=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)({}).hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},wv.apply(null,arguments)}function Ore(r){if(Array.isArray(r))return r}function Bre(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,i,o,s,a=[],f=!0,g=!1;try{if(o=(e=e.call(r)).next,t!==0)for(;!(f=(n=o.call(e)).done)&&(a.push(n.value),a.length!==t);f=!0);}catch(b){g=!0,i=b}finally{try{if(!f&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(g)throw i}}return a}}function gE(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function eU(r,t){if(r){if(typeof r=="string")return gE(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?gE(r,t):void 0}}function Ire(){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 tU(r,t){return Ore(r)||Bre(r,t)||eU(r,t)||Ire()}function z1(r){"@babel/helpers - typeof";return z1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z1(r)}function kre(r,t){if(z1(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(z1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function nU(r){var t=kre(r,"string");return z1(t)=="symbol"?t:t+""}function ks(r,t,e){return(t=nU(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function K3(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&n.push.apply(n,Object.getOwnPropertySymbols(e).filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.forEach(function(i){ks(r,i,e[i])})}return r}function Vv(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function Tre(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,nU(n.key),n)}}function Hv(r,t,e){return t&&Tre(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function ha(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function pO(r,t){if(t&&(z1(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ha(r)}function Mv(r){return Mv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mv(r)}function yE(r,t){return yE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},yE(r,t)}function mO(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&yE(r,t)}var R3,s7;function Pre(){if(s7)return R3;s7=1;var r=function(t,e,n,i,o,s,a,f){if(!t){var g;if(e===void 0)g=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var b=[n,i,o,s,a,f],I=0;g=new Error(e.replace(/%s/g,function(){return b[I++]})),g.name="Invariant Violation"}throw g.framesToPop=1,g}};return R3=r,R3}var Kre=Pre();const og=us(Kre);function Rre(r){if(Array.isArray(r))return gE(r)}function Dre(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Lre(){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 Fre(r){return Rre(r)||Dre(r)||eU(r)||Lre()}var Ure=function(){function r(){Vv(this,r),ks(this,"refs",{})}return Hv(r,[{key:"add",value:function(e,n){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(n)}},{key:"remove",value:function(e,n){var i=this.getIndex(e,n);i!==-1&&this.refs[e].splice(i,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find(function(n){var i=n.node;return i.sortableInfo.index==e.active.index})}},{key:"getIndex",value:function(e,n){return this.refs[e].indexOf(n)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.active.collection;return this.refs[e].sort(jre)}}]),r}();function jre(r,t){var e=r.node.sortableInfo.index,n=t.node.sortableInfo.index;return e-n}function rU(r,t){return Object.keys(r).reduce(function(e,n){return t.indexOf(n)===-1&&(e[n]=r[n]),e},{})}var Pg={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},iU=function(){if(typeof window>"u"||typeof document>"u")return"";var r=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(r).join("").match(/-(moz|webkit|ms)-/)||r.OLink===""&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function J_(r,t){Object.keys(t).forEach(function(e){r.style[e]=t[e]})}function eC(r,t){r.style["".concat(iU,"Transform")]=t==null?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function D3(r,t){r.style["".concat(iU,"TransitionDuration")]=t==null?"":"".concat(t,"ms")}function Uy(r,t){for(;r;){if(t(r))return r;r=r.parentNode}return null}function l7(r,t,e){return Math.max(r,Math.min(e,t))}function h1(r){return r.substr(-2)==="px"?parseFloat(r):0}function zre(r){var t=window.getComputedStyle(r);return{bottom:h1(t.marginBottom),left:h1(t.marginLeft),right:h1(t.marginRight),top:h1(t.marginTop)}}function gO(r,t){var e=t.displayName||t.name;return e?"".concat(r,"(").concat(e,")"):r}function L3(r,t){var e=r.getBoundingClientRect();return{top:e.top+t.top,left:e.left+t.left}}function xy(r){return r.touches&&r.touches.length?{x:r.touches[0].pageX,y:r.touches[0].pageY}:r.changedTouches&&r.changedTouches.length?{x:r.changedTouches[0].pageX,y:r.changedTouches[0].pageY}:{x:r.pageX,y:r.pageY}}function Nre(r){return r.touches&&r.touches.length||r.changedTouches&&r.changedTouches.length}function CC(r,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0};if(r){var n={left:e.left+r.offsetLeft,top:e.top+r.offsetTop};return r.parentNode===t?n:CC(r.parentNode,t,n)}}function Gre(r,t,e){return r<e&&r>t?r-1:r>e&&r<t?r+1:r}function u7(r){var t=r.lockOffset,e=r.width,n=r.height,i=t,o=t,s="px";if(typeof t=="string"){var a=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);og(a!==null,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),i=parseFloat(t),o=parseFloat(t),s=a[1]}return og(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),s==="%"&&(i=i*e/100,o=o*n/100),{x:i,y:o}}function Wre(r){var t=r.height,e=r.width,n=r.lockOffset,i=Array.isArray(n)?n:[n,n];og(i.length===2,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",n);var o=tU(i,2),s=o[0],a=o[1];return[u7({height:t,lockOffset:s,width:e}),u7({height:t,lockOffset:a,width:e})]}function Qre(r){var t=window.getComputedStyle(r),e=/(auto|scroll)/,n=["overflow","overflowX","overflowY"];return n.find(function(i){return e.test(t[i])})}function oU(r){return r instanceof HTMLElement?Qre(r)?r:oU(r.parentNode):null}function qre(r){var t=window.getComputedStyle(r);return t.display==="grid"?{x:h1(t.gridColumnGap),y:h1(t.gridRowGap)}:{x:0,y:0}}var I0={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},j0={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function Yre(r){var t="input, textarea, select, canvas, [contenteditable]",e=r.querySelectorAll(t),n=r.cloneNode(!0),i=Fre(n.querySelectorAll(t));return i.forEach(function(o,s){if(o.type!=="file"&&(o.value=e[s].value),o.type==="radio"&&o.name&&(o.name="__sortableClone__".concat(o.name)),o.tagName===j0.Canvas&&e[s].width>0&&e[s].height>0){var a=o.getContext("2d");a.drawImage(e[s],0,0)}}),n}function $re(r){var t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return e=t=function(i){mO(o,i);function o(){var s,a;Vv(this,o);for(var f=arguments.length,g=new Array(f),b=0;b<f;b++)g[b]=arguments[b];return a=pO(this,(s=Mv(o)).call.apply(s,[this].concat(g))),ks(ha(ha(a)),"wrappedInstance",di.createRef()),a}return Hv(o,[{key:"componentDidMount",value:function(){var a=Jb.findDOMNode(this);a.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return og(n.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 a=n.withRef?this.wrappedInstance:null;return di.createElement(r,wv({ref:a},this.props))}}]),o}(di.Component),ks(t,"displayName",gO("sortableHandle",r)),e}function A7(r){return r.sortableHandle!=null}var Vre=function(){function r(t,e){Vv(this,r),this.container=t,this.onScrollCallback=e}return Hv(r,[{key:"clear",value:function(){this.interval!=null&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var n=this,i=e.translate,o=e.minTranslate,s=e.maxTranslate,a=e.width,f=e.height,g={x:0,y:0},b={x:1,y:1},I={x:10,y:10},S=this.container,B=S.scrollTop,P=S.scrollLeft,U=S.scrollHeight,j=S.scrollWidth,q=S.clientHeight,W=S.clientWidth,ee=B===0,J=U-B-q===0,$=P===0,X=j-P-W===0;i.y>=s.y-f/2&&!J?(g.y=1,b.y=I.y*Math.abs((s.y-f/2-i.y)/f)):i.x>=s.x-a/2&&!X?(g.x=1,b.x=I.x*Math.abs((s.x-a/2-i.x)/a)):i.y<=o.y+f/2&&!ee?(g.y=-1,b.y=I.y*Math.abs((i.y-f/2-o.y)/f)):i.x<=o.x+a/2&&!$&&(g.x=-1,b.x=I.x*Math.abs((i.x-a/2-o.x)/a)),this.interval&&(this.clear(),this.isAutoScrolling=!1),(g.x!==0||g.y!==0)&&(this.interval=setInterval(function(){n.isAutoScrolling=!0;var G={left:b.x*g.x,top:b.y*g.y};n.container.scrollTop+=G.top,n.container.scrollLeft+=G.left,n.onScrollCallback(G)},5))}}]),r}();function Hre(r){var t=r.node;return{height:t.offsetHeight,width:t.offsetWidth}}function Zre(r){var t=[j0.Input,j0.Textarea,j0.Select,j0.Option,j0.Button];return!!(t.indexOf(r.target.tagName)!==-1||Uy(r.target,function(e){return e.contentEditable==="true"}))}var aU={axis:mi.oneOf(["x","y","xy"]),contentWindow:mi.any,disableAutoscroll:mi.bool,distance:mi.number,getContainer:mi.func,getHelperDimensions:mi.func,helperClass:mi.string,helperContainer:mi.oneOfType([mi.func,typeof HTMLElement>"u"?mi.any:mi.instanceOf(HTMLElement)]),hideSortableGhost:mi.bool,keyboardSortingTransitionDuration:mi.number,lockAxis:mi.string,lockOffset:mi.oneOfType([mi.number,mi.string,mi.arrayOf(mi.oneOfType([mi.number,mi.string]))]),lockToContainerEdges:mi.bool,onSortEnd:mi.func,onSortMove:mi.func,onSortOver:mi.func,onSortStart:mi.func,pressDelay:mi.number,pressThreshold:mi.number,keyCodes:mi.shape({lift:mi.arrayOf(mi.number),drop:mi.arrayOf(mi.number),cancel:mi.arrayOf(mi.number),up:mi.arrayOf(mi.number),down:mi.arrayOf(mi.number)}),shouldCancelStart:mi.func,transitionDuration:mi.number,updateBeforeSortStart:mi.func,useDragHandle:mi.bool,useWindowAsScrollContainer:mi.bool},sU={lift:[I0.SPACE],drop:[I0.SPACE],cancel:[I0.ESC],up:[I0.UP,I0.LEFT],down:[I0.DOWN,I0.RIGHT]},Xre={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:Hre,hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:sU,shouldCancelStart:Zre,transitionDuration:300,useWindowAsScrollContainer:!1},Jre=Object.keys(aU);function eie(r){og(!(r.distance&&r.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 tie(r,t){try{var e=r()}catch(n){return t(!0,n)}return e&&e.then?e.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var lU=di.createContext({manager:{}});function nie(r){var t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return e=t=function(i){mO(o,i);function o(s){var a;Vv(this,o),a=pO(this,Mv(o).call(this,s)),ks(ha(ha(a)),"state",{}),ks(ha(ha(a)),"handleStart",function(g){var b=a.props,I=b.distance,S=b.shouldCancelStart;if(!(g.button===2||S(g))){a.touched=!0,a.position=xy(g);var B=Uy(g.target,function(ee){return ee.sortableInfo!=null});if(B&&B.sortableInfo&&a.nodeIsChild(B)&&!a.state.sorting){var P=a.props.useDragHandle,U=B.sortableInfo,j=U.index,q=U.collection,W=U.disabled;if(W||P&&!Uy(g.target,A7))return;a.manager.active={collection:q,index:j},!Nre(g)&&g.target.tagName===j0.Anchor&&g.preventDefault(),I||(a.props.pressDelay===0?a.handlePress(g):a.pressTimer=setTimeout(function(){return a.handlePress(g)},a.props.pressDelay))}}}),ks(ha(ha(a)),"nodeIsChild",function(g){return g.sortableInfo.manager===a.manager}),ks(ha(ha(a)),"handleMove",function(g){var b=a.props,I=b.distance,S=b.pressThreshold;if(!a.state.sorting&&a.touched&&!a._awaitingUpdateBeforeSortStart){var B=xy(g),P={x:a.position.x-B.x,y:a.position.y-B.y},U=Math.abs(P.x)+Math.abs(P.y);a.delta=P,!I&&(!S||U>=S)?(clearTimeout(a.cancelTimer),a.cancelTimer=setTimeout(a.cancel,0)):I&&U>=I&&a.manager.isActive()&&a.handlePress(g)}}),ks(ha(ha(a)),"handleEnd",function(){a.touched=!1,a.cancel()}),ks(ha(ha(a)),"cancel",function(){var g=a.props.distance,b=a.state.sorting;b||(g||clearTimeout(a.pressTimer),a.manager.active=null)}),ks(ha(ha(a)),"handlePress",function(g){try{var b=a.manager.getActive(),I=function(){if(b){var S=function(){var he=$.sortableInfo.index,Ie=zre($),re=qre(a.container),oe=a.scrollContainer.getBoundingClientRect(),Se=U({index:he,node:$,collection:X});if(a.node=$,a.margin=Ie,a.gridGap=re,a.width=Se.width,a.height=Se.height,a.marginOffset={x:a.margin.left+a.margin.right+a.gridGap.x,y:Math.max(a.margin.top,a.margin.bottom,a.gridGap.y)},a.boundingClientRect=$.getBoundingClientRect(),a.containerBoundingRect=oe,a.index=he,a.newIndex=he,a.axis={x:P.indexOf("x")>=0,y:P.indexOf("y")>=0},a.offsetEdge=CC($,a.container),G?a.initialOffset=xy(K3({},g,{pageX:a.boundingClientRect.left,pageY:a.boundingClientRect.top})):a.initialOffset=xy(g),a.initialScroll={left:a.scrollContainer.scrollLeft,top:a.scrollContainer.scrollTop},a.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},a.helper=a.helperContainer.appendChild(Yre($)),J_(a.helper,{boxSizing:"border-box",height:"".concat(a.height,"px"),left:"".concat(a.boundingClientRect.left-Ie.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(a.boundingClientRect.top-Ie.top,"px"),width:"".concat(a.width,"px")}),G&&a.helper.focus(),q&&(a.sortableGhost=$,J_($,{opacity:0,visibility:"hidden"})),a.minTranslate={},a.maxTranslate={},G){var ye=J?{top:0,left:0,width:a.contentWindow.innerWidth,height:a.contentWindow.innerHeight}:a.containerBoundingRect,nt=ye.top,Ne=ye.left,je=ye.width,et=ye.height,Ue=nt+et,ke=Ne+je;a.axis.x&&(a.minTranslate.x=Ne-a.boundingClientRect.left,a.maxTranslate.x=ke-(a.boundingClientRect.left+a.width)),a.axis.y&&(a.minTranslate.y=nt-a.boundingClientRect.top,a.maxTranslate.y=Ue-(a.boundingClientRect.top+a.height))}else a.axis.x&&(a.minTranslate.x=(J?0:oe.left)-a.boundingClientRect.left-a.width/2,a.maxTranslate.x=(J?a.contentWindow.innerWidth:oe.left+oe.width)-a.boundingClientRect.left-a.width/2),a.axis.y&&(a.minTranslate.y=(J?0:oe.top)-a.boundingClientRect.top-a.height/2,a.maxTranslate.y=(J?a.contentWindow.innerHeight:oe.top+oe.height)-a.boundingClientRect.top-a.height/2);j&&j.split(" ").forEach(function(We){return a.helper.classList.add(We)}),a.listenerNode=g.touches?g.target:a.contentWindow,G?(a.listenerNode.addEventListener("wheel",a.handleKeyEnd,!0),a.listenerNode.addEventListener("mousedown",a.handleKeyEnd,!0),a.listenerNode.addEventListener("keydown",a.handleKeyDown)):(Pg.move.forEach(function(We){return a.listenerNode.addEventListener(We,a.handleSortMove,!1)}),Pg.end.forEach(function(We){return a.listenerNode.addEventListener(We,a.handleSortEnd,!1)})),a.setState({sorting:!0,sortingIndex:he}),ee&&ee({node:$,index:he,collection:X,isKeySorting:G,nodes:a.manager.getOrderedRefs(),helper:a.helper},g),G&&a.keyMove(0)},B=a.props,P=B.axis,U=B.getHelperDimensions,j=B.helperClass,q=B.hideSortableGhost,W=B.updateBeforeSortStart,ee=B.onSortStart,J=B.useWindowAsScrollContainer,$=b.node,X=b.collection,G=a.manager.isKeySorting,ae=function(){if(typeof W=="function"){a._awaitingUpdateBeforeSortStart=!0;var ge=tie(function(){var he=$.sortableInfo.index;return Promise.resolve(W({collection:X,index:he,node:$,isKeySorting:G},g)).then(function(){})},function(he,Ie){if(a._awaitingUpdateBeforeSortStart=!1,he)throw Ie;return Ie});if(ge&&ge.then)return ge.then(function(){})}}();return ae&&ae.then?ae.then(S):S(ae)}}();return Promise.resolve(I&&I.then?I.then(function(){}):void 0)}catch(S){return Promise.reject(S)}}),ks(ha(ha(a)),"handleSortMove",function(g){var b=a.props.onSortMove;typeof g.preventDefault=="function"&&g.cancelable&&g.preventDefault(),a.updateHelperPosition(g),a.animateNodes(),a.autoscroll(),b&&b(g)}),ks(ha(ha(a)),"handleSortEnd",function(g){var b=a.props,I=b.hideSortableGhost,S=b.onSortEnd,B=a.manager,P=B.active.collection,U=B.isKeySorting,j=a.manager.getOrderedRefs();a.listenerNode&&(U?(a.listenerNode.removeEventListener("wheel",a.handleKeyEnd,!0),a.listenerNode.removeEventListener("mousedown",a.handleKeyEnd,!0),a.listenerNode.removeEventListener("keydown",a.handleKeyDown)):(Pg.move.forEach(function($){return a.listenerNode.removeEventListener($,a.handleSortMove)}),Pg.end.forEach(function($){return a.listenerNode.removeEventListener($,a.handleSortEnd)}))),a.helper.parentNode.removeChild(a.helper),I&&a.sortableGhost&&J_(a.sortableGhost,{opacity:"",visibility:""});for(var q=0,W=j.length;q<W;q++){var ee=j[q],J=ee.node;ee.edgeOffset=null,ee.boundingClientRect=null,eC(J,null),D3(J,null),ee.translate=null}a.autoScroller.clear(),a.manager.active=null,a.manager.isKeySorting=!1,a.setState({sorting:!1,sortingIndex:null}),typeof S=="function"&&S({collection:P,newIndex:a.newIndex,oldIndex:a.index,isKeySorting:U,nodes:j},g),a.touched=!1}),ks(ha(ha(a)),"autoscroll",function(){var g=a.props.disableAutoscroll,b=a.manager.isKeySorting;if(g){a.autoScroller.clear();return}if(b){var I=K3({},a.translate),S=0,B=0;a.axis.x&&(I.x=Math.min(a.maxTranslate.x,Math.max(a.minTranslate.x,a.translate.x)),S=a.translate.x-I.x),a.axis.y&&(I.y=Math.min(a.maxTranslate.y,Math.max(a.minTranslate.y,a.translate.y)),B=a.translate.y-I.y),a.translate=I,eC(a.helper,a.translate),a.scrollContainer.scrollLeft+=S,a.scrollContainer.scrollTop+=B;return}a.autoScroller.update({height:a.height,maxTranslate:a.maxTranslate,minTranslate:a.minTranslate,translate:a.translate,width:a.width})}),ks(ha(ha(a)),"onAutoScroll",function(g){a.translate.x+=g.left,a.translate.y+=g.top,a.animateNodes()}),ks(ha(ha(a)),"handleKeyDown",function(g){var b=g.keyCode,I=a.props,S=I.shouldCancelStart,B=I.keyCodes,P=B===void 0?{}:B,U=K3({},sU,P);a.manager.active&&!a.manager.isKeySorting||!a.manager.active&&(!U.lift.includes(b)||S(g)||!a.isValidSortingTarget(g))||(g.stopPropagation(),g.preventDefault(),U.lift.includes(b)&&!a.manager.active?a.keyLift(g):U.drop.includes(b)&&a.manager.active?a.keyDrop(g):U.cancel.includes(b)?(a.newIndex=a.manager.active.index,a.keyDrop(g)):U.up.includes(b)?a.keyMove(-1):U.down.includes(b)&&a.keyMove(1))}),ks(ha(ha(a)),"keyLift",function(g){var b=g.target,I=Uy(b,function(U){return U.sortableInfo!=null}),S=I.sortableInfo,B=S.index,P=S.collection;a.initialFocusedNode=b,a.manager.isKeySorting=!0,a.manager.active={index:B,collection:P},a.handlePress(g)}),ks(ha(ha(a)),"keyMove",function(g){var b=a.manager.getOrderedRefs(),I=b[b.length-1].node.sortableInfo.index,S=a.newIndex+g,B=a.newIndex;if(!(S<0||S>I)){a.prevIndex=B,a.newIndex=S;var P=Gre(a.newIndex,a.prevIndex,a.index),U=b.find(function(G){var ae=G.node;return ae.sortableInfo.index===P}),j=U.node,q=a.containerScrollDelta,W=U.boundingClientRect||L3(j,q),ee=U.translate||{x:0,y:0},J={top:W.top+ee.y-q.top,left:W.left+ee.x-q.left},$=B<S,X={x:$&&a.axis.x?j.offsetWidth-a.width:0,y:$&&a.axis.y?j.offsetHeight-a.height:0};a.handleSortMove({pageX:J.left+X.x,pageY:J.top+X.y,ignoreTransition:g===0})}}),ks(ha(ha(a)),"keyDrop",function(g){a.handleSortEnd(g),a.initialFocusedNode&&a.initialFocusedNode.focus()}),ks(ha(ha(a)),"handleKeyEnd",function(g){a.manager.active&&a.keyDrop(g)}),ks(ha(ha(a)),"isValidSortingTarget",function(g){var b=a.props.useDragHandle,I=g.target,S=Uy(I,function(B){return B.sortableInfo!=null});return S&&S.sortableInfo&&!S.sortableInfo.disabled&&(b?A7(I):I.sortableInfo)});var f=new Ure;return eie(s),a.manager=f,a.wrappedInstance=di.createRef(),a.sortableContextValue={manager:f},a.events={end:a.handleEnd,move:a.handleMove,start:a.handleStart},a}return Hv(o,[{key:"componentDidMount",value:function(){var a=this,f=this.props.useWindowAsScrollContainer,g=this.getContainer();Promise.resolve(g).then(function(b){a.container=b,a.document=a.container.ownerDocument||document;var I=a.props.contentWindow||a.document.defaultView||window;a.contentWindow=typeof I=="function"?I():I,a.scrollContainer=f?a.document.scrollingElement||a.document.documentElement:oU(a.container)||a.container,a.autoScroller=new Vre(a.scrollContainer,a.onAutoScroll),Object.keys(a.events).forEach(function(S){return Pg[S].forEach(function(B){return a.container.addEventListener(B,a.events[S],!1)})}),a.container.addEventListener("keydown",a.handleKeyDown)})}},{key:"componentWillUnmount",value:function(){var a=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach(function(f){return Pg[f].forEach(function(g){return a.container.removeEventListener(g,a.events[f])})}),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(a){var f=this.props,g=f.lockAxis,b=f.lockOffset,I=f.lockToContainerEdges,S=f.transitionDuration,B=f.keyboardSortingTransitionDuration,P=B===void 0?S:B,U=this.manager.isKeySorting,j=a.ignoreTransition,q=xy(a),W={x:q.x-this.initialOffset.x,y:q.y-this.initialOffset.y};if(W.y-=window.pageYOffset-this.initialWindowScroll.top,W.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=W,I){var ee=Wre({height:this.height,lockOffset:b,width:this.width}),J=tU(ee,2),$=J[0],X=J[1],G={x:this.width/2-$.x,y:this.height/2-$.y},ae={x:this.width/2-X.x,y:this.height/2-X.y};W.x=l7(this.minTranslate.x+G.x,this.maxTranslate.x-ae.x,W.x),W.y=l7(this.minTranslate.y+G.y,this.maxTranslate.y-ae.y,W.y)}g==="x"?W.y=0:g==="y"&&(W.x=0),U&&P&&!j&&D3(this.helper,P),eC(this.helper,W)}},{key:"animateNodes",value:function(){var a=this.props,f=a.transitionDuration,g=a.hideSortableGhost,b=a.onSortOver,I=this.containerScrollDelta,S=this.windowScrollDelta,B=this.manager.getOrderedRefs(),P={left:this.offsetEdge.left+this.translate.x+I.left,top:this.offsetEdge.top+this.translate.y+I.top},U=this.manager.isKeySorting,j=this.newIndex;this.newIndex=null;for(var q=0,W=B.length;q<W;q++){var ee=B[q].node,J=ee.sortableInfo.index,$=ee.offsetWidth,X=ee.offsetHeight,G={height:this.height>X?X/2:this.height/2,width:this.width>$?$/2:this.width/2},ae=U&&J>this.index&&J<=j,ge=U&&J<this.index&&J>=j,he={x:0,y:0},Ie=B[q].edgeOffset;Ie||(Ie=CC(ee,this.container),B[q].edgeOffset=Ie,U&&(B[q].boundingClientRect=L3(ee,I)));var re=q<B.length-1&&B[q+1],oe=q>0&&B[q-1];if(re&&!re.edgeOffset&&(re.edgeOffset=CC(re.node,this.container),U&&(re.boundingClientRect=L3(re.node,I))),J===this.index){g&&(this.sortableGhost=ee,J_(ee,{opacity:0,visibility:"hidden"}));continue}f&&D3(ee,f),this.axis.x?this.axis.y?ge||J<this.index&&(P.left+S.left-G.width<=Ie.left&&P.top+S.top<=Ie.top+G.height||P.top+S.top+G.height<=Ie.top)?(he.x=this.width+this.marginOffset.x,Ie.left+he.x>this.containerBoundingRect.width-G.width&&re&&(he.x=re.edgeOffset.left-Ie.left,he.y=re.edgeOffset.top-Ie.top),this.newIndex===null&&(this.newIndex=J)):(ae||J>this.index&&(P.left+S.left+G.width>=Ie.left&&P.top+S.top+G.height>=Ie.top||P.top+S.top+G.height>=Ie.top+X))&&(he.x=-(this.width+this.marginOffset.x),Ie.left+he.x<this.containerBoundingRect.left+G.width&&oe&&(he.x=oe.edgeOffset.left-Ie.left,he.y=oe.edgeOffset.top-Ie.top),this.newIndex=J):ae||J>this.index&&P.left+S.left+G.width>=Ie.left?(he.x=-(this.width+this.marginOffset.x),this.newIndex=J):(ge||J<this.index&&P.left+S.left<=Ie.left+G.width)&&(he.x=this.width+this.marginOffset.x,this.newIndex==null&&(this.newIndex=J)):this.axis.y&&(ae||J>this.index&&P.top+S.top+G.height>=Ie.top?(he.y=-(this.height+this.marginOffset.y),this.newIndex=J):(ge||J<this.index&&P.top+S.top<=Ie.top+G.height)&&(he.y=this.height+this.marginOffset.y,this.newIndex==null&&(this.newIndex=J))),eC(ee,he),B[q].translate=he}this.newIndex==null&&(this.newIndex=this.index),U&&(this.newIndex=j);var Se=U?this.prevIndex:j;b&&this.newIndex!==Se&&b({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:Se,isKeySorting:U,nodes:B,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return og(n.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 a=this.props.getContainer;return typeof a!="function"?Jb.findDOMNode(this):a(n.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var a=n.withRef?this.wrappedInstance:null;return di.createElement(lU.Provider,{value:this.sortableContextValue},di.createElement(r,wv({ref:a},rU(this.props,Jre))))}},{key:"helperContainer",get:function(){var a=this.props.helperContainer;return typeof a=="function"?a():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){var a=this.props.useWindowAsScrollContainer;return a?{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}(di.Component),ks(t,"displayName",gO("sortableList",r)),ks(t,"defaultProps",Xre),ks(t,"propTypes",aU),e}var uU={index:mi.number.isRequired,collection:mi.oneOfType([mi.number,mi.string]),disabled:mi.bool},rie=Object.keys(uU);function iie(r){var t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return e=t=function(i){mO(o,i);function o(){var s,a;Vv(this,o);for(var f=arguments.length,g=new Array(f),b=0;b<f;b++)g[b]=arguments[b];return a=pO(this,(s=Mv(o)).call.apply(s,[this].concat(g))),ks(ha(ha(a)),"wrappedInstance",di.createRef()),a}return Hv(o,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(a){this.node&&(a.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),a.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),a.collection!==this.props.collection&&(this.unregister(a.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var a=this.props,f=a.collection,g=a.disabled,b=a.index,I=Jb.findDOMNode(this);I.sortableInfo={collection:f,disabled:g,index:b,manager:this.context.manager},this.node=I,this.ref={node:I},this.context.manager.add(f,this.ref)}},{key:"unregister",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.collection;this.context.manager.remove(a,this.ref)}},{key:"getWrappedInstance",value:function(){return og(n.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 a=n.withRef?this.wrappedInstance:null;return di.createElement(r,wv({ref:a},rU(this.props,rie)))}}]),o}(di.Component),ks(t,"displayName",gO("sortableElement",r)),ks(t,"contextType",lU),ks(t,"propTypes",uU),ks(t,"defaultProps",{collection:0}),e}function so(){var r="/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",t="c4894131c5d7f6ef28da960f43f4c830425a38cb",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return so=function(){return s},s}so();const oie=(so().s[0]++,$re(r=>(so().f[0]++,so().s[1]++,ue.jsxs("div",{className:"maputnik-layer-list-item-handle",children:[ue.jsx(BD,{className:"layer-handle__icon",type:r.layerType}),ue.jsx("button",{className:"maputnik-layer-list-item-id",children:r.layerId})]}))));class F3 extends Zn.Component{renderIcon(){switch(so().f[1]++,so().s[2]++,this.props.action){case"duplicate":return so().b[0][0]++,so().s[3]++,ue.jsx(xY,{});case"show":return so().b[0][1]++,so().s[4]++,ue.jsx(bY,{});case"hide":return so().b[0][2]++,so().s[5]++,ue.jsx(CY,{});case"delete":return so().b[0][3]++,so().s[6]++,ue.jsx(Y1,{})}}render(){so().f[2]++;const{classBlockName:t,classBlockModifier:e}=(so().s[7]++,this.props);let n=(so().s[8]++,"");return so().s[9]++,t?(so().b[1][0]++,so().s[10]++,n=`maputnik-layer-list-icon-action__${t}`,so().s[11]++,e?(so().b[2][0]++,so().s[12]++,n+=` maputnik-layer-list-icon-action__${t}--${e}`):so().b[2][1]++):so().b[1][1]++,so().s[13]++,ue.jsx("button",{tabIndex:-1,title:this.props.action,className:`maputnik-layer-list-icon-action ${n}`,"data-wd-key":this.props.wdKey,onClick:this.props.onClick,"aria-hidden":"true",children:this.renderIcon()})}}class vE extends Zn.Component{getChildContext(){return so().f[6]++,so().s[16]++,{reactIconBase:{size:14}}}render(){so().f[7]++;const t=(so().s[17]++,this.props.visibility==="visible"?(so().b[3][0]++,"show"):(so().b[3][1]++,"hide"));return so().s[18]++,ue.jsxs("li",{id:this.props.id,onClick:e=>(so().f[8]++,so().s[19]++,this.props.onLayerSelect(this.props.layerIndex)),"data-wd-key":"layer-list-item:"+this.props.layerId,className:Ip({"maputnik-layer-list-item":!0,"maputnik-layer-list-item-selected":this.props.isSelected,[this.props.className]:!0}),children:[ue.jsx(oie,{...this.props}),ue.jsx("span",{style:{flexGrow:1}}),ue.jsx(F3,{wdKey:"layer-list-item:"+this.props.layerId+":delete",action:"delete",classBlockName:"delete",onClick:e=>(so().f[9]++,so().s[20]++,this.props.onLayerDestroy(this.props.layerIndex))}),ue.jsx(F3,{wdKey:"layer-list-item:"+this.props.layerId+":copy",action:"duplicate",classBlockName:"duplicate",onClick:e=>(so().f[10]++,so().s[21]++,this.props.onLayerCopy(this.props.layerIndex))}),ue.jsx(F3,{wdKey:"layer-list-item:"+this.props.layerId+":toggle-visibility",action:t,classBlockName:"visibility",classBlockModifier:t,onClick:e=>(so().f[11]++,so().s[22]++,this.props.onLayerVisibilityToggle(this.props.layerIndex))})]},this.props.layerId)}}Kn(vE,"defaultProps",(so().s[14]++,{isSelected:!1,visibility:"visible",onLayerCopy:()=>{so().f[3]++},onLayerDestroy:()=>{so().f[4]++},onLayerVisibilityToggle:()=>{so().f[5]++}})),Kn(vE,"childContextTypes",(so().s[15]++,{reactIconBase:mi.object}));const aie=(so().s[23]++,iie(r=>(so().f[12]++,so().s[24]++,ue.jsx(vE,{...r}))));function Cb(){var r="/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",t="522bfc6b8aacbfd03b55d947af2897dc69beb570",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Cb=function(){return s},s}Cb();class Ws extends Zn.Component{render(){return Cb().f[0]++,Cb().s[0]++,ue.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:Ip("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 AU=["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])"],bb=AU.join(","),cU=typeof Element>"u",ag=cU?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xb=!cU&&Element.prototype.getRootNode?function(r){var t;return r==null||(t=r.getRootNode)===null||t===void 0?void 0:t.call(r)}:function(r){return r==null?void 0:r.ownerDocument},wb=function r(t,e){var n;e===void 0&&(e=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",s=o||e&&t&&r(t.parentNode);return s},sie=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},dU=function(t,e,n){if(wb(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(bb));return e&&ag.call(t,bb)&&i.unshift(t),i=i.filter(n),i},hU=function r(t,e,n){for(var i=[],o=Array.from(t);o.length;){var s=o.shift();if(!wb(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),f=a.length?a:s.children,g=r(f,!0,n);n.flatten?i.push.apply(i,g):i.push({scopeParent:s,candidates:g})}else{var b=ag.call(s,bb);b&&n.filter(s)&&(e||!t.includes(s))&&i.push(s);var I=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),S=!wb(I,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(I&&S){var B=r(I===!0?s.children:I.children,!0,n);n.flatten?i.push.apply(i,B):i.push({scopeParent:s,candidates:B})}else o.unshift.apply(o,s.children)}}return i},fU=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ym=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||sie(t))&&!fU(t)?0:t.tabIndex},lie=function(t,e){var n=Ym(t);return n<0&&e&&!fU(t)?0:n},uie=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},pU=function(t){return t.tagName==="INPUT"},Aie=function(t){return pU(t)&&t.type==="hidden"},cie=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},die=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},hie=function(t){if(!t.name)return!0;var e=t.form||xb(t),n=function(a){return e.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(s){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",s.message),!1}var o=die(i,t.form);return!o||o===t},fie=function(t){return pU(t)&&t.type==="radio"},pie=function(t){return fie(t)&&!hie(t)},mie=function(t){var e,n=t&&xb(t),i=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var s,a,f;for(o=!!((s=i)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!o&&i;){var g,b,I;n=xb(i),i=(g=n)===null||g===void 0?void 0:g.host,o=!!((b=i)!==null&&b!==void 0&&(I=b.ownerDocument)!==null&&I!==void 0&&I.contains(i))}}return o},c7=function(t){var e=t.getBoundingClientRect(),n=e.width,i=e.height;return n===0&&i===0},gie=function(t,e){var n=e.displayCheck,i=e.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=ag.call(t,"details>summary:first-of-type"),s=o?t.parentElement:t;if(ag.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var f=t.parentElement,g=xb(t);if(f&&!f.shadowRoot&&i(f)===!0)return c7(t);t.assignedSlot?t=t.assignedSlot:!f&&g!==t.ownerDocument?t=g.host:t=f}t=a}if(mie(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return c7(t);return!1},yie=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var i=e.children.item(n);if(i.tagName==="LEGEND")return ag.call(e,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}e=e.parentElement}return!1},Mb=function(t,e){return!(e.disabled||wb(e)||Aie(e)||gie(e,t)||cie(e)||yie(e))},_E=function(t,e){return!(pie(e)||Ym(e)<0||!Mb(t,e))},vie=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},_ie=function r(t){var e=[],n=[];return t.forEach(function(i,o){var s=!!i.scopeParent,a=s?i.scopeParent:i,f=lie(a,s),g=s?r(i.candidates):a;f===0?s?e.push.apply(e,g):e.push(a):n.push({documentOrder:o,tabIndex:f,item:i,isScope:s,content:g})}),n.sort(uie).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(e)},mU=function(t,e){e=e||{};var n;return e.getShadowRoot?n=hU([t],e.includeContainer,{filter:_E.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:vie}):n=dU(t,e.includeContainer,_E.bind(null,e)),_ie(n)},gU=function(t,e){e=e||{};var n;return e.getShadowRoot?n=hU([t],e.includeContainer,{filter:Mb.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):n=dU(t,e.includeContainer,Mb.bind(null,e)),n},D0=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return ag.call(t,bb)===!1?!1:_E(e,t)},Cie=AU.concat("iframe").join(","),bC=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return ag.call(t,Cie)===!1?!1:Mb(e,t)};const bie=Object.freeze(Object.defineProperty({__proto__:null,focusable:gU,getTabIndex:Ym,isFocusable:bC,isTabbable:D0,tabbable:mU},Symbol.toStringTag,{value:"Module"}));/*!
|
||
* focus-trap 7.5.4
|
||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||
*/function d7(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function h7(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?d7(Object(e),!0).forEach(function(n){xie(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):d7(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function xie(r,t,e){return t=Mie(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function wie(r,t){if(typeof r!="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Mie(r){var t=wie(r,"string");return typeof t=="symbol"?t:String(t)}var f7={activateTrap:function(t,e){if(t.length>0){var n=t[t.length-1];n!==e&&n.pause()}var i=t.indexOf(e);i===-1||t.splice(i,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},Sie=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Eie=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},tv=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},Oie=function(t){return tv(t)&&!t.shiftKey},Bie=function(t){return tv(t)&&t.shiftKey},p7=function(t){return setTimeout(t,0)},m7=function(t,e){var n=-1;return t.every(function(i,o){return e(i)?(n=o,!1):!0}),n},wy=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return typeof t=="function"?t.apply(void 0,n):t},tC=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},Iie=[],kie=function(t,e){var n=(e==null?void 0:e.document)||document,i=(e==null?void 0:e.trapStack)||Iie,o=h7({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Oie,isKeyBackward:Bie},e),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,f=function(re,oe,Se){return re&&re[oe]!==void 0?re[oe]:o[Se||oe]},g=function(re,oe){var Se=typeof(oe==null?void 0:oe.composedPath)=="function"?oe.composedPath():void 0;return s.containerGroups.findIndex(function(ye){var nt=ye.container,Ne=ye.tabbableNodes;return nt.contains(re)||(Se==null?void 0:Se.includes(nt))||Ne.find(function(je){return je===re})})},b=function(re){var oe=o[re];if(typeof oe=="function"){for(var Se=arguments.length,ye=new Array(Se>1?Se-1:0),nt=1;nt<Se;nt++)ye[nt-1]=arguments[nt];oe=oe.apply(void 0,ye)}if(oe===!0&&(oe=void 0),!oe){if(oe===void 0||oe===!1)return oe;throw new Error("`".concat(re,"` was specified but was not a node, or did not return a node"))}var Ne=oe;if(typeof oe=="string"&&(Ne=n.querySelector(oe),!Ne))throw new Error("`".concat(re,"` as selector refers to no known node"));return Ne},I=function(){var re=b("initialFocus");if(re===!1)return!1;if(re===void 0||!bC(re,o.tabbableOptions))if(g(n.activeElement)>=0)re=n.activeElement;else{var oe=s.tabbableGroups[0],Se=oe&&oe.firstTabbableNode;re=Se||b("fallbackFocus")}if(!re)throw new Error("Your focus-trap needs to have at least one focusable element");return re},S=function(){if(s.containerGroups=s.containers.map(function(re){var oe=mU(re,o.tabbableOptions),Se=gU(re,o.tabbableOptions),ye=oe.length>0?oe[0]:void 0,nt=oe.length>0?oe[oe.length-1]:void 0,Ne=Se.find(function(Ue){return D0(Ue)}),je=Se.slice().reverse().find(function(Ue){return D0(Ue)}),et=!!oe.find(function(Ue){return Ym(Ue)>0});return{container:re,tabbableNodes:oe,focusableNodes:Se,posTabIndexesFound:et,firstTabbableNode:ye,lastTabbableNode:nt,firstDomTabbableNode:Ne,lastDomTabbableNode:je,nextTabbableNode:function(ke){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,vt=oe.indexOf(ke);return vt<0?We?Se.slice(Se.indexOf(ke)+1).find(function(Pt){return D0(Pt)}):Se.slice(0,Se.indexOf(ke)).reverse().find(function(Pt){return D0(Pt)}):oe[vt+(We?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(re){return re.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!b("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(s.containerGroups.find(function(re){return re.posTabIndexesFound})&&s.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.")},B=function Ie(re){var oe=re.activeElement;if(oe)return oe.shadowRoot&&oe.shadowRoot.activeElement!==null?Ie(oe.shadowRoot):oe},P=function Ie(re){if(re!==!1&&re!==B(document)){if(!re||!re.focus){Ie(I());return}re.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=re,Sie(re)&&re.select()}},U=function(re){var oe=b("setReturnFocus",re);return oe||(oe===!1?!1:re)},j=function(re){var oe=re.target,Se=re.event,ye=re.isBackward,nt=ye===void 0?!1:ye;oe=oe||tC(Se),S();var Ne=null;if(s.tabbableGroups.length>0){var je=g(oe,Se),et=je>=0?s.containerGroups[je]:void 0;if(je<0)nt?Ne=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:Ne=s.tabbableGroups[0].firstTabbableNode;else if(nt){var Ue=m7(s.tabbableGroups,function(jt){var Rt=jt.firstTabbableNode;return oe===Rt});if(Ue<0&&(et.container===oe||bC(oe,o.tabbableOptions)&&!D0(oe,o.tabbableOptions)&&!et.nextTabbableNode(oe,!1))&&(Ue=je),Ue>=0){var ke=Ue===0?s.tabbableGroups.length-1:Ue-1,We=s.tabbableGroups[ke];Ne=Ym(oe)>=0?We.lastTabbableNode:We.lastDomTabbableNode}else tv(Se)||(Ne=et.nextTabbableNode(oe,!1))}else{var vt=m7(s.tabbableGroups,function(jt){var Rt=jt.lastTabbableNode;return oe===Rt});if(vt<0&&(et.container===oe||bC(oe,o.tabbableOptions)&&!D0(oe,o.tabbableOptions)&&!et.nextTabbableNode(oe))&&(vt=je),vt>=0){var Pt=vt===s.tabbableGroups.length-1?0:vt+1,ut=s.tabbableGroups[Pt];Ne=Ym(oe)>=0?ut.firstTabbableNode:ut.firstDomTabbableNode}else tv(Se)||(Ne=et.nextTabbableNode(oe))}}else Ne=b("fallbackFocus");return Ne},q=function(re){var oe=tC(re);if(!(g(oe,re)>=0)){if(wy(o.clickOutsideDeactivates,re)){a.deactivate({returnFocus:o.returnFocusOnDeactivate});return}wy(o.allowOutsideClick,re)||re.preventDefault()}},W=function(re){var oe=tC(re),Se=g(oe,re)>=0;if(Se||oe instanceof Document)Se&&(s.mostRecentlyFocusedNode=oe);else{re.stopImmediatePropagation();var ye,nt=!0;if(s.mostRecentlyFocusedNode)if(Ym(s.mostRecentlyFocusedNode)>0){var Ne=g(s.mostRecentlyFocusedNode),je=s.containerGroups[Ne].tabbableNodes;if(je.length>0){var et=je.findIndex(function(Ue){return Ue===s.mostRecentlyFocusedNode});et>=0&&(o.isKeyForward(s.recentNavEvent)?et+1<je.length&&(ye=je[et+1],nt=!1):et-1>=0&&(ye=je[et-1],nt=!1))}}else s.containerGroups.some(function(Ue){return Ue.tabbableNodes.some(function(ke){return Ym(ke)>0})})||(nt=!1);else nt=!1;nt&&(ye=j({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),P(ye||s.mostRecentlyFocusedNode||I())}s.recentNavEvent=void 0},ee=function(re){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=re;var Se=j({event:re,isBackward:oe});Se&&(tv(re)&&re.preventDefault(),P(Se))},J=function(re){if(Eie(re)&&wy(o.escapeDeactivates,re)!==!1){re.preventDefault(),a.deactivate();return}(o.isKeyForward(re)||o.isKeyBackward(re))&&ee(re,o.isKeyBackward(re))},$=function(re){var oe=tC(re);g(oe,re)>=0||wy(o.clickOutsideDeactivates,re)||wy(o.allowOutsideClick,re)||(re.preventDefault(),re.stopImmediatePropagation())},X=function(){if(s.active)return f7.activateTrap(i,a),s.delayInitialFocusTimer=o.delayInitialFocus?p7(function(){P(I())}):P(I()),n.addEventListener("focusin",W,!0),n.addEventListener("mousedown",q,{capture:!0,passive:!1}),n.addEventListener("touchstart",q,{capture:!0,passive:!1}),n.addEventListener("click",$,{capture:!0,passive:!1}),n.addEventListener("keydown",J,{capture:!0,passive:!1}),a},G=function(){if(s.active)return n.removeEventListener("focusin",W,!0),n.removeEventListener("mousedown",q,!0),n.removeEventListener("touchstart",q,!0),n.removeEventListener("click",$,!0),n.removeEventListener("keydown",J,!0),a},ae=function(re){var oe=re.some(function(Se){var ye=Array.from(Se.removedNodes);return ye.some(function(nt){return nt===s.mostRecentlyFocusedNode})});oe&&P(I())},ge=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(ae):void 0,he=function(){ge&&(ge.disconnect(),s.active&&!s.paused&&s.containers.map(function(re){ge.observe(re,{subtree:!0,childList:!0})}))};return a={get active(){return s.active},get paused(){return s.paused},activate:function(re){if(s.active)return this;var oe=f(re,"onActivate"),Se=f(re,"onPostActivate"),ye=f(re,"checkCanFocusTrap");ye||S(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement,oe==null||oe();var nt=function(){ye&&S(),X(),he(),Se==null||Se()};return ye?(ye(s.containers.concat()).then(nt,nt),this):(nt(),this)},deactivate:function(re){if(!s.active)return this;var oe=h7({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},re);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,G(),s.active=!1,s.paused=!1,he(),f7.deactivateTrap(i,a);var Se=f(oe,"onDeactivate"),ye=f(oe,"onPostDeactivate"),nt=f(oe,"checkCanReturnFocus"),Ne=f(oe,"returnFocus","returnFocusOnDeactivate");Se==null||Se();var je=function(){p7(function(){Ne&&P(U(s.nodeFocusedBeforeActivation)),ye==null||ye()})};return Ne&&nt?(nt(U(s.nodeFocusedBeforeActivation)).then(je,je),this):(je(),this)},pause:function(re){if(s.paused||!s.active)return this;var oe=f(re,"onPause"),Se=f(re,"onPostPause");return s.paused=!0,oe==null||oe(),G(),he(),Se==null||Se(),this},unpause:function(re){if(!s.paused||!s.active)return this;var oe=f(re,"onUnpause"),Se=f(re,"onPostUnpause");return s.paused=!1,oe==null||oe(),S(),X(),he(),Se==null||Se(),this},updateContainerElements:function(re){var oe=[].concat(re).filter(Boolean);return s.containers=oe.map(function(Se){return typeof Se=="string"?n.querySelector(Se):Se}),s.active&&S(),he(),this}},a.updateContainerElements(t),a};const Tie=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:kie},Symbol.toStringTag,{value:"Module"})),Pie=BE(Tie),Kie=BE(bie);var U3,g7;function Rie(){if(g7)return U3;g7=1;function r(X){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},r(X)}function t(X,G){if(!(X instanceof G))throw new TypeError("Cannot call a class as a function")}function e(X,G){for(var ae=0;ae<G.length;ae++){var ge=G[ae];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(X,S(ge.key),ge)}}function n(X,G,ae){return e(X.prototype,G),Object.defineProperty(X,"prototype",{writable:!1}),X}function i(X,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(G&&G.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),Object.defineProperty(X,"prototype",{writable:!1}),G&&o(X,G)}function o(X,G){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ge,he){return ge.__proto__=he,ge},o(X,G)}function s(X){var G=g();return function(){var ge=b(X),he;if(G){var Ie=b(this).constructor;he=Reflect.construct(ge,arguments,Ie)}else he=ge.apply(this,arguments);return a(this,he)}}function a(X,G){if(G&&(r(G)==="object"||typeof G=="function"))return G;if(G!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(X)}function f(X){if(X===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return X}function g(){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 b(X){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ae){return ae.__proto__||Object.getPrototypeOf(ae)},b(X)}function I(X,G,ae){return G=S(G),G in X?Object.defineProperty(X,G,{value:ae,enumerable:!0,configurable:!0,writable:!0}):X[G]=ae,X}function S(X){var G=B(X,"string");return r(G)==="symbol"?G:String(G)}function B(X,G){if(r(X)!=="object"||X===null)return X;var ae=X[Symbol.toPrimitive];if(ae!==void 0){var ge=ae.call(X,G||"default");if(r(ge)!=="object")return ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(X)}var P=Ts(),U=qf(),j=Pie,q=j.createFocusTrap,W=Kie,ee=W.isFocusable,J=function(X){i(ae,X);var G=s(ae);function ae(ge){var he;t(this,ae),he=G.call(this,ge),I(f(he),"getNodeForOption",function(oe){var Se,ye=(Se=this.internalOptions[oe])!==null&&Se!==void 0?Se:this.originalOptions[oe];if(typeof ye=="function"){for(var nt=arguments.length,Ne=new Array(nt>1?nt-1:0),je=1;je<nt;je++)Ne[je-1]=arguments[je];ye=ye.apply(void 0,Ne)}if(ye===!0&&(ye=void 0),!ye){if(ye===void 0||ye===!1)return ye;throw new Error("`".concat(oe,"` was specified but was not a node, or did not return a node"))}var et=ye;if(typeof ye=="string"){var Ue;if(et=(Ue=this.getDocument())===null||Ue===void 0?void 0:Ue.querySelector(ye),!et)throw new Error("`".concat(oe,"` as selector refers to no known node"))}return et}),he.handleDeactivate=he.handleDeactivate.bind(f(he)),he.handlePostDeactivate=he.handlePostDeactivate.bind(f(he)),he.handleClickOutsideDeactivates=he.handleClickOutsideDeactivates.bind(f(he)),he.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:he.handleDeactivate,onPostDeactivate:he.handlePostDeactivate,clickOutsideDeactivates:he.handleClickOutsideDeactivates},he.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var Ie=ge.focusTrapOptions;for(var re in Ie)if(Object.prototype.hasOwnProperty.call(Ie,re)){if(re==="returnFocusOnDeactivate"||re==="onDeactivate"||re==="onPostDeactivate"||re==="checkCanReturnFocus"||re==="clickOutsideDeactivates"){he.originalOptions[re]=Ie[re];continue}he.internalOptions[re]=Ie[re]}return he.outsideClick=null,he.focusTrapElements=ge.containerElements||[],he.updatePreviousElement(),he}return n(ae,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var he=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return he||(he===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var he=this.getDocument();he&&(this.previouslyFocusedElement=he.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(he){var Ie=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,he):this.originalOptions.clickOutsideDeactivates;return Ie&&(this.outsideClick={target:he.target,allowDeactivation:Ie}),Ie}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var he=this,Ie=function(){var oe=he.getReturnFocusNode(),Se=!!(he.originalOptions.returnFocusOnDeactivate&&oe!==null&&oe!==void 0&&oe.focus&&(!he.outsideClick||he.outsideClick.allowDeactivation&&!ee(he.outsideClick.target,he.internalOptions.tabbableOptions))),ye=he.internalOptions.preventScroll,nt=ye===void 0?!1:ye;Se&&oe.focus({preventScroll:nt}),he.originalOptions.onPostDeactivate&&he.originalOptions.onPostDeactivate.call(null),he.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(Ie,Ie):Ie()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var he=this.focusTrapElements.some(Boolean);he&&(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(he){if(this.focusTrap){he.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var Ie=!he.active&&this.props.active,re=he.active&&!this.props.active,oe=!he.paused&&this.props.paused,Se=he.paused&&!this.props.paused;if(Ie&&(this.updatePreviousElement(),this.focusTrap.activate()),re){this.deactivateTrap();return}oe&&this.focusTrap.pause(),Se&&this.focusTrap.unpause()}else he.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 he=this,Ie=this.props.children?P.Children.only(this.props.children):void 0;if(Ie){if(Ie.type&&Ie.type===P.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var re=function(ye){var nt=he.props.containerElements;Ie&&(typeof Ie.ref=="function"?Ie.ref(ye):Ie.ref&&(Ie.ref.current=ye)),he.focusTrapElements=nt||[ye]},oe=P.cloneElement(Ie,{ref:re});return oe}return null}}]),ae}(P.Component),$=typeof Element>"u"?Function:Element;return J.propTypes={active:U.bool,paused:U.bool,focusTrapOptions:U.shape({document:U.object,onActivate:U.func,onPostActivate:U.func,checkCanFocusTrap:U.func,onPause:U.func,onPostPause:U.func,onUnpause:U.func,onPostUnpause:U.func,onDeactivate:U.func,onPostDeactivate:U.func,checkCanReturnFocus:U.func,initialFocus:U.oneOfType([U.instanceOf($),U.string,U.bool,U.func]),fallbackFocus:U.oneOfType([U.instanceOf($),U.string,U.func]),escapeDeactivates:U.oneOfType([U.bool,U.func]),clickOutsideDeactivates:U.oneOfType([U.bool,U.func]),returnFocusOnDeactivate:U.bool,setReturnFocus:U.oneOfType([U.instanceOf($),U.string,U.bool,U.func]),allowOutsideClick:U.oneOfType([U.bool,U.func]),preventScroll:U.bool,tabbableOptions:U.shape({displayCheck:U.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:U.oneOfType([U.bool,U.func])}),trapStack:U.array,isKeyForward:U.func,isKeyBackward:U.func}),containerElements:U.arrayOf(U.instanceOf($)),children:U.oneOfType([U.element,U.instanceOf($)])},J.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:q},U3=J,U3}var j3={exports:{}},y7;function Die(){return y7||(y7=1,function(r){(function(t){var e=!1,n,i;function o(){if(typeof n<"u")return n;var I=document.documentElement,S=document.createElement("div");return S.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),I.appendChild(S),n=S.offsetWidth-S.clientWidth,I.removeChild(S),n}function s(){return document.documentElement.scrollHeight>window.innerHeight}function a(I){if(!(typeof document>"u"||e)){var S=document.documentElement;i=window.pageYOffset,s()?S.style.width="calc(100% - "+o()+"px)":S.style.width="100%",S.style.position="fixed",S.style.top=-i+"px",S.style.overflow="hidden",e=!0}}function f(){if(!(typeof document>"u"||!e)){var I=document.documentElement;I.style.width="",I.style.position="",I.style.top="",I.style.overflow="",window.scroll(0,i),e=!1}}function g(){if(e){f();return}a()}var b={on:a,off:f,toggle:g};r.exports=b})()}(j3)),j3.exports}var z3,v7;function Lie(){if(v7)return z3;v7=1;function r(ee){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},r(ee)}function t(ee,J){if(!(ee instanceof J))throw new TypeError("Cannot call a class as a function")}function e(ee,J){for(var $=0;$<J.length;$++){var X=J[$];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(ee,X.key,X)}}function n(ee,J,$){return J&&e(ee.prototype,J),Object.defineProperty(ee,"prototype",{writable:!1}),ee}function i(ee,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(J&&J.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),Object.defineProperty(ee,"prototype",{writable:!1}),J&&o(ee,J)}function o(ee,J){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,G){return X.__proto__=G,X},o(ee,J)}function s(ee){var J=g();return function(){var X=b(ee),G;if(J){var ae=b(this).constructor;G=Reflect.construct(X,arguments,ae)}else G=X.apply(this,arguments);return a(this,G)}}function a(ee,J){if(J&&(r(J)==="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(ee)}function f(ee){if(ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee}function g(){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 b(ee){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},b(ee)}function I(ee,J,$){return J in ee?Object.defineProperty(ee,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):ee[J]=$,ee}var S=Ts(),B=Tv(),P=Rie(),U=Die(),j=function(ee){i($,ee);var J=s($);function $(X){var G;if(t(this,$),G=J.call(this,X),I(f(G),"getApplicationNode",function(){return G.props.getApplicationNode?G.props.getApplicationNode():G.props.applicationNode}),I(f(G),"checkUnderlayClick",function(ae){G.dialogNode&&G.dialogNode.contains(ae.target)||ae.pageX>ae.target.ownerDocument.documentElement.offsetWidth||ae.pageY>ae.target.ownerDocument.documentElement.offsetHeight||G.exit(ae)}),I(f(G),"checkDocumentKeyDown",function(ae){G.props.escapeExits&&(ae.key==="Escape"||ae.key==="Esc"||ae.keyCode===27)&&G.exit(ae)}),I(f(G),"exit",function(ae){G.props.onExit&&G.props.onExit(ae)}),!X.titleText&&!X.titleId)throw new Error("react-aria-modal instances should have a `titleText` or `titleId`");return G}return n($,[{key:"componentDidMount",value:function(){this.props.onEnter&&this.props.onEnter();var G=this.getApplicationNode();setTimeout(function(){G&&G.setAttribute("aria-hidden","true")},0),this.props.escapeExits&&this.addKeyDownListener(),this.props.scrollDisabled&&U.on()}},{key:"componentDidUpdate",value:function(G){G.scrollDisabled&&!this.props.scrollDisabled?U.off():!G.scrollDisabled&&this.props.scrollDisabled&&U.on(),this.props.escapeExits&&!G.escapeExits?this.addKeyDownListener():!this.props.escapeExits&&G.escapeExits&&this.removeKeyDownListener()}},{key:"componentWillUnmount",value:function(){this.props.scrollDisabled&&U.off();var G=this.getApplicationNode();G&&G.setAttribute("aria-hidden","false"),this.removeKeyDownListener()}},{key:"addKeyDownListener",value:function(){var G=this;setTimeout(function(){document.addEventListener("keydown",G.checkDocumentKeyDown)})}},{key:"removeKeyDownListener",value:function(){var G=this;setTimeout(function(){document.removeEventListener("keydown",G.checkDocumentKeyDown)})}},{key:"render",value:function(){var G=this.props,ae={};if(G.includeDefaultStyles&&(ae={position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1050,overflowX:"hidden",overflowY:"auto",WebkitOverflowScrolling:"touch",textAlign:"center"},G.underlayColor&&(ae.background=G.underlayColor),G.underlayClickExits&&(ae.cursor="pointer")),G.underlayStyle)for(var ge in G.underlayStyle)G.underlayStyle.hasOwnProperty(ge)&&(ae[ge]=G.underlayStyle[ge]);var he={className:G.underlayClass,style:ae};G.underlayClickExits&&(he.onMouseDown=this.checkUnderlayClick);for(var Ie in this.props.underlayProps)he[Ie]=this.props.underlayProps[Ie];var re={};G.includeDefaultStyles&&(re={display:"inline-block",height:"100%",verticalAlign:"middle"});var oe={key:"a",style:re},Se={};if(G.includeDefaultStyles&&(Se={display:"inline-block",textAlign:"left",top:0,maxWidth:"100%",cursor:"auto",outline:G.focusDialog?0:null},G.verticallyCenter&&(Se.verticalAlign="middle",Se.top=0)),G.dialogStyle)for(var ye in G.dialogStyle)G.dialogStyle.hasOwnProperty(ye)&&(Se[ye]=G.dialogStyle[ye]);var nt={key:"b",ref:(function(Ue){this.dialogNode=Ue}).bind(this),role:G.alert?"alertdialog":"dialog",id:G.dialogId,className:G.dialogClass,style:Se};G.titleId?nt["aria-labelledby"]=G.titleId:G.titleText&&(nt["aria-label"]=G.titleText),G.focusDialog&&(nt.tabIndex="-1");for(var Ne in G)/^(data-|aria-)/.test(Ne)&&(nt[Ne]=G[Ne]);var je=[S.createElement("div",nt,G.children)];G.verticallyCenter&&je.unshift(S.createElement("div",oe));var et=G.focusTrapOptions||{};return(G.focusDialog||G.initialFocus)&&(et.initialFocus=G.focusDialog?"#".concat(this.props.dialogId):G.initialFocus),et.escapeDeactivates=G.escapeExits,S.createElement(P,{focusTrapOptions:et,paused:G.focusTrapPaused},S.createElement("div",he,je))}}]),$}(S.Component);I(j,"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 q(ee,J){if(!window.document)return function(){return null};J=J||{};var $=function(X){i(ae,X);var G=s(ae);function ae(){var ge;t(this,ae);for(var he=arguments.length,Ie=new Array(he),re=0;re<he;re++)Ie[re]=arguments[re];return ge=G.call.apply(G,[this].concat(Ie)),I(f(ge),"container",null),ge}return n(ae,[{key:"componentDidMount",value:function(){J.renderTo?this.container=typeof J.renderTo=="string"?document.querySelector(J.renderTo):J.renderTo:(this.container=document.createElement("div"),document.body.appendChild(this.container)),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){J.renderTo||this.container.parentNode.removeChild(this.container)}},{key:"render",value:function(){return this.container===null||!this.props.mounted?null:B.createPortal(S.createElement(ee,this.props,this.props.children),this.container)}}]),ae}(S.Component);return I($,"defaultProps",{mounted:!0}),$}var W=q(j);return W.renderTo=function(ee){return q(j,{renderTo:ee})},z3=W,z3}var Fie=Lie();const Uie=us(Fie);function dA(){var r="/home/runner/work/maputnik/maputnik/src/components/Modal.tsx",t="55b511200efca707daa3ccb304d63dc159a8f390",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return dA=function(){return s},s}dA();class yU extends Zn.Component{constructor(){super(...arguments);Kn(this,"onClose",(dA().s[1]++,()=>{dA().f[0]++,dA().s[2]++,document.activeElement?(dA().b[0][0]++,dA().s[3]++,document.activeElement.blur()):dA().b[0][1]++,dA().s[4]++,setTimeout(()=>{dA().f[1]++,dA().s[5]++,this.props.onOpenToggle(!1)},0)}))}render(){dA().f[2]++;const e=(dA().s[6]++,this.props.t);return dA().s[7]++,this.props.isOpen?(dA().b[1][0]++,dA().s[8]++,ue.jsx(Uie,{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:ue.jsxs("div",{className:Ip("maputnik-modal",this.props.className),"data-wd-key":this.props["data-wd-key"],children:[ue.jsxs("header",{className:"maputnik-modal-header",children:[ue.jsx("h1",{className:"maputnik-modal-header-title",children:this.props.title}),ue.jsx("span",{className:"maputnik-modal-header-space"}),ue.jsx("button",{className:"maputnik-modal-header-toggle",title:e("Close modal"),onClick:this.onClose,"data-wd-key":this.props["data-wd-key"]+".close-modal",children:ue.jsx(kY,{})})]}),ue.jsx("div",{className:"maputnik-modal-scroller",children:ue.jsx("div",{className:"maputnik-modal-content",children:this.props.children})})]})})):(dA().b[1][1]++,dA().s[9]++,!1)}}Kn(yU,"defaultProps",(dA().s[0]++,{underlayClickExits:!0}));const A0=(dA().s[10]++,qa()(yU)),jie=8,zie={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]},centerAltitude:{type:"number",doc:"Default map center altitude in meters above sea level. The style center altitude defines the altitude where the camera is looking at and will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:123.4,"sdk-support":{"basic functionality":{js:"5.0.0",android:"https://github.com/maplibre/maplibre-native/issues/2980",ios:"https://github.com/maplibre/maplibre-native/issues/2980"}}},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,"sdk-support":{"0-60 degrees":{js:"0.8.0",android:"1.0.0",ios:"1.0.0"},"0-85 degrees":{js:"2.0.0",android:"https://github.com/maplibre/maplibre-native/issues/1909",ios:"https://github.com/maplibre/maplibre-native/issues/1909"},"0-180 degrees":{js:"5.0.0",android:"https://github.com/maplibre/maplibre-native/issues/1909",ios:"https://github.com/maplibre/maplibre-native/issues/1909"}}},roll:{type:"number",default:0,units:"degrees",doc:"Default roll, in degrees. The roll angle is measured counterclockwise about the camera boresight. The style roll will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:45,"sdk-support":{"basic functionality":{js:"5.0.0",android:"https://github.com/maplibre/maplibre-native/issues/2941",ios:"https://github.com/maplibre/maplibre-native/issues/2941"}}},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sky:{type:"sky",doc:"The map's sky configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.",example:{"sky-color":"#199EF3","sky-horizon-blend":.5,"horizon-color":"#ffffff","horizon-fog-blend":.5,"fog-color":"#0000ff","fog-ground-blend":.5,"atmosphere-blend":["interpolate",["linear"],["zoom"],0,1,10,1,12,0]}},projection:{type:"projection",doc:"The projection configuration",example:{type:["interpolate",["linear"],["zoom"],10,"vertical-perspective",12,"mercator"]}},terrain:{type:"terrain",doc:"The terrain configuration.",example:{source:"raster-dem-source",exaggeration:.5}},sources:{required:!0,type:"sources",doc:"Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn't enough to make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.\n\nTiled sources (vector and raster) must specify their details according to the [TileJSON specification](https://github.com/mapbox/tilejson-spec).",example:{"maplibre-demotiles":{type:"vector",url:"https://demotiles.maplibre.org/tiles/tiles.json"},"maplibre-tilejson":{type:"vector",url:"http://api.example.com/tilejson.json"},"maplibre-streets":{type:"vector",tiles:["http://a.example.com/tiles/{z}/{x}/{y}.pbf","http://b.example.com/tiles/{z}/{x}/{y}.pbf"],maxzoom:14},"wms-imagery":{type:"raster",tiles:["http://a.example.com/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=example"],tileSize:256}}},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}\` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer.
|
||
|
||
- \`{range}\` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.
|
||
|
||
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:"A style's `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`.\n\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.",example:[{id:"coastline",source:"maplibre","source-layer":"countries",type:"line",paint:{"line-color":"#198EC8"}}]}},Nie={"*":{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."}},Gie=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Wie={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",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Qie={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",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},qie={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.","sdk-support":{"mapbox, terrarium":{js:"0.43.0",ios:"6.0.0",android:"6.0.0"},custom:{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},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.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},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.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},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.0",ios:"https://github.com/maplibre/maplibre-native/issues/2358",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},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.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},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",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Yie={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\n * `cluster` Is `true` if the point is a cluster \n\n * `cluster_id` A unique id for the cluster to be used in conjunction with the [cluster inspection methods](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeoJSONSource/#getclusterexpansionzoom)\n\n * `point_count` Number of original points grouped into this cluster\n\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\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>}`."}},$ie={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."}}},Vie={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."}}},Hie={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"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.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"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.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"}}},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"}}},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"}}}},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."}},Zie=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Xie={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"}},"property-type":"constant"}},Jie={"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"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.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"}},"property-type":"constant"}},eoe={"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"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.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"}},"property-type":"constant"}},toe={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"}},"property-type":"constant"}},noe={"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"}},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"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.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"}},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"}},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"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.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"}},"property-type":"constant"}},roe=JSON.parse('{"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"},"`line-center` value":{"js":"0.47.0","android":"6.4.0","ios":"4.3.0"}},"expression":{"interpolated":false,"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"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.53.0","android":"7.4.0","ios":"4.11.0"}},"expression":{"interpolated":false,"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"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"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","android":"https://github.com/maplibre/maplibre-native/issues/251","ios":"https://github.com/maplibre/maplibre-native/issues/251"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"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"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"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"},"stretchable icons":{"js":"1.6.0","android":"9.2.0","ios":"5.8.0"}},"expression":{"interpolated":false,"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"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","doc":"Name of image in sprite to use for drawing an image background.","tokens":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.21.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":true,"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.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"2.2.0","android":"https://github.com/maplibre/maplibre-native/issues/2754","ios":"https://github.com/maplibre/maplibre-native/issues/2754"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":true,"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"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":false,"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"}},"expression":{"interpolated":false,"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"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0"}},"expression":{"interpolated":false,"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"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0"},"`viewport-glyph` value":{"js":"2.1.8","android":"https://github.com/maplibre/maplibre-native/issues/250","ios":"https://github.com/maplibre/maplibre-native/issues/250"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"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"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"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"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":true,"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"}},"expression":{"interpolated":true,"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"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":true,"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"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0"},"auto":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0"}},"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"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"}},"expression":{"interpolated":false,"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\\n { \\"text-variable-anchor-offset\\": [\\"top\\", [0, 4], \\"left\\", [3,0], \\"bottom\\", [1, 1]] } \\n\\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","ios":"6.8.0","android":"11.6.0"},"data-driven styling":{"js":"3.3.0","ios":"https://github.com/maplibre/maplibre-native/issues/2358","android":"https://github.com/maplibre/maplibre-native/issues/2358"}},"expression":{"interpolated":true,"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"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":false,"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"}},"expression":{"interpolated":true,"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"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"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"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"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"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":false,"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"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"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","android":"https://github.com/maplibre/maplibre-native/issues/251","ios":"https://github.com/maplibre/maplibre-native/issues/251"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"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"}},"expression":{"interpolated":false,"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"}},"property-type":"constant"}}'),ioe={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"}},"property-type":"constant"}},ooe={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"}},"property-type":"constant"}},aoe={type:"array",value:"*",doc:"A filter selects specific features from a layer."},soe={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'}},doc:"The filter operator."},loe={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."},uoe={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},Aoe={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},coe=JSON.parse('{"doc":"","type":"enum","values":{"let":{"doc":"Binds expressions to named variables, which can then be referenced in the result expression using `[\\"var\\", \\"variable_name\\"]`.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","example":{"syntax":{"method":["string","value","expression"],"result":"value"},"value":["let","someNumber",500,["interpolate",["linear"],["var","someNumber"],274,"#edf8e9",1551,"#006d2c"]]},"group":"Variable binding","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"var":{"doc":"References variable bound using `let`.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","example":{"syntax":{"method":["string"],"result":"value"},"value":["var","density"]},"group":"Variable binding","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"literal":{"doc":"Provides a literal array or object value.\\n\\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)","example":{"syntax":{"method":["JSON object or array"],"result":"array | object"},"value":["literal",["DIN Offc Pro Italic","Arial Unicode MS Regular"]]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["value","string?","number?"],"result":"array"},"value":["array",["literal",["a","b","c"]],"string",3]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"at":{"doc":"Retrieves an item from an array.","example":{"syntax":{"method":["number","value"],"result":"value"},"value":["at",1,["literal",["a","b","c"]]]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"in":{"doc":"Determines whether an item exists in an array or a substring exists in a string.\\n\\n - [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure/)","example":{"syntax":{"method":["value","value"],"result":"boolean"},"value":["in","$type","Point"]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"1.6.0","android":"9.1.0","ios":"5.8.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. In a string, a UTF-16 surrogate pair counts as a single position.","example":{"syntax":{"method":["value","value","number?"],"result":"number"},"value":["index-of","foo",["baz","bar","hello","foo","world"]]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"1.10.0","android":"10.3.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. In a string, a UTF-16 surrogate pair counts as a single position.","example":{"syntax":{"method":["value","number","number?"],"result":"value"},"value":["slice",["get","name"],0,3]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"1.10.0","android":"10.3.0","ios":"6.0.0"}}},"case":{"doc":"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)","example":{"syntax":{"method":["value","value","...","fallback: value"],"result":"value"},"value":["case",["boolean",["feature-state","hover"],false],1,0.5]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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\\n - a single literal value; or\\n\\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.\\n\\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.","example":{"syntax":{"method":["value","value","...","fallback: value"],"result":"value"},"value":["match",["get","building_type"],"residential","#f00","commercial","#0f0","#000"]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"coalesce":{"doc":"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)","example":{"syntax":{"method":["coalesce","value","fallback"],"result":"value"},"value":["coalesce",["image",["concat",["get","icon"],"_15"]],["image","marker_15"]]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)","example":{"syntax":{"method":["step","number","number","number","..."],"result":"number"},"value":["step",["get","point_count"],20,100,30,750,40]},"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.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\\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\\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\\n- `[\\"cubic-bezier\\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\\n\\n - [Animate map camera around a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-camera-around-point/)\\n\\n - [Change building color based on zoom level](https://maplibre.org/maplibre-gl-js/docs/examples/change-building-color-based-on-zoom-level/)\\n\\n - [Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/)\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","example":{"syntax":{"method":["[\\"linear\\"] | [\\"exponential\\", base] | [\\"cubic-bezier\\", x1, y1, x2, y2]","number","number","number","..."],"result":"number | array<number> | color"},"value":["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]]},"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["[\\"linear\\"] | [\\"exponential\\", base] | [\\"cubic-bezier\\", x1, y1, x2, y2]","number","number","number","..."],"result":"color"},"value":["interpolate-hcl",["linear"],["zoom"],15,"#f00",15.05,"#00f"]},"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.49.0","ios":"https://github.com/maplibre/maplibre-native/issues/2784","android":"https://github.com/maplibre/maplibre-native/issues/2784"}}},"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.","example":{"syntax":{"method":["[\\"linear\\"] | [\\"exponential\\", base] | [\\"cubic-bezier\\", x1, y1, x2, y2]","number","number","number","..."],"result":"color"},"value":["interpolate-lab",["linear"],["zoom"],15,"#f00",15.05,"#00f"]},"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.49.0","ios":"https://github.com/maplibre/maplibre-native/issues/2784","android":"https://github.com/maplibre/maplibre-native/issues/2784"}}},"ln2":{"doc":"Returns mathematical constant ln(2).","example":{"syntax":{"method":[],"result":"number"},"value":["ln2"]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"pi":{"doc":"Returns the mathematical constant pi.","example":{"syntax":{"method":[],"result":"number"},"value":["pi"]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"e":{"doc":"Returns the mathematical constant e.","example":{"syntax":{"method":[],"result":"number"},"value":["e"]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"typeof":{"doc":"Returns a string describing the type of the given value.","example":{"syntax":{"method":["value"],"result":"string"},"value":["typeof",["get","name"]]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["value","fallback: value","fallback: value","..."],"result":"string"},"value":["string",["get","name"]]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["value","fallback: value","fallback: value","..."],"result":"number"},"value":["number",["get","population"]]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)","example":{"syntax":{"method":["value","fallback: value","fallback: value","..."],"result":"boolean"},"value":["boolean",["feature-state","hover"],false]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["value","fallback: value","fallback: value","..."],"result":"object"},"value":["object",["get","some-property"]]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["collator","{ \\"case-sensitive\\": boolean, \\"diacritic-sensitive\\": boolean, \\"locale\\": string }"],"result":"collator"},"value":["collator",{"case-sensitive":true,"diacritic-sensitive":true,"locale":"fr"}]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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\'`](#image) expression. Strings may be followed by a style override object that supports the following properties:\\n\\n- `\\"text-font\\"`: Overrides the font stack specified by the root layout property.\\n\\n- `\\"text-color\\"`: Overrides the color specified by the root paint property.\\n\\n- `\\"font-scale\\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\\n\\n- `\\"vertical-align\\"`: Aligns vertically text section or image in relation to the row it belongs to. Possible values are: \\n\\t- `\\"bottom\\"` *default*: align the bottom of this section with the bottom of other sections.\\n<img alt=\\"Visual representation of bottom alignment\\" src=\\"https://github.com/user-attachments/assets/0474a2fd-a4b2-417c-9187-7a13a28695bc\\"/>\\n\\t- `\\"center\\"`: align the center of this section with the center of other sections.\\n<img alt=\\"Visual representation of center alignment\\" src=\\"https://github.com/user-attachments/assets/92237455-be6d-4c5d-b8f6-8127effc1950\\"/>\\n\\t- `\\"top\\"`: align the top of this section with the top of other sections.\\n<img alt=\\"Visual representation of top alignment\\" src=\\"https://github.com/user-attachments/assets/45dccb28-d977-4abb-a006-4ea9792b7c53\\"/>\\n\\t- Refer to [the design proposal](https://github.com/maplibre/maplibre-style-spec/issues/832) for more details.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\\n\\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)","example":{"syntax":{"method":["value","{ \\"text-font\\": string, \\"text-color\\": color, \\"font-scale\\": number, \\"vertical-align\\": \\"bottom\\" | \\"center\\" | \\"top\\" }","..."],"result":"formatted"},"value":["format",["upcase",["get","FacilityName"]],{"font-scale":0.8},"\\n\\n",{},["downcase",["get","Comments"]],{"font-scale":0.6,"vertical-align":"center"}]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0"},"text-font":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0"},"font-scale":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0"},"text-color":{"js":"1.3.0","android":"7.3.0","ios":"4.10.0"},"vertical-align":{"js":"https://github.com/maplibre/maplibre-gl-js/issues/5043","android":"https://github.com/maplibre/maplibre-native/issues/3055","ios":"https://github.com/maplibre/maplibre-native/issues/3055"},"image":{"js":"1.6.0","android":"8.6.0","ios":"5.7.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.\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)","example":{"syntax":{"method":["value"],"result":"image"},"value":["image","marker_15"]},"group":"Types","sdk-support":{"basic functionality":{"js":"1.4.0","android":"8.6.0","ios":"5.7.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.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)","example":{"syntax":{"method":["number","{ \\"locale\\": string, \\"currency\\": string, \\"min-fraction-digits\\": number, \\"max-fraction-digits\\": number }"],"result":"string"},"value":["number-format",["get","mag"],{"min-fraction-digits":1,"max-fraction-digits":1}]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.54.0","android":"8.4.0","ios":"supported"}}},"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.\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)","example":{"syntax":{"method":["value"],"result":"string"},"value":["to-string",["get","mag"]]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["value","fallback: value","fallback: value","..."],"result":"number"},"value":["to-number","someProperty"]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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`.","example":{"syntax":{"method":["value"],"result":"boolean"},"value":["to-boolean","someProperty"]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"to-rgba":{"doc":"Returns a four-element array containing the input color\'s red, green, blue, and alpha components, in that order.","example":{"syntax":{"method":["color"],"result":"array"},"value":["to-rgba","#ff0000"]},"group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","example":{"syntax":{"method":["value","fallback: value","fallback: value","..."],"result":"color"},"value":["to-color","#edf8e9"]},"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["number","number","number"],"result":"color"},"value":["rgb",255,0,0]},"group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["number","number","number","number"],"result":"color"},"value":["rgba",255,0,0,1]},"group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)\\n\\n - [Extrude polygons for 3D indoor mapping](https://maplibre.org/maplibre-gl-js/docs/examples/3d-extrusion-floorplan/)","example":{"syntax":{"method":["string"],"result":"value"},"value":["get","someProperty"]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)","example":{"syntax":{"method":["string"],"result":"boolean"},"value":["has","someProperty"]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"length":{"doc":"Gets the length of an array or string. In a string, a UTF-16 surrogate pair counts as a single position.","example":{"syntax":{"method":["array"],"result":"number"},"value":["length",["get","myArray"]]},"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"properties":{"doc":"Gets the feature properties object. Note that in some cases, it may be more efficient to use [\\"get\\", \\"property_name\\"] directly.","example":{"syntax":{"method":[],"result":"value"},"value":["properties"]},"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)","example":{"syntax":{"method":["string"],"result":"value"},"value":["feature-state","hover"]},"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.46.0","ios":"https://github.com/maplibre/maplibre-native/issues/1698","android":"https://github.com/maplibre/maplibre-native/issues/1698"}}},"geometry-type":{"doc":"Returns the feature\'s simple geometry type: `Point`, `LineString`, or `Polygon`. `MultiPoint`, `MultiLineString`, and `MultiPolygon` are returned as `Point`, `LineString`, and `Polygon`, respectively.","example":{"syntax":{"method":[],"result":"string"},"value":["==",["geometry-type"],"Polygon"]},"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"id":{"doc":"Gets the feature\'s id, if it has one.","example":{"syntax":{"method":[],"result":"value"},"value":["id"]},"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":[],"result":"number"},"value":["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]]},"group":"Zoom","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":[],"result":"number"},"value":["heatmap-density"]},"group":"Heatmap","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"line-progress":{"doc":"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.","example":{"syntax":{"method":["number"],"result":"number"},"value":["line-progress",0.5]},"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.6.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.","example":{"syntax":{"method":["string"],"result":"value"},"value":["accumulated","sum"]},"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.53.0","ios":"supported","android":"supported"}}},"+":{"doc":"Returns the sum of the inputs.","example":{"syntax":{"method":["number","number","..."],"result":"number"},"value":["+",2,3]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"*":{"doc":"Returns the product of the inputs.","example":{"syntax":{"method":["number","number","..."],"result":"number"},"value":["*",2,3]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["number","number?"],"result":"number"},"value":["-",10]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"/":{"doc":"Returns the result of floating point division of the first input by the second.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","example":{"syntax":{"method":["number","number"],"result":"number"},"value":["/",["get","population"],["get","sq-km"]]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"%":{"doc":"Returns the remainder after integer division of the first input by the second.","example":{"syntax":{"method":["number","number"],"result":"number"},"value":["%",10,3]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"^":{"doc":"Returns the result of raising the first input to the power specified by the second.","example":{"syntax":{"method":["number","number"],"result":"number"},"value":["^",2,3]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"sqrt":{"doc":"Returns the square root of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["sqrt",9]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0"}}},"log10":{"doc":"Returns the base-ten logarithm of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["log10",8]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"ln":{"doc":"Returns the natural logarithm of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["ln",8]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"log2":{"doc":"Returns the base-two logarithm of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["log2",8]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"sin":{"doc":"Returns the sine of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["sin",1]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"cos":{"doc":"Returns the cosine of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["cos",1]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"tan":{"doc":"Returns the tangent of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["tan",1]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"asin":{"doc":"Returns the arcsine of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["asin",1]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"acos":{"doc":"Returns the arccosine of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["acos",1]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"atan":{"doc":"Returns the arctangent of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["atan",1]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"min":{"doc":"Returns the minimum value of the inputs.","example":{"syntax":{"method":["number","number","..."],"result":"number"},"value":["min",1,2]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"max":{"doc":"Returns the maximum value of the inputs.","example":{"syntax":{"method":["number","number","..."],"result":"number"},"value":["max",1,2]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["number"],"result":"number"},"value":["round",1.5]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"abs":{"doc":"Returns the absolute value of the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["abs",-1.5]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"ceil":{"doc":"Returns the smallest integer that is greater than or equal to the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["ceil",1.5]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"floor":{"doc":"Returns the largest integer that is less than or equal to the input.","example":{"syntax":{"method":["number"],"result":"number"},"value":["floor",1.5]},"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["GeoJSON geometry"],"result":"number"},"value":["distance",{"type":"Point","coordinates":[0,0]}]},"group":"Math","sdk-support":{"basic functionality":{"js":"4.2.0","android":"9.2.0","ios":"5.9.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.\\n\\n - [Add multiple geometries from one GeoJSON source](https://maplibre.org/maplibre-gl-js/docs/examples/multiple-geometries/)\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\\n\\n - [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/3d-buildings/)\\n\\n - [Filter symbols by toggling a list](https://maplibre.org/maplibre-gl-js/docs/examples/filter-markers/)","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":["==","$type","Polygon"]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":["!=","cluster",true]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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.","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":[">",["get","mag"],2]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":["<",["get","mag"],2]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":[">=",["get","mag"],6]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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.","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":["<=",["get","mag"],6]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.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.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)","example":{"syntax":{"method":["boolean","boolean","..."],"result":"boolean"},"value":["all",[">=",["get","mag"],4],["<",["get","mag"],5]]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["boolean","boolean","..."],"result":"boolean"},"value":["any",[">=",["get","mag"],4],["<",["get","mag"],5]]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"!":{"doc":"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)","example":{"syntax":{"method":["value","value","collator?"],"result":"boolean"},"value":["!",["has","point_count"]]},"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n\\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.","example":{"syntax":{"method":["GeoJSON geometry"],"result":"boolean"},"value":["within",{"type":"Polygon","coordinates":[[[0,0],[0,5],[5,5],[5,0],[0,0]]]}]},"group":"Decision","sdk-support":{"basic functionality":{"js":"1.9.0","android":"9.1.0","ios":"5.8.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 `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).","example":{"syntax":{"method":["string"],"result":"boolean"},"value":["is-supported-script","दिल्ली"]},"group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.6.0","ios":"supported"}}},"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.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)","example":{"syntax":{"method":["string"],"result":"string"},"value":["upcase",["get","name"]]},"group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)","example":{"syntax":{"method":["string"],"result":"string"},"value":["downcase",["get","name"]]},"group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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`.\\n\\n - [Add a generated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-image-missing-generated/)\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)\\n\\n - [Variable label placement](https://maplibre.org/maplibre-gl-js/docs/examples/variable-label-placement/)","example":{"syntax":{"method":["string","string","..."],"result":"string"},"value":["concat","square-rgb-",["get","color"]]},"group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.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.","example":{"syntax":{"method":["collator"],"result":"string"},"value":["resolved-locale",["collator",{"case-sensitive":true,"diacritic-sensitive":false,"locale":"de"}]]},"group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}}}}'),doe={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"}}},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"}}},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"}}},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"}}}},hoe={"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the sky."},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color at the horizon."},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the fog. Requires 3D terrain."},"fog-ground-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. Where 0 is the map center and 1 is the horizon."},"horizon-fog-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 color and the horizon color. Where 0 is using the horizon color only and 1 is using the fog color only."},"sky-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 sky color and the horizon color. Where 1 is blending the color at the middle of the sky and 0 is not blending at all and using the sky color only."},"atmosphere-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 atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe projection."}},foe={source:{type:"string",doc:"The source for the terrain data.",required:!0,"sdk-support":{"basic functionality":{js:"2.2.0",ios:"https://github.com/maplibre/maplibre-native/issues/252",android:"https://github.com/maplibre/maplibre-native/issues/252"}}},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",ios:"https://github.com/maplibre/maplibre-native/issues/252",android:"https://github.com/maplibre/maplibre-native/issues/252"}}}},poe={type:{type:"projectionDefinition",doc:"The projection definition type. Can be specified as a string, a transition state, or an expression.",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},moe=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],goe={"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"}},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"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.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"}},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"}},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"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},yoe={"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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.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"}},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"}},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"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"https://github.com/maplibre/maplibre-gl-js/issues/1235",ios:"https://github.com/maplibre/maplibre-native/issues/744",android:"https://github.com/maplibre/maplibre-native/issues/744"}},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"},"data-driven styling":{js:"0.49.0",android:"6.5.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"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},voe={"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"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.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"}},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"}},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"}},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"}},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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},_oe={"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"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.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"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.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"}},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"},"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"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Coe={"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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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. \n\nThe unit is in pixels only for SDF sprites that were created with a blur radius of 8, multiplied by the display density. I.e., the radius needs to be 16 for `@2x` sprites, etc.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"}},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"}},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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.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"}},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"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},boe={"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"}},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"}},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"}},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"}},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"}},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"}},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"}},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"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},xoe={"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"}},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"}},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"}},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"}},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"}},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"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},woe={"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"}},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"},"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"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Moe={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."}},Soe={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},Jo={$version:jie,$root:zie,sources:Nie,source:Gie,source_vector:Wie,source_raster:Qie,source_raster_dem:qie,source_geojson:Yie,source_video:$ie,source_image:Vie,layer:Hie,layout:Zie,layout_background:Xie,layout_fill:Jie,layout_circle:eoe,layout_heatmap:toe,"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"}},"property-type":"constant"}},layout_line:noe,layout_symbol:roe,layout_raster:ioe,layout_hillshade:ooe,filter:aoe,filter_operator:soe,geometry_type:loe,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:uoe,expression:Aoe,expression_name:coe,light:doe,sky:hoe,terrain:foe,projection:poe,paint:moe,paint_fill:goe,"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"}},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"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.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"}},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"}},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"},"data-driven styling":{js:"0.49.0",android:"6.5.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"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.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"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.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",android:"7.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:yoe,paint_circle:voe,paint_heatmap:_oe,paint_symbol:Coe,paint_raster:boe,paint_hillshade:xoe,paint_background:woe,transition:Moe,"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:Soe};function La(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",t="3158bd93bbefd1bd0e63d26617da070781685c25",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return La=function(){return s},s}La();class yO extends Zn.Component{constructor(e){La().f[0]++,La().s[0]++;super(e);Kn(this,"onToggleDoc",(La().s[2]++,e=>{La().f[1]++,La().s[3]++,this.setState({open:e},()=>{La().f[2]++,La().s[4]++,this.props.onToggleDoc?(La().b[0][0]++,La().s[5]++,this.props.onToggleDoc(this.state.open)):La().b[0][1]++})}));La().s[1]++,this.state={open:!1}}render(){La().f[3]++;const{label:e,fieldSpec:n}=(La().s[6]++,this.props),{doc:i}=(La().s[7]++,La().b[1][0]++,n||(La().b[1][1]++,{}));if(La().s[8]++,i)return La().b[2][0]++,La().s[9]++,ue.jsx("label",{className:"maputnik-doc-wrapper",children:ue.jsxs("div",{className:"maputnik-doc-target",children:[e," ",ue.jsx("button",{"aria-label":this.state.open?(La().b[3][0]++,"close property documentation"):(La().b[3][1]++,"open property documentation"),className:`maputnik-doc-button maputnik-doc-button--${this.state.open?(La().b[4][0]++,"open"):(La().b[4][1]++,"closed")}`,onClick:()=>(La().f[4]++,La().s[10]++,this.onToggleDoc(!this.state.open)),"data-wd-key":"field-doc-button-"+e,children:this.state.open?(La().b[5][0]++,ue.jsx(mY,{})):(La().b[5][1]++,ue.jsx(gY,{}))})]})});if(La().b[2][1]++,La().s[11]++,e)return La().b[6][0]++,La().s[12]++,ue.jsx("label",{className:"maputnik-doc-wrapper",children:ue.jsx("div",{className:"maputnik-doc-target",children:e})});La().b[6][1]++,La().s[13]++}}function ls(){var r="/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",t="52a1547e724051448ae0a009c4c7c40d9bb9067f",e=globalThis,n="__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:52},end:{line:12,column:61}},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:48,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:49,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},5:{loc:{start:{line:47,column:6},end:{line:47,column:215}},type:"binary-expr",locations:[{start:{line:47,column:6},end:{line:47,column:12}},{start:{line:47,column:16},end:{line:47,column:30}},{start:{line:47,column:50},end:{line:47,column:215}}],line:47}},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],5:[0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Doc.tsx"],names:[],mappings:"AAwCM,mBAGM,KAKQ,YARd;AAxCN,OAAO,WAAW;AAElB,MAAM,UAAU;AAAA,EACd,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AACT;AAkBA,qBAAqB,YAAY,MAAM,UAAoB;AAAA,EACzD,SAAU;AACR,UAAM,EAAC,UAAS,IAAI,KAAK;AAEzB,UAAM,EAAC,KAAK,QAAQ,QAAQ,eAAc,IAAI;AAC9C,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,MAED,UAAU,kBACT,oBAAC,SAAI,WAAU,uBACb,8BAAC,OAAE,MAAM,QAAS,QAAO,UAAS,KAAI,cAAc,0BAAe,GACrE;AAAA,OAEJ;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"52a1547e724051448ae0a009c4c7c40d9bb9067f"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ls=function(){return s},s}ls();const _7=(ls().s[0]++,{js:"JS",android:"Android",ios:"iOS",macos:"macOS"});class vO extends Zn.Component{render(){ls().f[0]++;const{fieldSpec:t}=(ls().s[1]++,this.props),{doc:e,values:n,docUrl:i,docUrlLinkText:o}=(ls().s[2]++,t),s=(ls().s[3]++,t["sdk-support"]),a=(ls().s[4]++,ls().b[0][0]++,!!n&&(ls().b[0][1]++,!Array.isArray(n)));return ls().s[5]++,ue.jsxs(ue.Fragment,{children:[(ls().b[1][0]++,e&&(ls().b[1][1]++,ue.jsxs("div",{className:"SpecDoc",children:[ue.jsx("div",{className:"SpecDoc__doc","data-wd-key":"spec-field-doc",children:e}),(ls().b[2][0]++,a&&(ls().b[2][1]++,ue.jsx("ul",{className:"SpecDoc__values",children:Object.entries(n).map(([f,g])=>(ls().f[1]++,ls().s[6]++,ue.jsxs("li",{children:[ue.jsx("code",{children:JSON.stringify(f)}),ue.jsx("div",{children:g.doc})]},f)))})))]}))),(ls().b[3][0]++,s&&(ls().b[3][1]++,ue.jsx("div",{className:"SpecDoc__sdk-support",children:ue.jsxs("table",{className:"SpecDoc__sdk-support__table",children:[ue.jsx("thead",{children:ue.jsxs("tr",{children:[ue.jsx("th",{}),Object.values(_7).map(f=>(ls().f[2]++,ls().s[7]++,ue.jsx("th",{children:f},f)))]})}),ue.jsx("tbody",{children:Object.entries(s).map(([f,g])=>(ls().f[3]++,ls().s[8]++,ue.jsxs("tr",{children:[ue.jsx("td",{children:f}),Object.keys(_7).map(b=>(ls().f[4]++,ls().s[9]++,Object.prototype.hasOwnProperty.call(g,b)?(ls().b[4][0]++,ls().s[10]++,ue.jsx("td",{children:g[b]},b)):(ls().b[4][1]++,ls().s[11]++,ue.jsx("td",{children:"no"},b))))]},f)))})]})}))),(ls().b[5][0]++,i&&(ls().b[5][1]++,o)&&(ls().b[5][2]++,ue.jsx("div",{className:"SpecDoc__learn-more",children:ue.jsx("a",{href:i,target:"_blank",rel:"noreferrer",children:o})})))]})}}function Do(){var r="/home/runner/work/maputnik/maputnik/src/components/Block.tsx",t="ca04d739d50d9528a1765863025280bc88ee5e77",e=globalThis,n="__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:40,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:39,column:5}},14:{start:{line:38,column:6},end:{line:38,column:29}},15:{start:{line:42,column:4},end:{line:75,column:6}},16:{start:{line:64,column:95},end:{line:64,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:40,column:3}},line:31},4:{name:"(anonymous_4)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:11},end:{line:76,column:3}},line:41},5:{name:"(anonymous_5)",decl:{start:{line:64,column:87},end:{line:64,column:88}},loc:{start:{line:64,column:95},end:{line:64,column:113}},line:64}},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: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},5:{loc:{start:{line:54,column:10},end:{line:61,column:14}},type:"binary-expr",locations:[{start:{line:54,column:10},end:{line:54,column:30}},{start:{line:54,column:50},end:{line:61,column:14}}],line:54},6:{loc:{start:{line:62,column:10},end:{line:62,column:134}},type:"binary-expr",locations:[{start:{line:62,column:10},end:{line:62,column:31}},{start:{line:62,column:51},end:{line:62,column:134}}],line:62},7:{loc:{start:{line:65,column:10},end:{line:72,column:11}},type:"binary-expr",locations:[{start:{line:65,column:10},end:{line:65,column:30}},{start:{line:65,column:50},end:{line:72,column:11}}],line:65},8:{loc:{start:{line:69,column:32},end:{line:69,column:64}},type:"cond-expr",locations:[{start:{line:69,column:53},end:{line:69,column:55}},{start:{line:69,column:58},end:{line:69,column:64}}],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},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],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Block.tsx"],names:[],mappings:"AAgEW,SAWD,KAXC;AAhEX,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,QAAI,MAAM,YAAY,OAAO,aAAa,KAAK;AAC7C,YAAM,eAAe;AAAA,IACvB;AAAA,EACF;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:"ca04d739d50d9528a1765863025280bc88ee5e77"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Do=function(){return s},s}Do();class ps extends Zn.Component{constructor(e){Do().f[0]++,Do().s[1]++;super(e);Kn(this,"_blockEl",(Do().s[0]++,null));Kn(this,"onToggleDoc",(Do().s[6]++,e=>{Do().f[2]++,Do().s[7]++,this.setState({showDoc:e})}));Kn(this,"onLabelClick",(Do().s[8]++,e=>{var o;Do().f[3]++;const n=(Do().s[9]++,e.nativeEvent.target),i=(Do().s[10]++,(o=this._blockEl)==null?void 0:o.contains(n));Do().s[11]++,Do().b[3][0]++,e.nativeEvent.target.nodeName!=="INPUT"&&(Do().b[3][1]++,!i)?(Do().b[2][0]++,Do().s[12]++,e.stopPropagation()):Do().b[2][1]++,Do().s[13]++,e.nativeEvent.target.nodeName!=="A"?(Do().b[4][0]++,Do().s[14]++,e.preventDefault()):Do().b[4][1]++}));Do().s[2]++,this.state={showDoc:!1}}onChange(e){Do().f[1]++;const n=(Do().s[3]++,e.target.value);if(Do().s[4]++,this.props.onChange)return Do().b[0][0]++,Do().s[5]++,this.props.onChange(n===""?(Do().b[1][0]++,void 0):(Do().b[1][1]++,n));Do().b[0][1]++}render(){return Do().f[4]++,Do().s[15]++,ue.jsxs("label",{style:this.props.style,"data-wd-key":this.props["data-wd-key"],className:Ip({"maputnik-input-block":!0,"maputnik-input-block--wide":this.props.wideMode,"maputnik-action-block":this.props.action}),onClick:this.onLabelClick,children:[(Do().b[5][0]++,this.props.fieldSpec&&(Do().b[5][1]++,ue.jsx("div",{className:"maputnik-input-block-label",children:ue.jsx(yO,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(Do().b[6][0]++,!this.props.fieldSpec&&(Do().b[6][1]++,ue.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),ue.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),ue.jsx("div",{className:"maputnik-input-block-content",ref:e=>(Do().f[5]++,Do().s[16]++,this._blockEl=e),children:this.props.children}),(Do().b[7][0]++,this.props.fieldSpec&&(Do().b[7][1]++,ue.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(Do().b[8][0]++,""):(Do().b[8][1]++,"none")},children:ue.jsx(vO,{fieldSpec:this.props.fieldSpec})})))]})}}function Sc(){var r="/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",t="1b99a181d4a9dd7b629113889cbb71c3a4bb4d42",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Sc=function(){return s},s}Sc();class cg extends Zn.Component{render(){Sc().f[0]++;let t=(Sc().s[0]++,this.props.options);return Sc().s[1]++,Sc().b[1][0]++,t.length>0&&(Sc().b[1][1]++,!Array.isArray(t[0]))?(Sc().b[0][0]++,Sc().s[2]++,t=t.map(e=>(Sc().f[1]++,Sc().s[3]++,[e,e]))):Sc().b[0][1]++,Sc().s[4]++,ue.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:e=>(Sc().f[2]++,Sc().s[5]++,this.props.onChange(e.target.value)),"aria-label":this.props["aria-label"],children:t.map(([e,n])=>(Sc().f[3]++,Sc().s[6]++,ue.jsx("option",{value:e,children:n},e)))})}}function Fi(){var r="/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",t="ffe977722e3215b5f6718c464b93680839810a41",e=globalThis,n="__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:70,column:7}},14:{start:{line:51,column:8},end:{line:56,column:11}},15:{start:{line:55,column:10},end:{line:55,column:71}},16:{start:{line:55,column:34},end:{line:55,column:71}},17:{start:{line:59,column:8},end:{line:62,column:9}},18:{start:{line:60,column:10},end:{line:60,column:44}},19:{start:{line:61,column:10},end:{line:61,column:73}},20:{start:{line:61,column:35},end:{line:61,column:73}},21:{start:{line:65,column:8},end:{line:67,column:9}},22:{start:{line:66,column:10},end:{line:66,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:71,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:57,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:56,column:9}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:58,column:14},end:{line:58,column:15}},loc:{start:{line:58,column:20},end:{line:63,column:7}},line:58},7:{name:"(anonymous_7)",decl:{start:{line:64,column:17},end:{line:64,column:18}},loc:{start:{line:64,column:24},end:{line:68,column:7}},line:64}},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:55,column:71}},type:"if",locations:[{start:{line:55,column:10},end:{line:55,column:71}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},7:{loc:{start:{line:59,column:8},end:{line:62,column:9}},type:"if",locations:[{start:{line:59,column:8},end:{line:62,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:59},8:{loc:{start:{line:61,column:10},end:{line:61,column:73}},type:"if",locations:[{start:{line:61,column:10},end:{line:61,column:73}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:61},9:{loc:{start:{line:65,column:8},end:{line:67,column:9}},type:"if",locations:[{start:{line:65,column:8},end:{line:67,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},10:{loc:{start:{line:65,column:12},end:{line:65,column:51}},type:"binary-expr",locations:[{start:{line:65,column:12},end:{line:65,column:28}},{start:{line:65,column:32},end:{line:65,column:51}}],line:65}},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,QAAS,MAAK,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,SAAU,MAAK,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:"ffe977722e3215b5f6718c464b93680839810a41"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Fi=function(){return s},s}Fi();class ff extends Zn.Component{constructor(t){Fi().f[1]++,Fi().s[1]++,super(t),Fi().s[2]++,this.state={editing:!1,value:(Fi().b[0][0]++,t.value||(Fi().b[0][1]++,""))}}static getDerivedStateFromProps(t,e){if(Fi().f[2]++,Fi().s[3]++,e.editing)Fi().b[1][1]++;else return Fi().b[1][0]++,Fi().s[4]++,{value:t.value};return Fi().s[5]++,{}}render(){Fi().f[3]++;let t,e;return Fi().s[6]++,this.props.multi?(Fi().b[2][0]++,Fi().s[7]++,t="textarea",Fi().s[8]++,e=["maputnik-string","maputnik-string--multi"]):(Fi().b[2][1]++,Fi().s[9]++,t="input",Fi().s[10]++,e=["maputnik-string"]),Fi().s[11]++,this.props.disabled?(Fi().b[3][0]++,Fi().s[12]++,e.push("maputnik-string--disabled")):Fi().b[3][1]++,Fi().s[13]++,Zn.createElement(t,{"aria-label":this.props["aria-label"],"data-wd-key":this.props["data-wd-key"],spellCheck:Object.prototype.hasOwnProperty.call(this.props,"spellCheck")?(Fi().b[4][0]++,this.props.spellCheck):(Fi().b[4][1]++,t!=="input"),disabled:this.props.disabled,className:e.join(" "),style:this.props.style,value:this.state.value===void 0?(Fi().b[5][0]++,""):(Fi().b[5][1]++,this.state.value),placeholder:this.props.default,title:this.props.title,onChange:n=>{Fi().f[4]++,Fi().s[14]++,this.setState({editing:!0,value:n.target.value},()=>{Fi().f[5]++,Fi().s[15]++,this.props.onInput?(Fi().b[6][0]++,Fi().s[16]++,this.props.onInput(this.state.value)):Fi().b[6][1]++})},onBlur:()=>{Fi().f[6]++,Fi().s[17]++,this.state.value!==this.props.value?(Fi().b[7][0]++,Fi().s[18]++,this.setState({editing:!1}),Fi().s[19]++,this.props.onChange?(Fi().b[8][0]++,Fi().s[20]++,this.props.onChange(this.state.value)):Fi().b[8][1]++):Fi().b[7][1]++},onKeyDown:n=>{Fi().f[7]++,Fi().s[21]++,Fi().b[10][0]++,n.keyCode===13&&(Fi().b[10][1]++,this.props.onChange)?(Fi().b[9][0]++,Fi().s[22]++,this.props.onChange(this.state.value)):Fi().b[9][1]++},required:this.props.required})}}Kn(ff,"defaultProps",(Fi().s[0]++,{onInput:()=>{Fi().f[0]++}}));function jf(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",t="7881723dfc9d5af5c18468677e4f429a5a061179",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return jf=function(){return s},s}jf();class vU extends Zn.Component{render(){jf().f[0]++;const t=(jf().s[1]++,this.props.t);return jf().s[2]++,ue.jsxs(ps,{label:t("Type"),fieldSpec:Jo.layer.type,"data-wd-key":this.props.wdKey,error:this.props.error,children:[(jf().b[0][0]++,this.props.disabled&&(jf().b[0][1]++,ue.jsx(ff,{value:this.props.value,disabled:!0}))),(jf().b[1][0]++,!this.props.disabled&&(jf().b[1][1]++,ue.jsx(cg,{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"})))]})}}Kn(vU,"defaultProps",(jf().s[0]++,{disabled:!1}));const _U=(jf().s[3]++,qa()(vU));function Sb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",t="f6ac2bd12dbef0198dd96da668f75e4659321d69",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Sb=function(){return s},s}Sb();class CU extends Zn.Component{render(){return Sb().f[0]++,Sb().s[0]++,ue.jsx(ps,{label:"ID",fieldSpec:Jo.layer.id,"data-wd-key":this.props.wdKey,error:this.props.error,children:ue.jsx(ff,{value:this.props.value,onInput:this.props.onChange,"data-wd-key":this.props.wdKey+".input"})})}}var N3={exports:{}},C7;function Eoe(){if(C7)return N3.exports;C7=1;var r=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;function t(Ne){var je,et,Ue,ke=Ne.ownerDocument,We=ke.body,vt=ke&&ke.documentElement;return je=Ne.getBoundingClientRect(),et=je.left,Ue=je.top,et-=vt.clientLeft||We.clientLeft||0,Ue-=vt.clientTop||We.clientTop||0,{left:et,top:Ue}}function e(Ne,je){var et=Ne["page"+(je?"Y":"X")+"Offset"],Ue="scroll"+(je?"Top":"Left");if(typeof et!="number"){var ke=Ne.document;et=ke.documentElement[Ue],typeof et!="number"&&(et=ke.body[Ue])}return et}function n(Ne){return e(Ne)}function i(Ne){return e(Ne,!0)}function o(Ne){var je=t(Ne),et=Ne.ownerDocument,Ue=et.defaultView||et.parentWindow;return je.left+=n(Ue),je.top+=i(Ue),je}function s(Ne,je,et){var Ue="",ke=Ne.ownerDocument;return(et=et||ke.defaultView.getComputedStyle(Ne,null))&&(Ue=et.getPropertyValue(je)||et[je]),Ue}var a=new RegExp("^("+r+")(?!px)[a-z%]+$","i"),f=/^(top|right|bottom|left)$/,g="currentStyle",b="runtimeStyle",I="left",S="px";function B(Ne,je){var et=Ne[g]&&Ne[g][je];if(a.test(et)&&!f.test(je)){var Ue=Ne.style,ke=Ue[I],We=Ne[b][I];Ne[b][I]=Ne[g][I],Ue[I]=je==="fontSize"?"1em":et||0,et=Ue.pixelLeft+S,Ue[I]=ke,Ne[b][I]=We}return et===""?"auto":et}var P;typeof window<"u"&&(P=window.getComputedStyle?s:B);function U(Ne,je){Se(Ne,"position")==="static"&&(Ne.style.position="relative");var et=o(Ne),Ue={},ke,We;for(We in je)ke=parseFloat(Se(Ne,We))||0,Ue[We]=ke+je[We]-et[We];Se(Ne,Ue)}function j(Ne,je){for(var et=0;et<Ne.length;et++)je(Ne[et])}function q(Ne){return P(Ne,"boxSizing")==="border-box"}var W=["margin","border","padding"],ee=-1,J=2,$=1,X=0;function G(Ne,je,et){var Ue={},ke=Ne.style,We;for(We in je)Ue[We]=ke[We],ke[We]=je[We];et.call(Ne);for(We in je)ke[We]=Ue[We]}function ae(Ne,je,et){var Ue=0,ke,We,vt;for(We=0;We<je.length;We++)if(ke=je[We],ke)for(vt=0;vt<et.length;vt++){var Pt;ke==="border"?Pt=ke+et[vt]+"Width":Pt=ke+et[vt],Ue+=parseFloat(P(Ne,Pt))||0}return Ue}function ge(Ne){return Ne!=null&&Ne==Ne.window}var he={};j(["Width","Height"],function(Ne){he["doc"+Ne]=function(je){var et=je.document;return Math.max(et.documentElement["scroll"+Ne],et.body["scroll"+Ne],he["viewport"+Ne](et))},he["viewport"+Ne]=function(je){var et="client"+Ne,Ue=je.document,ke=Ue.body,We=Ue.documentElement,vt=We[et];return Ue.compatMode==="CSS1Compat"&&vt||ke&&ke[et]||vt}});function Ie(Ne,je,et){if(ge(Ne))return je==="width"?he.viewportWidth(Ne):he.viewportHeight(Ne);if(Ne.nodeType===9)return je==="width"?he.docWidth(Ne):he.docHeight(Ne);var Ue=je==="width"?["Left","Right"]:["Top","Bottom"],ke=je==="width"?Ne.offsetWidth:Ne.offsetHeight;P(Ne);var We=q(Ne),vt=0;(ke==null||ke<=0)&&(ke=void 0,vt=P(Ne,je),(vt==null||Number(vt)<0)&&(vt=Ne.style[je]||0),vt=parseFloat(vt)||0),et===void 0&&(et=We?$:ee);var Pt=ke!==void 0||We,ut=ke||vt;return et===ee?Pt?ut-ae(Ne,["border","padding"],Ue):vt:Pt?ut+(et===$?0:et===J?-ae(Ne,["border"],Ue):ae(Ne,["margin"],Ue)):vt+ae(Ne,W.slice(et),Ue)}var re={position:"absolute",visibility:"hidden",display:"block"};function oe(Ne){var je,et=arguments;return Ne.offsetWidth!==0?je=Ie.apply(void 0,et):G(Ne,re,function(){je=Ie.apply(void 0,et)}),je}j(["width","height"],function(Ne){var je=Ne.charAt(0).toUpperCase()+Ne.slice(1);he["outer"+je]=function(Ue,ke){return Ue&&oe(Ue,Ne,ke?X:$)};var et=Ne==="width"?["Left","Right"]:["Top","Bottom"];he[Ne]=function(Ue,ke){if(ke!==void 0){if(Ue){P(Ue);var We=q(Ue);return We&&(ke+=ae(Ue,["padding","border"],et)),Se(Ue,Ne,ke)}return}return Ue&&oe(Ue,Ne,ee)}});function Se(Ne,je,et){if(typeof je=="object"){for(var Ue in je)Se(Ne,Ue,je[Ue]);return}if(typeof et<"u")typeof et=="number"&&(et=et+"px"),Ne.style[je]=et;else return P(Ne,je)}function ye(Ne,je){for(var et in je)Ne[et]=je[et];return Ne}var nt=N3.exports={getWindow:function(Ne){var je=Ne.ownerDocument||Ne;return je.defaultView||je.parentWindow},offset:function(Ne,je){if(typeof je<"u")U(Ne,je);else return o(Ne)},isWindow:ge,each:j,css:Se,clone:function(Ne){var je={};for(var et in Ne)je[et]=Ne[et];var Ue=Ne.overflow;if(Ue)for(et in Ne)je.overflow[et]=Ne.overflow[et];return je},mix:ye,scrollLeft:function(Ne,je){if(ge(Ne)){if(je===void 0)return n(Ne);window.scrollTo(je,i(Ne))}else{if(je===void 0)return Ne.scrollLeft;Ne.scrollLeft=je}},scrollTop:function(Ne,je){if(ge(Ne)){if(je===void 0)return i(Ne);window.scrollTo(n(Ne),je)}else{if(je===void 0)return Ne.scrollTop;Ne.scrollTop=je}},merge:function(){for(var Ne={},je=0;je<arguments.length;je++)nt.mix(Ne,arguments[je]);return Ne},viewportWidth:0,viewportHeight:0};return ye(nt,he),N3.exports}var G3,b7;function Ooe(){if(b7)return G3;b7=1;var r=Eoe();function t(e,n,i){i=i||{},n.nodeType===9&&(n=r.getWindow(n));var o=i.allowHorizontalScroll,s=i.onlyScrollIfNeeded,a=i.alignWithTop,f=i.alignWithLeft;o=o===void 0?!0:o;var g=r.isWindow(n),b=r.offset(e),I=r.outerHeight(e),S=r.outerWidth(e),B,P,U,j,q,W,ee,J,$,X;g?(ee=n,X=r.height(ee),$=r.width(ee),J={left:r.scrollLeft(ee),top:r.scrollTop(ee)},q={left:b.left-J.left,top:b.top-J.top},W={left:b.left+S-(J.left+$),top:b.top+I-(J.top+X)},j=J):(B=r.offset(n),P=n.clientHeight,U=n.clientWidth,j={left:n.scrollLeft,top:n.scrollTop},q={left:b.left-(B.left+(parseFloat(r.css(n,"borderLeftWidth"))||0)),top:b.top-(B.top+(parseFloat(r.css(n,"borderTopWidth"))||0))},W={left:b.left+S-(B.left+U+(parseFloat(r.css(n,"borderRightWidth"))||0)),top:b.top+I-(B.top+P+(parseFloat(r.css(n,"borderBottomWidth"))||0))}),q.top<0||W.top>0?a===!0?r.scrollTop(n,j.top+q.top):a===!1?r.scrollTop(n,j.top+W.top):q.top<0?r.scrollTop(n,j.top+q.top):r.scrollTop(n,j.top+W.top):s||(a=a===void 0?!0:!!a,a?r.scrollTop(n,j.top+q.top):r.scrollTop(n,j.top+W.top)),o&&(q.left<0||W.left>0?f===!0?r.scrollLeft(n,j.left+q.left):f===!1?r.scrollLeft(n,j.left+W.left):q.left<0?r.scrollLeft(n,j.left+q.left):r.scrollLeft(n,j.left+W.left):s||(f=f===void 0?!0:!!f,f?r.scrollLeft(n,j.left+q.left):r.scrollLeft(n,j.left+W.left)))}return G3=t,G3}var W3,x7;function Boe(){return x7||(x7=1,W3=Ooe()),W3}var Q3,w7;function Ioe(){if(w7)return Q3;w7=1;var r=Object.assign||function(B){for(var P=1;P<arguments.length;P++){var U=arguments[P];for(var j in U)Object.prototype.hasOwnProperty.call(U,j)&&(B[j]=U[j])}return B},t=function(){function B(P,U){for(var j=0;j<U.length;j++){var q=U[j];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,U,j){return U&&B(P.prototype,U),j&&B(P,j),P}}();function e(B,P){if(!(B instanceof P))throw new TypeError("Cannot call a class as a function")}function n(B,P){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:B}function i(B,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);B.prototype=Object.create(P&&P.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(B,P):B.__proto__=P)}var o=Ts(),s=qf(),a=Tv(),f=a.findDOMNode,g=Boe(),b=["blur","checkValidity","click","focus","select","setCustomValidity","setSelectionRange","setRangeText"];function I(){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 S=function(B){i(P,B);function P(U){e(this,P);var j=n(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,U));return j.state={isOpen:!1,highlightedIndex:null},j._debugStates=[],j.ensureHighlightedIndex=j.ensureHighlightedIndex.bind(j),j.exposeAPI=j.exposeAPI.bind(j),j.handleInputFocus=j.handleInputFocus.bind(j),j.handleInputBlur=j.handleInputBlur.bind(j),j.handleChange=j.handleChange.bind(j),j.handleKeyDown=j.handleKeyDown.bind(j),j.handleInputClick=j.handleInputClick.bind(j),j.maybeAutoCompleteText=j.maybeAutoCompleteText.bind(j),j}return t(P,[{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(j){this.state.highlightedIndex!==null&&this.setState(this.ensureHighlightedIndex),j.autoHighlight&&(this.props.value!==j.value||this.state.highlightedIndex===null)&&this.setState(this.maybeAutoCompleteText)}},{key:"componentDidMount",value:function(){this.isOpen()&&this.setMenuPositions()}},{key:"componentDidUpdate",value:function(j,q){(this.state.isOpen&&!q.isOpen||"open"in this.props&&this.props.open&&!j.open)&&this.setMenuPositions(),this.maybeScrollItemIntoView(),q.isOpen!==this.state.isOpen&&this.props.onMenuVisibilityChange(this.state.isOpen)}},{key:"exposeAPI",value:function(j){var q=this;this.refs.input=j,b.forEach(function(W){return q[W]=j&&j[W]&&j[W].bind(j)})}},{key:"maybeScrollItemIntoView",value:function(){if(this.isOpen()&&this.state.highlightedIndex!==null){var j=this.refs["item-"+this.state.highlightedIndex],q=this.refs.menu;g(f(j),f(q),{onlyScrollIfNeeded:!0})}}},{key:"handleKeyDown",value:function(j){P.keyDownHandlers[j.key]?P.keyDownHandlers[j.key].call(this,j):this.isOpen()||this.setState({isOpen:!0})}},{key:"handleChange",value:function(j){this.props.onChange(j,j.target.value)}},{key:"getFilteredItems",value:function(j){var q=j.items;return j.shouldItemRender&&(q=q.filter(function(W){return j.shouldItemRender(W,j.value)})),j.sortItems&&q.sort(function(W,ee){return j.sortItems(W,ee,j.value)}),q}},{key:"maybeAutoCompleteText",value:function(j,q){for(var W=j.highlightedIndex,ee=q.value,J=q.getItemValue,$=W===null?0:W,X=this.getFilteredItems(q),G=0;G<X.length&&!q.isItemSelectable(X[$]);G++)$=($+1)%X.length;var ae=X[$]&&q.isItemSelectable(X[$])?X[$]:null;if(ee!==""&&ae){var ge=J(ae),he=ge.toLowerCase().indexOf(ee.toLowerCase())===0;if(he)return{highlightedIndex:$}}return{highlightedIndex:null}}},{key:"ensureHighlightedIndex",value:function(j,q){if(j.highlightedIndex>=this.getFilteredItems(q).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var j=this.refs.input,q=j.getBoundingClientRect(),W=window.window.getComputedStyle(j),ee=parseInt(W.marginBottom,10)||0,J=parseInt(W.marginLeft,10)||0,$=parseInt(W.marginRight,10)||0;this.setState({menuTop:q.bottom+ee,menuLeft:q.left+J,menuWidth:q.width+J+$})}},{key:"highlightItemFromMouse",value:function(j){this.setState({highlightedIndex:j})}},{key:"selectItemFromMouse",value:function(j){var q=this,W=this.props.getItemValue(j);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},function(){q.props.onSelect(W,j)})}},{key:"setIgnoreBlur",value:function(j){this._ignoreBlur=j}},{key:"renderMenu",value:function(){var j=this,q=this.getFilteredItems(this.props).map(function(J,$){var X=j.props.renderItem(J,j.state.highlightedIndex===$,{cursor:"default"});return o.cloneElement(X,{onMouseEnter:j.props.isItemSelectable(J)?function(){return j.highlightItemFromMouse($)}:null,onClick:j.props.isItemSelectable(J)?function(){return j.selectItemFromMouse(J)}:null,ref:function(ae){return j.refs["item-"+$]=ae}})}),W={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},ee=this.props.renderMenu(q,this.props.value,W);return o.cloneElement(ee,{ref:function($){return j.refs.menu=$},onTouchStart:function(){return j.setIgnoreBlur(!0)},onMouseEnter:function(){return j.setIgnoreBlur(!0)},onMouseLeave:function(){return j.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(j){var q=this;if(this._ignoreBlur){this._ignoreFocus=!0,this._scrollOffset=I(),this.refs.input.focus();return}var W=void 0,ee=this.state.highlightedIndex;if(this.props.selectOnBlur&&ee!==null){var J=this.getFilteredItems(this.props),$=J[ee],X=this.props.getItemValue($);W=function(){return q.props.onSelect(X,$)}}this.setState({isOpen:!1,highlightedIndex:null},W);var G=this.props.inputProps.onBlur;G&&G(j)}},{key:"handleInputFocus",value:function(j){var q=this;if(this._ignoreFocus){this._ignoreFocus=!1;var W=this._scrollOffset,ee=W.x,J=W.y;this._scrollOffset=null,window.scrollTo(ee,J),clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(function(){q._scrollTimer=null,window.scrollTo(ee,J)},0);return}this.setState({isOpen:!0});var $=this.props.inputProps.onFocus;$&&$(j)}},{key:"isInputFocused",value:function(){var j=this.refs.input;return j.ownerDocument&&j===j.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(j,q){return q?function(W){j(W),q(W)}:j}},{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 j=this.props.inputProps,q=this.isOpen();return o.createElement("div",r({style:r({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(r({},j,{role:"combobox","aria-autocomplete":"list","aria-expanded":q,autoComplete:"off",ref:this.exposeAPI,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleChange,onKeyDown:this.composeEventHandlers(this.handleKeyDown,j.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,j.onClick),value:this.props.value})),q&&this.renderMenu(),this.props.debug&&o.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),P}(o.Component);return S.propTypes={items:s.array.isRequired,value:s.any,onChange:s.func,onSelect:s.func,shouldItemRender:s.func,isItemSelectable:s.func,sortItems:s.func,getItemValue:s.func.isRequired,renderItem:s.func.isRequired,renderMenu:s.func,menuStyle:s.object,renderInput:s.func,inputProps:s.object,wrapperProps:s.object,wrapperStyle:s.object,autoHighlight:s.bool,selectOnBlur:s.bool,onMenuVisibilityChange:s.func,open:s.bool,debug:s.bool},S.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(P){return o.createElement("input",P)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(P,U,j){return o.createElement("div",{style:r({},j,this.menuStyle),children:P})},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(){}},S.keyDownHandlers={ArrowDown:function(P){P.preventDefault();var U=this.getFilteredItems(this.props);if(U.length){for(var j=this.state.highlightedIndex,q=j===null?-1:j,W=0;W<U.length;W++){var ee=(q+W+1)%U.length;if(this.props.isItemSelectable(U[ee])){q=ee;break}}q>-1&&q!==j&&this.setState({highlightedIndex:q,isOpen:!0})}},ArrowUp:function(P){P.preventDefault();var U=this.getFilteredItems(this.props);if(U.length){for(var j=this.state.highlightedIndex,q=j===null?U.length:j,W=0;W<U.length;W++){var ee=(q-(1+W)+U.length)%U.length;if(this.props.isItemSelectable(U[ee])){q=ee;break}}q!==U.length&&this.setState({highlightedIndex:q,isOpen:!0})}},Enter:function(P){var U=this;if(P.keyCode===13)if(this.setIgnoreBlur(!1),this.isOpen())if(this.state.highlightedIndex==null)this.setState({isOpen:!1},function(){U.refs.input.select()});else{P.preventDefault();var j=this.getFilteredItems(this.props)[this.state.highlightedIndex],q=this.props.getItemValue(j);this.setState({isOpen:!1,highlightedIndex:null},function(){U.refs.input.setSelectionRange(q.length,q.length),U.props.onSelect(q,j)})}else return},Escape:function(){this.setIgnoreBlur(!1),this.setState({highlightedIndex:null,isOpen:!1})},Tab:function(){this.setIgnoreBlur(!1)}},Q3=S,Q3}var koe=Ioe();const Toe=us(koe);function ko(){var r="/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",t="6ef9facf9aeabdae687b5aca973710969d826d60",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ko=function(){return s},s}ko();const M7=(ko().s[0]++,140);class J1 extends Zn.Component{constructor(){super(...arguments);Kn(this,"state",(ko().s[1]++,{maxHeight:M7}));Kn(this,"autocompleteMenuEl",(ko().s[2]++,null))}calcMaxHeight(){if(ko().f[1]++,ko().s[4]++,this.props.keepMenuWithinWindowBounds){ko().b[0][0]++;const e=(ko().s[5]++,window.innerHeight-this.autocompleteMenuEl.getBoundingClientRect().top),n=(ko().s[6]++,Math.min(e,M7));ko().s[7]++,n!=this.state.maxHeight?(ko().b[1][0]++,ko().s[8]++,this.setState({maxHeight:n})):ko().b[1][1]++}else ko().b[0][1]++}componentDidMount(){ko().f[2]++,ko().s[9]++,this.calcMaxHeight()}componentDidUpdate(){ko().f[3]++,ko().s[10]++,this.calcMaxHeight()}onChange(e){ko().f[4]++,ko().s[11]++,this.props.onChange(e===""?(ko().b[2][0]++,void 0):(ko().b[2][1]++,e))}render(){return ko().f[5]++,ko().s[12]++,ue.jsx("div",{ref:e=>{ko().f[6]++,ko().s[13]++,this.autocompleteMenuEl=e},children:ue.jsx(Toe,{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:e=>(ko().f[7]++,ko().s[14]++,e[0]),onSelect:e=>(ko().f[8]++,ko().s[15]++,this.onChange(e)),onChange:(e,n)=>(ko().f[9]++,ko().s[16]++,this.onChange(n)),shouldItemRender:(e,n=(ko().b[3][0]++,""))=>(ko().f[10]++,ko().s[17]++,typeof n=="string"?(ko().b[4][0]++,ko().s[18]++,e[0].toLowerCase().indexOf(n.toLowerCase())>-1):(ko().b[4][1]++,ko().s[19]++,!1)),renderItem:(e,n)=>(ko().f[11]++,ko().s[20]++,ue.jsx("div",{className:Ip({"maputnik-autocomplete-menu-item":!0,"maputnik-autocomplete-menu-item-selected":n}),children:e[1]},e[0]))})})}}Kn(J1,"defaultProps",(ko().s[3]++,{onChange:()=>{ko().f[0]++},options:[]}));function yp(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",t="ab049bb75b4ddccd0f9bdd2bba8785d564ca92f6",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return yp=function(){return s},s}yp();class bU extends Zn.Component{render(){var e;yp().f[1]++;const t=(yp().s[1]++,this.props.t);return yp().s[2]++,ue.jsx(ps,{label:t("Source"),fieldSpec:Jo.layer.source,error:this.props.error,"data-wd-key":this.props.wdKey,children:ue.jsx(J1,{value:this.props.value,onChange:this.props.onChange,options:(e=this.props.sourceIds)==null?void 0:e.map(n=>(yp().f[2]++,yp().s[3]++,[n,n]))})})}}Kn(bU,"defaultProps",(yp().s[0]++,{onChange:()=>{yp().f[0]++},sourceIds:[]}));const xU=(yp().s[4]++,qa()(bU));function vp(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",t="d17faa4f03faf23184e12eb0563d322067d1f63d",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return vp=function(){return s},s}vp();class wU extends Zn.Component{render(){var e;vp().f[1]++;const t=(vp().s[1]++,this.props.t);return vp().s[2]++,ue.jsx(ps,{label:t("Source Layer"),fieldSpec:Qa.layer["source-layer"],"data-wd-key":"layer-source-layer",error:this.props.error,children:ue.jsx(J1,{keepMenuWithinWindowBounds:!!this.props.isFixed,value:this.props.value,onChange:this.props.onChange,options:(e=this.props.sourceLayerIds)==null?void 0:e.map(n=>(vp().f[2]++,vp().s[3]++,[n,n]))})})}}Kn(wU,"defaultProps",(vp().s[0]++,{onChange:()=>{vp().f[0]++},sourceLayerIds:[],isFixed:!1}));const MU=(vp().s[4]++,qa()(wU));function Gr(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx",t="7a9f0314912c2a2e8e47cddf3aaf5469476531e0",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Gr=function(){return s},s}Gr();class Poe extends Zn.Component{constructor(e){Gr().f[1]++,Gr().s[10]++;super(e);Kn(this,"addLayer",(Gr().s[0]++,()=>{Gr().f[0]++;const e=(Gr().s[1]++,this.props.layers.slice(0)),n=(Gr().s[2]++,{id:this.state.id,type:this.state.type});Gr().s[3]++,this.state.type!=="background"?(Gr().b[0][0]++,Gr().s[4]++,n.source=this.state.source,Gr().s[5]++,Gr().b[2][0]++,this.state.type!=="raster"&&(Gr().b[2][1]++,this.state["source-layer"])?(Gr().b[1][0]++,Gr().s[6]++,n["source-layer"]=this.state["source-layer"]):Gr().b[1][1]++):Gr().b[0][1]++,Gr().s[7]++,e.push(n),Gr().s[8]++,this.props.onLayersChange(e),Gr().s[9]++,this.props.onOpenToggle(!1)}));const n=(Gr().s[11]++,{type:"fill",id:""});Gr().s[12]++,e.sources.length>0?(Gr().b[3][0]++,Gr().s[13]++,n.source=Object.keys(this.props.sources)[0],Gr().s[14]++,n["source-layer"]=this.props.sources[n.source][0]):Gr().b[3][1]++,Gr().s[15]++,this.state=n}componentDidUpdate(e,n){Gr().f[2]++;const i=(Gr().s[16]++,n.type),o=(Gr().s[17]++,this.state.type),s=(Gr().s[18]++,this.getSources(i)),a=(Gr().s[19]++,this.getSources(o));Gr().s[20]++,Gr().b[5][0]++,i!==o&&(Gr().b[5][1]++,n.source!=="")&&(Gr().b[5][2]++,s.indexOf(n.source)>-1)&&(Gr().b[5][3]++,a.indexOf(this.state.source)<0)?(Gr().b[4][0]++,Gr().s[21]++,this.setState({source:""})):Gr().b[4][1]++}getLayersForSource(e){Gr().f[3]++;const n=(Gr().s[22]++,Gr().b[6][0]++,this.props.sources[e]||(Gr().b[6][1]++,{}));return Gr().s[23]++,Gr().b[7][0]++,n.layers||(Gr().b[7][1]++,[])}getSources(e){Gr().f[4]++;const n=(Gr().s[24]++,[]),i=(Gr().s[25]++,{vector:["fill","line","symbol","circle","fill-extrusion","heatmap"],raster:["raster"],geojson:["fill","line","symbol","circle","fill-extrusion","heatmap"]});Gr().s[26]++;for(const[o,s]of Object.entries(this.props.sources)){const a=(Gr().s[27]++,s.type);Gr().s[28]++,Gr().b[9][0]++,i[a]&&(Gr().b[9][1]++,i[a].indexOf(e)>-1)?(Gr().b[8][0]++,Gr().s[29]++,n.push(o)):Gr().b[8][1]++}return Gr().s[30]++,n}render(){Gr().f[5]++;const e=(Gr().s[31]++,this.props.t),n=(Gr().s[32]++,this.getSources(this.state.type)),i=(Gr().s[33]++,this.getLayersForSource(this.state.source));return Gr().s[34]++,ue.jsx(A0,{isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Add Layer"),"data-wd-key":"modal:add-layer",className:"maputnik-add-modal",children:ue.jsxs("div",{className:"maputnik-add-layer",children:[ue.jsx(CU,{value:this.state.id,wdKey:"add-layer.layer-id",onChange:o=>{Gr().f[6]++,Gr().s[35]++,this.setState({id:o})}}),ue.jsx(_U,{value:this.state.type,wdKey:"add-layer.layer-type",onChange:o=>(Gr().f[7]++,Gr().s[36]++,this.setState({type:o}))}),(Gr().b[10][0]++,this.state.type!=="background"&&(Gr().b[10][1]++,ue.jsx(xU,{sourceIds:n,wdKey:"add-layer.layer-source-block",value:this.state.source,onChange:o=>(Gr().f[8]++,Gr().s[37]++,this.setState({source:o}))}))),(Gr().b[11][0]++,["background","raster","hillshade","heatmap"].indexOf(this.state.type)<0&&(Gr().b[11][1]++,ue.jsx(MU,{isFixed:!0,sourceLayerIds:i,value:this.state["source-layer"],onChange:o=>(Gr().f[9]++,Gr().s[38]++,this.setState({"source-layer":o}))}))),ue.jsx(Ws,{className:"maputnik-add-layer-button",onClick:this.addLayer,"data-wd-key":"add-layer",children:e("Add Layer")})]})})}}const Koe=(Gr().s[39]++,qa()(Poe));function q0(){var r="/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",t="a991ed6da2a27b46f1adbb88a645aa2ee0df375e",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return q0=function(){return s},s}q0();let S7=(q0().s[0]++,0);function N1(r=(q0().b[0][0]++,"")){return q0().f[0]++,q0().s[1]++,S7++,q0().s[2]++,r+S7}function Gi(){var r="/home/runner/work/maputnik/maputnik/src/libs/layer.ts",t="8d7d71e3a97c0e4b8cc5fd0ca26b8fdf4aa2aa36",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Gi=function(){return s},s}Gi();function Roe(r,t){Gi().f[0]++;const e=(Gi().s[0]++,{...r.paint});Gi().s[1]++,Object.keys(e).forEach(i=>{Gi().f[1]++,Gi().s[2]++,i in Qa["paint_"+t]?Gi().b[0][1]++:(Gi().b[0][0]++,Gi().s[3]++,delete e[i])});const n=(Gi().s[4]++,{...r.layout});return Gi().s[5]++,Object.keys(n).forEach(i=>{Gi().f[2]++,Gi().s[6]++,i in Qa["layout_"+t]?Gi().b[1][1]++:(Gi().b[1][0]++,Gi().s[7]++,delete n[i])}),Gi().s[8]++,{...r,paint:e,layout:n,type:t}}function Doe(r,t,e,n){if(Gi().f[3]++,Gi().s[9]++,n===void 0)if(Gi().b[2][0]++,Gi().s[10]++,t){Gi().b[3][0]++;const i=(Gi().s[11]++,{...r,[t]:{...r[t]}});return Gi().s[12]++,delete i[t][e],Gi().s[13]++,Object.keys(i[t]).length<1?(Gi().b[4][0]++,Gi().s[14]++,delete i[t]):Gi().b[4][1]++,Gi().s[15]++,i}else{Gi().b[3][1]++;const i=(Gi().s[16]++,{...r});return Gi().s[17]++,delete i[e],Gi().s[18]++,i}else return Gi().b[2][1]++,Gi().s[19]++,t?(Gi().b[5][0]++,Gi().s[20]++,{...r,[t]:{...r[t],[e]:n}}):(Gi().b[5][1]++,Gi().s[21]++,{...r,[e]:n})}function f1(r){return Gi().f[4]++,Gi().s[22]++,r.replace(" ","-").replace("_","-").split("-")[0]}function Loe(r,t){Gi().f[5]++;const e=(Gi().s[23]++,f1(r[t].id));let n=(Gi().s[24]++,t);Gi().s[25]++;for(let i=(Gi().s[26]++,t);i>0;i--){const o=(Gi().s[27]++,f1(r[i-1].id));if(Gi().s[28]++,o===e)Gi().b[6][0]++,Gi().s[29]++,n=i-1;else return Gi().b[6][1]++,Gi().s[30]++,n}return Gi().s[31]++,n}function yn(){var r="/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",t="e544c04a7b56f1c8f5a1b9c28e156fb038263492",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return yn=function(){return s},s}yn();class SU extends Zn.Component{constructor(e){yn().f[1]++,yn().s[1]++;super(e);Kn(this,"selectedItemRef");Kn(this,"scrollContainerRef");Kn(this,"toggleLayers",(yn().s[6]++,()=>{yn().f[3]++;let e=(yn().s[7]++,0);const n=(yn().s[8]++,{});yn().s[9]++,this.groupedLayers().forEach(i=>{yn().f[4]++;const o=(yn().s[10]++,f1(i[0].id)),s=(yn().s[11]++,[o,e].join("-"));yn().s[12]++,i.length>1?(yn().b[0][0]++,yn().s[13]++,n[s]=this.state.areAllGroupsExpanded):yn().b[0][1]++,yn().s[14]++,i.forEach(a=>{yn().f[5]++,yn().s[15]++,e+=1})}),yn().s[16]++,this.setState({collapsedGroups:n,areAllGroupsExpanded:!this.state.areAllGroupsExpanded})}));yn().s[2]++,this.selectedItemRef=Zn.createRef(),yn().s[3]++,this.scrollContainerRef=Zn.createRef(),yn().s[4]++,this.state={collapsedGroups:{},areAllGroupsExpanded:!1,keys:{add:+N1()},isOpen:{add:!1}}}toggleModal(e){yn().f[2]++,yn().s[5]++,this.setState({keys:{...this.state.keys,[e]:+N1()},isOpen:{...this.state.isOpen,[e]:!this.state.isOpen[e]}})}groupedLayers(){yn().f[6]++;const e=(yn().s[17]++,[]),n=(yn().s[18]++,new Map);yn().s[19]++;for(let i=(yn().s[20]++,0);i<this.props.layers.length;i++){const o=(yn().s[21]++,this.props.layers[i]),s=(yn().s[22]++,this.props.layers[i-1]);yn().s[23]++,n.set(o.id,n.has(o.id)?(yn().b[1][0]++,n.get(o.id)+1):(yn().b[1][1]++,0));const a=(yn().s[24]++,{...o,key:`layers-list-${o.id}-${n.get(o.id)}`});if(yn().s[25]++,yn().b[3][0]++,s&&(yn().b[3][1]++,f1(s.id)==f1(a.id))){yn().b[2][0]++;const f=(yn().s[26]++,e[e.length-1]);yn().s[27]++,f.push(a)}else yn().b[2][1]++,yn().s[28]++,e.push([a])}return yn().s[29]++,e}toggleLayerGroup(e,n){yn().f[7]++;const i=(yn().s[30]++,[e,n].join("-")),o=(yn().s[31]++,{...this.state.collapsedGroups});yn().s[32]++,i in this.state.collapsedGroups?(yn().b[4][0]++,yn().s[33]++,o[i]=!this.state.collapsedGroups[i]):(yn().b[4][1]++,yn().s[34]++,o[i]=!1),yn().s[35]++,this.setState({collapsedGroups:o})}isCollapsed(e,n){yn().f[8]++;const i=(yn().s[36]++,this.state.collapsedGroups[[e,n].join("-")]);return yn().s[37]++,i===void 0?(yn().b[5][0]++,!0):(yn().b[5][1]++,i)}shouldComponentUpdate(e,n){if(yn().f[9]++,yn().s[38]++,this.state!==n)return yn().b[6][0]++,yn().s[39]++,!0;yn().b[6][1]++;function i(g){yn().f[10]++;const b=(yn().s[40]++,{id:g.id});return yn().s[41]++,g.layout?(yn().b[7][0]++,yn().s[42]++,b.layout={visibility:g.layout.visibility}):yn().b[7][1]++,yn().s[43]++,b}const o=(yn().s[44]++,uS.isEqual(e.layers.map(i),this.props.layers.map(i)));function s(g){yn().f[11]++;const b=(yn().s[45]++,{...g});return yn().s[46]++,delete b.layers,yn().s[47]++,b}const a=(yn().s[48]++,uS.isEqual(s(this.props),s(e))),f=(yn().s[49]++,yn().b[8][0]++,!(o&&(yn().b[8][1]++,a)));return yn().s[50]++,f}componentDidUpdate(e){if(yn().f[12]++,yn().s[51]++,e.selectedLayerIndex!==this.props.selectedLayerIndex){yn().b[9][0]++;const n=(yn().s[52]++,this.selectedItemRef.current);if(yn().s[53]++,yn().b[11][0]++,n&&(yn().b[11][1]++,n.node)){yn().b[10][0]++;const i=(yn().s[54]++,n.node),o=(yn().s[55]++,{root:this.scrollContainerRef.current,threshold:1}),s=(yn().s[56]++,new IntersectionObserver(a=>{yn().f[13]++,yn().s[57]++,s.unobserve(i),yn().s[58]++,yn().b[13][0]++,a.length>0&&(yn().b[13][1]++,a[0].intersectionRatio<1)?(yn().b[12][0]++,yn().s[59]++,i.scrollIntoView()):yn().b[12][1]++},o));yn().s[60]++,s.observe(i)}else yn().b[10][1]++}else yn().b[9][1]++}render(){yn().f[14]++;const e=(yn().s[61]++,[]);let n=(yn().s[62]++,0);const i=(yn().s[63]++,this.groupedLayers());yn().s[64]++,i.forEach(s=>{yn().f[15]++;const a=(yn().s[65]++,f1(s[0].id));if(yn().s[66]++,s.length>1){yn().b[14][0]++;const f=(yn().s[67]++,ue.jsx(Ere,{"data-wd-key":[a,n].join("-"),"aria-controls":s.map(g=>(yn().f[16]++,yn().s[68]++,g.key)).join(" "),title:a,isActive:(yn().b[15][0]++,!this.isCollapsed(a,n)||(yn().b[15][1]++,n===this.props.selectedLayerIndex)),onActiveToggle:this.toggleLayerGroup.bind(this,a,n)},`group-${a}-${n}`));yn().s[69]++,e.push(f)}else yn().b[14][1]++;yn().s[70]++,s.forEach((f,g)=>{var P;yn().f[17]++;const b=(yn().s[71]++,Loe(this.props.layers,n)),I=(yn().s[72]++,this.props.errors.find(U=>(yn().f[18]++,yn().s[73]++,yn().b[16][0]++,U.parsed&&(yn().b[16][1]++,U.parsed.type==="layer")&&(yn().b[16][2]++,U.parsed.data.index==n)))),S=(yn().s[74]++,{});yn().s[75]++,n===this.props.selectedLayerIndex?(yn().b[17][0]++,yn().s[76]++,S.ref=this.selectedItemRef):yn().b[17][1]++;const B=(yn().s[77]++,ue.jsx(aie,{className:Ip({"maputnik-layer-list-item-collapsed":(yn().b[18][0]++,s.length>1&&(yn().b[18][1]++,this.isCollapsed(a,b))&&(yn().b[18][2]++,n!==this.props.selectedLayerIndex)),"maputnik-layer-list-item-group-last":(yn().b[19][0]++,g==s.length-1&&(yn().b[19][1]++,s.length>1)),"maputnik-layer-list-item--error":!!I}),index:n,id:f.key,layerId:f.id,layerIndex:n,layerType:f.type,visibility:(yn().b[20][0]++,f.layout||(yn().b[20][1]++,{})).visibility,isSelected:n===this.props.selectedLayerIndex,onLayerSelect:this.props.onLayerSelect,onLayerDestroy:(P=this.props.onLayerDestroy)==null?void 0:P.bind(this),onLayerCopy:this.props.onLayerCopy.bind(this),onLayerVisibilityToggle:this.props.onLayerVisibilityToggle.bind(this),...S},f.key));yn().s[78]++,e.push(B),yn().s[79]++,n+=1})});const o=(yn().s[80]++,this.props.t);return yn().s[81]++,ue.jsxs("section",{className:"maputnik-layer-list",role:"complementary","aria-label":o("Layers list"),ref:this.scrollContainerRef,children:[ue.jsx(Koe,{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),ue.jsxs("header",{className:"maputnik-layer-list-header",children:[ue.jsx("span",{className:"maputnik-layer-list-header-title",children:o("Layers")}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx("div",{className:"maputnik-default-property",children:ue.jsx("div",{className:"maputnik-multibutton",children:ue.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?(yn().b[21][0]++,o("Collapse")):(yn().b[21][1]++,o("Expand"))})})}),ue.jsx("div",{className:"maputnik-default-property",children:ue.jsx("div",{className:"maputnik-multibutton",children:ue.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")})})})]}),ue.jsx("div",{role:"navigation","aria-label":o("Layers list"),children:ue.jsx("ul",{className:"maputnik-layer-list-container",children:e})})]})}}Kn(SU,"defaultProps",(yn().s[0]++,{onLayerSelect:()=>{yn().f[0]++}}));const Foe=(yn().s[82]++,qa()(SU)),Uoe=(yn().s[83]++,nie(r=>(yn().f[19]++,yn().s[84]++,ue.jsx(Foe,{...r}))));class joe extends Zn.Component{render(){return yn().f[20]++,yn().s[85]++,ue.jsx(Uoe,{...this.props,helperClass:"sortableHelper",onSortEnd:this.props.onMoveLayer.bind(this),useDragHandle:!0,shouldCancelStart:()=>(yn().f[21]++,yn().s[86]++,!1)})}}var q3,E7;function EU(){if(E7)return q3;E7=1;var r={},t="a menu outside a mounted Wrapper with an id, or a menu that does not exist";function e(s,a){r[s]=a}function n(s){delete r[s]}function i(s,a){var f=r[s];if(!f)throw new Error("Cannot open "+t);f.openMenu(a)}function o(s,a){var f=r[s];if(!f)throw new Error("Cannot close "+t);f.closeMenu(a)}return q3={registerManager:e,unregisterManager:n,openMenu:i,closeMenu:o},q3}var Y3,O7;function zoe(){if(O7)return Y3;O7=1;function r(i){i=i||{};var o=i.keybindings||{};this._settings={keybindings:{next:o.next||{keyCode:40},prev:o.prev||{keyCode:38},first:o.first,last:o.last},wrap:i.wrap,stringSearch:i.stringSearch,stringSearchDelay:800},this._keybindingsLookup=[];var s,a;for(s in this._settings.keybindings)a=this._settings.keybindings[s],a&&[].concat(a).forEach((function(f){f.metaKey=f.metaKey||!1,f.ctrlKey=f.ctrlKey||!1,f.altKey=f.altKey||!1,f.shiftKey=f.shiftKey||!1,this._keybindingsLookup.push({action:s,eventMatcher:f})}).bind(this));this._searchString="",this._members=[],i.members&&this.setMembers(i.members),this._boundHandleKeydownEvent=this._handleKeydownEvent.bind(this)}r.prototype.activate=function(){return document.addEventListener("keydown",this._boundHandleKeydownEvent,!0),this},r.prototype.deactivate=function(){return document.removeEventListener("keydown",this._boundHandleKeydownEvent,!0),this._clearSearchStringRefreshTimer(),this},r.prototype._handleKeydownEvent=function(i){var o=this._getActiveElementIndex();if(o!==-1){var s=!1;this._keybindingsLookup.forEach((function(a){if(t(a.eventMatcher,i))switch(s=!0,i.preventDefault(),a.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)),s||this._handleUnboundKey(i)}},r.prototype.moveFocusForward=function(){var i=this._getActiveElementIndex(),o;return i<this._members.length-1?o=i+1:this._settings.wrap?o=0:o=i,this.focusNodeAtIndex(o),o},r.prototype.moveFocusBack=function(){var i=this._getActiveElementIndex(),o;return i>0?o=i-1:this._settings.wrap?o=this._members.length-1:o=i,this.focusNodeAtIndex(o),o},r.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)},r.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)},r.prototype._handleUnboundKey=function(i){if(this._settings.stringSearch){if(this._searchString!==""&&(i.key===" "||i.keyCode===32))return i.preventDefault(),-1;if(!e(i.keyCode)||i.ctrlKey||i.metaKey||i.altKey)return-1;i.preventDefault(),this._addToSearchString(String.fromCharCode(i.keyCode)),this._runStringSearch()}},r.prototype._clearSearchString=function(){this._searchString=""},r.prototype._addToSearchString=function(i){this._searchString+=i.toLowerCase()},r.prototype._startSearchStringRefreshTimer=function(){var i=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout(function(){i._clearSearchString()},this._settings.stringSearchDelay)},r.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)},r.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)},r.prototype.moveFocusByString=function(i){for(var o,s=0,a=this._members.length;s<a;s++)if(o=this._members[s],!!o.text&&o.text.indexOf(i)===0)return n(o.node)},r.prototype._findIndexOfNode=function(i){for(var o=0,s=this._members.length;o<s;o++)if(this._members[o].node===i)return o;return-1},r.prototype._getActiveElementIndex=function(){return this._findIndexOfNode(document.activeElement)},r.prototype.focusNodeAtIndex=function(i){var o=this._members[i];return o&&n(o.node),this},r.prototype.addMember=function(i,o){var s=i.node||i,a=i.text||s.getAttribute("data-focus-group-text")||s.textContent||"";this._checkNode(s);var f=a.replace(/[\W_]/g,"").toLowerCase(),g={node:s,text:f};return o!=null?this._members.splice(o,0,g):this._members.push(g),this},r.prototype.removeMember=function(i){var o=typeof i=="number"?i:this._findIndexOfNode(i);if(o!==-1)return this._members.splice(o,1),this},r.prototype.clearMembers=function(){return this._members=[],this},r.prototype.setMembers=function(i){this.clearMembers();for(var o=0,s=i.length;o<s;o++)this.addMember(i[o]);return this},r.prototype.getMembers=function(){return this._members},r.prototype._checkNode=function(i){if(!i.nodeType||i.nodeType!==window.Node.ELEMENT_NODE)throw new Error("focus-group: only DOM nodes allowed");return i};function t(i,o){for(var s in i)if(o[s]!==void 0&&i[s]!==o[s])return!1;return!0}function e(i){return i>=65&&i<=90}function n(i){!i||!i.focus||(i.focus(),i.tagName.toLowerCase()==="input"&&i.select())}return Y3=function(o){return new r(o)},Y3}var $3,B7;function Noe(){if(B7)return $3;B7=1;var r=zoe(),t=EU(),e={wrap:!0,stringSearch:!0},n={init:function(f){this.updateOptions(f),this.handleBlur=i.bind(this),this.handleSelection=o.bind(this),this.handleMenuKey=s.bind(this),this.focusGroup=r(e),this.button=null,this.menu=null,this.isOpen=!1},updateOptions:function(f){var g=this.options;this.options=f||this.options||{},typeof this.options.closeOnSelection>"u"&&(this.options.closeOnSelection=!0),typeof this.options.closeOnBlur>"u"&&(this.options.closeOnBlur=!0),this.options.id&&t.registerManager(this.options.id,this),g&&g.id&&g.id!==this.options.id&&t.unregisterManager(this.options.id,this)},focusItem:function(f){this.focusGroup.focusNodeAtIndex(f)},addItem:function(f){this.focusGroup.addMember(f)},clearItems:function(){this.focusGroup.clearMembers()},handleButtonNonArrowKey:function(f){this.focusGroup._handleUnboundKey(f)},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(f){if(!this.isOpen&&(f=f||{},f.focusMenu===void 0&&(f.focusMenu=!0),this.isOpen=!0,this.update(),this.focusGroup.activate(),f.focusMenu)){var g=this;this.moveFocusTimer=setTimeout(function(){g.focusItem(0)},0)}},closeMenu:function(f){this.isOpen&&(f=f||{},this.isOpen=!1,this.update(),f.focusButton&&this.button.ref.current.focus())},toggleMenu:function(f,g){f=f||{},g=g||{},this.isOpen?this.closeMenu(f):this.openMenu(g)}};function i(){var a=this;a.blurTimer=setTimeout(function(){if(a.button){var f=a.button.ref.current;if(f){var g=f.ownerDocument.activeElement;if(!(f&&g===f)){var b=a.menu.ref.current;if(b===g){a.focusItem(0);return}b&&b.contains(g)||a.isOpen&&a.closeMenu({focusButton:!1})}}}},0)}function o(a,f){this.options.closeOnSelection&&this.closeMenu({focusButton:!0}),this.options.onSelection&&this.options.onSelection(a,f)}function s(a){if(this.isOpen)switch(a.key){case"Escape":a.preventDefault(),this.closeMenu({focusButton:!0});break;case"Home":a.preventDefault(),this.focusGroup.moveFocusToFirst();break;case"End":a.preventDefault(),this.focusGroup.moveFocusToLast();break}}return $3=function(a){var f=Object.create(n);return f.init(a),f},$3}var V3,I7;function C2(){if(I7)return V3;I7=1;var r=Ts(),t=r.createContext();return V3=t,V3}var H3,k7;function b2(){if(k7)return H3;k7=1;var r=qf();return H3={refType:r.oneOfType([r.func,r.shape({current:r.elementType})])},H3}var Z3,T7;function x2(){return T7||(T7=1,Z3=function(r,t,e){e=e||{};for(var n in t)t.hasOwnProperty(n)&&(e[n]||(r[n]=t[n]))}),Z3}var X3,P7;function Goe(){if(P7)return X3;P7=1;function r(B,P){if(!(B instanceof P))throw new TypeError("Cannot call a class as a function")}function t(B,P){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:B}function e(B,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);B.prototype=Object.create(P&&P.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(B,P):B.__proto__=P)}var n=Ts(),i=qf(),o=Noe(),s=C2(),a=b2(),f=a.refType,g=x2(),b={children:i.node.isRequired,forwardedRef:f,onMenuToggle:i.func,onSelection:i.func,closeOnSelection:i.bool,closeOnBlur:i.bool,tag:i.string},I=function(P){return{onMenuToggle:P.onMenuToggle,onSelection:P.onSelection,closeOnSelection:P.closeOnSelection,closeOnBlur:P.closeOnBlur,id:P.id}},S=function(B){e(P,B);function P(U){r(this,P);var j=t(this,B.call(this,U));return j.manager=o(I(U)),j}return P.prototype.componentDidUpdate=function(){this.manager.updateOptions(I(this.props))},P.prototype.render=function(){var j={};return g(j,this.props,b),n.createElement(s.Provider,{value:this.manager},n.createElement(this.props.tag,j,this.props.children))},P}(n.Component);return S.propTypes=b,S.defaultProps={tag:"div"},X3=n.forwardRef(function(B,P){var U={forwardedRef:P};return g(U,B,{children:b.children,forwardedRef:b.forwardedRef}),g(U,{forwardedRef:P}),n.createElement(S,U,B.children)}),X3}var J3,K7;function Woe(){if(K7)return J3;K7=1;function r(S,B){if(!(S instanceof B))throw new TypeError("Cannot call a class as a function")}function t(S,B){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:S}function e(S,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);S.prototype=Object.create(B&&B.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(S,B):S.__proto__=B)}var n=Ts(),i=qf(),o=C2(),s=b2(),a=s.refType,f=x2(),g={ambManager:i.object.isRequired,children:i.node.isRequired,disabled:i.bool,forwardedRef:a,tag:i.string},b=function(){return["button","fieldset","input","optgroup","option","select","textarea"]},I=function(S){e(B,S);function B(){var P,U,j;r(this,B);for(var q=arguments.length,W=Array(q),ee=0;ee<q;ee++)W[ee]=arguments[ee];return j=(P=(U=t(this,S.call.apply(S,[this].concat(W))),U),U.ref=n.createRef(),U.handleKeyDown=function(J){if(!U.props.disabled){var $=U.props.ambManager;switch(J.key){case"ArrowDown":J.preventDefault(),$.isOpen?$.focusItem(0):$.openMenu();break;case"Enter":case" ":J.preventDefault(),$.toggleMenu();break;case"Escape":$.handleMenuKey(J);break;default:$.handleButtonNonArrowKey(J)}}},U.handleClick=function(){U.props.disabled||U.props.ambManager.toggleMenu({},{focusMenu:!1})},U.setRef=function(J){U.ref.current=J,typeof U.props.forwardedRef=="function"?U.props.forwardedRef(J):U.props.forwardedRef&&(U.props.forwardedRef.current=J)},P),t(U,j)}return B.prototype.componentDidMount=function(){this.props.ambManager.button=this},B.prototype.componentWillUnmount=function(){this.props.ambManager.destroy()},B.prototype.render=function(){var U=this.props,j=this.props.ambManager,q={role:"button",tabIndex:U.disabled?"":"0","aria-haspopup":!0,"aria-expanded":j.isOpen,"aria-disabled":U.disabled,onKeyDown:this.handleKeyDown,onClick:this.handleClick},W={};return f(W,g),b().indexOf(U.tag)>=0&&delete W.disabled,j.options.closeOnBlur&&(q.onBlur=j.handleBlur),f(q,U,W),f(q,{ref:this.setRef}),n.createElement(U.tag,q,U.children)},B}(n.Component);return I.propTypes=g,I.defaultProps={tag:"span"},J3=n.forwardRef(function(S,B){return n.createElement(o.Consumer,null,function(P){var U={ambManager:P,forwardedRef:B};return f(U,S,{ambManager:g.ambManager,children:g.children,forwardedRef:g.forwardedRef}),n.createElement(I,U,S.children)})}),J3}var e4,R7;function Qoe(){return R7||(R7=1,e4=function(t,e,n){var i=0,o=0,s=!1,a=!1,f=!1;t.addEventListener("click",g,n),t.addEventListener("touchstart",b,n);function g(j){f||e(j)}function b(j){f=!0,!s&&(s=!0,t.addEventListener("touchmove",I,n),t.addEventListener("touchend",S,n),t.addEventListener("touchcancel",B,n),a=!1,i=j.touches[0].clientX,o=j.touches[0].clientY)}function I(j){a||Math.abs(j.touches[0].clientX-i)<=10&&Math.abs(j.touches[0].clientY-o)<=10||(a=!0)}function S(j){s=!1,P(),a||e(j)}function B(){s=!1,a=!1,i=0,o=0}function P(){t.removeEventListener("touchmove",I,n),t.removeEventListener("touchend",S,n),t.removeEventListener("touchcancel",B,n)}function U(){t.removeEventListener("click",g,n),t.removeEventListener("touchstart",b,n),P()}return{remove:U}}),e4}var t4,D7;function qoe(){if(D7)return t4;D7=1;function r(S,B){if(!(S instanceof B))throw new TypeError("Cannot call a class as a function")}function t(S,B){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:S}function e(S,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);S.prototype=Object.create(B&&B.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(S,B):S.__proto__=B)}var n=Ts(),i=qf(),o=Qoe(),s=C2(),a=b2(),f=a.refType,g=x2(),b={ambManager:i.object.isRequired,children:i.oneOfType([i.func,i.node]).isRequired,forwardedRef:f,tag:i.string},I=function(S){e(B,S);function B(){var P,U,j;r(this,B);for(var q=arguments.length,W=Array(q),ee=0;ee<q;ee++)W[ee]=arguments[ee];return j=(P=(U=t(this,S.call.apply(S,[this].concat(W))),U),U.ref=n.createRef(),U.addTapListener=function(){var J=U.ref.current;if(J){var $=J.ownerDocument;$&&(U.tapListener=o($.documentElement,U.handleTap))}},U.handleTap=function(J){U.ref.current.contains(J.target)||U.props.ambManager.button.ref.current.contains(J.target)||U.props.ambManager.closeMenu()},U.setRef=function(J){U.ref.current=J,typeof U.props.forwardedRef=="function"?U.props.forwardedRef(J):U.props.forwardedRef&&(U.props.forwardedRef.current=J)},P),t(U,j)}return B.prototype.componentDidMount=function(){this.props.ambManager.menu=this},B.prototype.componentDidUpdate=function(){var U=this.props.ambManager;U.options.closeOnBlur&&(U.isOpen&&!this.tapListener?this.addTapListener():!U.isOpen&&this.tapListener&&(this.tapListener.remove(),delete this.tapListener),U.isOpen||U.clearItems())},B.prototype.componentWillUnmount=function(){this.tapListener&&this.tapListener.remove(),this.props.ambManager.destroy()},B.prototype.render=function(){var U=this.props,j=this.props.ambManager,q=function(){return typeof U.children=="function"?U.children({isOpen:j.isOpen}):j.isOpen?U.children:!1}();if(!q)return!1;var W={onKeyDown:j.handleMenuKey,role:"menu",tabIndex:-1};return j.options.closeOnBlur&&(W.onBlur=j.handleBlur),g(W,U,b),g(W,{ref:this.setRef}),n.createElement(U.tag,W,q)},B}(n.Component);return I.propTypes=b,I.defaultProps={tag:"div"},t4=n.forwardRef(function(S,B){return n.createElement(s.Consumer,null,function(P){var U={ambManager:P,forwardedRef:B};return g(U,S,{ambManager:b.ambManager,children:b.children,forwardedRef:b.forwardedRef}),n.createElement(I,U,S.children)})}),t4}var n4,L7;function Yoe(){if(L7)return n4;L7=1;function r(I,S){if(!(I instanceof S))throw new TypeError("Cannot call a class as a function")}function t(I,S){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:I}function e(I,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);I.prototype=Object.create(S&&S.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(I,S):I.__proto__=S)}var n=Ts(),i=qf(),o=C2(),s=b2(),a=s.refType,f=x2(),g={ambManager:i.object.isRequired,children:i.node.isRequired,forwardedRef:a,tag:i.string,text:i.string,value:i.any},b=function(I){e(S,I);function S(){var B,P,U;r(this,S);for(var j=arguments.length,q=Array(j),W=0;W<j;W++)q[W]=arguments[W];return U=(B=(P=t(this,I.call.apply(I,[this].concat(q))),P),P.ref=n.createRef(),P.handleKeyDown=function(ee){ee.key!=="Enter"&&ee.key!==" "||P.props.tag==="a"&&P.props.href||(ee.preventDefault(),P.selectItem(ee))},P.selectItem=function(ee){var J=typeof P.props.value<"u"?P.props.value:P.props.children;P.props.ambManager.handleSelection(J,ee)},P.setRef=function(ee){P.ref.current=ee,typeof P.props.forwardedRef=="function"?P.props.forwardedRef(ee):P.props.forwardedRef&&(P.props.forwardedRef.current=ee)},B),t(P,U)}return S.prototype.componentDidMount=function(){this.props.ambManager.addItem({node:this.ref.current,text:this.props.text})},S.prototype.render=function(){var P={onClick:this.selectItem,onKeyDown:this.handleKeyDown,role:"menuitem",tabIndex:"-1",ref:this.setRef};return f(P,this.props,g),n.createElement(this.props.tag,P,this.props.children)},S}(n.Component);return b.propTypes=g,b.defaultProps={tag:"div"},n4=n.forwardRef(function(I,S){return n.createElement(o.Consumer,null,function(B){var P={ambManager:B,forwardedRef:S};return f(P,I,{ambManager:g.ambManager,children:g.children,forwardedRef:g.forwardedRef}),n.createElement(b,P,I.children)})}),n4}var r4,F7;function $oe(){if(F7)return r4;F7=1;var r=EU();return r4={Wrapper:Goe(),Button:Woe(),Menu:qoe(),MenuItem:Yoe(),openMenu:r.openMenu,closeMenu:r.closeMenu},r4}var nC=$oe();function U7(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,n)}return e}function CE(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?U7(Object(e),!0).forEach(function(n){Tl(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):U7(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function w2(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function j7(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function M2(r,t,e){return t&&j7(r.prototype,t),e&&j7(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Tl(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function kp(){return kp=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},kp.apply(this,arguments)}function _O(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&bE(r,t)}function Eb(r){return Eb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Eb(r)}function bE(r,t){return bE=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},bE(r,t)}function Voe(){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 Hoe(r,t){if(r==null)return{};var e={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(e[i]=r[i]);return e}function S2(r,t){if(r==null)return{};var e=Hoe(r,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(e[n]=r[n])}return e}function Nf(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zoe(r,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nf(r)}function CO(r){var t=Voe();return function(){var n=Eb(r),i;if(t){var o=Eb(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Zoe(this,i)}}function Xoe(r,t){return tae(r)||rae(r,t)||OU(r,t)||oae()}function Joe(r){return eae(r)||nae(r)||OU(r)||iae()}function eae(r){if(Array.isArray(r))return xE(r)}function tae(r){if(Array.isArray(r))return r}function nae(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function rae(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n=[],i=!0,o=!1,s,a;try{for(e=e.call(r);!(i=(s=e.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(f){o=!0,a=f}finally{try{!i&&e.return!=null&&e.return()}finally{if(o)throw a}}return n}}function OU(r,t){if(r){if(typeof r=="string")return xE(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return xE(r,t)}}function xE(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function iae(){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 oae(){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 aae=M2(function r(t){var e=this,n=t.expanded,i=n===void 0?[]:n,o=t.allowMultipleExpanded,s=o===void 0?!1:o,a=t.allowZeroExpanded,f=a===void 0?!1:a;w2(this,r),Tl(this,"expanded",void 0),Tl(this,"allowMultipleExpanded",void 0),Tl(this,"allowZeroExpanded",void 0),Tl(this,"toggleExpanded",function(g){if(e.isItemDisabled(g))return e;var b=e.isItemExpanded(g);return b?e.augment({expanded:e.expanded.filter(function(I){return I!==g})}):e.augment({expanded:e.allowMultipleExpanded?[].concat(Joe(e.expanded),[g]):[g]})}),Tl(this,"isItemDisabled",function(g){var b=e.isItemExpanded(g),I=e.expanded.length===1;return!!(b&&!e.allowZeroExpanded&&I)}),Tl(this,"isItemExpanded",function(g){return e.expanded.indexOf(g)!==-1}),Tl(this,"getPanelAttributes",function(g,b){var I=b??e.isItemExpanded(g);return{role:e.allowMultipleExpanded?void 0:"region","aria-hidden":e.allowMultipleExpanded?!I:void 0,"aria-labelledby":e.getButtonId(g),id:e.getPanelId(g),hidden:I?void 0:!0}}),Tl(this,"getHeadingAttributes",function(){return{role:"heading"}}),Tl(this,"getButtonAttributes",function(g,b){var I=b??e.isItemExpanded(g),S=e.isItemDisabled(g);return{id:e.getButtonId(g),"aria-disabled":S,"aria-expanded":I,"aria-controls":e.getPanelId(g),role:"button",tabIndex:0}}),Tl(this,"getPanelId",function(g){return"accordion__panel-".concat(g)}),Tl(this,"getButtonId",function(g){return"accordion__heading-".concat(g)}),Tl(this,"augment",function(g){return new r(CE({expanded:e.expanded,allowMultipleExpanded:e.allowMultipleExpanded,allowZeroExpanded:e.allowZeroExpanded},g))}),this.expanded=i,this.allowMultipleExpanded=s,this.allowZeroExpanded=f}),BU=di.createContext(null),IU=function(r){_O(e,r);var t=CO(e);function e(){var n;w2(this,e);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=t.call.apply(t,[this].concat(o)),Tl(Nf(n),"state",new aae({expanded:n.props.preExpanded,allowMultipleExpanded:n.props.allowMultipleExpanded,allowZeroExpanded:n.props.allowZeroExpanded})),Tl(Nf(n),"toggleExpanded",function(a){n.setState(function(f){return f.toggleExpanded(a)},function(){n.props.onChange&&n.props.onChange(n.state.expanded)})}),Tl(Nf(n),"isItemDisabled",function(a){return n.state.isItemDisabled(a)}),Tl(Nf(n),"isItemExpanded",function(a){return n.state.isItemExpanded(a)}),Tl(Nf(n),"getPanelAttributes",function(a,f){return n.state.getPanelAttributes(a,f)}),Tl(Nf(n),"getHeadingAttributes",function(){return n.state.getHeadingAttributes()}),Tl(Nf(n),"getButtonAttributes",function(a,f){return n.state.getButtonAttributes(a,f)}),n}return M2(e,[{key:"render",value:function(){var i=this.state,o=i.allowZeroExpanded,s=i.allowMultipleExpanded;return di.createElement(BU.Provider,{value:{allowMultipleExpanded:s,allowZeroExpanded:o,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),e}(di.PureComponent);Tl(IU,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var kU=function(r){_O(e,r);var t=CO(e);function e(){var n;w2(this,e);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=t.call.apply(t,[this].concat(o)),Tl(Nf(n),"renderChildren",function(a){return a?n.props.children(a):null}),n}return M2(e,[{key:"render",value:function(){return di.createElement(BU.Consumer,null,this.renderChildren)}}]),e}(di.PureComponent),sae=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],lae=function(t){var e=t.className,n=e===void 0?"accordion":e,i=t.allowMultipleExpanded,o=t.allowZeroExpanded,s=t.onChange,a=t.preExpanded,f=S2(t,sae);return di.createElement(IU,{preExpanded:a,allowMultipleExpanded:i,allowZeroExpanded:o,onChange:s},di.createElement("div",kp({"data-accordion-component":"Accordion",className:n},f)))},wE;(function(r){r.Accordion="Accordion",r.AccordionItem="AccordionItem",r.AccordionItemButton="AccordionItemButton",r.AccordionItemHeading="AccordionItemHeading",r.AccordionItemPanel="AccordionItemPanel"})(wE||(wE={}));var TU=wE,i4=0;function uae(){var r=i4;return i4=i4+1,"raa-".concat(r)}var Aae=di.useId||uae,cae=/[\u0009\u000a\u000c\u000d\u0020]/g;function Sv(r){return r===""||cae.test(r)?(console.error('uuid must be a valid HTML5 id but was given "'.concat(r,'", ASCII whitespaces are forbidden')),!1):!0}var PU=di.createContext(null),dae=function(t){var e=t.children,n=t.uuid,i=t.accordionContext,o=t.dangerouslySetExpanded,s=function(){i.toggleExpanded(n)},a=function(g){var b=o??g.isItemExpanded(n),I=g.isItemDisabled(n),S=g.getPanelAttributes(n,o),B=g.getHeadingAttributes(n),P=g.getButtonAttributes(n,o);return di.createElement(PU.Provider,{value:{uuid:n,expanded:b,disabled:I,toggleExpanded:s,panelAttributes:S,headingAttributes:B,buttonAttributes:P}},e)};return di.createElement(kU,null,a)},hae=function(t){return di.createElement(kU,null,function(e){return di.createElement(dae,kp({},t,{accordionContext:e}))})},E2=function(t){var e=t.children,n=function(o){return o?e(o):null};return di.createElement(PU.Consumer,null,n)},fae=["uuid","dangerouslySetExpanded","className","activeClassName"],KU=function(t){var e=t.uuid,n=t.dangerouslySetExpanded,i=t.className,o=i===void 0?"accordion__item":i,s=t.activeClassName,a=S2(t,fae),f=di.useState(Aae()),g=Xoe(f,1),b=g[0],I=e??b,S=function(P){var U=P.expanded,j=U&&s?s:o;return di.createElement("div",kp({"data-accordion-component":"AccordionItem",className:j},a))};return Sv(I.toString()),a.id&&Sv(a.id),di.createElement(hae,{uuid:I,dangerouslySetExpanded:n},di.createElement(E2,null,S))};KU.displayName=TU.AccordionItem;function RU(r){return r&&(r.matches('[data-accordion-component="Accordion"]')?r:RU(r.parentElement))}function O2(r){var t=RU(r);return t&&Array.from(t.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}function pae(r){var t=O2(r)||[],e=t[0];e&&e.focus()}function mae(r){var t=O2(r)||[],e=t[t.length-1];e&&e.focus()}function gae(r){var t=O2(r)||[],e=t.indexOf(r);if(e!==-1){var n=t[e+1];n&&n.focus()}}function yae(r){var t=O2(r)||[],e=t.indexOf(r);if(e!==-1){var n=t[e-1];n&&n.focus()}}var om={END:"End",ENTER:"Enter",HOME:"Home",SPACE:" ",SPACE_DEPRECATED:"Spacebar",UP:"ArrowUp",DOWN:"ArrowDown",LEFT:"ArrowLeft",RIGHT:"ArrowRight"},vae=["toggleExpanded","className"],_ae=function(t){var e=t.toggleExpanded,n=t.className,i=n===void 0?"accordion__button":n,o=S2(t,vae),s=function(f){var g=f.key;if((g===om.ENTER||g===om.SPACE||g===om.SPACE_DEPRECATED)&&(f.preventDefault(),e()),f.target instanceof HTMLElement)switch(g){case om.HOME:{f.preventDefault(),pae(f.target);break}case om.END:{f.preventDefault(),mae(f.target);break}case om.LEFT:case om.UP:{f.preventDefault(),yae(f.target);break}case om.RIGHT:case om.DOWN:{f.preventDefault(),gae(f.target);break}}};return o.id&&Sv(o.id),di.createElement("div",kp({className:i},o,{role:"button",tabIndex:0,onClick:e,onKeyDown:s,"data-accordion-component":"AccordionItemButton"}))},Cae=function(t){return di.createElement(E2,null,function(e){var n=e.toggleExpanded,i=e.buttonAttributes;return di.createElement(_ae,kp({toggleExpanded:n},t,i))})},bae={className:"accordion__heading","aria-level":3},xae=`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.”
|
||
|
||
`,DU=function(r){_O(e,r);var t=CO(e);function e(){var n;w2(this,e);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=t.call.apply(t,[this].concat(o)),Tl(Nf(n),"ref",void 0),Tl(Nf(n),"setRef",function(a){n.ref=a}),n}return M2(e,[{key:"componentDidUpdate",value:function(){e.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){e.VALIDATE(this.ref)}},{key:"render",value:function(){return di.createElement("div",kp({"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(xae)}}]),e}(di.PureComponent);Tl(DU,"defaultProps",bae);var LU=function(t){return di.createElement(E2,null,function(e){var n=e.headingAttributes;return t.id&&Sv(t.id),di.createElement(DU,kp({},t,n))})};LU.displayName=TU.AccordionItemHeading;var wae=["className","region","id"],Mae=function(t){var e=t.className,n=e===void 0?"accordion__panel":e,i=t.region,o=t.id,s=S2(t,wae),a=function(g){var b=g.panelAttributes;o&&Sv(o);var I=CE(CE({},b),{},{"aria-labelledby":i?b["aria-labelledby"]:void 0});return di.createElement("div",kp({"data-accordion-component":"AccordionItemPanel",className:n},s,I,{role:i?"region":void 0}))};return di.createElement(E2,null,a)},xC={exports:{}},Sae=xC.exports,z7;function B2(){return z7||(z7=1,function(r,t){(function(e,n){r.exports=n()})(Sae,function(){var e=navigator.userAgent,n=navigator.platform,i=/gecko\/\d/i.test(e),o=/MSIE \d/.test(e),s=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),f=o||s||a,g=f&&(o?document.documentMode||6:+(a||s)[1]),b=!a&&/WebKit\//.test(e),I=b&&/Qt\/\d+\.\d+/.test(e),S=!a&&/Chrome\/(\d+)/.exec(e),B=S&&+S[1],P=/Opera\//.test(e),U=/Apple Computer/.test(navigator.vendor),j=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),q=/PhantomJS/.test(e),W=U&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),ee=/Android/.test(e),J=W||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),$=W||/Mac/.test(n),X=/\bCrOS\b/.test(e),G=/win/i.test(n),ae=P&&e.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(P=!1,b=!0);var ge=$&&(I||P&&(ae==null||ae<12.11)),he=i||f&&g>=9;function Ie(A){return new RegExp("(^|\\s)"+A+"(?:$|\\s)\\s*")}var re=function(A,y){var O=A.className,E=Ie(y).exec(O);if(E){var R=O.slice(E.index+E[0].length);A.className=O.slice(0,E.index)+(R?E[1]+R:"")}};function oe(A){for(var y=A.childNodes.length;y>0;--y)A.removeChild(A.firstChild);return A}function Se(A,y){return oe(A).appendChild(y)}function ye(A,y,O,E){var R=document.createElement(A);if(O&&(R.className=O),E&&(R.style.cssText=E),typeof y=="string")R.appendChild(document.createTextNode(y));else if(y)for(var H=0;H<y.length;++H)R.appendChild(y[H]);return R}function nt(A,y,O,E){var R=ye(A,y,O,E);return R.setAttribute("role","presentation"),R}var Ne;document.createRange?Ne=function(A,y,O,E){var R=document.createRange();return R.setEnd(E||A,O),R.setStart(A,y),R}:Ne=function(A,y,O){var E=document.body.createTextRange();try{E.moveToElementText(A.parentNode)}catch{return E}return E.collapse(!0),E.moveEnd("character",O),E.moveStart("character",y),E};function je(A,y){if(y.nodeType==3&&(y=y.parentNode),A.contains)return A.contains(y);do if(y.nodeType==11&&(y=y.host),y==A)return!0;while(y=y.parentNode)}function et(A){var y=A.ownerDocument||A,O;try{O=A.activeElement}catch{O=y.body||null}for(;O&&O.shadowRoot&&O.shadowRoot.activeElement;)O=O.shadowRoot.activeElement;return O}function Ue(A,y){var O=A.className;Ie(y).test(O)||(A.className+=(O?" ":"")+y)}function ke(A,y){for(var O=A.split(" "),E=0;E<O.length;E++)O[E]&&!Ie(O[E]).test(y)&&(y+=" "+O[E]);return y}var We=function(A){A.select()};W?We=function(A){A.selectionStart=0,A.selectionEnd=A.value.length}:f&&(We=function(A){try{A.select()}catch{}});function vt(A){return A.display.wrapper.ownerDocument}function Pt(A){return ut(A.display.wrapper)}function ut(A){return A.getRootNode?A.getRootNode():A.ownerDocument}function jt(A){return vt(A).defaultView}function Rt(A){var y=Array.prototype.slice.call(arguments,1);return function(){return A.apply(null,y)}}function Ke(A,y,O){y||(y={});for(var E in A)A.hasOwnProperty(E)&&(O!==!1||!y.hasOwnProperty(E))&&(y[E]=A[E]);return y}function we(A,y,O,E,R){y==null&&(y=A.search(/[^\s\u00a0]/),y==-1&&(y=A.length));for(var H=E||0,Ae=R||0;;){var _e=A.indexOf(" ",H);if(_e<0||_e>=y)return Ae+(y-H);Ae+=_e-H,Ae+=O-Ae%O,H=_e+1}}var Fe=function(){this.id=null,this.f=null,this.time=0,this.handler=Rt(this.onTimeout,this)};Fe.prototype.onTimeout=function(A){A.id=0,A.time<=+new Date?A.f():setTimeout(A.handler,A.time-+new Date)},Fe.prototype.set=function(A,y){this.f=y;var O=+new Date+A;(!this.id||O<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,A),this.time=O)};function tt(A,y){for(var O=0;O<A.length;++O)if(A[O]==y)return O;return-1}var mt=50,bt={toString:function(){return"CodeMirror.Pass"}},Lt={scroll:!1},Vt={origin:"*mouse"},rn={origin:"+move"};function Sn(A,y,O){for(var E=0,R=0;;){var H=A.indexOf(" ",E);H==-1&&(H=A.length);var Ae=H-E;if(H==A.length||R+Ae>=y)return E+Math.min(Ae,y-R);if(R+=H-E,R+=O-R%O,E=H+1,R>=y)return E}}var Ar=[""];function Bn(A){for(;Ar.length<=A;)Ar.push(ar(Ar)+" ");return Ar[A]}function ar(A){return A[A.length-1]}function Cr(A,y){for(var O=[],E=0;E<A.length;E++)O[E]=y(A[E],E);return O}function br(A,y,O){for(var E=0,R=O(y);E<A.length&&O(A[E])<=R;)E++;A.splice(E,0,y)}function _r(){}function Jr(A,y){var O;return Object.create?O=Object.create(A):(_r.prototype=A,O=new _r),y&&Ke(y,O),O}var wr=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function hi(A){return/\w/.test(A)||A>""&&(A.toUpperCase()!=A.toLowerCase()||wr.test(A))}function Ye(A,y){return y?y.source.indexOf("\\w")>-1&&hi(A)?!0:y.test(A):hi(A)}function de(A){for(var y in A)if(A.hasOwnProperty(y)&&A[y])return!1;return!0}var pe=/[\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 Je(A){return A.charCodeAt(0)>=768&&pe.test(A)}function kt(A,y,O){for(;(O<0?y>0:y<A.length)&&Je(A.charAt(y));)y+=O;return y}function Xt(A,y,O){for(var E=y>O?-1:1;;){if(y==O)return y;var R=(y+O)/2,H=E<0?Math.ceil(R):Math.floor(R);if(H==y)return A(H)?y:O;A(H)?O=H:y=H+E}}function it(A,y,O,E){if(!A)return E(y,O,"ltr",0);for(var R=!1,H=0;H<A.length;++H){var Ae=A[H];(Ae.from<O&&Ae.to>y||y==O&&Ae.to==y)&&(E(Math.max(Ae.from,y),Math.min(Ae.to,O),Ae.level==1?"rtl":"ltr",H),R=!0)}R||E(y,O,"ltr")}var Ut=null;function qe(A,y,O){var E;Ut=null;for(var R=0;R<A.length;++R){var H=A[R];if(H.from<y&&H.to>y)return R;H.to==y&&(H.from!=H.to&&O=="before"?E=R:Ut=R),H.from==y&&(H.from!=H.to&&O!="before"?E=R:Ut=R)}return E??Ut}var fe=function(){var A="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function O(Le){return Le<=247?A.charAt(Le):1424<=Le&&Le<=1524?"R":1536<=Le&&Le<=1785?y.charAt(Le-1536):1774<=Le&&Le<=2220?"r":8192<=Le&&Le<=8203?"w":Le==8204?"b":"L"}var E=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,R=/[stwN]/,H=/[LRr]/,Ae=/[Lb1n]/,_e=/[1n]/;function Be(Le,ht,xt){this.level=Le,this.from=ht,this.to=xt}return function(Le,ht){var xt=ht=="ltr"?"L":"R";if(Le.length==0||ht=="ltr"&&!E.test(Le))return!1;for(var Jt=Le.length,Qt=[],xn=0;xn<Jt;++xn)Qt.push(O(Le.charCodeAt(xn)));for(var Rn=0,Yn=xt;Rn<Jt;++Rn){var Xn=Qt[Rn];Xn=="m"?Qt[Rn]=Yn:Yn=Xn}for(var yr=0,or=xt;yr<Jt;++yr){var Tr=Qt[yr];Tr=="1"&&or=="r"?Qt[yr]="n":H.test(Tr)&&(or=Tr,Tr=="r"&&(Qt[yr]="R"))}for(var li=1,Fr=Qt[0];li<Jt-1;++li){var no=Qt[li];no=="+"&&Fr=="1"&&Qt[li+1]=="1"?Qt[li]="1":no==","&&Fr==Qt[li+1]&&(Fr=="1"||Fr=="n")&&(Qt[li]=Fr),Fr=no}for(var Io=0;Io<Jt;++Io){var js=Qt[Io];if(js==",")Qt[Io]="N";else if(js=="%"){var as=void 0;for(as=Io+1;as<Jt&&Qt[as]=="%";++as);for(var _s=Io&&Qt[Io-1]=="!"||as<Jt&&Qt[as]=="1"?"1":"N",Cs=Io;Cs<as;++Cs)Qt[Cs]=_s;Io=as-1}}for(var Bs=0,Gl=xt;Bs<Jt;++Bs){var zs=Qt[Bs];Gl=="L"&&zs=="1"?Qt[Bs]="L":H.test(zs)&&(Gl=zs)}for(var bs=0;bs<Jt;++bs)if(R.test(Qt[bs])){var da=void 0;for(da=bs+1;da<Jt&&R.test(Qt[da]);++da);for(var vi=(bs?Qt[bs-1]:xt)=="L",Zo=(da<Jt?Qt[da]:xt)=="L",ss=vi==Zo?vi?"L":"R":xt,hs=bs;hs<da;++hs)Qt[hs]=ss;bs=da-1}for(var Ba=[],Bl,Po=0;Po<Jt;)if(Ae.test(Qt[Po])){var xd=Po;for(++Po;Po<Jt&&Ae.test(Qt[Po]);++Po);Ba.push(new Be(0,xd,Po))}else{var Al=Po,EA=Ba.length,Wc=ht=="rtl"?1:0;for(++Po;Po<Jt&&Qt[Po]!="L";++Po);for(var cl=Al;cl<Po;)if(_e.test(Qt[cl])){Al<cl&&(Ba.splice(EA,0,new Be(1,Al,cl)),EA+=Wc);var dl=cl;for(++cl;cl<Po&&_e.test(Qt[cl]);++cl);Ba.splice(EA,0,new Be(2,dl,cl)),EA+=Wc,Al=cl}else++cl;Al<Po&&Ba.splice(EA,0,new Be(1,Al,Po))}return ht=="ltr"&&(Ba[0].level==1&&(Bl=Le.match(/^\s+/))&&(Ba[0].from=Bl[0].length,Ba.unshift(new Be(0,0,Bl[0].length))),ar(Ba).level==1&&(Bl=Le.match(/\s+$/))&&(ar(Ba).to-=Bl[0].length,Ba.push(new Be(0,Jt-Bl[0].length,Jt)))),ht=="rtl"?Ba.reverse():Ba}}();function xe(A,y){var O=A.order;return O==null&&(O=A.order=fe(A.text,y)),O}var p=[],Qe=function(A,y,O){if(A.addEventListener)A.addEventListener(y,O,!1);else if(A.attachEvent)A.attachEvent("on"+y,O);else{var E=A._handlers||(A._handlers={});E[y]=(E[y]||p).concat(O)}};function pt(A,y){return A._handlers&&A._handlers[y]||p}function ft(A,y,O){if(A.removeEventListener)A.removeEventListener(y,O,!1);else if(A.detachEvent)A.detachEvent("on"+y,O);else{var E=A._handlers,R=E&&E[y];if(R){var H=tt(R,O);H>-1&&(E[y]=R.slice(0,H).concat(R.slice(H+1)))}}}function Et(A,y){var O=pt(A,y);if(O.length)for(var E=Array.prototype.slice.call(arguments,2),R=0;R<O.length;++R)O[R].apply(null,E)}function Ct(A,y,O){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Et(A,O||y.type,A,y),En(y)||y.codemirrorIgnore}function nn(A){var y=A._handlers&&A._handlers.cursorActivity;if(y)for(var O=A.curOp.cursorActivityHandlers||(A.curOp.cursorActivityHandlers=[]),E=0;E<y.length;++E)tt(O,y[E])==-1&&O.push(y[E])}function Yt(A,y){return pt(A,y).length>0}function Gt(A){A.prototype.on=function(y,O){Qe(this,y,O)},A.prototype.off=function(y,O){ft(this,y,O)}}function wt(A){A.preventDefault?A.preventDefault():A.returnValue=!1}function Tn(A){A.stopPropagation?A.stopPropagation():A.cancelBubble=!0}function En(A){return A.defaultPrevented!=null?A.defaultPrevented:A.returnValue==!1}function sr(A){wt(A),Tn(A)}function Pr(A){return A.target||A.srcElement}function an(A){var y=A.which;return y==null&&(A.button&1?y=1:A.button&2?y=3:A.button&4&&(y=2)),$&&A.ctrlKey&&y==1&&(y=3),y}var Wn=function(){if(f&&g<9)return!1;var A=ye("div");return"draggable"in A||"dragDrop"in A}(),ir;function zr(A){if(ir==null){var y=ye("span","");Se(A,ye("span",[y,document.createTextNode("x")])),A.firstChild.offsetHeight!=0&&(ir=y.offsetWidth<=1&&y.offsetHeight>2&&!(f&&g<8))}var O=ir?ye("span",""):ye("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return O.setAttribute("cm-text",""),O}var fr;function hr(A){if(fr!=null)return fr;var y=Se(A,document.createTextNode("AخA")),O=Ne(y,0,1).getBoundingClientRect(),E=Ne(y,1,2).getBoundingClientRect();return oe(A),!O||O.left==O.right?!1:fr=E.right-O.right<3}var zn=`
|
||
|
||
b`.split(/\n/).length!=3?function(A){for(var y=0,O=[],E=A.length;y<=E;){var R=A.indexOf(`
|
||
`,y);R==-1&&(R=A.length);var H=A.slice(y,A.charAt(R-1)=="\r"?R-1:R),Ae=H.indexOf("\r");Ae!=-1?(O.push(H.slice(0,Ae)),y+=Ae+1):(O.push(H),y=R+1)}return O}:function(A){return A.split(/\r\n?|\n/)},Pi=window.getSelection?function(A){try{return A.selectionStart!=A.selectionEnd}catch{return!1}}:function(A){var y;try{y=A.ownerDocument.selection.createRange()}catch{}return!y||y.parentElement()!=A?!1:y.compareEndPoints("StartToEnd",y)!=0},po=function(){var A=ye("div");return"oncopy"in A?!0:(A.setAttribute("oncopy","return;"),typeof A.oncopy=="function")}(),ri=null;function Xr(A){if(ri!=null)return ri;var y=Se(A,ye("span","x")),O=y.getBoundingClientRect(),E=Ne(y,0,1).getBoundingClientRect();return ri=Math.abs(O.left-E.left)>1}var ii={},mo={};function Mi(A,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),ii[A]=y}function ka(A,y){mo[A]=y}function ns(A){if(typeof A=="string"&&mo.hasOwnProperty(A))A=mo[A];else if(A&&typeof A.name=="string"&&mo.hasOwnProperty(A.name)){var y=mo[A.name];typeof y=="string"&&(y={name:y}),A=Jr(y,A),A.name=y.name}else{if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(A))return ns("application/xml");if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(A))return ns("application/json")}return typeof A=="string"?{name:A}:A||{name:"null"}}function wo(A,y){y=ns(y);var O=ii[y.name];if(!O)return wo(A,"text/plain");var E=O(A,y);if(Ua.hasOwnProperty(y.name)){var R=Ua[y.name];for(var H in R)R.hasOwnProperty(H)&&(E.hasOwnProperty(H)&&(E["_"+H]=E[H]),E[H]=R[H])}if(E.name=y.name,y.helperType&&(E.helperType=y.helperType),y.modeProps)for(var Ae in y.modeProps)E[Ae]=y.modeProps[Ae];return E}var Ua={};function Ya(A,y){var O=Ua.hasOwnProperty(A)?Ua[A]:Ua[A]={};Ke(y,O)}function Vi(A,y){if(y===!0)return y;if(A.copyState)return A.copyState(y);var O={};for(var E in y){var R=y[E];R instanceof Array&&(R=R.concat([])),O[E]=R}return O}function Rl(A,y){for(var O;A.innerMode&&(O=A.innerMode(y),!(!O||O.mode==A));)y=O.state,A=O.mode;return O||{mode:A,state:y}}function Ps(A,y,O){return A.startState?A.startState(y,O):!0}var ki=function(A,y,O){this.pos=this.start=0,this.string=A,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=O};ki.prototype.eol=function(){return this.pos>=this.string.length},ki.prototype.sol=function(){return this.pos==this.lineStart},ki.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ki.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ki.prototype.eat=function(A){var y=this.string.charAt(this.pos),O;if(typeof A=="string"?O=y==A:O=y&&(A.test?A.test(y):A(y)),O)return++this.pos,y},ki.prototype.eatWhile=function(A){for(var y=this.pos;this.eat(A););return this.pos>y},ki.prototype.eatSpace=function(){for(var A=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>A},ki.prototype.skipToEnd=function(){this.pos=this.string.length},ki.prototype.skipTo=function(A){var y=this.string.indexOf(A,this.pos);if(y>-1)return this.pos=y,!0},ki.prototype.backUp=function(A){this.pos-=A},ki.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=we(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},ki.prototype.indentation=function(){return we(this.string,null,this.tabSize)-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},ki.prototype.match=function(A,y,O){if(typeof A=="string"){var E=function(Ae){return O?Ae.toLowerCase():Ae},R=this.string.substr(this.pos,A.length);if(E(R)==E(A))return y!==!1&&(this.pos+=A.length),!0}else{var H=this.string.slice(this.pos).match(A);return H&&H.index>0?null:(H&&y!==!1&&(this.pos+=H[0].length),H)}},ki.prototype.current=function(){return this.string.slice(this.start,this.pos)},ki.prototype.hideFirstChars=function(A,y){this.lineStart+=A;try{return y()}finally{this.lineStart-=A}},ki.prototype.lookAhead=function(A){var y=this.lineOracle;return y&&y.lookAhead(A)},ki.prototype.baseToken=function(){var A=this.lineOracle;return A&&A.baseToken(this.pos)};function Mr(A,y){if(y-=A.first,y<0||y>=A.size)throw new Error("There is no line "+(y+A.first)+" in the document.");for(var O=A;!O.lines;)for(var E=0;;++E){var R=O.children[E],H=R.chunkSize();if(y<H){O=R;break}y-=H}return O.lines[y]}function ms(A,y,O){var E=[],R=y.line;return A.iter(y.line,O.line+1,function(H){var Ae=H.text;R==O.line&&(Ae=Ae.slice(0,O.ch)),R==y.line&&(Ae=Ae.slice(y.ch)),E.push(Ae),++R}),E}function oa(A,y,O){var E=[];return A.iter(y,O,function(R){E.push(R.text)}),E}function ba(A,y){var O=y-A.height;if(O)for(var E=A;E;E=E.parent)E.height+=O}function Ge(A){if(A.parent==null)return null;for(var y=A.parent,O=tt(y.lines,A),E=y.parent;E;y=E,E=E.parent)for(var R=0;E.children[R]!=y;++R)O+=E.children[R].chunkSize();return O+y.first}function _t(A,y){var O=A.first;e:do{for(var E=0;E<A.children.length;++E){var R=A.children[E],H=R.height;if(y<H){A=R;continue e}y-=H,O+=R.chunkSize()}return O}while(!A.lines);for(var Ae=0;Ae<A.lines.length;++Ae){var _e=A.lines[Ae],Be=_e.height;if(y<Be)break;y-=Be}return O+Ae}function cn(A,y){return y>=A.first&&y<A.first+A.size}function jn(A,y){return String(A.lineNumberFormatter(y+A.firstLineNumber))}function An(A,y,O){if(O===void 0&&(O=null),!(this instanceof An))return new An(A,y,O);this.line=A,this.ch=y,this.sticky=O}function Qn(A,y){return A.line-y.line||A.ch-y.ch}function _i(A,y){return A.sticky==y.sticky&&Qn(A,y)==0}function Ki(A){return An(A.line,A.ch)}function Xi(A,y){return Qn(A,y)<0?y:A}function aa(A,y){return Qn(A,y)<0?A:y}function Mu(A,y){return Math.max(A.first,Math.min(y,A.first+A.size-1))}function Hr(A,y){if(y.line<A.first)return An(A.first,0);var O=A.first+A.size-1;return y.line>O?An(O,Mr(A,O).text.length):ci(y,Mr(A,y.line).text.length)}function ci(A,y){var O=A.ch;return O==null||O>y?An(A.line,y):O<0?An(A.line,0):A}function rs(A,y){for(var O=[],E=0;E<y.length;E++)O[E]=Hr(A,y[E]);return O}var Ai=function(A,y){this.state=A,this.lookAhead=y},As=function(A,y,O,E){this.state=y,this.doc=A,this.line=O,this.maxLookAhead=E||0,this.baseTokens=null,this.baseTokenPos=1};As.prototype.lookAhead=function(A){var y=this.doc.getLine(this.line+A);return y!=null&&A>this.maxLookAhead&&(this.maxLookAhead=A),y},As.prototype.baseToken=function(A){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=A;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-A}},As.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},As.fromSaved=function(A,y,O){return y instanceof Ai?new As(A,Vi(A.mode,y.state),O,y.lookAhead):new As(A,Vi(A.mode,y),O)},As.prototype.save=function(A){var y=A!==!1?Vi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ai(y,this.maxLookAhead):y};function Ju(A,y,O,E){var R=[A.state.modeGen],H={};Dl(A,y.text,A.doc.mode,O,function(Le,ht){return R.push(Le,ht)},H,E);for(var Ae=O.state,_e=function(Le){O.baseTokens=R;var ht=A.state.overlays[Le],xt=1,Jt=0;O.state=!0,Dl(A,y.text,ht.mode,O,function(Qt,xn){for(var Rn=xt;Jt<Qt;){var Yn=R[xt];Yn>Qt&&R.splice(xt,1,Qt,R[xt+1],Yn),xt+=2,Jt=Math.min(Qt,Yn)}if(xn)if(ht.opaque)R.splice(Rn,xt-Rn,Qt,"overlay "+xn),xt=Rn+2;else for(;Rn<xt;Rn+=2){var Xn=R[Rn+1];R[Rn+1]=(Xn?Xn+" ":"")+"overlay "+xn}},H),O.state=Ae,O.baseTokens=null,O.baseTokenPos=1},Be=0;Be<A.state.overlays.length;++Be)_e(Be);return{styles:R,classes:H.bgClass||H.textClass?H:null}}function sa(A,y,O){if(!y.styles||y.styles[0]!=A.state.modeGen){var E=kr(A,Ge(y)),R=y.text.length>A.options.maxHighlightLength&&Vi(A.doc.mode,E.state),H=Ju(A,y,E);R&&(E.state=R),y.stateAfter=E.save(!R),y.styles=H.styles,H.classes?y.styleClasses=H.classes:y.styleClasses&&(y.styleClasses=null),O===A.doc.highlightFrontier&&(A.doc.modeFrontier=Math.max(A.doc.modeFrontier,++A.doc.highlightFrontier))}return y.styles}function kr(A,y,O){var E=A.doc,R=A.display;if(!E.mode.startState)return new As(E,!0,y);var H=ea(A,y,O),Ae=H>E.first&&Mr(E,H-1).stateAfter,_e=Ae?As.fromSaved(E,Ae,H):new As(E,Ps(E.mode),H);return E.iter(H,y,function(Be){Oi(A,Be.text,_e);var Le=_e.line;Be.stateAfter=Le==y-1||Le%5==0||Le>=R.viewFrom&&Le<R.viewTo?_e.save():null,_e.nextLine()}),O&&(E.modeFrontier=_e.line),_e}function Oi(A,y,O,E){var R=A.doc.mode,H=new ki(y,A.options.tabSize,O);for(H.start=H.pos=E||0,y==""&&Qs(R,O.state);!H.eol();)Ta(R,H,O.state),H.start=H.pos}function Qs(A,y){if(A.blankLine)return A.blankLine(y);if(A.innerMode){var O=Rl(A,y);if(O.mode.blankLine)return O.mode.blankLine(O.state)}}function Ta(A,y,O,E){for(var R=0;R<10;R++){E&&(E[0]=Rl(A,O).mode);var H=A.token(y,O);if(y.pos>y.start)return H}throw new Error("Mode "+A.name+" failed to advance stream.")}var Mo=function(A,y,O){this.start=A.start,this.end=A.pos,this.string=A.current(),this.type=y||null,this.state=O};function ja(A,y,O,E){var R=A.doc,H=R.mode,Ae;y=Hr(R,y);var _e=Mr(R,y.line),Be=kr(A,y.line,O),Le=new ki(_e.text,A.options.tabSize,Be),ht;for(E&&(ht=[]);(E||Le.pos<y.ch)&&!Le.eol();)Le.start=Le.pos,Ae=Ta(H,Le,Be.state),E&&ht.push(new Mo(Le,Ae,Vi(R.mode,Be.state)));return E?ht:new Mo(Le,Ae,Be.state)}function au(A,y){if(A)for(;;){var O=A.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!O)break;A=A.slice(0,O.index)+A.slice(O.index+O[0].length);var E=O[1]?"bgClass":"textClass";y[E]==null?y[E]=O[2]:new RegExp("(?:^|\\s)"+O[2]+"(?:$|\\s)").test(y[E])||(y[E]+=" "+O[2])}return A}function Dl(A,y,O,E,R,H,Ae){var _e=O.flattenSpans;_e==null&&(_e=A.options.flattenSpans);var Be=0,Le=null,ht=new ki(y,A.options.tabSize,E),xt,Jt=A.options.addModeClass&&[null];for(y==""&&au(Qs(O,E.state),H);!ht.eol();){if(ht.pos>A.options.maxHighlightLength?(_e=!1,Ae&&Oi(A,y,E,ht.pos),ht.pos=y.length,xt=null):xt=au(Ta(O,ht,E.state,Jt),H),Jt){var Qt=Jt[0].name;Qt&&(xt="m-"+(xt?Qt+" "+xt:Qt))}if(!_e||Le!=xt){for(;Be<ht.start;)Be=Math.min(ht.start,Be+5e3),R(Be,Le);Le=xt}ht.start=ht.pos}for(;Be<ht.pos;){var xn=Math.min(ht.pos,Be+5e3);R(xn,Le),Be=xn}}function ea(A,y,O){for(var E,R,H=A.doc,Ae=O?-1:y-(A.doc.mode.innerMode?1e3:100),_e=y;_e>Ae;--_e){if(_e<=H.first)return H.first;var Be=Mr(H,_e-1),Le=Be.stateAfter;if(Le&&(!O||_e+(Le instanceof Ai?Le.lookAhead:0)<=H.modeFrontier))return _e;var ht=we(Be.text,null,A.options.tabSize);(R==null||E>ht)&&(R=_e-1,E=ht)}return R}function $a(A,y){if(A.modeFrontier=Math.min(A.modeFrontier,y),!(A.highlightFrontier<y-10)){for(var O=A.first,E=y-1;E>O;E--){var R=Mr(A,E).stateAfter;if(R&&(!(R instanceof Ai)||E+R.lookAhead<y)){O=E+1;break}}A.highlightFrontier=Math.min(A.highlightFrontier,O)}}var co=!1,pa=!1;function xa(){co=!0}function qs(){pa=!0}function Pa(A,y,O){this.marker=A,this.from=y,this.to=O}function Cl(A,y){if(A)for(var O=0;O<A.length;++O){var E=A[O];if(E.marker==y)return E}}function eA(A,y){for(var O,E=0;E<A.length;++E)A[E]!=y&&(O||(O=[])).push(A[E]);return O}function Ji(A,y,O){var E=O&&window.WeakSet&&(O.markedSpans||(O.markedSpans=new WeakSet));E&&A.markedSpans&&E.has(A.markedSpans)?A.markedSpans.push(y):(A.markedSpans=A.markedSpans?A.markedSpans.concat([y]):[y],E&&E.add(A.markedSpans)),y.marker.attachLine(A)}function $l(A,y,O){var E;if(A)for(var R=0;R<A.length;++R){var H=A[R],Ae=H.marker,_e=H.from==null||(Ae.inclusiveLeft?H.from<=y:H.from<y);if(_e||H.from==y&&Ae.type=="bookmark"&&(!O||!H.marker.insertLeft)){var Be=H.to==null||(Ae.inclusiveRight?H.to>=y:H.to>y);(E||(E=[])).push(new Pa(Ae,H.from,Be?null:H.to))}}return E}function zi(A,y,O){var E;if(A)for(var R=0;R<A.length;++R){var H=A[R],Ae=H.marker,_e=H.to==null||(Ae.inclusiveRight?H.to>=y:H.to>y);if(_e||H.from==y&&Ae.type=="bookmark"&&(!O||H.marker.insertLeft)){var Be=H.from==null||(Ae.inclusiveLeft?H.from<=y:H.from<y);(E||(E=[])).push(new Pa(Ae,Be?null:H.from-y,H.to==null?null:H.to-y))}}return E}function Zr(A,y){if(y.full)return null;var O=cn(A,y.from.line)&&Mr(A,y.from.line).markedSpans,E=cn(A,y.to.line)&&Mr(A,y.to.line).markedSpans;if(!O&&!E)return null;var R=y.from.ch,H=y.to.ch,Ae=Qn(y.from,y.to)==0,_e=$l(O,R,Ae),Be=zi(E,H,Ae),Le=y.text.length==1,ht=ar(y.text).length+(Le?R:0);if(_e)for(var xt=0;xt<_e.length;++xt){var Jt=_e[xt];if(Jt.to==null){var Qt=Cl(Be,Jt.marker);Qt?Le&&(Jt.to=Qt.to==null?null:Qt.to+ht):Jt.to=R}}if(Be)for(var xn=0;xn<Be.length;++xn){var Rn=Be[xn];if(Rn.to!=null&&(Rn.to+=ht),Rn.from==null){var Yn=Cl(_e,Rn.marker);Yn||(Rn.from=ht,Le&&(_e||(_e=[])).push(Rn))}else Rn.from+=ht,Le&&(_e||(_e=[])).push(Rn)}_e&&(_e=Vl(_e)),Be&&Be!=_e&&(Be=Vl(Be));var Xn=[_e];if(!Le){var yr=y.text.length-2,or;if(yr>0&&_e)for(var Tr=0;Tr<_e.length;++Tr)_e[Tr].to==null&&(or||(or=[])).push(new Pa(_e[Tr].marker,null,null));for(var li=0;li<yr;++li)Xn.push(or);Xn.push(Be)}return Xn}function Vl(A){for(var y=0;y<A.length;++y){var O=A[y];O.from!=null&&O.from==O.to&&O.marker.clearWhenEmpty!==!1&&A.splice(y--,1)}return A.length?A:null}function Wi(A,y,O){var E=null;if(A.iter(y.line,O.line+1,function(Qt){if(Qt.markedSpans)for(var xn=0;xn<Qt.markedSpans.length;++xn){var Rn=Qt.markedSpans[xn].marker;Rn.readOnly&&(!E||tt(E,Rn)==-1)&&(E||(E=[])).push(Rn)}}),!E)return null;for(var R=[{from:y,to:O}],H=0;H<E.length;++H)for(var Ae=E[H],_e=Ae.find(0),Be=0;Be<R.length;++Be){var Le=R[Be];if(!(Qn(Le.to,_e.from)<0||Qn(Le.from,_e.to)>0)){var ht=[Be,1],xt=Qn(Le.from,_e.from),Jt=Qn(Le.to,_e.to);(xt<0||!Ae.inclusiveLeft&&!xt)&&ht.push({from:Le.from,to:_e.from}),(Jt>0||!Ae.inclusiveRight&&!Jt)&&ht.push({from:_e.to,to:Le.to}),R.splice.apply(R,ht),Be+=ht.length-3}}return R}function lo(A){var y=A.markedSpans;if(y){for(var O=0;O<y.length;++O)y[O].marker.detachLine(A);A.markedSpans=null}}function Di(A,y){if(y){for(var O=0;O<y.length;++O)y[O].marker.attachLine(A);A.markedSpans=y}}function te(A){return A.inclusiveLeft?-1:0}function Ee(A){return A.inclusiveRight?1:0}function ot(A,y){var O=A.lines.length-y.lines.length;if(O!=0)return O;var E=A.find(),R=y.find(),H=Qn(E.from,R.from)||te(A)-te(y);if(H)return-H;var Ae=Qn(E.to,R.to)||Ee(A)-Ee(y);return Ae||y.id-A.id}function $t(A,y){var O=pa&&A.markedSpans,E;if(O)for(var R=void 0,H=0;H<O.length;++H)R=O[H],R.marker.collapsed&&(y?R.from:R.to)==null&&(!E||ot(E,R.marker)<0)&&(E=R.marker);return E}function Sr(A){return $t(A,!0)}function Nn(A){return $t(A,!1)}function si(A,y){var O=pa&&A.markedSpans,E;if(O)for(var R=0;R<O.length;++R){var H=O[R];H.marker.collapsed&&(H.from==null||H.from<y)&&(H.to==null||H.to>y)&&(!E||ot(E,H.marker)<0)&&(E=H.marker)}return E}function fi(A,y,O,E,R){var H=Mr(A,y),Ae=pa&&H.markedSpans;if(Ae)for(var _e=0;_e<Ae.length;++_e){var Be=Ae[_e];if(Be.marker.collapsed){var Le=Be.marker.find(0),ht=Qn(Le.from,O)||te(Be.marker)-te(R),xt=Qn(Le.to,E)||Ee(Be.marker)-Ee(R);if(!(ht>=0&&xt<=0||ht<=0&&xt>=0)&&(ht<=0&&(Be.marker.inclusiveRight&&R.inclusiveLeft?Qn(Le.to,O)>=0:Qn(Le.to,O)>0)||ht>=0&&(Be.marker.inclusiveRight&&R.inclusiveLeft?Qn(Le.from,E)<=0:Qn(Le.from,E)<0)))return!0}}}function pr(A){for(var y;y=Sr(A);)A=y.find(-1,!0).line;return A}function Er(A){for(var y;y=Nn(A);)A=y.find(1,!0).line;return A}function Ci(A){for(var y,O;y=Nn(A);)A=y.find(1,!0).line,(O||(O=[])).push(A);return O}function So(A,y){var O=Mr(A,y),E=pr(O);return O==E?y:Ge(E)}function Ri(A,y){if(y>A.lastLine())return y;var O=Mr(A,y),E;if(!Nr(A,O))return y;for(;E=Nn(O);)O=E.find(1,!0).line;return Ge(O)+1}function Nr(A,y){var O=pa&&y.markedSpans;if(O){for(var E=void 0,R=0;R<O.length;++R)if(E=O[R],!!E.marker.collapsed){if(E.from==null)return!0;if(!E.marker.widgetNode&&E.from==0&&E.marker.inclusiveLeft&&eo(A,y,E))return!0}}}function eo(A,y,O){if(O.to==null){var E=O.marker.find(1,!0);return eo(A,E.line,Cl(E.line.markedSpans,O.marker))}if(O.marker.inclusiveRight&&O.to==y.text.length)return!0;for(var R=void 0,H=0;H<y.markedSpans.length;++H)if(R=y.markedSpans[H],R.marker.collapsed&&!R.marker.widgetNode&&R.from==O.to&&(R.to==null||R.to!=O.from)&&(R.marker.inclusiveLeft||O.marker.inclusiveRight)&&eo(A,y,R))return!0}function to(A){A=pr(A);for(var y=0,O=A.parent,E=0;E<O.lines.length;++E){var R=O.lines[E];if(R==A)break;y+=R.height}for(var H=O.parent;H;O=H,H=O.parent)for(var Ae=0;Ae<H.children.length;++Ae){var _e=H.children[Ae];if(_e==O)break;y+=_e.height}return y}function la(A){if(A.height==0)return 0;for(var y=A.text.length,O,E=A;O=Sr(E);){var R=O.find(0,!0);E=R.from.line,y+=R.from.ch-R.to.ch}for(E=A;O=Nn(E);){var H=O.find(0,!0);y-=E.text.length-H.from.ch,E=H.to.line,y+=E.text.length-H.to.ch}return y}function gs(A){var y=A.display,O=A.doc;y.maxLine=Mr(O,O.first),y.maxLineLength=la(y.maxLine),y.maxLineChanged=!0,O.iter(function(E){var R=la(E);R>y.maxLineLength&&(y.maxLineLength=R,y.maxLine=E)})}var Ks=function(A,y,O){this.text=A,Di(this,y),this.height=O?O(this):1};Ks.prototype.lineNo=function(){return Ge(this)},Gt(Ks);function su(A,y,O,E){A.text=y,A.stateAfter&&(A.stateAfter=null),A.styles&&(A.styles=null),A.order!=null&&(A.order=null),lo(A),Di(A,O);var R=E?E(A):1;R!=A.height&&ba(A,R)}function Va(A){A.parent=null,lo(A)}var ac={},ws={};function rl(A,y){if(!A||/^\s*$/.test(A))return null;var O=y.addModeClass?ws:ac;return O[A]||(O[A]=A.replace(/\S+/g,"cm-$&"))}function Xc(A,y){var O=nt("span",null,null,b?"padding-right: .1px":null),E={pre:nt("pre",[O],"CodeMirror-line"),content:O,col:0,pos:0,cm:A,trailingSpace:!1,splitSpaces:A.getOption("lineWrapping")};y.measure={};for(var R=0;R<=(y.rest?y.rest.length:0);R++){var H=R?y.rest[R-1]:y.line,Ae=void 0;E.pos=0,E.addToken=Eu,hr(A.display.measure)&&(Ae=xe(H,A.doc.direction))&&(E.addToken=wa(E.addToken,Ae)),E.map=[];var _e=y!=A.display.externalMeasured&&Ge(H);Jc(H,E,sa(A,H,_e)),H.styleClasses&&(H.styleClasses.bgClass&&(E.bgClass=ke(H.styleClasses.bgClass,E.bgClass||"")),H.styleClasses.textClass&&(E.textClass=ke(H.styleClasses.textClass,E.textClass||""))),E.map.length==0&&E.map.push(0,0,E.content.appendChild(zr(A.display.measure))),R==0?(y.measure.map=E.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(E.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(b){var Be=E.content.lastChild;(/\bcm-tab\b/.test(Be.className)||Be.querySelector&&Be.querySelector(".cm-tab"))&&(E.content.className="cm-tab-wrap-hack")}return Et(A,"renderLine",A,y.line,E.pre),E.pre.className&&(E.textClass=ke(E.pre.className,E.textClass||"")),E}function Su(A){var y=ye("span","•","cm-invalidchar");return y.title="\\u"+A.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Eu(A,y,O,E,R,H,Ae){if(y){var _e=A.splitSpaces?Ah(y,A.trailingSpace):y,Be=A.cm.state.specialChars,Le=!1,ht;if(!Be.test(y))A.col+=y.length,ht=document.createTextNode(_e),A.map.push(A.pos,A.pos+y.length,ht),f&&g<9&&(Le=!0),A.pos+=y.length;else{ht=document.createDocumentFragment();for(var xt=0;;){Be.lastIndex=xt;var Jt=Be.exec(y),Qt=Jt?Jt.index-xt:y.length-xt;if(Qt){var xn=document.createTextNode(_e.slice(xt,xt+Qt));f&&g<9?ht.appendChild(ye("span",[xn])):ht.appendChild(xn),A.map.push(A.pos,A.pos+Qt,xn),A.col+=Qt,A.pos+=Qt}if(!Jt)break;xt+=Qt+1;var Rn=void 0;if(Jt[0]==" "){var Yn=A.cm.options.tabSize,Xn=Yn-A.col%Yn;Rn=ht.appendChild(ye("span",Bn(Xn),"cm-tab")),Rn.setAttribute("role","presentation"),Rn.setAttribute("cm-text"," "),A.col+=Xn}else Jt[0]=="\r"||Jt[0]==`
|
||
`?(Rn=ht.appendChild(ye("span",Jt[0]=="\r"?"␍":"","cm-invalidchar")),Rn.setAttribute("cm-text",Jt[0]),A.col+=1):(Rn=A.cm.options.specialCharPlaceholder(Jt[0]),Rn.setAttribute("cm-text",Jt[0]),f&&g<9?ht.appendChild(ye("span",[Rn])):ht.appendChild(Rn),A.col+=1);A.map.push(A.pos,A.pos+1,Rn),A.pos++}}if(A.trailingSpace=_e.charCodeAt(y.length-1)==32,O||E||R||Le||H||Ae){var yr=O||"";E&&(yr+=E),R&&(yr+=R);var or=ye("span",[ht],yr,H);if(Ae)for(var Tr in Ae)Ae.hasOwnProperty(Tr)&&Tr!="style"&&Tr!="class"&&or.setAttribute(Tr,Ae[Tr]);return A.content.appendChild(or)}A.content.appendChild(ht)}}function Ah(A,y){if(A.length>1&&!/ /.test(A))return A;for(var O=y,E="",R=0;R<A.length;R++){var H=A.charAt(R);H==" "&&O&&(R==A.length-1||A.charCodeAt(R+1)==32)&&(H=" "),E+=H,O=H==" "}return E}function wa(A,y){return function(O,E,R,H,Ae,_e,Be){R=R?R+" cm-force-border":"cm-force-border";for(var Le=O.pos,ht=Le+E.length;;){for(var xt=void 0,Jt=0;Jt<y.length&&(xt=y[Jt],!(xt.to>Le&&xt.from<=Le));Jt++);if(xt.to>=ht)return A(O,E,R,H,Ae,_e,Be);A(O,E.slice(0,xt.to-Le),R,H,null,_e,Be),H=null,E=E.slice(xt.to-Le),Le=xt.to}}}function Ou(A,y,O,E){var R=!E&&O.widgetNode;R&&A.map.push(A.pos,A.pos+y,R),!E&&A.cm.display.input.needsContentAttribute&&(R||(R=A.content.appendChild(document.createElement("span"))),R.setAttribute("cm-marker",O.id)),R&&(A.cm.display.input.setUneditable(R),A.content.appendChild(R)),A.pos+=y,A.trailingSpace=!1}function Jc(A,y,O){var E=A.markedSpans,R=A.text,H=0;if(!E){for(var Ae=1;Ae<O.length;Ae+=2)y.addToken(y,R.slice(H,H=O[Ae]),rl(O[Ae+1],y.cm.options));return}for(var _e=R.length,Be=0,Le=1,ht="",xt,Jt,Qt=0,xn,Rn,Yn,Xn,yr;;){if(Qt==Be){xn=Rn=Yn=Jt="",yr=null,Xn=null,Qt=1/0;for(var or=[],Tr=void 0,li=0;li<E.length;++li){var Fr=E[li],no=Fr.marker;if(no.type=="bookmark"&&Fr.from==Be&&no.widgetNode)or.push(no);else if(Fr.from<=Be&&(Fr.to==null||Fr.to>Be||no.collapsed&&Fr.to==Be&&Fr.from==Be)){if(Fr.to!=null&&Fr.to!=Be&&Qt>Fr.to&&(Qt=Fr.to,Rn=""),no.className&&(xn+=" "+no.className),no.css&&(Jt=(Jt?Jt+";":"")+no.css),no.startStyle&&Fr.from==Be&&(Yn+=" "+no.startStyle),no.endStyle&&Fr.to==Qt&&(Tr||(Tr=[])).push(no.endStyle,Fr.to),no.title&&((yr||(yr={})).title=no.title),no.attributes)for(var Io in no.attributes)(yr||(yr={}))[Io]=no.attributes[Io];no.collapsed&&(!Xn||ot(Xn.marker,no)<0)&&(Xn=Fr)}else Fr.from>Be&&Qt>Fr.from&&(Qt=Fr.from)}if(Tr)for(var js=0;js<Tr.length;js+=2)Tr[js+1]==Qt&&(Rn+=" "+Tr[js]);if(!Xn||Xn.from==Be)for(var as=0;as<or.length;++as)Ou(y,0,or[as]);if(Xn&&(Xn.from||0)==Be){if(Ou(y,(Xn.to==null?_e+1:Xn.to)-Be,Xn.marker,Xn.from==null),Xn.to==null)return;Xn.to==Be&&(Xn=!1)}}if(Be>=_e)break;for(var _s=Math.min(_e,Qt);;){if(ht){var Cs=Be+ht.length;if(!Xn){var Bs=Cs>_s?ht.slice(0,_s-Be):ht;y.addToken(y,Bs,xt?xt+xn:xn,Yn,Be+Bs.length==Qt?Rn:"",Jt,yr)}if(Cs>=_s){ht=ht.slice(_s-Be),Be=_s;break}Be=Cs,Yn=""}ht=R.slice(H,H=O[Le++]),xt=rl(O[Le++],y.cm.options)}}}function Hf(A,y,O){this.line=y,this.rest=Ci(y),this.size=this.rest?Ge(ar(this.rest))-O+1:1,this.node=this.text=null,this.hidden=Nr(A,y)}function tA(A,y,O){for(var E=[],R,H=y;H<O;H=R){var Ae=new Hf(A.doc,Mr(A.doc,H),H);R=H+Ae.size,E.push(Ae)}return E}var Dd=null;function Bc(A){Dd?Dd.ops.push(A):A.ownsGroup=Dd={ops:[A],delayedCallbacks:[]}}function Zf(A){var y=A.delayedCallbacks,O=0;do{for(;O<y.length;O++)y[O].call(null);for(var E=0;E<A.ops.length;E++){var R=A.ops[E];if(R.cursorActivityHandlers)for(;R.cursorActivityCalled<R.cursorActivityHandlers.length;)R.cursorActivityHandlers[R.cursorActivityCalled++].call(null,R.cm)}}while(O<y.length)}function gf(A,y){var O=A.ownsGroup;if(O)try{Zf(O)}finally{Dd=null,y(O)}}var sc=null;function Ha(A,y){var O=pt(A,y);if(O.length){var E=Array.prototype.slice.call(arguments,2),R;Dd?R=Dd.delayedCallbacks:sc?R=sc:(R=sc=[],setTimeout(ch,0));for(var H=function(_e){R.push(function(){return O[_e].apply(null,E)})},Ae=0;Ae<O.length;++Ae)H(Ae)}}function ch(){var A=sc;sc=null;for(var y=0;y<A.length;++y)A[y]()}function Fh(A,y,O,E){for(var R=0;R<y.changes.length;R++){var H=y.changes[R];H=="text"?lc(A,y):H=="gutter"?hh(A,y,O,E):H=="class"?dh(A,y):H=="widget"&&nd(A,y,E)}y.changes=null}function ed(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),f&&g<8&&(A.node.style.zIndex=2)),A.node}function Uh(A,y){var O=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(O&&(O+=" CodeMirror-linebackground"),y.background)O?y.background.className=O:(y.background.parentNode.removeChild(y.background),y.background=null);else if(O){var E=ed(y);y.background=E.insertBefore(ye("div",null,O),E.firstChild),A.display.input.setUneditable(y.background)}}function td(A,y){var O=A.display.externalMeasured;return O&&O.line==y.line?(A.display.externalMeasured=null,y.measure=O.measure,O.built):Xc(A,y)}function lc(A,y){var O=y.text.className,E=td(A,y);y.text==y.node&&(y.node=E.pre),y.text.parentNode.replaceChild(E.pre,y.text),y.text=E.pre,E.bgClass!=y.bgClass||E.textClass!=y.textClass?(y.bgClass=E.bgClass,y.textClass=E.textClass,dh(A,y)):O&&(y.text.className=O)}function dh(A,y){Uh(A,y),y.line.wrapClass?ed(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var O=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=O||""}function hh(A,y,O,E){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var R=ed(y);y.gutterBackground=ye("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(A.options.fixedGutter?E.fixedPos:-E.gutterTotalWidth)+"px; width: "+E.gutterTotalWidth+"px"),A.display.input.setUneditable(y.gutterBackground),R.insertBefore(y.gutterBackground,y.text)}var H=y.line.gutterMarkers;if(A.options.lineNumbers||H){var Ae=ed(y),_e=y.gutter=ye("div",null,"CodeMirror-gutter-wrapper","left: "+(A.options.fixedGutter?E.fixedPos:-E.gutterTotalWidth)+"px");if(_e.setAttribute("aria-hidden","true"),A.display.input.setUneditable(_e),Ae.insertBefore(_e,y.text),y.line.gutterClass&&(_e.className+=" "+y.line.gutterClass),A.options.lineNumbers&&(!H||!H["CodeMirror-linenumbers"])&&(y.lineNumber=_e.appendChild(ye("div",jn(A.options,O),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+E.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+A.display.lineNumInnerWidth+"px"))),H)for(var Be=0;Be<A.display.gutterSpecs.length;++Be){var Le=A.display.gutterSpecs[Be].className,ht=H.hasOwnProperty(Le)&&H[Le];ht&&_e.appendChild(ye("div",[ht],"CodeMirror-gutter-elt","left: "+E.gutterLeft[Le]+"px; width: "+E.gutterWidth[Le]+"px"))}}}function nd(A,y,O){y.alignable&&(y.alignable=null);for(var E=Ie("CodeMirror-linewidget"),R=y.node.firstChild,H=void 0;R;R=H)H=R.nextSibling,E.test(R.className)&&y.node.removeChild(R);Ic(A,y,O)}function Dp(A,y,O,E){var R=td(A,y);return y.text=y.node=R.pre,R.bgClass&&(y.bgClass=R.bgClass),R.textClass&&(y.textClass=R.textClass),dh(A,y),hh(A,y,O,E),Ic(A,y,E),y.node}function Ic(A,y,O){if(lu(A,y.line,y,O,!0),y.rest)for(var E=0;E<y.rest.length;E++)lu(A,y.rest[E],y,O,!1)}function lu(A,y,O,E,R){if(y.widgets)for(var H=ed(O),Ae=0,_e=y.widgets;Ae<_e.length;++Ae){var Be=_e[Ae],Le=ye("div",[Be.node],"CodeMirror-linewidget"+(Be.className?" "+Be.className:""));Be.handleMouseEvents||Le.setAttribute("cm-ignore-events","true"),fh(Be,Le,O,E),A.display.input.setUneditable(Le),R&&Be.above?H.insertBefore(Le,O.gutter||O.text):H.appendChild(Le),Ha(Be,"redraw")}}function fh(A,y,O,E){if(A.noHScroll){(O.alignable||(O.alignable=[])).push(y);var R=E.wrapperWidth;y.style.left=E.fixedPos+"px",A.coverGutter||(R-=E.gutterTotalWidth,y.style.paddingLeft=E.gutterTotalWidth+"px"),y.style.width=R+"px"}A.coverGutter&&(y.style.zIndex=5,y.style.position="relative",A.noHScroll||(y.style.marginLeft=-E.gutterTotalWidth+"px"))}function uu(A){if(A.height!=null)return A.height;var y=A.doc.cm;if(!y)return 0;if(!je(document.body,A.node)){var O="position: relative;";A.coverGutter&&(O+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),A.noHScroll&&(O+="width: "+y.display.wrapper.clientWidth+"px;"),Se(y.display.measure,ye("div",[A.node],null,O))}return A.height=A.node.parentNode.offsetHeight}function nA(A,y){for(var O=Pr(y);O!=A.wrapper;O=O.parentNode)if(!O||O.nodeType==1&&O.getAttribute("cm-ignore-events")=="true"||O.parentNode==A.sizer&&O!=A.mover)return!0}function kc(A){return A.lineSpace.offsetTop}function Ld(A){return A.mover.offsetHeight-A.lineSpace.offsetHeight}function jh(A){if(A.cachedPaddingH)return A.cachedPaddingH;var y=Se(A.measure,ye("pre","x","CodeMirror-line-like")),O=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,E={left:parseInt(O.paddingLeft),right:parseInt(O.paddingRight)};return!isNaN(E.left)&&!isNaN(E.right)&&(A.cachedPaddingH=E),E}function Hl(A){return mt-A.display.nativeBarWidth}function bl(A){return A.display.scroller.clientWidth-Hl(A)-A.display.barWidth}function FA(A){return A.display.scroller.clientHeight-Hl(A)-A.display.barHeight}function Tc(A,y,O){var E=A.options.lineWrapping,R=E&&bl(A);if(!y.measure.heights||E&&y.measure.width!=R){var H=y.measure.heights=[];if(E){y.measure.width=R;for(var Ae=y.text.firstChild.getClientRects(),_e=0;_e<Ae.length-1;_e++){var Be=Ae[_e],Le=Ae[_e+1];Math.abs(Be.bottom-Le.bottom)>2&&H.push((Be.bottom+Le.top)/2-O.top)}}H.push(O.bottom-O.top)}}function zh(A,y,O){if(A.line==y)return{map:A.measure.map,cache:A.measure.cache};if(A.rest){for(var E=0;E<A.rest.length;E++)if(A.rest[E]==y)return{map:A.measure.maps[E],cache:A.measure.caches[E]};for(var R=0;R<A.rest.length;R++)if(Ge(A.rest[R])>O)return{map:A.measure.maps[R],cache:A.measure.caches[R],before:!0}}}function yf(A,y){y=pr(y);var O=Ge(y),E=A.display.externalMeasured=new Hf(A.doc,y,O);E.lineN=O;var R=E.built=Xc(A,E);return E.text=R.pre,Se(A.display.lineMeasure,R.pre),E}function rd(A,y,O,E){return xl(A,Ys(A,y),O,E)}function fA(A,y){if(y>=A.display.viewFrom&&y<A.display.viewTo)return A.display.view[rA(A,y)];var O=A.display.externalMeasured;if(O&&y>=O.lineN&&y<O.lineN+O.size)return O}function Ys(A,y){var O=Ge(y),E=fA(A,O);E&&!E.text?E=null:E&&E.changes&&(Fh(A,E,O,zA(A)),A.curOp.forceUpdate=!0),E||(E=yf(A,y));var R=zh(E,y,O);return{line:y,view:E,rect:null,map:R.map,cache:R.cache,before:R.before,hasHeights:!1}}function xl(A,y,O,E,R){y.before&&(O=-1);var H=O+(E||""),Ae;return y.cache.hasOwnProperty(H)?Ae=y.cache[H]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Tc(A,y.view,y.rect),y.hasHeights=!0),Ae=Pc(A,y,O,E),Ae.bogus||(y.cache[H]=Ae)),{left:Ae.left,right:Ae.right,top:R?Ae.rtop:Ae.top,bottom:R?Ae.rbottom:Ae.bottom}}var Yo={left:0,right:0,top:0,bottom:0};function ph(A,y,O){for(var E,R,H,Ae,_e,Be,Le=0;Le<A.length;Le+=3)if(_e=A[Le],Be=A[Le+1],y<_e?(R=0,H=1,Ae="left"):y<Be?(R=y-_e,H=R+1):(Le==A.length-3||y==Be&&A[Le+3]>y)&&(H=Be-_e,R=H-1,y>=Be&&(Ae="right")),R!=null){if(E=A[Le+2],_e==Be&&O==(E.insertLeft?"left":"right")&&(Ae=O),O=="left"&&R==0)for(;Le&&A[Le-2]==A[Le-3]&&A[Le-1].insertLeft;)E=A[(Le-=3)+2],Ae="left";if(O=="right"&&R==Be-_e)for(;Le<A.length-3&&A[Le+3]==A[Le+4]&&!A[Le+5].insertLeft;)E=A[(Le+=3)+2],Ae="right";break}return{node:E,start:R,end:H,collapse:Ae,coverStart:_e,coverEnd:Be}}function Lp(A,y){var O=Yo;if(y=="left")for(var E=0;E<A.length&&(O=A[E]).left==O.right;E++);else for(var R=A.length-1;R>=0&&(O=A[R]).left==O.right;R--);return O}function Pc(A,y,O,E){var R=ph(y.map,O,E),H=R.node,Ae=R.start,_e=R.end,Be=R.collapse,Le;if(H.nodeType==3){for(var ht=0;ht<4;ht++){for(;Ae&&Je(y.line.text.charAt(R.coverStart+Ae));)--Ae;for(;R.coverStart+_e<R.coverEnd&&Je(y.line.text.charAt(R.coverStart+_e));)++_e;if(f&&g<9&&Ae==0&&_e==R.coverEnd-R.coverStart?Le=H.parentNode.getBoundingClientRect():Le=Lp(Ne(H,Ae,_e).getClientRects(),E),Le.left||Le.right||Ae==0)break;_e=Ae,Ae=Ae-1,Be="right"}f&&g<11&&(Le=Bu(A.display.measure,Le))}else{Ae>0&&(Be=E="right");var xt;A.options.lineWrapping&&(xt=H.getClientRects()).length>1?Le=xt[E=="right"?xt.length-1:0]:Le=H.getBoundingClientRect()}if(f&&g<9&&!Ae&&(!Le||!Le.left&&!Le.right)){var Jt=H.parentNode.getClientRects()[0];Jt?Le={left:Jt.left,right:Jt.left+Qi(A.display),top:Jt.top,bottom:Jt.bottom}:Le=Yo}for(var Qt=Le.top-y.rect.top,xn=Le.bottom-y.rect.top,Rn=(Qt+xn)/2,Yn=y.view.measure.heights,Xn=0;Xn<Yn.length-1&&!(Rn<Yn[Xn]);Xn++);var yr=Xn?Yn[Xn-1]:0,or=Yn[Xn],Tr={left:(Be=="right"?Le.right:Le.left)-y.rect.left,right:(Be=="left"?Le.left:Le.right)-y.rect.left,top:yr,bottom:or};return!Le.left&&!Le.right&&(Tr.bogus=!0),A.options.singleCursorHeightPerLine||(Tr.rtop=Qt,Tr.rbottom=xn),Tr}function Bu(A,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Xr(A))return y;var O=screen.logicalXDPI/screen.deviceXDPI,E=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*O,right:y.right*O,top:y.top*E,bottom:y.bottom*E}}function Fd(A){if(A.measure&&(A.measure.cache={},A.measure.heights=null,A.rest))for(var y=0;y<A.rest.length;y++)A.measure.caches[y]={}}function Ud(A){A.display.externalMeasure=null,oe(A.display.lineMeasure);for(var y=0;y<A.display.view.length;y++)Fd(A.display.view[y])}function uc(A){Ud(A),A.display.cachedCharWidth=A.display.cachedTextHeight=A.display.cachedPaddingH=null,A.options.lineWrapping||(A.display.maxLineChanged=!0),A.display.lineNumChars=null}function jd(A){return S&&ee?-(A.body.getBoundingClientRect().left-parseInt(getComputedStyle(A.body).marginLeft)):A.defaultView.pageXOffset||(A.documentElement||A.body).scrollLeft}function Nh(A){return S&&ee?-(A.body.getBoundingClientRect().top-parseInt(getComputedStyle(A.body).marginTop)):A.defaultView.pageYOffset||(A.documentElement||A.body).scrollTop}function Ac(A){var y=pr(A),O=y.widgets,E=0;if(O)for(var R=0;R<O.length;++R)O[R].above&&(E+=uu(O[R]));return E}function Au(A,y,O,E,R){if(!R){var H=Ac(y);O.top+=H,O.bottom+=H}if(E=="line")return O;E||(E="local");var Ae=to(y);if(E=="local"?Ae+=kc(A.display):Ae-=A.display.viewOffset,E=="page"||E=="window"){var _e=A.display.lineSpace.getBoundingClientRect();Ae+=_e.top+(E=="window"?0:Nh(vt(A)));var Be=_e.left+(E=="window"?0:jd(vt(A)));O.left+=Be,O.right+=Be}return O.top+=Ae,O.bottom+=Ae,O}function Ht(A,y,O){if(O=="div")return y;var E=y.left,R=y.top;if(O=="page")E-=jd(vt(A)),R-=Nh(vt(A));else if(O=="local"||!O){var H=A.display.sizer.getBoundingClientRect();E+=H.left,R+=H.top}var Ae=A.display.lineSpace.getBoundingClientRect();return{left:E-Ae.left,top:R-Ae.top}}function Pn(A,y,O,E,R){return E||(E=Mr(A.doc,y.line)),Au(A,E,rd(A,E,y.ch,R),O)}function sn(A,y,O,E,R,H){E=E||Mr(A.doc,y.line),R||(R=Ys(A,E));function Ae(xn,Rn){var Yn=xl(A,R,xn,Rn?"right":"left",H);return Rn?Yn.left=Yn.right:Yn.right=Yn.left,Au(A,E,Yn,O)}var _e=xe(E,A.doc.direction),Be=y.ch,Le=y.sticky;if(Be>=E.text.length?(Be=E.text.length,Le="before"):Be<=0&&(Be=0,Le="after"),!_e)return Ae(Le=="before"?Be-1:Be,Le=="before");function ht(xn,Rn,Yn){var Xn=_e[Rn],yr=Xn.level==1;return Ae(Yn?xn-1:xn,yr!=Yn)}var xt=qe(_e,Be,Le),Jt=Ut,Qt=ht(Be,xt,Le=="before");return Jt!=null&&(Qt.other=ht(Be,Jt,Le!="before")),Qt}function Kr(A,y){var O=0;y=Hr(A.doc,y),A.options.lineWrapping||(O=Qi(A.display)*y.ch);var E=Mr(A.doc,y.line),R=to(E)+kc(A.display);return{left:O,right:O,top:R,bottom:R+E.height}}function bi(A,y,O,E,R){var H=An(A,y,O);return H.xRel=R,E&&(H.outside=E),H}function Co(A,y,O){var E=A.doc;if(O+=A.display.viewOffset,O<0)return bi(E.first,0,null,-1,-1);var R=_t(E,O),H=E.first+E.size-1;if(R>H)return bi(E.first+E.size-1,Mr(E,H).text.length,null,1,1);y<0&&(y=0);for(var Ae=Mr(E,R);;){var _e=Xf(A,Ae,R,y,O),Be=si(Ae,_e.ch+(_e.xRel>0||_e.outside>0?1:0));if(!Be)return _e;var Le=Be.find(1);if(Le.line==R)return Le;Ae=Mr(E,R=Le.line)}}function is(A,y,O,E){E-=Ac(y);var R=y.text.length,H=Xt(function(Ae){return xl(A,O,Ae-1).bottom<=E},R,0);return R=Xt(function(Ae){return xl(A,O,Ae).top>E},H,R),{begin:H,end:R}}function $o(A,y,O,E){O||(O=Ys(A,y));var R=Au(A,y,xl(A,O,E),"line").top;return is(A,y,O,R)}function UA(A,y,O,E){return A.bottom<=O?!1:A.top>O?!0:(E?A.left:A.right)>y}function Xf(A,y,O,E,R){R-=to(y);var H=Ys(A,y),Ae=Ac(y),_e=0,Be=y.text.length,Le=!0,ht=xe(y,A.doc.direction);if(ht){var xt=(A.options.lineWrapping?cu:wl)(A,y,O,H,ht,E,R);Le=xt.level!=1,_e=Le?xt.from:xt.to-1,Be=Le?xt.to:xt.from-1}var Jt=null,Qt=null,xn=Xt(function(li){var Fr=xl(A,H,li);return Fr.top+=Ae,Fr.bottom+=Ae,UA(Fr,E,R,!1)?(Fr.top<=R&&Fr.left<=E&&(Jt=li,Qt=Fr),!0):!1},_e,Be),Rn,Yn,Xn=!1;if(Qt){var yr=E-Qt.left<Qt.right-E,or=yr==Le;xn=Jt+(or?0:1),Yn=or?"after":"before",Rn=yr?Qt.left:Qt.right}else{!Le&&(xn==Be||xn==_e)&&xn++,Yn=xn==0?"after":xn==y.text.length?"before":xl(A,H,xn-(Le?1:0)).bottom+Ae<=R==Le?"after":"before";var Tr=sn(A,An(O,xn,Yn),"line",y,H);Rn=Tr.left,Xn=R<Tr.top?-1:R>=Tr.bottom?1:0}return xn=kt(y.text,xn,1),bi(O,xn,Yn,Xn,E-Rn)}function wl(A,y,O,E,R,H,Ae){var _e=Xt(function(xt){var Jt=R[xt],Qt=Jt.level!=1;return UA(sn(A,An(O,Qt?Jt.to:Jt.from,Qt?"before":"after"),"line",y,E),H,Ae,!0)},0,R.length-1),Be=R[_e];if(_e>0){var Le=Be.level!=1,ht=sn(A,An(O,Le?Be.from:Be.to,Le?"after":"before"),"line",y,E);UA(ht,H,Ae,!0)&&ht.top>Ae&&(Be=R[_e-1])}return Be}function cu(A,y,O,E,R,H,Ae){var _e=is(A,y,E,Ae),Be=_e.begin,Le=_e.end;/\s/.test(y.text.charAt(Le-1))&&Le--;for(var ht=null,xt=null,Jt=0;Jt<R.length;Jt++){var Qt=R[Jt];if(!(Qt.from>=Le||Qt.to<=Be)){var xn=Qt.level!=1,Rn=xl(A,E,xn?Math.min(Le,Qt.to)-1:Math.max(Be,Qt.from)).right,Yn=Rn<H?H-Rn+1e9:Rn-H;(!ht||xt>Yn)&&(ht=Qt,xt=Yn)}}return ht||(ht=R[R.length-1]),ht.from<Be&&(ht={from:Be,to:ht.to,level:ht.level}),ht.to>Le&&(ht={from:ht.from,to:Le,level:ht.level}),ht}var jA;function Ml(A){if(A.cachedTextHeight!=null)return A.cachedTextHeight;if(jA==null){jA=ye("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)jA.appendChild(document.createTextNode("x")),jA.appendChild(ye("br"));jA.appendChild(document.createTextNode("x"))}Se(A.measure,jA);var O=jA.offsetHeight/50;return O>3&&(A.cachedTextHeight=O),oe(A.measure),O||1}function Qi(A){if(A.cachedCharWidth!=null)return A.cachedCharWidth;var y=ye("span","xxxxxxxxxx"),O=ye("pre",[y],"CodeMirror-line-like");Se(A.measure,O);var E=y.getBoundingClientRect(),R=(E.right-E.left)/10;return R>2&&(A.cachedCharWidth=R),R||10}function zA(A){for(var y=A.display,O={},E={},R=y.gutters.clientLeft,H=y.gutters.firstChild,Ae=0;H;H=H.nextSibling,++Ae){var _e=A.display.gutterSpecs[Ae].className;O[_e]=H.offsetLeft+H.clientLeft+R,E[_e]=H.clientWidth}return{fixedPos:Fo(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:O,gutterWidth:E,wrapperWidth:y.wrapper.clientWidth}}function Fo(A){return A.scroller.getBoundingClientRect().left-A.sizer.getBoundingClientRect().left}function Kc(A){var y=Ml(A.display),O=A.options.lineWrapping,E=O&&Math.max(5,A.display.scroller.clientWidth/Qi(A.display)-3);return function(R){if(Nr(A.doc,R))return 0;var H=0;if(R.widgets)for(var Ae=0;Ae<R.widgets.length;Ae++)R.widgets[Ae].height&&(H+=R.widgets[Ae].height);return O?H+(Math.ceil(R.text.length/E)||1)*y:H+y}}function NA(A){var y=A.doc,O=Kc(A);y.iter(function(E){var R=O(E);R!=E.height&&ba(E,R)})}function pA(A,y,O,E){var R=A.display;if(!O&&Pr(y).getAttribute("cm-not-content")=="true")return null;var H,Ae,_e=R.lineSpace.getBoundingClientRect();try{H=y.clientX-_e.left,Ae=y.clientY-_e.top}catch{return null}var Be=Co(A,H,Ae),Le;if(E&&Be.xRel>0&&(Le=Mr(A.doc,Be.line).text).length==Be.ch){var ht=we(Le,Le.length,A.options.tabSize)-Le.length;Be=An(Be.line,Math.max(0,Math.round((H-jh(A.display).left)/Qi(A.display))-ht))}return Be}function rA(A,y){if(y>=A.display.viewTo||(y-=A.display.viewFrom,y<0))return null;for(var O=A.display.view,E=0;E<O.length;E++)if(y-=O[E].size,y<0)return E}function Sl(A,y,O,E){y==null&&(y=A.doc.first),O==null&&(O=A.doc.first+A.doc.size),E||(E=0);var R=A.display;if(E&&O<R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>y)&&(R.updateLineNumbers=y),A.curOp.viewChanged=!0,y>=R.viewTo)pa&&So(A.doc,y)<R.viewTo&&du(A);else if(O<=R.viewFrom)pa&&Ri(A.doc,O+E)>R.viewFrom?du(A):(R.viewFrom+=E,R.viewTo+=E);else if(y<=R.viewFrom&&O>=R.viewTo)du(A);else if(y<=R.viewFrom){var H=Ll(A,O,O+E,1);H?(R.view=R.view.slice(H.index),R.viewFrom=H.lineN,R.viewTo+=E):du(A)}else if(O>=R.viewTo){var Ae=Ll(A,y,y,-1);Ae?(R.view=R.view.slice(0,Ae.index),R.viewTo=Ae.lineN):du(A)}else{var _e=Ll(A,y,y,-1),Be=Ll(A,O,O+E,1);_e&&Be?(R.view=R.view.slice(0,_e.index).concat(tA(A,_e.lineN,Be.lineN)).concat(R.view.slice(Be.index)),R.viewTo+=E):du(A)}var Le=R.externalMeasured;Le&&(O<Le.lineN?Le.lineN+=E:y<Le.lineN+Le.size&&(R.externalMeasured=null))}function cc(A,y,O){A.curOp.viewChanged=!0;var E=A.display,R=A.display.externalMeasured;if(R&&y>=R.lineN&&y<R.lineN+R.size&&(E.externalMeasured=null),!(y<E.viewFrom||y>=E.viewTo)){var H=E.view[rA(A,y)];if(H.node!=null){var Ae=H.changes||(H.changes=[]);tt(Ae,O)==-1&&Ae.push(O)}}}function du(A){A.display.viewFrom=A.display.viewTo=A.doc.first,A.display.view=[],A.display.viewOffset=0}function Ll(A,y,O,E){var R=rA(A,y),H,Ae=A.display.view;if(!pa||O==A.doc.first+A.doc.size)return{index:R,lineN:O};for(var _e=A.display.viewFrom,Be=0;Be<R;Be++)_e+=Ae[Be].size;if(_e!=y){if(E>0){if(R==Ae.length-1)return null;H=_e+Ae[R].size-y,R++}else H=_e-y;y+=H,O+=H}for(;So(A.doc,O)!=O;){if(R==(E<0?0:Ae.length-1))return null;O+=E*Ae[R-(E<0?1:0)].size,R+=E}return{index:R,lineN:O}}function Rc(A,y,O){var E=A.display,R=E.view;R.length==0||y>=E.viewTo||O<=E.viewFrom?(E.view=tA(A,y,O),E.viewFrom=y):(E.viewFrom>y?E.view=tA(A,y,E.viewFrom).concat(E.view):E.viewFrom<y&&(E.view=E.view.slice(rA(A,y))),E.viewFrom=y,E.viewTo<O?E.view=E.view.concat(tA(A,E.viewTo,O)):E.viewTo>O&&(E.view=E.view.slice(0,rA(A,O)))),E.viewTo=O}function zd(A){for(var y=A.display.view,O=0,E=0;E<y.length;E++){var R=y[E];!R.hidden&&(!R.node||R.changes)&&++O}return O}function Rs(A){A.display.input.showSelection(A.display.input.prepareSelection())}function id(A,y){y===void 0&&(y=!0);var O=A.doc,E={},R=E.cursors=document.createDocumentFragment(),H=E.selection=document.createDocumentFragment(),Ae=A.options.$customCursor;Ae&&(y=!0);for(var _e=0;_e<O.sel.ranges.length;_e++)if(!(!y&&_e==O.sel.primIndex)){var Be=O.sel.ranges[_e];if(!(Be.from().line>=A.display.viewTo||Be.to().line<A.display.viewFrom)){var Le=Be.empty();if(Ae){var ht=Ae(A,Be);ht&&dc(A,ht,R)}else(Le||A.options.showCursorWhenSelecting)&&dc(A,Be.head,R);Le||Gh(A,Be,H)}}return E}function dc(A,y,O){var E=sn(A,y,"div",null,null,!A.options.singleCursorHeightPerLine),R=O.appendChild(ye("div"," ","CodeMirror-cursor"));if(R.style.left=E.left+"px",R.style.top=E.top+"px",R.style.height=Math.max(0,E.bottom-E.top)*A.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(A.getWrapperElement().className)){var H=Pn(A,y,"div",null,null),Ae=H.right-H.left;R.style.width=(Ae>0?Ae:A.defaultCharWidth())+"px"}if(E.other){var _e=O.appendChild(ye("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));_e.style.display="",_e.style.left=E.other.left+"px",_e.style.top=E.other.top+"px",_e.style.height=(E.other.bottom-E.other.top)*.85+"px"}}function GA(A,y){return A.top-y.top||A.left-y.left}function Gh(A,y,O){var E=A.display,R=A.doc,H=document.createDocumentFragment(),Ae=jh(A.display),_e=Ae.left,Be=Math.max(E.sizerWidth,bl(A)-E.sizer.offsetLeft)-Ae.right,Le=R.direction=="ltr";function ht(or,Tr,li,Fr){Tr<0&&(Tr=0),Tr=Math.round(Tr),Fr=Math.round(Fr),H.appendChild(ye("div",null,"CodeMirror-selected","position: absolute; left: "+or+`px;
|
||
top: `+Tr+"px; width: "+(li??Be-or)+`px;
|
||
height: `+(Fr-Tr)+"px"))}function xt(or,Tr,li){var Fr=Mr(R,or),no=Fr.text.length,Io,js;function as(Bs,Gl){return Pn(A,An(or,Bs),"div",Fr,Gl)}function _s(Bs,Gl,zs){var bs=$o(A,Fr,null,Bs),da=Gl=="ltr"==(zs=="after")?"left":"right",vi=zs=="after"?bs.begin:bs.end-(/\s/.test(Fr.text.charAt(bs.end-1))?2:1);return as(vi,da)[da]}var Cs=xe(Fr,R.direction);return it(Cs,Tr||0,li??no,function(Bs,Gl,zs,bs){var da=zs=="ltr",vi=as(Bs,da?"left":"right"),Zo=as(Gl-1,da?"right":"left"),ss=Tr==null&&Bs==0,hs=li==null&&Gl==no,Ba=bs==0,Bl=!Cs||bs==Cs.length-1;if(Zo.top-vi.top<=3){var Po=(Le?ss:hs)&&Ba,xd=(Le?hs:ss)&&Bl,Al=Po?_e:(da?vi:Zo).left,EA=xd?Be:(da?Zo:vi).right;ht(Al,vi.top,EA-Al,vi.bottom)}else{var Wc,cl,dl,Vh;da?(Wc=Le&&ss&&Ba?_e:vi.left,cl=Le?Be:_s(Bs,zs,"before"),dl=Le?_e:_s(Gl,zs,"after"),Vh=Le&&hs&&Bl?Be:Zo.right):(Wc=Le?_s(Bs,zs,"before"):_e,cl=!Le&&ss&&Ba?Be:vi.right,dl=!Le&&hs&&Bl?_e:Zo.left,Vh=Le?_s(Gl,zs,"after"):Be),ht(Wc,vi.top,cl-Wc,vi.bottom),vi.bottom<Zo.top&&ht(_e,vi.bottom,null,Zo.top),ht(dl,Zo.top,Vh-dl,Zo.bottom)}(!Io||GA(vi,Io)<0)&&(Io=vi),GA(Zo,Io)<0&&(Io=Zo),(!js||GA(vi,js)<0)&&(js=vi),GA(Zo,js)<0&&(js=Zo)}),{start:Io,end:js}}var Jt=y.from(),Qt=y.to();if(Jt.line==Qt.line)xt(Jt.line,Jt.ch,Qt.ch);else{var xn=Mr(R,Jt.line),Rn=Mr(R,Qt.line),Yn=pr(xn)==pr(Rn),Xn=xt(Jt.line,Jt.ch,Yn?xn.text.length+1:null).end,yr=xt(Qt.line,Yn?0:null,Qt.ch).start;Yn&&(Xn.top<yr.top-2?(ht(Xn.right,Xn.top,null,Xn.bottom),ht(_e,yr.top,yr.left,yr.bottom)):ht(Xn.right,Xn.top,yr.left-Xn.right,Xn.bottom)),Xn.bottom<yr.top&&ht(_e,Xn.bottom,null,yr.top)}O.appendChild(H)}function mA(A){if(A.state.focused){var y=A.display;clearInterval(y.blinker);var O=!0;y.cursorDiv.style.visibility="",A.options.cursorBlinkRate>0?y.blinker=setInterval(function(){A.hasFocus()||Vo(A),y.cursorDiv.style.visibility=(O=!O)?"":"hidden"},A.options.cursorBlinkRate):A.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function WA(A){A.hasFocus()||(A.display.input.focus(),A.state.focused||Nd(A))}function Dc(A){A.state.delayingBlurEvent=!0,setTimeout(function(){A.state.delayingBlurEvent&&(A.state.delayingBlurEvent=!1,A.state.focused&&Vo(A))},100)}function Nd(A,y){A.state.delayingBlurEvent&&!A.state.draggingText&&(A.state.delayingBlurEvent=!1),A.options.readOnly!="nocursor"&&(A.state.focused||(Et(A,"focus",A,y),A.state.focused=!0,Ue(A.display.wrapper,"CodeMirror-focused"),!A.curOp&&A.display.selForContextMenu!=A.doc.sel&&(A.display.input.reset(),b&&setTimeout(function(){return A.display.input.reset(!0)},20)),A.display.input.receivedFocus()),mA(A))}function Vo(A,y){A.state.delayingBlurEvent||(A.state.focused&&(Et(A,"blur",A,y),A.state.focused=!1,re(A.display.wrapper,"CodeMirror-focused")),clearInterval(A.display.blinker),setTimeout(function(){A.state.focused||(A.display.shift=!1)},150))}function Lc(A){for(var y=A.display,O=y.lineDiv.offsetTop,E=Math.max(0,y.scroller.getBoundingClientRect().top),R=y.lineDiv.getBoundingClientRect().top,H=0,Ae=0;Ae<y.view.length;Ae++){var _e=y.view[Ae],Be=A.options.lineWrapping,Le=void 0,ht=0;if(!_e.hidden){if(R+=_e.line.height,f&&g<8){var xt=_e.node.offsetTop+_e.node.offsetHeight;Le=xt-O,O=xt}else{var Jt=_e.node.getBoundingClientRect();Le=Jt.bottom-Jt.top,!Be&&_e.text.firstChild&&(ht=_e.text.firstChild.getBoundingClientRect().right-Jt.left-1)}var Qt=_e.line.height-Le;if((Qt>.005||Qt<-.005)&&(R<E&&(H-=Qt),ba(_e.line,Le),QA(_e.line),_e.rest))for(var xn=0;xn<_e.rest.length;xn++)QA(_e.rest[xn]);if(ht>A.display.sizerWidth){var Rn=Math.ceil(ht/Qi(A.display));Rn>A.display.maxLineLength&&(A.display.maxLineLength=Rn,A.display.maxLine=_e.line,A.display.maxLineChanged=!0)}}}Math.abs(H)>2&&(y.scroller.scrollTop+=H)}function QA(A){if(A.widgets)for(var y=0;y<A.widgets.length;++y){var O=A.widgets[y],E=O.node.parentNode;E&&(O.height=E.offsetHeight)}}function Iu(A,y,O){var E=O&&O.top!=null?Math.max(0,O.top):A.scroller.scrollTop;E=Math.floor(E-kc(A));var R=O&&O.bottom!=null?O.bottom:E+A.wrapper.clientHeight,H=_t(y,E),Ae=_t(y,R);if(O&&O.ensure){var _e=O.ensure.from.line,Be=O.ensure.to.line;_e<H?(H=_e,Ae=_t(y,to(Mr(y,_e))+A.wrapper.clientHeight)):Math.min(Be,y.lastLine())>=Ae&&(H=_t(y,to(Mr(y,Be))-A.wrapper.clientHeight),Ae=Be)}return{from:H,to:Math.max(Ae,H+1)}}function Fc(A,y){if(!Ct(A,"scrollCursorIntoView")){var O=A.display,E=O.sizer.getBoundingClientRect(),R=null,H=O.wrapper.ownerDocument;if(y.top+E.top<0?R=!0:y.bottom+E.top>(H.defaultView.innerHeight||H.documentElement.clientHeight)&&(R=!1),R!=null&&!q){var Ae=ye("div","",null,`position: absolute;
|
||
top: `+(y.top-O.viewOffset-kc(A.display))+`px;
|
||
height: `+(y.bottom-y.top+Hl(A)+O.barHeight)+`px;
|
||
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");A.display.lineSpace.appendChild(Ae),Ae.scrollIntoView(R),A.display.lineSpace.removeChild(Ae)}}}function Gd(A,y,O,E){E==null&&(E=0);var R;!A.options.lineWrapping&&y==O&&(O=y.sticky=="before"?An(y.line,y.ch+1,"before"):y,y=y.ch?An(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y);for(var H=0;H<5;H++){var Ae=!1,_e=sn(A,y),Be=!O||O==y?_e:sn(A,O);R={left:Math.min(_e.left,Be.left),top:Math.min(_e.top,Be.top)-E,right:Math.max(_e.left,Be.left),bottom:Math.max(_e.bottom,Be.bottom)+E};var Le=hc(A,R),ht=A.doc.scrollTop,xt=A.doc.scrollLeft;if(Le.scrollTop!=null&&(ku(A,Le.scrollTop),Math.abs(A.doc.scrollTop-ht)>1&&(Ae=!0)),Le.scrollLeft!=null&&(Fl(A,Le.scrollLeft),Math.abs(A.doc.scrollLeft-xt)>1&&(Ae=!0)),!Ae)break}return R}function Uc(A,y){var O=hc(A,y);O.scrollTop!=null&&ku(A,O.scrollTop),O.scrollLeft!=null&&Fl(A,O.scrollLeft)}function hc(A,y){var O=A.display,E=Ml(A.display);y.top<0&&(y.top=0);var R=A.curOp&&A.curOp.scrollTop!=null?A.curOp.scrollTop:O.scroller.scrollTop,H=FA(A),Ae={};y.bottom-y.top>H&&(y.bottom=y.top+H);var _e=A.doc.height+Ld(O),Be=y.top<E,Le=y.bottom>_e-E;if(y.top<R)Ae.scrollTop=Be?0:y.top;else if(y.bottom>R+H){var ht=Math.min(y.top,(Le?_e:y.bottom)-H);ht!=R&&(Ae.scrollTop=ht)}var xt=A.options.fixedGutter?0:O.gutters.offsetWidth,Jt=A.curOp&&A.curOp.scrollLeft!=null?A.curOp.scrollLeft:O.scroller.scrollLeft-xt,Qt=bl(A)-O.gutters.offsetWidth,xn=y.right-y.left>Qt;return xn&&(y.right=y.left+Qt),y.left<10?Ae.scrollLeft=0:y.left<Jt?Ae.scrollLeft=Math.max(0,y.left+xt-(xn?0:10)):y.right>Qt+Jt-3&&(Ae.scrollLeft=y.right+(xn?0:10)-Qt),Ae}function ua(A,y){y!=null&&(od(A),A.curOp.scrollTop=(A.curOp.scrollTop==null?A.doc.scrollTop:A.curOp.scrollTop)+y)}function Uo(A){od(A);var y=A.getCursor();A.curOp.scrollToPos={from:y,to:y,margin:A.options.cursorScrollMargin}}function Aa(A,y,O){(y!=null||O!=null)&&od(A),y!=null&&(A.curOp.scrollLeft=y),O!=null&&(A.curOp.scrollTop=O)}function vf(A,y){od(A),A.curOp.scrollToPos=y}function od(A){var y=A.curOp.scrollToPos;if(y){A.curOp.scrollToPos=null;var O=Kr(A,y.from),E=Kr(A,y.to);ad(A,O,E,y.margin)}}function ad(A,y,O,E){var R=hc(A,{left:Math.min(y.left,O.left),top:Math.min(y.top,O.top)-E,right:Math.max(y.right,O.right),bottom:Math.max(y.bottom,O.bottom)+E});Aa(A,R.scrollLeft,R.scrollTop)}function ku(A,y){Math.abs(A.doc.scrollTop-y)<2||(i||ys(A,{top:y}),qA(A,y,!0),i&&ys(A),ld(A,100))}function qA(A,y,O){y=Math.max(0,Math.min(A.display.scroller.scrollHeight-A.display.scroller.clientHeight,y)),!(A.display.scroller.scrollTop==y&&!O)&&(A.doc.scrollTop=y,A.display.scrollbars.setScrollTop(y),A.display.scroller.scrollTop!=y&&(A.display.scroller.scrollTop=y))}function Fl(A,y,O,E){y=Math.max(0,Math.min(y,A.display.scroller.scrollWidth-A.display.scroller.clientWidth)),!((O?y==A.doc.scrollLeft:Math.abs(A.doc.scrollLeft-y)<2)&&!E)&&(A.doc.scrollLeft=y,ud(A),A.display.scroller.scrollLeft!=y&&(A.display.scroller.scrollLeft=y),A.display.scrollbars.setScrollLeft(y))}function gA(A){var y=A.display,O=y.gutters.offsetWidth,E=Math.round(A.doc.height+Ld(A.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:A.options.fixedGutter?O:0,docHeight:E,scrollHeight:E+Hl(A)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:O}}var il=function(A,y,O){this.cm=O;var E=this.vert=ye("div",[ye("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),R=this.horiz=ye("div",[ye("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");E.tabIndex=R.tabIndex=-1,A(E),A(R),Qe(E,"scroll",function(){E.clientHeight&&y(E.scrollTop,"vertical")}),Qe(R,"scroll",function(){R.clientWidth&&y(R.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,f&&g<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};il.prototype.update=function(A){var y=A.scrollWidth>A.clientWidth+1,O=A.scrollHeight>A.clientHeight+1,E=A.nativeBarWidth;if(O){this.vert.style.display="block",this.vert.style.bottom=y?E+"px":"0";var R=A.viewHeight-(y?E:0);this.vert.firstChild.style.height=Math.max(0,A.scrollHeight-A.clientHeight+R)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=O?E+"px":"0",this.horiz.style.left=A.barLeft+"px";var H=A.viewWidth-A.barLeft-(O?E:0);this.horiz.firstChild.style.width=Math.max(0,A.scrollWidth-A.clientWidth+H)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&A.clientHeight>0&&(E==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:O?E:0,bottom:y?E:0}},il.prototype.setScrollLeft=function(A){this.horiz.scrollLeft!=A&&(this.horiz.scrollLeft=A),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},il.prototype.setScrollTop=function(A){this.vert.scrollTop!=A&&(this.vert.scrollTop=A),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},il.prototype.zeroWidthHack=function(){var A=$&&!j?"12px":"18px";this.horiz.style.height=this.vert.style.width=A,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Fe,this.disableVert=new Fe},il.prototype.enableZeroWidthBar=function(A,y,O){A.style.visibility="";function E(){var R=A.getBoundingClientRect(),H=O=="vert"?document.elementFromPoint(R.right-1,(R.top+R.bottom)/2):document.elementFromPoint((R.right+R.left)/2,R.bottom-1);H!=A?A.style.visibility="hidden":y.set(1e3,E)}y.set(1e3,E)},il.prototype.clear=function(){var A=this.horiz.parentNode;A.removeChild(this.horiz),A.removeChild(this.vert)};var YA=function(){};YA.prototype.update=function(){return{bottom:0,right:0}},YA.prototype.setScrollLeft=function(){},YA.prototype.setScrollTop=function(){},YA.prototype.clear=function(){};function Tu(A,y){y||(y=gA(A));var O=A.display.barWidth,E=A.display.barHeight;sd(A,y);for(var R=0;R<4&&O!=A.display.barWidth||E!=A.display.barHeight;R++)O!=A.display.barWidth&&A.options.lineWrapping&&Lc(A),sd(A,gA(A)),O=A.display.barWidth,E=A.display.barHeight}function sd(A,y){var O=A.display,E=O.scrollbars.update(y);O.sizer.style.paddingRight=(O.barWidth=E.right)+"px",O.sizer.style.paddingBottom=(O.barHeight=E.bottom)+"px",O.heightForcer.style.borderBottom=E.bottom+"px solid transparent",E.right&&E.bottom?(O.scrollbarFiller.style.display="block",O.scrollbarFiller.style.height=E.bottom+"px",O.scrollbarFiller.style.width=E.right+"px"):O.scrollbarFiller.style.display="",E.bottom&&A.options.coverGutterNextToScrollbar&&A.options.fixedGutter?(O.gutterFiller.style.display="block",O.gutterFiller.style.height=E.bottom+"px",O.gutterFiller.style.width=y.gutterWidth+"px"):O.gutterFiller.style.display=""}var Pu={native:il,null:YA};function Wd(A){A.display.scrollbars&&(A.display.scrollbars.clear(),A.display.scrollbars.addClass&&re(A.display.wrapper,A.display.scrollbars.addClass)),A.display.scrollbars=new Pu[A.options.scrollbarStyle](function(y){A.display.wrapper.insertBefore(y,A.display.scrollbarFiller),Qe(y,"mousedown",function(){A.state.focused&&setTimeout(function(){return A.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,O){O=="horizontal"?Fl(A,y):ku(A,y)},A),A.display.scrollbars.addClass&&Ue(A.display.wrapper,A.display.scrollbars.addClass)}var $A=0;function Ku(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:++$A,markArrays:null},Bc(A.curOp)}function Ru(A){var y=A.curOp;y&&gf(y,function(O){for(var E=0;E<O.ops.length;E++)O.ops[E].cm.curOp=null;yA(O)})}function yA(A){for(var y=A.ops,O=0;O<y.length;O++)fc(y[O]);for(var E=0;E<y.length;E++)hu(y[E]);for(var R=0;R<y.length;R++)jc(y[R]);for(var H=0;H<y.length;H++)rt(y[H]);for(var Ae=0;Ae<y.length;Ae++)Ds(y[Ae])}function fc(A){var y=A.cm,O=y.display;za(y),A.updateMaxLine&&gs(y),A.mustUpdate=A.viewChanged||A.forceUpdate||A.scrollTop!=null||A.scrollToPos&&(A.scrollToPos.from.line<O.viewFrom||A.scrollToPos.to.line>=O.viewTo)||O.maxLineChanged&&y.options.lineWrapping,A.update=A.mustUpdate&&new Ms(y,A.mustUpdate&&{top:A.scrollTop,ensure:A.scrollToPos},A.forceUpdate)}function hu(A){A.updatedDisplay=A.mustUpdate&&Sa(A.cm,A.update)}function jc(A){var y=A.cm,O=y.display;A.updatedDisplay&&Lc(y),A.barMeasure=gA(y),O.maxLineChanged&&!y.options.lineWrapping&&(A.adjustWidthTo=rd(y,O.maxLine,O.maxLine.text.length).left+3,y.display.sizerWidth=A.adjustWidthTo,A.barMeasure.scrollWidth=Math.max(O.scroller.clientWidth,O.sizer.offsetLeft+A.adjustWidthTo+Hl(y)+y.display.barWidth),A.maxScrollLeft=Math.max(0,O.sizer.offsetLeft+A.adjustWidthTo-bl(y))),(A.updatedDisplay||A.selectionChanged)&&(A.preparedSelection=O.input.prepareSelection())}function rt(A){var y=A.cm;A.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=A.adjustWidthTo+"px",A.maxScrollLeft<y.doc.scrollLeft&&Fl(y,Math.min(y.display.scroller.scrollLeft,A.maxScrollLeft),!0),y.display.maxLineChanged=!1);var O=A.focus&&A.focus==et(Pt(y));A.preparedSelection&&y.display.input.showSelection(A.preparedSelection,O),(A.updatedDisplay||A.startHeight!=y.doc.height)&&Tu(y,A.barMeasure),A.updatedDisplay&&VA(y,A.barMeasure),A.selectionChanged&&mA(y),y.state.focused&&A.updateInput&&y.display.input.reset(A.typing),O&&WA(A.cm)}function Ds(A){var y=A.cm,O=y.display,E=y.doc;if(A.updatedDisplay&&dr(y,A.update),O.wheelStartX!=null&&(A.scrollTop!=null||A.scrollLeft!=null||A.scrollToPos)&&(O.wheelStartX=O.wheelStartY=null),A.scrollTop!=null&&qA(y,A.scrollTop,A.forceScroll),A.scrollLeft!=null&&Fl(y,A.scrollLeft,!0,!0),A.scrollToPos){var R=Gd(y,Hr(E,A.scrollToPos.from),Hr(E,A.scrollToPos.to),A.scrollToPos.margin);Fc(y,R)}var H=A.maybeHiddenMarkers,Ae=A.maybeUnhiddenMarkers;if(H)for(var _e=0;_e<H.length;++_e)H[_e].lines.length||Et(H[_e],"hide");if(Ae)for(var Be=0;Be<Ae.length;++Be)Ae[Be].lines.length&&Et(Ae[Be],"unhide");O.wrapper.offsetHeight&&(E.scrollTop=y.display.scroller.scrollTop),A.changeObjs&&Et(y,"changes",y,A.changeObjs),A.update&&A.update.finish()}function Eo(A,y){if(A.curOp)return y();Ku(A);try{return y()}finally{Ru(A)}}function Li(A,y){return function(){if(A.curOp)return y.apply(A,arguments);Ku(A);try{return y.apply(A,arguments)}finally{Ru(A)}}}function Wr(A){return function(){if(this.curOp)return A.apply(this,arguments);Ku(this);try{return A.apply(this,arguments)}finally{Ru(this)}}}function Ma(A){return function(){var y=this.cm;if(!y||y.curOp)return A.apply(this,arguments);Ku(y);try{return A.apply(this,arguments)}finally{Ru(y)}}}function ld(A,y){A.doc.highlightFrontier<A.display.viewTo&&A.state.highlight.set(y,Rt(Qd,A))}function Qd(A){var y=A.doc;if(!(y.highlightFrontier>=A.display.viewTo)){var O=+new Date+A.options.workTime,E=kr(A,y.highlightFrontier),R=[];y.iter(E.line,Math.min(y.first+y.size,A.display.viewTo+500),function(H){if(E.line>=A.display.viewFrom){var Ae=H.styles,_e=H.text.length>A.options.maxHighlightLength?Vi(y.mode,E.state):null,Be=Ju(A,H,E,!0);_e&&(E.state=_e),H.styles=Be.styles;var Le=H.styleClasses,ht=Be.classes;ht?H.styleClasses=ht:Le&&(H.styleClasses=null);for(var xt=!Ae||Ae.length!=H.styles.length||Le!=ht&&(!Le||!ht||Le.bgClass!=ht.bgClass||Le.textClass!=ht.textClass),Jt=0;!xt&&Jt<Ae.length;++Jt)xt=Ae[Jt]!=H.styles[Jt];xt&&R.push(E.line),H.stateAfter=E.save(),E.nextLine()}else H.text.length<=A.options.maxHighlightLength&&Oi(A,H.text,E),H.stateAfter=E.line%5==0?E.save():null,E.nextLine();if(+new Date>O)return ld(A,A.options.workDelay),!0}),y.highlightFrontier=E.line,y.modeFrontier=Math.max(y.modeFrontier,E.line),R.length&&Eo(A,function(){for(var H=0;H<R.length;H++)cc(A,R[H],"text")})}}var Ms=function(A,y,O){var E=A.display;this.viewport=y,this.visible=Iu(E,A.doc,y),this.editorIsHidden=!E.wrapper.offsetWidth,this.wrapperHeight=E.wrapper.clientHeight,this.wrapperWidth=E.wrapper.clientWidth,this.oldDisplayWidth=bl(A),this.force=O,this.dims=zA(A),this.events=[]};Ms.prototype.signal=function(A,y){Yt(A,y)&&this.events.push(arguments)},Ms.prototype.finish=function(){for(var A=0;A<this.events.length;A++)Et.apply(null,this.events[A])};function za(A){var y=A.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Hl(A)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Hl(A)+"px",y.scrollbarsClipped=!0)}function ya(A){if(A.hasFocus())return null;var y=et(Pt(A));if(!y||!je(A.display.lineDiv,y))return null;var O={activeElt:y};if(window.getSelection){var E=jt(A).getSelection();E.anchorNode&&E.extend&&je(A.display.lineDiv,E.anchorNode)&&(O.anchorNode=E.anchorNode,O.anchorOffset=E.anchorOffset,O.focusNode=E.focusNode,O.focusOffset=E.focusOffset)}return O}function iA(A){if(!(!A||!A.activeElt||A.activeElt==et(ut(A.activeElt)))&&(A.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(A.activeElt.nodeName)&&A.anchorNode&&je(document.body,A.anchorNode)&&je(document.body,A.focusNode))){var y=A.activeElt.ownerDocument,O=y.defaultView.getSelection(),E=y.createRange();E.setEnd(A.anchorNode,A.anchorOffset),E.collapse(!1),O.removeAllRanges(),O.addRange(E),O.extend(A.focusNode,A.focusOffset)}}function Sa(A,y){var O=A.display,E=A.doc;if(y.editorIsHidden)return du(A),!1;if(!y.force&&y.visible.from>=O.viewFrom&&y.visible.to<=O.viewTo&&(O.updateLineNumbers==null||O.updateLineNumbers>=O.viewTo)&&O.renderedView==O.view&&zd(A)==0)return!1;Ad(A)&&(du(A),y.dims=zA(A));var R=E.first+E.size,H=Math.max(y.visible.from-A.options.viewportMargin,E.first),Ae=Math.min(R,y.visible.to+A.options.viewportMargin);O.viewFrom<H&&H-O.viewFrom<20&&(H=Math.max(E.first,O.viewFrom)),O.viewTo>Ae&&O.viewTo-Ae<20&&(Ae=Math.min(R,O.viewTo)),pa&&(H=So(A.doc,H),Ae=Ri(A.doc,Ae));var _e=H!=O.viewFrom||Ae!=O.viewTo||O.lastWrapHeight!=y.wrapperHeight||O.lastWrapWidth!=y.wrapperWidth;Rc(A,H,Ae),O.viewOffset=to(Mr(A.doc,O.viewFrom)),A.display.mover.style.top=O.viewOffset+"px";var Be=zd(A);if(!_e&&Be==0&&!y.force&&O.renderedView==O.view&&(O.updateLineNumbers==null||O.updateLineNumbers>=O.viewTo))return!1;var Le=ya(A);return Be>4&&(O.lineDiv.style.display="none"),zc(A,O.updateLineNumbers,y.dims),Be>4&&(O.lineDiv.style.display=""),O.renderedView=O.view,iA(Le),oe(O.cursorDiv),oe(O.selectionDiv),O.gutters.style.height=O.sizer.style.minHeight=0,_e&&(O.lastWrapHeight=y.wrapperHeight,O.lastWrapWidth=y.wrapperWidth,ld(A,400)),O.updateLineNumbers=null,!0}function dr(A,y){for(var O=y.viewport,E=!0;;E=!1){if(!E||!A.options.lineWrapping||y.oldDisplayWidth==bl(A)){if(O&&O.top!=null&&(O={top:Math.min(A.doc.height+Ld(A.display)-FA(A),O.top)}),y.visible=Iu(A.display,A.doc,O),y.visible.from>=A.display.viewFrom&&y.visible.to<=A.display.viewTo)break}else E&&(y.visible=Iu(A.display,A.doc,O));if(!Sa(A,y))break;Lc(A);var R=gA(A);Rs(A),Tu(A,R),VA(A,R),y.force=!1}y.signal(A,"update",A),(A.display.viewFrom!=A.display.reportedViewFrom||A.display.viewTo!=A.display.reportedViewTo)&&(y.signal(A,"viewportChange",A,A.display.viewFrom,A.display.viewTo),A.display.reportedViewFrom=A.display.viewFrom,A.display.reportedViewTo=A.display.viewTo)}function ys(A,y){var O=new Ms(A,y);if(Sa(A,O)){Lc(A),dr(A,O);var E=gA(A);Rs(A),Tu(A,E),VA(A,E),O.finish()}}function zc(A,y,O){var E=A.display,R=A.options.lineNumbers,H=E.lineDiv,Ae=H.firstChild;function _e(xn){var Rn=xn.nextSibling;return b&&$&&A.display.currentWheelTarget==xn?xn.style.display="none":xn.parentNode.removeChild(xn),Rn}for(var Be=E.view,Le=E.viewFrom,ht=0;ht<Be.length;ht++){var xt=Be[ht];if(!xt.hidden)if(!xt.node||xt.node.parentNode!=H){var Jt=Dp(A,xt,Le,O);H.insertBefore(Jt,Ae)}else{for(;Ae!=xt.node;)Ae=_e(Ae);var Qt=R&&y!=null&&y<=Le&&xt.lineNumber;xt.changes&&(tt(xt.changes,"gutter")>-1&&(Qt=!1),Fh(A,xt,Le,O)),Qt&&(oe(xt.lineNumber),xt.lineNumber.appendChild(document.createTextNode(jn(A.options,Le)))),Ae=xt.node.nextSibling}Le+=xt.size}for(;Ae;)Ae=_e(Ae)}function Ss(A){var y=A.gutters.offsetWidth;A.sizer.style.marginLeft=y+"px",Ha(A,"gutterChanged",A)}function VA(A,y){A.display.sizer.style.minHeight=y.docHeight+"px",A.display.heightForcer.style.top=y.docHeight+"px",A.display.gutters.style.height=y.docHeight+A.display.barHeight+Hl(A)+"px"}function ud(A){var y=A.display,O=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!A.options.fixedGutter))){for(var E=Fo(y)-y.scroller.scrollLeft+A.doc.scrollLeft,R=y.gutters.offsetWidth,H=E+"px",Ae=0;Ae<O.length;Ae++)if(!O[Ae].hidden){A.options.fixedGutter&&(O[Ae].gutter&&(O[Ae].gutter.style.left=H),O[Ae].gutterBackground&&(O[Ae].gutterBackground.style.left=H));var _e=O[Ae].alignable;if(_e)for(var Be=0;Be<_e.length;Be++)_e[Be].style.left=H}A.options.fixedGutter&&(y.gutters.style.left=E+R+"px")}}function Ad(A){if(!A.options.lineNumbers)return!1;var y=A.doc,O=jn(A.options,y.first+y.size-1),E=A.display;if(O.length!=E.lineNumChars){var R=E.measure.appendChild(ye("div",[ye("div",O)],"CodeMirror-linenumber CodeMirror-gutter-elt")),H=R.firstChild.offsetWidth,Ae=R.offsetWidth-H;return E.lineGutter.style.width="",E.lineNumInnerWidth=Math.max(H,E.lineGutter.offsetWidth-Ae)+1,E.lineNumWidth=E.lineNumInnerWidth+Ae,E.lineNumChars=E.lineNumInnerWidth?O.length:-1,E.lineGutter.style.width=E.lineNumWidth+"px",Ss(A.display),!0}return!1}function Si(A,y){for(var O=[],E=!1,R=0;R<A.length;R++){var H=A[R],Ae=null;if(typeof H!="string"&&(Ae=H.style,H=H.className),H=="CodeMirror-linenumbers")if(y)E=!0;else continue;O.push({className:H,style:Ae})}return y&&!E&&O.push({className:"CodeMirror-linenumbers",style:null}),O}function cd(A){var y=A.gutters,O=A.gutterSpecs;oe(y),A.lineGutter=null;for(var E=0;E<O.length;++E){var R=O[E],H=R.className,Ae=R.style,_e=y.appendChild(ye("div",null,"CodeMirror-gutter "+H));Ae&&(_e.style.cssText=Ae),H=="CodeMirror-linenumbers"&&(A.lineGutter=_e,_e.style.width=(A.lineNumWidth||1)+"px")}y.style.display=O.length?"":"none",Ss(A)}function Ul(A){cd(A.display),Sl(A),ud(A)}function dd(A,y,O,E){var R=this;this.input=O,R.scrollbarFiller=ye("div",null,"CodeMirror-scrollbar-filler"),R.scrollbarFiller.setAttribute("cm-not-content","true"),R.gutterFiller=ye("div",null,"CodeMirror-gutter-filler"),R.gutterFiller.setAttribute("cm-not-content","true"),R.lineDiv=nt("div",null,"CodeMirror-code"),R.selectionDiv=ye("div",null,null,"position: relative; z-index: 1"),R.cursorDiv=ye("div",null,"CodeMirror-cursors"),R.measure=ye("div",null,"CodeMirror-measure"),R.lineMeasure=ye("div",null,"CodeMirror-measure"),R.lineSpace=nt("div",[R.measure,R.lineMeasure,R.selectionDiv,R.cursorDiv,R.lineDiv],null,"position: relative; outline: none");var H=nt("div",[R.lineSpace],"CodeMirror-lines");R.mover=ye("div",[H],null,"position: relative"),R.sizer=ye("div",[R.mover],"CodeMirror-sizer"),R.sizerWidth=null,R.heightForcer=ye("div",null,null,"position: absolute; height: "+mt+"px; width: 1px;"),R.gutters=ye("div",null,"CodeMirror-gutters"),R.lineGutter=null,R.scroller=ye("div",[R.sizer,R.heightForcer,R.gutters],"CodeMirror-scroll"),R.scroller.setAttribute("tabIndex","-1"),R.wrapper=ye("div",[R.scrollbarFiller,R.gutterFiller,R.scroller],"CodeMirror"),S&&B>=105&&(R.wrapper.style.clipPath="inset(0px)"),R.wrapper.setAttribute("translate","no"),f&&g<8&&(R.gutters.style.zIndex=-1,R.scroller.style.paddingRight=0),!b&&!(i&&J)&&(R.scroller.draggable=!0),A&&(A.appendChild?A.appendChild(R.wrapper):A(R.wrapper)),R.viewFrom=R.viewTo=y.first,R.reportedViewFrom=R.reportedViewTo=y.first,R.view=[],R.renderedView=null,R.externalMeasured=null,R.viewOffset=0,R.lastWrapHeight=R.lastWrapWidth=0,R.updateLineNumbers=null,R.nativeBarWidth=R.barHeight=R.barWidth=0,R.scrollbarsClipped=!1,R.lineNumWidth=R.lineNumInnerWidth=R.lineNumChars=null,R.alignWidgets=!1,R.cachedCharWidth=R.cachedTextHeight=R.cachedPaddingH=null,R.maxLine=null,R.maxLineLength=0,R.maxLineChanged=!1,R.wheelDX=R.wheelDY=R.wheelStartX=R.wheelStartY=null,R.shift=!1,R.selForContextMenu=null,R.activeTouch=null,R.gutterSpecs=Si(E.gutters,E.lineNumbers),cd(R),O.init(R)}var hd=0,vA=null;f?vA=-.53:i?vA=15:S?vA=-.7:U&&(vA=-1/3);function HA(A){var y=A.wheelDeltaX,O=A.wheelDeltaY;return y==null&&A.detail&&A.axis==A.HORIZONTAL_AXIS&&(y=A.detail),O==null&&A.detail&&A.axis==A.VERTICAL_AXIS?O=A.detail:O==null&&(O=A.wheelDelta),{x:y,y:O}}function oA(A){var y=HA(A);return y.x*=vA,y.y*=vA,y}function pc(A,y){S&&B==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 O=HA(y),E=O.x,R=O.y,H=vA;y.deltaMode===0&&(E=y.deltaX,R=y.deltaY,H=1);var Ae=A.display,_e=Ae.scroller,Be=_e.scrollWidth>_e.clientWidth,Le=_e.scrollHeight>_e.clientHeight;if(E&&Be||R&&Le){if(R&&$&&b){e:for(var ht=y.target,xt=Ae.view;ht!=_e;ht=ht.parentNode)for(var Jt=0;Jt<xt.length;Jt++)if(xt[Jt].node==ht){A.display.currentWheelTarget=ht;break e}}if(E&&!i&&!P&&H!=null){R&&Le&&ku(A,Math.max(0,_e.scrollTop+R*H)),Fl(A,Math.max(0,_e.scrollLeft+E*H)),(!R||R&&Le)&&wt(y),Ae.wheelStartX=null;return}if(R&&H!=null){var Qt=R*H,xn=A.doc.scrollTop,Rn=xn+Ae.wrapper.clientHeight;Qt<0?xn=Math.max(0,xn+Qt-50):Rn=Math.min(A.doc.height,Rn+Qt+50),ys(A,{top:xn,bottom:Rn})}hd<20&&y.deltaMode!==0&&(Ae.wheelStartX==null?(Ae.wheelStartX=_e.scrollLeft,Ae.wheelStartY=_e.scrollTop,Ae.wheelDX=E,Ae.wheelDY=R,setTimeout(function(){if(Ae.wheelStartX!=null){var Yn=_e.scrollLeft-Ae.wheelStartX,Xn=_e.scrollTop-Ae.wheelStartY,yr=Xn&&Ae.wheelDY&&Xn/Ae.wheelDY||Yn&&Ae.wheelDX&&Yn/Ae.wheelDX;Ae.wheelStartX=Ae.wheelStartY=null,yr&&(vA=(vA*hd+yr)/(hd+1),++hd)}},200)):(Ae.wheelDX+=E,Ae.wheelDY+=R))}}var Ea=function(A,y){this.ranges=A,this.primIndex=y};Ea.prototype.primary=function(){return this.ranges[this.primIndex]},Ea.prototype.equals=function(A){if(A==this)return!0;if(A.primIndex!=this.primIndex||A.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var O=this.ranges[y],E=A.ranges[y];if(!_i(O.anchor,E.anchor)||!_i(O.head,E.head))return!1}return!0},Ea.prototype.deepCopy=function(){for(var A=[],y=0;y<this.ranges.length;y++)A[y]=new bo(Ki(this.ranges[y].anchor),Ki(this.ranges[y].head));return new Ea(A,this.primIndex)},Ea.prototype.somethingSelected=function(){for(var A=0;A<this.ranges.length;A++)if(!this.ranges[A].empty())return!0;return!1},Ea.prototype.contains=function(A,y){y||(y=A);for(var O=0;O<this.ranges.length;O++){var E=this.ranges[O];if(Qn(y,E.from())>=0&&Qn(A,E.to())<=0)return O}return-1};var bo=function(A,y){this.anchor=A,this.head=y};bo.prototype.from=function(){return aa(this.anchor,this.head)},bo.prototype.to=function(){return Xi(this.anchor,this.head)},bo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fu(A,y,O){var E=A&&A.options.selectionsMayTouch,R=y[O];y.sort(function(Jt,Qt){return Qn(Jt.from(),Qt.from())}),O=tt(y,R);for(var H=1;H<y.length;H++){var Ae=y[H],_e=y[H-1],Be=Qn(_e.to(),Ae.from());if(E&&!Ae.empty()?Be>0:Be>=0){var Le=aa(_e.from(),Ae.from()),ht=Xi(_e.to(),Ae.to()),xt=_e.empty()?Ae.from()==Ae.head:_e.from()==_e.head;H<=O&&--O,y.splice(--H,2,new bo(xt?ht:Le,xt?Le:ht))}}return new Ea(y,O)}function Ls(A,y){return new Ea([new bo(A,y||A)],0)}function Ka(A){return A.text?An(A.from.line+A.text.length-1,ar(A.text).length+(A.text.length==1?A.from.ch:0)):A.to}function Ho(A,y){if(Qn(A,y.from)<0)return A;if(Qn(A,y.to)<=0)return Ka(y);var O=A.line+y.text.length-(y.to.line-y.from.line)-1,E=A.ch;return A.line==y.to.line&&(E+=Ka(y).ch-y.to.ch),An(O,E)}function Zl(A,y){for(var O=[],E=0;E<A.sel.ranges.length;E++){var R=A.sel.ranges[E];O.push(new bo(Ho(R.anchor,y),Ho(R.head,y)))}return fu(A.cm,O,A.sel.primIndex)}function Du(A,y,O){return A.line==y.line?An(O.line,A.ch-y.ch+O.ch):An(O.line+(A.line-y.line),A.ch)}function mc(A,y,O){for(var E=[],R=An(A.first,0),H=R,Ae=0;Ae<y.length;Ae++){var _e=y[Ae],Be=Du(_e.from,R,H),Le=Du(Ka(_e),R,H);if(R=_e.to,H=Le,O=="around"){var ht=A.sel.ranges[Ae],xt=Qn(ht.head,ht.anchor)<0;E[Ae]=new bo(xt?Le:Be,xt?Be:Le)}else E[Ae]=new bo(Be,Be)}return new Ea(E,A.sel.primIndex)}function qd(A){A.doc.mode=wo(A.options,A.doc.modeOption),_A(A)}function _A(A){A.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),A.doc.modeFrontier=A.doc.highlightFrontier=A.doc.first,ld(A,100),A.state.modeGen++,A.curOp&&Sl(A)}function gc(A,y){return y.from.ch==0&&y.to.ch==0&&ar(y.text)==""&&(!A.cm||A.cm.options.wholeLineUpdateBefore)}function ma(A,y,O,E){function R(yr){return O?O[yr]:null}function H(yr,or,Tr){su(yr,or,Tr,E),Ha(yr,"change",yr,y)}function Ae(yr,or){for(var Tr=[],li=yr;li<or;++li)Tr.push(new Ks(Le[li],R(li),E));return Tr}var _e=y.from,Be=y.to,Le=y.text,ht=Mr(A,_e.line),xt=Mr(A,Be.line),Jt=ar(Le),Qt=R(Le.length-1),xn=Be.line-_e.line;if(y.full)A.insert(0,Ae(0,Le.length)),A.remove(Le.length,A.size-Le.length);else if(gc(A,y)){var Rn=Ae(0,Le.length-1);H(xt,xt.text,Qt),xn&&A.remove(_e.line,xn),Rn.length&&A.insert(_e.line,Rn)}else if(ht==xt)if(Le.length==1)H(ht,ht.text.slice(0,_e.ch)+Jt+ht.text.slice(Be.ch),Qt);else{var Yn=Ae(1,Le.length-1);Yn.push(new Ks(Jt+ht.text.slice(Be.ch),Qt,E)),H(ht,ht.text.slice(0,_e.ch)+Le[0],R(0)),A.insert(_e.line+1,Yn)}else if(Le.length==1)H(ht,ht.text.slice(0,_e.ch)+Le[0]+xt.text.slice(Be.ch),R(0)),A.remove(_e.line+1,xn);else{H(ht,ht.text.slice(0,_e.ch)+Le[0],R(0)),H(xt,Jt+xt.text.slice(Be.ch),Qt);var Xn=Ae(1,Le.length-1);xn>1&&A.remove(_e.line+1,xn-1),A.insert(_e.line+1,Xn)}Ha(A,"change",A,y)}function cs(A,y,O){function E(R,H,Ae){if(R.linked)for(var _e=0;_e<R.linked.length;++_e){var Be=R.linked[_e];if(Be.doc!=H){var Le=Ae&&Be.sharedHist;O&&!Le||(y(Be.doc,Le),E(Be.doc,R,Le))}}}E(A,null,!0)}function cr(A,y){if(y.cm)throw new Error("This document is already in use.");A.doc=y,y.cm=A,NA(A),qd(A),qr(A),A.options.direction=y.direction,A.options.lineWrapping||gs(A),A.options.mode=y.modeOption,Sl(A)}function qr(A){(A.doc.direction=="rtl"?Ue:re)(A.display.lineDiv,"CodeMirror-rtl")}function Lu(A){Eo(A,function(){qr(A),Sl(A)})}function ZA(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 pu(A,y){var O={from:Ki(y.from),to:Ka(y),text:ms(A,y.from,y.to)};return Oa(A,O,y.from.line,y.to.line+1),cs(A,function(E){return Oa(E,O,y.from.line,y.to.line+1)},!0),O}function va(A){for(;A.length;){var y=ar(A);if(y.ranges)A.pop();else break}}function _f(A,y){if(y)return va(A.done),ar(A.done);if(A.done.length&&!ar(A.done).ranges)return ar(A.done);if(A.done.length>1&&!A.done[A.done.length-2].ranges)return A.done.pop(),ar(A.done)}function Xl(A,y,O,E){var R=A.history;R.undone.length=0;var H=+new Date,Ae,_e;if((R.lastOp==E||R.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&R.lastModTime>H-(A.cm?A.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(Ae=_f(R,R.lastOp==E)))_e=ar(Ae.changes),Qn(y.from,y.to)==0&&Qn(y.from,_e.to)==0?_e.to=Ka(y):Ae.changes.push(pu(A,y));else{var Be=ar(R.done);for((!Be||!Be.ranges)&&To(A.sel,R.done),Ae={changes:[pu(A,y)],generation:R.generation},R.done.push(Ae);R.done.length>R.undoDepth;)R.done.shift(),R.done[0].ranges||R.done.shift()}R.done.push(O),R.generation=++R.maxGeneration,R.lastModTime=R.lastSelTime=H,R.lastOp=R.lastSelOp=E,R.lastOrigin=R.lastSelOrigin=y.origin,_e||Et(A,"historyAdded")}function Cf(A,y,O,E){var R=y.charAt(0);return R=="*"||R=="+"&&O.ranges.length==E.ranges.length&&O.somethingSelected()==E.somethingSelected()&&new Date-A.history.lastSelTime<=(A.cm?A.cm.options.historyEventDelay:500)}function mu(A,y,O,E){var R=A.history,H=E&&E.origin;O==R.lastSelOp||H&&R.lastSelOrigin==H&&(R.lastModTime==R.lastSelTime&&R.lastOrigin==H||Cf(A,H,ar(R.done),y))?R.done[R.done.length-1]=y:To(y,R.done),R.lastSelTime=+new Date,R.lastSelOrigin=H,R.lastSelOp=O,E&&E.clearRedo!==!1&&va(R.undone)}function To(A,y){var O=ar(y);O&&O.ranges&&O.equals(A)||y.push(A)}function Oa(A,y,O,E){var R=y["spans_"+A.id],H=0;A.iter(Math.max(A.first,O),Math.min(A.first+A.size,E),function(Ae){Ae.markedSpans&&((R||(R=y["spans_"+A.id]={}))[H]=Ae.markedSpans),++H})}function Yd(A){if(!A)return null;for(var y,O=0;O<A.length;++O)A[O].marker.explicitlyCleared?y||(y=A.slice(0,O)):y&&y.push(A[O]);return y?y.length?y:null:A}function CA(A,y){var O=y["spans_"+A.id];if(!O)return null;for(var E=[],R=0;R<y.text.length;++R)E.push(Yd(O[R]));return E}function $d(A,y){var O=CA(A,y),E=Zr(A,y);if(!O)return E;if(!E)return O;for(var R=0;R<O.length;++R){var H=O[R],Ae=E[R];if(H&&Ae)e:for(var _e=0;_e<Ae.length;++_e){for(var Be=Ae[_e],Le=0;Le<H.length;++Le)if(H[Le].marker==Be.marker)continue e;H.push(Be)}else Ae&&(O[R]=Ae)}return O}function bA(A,y,O){for(var E=[],R=0;R<A.length;++R){var H=A[R];if(H.ranges){E.push(O?Ea.prototype.deepCopy.call(H):H);continue}var Ae=H.changes,_e=[];E.push({changes:_e});for(var Be=0;Be<Ae.length;++Be){var Le=Ae[Be],ht=void 0;if(_e.push({from:Le.from,to:Le.to,text:Le.text}),y)for(var xt in Le)(ht=xt.match(/^spans_(\d+)$/))&&tt(y,Number(ht[1]))>-1&&(ar(_e)[xt]=Le[xt],delete Le[xt])}}return E}function Na(A,y,O,E){if(E){var R=A.anchor;if(O){var H=Qn(y,R)<0;H!=Qn(O,R)<0?(R=y,y=O):H!=Qn(y,O)<0&&(y=O)}return new bo(R,y)}else return new bo(O||y,y)}function yc(A,y,O,E,R){R==null&&(R=A.cm&&(A.cm.display.shift||A.extend)),vs(A,new Ea([Na(A.sel.primary(),y,O,R)],0),E)}function jl(A,y,O){for(var E=[],R=A.cm&&(A.cm.display.shift||A.extend),H=0;H<A.sel.ranges.length;H++)E[H]=Na(A.sel.ranges[H],y[H],null,R);var Ae=fu(A.cm,E,A.sel.primIndex);vs(A,Ae,O)}function ol(A,y,O,E){var R=A.sel.ranges.slice(0);R[y]=O,vs(A,fu(A.cm,R,A.sel.primIndex),E)}function Fu(A,y,O,E){vs(A,Ls(y,O),E)}function vc(A,y,O){var E={ranges:y.ranges,update:function(R){this.ranges=[];for(var H=0;H<R.length;H++)this.ranges[H]=new bo(Hr(A,R[H].anchor),Hr(A,R[H].head))},origin:O&&O.origin};return Et(A,"beforeSelectionChange",A,E),A.cm&&Et(A.cm,"beforeSelectionChange",A.cm,E),E.ranges!=y.ranges?fu(A.cm,E.ranges,E.ranges.length-1):y}function gu(A,y,O){var E=A.history.done,R=ar(E);R&&R.ranges?(E[E.length-1]=y,Za(A,y,O)):vs(A,y,O)}function vs(A,y,O){Za(A,y,O),mu(A,A.sel,A.cm?A.cm.curOp.id:NaN,O)}function Za(A,y,O){(Yt(A,"beforeSelectionChange")||A.cm&&Yt(A.cm,"beforeSelectionChange"))&&(y=vc(A,y,O));var E=O&&O.bias||(Qn(y.primary().head,A.sel.primary().head)<0?-1:1);Jl(A,aA(A,y,E,!0)),!(O&&O.scroll===!1)&&A.cm&&A.cm.getOption("readOnly")!="nocursor"&&Uo(A.cm)}function Jl(A,y){y.equals(A.sel)||(A.sel=y,A.cm&&(A.cm.curOp.updateInput=1,A.cm.curOp.selectionChanged=!0,nn(A.cm)),Ha(A,"cursorActivity",A))}function eu(A){Jl(A,aA(A,A.sel,null,!1))}function aA(A,y,O,E){for(var R,H=0;H<y.ranges.length;H++){var Ae=y.ranges[H],_e=y.ranges.length==A.sel.ranges.length&&A.sel.ranges[H],Be=_c(A,Ae.anchor,_e&&_e.anchor,O,E),Le=Ae.head==Ae.anchor?Be:_c(A,Ae.head,_e&&_e.head,O,E);(R||Be!=Ae.anchor||Le!=Ae.head)&&(R||(R=y.ranges.slice(0,H)),R[H]=new bo(Be,Le))}return R?fu(A.cm,R,y.primIndex):y}function yu(A,y,O,E,R){var H=Mr(A,y.line);if(H.markedSpans)for(var Ae=0;Ae<H.markedSpans.length;++Ae){var _e=H.markedSpans[Ae],Be=_e.marker,Le="selectLeft"in Be?!Be.selectLeft:Be.inclusiveLeft,ht="selectRight"in Be?!Be.selectRight:Be.inclusiveRight;if((_e.from==null||(Le?_e.from<=y.ch:_e.from<y.ch))&&(_e.to==null||(ht?_e.to>=y.ch:_e.to>y.ch))){if(R&&(Et(Be,"beforeCursorEnter"),Be.explicitlyCleared))if(H.markedSpans){--Ae;continue}else break;if(!Be.atomic)continue;if(O){var xt=Be.find(E<0?1:-1),Jt=void 0;if((E<0?ht:Le)&&(xt=Uu(A,xt,-E,xt&&xt.line==y.line?H:null)),xt&&xt.line==y.line&&(Jt=Qn(xt,O))&&(E<0?Jt<0:Jt>0))return yu(A,xt,y,E,R)}var Qt=Be.find(E<0?-1:1);return(E<0?Le:ht)&&(Qt=Uu(A,Qt,E,Qt.line==y.line?H:null)),Qt?yu(A,Qt,y,E,R):null}}return y}function _c(A,y,O,E,R){var H=E||1,Ae=yu(A,y,O,H,R)||!R&&yu(A,y,O,H,!0)||yu(A,y,O,-H,R)||!R&&yu(A,y,O,-H,!0);return Ae||(A.cantEdit=!0,An(A.first,0))}function Uu(A,y,O,E){return O<0&&y.ch==0?y.line>A.first?Hr(A,An(y.line-1)):null:O>0&&y.ch==(E||Mr(A,y.line)).text.length?y.line<A.first+A.size-1?An(y.line+1,0):null:new An(y.line,y.ch+O)}function zl(A){A.setSelection(An(A.firstLine(),0),An(A.lastLine()),Lt)}function fd(A,y,O){var E={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return E.canceled=!0}};return O&&(E.update=function(R,H,Ae,_e){R&&(E.from=Hr(A,R)),H&&(E.to=Hr(A,H)),Ae&&(E.text=Ae),_e!==void 0&&(E.origin=_e)}),Et(A,"beforeChange",A,E),A.cm&&Et(A.cm,"beforeChange",A.cm,E),E.canceled?(A.cm&&(A.cm.curOp.updateInput=2),null):{from:E.from,to:E.to,text:E.text,origin:E.origin}}function k(A,y,O){if(A.cm){if(!A.cm.curOp)return Li(A.cm,k)(A,y,O);if(A.cm.state.suppressEdits)return}if(!((Yt(A,"beforeChange")||A.cm&&Yt(A.cm,"beforeChange"))&&(y=fd(A,y,!0),!y))){var E=co&&!O&&Wi(A,y.from,y.to);if(E)for(var R=E.length-1;R>=0;--R)l(A,{from:E[R].from,to:E[R].to,text:R?[""]:y.text,origin:y.origin});else l(A,y)}}function l(A,y){if(!(y.text.length==1&&y.text[0]==""&&Qn(y.from,y.to)==0)){var O=Zl(A,y);Xl(A,y,O,A.cm?A.cm.curOp.id:NaN),M(A,y,O,Zr(A,y));var E=[];cs(A,function(R,H){!H&&tt(E,R.history)==-1&&(se(R.history,y),E.push(R.history)),M(R,y,null,Zr(R,y))})}}function c(A,y,O){var E=A.cm&&A.cm.state.suppressEdits;if(!(E&&!O)){for(var R=A.history,H,Ae=A.sel,_e=y=="undo"?R.done:R.undone,Be=y=="undo"?R.undone:R.done,Le=0;Le<_e.length&&(H=_e[Le],!(O?H.ranges&&!H.equals(A.sel):!H.ranges));Le++);if(Le!=_e.length){for(R.lastOrigin=R.lastSelOrigin=null;;)if(H=_e.pop(),H.ranges){if(To(H,Be),O&&!H.equals(A.sel)){vs(A,H,{clearRedo:!1});return}Ae=H}else if(E){_e.push(H);return}else break;var ht=[];To(Ae,Be),Be.push({changes:ht,generation:R.generation}),R.generation=H.generation||++R.maxGeneration;for(var xt=Yt(A,"beforeChange")||A.cm&&Yt(A.cm,"beforeChange"),Jt=function(Rn){var Yn=H.changes[Rn];if(Yn.origin=y,xt&&!fd(A,Yn,!1))return _e.length=0,{};ht.push(pu(A,Yn));var Xn=Rn?Zl(A,Yn):ar(_e);M(A,Yn,Xn,$d(A,Yn)),!Rn&&A.cm&&A.cm.scrollIntoView({from:Yn.from,to:Ka(Yn)});var yr=[];cs(A,function(or,Tr){!Tr&&tt(yr,or.history)==-1&&(se(or.history,Yn),yr.push(or.history)),M(or,Yn,null,$d(or,Yn))})},Qt=H.changes.length-1;Qt>=0;--Qt){var xn=Jt(Qt);if(xn)return xn.v}}}}function C(A,y){if(y!=0&&(A.first+=y,A.sel=new Ea(Cr(A.sel.ranges,function(R){return new bo(An(R.anchor.line+y,R.anchor.ch),An(R.head.line+y,R.head.ch))}),A.sel.primIndex),A.cm)){Sl(A.cm,A.first,A.first-y,y);for(var O=A.cm.display,E=O.viewFrom;E<O.viewTo;E++)cc(A.cm,E,"gutter")}}function M(A,y,O,E){if(A.cm&&!A.cm.curOp)return Li(A.cm,M)(A,y,O,E);if(y.to.line<A.first){C(A,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>A.lastLine())){if(y.from.line<A.first){var R=y.text.length-1-(A.first-y.from.line);C(A,R),y={from:An(A.first,0),to:An(y.to.line+R,y.to.ch),text:[ar(y.text)],origin:y.origin}}var H=A.lastLine();y.to.line>H&&(y={from:y.from,to:An(H,Mr(A,H).text.length),text:[y.text[0]],origin:y.origin}),y.removed=ms(A,y.from,y.to),O||(O=Zl(A,y)),A.cm?K(A.cm,y,E):ma(A,y,E),Za(A,O,Lt),A.cantEdit&&_c(A,An(A.firstLine(),0))&&(A.cantEdit=!1)}}function K(A,y,O){var E=A.doc,R=A.display,H=y.from,Ae=y.to,_e=!1,Be=H.line;A.options.lineWrapping||(Be=Ge(pr(Mr(E,H.line))),E.iter(Be,Ae.line+1,function(Qt){if(Qt==R.maxLine)return _e=!0,!0})),E.sel.contains(y.from,y.to)>-1&&nn(A),ma(E,y,O,Kc(A)),A.options.lineWrapping||(E.iter(Be,H.line+y.text.length,function(Qt){var xn=la(Qt);xn>R.maxLineLength&&(R.maxLine=Qt,R.maxLineLength=xn,R.maxLineChanged=!0,_e=!1)}),_e&&(A.curOp.updateMaxLine=!0)),$a(E,H.line),ld(A,400);var Le=y.text.length-(Ae.line-H.line)-1;y.full?Sl(A):H.line==Ae.line&&y.text.length==1&&!gc(A.doc,y)?cc(A,H.line,"text"):Sl(A,H.line,Ae.line+1,Le);var ht=Yt(A,"changes"),xt=Yt(A,"change");if(xt||ht){var Jt={from:H,to:Ae,text:y.text,removed:y.removed,origin:y.origin};xt&&Ha(A,"change",A,Jt),ht&&(A.curOp.changeObjs||(A.curOp.changeObjs=[])).push(Jt)}A.display.selForContextMenu=null}function z(A,y,O,E,R){var H;E||(E=O),Qn(E,O)<0&&(H=[E,O],O=H[0],E=H[1]),typeof y=="string"&&(y=A.splitLines(y)),k(A,{from:O,to:E,text:y,origin:R})}function Y(A,y,O,E){O<A.line?A.line+=E:y<A.line&&(A.line=y,A.ch=0)}function ne(A,y,O,E){for(var R=0;R<A.length;++R){var H=A[R],Ae=!0;if(H.ranges){H.copied||(H=A[R]=H.deepCopy(),H.copied=!0);for(var _e=0;_e<H.ranges.length;_e++)Y(H.ranges[_e].anchor,y,O,E),Y(H.ranges[_e].head,y,O,E);continue}for(var Be=0;Be<H.changes.length;++Be){var Le=H.changes[Be];if(O<Le.from.line)Le.from=An(Le.from.line+E,Le.from.ch),Le.to=An(Le.to.line+E,Le.to.ch);else if(y<=Le.to.line){Ae=!1;break}}Ae||(A.splice(0,R+1),R=0)}}function se(A,y){var O=y.from.line,E=y.to.line,R=y.text.length-(E-O)-1;ne(A.done,O,E,R),ne(A.undone,O,E,R)}function be(A,y,O,E){var R=y,H=y;return typeof y=="number"?H=Mr(A,Mu(A,y)):R=Ge(y),R==null?null:(E(H,R)&&A.cm&&cc(A.cm,R,O),H)}function Oe(A){this.lines=A,this.parent=null;for(var y=0,O=0;O<A.length;++O)A[O].parent=this,y+=A[O].height;this.height=y}Oe.prototype={chunkSize:function(){return this.lines.length},removeInner:function(A,y){for(var O=A,E=A+y;O<E;++O){var R=this.lines[O];this.height-=R.height,Va(R),Ha(R,"delete")}this.lines.splice(A,y)},collapse:function(A){A.push.apply(A,this.lines)},insertInner:function(A,y,O){this.height+=O,this.lines=this.lines.slice(0,A).concat(y).concat(this.lines.slice(A));for(var E=0;E<y.length;++E)y[E].parent=this},iterN:function(A,y,O){for(var E=A+y;A<E;++A)if(O(this.lines[A]))return!0}};function Te(A){this.children=A;for(var y=0,O=0,E=0;E<A.length;++E){var R=A[E];y+=R.chunkSize(),O+=R.height,R.parent=this}this.size=y,this.height=O,this.parent=null}Te.prototype={chunkSize:function(){return this.size},removeInner:function(A,y){this.size-=y;for(var O=0;O<this.children.length;++O){var E=this.children[O],R=E.chunkSize();if(A<R){var H=Math.min(y,R-A),Ae=E.height;if(E.removeInner(A,H),this.height-=Ae-E.height,R==H&&(this.children.splice(O--,1),E.parent=null),(y-=H)==0)break;A=0}else A-=R}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof Oe))){var _e=[];this.collapse(_e),this.children=[new Oe(_e)],this.children[0].parent=this}},collapse:function(A){for(var y=0;y<this.children.length;++y)this.children[y].collapse(A)},insertInner:function(A,y,O){this.size+=y.length,this.height+=O;for(var E=0;E<this.children.length;++E){var R=this.children[E],H=R.chunkSize();if(A<=H){if(R.insertInner(A,y,O),R.lines&&R.lines.length>50){for(var Ae=R.lines.length%25+25,_e=Ae;_e<R.lines.length;){var Be=new Oe(R.lines.slice(_e,_e+=25));R.height-=Be.height,this.children.splice(++E,0,Be),Be.parent=this}R.lines=R.lines.slice(0,Ae),this.maybeSpill()}break}A-=H}},maybeSpill:function(){if(!(this.children.length<=10)){var A=this;do{var y=A.children.splice(A.children.length-5,5),O=new Te(y);if(A.parent){A.size-=O.size,A.height-=O.height;var R=tt(A.parent.children,A);A.parent.children.splice(R+1,0,O)}else{var E=new Te(A.children);E.parent=A,A.children=[E,O],A=E}O.parent=A.parent}while(A.children.length>10);A.parent.maybeSpill()}},iterN:function(A,y,O){for(var E=0;E<this.children.length;++E){var R=this.children[E],H=R.chunkSize();if(A<H){var Ae=Math.min(y,H-A);if(R.iterN(A,Ae,O))return!0;if((y-=Ae)==0)break;A=0}else A-=H}}};var $e=function(A,y,O){if(O)for(var E in O)O.hasOwnProperty(E)&&(this[E]=O[E]);this.doc=A,this.node=y};$e.prototype.clear=function(){var A=this.doc.cm,y=this.line.widgets,O=this.line,E=Ge(O);if(!(E==null||!y)){for(var R=0;R<y.length;++R)y[R]==this&&y.splice(R--,1);y.length||(O.widgets=null);var H=uu(this);ba(O,Math.max(0,O.height-H)),A&&(Eo(A,function(){He(A,O,-H),cc(A,E,"widget")}),Ha(A,"lineWidgetCleared",A,this,E))}},$e.prototype.changed=function(){var A=this,y=this.height,O=this.doc.cm,E=this.line;this.height=null;var R=uu(this)-y;R&&(Nr(this.doc,E)||ba(E,E.height+R),O&&Eo(O,function(){O.curOp.forceUpdate=!0,He(O,E,R),Ha(O,"lineWidgetChanged",O,A,Ge(E))}))},Gt($e);function He(A,y,O){to(y)<(A.curOp&&A.curOp.scrollTop||A.doc.scrollTop)&&ua(A,O)}function ct(A,y,O,E){var R=new $e(A,O,E),H=A.cm;return H&&R.noHScroll&&(H.display.alignWidgets=!0),be(A,y,"widget",function(Ae){var _e=Ae.widgets||(Ae.widgets=[]);if(R.insertAt==null?_e.push(R):_e.splice(Math.min(_e.length,Math.max(0,R.insertAt)),0,R),R.line=Ae,H&&!Nr(A,Ae)){var Be=to(Ae)<A.scrollTop;ba(Ae,Ae.height+uu(R)),Be&&ua(H,R.height),H.curOp.forceUpdate=!0}return!0}),H&&Ha(H,"lineWidgetAdded",H,R,typeof y=="number"?y:Ge(y)),R}var st=0,dt=function(A,y){this.lines=[],this.type=y,this.doc=A,this.id=++st};dt.prototype.clear=function(){if(!this.explicitlyCleared){var A=this.doc.cm,y=A&&!A.curOp;if(y&&Ku(A),Yt(this,"clear")){var O=this.find();O&&Ha(this,"clear",O.from,O.to)}for(var E=null,R=null,H=0;H<this.lines.length;++H){var Ae=this.lines[H],_e=Cl(Ae.markedSpans,this);A&&!this.collapsed?cc(A,Ge(Ae),"text"):A&&(_e.to!=null&&(R=Ge(Ae)),_e.from!=null&&(E=Ge(Ae))),Ae.markedSpans=eA(Ae.markedSpans,_e),_e.from==null&&this.collapsed&&!Nr(this.doc,Ae)&&A&&ba(Ae,Ml(A.display))}if(A&&this.collapsed&&!A.options.lineWrapping)for(var Be=0;Be<this.lines.length;++Be){var Le=pr(this.lines[Be]),ht=la(Le);ht>A.display.maxLineLength&&(A.display.maxLine=Le,A.display.maxLineLength=ht,A.display.maxLineChanged=!0)}E!=null&&A&&this.collapsed&&Sl(A,E,R+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,A&&eu(A.doc)),A&&Ha(A,"markerCleared",A,this,E,R),y&&Ru(A),this.parent&&this.parent.clear()}},dt.prototype.find=function(A,y){A==null&&this.type=="bookmark"&&(A=1);for(var O,E,R=0;R<this.lines.length;++R){var H=this.lines[R],Ae=Cl(H.markedSpans,this);if(Ae.from!=null&&(O=An(y?H:Ge(H),Ae.from),A==-1))return O;if(Ae.to!=null&&(E=An(y?H:Ge(H),Ae.to),A==1))return E}return O&&{from:O,to:E}},dt.prototype.changed=function(){var A=this,y=this.find(-1,!0),O=this,E=this.doc.cm;!y||!E||Eo(E,function(){var R=y.line,H=Ge(y.line),Ae=fA(E,H);if(Ae&&(Fd(Ae),E.curOp.selectionChanged=E.curOp.forceUpdate=!0),E.curOp.updateMaxLine=!0,!Nr(O.doc,R)&&O.height!=null){var _e=O.height;O.height=null;var Be=uu(O)-_e;Be&&ba(R,R.height+Be)}Ha(E,"markerChanged",E,A)})},dt.prototype.attachLine=function(A){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||tt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(A)},dt.prototype.detachLine=function(A){if(this.lines.splice(tt(this.lines,A),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Gt(dt);function gt(A,y,O,E,R){if(E&&E.shared)return It(A,y,O,E,R);if(A.cm&&!A.cm.curOp)return Li(A.cm,gt)(A,y,O,E,R);var H=new dt(A,R),Ae=Qn(y,O);if(E&&Ke(E,H,!1),Ae>0||Ae==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=nt("span",[H.replacedWith],"CodeMirror-widget"),E.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),E.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(fi(A,y.line,y,O,H)||y.line!=O.line&&fi(A,O.line,y,O,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");qs()}H.addToHistory&&Xl(A,{from:y,to:O,origin:"markText"},A.sel,NaN);var _e=y.line,Be=A.cm,Le;if(A.iter(_e,O.line+1,function(xt){Be&&H.collapsed&&!Be.options.lineWrapping&&pr(xt)==Be.display.maxLine&&(Le=!0),H.collapsed&&_e!=y.line&&ba(xt,0),Ji(xt,new Pa(H,_e==y.line?y.ch:null,_e==O.line?O.ch:null),A.cm&&A.cm.curOp),++_e}),H.collapsed&&A.iter(y.line,O.line+1,function(xt){Nr(A,xt)&&ba(xt,0)}),H.clearOnEnter&&Qe(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(xa(),(A.history.done.length||A.history.undone.length)&&A.clearHistory()),H.collapsed&&(H.id=++st,H.atomic=!0),Be){if(Le&&(Be.curOp.updateMaxLine=!0),H.collapsed)Sl(Be,y.line,O.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var ht=y.line;ht<=O.line;ht++)cc(Be,ht,"text");H.atomic&&eu(Be.doc),Ha(Be,"markerAdded",Be,H)}return H}var St=function(A,y){this.markers=A,this.primary=y;for(var O=0;O<A.length;++O)A[O].parent=this};St.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var A=0;A<this.markers.length;++A)this.markers[A].clear();Ha(this,"clear")}},St.prototype.find=function(A,y){return this.primary.find(A,y)},Gt(St);function It(A,y,O,E,R){E=Ke(E),E.shared=!1;var H=[gt(A,y,O,E,R)],Ae=H[0],_e=E.widgetNode;return cs(A,function(Be){_e&&(E.widgetNode=_e.cloneNode(!0)),H.push(gt(Be,Hr(Be,y),Hr(Be,O),E,R));for(var Le=0;Le<Be.linked.length;++Le)if(Be.linked[Le].isParent)return;Ae=ar(H)}),new St(H,Ae)}function Kt(A){return A.findMarks(An(A.first,0),A.clipPos(An(A.lastLine())),function(y){return y.parent})}function zt(A,y){for(var O=0;O<y.length;O++){var E=y[O],R=E.find(),H=A.clipPos(R.from),Ae=A.clipPos(R.to);if(Qn(H,Ae)){var _e=gt(A,H,Ae,E.primary,E.primary.type);E.markers.push(_e),_e.parent=E}}}function Tt(A){for(var y=function(E){var R=A[E],H=[R.primary.doc];cs(R.primary.doc,function(Be){return H.push(Be)});for(var Ae=0;Ae<R.markers.length;Ae++){var _e=R.markers[Ae];tt(H,_e.doc)==-1&&(_e.parent=null,R.markers.splice(Ae--,1))}},O=0;O<A.length;O++)y(O)}var tn=0,Zt=function(A,y,O,E,R){if(!(this instanceof Zt))return new Zt(A,y,O,E,R);O==null&&(O=0),Te.call(this,[new Oe([new Ks("",null)])]),this.first=O,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=O;var H=An(O,0);this.sel=Ls(H),this.history=new ZA(null),this.id=++tn,this.modeOption=y,this.lineSep=E,this.direction=R=="rtl"?"rtl":"ltr",this.extend=!1,typeof A=="string"&&(A=this.splitLines(A)),ma(this,{from:H,to:H,text:A}),vs(this,Ls(H),Lt)};Zt.prototype=Jr(Te.prototype,{constructor:Zt,iter:function(A,y,O){O?this.iterN(A-this.first,y-A,O):this.iterN(this.first,this.first+this.size,A)},insert:function(A,y){for(var O=0,E=0;E<y.length;++E)O+=y[E].height;this.insertInner(A-this.first,y,O)},remove:function(A,y){this.removeInner(A-this.first,y)},getValue:function(A){var y=oa(this,this.first,this.first+this.size);return A===!1?y:y.join(A||this.lineSeparator())},setValue:Ma(function(A){var y=An(this.first,0),O=this.first+this.size-1;k(this,{from:y,to:An(O,Mr(this,O).text.length),text:this.splitLines(A),origin:"setValue",full:!0},!0),this.cm&&Aa(this.cm,0,0),vs(this,Ls(y),Lt)}),replaceRange:function(A,y,O,E){y=Hr(this,y),O=O?Hr(this,O):y,z(this,A,y,O,E)},getRange:function(A,y,O){var E=ms(this,Hr(this,A),Hr(this,y));return O===!1?E:O===""?E.join(""):E.join(O||this.lineSeparator())},getLine:function(A){var y=this.getLineHandle(A);return y&&y.text},getLineHandle:function(A){if(cn(this,A))return Mr(this,A)},getLineNumber:function(A){return Ge(A)},getLineHandleVisualStart:function(A){return typeof A=="number"&&(A=Mr(this,A)),pr(A)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(A){return Hr(this,A)},getCursor:function(A){var y=this.sel.primary(),O;return A==null||A=="head"?O=y.head:A=="anchor"?O=y.anchor:A=="end"||A=="to"||A===!1?O=y.to():O=y.from(),O},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ma(function(A,y,O){Fu(this,Hr(this,typeof A=="number"?An(A,y||0):A),null,O)}),setSelection:Ma(function(A,y,O){Fu(this,Hr(this,A),Hr(this,y||A),O)}),extendSelection:Ma(function(A,y,O){yc(this,Hr(this,A),y&&Hr(this,y),O)}),extendSelections:Ma(function(A,y){jl(this,rs(this,A),y)}),extendSelectionsBy:Ma(function(A,y){var O=Cr(this.sel.ranges,A);jl(this,rs(this,O),y)}),setSelections:Ma(function(A,y,O){if(A.length){for(var E=[],R=0;R<A.length;R++)E[R]=new bo(Hr(this,A[R].anchor),Hr(this,A[R].head||A[R].anchor));y==null&&(y=Math.min(A.length-1,this.sel.primIndex)),vs(this,fu(this.cm,E,y),O)}}),addSelection:Ma(function(A,y,O){var E=this.sel.ranges.slice(0);E.push(new bo(Hr(this,A),Hr(this,y||A))),vs(this,fu(this.cm,E,E.length-1),O)}),getSelection:function(A){for(var y=this.sel.ranges,O,E=0;E<y.length;E++){var R=ms(this,y[E].from(),y[E].to());O=O?O.concat(R):R}return A===!1?O:O.join(A||this.lineSeparator())},getSelections:function(A){for(var y=[],O=this.sel.ranges,E=0;E<O.length;E++){var R=ms(this,O[E].from(),O[E].to());A!==!1&&(R=R.join(A||this.lineSeparator())),y[E]=R}return y},replaceSelection:function(A,y,O){for(var E=[],R=0;R<this.sel.ranges.length;R++)E[R]=A;this.replaceSelections(E,y,O||"+input")},replaceSelections:Ma(function(A,y,O){for(var E=[],R=this.sel,H=0;H<R.ranges.length;H++){var Ae=R.ranges[H];E[H]={from:Ae.from(),to:Ae.to(),text:this.splitLines(A[H]),origin:O}}for(var _e=y&&y!="end"&&mc(this,E,y),Be=E.length-1;Be>=0;Be--)k(this,E[Be]);_e?gu(this,_e):this.cm&&Uo(this.cm)}),undo:Ma(function(){c(this,"undo")}),redo:Ma(function(){c(this,"redo")}),undoSelection:Ma(function(){c(this,"undo",!0)}),redoSelection:Ma(function(){c(this,"redo",!0)}),setExtending:function(A){this.extend=A},getExtending:function(){return this.extend},historySize:function(){for(var A=this.history,y=0,O=0,E=0;E<A.done.length;E++)A.done[E].ranges||++y;for(var R=0;R<A.undone.length;R++)A.undone[R].ranges||++O;return{undo:y,redo:O}},clearHistory:function(){var A=this;this.history=new ZA(this.history),cs(this,function(y){return y.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:bA(this.history.done),undone:bA(this.history.undone)}},setHistory:function(A){var y=this.history=new ZA(this.history);y.done=bA(A.done.slice(0),null,!0),y.undone=bA(A.undone.slice(0),null,!0)},setGutterMarker:Ma(function(A,y,O){return be(this,A,"gutter",function(E){var R=E.gutterMarkers||(E.gutterMarkers={});return R[y]=O,!O&&de(R)&&(E.gutterMarkers=null),!0})}),clearGutter:Ma(function(A){var y=this;this.iter(function(O){O.gutterMarkers&&O.gutterMarkers[A]&&be(y,O,"gutter",function(){return O.gutterMarkers[A]=null,de(O.gutterMarkers)&&(O.gutterMarkers=null),!0})})}),lineInfo:function(A){var y;if(typeof A=="number"){if(!cn(this,A)||(y=A,A=Mr(this,A),!A))return null}else if(y=Ge(A),y==null)return null;return{line:y,handle:A,text:A.text,gutterMarkers:A.gutterMarkers,textClass:A.textClass,bgClass:A.bgClass,wrapClass:A.wrapClass,widgets:A.widgets}},addLineClass:Ma(function(A,y,O){return be(this,A,y=="gutter"?"gutter":"class",function(E){var R=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!E[R])E[R]=O;else{if(Ie(O).test(E[R]))return!1;E[R]+=" "+O}return!0})}),removeLineClass:Ma(function(A,y,O){return be(this,A,y=="gutter"?"gutter":"class",function(E){var R=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",H=E[R];if(H)if(O==null)E[R]=null;else{var Ae=H.match(Ie(O));if(!Ae)return!1;var _e=Ae.index+Ae[0].length;E[R]=H.slice(0,Ae.index)+(!Ae.index||_e==H.length?"":" ")+H.slice(_e)||null}else return!1;return!0})}),addLineWidget:Ma(function(A,y,O){return ct(this,A,y,O)}),removeLineWidget:function(A){A.clear()},markText:function(A,y,O){return gt(this,Hr(this,A),Hr(this,y),O,O&&O.type||"range")},setBookmark:function(A,y){var O={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return A=Hr(this,A),gt(this,A,A,O,"bookmark")},findMarksAt:function(A){A=Hr(this,A);var y=[],O=Mr(this,A.line).markedSpans;if(O)for(var E=0;E<O.length;++E){var R=O[E];(R.from==null||R.from<=A.ch)&&(R.to==null||R.to>=A.ch)&&y.push(R.marker.parent||R.marker)}return y},findMarks:function(A,y,O){A=Hr(this,A),y=Hr(this,y);var E=[],R=A.line;return this.iter(A.line,y.line+1,function(H){var Ae=H.markedSpans;if(Ae)for(var _e=0;_e<Ae.length;_e++){var Be=Ae[_e];!(Be.to!=null&&R==A.line&&A.ch>=Be.to||Be.from==null&&R!=A.line||Be.from!=null&&R==y.line&&Be.from>=y.ch)&&(!O||O(Be.marker))&&E.push(Be.marker.parent||Be.marker)}++R}),E},getAllMarks:function(){var A=[];return this.iter(function(y){var O=y.markedSpans;if(O)for(var E=0;E<O.length;++E)O[E].from!=null&&A.push(O[E].marker)}),A},posFromIndex:function(A){var y,O=this.first,E=this.lineSeparator().length;return this.iter(function(R){var H=R.text.length+E;if(H>A)return y=A,!0;A-=H,++O}),Hr(this,An(O,y))},indexFromPos:function(A){A=Hr(this,A);var y=A.ch;if(A.line<this.first||A.ch<0)return 0;var O=this.lineSeparator().length;return this.iter(this.first,A.line,function(E){y+=E.text.length+O}),y},copy:function(A){var y=new Zt(oa(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,A&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(A){A||(A={});var y=this.first,O=this.first+this.size;A.from!=null&&A.from>y&&(y=A.from),A.to!=null&&A.to<O&&(O=A.to);var E=new Zt(oa(this,y,O),A.mode||this.modeOption,y,this.lineSep,this.direction);return A.sharedHist&&(E.history=this.history),(this.linked||(this.linked=[])).push({doc:E,sharedHist:A.sharedHist}),E.linked=[{doc:this,isParent:!0,sharedHist:A.sharedHist}],zt(E,Kt(this)),E},unlinkDoc:function(A){if(A instanceof Bo&&(A=A.doc),this.linked)for(var y=0;y<this.linked.length;++y){var O=this.linked[y];if(O.doc==A){this.linked.splice(y,1),A.unlinkDoc(this),Tt(Kt(this));break}}if(A.history==this.history){var E=[A.id];cs(A,function(R){return E.push(R.id)},!0),A.history=new ZA(null),A.history.done=bA(this.history.done,E),A.history.undone=bA(this.history.undone,E)}},iterLinkedDocs:function(A){cs(this,A)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(A){return this.lineSep?A.split(this.lineSep):zn(A)},lineSeparator:function(){return this.lineSep||`
|
||
`},setDirection:Ma(function(A){A!="rtl"&&(A="ltr"),A!=this.direction&&(this.direction=A,this.iter(function(y){return y.order=null}),this.cm&&Lu(this.cm))})}),Zt.prototype.eachLine=Zt.prototype.iter;var vn=0;function _n(A){var y=this;if(Un(y),!(Ct(y,A)||nA(y.display,A))){wt(A),f&&(vn=+new Date);var O=pA(y,A,!0),E=A.dataTransfer.files;if(!(!O||y.isReadOnly()))if(E&&E.length&&window.FileReader&&window.File)for(var R=E.length,H=Array(R),Ae=0,_e=function(){++Ae==R&&Li(y,function(){O=Hr(y.doc,O);var Qt={from:O,to:O,text:y.doc.splitLines(H.filter(function(xn){return xn!=null}).join(y.doc.lineSeparator())),origin:"paste"};k(y.doc,Qt),gu(y.doc,Ls(Hr(y.doc,O),Hr(y.doc,Ka(Qt))))})()},Be=function(Qt,xn){if(y.options.allowDropFileTypes&&tt(y.options.allowDropFileTypes,Qt.type)==-1){_e();return}var Rn=new FileReader;Rn.onerror=function(){return _e()},Rn.onload=function(){var Yn=Rn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Yn)){_e();return}H[xn]=Yn,_e()},Rn.readAsText(Qt)},Le=0;Le<E.length;Le++)Be(E[Le],Le);else{if(y.state.draggingText&&y.doc.sel.contains(O)>-1){y.state.draggingText(A),setTimeout(function(){return y.display.input.focus()},20);return}try{var ht=A.dataTransfer.getData("Text");if(ht){var xt;if(y.state.draggingText&&!y.state.draggingText.copy&&(xt=y.listSelections()),Za(y.doc,Ls(O,O)),xt)for(var Jt=0;Jt<xt.length;++Jt)z(y.doc,"",xt[Jt].anchor,xt[Jt].head,"drag");y.replaceSelection(ht,"around","paste"),y.display.input.focus()}}catch{}}}}function gn(A,y){if(f&&(!A.state.draggingText||+new Date-vn<100)){sr(y);return}if(!(Ct(A,y)||nA(A.display,y))&&(y.dataTransfer.setData("Text",A.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!U)){var O=ye("img",null,null,"position: fixed; left: 0; top: 0;");O.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",P&&(O.width=O.height=1,A.display.wrapper.appendChild(O),O._top=O.offsetTop),y.dataTransfer.setDragImage(O,0,0),P&&O.parentNode.removeChild(O)}}function In(A,y){var O=pA(A,y);if(O){var E=document.createDocumentFragment();dc(A,O,E),A.display.dragCursor||(A.display.dragCursor=ye("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),A.display.lineSpace.insertBefore(A.display.dragCursor,A.display.cursorDiv)),Se(A.display.dragCursor,E)}}function Un(A){A.display.dragCursor&&(A.display.lineSpace.removeChild(A.display.dragCursor),A.display.dragCursor=null)}function wn(A){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),O=[],E=0;E<y.length;E++){var R=y[E].CodeMirror;R&&O.push(R)}O.length&&O[0].operation(function(){for(var H=0;H<O.length;H++)A(O[H])})}}var Or=!1;function Bi(){Or||(Hi(),Or=!0)}function Hi(){var A;Qe(window,"resize",function(){A==null&&(A=setTimeout(function(){A=null,wn(Oo)},100))}),Qe(window,"blur",function(){return wn(Vo)})}function Oo(A){var y=A.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,A.setSize()}for(var Ei={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"},jo=0;jo<10;jo++)Ei[jo+48]=Ei[jo+96]=String(jo);for(var zo=65;zo<=90;zo++)Ei[zo]=String.fromCharCode(zo);for(var xo=1;xo<=12;xo++)Ei[xo+111]=Ei[xo+63235]="F"+xo;var go={};go.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"},go.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"},go.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"},go.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"]},go.default=$?go.macDefault:go.pcDefault;function Es(A){var y=A.split(/-(?!$)/);A=y[y.length-1];for(var O,E,R,H,Ae=0;Ae<y.length-1;Ae++){var _e=y[Ae];if(/^(cmd|meta|m)$/i.test(_e))H=!0;else if(/^a(lt)?$/i.test(_e))O=!0;else if(/^(c|ctrl|control)$/i.test(_e))E=!0;else if(/^s(hift)?$/i.test(_e))R=!0;else throw new Error("Unrecognized modifier name: "+_e)}return O&&(A="Alt-"+A),E&&(A="Ctrl-"+A),H&&(A="Cmd-"+A),R&&(A="Shift-"+A),A}function No(A){var y={};for(var O in A)if(A.hasOwnProperty(O)){var E=A[O];if(/^(name|fallthrough|(de|at)tach)$/.test(O))continue;if(E=="..."){delete A[O];continue}for(var R=Cr(O.split(" "),Es),H=0;H<R.length;H++){var Ae=void 0,_e=void 0;H==R.length-1?(_e=R.join(" "),Ae=E):(_e=R.slice(0,H+1).join(" "),Ae="...");var Be=y[_e];if(!Be)y[_e]=Ae;else if(Be!=Ae)throw new Error("Inconsistent bindings for "+_e)}delete A[O]}for(var Le in y)A[Le]=y[Le];return A}function ca(A,y,O,E){y=sl(y);var R=y.call?y.call(A,E):y[A];if(R===!1)return"nothing";if(R==="...")return"multi";if(R!=null&&O(R))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return ca(A,y.fallthrough,O,E);for(var H=0;H<y.fallthrough.length;H++){var Ae=ca(A,y.fallthrough[H],O,E);if(Ae)return Ae}}}function Fs(A){var y=typeof A=="string"?A:Ei[A.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ju(A,y,O){var E=A;return y.altKey&&E!="Alt"&&(A="Alt-"+A),(ge?y.metaKey:y.ctrlKey)&&E!="Ctrl"&&(A="Ctrl-"+A),(ge?y.ctrlKey:y.metaKey)&&E!="Mod"&&(A="Cmd-"+A),!O&&y.shiftKey&&E!="Shift"&&(A="Shift-"+A),A}function al(A,y){if(P&&A.keyCode==34&&A.char)return!1;var O=Ei[A.keyCode];return O==null||A.altGraphKey?!1:(A.keyCode==3&&A.code&&(O=A.code),ju(O,A,y))}function sl(A){return typeof A=="string"?go[A]:A}function tu(A,y){for(var O=A.doc.sel.ranges,E=[],R=0;R<O.length;R++){for(var H=y(O[R]);E.length&&Qn(H.from,ar(E).to)<=0;){var Ae=E.pop();if(Qn(Ae.from,H.from)<0){H.from=Ae.from;break}}E.push(H)}Eo(A,function(){for(var _e=E.length-1;_e>=0;_e--)z(A.doc,"",E[_e].from,E[_e].to,"+delete");Uo(A)})}function xA(A,y,O){var E=kt(A.text,y+O,O);return E<0||E>A.text.length?null:E}function wA(A,y,O){var E=xA(A,y.ch,O);return E==null?null:new An(y.line,E,O<0?"after":"before")}function zu(A,y,O,E,R){if(A){y.doc.direction=="rtl"&&(R=-R);var H=xe(O,y.doc.direction);if(H){var Ae=R<0?ar(H):H[0],_e=R<0==(Ae.level==1),Be=_e?"after":"before",Le;if(Ae.level>0||y.doc.direction=="rtl"){var ht=Ys(y,O);Le=R<0?O.text.length-1:0;var xt=xl(y,ht,Le).top;Le=Xt(function(Jt){return xl(y,ht,Jt).top==xt},R<0==(Ae.level==1)?Ae.from:Ae.to-1,Le),Be=="before"&&(Le=xA(O,Le,1))}else Le=R<0?Ae.to:Ae.from;return new An(E,Le,Be)}}return new An(E,R<0?O.text.length:0,R<0?"before":"after")}function Xa(A,y,O,E){var R=xe(y,A.doc.direction);if(!R)return wA(y,O,E);O.ch>=y.text.length?(O.ch=y.text.length,O.sticky="before"):O.ch<=0&&(O.ch=0,O.sticky="after");var H=qe(R,O.ch,O.sticky),Ae=R[H];if(A.doc.direction=="ltr"&&Ae.level%2==0&&(E>0?Ae.to>O.ch:Ae.from<O.ch))return wA(y,O,E);var _e=function(Xn,yr){return xA(y,Xn instanceof An?Xn.ch:Xn,yr)},Be,Le=function(Xn){return A.options.lineWrapping?(Be=Be||Ys(A,y),$o(A,y,Be,Xn)):{begin:0,end:y.text.length}},ht=Le(O.sticky=="before"?_e(O,-1):O.ch);if(A.doc.direction=="rtl"||Ae.level==1){var xt=Ae.level==1==E<0,Jt=_e(O,xt?1:-1);if(Jt!=null&&(xt?Jt<=Ae.to&&Jt<=ht.end:Jt>=Ae.from&&Jt>=ht.begin)){var Qt=xt?"before":"after";return new An(O.line,Jt,Qt)}}var xn=function(Xn,yr,or){for(var Tr=function(Io,js){return js?new An(O.line,_e(Io,1),"before"):new An(O.line,Io,"after")};Xn>=0&&Xn<R.length;Xn+=yr){var li=R[Xn],Fr=yr>0==(li.level!=1),no=Fr?or.begin:_e(or.end,-1);if(li.from<=no&&no<li.to||(no=Fr?li.from:_e(li.to,-1),or.begin<=no&&no<or.end))return Tr(no,Fr)}},Rn=xn(H+E,E,ht);if(Rn)return Rn;var Yn=E>0?ht.end:_e(ht.begin,-1);return Yn!=null&&!(E>0&&Yn==y.text.length)&&(Rn=xn(E>0?0:R.length-1,E,Le(Yn)),Rn)?Rn:null}var ll={selectAll:zl,singleSelection:function(A){return A.setSelection(A.getCursor("anchor"),A.getCursor("head"),Lt)},killLine:function(A){return tu(A,function(y){if(y.empty()){var O=Mr(A.doc,y.head.line).text.length;return y.head.ch==O&&y.head.line<A.lastLine()?{from:y.head,to:An(y.head.line+1,0)}:{from:y.head,to:An(y.head.line,O)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(A){return tu(A,function(y){return{from:An(y.from().line,0),to:Hr(A.doc,An(y.to().line+1,0))}})},delLineLeft:function(A){return tu(A,function(y){return{from:An(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(A){return tu(A,function(y){var O=A.charCoords(y.head,"div").top+5,E=A.coordsChar({left:0,top:O},"div");return{from:E,to:y.from()}})},delWrappedLineRight:function(A){return tu(A,function(y){var O=A.charCoords(y.head,"div").top+5,E=A.coordsChar({left:A.display.lineDiv.offsetWidth+100,top:O},"div");return{from:y.from(),to:E}})},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(An(A.firstLine(),0))},goDocEnd:function(A){return A.extendSelection(An(A.lastLine()))},goLineStart:function(A){return A.extendSelectionsBy(function(y){return os(A,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(A){return A.extendSelectionsBy(function(y){return _a(A,y.head)},{origin:"+move",bias:1})},goLineEnd:function(A){return A.extendSelectionsBy(function(y){return El(A,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(A){return A.extendSelectionsBy(function(y){var O=A.cursorCoords(y.head,"div").top+5;return A.coordsChar({left:A.display.lineDiv.offsetWidth+100,top:O},"div")},rn)},goLineLeft:function(A){return A.extendSelectionsBy(function(y){var O=A.cursorCoords(y.head,"div").top+5;return A.coordsChar({left:0,top:O},"div")},rn)},goLineLeftSmart:function(A){return A.extendSelectionsBy(function(y){var O=A.cursorCoords(y.head,"div").top+5,E=A.coordsChar({left:0,top:O},"div");return E.ch<A.getLine(E.line).search(/\S/)?_a(A,y.head):E},rn)},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 y=[],O=A.listSelections(),E=A.options.tabSize,R=0;R<O.length;R++){var H=O[R].from(),Ae=we(A.getLine(H.line),H.ch,E);y.push(Bn(E-Ae%E))}A.replaceSelections(y)},defaultTab:function(A){A.somethingSelected()?A.indentSelection("add"):A.execCommand("insertTab")},transposeChars:function(A){return Eo(A,function(){for(var y=A.listSelections(),O=[],E=0;E<y.length;E++)if(y[E].empty()){var R=y[E].head,H=Mr(A.doc,R.line).text;if(H){if(R.ch==H.length&&(R=new An(R.line,R.ch-1)),R.ch>0)R=new An(R.line,R.ch+1),A.replaceRange(H.charAt(R.ch-1)+H.charAt(R.ch-2),An(R.line,R.ch-2),R,"+transpose");else if(R.line>A.doc.first){var Ae=Mr(A.doc,R.line-1).text;Ae&&(R=new An(R.line,1),A.replaceRange(H.charAt(0)+A.doc.lineSeparator()+Ae.charAt(Ae.length-1),An(R.line-1,Ae.length-1),R,"+transpose"))}}O.push(new bo(R,R))}A.setSelections(O)})},newlineAndIndent:function(A){return Eo(A,function(){for(var y=A.listSelections(),O=y.length-1;O>=0;O--)A.replaceRange(A.doc.lineSeparator(),y[O].anchor,y[O].head,"+input");y=A.listSelections();for(var E=0;E<y.length;E++)A.indentLine(y[E].from().line,null,!0);Uo(A)})},openLine:function(A){return A.replaceSelection(`
|
||
`,"start")},toggleOverwrite:function(A){return A.toggleOverwrite()}};function os(A,y){var O=Mr(A.doc,y),E=pr(O);return E!=O&&(y=Ge(E)),zu(!0,A,E,y,1)}function El(A,y){var O=Mr(A.doc,y),E=Er(O);return E!=O&&(y=Ge(E)),zu(!0,A,O,y,-1)}function _a(A,y){var O=os(A,y.line),E=Mr(A.doc,O.line),R=xe(E,A.doc.direction);if(!R||R[0].level==0){var H=Math.max(O.ch,E.text.search(/\S/)),Ae=y.line==O.line&&y.ch<=H&&y.ch;return An(O.line,Ae?0:H,O.sticky)}return O}function Ga(A,y,O){if(typeof y=="string"&&(y=ll[y],!y))return!1;A.display.input.ensurePolled();var E=A.display.shift,R=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),O&&(A.display.shift=!1),R=y(A)!=bt}finally{A.display.shift=E,A.state.suppressEdits=!1}return R}function $s(A,y,O){for(var E=0;E<A.state.keyMaps.length;E++){var R=ca(y,A.state.keyMaps[E],O,A);if(R)return R}return A.options.extraKeys&&ca(y,A.options.extraKeys,O,A)||ca(y,A.options.keyMap,O,A)}var Vs=new Fe;function pd(A,y,O,E){var R=A.state.keySeq;if(R){if(Fs(y))return"handled";if(/\'$/.test(y)?A.state.keySeq=null:Vs.set(50,function(){A.state.keySeq==R&&(A.state.keySeq=null,A.display.input.reset())}),mh(A,R+" "+y,O,E))return!0}return mh(A,y,O,E)}function mh(A,y,O,E){var R=$s(A,y,E);return R=="multi"&&(A.state.keySeq=y),R=="handled"&&Ha(A,"keyHandled",A,y,O),(R=="handled"||R=="multi")&&(wt(O),mA(A)),!!R}function gh(A,y){var O=al(y,!0);return O?y.shiftKey&&!A.state.keySeq?pd(A,"Shift-"+O,y,function(E){return Ga(A,E,!0)})||pd(A,O,y,function(E){if(typeof E=="string"?/^go[A-Z]/.test(E):E.motion)return Ga(A,E)}):pd(A,O,y,function(E){return Ga(A,E)}):!1}function md(A,y,O){return pd(A,"'"+O+"'",y,function(E){return Ga(A,E,!0)})}var XA=null;function yh(A){var y=this;if(!(A.target&&A.target!=y.display.input.getField())&&(y.curOp.focus=et(Pt(y)),!Ct(y,A))){f&&g<11&&A.keyCode==27&&(A.returnValue=!1);var O=A.keyCode;y.display.shift=O==16||A.shiftKey;var E=gh(y,A);P&&(XA=E?O:null,!E&&O==88&&!po&&($?A.metaKey:A.ctrlKey)&&y.replaceSelection("",null,"cut")),i&&!$&&!E&&O==46&&A.shiftKey&&!A.ctrlKey&&document.execCommand&&document.execCommand("cut"),O==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Os(y)}}function Os(A){var y=A.display.lineDiv;Ue(y,"CodeMirror-crosshair");function O(E){(E.keyCode==18||!E.altKey)&&(re(y,"CodeMirror-crosshair"),ft(document,"keyup",O),ft(document,"mouseover",O))}Qe(document,"keyup",O),Qe(document,"mouseover",O)}function nu(A){A.keyCode==16&&(this.doc.sel.shift=!1),Ct(this,A)}function gd(A){var y=this;if(!(A.target&&A.target!=y.display.input.getField())&&!(nA(y.display,A)||Ct(y,A)||A.ctrlKey&&!A.altKey||$&&A.metaKey)){var O=A.keyCode,E=A.charCode;if(P&&O==XA){XA=null,wt(A);return}if(!(P&&(!A.which||A.which<10)&&gh(y,A))){var R=String.fromCharCode(E??O);R!="\b"&&(md(y,A,R)||y.display.input.onKeyPress(A))}}}var Jf=400,Cc=function(A,y,O){this.time=A,this.pos=y,this.button=O};Cc.prototype.compare=function(A,y,O){return this.time+Jf>A&&Qn(y,this.pos)==0&&O==this.button};var MA,Us;function ep(A,y){var O=+new Date;return Us&&Us.compare(O,A,y)?(MA=Us=null,"triple"):MA&&MA.compare(O,A,y)?(Us=new Cc(O,A,y),MA=null,"double"):(MA=new Cc(O,A,y),Us=null,"single")}function vh(A){var y=this,O=y.display;if(!(Ct(y,A)||O.activeTouch&&O.input.supportsTouch())){if(O.input.ensurePolled(),O.shift=A.shiftKey,nA(O,A)){b||(O.scroller.draggable=!1,setTimeout(function(){return O.scroller.draggable=!0},100));return}if(!Hd(y,A)){var E=pA(y,A),R=an(A),H=E?ep(E,R):"single";jt(y).focus(),R==1&&y.state.selectingText&&y.state.selectingText(A),!(E&&tp(y,R,E,H,A))&&(R==1?E?bc(y,E,H,A):Pr(A)==O.scroller&&wt(A):R==2?(E&&yc(y.doc,E),setTimeout(function(){return O.input.focus()},20)):R==3&&(he?y.display.input.onContextMenu(A):Dc(y)))}}}function tp(A,y,O,E,R){var H="Click";return E=="double"?H="Double"+H:E=="triple"&&(H="Triple"+H),H=(y==1?"Left":y==2?"Middle":"Right")+H,pd(A,ju(H,R),R,function(Ae){if(typeof Ae=="string"&&(Ae=ll[Ae]),!Ae)return!1;var _e=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),_e=Ae(A,O)!=bt}finally{A.state.suppressEdits=!1}return _e})}function Vd(A,y,O){var E=A.getOption("configureMouse"),R=E?E(A,y,O):{};if(R.unit==null){var H=X?O.shiftKey&&O.metaKey:O.altKey;R.unit=H?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(R.extend==null||A.doc.extend)&&(R.extend=A.doc.extend||O.shiftKey),R.addNew==null&&(R.addNew=$?O.metaKey:O.ctrlKey),R.moveOnDrag==null&&(R.moveOnDrag=!($?O.altKey:O.ctrlKey)),R}function bc(A,y,O,E){f?setTimeout(Rt(WA,A),0):A.curOp.focus=et(Pt(A));var R=Vd(A,O,E),H=A.doc.sel,Ae;A.options.dragDrop&&Wn&&!A.isReadOnly()&&O=="single"&&(Ae=H.contains(y))>-1&&(Qn((Ae=H.ranges[Ae]).from(),y)<0||y.xRel>0)&&(Qn(Ae.to(),y)>0||y.xRel<0)?Fp(A,E,y,R):_h(A,E,y,R)}function Fp(A,y,O,E){var R=A.display,H=!1,Ae=Li(A,function(Le){b&&(R.scroller.draggable=!1),A.state.draggingText=!1,A.state.delayingBlurEvent&&(A.hasFocus()?A.state.delayingBlurEvent=!1:Dc(A)),ft(R.wrapper.ownerDocument,"mouseup",Ae),ft(R.wrapper.ownerDocument,"mousemove",_e),ft(R.scroller,"dragstart",Be),ft(R.scroller,"drop",Ae),H||(wt(Le),E.addNew||yc(A.doc,O,null,null,E.extend),b&&!U||f&&g==9?setTimeout(function(){R.wrapper.ownerDocument.body.focus({preventScroll:!0}),R.input.focus()},20):R.input.focus())}),_e=function(Le){H=H||Math.abs(y.clientX-Le.clientX)+Math.abs(y.clientY-Le.clientY)>=10},Be=function(){return H=!0};b&&(R.scroller.draggable=!0),A.state.draggingText=Ae,Ae.copy=!E.moveOnDrag,Qe(R.wrapper.ownerDocument,"mouseup",Ae),Qe(R.wrapper.ownerDocument,"mousemove",_e),Qe(R.scroller,"dragstart",Be),Qe(R.scroller,"drop",Ae),A.state.delayingBlurEvent=!0,setTimeout(function(){return R.input.focus()},20),R.scroller.dragDrop&&R.scroller.dragDrop()}function JA(A,y,O){if(O=="char")return new bo(y,y);if(O=="word")return A.findWordAt(y);if(O=="line")return new bo(An(y.line,0),Hr(A.doc,An(y.line+1,0)));var E=O(A,y);return new bo(E.from,E.to)}function _h(A,y,O,E){f&&Dc(A);var R=A.display,H=A.doc;wt(y);var Ae,_e,Be=H.sel,Le=Be.ranges;if(E.addNew&&!E.extend?(_e=H.sel.contains(O),_e>-1?Ae=Le[_e]:Ae=new bo(O,O)):(Ae=H.sel.primary(),_e=H.sel.primIndex),E.unit=="rectangle")E.addNew||(Ae=new bo(O,O)),O=pA(A,y,!0,!0),_e=-1;else{var ht=JA(A,O,E.unit);E.extend?Ae=Na(Ae,ht.anchor,ht.head,E.extend):Ae=ht}E.addNew?_e==-1?(_e=Le.length,vs(H,fu(A,Le.concat([Ae]),_e),{scroll:!1,origin:"*mouse"})):Le.length>1&&Le[_e].empty()&&E.unit=="char"&&!E.extend?(vs(H,fu(A,Le.slice(0,_e).concat(Le.slice(_e+1)),0),{scroll:!1,origin:"*mouse"}),Be=H.sel):ol(H,_e,Ae,Vt):(_e=0,vs(H,new Ea([Ae],0),Vt),Be=H.sel);var xt=O;function Jt(or){if(Qn(xt,or)!=0)if(xt=or,E.unit=="rectangle"){for(var Tr=[],li=A.options.tabSize,Fr=we(Mr(H,O.line).text,O.ch,li),no=we(Mr(H,or.line).text,or.ch,li),Io=Math.min(Fr,no),js=Math.max(Fr,no),as=Math.min(O.line,or.line),_s=Math.min(A.lastLine(),Math.max(O.line,or.line));as<=_s;as++){var Cs=Mr(H,as).text,Bs=Sn(Cs,Io,li);Io==js?Tr.push(new bo(An(as,Bs),An(as,Bs))):Cs.length>Bs&&Tr.push(new bo(An(as,Bs),An(as,Sn(Cs,js,li))))}Tr.length||Tr.push(new bo(O,O)),vs(H,fu(A,Be.ranges.slice(0,_e).concat(Tr),_e),{origin:"*mouse",scroll:!1}),A.scrollIntoView(or)}else{var Gl=Ae,zs=JA(A,or,E.unit),bs=Gl.anchor,da;Qn(zs.anchor,bs)>0?(da=zs.head,bs=aa(Gl.from(),zs.anchor)):(da=zs.anchor,bs=Xi(Gl.to(),zs.head));var vi=Be.ranges.slice(0);vi[_e]=yd(A,new bo(Hr(H,bs),da)),vs(H,fu(A,vi,_e),Vt)}}var Qt=R.wrapper.getBoundingClientRect(),xn=0;function Rn(or){var Tr=++xn,li=pA(A,or,!0,E.unit=="rectangle");if(li)if(Qn(li,xt)!=0){A.curOp.focus=et(Pt(A)),Jt(li);var Fr=Iu(R,H);(li.line>=Fr.to||li.line<Fr.from)&&setTimeout(Li(A,function(){xn==Tr&&Rn(or)}),150)}else{var no=or.clientY<Qt.top?-20:or.clientY>Qt.bottom?20:0;no&&setTimeout(Li(A,function(){xn==Tr&&(R.scroller.scrollTop+=no,Rn(or))}),50)}}function Yn(or){A.state.selectingText=!1,xn=1/0,or&&(wt(or),R.input.focus()),ft(R.wrapper.ownerDocument,"mousemove",Xn),ft(R.wrapper.ownerDocument,"mouseup",yr),H.history.lastSelOrigin=null}var Xn=Li(A,function(or){or.buttons===0||!an(or)?Yn(or):Rn(or)}),yr=Li(A,Yn);A.state.selectingText=yr,Qe(R.wrapper.ownerDocument,"mousemove",Xn),Qe(R.wrapper.ownerDocument,"mouseup",yr)}function yd(A,y){var O=y.anchor,E=y.head,R=Mr(A.doc,O.line);if(Qn(O,E)==0&&O.sticky==E.sticky)return y;var H=xe(R);if(!H)return y;var Ae=qe(H,O.ch,O.sticky),_e=H[Ae];if(_e.from!=O.ch&&_e.to!=O.ch)return y;var Be=Ae+(_e.from==O.ch==(_e.level!=1)?0:1);if(Be==0||Be==H.length)return y;var Le;if(E.line!=O.line)Le=(E.line-O.line)*(A.doc.direction=="ltr"?1:-1)>0;else{var ht=qe(H,E.ch,E.sticky),xt=ht-Ae||(E.ch-O.ch)*(_e.level==1?-1:1);ht==Be-1||ht==Be?Le=xt<0:Le=xt>0}var Jt=H[Be+(Le?-1:0)],Qt=Le==(Jt.level==1),xn=Qt?Jt.from:Jt.to,Rn=Qt?"after":"before";return O.ch==xn&&O.sticky==Rn?y:new bo(new An(O.line,xn,Rn),E)}function np(A,y,O,E){var R,H;if(y.touches)R=y.touches[0].clientX,H=y.touches[0].clientY;else try{R=y.clientX,H=y.clientY}catch{return!1}if(R>=Math.floor(A.display.gutters.getBoundingClientRect().right))return!1;E&&wt(y);var Ae=A.display,_e=Ae.lineDiv.getBoundingClientRect();if(H>_e.bottom||!Yt(A,O))return En(y);H-=_e.top-Ae.viewOffset;for(var Be=0;Be<A.display.gutterSpecs.length;++Be){var Le=Ae.gutters.childNodes[Be];if(Le&&Le.getBoundingClientRect().right>=R){var ht=_t(A.doc,H),xt=A.display.gutterSpecs[Be];return Et(A,O,A,ht,xt.className,y),En(y)}}}function Hd(A,y){return np(A,y,"gutterClick",!0)}function bf(A,y){nA(A.display,y)||xf(A,y)||Ct(A,y,"contextmenu")||he||A.display.input.onContextMenu(y)}function xf(A,y){return Yt(A,"gutterContextMenu")?np(A,y,"gutterContextMenu",!1):!1}function rp(A){A.display.wrapper.className=A.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+A.options.theme.replace(/(^|\s)\s*/g," cm-s-"),uc(A)}var vd={toString:function(){return"CodeMirror.Init"}},Wh={},Nl={};function Ol(A){var y=A.optionHandlers;function O(E,R,H,Ae){A.defaults[E]=R,H&&(y[E]=Ae?function(_e,Be,Le){Le!=vd&&H(_e,Be,Le)}:H)}A.defineOption=O,A.Init=vd,O("value","",function(E,R){return E.setValue(R)},!0),O("mode",null,function(E,R){E.doc.modeOption=R,qd(E)},!0),O("indentUnit",2,qd,!0),O("indentWithTabs",!1),O("smartIndent",!0),O("tabSize",4,function(E){_A(E),uc(E),Sl(E)},!0),O("lineSeparator",null,function(E,R){if(E.doc.lineSep=R,!!R){var H=[],Ae=E.doc.first;E.doc.iter(function(Be){for(var Le=0;;){var ht=Be.text.indexOf(R,Le);if(ht==-1)break;Le=ht+R.length,H.push(An(Ae,ht))}Ae++});for(var _e=H.length-1;_e>=0;_e--)z(E.doc,R,H[_e],An(H[_e].line,H[_e].ch+R.length))}}),O("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(E,R,H){E.state.specialChars=new RegExp(R.source+(R.test(" ")?"":"| "),"g"),H!=vd&&E.refresh()}),O("specialCharPlaceholder",Su,function(E){return E.refresh()},!0),O("electricChars",!0),O("inputStyle",J?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),O("spellcheck",!1,function(E,R){return E.getInputField().spellcheck=R},!0),O("autocorrect",!1,function(E,R){return E.getInputField().autocorrect=R},!0),O("autocapitalize",!1,function(E,R){return E.getInputField().autocapitalize=R},!0),O("rtlMoveVisually",!G),O("wholeLineUpdateBefore",!0),O("theme","default",function(E){rp(E),Ul(E)},!0),O("keyMap","default",function(E,R,H){var Ae=sl(R),_e=H!=vd&&sl(H);_e&&_e.detach&&_e.detach(E,Ae),Ae.attach&&Ae.attach(E,_e||null)}),O("extraKeys",null),O("configureMouse",null),O("lineWrapping",!1,wf,!0),O("gutters",[],function(E,R){E.display.gutterSpecs=Si(R,E.options.lineNumbers),Ul(E)},!0),O("fixedGutter",!0,function(E,R){E.display.gutters.style.left=R?Fo(E.display)+"px":"0",E.refresh()},!0),O("coverGutterNextToScrollbar",!1,function(E){return Tu(E)},!0),O("scrollbarStyle","native",function(E){Wd(E),Tu(E),E.display.scrollbars.setScrollTop(E.doc.scrollTop),E.display.scrollbars.setScrollLeft(E.doc.scrollLeft)},!0),O("lineNumbers",!1,function(E,R){E.display.gutterSpecs=Si(E.options.gutters,R),Ul(E)},!0),O("firstLineNumber",1,Ul,!0),O("lineNumberFormatter",function(E){return E},Ul,!0),O("showCursorWhenSelecting",!1,Rs,!0),O("resetSelectionOnContextMenu",!0),O("lineWiseCopyCut",!0),O("pasteLinesPerSelection",!0),O("selectionsMayTouch",!1),O("readOnly",!1,function(E,R){R=="nocursor"&&(Vo(E),E.display.input.blur()),E.display.input.readOnlyChanged(R)}),O("screenReaderLabel",null,function(E,R){R=R===""?null:R,E.display.input.screenReaderLabelChanged(R)}),O("disableInput",!1,function(E,R){R||E.display.input.reset()},!0),O("dragDrop",!0,Up),O("allowDropFileTypes",null),O("cursorBlinkRate",530),O("cursorScrollMargin",0),O("cursorHeight",1,Rs,!0),O("singleCursorHeightPerLine",!0,Rs,!0),O("workTime",100),O("workDelay",100),O("flattenSpans",!0,_A,!0),O("addModeClass",!1,_A,!0),O("pollInterval",100),O("undoDepth",200,function(E,R){return E.doc.history.undoDepth=R}),O("historyEventDelay",1250),O("viewportMargin",10,function(E){return E.refresh()},!0),O("maxHighlightLength",1e4,_A,!0),O("moveInputWithCursor",!0,function(E,R){R||E.display.input.resetPosition()}),O("tabindex",null,function(E,R){return E.display.input.getField().tabIndex=R||""}),O("autofocus",null),O("direction","ltr",function(E,R){return E.doc.setDirection(R)},!0),O("phrases",null)}function Up(A,y,O){var E=O&&O!=vd;if(!y!=!E){var R=A.display.dragFunctions,H=y?Qe:ft;H(A.display.scroller,"dragstart",R.start),H(A.display.scroller,"dragenter",R.enter),H(A.display.scroller,"dragover",R.over),H(A.display.scroller,"dragleave",R.leave),H(A.display.scroller,"drop",R.drop)}}function wf(A){A.options.lineWrapping?(Ue(A.display.wrapper,"CodeMirror-wrap"),A.display.sizer.style.minWidth="",A.display.sizerWidth=null):(re(A.display.wrapper,"CodeMirror-wrap"),gs(A)),NA(A),Sl(A),uc(A),setTimeout(function(){return Tu(A)},100)}function Bo(A,y){var O=this;if(!(this instanceof Bo))return new Bo(A,y);this.options=y=y?Ke(y):{},Ke(Wh,y,!1);var E=y.value;typeof E=="string"?E=new Zt(E,y.mode,null,y.lineSeparator,y.direction):y.mode&&(E.modeOption=y.mode),this.doc=E;var R=new Bo.inputStyles[y.inputStyle](this),H=this.display=new dd(A,E,R,y);H.wrapper.CodeMirror=this,rp(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wd(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 Fe,keySeq:null,specialChars:null},y.autofocus&&!J&&H.input.focus(),f&&g<11&&setTimeout(function(){return O.display.input.reset(!0)},20),Nu(this),Bi(),Ku(this),this.curOp.forceUpdate=!0,cr(this,E),y.autofocus&&!J||this.hasFocus()?setTimeout(function(){O.hasFocus()&&!O.state.focused&&Nd(O)},20):Vo(this);for(var Ae in Nl)Nl.hasOwnProperty(Ae)&&Nl[Ae](this,y[Ae],vd);Ad(this),y.finishInit&&y.finishInit(this);for(var _e=0;_e<Qh.length;++_e)Qh[_e](this);Ru(this),b&&y.lineWrapping&&getComputedStyle(H.lineDiv).textRendering=="optimizelegibility"&&(H.lineDiv.style.textRendering="auto")}Bo.defaults=Wh,Bo.optionHandlers=Nl;function Nu(A){var y=A.display;Qe(y.scroller,"mousedown",Li(A,vh)),f&&g<11?Qe(y.scroller,"dblclick",Li(A,function(Be){if(!Ct(A,Be)){var Le=pA(A,Be);if(!(!Le||Hd(A,Be)||nA(A.display,Be))){wt(Be);var ht=A.findWordAt(Le);yc(A.doc,ht.anchor,ht.head)}}})):Qe(y.scroller,"dblclick",function(Be){return Ct(A,Be)||wt(Be)}),Qe(y.scroller,"contextmenu",function(Be){return bf(A,Be)}),Qe(y.input.getField(),"contextmenu",function(Be){y.scroller.contains(Be.target)||bf(A,Be)});var O,E={end:0};function R(){y.activeTouch&&(O=setTimeout(function(){return y.activeTouch=null},1e3),E=y.activeTouch,E.end=+new Date)}function H(Be){if(Be.touches.length!=1)return!1;var Le=Be.touches[0];return Le.radiusX<=1&&Le.radiusY<=1}function Ae(Be,Le){if(Le.left==null)return!0;var ht=Le.left-Be.left,xt=Le.top-Be.top;return ht*ht+xt*xt>20*20}Qe(y.scroller,"touchstart",function(Be){if(!Ct(A,Be)&&!H(Be)&&!Hd(A,Be)){y.input.ensurePolled(),clearTimeout(O);var Le=+new Date;y.activeTouch={start:Le,moved:!1,prev:Le-E.end<=300?E:null},Be.touches.length==1&&(y.activeTouch.left=Be.touches[0].pageX,y.activeTouch.top=Be.touches[0].pageY)}}),Qe(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Qe(y.scroller,"touchend",function(Be){var Le=y.activeTouch;if(Le&&!nA(y,Be)&&Le.left!=null&&!Le.moved&&new Date-Le.start<300){var ht=A.coordsChar(y.activeTouch,"page"),xt;!Le.prev||Ae(Le,Le.prev)?xt=new bo(ht,ht):!Le.prev.prev||Ae(Le,Le.prev.prev)?xt=A.findWordAt(ht):xt=new bo(An(ht.line,0),Hr(A.doc,An(ht.line+1,0))),A.setSelection(xt.anchor,xt.head),A.focus(),wt(Be)}R()}),Qe(y.scroller,"touchcancel",R),Qe(y.scroller,"scroll",function(){y.scroller.clientHeight&&(ku(A,y.scroller.scrollTop),Fl(A,y.scroller.scrollLeft,!0),Et(A,"scroll",A))}),Qe(y.scroller,"mousewheel",function(Be){return pc(A,Be)}),Qe(y.scroller,"DOMMouseScroll",function(Be){return pc(A,Be)}),Qe(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(Be){Ct(A,Be)||sr(Be)},over:function(Be){Ct(A,Be)||(In(A,Be),sr(Be))},start:function(Be){return gn(A,Be)},drop:Li(A,_n),leave:function(Be){Ct(A,Be)||Un(A)}};var _e=y.input.getField();Qe(_e,"keyup",function(Be){return nu.call(A,Be)}),Qe(_e,"keydown",Li(A,yh)),Qe(_e,"keypress",Li(A,gd)),Qe(_e,"focus",function(Be){return Nd(A,Be)}),Qe(_e,"blur",function(Be){return Vo(A,Be)})}var Qh=[];Bo.defineInitHook=function(A){return Qh.push(A)};function _d(A,y,O,E){var R=A.doc,H;O==null&&(O="add"),O=="smart"&&(R.mode.indent?H=kr(A,y).state:O="prev");var Ae=A.options.tabSize,_e=Mr(R,y),Be=we(_e.text,null,Ae);_e.stateAfter&&(_e.stateAfter=null);var Le=_e.text.match(/^\s*/)[0],ht;if(!E&&!/\S/.test(_e.text))ht=0,O="not";else if(O=="smart"&&(ht=R.mode.indent(H,_e.text.slice(Le.length),_e.text),ht==bt||ht>150)){if(!E)return;O="prev"}O=="prev"?y>R.first?ht=we(Mr(R,y-1).text,null,Ae):ht=0:O=="add"?ht=Be+A.options.indentUnit:O=="subtract"?ht=Be-A.options.indentUnit:typeof O=="number"&&(ht=Be+O),ht=Math.max(0,ht);var xt="",Jt=0;if(A.options.indentWithTabs)for(var Qt=Math.floor(ht/Ae);Qt;--Qt)Jt+=Ae,xt+=" ";if(Jt<ht&&(xt+=Bn(ht-Jt)),xt!=Le)return z(R,xt,An(y,0),An(y,Le.length),"+input"),_e.stateAfter=null,!0;for(var xn=0;xn<R.sel.ranges.length;xn++){var Rn=R.sel.ranges[xn];if(Rn.head.line==y&&Rn.head.ch<Le.length){var Yn=An(y,Le.length);ol(R,xn,new bo(Yn,Yn));break}}}var SA=null;function Ch(A){SA=A}function ip(A,y,O,E,R){var H=A.doc;A.display.shift=!1,E||(E=H.sel);var Ae=+new Date-200,_e=R=="paste"||A.state.pasteIncoming>Ae,Be=zn(y),Le=null;if(_e&&E.ranges.length>1)if(SA&&SA.text.join(`
|
||
`)==y){if(E.ranges.length%SA.text.length==0){Le=[];for(var ht=0;ht<SA.text.length;ht++)Le.push(H.splitLines(SA.text[ht]))}}else Be.length==E.ranges.length&&A.options.pasteLinesPerSelection&&(Le=Cr(Be,function(Xn){return[Xn]}));for(var xt=A.curOp.updateInput,Jt=E.ranges.length-1;Jt>=0;Jt--){var Qt=E.ranges[Jt],xn=Qt.from(),Rn=Qt.to();Qt.empty()&&(O&&O>0?xn=An(xn.line,xn.ch-O):A.state.overwrite&&!_e?Rn=An(Rn.line,Math.min(Mr(H,Rn.line).text.length,Rn.ch+ar(Be).length)):_e&&SA&&SA.lineWise&&SA.text.join(`
|
||
`)==Be.join(`
|
||
`)&&(xn=Rn=An(xn.line,0)));var Yn={from:xn,to:Rn,text:Le?Le[Jt%Le.length]:Be,origin:R||(_e?"paste":A.state.cutIncoming>Ae?"cut":"+input")};k(A.doc,Yn),Ha(A,"inputRead",A,Yn)}y&&!_e&&qh(A,y),Uo(A),A.curOp.updateInput<2&&(A.curOp.updateInput=xt),A.curOp.typing=!0,A.state.pasteIncoming=A.state.cutIncoming=-1}function xc(A,y){var O=A.clipboardData&&A.clipboardData.getData("Text");if(O)return A.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&y.hasFocus()&&Eo(y,function(){return ip(y,O,0,null,"paste")}),!0}function qh(A,y){if(!(!A.options.electricChars||!A.options.smartIndent))for(var O=A.doc.sel,E=O.ranges.length-1;E>=0;E--){var R=O.ranges[E];if(!(R.head.ch>100||E&&O.ranges[E-1].head.line==R.head.line)){var H=A.getModeAt(R.head),Ae=!1;if(H.electricChars){for(var _e=0;_e<H.electricChars.length;_e++)if(y.indexOf(H.electricChars.charAt(_e))>-1){Ae=_d(A,R.head.line,"smart");break}}else H.electricInput&&H.electricInput.test(Mr(A.doc,R.head.line).text.slice(0,R.head.ch))&&(Ae=_d(A,R.head.line,"smart"));Ae&&Ha(A,"electricInput",A,R.head.line)}}}function Yh(A){for(var y=[],O=[],E=0;E<A.doc.sel.ranges.length;E++){var R=A.doc.sel.ranges[E].head.line,H={anchor:An(R,0),head:An(R+1,0)};O.push(H),y.push(A.getRange(H.anchor,H.head))}return{text:y,ranges:O}}function Zd(A,y,O,E){A.setAttribute("autocorrect",O?"on":"off"),A.setAttribute("autocapitalize",E?"on":"off"),A.setAttribute("spellcheck",!!y)}function Cd(){var A=ye("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),y=ye("div",[A],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?A.style.width="1000px":A.setAttribute("wrap","off"),W&&(A.style.border="1px solid black"),y}function Nc(A){var y=A.optionHandlers,O=A.helpers={};A.prototype={constructor:A,focus:function(){jt(this).focus(),this.display.input.focus()},setOption:function(E,R){var H=this.options,Ae=H[E];H[E]==R&&E!="mode"||(H[E]=R,y.hasOwnProperty(E)&&Li(this,y[E])(this,R,Ae),Et(this,"optionChange",this,E))},getOption:function(E){return this.options[E]},getDoc:function(){return this.doc},addKeyMap:function(E,R){this.state.keyMaps[R?"push":"unshift"](sl(E))},removeKeyMap:function(E){for(var R=this.state.keyMaps,H=0;H<R.length;++H)if(R[H]==E||R[H].name==E)return R.splice(H,1),!0},addOverlay:Wr(function(E,R){var H=E.token?E:A.getMode(this.options,E);if(H.startState)throw new Error("Overlays may not be stateful.");br(this.state.overlays,{mode:H,modeSpec:E,opaque:R&&R.opaque,priority:R&&R.priority||0},function(Ae){return Ae.priority}),this.state.modeGen++,Sl(this)}),removeOverlay:Wr(function(E){for(var R=this.state.overlays,H=0;H<R.length;++H){var Ae=R[H].modeSpec;if(Ae==E||typeof E=="string"&&Ae.name==E){R.splice(H,1),this.state.modeGen++,Sl(this);return}}}),indentLine:Wr(function(E,R,H){typeof R!="string"&&typeof R!="number"&&(R==null?R=this.options.smartIndent?"smart":"prev":R=R?"add":"subtract"),cn(this.doc,E)&&_d(this,E,R,H)}),indentSelection:Wr(function(E){for(var R=this.doc.sel.ranges,H=-1,Ae=0;Ae<R.length;Ae++){var _e=R[Ae];if(_e.empty())_e.head.line>H&&(_d(this,_e.head.line,E,!0),H=_e.head.line,Ae==this.doc.sel.primIndex&&Uo(this));else{var Be=_e.from(),Le=_e.to(),ht=Math.max(H,Be.line);H=Math.min(this.lastLine(),Le.line-(Le.ch?0:1))+1;for(var xt=ht;xt<H;++xt)_d(this,xt,E);var Jt=this.doc.sel.ranges;Be.ch==0&&R.length==Jt.length&&Jt[Ae].from().ch>0&&ol(this.doc,Ae,new bo(Be,Jt[Ae].to()),Lt)}}}),getTokenAt:function(E,R){return ja(this,E,R)},getLineTokens:function(E,R){return ja(this,An(E),R,!0)},getTokenTypeAt:function(E){E=Hr(this.doc,E);var R=sa(this,Mr(this.doc,E.line)),H=0,Ae=(R.length-1)/2,_e=E.ch,Be;if(_e==0)Be=R[2];else for(;;){var Le=H+Ae>>1;if((Le?R[Le*2-1]:0)>=_e)Ae=Le;else if(R[Le*2+1]<_e)H=Le+1;else{Be=R[Le*2+2];break}}var ht=Be?Be.indexOf("overlay "):-1;return ht<0?Be:ht==0?null:Be.slice(0,ht-1)},getModeAt:function(E){var R=this.doc.mode;return R.innerMode?A.innerMode(R,this.getTokenAt(E).state).mode:R},getHelper:function(E,R){return this.getHelpers(E,R)[0]},getHelpers:function(E,R){var H=[];if(!O.hasOwnProperty(R))return H;var Ae=O[R],_e=this.getModeAt(E);if(typeof _e[R]=="string")Ae[_e[R]]&&H.push(Ae[_e[R]]);else if(_e[R])for(var Be=0;Be<_e[R].length;Be++){var Le=Ae[_e[R][Be]];Le&&H.push(Le)}else _e.helperType&&Ae[_e.helperType]?H.push(Ae[_e.helperType]):Ae[_e.name]&&H.push(Ae[_e.name]);for(var ht=0;ht<Ae._global.length;ht++){var xt=Ae._global[ht];xt.pred(_e,this)&&tt(H,xt.val)==-1&&H.push(xt.val)}return H},getStateAfter:function(E,R){var H=this.doc;return E=Mu(H,E??H.first+H.size-1),kr(this,E+1,R).state},cursorCoords:function(E,R){var H,Ae=this.doc.sel.primary();return E==null?H=Ae.head:typeof E=="object"?H=Hr(this.doc,E):H=E?Ae.from():Ae.to(),sn(this,H,R||"page")},charCoords:function(E,R){return Pn(this,Hr(this.doc,E),R||"page")},coordsChar:function(E,R){return E=Ht(this,E,R||"page"),Co(this,E.left,E.top)},lineAtHeight:function(E,R){return E=Ht(this,{top:E,left:0},R||"page").top,_t(this.doc,E+this.display.viewOffset)},heightAtLine:function(E,R,H){var Ae=!1,_e;if(typeof E=="number"){var Be=this.doc.first+this.doc.size-1;E<this.doc.first?E=this.doc.first:E>Be&&(E=Be,Ae=!0),_e=Mr(this.doc,E)}else _e=E;return Au(this,_e,{top:0,left:0},R||"page",H||Ae).top+(Ae?this.doc.height-to(_e):0)},defaultTextHeight:function(){return Ml(this.display)},defaultCharWidth:function(){return Qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(E,R,H,Ae,_e){var Be=this.display;E=sn(this,Hr(this.doc,E));var Le=E.bottom,ht=E.left;if(R.style.position="absolute",R.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(R),Be.sizer.appendChild(R),Ae=="over")Le=E.top;else if(Ae=="above"||Ae=="near"){var xt=Math.max(Be.wrapper.clientHeight,this.doc.height),Jt=Math.max(Be.sizer.clientWidth,Be.lineSpace.clientWidth);(Ae=="above"||E.bottom+R.offsetHeight>xt)&&E.top>R.offsetHeight?Le=E.top-R.offsetHeight:E.bottom+R.offsetHeight<=xt&&(Le=E.bottom),ht+R.offsetWidth>Jt&&(ht=Jt-R.offsetWidth)}R.style.top=Le+"px",R.style.left=R.style.right="",_e=="right"?(ht=Be.sizer.clientWidth-R.offsetWidth,R.style.right="0px"):(_e=="left"?ht=0:_e=="middle"&&(ht=(Be.sizer.clientWidth-R.offsetWidth)/2),R.style.left=ht+"px"),H&&Uc(this,{left:ht,top:Le,right:ht+R.offsetWidth,bottom:Le+R.offsetHeight})},triggerOnKeyDown:Wr(yh),triggerOnKeyPress:Wr(gd),triggerOnKeyUp:nu,triggerOnMouseDown:Wr(vh),execCommand:function(E){if(ll.hasOwnProperty(E))return ll[E].call(null,this)},triggerElectric:Wr(function(E){qh(this,E)}),findPosH:function(E,R,H,Ae){var _e=1;R<0&&(_e=-1,R=-R);for(var Be=Hr(this.doc,E),Le=0;Le<R&&(Be=pi(this.doc,Be,_e,H,Ae),!Be.hitSide);++Le);return Be},moveH:Wr(function(E,R){var H=this;this.extendSelectionsBy(function(Ae){return H.display.shift||H.doc.extend||Ae.empty()?pi(H.doc,Ae.head,E,R,H.options.rtlMoveVisually):E<0?Ae.from():Ae.to()},rn)}),deleteH:Wr(function(E,R){var H=this.doc.sel,Ae=this.doc;H.somethingSelected()?Ae.replaceSelection("",null,"+delete"):tu(this,function(_e){var Be=pi(Ae,_e.head,E,R,!1);return E<0?{from:Be,to:_e.head}:{from:_e.head,to:Be}})}),findPosV:function(E,R,H,Ae){var _e=1,Be=Ae;R<0&&(_e=-1,R=-R);for(var Le=Hr(this.doc,E),ht=0;ht<R;++ht){var xt=sn(this,Le,"div");if(Be==null?Be=xt.left:xt.left=Be,Le=Gc(this,xt,_e,H),Le.hitSide)break}return Le},moveV:Wr(function(E,R){var H=this,Ae=this.doc,_e=[],Be=!this.display.shift&&!Ae.extend&&Ae.sel.somethingSelected();if(Ae.extendSelectionsBy(function(ht){if(Be)return E<0?ht.from():ht.to();var xt=sn(H,ht.head,"div");ht.goalColumn!=null&&(xt.left=ht.goalColumn),_e.push(xt.left);var Jt=Gc(H,xt,E,R);return R=="page"&&ht==Ae.sel.primary()&&ua(H,Pn(H,Jt,"div").top-xt.top),Jt},rn),_e.length)for(var Le=0;Le<Ae.sel.ranges.length;Le++)Ae.sel.ranges[Le].goalColumn=_e[Le]}),findWordAt:function(E){var R=this.doc,H=Mr(R,E.line).text,Ae=E.ch,_e=E.ch;if(H){var Be=this.getHelper(E,"wordChars");(E.sticky=="before"||_e==H.length)&&Ae?--Ae:++_e;for(var Le=H.charAt(Ae),ht=Ye(Le,Be)?function(xt){return Ye(xt,Be)}:/\s/.test(Le)?function(xt){return/\s/.test(xt)}:function(xt){return!/\s/.test(xt)&&!Ye(xt)};Ae>0&&ht(H.charAt(Ae-1));)--Ae;for(;_e<H.length&&ht(H.charAt(_e));)++_e}return new bo(An(E.line,Ae),An(E.line,_e))},toggleOverwrite:function(E){E!=null&&E==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):re(this.display.cursorDiv,"CodeMirror-overwrite"),Et(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==et(Pt(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Wr(function(E,R){Aa(this,E,R)}),getScrollInfo:function(){var E=this.display.scroller;return{left:E.scrollLeft,top:E.scrollTop,height:E.scrollHeight-Hl(this)-this.display.barHeight,width:E.scrollWidth-Hl(this)-this.display.barWidth,clientHeight:FA(this),clientWidth:bl(this)}},scrollIntoView:Wr(function(E,R){E==null?(E={from:this.doc.sel.primary().head,to:null},R==null&&(R=this.options.cursorScrollMargin)):typeof E=="number"?E={from:An(E,0),to:null}:E.from==null&&(E={from:E,to:null}),E.to||(E.to=E.from),E.margin=R||0,E.from.line!=null?vf(this,E):ad(this,E.from,E.to,E.margin)}),setSize:Wr(function(E,R){var H=this,Ae=function(Be){return typeof Be=="number"||/^\d+$/.test(String(Be))?Be+"px":Be};E!=null&&(this.display.wrapper.style.width=Ae(E)),R!=null&&(this.display.wrapper.style.height=Ae(R)),this.options.lineWrapping&&Ud(this);var _e=this.display.viewFrom;this.doc.iter(_e,this.display.viewTo,function(Be){if(Be.widgets){for(var Le=0;Le<Be.widgets.length;Le++)if(Be.widgets[Le].noHScroll){cc(H,_e,"widget");break}}++_e}),this.curOp.forceUpdate=!0,Et(this,"refresh",this)}),operation:function(E){return Eo(this,E)},startOperation:function(){return Ku(this)},endOperation:function(){return Ru(this)},refresh:Wr(function(){var E=this.display.cachedTextHeight;Sl(this),this.curOp.forceUpdate=!0,uc(this),Aa(this,this.doc.scrollLeft,this.doc.scrollTop),Ss(this.display),(E==null||Math.abs(E-Ml(this.display))>.5||this.options.lineWrapping)&&NA(this),Et(this,"refresh",this)}),swapDoc:Wr(function(E){var R=this.doc;return R.cm=null,this.state.selectingText&&this.state.selectingText(),cr(this,E),uc(this),this.display.input.reset(),Aa(this,E.scrollLeft,E.scrollTop),this.curOp.forceScroll=!0,Ha(this,"swapDoc",this,R),R}),phrase:function(E){var R=this.options.phrases;return R&&Object.prototype.hasOwnProperty.call(R,E)?R[E]:E},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}},Gt(A),A.registerHelper=function(E,R,H){O.hasOwnProperty(E)||(O[E]=A[E]={_global:[]}),O[E][R]=H},A.registerGlobalHelper=function(E,R,H,Ae){A.registerHelper(E,R,Ae),O[E]._global.push({pred:H,val:Ae})}}function pi(A,y,O,E,R){var H=y,Ae=O,_e=Mr(A,y.line),Be=R&&A.direction=="rtl"?-O:O;function Le(){var yr=y.line+Be;return yr<A.first||yr>=A.first+A.size?!1:(y=new An(yr,y.ch,y.sticky),_e=Mr(A,yr))}function ht(yr){var or;if(E=="codepoint"){var Tr=_e.text.charCodeAt(y.ch+(O>0?0:-1));if(isNaN(Tr))or=null;else{var li=O>0?Tr>=55296&&Tr<56320:Tr>=56320&&Tr<57343;or=new An(y.line,Math.max(0,Math.min(_e.text.length,y.ch+O*(li?2:1))),-O)}}else R?or=Xa(A.cm,_e,y,O):or=wA(_e,y,O);if(or==null)if(!yr&&Le())y=zu(R,A.cm,_e,y.line,Be);else return!1;else y=or;return!0}if(E=="char"||E=="codepoint")ht();else if(E=="column")ht(!0);else if(E=="word"||E=="group")for(var xt=null,Jt=E=="group",Qt=A.cm&&A.cm.getHelper(y,"wordChars"),xn=!0;!(O<0&&!ht(!xn));xn=!1){var Rn=_e.text.charAt(y.ch)||`
|
||
`,Yn=Ye(Rn,Qt)?"w":Jt&&Rn==`
|
||
`?"n":!Jt||/\s/.test(Rn)?null:"p";if(Jt&&!xn&&!Yn&&(Yn="s"),xt&&xt!=Yn){O<0&&(O=1,ht(),y.sticky="after");break}if(Yn&&(xt=Yn),O>0&&!ht(!xn))break}var Xn=_c(A,y,H,Ae,!0);return _i(H,Xn)&&(Xn.hitSide=!0),Xn}function Gc(A,y,O,E){var R=A.doc,H=y.left,Ae;if(E=="page"){var _e=Math.min(A.display.wrapper.clientHeight,jt(A).innerHeight||R(A).documentElement.clientHeight),Be=Math.max(_e-.5*Ml(A.display),3);Ae=(O>0?y.bottom:y.top)+O*Be}else E=="line"&&(Ae=O>0?y.bottom+3:y.top-3);for(var Le;Le=Co(A,H,Ae),!!Le.outside;){if(O<0?Ae<=0:Ae>=R.height){Le.hitSide=!0;break}Ae+=O*5}return Le}var ta=function(A){this.cm=A,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ta.prototype.init=function(A){var y=this,O=this,E=O.cm,R=O.div=A.lineDiv;R.contentEditable=!0,Zd(R,E.options.spellcheck,E.options.autocorrect,E.options.autocapitalize);function H(_e){for(var Be=_e.target;Be;Be=Be.parentNode){if(Be==R)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Be.className))break}return!1}Qe(R,"paste",function(_e){!H(_e)||Ct(E,_e)||xc(_e,E)||g<=11&&setTimeout(Li(E,function(){return y.updateFromDOM()}),20)}),Qe(R,"compositionstart",function(_e){y.composing={data:_e.data,done:!1}}),Qe(R,"compositionupdate",function(_e){y.composing||(y.composing={data:_e.data,done:!1})}),Qe(R,"compositionend",function(_e){y.composing&&(_e.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Qe(R,"touchstart",function(){return O.forceCompositionEnd()}),Qe(R,"input",function(){y.composing||y.readFromDOMSoon()});function Ae(_e){if(!(!H(_e)||Ct(E,_e))){if(E.somethingSelected())Ch({lineWise:!1,text:E.getSelections()}),_e.type=="cut"&&E.replaceSelection("",null,"cut");else if(E.options.lineWiseCopyCut){var Be=Yh(E);Ch({lineWise:!0,text:Be.text}),_e.type=="cut"&&E.operation(function(){E.setSelections(Be.ranges,0,Lt),E.replaceSelection("",null,"cut")})}else return;if(_e.clipboardData){_e.clipboardData.clearData();var Le=SA.text.join(`
|
||
`);if(_e.clipboardData.setData("Text",Le),_e.clipboardData.getData("Text")==Le){_e.preventDefault();return}}var ht=Cd(),xt=ht.firstChild;Zd(xt),E.display.lineSpace.insertBefore(ht,E.display.lineSpace.firstChild),xt.value=SA.text.join(`
|
||
`);var Jt=et(ut(R));We(xt),setTimeout(function(){E.display.lineSpace.removeChild(ht),Jt.focus(),Jt==R&&O.showPrimarySelection()},50)}}Qe(R,"copy",Ae),Qe(R,"cut",Ae)},ta.prototype.screenReaderLabelChanged=function(A){A?this.div.setAttribute("aria-label",A):this.div.removeAttribute("aria-label")},ta.prototype.prepareSelection=function(){var A=id(this.cm,!1);return A.focus=et(ut(this.div))==this.div,A},ta.prototype.showSelection=function(A,y){!A||!this.cm.display.view.length||((A.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(A))},ta.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ta.prototype.showPrimarySelection=function(){var A=this.getSelection(),y=this.cm,O=y.doc.sel.primary(),E=O.from(),R=O.to();if(y.display.viewTo==y.display.viewFrom||E.line>=y.display.viewTo||R.line<y.display.viewFrom){A.removeAllRanges();return}var H=ul(y,A.anchorNode,A.anchorOffset),Ae=ul(y,A.focusNode,A.focusOffset);if(!(H&&!H.bad&&Ae&&!Ae.bad&&Qn(aa(H,Ae),E)==0&&Qn(Xi(H,Ae),R)==0)){var _e=y.display.view,Be=E.line>=y.display.viewFrom&&bd(y,E)||{node:_e[0].measure.map[2],offset:0},Le=R.line<y.display.viewTo&&bd(y,R);if(!Le){var ht=_e[_e.length-1].measure,xt=ht.maps?ht.maps[ht.maps.length-1]:ht.map;Le={node:xt[xt.length-1],offset:xt[xt.length-2]-xt[xt.length-3]}}if(!Be||!Le){A.removeAllRanges();return}var Jt=A.rangeCount&&A.getRangeAt(0),Qt;try{Qt=Ne(Be.node,Be.offset,Le.offset,Le.node)}catch{}Qt&&(!i&&y.state.focused?(A.collapse(Be.node,Be.offset),Qt.collapsed||(A.removeAllRanges(),A.addRange(Qt))):(A.removeAllRanges(),A.addRange(Qt)),Jt&&A.anchorNode==null?A.addRange(Jt):i&&this.startGracePeriod()),this.rememberSelection()}},ta.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)},ta.prototype.showMultipleSelections=function(A){Se(this.cm.display.cursorDiv,A.cursors),Se(this.cm.display.selectionDiv,A.selection)},ta.prototype.rememberSelection=function(){var A=this.getSelection();this.lastAnchorNode=A.anchorNode,this.lastAnchorOffset=A.anchorOffset,this.lastFocusNode=A.focusNode,this.lastFocusOffset=A.focusOffset},ta.prototype.selectionInEditor=function(){var A=this.getSelection();if(!A.rangeCount)return!1;var y=A.getRangeAt(0).commonAncestorContainer;return je(this.div,y)},ta.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||et(ut(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ta.prototype.blur=function(){this.div.blur()},ta.prototype.getField=function(){return this.div},ta.prototype.supportsTouch=function(){return!0},ta.prototype.receivedFocus=function(){var A=this,y=this;this.selectionInEditor()?setTimeout(function(){return A.pollSelection()},20):Eo(this.cm,function(){return y.cm.curOp.selectionChanged=!0});function O(){y.cm.state.focused&&(y.pollSelection(),y.polling.set(y.cm.options.pollInterval,O))}this.polling.set(this.cm.options.pollInterval,O)},ta.prototype.selectionChanged=function(){var A=this.getSelection();return A.anchorNode!=this.lastAnchorNode||A.anchorOffset!=this.lastAnchorOffset||A.focusNode!=this.lastFocusNode||A.focusOffset!=this.lastFocusOffset},ta.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var A=this.getSelection(),y=this.cm;if(ee&&S&&this.cm.display.gutterSpecs.length&&op(A.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var O=ul(y,A.anchorNode,A.anchorOffset),E=ul(y,A.focusNode,A.focusOffset);O&&E&&Eo(y,function(){vs(y.doc,Ls(O,E),Lt),(O.bad||E.bad)&&(y.curOp.selectionChanged=!0)})}}},ta.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var A=this.cm,y=A.display,O=A.doc.sel.primary(),E=O.from(),R=O.to();if(E.ch==0&&E.line>A.firstLine()&&(E=An(E.line-1,Mr(A.doc,E.line-1).length)),R.ch==Mr(A.doc,R.line).text.length&&R.line<A.lastLine()&&(R=An(R.line+1,0)),E.line<y.viewFrom||R.line>y.viewTo-1)return!1;var H,Ae,_e;E.line==y.viewFrom||(H=rA(A,E.line))==0?(Ae=Ge(y.view[0].line),_e=y.view[0].node):(Ae=Ge(y.view[H].line),_e=y.view[H-1].node.nextSibling);var Be=rA(A,R.line),Le,ht;if(Be==y.view.length-1?(Le=y.viewTo-1,ht=y.lineDiv.lastChild):(Le=Ge(y.view[Be+1].line)-1,ht=y.view[Be+1].node.previousSibling),!_e)return!1;for(var xt=A.doc.splitLines(bm(A,_e,ht,Ae,Le)),Jt=ms(A.doc,An(Ae,0),An(Le,Mr(A.doc,Le).text.length));xt.length>1&&Jt.length>1;)if(ar(xt)==ar(Jt))xt.pop(),Jt.pop(),Le--;else if(xt[0]==Jt[0])xt.shift(),Jt.shift(),Ae++;else break;for(var Qt=0,xn=0,Rn=xt[0],Yn=Jt[0],Xn=Math.min(Rn.length,Yn.length);Qt<Xn&&Rn.charCodeAt(Qt)==Yn.charCodeAt(Qt);)++Qt;for(var yr=ar(xt),or=ar(Jt),Tr=Math.min(yr.length-(xt.length==1?Qt:0),or.length-(Jt.length==1?Qt:0));xn<Tr&&yr.charCodeAt(yr.length-xn-1)==or.charCodeAt(or.length-xn-1);)++xn;if(xt.length==1&&Jt.length==1&&Ae==E.line)for(;Qt&&Qt>E.ch&&yr.charCodeAt(yr.length-xn-1)==or.charCodeAt(or.length-xn-1);)Qt--,xn++;xt[xt.length-1]=yr.slice(0,yr.length-xn).replace(/^\u200b+/,""),xt[0]=xt[0].slice(Qt).replace(/\u200b+$/,"");var li=An(Ae,Qt),Fr=An(Le,Jt.length?ar(Jt).length-xn:0);if(xt.length>1||xt[0]||Qn(li,Fr))return z(A.doc,xt,li,Fr,"+input"),!0},ta.prototype.ensurePolled=function(){this.forceCompositionEnd()},ta.prototype.reset=function(){this.forceCompositionEnd()},ta.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ta.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))},ta.prototype.updateFromDOM=function(){var A=this;(this.cm.isReadOnly()||!this.pollContent())&&Eo(this.cm,function(){return Sl(A.cm)})},ta.prototype.setUneditable=function(A){A.contentEditable="false"},ta.prototype.onKeyPress=function(A){A.charCode==0||this.composing||(A.preventDefault(),this.cm.isReadOnly()||Li(this.cm,ip)(this.cm,String.fromCharCode(A.charCode==null?A.keyCode:A.charCode),0))},ta.prototype.readOnlyChanged=function(A){this.div.contentEditable=String(A!="nocursor")},ta.prototype.onContextMenu=function(){},ta.prototype.resetPosition=function(){},ta.prototype.needsContentAttribute=!0;function bd(A,y){var O=fA(A,y.line);if(!O||O.hidden)return null;var E=Mr(A.doc,y.line),R=zh(O,E,y.line),H=xe(E,A.doc.direction),Ae="left";if(H){var _e=qe(H,y.ch);Ae=_e%2?"right":"left"}var Be=ph(R.map,y.ch,Ae);return Be.offset=Be.collapse=="right"?Be.end:Be.start,Be}function op(A){for(var y=A;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function vu(A,y){return y&&(A.bad=!0),A}function bm(A,y,O,E,R){var H="",Ae=!1,_e=A.doc.lineSeparator(),Be=!1;function Le(Qt){return function(xn){return xn.id==Qt}}function ht(){Ae&&(H+=_e,Be&&(H+=_e),Ae=Be=!1)}function xt(Qt){Qt&&(ht(),H+=Qt)}function Jt(Qt){if(Qt.nodeType==1){var xn=Qt.getAttribute("cm-text");if(xn){xt(xn);return}var Rn=Qt.getAttribute("cm-marker"),Yn;if(Rn){var Xn=A.findMarks(An(E,0),An(R+1,0),Le(+Rn));Xn.length&&(Yn=Xn[0].find(0))&&xt(ms(A.doc,Yn.from,Yn.to).join(_e));return}if(Qt.getAttribute("contenteditable")=="false")return;var yr=/^(pre|div|p|li|table|br)$/i.test(Qt.nodeName);if(!/^br$/i.test(Qt.nodeName)&&Qt.textContent.length==0)return;yr&&ht();for(var or=0;or<Qt.childNodes.length;or++)Jt(Qt.childNodes[or]);/^(pre|p)$/i.test(Qt.nodeName)&&(Be=!0),yr&&(Ae=!0)}else Qt.nodeType==3&&xt(Qt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Jt(y),y!=O;)y=y.nextSibling,Be=!1;return H}function ul(A,y,O){var E;if(y==A.display.lineDiv){if(E=A.display.lineDiv.childNodes[O],!E)return vu(A.clipPos(An(A.display.viewTo-1)),!0);y=null,O=0}else for(E=y;;E=E.parentNode){if(!E||E==A.display.lineDiv)return null;if(E.parentNode&&E.parentNode==A.display.lineDiv)break}for(var R=0;R<A.display.view.length;R++){var H=A.display.view[R];if(H.node==E)return jp(H,y,O)}}function jp(A,y,O){var E=A.text.firstChild,R=!1;if(!y||!je(E,y))return vu(An(Ge(A.line),0),!0);if(y==E&&(R=!0,y=E.childNodes[O],O=0,!y)){var H=A.rest?ar(A.rest):A.line;return vu(An(Ge(H),H.text.length),R)}var Ae=y.nodeType==3?y:null,_e=y;for(!Ae&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(Ae=y.firstChild,O&&(O=Ae.nodeValue.length));_e.parentNode!=E;)_e=_e.parentNode;var Be=A.measure,Le=Be.maps;function ht(Yn,Xn,yr){for(var or=-1;or<(Le?Le.length:0);or++)for(var Tr=or<0?Be.map:Le[or],li=0;li<Tr.length;li+=3){var Fr=Tr[li+2];if(Fr==Yn||Fr==Xn){var no=Ge(or<0?A.line:A.rest[or]),Io=Tr[li]+yr;return(yr<0||Fr!=Yn)&&(Io=Tr[li+(yr?1:0)]),An(no,Io)}}}var xt=ht(Ae,_e,O);if(xt)return vu(xt,R);for(var Jt=_e.nextSibling,Qt=Ae?Ae.nodeValue.length-O:0;Jt;Jt=Jt.nextSibling){if(xt=ht(Jt,Jt.firstChild,0),xt)return vu(An(xt.line,xt.ch-Qt),R);Qt+=Jt.textContent.length}for(var xn=_e.previousSibling,Rn=O;xn;xn=xn.previousSibling){if(xt=ht(xn,xn.firstChild,-1),xt)return vu(An(xt.line,xt.ch+Rn),R);Rn+=xn.textContent.length}}var ds=function(A){this.cm=A,this.prevInput="",this.pollingFast=!1,this.polling=new Fe,this.hasSelection=!1,this.composing=null,this.resetting=!1};ds.prototype.init=function(A){var y=this,O=this,E=this.cm;this.createField(A);var R=this.textarea;A.wrapper.insertBefore(this.wrapper,A.wrapper.firstChild),W&&(R.style.width="0px"),Qe(R,"input",function(){f&&g>=9&&y.hasSelection&&(y.hasSelection=null),O.poll()}),Qe(R,"paste",function(Ae){Ct(E,Ae)||xc(Ae,E)||(E.state.pasteIncoming=+new Date,O.fastPoll())});function H(Ae){if(!Ct(E,Ae)){if(E.somethingSelected())Ch({lineWise:!1,text:E.getSelections()});else if(E.options.lineWiseCopyCut){var _e=Yh(E);Ch({lineWise:!0,text:_e.text}),Ae.type=="cut"?E.setSelections(_e.ranges,null,Lt):(O.prevInput="",R.value=_e.text.join(`
|
||
`),We(R))}else return;Ae.type=="cut"&&(E.state.cutIncoming=+new Date)}}Qe(R,"cut",H),Qe(R,"copy",H),Qe(A.scroller,"paste",function(Ae){if(!(nA(A,Ae)||Ct(E,Ae))){if(!R.dispatchEvent){E.state.pasteIncoming=+new Date,O.focus();return}var _e=new Event("paste");_e.clipboardData=Ae.clipboardData,R.dispatchEvent(_e)}}),Qe(A.lineSpace,"selectstart",function(Ae){nA(A,Ae)||wt(Ae)}),Qe(R,"compositionstart",function(){var Ae=E.getCursor("from");O.composing&&O.composing.range.clear(),O.composing={start:Ae,range:E.markText(Ae,E.getCursor("to"),{className:"CodeMirror-composing"})}}),Qe(R,"compositionend",function(){O.composing&&(O.poll(),O.composing.range.clear(),O.composing=null)})},ds.prototype.createField=function(A){this.wrapper=Cd(),this.textarea=this.wrapper.firstChild;var y=this.cm.options;Zd(this.textarea,y.spellcheck,y.autocorrect,y.autocapitalize)},ds.prototype.screenReaderLabelChanged=function(A){A?this.textarea.setAttribute("aria-label",A):this.textarea.removeAttribute("aria-label")},ds.prototype.prepareSelection=function(){var A=this.cm,y=A.display,O=A.doc,E=id(A);if(A.options.moveInputWithCursor){var R=sn(A,O.sel.primary().head,"div"),H=y.wrapper.getBoundingClientRect(),Ae=y.lineDiv.getBoundingClientRect();E.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,R.top+Ae.top-H.top)),E.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,R.left+Ae.left-H.left))}return E},ds.prototype.showSelection=function(A){var y=this.cm,O=y.display;Se(O.cursorDiv,A.cursors),Se(O.selectionDiv,A.selection),A.teTop!=null&&(this.wrapper.style.top=A.teTop+"px",this.wrapper.style.left=A.teLeft+"px")},ds.prototype.reset=function(A){if(!(this.contextMenuPending||this.composing&&A)){var y=this.cm;if(this.resetting=!0,y.somethingSelected()){this.prevInput="";var O=y.getSelection();this.textarea.value=O,y.state.focused&&We(this.textarea),f&&g>=9&&(this.hasSelection=O)}else A||(this.prevInput=this.textarea.value="",f&&g>=9&&(this.hasSelection=null));this.resetting=!1}},ds.prototype.getField=function(){return this.textarea},ds.prototype.supportsTouch=function(){return!1},ds.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!J||et(ut(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ds.prototype.blur=function(){this.textarea.blur()},ds.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ds.prototype.receivedFocus=function(){this.slowPoll()},ds.prototype.slowPoll=function(){var A=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){A.poll(),A.cm.state.focused&&A.slowPoll()})},ds.prototype.fastPoll=function(){var A=!1,y=this;y.pollingFast=!0;function O(){var E=y.poll();!E&&!A?(A=!0,y.polling.set(60,O)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,O)},ds.prototype.poll=function(){var A=this,y=this.cm,O=this.textarea,E=this.prevInput;if(this.contextMenuPending||this.resetting||!y.state.focused||Pi(O)&&!E&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var R=O.value;if(R==E&&!y.somethingSelected())return!1;if(f&&g>=9&&this.hasSelection===R||$&&/[\uf700-\uf7ff]/.test(R))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var H=R.charCodeAt(0);if(H==8203&&!E&&(E=""),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ae=0,_e=Math.min(E.length,R.length);Ae<_e&&E.charCodeAt(Ae)==R.charCodeAt(Ae);)++Ae;return Eo(y,function(){ip(y,R.slice(Ae),E.length-Ae,null,A.composing?"*compose":null),R.length>1e3||R.indexOf(`
|
||
`)>-1?O.value=A.prevInput="":A.prevInput=R,A.composing&&(A.composing.range.clear(),A.composing.range=y.markText(A.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ds.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ds.prototype.onKeyPress=function(){f&&g>=9&&(this.hasSelection=null),this.fastPoll()},ds.prototype.onContextMenu=function(A){var y=this,O=y.cm,E=O.display,R=y.textarea;y.contextMenuPending&&y.contextMenuPending();var H=pA(O,A),Ae=E.scroller.scrollTop;if(!H||P)return;var _e=O.options.resetSelectionOnContextMenu;_e&&O.doc.sel.contains(H)==-1&&Li(O,vs)(O.doc,Ls(H),Lt);var Be=R.style.cssText,Le=y.wrapper.style.cssText,ht=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",R.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||
top: `+(A.clientY-ht.top-5)+"px; left: "+(A.clientX-ht.left-5)+`px;
|
||
z-index: 1000; background: `+(f?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var xt;b&&(xt=R.ownerDocument.defaultView.scrollY),E.input.focus(),b&&R.ownerDocument.defaultView.scrollTo(null,xt),E.input.reset(),O.somethingSelected()||(R.value=y.prevInput=" "),y.contextMenuPending=Qt,E.selForContextMenu=O.doc.sel,clearTimeout(E.detectingSelectAll);function Jt(){if(R.selectionStart!=null){var Rn=O.somethingSelected(),Yn=""+(Rn?R.value:"");R.value="⇚",R.value=Yn,y.prevInput=Rn?"":"",R.selectionStart=1,R.selectionEnd=Yn.length,E.selForContextMenu=O.doc.sel}}function Qt(){if(y.contextMenuPending==Qt&&(y.contextMenuPending=!1,y.wrapper.style.cssText=Le,R.style.cssText=Be,f&&g<9&&E.scrollbars.setScrollTop(E.scroller.scrollTop=Ae),R.selectionStart!=null)){(!f||f&&g<9)&&Jt();var Rn=0,Yn=function(){E.selForContextMenu==O.doc.sel&&R.selectionStart==0&&R.selectionEnd>0&&y.prevInput==""?Li(O,zl)(O):Rn++<10?E.detectingSelectAll=setTimeout(Yn,500):(E.selForContextMenu=null,E.input.reset())};E.detectingSelectAll=setTimeout(Yn,200)}}if(f&&g>=9&&Jt(),he){sr(A);var xn=function(){ft(window,"mouseup",xn),setTimeout(Qt,20)};Qe(window,"mouseup",xn)}else setTimeout(Qt,50)},ds.prototype.readOnlyChanged=function(A){A||this.reset(),this.textarea.disabled=A=="nocursor",this.textarea.readOnly=!!A},ds.prototype.setUneditable=function(){},ds.prototype.needsContentAttribute=!1;function zp(A,y){if(y=y?Ke(y):{},y.value=A.value,!y.tabindex&&A.tabIndex&&(y.tabindex=A.tabIndex),!y.placeholder&&A.placeholder&&(y.placeholder=A.placeholder),y.autofocus==null){var O=et(ut(A));y.autofocus=O==A||A.getAttribute("autofocus")!=null&&O==document.body}function E(){A.value=_e.getValue()}var R;if(A.form&&(Qe(A.form,"submit",E),!y.leaveSubmitMethodAlone)){var H=A.form;R=H.submit;try{var Ae=H.submit=function(){E(),H.submit=R,H.submit(),H.submit=Ae}}catch{}}y.finishInit=function(Be){Be.save=E,Be.getTextArea=function(){return A},Be.toTextArea=function(){Be.toTextArea=isNaN,E(),A.parentNode.removeChild(Be.getWrapperElement()),A.style.display="",A.form&&(ft(A.form,"submit",E),!y.leaveSubmitMethodAlone&&typeof A.form.submit=="function"&&(A.form.submit=R))}},A.style.display="none";var _e=Bo(function(Be){return A.parentNode.insertBefore(Be,A.nextSibling)},y);return _e}function $h(A){A.off=ft,A.on=Qe,A.wheelEventPixels=oA,A.Doc=Zt,A.splitLines=zn,A.countColumn=we,A.findColumn=Sn,A.isWordChar=hi,A.Pass=bt,A.signal=Et,A.Line=Ks,A.changeEnd=Ka,A.scrollbarModel=Pu,A.Pos=An,A.cmpPos=Qn,A.modes=ii,A.mimeModes=mo,A.resolveMode=ns,A.getMode=wo,A.modeExtensions=Ua,A.extendMode=Ya,A.copyState=Vi,A.startState=Ps,A.innerMode=Rl,A.commands=ll,A.keyMap=go,A.keyName=al,A.isModifierKey=Fs,A.lookupKey=ca,A.normalizeKeyMap=No,A.StringStream=ki,A.SharedTextMarker=St,A.TextMarker=dt,A.LineWidget=$e,A.e_preventDefault=wt,A.e_stopPropagation=Tn,A.e_stop=sr,A.addClass=Ue,A.contains=je,A.rmClass=re,A.keyNames=Ei}Ol(Bo),Nc(Bo);var Hs="iter insert remove copy getEditor constructor".split(" ");for(var ap in Zt.prototype)Zt.prototype.hasOwnProperty(ap)&&tt(Hs,ap)<0&&(Bo.prototype[ap]=function(A){return function(){return A.apply(this.doc,arguments)}}(Zt.prototype[ap]));return Gt(Zt),Bo.inputStyles={textarea:ds,contenteditable:ta},Bo.defineMode=function(A){!Bo.defaults.mode&&A!="null"&&(Bo.defaults.mode=A),Mi.apply(this,arguments)},Bo.defineMIME=ka,Bo.defineMode("null",function(){return{token:function(A){return A.skipToEnd()}}}),Bo.defineMIME("text/plain","null"),Bo.defineExtension=function(A,y){Bo.prototype[A]=y},Bo.defineDocExtension=function(A,y){Zt.prototype[A]=y},Bo.fromTextArea=zp,$h(Bo),Bo.version="5.65.16",Bo})}(xC)),xC.exports}var Eae=B2();const Th=us(Eae);var N7={exports:{}},G7;function Oae(){return G7||(G7=1,function(r,t){(function(e){e(B2())})(function(e){e.defineMode("javascript",function(n,i){var o=n.indentUnit,s=i.statementIndent,a=i.jsonld,f=i.json||a,g=i.trackScope!==!1,b=i.typescript,I=i.wordCharacters||/[\w$\xa1-\uffff]/,S=function(){function Ge(Ki){return{type:Ki,style:"keyword"}}var _t=Ge("keyword a"),cn=Ge("keyword b"),jn=Ge("keyword c"),An=Ge("keyword d"),Qn=Ge("operator"),_i={type:"atom",style:"atom"};return{if:Ge("if"),while:_t,with:_t,else:cn,do:cn,try:cn,finally:cn,return:An,break:An,continue:An,new:Ge("new"),delete:jn,void:jn,throw:jn,debugger:Ge("debugger"),var:Ge("var"),const:Ge("var"),let:Ge("var"),function:Ge("function"),catch:Ge("catch"),for:Ge("for"),switch:Ge("switch"),case:Ge("case"),default:Ge("default"),in:Qn,typeof:Qn,instanceof:Qn,true:_i,false:_i,null:_i,undefined:_i,NaN:_i,Infinity:_i,this:Ge("this"),class:Ge("class"),super:Ge("atom"),yield:jn,export:Ge("export"),import:Ge("import"),extends:jn,await:jn}}(),B=/[+\-*&%=<>!?|~^@]/,P=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function U(Ge){for(var _t=!1,cn,jn=!1;(cn=Ge.next())!=null;){if(!_t){if(cn=="/"&&!jn)return;cn=="["?jn=!0:jn&&cn=="]"&&(jn=!1)}_t=!_t&&cn=="\\"}}var j,q;function W(Ge,_t,cn){return j=Ge,q=cn,_t}function ee(Ge,_t){var cn=Ge.next();if(cn=='"'||cn=="'")return _t.tokenize=J(cn),_t.tokenize(Ge,_t);if(cn=="."&&Ge.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return W("number","number");if(cn=="."&&Ge.match(".."))return W("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(cn))return W(cn);if(cn=="="&&Ge.eat(">"))return W("=>","operator");if(cn=="0"&&Ge.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return W("number","number");if(/\d/.test(cn))return Ge.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),W("number","number");if(cn=="/")return Ge.eat("*")?(_t.tokenize=$,$(Ge,_t)):Ge.eat("/")?(Ge.skipToEnd(),W("comment","comment")):ba(Ge,_t,1)?(U(Ge),Ge.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),W("regexp","string-2")):(Ge.eat("="),W("operator","operator",Ge.current()));if(cn=="`")return _t.tokenize=X,X(Ge,_t);if(cn=="#"&&Ge.peek()=="!")return Ge.skipToEnd(),W("meta","meta");if(cn=="#"&&Ge.eatWhile(I))return W("variable","property");if(cn=="<"&&Ge.match("!--")||cn=="-"&&Ge.match("->")&&!/\S/.test(Ge.string.slice(0,Ge.start)))return Ge.skipToEnd(),W("comment","comment");if(B.test(cn))return(cn!=">"||!_t.lexical||_t.lexical.type!=">")&&(Ge.eat("=")?(cn=="!"||cn=="=")&&Ge.eat("="):/[<>*+\-|&?]/.test(cn)&&(Ge.eat(cn),cn==">"&&Ge.eat(cn))),cn=="?"&&Ge.eat(".")?W("."):W("operator","operator",Ge.current());if(I.test(cn)){Ge.eatWhile(I);var jn=Ge.current();if(_t.lastType!="."){if(S.propertyIsEnumerable(jn)){var An=S[jn];return W(An.type,An.style,jn)}if(jn=="async"&&Ge.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return W("async","keyword",jn)}return W("variable","variable",jn)}}function J(Ge){return function(_t,cn){var jn=!1,An;if(a&&_t.peek()=="@"&&_t.match(P))return cn.tokenize=ee,W("jsonld-keyword","meta");for(;(An=_t.next())!=null&&!(An==Ge&&!jn);)jn=!jn&&An=="\\";return jn||(cn.tokenize=ee),W("string","string")}}function $(Ge,_t){for(var cn=!1,jn;jn=Ge.next();){if(jn=="/"&&cn){_t.tokenize=ee;break}cn=jn=="*"}return W("comment","comment")}function X(Ge,_t){for(var cn=!1,jn;(jn=Ge.next())!=null;){if(!cn&&(jn=="`"||jn=="$"&&Ge.eat("{"))){_t.tokenize=ee;break}cn=!cn&&jn=="\\"}return W("quasi","string-2",Ge.current())}var G="([{}])";function ae(Ge,_t){_t.fatArrowAt&&(_t.fatArrowAt=null);var cn=Ge.string.indexOf("=>",Ge.start);if(!(cn<0)){if(b){var jn=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(Ge.string.slice(Ge.start,cn));jn&&(cn=jn.index)}for(var An=0,Qn=!1,_i=cn-1;_i>=0;--_i){var Ki=Ge.string.charAt(_i),Xi=G.indexOf(Ki);if(Xi>=0&&Xi<3){if(!An){++_i;break}if(--An==0){Ki=="("&&(Qn=!0);break}}else if(Xi>=3&&Xi<6)++An;else if(I.test(Ki))Qn=!0;else if(/["'\/`]/.test(Ki))for(;;--_i){if(_i==0)return;var aa=Ge.string.charAt(_i-1);if(aa==Ki&&Ge.string.charAt(_i-2)!="\\"){_i--;break}}else if(Qn&&!An){++_i;break}}Qn&&!An&&(_t.fatArrowAt=_i)}}var ge={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function he(Ge,_t,cn,jn,An,Qn){this.indented=Ge,this.column=_t,this.type=cn,this.prev=An,this.info=Qn,jn!=null&&(this.align=jn)}function Ie(Ge,_t){if(!g)return!1;for(var cn=Ge.localVars;cn;cn=cn.next)if(cn.name==_t)return!0;for(var jn=Ge.context;jn;jn=jn.prev)for(var cn=jn.vars;cn;cn=cn.next)if(cn.name==_t)return!0}function re(Ge,_t,cn,jn,An){var Qn=Ge.cc;for(oe.state=Ge,oe.stream=An,oe.marked=null,oe.cc=Qn,oe.style=_t,Ge.lexical.hasOwnProperty("align")||(Ge.lexical.align=!0);;){var _i=Qn.length?Qn.pop():f?tt:we;if(_i(cn,jn)){for(;Qn.length&&Qn[Qn.length-1].lex;)Qn.pop()();return oe.marked?oe.marked:cn=="variable"&&Ie(Ge,jn)?"variable-2":_t}}}var oe={state:null,column:null,marked:null,cc:null};function Se(){for(var Ge=arguments.length-1;Ge>=0;Ge--)oe.cc.push(arguments[Ge])}function ye(){return Se.apply(null,arguments),!0}function nt(Ge,_t){for(var cn=_t;cn;cn=cn.next)if(cn.name==Ge)return!0;return!1}function Ne(Ge){var _t=oe.state;if(oe.marked="def",!!g){if(_t.context){if(_t.lexical.info=="var"&&_t.context&&_t.context.block){var cn=je(Ge,_t.context);if(cn!=null){_t.context=cn;return}}else if(!nt(Ge,_t.localVars)){_t.localVars=new ke(Ge,_t.localVars);return}}i.globalVars&&!nt(Ge,_t.globalVars)&&(_t.globalVars=new ke(Ge,_t.globalVars))}}function je(Ge,_t){if(_t)if(_t.block){var cn=je(Ge,_t.prev);return cn?cn==_t.prev?_t:new Ue(cn,_t.vars,!0):null}else return nt(Ge,_t.vars)?_t:new Ue(_t.prev,new ke(Ge,_t.vars),!1);else return null}function et(Ge){return Ge=="public"||Ge=="private"||Ge=="protected"||Ge=="abstract"||Ge=="readonly"}function Ue(Ge,_t,cn){this.prev=Ge,this.vars=_t,this.block=cn}function ke(Ge,_t){this.name=Ge,this.next=_t}var We=new ke("this",new ke("arguments",null));function vt(){oe.state.context=new Ue(oe.state.context,oe.state.localVars,!1),oe.state.localVars=We}function Pt(){oe.state.context=new Ue(oe.state.context,oe.state.localVars,!0),oe.state.localVars=null}vt.lex=Pt.lex=!0;function ut(){oe.state.localVars=oe.state.context.vars,oe.state.context=oe.state.context.prev}ut.lex=!0;function jt(Ge,_t){var cn=function(){var jn=oe.state,An=jn.indented;if(jn.lexical.type=="stat")An=jn.lexical.indented;else for(var Qn=jn.lexical;Qn&&Qn.type==")"&&Qn.align;Qn=Qn.prev)An=Qn.indented;jn.lexical=new he(An,oe.stream.column(),Ge,null,jn.lexical,_t)};return cn.lex=!0,cn}function Rt(){var Ge=oe.state;Ge.lexical.prev&&(Ge.lexical.type==")"&&(Ge.indented=Ge.lexical.indented),Ge.lexical=Ge.lexical.prev)}Rt.lex=!0;function Ke(Ge){function _t(cn){return cn==Ge?ye():Ge==";"||cn=="}"||cn==")"||cn=="]"?Se():ye(_t)}return _t}function we(Ge,_t){return Ge=="var"?ye(jt("vardef",_t),Tn,Ke(";"),Rt):Ge=="keyword a"?ye(jt("form"),bt,we,Rt):Ge=="keyword b"?ye(jt("form"),we,Rt):Ge=="keyword d"?oe.stream.match(/^\s*$/,!1)?ye():ye(jt("stat"),Vt,Ke(";"),Rt):Ge=="debugger"?ye(Ke(";")):Ge=="{"?ye(jt("}"),Pt,Xt,Rt,ut):Ge==";"?ye():Ge=="if"?(oe.state.lexical.info=="else"&&oe.state.cc[oe.state.cc.length-1]==Rt&&oe.state.cc.pop()(),ye(jt("form"),bt,we,Rt,ir)):Ge=="function"?ye(zn):Ge=="for"?ye(jt("form"),Pt,zr,we,ut,Rt):Ge=="class"||b&&_t=="interface"?(oe.marked="keyword",ye(jt("form",Ge=="class"?Ge:_t),ii,Rt)):Ge=="variable"?b&&_t=="declare"?(oe.marked="keyword",ye(we)):b&&(_t=="module"||_t=="enum"||_t=="type")&&oe.stream.match(/^\s*\w/,!1)?(oe.marked="keyword",_t=="enum"?ye(Mr):_t=="type"?ye(po,Ke("operator"),xe,Ke(";")):ye(jt("form"),En,Ke("{"),jt("}"),Xt,Rt,Rt)):b&&_t=="namespace"?(oe.marked="keyword",ye(jt("form"),tt,we,Rt)):b&&_t=="abstract"?(oe.marked="keyword",ye(we)):ye(jt("stat"),wr):Ge=="switch"?ye(jt("form"),bt,Ke("{"),jt("}","switch"),Pt,Xt,Rt,Rt,ut):Ge=="case"?ye(tt,Ke(":")):Ge=="default"?ye(Ke(":")):Ge=="catch"?ye(jt("form"),vt,Fe,we,Rt,ut):Ge=="export"?ye(jt("stat"),ns,Rt):Ge=="import"?ye(jt("stat"),Ua,Rt):Ge=="async"?ye(we):_t=="@"?ye(tt,we):Se(jt("stat"),tt,Ke(";"),Rt)}function Fe(Ge){if(Ge=="(")return ye(ri,Ke(")"))}function tt(Ge,_t){return Lt(Ge,_t,!1)}function mt(Ge,_t){return Lt(Ge,_t,!0)}function bt(Ge){return Ge!="("?Se():ye(jt(")"),Vt,Ke(")"),Rt)}function Lt(Ge,_t,cn){if(oe.state.fatArrowAt==oe.stream.start){var jn=cn?Cr:ar;if(Ge=="(")return ye(vt,jt(")"),Je(ri,")"),Rt,Ke("=>"),jn,ut);if(Ge=="variable")return Se(vt,En,Ke("=>"),jn,ut)}var An=cn?Sn:rn;return ge.hasOwnProperty(Ge)?ye(An):Ge=="function"?ye(zn,An):Ge=="class"||b&&_t=="interface"?(oe.marked="keyword",ye(jt("form"),Xr,Rt)):Ge=="keyword c"||Ge=="async"?ye(cn?mt:tt):Ge=="("?ye(jt(")"),Vt,Ke(")"),Rt,An):Ge=="operator"||Ge=="spread"?ye(cn?mt:tt):Ge=="["?ye(jt("]"),ki,Rt,An):Ge=="{"?kt(Ye,"}",null,An):Ge=="quasi"?Se(Ar,An):Ge=="new"?ye(br(cn)):ye()}function Vt(Ge){return Ge.match(/[;\}\)\],]/)?Se():Se(tt)}function rn(Ge,_t){return Ge==","?ye(Vt):Sn(Ge,_t,!1)}function Sn(Ge,_t,cn){var jn=cn==!1?rn:Sn,An=cn==!1?tt:mt;if(Ge=="=>")return ye(vt,cn?Cr:ar,ut);if(Ge=="operator")return/\+\+|--/.test(_t)||b&&_t=="!"?ye(jn):b&&_t=="<"&&oe.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ye(jt(">"),Je(xe,">"),Rt,jn):_t=="?"?ye(tt,Ke(":"),An):ye(An);if(Ge=="quasi")return Se(Ar,jn);if(Ge!=";"){if(Ge=="(")return kt(mt,")","call",jn);if(Ge==".")return ye(hi,jn);if(Ge=="[")return ye(jt("]"),Vt,Ke("]"),Rt,jn);if(b&&_t=="as")return oe.marked="keyword",ye(xe,jn);if(Ge=="regexp")return oe.state.lastType=oe.marked="operator",oe.stream.backUp(oe.stream.pos-oe.stream.start-1),ye(An)}}function Ar(Ge,_t){return Ge!="quasi"?Se():_t.slice(_t.length-2)!="${"?ye(Ar):ye(Vt,Bn)}function Bn(Ge){if(Ge=="}")return oe.marked="string-2",oe.state.tokenize=X,ye(Ar)}function ar(Ge){return ae(oe.stream,oe.state),Se(Ge=="{"?we:tt)}function Cr(Ge){return ae(oe.stream,oe.state),Se(Ge=="{"?we:mt)}function br(Ge){return function(_t){return _t=="."?ye(Ge?Jr:_r):_t=="variable"&&b?ye(Yt,Ge?Sn:rn):Se(Ge?mt:tt)}}function _r(Ge,_t){if(_t=="target")return oe.marked="keyword",ye(rn)}function Jr(Ge,_t){if(_t=="target")return oe.marked="keyword",ye(Sn)}function wr(Ge){return Ge==":"?ye(Rt,we):Se(rn,Ke(";"),Rt)}function hi(Ge){if(Ge=="variable")return oe.marked="property",ye()}function Ye(Ge,_t){if(Ge=="async")return oe.marked="property",ye(Ye);if(Ge=="variable"||oe.style=="keyword"){if(oe.marked="property",_t=="get"||_t=="set")return ye(de);var cn;return b&&oe.state.fatArrowAt==oe.stream.start&&(cn=oe.stream.match(/^\s*:\s*/,!1))&&(oe.state.fatArrowAt=oe.stream.pos+cn[0].length),ye(pe)}else{if(Ge=="number"||Ge=="string")return oe.marked=a?"property":oe.style+" property",ye(pe);if(Ge=="jsonld-keyword")return ye(pe);if(b&&et(_t))return oe.marked="keyword",ye(Ye);if(Ge=="[")return ye(tt,it,Ke("]"),pe);if(Ge=="spread")return ye(mt,pe);if(_t=="*")return oe.marked="keyword",ye(Ye);if(Ge==":")return Se(pe)}}function de(Ge){return Ge!="variable"?Se(pe):(oe.marked="property",ye(zn))}function pe(Ge){if(Ge==":")return ye(mt);if(Ge=="(")return Se(zn)}function Je(Ge,_t,cn){function jn(An,Qn){if(cn?cn.indexOf(An)>-1:An==","){var _i=oe.state.lexical;return _i.info=="call"&&(_i.pos=(_i.pos||0)+1),ye(function(Ki,Xi){return Ki==_t||Xi==_t?Se():Se(Ge)},jn)}return An==_t||Qn==_t?ye():cn&&cn.indexOf(";")>-1?Se(Ge):ye(Ke(_t))}return function(An,Qn){return An==_t||Qn==_t?ye():Se(Ge,jn)}}function kt(Ge,_t,cn){for(var jn=3;jn<arguments.length;jn++)oe.cc.push(arguments[jn]);return ye(jt(_t,cn),Je(Ge,_t),Rt)}function Xt(Ge){return Ge=="}"?ye():Se(we,Xt)}function it(Ge,_t){if(b){if(Ge==":")return ye(xe);if(_t=="?")return ye(it)}}function Ut(Ge,_t){if(b&&(Ge==":"||_t=="in"))return ye(xe)}function qe(Ge){if(b&&Ge==":")return oe.stream.match(/^\s*\w+\s+is\b/,!1)?ye(tt,fe,xe):ye(xe)}function fe(Ge,_t){if(_t=="is")return oe.marked="keyword",ye()}function xe(Ge,_t){if(_t=="keyof"||_t=="typeof"||_t=="infer"||_t=="readonly")return oe.marked="keyword",ye(_t=="typeof"?mt:xe);if(Ge=="variable"||_t=="void")return oe.marked="type",ye(nn);if(_t=="|"||_t=="&")return ye(xe);if(Ge=="string"||Ge=="number"||Ge=="atom")return ye(nn);if(Ge=="[")return ye(jt("]"),Je(xe,"]",","),Rt,nn);if(Ge=="{")return ye(jt("}"),Qe,Rt,nn);if(Ge=="(")return ye(Je(Ct,")"),p,nn);if(Ge=="<")return ye(Je(xe,">"),xe);if(Ge=="quasi")return Se(ft,nn)}function p(Ge){if(Ge=="=>")return ye(xe)}function Qe(Ge){return Ge.match(/[\}\)\]]/)?ye():Ge==","||Ge==";"?ye(Qe):Se(pt,Qe)}function pt(Ge,_t){if(Ge=="variable"||oe.style=="keyword")return oe.marked="property",ye(pt);if(_t=="?"||Ge=="number"||Ge=="string")return ye(pt);if(Ge==":")return ye(xe);if(Ge=="[")return ye(Ke("variable"),Ut,Ke("]"),pt);if(Ge=="(")return Se(Pi,pt);if(!Ge.match(/[;\}\)\],]/))return ye()}function ft(Ge,_t){return Ge!="quasi"?Se():_t.slice(_t.length-2)!="${"?ye(ft):ye(xe,Et)}function Et(Ge){if(Ge=="}")return oe.marked="string-2",oe.state.tokenize=X,ye(ft)}function Ct(Ge,_t){return Ge=="variable"&&oe.stream.match(/^\s*[?:]/,!1)||_t=="?"?ye(Ct):Ge==":"?ye(xe):Ge=="spread"?ye(Ct):Se(xe)}function nn(Ge,_t){if(_t=="<")return ye(jt(">"),Je(xe,">"),Rt,nn);if(_t=="|"||Ge=="."||_t=="&")return ye(xe);if(Ge=="[")return ye(xe,Ke("]"),nn);if(_t=="extends"||_t=="implements")return oe.marked="keyword",ye(xe);if(_t=="?")return ye(xe,Ke(":"),xe)}function Yt(Ge,_t){if(_t=="<")return ye(jt(">"),Je(xe,">"),Rt,nn)}function Gt(){return Se(xe,wt)}function wt(Ge,_t){if(_t=="=")return ye(xe)}function Tn(Ge,_t){return _t=="enum"?(oe.marked="keyword",ye(Mr)):Se(En,it,an,Wn)}function En(Ge,_t){if(b&&et(_t))return oe.marked="keyword",ye(En);if(Ge=="variable")return Ne(_t),ye();if(Ge=="spread")return ye(En);if(Ge=="[")return kt(Pr,"]");if(Ge=="{")return kt(sr,"}")}function sr(Ge,_t){return Ge=="variable"&&!oe.stream.match(/^\s*:/,!1)?(Ne(_t),ye(an)):(Ge=="variable"&&(oe.marked="property"),Ge=="spread"?ye(En):Ge=="}"?Se():Ge=="["?ye(tt,Ke("]"),Ke(":"),sr):ye(Ke(":"),En,an))}function Pr(){return Se(En,an)}function an(Ge,_t){if(_t=="=")return ye(mt)}function Wn(Ge){if(Ge==",")return ye(Tn)}function ir(Ge,_t){if(Ge=="keyword b"&&_t=="else")return ye(jt("form","else"),we,Rt)}function zr(Ge,_t){if(_t=="await")return ye(zr);if(Ge=="(")return ye(jt(")"),fr,Rt)}function fr(Ge){return Ge=="var"?ye(Tn,hr):Ge=="variable"?ye(hr):Se(hr)}function hr(Ge,_t){return Ge==")"?ye():Ge==";"?ye(hr):_t=="in"||_t=="of"?(oe.marked="keyword",ye(tt,hr)):Se(tt,hr)}function zn(Ge,_t){if(_t=="*")return oe.marked="keyword",ye(zn);if(Ge=="variable")return Ne(_t),ye(zn);if(Ge=="(")return ye(vt,jt(")"),Je(ri,")"),Rt,qe,we,ut);if(b&&_t=="<")return ye(jt(">"),Je(Gt,">"),Rt,zn)}function Pi(Ge,_t){if(_t=="*")return oe.marked="keyword",ye(Pi);if(Ge=="variable")return Ne(_t),ye(Pi);if(Ge=="(")return ye(vt,jt(")"),Je(ri,")"),Rt,qe,ut);if(b&&_t=="<")return ye(jt(">"),Je(Gt,">"),Rt,Pi)}function po(Ge,_t){if(Ge=="keyword"||Ge=="variable")return oe.marked="type",ye(po);if(_t=="<")return ye(jt(">"),Je(Gt,">"),Rt)}function ri(Ge,_t){return _t=="@"&&ye(tt,ri),Ge=="spread"?ye(ri):b&&et(_t)?(oe.marked="keyword",ye(ri)):b&&Ge=="this"?ye(it,an):Se(En,it,an)}function Xr(Ge,_t){return Ge=="variable"?ii(Ge,_t):mo(Ge,_t)}function ii(Ge,_t){if(Ge=="variable")return Ne(_t),ye(mo)}function mo(Ge,_t){if(_t=="<")return ye(jt(">"),Je(Gt,">"),Rt,mo);if(_t=="extends"||_t=="implements"||b&&Ge==",")return _t=="implements"&&(oe.marked="keyword"),ye(b?xe:tt,mo);if(Ge=="{")return ye(jt("}"),Mi,Rt)}function Mi(Ge,_t){if(Ge=="async"||Ge=="variable"&&(_t=="static"||_t=="get"||_t=="set"||b&&et(_t))&&oe.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return oe.marked="keyword",ye(Mi);if(Ge=="variable"||oe.style=="keyword")return oe.marked="property",ye(ka,Mi);if(Ge=="number"||Ge=="string")return ye(ka,Mi);if(Ge=="[")return ye(tt,it,Ke("]"),ka,Mi);if(_t=="*")return oe.marked="keyword",ye(Mi);if(b&&Ge=="(")return Se(Pi,Mi);if(Ge==";"||Ge==",")return ye(Mi);if(Ge=="}")return ye();if(_t=="@")return ye(tt,Mi)}function ka(Ge,_t){if(_t=="!"||_t=="?")return ye(ka);if(Ge==":")return ye(xe,an);if(_t=="=")return ye(mt);var cn=oe.state.lexical.prev,jn=cn&&cn.info=="interface";return Se(jn?Pi:zn)}function ns(Ge,_t){return _t=="*"?(oe.marked="keyword",ye(Ps,Ke(";"))):_t=="default"?(oe.marked="keyword",ye(tt,Ke(";"))):Ge=="{"?ye(Je(wo,"}"),Ps,Ke(";")):Se(we)}function wo(Ge,_t){if(_t=="as")return oe.marked="keyword",ye(Ke("variable"));if(Ge=="variable")return Se(mt,wo)}function Ua(Ge){return Ge=="string"?ye():Ge=="("?Se(tt):Ge=="."?Se(rn):Se(Ya,Vi,Ps)}function Ya(Ge,_t){return Ge=="{"?kt(Ya,"}"):(Ge=="variable"&&Ne(_t),_t=="*"&&(oe.marked="keyword"),ye(Rl))}function Vi(Ge){if(Ge==",")return ye(Ya,Vi)}function Rl(Ge,_t){if(_t=="as")return oe.marked="keyword",ye(Ya)}function Ps(Ge,_t){if(_t=="from")return oe.marked="keyword",ye(tt)}function ki(Ge){return Ge=="]"?ye():Se(Je(mt,"]"))}function Mr(){return Se(jt("form"),En,Ke("{"),jt("}"),Je(ms,"}"),Rt,Rt)}function ms(){return Se(En,an)}function oa(Ge,_t){return Ge.lastType=="operator"||Ge.lastType==","||B.test(_t.charAt(0))||/[,.]/.test(_t.charAt(0))}function ba(Ge,_t,cn){return _t.tokenize==ee&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(_t.lastType)||_t.lastType=="quasi"&&/\{\s*$/.test(Ge.string.slice(0,Ge.pos-(cn||0)))}return{startState:function(Ge){var _t={tokenize:ee,lastType:"sof",cc:[],lexical:new he((Ge||0)-o,0,"block",!1),localVars:i.localVars,context:i.localVars&&new Ue(null,null,!1),indented:Ge||0};return i.globalVars&&typeof i.globalVars=="object"&&(_t.globalVars=i.globalVars),_t},token:function(Ge,_t){if(Ge.sol()&&(_t.lexical.hasOwnProperty("align")||(_t.lexical.align=!1),_t.indented=Ge.indentation(),ae(Ge,_t)),_t.tokenize!=$&&Ge.eatSpace())return null;var cn=_t.tokenize(Ge,_t);return j=="comment"?cn:(_t.lastType=j=="operator"&&(q=="++"||q=="--")?"incdec":j,re(_t,cn,j,q,Ge))},indent:function(Ge,_t){if(Ge.tokenize==$||Ge.tokenize==X)return e.Pass;if(Ge.tokenize!=ee)return 0;var cn=_t&&_t.charAt(0),jn=Ge.lexical,An;if(!/^\s*else\b/.test(_t))for(var Qn=Ge.cc.length-1;Qn>=0;--Qn){var _i=Ge.cc[Qn];if(_i==Rt)jn=jn.prev;else if(_i!=ir&&_i!=ut)break}for(;(jn.type=="stat"||jn.type=="form")&&(cn=="}"||(An=Ge.cc[Ge.cc.length-1])&&(An==rn||An==Sn)&&!/^[,\.=+\-*:?[\(]/.test(_t));)jn=jn.prev;s&&jn.type==")"&&jn.prev.type=="stat"&&(jn=jn.prev);var Ki=jn.type,Xi=cn==Ki;return Ki=="vardef"?jn.indented+(Ge.lastType=="operator"||Ge.lastType==","?jn.info.length+1:0):Ki=="form"&&cn=="{"?jn.indented:Ki=="form"?jn.indented+o:Ki=="stat"?jn.indented+(oa(Ge,_t)?s||o:0):jn.info=="switch"&&!Xi&&i.doubleIndentSwitch!=!1?jn.indented+(/^(?:case|default)\b/.test(_t)?o:2*o):jn.align?jn.column+(Xi?0:1):jn.indented+(Xi?0:o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:f?null:"/*",blockCommentEnd:f?null:"*/",blockCommentContinue:f?null:" * ",lineComment:f?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:f?"json":"javascript",jsonldMode:a,jsonMode:f,expressionAllowed:ba,skipExpression:function(Ge){re(Ge,"atom","atom","true",new e.StringStream("",2,null))}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),N7.exports}Oae();var W7={exports:{}},Q7;function Bae(){return Q7||(Q7=1,function(r,t){(function(e){e(B2())})(function(e){var n="CodeMirror-lint-markers",i="CodeMirror-lint-line-";function o(G,ae,ge){var he=document.createElement("div");he.className="CodeMirror-lint-tooltip cm-s-"+G.options.theme,he.appendChild(ge.cloneNode(!0)),G.state.lint.options.selfContain?G.getWrapperElement().appendChild(he):document.body.appendChild(he);function Ie(re){if(!he.parentNode)return e.off(document,"mousemove",Ie);var oe=Math.max(0,re.clientY-he.offsetHeight-5),Se=Math.max(0,Math.min(re.clientX+5,he.ownerDocument.defaultView.innerWidth-he.offsetWidth));he.style.top=oe+"px",he.style.left=Se+"px"}return e.on(document,"mousemove",Ie),Ie(ae),he.style.opacity!=null&&(he.style.opacity=1),he}function s(G){G.parentNode&&G.parentNode.removeChild(G)}function a(G){G.parentNode&&(G.style.opacity==null&&s(G),G.style.opacity=0,setTimeout(function(){s(G)},600))}function f(G,ae,ge,he){var Ie=o(G,ae,ge);function re(){e.off(he,"mouseout",re),Ie&&(a(Ie),Ie=null)}var oe=setInterval(function(){if(Ie)for(var Se=he;;Se=Se.parentNode){if(Se&&Se.nodeType==11&&(Se=Se.host),Se==document.body)return;if(!Se){re();break}}if(!Ie)return clearInterval(oe)},400);e.on(he,"mouseout",re)}function g(G,ae,ge){this.marked=[],ae instanceof Function&&(ae={getAnnotations:ae}),(!ae||ae===!0)&&(ae={}),this.options={},this.linterOptions=ae.options||{};for(var he in b)this.options[he]=b[he];for(var he in ae)b.hasOwnProperty(he)?ae[he]!=null&&(this.options[he]=ae[he]):ae.options||(this.linterOptions[he]=ae[he]);this.timeout=null,this.hasGutter=ge,this.onMouseOver=function(Ie){X(G,Ie)},this.waitingFor=0}var b={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function I(G){var ae=G.state.lint;ae.hasGutter&&G.clearGutter(n),ae.options.highlightLines&&S(G);for(var ge=0;ge<ae.marked.length;++ge)ae.marked[ge].clear();ae.marked.length=0}function S(G){G.eachLine(function(ae){var ge=ae.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(ae.wrapClass);ge&&G.removeLineClass(ae,"wrap",ge[0])})}function B(G,ae,ge,he,Ie){var re=document.createElement("div"),oe=re;return re.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+ge,he&&(oe=re.appendChild(document.createElement("div")),oe.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),Ie!=!1&&e.on(oe,"mouseover",function(Se){f(G,Se,ae,oe)}),re}function P(G,ae){return G=="error"?G:ae}function U(G){for(var ae=[],ge=0;ge<G.length;++ge){var he=G[ge],Ie=he.from.line;(ae[Ie]||(ae[Ie]=[])).push(he)}return ae}function j(G){var ae=G.severity;ae||(ae="error");var ge=document.createElement("div");return ge.className="CodeMirror-lint-message CodeMirror-lint-message-"+ae,typeof G.messageHTML<"u"?ge.innerHTML=G.messageHTML:ge.appendChild(document.createTextNode(G.message)),ge}function q(G,ae){var ge=G.state.lint,he=++ge.waitingFor;function Ie(){he=-1,G.off("change",Ie)}G.on("change",Ie),ae(G.getValue(),function(re,oe){G.off("change",Ie),ge.waitingFor==he&&(oe&&re instanceof e&&(re=oe),G.operation(function(){ee(G,re)}))},ge.linterOptions,G)}function W(G){var ae=G.state.lint;if(ae){var ge=ae.options,he=ge.getAnnotations||G.getHelper(e.Pos(0,0),"lint");if(he)if(ge.async||he.async)q(G,he);else{var Ie=he(G.getValue(),ae.linterOptions,G);if(!Ie)return;Ie.then?Ie.then(function(re){G.operation(function(){ee(G,re)})}):G.operation(function(){ee(G,Ie)})}}}function ee(G,ae){var ge=G.state.lint;if(ge){var he=ge.options;I(G);for(var Ie=U(ae),re=0;re<Ie.length;++re){var oe=Ie[re];if(oe){for(var Se=null,ye=ge.hasGutter&&document.createDocumentFragment(),nt=0;nt<oe.length;++nt){var Ne=oe[nt],je=Ne.severity;je||(je="error"),Se=P(Se,je),he.formatAnnotation&&(Ne=he.formatAnnotation(Ne)),ge.hasGutter&&ye.appendChild(j(Ne)),Ne.to&&ge.marked.push(G.markText(Ne.from,Ne.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+je,__annotation:Ne}))}ge.hasGutter&&G.setGutterMarker(re,n,B(G,ye,Se,oe.length>1,he.tooltips)),he.highlightLines&&G.addLineClass(re,"wrap",i+Se)}}he.onUpdateLinting&&he.onUpdateLinting(ae,Ie,G)}}function J(G){var ae=G.state.lint;ae&&(clearTimeout(ae.timeout),ae.timeout=setTimeout(function(){W(G)},ae.options.delay))}function $(G,ae,ge){for(var he=ge.target||ge.srcElement,Ie=document.createDocumentFragment(),re=0;re<ae.length;re++){var oe=ae[re];Ie.appendChild(j(oe))}f(G,ge,Ie,he)}function X(G,ae){var ge=ae.target||ae.srcElement;if(/\bCodeMirror-lint-mark-/.test(ge.className)){for(var he=ge.getBoundingClientRect(),Ie=(he.left+he.right)/2,re=(he.top+he.bottom)/2,oe=G.findMarksAt(G.coordsChar({left:Ie,top:re},"client")),Se=[],ye=0;ye<oe.length;++ye){var nt=oe[ye].__annotation;nt&&Se.push(nt)}Se.length&&$(G,Se,ae)}}e.defineOption("lint",!1,function(G,ae,ge){if(ge&&ge!=e.Init&&(I(G),G.state.lint.options.lintOnChange!==!1&&G.off("change",J),e.off(G.getWrapperElement(),"mouseover",G.state.lint.onMouseOver),clearTimeout(G.state.lint.timeout),delete G.state.lint),ae){for(var he=G.getOption("gutters"),Ie=!1,re=0;re<he.length;++re)he[re]==n&&(Ie=!0);var oe=G.state.lint=new g(G,ae,Ie);oe.options.lintOnChange&&G.on("change",J),oe.options.tooltips!=!1&&oe.options.tooltips!="gutter"&&e.on(G.getWrapperElement(),"mouseover",oe.onMouseOver),W(G)}}),e.defineExtension("performLint",function(){W(this)})})}()),W7.exports}Bae();var q7={exports:{}},Y7;function Iae(){return Y7||(Y7=1,function(r,t){(function(e){e(B2())})(function(e){var n=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),i=e.Pos,o={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function s(S){return S&&S.bracketRegex||/[(){}[\]]/}function a(S,B,P){var U=S.getLineHandle(B.line),j=B.ch-1,q=P&&P.afterCursor;q==null&&(q=/(^| )cm-fat-cursor($| )/.test(S.getWrapperElement().className));var W=s(P),ee=!q&&j>=0&&W.test(U.text.charAt(j))&&o[U.text.charAt(j)]||W.test(U.text.charAt(j+1))&&o[U.text.charAt(++j)];if(!ee)return null;var J=ee.charAt(1)==">"?1:-1;if(P&&P.strict&&J>0!=(j==B.ch))return null;var $=S.getTokenTypeAt(i(B.line,j+1)),X=f(S,i(B.line,j+(J>0?1:0)),J,$,P);return X==null?null:{from:i(B.line,j),to:X&&X.pos,match:X&&X.ch==ee.charAt(0),forward:J>0}}function f(S,B,P,U,j){for(var q=j&&j.maxScanLineLength||1e4,W=j&&j.maxScanLines||1e3,ee=[],J=s(j),$=P>0?Math.min(B.line+W,S.lastLine()+1):Math.max(S.firstLine()-1,B.line-W),X=B.line;X!=$;X+=P){var G=S.getLine(X);if(G){var ae=P>0?0:G.length-1,ge=P>0?G.length:-1;if(!(G.length>q))for(X==B.line&&(ae=B.ch-(P<0?1:0));ae!=ge;ae+=P){var he=G.charAt(ae);if(J.test(he)&&(U===void 0||(S.getTokenTypeAt(i(X,ae+1))||"")==(U||""))){var Ie=o[he];if(Ie&&Ie.charAt(1)==">"==P>0)ee.push(he);else if(ee.length)ee.pop();else return{pos:i(X,ae),ch:he}}}}}return X-P==(P>0?S.lastLine():S.firstLine())?!1:null}function g(S,B,P){for(var U=S.state.matchBrackets.maxHighlightLineLength||1e3,j=P&&P.highlightNonMatching,q=[],W=S.listSelections(),ee=0;ee<W.length;ee++){var J=W[ee].empty()&&a(S,W[ee].head,P);if(J&&(J.match||j!==!1)&&S.getLine(J.from.line).length<=U){var $=J.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";q.push(S.markText(J.from,i(J.from.line,J.from.ch+1),{className:$})),J.to&&S.getLine(J.to.line).length<=U&&q.push(S.markText(J.to,i(J.to.line,J.to.ch+1),{className:$}))}}if(q.length){n&&S.state.focused&&S.focus();var X=function(){S.operation(function(){for(var G=0;G<q.length;G++)q[G].clear()})};if(B)setTimeout(X,800);else return X}}function b(S){S.operation(function(){S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null),S.state.matchBrackets.currentlyHighlighted=g(S,!1,S.state.matchBrackets)})}function I(S){S.state.matchBrackets&&S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,function(S,B,P){P&&P!=e.Init&&(S.off("cursorActivity",b),S.off("focus",b),S.off("blur",I),I(S)),B&&(S.state.matchBrackets=typeof B=="object"?B:{},S.on("cursorActivity",b),S.on("focus",b),S.on("blur",I))}),e.defineExtension("matchBrackets",function(){g(this,!0)}),e.defineExtension("findMatchingBracket",function(S,B,P){return(P||typeof B=="boolean")&&(P?(P.strict=B,B=P):B=B?{strict:!0}:null),a(this,S,B)}),e.defineExtension("scanForBracket",function(S,B,P,U){return f(this,S,B,P,U)})})}()),q7.exports}Iae();const kae=/("(?:[^\\"]|\\.)*")|[:,]/g;function FU(r,t={}){const e=JSON.stringify([1],void 0,t.indent===void 0?2:t.indent).slice(2,-3),n=e===""?1/0:t.maxLength===void 0?80:t.maxLength;let{replacer:i}=t;return function o(s,a,f){s&&typeof s.toJSON=="function"&&(s=s.toJSON());const g=JSON.stringify(s,i);if(g===void 0)return g;const b=n-a.length-f;if(g.length<=b){const I=g.replace(kae,(S,B)=>B||`${S} `);if(I.length<=b)return I}if(i!=null&&(s=JSON.parse(g),i=void 0),typeof s=="object"&&s!==null){const I=a+e,S=[];let B=0,P,U;if(Array.isArray(s)){P="[",U="]";const{length:j}=s;for(;B<j;B++)S.push(o(s[B],I,B===j-1?0:1)||"null")}else{P="{",U="}";const j=Object.keys(s),{length:q}=j;for(;B<q;B++){const W=j[B],ee=`${JSON.stringify(W)}: `,J=o(s[W],I,ee.length+(B===q-1?0:1));J!==void 0&&S.push(ee+J)}}if(S.length>0)return[P,e+S.join(`,
|
||
${I}`),U].join(`
|
||
${a}`)}return g}(r,"",0)}function Tae(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var o4={},$7;function Pae(){return $7||($7=1,function(r){var t=function(){var e={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,s,a,f,g,b,I){var S=b.length-1;switch(g){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.$=b[S-1];case 13:this.$={};break;case 14:this.$=b[S-1];break;case 15:this.$=[b[S-2],b[S]];break;case 16:this.$={},this.$[b[S][0]]=b[S][1];break;case 17:this.$=b[S-2],b[S-2][b[S][0]]=b[S][1];break;case 18:this.$=[];break;case 19:this.$=b[S-1];break;case 20:this.$=[b[S]];break;case 21:this.$=b[S-2],b[S-2].push(b[S]);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,s){throw new Error(o)},parse:function(o){var s=this,a=[0],f=[null],g=[],b=this.table,I="",S=0,B=0,P=0,U=2,j=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;g.push(q),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function W(ye){a.length=a.length-2*ye,f.length=f.length-ye,g.length=g.length-ye}function ee(){var ye;return ye=s.lexer.lex()||1,typeof ye!="number"&&(ye=s.symbols_[ye]||ye),ye}for(var J,$,X,G,ae,ge={},he,Ie,re,oe;;){if(X=a[a.length-1],this.defaultActions[X]?G=this.defaultActions[X]:(J==null&&(J=ee()),G=b[X]&&b[X][J]),typeof G>"u"||!G.length||!G[0]){if(!P){oe=[];for(he in b[X])this.terminals_[he]&&he>2&&oe.push("'"+this.terminals_[he]+"'");var Se="";this.lexer.showPosition?Se="Parse error on line "+(S+1)+`:
|
||
`+this.lexer.showPosition()+`
|
||
Expecting `+oe.join(", ")+", got '"+this.terminals_[J]+"'":Se="Parse error on line "+(S+1)+": Unexpected "+(J==1?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Se,{text:this.lexer.match,token:this.terminals_[J]||J,line:this.lexer.yylineno,loc:q,expected:oe})}if(P==3){if(J==j)throw new Error(Se||"Parsing halted.");B=this.lexer.yyleng,I=this.lexer.yytext,S=this.lexer.yylineno,q=this.lexer.yylloc,J=ee()}for(;!(U.toString()in b[X]);){if(X==0)throw new Error(Se||"Parsing halted.");W(1),X=a[a.length-1]}$=J,J=U,X=a[a.length-1],G=b[X]&&b[X][U],P=3}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+J);switch(G[0]){case 1:a.push(J),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),a.push(G[1]),J=null,$?(J=$,$=null):(B=this.lexer.yyleng,I=this.lexer.yytext,S=this.lexer.yylineno,q=this.lexer.yylloc,P>0&&P--);break;case 2:if(Ie=this.productions_[G[1]][1],ge.$=f[f.length-Ie],ge._$={first_line:g[g.length-(Ie||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(Ie||1)].first_column,last_column:g[g.length-1].last_column},ae=this.performAction.call(ge,I,B,S,this.yy,G[1],f,g),typeof ae<"u")return ae;Ie&&(a=a.slice(0,-1*Ie*2),f=f.slice(0,-1*Ie),g=g.slice(0,-1*Ie)),a.push(this.productions_[G[1]][0]),f.push(ge.$),g.push(ge._$),re=b[a[a.length-2]][a[a.length-1]],a.push(re);break;case 3:return!0}}return!0}},n=function(){var i={EOF:1,parseError:function(s,a){if(this.yy.parseError)this.yy.parseError(s,a);else throw new Error(s)},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 s=o.match(/\n/);return s&&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(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
||
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,f,g;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),I=0;I<b.length&&(a=this._input.match(this.rules[b[I]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,f=I,!this.options.flex)));I++);if(s)return g=s[0].match(/\n.*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-1:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,b[f],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 s=this.next();return typeof s<"u"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},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(s){this.begin(s)}};return i.options={},i.performAction=function(s,a,f,g){switch(f){case 0:break;case 1:return 6;case 2:return a.yytext=a.yytext.substr(1,a.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 e.lexer=n,e}();typeof Tae<"u"&&(r.parser=t,r.parse=t.parse.bind(t))}(o4)),o4}var Kae=Pae();const ME=us(Kae);var wC={exports:{}},Rae=wC.exports,V7;function Dae(){return V7||(V7=1,function(r,t){(function(e,n){r.exports=n()})(Rae,function(){var e=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function n(we,Fe){return Fe={exports:{}},we(Fe,Fe.exports),Fe.exports}var i=n(function(we){function Fe(){var tt=0,mt=1,bt=2,Lt=3,Vt=4,rn=5,Sn=6,Ar=7,Bn=8,ar=9,Cr=10,br=11,_r=12,Jr=13,wr=14,hi=15,Ye=16,de=17,pe=0,Je=1,kt=2,Xt=3,it=4;function Ut(p,Qe){return 55296<=p.charCodeAt(Qe)&&p.charCodeAt(Qe)<=56319&&56320<=p.charCodeAt(Qe+1)&&p.charCodeAt(Qe+1)<=57343}function qe(p,Qe){Qe===void 0&&(Qe=0);var pt=p.charCodeAt(Qe);if(55296<=pt&&pt<=56319&&Qe<p.length-1){var ft=pt,Et=p.charCodeAt(Qe+1);return 56320<=Et&&Et<=57343?(ft-55296)*1024+(Et-56320)+65536:ft}if(56320<=pt&&pt<=57343&&Qe>=1){var ft=p.charCodeAt(Qe-1),Et=pt;return 55296<=ft&&ft<=56319?(ft-55296)*1024+(Et-56320)+65536:Et}return pt}function fe(p,Qe,pt){var ft=[p].concat(Qe).concat([pt]),Et=ft[ft.length-2],Ct=pt,nn=ft.lastIndexOf(wr);if(nn>1&&ft.slice(1,nn).every(function(wt){return wt==Lt})&&[Lt,Jr,de].indexOf(p)==-1)return kt;var Yt=ft.lastIndexOf(Vt);if(Yt>0&&ft.slice(1,Yt).every(function(wt){return wt==Vt})&&[_r,Vt].indexOf(Et)==-1)return ft.filter(function(wt){return wt==Vt}).length%2==1?Xt:it;if(Et==tt&&Ct==mt)return pe;if(Et==bt||Et==tt||Et==mt)return Ct==wr&&Qe.every(function(wt){return wt==Lt})?kt:Je;if(Ct==bt||Ct==tt||Ct==mt)return Je;if(Et==Sn&&(Ct==Sn||Ct==Ar||Ct==ar||Ct==Cr))return pe;if((Et==ar||Et==Ar)&&(Ct==Ar||Ct==Bn))return pe;if((Et==Cr||Et==Bn)&&Ct==Bn)return pe;if(Ct==Lt||Ct==hi)return pe;if(Ct==rn)return pe;if(Et==_r)return pe;var Gt=ft.indexOf(Lt)!=-1?ft.lastIndexOf(Lt)-1:ft.length-2;return[Jr,de].indexOf(ft[Gt])!=-1&&ft.slice(Gt+1,-1).every(function(wt){return wt==Lt})&&Ct==wr||Et==hi&&[Ye,de].indexOf(Ct)!=-1?pe:Qe.indexOf(Vt)!=-1?kt:Et==Vt&&Ct==Vt?pe:Je}this.nextBreak=function(p,Qe){if(Qe===void 0&&(Qe=0),Qe<0)return 0;if(Qe>=p.length-1)return p.length;for(var pt=xe(qe(p,Qe)),ft=[],Et=Qe+1;Et<p.length;Et++)if(!Ut(p,Et-1)){var Ct=xe(qe(p,Et));if(fe(pt,ft,Ct))return Et;ft.push(Ct)}return p.length},this.splitGraphemes=function(p){for(var Qe=[],pt=0,ft;(ft=this.nextBreak(p,pt))<p.length;)Qe.push(p.slice(pt,ft)),pt=ft;return pt<p.length&&Qe.push(p.slice(pt)),Qe},this.iterateGraphemes=function(p){var Qe=0,pt={next:(function(){var ft,Et;return(Et=this.nextBreak(p,Qe))<p.length?(ft=p.slice(Qe,Et),Qe=Et,{value:ft,done:!1}):Qe<p.length?(ft=p.slice(Qe),Qe=p.length,{value:ft,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(pt[Symbol.iterator]=function(){return pt}),pt},this.countGraphemes=function(p){for(var Qe=0,pt=0,ft;(ft=this.nextBreak(p,pt))<p.length;)pt=ft,Qe++;return pt<p.length&&Qe++,Qe};function xe(p){return 1536<=p&&p<=1541||p==1757||p==1807||p==2274||p==3406||p==69821||70082<=p&&p<=70083||p==72250||72326<=p&&p<=72329||p==73030?_r:p==13?tt:p==10?mt:0<=p&&p<=9||11<=p&&p<=12||14<=p&&p<=31||127<=p&&p<=159||p==173||p==1564||p==6158||p==8203||8206<=p&&p<=8207||p==8232||p==8233||8234<=p&&p<=8238||8288<=p&&p<=8292||p==8293||8294<=p&&p<=8303||55296<=p&&p<=57343||p==65279||65520<=p&&p<=65528||65529<=p&&p<=65531||113824<=p&&p<=113827||119155<=p&&p<=119162||p==917504||p==917505||917506<=p&&p<=917535||917632<=p&&p<=917759||918e3<=p&&p<=921599?bt:768<=p&&p<=879||1155<=p&&p<=1159||1160<=p&&p<=1161||1425<=p&&p<=1469||p==1471||1473<=p&&p<=1474||1476<=p&&p<=1477||p==1479||1552<=p&&p<=1562||1611<=p&&p<=1631||p==1648||1750<=p&&p<=1756||1759<=p&&p<=1764||1767<=p&&p<=1768||1770<=p&&p<=1773||p==1809||1840<=p&&p<=1866||1958<=p&&p<=1968||2027<=p&&p<=2035||2070<=p&&p<=2073||2075<=p&&p<=2083||2085<=p&&p<=2087||2089<=p&&p<=2093||2137<=p&&p<=2139||2260<=p&&p<=2273||2275<=p&&p<=2306||p==2362||p==2364||2369<=p&&p<=2376||p==2381||2385<=p&&p<=2391||2402<=p&&p<=2403||p==2433||p==2492||p==2494||2497<=p&&p<=2500||p==2509||p==2519||2530<=p&&p<=2531||2561<=p&&p<=2562||p==2620||2625<=p&&p<=2626||2631<=p&&p<=2632||2635<=p&&p<=2637||p==2641||2672<=p&&p<=2673||p==2677||2689<=p&&p<=2690||p==2748||2753<=p&&p<=2757||2759<=p&&p<=2760||p==2765||2786<=p&&p<=2787||2810<=p&&p<=2815||p==2817||p==2876||p==2878||p==2879||2881<=p&&p<=2884||p==2893||p==2902||p==2903||2914<=p&&p<=2915||p==2946||p==3006||p==3008||p==3021||p==3031||p==3072||3134<=p&&p<=3136||3142<=p&&p<=3144||3146<=p&&p<=3149||3157<=p&&p<=3158||3170<=p&&p<=3171||p==3201||p==3260||p==3263||p==3266||p==3270||3276<=p&&p<=3277||3285<=p&&p<=3286||3298<=p&&p<=3299||3328<=p&&p<=3329||3387<=p&&p<=3388||p==3390||3393<=p&&p<=3396||p==3405||p==3415||3426<=p&&p<=3427||p==3530||p==3535||3538<=p&&p<=3540||p==3542||p==3551||p==3633||3636<=p&&p<=3642||3655<=p&&p<=3662||p==3761||3764<=p&&p<=3769||3771<=p&&p<=3772||3784<=p&&p<=3789||3864<=p&&p<=3865||p==3893||p==3895||p==3897||3953<=p&&p<=3966||3968<=p&&p<=3972||3974<=p&&p<=3975||3981<=p&&p<=3991||3993<=p&&p<=4028||p==4038||4141<=p&&p<=4144||4146<=p&&p<=4151||4153<=p&&p<=4154||4157<=p&&p<=4158||4184<=p&&p<=4185||4190<=p&&p<=4192||4209<=p&&p<=4212||p==4226||4229<=p&&p<=4230||p==4237||p==4253||4957<=p&&p<=4959||5906<=p&&p<=5908||5938<=p&&p<=5940||5970<=p&&p<=5971||6002<=p&&p<=6003||6068<=p&&p<=6069||6071<=p&&p<=6077||p==6086||6089<=p&&p<=6099||p==6109||6155<=p&&p<=6157||6277<=p&&p<=6278||p==6313||6432<=p&&p<=6434||6439<=p&&p<=6440||p==6450||6457<=p&&p<=6459||6679<=p&&p<=6680||p==6683||p==6742||6744<=p&&p<=6750||p==6752||p==6754||6757<=p&&p<=6764||6771<=p&&p<=6780||p==6783||6832<=p&&p<=6845||p==6846||6912<=p&&p<=6915||p==6964||6966<=p&&p<=6970||p==6972||p==6978||7019<=p&&p<=7027||7040<=p&&p<=7041||7074<=p&&p<=7077||7080<=p&&p<=7081||7083<=p&&p<=7085||p==7142||7144<=p&&p<=7145||p==7149||7151<=p&&p<=7153||7212<=p&&p<=7219||7222<=p&&p<=7223||7376<=p&&p<=7378||7380<=p&&p<=7392||7394<=p&&p<=7400||p==7405||p==7412||7416<=p&&p<=7417||7616<=p&&p<=7673||7675<=p&&p<=7679||p==8204||8400<=p&&p<=8412||8413<=p&&p<=8416||p==8417||8418<=p&&p<=8420||8421<=p&&p<=8432||11503<=p&&p<=11505||p==11647||11744<=p&&p<=11775||12330<=p&&p<=12333||12334<=p&&p<=12335||12441<=p&&p<=12442||p==42607||42608<=p&&p<=42610||42612<=p&&p<=42621||42654<=p&&p<=42655||42736<=p&&p<=42737||p==43010||p==43014||p==43019||43045<=p&&p<=43046||43204<=p&&p<=43205||43232<=p&&p<=43249||43302<=p&&p<=43309||43335<=p&&p<=43345||43392<=p&&p<=43394||p==43443||43446<=p&&p<=43449||p==43452||p==43493||43561<=p&&p<=43566||43569<=p&&p<=43570||43573<=p&&p<=43574||p==43587||p==43596||p==43644||p==43696||43698<=p&&p<=43700||43703<=p&&p<=43704||43710<=p&&p<=43711||p==43713||43756<=p&&p<=43757||p==43766||p==44005||p==44008||p==44013||p==64286||65024<=p&&p<=65039||65056<=p&&p<=65071||65438<=p&&p<=65439||p==66045||p==66272||66422<=p&&p<=66426||68097<=p&&p<=68099||68101<=p&&p<=68102||68108<=p&&p<=68111||68152<=p&&p<=68154||p==68159||68325<=p&&p<=68326||p==69633||69688<=p&&p<=69702||69759<=p&&p<=69761||69811<=p&&p<=69814||69817<=p&&p<=69818||69888<=p&&p<=69890||69927<=p&&p<=69931||69933<=p&&p<=69940||p==70003||70016<=p&&p<=70017||70070<=p&&p<=70078||70090<=p&&p<=70092||70191<=p&&p<=70193||p==70196||70198<=p&&p<=70199||p==70206||p==70367||70371<=p&&p<=70378||70400<=p&&p<=70401||p==70460||p==70462||p==70464||p==70487||70502<=p&&p<=70508||70512<=p&&p<=70516||70712<=p&&p<=70719||70722<=p&&p<=70724||p==70726||p==70832||70835<=p&&p<=70840||p==70842||p==70845||70847<=p&&p<=70848||70850<=p&&p<=70851||p==71087||71090<=p&&p<=71093||71100<=p&&p<=71101||71103<=p&&p<=71104||71132<=p&&p<=71133||71219<=p&&p<=71226||p==71229||71231<=p&&p<=71232||p==71339||p==71341||71344<=p&&p<=71349||p==71351||71453<=p&&p<=71455||71458<=p&&p<=71461||71463<=p&&p<=71467||72193<=p&&p<=72198||72201<=p&&p<=72202||72243<=p&&p<=72248||72251<=p&&p<=72254||p==72263||72273<=p&&p<=72278||72281<=p&&p<=72283||72330<=p&&p<=72342||72344<=p&&p<=72345||72752<=p&&p<=72758||72760<=p&&p<=72765||p==72767||72850<=p&&p<=72871||72874<=p&&p<=72880||72882<=p&&p<=72883||72885<=p&&p<=72886||73009<=p&&p<=73014||p==73018||73020<=p&&p<=73021||73023<=p&&p<=73029||p==73031||92912<=p&&p<=92916||92976<=p&&p<=92982||94095<=p&&p<=94098||113821<=p&&p<=113822||p==119141||119143<=p&&p<=119145||119150<=p&&p<=119154||119163<=p&&p<=119170||119173<=p&&p<=119179||119210<=p&&p<=119213||119362<=p&&p<=119364||121344<=p&&p<=121398||121403<=p&&p<=121452||p==121461||p==121476||121499<=p&&p<=121503||121505<=p&&p<=121519||122880<=p&&p<=122886||122888<=p&&p<=122904||122907<=p&&p<=122913||122915<=p&&p<=122916||122918<=p&&p<=122922||125136<=p&&p<=125142||125252<=p&&p<=125258||917536<=p&&p<=917631||917760<=p&&p<=917999?Lt:127462<=p&&p<=127487?Vt:p==2307||p==2363||2366<=p&&p<=2368||2377<=p&&p<=2380||2382<=p&&p<=2383||2434<=p&&p<=2435||2495<=p&&p<=2496||2503<=p&&p<=2504||2507<=p&&p<=2508||p==2563||2622<=p&&p<=2624||p==2691||2750<=p&&p<=2752||p==2761||2763<=p&&p<=2764||2818<=p&&p<=2819||p==2880||2887<=p&&p<=2888||2891<=p&&p<=2892||p==3007||3009<=p&&p<=3010||3014<=p&&p<=3016||3018<=p&&p<=3020||3073<=p&&p<=3075||3137<=p&&p<=3140||3202<=p&&p<=3203||p==3262||3264<=p&&p<=3265||3267<=p&&p<=3268||3271<=p&&p<=3272||3274<=p&&p<=3275||3330<=p&&p<=3331||3391<=p&&p<=3392||3398<=p&&p<=3400||3402<=p&&p<=3404||3458<=p&&p<=3459||3536<=p&&p<=3537||3544<=p&&p<=3550||3570<=p&&p<=3571||p==3635||p==3763||3902<=p&&p<=3903||p==3967||p==4145||4155<=p&&p<=4156||4182<=p&&p<=4183||p==4228||p==6070||6078<=p&&p<=6085||6087<=p&&p<=6088||6435<=p&&p<=6438||6441<=p&&p<=6443||6448<=p&&p<=6449||6451<=p&&p<=6456||6681<=p&&p<=6682||p==6741||p==6743||6765<=p&&p<=6770||p==6916||p==6965||p==6971||6973<=p&&p<=6977||6979<=p&&p<=6980||p==7042||p==7073||7078<=p&&p<=7079||p==7082||p==7143||7146<=p&&p<=7148||p==7150||7154<=p&&p<=7155||7204<=p&&p<=7211||7220<=p&&p<=7221||p==7393||7410<=p&&p<=7411||p==7415||43043<=p&&p<=43044||p==43047||43136<=p&&p<=43137||43188<=p&&p<=43203||43346<=p&&p<=43347||p==43395||43444<=p&&p<=43445||43450<=p&&p<=43451||43453<=p&&p<=43456||43567<=p&&p<=43568||43571<=p&&p<=43572||p==43597||p==43755||43758<=p&&p<=43759||p==43765||44003<=p&&p<=44004||44006<=p&&p<=44007||44009<=p&&p<=44010||p==44012||p==69632||p==69634||p==69762||69808<=p&&p<=69810||69815<=p&&p<=69816||p==69932||p==70018||70067<=p&&p<=70069||70079<=p&&p<=70080||70188<=p&&p<=70190||70194<=p&&p<=70195||p==70197||70368<=p&&p<=70370||70402<=p&&p<=70403||p==70463||70465<=p&&p<=70468||70471<=p&&p<=70472||70475<=p&&p<=70477||70498<=p&&p<=70499||70709<=p&&p<=70711||70720<=p&&p<=70721||p==70725||70833<=p&&p<=70834||p==70841||70843<=p&&p<=70844||p==70846||p==70849||71088<=p&&p<=71089||71096<=p&&p<=71099||p==71102||71216<=p&&p<=71218||71227<=p&&p<=71228||p==71230||p==71340||71342<=p&&p<=71343||p==71350||71456<=p&&p<=71457||p==71462||72199<=p&&p<=72200||p==72249||72279<=p&&p<=72280||p==72343||p==72751||p==72766||p==72873||p==72881||p==72884||94033<=p&&p<=94078||p==119142||p==119149?rn:4352<=p&&p<=4447||43360<=p&&p<=43388?Sn:4448<=p&&p<=4519||55216<=p&&p<=55238?Ar:4520<=p&&p<=4607||55243<=p&&p<=55291?Bn:p==44032||p==44060||p==44088||p==44116||p==44144||p==44172||p==44200||p==44228||p==44256||p==44284||p==44312||p==44340||p==44368||p==44396||p==44424||p==44452||p==44480||p==44508||p==44536||p==44564||p==44592||p==44620||p==44648||p==44676||p==44704||p==44732||p==44760||p==44788||p==44816||p==44844||p==44872||p==44900||p==44928||p==44956||p==44984||p==45012||p==45040||p==45068||p==45096||p==45124||p==45152||p==45180||p==45208||p==45236||p==45264||p==45292||p==45320||p==45348||p==45376||p==45404||p==45432||p==45460||p==45488||p==45516||p==45544||p==45572||p==45600||p==45628||p==45656||p==45684||p==45712||p==45740||p==45768||p==45796||p==45824||p==45852||p==45880||p==45908||p==45936||p==45964||p==45992||p==46020||p==46048||p==46076||p==46104||p==46132||p==46160||p==46188||p==46216||p==46244||p==46272||p==46300||p==46328||p==46356||p==46384||p==46412||p==46440||p==46468||p==46496||p==46524||p==46552||p==46580||p==46608||p==46636||p==46664||p==46692||p==46720||p==46748||p==46776||p==46804||p==46832||p==46860||p==46888||p==46916||p==46944||p==46972||p==47e3||p==47028||p==47056||p==47084||p==47112||p==47140||p==47168||p==47196||p==47224||p==47252||p==47280||p==47308||p==47336||p==47364||p==47392||p==47420||p==47448||p==47476||p==47504||p==47532||p==47560||p==47588||p==47616||p==47644||p==47672||p==47700||p==47728||p==47756||p==47784||p==47812||p==47840||p==47868||p==47896||p==47924||p==47952||p==47980||p==48008||p==48036||p==48064||p==48092||p==48120||p==48148||p==48176||p==48204||p==48232||p==48260||p==48288||p==48316||p==48344||p==48372||p==48400||p==48428||p==48456||p==48484||p==48512||p==48540||p==48568||p==48596||p==48624||p==48652||p==48680||p==48708||p==48736||p==48764||p==48792||p==48820||p==48848||p==48876||p==48904||p==48932||p==48960||p==48988||p==49016||p==49044||p==49072||p==49100||p==49128||p==49156||p==49184||p==49212||p==49240||p==49268||p==49296||p==49324||p==49352||p==49380||p==49408||p==49436||p==49464||p==49492||p==49520||p==49548||p==49576||p==49604||p==49632||p==49660||p==49688||p==49716||p==49744||p==49772||p==49800||p==49828||p==49856||p==49884||p==49912||p==49940||p==49968||p==49996||p==50024||p==50052||p==50080||p==50108||p==50136||p==50164||p==50192||p==50220||p==50248||p==50276||p==50304||p==50332||p==50360||p==50388||p==50416||p==50444||p==50472||p==50500||p==50528||p==50556||p==50584||p==50612||p==50640||p==50668||p==50696||p==50724||p==50752||p==50780||p==50808||p==50836||p==50864||p==50892||p==50920||p==50948||p==50976||p==51004||p==51032||p==51060||p==51088||p==51116||p==51144||p==51172||p==51200||p==51228||p==51256||p==51284||p==51312||p==51340||p==51368||p==51396||p==51424||p==51452||p==51480||p==51508||p==51536||p==51564||p==51592||p==51620||p==51648||p==51676||p==51704||p==51732||p==51760||p==51788||p==51816||p==51844||p==51872||p==51900||p==51928||p==51956||p==51984||p==52012||p==52040||p==52068||p==52096||p==52124||p==52152||p==52180||p==52208||p==52236||p==52264||p==52292||p==52320||p==52348||p==52376||p==52404||p==52432||p==52460||p==52488||p==52516||p==52544||p==52572||p==52600||p==52628||p==52656||p==52684||p==52712||p==52740||p==52768||p==52796||p==52824||p==52852||p==52880||p==52908||p==52936||p==52964||p==52992||p==53020||p==53048||p==53076||p==53104||p==53132||p==53160||p==53188||p==53216||p==53244||p==53272||p==53300||p==53328||p==53356||p==53384||p==53412||p==53440||p==53468||p==53496||p==53524||p==53552||p==53580||p==53608||p==53636||p==53664||p==53692||p==53720||p==53748||p==53776||p==53804||p==53832||p==53860||p==53888||p==53916||p==53944||p==53972||p==54e3||p==54028||p==54056||p==54084||p==54112||p==54140||p==54168||p==54196||p==54224||p==54252||p==54280||p==54308||p==54336||p==54364||p==54392||p==54420||p==54448||p==54476||p==54504||p==54532||p==54560||p==54588||p==54616||p==54644||p==54672||p==54700||p==54728||p==54756||p==54784||p==54812||p==54840||p==54868||p==54896||p==54924||p==54952||p==54980||p==55008||p==55036||p==55064||p==55092||p==55120||p==55148||p==55176?ar:44033<=p&&p<=44059||44061<=p&&p<=44087||44089<=p&&p<=44115||44117<=p&&p<=44143||44145<=p&&p<=44171||44173<=p&&p<=44199||44201<=p&&p<=44227||44229<=p&&p<=44255||44257<=p&&p<=44283||44285<=p&&p<=44311||44313<=p&&p<=44339||44341<=p&&p<=44367||44369<=p&&p<=44395||44397<=p&&p<=44423||44425<=p&&p<=44451||44453<=p&&p<=44479||44481<=p&&p<=44507||44509<=p&&p<=44535||44537<=p&&p<=44563||44565<=p&&p<=44591||44593<=p&&p<=44619||44621<=p&&p<=44647||44649<=p&&p<=44675||44677<=p&&p<=44703||44705<=p&&p<=44731||44733<=p&&p<=44759||44761<=p&&p<=44787||44789<=p&&p<=44815||44817<=p&&p<=44843||44845<=p&&p<=44871||44873<=p&&p<=44899||44901<=p&&p<=44927||44929<=p&&p<=44955||44957<=p&&p<=44983||44985<=p&&p<=45011||45013<=p&&p<=45039||45041<=p&&p<=45067||45069<=p&&p<=45095||45097<=p&&p<=45123||45125<=p&&p<=45151||45153<=p&&p<=45179||45181<=p&&p<=45207||45209<=p&&p<=45235||45237<=p&&p<=45263||45265<=p&&p<=45291||45293<=p&&p<=45319||45321<=p&&p<=45347||45349<=p&&p<=45375||45377<=p&&p<=45403||45405<=p&&p<=45431||45433<=p&&p<=45459||45461<=p&&p<=45487||45489<=p&&p<=45515||45517<=p&&p<=45543||45545<=p&&p<=45571||45573<=p&&p<=45599||45601<=p&&p<=45627||45629<=p&&p<=45655||45657<=p&&p<=45683||45685<=p&&p<=45711||45713<=p&&p<=45739||45741<=p&&p<=45767||45769<=p&&p<=45795||45797<=p&&p<=45823||45825<=p&&p<=45851||45853<=p&&p<=45879||45881<=p&&p<=45907||45909<=p&&p<=45935||45937<=p&&p<=45963||45965<=p&&p<=45991||45993<=p&&p<=46019||46021<=p&&p<=46047||46049<=p&&p<=46075||46077<=p&&p<=46103||46105<=p&&p<=46131||46133<=p&&p<=46159||46161<=p&&p<=46187||46189<=p&&p<=46215||46217<=p&&p<=46243||46245<=p&&p<=46271||46273<=p&&p<=46299||46301<=p&&p<=46327||46329<=p&&p<=46355||46357<=p&&p<=46383||46385<=p&&p<=46411||46413<=p&&p<=46439||46441<=p&&p<=46467||46469<=p&&p<=46495||46497<=p&&p<=46523||46525<=p&&p<=46551||46553<=p&&p<=46579||46581<=p&&p<=46607||46609<=p&&p<=46635||46637<=p&&p<=46663||46665<=p&&p<=46691||46693<=p&&p<=46719||46721<=p&&p<=46747||46749<=p&&p<=46775||46777<=p&&p<=46803||46805<=p&&p<=46831||46833<=p&&p<=46859||46861<=p&&p<=46887||46889<=p&&p<=46915||46917<=p&&p<=46943||46945<=p&&p<=46971||46973<=p&&p<=46999||47001<=p&&p<=47027||47029<=p&&p<=47055||47057<=p&&p<=47083||47085<=p&&p<=47111||47113<=p&&p<=47139||47141<=p&&p<=47167||47169<=p&&p<=47195||47197<=p&&p<=47223||47225<=p&&p<=47251||47253<=p&&p<=47279||47281<=p&&p<=47307||47309<=p&&p<=47335||47337<=p&&p<=47363||47365<=p&&p<=47391||47393<=p&&p<=47419||47421<=p&&p<=47447||47449<=p&&p<=47475||47477<=p&&p<=47503||47505<=p&&p<=47531||47533<=p&&p<=47559||47561<=p&&p<=47587||47589<=p&&p<=47615||47617<=p&&p<=47643||47645<=p&&p<=47671||47673<=p&&p<=47699||47701<=p&&p<=47727||47729<=p&&p<=47755||47757<=p&&p<=47783||47785<=p&&p<=47811||47813<=p&&p<=47839||47841<=p&&p<=47867||47869<=p&&p<=47895||47897<=p&&p<=47923||47925<=p&&p<=47951||47953<=p&&p<=47979||47981<=p&&p<=48007||48009<=p&&p<=48035||48037<=p&&p<=48063||48065<=p&&p<=48091||48093<=p&&p<=48119||48121<=p&&p<=48147||48149<=p&&p<=48175||48177<=p&&p<=48203||48205<=p&&p<=48231||48233<=p&&p<=48259||48261<=p&&p<=48287||48289<=p&&p<=48315||48317<=p&&p<=48343||48345<=p&&p<=48371||48373<=p&&p<=48399||48401<=p&&p<=48427||48429<=p&&p<=48455||48457<=p&&p<=48483||48485<=p&&p<=48511||48513<=p&&p<=48539||48541<=p&&p<=48567||48569<=p&&p<=48595||48597<=p&&p<=48623||48625<=p&&p<=48651||48653<=p&&p<=48679||48681<=p&&p<=48707||48709<=p&&p<=48735||48737<=p&&p<=48763||48765<=p&&p<=48791||48793<=p&&p<=48819||48821<=p&&p<=48847||48849<=p&&p<=48875||48877<=p&&p<=48903||48905<=p&&p<=48931||48933<=p&&p<=48959||48961<=p&&p<=48987||48989<=p&&p<=49015||49017<=p&&p<=49043||49045<=p&&p<=49071||49073<=p&&p<=49099||49101<=p&&p<=49127||49129<=p&&p<=49155||49157<=p&&p<=49183||49185<=p&&p<=49211||49213<=p&&p<=49239||49241<=p&&p<=49267||49269<=p&&p<=49295||49297<=p&&p<=49323||49325<=p&&p<=49351||49353<=p&&p<=49379||49381<=p&&p<=49407||49409<=p&&p<=49435||49437<=p&&p<=49463||49465<=p&&p<=49491||49493<=p&&p<=49519||49521<=p&&p<=49547||49549<=p&&p<=49575||49577<=p&&p<=49603||49605<=p&&p<=49631||49633<=p&&p<=49659||49661<=p&&p<=49687||49689<=p&&p<=49715||49717<=p&&p<=49743||49745<=p&&p<=49771||49773<=p&&p<=49799||49801<=p&&p<=49827||49829<=p&&p<=49855||49857<=p&&p<=49883||49885<=p&&p<=49911||49913<=p&&p<=49939||49941<=p&&p<=49967||49969<=p&&p<=49995||49997<=p&&p<=50023||50025<=p&&p<=50051||50053<=p&&p<=50079||50081<=p&&p<=50107||50109<=p&&p<=50135||50137<=p&&p<=50163||50165<=p&&p<=50191||50193<=p&&p<=50219||50221<=p&&p<=50247||50249<=p&&p<=50275||50277<=p&&p<=50303||50305<=p&&p<=50331||50333<=p&&p<=50359||50361<=p&&p<=50387||50389<=p&&p<=50415||50417<=p&&p<=50443||50445<=p&&p<=50471||50473<=p&&p<=50499||50501<=p&&p<=50527||50529<=p&&p<=50555||50557<=p&&p<=50583||50585<=p&&p<=50611||50613<=p&&p<=50639||50641<=p&&p<=50667||50669<=p&&p<=50695||50697<=p&&p<=50723||50725<=p&&p<=50751||50753<=p&&p<=50779||50781<=p&&p<=50807||50809<=p&&p<=50835||50837<=p&&p<=50863||50865<=p&&p<=50891||50893<=p&&p<=50919||50921<=p&&p<=50947||50949<=p&&p<=50975||50977<=p&&p<=51003||51005<=p&&p<=51031||51033<=p&&p<=51059||51061<=p&&p<=51087||51089<=p&&p<=51115||51117<=p&&p<=51143||51145<=p&&p<=51171||51173<=p&&p<=51199||51201<=p&&p<=51227||51229<=p&&p<=51255||51257<=p&&p<=51283||51285<=p&&p<=51311||51313<=p&&p<=51339||51341<=p&&p<=51367||51369<=p&&p<=51395||51397<=p&&p<=51423||51425<=p&&p<=51451||51453<=p&&p<=51479||51481<=p&&p<=51507||51509<=p&&p<=51535||51537<=p&&p<=51563||51565<=p&&p<=51591||51593<=p&&p<=51619||51621<=p&&p<=51647||51649<=p&&p<=51675||51677<=p&&p<=51703||51705<=p&&p<=51731||51733<=p&&p<=51759||51761<=p&&p<=51787||51789<=p&&p<=51815||51817<=p&&p<=51843||51845<=p&&p<=51871||51873<=p&&p<=51899||51901<=p&&p<=51927||51929<=p&&p<=51955||51957<=p&&p<=51983||51985<=p&&p<=52011||52013<=p&&p<=52039||52041<=p&&p<=52067||52069<=p&&p<=52095||52097<=p&&p<=52123||52125<=p&&p<=52151||52153<=p&&p<=52179||52181<=p&&p<=52207||52209<=p&&p<=52235||52237<=p&&p<=52263||52265<=p&&p<=52291||52293<=p&&p<=52319||52321<=p&&p<=52347||52349<=p&&p<=52375||52377<=p&&p<=52403||52405<=p&&p<=52431||52433<=p&&p<=52459||52461<=p&&p<=52487||52489<=p&&p<=52515||52517<=p&&p<=52543||52545<=p&&p<=52571||52573<=p&&p<=52599||52601<=p&&p<=52627||52629<=p&&p<=52655||52657<=p&&p<=52683||52685<=p&&p<=52711||52713<=p&&p<=52739||52741<=p&&p<=52767||52769<=p&&p<=52795||52797<=p&&p<=52823||52825<=p&&p<=52851||52853<=p&&p<=52879||52881<=p&&p<=52907||52909<=p&&p<=52935||52937<=p&&p<=52963||52965<=p&&p<=52991||52993<=p&&p<=53019||53021<=p&&p<=53047||53049<=p&&p<=53075||53077<=p&&p<=53103||53105<=p&&p<=53131||53133<=p&&p<=53159||53161<=p&&p<=53187||53189<=p&&p<=53215||53217<=p&&p<=53243||53245<=p&&p<=53271||53273<=p&&p<=53299||53301<=p&&p<=53327||53329<=p&&p<=53355||53357<=p&&p<=53383||53385<=p&&p<=53411||53413<=p&&p<=53439||53441<=p&&p<=53467||53469<=p&&p<=53495||53497<=p&&p<=53523||53525<=p&&p<=53551||53553<=p&&p<=53579||53581<=p&&p<=53607||53609<=p&&p<=53635||53637<=p&&p<=53663||53665<=p&&p<=53691||53693<=p&&p<=53719||53721<=p&&p<=53747||53749<=p&&p<=53775||53777<=p&&p<=53803||53805<=p&&p<=53831||53833<=p&&p<=53859||53861<=p&&p<=53887||53889<=p&&p<=53915||53917<=p&&p<=53943||53945<=p&&p<=53971||53973<=p&&p<=53999||54001<=p&&p<=54027||54029<=p&&p<=54055||54057<=p&&p<=54083||54085<=p&&p<=54111||54113<=p&&p<=54139||54141<=p&&p<=54167||54169<=p&&p<=54195||54197<=p&&p<=54223||54225<=p&&p<=54251||54253<=p&&p<=54279||54281<=p&&p<=54307||54309<=p&&p<=54335||54337<=p&&p<=54363||54365<=p&&p<=54391||54393<=p&&p<=54419||54421<=p&&p<=54447||54449<=p&&p<=54475||54477<=p&&p<=54503||54505<=p&&p<=54531||54533<=p&&p<=54559||54561<=p&&p<=54587||54589<=p&&p<=54615||54617<=p&&p<=54643||54645<=p&&p<=54671||54673<=p&&p<=54699||54701<=p&&p<=54727||54729<=p&&p<=54755||54757<=p&&p<=54783||54785<=p&&p<=54811||54813<=p&&p<=54839||54841<=p&&p<=54867||54869<=p&&p<=54895||54897<=p&&p<=54923||54925<=p&&p<=54951||54953<=p&&p<=54979||54981<=p&&p<=55007||55009<=p&&p<=55035||55037<=p&&p<=55063||55065<=p&&p<=55091||55093<=p&&p<=55119||55121<=p&&p<=55147||55149<=p&&p<=55175||55177<=p&&p<=55203?Cr:p==9757||p==9977||9994<=p&&p<=9997||p==127877||127938<=p&&p<=127940||p==127943||127946<=p&&p<=127948||128066<=p&&p<=128067||128070<=p&&p<=128080||p==128110||128112<=p&&p<=128120||p==128124||128129<=p&&p<=128131||128133<=p&&p<=128135||p==128170||128372<=p&&p<=128373||p==128378||p==128400||128405<=p&&p<=128406||128581<=p&&p<=128583||128587<=p&&p<=128591||p==128675||128692<=p&&p<=128694||p==128704||p==128716||129304<=p&&p<=129308||129310<=p&&p<=129311||p==129318||129328<=p&&p<=129337||129341<=p&&p<=129342||129489<=p&&p<=129501?Jr:127995<=p&&p<=127999?wr:p==8205?hi:p==9792||p==9794||9877<=p&&p<=9878||p==9992||p==10084||p==127752||p==127806||p==127859||p==127891||p==127908||p==127912||p==127979||p==127981||p==128139||128187<=p&&p<=128188||p==128295||p==128300||p==128488||p==128640||p==128658?Ye:128102<=p&&p<=128105?de:br}return this}we.exports&&(we.exports=Fe)}),o=new i,s=function(Fe,tt,mt){for(var bt=o.iterateGraphemes(Fe.substring(tt)),Lt="",Vt=0;Vt<mt-tt;Vt++){var rn=bt.next();if(Lt+=rn.value,rn.done)break}return Lt},a=function(we,Fe,tt,mt,bt,Lt,Vt){return{start:{line:we,column:Fe,offset:tt},end:{line:mt,column:bt,offset:Lt},source:Vt||null}},f=n(function(we,Fe){(function(tt,mt){we.exports=mt()})(e,function(){var tt="",mt,bt=Lt;function Lt(Cr,br){if(typeof Cr!="string")throw new TypeError("expected a string");if(br===1)return Cr;if(br===2)return Cr+Cr;var _r=Cr.length*br;if(mt!==Cr||typeof mt>"u")mt=Cr,tt="";else if(tt.length>=_r)return tt.substr(0,_r);for(;_r>tt.length&&br>1;)br&1&&(tt+=Cr),br>>=1,Cr+=Cr;return tt+=Cr,tt=tt.substr(0,_r),tt}var Vt=function(br,_r,Jr){if(br==null||_r==null)return br;var wr=String(br),hi=typeof _r=="number"?_r:parseInt(_r,10);if(isNaN(hi)||!isFinite(hi))return wr;var Ye=wr.length;if(Ye>=hi)return wr;var de=String(Jr);de===""&&(de=" ");for(var pe=hi-Ye;de.length<pe;)de+=de;var Je=de.length>pe?de.substr(0,pe):de;return Je+wr},rn=Object.assign||function(Cr){for(var br=1;br<arguments.length;br++){var _r=arguments[br];for(var Jr in _r)Object.prototype.hasOwnProperty.call(_r,Jr)&&(Cr[Jr]=_r[Jr])}return Cr};function Sn(Cr,br,_r,Jr){var wr=String(br),hi=Vt(wr,_r," "),Ye=bt(" ",Jr.tabSize);return hi+" | "+Cr.replace(/\t/g,Ye)}function Ar(Cr,br,_r,Jr,wr){return Cr.slice(br,_r).map(function(hi,Ye){return Sn(hi,br+Ye+1,Jr,wr)}).join(`
|
||
`)}var Bn={extraLines:2,tabSize:4},ar=function(br,_r,Jr,wr){wr=rn({},Bn,wr);var hi=br.split(/\r\n?|\n|\f/),Ye=Math.max(1,_r-wr.extraLines)-1,de=Math.min(_r+wr.extraLines,hi.length),pe=String(de).length,Je=Ar(hi,Ye,_r,pe,wr),kt=Sn(hi[_r-1].substring(0,Jr-1),_r,pe,wr),Xt=bt(" ",kt.length)+"^",it=Ar(hi,_r,de,pe,wr);return[Je,Xt,it].filter(Boolean).join(`
|
||
`)};return ar})}),g=new Error().stack,b=function(we){var Fe=Object.create(SyntaxError.prototype);return Object.assign(Fe,we,{name:"SyntaxError"}),Object.defineProperty(Fe,"stack",{get:function(){return g?g.replace(/^(.+\n){1,3}/,String(Fe)+`
|
||
`):""}}),Fe},I=function(we,Fe,tt,mt,bt){throw b({message:mt?we+`
|
||
`+f(Fe,mt,bt):we,rawMessage:we,source:tt,line:mt,column:bt})},S={unexpectedEnd:function(){return"Unexpected end of input"},unexpectedToken:function(Fe){for(var tt=arguments.length,mt=Array(tt>1?tt-1:0),bt=1;bt<tt;bt++)mt[bt-1]=arguments[bt];return"Unexpected token <"+Fe+"> at "+mt.filter(Boolean).join(":")}},B={unexpectedSymbol:function(Fe){for(var tt=arguments.length,mt=Array(tt>1?tt-1:0),bt=1;bt<tt;bt++)mt[bt-1]=arguments[bt];return"Unexpected symbol <"+Fe+"> at "+mt.filter(Boolean).join(":")}},P={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},U={"{":P.LEFT_BRACE,"}":P.RIGHT_BRACE,"[":P.LEFT_BRACKET,"]":P.RIGHT_BRACKET,":":P.COLON,",":P.COMMA},j={true:P.TRUE,false:P.FALSE,null:P.NULL},q={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},W={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},ee={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function J(we){return we>="1"&&we<="9"}function $(we){return we>="0"&&we<="9"}function X(we){return $(we)||we>="a"&&we<="f"||we>="A"&&we<="F"}function G(we){return we==="e"||we==="E"}function ae(we,Fe,tt,mt){var bt=we.charAt(Fe);if(bt==="\r")Fe++,tt++,mt=1,we.charAt(Fe)===`
|
||
`&&Fe++;else if(bt===`
|
||
`)Fe++,tt++,mt=1;else if(bt===" "||bt===" ")Fe++,mt++;else return null;return{index:Fe,line:tt,column:mt}}function ge(we,Fe,tt,mt){var bt=we.charAt(Fe);return bt in U?{type:U[bt],line:tt,column:mt+1,index:Fe+1,value:null}:null}function he(we,Fe,tt,mt){for(var bt in j)if(j.hasOwnProperty(bt)&&we.substr(Fe,bt.length)===bt)return{type:j[bt],line:tt,column:mt+bt.length,index:Fe+bt.length,value:bt};return null}function Ie(we,Fe,tt,mt){for(var bt=Fe,Lt=q._START_;Fe<we.length;){var Vt=we.charAt(Fe);switch(Lt){case q._START_:{if(Vt==='"')Fe++,Lt=q.START_QUOTE_OR_CHAR;else return null;break}case q.START_QUOTE_OR_CHAR:{if(Vt==="\\")Fe++,Lt=q.ESCAPE;else{if(Vt==='"')return Fe++,{type:P.STRING,line:tt,column:mt+Fe-bt,index:Fe,value:we.slice(bt,Fe)};Fe++}break}case q.ESCAPE:{if(Vt in W){if(Fe++,Vt==="u")for(var rn=0;rn<4;rn++){var Sn=we.charAt(Fe);if(Sn&&X(Sn))Fe++;else return null}Lt=q.START_QUOTE_OR_CHAR}else return null;break}}}}function re(we,Fe,tt,mt){var bt=Fe,Lt=Fe,Vt=ee._START_;e:for(;Fe<we.length;){var rn=we.charAt(Fe);switch(Vt){case ee._START_:{if(rn==="-")Vt=ee.MINUS;else if(rn==="0")Lt=Fe+1,Vt=ee.ZERO;else if(J(rn))Lt=Fe+1,Vt=ee.DIGIT;else return null;break}case ee.MINUS:{if(rn==="0")Lt=Fe+1,Vt=ee.ZERO;else if(J(rn))Lt=Fe+1,Vt=ee.DIGIT;else return null;break}case ee.ZERO:{if(rn===".")Vt=ee.POINT;else if(G(rn))Vt=ee.EXP;else break e;break}case ee.DIGIT:{if($(rn))Lt=Fe+1;else if(rn===".")Vt=ee.POINT;else if(G(rn))Vt=ee.EXP;else break e;break}case ee.POINT:{if($(rn))Lt=Fe+1,Vt=ee.DIGIT_FRACTION;else break e;break}case ee.DIGIT_FRACTION:{if($(rn))Lt=Fe+1;else if(G(rn))Vt=ee.EXP;else break e;break}case ee.EXP:{if(rn==="+"||rn==="-")Vt=ee.EXP_DIGIT_OR_SIGN;else if($(rn))Lt=Fe+1,Vt=ee.EXP_DIGIT_OR_SIGN;else break e;break}case ee.EXP_DIGIT_OR_SIGN:{if($(rn))Lt=Fe+1;else break e;break}}Fe++}return Lt>0?{type:P.NUMBER,line:tt,column:mt+Lt-bt,index:Lt,value:we.slice(bt,Lt)}:null}var oe=function(Fe,tt){for(var mt=1,bt=1,Lt=0,Vt=[];Lt<Fe.length;){var rn=[Fe,Lt,mt,bt],Sn=ae.apply(void 0,rn);if(Sn){Lt=Sn.index,mt=Sn.line,bt=Sn.column;continue}var Ar=ge.apply(void 0,rn)||he.apply(void 0,rn)||Ie.apply(void 0,rn)||re.apply(void 0,rn);if(Ar){var Bn={type:Ar.type,value:Ar.value,loc:a(mt,bt,Lt,Ar.line,Ar.column,Ar.index,tt.source)};Vt.push(Bn),Lt=Ar.index,mt=Ar.line,bt=Ar.column}else I(B.unexpectedSymbol(s(Fe,Lt,Lt+1),tt.source,mt,bt),Fe,tt.source,mt,bt)}return Vt},Se={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},ye={_START_:0,KEY:1,COLON:2},nt={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},Ne={loc:!0,source:null};function je(we,Fe,tt){var mt=Fe.length>0?Fe[Fe.length-1].loc.end:{line:1,column:1};I(S.unexpectedEnd(),we,tt.source,mt.line,mt.column)}function et(we){for(var Fe=0,tt=0;tt<4;tt++)Fe=Fe*16+parseInt(we[tt],16);return String.fromCharCode(Fe)}var Ue={b:"\b",f:"\f",n:`
|
||
`,r:"\r",t:" "},ke=['"',"\\","/"];function We(we){for(var Fe="",tt=0;tt<we.length;tt++){var mt=we.charAt(tt);if(mt==="\\"){tt++;var bt=we.charAt(tt);if(bt==="u")Fe+=et(we.substr(tt+1,4)),tt+=4;else if(ke.indexOf(bt)!==-1)Fe+=bt;else if(bt in Ue)Fe+=Ue[bt];else break}else Fe+=mt}return Fe}function vt(we,Fe,tt,mt){for(var bt=void 0,Lt={type:"Object",children:[]},Vt=Se._START_;tt<Fe.length;){var rn=Fe[tt];switch(Vt){case Se._START_:{if(rn.type===P.LEFT_BRACE)bt=rn,Vt=Se.OPEN_OBJECT,tt++;else return null;break}case Se.OPEN_OBJECT:{if(rn.type===P.RIGHT_BRACE)return mt.loc&&(Lt.loc=a(bt.loc.start.line,bt.loc.start.column,bt.loc.start.offset,rn.loc.end.line,rn.loc.end.column,rn.loc.end.offset,mt.source)),{value:Lt,index:tt+1};var Sn=Pt(we,Fe,tt,mt);Lt.children.push(Sn.value),Vt=Se.PROPERTY,tt=Sn.index;break}case Se.PROPERTY:{if(rn.type===P.RIGHT_BRACE)return mt.loc&&(Lt.loc=a(bt.loc.start.line,bt.loc.start.column,bt.loc.start.offset,rn.loc.end.line,rn.loc.end.column,rn.loc.end.offset,mt.source)),{value:Lt,index:tt+1};rn.type===P.COMMA?(Vt=Se.COMMA,tt++):I(S.unexpectedToken(s(we,rn.loc.start.offset,rn.loc.end.offset),mt.source,rn.loc.start.line,rn.loc.start.column),we,mt.source,rn.loc.start.line,rn.loc.start.column);break}case Se.COMMA:{var Ar=Pt(we,Fe,tt,mt);Ar?(tt=Ar.index,Lt.children.push(Ar.value),Vt=Se.PROPERTY):I(S.unexpectedToken(s(we,rn.loc.start.offset,rn.loc.end.offset),mt.source,rn.loc.start.line,rn.loc.start.column),we,mt.source,rn.loc.start.line,rn.loc.start.column);break}}}je(we,Fe,mt)}function Pt(we,Fe,tt,mt){for(var bt=void 0,Lt={type:"Property",key:null,value:null},Vt=ye._START_;tt<Fe.length;){var rn=Fe[tt];switch(Vt){case ye._START_:{if(rn.type===P.STRING){var Sn={type:"Identifier",value:We(we.slice(rn.loc.start.offset+1,rn.loc.end.offset-1)),raw:rn.value};mt.loc&&(Sn.loc=rn.loc),bt=rn,Lt.key=Sn,Vt=ye.KEY,tt++}else return null;break}case ye.KEY:{rn.type===P.COLON?(Vt=ye.COLON,tt++):I(S.unexpectedToken(s(we,rn.loc.start.offset,rn.loc.end.offset),mt.source,rn.loc.start.line,rn.loc.start.column),we,mt.source,rn.loc.start.line,rn.loc.start.column);break}case ye.COLON:{var Ar=Rt(we,Fe,tt,mt);return Lt.value=Ar.value,mt.loc&&(Lt.loc=a(bt.loc.start.line,bt.loc.start.column,bt.loc.start.offset,Ar.value.loc.end.line,Ar.value.loc.end.column,Ar.value.loc.end.offset,mt.source)),{value:Lt,index:Ar.index}}}}}function ut(we,Fe,tt,mt){for(var bt=void 0,Lt={type:"Array",children:[]},Vt=nt._START_,rn=void 0;tt<Fe.length;)switch(rn=Fe[tt],Vt){case nt._START_:{if(rn.type===P.LEFT_BRACKET)bt=rn,Vt=nt.OPEN_ARRAY,tt++;else return null;break}case nt.OPEN_ARRAY:{if(rn.type===P.RIGHT_BRACKET)return mt.loc&&(Lt.loc=a(bt.loc.start.line,bt.loc.start.column,bt.loc.start.offset,rn.loc.end.line,rn.loc.end.column,rn.loc.end.offset,mt.source)),{value:Lt,index:tt+1};var Sn=Rt(we,Fe,tt,mt);tt=Sn.index,Lt.children.push(Sn.value),Vt=nt.VALUE;break}case nt.VALUE:{if(rn.type===P.RIGHT_BRACKET)return mt.loc&&(Lt.loc=a(bt.loc.start.line,bt.loc.start.column,bt.loc.start.offset,rn.loc.end.line,rn.loc.end.column,rn.loc.end.offset,mt.source)),{value:Lt,index:tt+1};rn.type===P.COMMA?(Vt=nt.COMMA,tt++):I(S.unexpectedToken(s(we,rn.loc.start.offset,rn.loc.end.offset),mt.source,rn.loc.start.line,rn.loc.start.column),we,mt.source,rn.loc.start.line,rn.loc.start.column);break}case nt.COMMA:{var Ar=Rt(we,Fe,tt,mt);tt=Ar.index,Lt.children.push(Ar.value),Vt=nt.VALUE;break}}je(we,Fe,mt)}function jt(we,Fe,tt,mt){var bt=Fe[tt],Lt=null;switch(bt.type){case P.STRING:{Lt=We(we.slice(bt.loc.start.offset+1,bt.loc.end.offset-1));break}case P.NUMBER:{Lt=Number(bt.value);break}case P.TRUE:{Lt=!0;break}case P.FALSE:{Lt=!1;break}case P.NULL:{Lt=null;break}default:return null}var Vt={type:"Literal",value:Lt,raw:bt.value};return mt.loc&&(Vt.loc=bt.loc),{value:Vt,index:tt+1}}function Rt(we,Fe,tt,mt){var bt=Fe[tt],Lt=jt.apply(void 0,arguments)||vt.apply(void 0,arguments)||ut.apply(void 0,arguments);if(Lt)return Lt;I(S.unexpectedToken(s(we,bt.loc.start.offset,bt.loc.end.offset),mt.source,bt.loc.start.line,bt.loc.start.column),we,mt.source,bt.loc.start.line,bt.loc.start.column)}var Ke=function(we,Fe){Fe=Object.assign({},Ne,Fe);var tt=oe(we,Fe);tt.length===0&&je(we,tt,Fe);var mt=Rt(we,tt,0,Fe);if(mt.index===tt.length)return mt.value;var bt=tt[mt.index];I(S.unexpectedToken(s(we,bt.loc.start.offset,bt.loc.end.offset),Fe.source,bt.loc.start.line,bt.loc.start.column),we,Fe.source,bt.loc.start.line,bt.loc.start.column)};return Ke})}(wC)),wC.exports}var Lae=Dae();const Fae=us(Lae);function tr(){var r="/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",t="a994e12e3e6547813b669a430e6cb42da5d99bba",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return tr=function(){return s},s}tr();tr().s[0]++;Th.defineMode("mgl",(r,t)=>(tr().f[0]++,tr().s[1]++,Th.modes.javascript({...r,json:!0},t)));tr().s[2]++;Th.registerHelper("lint","json",r=>{tr().f[1]++;const t=(tr().s[3]++,[]);tr().s[4]++,ME.parser.parseError=(e,n)=>{tr().f[2]++;const i=(tr().s[5]++,n.loc);tr().s[6]++,t.push({from:Th.Pos(i.first_line-1,i.first_column),to:Th.Pos(i.last_line-1,i.last_column),message:e})},tr().s[7]++;try{tr().s[8]++,ME.parse(r)}catch{}return tr().s[9]++,t});tr().s[10]++;Th.registerHelper("lint","mgl",(r,t,e)=>{tr().f[3]++;const n=(tr().s[11]++,[]),{parser:i}=(tr().s[12]++,ME),{context:o}=(tr().s[13]++,t);tr().s[14]++,i.parseError=(b,I)=>{tr().f[4]++;const S=(tr().s[15]++,I.loc);tr().s[16]++,n.push({from:Th.Pos(S.first_line-1,S.first_column),to:Th.Pos(S.last_line-1,S.last_column),message:b})},tr().s[17]++;try{tr().s[18]++,i.parse(r)}catch{}if(tr().s[19]++,n.length>0)return tr().b[0][0]++,tr().s[20]++,n;tr().b[0][1]++;const s=(tr().s[21]++,Fae(r)),a=(tr().s[22]++,JSON.parse(r));function f(b,I){if(tr().f[5]++,tr().s[23]++,b){if(tr().b[1][1]++,tr().s[25]++,I.length<1)return tr().b[2][0]++,tr().s[26]++,b;if(tr().b[2][1]++,tr().s[27]++,b.children){tr().b[3][1]++;const S=(tr().s[29]++,I[0]);let B;return tr().s[30]++,S.match(/^[0-9]+$/)?(tr().b[4][0]++,tr().s[31]++,B=b.children[I[0]]):(tr().b[4][1]++,tr().s[32]++,B=b.children.find(P=>(tr().f[6]++,tr().s[33]++,tr().b[5][0]++,P.key&&(tr().b[5][1]++,P.key.type==="Identifier")&&(tr().b[5][2]++,P.key.value===S))),tr().s[34]++,B?(tr().b[6][0]++,tr().s[35]++,B=B.value):tr().b[6][1]++),tr().s[36]++,f(B,I.slice(1))}else{tr().b[3][0]++,tr().s[28]++;return}}else{tr().b[1][0]++,tr().s[24]++;return}}let g=(tr().s[37]++,null);if(tr().s[38]++,o==="layer"){tr().b[7][0]++;const b=(tr().s[39]++,pf({version:8,name:"Empty Style",metadata:{},sources:{},sprite:"",glyphs:"https://example.com/glyphs/{fontstack}/{range}.pbf",layers:[a]}));tr().s[40]++,b?(tr().b[8][0]++,tr().s[41]++,g={result:"error",value:b.filter(I=>(tr().f[7]++,tr().s[42]++,!I.message.match(/^layers\[0\]: source ".*" not found$/))).map(I=>{tr().f[8]++;const S=(tr().s[43]++,I.message.replace(/^layers\[0\]./,"").split(":"));return tr().s[44]++,{name:"",key:S[0],message:S[1]}})}):tr().b[8][1]++}else if(tr().b[7][1]++,tr().s[45]++,o==="expression")tr().b[9][0]++,tr().s[46]++,g=kq.createExpression(a,t.spec);else throw tr().b[9][1]++,tr().s[47]++,new Error(`Invalid context ${o}`);if(tr().s[48]++,(g==null?void 0:g.result)==="error"){tr().b[10][0]++;const b=(tr().s[49]++,g.value);tr().s[50]++,b.forEach(I=>{tr().f[9]++;const{key:S,message:B}=(tr().s[51]++,I);if(tr().s[52]++,S)if(tr().b[11][1]++,tr().s[56]++,S){tr().b[12][0]++;const P=(tr().s[57]++,S.replace(/^\[|\]$/g,"").split(/\.|[[\]]+/).filter(Boolean)),U=(tr().s[58]++,f(s,P));if(tr().s[59]++,U)tr().b[13][1]++;else{tr().b[13][0]++,tr().s[60]++,console.warn("Something went wrong parsing error:",I),tr().s[61]++;return}const{loc:j}=(tr().s[62]++,U),{start:q,end:W}=(tr().s[63]++,j);tr().s[64]++,n.push({from:Th.Pos(q.line-1,q.column),to:Th.Pos(W.line-1,W.column),message:B})}else tr().b[12][1]++;else{tr().b[11][0]++;const P=(tr().s[53]++,e.getLineHandle(e.lastLine())),U=(tr().s[54]++,{from:Th.Pos(e.firstLine(),0),to:Th.Pos(e.lastLine(),P.text.length),message:B});tr().s[55]++,n.push(U)}})}else tr().b[10][1]++;return tr().s[65]++,n});function gr(){var r="/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",t="da44fe7250311daecfc0a96e15b8409621007dbc",e=globalThis,n="__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:74,column:3}},14:{start:{line:69,column:4},end:{line:69,column:49}},15:{start:{line:69,column:28},end:{line:69,column:49}},16:{start:{line:70,column:4},end:{line:73,column:7}},17:{start:{line:75,column:11},end:{line:82,column:3}},18:{start:{line:76,column:4},end:{line:76,column:32}},19:{start:{line:77,column:4},end:{line:77,column:47}},20:{start:{line:77,column:27},end:{line:77,column:47}},21:{start:{line:78,column:4},end:{line:81,column:7}},22:{start:{line:84,column:4},end:{line:84,column:43}},23:{start:{line:85,column:4},end:{line:85,column:41}},24:{start:{line:86,column:4},end:{line:86,column:39}},25:{start:{line:89,column:4},end:{line:94,column:5}},26:{start:{line:90,column:6},end:{line:90,column:36}},27:{start:{line:91,column:6},end:{line:93,column:8}},28:{start:{line:96,column:13},end:{line:123,column:3}},29:{start:{line:97,column:4},end:{line:103,column:5}},30:{start:{line:98,column:6},end:{line:98,column:37}},31:{start:{line:99,column:6},end:{line:101,column:9}},32:{start:{line:102,column:6},end:{line:102,column:13}},33:{start:{line:104,column:20},end:{line:104,column:40}},34:{start:{line:105,column:4},end:{line:119,column:5}},35:{start:{line:107,column:6},end:{line:112,column:7}},36:{start:{line:108,column:8},end:{line:108,column:42}},37:{start:{line:110,column:8},end:{line:110,column:19}},38:{start:{line:111,column:8},end:{line:111,column:27}},39:{start:{line:113,column:6},end:{line:118,column:7}},40:{start:{line:114,column:8},end:{line:114,column:35}},41:{start:{line:116,column:8},end:{line:116,column:66}},42:{start:{line:116,column:33},end:{line:116,column:66}},43:{start:{line:117,column:8},end:{line:117,column:61}},44:{start:{line:117,column:36},end:{line:117,column:61}},45:{start:{line:120,column:4},end:{line:122,column:7}},46:{start:{line:125,column:14},end:{line:125,column:26}},47:{start:{line:126,column:28},end:{line:126,column:38}},48:{start:{line:127,column:18},end:{line:127,column:20}},49:{start:{line:128,column:4},end:{line:130,column:5}},50:{start:{line:129,column:6},end:{line:129,column:45}},51:{start:{line:131,column:4},end:{line:145,column:9}},52:{start:{line:141,column:23},end:{line:141,column:36}},53:{start:{line:148,column:18},end:{line:148,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:74,column:3}},line:68},9:{name:"(anonymous_9)",decl:{start:{line:75,column:11},end:{line:75,column:12}},loc:{start:{line:75,column:17},end:{line:82,column:3}},line:75},10:{name:"(anonymous_10)",decl:{start:{line:83,column:2},end:{line:83,column:3}},loc:{start:{line:83,column:25},end:{line:87,column:3}},line:83},11:{name:"(anonymous_11)",decl:{start:{line:88,column:2},end:{line:88,column:3}},loc:{start:{line:88,column:32},end:{line:95,column:3}},line:88},12:{name:"(anonymous_12)",decl:{start:{line:96,column:13},end:{line:96,column:14}},loc:{start:{line:96,column:21},end:{line:123,column:3}},line:96},13:{name:"(anonymous_13)",decl:{start:{line:124,column:2},end:{line:124,column:3}},loc:{start:{line:124,column:11},end:{line:146,column:3}},line:124},14:{name:"(anonymous_14)",decl:{start:{line:141,column:15},end:{line:141,column:16}},loc:{start:{line:141,column:23},end:{line:141,column:36}},line:141}},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:69,column:49}},type:"if",locations:[{start:{line:69,column:4},end:{line:69,column:49}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:69},3:{loc:{start:{line:77,column:4},end:{line:77,column:47}},type:"if",locations:[{start:{line:77,column:4},end:{line:77,column:47}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:77},4:{loc:{start:{line:89,column:4},end:{line:94,column:5}},type:"if",locations:[{start:{line:89,column:4},end:{line:94,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:89},5:{loc:{start:{line:89,column:8},end:{line:89,column:69}},type:"binary-expr",locations:[{start:{line:89,column:8},end:{line:89,column:29}},{start:{line:89,column:33},end:{line:89,column:69}}],line:89},6:{loc:{start:{line:97,column:4},end:{line:103,column:5}},type:"if",locations:[{start:{line:97,column:4},end:{line:103,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:97},7:{loc:{start:{line:105,column:4},end:{line:119,column:5}},type:"if",locations:[{start:{line:105,column:4},end:{line:119,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:105},8:{loc:{start:{line:113,column:6},end:{line:118,column:7}},type:"if",locations:[{start:{line:113,column:6},end:{line:118,column:7}},{start:{line:115,column:13},end:{line:118,column:7}}],line:113},9:{loc:{start:{line:113,column:10},end:{line:113,column:41}},type:"binary-expr",locations:[{start:{line:113,column:10},end:{line:113,column:13}},{start:{line:113,column:17},end:{line:113,column:41}}],line:113},10:{loc:{start:{line:116,column:8},end:{line:116,column:66}},type:"if",locations:[{start:{line:116,column:8},end:{line:116,column:66}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:116},11:{loc:{start:{line:117,column:8},end:{line:117,column:61}},type:"if",locations:[{start:{line:117,column:8},end:{line:117,column:61}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:117},12:{loc:{start:{line:128,column:4},end:{line:130,column:5}},type:"if",locations:[{start:{line:128,column:4},end:{line:130,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],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,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,QAAS,MAAK,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,OAAQ,MAAK,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,SAAU,MAAK,MAAM,SAAS,WAAW;AACxD,YAAI,KAAK,MAAM,YAAa,MAAK,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:"da44fe7250311daecfc0a96e15b8409621007dbc"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return gr=function(){return s},s}gr();class UU extends Zn.Component{constructor(e){gr().f[5]++,gr().s[4]++;super(e);Kn(this,"_keyEvent");Kn(this,"_doc");Kn(this,"_el",(gr().s[2]++,null));Kn(this,"_cancelNextChange",(gr().s[3]++,!1));Kn(this,"onPointerDown",(gr().s[11]++,()=>{gr().f[7]++,gr().s[12]++,this._keyEvent="pointer"}));Kn(this,"onFocus",(gr().s[13]++,()=>{gr().f[8]++,gr().s[14]++,this.props.onFocus?(gr().b[2][0]++,gr().s[15]++,this.props.onFocus()):gr().b[2][1]++,gr().s[16]++,this.setState({isEditing:!0,showMessage:this._keyEvent==="keyboard"})}));Kn(this,"onBlur",(gr().s[17]++,()=>{gr().f[9]++,gr().s[18]++,this._keyEvent="keyboard",gr().s[19]++,this.props.onBlur?(gr().b[3][0]++,gr().s[20]++,this.props.onBlur()):gr().b[3][1]++,gr().s[21]++,this.setState({isEditing:!1,showMessage:!1})}));Kn(this,"onChange",(gr().s[28]++,e=>{if(gr().f[12]++,gr().s[29]++,this._cancelNextChange){gr().b[6][0]++,gr().s[30]++,this._cancelNextChange=!1,gr().s[31]++,this.setState({prevValue:this._doc.getValue()}),gr().s[32]++;return}else gr().b[6][1]++;const n=(gr().s[33]++,this._doc.getValue());if(gr().s[34]++,this.state.prevValue!==n){gr().b[7][0]++;let i,o;gr().s[35]++;try{gr().s[36]++,i=JSON.parse(n)}catch(s){gr().s[37]++,o=s,gr().s[38]++,console.warn(s)}gr().s[39]++,gr().b[9][0]++,o&&(gr().b[9][1]++,this.props.onJSONInvalid)?(gr().b[8][0]++,gr().s[40]++,this.props.onJSONInvalid()):(gr().b[8][1]++,gr().s[41]++,this.props.onChange?(gr().b[10][0]++,gr().s[42]++,this.props.onChange(i)):gr().b[10][1]++,gr().s[43]++,this.props.onJSONValid?(gr().b[11][0]++,gr().s[44]++,this.props.onJSONValid()):gr().b[11][1]++)}else gr().b[7][1]++;gr().s[45]++,this.setState({prevValue:n})}));gr().s[5]++,this._keyEvent="keyboard",gr().s[6]++,this.state={isEditing:!1,showMessage:!1,prevValue:this.props.getValue(this.props.layer)}}componentDidMount(){gr().f[6]++,gr().s[7]++,this._doc=Th(this._el,{value:this.props.getValue(this.props.layer),mode:(gr().b[0][0]++,this.props.mode||(gr().b[0][1]++,{name:"mgl"})),lineWrapping:this.props.lineWrapping,tabSize:2,theme:"maputnik",viewportMargin:1/0,lineNumbers:this.props.lineNumbers,lint:(gr().b[1][0]++,this.props.lint||(gr().b[1][1]++,{context:"layer"})),matchBrackets:!0,gutters:this.props.gutters,scrollbarStyle:"null"}),gr().s[8]++,this._doc.on("change",this.onChange),gr().s[9]++,this._doc.on("focus",this.onFocus),gr().s[10]++,this._doc.on("blur",this.onBlur)}componentWillUnMount(){gr().f[10]++,gr().s[22]++,this._doc.off("change",this.onChange),gr().s[23]++,this._doc.off("focus",this.onFocus),gr().s[24]++,this._doc.off("blur",this.onBlur)}componentDidUpdate(e){gr().f[11]++,gr().s[25]++,gr().b[5][0]++,!this.state.isEditing&&(gr().b[5][1]++,e.layer!==this.props.layer)?(gr().b[4][0]++,gr().s[26]++,this._cancelNextChange=!0,gr().s[27]++,this._doc.setValue(this.props.getValue(this.props.layer))):gr().b[4][1]++}render(){gr().f[13]++;const e=(gr().s[46]++,this.props.t),{showMessage:n}=(gr().s[47]++,this.state),i=(gr().s[48]++,{});return gr().s[49]++,this.props.maxHeight?(gr().b[12][0]++,gr().s[50]++,i.maxHeight=this.props.maxHeight):gr().b[12][1]++,gr().s[51]++,ue.jsxs("div",{className:"JSONEditor",onPointerDown:this.onPointerDown,"aria-hidden":"true",children:[ue.jsx("div",{className:Ip("JSONEditor__message",{"JSONEditor__message--on":n}),children:ue.jsxs(Jm,{t:e,children:["Press ",ue.jsx("kbd",{children:"ESC"})," to lose focus"]})}),ue.jsx("div",{className:Ip("codemirror-container",this.props.className),ref:o=>(gr().f[14]++,gr().s[52]++,this._el=o),style:i})]})}}Kn(UU,"defaultProps",(gr().s[0]++,{lineNumbers:!0,lineWrapping:!1,gutters:["CodeMirror-lint-markers"],getValue:e=>(gr().f[0]++,gr().s[1]++,FU(e,{indent:2,maxLength:40})),onFocus:()=>{gr().f[1]++},onBlur:()=>{gr().f[2]++},onJSONInvalid:()=>{gr().f[3]++},onJSONValid:()=>{gr().f[4]++}}));const Uae=(gr().s[53]++,qa()(UU));function Ob(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",t="60f4cd40e505c4a9f8de1078b77716b10a4a4264",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ob=function(){return s},s}Ob();class bO extends Zn.Component{render(){return Ob().f[0]++,Ob().s[0]++,ue.jsx(Uae,{...this.props})}}var Ev="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",jae="M7,10L12,15L17,10H7Z",zae="M7,15L12,10L17,15H7Z",xO="M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z";function J0(){var r="/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",t="99dad9631fbee5fc23be2dafaf7c7eea92c38eac",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return J0=function(){return s},s}J0();const wO=(J0().s[0]++,["all","any","none"]);J0().s[1]++;const Nae=(J0().s[2]++,Object.keys(Jo.filter_operator.values).filter(r=>(J0().f[0]++,J0().s[3]++,wO.indexOf(r)<0)));function xi(){var r="/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",t="d18e3b448d830733ac17bcacd45f7c08e364baa2",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",statementMap:{0:{start:{line:8,column:2},end:{line:8,column:25}},1:{start:{line:8,column:16},end:{line:8,column:25}},2:{start:{line:9,column:2},end:{line:9,column:25}},3:{start:{line:9,column:16},end:{line:9,column:25}},4:{start:{line:10,column:2},end:{line:10,column:23}},5:{start:{line:13,column:19},end:{line:13,column:40}},6:{start:{line:14,column:2},end:{line:16,column:3}},7:{start:{line:15,column:4},end:{line:15,column:13}},8:{start:{line:17,column:2},end:{line:23,column:3}},9:{start:{line:18,column:4},end:{line:18,column:16}},10:{start:{line:19,column:9},end:{line:23,column:3}},11:{start:{line:20,column:4},end:{line:20,column:17}},12:{start:{line:22,column:4},end:{line:22,column:13}},13:{start:{line:26,column:2},end:{line:26,column:21}},14:{start:{line:27,column:2},end:{line:27,column:22}},15:{start:{line:28,column:2},end:{line:28,column:11}},16:{start:{line:31,column:24},end:{line:33,column:3}},17:{start:{line:35,column:20},end:{line:35,column:76}},18:{start:{line:36,column:4},end:{line:40,column:5}},19:{start:{line:37,column:6},end:{line:37,column:43}},20:{start:{line:38,column:11},end:{line:40,column:5}},21:{start:{line:39,column:6},end:{line:39,column:47}},22:{start:{line:41,column:4},end:{line:41,column:35}},23:{start:{line:44,column:14},end:{line:44,column:31}},24:{start:{line:45,column:21},end:{line:45,column:25}},25:{start:{line:46,column:25},end:{line:46,column:29}},26:{start:{line:47,column:23},end:{line:47,column:33}},27:{start:{line:48,column:4},end:{line:75,column:9}},28:{start:{line:54,column:72},end:{line:54,column:92}},29:{start:{line:55,column:41},end:{line:55,column:104}},30:{start:{line:63,column:37},end:{line:63,column:100}},31:{start:{line:72,column:27},end:{line:72,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:11,column:1}},line:7},1:{name:"tryParseBool",decl:{start:{line:12,column:9},end:{line:12,column:21}},loc:{start:{line:12,column:25},end:{line:24,column:1}},line:12},2:{name:"parseFilter",decl:{start:{line:25,column:9},end:{line:25,column:20}},loc:{start:{line:25,column:24},end:{line:29,column:1}},line:25},3:{name:"(anonymous_3)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:58},end:{line:42,column:3}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:11},end:{line:76,column:3}},line:43},5:{name:"(anonymous_5)",decl:{start:{line:54,column:58},end:{line:54,column:59}},loc:{start:{line:54,column:72},end:{line:54,column:92}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:55,column:20},end:{line:55,column:21}},loc:{start:{line:55,column:41},end:{line:55,column:104}},line:55},7:{name:"(anonymous_7)",decl:{start:{line:63,column:20},end:{line:63,column:21}},loc:{start:{line:63,column:37},end:{line:63,column:100}},line:63},8:{name:"(anonymous_8)",decl:{start:{line:72,column:20},end:{line:72,column:21}},loc:{start:{line:72,column:27},end:{line:72,column:89}},line:72}},branchMap:{0:{loc:{start:{line:8,column:2},end:{line:8,column:25}},type:"if",locations:[{start:{line:8,column:2},end:{line:8,column:25}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:8},1:{loc:{start:{line:9,column:2},end:{line:9,column:25}},type:"if",locations:[{start:{line:9,column:2},end:{line:9,column:25}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:9},2:{loc:{start:{line:14,column:2},end:{line:16,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:16,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:14},3:{loc:{start:{line:17,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:23,column:3}},{start:{line:19,column:9},end:{line:23,column:3}}],line:17},4:{loc:{start:{line:19,column:9},end:{line:23,column:3}},type:"if",locations:[{start:{line:19,column:9},end:{line:23,column:3}},{start:{line:21,column:9},end:{line:23,column:3}}],line:19},5:{loc:{start:{line:36,column:4},end:{line:40,column:5}},type:"if",locations:[{start:{line:36,column:4},end:{line:40,column:5}},{start:{line:38,column:11},end:{line:40,column:5}}],line:36},6:{loc:{start:{line:36,column:8},end:{line:36,column:49}},type:"binary-expr",locations:[{start:{line:36,column:8},end:{line:36,column:26}},{start:{line:36,column:30},end:{line:36,column:49}}],line:36},7:{loc:{start:{line:38,column:11},end:{line:40,column:5}},type:"if",locations:[{start:{line:38,column:11},end:{line:40,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},8:{loc:{start:{line:67,column:6},end:{line:74,column:10}},type:"binary-expr",locations:[{start:{line:67,column:6},end:{line:67,column:27}},{start:{line:67,column:47},end:{line:74,column:10}}],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},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,GAAI,QAAO;AACrB,MAAI,MAAM,CAAW,EAAG,QAAO;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:"d18e3b448d830733ac17bcacd45f7c08e364baa2"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return xi=function(){return s},s}xi();function Gae(r){return xi().f[0]++,xi().s[0]++,r===""?(xi().b[0][0]++,xi().s[1]++,r):(xi().b[0][1]++,xi().s[2]++,isNaN(r)?(xi().b[1][0]++,xi().s[3]++,r):(xi().b[1][1]++,xi().s[4]++,parseFloat(r)))}function Wae(r){xi().f[1]++;const t=(xi().s[5]++,typeof r=="string");if(xi().s[6]++,t)xi().b[2][1]++;else return xi().b[2][0]++,xi().s[7]++,r;return xi().s[8]++,r.match(/^\s*true\s*$/)?(xi().b[3][0]++,xi().s[9]++,!0):(xi().b[3][1]++,xi().s[10]++,r.match(/^\s*false\s*$/)?(xi().b[4][0]++,xi().s[11]++,!1):(xi().b[4][1]++,xi().s[12]++,r))}function Qae(r){return xi().f[2]++,xi().s[13]++,r=Gae(r),xi().s[14]++,r=Wae(r),xi().s[15]++,r}class jU extends Zn.Component{onFilterPartChanged(t,e,n){xi().f[3]++;let i=(xi().s[17]++,[t,e,...n.map(Qae)]);xi().s[18]++,xi().b[6][0]++,t==="has"||(xi().b[6][1]++,t==="!has")?(xi().b[5][0]++,xi().s[19]++,i=[t,e]):(xi().b[5][1]++,xi().s[20]++,n.length===0?(xi().b[7][0]++,xi().s[21]++,i=[t,e,""]):xi().b[7][1]++),xi().s[22]++,this.props.onChange(i)}render(){xi().f[4]++;const t=(xi().s[23]++,this.props.filter),e=(xi().s[24]++,t[0]),n=(xi().s[25]++,t[1]),i=(xi().s[26]++,t.slice(2));return xi().s[27]++,ue.jsxs("div",{className:"maputnik-filter-editor-single",children:[ue.jsx("div",{className:"maputnik-filter-editor-property",children:ue.jsx(J1,{"aria-label":"key",value:n,options:Object.keys(this.props.properties).map(o=>(xi().f[5]++,xi().s[28]++,[o,o])),onChange:o=>(xi().f[6]++,xi().s[29]++,this.onFilterPartChanged(e,o,i))})}),ue.jsx("div",{className:"maputnik-filter-editor-operator",children:ue.jsx(cg,{"aria-label":"function",value:e,onChange:o=>(xi().f[7]++,xi().s[30]++,this.onFilterPartChanged(o,n,i)),options:Nae})}),(xi().b[8][0]++,i.length>0&&(xi().b[8][1]++,ue.jsx("div",{className:"maputnik-filter-editor-args",children:ue.jsx(ff,{"aria-label":"value",value:i.join(","),onChange:o=>(xi().f[8]++,xi().s[31]++,this.onFilterPartChanged(e,n,o.split(",")))})})))]})}}Kn(jU,"defaultProps",(xi().s[16]++,{properties:{}}));function E1(){var r="/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",t="cef1671f65ba48cf49a518a548a597faa051d67d",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return E1=function(){return s},s}E1();class qae extends Zn.Component{render(){E1().f[0]++;const t=(E1().s[0]++,this.props.t);return E1().s[1]++,ue.jsxs("div",{className:"maputnik-filter-editor-block",children:[ue.jsx("div",{className:"maputnik-filter-editor-block-action",children:ue.jsx(Ws,{className:"maputnik-delete-filter",onClick:this.props.onDelete,title:t("Delete filter block"),children:ue.jsx(Y1,{})})}),ue.jsx("div",{className:"maputnik-filter-editor-block-content",children:this.props.children})]})}}const Yae=(E1().s[2]++,qa()(qae));var a4,H7;function $ae(){if(H7)return a4;H7=1;var r="[object Symbol]",t="\\ud800-\\udfff",e="\\u0300-\\u036f\\ufe20-\\ufe23",n="\\u20d0-\\u20f0",i="\\ufe0e\\ufe0f",o="["+t+"]",s="["+e+n+"]",a="\\ud83c[\\udffb-\\udfff]",f="(?:"+s+"|"+a+")",g="[^"+t+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",S="\\u200d",B=f+"?",P="["+i+"]?",U="(?:"+S+"(?:"+[g,b,I].join("|")+")"+P+B+")*",j=P+B+U,q="(?:"+[g+s+"?",s,b,I,o].join("|")+")",W=RegExp(a+"(?="+a+")|"+q+j,"g"),ee=RegExp("["+S+t+e+n+i+"]"),J=typeof window=="object"&&window&&window.Object===Object&&window,$=typeof self=="object"&&self&&self.Object===Object&&self,X=J||$||Function("return this")();function G(ut){return ut.split("")}function ae(ut){return ee.test(ut)}function ge(ut){return ae(ut)?he(ut):G(ut)}function he(ut){return ut.match(W)||[]}var Ie=Object.prototype,re=Ie.toString,oe=X.Symbol,Se=oe?oe.prototype:void 0,ye=Se?Se.toString:void 0;function nt(ut,jt,Rt){var Ke=-1,we=ut.length;jt<0&&(jt=-jt>we?0:we+jt),Rt=Rt>we?we:Rt,Rt<0&&(Rt+=we),we=jt>Rt?0:Rt-jt>>>0,jt>>>=0;for(var Fe=Array(we);++Ke<we;)Fe[Ke]=ut[Ke+jt];return Fe}function Ne(ut){if(typeof ut=="string")return ut;if(ke(ut))return ye?ye.call(ut):"";var jt=ut+"";return jt=="0"&&1/ut==-1/0?"-0":jt}function je(ut,jt,Rt){var Ke=ut.length;return Rt=Rt===void 0?Ke:Rt,!jt&&Rt>=Ke?ut:nt(ut,jt,Rt)}function et(ut){return function(jt){jt=We(jt);var Rt=ae(jt)?ge(jt):void 0,Ke=Rt?Rt[0]:jt.charAt(0),we=Rt?je(Rt,1).join(""):jt.slice(1);return Ke[ut]()+we}}function Ue(ut){return!!ut&&typeof ut=="object"}function ke(ut){return typeof ut=="symbol"||Ue(ut)&&re.call(ut)==r}function We(ut){return ut==null?"":Ne(ut)}function vt(ut){return Pt(We(ut).toLowerCase())}var Pt=et("toUpperCase");return a4=vt,a4}var Vae=$ae();const MO=us(Vae);function pp(){var r="/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",t="8b86d889d32efa9a6cc667b2fa3579002dfb58fc",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return pp=function(){return s},s}pp();function I2(r){pp().f[0]++;let t;const e=(pp().s[0]++,r.split("-"));return pp().s[1]++,e.length>1?(pp().b[0][0]++,pp().s[2]++,t=r.split("-").slice(1).join(" ")):(pp().b[0][1]++,pp().s[3]++,t=r),pp().s[4]++,MO(t)}function vo(){var r="/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",t="550aede3b5713892add5bda71ec153770e1b1129",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return vo=function(){return s},s}vo();class zU extends Zn.Component{constructor(e){vo().f[2]++,vo().s[1]++;super(e);Kn(this,"onJSONInvalid",(vo().s[3]++,e=>{vo().f[3]++,vo().s[4]++,this.setState({jsonError:!0})}));Kn(this,"onJSONValid",(vo().s[5]++,()=>{vo().f[4]++,vo().s[6]++,this.setState({jsonError:!1})}));vo().s[2]++,this.state={jsonError:!1}}render(){vo().f[5]++;const{t:e,errors:n,fieldName:i,fieldType:o,value:s,canUndo:a}=(vo().s[7]++,this.props),{jsonError:f}=(vo().s[8]++,this.state),g=(vo().s[9]++,a?(vo().b[0][0]++,!a()):(vo().b[0][1]++,!0)),b=(vo().s[10]++,ue.jsxs(ue.Fragment,{children:[(vo().b[1][0]++,this.props.onUndo&&(vo().b[1][1]++,ue.jsx(Ws,{onClick:this.props.onUndo,disabled:g,className:"maputnik-delete-stop",title:e("Revert from expression"),children:ue.jsx(wY,{})},"undo_action"))),ue.jsx(Ws,{onClick:this.props.onDelete,className:"maputnik-delete-stop",title:e("Delete expression"),children:ue.jsx(Y1,{})},"delete_action")]})),I=(vo().s[11]++,o===void 0?(vo().b[2][0]++,i):(vo().b[2][1]++,`${o}.${i}`)),S=(vo().s[12]++,n[I]),B=(vo().s[13]++,`${I}[`),P=(vo().s[14]++,[]);function U(j){return vo().f[6]++,vo().s[15]++,FU(j,{indent:2,maxLength:38})}return vo().s[16]++,f?(vo().b[3][0]++,vo().s[17]++,P.push({message:"Invalid JSON"})):(vo().b[3][1]++,vo().s[18]++,Object.entries(n).filter(([j,q])=>(vo().f[7]++,vo().s[19]++,j.startsWith(B))).forEach(([j,q])=>(vo().f[8]++,vo().s[20]++,P.push(q))),vo().s[21]++,S?(vo().b[4][0]++,vo().s[22]++,P.push(S)):vo().b[4][1]++),vo().s[23]++,ue.jsx(ps,{error:P,fieldSpec:this.props.fieldSpec,label:e(I2(this.props.fieldName)),action:b,wideMode:!0,children:ue.jsx(bO,{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:s,lineNumbers:!1,maxHeight:200,lineWrapping:!0,getValue:U,onChange:this.props.onChange})})}}Kn(zU,"defaultProps",(vo().s[0]++,{errors:{},onFocus:()=>{vo().f[0]++},onBlur:()=>{vo().f[1]++}}));const NU=(vo().s[24]++,qa()(zU));function Dn(){var r="/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",t="10bf63b3f71adfa5066d0aecd6eaecbe45ada76f",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Dn=function(){return s},s}Dn();function Nm(r){Dn().f[0]++;const t=(Dn().s[0]++,Dn().b[0][0]++,r.filter||(Dn().b[0][1]++,["all"]));if(Dn().s[1]++,Array.isArray(t))Dn().b[1][1]++;else return Dn().b[1][0]++,Dn().s[2]++,t;let e=(Dn().s[3]++,t[0]),n=(Dn().s[4]++,t.slice(1));return Dn().s[5]++,wO.indexOf(e)<0?(Dn().b[2][0]++,Dn().s[6]++,e="all",Dn().s[7]++,n=[t.slice(0)]):Dn().b[2][1]++,Dn().s[8]++,[e,...n]}function Hae(r){return Dn().f[1]++,Dn().s[9]++,Iq(Zae(r)).layers[0].filter}function Zae(r){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:r}]}}const Xae=(Dn().s[11]++,["all","any","none"]);function Z7(r){if(Dn().f[3]++,Dn().s[12]++,Dn().b[4][0]++,r.length===1&&(Dn().b[4][1]++,Xae.includes(r[0])))return Dn().b[3][0]++,Dn().s[13]++,!0;Dn().b[3][1]++;const t=(Dn().s[14]++,Yy(r));return Dn().s[15]++,!zb.isEqual(t,r)}function X7(r){return Dn().f[4]++,Dn().s[16]++,wO.indexOf(r[0])>=0}function Jae(r){return Dn().f[5]++,Dn().s[17]++,X7(r)?(Dn().b[5][0]++,Dn().s[18]++,r.slice(1).map(t=>(Dn().f[6]++,Dn().s[19]++,X7(t))).filter(t=>(Dn().f[7]++,Dn().s[20]++,t==!0)).length>0):(Dn().b[5][1]++,Dn().s[21]++,!1)}class GU extends Zn.Component{constructor(e){Dn().f[8]++,Dn().s[23]++;super(e);Kn(this,"addFilterItem",(Dn().s[31]++,()=>{Dn().f[11]++;const e=(Dn().s[32]++,Nm(this.props).slice(0));Dn().s[33]++,e.push(["==","name",""]),Dn().s[34]++,this.props.onChange(e)}));Kn(this,"onToggleDoc",(Dn().s[35]++,e=>{Dn().f[12]++,Dn().s[36]++,this.setState({showDoc:e})}));Kn(this,"makeFilter",(Dn().s[37]++,()=>{Dn().f[13]++,Dn().s[38]++,this.setState({displaySimpleFilter:!0})}));Kn(this,"makeExpression",(Dn().s[39]++,()=>{Dn().f[14]++;const e=(Dn().s[40]++,Nm(this.props));Dn().s[41]++,this.props.onChange(Hae(e)),Dn().s[42]++,this.setState({displaySimpleFilter:!1})}));Dn().s[24]++,this.state={showDoc:!1,displaySimpleFilter:Z7(Nm(e))}}onFilterPartChanged(e,n){Dn().f[9]++;const i=(Dn().s[25]++,Nm(this.props).slice(0));Dn().s[26]++,i[e]=n,Dn().s[27]++,this.props.onChange(i)}deleteFilterItem(e){Dn().f[10]++;const n=(Dn().s[28]++,Nm(this.props).slice(0));Dn().s[29]++,n.splice(e+1,1),Dn().s[30]++,this.props.onChange(n)}static getDerivedStateFromProps(e,n){Dn().f[15]++;const i=(Dn().s[43]++,Z7(Nm(e)));return Dn().s[44]++,Dn().b[7][0]++,!i&&(Dn().b[7][1]++,n.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]++,n.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:e,t:n}=(Dn().s[49]++,this.props),{displaySimpleFilter:i}=(Dn().s[50]++,this.state),o=(Dn().s[51]++,{doc:Qa.layer.filter.doc+" Combine multiple filters together by using a compound filter."}),s=(Dn().s[52]++,["all"]),a=(Dn().s[53]++,Dn().b[10][0]++,i&&(Dn().b[10][1]++,Jae(Nm(this.props))));if(Dn().s[54]++,a)return Dn().b[11][0]++,Dn().s[55]++,ue.jsxs("div",{className:"maputnik-filter-editor-unsupported",children:[ue.jsx("p",{children:n("Nested filters are not supported.")}),ue.jsxs(Ws,{onClick:this.makeExpression,title:n("Convert to expression"),children:[ue.jsx("svg",{style:{marginRight:"0.2em",width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:Ev})}),n("Upgrade to expression")]})]});if(Dn().b[11][1]++,Dn().s[56]++,i){Dn().b[12][0]++;const f=(Dn().s[57]++,Nm(this.props)),g=(Dn().s[58]++,f[0]),b=(Dn().s[59]++,f.slice(1)),I=(Dn().s[60]++,ue.jsx("div",{children:ue.jsx(Ws,{onClick:this.makeExpression,title:n("Convert to expression"),className:"maputnik-make-zoom-function",children:ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:Ev})})})})),S=(Dn().s[61]++,b.map((B,P)=>{Dn().f[17]++;const U=(Dn().s[62]++,e[`filter[${P+1}]`]);return Dn().s[63]++,ue.jsxs("div",{children:[ue.jsx(Yae,{onDelete:this.deleteFilterItem.bind(this,P),children:ue.jsx(jU,{properties:this.props.properties,filter:B,onChange:this.onFilterPartChanged.bind(this,P+1)})},P),(Dn().b[13][0]++,U&&(Dn().b[13][1]++,ue.jsx("div",{className:"maputnik-inline-error",children:U.message},"error")))]},`block-${P}`)}));return Dn().s[64]++,ue.jsxs(ue.Fragment,{children:[ue.jsx(ps,{fieldSpec:o,label:n("Filter"),action:I,children:ue.jsx(cg,{value:g,onChange:B=>(Dn().f[18]++,Dn().s[65]++,this.onFilterPartChanged(0,B)),options:[["all",n("every filter matches")],["none",n("no filter matches")],["any",n("any filter matches")]]})},"top"),S,ue.jsx("div",{className:"maputnik-filter-editor-add-wrapper",children:ue.jsxs(Ws,{"data-wd-key":"layer-filter-button",className:"maputnik-add-filter",onClick:this.addFilterItem,children:[ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:xO})})," ",n("Add filter")]})},"buttons"),ue.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(Dn().b[14][0]++,""):(Dn().b[14][1]++,"none")},children:ue.jsx(vO,{fieldSpec:o})},"doc")]})}else{Dn().b[12][1]++;const{filter:f}=(Dn().s[66]++,this.props);return Dn().s[67]++,ue.jsxs(ue.Fragment,{children:[ue.jsx(NU,{onDelete:()=>{Dn().f[19]++,Dn().s[68]++,this.setState({displaySimpleFilter:!0}),Dn().s[69]++,this.props.onChange(s)},fieldName:"filter",fieldSpec:o,value:f,errors:e,onChange:this.props.onChange}),(Dn().b[15][0]++,this.state.valueIsSimpleFilter&&(Dn().b[15][1]++,ue.jsxs("div",{className:"maputnik-expr-infobox",children:[n("You've entered an old style filter.")," ",ue.jsx("button",{onClick:this.makeFilter,className:"maputnik-expr-infobox__button",children:n("Switch to filter editor.")})]})))]})}}}Kn(GU,"defaultProps",(Dn().s[22]++,{filter:["all"]}));const ese=(Dn().s[70]++,qa()(GU));var Kg={},rh={},Rg={},s4,J7;function WU(){if(J7)return s4;J7=1;var r=typeof window=="object"&&window&&window.Object===Object&&window;return s4=r,s4}var l4,ek;function $f(){if(ek)return l4;ek=1;var r=WU(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=r||t||Function("return this")();return l4=e,l4}var u4,tk;function Zv(){if(tk)return u4;tk=1;var r=$f(),t=r.Symbol;return u4=t,u4}var A4,nk;function tse(){if(nk)return A4;nk=1;var r=Zv(),t=Object.prototype,e=t.hasOwnProperty,n=t.toString,i=r?r.toStringTag:void 0;function o(s){var a=e.call(s,i),f=s[i];try{s[i]=void 0;var g=!0}catch{}var b=n.call(s);return g&&(a?s[i]=f:delete s[i]),b}return A4=o,A4}var c4,rk;function nse(){if(rk)return c4;rk=1;var r=Object.prototype,t=r.toString;function e(n){return t.call(n)}return c4=e,c4}var d4,ik;function dg(){if(ik)return d4;ik=1;var r=Zv(),t=tse(),e=nse(),n="[object Null]",i="[object Undefined]",o=r?r.toStringTag:void 0;function s(a){return a==null?a===void 0?i:n:o&&o in Object(a)?t(a):e(a)}return d4=s,d4}var h4,ok;function Lh(){if(ok)return h4;ok=1;var r=Array.isArray;return h4=r,h4}var f4,ak;function Rp(){if(ak)return f4;ak=1;function r(t){return t!=null&&typeof t=="object"}return f4=r,f4}var p4,sk;function rse(){if(sk)return p4;sk=1;var r=dg(),t=Lh(),e=Rp(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&e(o)&&r(o)==n}return p4=i,p4}var m4,lk;function ise(){if(lk)return m4;lk=1;function r(t){return function(e,n,i){for(var o=-1,s=Object(e),a=i(e),f=a.length;f--;){var g=a[t?f:++o];if(n(s[g],g,s)===!1)break}return e}}return m4=r,m4}var g4,uk;function QU(){if(uk)return g4;uk=1;var r=ise(),t=r();return g4=t,g4}var y4,Ak;function ose(){if(Ak)return y4;Ak=1;function r(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}return y4=r,y4}var v4,ck;function ase(){if(ck)return v4;ck=1;var r=dg(),t=Rp(),e="[object Arguments]";function n(i){return t(i)&&r(i)==e}return v4=n,v4}var _4,dk;function SO(){if(dk)return _4;dk=1;var r=ase(),t=Rp(),e=Object.prototype,n=e.hasOwnProperty,i=e.propertyIsEnumerable,o=r(function(){return arguments}())?r:function(s){return t(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return _4=o,_4}var jy={exports:{}},C4,hk;function sse(){if(hk)return C4;hk=1;function r(){return!1}return C4=r,C4}jy.exports;var fk;function k2(){return fk||(fk=1,function(r,t){var e=$f(),n=sse(),i=t&&!t.nodeType&&t,o=i&&!0&&r&&!r.nodeType&&r,s=o&&o.exports===i,a=s?e.Buffer:void 0,f=a?a.isBuffer:void 0,g=f||n;r.exports=g}(jy,jy.exports)),jy.exports}var b4,pk;function EO(){if(pk)return b4;pk=1;var r=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function e(n,i){var o=typeof n;return i=i??r,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return b4=e,b4}var x4,mk;function OO(){if(mk)return x4;mk=1;var r=9007199254740991;function t(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=r}return x4=t,x4}var w4,gk;function lse(){if(gk)return w4;gk=1;var r=dg(),t=OO(),e=Rp(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",s="[object Date]",a="[object Error]",f="[object Function]",g="[object Map]",b="[object Number]",I="[object Object]",S="[object RegExp]",B="[object Set]",P="[object String]",U="[object WeakMap]",j="[object ArrayBuffer]",q="[object DataView]",W="[object Float32Array]",ee="[object Float64Array]",J="[object Int8Array]",$="[object Int16Array]",X="[object Int32Array]",G="[object Uint8Array]",ae="[object Uint8ClampedArray]",ge="[object Uint16Array]",he="[object Uint32Array]",Ie={};Ie[W]=Ie[ee]=Ie[J]=Ie[$]=Ie[X]=Ie[G]=Ie[ae]=Ie[ge]=Ie[he]=!0,Ie[n]=Ie[i]=Ie[j]=Ie[o]=Ie[q]=Ie[s]=Ie[a]=Ie[f]=Ie[g]=Ie[b]=Ie[I]=Ie[S]=Ie[B]=Ie[P]=Ie[U]=!1;function re(oe){return e(oe)&&t(oe.length)&&!!Ie[r(oe)]}return w4=re,w4}var M4,yk;function BO(){if(yk)return M4;yk=1;function r(t){return function(e){return t(e)}}return M4=r,M4}var zy={exports:{}};zy.exports;var vk;function IO(){return vk||(vk=1,function(r,t){var e=WU(),n=t&&!t.nodeType&&t,i=n&&!0&&r&&!r.nodeType&&r,o=i&&i.exports===n,s=o&&e.process,a=function(){try{var f=i&&i.require&&i.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}}();r.exports=a}(zy,zy.exports)),zy.exports}var S4,_k;function kO(){if(_k)return S4;_k=1;var r=lse(),t=BO(),e=IO(),n=e&&e.isTypedArray,i=n?t(n):r;return S4=i,S4}var E4,Ck;function qU(){if(Ck)return E4;Ck=1;var r=ose(),t=SO(),e=Lh(),n=k2(),i=EO(),o=kO(),s=Object.prototype,a=s.hasOwnProperty;function f(g,b){var I=e(g),S=!I&&t(g),B=!I&&!S&&n(g),P=!I&&!S&&!B&&o(g),U=I||S||B||P,j=U?r(g.length,String):[],q=j.length;for(var W in g)(b||a.call(g,W))&&!(U&&(W=="length"||B&&(W=="offset"||W=="parent")||P&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||i(W,q)))&&j.push(W);return j}return E4=f,E4}var O4,bk;function TO(){if(bk)return O4;bk=1;var r=Object.prototype;function t(e){var n=e&&e.constructor,i=typeof n=="function"&&n.prototype||r;return e===i}return O4=t,O4}var B4,xk;function YU(){if(xk)return B4;xk=1;function r(t,e){return function(n){return t(e(n))}}return B4=r,B4}var I4,wk;function use(){if(wk)return I4;wk=1;var r=YU(),t=r(Object.keys,Object);return I4=t,I4}var k4,Mk;function Ase(){if(Mk)return k4;Mk=1;var r=TO(),t=use(),e=Object.prototype,n=e.hasOwnProperty;function i(o){if(!r(o))return t(o);var s=[];for(var a in Object(o))n.call(o,a)&&a!="constructor"&&s.push(a);return s}return k4=i,k4}var T4,Sk;function mf(){if(Sk)return T4;Sk=1;function r(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}return T4=r,T4}var P4,Ek;function PO(){if(Ek)return P4;Ek=1;var r=dg(),t=mf(),e="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function s(a){if(!t(a))return!1;var f=r(a);return f==n||f==i||f==e||f==o}return P4=s,P4}var K4,Ok;function ey(){if(Ok)return K4;Ok=1;var r=PO(),t=OO();function e(n){return n!=null&&t(n.length)&&!r(n)}return K4=e,K4}var R4,Bk;function Xv(){if(Bk)return R4;Bk=1;var r=qU(),t=Ase(),e=ey();function n(i){return e(i)?r(i):t(i)}return R4=n,R4}var D4,Ik;function $U(){if(Ik)return D4;Ik=1;var r=QU(),t=Xv();function e(n,i){return n&&r(n,i,t)}return D4=e,D4}var L4,kk;function T2(){if(kk)return L4;kk=1;function r(t){return t}return L4=r,L4}var F4,Tk;function VU(){if(Tk)return F4;Tk=1;var r=T2();function t(e){return typeof e=="function"?e:r}return F4=t,F4}var U4,Pk;function KO(){if(Pk)return U4;Pk=1;var r=$U(),t=VU();function e(n,i){return n&&r(n,t(i))}return U4=e,U4}var j4,Kk;function RO(){if(Kk)return j4;Kk=1;var r=YU(),t=r(Object.getPrototypeOf,Object);return j4=t,j4}var z4,Rk;function HU(){if(Rk)return z4;Rk=1;var r=dg(),t=RO(),e=Rp(),n="[object Object]",i=Function.prototype,o=Object.prototype,s=i.toString,a=o.hasOwnProperty,f=s.call(Object);function g(b){if(!e(b)||r(b)!=n)return!1;var I=t(b);if(I===null)return!0;var S=a.call(I,"constructor")&&I.constructor;return typeof S=="function"&&S instanceof S&&s.call(S)==f}return z4=g,z4}var N4,Dk;function ZU(){if(Dk)return N4;Dk=1;function r(t,e){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=e(t[n],n,t);return o}return N4=r,N4}var G4,Lk;function cse(){if(Lk)return G4;Lk=1;function r(){this.__data__=[],this.size=0}return G4=r,G4}var W4,Fk;function Jv(){if(Fk)return W4;Fk=1;function r(t,e){return t===e||t!==t&&e!==e}return W4=r,W4}var Q4,Uk;function P2(){if(Uk)return Q4;Uk=1;var r=Jv();function t(e,n){for(var i=e.length;i--;)if(r(e[i][0],n))return i;return-1}return Q4=t,Q4}var q4,jk;function dse(){if(jk)return q4;jk=1;var r=P2(),t=Array.prototype,e=t.splice;function n(i){var o=this.__data__,s=r(o,i);if(s<0)return!1;var a=o.length-1;return s==a?o.pop():e.call(o,s,1),--this.size,!0}return q4=n,q4}var Y4,zk;function hse(){if(zk)return Y4;zk=1;var r=P2();function t(e){var n=this.__data__,i=r(n,e);return i<0?void 0:n[i][1]}return Y4=t,Y4}var $4,Nk;function fse(){if(Nk)return $4;Nk=1;var r=P2();function t(e){return r(this.__data__,e)>-1}return $4=t,$4}var V4,Gk;function pse(){if(Gk)return V4;Gk=1;var r=P2();function t(e,n){var i=this.__data__,o=r(i,e);return o<0?(++this.size,i.push([e,n])):i[o][1]=n,this}return V4=t,V4}var H4,Wk;function K2(){if(Wk)return H4;Wk=1;var r=cse(),t=dse(),e=hse(),n=fse(),i=pse();function o(s){var a=-1,f=s==null?0:s.length;for(this.clear();++a<f;){var g=s[a];this.set(g[0],g[1])}}return o.prototype.clear=r,o.prototype.delete=t,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,H4=o,H4}var Z4,Qk;function mse(){if(Qk)return Z4;Qk=1;var r=K2();function t(){this.__data__=new r,this.size=0}return Z4=t,Z4}var X4,qk;function gse(){if(qk)return X4;qk=1;function r(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}return X4=r,X4}var J4,Yk;function yse(){if(Yk)return J4;Yk=1;function r(t){return this.__data__.get(t)}return J4=r,J4}var ew,$k;function vse(){if($k)return ew;$k=1;function r(t){return this.__data__.has(t)}return ew=r,ew}var tw,Vk;function _se(){if(Vk)return tw;Vk=1;var r=$f(),t=r["__core-js_shared__"];return tw=t,tw}var nw,Hk;function Cse(){if(Hk)return nw;Hk=1;var r=_se(),t=function(){var n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function e(n){return!!t&&t in n}return nw=e,nw}var rw,Zk;function XU(){if(Zk)return rw;Zk=1;var r=Function.prototype,t=r.toString;function e(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return rw=e,rw}var iw,Xk;function bse(){if(Xk)return iw;Xk=1;var r=PO(),t=Cse(),e=mf(),n=XU(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,f=s.toString,g=a.hasOwnProperty,b=RegExp("^"+f.call(g).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I(S){if(!e(S)||t(S))return!1;var B=r(S)?b:o;return B.test(n(S))}return iw=I,iw}var ow,Jk;function xse(){if(Jk)return ow;Jk=1;function r(t,e){return t==null?void 0:t[e]}return ow=r,ow}var aw,eT;function hg(){if(eT)return aw;eT=1;var r=bse(),t=xse();function e(n,i){var o=t(n,i);return r(o)?o:void 0}return aw=e,aw}var sw,tT;function DO(){if(tT)return sw;tT=1;var r=hg(),t=$f(),e=r(t,"Map");return sw=e,sw}var lw,nT;function R2(){if(nT)return lw;nT=1;var r=hg(),t=r(Object,"create");return lw=t,lw}var uw,rT;function wse(){if(rT)return uw;rT=1;var r=R2();function t(){this.__data__=r?r(null):{},this.size=0}return uw=t,uw}var Aw,iT;function Mse(){if(iT)return Aw;iT=1;function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}return Aw=r,Aw}var cw,oT;function Sse(){if(oT)return cw;oT=1;var r=R2(),t="__lodash_hash_undefined__",e=Object.prototype,n=e.hasOwnProperty;function i(o){var s=this.__data__;if(r){var a=s[o];return a===t?void 0:a}return n.call(s,o)?s[o]:void 0}return cw=i,cw}var dw,aT;function Ese(){if(aT)return dw;aT=1;var r=R2(),t=Object.prototype,e=t.hasOwnProperty;function n(i){var o=this.__data__;return r?o[i]!==void 0:e.call(o,i)}return dw=n,dw}var hw,sT;function Ose(){if(sT)return hw;sT=1;var r=R2(),t="__lodash_hash_undefined__";function e(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=r&&i===void 0?t:i,this}return hw=e,hw}var fw,lT;function Bse(){if(lT)return fw;lT=1;var r=wse(),t=Mse(),e=Sse(),n=Ese(),i=Ose();function o(s){var a=-1,f=s==null?0:s.length;for(this.clear();++a<f;){var g=s[a];this.set(g[0],g[1])}}return o.prototype.clear=r,o.prototype.delete=t,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,fw=o,fw}var pw,uT;function Ise(){if(uT)return pw;uT=1;var r=Bse(),t=K2(),e=DO();function n(){this.size=0,this.__data__={hash:new r,map:new(e||t),string:new r}}return pw=n,pw}var mw,AT;function kse(){if(AT)return mw;AT=1;function r(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}return mw=r,mw}var gw,cT;function D2(){if(cT)return gw;cT=1;var r=kse();function t(e,n){var i=e.__data__;return r(n)?i[typeof n=="string"?"string":"hash"]:i.map}return gw=t,gw}var yw,dT;function Tse(){if(dT)return yw;dT=1;var r=D2();function t(e){var n=r(this,e).delete(e);return this.size-=n?1:0,n}return yw=t,yw}var vw,hT;function Pse(){if(hT)return vw;hT=1;var r=D2();function t(e){return r(this,e).get(e)}return vw=t,vw}var _w,fT;function Kse(){if(fT)return _w;fT=1;var r=D2();function t(e){return r(this,e).has(e)}return _w=t,_w}var Cw,pT;function Rse(){if(pT)return Cw;pT=1;var r=D2();function t(e,n){var i=r(this,e),o=i.size;return i.set(e,n),this.size+=i.size==o?0:1,this}return Cw=t,Cw}var bw,mT;function LO(){if(mT)return bw;mT=1;var r=Ise(),t=Tse(),e=Pse(),n=Kse(),i=Rse();function o(s){var a=-1,f=s==null?0:s.length;for(this.clear();++a<f;){var g=s[a];this.set(g[0],g[1])}}return o.prototype.clear=r,o.prototype.delete=t,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,bw=o,bw}var xw,gT;function Dse(){if(gT)return xw;gT=1;var r=K2(),t=DO(),e=LO(),n=200;function i(o,s){var a=this.__data__;if(a instanceof r){var f=a.__data__;if(!t||f.length<n-1)return f.push([o,s]),this.size=++a.size,this;a=this.__data__=new e(f)}return a.set(o,s),this.size=a.size,this}return xw=i,xw}var ww,yT;function L2(){if(yT)return ww;yT=1;var r=K2(),t=mse(),e=gse(),n=yse(),i=vse(),o=Dse();function s(a){var f=this.__data__=new r(a);this.size=f.size}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,ww=s,ww}var Mw,vT;function Lse(){if(vT)return Mw;vT=1;var r="__lodash_hash_undefined__";function t(e){return this.__data__.set(e,r),this}return Mw=t,Mw}var Sw,_T;function Fse(){if(_T)return Sw;_T=1;function r(t){return this.__data__.has(t)}return Sw=r,Sw}var Ew,CT;function Use(){if(CT)return Ew;CT=1;var r=LO(),t=Lse(),e=Fse();function n(i){var o=-1,s=i==null?0:i.length;for(this.__data__=new r;++o<s;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=e,Ew=n,Ew}var Ow,bT;function jse(){if(bT)return Ow;bT=1;function r(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}return Ow=r,Ow}var Bw,xT;function zse(){if(xT)return Bw;xT=1;function r(t,e){return t.has(e)}return Bw=r,Bw}var Iw,wT;function JU(){if(wT)return Iw;wT=1;var r=Use(),t=jse(),e=zse(),n=1,i=2;function o(s,a,f,g,b,I){var S=f&n,B=s.length,P=a.length;if(B!=P&&!(S&&P>B))return!1;var U=I.get(s),j=I.get(a);if(U&&j)return U==a&&j==s;var q=-1,W=!0,ee=f&i?new r:void 0;for(I.set(s,a),I.set(a,s);++q<B;){var J=s[q],$=a[q];if(g)var X=S?g($,J,q,a,s,I):g(J,$,q,s,a,I);if(X!==void 0){if(X)continue;W=!1;break}if(ee){if(!t(a,function(G,ae){if(!e(ee,ae)&&(J===G||b(J,G,f,g,I)))return ee.push(ae)})){W=!1;break}}else if(!(J===$||b(J,$,f,g,I))){W=!1;break}}return I.delete(s),I.delete(a),W}return Iw=o,Iw}var kw,MT;function ej(){if(MT)return kw;MT=1;var r=$f(),t=r.Uint8Array;return kw=t,kw}var Tw,ST;function Nse(){if(ST)return Tw;ST=1;function r(t){var e=-1,n=Array(t.size);return t.forEach(function(i,o){n[++e]=[o,i]}),n}return Tw=r,Tw}var Pw,ET;function Gse(){if(ET)return Pw;ET=1;function r(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}return Pw=r,Pw}var Kw,OT;function Wse(){if(OT)return Kw;OT=1;var r=Zv(),t=ej(),e=Jv(),n=JU(),i=Nse(),o=Gse(),s=1,a=2,f="[object Boolean]",g="[object Date]",b="[object Error]",I="[object Map]",S="[object Number]",B="[object RegExp]",P="[object Set]",U="[object String]",j="[object Symbol]",q="[object ArrayBuffer]",W="[object DataView]",ee=r?r.prototype:void 0,J=ee?ee.valueOf:void 0;function $(X,G,ae,ge,he,Ie,re){switch(ae){case W:if(X.byteLength!=G.byteLength||X.byteOffset!=G.byteOffset)return!1;X=X.buffer,G=G.buffer;case q:return!(X.byteLength!=G.byteLength||!Ie(new t(X),new t(G)));case f:case g:case S:return e(+X,+G);case b:return X.name==G.name&&X.message==G.message;case B:case U:return X==G+"";case I:var oe=i;case P:var Se=ge&s;if(oe||(oe=o),X.size!=G.size&&!Se)return!1;var ye=re.get(X);if(ye)return ye==G;ge|=a,re.set(X,G);var nt=n(oe(X),oe(G),ge,he,Ie,re);return re.delete(X),nt;case j:if(J)return J.call(X)==J.call(G)}return!1}return Kw=$,Kw}var Rw,BT;function tj(){if(BT)return Rw;BT=1;function r(t,e){for(var n=-1,i=e.length,o=t.length;++n<i;)t[o+n]=e[n];return t}return Rw=r,Rw}var Dw,IT;function nj(){if(IT)return Dw;IT=1;var r=tj(),t=Lh();function e(n,i,o){var s=i(n);return t(n)?s:r(s,o(n))}return Dw=e,Dw}var Lw,kT;function Qse(){if(kT)return Lw;kT=1;function r(t,e){for(var n=-1,i=t==null?0:t.length,o=0,s=[];++n<i;){var a=t[n];e(a,n,t)&&(s[o++]=a)}return s}return Lw=r,Lw}var Fw,TT;function rj(){if(TT)return Fw;TT=1;function r(){return[]}return Fw=r,Fw}var Uw,PT;function FO(){if(PT)return Uw;PT=1;var r=Qse(),t=rj(),e=Object.prototype,n=e.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(s){return s==null?[]:(s=Object(s),r(i(s),function(a){return n.call(s,a)}))}:t;return Uw=o,Uw}var jw,KT;function ij(){if(KT)return jw;KT=1;var r=nj(),t=FO(),e=Xv();function n(i){return r(i,e,t)}return jw=n,jw}var zw,RT;function qse(){if(RT)return zw;RT=1;var r=ij(),t=1,e=Object.prototype,n=e.hasOwnProperty;function i(o,s,a,f,g,b){var I=a&t,S=r(o),B=S.length,P=r(s),U=P.length;if(B!=U&&!I)return!1;for(var j=B;j--;){var q=S[j];if(!(I?q in s:n.call(s,q)))return!1}var W=b.get(o),ee=b.get(s);if(W&&ee)return W==s&&ee==o;var J=!0;b.set(o,s),b.set(s,o);for(var $=I;++j<B;){q=S[j];var X=o[q],G=s[q];if(f)var ae=I?f(G,X,q,s,o,b):f(X,G,q,o,s,b);if(!(ae===void 0?X===G||g(X,G,a,f,b):ae)){J=!1;break}$||($=q=="constructor")}if(J&&!$){var ge=o.constructor,he=s.constructor;ge!=he&&"constructor"in o&&"constructor"in s&&!(typeof ge=="function"&&ge instanceof ge&&typeof he=="function"&&he instanceof he)&&(J=!1)}return b.delete(o),b.delete(s),J}return zw=i,zw}var Nw,DT;function Yse(){if(DT)return Nw;DT=1;var r=hg(),t=$f(),e=r(t,"DataView");return Nw=e,Nw}var Gw,LT;function $se(){if(LT)return Gw;LT=1;var r=hg(),t=$f(),e=r(t,"Promise");return Gw=e,Gw}var Ww,FT;function Vse(){if(FT)return Ww;FT=1;var r=hg(),t=$f(),e=r(t,"Set");return Ww=e,Ww}var Qw,UT;function Hse(){if(UT)return Qw;UT=1;var r=hg(),t=$f(),e=r(t,"WeakMap");return Qw=e,Qw}var qw,jT;function F2(){if(jT)return qw;jT=1;var r=Yse(),t=DO(),e=$se(),n=Vse(),i=Hse(),o=dg(),s=XU(),a="[object Map]",f="[object Object]",g="[object Promise]",b="[object Set]",I="[object WeakMap]",S="[object DataView]",B=s(r),P=s(t),U=s(e),j=s(n),q=s(i),W=o;return(r&&W(new r(new ArrayBuffer(1)))!=S||t&&W(new t)!=a||e&&W(e.resolve())!=g||n&&W(new n)!=b||i&&W(new i)!=I)&&(W=function(ee){var J=o(ee),$=J==f?ee.constructor:void 0,X=$?s($):"";if(X)switch(X){case B:return S;case P:return a;case U:return g;case j:return b;case q:return I}return J}),qw=W,qw}var Yw,zT;function Zse(){if(zT)return Yw;zT=1;var r=L2(),t=JU(),e=Wse(),n=qse(),i=F2(),o=Lh(),s=k2(),a=kO(),f=1,g="[object Arguments]",b="[object Array]",I="[object Object]",S=Object.prototype,B=S.hasOwnProperty;function P(U,j,q,W,ee,J){var $=o(U),X=o(j),G=$?b:i(U),ae=X?b:i(j);G=G==g?I:G,ae=ae==g?I:ae;var ge=G==I,he=ae==I,Ie=G==ae;if(Ie&&s(U)){if(!s(j))return!1;$=!0,ge=!1}if(Ie&&!ge)return J||(J=new r),$||a(U)?t(U,j,q,W,ee,J):e(U,j,G,q,W,ee,J);if(!(q&f)){var re=ge&&B.call(U,"__wrapped__"),oe=he&&B.call(j,"__wrapped__");if(re||oe){var Se=re?U.value():U,ye=oe?j.value():j;return J||(J=new r),ee(Se,ye,q,W,J)}}return Ie?(J||(J=new r),n(U,j,q,W,ee,J)):!1}return Yw=P,Yw}var $w,NT;function oj(){if(NT)return $w;NT=1;var r=Zse(),t=Rp();function e(n,i,o,s,a){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:r(n,i,o,s,e,a)}return $w=e,$w}var Vw,GT;function Xse(){if(GT)return Vw;GT=1;var r=L2(),t=oj(),e=1,n=2;function i(o,s,a,f){var g=a.length,b=g,I=!f;if(o==null)return!b;for(o=Object(o);g--;){var S=a[g];if(I&&S[2]?S[1]!==o[S[0]]:!(S[0]in o))return!1}for(;++g<b;){S=a[g];var B=S[0],P=o[B],U=S[1];if(I&&S[2]){if(P===void 0&&!(B in o))return!1}else{var j=new r;if(f)var q=f(P,U,B,o,s,j);if(!(q===void 0?t(U,P,e|n,f,j):q))return!1}}return!0}return Vw=i,Vw}var Hw,WT;function aj(){if(WT)return Hw;WT=1;var r=mf();function t(e){return e===e&&!r(e)}return Hw=t,Hw}var Zw,QT;function Jse(){if(QT)return Zw;QT=1;var r=aj(),t=Xv();function e(n){for(var i=t(n),o=i.length;o--;){var s=i[o],a=n[s];i[o]=[s,a,r(a)]}return i}return Zw=e,Zw}var Xw,qT;function sj(){if(qT)return Xw;qT=1;function r(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}return Xw=r,Xw}var Jw,YT;function ele(){if(YT)return Jw;YT=1;var r=Xse(),t=Jse(),e=sj();function n(i){var o=t(i);return o.length==1&&o[0][2]?e(o[0][0],o[0][1]):function(s){return s===i||r(s,i,o)}}return Jw=n,Jw}var e5,$T;function U2(){if($T)return e5;$T=1;var r=dg(),t=Rp(),e="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&r(i)==e}return e5=n,e5}var t5,VT;function UO(){if(VT)return t5;VT=1;var r=Lh(),t=U2(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,s){if(r(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||t(o)?!0:n.test(o)||!e.test(o)||s!=null&&o in Object(s)}return t5=i,t5}var n5,HT;function tle(){if(HT)return n5;HT=1;var r=LO(),t="Expected a function";function e(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var s=arguments,a=i?i.apply(this,s):s[0],f=o.cache;if(f.has(a))return f.get(a);var g=n.apply(this,s);return o.cache=f.set(a,g)||f,g};return o.cache=new(e.Cache||r),o}return e.Cache=r,n5=e,n5}var r5,ZT;function nle(){if(ZT)return r5;ZT=1;var r=tle(),t=500;function e(n){var i=r(n,function(s){return o.size===t&&o.clear(),s}),o=i.cache;return i}return r5=e,r5}var i5,XT;function rle(){if(XT)return i5;XT=1;var r=nle(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,n=r(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(s,a,f,g){o.push(f?g.replace(e,"$1"):a||s)}),o});return i5=n,i5}var o5,JT;function ile(){if(JT)return o5;JT=1;var r=Zv(),t=ZU(),e=Lh(),n=U2(),i=r?r.prototype:void 0,o=i?i.toString:void 0;function s(a){if(typeof a=="string")return a;if(e(a))return t(a,s)+"";if(n(a))return o?o.call(a):"";var f=a+"";return f=="0"&&1/a==-1/0?"-0":f}return o5=s,o5}var a5,e9;function ole(){if(e9)return a5;e9=1;var r=ile();function t(e){return e==null?"":r(e)}return a5=t,a5}var s5,t9;function lj(){if(t9)return s5;t9=1;var r=Lh(),t=UO(),e=rle(),n=ole();function i(o,s){return r(o)?o:t(o,s)?[o]:e(n(o))}return s5=i,s5}var l5,n9;function j2(){if(n9)return l5;n9=1;var r=U2();function t(e){if(typeof e=="string"||r(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}return l5=t,l5}var u5,r9;function uj(){if(r9)return u5;r9=1;var r=lj(),t=j2();function e(n,i){i=r(i,n);for(var o=0,s=i.length;n!=null&&o<s;)n=n[t(i[o++])];return o&&o==s?n:void 0}return u5=e,u5}var A5,i9;function ale(){if(i9)return A5;i9=1;var r=uj();function t(e,n,i){var o=e==null?void 0:r(e,n);return o===void 0?i:o}return A5=t,A5}var c5,o9;function sle(){if(o9)return c5;o9=1;function r(t,e){return t!=null&&e in Object(t)}return c5=r,c5}var d5,a9;function lle(){if(a9)return d5;a9=1;var r=lj(),t=SO(),e=Lh(),n=EO(),i=OO(),o=j2();function s(a,f,g){f=r(f,a);for(var b=-1,I=f.length,S=!1;++b<I;){var B=o(f[b]);if(!(S=a!=null&&g(a,B)))break;a=a[B]}return S||++b!=I?S:(I=a==null?0:a.length,!!I&&i(I)&&n(B,I)&&(e(a)||t(a)))}return d5=s,d5}var h5,s9;function ule(){if(s9)return h5;s9=1;var r=sle(),t=lle();function e(n,i){return n!=null&&t(n,i,r)}return h5=e,h5}var f5,l9;function Ale(){if(l9)return f5;l9=1;var r=oj(),t=ale(),e=ule(),n=UO(),i=aj(),o=sj(),s=j2(),a=1,f=2;function g(b,I){return n(b)&&i(I)?o(s(b),I):function(S){var B=t(S,b);return B===void 0&&B===I?e(S,b):r(I,B,a|f)}}return f5=g,f5}var p5,u9;function cle(){if(u9)return p5;u9=1;function r(t){return function(e){return e==null?void 0:e[t]}}return p5=r,p5}var m5,A9;function dle(){if(A9)return m5;A9=1;var r=uj();function t(e){return function(n){return r(n,e)}}return m5=t,m5}var g5,c9;function hle(){if(c9)return g5;c9=1;var r=cle(),t=dle(),e=UO(),n=j2();function i(o){return e(o)?r(n(o)):t(o)}return g5=i,g5}var y5,d9;function fle(){if(d9)return y5;d9=1;var r=ele(),t=Ale(),e=T2(),n=Lh(),i=hle();function o(s){return typeof s=="function"?s:s==null?e:typeof s=="object"?n(s)?t(s[0],s[1]):r(s):i(s)}return y5=o,y5}var v5,h9;function ple(){if(h9)return v5;h9=1;var r=ey();function t(e,n){return function(i,o){if(i==null)return i;if(!r(i))return e(i,o);for(var s=i.length,a=n?s:-1,f=Object(i);(n?a--:++a<s)&&o(f[a],a,f)!==!1;);return i}}return v5=t,v5}var _5,f9;function Aj(){if(f9)return _5;f9=1;var r=$U(),t=ple(),e=t(r);return _5=e,_5}var C5,p9;function mle(){if(p9)return C5;p9=1;var r=Aj(),t=ey();function e(n,i){var o=-1,s=t(n)?Array(n.length):[];return r(n,function(a,f,g){s[++o]=i(a,f,g)}),s}return C5=e,C5}var b5,m9;function gle(){if(m9)return b5;m9=1;var r=ZU(),t=fle(),e=mle(),n=Lh();function i(o,s){var a=n(o)?r:e;return a(o,t(s,3))}return b5=i,b5}var g9;function yle(){if(g9)return Rg;g9=1,Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.flattenNames=void 0;var r=rse(),t=f(r),e=KO(),n=f(e),i=HU(),o=f(i),s=gle(),a=f(s);function f(b){return b&&b.__esModule?b:{default:b}}var g=Rg.flattenNames=function b(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=[];return(0,a.default)(I,function(B){Array.isArray(B)?b(B).map(function(P){return S.push(P)}):(0,o.default)(B)?(0,n.default)(B,function(P,U){P===!0&&S.push(U),S.push(U+"-"+P)}):(0,t.default)(B)&&S.push(B)}),S};return Rg.default=g,Rg}var Dg={},x5,y9;function cj(){if(y9)return x5;y9=1;function r(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}return x5=r,x5}var w5,v9;function dj(){if(v9)return w5;v9=1;var r=hg(),t=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch{}}();return w5=t,w5}var M5,_9;function jO(){if(_9)return M5;_9=1;var r=dj();function t(e,n,i){n=="__proto__"&&r?r(e,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[n]=i}return M5=t,M5}var S5,C9;function hj(){if(C9)return S5;C9=1;var r=jO(),t=Jv(),e=Object.prototype,n=e.hasOwnProperty;function i(o,s,a){var f=o[s];(!(n.call(o,s)&&t(f,a))||a===void 0&&!(s in o))&&r(o,s,a)}return S5=i,S5}var E5,b9;function e_(){if(b9)return E5;b9=1;var r=hj(),t=jO();function e(n,i,o,s){var a=!o;o||(o={});for(var f=-1,g=i.length;++f<g;){var b=i[f],I=s?s(o[b],n[b],b,o,n):void 0;I===void 0&&(I=n[b]),a?t(o,b,I):r(o,b,I)}return o}return E5=e,E5}var O5,x9;function vle(){if(x9)return O5;x9=1;var r=e_(),t=Xv();function e(n,i){return n&&r(i,t(i),n)}return O5=e,O5}var B5,w9;function _le(){if(w9)return B5;w9=1;function r(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}return B5=r,B5}var I5,M9;function Cle(){if(M9)return I5;M9=1;var r=mf(),t=TO(),e=_le(),n=Object.prototype,i=n.hasOwnProperty;function o(s){if(!r(s))return e(s);var a=t(s),f=[];for(var g in s)g=="constructor"&&(a||!i.call(s,g))||f.push(g);return f}return I5=o,I5}var k5,S9;function t_(){if(S9)return k5;S9=1;var r=qU(),t=Cle(),e=ey();function n(i){return e(i)?r(i,!0):t(i)}return k5=n,k5}var T5,E9;function ble(){if(E9)return T5;E9=1;var r=e_(),t=t_();function e(n,i){return n&&r(i,t(i),n)}return T5=e,T5}var Ny={exports:{}};Ny.exports;var O9;function fj(){return O9||(O9=1,function(r,t){var e=$f(),n=t&&!t.nodeType&&t,i=n&&!0&&r&&!r.nodeType&&r,o=i&&i.exports===n,s=o?e.Buffer:void 0,a=s?s.allocUnsafe:void 0;function f(g,b){if(b)return g.slice();var I=g.length,S=a?a(I):new g.constructor(I);return g.copy(S),S}r.exports=f}(Ny,Ny.exports)),Ny.exports}var P5,B9;function pj(){if(B9)return P5;B9=1;function r(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}return P5=r,P5}var K5,I9;function xle(){if(I9)return K5;I9=1;var r=e_(),t=FO();function e(n,i){return r(n,t(n),i)}return K5=e,K5}var R5,k9;function mj(){if(k9)return R5;k9=1;var r=tj(),t=RO(),e=FO(),n=rj(),i=Object.getOwnPropertySymbols,o=i?function(s){for(var a=[];s;)r(a,e(s)),s=t(s);return a}:n;return R5=o,R5}var D5,T9;function wle(){if(T9)return D5;T9=1;var r=e_(),t=mj();function e(n,i){return r(n,t(n),i)}return D5=e,D5}var L5,P9;function Mle(){if(P9)return L5;P9=1;var r=nj(),t=mj(),e=t_();function n(i){return r(i,e,t)}return L5=n,L5}var F5,K9;function Sle(){if(K9)return F5;K9=1;var r=Object.prototype,t=r.hasOwnProperty;function e(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return F5=e,F5}var U5,R9;function zO(){if(R9)return U5;R9=1;var r=ej();function t(e){var n=new e.constructor(e.byteLength);return new r(n).set(new r(e)),n}return U5=t,U5}var j5,D9;function Ele(){if(D9)return j5;D9=1;var r=zO();function t(e,n){var i=n?r(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}return j5=t,j5}var z5,L9;function Ole(){if(L9)return z5;L9=1;var r=/\w*$/;function t(e){var n=new e.constructor(e.source,r.exec(e));return n.lastIndex=e.lastIndex,n}return z5=t,z5}var N5,F9;function Ble(){if(F9)return N5;F9=1;var r=Zv(),t=r?r.prototype:void 0,e=t?t.valueOf:void 0;function n(i){return e?Object(e.call(i)):{}}return N5=n,N5}var G5,U9;function gj(){if(U9)return G5;U9=1;var r=zO();function t(e,n){var i=n?r(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}return G5=t,G5}var W5,j9;function Ile(){if(j9)return W5;j9=1;var r=zO(),t=Ele(),e=Ole(),n=Ble(),i=gj(),o="[object Boolean]",s="[object Date]",a="[object Map]",f="[object Number]",g="[object RegExp]",b="[object Set]",I="[object String]",S="[object Symbol]",B="[object ArrayBuffer]",P="[object DataView]",U="[object Float32Array]",j="[object Float64Array]",q="[object Int8Array]",W="[object Int16Array]",ee="[object Int32Array]",J="[object Uint8Array]",$="[object Uint8ClampedArray]",X="[object Uint16Array]",G="[object Uint32Array]";function ae(ge,he,Ie){var re=ge.constructor;switch(he){case B:return r(ge);case o:case s:return new re(+ge);case P:return t(ge,Ie);case U:case j:case q:case W:case ee:case J:case $:case X:case G:return i(ge,Ie);case a:return new re;case f:case I:return new re(ge);case g:return e(ge);case b:return new re;case S:return n(ge)}}return W5=ae,W5}var Q5,z9;function kle(){if(z9)return Q5;z9=1;var r=mf(),t=Object.create,e=function(){function n(){}return function(i){if(!r(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}}();return Q5=e,Q5}var q5,N9;function yj(){if(N9)return q5;N9=1;var r=kle(),t=RO(),e=TO();function n(i){return typeof i.constructor=="function"&&!e(i)?r(t(i)):{}}return q5=n,q5}var Y5,G9;function Tle(){if(G9)return Y5;G9=1;var r=F2(),t=Rp(),e="[object Map]";function n(i){return t(i)&&r(i)==e}return Y5=n,Y5}var $5,W9;function Ple(){if(W9)return $5;W9=1;var r=Tle(),t=BO(),e=IO(),n=e&&e.isMap,i=n?t(n):r;return $5=i,$5}var V5,Q9;function Kle(){if(Q9)return V5;Q9=1;var r=F2(),t=Rp(),e="[object Set]";function n(i){return t(i)&&r(i)==e}return V5=n,V5}var H5,q9;function Rle(){if(q9)return H5;q9=1;var r=Kle(),t=BO(),e=IO(),n=e&&e.isSet,i=n?t(n):r;return H5=i,H5}var Z5,Y9;function Dle(){if(Y9)return Z5;Y9=1;var r=L2(),t=cj(),e=hj(),n=vle(),i=ble(),o=fj(),s=pj(),a=xle(),f=wle(),g=ij(),b=Mle(),I=F2(),S=Sle(),B=Ile(),P=yj(),U=Lh(),j=k2(),q=Ple(),W=mf(),ee=Rle(),J=Xv(),$=t_(),X=1,G=2,ae=4,ge="[object Arguments]",he="[object Array]",Ie="[object Boolean]",re="[object Date]",oe="[object Error]",Se="[object Function]",ye="[object GeneratorFunction]",nt="[object Map]",Ne="[object Number]",je="[object Object]",et="[object RegExp]",Ue="[object Set]",ke="[object String]",We="[object Symbol]",vt="[object WeakMap]",Pt="[object ArrayBuffer]",ut="[object DataView]",jt="[object Float32Array]",Rt="[object Float64Array]",Ke="[object Int8Array]",we="[object Int16Array]",Fe="[object Int32Array]",tt="[object Uint8Array]",mt="[object Uint8ClampedArray]",bt="[object Uint16Array]",Lt="[object Uint32Array]",Vt={};Vt[ge]=Vt[he]=Vt[Pt]=Vt[ut]=Vt[Ie]=Vt[re]=Vt[jt]=Vt[Rt]=Vt[Ke]=Vt[we]=Vt[Fe]=Vt[nt]=Vt[Ne]=Vt[je]=Vt[et]=Vt[Ue]=Vt[ke]=Vt[We]=Vt[tt]=Vt[mt]=Vt[bt]=Vt[Lt]=!0,Vt[oe]=Vt[Se]=Vt[vt]=!1;function rn(Sn,Ar,Bn,ar,Cr,br){var _r,Jr=Ar&X,wr=Ar&G,hi=Ar&ae;if(Bn&&(_r=Cr?Bn(Sn,ar,Cr,br):Bn(Sn)),_r!==void 0)return _r;if(!W(Sn))return Sn;var Ye=U(Sn);if(Ye){if(_r=S(Sn),!Jr)return s(Sn,_r)}else{var de=I(Sn),pe=de==Se||de==ye;if(j(Sn))return o(Sn,Jr);if(de==je||de==ge||pe&&!Cr){if(_r=wr||pe?{}:P(Sn),!Jr)return wr?f(Sn,i(_r,Sn)):a(Sn,n(_r,Sn))}else{if(!Vt[de])return Cr?Sn:{};_r=B(Sn,de,Jr)}}br||(br=new r);var Je=br.get(Sn);if(Je)return Je;br.set(Sn,_r),ee(Sn)?Sn.forEach(function(it){_r.add(rn(it,Ar,Bn,it,Sn,br))}):q(Sn)&&Sn.forEach(function(it,Ut){_r.set(Ut,rn(it,Ar,Bn,Ut,Sn,br))});var kt=hi?wr?b:g:wr?$:J,Xt=Ye?void 0:kt(Sn);return t(Xt||Sn,function(it,Ut){Xt&&(Ut=it,it=Sn[Ut]),e(_r,Ut,rn(it,Ar,Bn,Ut,Sn,br))}),_r}return Z5=rn,Z5}var X5,$9;function Lle(){if($9)return X5;$9=1;var r=Dle(),t=1,e=4;function n(i){return r(i,t|e)}return X5=n,X5}var V9;function Fle(){if(V9)return Dg;V9=1,Object.defineProperty(Dg,"__esModule",{value:!0}),Dg.mergeClasses=void 0;var r=KO(),t=o(r),e=Lle(),n=o(e),i=Object.assign||function(a){for(var f=1;f<arguments.length;f++){var g=arguments[f];for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(a[b]=g[b])}return a};function o(a){return a&&a.__esModule?a:{default:a}}var s=Dg.mergeClasses=function(f){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=f.default&&(0,n.default)(f.default)||{};return g.map(function(I){var S=f[I];return S&&(0,t.default)(S,function(B,P){b[P]||(b[P]={}),b[P]=i({},b[P],S[P])}),I}),b};return Dg.default=s,Dg}var Lg={},H9;function Ule(){if(H9)return Lg;H9=1,Object.defineProperty(Lg,"__esModule",{value:!0}),Lg.autoprefix=void 0;var r=KO(),t=n(r),e=Object.assign||function(s){for(var a=1;a<arguments.length;a++){var f=arguments[a];for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(s[g]=f[g])}return s};function n(s){return s&&s.__esModule?s:{default:s}}var i={borderRadius:function(a){return{msBorderRadius:a,MozBorderRadius:a,OBorderRadius:a,WebkitBorderRadius:a,borderRadius:a}},boxShadow:function(a){return{msBoxShadow:a,MozBoxShadow:a,OBoxShadow:a,WebkitBoxShadow:a,boxShadow:a}},userSelect:function(a){return{WebkitTouchCallout:a,KhtmlUserSelect:a,MozUserSelect:a,msUserSelect:a,WebkitUserSelect:a,userSelect:a}},flex:function(a){return{WebkitBoxFlex:a,MozBoxFlex:a,WebkitFlex:a,msFlex:a,flex:a}},flexBasis:function(a){return{WebkitFlexBasis:a,flexBasis:a}},justifyContent:function(a){return{WebkitJustifyContent:a,justifyContent:a}},transition:function(a){return{msTransition:a,MozTransition:a,OTransition:a,WebkitTransition:a,transition:a}},transform:function(a){return{msTransform:a,MozTransform:a,OTransform:a,WebkitTransform:a,transform:a}},absolute:function(a){var f=a&&a.split(" ");return{position:"absolute",top:f&&f[0],right:f&&f[1],bottom:f&&f[2],left:f&&f[3]}},extend:function(a,f){var g=f[a];return g||{extend:a}}},o=Lg.autoprefix=function(a){var f={};return(0,t.default)(a,function(g,b){var I={};(0,t.default)(g,function(S,B){var P=i[B];P?I=e({},I,P(S)):I[B]=S}),f[b]=I}),f};return Lg.default=o,Lg}var Fg={},Z9;function jle(){if(Z9)return Fg;Z9=1,Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.hover=void 0;var r=Object.assign||function(f){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var I in b)Object.prototype.hasOwnProperty.call(b,I)&&(f[I]=b[I])}return f},t=Ts(),e=n(t);function n(f){return f&&f.__esModule?f:{default:f}}function i(f,g){if(!(f instanceof g))throw new TypeError("Cannot call a class as a function")}function o(f,g){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:f}function s(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);f.prototype=Object.create(g&&g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(f,g):f.__proto__=g)}var a=Fg.hover=function(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(I){s(S,I);function S(){var B,P,U,j;i(this,S);for(var q=arguments.length,W=Array(q),ee=0;ee<q;ee++)W[ee]=arguments[ee];return j=(P=(U=o(this,(B=S.__proto__||Object.getPrototypeOf(S)).call.apply(B,[this].concat(W))),U),U.state={hover:!1},U.handleMouseOver=function(){return U.setState({hover:!0})},U.handleMouseOut=function(){return U.setState({hover:!1})},U.render=function(){return e.default.createElement(b,{onMouseOver:U.handleMouseOver,onMouseOut:U.handleMouseOut},e.default.createElement(g,r({},U.props,U.state)))},P),o(U,j)}return S}(e.default.Component)};return Fg.default=a,Fg}var Ug={},X9;function zle(){if(X9)return Ug;X9=1,Object.defineProperty(Ug,"__esModule",{value:!0}),Ug.active=void 0;var r=Object.assign||function(f){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var I in b)Object.prototype.hasOwnProperty.call(b,I)&&(f[I]=b[I])}return f},t=Ts(),e=n(t);function n(f){return f&&f.__esModule?f:{default:f}}function i(f,g){if(!(f instanceof g))throw new TypeError("Cannot call a class as a function")}function o(f,g){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:f}function s(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);f.prototype=Object.create(g&&g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(f,g):f.__proto__=g)}var a=Ug.active=function(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(I){s(S,I);function S(){var B,P,U,j;i(this,S);for(var q=arguments.length,W=Array(q),ee=0;ee<q;ee++)W[ee]=arguments[ee];return j=(P=(U=o(this,(B=S.__proto__||Object.getPrototypeOf(S)).call.apply(B,[this].concat(W))),U),U.state={active:!1},U.handleMouseDown=function(){return U.setState({active:!0})},U.handleMouseUp=function(){return U.setState({active:!1})},U.render=function(){return e.default.createElement(b,{onMouseDown:U.handleMouseDown,onMouseUp:U.handleMouseUp},e.default.createElement(g,r({},U.props,U.state)))},P),o(U,j)}return S}(e.default.Component)};return Ug.default=a,Ug}var rC={},J9;function Nle(){if(J9)return rC;J9=1,Object.defineProperty(rC,"__esModule",{value:!0});var r=function(e,n){var i={},o=function(a){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i[a]=f};return e===0&&o("first-child"),e===n-1&&o("last-child"),(e===0||e%2===0)&&o("even"),Math.abs(e%2)===1&&o("odd"),o("nth-child",e),i};return rC.default=r,rC}var eP;function Vf(){if(eP)return rh;eP=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.ReactCSS=rh.loop=rh.handleActive=rh.handleHover=rh.hover=void 0;var r=yle(),t=S(r),e=Fle(),n=S(e),i=Ule(),o=S(i),s=jle(),a=S(s),f=zle(),g=S(f),b=Nle(),I=S(b);function S(P){return P&&P.__esModule?P:{default:P}}rh.hover=a.default,rh.handleHover=a.default,rh.handleActive=g.default,rh.loop=I.default;var B=rh.ReactCSS=function(U){for(var j=arguments.length,q=Array(j>1?j-1:0),W=1;W<j;W++)q[W-1]=arguments[W];var ee=(0,t.default)(q),J=(0,n.default)(U,ee);return(0,o.default)(J)};return rh.default=B,rh}var J5,tP;function vj(){if(tP)return J5;tP=1;var r=jO(),t=Jv();function e(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&r(n,i,o)}return J5=e,J5}var eM,nP;function Gle(){if(nP)return eM;nP=1;var r=ey(),t=Rp();function e(n){return t(n)&&r(n)}return eM=e,eM}var tM,rP;function _j(){if(rP)return tM;rP=1;function r(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}return tM=r,tM}var nM,iP;function Wle(){if(iP)return nM;iP=1;var r=e_(),t=t_();function e(n){return r(n,t(n))}return nM=e,nM}var rM,oP;function Qle(){if(oP)return rM;oP=1;var r=vj(),t=fj(),e=gj(),n=pj(),i=yj(),o=SO(),s=Lh(),a=Gle(),f=k2(),g=PO(),b=mf(),I=HU(),S=kO(),B=_j(),P=Wle();function U(j,q,W,ee,J,$,X){var G=B(j,W),ae=B(q,W),ge=X.get(ae);if(ge){r(j,W,ge);return}var he=$?$(G,ae,W+"",j,q,X):void 0,Ie=he===void 0;if(Ie){var re=s(ae),oe=!re&&f(ae),Se=!re&&!oe&&S(ae);he=ae,re||oe||Se?s(G)?he=G:a(G)?he=n(G):oe?(Ie=!1,he=t(ae,!0)):Se?(Ie=!1,he=e(ae,!0)):he=[]:I(ae)||o(ae)?(he=G,o(G)?he=P(G):(!b(G)||g(G))&&(he=i(ae))):Ie=!1}Ie&&(X.set(ae,he),J(he,ae,ee,$,X),X.delete(ae)),r(j,W,he)}return rM=U,rM}var iM,aP;function qle(){if(aP)return iM;aP=1;var r=L2(),t=vj(),e=QU(),n=Qle(),i=mf(),o=t_(),s=_j();function a(f,g,b,I,S){f!==g&&e(g,function(B,P){if(S||(S=new r),i(B))n(f,g,P,b,a,I,S);else{var U=I?I(s(f,P),B,P+"",f,g,S):void 0;U===void 0&&(U=B),t(f,P,U)}},o)}return iM=a,iM}var oM,sP;function Yle(){if(sP)return oM;sP=1;function r(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}return oM=r,oM}var aM,lP;function $le(){if(lP)return aM;lP=1;var r=Yle(),t=Math.max;function e(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var s=arguments,a=-1,f=t(s.length-i,0),g=Array(f);++a<f;)g[a]=s[i+a];a=-1;for(var b=Array(i+1);++a<i;)b[a]=s[a];return b[i]=o(g),r(n,this,b)}}return aM=e,aM}var sM,uP;function Vle(){if(uP)return sM;uP=1;function r(t){return function(){return t}}return sM=r,sM}var lM,AP;function Hle(){if(AP)return lM;AP=1;var r=Vle(),t=dj(),e=T2(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:r(o),writable:!0})}:e;return lM=n,lM}var uM,cP;function Zle(){if(cP)return uM;cP=1;var r=800,t=16,e=Date.now;function n(i){var o=0,s=0;return function(){var a=e(),f=t-(a-s);if(s=a,f>0){if(++o>=r)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return uM=n,uM}var AM,dP;function Xle(){if(dP)return AM;dP=1;var r=Hle(),t=Zle(),e=t(r);return AM=e,AM}var cM,hP;function Jle(){if(hP)return cM;hP=1;var r=T2(),t=$le(),e=Xle();function n(i,o){return e(t(i,o,r),i+"")}return cM=n,cM}var dM,fP;function eue(){if(fP)return dM;fP=1;var r=Jv(),t=ey(),e=EO(),n=mf();function i(o,s,a){if(!n(a))return!1;var f=typeof s;return(f=="number"?t(a)&&e(s,a.length):f=="string"&&s in a)?r(a[s],o):!1}return dM=i,dM}var hM,pP;function tue(){if(pP)return hM;pP=1;var r=Jle(),t=eue();function e(n){return r(function(i,o){var s=-1,a=o.length,f=a>1?o[a-1]:void 0,g=a>2?o[2]:void 0;for(f=n.length>3&&typeof f=="function"?(a--,f):void 0,g&&t(o[0],o[1],g)&&(f=a<3?void 0:f,a=1),i=Object(i);++s<a;){var b=o[s];b&&n(i,b,s,f)}return i})}return hM=e,hM}var fM,mP;function Cj(){if(mP)return fM;mP=1;var r=qle(),t=tue(),e=t(function(n,i,o){r(n,i,o)});return fM=e,fM}var pM={},jg={},iC={},gP;function nue(){return gP||(gP=1,Object.defineProperty(iC,"__esModule",{value:!0}),iC.calculateChange=function(t,e,n,i,o){var s=o.clientWidth,a=o.clientHeight,f=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,g=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,b=f-(o.getBoundingClientRect().left+window.pageXOffset),I=g-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var S=void 0;if(I<0?S=0:I>a?S=1:S=Math.round(I*100/a)/100,e.a!==S)return{h:e.h,s:e.s,l:e.l,a:S,source:"rgb"}}else{var B=void 0;if(b<0?B=0:b>s?B=1:B=Math.round(b*100/s)/100,i!==B)return{h:e.h,s:e.s,l:e.l,a:B,source:"rgb"}}return null}),iC}var zg={},My={},yP;function rue(){if(yP)return My;yP=1,Object.defineProperty(My,"__esModule",{value:!0});var r={},t=My.render=function(n,i,o,s){if(typeof document>"u"&&!s)return null;var a=s?new s:document.createElement("canvas");a.width=o*2,a.height=o*2;var f=a.getContext("2d");return f?(f.fillStyle=n,f.fillRect(0,0,a.width,a.height),f.fillStyle=i,f.fillRect(0,0,o,o),f.translate(o,o),f.fillRect(0,0,o,o),a.toDataURL()):null};return My.get=function(n,i,o,s){var a=n+"-"+i+"-"+o+(s?"-server":"");if(r[a])return r[a];var f=t(n,i,o,s);return r[a]=f,f},My}var vP;function NO(){if(vP)return zg;vP=1,Object.defineProperty(zg,"__esModule",{value:!0}),zg.Checkboard=void 0;var r=Object.assign||function(b){for(var I=1;I<arguments.length;I++){var S=arguments[I];for(var B in S)Object.prototype.hasOwnProperty.call(S,B)&&(b[B]=S[B])}return b},t=Ts(),e=f(t),n=Vf(),i=f(n),o=rue(),s=a(o);function a(b){if(b&&b.__esModule)return b;var I={};if(b!=null)for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(I[S]=b[S]);return I.default=b,I}function f(b){return b&&b.__esModule?b:{default:b}}var g=zg.Checkboard=function(I){var S=I.white,B=I.grey,P=I.size,U=I.renderers,j=I.borderRadius,q=I.boxShadow,W=I.children,ee=(0,i.default)({default:{grid:{borderRadius:j,boxShadow:q,absolute:"0px 0px 0px 0px",background:"url("+s.get(S,B,P,U.canvas)+") center left"}}});return(0,t.isValidElement)(W)?e.default.cloneElement(W,r({},W.props,{style:r({},W.props.style,ee.grid)})):e.default.createElement("div",{style:ee.grid})};return g.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},zg.default=g,zg}var _P;function iue(){if(_P)return jg;_P=1,Object.defineProperty(jg,"__esModule",{value:!0}),jg.Alpha=void 0;var r=Object.assign||function(j){for(var q=1;q<arguments.length;q++){var W=arguments[q];for(var ee in W)Object.prototype.hasOwnProperty.call(W,ee)&&(j[ee]=W[ee])}return j},t=function(){function j(q,W){for(var ee=0;ee<W.length;ee++){var J=W[ee];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(q,J.key,J)}}return function(q,W,ee){return W&&j(q.prototype,W),ee&&j(q,ee),q}}(),e=Ts(),n=I(e),i=Vf(),o=I(i),s=nue(),a=b(s),f=NO(),g=I(f);function b(j){if(j&&j.__esModule)return j;var q={};if(j!=null)for(var W in j)Object.prototype.hasOwnProperty.call(j,W)&&(q[W]=j[W]);return q.default=j,q}function I(j){return j&&j.__esModule?j:{default:j}}function S(j,q){if(!(j instanceof q))throw new TypeError("Cannot call a class as a function")}function B(j,q){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:j}function P(j,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);j.prototype=Object.create(q&&q.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(j,q):j.__proto__=q)}var U=jg.Alpha=function(j){P(q,j);function q(){var W,ee,J,$;S(this,q);for(var X=arguments.length,G=Array(X),ae=0;ae<X;ae++)G[ae]=arguments[ae];return $=(ee=(J=B(this,(W=q.__proto__||Object.getPrototypeOf(q)).call.apply(W,[this].concat(G))),J),J.handleChange=function(ge){var he=a.calculateChange(ge,J.props.hsl,J.props.direction,J.props.a,J.container);he&&typeof J.props.onChange=="function"&&J.props.onChange(he,ge)},J.handleMouseDown=function(ge){J.handleChange(ge),window.addEventListener("mousemove",J.handleChange),window.addEventListener("mouseup",J.handleMouseUp)},J.handleMouseUp=function(){J.unbindEventListeners()},J.unbindEventListeners=function(){window.removeEventListener("mousemove",J.handleChange),window.removeEventListener("mouseup",J.handleMouseUp)},ee),B(J,$)}return t(q,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var ee=this,J=this.props.rgb,$=(0,o.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("+J.r+","+J.g+","+J.b+`, 0) 0%,
|
||
rgba(`+J.r+","+J.g+","+J.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:J.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("+J.r+","+J.g+","+J.b+`, 0) 0%,
|
||
rgba(`+J.r+","+J.g+","+J.b+", 1) 100%)"},pointer:{left:0,top:J.a*100+"%"}},overwrite:r({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return n.default.createElement("div",{style:$.alpha},n.default.createElement("div",{style:$.checkboard},n.default.createElement(g.default,{renderers:this.props.renderers})),n.default.createElement("div",{style:$.gradient}),n.default.createElement("div",{style:$.container,ref:function(G){return ee.container=G},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.default.createElement("div",{style:$.pointer},this.props.pointer?n.default.createElement(this.props.pointer,this.props):n.default.createElement("div",{style:$.slider}))))}}]),q}(e.PureComponent||e.Component);return jg.default=U,jg}var Ng={},CP;function oue(){if(CP)return Ng;CP=1,Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.EditableInput=void 0;var r=function(){function W(ee,J){for(var $=0;$<J.length;$++){var X=J[$];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(ee,X.key,X)}}return function(ee,J,$){return J&&W(ee.prototype,J),$&&W(ee,$),ee}}(),t=Ts(),e=o(t),n=Vf(),i=o(n);function o(W){return W&&W.__esModule?W:{default:W}}function s(W,ee,J){return ee in W?Object.defineProperty(W,ee,{value:J,enumerable:!0,configurable:!0,writable:!0}):W[ee]=J,W}function a(W,ee){if(!(W instanceof ee))throw new TypeError("Cannot call a class as a function")}function f(W,ee){if(!W)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee&&(typeof ee=="object"||typeof ee=="function")?ee:W}function g(W,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ee);W.prototype=Object.create(ee&&ee.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),ee&&(Object.setPrototypeOf?Object.setPrototypeOf(W,ee):W.__proto__=ee)}var b=1,I=38,S=40,B=[I,S],P=function(ee){return B.indexOf(ee)>-1},U=function(ee){return Number(String(ee).replace(/%/g,""))},j=1,q=Ng.EditableInput=function(W){g(ee,W);function ee(J){a(this,ee);var $=f(this,(ee.__proto__||Object.getPrototypeOf(ee)).call(this));return $.handleBlur=function(){$.state.blurValue&&$.setState({value:$.state.blurValue,blurValue:null})},$.handleChange=function(X){$.setUpdatedValue(X.target.value,X)},$.handleKeyDown=function(X){var G=U(X.target.value);if(!isNaN(G)&&P(X.keyCode)){var ae=$.getArrowOffset(),ge=X.keyCode===I?G+ae:G-ae;$.setUpdatedValue(ge,X)}},$.handleDrag=function(X){if($.props.dragLabel){var G=Math.round($.props.value+X.movementX);G>=0&&G<=$.props.dragMax&&$.props.onChange&&$.props.onChange($.getValueObjectWithLabel(G),X)}},$.handleMouseDown=function(X){$.props.dragLabel&&(X.preventDefault(),$.handleDrag(X),window.addEventListener("mousemove",$.handleDrag),window.addEventListener("mouseup",$.handleMouseUp))},$.handleMouseUp=function(){$.unbindEventListeners()},$.unbindEventListeners=function(){window.removeEventListener("mousemove",$.handleDrag),window.removeEventListener("mouseup",$.handleMouseUp)},$.state={value:String(J.value).toUpperCase(),blurValue:String(J.value).toUpperCase()},$.inputId="rc-editable-input-"+j++,$}return r(ee,[{key:"componentDidUpdate",value:function($,X){this.props.value!==this.state.value&&($.value!==this.props.value||X.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($){return s({},this.props.label,$)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||b}},{key:"setUpdatedValue",value:function($,X){var G=this.props.label?this.getValueObjectWithLabel($):$;this.props.onChange&&this.props.onChange(G,X),this.setState({value:$})}},{key:"render",value:function(){var $=this,X=(0,i.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 e.default.createElement("div",{style:X.wrap},e.default.createElement("input",{id:this.inputId,style:X.input,ref:function(ae){return $.input=ae},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?e.default.createElement("label",{htmlFor:this.inputId,style:X.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),ee}(t.PureComponent||t.Component);return Ng.default=q,Ng}var Gg={},oC={},bP;function aue(){return bP||(bP=1,Object.defineProperty(oC,"__esModule",{value:!0}),oC.calculateChange=function(t,e,n,i){var o=i.clientWidth,s=i.clientHeight,a=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,f=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,g=a-(i.getBoundingClientRect().left+window.pageXOffset),b=f-(i.getBoundingClientRect().top+window.pageYOffset);if(e==="vertical"){var I=void 0;if(b<0)I=359;else if(b>s)I=0;else{var S=-(b*100/s)+100;I=360*S/100}if(n.h!==I)return{h:I,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var B=void 0;if(g<0)B=0;else if(g>o)B=359;else{var P=g*100/o;B=360*P/100}if(n.h!==B)return{h:B,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}),oC}var xP;function sue(){if(xP)return Gg;xP=1,Object.defineProperty(Gg,"__esModule",{value:!0}),Gg.Hue=void 0;var r=function(){function B(P,U){for(var j=0;j<U.length;j++){var q=U[j];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,U,j){return U&&B(P.prototype,U),j&&B(P,j),P}}(),t=Ts(),e=f(t),n=Vf(),i=f(n),o=aue(),s=a(o);function a(B){if(B&&B.__esModule)return B;var P={};if(B!=null)for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(P[U]=B[U]);return P.default=B,P}function f(B){return B&&B.__esModule?B:{default:B}}function g(B,P){if(!(B instanceof P))throw new TypeError("Cannot call a class as a function")}function b(B,P){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:B}function I(B,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);B.prototype=Object.create(P&&P.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(B,P):B.__proto__=P)}var S=Gg.Hue=function(B){I(P,B);function P(){var U,j,q,W;g(this,P);for(var ee=arguments.length,J=Array(ee),$=0;$<ee;$++)J[$]=arguments[$];return W=(j=(q=b(this,(U=P.__proto__||Object.getPrototypeOf(P)).call.apply(U,[this].concat(J))),q),q.handleChange=function(X){var G=s.calculateChange(X,q.props.direction,q.props.hsl,q.container);G&&typeof q.props.onChange=="function"&&q.props.onChange(G,X)},q.handleMouseDown=function(X){q.handleChange(X),window.addEventListener("mousemove",q.handleChange),window.addEventListener("mouseup",q.handleMouseUp)},q.handleMouseUp=function(){q.unbindEventListeners()},j),b(q,W)}return r(P,[{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 j=this,q=this.props.direction,W=q===void 0?"horizontal":q,ee=(0,i.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:W==="vertical"});return e.default.createElement("div",{style:ee.hue},e.default.createElement("div",{className:"hue-"+W,style:ee.container,ref:function($){return j.container=$},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.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%);
|
||
}
|
||
`),e.default.createElement("div",{style:ee.pointer},this.props.pointer?e.default.createElement(this.props.pointer,this.props):e.default.createElement("div",{style:ee.slider}))))}}]),P}(t.PureComponent||t.Component);return Gg.default=S,Gg}var Wg={},wP;function lue(){if(wP)return Wg;wP=1,Object.defineProperty(Wg,"__esModule",{value:!0}),Wg.Raised=void 0;var r=Ts(),t=f(r),e=qf(),n=f(e),i=Vf(),o=f(i),s=Cj(),a=f(s);function f(b){return b&&b.__esModule?b:{default:b}}var g=Wg.Raised=function(I){var S=I.zDepth,B=I.radius,P=I.background,U=I.children,j=I.styles,q=j===void 0?{}:j,W=(0,o.default)((0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+S+"px "+S*4+"px rgba(0,0,0,.24)",borderRadius:B,background:P}},"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%"}}},q),{"zDepth-1":S===1});return t.default.createElement("div",{style:W.wrap},t.default.createElement("div",{style:W.bg}),t.default.createElement("div",{style:W.content},U))};return g.propTypes={background:n.default.string,zDepth:n.default.oneOf([0,1,2,3,4,5]),radius:n.default.number,styles:n.default.object},g.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},Wg.default=g,Wg}var Qg={},mM,MP;function uue(){if(MP)return mM;MP=1;var r=$f(),t=function(){return r.Date.now()};return mM=t,mM}var gM,SP;function Aue(){if(SP)return gM;SP=1;var r=/\s/;function t(e){for(var n=e.length;n--&&r.test(e.charAt(n)););return n}return gM=t,gM}var yM,EP;function cue(){if(EP)return yM;EP=1;var r=Aue(),t=/^\s+/;function e(n){return n&&n.slice(0,r(n)+1).replace(t,"")}return yM=e,yM}var vM,OP;function due(){if(OP)return vM;OP=1;var r=cue(),t=mf(),e=U2(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function f(g){if(typeof g=="number")return g;if(e(g))return n;if(t(g)){var b=typeof g.valueOf=="function"?g.valueOf():g;g=t(b)?b+"":b}if(typeof g!="string")return g===0?g:+g;g=r(g);var I=o.test(g);return I||s.test(g)?a(g.slice(2),I?2:8):i.test(g)?n:+g}return vM=f,vM}var _M,BP;function bj(){if(BP)return _M;BP=1;var r=mf(),t=uue(),e=due(),n="Expected a function",i=Math.max,o=Math.min;function s(a,f,g){var b,I,S,B,P,U,j=0,q=!1,W=!1,ee=!0;if(typeof a!="function")throw new TypeError(n);f=e(f)||0,r(g)&&(q=!!g.leading,W="maxWait"in g,S=W?i(e(g.maxWait)||0,f):S,ee="trailing"in g?!!g.trailing:ee);function J(oe){var Se=b,ye=I;return b=I=void 0,j=oe,B=a.apply(ye,Se),B}function $(oe){return j=oe,P=setTimeout(ae,f),q?J(oe):B}function X(oe){var Se=oe-U,ye=oe-j,nt=f-Se;return W?o(nt,S-ye):nt}function G(oe){var Se=oe-U,ye=oe-j;return U===void 0||Se>=f||Se<0||W&&ye>=S}function ae(){var oe=t();if(G(oe))return ge(oe);P=setTimeout(ae,X(oe))}function ge(oe){return P=void 0,ee&&b?J(oe):(b=I=void 0,B)}function he(){P!==void 0&&clearTimeout(P),j=0,b=U=I=P=void 0}function Ie(){return P===void 0?B:ge(t())}function re(){var oe=t(),Se=G(oe);if(b=arguments,I=this,U=oe,Se){if(P===void 0)return $(U);if(W)return clearTimeout(P),P=setTimeout(ae,f),J(U)}return P===void 0&&(P=setTimeout(ae,f)),B}return re.cancel=he,re.flush=Ie,re}return _M=s,_M}var CM,IP;function hue(){if(IP)return CM;IP=1;var r=bj(),t=mf(),e="Expected a function";function n(i,o,s){var a=!0,f=!0;if(typeof i!="function")throw new TypeError(e);return t(s)&&(a="leading"in s?!!s.leading:a,f="trailing"in s?!!s.trailing:f),r(i,o,{leading:a,maxWait:o,trailing:f})}return CM=n,CM}var aC={},kP;function fue(){return kP||(kP=1,Object.defineProperty(aC,"__esModule",{value:!0}),aC.calculateChange=function(t,e,n){var i=n.getBoundingClientRect(),o=i.width,s=i.height,a=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,f=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,g=a-(n.getBoundingClientRect().left+window.pageXOffset),b=f-(n.getBoundingClientRect().top+window.pageYOffset);g<0?g=0:g>o&&(g=o),b<0?b=0:b>s&&(b=s);var I=g/o,S=1-b/s;return{h:e.h,s:I,v:S,a:e.a,source:"hsv"}}),aC}var TP;function pue(){if(TP)return Qg;TP=1,Object.defineProperty(Qg,"__esModule",{value:!0}),Qg.Saturation=void 0;var r=function(){function U(j,q){for(var W=0;W<q.length;W++){var ee=q[W];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(j,ee.key,ee)}}return function(j,q,W){return q&&U(j.prototype,q),W&&U(j,W),j}}(),t=Ts(),e=b(t),n=Vf(),i=b(n),o=hue(),s=b(o),a=fue(),f=g(a);function g(U){if(U&&U.__esModule)return U;var j={};if(U!=null)for(var q in U)Object.prototype.hasOwnProperty.call(U,q)&&(j[q]=U[q]);return j.default=U,j}function b(U){return U&&U.__esModule?U:{default:U}}function I(U,j){if(!(U instanceof j))throw new TypeError("Cannot call a class as a function")}function S(U,j){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:U}function B(U,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);U.prototype=Object.create(j&&j.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(U,j):U.__proto__=j)}var P=Qg.Saturation=function(U){B(j,U);function j(q){I(this,j);var W=S(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,q));return W.handleChange=function(ee){typeof W.props.onChange=="function"&&W.throttle(W.props.onChange,f.calculateChange(ee,W.props.hsl,W.container),ee)},W.handleMouseDown=function(ee){W.handleChange(ee);var J=W.getContainerRenderWindow();J.addEventListener("mousemove",W.handleChange),J.addEventListener("mouseup",W.handleMouseUp)},W.handleMouseUp=function(){W.unbindEventListeners()},W.throttle=(0,s.default)(function(ee,J,$){ee(J,$)},50),W}return r(j,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var W=this.container,ee=window;!ee.document.contains(W)&&ee.parent!==ee;)ee=ee.parent;return ee}},{key:"unbindEventListeners",value:function(){var W=this.getContainerRenderWindow();W.removeEventListener("mousemove",this.handleChange),W.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var W=this,ee=this.props.style||{},J=ee.color,$=ee.white,X=ee.black,G=ee.pointer,ae=ee.circle,ge=(0,i.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:J,white:$,black:X,pointer:G,circle:ae}},{custom:!!this.props.style});return e.default.createElement("div",{style:ge.color,ref:function(Ie){return W.container=Ie},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.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));
|
||
}
|
||
`),e.default.createElement("div",{style:ge.white,className:"saturation-white"},e.default.createElement("div",{style:ge.black,className:"saturation-black"}),e.default.createElement("div",{style:ge.pointer},this.props.pointer?e.default.createElement(this.props.pointer,this.props):e.default.createElement("div",{style:ge.circle}))))}}]),j}(t.PureComponent||t.Component);return Qg.default=P,Qg}var qg={},kd={},bM,PP;function mue(){if(PP)return bM;PP=1;var r=cj(),t=Aj(),e=VU(),n=Lh();function i(o,s){var a=n(o)?r:t;return a(o,e(s))}return bM=i,bM}var xM,KP;function gue(){return KP||(KP=1,xM=mue()),xM}var MC={exports:{}},yue=MC.exports,RP;function vue(){return RP||(RP=1,function(r,t){(function(e,n){r.exports=n()})(yue,function(){function e(Ke){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(we){return typeof we}:function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},e(Ke)}var n=/^\s+/,i=/\s+$/;function o(Ke,we){if(Ke=Ke||"",we=we||{},Ke instanceof o)return Ke;if(!(this instanceof o))return new o(Ke,we);var Fe=s(Ke);this._originalInput=Ke,this._r=Fe.r,this._g=Fe.g,this._b=Fe.b,this._a=Fe.a,this._roundA=Math.round(100*this._a)/100,this._format=we.format||Fe.format,this._gradientType=we.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=Fe.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 we=this.toRgb();return(we.r*299+we.g*587+we.b*114)/1e3},getLuminance:function(){var we=this.toRgb(),Fe,tt,mt,bt,Lt,Vt;return Fe=we.r/255,tt=we.g/255,mt=we.b/255,Fe<=.03928?bt=Fe/12.92:bt=Math.pow((Fe+.055)/1.055,2.4),tt<=.03928?Lt=tt/12.92:Lt=Math.pow((tt+.055)/1.055,2.4),mt<=.03928?Vt=mt/12.92:Vt=Math.pow((mt+.055)/1.055,2.4),.2126*bt+.7152*Lt+.0722*Vt},setAlpha:function(we){return this._a=Se(we),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var we=b(this._r,this._g,this._b);return{h:we.h*360,s:we.s,v:we.v,a:this._a}},toHsvString:function(){var we=b(this._r,this._g,this._b),Fe=Math.round(we.h*360),tt=Math.round(we.s*100),mt=Math.round(we.v*100);return this._a==1?"hsv("+Fe+", "+tt+"%, "+mt+"%)":"hsva("+Fe+", "+tt+"%, "+mt+"%, "+this._roundA+")"},toHsl:function(){var we=f(this._r,this._g,this._b);return{h:we.h*360,s:we.s,l:we.l,a:this._a}},toHslString:function(){var we=f(this._r,this._g,this._b),Fe=Math.round(we.h*360),tt=Math.round(we.s*100),mt=Math.round(we.l*100);return this._a==1?"hsl("+Fe+", "+tt+"%, "+mt+"%)":"hsla("+Fe+", "+tt+"%, "+mt+"%, "+this._roundA+")"},toHex:function(we){return S(this._r,this._g,this._b,we)},toHexString:function(we){return"#"+this.toHex(we)},toHex8:function(we){return B(this._r,this._g,this._b,this._a,we)},toHex8String:function(we){return"#"+this.toHex8(we)},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:re[S(this._r,this._g,this._b,!0)]||!1},toFilter:function(we){var Fe="#"+P(this._r,this._g,this._b,this._a),tt=Fe,mt=this._gradientType?"GradientType = 1, ":"";if(we){var bt=o(we);tt="#"+P(bt._r,bt._g,bt._b,bt._a)}return"progid:DXImageTransform.Microsoft.gradient("+mt+"startColorstr="+Fe+",endColorstr="+tt+")"},toString:function(we){var Fe=!!we;we=we||this._format;var tt=!1,mt=this._a<1&&this._a>=0,bt=!Fe&&mt&&(we==="hex"||we==="hex6"||we==="hex3"||we==="hex4"||we==="hex8"||we==="name");return bt?we==="name"&&this._a===0?this.toName():this.toRgbString():(we==="rgb"&&(tt=this.toRgbString()),we==="prgb"&&(tt=this.toPercentageRgbString()),(we==="hex"||we==="hex6")&&(tt=this.toHexString()),we==="hex3"&&(tt=this.toHexString(!0)),we==="hex4"&&(tt=this.toHex8String(!0)),we==="hex8"&&(tt=this.toHex8String()),we==="name"&&(tt=this.toName()),we==="hsl"&&(tt=this.toHslString()),we==="hsv"&&(tt=this.toHsvString()),tt||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(we,Fe){var tt=we.apply(null,[this].concat([].slice.call(Fe)));return this._r=tt._r,this._g=tt._g,this._b=tt._b,this.setAlpha(tt._a),this},lighten:function(){return this._applyModification(W,arguments)},brighten:function(){return this._applyModification(ee,arguments)},darken:function(){return this._applyModification(J,arguments)},desaturate:function(){return this._applyModification(U,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(q,arguments)},spin:function(){return this._applyModification($,arguments)},_applyCombination:function(we,Fe){return we.apply(null,[this].concat([].slice.call(Fe)))},analogous:function(){return this._applyCombination(ge,arguments)},complement:function(){return this._applyCombination(X,arguments)},monochromatic:function(){return this._applyCombination(he,arguments)},splitcomplement:function(){return this._applyCombination(ae,arguments)},triad:function(){return this._applyCombination(G,[3])},tetrad:function(){return this._applyCombination(G,[4])}},o.fromRatio=function(Ke,we){if(e(Ke)=="object"){var Fe={};for(var tt in Ke)Ke.hasOwnProperty(tt)&&(tt==="a"?Fe[tt]=Ke[tt]:Fe[tt]=ke(Ke[tt]));Ke=Fe}return o(Ke,we)};function s(Ke){var we={r:0,g:0,b:0},Fe=1,tt=null,mt=null,bt=null,Lt=!1,Vt=!1;return typeof Ke=="string"&&(Ke=jt(Ke)),e(Ke)=="object"&&(ut(Ke.r)&&ut(Ke.g)&&ut(Ke.b)?(we=a(Ke.r,Ke.g,Ke.b),Lt=!0,Vt=String(Ke.r).substr(-1)==="%"?"prgb":"rgb"):ut(Ke.h)&&ut(Ke.s)&&ut(Ke.v)?(tt=ke(Ke.s),mt=ke(Ke.v),we=I(Ke.h,tt,mt),Lt=!0,Vt="hsv"):ut(Ke.h)&&ut(Ke.s)&&ut(Ke.l)&&(tt=ke(Ke.s),bt=ke(Ke.l),we=g(Ke.h,tt,bt),Lt=!0,Vt="hsl"),Ke.hasOwnProperty("a")&&(Fe=Ke.a)),Fe=Se(Fe),{ok:Lt,format:Ke.format||Vt,r:Math.min(255,Math.max(we.r,0)),g:Math.min(255,Math.max(we.g,0)),b:Math.min(255,Math.max(we.b,0)),a:Fe}}function a(Ke,we,Fe){return{r:ye(Ke,255)*255,g:ye(we,255)*255,b:ye(Fe,255)*255}}function f(Ke,we,Fe){Ke=ye(Ke,255),we=ye(we,255),Fe=ye(Fe,255);var tt=Math.max(Ke,we,Fe),mt=Math.min(Ke,we,Fe),bt,Lt,Vt=(tt+mt)/2;if(tt==mt)bt=Lt=0;else{var rn=tt-mt;switch(Lt=Vt>.5?rn/(2-tt-mt):rn/(tt+mt),tt){case Ke:bt=(we-Fe)/rn+(we<Fe?6:0);break;case we:bt=(Fe-Ke)/rn+2;break;case Fe:bt=(Ke-we)/rn+4;break}bt/=6}return{h:bt,s:Lt,l:Vt}}function g(Ke,we,Fe){var tt,mt,bt;Ke=ye(Ke,360),we=ye(we,100),Fe=ye(Fe,100);function Lt(Sn,Ar,Bn){return Bn<0&&(Bn+=1),Bn>1&&(Bn-=1),Bn<1/6?Sn+(Ar-Sn)*6*Bn:Bn<1/2?Ar:Bn<2/3?Sn+(Ar-Sn)*(2/3-Bn)*6:Sn}if(we===0)tt=mt=bt=Fe;else{var Vt=Fe<.5?Fe*(1+we):Fe+we-Fe*we,rn=2*Fe-Vt;tt=Lt(rn,Vt,Ke+1/3),mt=Lt(rn,Vt,Ke),bt=Lt(rn,Vt,Ke-1/3)}return{r:tt*255,g:mt*255,b:bt*255}}function b(Ke,we,Fe){Ke=ye(Ke,255),we=ye(we,255),Fe=ye(Fe,255);var tt=Math.max(Ke,we,Fe),mt=Math.min(Ke,we,Fe),bt,Lt,Vt=tt,rn=tt-mt;if(Lt=tt===0?0:rn/tt,tt==mt)bt=0;else{switch(tt){case Ke:bt=(we-Fe)/rn+(we<Fe?6:0);break;case we:bt=(Fe-Ke)/rn+2;break;case Fe:bt=(Ke-we)/rn+4;break}bt/=6}return{h:bt,s:Lt,v:Vt}}function I(Ke,we,Fe){Ke=ye(Ke,360)*6,we=ye(we,100),Fe=ye(Fe,100);var tt=Math.floor(Ke),mt=Ke-tt,bt=Fe*(1-we),Lt=Fe*(1-mt*we),Vt=Fe*(1-(1-mt)*we),rn=tt%6,Sn=[Fe,Lt,bt,bt,Vt,Fe][rn],Ar=[Vt,Fe,Fe,Lt,bt,bt][rn],Bn=[bt,bt,Vt,Fe,Fe,Lt][rn];return{r:Sn*255,g:Ar*255,b:Bn*255}}function S(Ke,we,Fe,tt){var mt=[Ue(Math.round(Ke).toString(16)),Ue(Math.round(we).toString(16)),Ue(Math.round(Fe).toString(16))];return tt&&mt[0].charAt(0)==mt[0].charAt(1)&&mt[1].charAt(0)==mt[1].charAt(1)&&mt[2].charAt(0)==mt[2].charAt(1)?mt[0].charAt(0)+mt[1].charAt(0)+mt[2].charAt(0):mt.join("")}function B(Ke,we,Fe,tt,mt){var bt=[Ue(Math.round(Ke).toString(16)),Ue(Math.round(we).toString(16)),Ue(Math.round(Fe).toString(16)),Ue(We(tt))];return mt&&bt[0].charAt(0)==bt[0].charAt(1)&&bt[1].charAt(0)==bt[1].charAt(1)&&bt[2].charAt(0)==bt[2].charAt(1)&&bt[3].charAt(0)==bt[3].charAt(1)?bt[0].charAt(0)+bt[1].charAt(0)+bt[2].charAt(0)+bt[3].charAt(0):bt.join("")}function P(Ke,we,Fe,tt){var mt=[Ue(We(tt)),Ue(Math.round(Ke).toString(16)),Ue(Math.round(we).toString(16)),Ue(Math.round(Fe).toString(16))];return mt.join("")}o.equals=function(Ke,we){return!Ke||!we?!1:o(Ke).toRgbString()==o(we).toRgbString()},o.random=function(){return o.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function U(Ke,we){we=we===0?0:we||10;var Fe=o(Ke).toHsl();return Fe.s-=we/100,Fe.s=nt(Fe.s),o(Fe)}function j(Ke,we){we=we===0?0:we||10;var Fe=o(Ke).toHsl();return Fe.s+=we/100,Fe.s=nt(Fe.s),o(Fe)}function q(Ke){return o(Ke).desaturate(100)}function W(Ke,we){we=we===0?0:we||10;var Fe=o(Ke).toHsl();return Fe.l+=we/100,Fe.l=nt(Fe.l),o(Fe)}function ee(Ke,we){we=we===0?0:we||10;var Fe=o(Ke).toRgb();return Fe.r=Math.max(0,Math.min(255,Fe.r-Math.round(255*-(we/100)))),Fe.g=Math.max(0,Math.min(255,Fe.g-Math.round(255*-(we/100)))),Fe.b=Math.max(0,Math.min(255,Fe.b-Math.round(255*-(we/100)))),o(Fe)}function J(Ke,we){we=we===0?0:we||10;var Fe=o(Ke).toHsl();return Fe.l-=we/100,Fe.l=nt(Fe.l),o(Fe)}function $(Ke,we){var Fe=o(Ke).toHsl(),tt=(Fe.h+we)%360;return Fe.h=tt<0?360+tt:tt,o(Fe)}function X(Ke){var we=o(Ke).toHsl();return we.h=(we.h+180)%360,o(we)}function G(Ke,we){if(isNaN(we)||we<=0)throw new Error("Argument to polyad must be a positive number");for(var Fe=o(Ke).toHsl(),tt=[o(Ke)],mt=360/we,bt=1;bt<we;bt++)tt.push(o({h:(Fe.h+bt*mt)%360,s:Fe.s,l:Fe.l}));return tt}function ae(Ke){var we=o(Ke).toHsl(),Fe=we.h;return[o(Ke),o({h:(Fe+72)%360,s:we.s,l:we.l}),o({h:(Fe+216)%360,s:we.s,l:we.l})]}function ge(Ke,we,Fe){we=we||6,Fe=Fe||30;var tt=o(Ke).toHsl(),mt=360/Fe,bt=[o(Ke)];for(tt.h=(tt.h-(mt*we>>1)+720)%360;--we;)tt.h=(tt.h+mt)%360,bt.push(o(tt));return bt}function he(Ke,we){we=we||6;for(var Fe=o(Ke).toHsv(),tt=Fe.h,mt=Fe.s,bt=Fe.v,Lt=[],Vt=1/we;we--;)Lt.push(o({h:tt,s:mt,v:bt})),bt=(bt+Vt)%1;return Lt}o.mix=function(Ke,we,Fe){Fe=Fe===0?0:Fe||50;var tt=o(Ke).toRgb(),mt=o(we).toRgb(),bt=Fe/100,Lt={r:(mt.r-tt.r)*bt+tt.r,g:(mt.g-tt.g)*bt+tt.g,b:(mt.b-tt.b)*bt+tt.b,a:(mt.a-tt.a)*bt+tt.a};return o(Lt)},o.readability=function(Ke,we){var Fe=o(Ke),tt=o(we);return(Math.max(Fe.getLuminance(),tt.getLuminance())+.05)/(Math.min(Fe.getLuminance(),tt.getLuminance())+.05)},o.isReadable=function(Ke,we,Fe){var tt=o.readability(Ke,we),mt,bt;switch(bt=!1,mt=Rt(Fe),mt.level+mt.size){case"AAsmall":case"AAAlarge":bt=tt>=4.5;break;case"AAlarge":bt=tt>=3;break;case"AAAsmall":bt=tt>=7;break}return bt},o.mostReadable=function(Ke,we,Fe){var tt=null,mt=0,bt,Lt,Vt,rn;Fe=Fe||{},Lt=Fe.includeFallbackColors,Vt=Fe.level,rn=Fe.size;for(var Sn=0;Sn<we.length;Sn++)bt=o.readability(Ke,we[Sn]),bt>mt&&(mt=bt,tt=o(we[Sn]));return o.isReadable(Ke,tt,{level:Vt,size:rn})||!Lt?tt:(Fe.includeFallbackColors=!1,o.mostReadable(Ke,["#fff","#000"],Fe))};var Ie=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"},re=o.hexNames=oe(Ie);function oe(Ke){var we={};for(var Fe in Ke)Ke.hasOwnProperty(Fe)&&(we[Ke[Fe]]=Fe);return we}function Se(Ke){return Ke=parseFloat(Ke),(isNaN(Ke)||Ke<0||Ke>1)&&(Ke=1),Ke}function ye(Ke,we){je(Ke)&&(Ke="100%");var Fe=et(Ke);return Ke=Math.min(we,Math.max(0,parseFloat(Ke))),Fe&&(Ke=parseInt(Ke*we,10)/100),Math.abs(Ke-we)<1e-6?1:Ke%we/parseFloat(we)}function nt(Ke){return Math.min(1,Math.max(0,Ke))}function Ne(Ke){return parseInt(Ke,16)}function je(Ke){return typeof Ke=="string"&&Ke.indexOf(".")!=-1&&parseFloat(Ke)===1}function et(Ke){return typeof Ke=="string"&&Ke.indexOf("%")!=-1}function Ue(Ke){return Ke.length==1?"0"+Ke:""+Ke}function ke(Ke){return Ke<=1&&(Ke=Ke*100+"%"),Ke}function We(Ke){return Math.round(parseFloat(Ke)*255).toString(16)}function vt(Ke){return Ne(Ke)/255}var Pt=function(){var Ke="[-\\+]?\\d+%?",we="[-\\+]?\\d*\\.\\d+%?",Fe="(?:"+we+")|(?:"+Ke+")",tt="[\\s|\\(]+("+Fe+")[,|\\s]+("+Fe+")[,|\\s]+("+Fe+")\\s*\\)?",mt="[\\s|\\(]+("+Fe+")[,|\\s]+("+Fe+")[,|\\s]+("+Fe+")[,|\\s]+("+Fe+")\\s*\\)?";return{CSS_UNIT:new RegExp(Fe),rgb:new RegExp("rgb"+tt),rgba:new RegExp("rgba"+mt),hsl:new RegExp("hsl"+tt),hsla:new RegExp("hsla"+mt),hsv:new RegExp("hsv"+tt),hsva:new RegExp("hsva"+mt),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 ut(Ke){return!!Pt.CSS_UNIT.exec(Ke)}function jt(Ke){Ke=Ke.replace(n,"").replace(i,"").toLowerCase();var we=!1;if(Ie[Ke])Ke=Ie[Ke],we=!0;else if(Ke=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Fe;return(Fe=Pt.rgb.exec(Ke))?{r:Fe[1],g:Fe[2],b:Fe[3]}:(Fe=Pt.rgba.exec(Ke))?{r:Fe[1],g:Fe[2],b:Fe[3],a:Fe[4]}:(Fe=Pt.hsl.exec(Ke))?{h:Fe[1],s:Fe[2],l:Fe[3]}:(Fe=Pt.hsla.exec(Ke))?{h:Fe[1],s:Fe[2],l:Fe[3],a:Fe[4]}:(Fe=Pt.hsv.exec(Ke))?{h:Fe[1],s:Fe[2],v:Fe[3]}:(Fe=Pt.hsva.exec(Ke))?{h:Fe[1],s:Fe[2],v:Fe[3],a:Fe[4]}:(Fe=Pt.hex8.exec(Ke))?{r:Ne(Fe[1]),g:Ne(Fe[2]),b:Ne(Fe[3]),a:vt(Fe[4]),format:we?"name":"hex8"}:(Fe=Pt.hex6.exec(Ke))?{r:Ne(Fe[1]),g:Ne(Fe[2]),b:Ne(Fe[3]),format:we?"name":"hex"}:(Fe=Pt.hex4.exec(Ke))?{r:Ne(Fe[1]+""+Fe[1]),g:Ne(Fe[2]+""+Fe[2]),b:Ne(Fe[3]+""+Fe[3]),a:vt(Fe[4]+""+Fe[4]),format:we?"name":"hex8"}:(Fe=Pt.hex3.exec(Ke))?{r:Ne(Fe[1]+""+Fe[1]),g:Ne(Fe[2]+""+Fe[2]),b:Ne(Fe[3]+""+Fe[3]),format:we?"name":"hex"}:!1}function Rt(Ke){var we,Fe;return Ke=Ke||{level:"AA",size:"small"},we=(Ke.level||"AA").toUpperCase(),Fe=(Ke.size||"small").toLowerCase(),we!=="AA"&&we!=="AAA"&&(we="AA"),Fe!=="small"&&Fe!=="large"&&(Fe="small"),{level:we,size:Fe}}return o})}(MC)),MC.exports}var DP;function xj(){if(DP)return kd;DP=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.isvalidColorString=kd.red=kd.getContrastingColor=kd.isValidHex=kd.toState=kd.simpleCheckForValidColor=void 0;var r=gue(),t=i(r),e=vue(),n=i(e);function i(s){return s&&s.__esModule?s:{default:s}}kd.simpleCheckForValidColor=function(a){var f=["r","g","b","a","h","s","l","v"],g=0,b=0;return(0,t.default)(f,function(I){if(a[I]&&(g+=1,isNaN(a[I])||(b+=1),I==="s"||I==="l")){var S=/^\d+%$/;S.test(a[I])&&(b+=1)}}),g===b?a:!1};var o=kd.toState=function(a,f){var g=a.hex?(0,n.default)(a.hex):(0,n.default)(a),b=g.toHsl(),I=g.toHsv(),S=g.toRgb(),B=g.toHex();b.s===0&&(b.h=f||0,I.h=f||0);var P=B==="000000"&&S.a===0;return{hsl:b,hex:P?"transparent":"#"+B,rgb:S,hsv:I,oldHue:a.h||f||b.h,source:a.source}};return kd.isValidHex=function(a){if(a==="transparent")return!0;var f=String(a).charAt(0)==="#"?1:0;return a.length!==4+f&&a.length<7+f&&(0,n.default)(a).isValid()},kd.getContrastingColor=function(a){if(!a)return"#fff";var f=o(a);if(f.hex==="transparent")return"rgba(0,0,0,0.4)";var g=(f.rgb.r*299+f.rgb.g*587+f.rgb.b*114)/1e3;return g>=128?"#000":"#fff"},kd.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}},kd.isvalidColorString=function(a,f){var g=a.replace("°","");return(0,n.default)(f+" ("+g+")")._ok},kd}var LP;function _ue(){if(LP)return qg;LP=1,Object.defineProperty(qg,"__esModule",{value:!0}),qg.ColorWrap=void 0;var r=Object.assign||function(P){for(var U=1;U<arguments.length;U++){var j=arguments[U];for(var q in j)Object.prototype.hasOwnProperty.call(j,q)&&(P[q]=j[q])}return P},t=function(){function P(U,j){for(var q=0;q<j.length;q++){var W=j[q];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(U,W.key,W)}}return function(U,j,q){return j&&P(U.prototype,j),q&&P(U,q),U}}(),e=Ts(),n=g(e),i=bj(),o=g(i),s=xj(),a=f(s);function f(P){if(P&&P.__esModule)return P;var U={};if(P!=null)for(var j in P)Object.prototype.hasOwnProperty.call(P,j)&&(U[j]=P[j]);return U.default=P,U}function g(P){return P&&P.__esModule?P:{default:P}}function b(P,U){if(!(P instanceof U))throw new TypeError("Cannot call a class as a function")}function I(P,U){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:P}function S(P,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);P.prototype=Object.create(U&&U.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(P,U):P.__proto__=U)}var B=qg.ColorWrap=function(U){var j=function(q){S(W,q);function W(ee){b(this,W);var J=I(this,(W.__proto__||Object.getPrototypeOf(W)).call(this));return J.handleChange=function($,X){var G=a.simpleCheckForValidColor($);if(G){var ae=a.toState($,$.h||J.state.oldHue);J.setState(ae),J.props.onChangeComplete&&J.debounce(J.props.onChangeComplete,ae,X),J.props.onChange&&J.props.onChange(ae,X)}},J.handleSwatchHover=function($,X){var G=a.simpleCheckForValidColor($);if(G){var ae=a.toState($,$.h||J.state.oldHue);J.props.onSwatchHover&&J.props.onSwatchHover(ae,X)}},J.state=r({},a.toState(ee.color,0)),J.debounce=(0,o.default)(function($,X,G){$(X,G)},100),J}return t(W,[{key:"render",value:function(){var J={};return this.props.onSwatchHover&&(J.onSwatchHover=this.handleSwatchHover),n.default.createElement(U,r({},this.props,this.state,{onChange:this.handleChange},J))}}],[{key:"getDerivedStateFromProps",value:function(J,$){return r({},a.toState(J.color,$.oldHue))}}]),W}(e.PureComponent||e.Component);return j.propTypes=r({},U.propTypes),j.defaultProps=r({},U.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),j};return qg.default=B,qg}var Yg={},Sy={},FP;function Cue(){if(FP)return Sy;FP=1,Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.handleFocus=void 0;var r=Object.assign||function(f){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var I in b)Object.prototype.hasOwnProperty.call(b,I)&&(f[I]=b[I])}return f},t=function(){function f(g,b){for(var I=0;I<b.length;I++){var S=b[I];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,S.key,S)}}return function(g,b,I){return b&&f(g.prototype,b),I&&f(g,I),g}}(),e=Ts(),n=i(e);function i(f){return f&&f.__esModule?f:{default:f}}function o(f,g){if(!(f instanceof g))throw new TypeError("Cannot call a class as a function")}function s(f,g){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:f}function a(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);f.prototype=Object.create(g&&g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(f,g):f.__proto__=g)}return Sy.handleFocus=function(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(I){a(S,I);function S(){var B,P,U,j;o(this,S);for(var q=arguments.length,W=Array(q),ee=0;ee<q;ee++)W[ee]=arguments[ee];return j=(P=(U=s(this,(B=S.__proto__||Object.getPrototypeOf(S)).call.apply(B,[this].concat(W))),U),U.state={focus:!1},U.handleFocus=function(){return U.setState({focus:!0})},U.handleBlur=function(){return U.setState({focus:!1})},P),s(U,j)}return t(S,[{key:"render",value:function(){return n.default.createElement(b,{onFocus:this.handleFocus,onBlur:this.handleBlur},n.default.createElement(g,r({},this.props,this.state)))}}]),S}(n.default.Component)},Sy}var UP;function bue(){if(UP)return Yg;UP=1,Object.defineProperty(Yg,"__esModule",{value:!0}),Yg.Swatch=void 0;var r=Object.assign||function(I){for(var S=1;S<arguments.length;S++){var B=arguments[S];for(var P in B)Object.prototype.hasOwnProperty.call(B,P)&&(I[P]=B[P])}return I},t=Ts(),e=f(t),n=Vf(),i=f(n),o=Cue(),s=NO(),a=f(s);function f(I){return I&&I.__esModule?I:{default:I}}var g=13,b=Yg.Swatch=function(S){var B=S.color,P=S.style,U=S.onClick,j=U===void 0?function(){}:U,q=S.onHover,W=S.title,ee=W===void 0?B:W,J=S.children,$=S.focus,X=S.focusStyle,G=X===void 0?{}:X,ae=B==="transparent",ge=(0,i.default)({default:{swatch:r({background:B,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},P,$?G:{})}}),he=function(ye){return j(B,ye)},Ie=function(ye){return ye.keyCode===g&&j(B,ye)},re=function(ye){return q(B,ye)},oe={};return q&&(oe.onMouseOver=re),e.default.createElement("div",r({style:ge.swatch,onClick:he,title:ee,tabIndex:0,onKeyDown:Ie},oe),J,ae&&e.default.createElement(a.default,{borderRadius:ge.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};return Yg.default=(0,o.handleFocus)(b),Yg}var jP;function wj(){return jP||(jP=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});var t=iue();Object.defineProperty(r,"Alpha",{enumerable:!0,get:function(){return g(t).default}});var e=NO();Object.defineProperty(r,"Checkboard",{enumerable:!0,get:function(){return g(e).default}});var n=oue();Object.defineProperty(r,"EditableInput",{enumerable:!0,get:function(){return g(n).default}});var i=sue();Object.defineProperty(r,"Hue",{enumerable:!0,get:function(){return g(i).default}});var o=lue();Object.defineProperty(r,"Raised",{enumerable:!0,get:function(){return g(o).default}});var s=pue();Object.defineProperty(r,"Saturation",{enumerable:!0,get:function(){return g(s).default}});var a=_ue();Object.defineProperty(r,"ColorWrap",{enumerable:!0,get:function(){return g(a).default}});var f=bue();Object.defineProperty(r,"Swatch",{enumerable:!0,get:function(){return g(f).default}});function g(b){return b&&b.__esModule?b:{default:b}}}(pM)),pM}var $g={},wM,zP;function xue(){if(zP)return wM;zP=1;function r(t){return t===void 0}return wM=r,wM}var sC={},NP;function wue(){if(NP)return sC;NP=1,Object.defineProperty(sC,"__esModule",{value:!0});var r=Object.assign||function(s){for(var a=1;a<arguments.length;a++){var f=arguments[a];for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(s[g]=f[g])}return s},t=Ts(),e=n(t);function n(s){return s&&s.__esModule?s:{default:s}}function i(s,a){var f={};for(var g in s)a.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(s,g)&&(f[g]=s[g]);return f}var o=24;return sC.default=function(s){var a=s.fill,f=a===void 0?"currentColor":a,g=s.width,b=g===void 0?o:g,I=s.height,S=I===void 0?o:I,B=s.style,P=B===void 0?{}:B,U=i(s,["fill","width","height","style"]);return e.default.createElement("svg",r({viewBox:"0 0 "+o+" "+o,style:r({fill:f,width:b,height:S},P)},U),e.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"}))},sC}var GP;function Mue(){if(GP)return $g;GP=1,Object.defineProperty($g,"__esModule",{value:!0}),$g.ChromeFields=void 0;var r=function(){function W(ee,J){for(var $=0;$<J.length;$++){var X=J[$];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(ee,X.key,X)}}return function(ee,J,$){return J&&W(ee.prototype,J),$&&W(ee,$),ee}}(),t=Ts(),e=B(t),n=Vf(),i=B(n),o=xj(),s=S(o),a=xue(),f=B(a),g=wj(),b=wue(),I=B(b);function S(W){if(W&&W.__esModule)return W;var ee={};if(W!=null)for(var J in W)Object.prototype.hasOwnProperty.call(W,J)&&(ee[J]=W[J]);return ee.default=W,ee}function B(W){return W&&W.__esModule?W:{default:W}}function P(W,ee){if(!(W instanceof ee))throw new TypeError("Cannot call a class as a function")}function U(W,ee){if(!W)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee&&(typeof ee=="object"||typeof ee=="function")?ee:W}function j(W,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ee);W.prototype=Object.create(ee&&ee.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),ee&&(Object.setPrototypeOf?Object.setPrototypeOf(W,ee):W.__proto__=ee)}var q=$g.ChromeFields=function(W){j(ee,W);function ee(J){P(this,ee);var $=U(this,(ee.__proto__||Object.getPrototypeOf(ee)).call(this));return $.toggleViews=function(){$.state.view==="hex"?$.setState({view:"rgb"}):$.state.view==="rgb"?$.setState({view:"hsl"}):$.state.view==="hsl"&&($.props.hsl.a===1?$.setState({view:"hex"}):$.setState({view:"rgb"}))},$.handleChange=function(X,G){X.hex?s.isValidHex(X.hex)&&$.props.onChange({hex:X.hex,source:"hex"},G):X.r||X.g||X.b?$.props.onChange({r:X.r||$.props.rgb.r,g:X.g||$.props.rgb.g,b:X.b||$.props.rgb.b,source:"rgb"},G):X.a?(X.a<0?X.a=0:X.a>1&&(X.a=1),$.props.onChange({h:$.props.hsl.h,s:$.props.hsl.s,l:$.props.hsl.l,a:Math.round(X.a*100)/100,source:"rgb"},G)):(X.h||X.s||X.l)&&(typeof X.s=="string"&&X.s.includes("%")&&(X.s=X.s.replace("%","")),typeof X.l=="string"&&X.l.includes("%")&&(X.l=X.l.replace("%","")),X.s==1?X.s=.01:X.l==1&&(X.l=.01),$.props.onChange({h:X.h||$.props.hsl.h,s:Number((0,f.default)(X.s)?$.props.hsl.s:X.s),l:Number((0,f.default)(X.l)?$.props.hsl.l:X.l),source:"hsl"},G))},$.showHighlight=function(X){X.currentTarget.style.background="#eee"},$.hideHighlight=function(X){X.currentTarget.style.background="transparent"},J.hsl.a!==1&&J.view==="hex"?$.state={view:"rgb"}:$.state={view:J.view},$}return r(ee,[{key:"render",value:function(){var $=this,X=(0,i.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),G=void 0;return this.state.view==="hex"?G=e.default.createElement("div",{style:X.fields,className:"flexbox-fix"},e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?G=e.default.createElement("div",{style:X.fields,className:"flexbox-fix"},e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),e.default.createElement("div",{style:X.alpha},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(G=e.default.createElement("div",{style:X.fields,className:"flexbox-fix"},e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),e.default.createElement("div",{style:X.field},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),e.default.createElement("div",{style:X.alpha},e.default.createElement(g.EditableInput,{style:{input:X.input,label:X.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),e.default.createElement("div",{style:X.wrap,className:"flexbox-fix"},G,e.default.createElement("div",{style:X.toggle},e.default.createElement("div",{style:X.icon,onClick:this.toggleViews,ref:function(ge){return $.icon=ge}},e.default.createElement(I.default,{style:X.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function($,X){return $.hsl.a!==1&&X.view==="hex"?{view:"rgb"}:null}}]),ee}(e.default.Component);return q.defaultProps={view:"hex"},$g.default=q,$g}var Vg={},WP;function Sue(){if(WP)return Vg;WP=1,Object.defineProperty(Vg,"__esModule",{value:!0}),Vg.ChromePointer=void 0;var r=Ts(),t=i(r),e=Vf(),n=i(e);function i(s){return s&&s.__esModule?s:{default:s}}var o=Vg.ChromePointer=function(){var a=(0,n.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 t.default.createElement("div",{style:a.picker})};return Vg.default=o,Vg}var Hg={},QP;function Eue(){if(QP)return Hg;QP=1,Object.defineProperty(Hg,"__esModule",{value:!0}),Hg.ChromePointerCircle=void 0;var r=Ts(),t=i(r),e=Vf(),n=i(e);function i(s){return s&&s.__esModule?s:{default:s}}var o=Hg.ChromePointerCircle=function(){var a=(0,n.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return t.default.createElement("div",{style:a.picker})};return Hg.default=o,Hg}var qP;function Oue(){if(qP)return Kg;qP=1,Object.defineProperty(Kg,"__esModule",{value:!0}),Kg.Chrome=void 0;var r=Ts(),t=U(r),e=qf(),n=U(e),i=Vf(),o=U(i),s=Cj(),a=U(s),f=wj(),g=Mue(),b=U(g),I=Sue(),S=U(I),B=Eue(),P=U(B);function U(q){return q&&q.__esModule?q:{default:q}}var j=Kg.Chrome=function(W){var ee=W.width,J=W.onChange,$=W.disableAlpha,X=W.rgb,G=W.hsl,ae=W.hsv,ge=W.hex,he=W.renderers,Ie=W.styles,re=Ie===void 0?{}:Ie,oe=W.className,Se=oe===void 0?"":oe,ye=W.defaultView,nt=(0,o.default)((0,a.default)({default:{picker:{width:ee,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("+X.r+", "+X.g+", "+X.b+", "+X.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"}}},re),{disableAlpha:$});return t.default.createElement("div",{style:nt.picker,className:"chrome-picker "+Se},t.default.createElement("div",{style:nt.saturation},t.default.createElement(f.Saturation,{style:nt.Saturation,hsl:G,hsv:ae,pointer:P.default,onChange:J})),t.default.createElement("div",{style:nt.body},t.default.createElement("div",{style:nt.controls,className:"flexbox-fix"},t.default.createElement("div",{style:nt.color},t.default.createElement("div",{style:nt.swatch},t.default.createElement("div",{style:nt.active}),t.default.createElement(f.Checkboard,{renderers:he}))),t.default.createElement("div",{style:nt.toggles},t.default.createElement("div",{style:nt.hue},t.default.createElement(f.Hue,{style:nt.Hue,hsl:G,pointer:S.default,onChange:J})),t.default.createElement("div",{style:nt.alpha},t.default.createElement(f.Alpha,{style:nt.Alpha,rgb:X,hsl:G,pointer:S.default,renderers:he,onChange:J})))),t.default.createElement(b.default,{rgb:X,hsl:G,hex:ge,view:ye,onChange:J,disableAlpha:$})))};return j.propTypes={width:n.default.oneOfType([n.default.string,n.default.number]),disableAlpha:n.default.bool,styles:n.default.object,defaultView:n.default.oneOf(["hex","rgb","hsl"])},j.defaultProps={width:225,disableAlpha:!1,styles:{}},Kg.default=(0,f.ColorWrap)(j),Kg}var Bue=Oue();const Iue=us(Bue);function oo(){var r="/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",t="cb6d03ea084207ffce2f89af246bc26074c13af7",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return oo=function(){return s},s}oo();function kue(r){oo().f[0]++;const t=(oo().s[0]++,r.rgb);return oo().s[1]++,`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`}class Mj extends Zn.Component{constructor(e){oo().f[1]++,oo().s[4]++;super(e);Kn(this,"state",(oo().s[2]++,{pickerOpened:!1}));Kn(this,"colorInput",(oo().s[3]++,null));Kn(this,"calcPickerOffset",(oo().s[7]++,()=>{oo().f[3]++;const e=(oo().s[8]++,this.colorInput);if(oo().s[9]++,e){oo().b[0][0]++;const n=(oo().s[10]++,e.getBoundingClientRect());return oo().s[11]++,{top:n.top,left:n.left+196}}else return oo().b[0][1]++,oo().s[12]++,{top:160,left:555}}));Kn(this,"togglePicker",(oo().s[13]++,()=>{oo().f[4]++,oo().s[14]++,this.setState({pickerOpened:!this.state.pickerOpened})}));oo().s[5]++,this.onChangeNoCheck=uS.throttle(this.onChangeNoCheck,1e3/30)}onChangeNoCheck(e){oo().f[2]++,oo().s[6]++,this.props.onChange(e)}get color(){oo().f[5]++,oo().s[15]++;try{return oo().s[16]++,BS(this.props.value).rgb()}catch(e){return oo().s[17]++,console.warn("Error parsing color: ",e),oo().s[18]++,BS("rgb(255,255,255)")}}onChange(e){oo().f[6]++,oo().s[19]++,this.props.onChange(e===""?(oo().b[1][0]++,void 0):(oo().b[1][1]++,e))}render(){oo().f[7]++;const e=(oo().s[20]++,this.calcPickerOffset()),n=(oo().s[21]++,this.color.object()),i=(oo().s[22]++,{r:n.r,g:n.g,b:n.b,a:n.alpha}),o=(oo().s[23]++,ue.jsxs("div",{className:"maputnik-color-picker-offset",style:{position:"fixed",zIndex:1,left:e.left,top:e.top},children:[ue.jsx(Iue,{color:i,onChange:a=>(oo().f[8]++,oo().s[24]++,this.onChangeNoCheck(kue(a)))}),ue.jsx("div",{className:"maputnik-color-picker-offset",onClick:this.togglePicker,style:{zIndex:-1,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}})]})),s=(oo().s[25]++,{backgroundColor:this.props.value});return oo().s[26]++,ue.jsxs("div",{className:"maputnik-color-wrapper",children:[(oo().b[2][0]++,this.state.pickerOpened&&(oo().b[2][1]++,o)),ue.jsx("div",{className:"maputnik-color-swatch",style:s}),ue.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",autoComplete:"off",className:"maputnik-color",ref:a=>(oo().f[9]++,oo().s[27]++,this.colorInput=a),onClick:this.togglePicker,style:this.props.style,name:this.props.name,placeholder:this.props.default,value:this.props.value?(oo().b[3][0]++,this.props.value):(oo().b[3][1]++,""),onChange:a=>(oo().f[10]++,oo().s[28]++,this.onChange(a.target.value))})]})}}function pn(){var r="/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",t="ab7734237b4c4e642d73d3a00f670557b7ee2f29",e=globalThis,n="__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:39,column:5}},10:{start:{line:31,column:6},end:{line:31,column:58}},11:{start:{line:31,column:31},end:{line:31,column:58}},12:{start:{line:32,column:6},end:{line:34,column:9}},13:{start:{line:35,column:11},end:{line:39,column:5}},14:{start:{line:36,column:6},end:{line:38,column:9}},15:{start:{line:40,column:4},end:{line:42,column:7}},16:{start:{line:45,column:4},end:{line:47,column:5}},17:{start:{line:46,column:6},end:{line:46,column:18}},18:{start:{line:48,column:18},end:{line:48,column:20}},19:{start:{line:49,column:4},end:{line:51,column:5}},20:{start:{line:50,column:6},end:{line:50,column:19}},21:{start:{line:52,column:4},end:{line:54,column:5}},22:{start:{line:53,column:6},end:{line:53,column:19}},23:{start:{line:55,column:4},end:{line:57,column:5}},24:{start:{line:56,column:6},end:{line:56,column:19}},25:{start:{line:58,column:4},end:{line:58,column:16}},26:{start:{line:60,column:15},end:{line:74,column:3}},27:{start:{line:61,column:4},end:{line:61,column:38}},28:{start:{line:62,column:4},end:{line:64,column:5}},29:{start:{line:63,column:6},end:{line:63,column:13}},30:{start:{line:65,column:4},end:{line:73,column:5}},31:{start:{line:66,column:6},end:{line:72,column:7}},32:{start:{line:67,column:8},end:{line:67,column:43}},33:{start:{line:68,column:8},end:{line:68,column:56}},34:{start:{line:70,column:8},end:{line:70,column:33}},35:{start:{line:71,column:8},end:{line:71,column:46}},36:{start:{line:75,column:18},end:{line:100,column:3}},37:{start:{line:76,column:16},end:{line:76,column:42}},38:{start:{line:77,column:17},end:{line:77,column:37}},39:{start:{line:78,column:21},end:{line:78,column:26}},40:{start:{line:79,column:4},end:{line:95,column:5}},41:{start:{line:80,column:19},end:{line:80,column:31}},42:{start:{line:81,column:6},end:{line:94,column:7}},43:{start:{line:82,column:8},end:{line:86,column:9}},44:{start:{line:83,column:10},end:{line:83,column:42}},45:{start:{line:85,column:10},end:{line:85,column:42}},46:{start:{line:87,column:8},end:{line:87,column:27}},47:{start:{line:89,column:8},end:{line:93,column:9}},48:{start:{line:90,column:10},end:{line:90,column:31}},49:{start:{line:92,column:10},end:{line:92,column:40}},50:{start:{line:96,column:4},end:{line:96,column:32}},51:{start:{line:97,column:4},end:{line:97,column:70}},52:{start:{line:98,column:4},end:{line:98,column:41}},53:{start:{line:99,column:4},end:{line:99,column:56}},54:{start:{line:99,column:29},end:{line:99,column:56}},55:{start:{line:102,column:4},end:{line:185,column:5}},56:{start:{line:103,column:20},end:{line:103,column:81}},57:{start:{line:104,column:27},end:{line:104,column:82}},58:{start:{line:106,column:6},end:{line:110,column:7}},59:{start:{line:107,column:8},end:{line:107,column:38}},60:{start:{line:109,column:8},end:{line:109,column:27}},61:{start:{line:111,column:6},end:{line:165,column:11}},62:{start:{line:124,column:14},end:{line:124,column:41}},63:{start:{line:127,column:14},end:{line:127,column:67}},64:{start:{line:130,column:14},end:{line:130,column:69}},65:{start:{line:133,column:14},end:{line:137,column:17}},66:{start:{line:152,column:14},end:{line:152,column:47}},67:{start:{line:155,column:14},end:{line:155,column:47}},68:{start:{line:158,column:14},end:{line:158,column:48}},69:{start:{line:159,column:14},end:{line:159,column:32}},70:{start:{line:167,column:20},end:{line:167,column:81}},71:{start:{line:168,column:6},end:{line:184,column:8}},72:{start:{line:176,column:27},end:{line:176,column:59}},73:{start:{line:178,column:12},end:{line:178,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:43,column:3}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:13},end:{line:59,column:3}},line:44},4:{name:"(anonymous_4)",decl:{start:{line:60,column:15},end:{line:60,column:16}},loc:{start:{line:60,column:21},end:{line:74,column:3}},line:60},5:{name:"(anonymous_5)",decl:{start:{line:75,column:18},end:{line:75,column:19}},loc:{start:{line:75,column:25},end:{line:100,column:3}},line:75},6:{name:"(anonymous_6)",decl:{start:{line:101,column:2},end:{line:101,column:3}},loc:{start:{line:101,column:11},end:{line:186,column:3}},line:101},7:{name:"(anonymous_7)",decl:{start:{line:123,column:23},end:{line:123,column:24}},loc:{start:{line:123,column:29},end:{line:125,column:13}},line:123},8:{name:"(anonymous_8)",decl:{start:{line:126,column:27},end:{line:126,column:28}},loc:{start:{line:126,column:33},end:{line:128,column:13}},line:126},9:{name:"(anonymous_9)",decl:{start:{line:129,column:25},end:{line:129,column:26}},loc:{start:{line:129,column:31},end:{line:131,column:13}},line:129},10:{name:"(anonymous_10)",decl:{start:{line:132,column:20},end:{line:132,column:21}},loc:{start:{line:132,column:26},end:{line:138,column:13}},line:132},11:{name:"(anonymous_11)",decl:{start:{line:151,column:21},end:{line:151,column:22}},loc:{start:{line:151,column:29},end:{line:153,column:13}},line:151},12:{name:"(anonymous_12)",decl:{start:{line:154,column:22},end:{line:154,column:23}},loc:{start:{line:154,column:29},end:{line:156,column:13}},line:154},13:{name:"(anonymous_13)",decl:{start:{line:157,column:20},end:{line:157,column:21}},loc:{start:{line:157,column:28},end:{line:160,column:13}},line:157},14:{name:"(anonymous_14)",decl:{start:{line:176,column:20},end:{line:176,column:21}},loc:{start:{line:176,column:27},end:{line:176,column:59}},line:176},15:{name:"(anonymous_15)",decl:{start:{line:177,column:19},end:{line:177,column:20}},loc:{start:{line:177,column:25},end:{line:179,column:11}},line:177}},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:39,column:5}},type:"if",locations:[{start:{line:30,column:4},end:{line:39,column:5}},{start:{line:35,column:11},end:{line:39,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:31,column:58}},type:"if",locations:[{start:{line:31,column:6},end:{line:31,column:58}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},7:{loc:{start:{line:35,column:11},end:{line:39,column:5}},type:"if",locations:[{start:{line:35,column:11},end:{line:39,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},8:{loc:{start:{line:35,column:15},end:{line:35,column:49}},type:"binary-expr",locations:[{start:{line:35,column:15},end:{line:35,column:35}},{start:{line:35,column:39},end:{line:35,column:49}}],line:35},9:{loc:{start:{line:41,column:18},end:{line:41,column:53}},type:"cond-expr",locations:[{start:{line:41,column:36},end:{line:41,column:42}},{start:{line:41,column:45},end:{line:41,column:53}}],line:41},10:{loc:{start:{line:45,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},11:{loc:{start:{line:49,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:49,column:4},end:{line:51,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:49},12:{loc:{start:{line:52,column:4},end:{line:54,column:5}},type:"if",locations:[{start:{line:52,column:4},end:{line:54,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:52},13:{loc:{start:{line:52,column:8},end:{line:52,column:56}},type:"binary-expr",locations:[{start:{line:52,column:8},end:{line:52,column:30}},{start:{line:52,column:34},end:{line:52,column:56}}],line:52},14:{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},15:{loc:{start:{line:55,column:8},end:{line:55,column:56}},type:"binary-expr",locations:[{start:{line:55,column:8},end:{line:55,column:30}},{start:{line:55,column:34},end:{line:55,column:56}}],line:55},16:{loc:{start:{line:62,column:4},end:{line:64,column:5}},type:"if",locations:[{start:{line:62,column:4},end:{line:64,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},17:{loc:{start:{line:65,column:4},end:{line:73,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:73,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},18:{loc:{start:{line:66,column:6},end:{line:72,column:7}},type:"if",locations:[{start:{line:66,column:6},end:{line:72,column:7}},{start:{line:69,column:13},end:{line:72,column:7}}],line:66},19:{loc:{start:{line:79,column:4},end:{line:95,column:5}},type:"if",locations:[{start:{line:79,column:4},end:{line:95,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:79},20:{loc:{start:{line:81,column:6},end:{line:94,column:7}},type:"if",locations:[{start:{line:81,column:6},end:{line:94,column:7}},{start:{line:88,column:13},end:{line:94,column:7}}],line:81},21:{loc:{start:{line:82,column:8},end:{line:86,column:9}},type:"if",locations:[{start:{line:82,column:8},end:{line:86,column:9}},{start:{line:84,column:15},end:{line:86,column:9}}],line:82},22:{loc:{start:{line:89,column:8},end:{line:93,column:9}},type:"if",locations:[{start:{line:89,column:8},end:{line:93,column:9}},{start:{line:91,column:15},end:{line:93,column:9}}],line:89},23:{loc:{start:{line:99,column:4},end:{line:99,column:56}},type:"if",locations:[{start:{line:99,column:4},end:{line:99,column:56}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:99},24:{loc:{start:{line:102,column:4},end:{line:185,column:5}},type:"if",locations:[{start:{line:102,column:4},end:{line:185,column:5}},{start:{line:166,column:11},end:{line:185,column:5}}],line:102},25:{loc:{start:{line:102,column:8},end:{line:102,column:205}},type:"binary-expr",locations:[{start:{line:102,column:8},end:{line:102,column:63}},{start:{line:102,column:67},end:{line:102,column:122}},{start:{line:102,column:126},end:{line:102,column:151}},{start:{line:102,column:155},end:{line:102,column:180}},{start:{line:102,column:184},end:{line:102,column:205}}],line:102},26:{loc:{start:{line:103,column:20},end:{line:103,column:81}},type:"cond-expr",locations:[{start:{line:103,column:41},end:{line:103,column:62}},{start:{line:103,column:65},end:{line:103,column:81}}],line:103},27:{loc:{start:{line:104,column:27},end:{line:104,column:82}},type:"cond-expr",locations:[{start:{line:104,column:59},end:{line:104,column:61}},{start:{line:104,column:64},end:{line:104,column:82}}],line:104},28:{loc:{start:{line:106,column:6},end:{line:110,column:7}},type:"if",locations:[{start:{line:106,column:6},end:{line:110,column:7}},{start:{line:108,column:13},end:{line:110,column:7}}],line:106},29:{loc:{start:{line:121,column:19},end:{line:121,column:58}},type:"cond-expr",locations:[{start:{line:121,column:38},end:{line:121,column:50}},{start:{line:121,column:53},end:{line:121,column:58}}],line:121},30:{loc:{start:{line:150,column:19},end:{line:150,column:58}},type:"cond-expr",locations:[{start:{line:150,column:43},end:{line:150,column:45}},{start:{line:150,column:48},end:{line:150,column:58}}],line:150},31:{loc:{start:{line:167,column:20},end:{line:167,column:81}},type:"cond-expr",locations:[{start:{line:167,column:41},end:{line:167,column:62}},{start:{line:167,column:65},end:{line:167,column:81}}],line:167},32:{loc:{start:{line:175,column:17},end:{line:175,column:46}},type:"cond-expr",locations:[{start:{line:175,column:36},end:{line:175,column:38}},{start:{line:175,column:41},end:{line:175,column:46}}],line:175}},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,SAAU,MAAK,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,SAAU,MAAK,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:"ab7734237b4c4e642d73d3a00f670557b7ee2f29"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return pn=function(){return s},s}pn();class Tp extends Zn.Component{constructor(e){pn().f[0]++,pn().s[2]++;super(e);Kn(this,"_keyboardEvent",(pn().s[1]++,!1));Kn(this,"resetValue",(pn().s[26]++,()=>{if(pn().f[4]++,pn().s[27]++,this.setState({editing:!1}),pn().s[28]++,this.state.value)pn().b[16][1]++;else{pn().b[16][0]++,pn().s[29]++;return}pn().s[30]++,this.isValid(this.state.value)?pn().b[17][1]++:(pn().b[17][0]++,pn().s[31]++,this.isValid(this.props.value)?(pn().b[18][0]++,pn().s[32]++,this.changeValue(this.props.value),pn().s[33]++,this.setState({dirtyValue:this.props.value})):(pn().b[18][1]++,pn().s[34]++,this.changeValue(void 0),pn().s[35]++,this.setState({dirtyValue:void 0})))}));Kn(this,"onChangeRange",(pn().s[36]++,e=>{pn().f[5]++;let n=(pn().s[37]++,parseFloat(e.target.value));const i=(pn().s[38]++,this.props.rangeStep);let o=(pn().s[39]++,n);if(pn().s[40]++,i){pn().b[19][0]++;const s=(pn().s[41]++,n%i);pn().s[42]++,this._keyboardEvent?(pn().b[20][0]++,pn().s[43]++,n<+this.state.dirtyValue?(pn().b[21][0]++,pn().s[44]++,n=this.state.value-i):(pn().b[21][1]++,pn().s[45]++,n=this.state.value+i),pn().s[46]++,o=n):(pn().b[20][1]++,pn().s[47]++,s<i/2?(pn().b[22][0]++,pn().s[48]++,n=n-s):(pn().b[22][1]++,pn().s[49]++,n=n+(i-s)))}else pn().b[19][1]++;pn().s[50]++,this._keyboardEvent=!1,pn().s[51]++,n=Math.max(this.props.min,Math.min(this.props.max,n)),pn().s[52]++,this.setState({value:n,dirtyValue:o}),pn().s[53]++,this.props.onChange?(pn().b[23][0]++,pn().s[54]++,this.props.onChange(n)):pn().b[23][1]++}));pn().s[3]++,this.state={uuid:+N1(),editing:!1,value:e.value,dirtyValue:e.value}}static getDerivedStateFromProps(e,n){return pn().f[1]++,pn().s[4]++,pn().b[1][0]++,!n.editing&&(pn().b[1][1]++,e.value!==n.value)?(pn().b[0][0]++,pn().s[5]++,{value:e.value,dirtyValue:e.value}):(pn().b[0][1]++,pn().s[6]++,null)}changeValue(e){pn().f[2]++;const n=(pn().s[7]++,pn().b[3][0]++,e===""||(pn().b[3][1]++,e===void 0)?(pn().b[2][0]++,void 0):(pn().b[2][1]++,+e)),i=(pn().s[8]++,this.props.value!==n);pn().s[9]++,pn().b[5][0]++,this.isValid(n)&&(pn().b[5][1]++,i)?(pn().b[4][0]++,pn().s[10]++,this.props.onChange?(pn().b[6][0]++,pn().s[11]++,this.props.onChange(n)):pn().b[6][1]++,pn().s[12]++,this.setState({value:n})):(pn().b[4][1]++,pn().s[13]++,pn().b[8][0]++,!this.isValid(n)&&(pn().b[8][1]++,i)?(pn().b[7][0]++,pn().s[14]++,this.setState({value:void 0})):pn().b[7][1]++),pn().s[15]++,this.setState({dirtyValue:e===""?(pn().b[9][0]++,void 0):(pn().b[9][1]++,e)})}isValid(e){if(pn().f[3]++,pn().s[16]++,e===void 0)return pn().b[10][0]++,pn().s[17]++,!0;pn().b[10][1]++;const n=(pn().s[18]++,+e);return pn().s[19]++,isNaN(n)?(pn().b[11][0]++,pn().s[20]++,!1):(pn().b[11][1]++,pn().s[21]++,pn().b[13][0]++,!isNaN(this.props.min)&&(pn().b[13][1]++,n<this.props.min)?(pn().b[12][0]++,pn().s[22]++,!1):(pn().b[12][1]++,pn().s[23]++,pn().b[15][0]++,!isNaN(this.props.max)&&(pn().b[15][1]++,n>this.props.max)?(pn().b[14][0]++,pn().s[24]++,!1):(pn().b[14][1]++,pn().s[25]++,!0)))}render(){var e,n;if(pn().f[6]++,pn().s[55]++,pn().b[25][0]++,Object.prototype.hasOwnProperty.call(this.props,"min")&&(pn().b[25][1]++,Object.prototype.hasOwnProperty.call(this.props,"max"))&&(pn().b[25][2]++,this.props.min!==void 0)&&(pn().b[25][3]++,this.props.max!==void 0)&&(pn().b[25][4]++,this.props.allowRange)){pn().b[24][0]++;const i=(pn().s[56]++,this.state.editing?(pn().b[26][0]++,this.state.dirtyValue):(pn().b[26][1]++,this.state.value)),o=(pn().s[57]++,this.props.default===void 0?(pn().b[27][0]++,""):(pn().b[27][1]++,this.props.default));let s;return pn().s[58]++,this.state.editingRange?(pn().b[28][0]++,pn().s[59]++,s=this.state.value):(pn().b[28][1]++,pn().s[60]++,s=i),pn().s[61]++,ue.jsxs("div",{className:"maputnik-number-container",children:[ue.jsx("input",{className:"maputnik-number-range",type:"range",max:this.props.max,min:this.props.min,step:"any",spellCheck:"false",value:i===void 0?(pn().b[29][0]++,o):(pn().b[29][1]++,i),onChange:this.onChangeRange,onKeyDown:()=>{pn().f[7]++,pn().s[62]++,this._keyboardEvent=!0},onPointerDown:()=>{pn().f[8]++,pn().s[63]++,this.setState({editing:!0,editingRange:!0})},onPointerUp:()=>{pn().f[9]++,pn().s[64]++,this.setState({editing:!1,editingRange:!1})},onBlur:()=>{pn().f[10]++,pn().s[65]++,this.setState({editing:!1,editingRange:!1,dirtyValue:this.state.value})},"data-wd-key":this.props["data-wd-key"]+"-range"},"range"),ue.jsx("input",{type:"text",spellCheck:"false",className:"maputnik-number",placeholder:(e=this.props.default)==null?void 0:e.toString(),value:s===void 0?(pn().b[30][0]++,""):(pn().b[30][1]++,s),onFocus:a=>{pn().f[11]++,pn().s[66]++,this.setState({editing:!0})},onChange:a=>{pn().f[12]++,pn().s[67]++,this.changeValue(a.target.value)},onBlur:a=>{pn().f[13]++,pn().s[68]++,this.setState({editing:!1}),pn().s[69]++,this.resetValue()},"data-wd-key":this.props["data-wd-key"]+"-text"},"text")]})}else{pn().b[24][1]++;const i=(pn().s[70]++,this.state.editing?(pn().b[31][0]++,this.state.dirtyValue):(pn().b[31][1]++,this.state.value));return pn().s[71]++,ue.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",className:"maputnik-number",placeholder:(n=this.props.default)==null?void 0:n.toString(),value:i===void 0?(pn().b[32][0]++,""):(pn().b[32][1]++,i),onChange:o=>(pn().f[14]++,pn().s[72]++,this.changeValue(o.target.value)),onFocus:()=>{pn().f[15]++,pn().s[73]++,this.setState({editing:!0})},onBlur:this.resetValue,required:this.props.required,"data-wd-key":this.props["data-wd-key"]})}}}Kn(Tp,"defaultProps",(pn().s[0]++,{rangeStep:1}));function mp(){var r="/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",t="e85f7924976070cbab7795bce9cf0e191e4a6b5e",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return mp=function(){return s},s}mp();class GO extends Zn.Component{constructor(){super(...arguments);Kn(this,"onChange",(mp().s[1]++,()=>{mp().f[0]++,mp().s[2]++,this.props.onChange(!this.props.value)}))}render(){return mp().f[1]++,mp().s[3]++,ue.jsxs("div",{className:"maputnik-checkbox-wrapper",children:[ue.jsx("input",{className:"maputnik-checkbox",type:"checkbox",style:this.props.style,onChange:this.onChange,onClick:this.onChange,checked:this.props.value}),ue.jsx("div",{className:"maputnik-checkbox-box",children:ue.jsx("svg",{style:{display:this.props.value?(mp().b[0][0]++,"inline"):(mp().b[0][1]++,"none")},className:"maputnik-checkbox-icon",viewBox:"0 0 32 32",children:ue.jsx("path",{d:"M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z"})})})]})}}Kn(GO,"defaultProps",(mp().s[0]++,{value:!1}));function $r(){var r="/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",t="9ed81d69001830f70ea45ac1502cde5125167d89",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return $r=function(){return s},s}$r();var oS;let Sj=(oS=class extends Zn.Component{constructor(t){$r().f[0]++,$r().s[1]++,super(t),$r().s[2]++,this.state={value:this.props.value.slice(0),initialPropsValue:this.props.value.slice(0)}}static getDerivedStateFromProps(t,e){$r().f[1]++;const n=($r().s[3]++,[]),i=($r().s[4]++,e.initialPropsValue.slice(0));return $r().s[5]++,Array(t.length).fill(null).map((o,s)=>{$r().f[2]++,$r().s[6]++,t.value[s]===e.initialPropsValue[s]?($r().b[0][0]++,$r().s[7]++,n[s]=e.value[s]):($r().b[0][1]++,$r().s[8]++,n[s]=e.value[s],$r().s[9]++,i[s]=e.value[s])}),$r().s[10]++,{value:n,initialPropsValue:i}}isComplete(t){return $r().f[3]++,$r().s[11]++,Array(this.props.length).fill(null).every((e,n)=>{$r().f[4]++;const i=($r().s[12]++,t[n]);return $r().s[13]++,$r().b[1][0]++,!(i===void 0||($r().b[1][1]++,i===""))})}changeValue(t,e){$r().f[5]++;const n=($r().s[14]++,this.state.value.slice(0));$r().s[15]++,n[t]=e,$r().s[16]++,this.setState({value:n},()=>{$r().f[6]++,$r().s[17]++,$r().b[3][0]++,this.isComplete(n)&&($r().b[3][1]++,this.props.onChange)?($r().b[2][0]++,$r().s[18]++,this.props.onChange(n)):($r().b[2][1]++,$r().s[19]++,this.props.onChange?($r().b[4][0]++,$r().s[20]++,this.props.onChange(void 0)):$r().b[4][1]++)})}render(){$r().f[7]++;const{value:t}=($r().s[21]++,this.state),e=($r().s[22]++,$r().b[5][0]++,t.length>0&&($r().b[5][1]++,!t.every(i=>($r().f[8]++,$r().s[23]++,$r().b[6][0]++,i===""||($r().b[6][1]++,i===void 0))))),n=($r().s[24]++,Array(this.props.length).fill(null).map((i,o)=>($r().f[9]++,$r().s[25]++,this.props.type==="number"?($r().b[7][0]++,$r().s[26]++,ue.jsx(Tp,{default:($r().b[9][0]++,e||($r().b[9][1]++,!this.props.default)?($r().b[8][0]++,void 0):($r().b[8][1]++,this.props.default[o])),value:t[o],required:e?($r().b[10][0]++,!0):($r().b[10][1]++,!1),onChange:s=>($r().f[10]++,$r().s[27]++,this.changeValue(o,s)),"aria-label":($r().b[11][0]++,this.props["aria-label"]||($r().b[11][1]++,this.props.label))},o)):($r().b[7][1]++,$r().s[28]++,ue.jsx(ff,{default:($r().b[13][0]++,e||($r().b[13][1]++,!this.props.default)?($r().b[12][0]++,void 0):($r().b[12][1]++,this.props.default[o])),value:t[o],required:e?($r().b[14][0]++,!0):($r().b[14][1]++,!1),onChange:this.changeValue.bind(this,o),"aria-label":($r().b[15][0]++,this.props["aria-label"]||($r().b[15][1]++,this.props.label))},o)))));return $r().s[29]++,ue.jsx("div",{className:"maputnik-array",children:n})}},Kn(oS,"defaultProps",($r().s[0]++,{value:[],default:[]})),oS);function Yu(){var r="/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",t="c4660c9ecb80d9f1ce71e70441154e1e765b77ab",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Yu=function(){return s},s}Yu();class Tue extends Zn.Component{render(){Yu().f[0]++;let t=(Yu().s[0]++,this.props.options);Yu().s[1]++,Yu().b[1][0]++,t.length>0&&(Yu().b[1][1]++,!Array.isArray(t[0]))?(Yu().b[0][0]++,Yu().s[2]++,t=t.map(i=>(Yu().f[1]++,Yu().s[3]++,[i,i]))):Yu().b[0][1]++;const e=(Yu().s[4]++,Yu().b[2][0]++,this.props.value||(Yu().b[2][1]++,t[0][0])),n=(Yu().s[5]++,t.map(([i,o])=>(Yu().f[2]++,Yu().s[6]++,ue.jsxs("label",{className:Ip("maputnik-radio-as-button",{"maputnik-button-selected":i===e}),children:[ue.jsx("input",{type:"radio",name:this.props.name,onChange:s=>(Yu().f[3]++,Yu().s[7]++,this.props.onChange(i)),value:i,checked:i===e}),o]},i))));return Yu().s[8]++,ue.jsx("fieldset",{className:"maputnik-multibutton","aria-label":this.props["aria-label"],children:n})}}function kl(){var r="/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",t="d905b5da4422f2b84d44f87b04fda3de421542f5",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return kl=function(){return s},s}kl();function Pue(r){kl().f[0]++;let t=(kl().s[0]++,0);return kl().s[1]++,r.forEach(([e,n])=>{kl().f[1]++,kl().s[2]++,t+=n.length}),kl().s[3]++,t}class WO extends Zn.Component{render(){kl().f[2]++;const{options:t,value:e,onChange:n,name:i,label:o}=(kl().s[4]++,this.props);return kl().s[5]++,kl().b[1][0]++,t.length<=3&&(kl().b[1][1]++,Pue(t)<=20)?(kl().b[0][0]++,kl().s[6]++,ue.jsx(Tue,{name:i,options:t,value:(kl().b[2][0]++,e||(kl().b[2][1]++,this.props.default)),onChange:n,"aria-label":(kl().b[3][0]++,this.props["aria-label"]||(kl().b[3][1]++,o))})):(kl().b[0][1]++,kl().s[7]++,ue.jsx(cg,{options:t,value:(kl().b[4][0]++,e||(kl().b[4][1]++,this.props.default)),onChange:n,"aria-label":(kl().b[5][0]++,this.props["aria-label"]||(kl().b[5][1]++,o))}))}}function O1(){var r="/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",t="d603f5ded455e8f3bb5709d22f215a115aa4ac65",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return O1=function(){return s},s}O1();class Kue extends Zn.Component{render(){O1().f[0]++;const t=(O1().s[0]++,this.props.t);return O1().s[1]++,ue.jsxs("div",{className:"SmallError",children:[t("Error:")," ",this.props.children]})}}const MM=(O1().s[2]++,qa()(Kue));function ao(){var r="/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",t="3908e8b0136f6981013335eeedb3fda3fb571648",e=globalThis,n="__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:60,column:3}},20:{start:{line:56,column:4},end:{line:58,column:7}},21:{start:{line:59,column:4},end:{line:59,column:52}},22:{start:{line:59,column:28},end:{line:59,column:52}},23:{start:{line:61,column:13},end:{line:66,column:3}},24:{start:{line:62,column:4},end:{line:64,column:7}},25:{start:{line:65,column:4},end:{line:65,column:29}},26:{start:{line:68,column:4},end:{line:79,column:9}},27:{start:{line:82,column:17},end:{line:82,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:60,column:3}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:61,column:13},end:{line:61,column:14}},loc:{start:{line:61,column:22},end:{line:66,column:3}},line:61},6:{name:"(anonymous_6)",decl:{start:{line:67,column:2},end:{line:67,column:3}},loc:{start:{line:67,column:11},end:{line:80,column:3}},line:67}},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:59,column:52}},type:"if",locations:[{start:{line:59,column:4},end:{line:59,column:52}},{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,QAAS,MAAK,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:"3908e8b0136f6981013335eeedb3fda3fb571648"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ao=function(){return s},s}ao();function SM(r,t){if(ao().f[0]++,ao().s[0]++,r===""){ao().b[0][0]++,ao().s[1]++;return}else ao().b[0][1]++;let e;ao().s[2]++;const n=s=>{ao().f[1]++,ao().s[3]++;try{const a=(ao().s[4]++,new URL(s));return ao().s[5]++,a.protocol}catch{ao().s[6]++;return}},i=(ao().s[7]++,n(r)),o=(ao().s[8]++,window.location.protocol==="https:");return ao().s[9]++,i?(ao().b[1][1]++,ao().s[13]++,ao().b[4][0]++,i&&(ao().b[4][1]++,i==="http:")&&(ao().b[4][2]++,window.location.protocol==="https:")?(ao().b[3][0]++,ao().s[14]++,e=ue.jsx(MM,{children:ue.jsxs(Jm,{t,children:["CORS policy won't allow fetching resources served over http from https, use a ",ue.jsx("code",{children:"https://"})," domain"]})})):ao().b[3][1]++):(ao().b[1][0]++,ao().s[10]++,o?(ao().b[2][0]++,ao().s[11]++,e=ue.jsx(MM,{children:ue.jsxs(Jm,{t,children:["Must provide protocol: ",ue.jsx("code",{children:"https://"})]})})):(ao().b[2][1]++,ao().s[12]++,e=ue.jsx(MM,{children:ue.jsxs(Jm,{t,children:["Must provide protocol: ",ue.jsx("code",{children:"http://"})," or ",ue.jsx("code",{children:"https://"})]})}))),ao().s[15]++,e}class Ej extends Zn.Component{constructor(e){ao().f[3]++,ao().s[17]++;super(e);Kn(this,"onInput",(ao().s[19]++,e=>{ao().f[4]++,ao().s[20]++,this.setState({error:SM(e,this.props.t)}),ao().s[21]++,this.props.onInput?(ao().b[5][0]++,ao().s[22]++,this.props.onInput(e)):ao().b[5][1]++}));Kn(this,"onChange",(ao().s[23]++,e=>{ao().f[5]++,ao().s[24]++,this.setState({error:SM(e,this.props.t)}),ao().s[25]++,this.props.onChange(e)}));ao().s[18]++,this.state={error:SM(e.value,e.t)}}render(){return ao().f[6]++,ao().s[26]++,ue.jsxs("div",{children:[ue.jsx(ff,{...this.props,onInput:this.onInput,onChange:this.onChange,"aria-label":this.props["aria-label"]}),this.state.error]})}}Kn(Ej,"defaultProps",(ao().s[16]++,{onInput:()=>{ao().f[2]++}}));const QO=(ao().s[27]++,qa()(Ej));function Dr(){var r="/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",t="b43f9efa2bc6409a39f030c91aca2fefba2121b9",e=globalThis,n="__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:16,column:57}},3:{start:{line:16,column:29},end:{line:16,column:57}},4:{start:{line:19,column:4},end:{line:19,column:56}},5:{start:{line:21,column:13},end:{line:35,column:3}},6:{start:{line:22,column:19},end:{line:22,column:39}},7:{start:{line:23,column:4},end:{line:33,column:5}},8:{start:{line:24,column:6},end:{line:24,column:21}},9:{start:{line:25,column:11},end:{line:33,column:5}},10:{start:{line:26,column:6},end:{line:26,column:22}},11:{start:{line:27,column:11},end:{line:33,column:5}},12:{start:{line:28,column:28},end:{line:28,column:38}},13:{start:{line:29,column:27},end:{line:29,column:59}},14:{start:{line:30,column:6},end:{line:30,column:32}},15:{start:{line:32,column:6},end:{line:32,column:22}},16:{start:{line:34,column:4},end:{line:34,column:57}},17:{start:{line:34,column:29},end:{line:34,column:57}},18:{start:{line:37,column:19},end:{line:37,column:39}},19:{start:{line:38,column:4},end:{line:38,column:31}},20:{start:{line:39,column:4},end:{line:39,column:86}},21:{start:{line:39,column:29},end:{line:39,column:86}},22:{start:{line:42,column:14},end:{line:42,column:26}},23:{start:{line:43,column:22},end:{line:43,column:77}},24:{start:{line:44,column:19},end:{line:104,column:6}},25:{start:{line:45,column:45},end:{line:51,column:7}},26:{start:{line:53,column:6},end:{line:91,column:7}},27:{start:{line:54,column:8},end:{line:61,column:10}},28:{start:{line:62,column:13},end:{line:91,column:7}},29:{start:{line:63,column:8},end:{line:70,column:10}},30:{start:{line:71,column:13},end:{line:91,column:7}},31:{start:{line:72,column:24},end:{line:72,column:99}},32:{start:{line:72,column:78},end:{line:72,column:98}},33:{start:{line:73,column:8},end:{line:81,column:10}},34:{start:{line:83,column:8},end:{line:90,column:10}},35:{start:{line:92,column:6},end:{line:103,column:8}},36:{start:{line:105,column:4},end:{line:115,column:9}},37:{start:{line:118,column:26},end:{line:118,column:70}},38:{start:{line:122,column:14},end:{line:122,column:26}},39:{start:{line:123,column:4},end:{line:136,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:17,column:3}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:15},end:{line:20,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:21,column:13},end:{line:21,column:14}},loc:{start:{line:21,column:19},end:{line:35,column:3}},line:21},3:{name:"(anonymous_3)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:24},end:{line:40,column:3}},line:36},4:{name:"(anonymous_4)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:11},end:{line:116,column:3}},line:41},5:{name:"(anonymous_5)",decl:{start:{line:44,column:35},end:{line:44,column:36}},loc:{start:{line:44,column:45},end:{line:104,column:5}},line:44},6:{name:"(anonymous_6)",decl:{start:{line:72,column:70},end:{line:72,column:71}},loc:{start:{line:72,column:78},end:{line:72,column:98}},line:72},7:{name:"(anonymous_7)",decl:{start:{line:121,column:2},end:{line:121,column:3}},loc:{start:{line:121,column:11},end:{line:137,column:3}},line:121}},branchMap:{0:{loc:{start:{line:16,column:4},end:{line:16,column:57}},type:"if",locations:[{start:{line:16,column:4},end:{line:16,column:57}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:19,column:11},end:{line:19,column:55}},type:"binary-expr",locations:[{start:{line:19,column:11},end:{line:19,column:27}},{start:{line:19,column:31},end:{line:19,column:49}},{start:{line:19,column:53},end:{line:19,column:55}}],line:19},2:{loc:{start:{line:23,column:4},end:{line:33,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:33,column:5}},{start:{line:25,column:11},end:{line:33,column:5}}],line:23},3:{loc:{start:{line:25,column:11},end:{line:33,column:5}},type:"if",locations:[{start:{line:25,column:11},end:{line:33,column:5}},{start:{line:27,column:11},end:{line:33,column:5}}],line:25},4:{loc:{start:{line:27,column:11},end:{line:33,column:5}},type:"if",locations:[{start:{line:27,column:11},end:{line:33,column:5}},{start:{line:31,column:11},end:{line:33,column:5}}],line:27},5:{loc:{start:{line:34,column:4},end:{line:34,column:57}},type:"if",locations:[{start:{line:34,column:4},end:{line:34,column:57}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:34},6:{loc:{start:{line:39,column:4},end:{line:39,column:86}},type:"if",locations:[{start:{line:39,column:4},end:{line:39,column:86}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:39},7:{loc:{start:{line:39,column:49},end:{line:39,column:84}},type:"cond-expr",locations:[{start:{line:39,column:69},end:{line:39,column:75}},{start:{line:39,column:78},end:{line:39,column:84}}],line:39},8:{loc:{start:{line:53,column:6},end:{line:91,column:7}},type:"if",locations:[{start:{line:53,column:6},end:{line:91,column:7}},{start:{line:62,column:13},end:{line:91,column:7}}],line:53},9:{loc:{start:{line:59,column:26},end:{line:59,column:70}},type:"binary-expr",locations:[{start:{line:59,column:26},end:{line:59,column:50}},{start:{line:59,column:54},end:{line:59,column:70}}],line:59},10:{loc:{start:{line:62,column:13},end:{line:91,column:7}},type:"if",locations:[{start:{line:62,column:13},end:{line:91,column:7}},{start:{line:71,column:13},end:{line:91,column:7}}],line:62},11:{loc:{start:{line:68,column:26},end:{line:68,column:70}},type:"binary-expr",locations:[{start:{line:68,column:26},end:{line:68,column:50}},{start:{line:68,column:54},end:{line:68,column:70}}],line:68},12:{loc:{start:{line:71,column:13},end:{line:91,column:7}},type:"if",locations:[{start:{line:71,column:13},end:{line:91,column:7}},{start:{line:82,column:13},end:{line:91,column:7}}],line:71},13:{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},14:{loc:{start:{line:88,column:26},end:{line:88,column:70}},type:"binary-expr",locations:[{start:{line:88,column:26},end:{line:88,column:50}},{start:{line:88,column:54},end:{line:88,column:70}}],line:88}},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,SAAU,MAAK,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,SAAU,MAAK,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,SAAU,MAAK,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:"b43f9efa2bc6409a39f030c91aca2fefba2121b9"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Dr=function(){return s},s}Dr();class Rue extends Zn.Component{constructor(){super(...arguments);Kn(this,"addValue",(Dr().s[5]++,()=>{Dr().f[2]++;const e=(Dr().s[6]++,this.values.slice(0));if(Dr().s[7]++,this.props.type==="number")Dr().b[2][0]++,Dr().s[8]++,e.push(0);else if(Dr().b[2][1]++,Dr().s[9]++,this.props.type==="url")Dr().b[3][0]++,Dr().s[10]++,e.push("");else if(Dr().b[3][1]++,Dr().s[11]++,this.props.type==="enum"){Dr().b[4][0]++;const{fieldSpec:n}=(Dr().s[12]++,this.props),i=(Dr().s[13]++,Object.keys(n.values)[0]);Dr().s[14]++,e.push(i)}else Dr().b[4][1]++,Dr().s[15]++,e.push("");Dr().s[16]++,this.props.onChange?(Dr().b[5][0]++,Dr().s[17]++,this.props.onChange(e)):Dr().b[5][1]++}))}changeValue(e,n){Dr().f[0]++;const i=(Dr().s[0]++,this.values.slice(0));Dr().s[1]++,i[e]=n,Dr().s[2]++,this.props.onChange?(Dr().b[0][0]++,Dr().s[3]++,this.props.onChange(i)):Dr().b[0][1]++}get values(){return Dr().f[1]++,Dr().s[4]++,Dr().b[1][0]++,this.props.value||(Dr().b[1][1]++,this.props.default)||(Dr().b[1][2]++,[])}deleteValue(e){Dr().f[3]++;const n=(Dr().s[18]++,this.values.slice(0));Dr().s[19]++,n.splice(e,1),Dr().s[20]++,this.props.onChange?(Dr().b[6][0]++,Dr().s[21]++,this.props.onChange(n.length>0?(Dr().b[7][0]++,n):(Dr().b[7][1]++,void 0))):Dr().b[6][1]++}render(){Dr().f[4]++;const e=(Dr().s[22]++,this.props.t),n=(Dr().s[23]++,{t:e,i18n:this.props.i18n,tReady:this.props.tReady}),i=(Dr().s[24]++,this.values.map((o,s)=>{var g;Dr().f[5]++;const a=(Dr().s[25]++,ue.jsx(Due,{onClick:this.deleteValue.bind(this,s),...n}));let f;if(Dr().s[26]++,this.props.type==="url")Dr().b[8][0]++,Dr().s[27]++,f=ue.jsx(QO,{value:o,onChange:this.changeValue.bind(this,s),"aria-label":(Dr().b[9][0]++,this.props["aria-label"]||(Dr().b[9][1]++,this.props.label))});else if(Dr().b[8][1]++,Dr().s[28]++,this.props.type==="number")Dr().b[10][0]++,Dr().s[29]++,f=ue.jsx(Tp,{value:o,onChange:this.changeValue.bind(this,s),"aria-label":(Dr().b[11][0]++,this.props["aria-label"]||(Dr().b[11][1]++,this.props.label))});else if(Dr().b[10][1]++,Dr().s[30]++,this.props.type==="enum"){Dr().b[12][0]++;const b=(Dr().s[31]++,Object.keys((g=this.props.fieldSpec)==null?void 0:g.values).map(I=>(Dr().f[6]++,Dr().s[32]++,[I,MO(I)])));Dr().s[33]++,f=ue.jsx(WO,{options:b,value:o,onChange:this.changeValue.bind(this,s),"aria-label":(Dr().b[13][0]++,this.props["aria-label"]||(Dr().b[13][1]++,this.props.label))})}else Dr().b[12][1]++,Dr().s[34]++,f=ue.jsx(ff,{value:o,onChange:this.changeValue.bind(this,s),"aria-label":(Dr().b[14][0]++,this.props["aria-label"]||(Dr().b[14][1]++,this.props.label))});return Dr().s[35]++,ue.jsxs("div",{style:this.props.style,className:"maputnik-array-block",children:[ue.jsx("div",{className:"maputnik-array-block-action",children:a}),ue.jsx("div",{className:"maputnik-array-block-content",children:f})]},s)}));return Dr().s[36]++,ue.jsxs("div",{className:"maputnik-array",children:[i,ue.jsx(Ws,{className:"maputnik-array-add-value",onClick:this.addValue,children:e("Add value")})]})}}const Oj=(Dr().s[37]++,qa()(Rue));class Due extends Zn.Component{render(){Dr().f[7]++;const t=(Dr().s[38]++,this.props.t);return Dr().s[39]++,ue.jsx(Ws,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:t("Remove array item"),children:ue.jsx(yO,{label:ue.jsx(Y1,{})})})}}function fs(){var r="/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",t="cd16dc68fc42c219caf080518fd74984d4f8d81e",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return fs=function(){return s},s}fs();class Bj extends Zn.Component{get values(){fs().f[0]++;const t=(fs().s[1]++,fs().b[0][0]++,this.props.value||(fs().b[0][1]++,this.props.default)||(fs().b[0][2]++,[]));return fs().s[2]++,t[t.length-1]!==""?(fs().b[1][0]++,fs().s[3]++,t.concat("")):(fs().b[1][1]++,fs().s[4]++,t)}changeFont(t,e){fs().f[1]++;const n=(fs().s[5]++,this.values.slice(0));fs().s[6]++,n[t]=e;const i=(fs().s[7]++,n.filter(o=>(fs().f[2]++,fs().s[8]++,o!==void 0)).filter(o=>(fs().f[3]++,fs().s[9]++,o!=="")));fs().s[10]++,this.props.onChange(i)}render(){fs().f[4]++;const t=(fs().s[11]++,this.values.map((e,n)=>{var i;return fs().f[5]++,fs().s[12]++,ue.jsx("li",{children:ue.jsx(J1,{"aria-label":(fs().b[2][0]++,this.props["aria-label"]||(fs().b[2][1]++,this.props.name)),value:e,options:(i=this.props.fonts)==null?void 0:i.map(o=>(fs().f[6]++,fs().s[13]++,[o,o])),onChange:this.changeFont.bind(this,n)})},n)}));return fs().s[14]++,ue.jsx("ul",{className:"maputnik-font",children:t})}}Kn(Bj,"defaultProps",(fs().s[0]++,{fonts:[]}));function uo(){var r="/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",t="8a7e9c26497bbcdc9141a7bf10d3ed50f729d679",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return uo=function(){return s},s}uo();const Lue=(uo().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);let B1=class extends Zn.Component{childNodes(){var e,n;uo().f[0]++;const t=(uo().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:(e=this.props.fieldSpec)==null?void 0:e.default,name:this.props.fieldName,"data-wd-key":"spec-field-input:"+this.props.fieldName,onChange:i=>(uo().f[1]++,uo().s[2]++,this.props.onChange(this.props.fieldName,i)),"aria-label":this.props["aria-label"]});switch(uo().s[3]++,(n=this.props.fieldSpec)==null?void 0:n.type){case"number":return uo().b[0][0]++,uo().s[4]++,ue.jsx(Tp,{...t,min:this.props.fieldSpec.minimum,max:this.props.fieldSpec.maximum});case"enum":uo().b[0][1]++;{const i=(uo().s[5]++,Object.keys((uo().b[1][0]++,this.props.fieldSpec.values||(uo().b[1][1]++,[]))).map(o=>(uo().f[2]++,uo().s[6]++,[o,MO(o)])));return uo().s[7]++,ue.jsx(WO,{...t,options:i})}case"resolvedImage":uo().b[0][2]++;case"formatted":uo().b[0][3]++;case"string":if(uo().b[0][4]++,uo().s[8]++,Lue.indexOf(this.props.fieldName)>=0){uo().b[2][0]++;const i=(uo().s[9]++,uo().b[3][0]++,this.props.fieldSpec.values||(uo().b[3][1]++,[]));return uo().s[10]++,ue.jsx(J1,{...t,options:i.map(o=>(uo().f[3]++,uo().s[11]++,[o,o]))})}else return uo().b[2][1]++,uo().s[12]++,ue.jsx(ff,{...t});case"color":return uo().b[0][5]++,uo().s[13]++,ue.jsx(Mj,{...t});case"boolean":return uo().b[0][6]++,uo().s[14]++,ue.jsx(GO,{...t});case"array":return uo().b[0][7]++,uo().s[15]++,this.props.fieldName==="text-font"?(uo().b[4][0]++,uo().s[16]++,ue.jsx(Bj,{...t,fonts:this.props.fieldSpec.values})):(uo().b[4][1]++,uo().s[17]++,this.props.fieldSpec.length?(uo().b[5][0]++,uo().s[18]++,ue.jsx(Sj,{...t,type:this.props.fieldSpec.value,length:this.props.fieldSpec.length})):(uo().b[5][1]++,uo().s[19]++,ue.jsx(Oj,{...t,fieldSpec:this.props.fieldSpec,type:this.props.fieldSpec.value})));default:return uo().b[0][8]++,uo().s[20]++,null}}render(){return uo().f[4]++,uo().s[21]++,ue.jsx("div",{"data-wd-key":"spec-field:"+this.props.fieldName,children:this.childNodes()})}};function PA(){var r="/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",t="81a841bc0059d656029a86501c08aa823d58e2d6",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return PA=function(){return s},s}PA();class Ov extends Zn.Component{constructor(e){PA().f[0]++,PA().s[0]++;super(e);Kn(this,"_labelId");Kn(this,"onToggleDoc",(PA().s[3]++,e=>{PA().f[1]++,PA().s[4]++,this.setState({showDoc:e})}));PA().s[1]++,this._labelId=N1("fieldset_label_"),PA().s[2]++,this.state={showDoc:!1}}render(){return PA().f[2]++,PA().s[5]++,ue.jsxs("div",{className:"maputnik-input-block",role:"group","aria-labelledby":this._labelId,children:[(PA().b[0][0]++,this.props.fieldSpec&&(PA().b[0][1]++,ue.jsx("div",{className:"maputnik-input-block-label",children:ue.jsx(yO,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(PA().b[1][0]++,!this.props.fieldSpec&&(PA().b[1][1]++,ue.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),ue.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),ue.jsx("div",{className:"maputnik-input-block-content",children:this.props.children}),(PA().b[2][0]++,this.props.fieldSpec&&(PA().b[2][1]++,ue.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(PA().b[3][0]++,""):(PA().b[3][1]++,"none")},children:ue.jsx(vO,{fieldSpec:this.props.fieldSpec})})))]})}}function es(){var r="/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx",t="adadf49dc291f98804cd53f74e320ed51f276886",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return es=function(){return s},s}es();const Fue=(es().s[0]++,{color:()=>(es().f[0]++,es().s[1]++,ps),enum:({fieldSpec:r})=>(es().f[1]++,es().s[2]++,Object.keys(r.values).length<=3?(es().b[0][0]++,Ov):(es().b[0][1]++,ps)),boolean:()=>(es().f[2]++,es().s[3]++,ps),array:()=>(es().f[3]++,es().s[4]++,Ov),resolvedImage:()=>(es().f[4]++,es().s[5]++,ps),number:()=>(es().f[5]++,es().s[6]++,ps),string:()=>(es().f[6]++,es().s[7]++,ps),formatted:()=>(es().f[7]++,es().s[8]++,ps),padding:()=>(es().f[8]++,es().s[9]++,ps)});class Uue extends Zn.Component{render(){var i;es().f[9]++;const t=(es().s[10]++,(i=this.props.fieldSpec)==null?void 0:i.type),e=(es().s[11]++,Fue[t]);let n;return es().s[12]++,e?(es().b[1][0]++,es().s[13]++,n=e(this.props)):(es().b[1][1]++,es().s[14]++,console.warn("No such type for '%s'",t),es().s[15]++,n=ps),es().s[16]++,ue.jsx(n,{label:this.props.label,action:this.props.action,fieldSpec:this.props.fieldSpec,children:ue.jsx(B1,{...this.props})})}}function Zc(){var r="/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",t="e12cc9e5c91261e7ee42544334f5ab56bdde4e3a",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Zc=function(){return s},s}Zc();class jue extends Zn.Component{render(){Zc().f[0]++;const t=(Zc().s[0]++,this.props.t);let e,n,i;return Zc().s[1]++,this.props.fieldSpec.expression.parameters.includes("zoom")?(Zc().b[0][0]++,Zc().s[2]++,i=ue.jsx(Ws,{className:"maputnik-make-zoom-function",onClick:this.props.onExpressionClick,title:t("Convert to expression"),children:ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:Ev})})}),Zc().s[3]++,e=ue.jsx(Ws,{className:"maputnik-make-zoom-function",onClick:this.props.onZoomClick,title:t("Convert property into a zoom function"),children:ue.jsx(MY,{})}),Zc().s[4]++,this.props.fieldSpec["property-type"]==="data-driven"?(Zc().b[1][0]++,Zc().s[5]++,n=ue.jsx(Ws,{className:"maputnik-make-data-function",onClick:this.props.onDataClick,title:t("Convert property to data function"),children:ue.jsx(SY,{})})):Zc().b[1][1]++,Zc().s[6]++,ue.jsxs("div",{children:[i,n,e]})):(Zc().b[0][1]++,Zc().s[7]++,ue.jsx("div",{children:i}))}}const zue=(Zc().s[8]++,qa()(jue));function gp(){var r="/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",t="60f6f0f35f3e44d7e7f08e2966cfff09ee69557d",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return gp=function(){return s},s}gp();class Ij extends Zn.Component{render(){gp().f[0]++;const{errors:t,fieldName:e,fieldType:n}=(gp().s[1]++,this.props),i=(gp().s[2]++,ue.jsx(zue,{fieldSpec:this.props.fieldSpec,onZoomClick:this.props.onZoomClick,onDataClick:this.props.onDataClick,onExpressionClick:this.props.onExpressionClick})),o=(gp().s[3]++,t[n+"."+e]);return gp().s[4]++,ue.jsx(Uue,{...this.props,error:o,fieldSpec:this.props.fieldSpec,label:I2((gp().b[0][0]++,this.props.fieldName||(gp().b[0][1]++,""))),action:i})}}Kn(Ij,"defaultProps",(gp().s[0]++,{errors:{}}));function ih(){var r="/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",t="e8906f642b33ab7d7a780fc0db870f7e4872d29c",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ih=function(){return s},s}ih();function kj(r,t){ih().f[0]++;const e=(ih().s[0]++,+r),n=(ih().s[1]++,+t);return ih().s[2]++,e<n?(ih().b[0][0]++,ih().s[3]++,-1):(ih().b[0][1]++,ih().s[4]++,e>n?(ih().b[1][0]++,ih().s[5]++,1):(ih().b[1][1]++,ih().s[6]++,0))}function Uf(){var r="/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",t="2f98128f0f990b67a049c58486c1fab4310fbcfa",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Uf=function(){return s},s}Uf();function rf(r){if(Uf().f[0]++,Uf().s[0]++,Object.prototype.hasOwnProperty.call(r,"default"))return Uf().b[0][0]++,Uf().s[1]++,r.default;Uf().b[0][1]++;const t=(Uf().s[2]++,{color:"#000000",string:"",boolean:!1,number:0,array:[]});return Uf().s[3]++,Uf().b[1][0]++,t[r.type]||(Uf().b[1][1]++,"")}function I1(){var r="/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",t="04a32613b456a577be3ef20dcd48d43233f27837",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return I1=function(){return s},s}I1();class Nue extends Zn.Component{render(){I1().f[0]++;const t=(I1().s[0]++,this.props.t);return I1().s[1]++,ue.jsx(Ws,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:t("Remove zoom level from stop"),children:ue.jsx(Y1,{})})}}const Tj=(I1().s[2]++,qa()(Nue));function hn(){var r="/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",t="97b6de35ac4a8f739cf06eabc39facf249622fab",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return hn=function(){return s},s}hn();function YP(r,t){hn().f[0]++;let e;return hn().s[0]++,hn().b[1][0]++,r.value&&(hn().b[1][1]++,r.value.stops)?(hn().b[0][0]++,hn().s[1]++,r.value.stops.forEach((n,i)=>{hn().f[1]++,hn().s[2]++,Object.prototype.hasOwnProperty.call(t.refs,i)?hn().b[2][1]++:(hn().b[2][0]++,hn().s[3]++,e?hn().b[3][1]++:(hn().b[3][0]++,hn().s[4]++,e={...t}),hn().s[5]++,e[i]=N1("stop-"))})):hn().b[0][1]++,hn().s[6]++,e}class Gue extends Zn.Component{constructor(){super(...arguments);Kn(this,"state",(hn().s[7]++,{refs:{}}));Kn(this,"onChange",(hn().s[32]++,(e,n)=>{if(hn().f[11]++,hn().s[33]++,n.type==="identity")hn().b[9][0]++,hn().s[34]++,n={type:n.type,property:n.property};else{hn().b[9][1]++;const i=(hn().s[35]++,n.type==="categorical"?(hn().b[10][0]++,""):(hn().b[10][1]++,0));hn().s[36]++,n={property:"",type:n.type,stops:[[{zoom:6,value:i},rf(this.props.fieldSpec)],[{zoom:10,value:i},rf(this.props.fieldSpec)]],...n}}hn().s[37]++,this.props.onChange(e,n)}))}componentDidMount(){hn().f[2]++;const e=(hn().s[8]++,YP(this.props,this.state));hn().s[9]++,e?(hn().b[4][0]++,hn().s[10]++,this.setState({refs:e})):hn().b[4][1]++}static getDerivedStateFromProps(e,n){hn().f[3]++;const i=(hn().s[11]++,YP(e,n));return hn().s[12]++,i?(hn().b[5][0]++,hn().s[13]++,{refs:i}):(hn().b[5][1]++,hn().s[14]++,null)}getFieldFunctionType(e){return hn().f[4]++,hn().s[15]++,e.expression.interpolated?(hn().b[6][0]++,hn().s[16]++,"exponential"):(hn().b[6][1]++,hn().s[17]++,e.type==="number"?(hn().b[7][0]++,hn().s[18]++,"interval"):(hn().b[7][1]++,hn().s[19]++,"categorical"))}getDataFunctionTypes(e){return hn().f[5]++,hn().s[20]++,e.expression.interpolated?(hn().b[8][0]++,hn().s[21]++,["interpolate","categorical","interval","exponential","identity"]):(hn().b[8][1]++,hn().s[22]++,["categorical","interval","identity"])}orderStopsByZoom(e){hn().f[6]++;const n=(hn().s[23]++,e.map((o,s)=>(hn().f[7]++,hn().s[24]++,{ref:this.state.refs[s],data:o})).sort((o,s)=>(hn().f[8]++,hn().s[25]++,kj(o.data[0].zoom,s.data[0].zoom)))),i=(hn().s[26]++,{});return hn().s[27]++,n.forEach((o,s)=>{hn().f[9]++,hn().s[28]++,i[s]=o.ref}),hn().s[29]++,this.setState({refs:i}),hn().s[30]++,n.map(o=>(hn().f[10]++,hn().s[31]++,o.data))}changeStop(e,n,i){var f;hn().f[12]++;const o=(hn().s[38]++,hn().b[11][0]++,((f=this.props.value)==null?void 0:f.stops.slice(0))||(hn().b[11][1]++,[]));hn().s[39]++,o[e]=[{value:n.value,zoom:n.zoom===void 0?(hn().b[12][0]++,0):(hn().b[12][1]++,n.zoom)},i];const s=(hn().s[40]++,this.orderStopsByZoom(o)),a=(hn().s[41]++,{...this.props.value,stops:s});hn().s[42]++,this.onChange(this.props.fieldName,a)}changeBase(e){hn().f[13]++;const n=(hn().s[43]++,{...this.props.value,base:e});hn().s[44]++,n.base===void 0?(hn().b[13][0]++,hn().s[45]++,delete n.base):hn().b[13][1]++,hn().s[46]++,this.props.onChange(this.props.fieldName,n)}changeDataType(e){hn().f[14]++,hn().s[47]++,hn().b[15][0]++,e==="interpolate"&&(hn().b[15][1]++,this.props.onChangeToZoomFunction)?(hn().b[14][0]++,hn().s[48]++,this.props.onChangeToZoomFunction()):(hn().b[14][1]++,hn().s[49]++,this.onChange(this.props.fieldName,{...this.props.value,type:e}))}changeDataProperty(e,n){hn().f[15]++,hn().s[50]++,n?(hn().b[16][0]++,hn().s[51]++,this.props.value[e]=n):(hn().b[16][1]++,hn().s[52]++,delete this.props.value[e]),hn().s[53]++,this.onChange(this.props.fieldName,this.props.value)}render(){var i,o,s,a,f,g,b,I;hn().f[16]++;const e=(hn().s[54]++,this.props.t);hn().s[55]++,typeof((i=this.props.value)==null?void 0:i.type)>"u"?(hn().b[17][0]++,hn().s[56]++,this.props.value.type=this.getFieldFunctionType(this.props.fieldSpec)):hn().b[17][1]++;let n;return hn().s[57]++,(o=this.props.value)!=null&&o.stops?(hn().b[18][0]++,hn().s[58]++,n=this.props.value.stops.map((S,B)=>{var X,G;hn().f[17]++;const P=(hn().s[59]++,typeof S[0]=="object"?(hn().b[19][0]++,S[0].zoom):(hn().b[19][1]++,void 0)),U=(hn().s[60]++,this.state.refs[B]),j=(hn().s[61]++,typeof S[0]=="object"?(hn().b[20][0]++,S[0].value):(hn().b[20][1]++,S[0])),q=(hn().s[62]++,S[1]),W=(hn().s[63]++,ue.jsx(Tj,{onClick:(X=this.props.onDeleteStop)==null?void 0:X.bind(this,B)})),ee=(hn().s[64]++,{"aria-label":e("Input value"),label:e("Data value"),value:j,onChange:ae=>(hn().f[18]++,hn().s[65]++,this.changeStop(B,{zoom:P,value:ae},q))});let J;hn().s[66]++,((G=this.props.value)==null?void 0:G.type)==="categorical"?(hn().b[21][0]++,hn().s[67]++,J=ue.jsx(ff,{...ee})):(hn().b[21][1]++,hn().s[68]++,J=ue.jsx(Tp,{...ee}));let $=(hn().s[69]++,null);return hn().s[70]++,P!==void 0?(hn().b[22][0]++,hn().s[71]++,$=ue.jsx("div",{children:ue.jsx(Tp,{"aria-label":"Zoom",value:P,onChange:ae=>(hn().f[19]++,hn().s[72]++,this.changeStop(B,{zoom:ae,value:j},q)),min:0,max:22})})):hn().b[22][1]++,hn().s[73]++,ue.jsxs("tr",{children:[ue.jsx("td",{children:$}),ue.jsx("td",{children:J}),ue.jsx("td",{children:ue.jsx(B1,{"aria-label":e("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:q,onChange:(ae,ge)=>(hn().f[20]++,hn().s[74]++,this.changeStop(B,{zoom:P,value:j},ge))})}),ue.jsx("td",{children:W})]},U)})):hn().b[18][1]++,hn().s[75]++,ue.jsx("div",{className:"maputnik-data-spec-block",children:ue.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[ue.jsx("legend",{children:I2(this.props.fieldName)}),ue.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[ue.jsx(ps,{label:e("Function"),children:ue.jsx("div",{className:"maputnik-data-spec-property-input",children:ue.jsx(cg,{value:this.props.value.type,onChange:S=>(hn().f[21]++,hn().s[76]++,this.changeDataType(S)),title:e("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})},"function"),(hn().b[23][0]++,((s=this.props.value)==null?void 0:s.type)!=="identity"&&(hn().b[23][1]++,ue.jsx(ps,{label:e("Base"),children:ue.jsx("div",{className:"maputnik-data-spec-property-input",children:ue.jsx(B1,{fieldName:"base",fieldSpec:Jo.function.base,value:(a=this.props.value)==null?void 0:a.base,onChange:(S,B)=>(hn().f[22]++,hn().s[77]++,this.changeBase(B))})})},"base"))),ue.jsx(ps,{label:"Property",children:ue.jsx("div",{className:"maputnik-data-spec-property-input",children:ue.jsx(ff,{value:(f=this.props.value)==null?void 0:f.property,title:e("Input a data property to base styles off of."),onChange:S=>(hn().f[23]++,hn().s[78]++,this.changeDataProperty("property",S))})})},"property"),(hn().b[24][0]++,n&&(hn().b[24][1]++,ue.jsx(ps,{label:e("Default"),children:ue.jsx(B1,{fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:(g=this.props.value)==null?void 0:g.default,onChange:(S,B)=>(hn().f[24]++,hn().s[79]++,this.changeDataProperty("default",B))})},"default"))),(hn().b[25][0]++,n&&(hn().b[25][1]++,ue.jsx("div",{className:"maputnik-function-stop",children:ue.jsxs("table",{className:"maputnik-function-stop-table",children:[ue.jsx("caption",{children:e("Stops")}),ue.jsx("thead",{children:ue.jsxs("tr",{children:[ue.jsx("th",{children:e("Zoom")}),ue.jsx("th",{children:e("Input value")}),ue.jsx("th",{rowSpan:2,children:e("Output value")})]})}),ue.jsx("tbody",{children:n})]})}))),ue.jsxs("div",{className:"maputnik-toolbox",children:[(hn().b[26][0]++,n&&(hn().b[26][1]++,ue.jsxs(Ws,{className:"maputnik-add-stop",onClick:(b=this.props.onAddStop)==null?void 0:b.bind(this),children:[ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:xO})})," ",e("Add stop")]}))),ue.jsxs(Ws,{className:"maputnik-add-stop",onClick:(I=this.props.onExpressionClick)==null?void 0:I.bind(this),children:[ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:Ev})})," ",e("Convert to expression")]})]})]})]})})}}const Wue=(hn().s[80]++,qa()(Gue));function vr(){var r="/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",t="6a4c93b52ca21ec4b555a0d2906ee27fc49f34f8",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return vr=function(){return s},s}vr();function $P(r,t){vr().f[0]++;let e=(vr().s[0]++,{});return vr().s[1]++,vr().b[1][0]++,r.value&&(vr().b[1][1]++,r.value.stops)?(vr().b[0][0]++,vr().s[2]++,r.value.stops.forEach((n,i)=>{vr().f[1]++,vr().s[3]++,Object.prototype.hasOwnProperty.call(!t.refs,i)?(vr().b[2][0]++,vr().s[4]++,e?vr().b[3][1]++:(vr().b[3][0]++,vr().s[5]++,e={...t}),vr().s[6]++,e[i]=N1("stop-")):(vr().b[2][1]++,vr().s[7]++,e[i]=t.refs[i])})):vr().b[0][1]++,vr().s[8]++,e}class Pj extends Zn.Component{constructor(){super(...arguments);Kn(this,"state",(vr().s[10]++,{refs:{}}));Kn(this,"changeDataType",(vr().s[36]++,e=>{vr().f[11]++,vr().s[37]++,vr().b[8][0]++,e!=="interpolate"&&(vr().b[8][1]++,this.props.onChangeToDataFunction)?(vr().b[7][0]++,vr().s[38]++,this.props.onChangeToDataFunction(e)):vr().b[7][1]++}))}componentDidMount(){vr().f[2]++;const e=(vr().s[11]++,$P(this.props,this.state));vr().s[12]++,e?(vr().b[4][0]++,vr().s[13]++,this.setState({refs:e})):vr().b[4][1]++}static getDerivedStateFromProps(e,n){vr().f[3]++;const i=(vr().s[14]++,$P(e,n));return vr().s[15]++,i?(vr().b[5][0]++,vr().s[16]++,{refs:i}):(vr().b[5][1]++,vr().s[17]++,null)}orderStopsByZoom(e){vr().f[4]++;const n=(vr().s[18]++,e.map((o,s)=>(vr().f[5]++,vr().s[19]++,{ref:this.state.refs[s],data:o})).sort((o,s)=>(vr().f[6]++,vr().s[20]++,kj(o.data[0],s.data[0])))),i=(vr().s[21]++,{});return vr().s[22]++,n.forEach((o,s)=>{vr().f[7]++,vr().s[23]++,i[s]=o.ref}),vr().s[24]++,this.setState({refs:i}),vr().s[25]++,n.map(o=>(vr().f[8]++,vr().s[26]++,o.data))}changeZoomStop(e,n,i){vr().f[9]++;const o=(vr().s[27]++,this.props.value.stops.slice(0));vr().s[28]++,o[e]=[n,i];const s=(vr().s[29]++,this.orderStopsByZoom(o)),a=(vr().s[30]++,{...this.props.value,stops:s});vr().s[31]++,this.props.onChange(this.props.fieldName,a)}changeBase(e){vr().f[10]++;const n=(vr().s[32]++,{...this.props.value,base:e});vr().s[33]++,n.base===void 0?(vr().b[6][0]++,vr().s[34]++,delete n.base):vr().b[6][1]++,vr().s[35]++,this.props.onChange(this.props.fieldName,n)}render(){var i,o,s,a;vr().f[12]++;const e=(vr().s[39]++,this.props.t),n=(vr().s[40]++,(i=this.props.value)==null?void 0:i.stops.map((f,g)=>{var B;vr().f[13]++;const b=(vr().s[41]++,f[0]),I=(vr().s[42]++,f[1]),S=(vr().s[43]++,ue.jsx(Tj,{onClick:(B=this.props.onDeleteStop)==null?void 0:B.bind(this,g)}));return vr().s[44]++,ue.jsxs("tr",{children:[ue.jsx("td",{children:ue.jsx(Tp,{"aria-label":e("Zoom"),value:b,onChange:P=>(vr().f[14]++,vr().s[45]++,this.changeZoomStop(g,P,I)),min:0,max:22})}),ue.jsx("td",{children:ue.jsx(B1,{"aria-label":e("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:I,onChange:(P,U)=>(vr().f[15]++,vr().s[46]++,this.changeZoomStop(g,b,U))})}),ue.jsx("td",{children:S})]},`${f[0]}-${f[1]}`)}));return vr().s[47]++,ue.jsx("div",{className:"maputnik-data-spec-block",children:ue.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[ue.jsx("legend",{children:I2(this.props.fieldName)}),ue.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[ue.jsx(ps,{label:e("Function"),children:ue.jsx("div",{className:"maputnik-data-spec-property-input",children:ue.jsx(cg,{value:"interpolate",onChange:f=>(vr().f[16]++,vr().s[48]++,this.changeDataType(f)),title:e("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})}),ue.jsx(ps,{label:e("Base"),children:ue.jsx("div",{className:"maputnik-data-spec-property-input",children:ue.jsx(B1,{fieldName:"base",fieldSpec:Jo.function.base,value:(o=this.props.value)==null?void 0:o.base,onChange:(f,g)=>(vr().f[17]++,vr().s[49]++,this.changeBase(g))})})}),ue.jsx("div",{className:"maputnik-function-stop",children:ue.jsxs("table",{className:"maputnik-function-stop-table maputnik-function-stop-table--zoom",children:[ue.jsx("caption",{children:e("Stops")}),ue.jsx("thead",{children:ue.jsxs("tr",{children:[ue.jsx("th",{children:e("Zoom")}),ue.jsx("th",{rowSpan:2,children:e("Output value")})]})}),ue.jsx("tbody",{children:n})]})}),ue.jsxs("div",{className:"maputnik-toolbox",children:[ue.jsxs(Ws,{className:"maputnik-add-stop",onClick:(s=this.props.onAddStop)==null?void 0:s.bind(this),children:[ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:xO})})," ",e("Add stop")]}),ue.jsxs(Ws,{className:"maputnik-add-stop",onClick:(a=this.props.onExpressionClick)==null?void 0:a.bind(this),children:[ue.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:ue.jsx("path",{fill:"currentColor",d:Ev})})," ",e("Convert to expression")]})]})]})]})})}getDataFunctionTypes(e){return vr().f[18]++,vr().s[50]++,e["property-type"]==="data-driven"?(vr().b[9][0]++,vr().s[51]++,["interpolate","categorical","interval","exponential","identity"]):(vr().b[9][1]++,vr().s[52]++,["interpolate"])}}Kn(Pj,"defaultProps",(vr().s[9]++,{errors:{}}));const Que=(vr().s[53]++,qa()(Pj));function Ft(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",t="36be9049018d9eb4ab6b3a8eeeb8db87a4e7a5ee",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ft=function(){return s},s}Ft();function VP(r){return Ft().f[0]++,Ft().s[0]++,Ft().b[0][0]++,Array.isArray(r)&&(Ft().b[0][1]++,r.length===2)&&(Ft().b[0][2]++,r[0]==="literal")}function HP(r){return Ft().f[1]++,Ft().s[1]++,Ft().b[1][0]++,Array.isArray(r)&&(Ft().b[1][1]++,r.length===2)&&(Ft().b[1][2]++,r[0]==="get")}function que(r){return Ft().f[2]++,Ft().s[2]++,Ft().b[2][0]++,typeof r=="object"&&(Ft().b[2][1]++,r.stops)&&(Ft().b[2][2]++,typeof r.property>"u")&&(Ft().b[2][3]++,Array.isArray(r.stops))&&(Ft().b[2][4]++,r.stops.length>1)&&(Ft().b[2][5]++,r.stops.every(t=>(Ft().f[3]++,Ft().s[3]++,Ft().b[3][0]++,Array.isArray(t)&&(Ft().b[3][1]++,t.length===2))))}function Kj(r){return Ft().f[4]++,Ft().s[4]++,Ft().b[4][0]++,typeof r=="object"&&(Ft().b[4][1]++,r.type==="identity")&&(Ft().b[4][2]++,Object.prototype.hasOwnProperty.call(r,"property"))}function Yue(r){return Ft().f[5]++,Ft().s[5]++,Ft().b[5][0]++,typeof r=="object"&&(Ft().b[5][1]++,r.stops)&&(Ft().b[5][2]++,typeof r.property<"u")&&(Ft().b[5][3]++,r.stops.length>1)&&(Ft().b[5][4]++,Array.isArray(r.stops))&&(Ft().b[5][5]++,r.stops.every(t=>(Ft().f[6]++,Ft().s[6]++,Ft().b[6][0]++,Array.isArray(t)&&(Ft().b[6][1]++,t.length===2)&&(Ft().b[6][2]++,typeof t[0]=="object"))))}function $ue(r){return Ft().f[7]++,Ft().s[7]++,Ft().b[7][0]++,Kj(r)||(Ft().b[7][1]++,Yue(r))}function qO(r){Ft().f[8]++;const t=(Ft().s[8]++,["string","boolean","number"]);return Ft().s[9]++,t.includes(typeof r)}function Vue(r){return Ft().f[9]++,Ft().s[10]++,Array.isArray(r)?(Ft().b[8][0]++,Ft().s[11]++,r.every(qO)):(Ft().b[8][1]++,Ft().s[12]++,!1)}function ZP(r,t=(Ft().b[9][0]++,{})){return Ft().f[10]++,Ft().s[13]++,r===void 0?(Ft().b[10][0]++,Ft().s[14]++,"value"):(Ft().b[10][1]++,Ft().s[15]++,qO(r)?(Ft().b[11][0]++,Ft().s[16]++,"value"):(Ft().b[11][1]++,Ft().s[17]++,Ft().b[13][0]++,t.type==="array"&&(Ft().b[13][1]++,Vue(r))?(Ft().b[12][0]++,Ft().s[18]++,"value"):(Ft().b[12][1]++,Ft().s[19]++,que(r)?(Ft().b[14][0]++,Ft().s[20]++,"zoom_function"):(Ft().b[14][1]++,Ft().s[21]++,$ue(r)?(Ft().b[15][0]++,Ft().s[22]++,"data_function"):(Ft().b[15][1]++,Ft().s[23]++,"expression")))))}class Hue extends Zn.Component{constructor(e){Ft().f[11]++,Ft().s[24]++;super(e);Kn(this,"addStop",(Ft().s[34]++,()=>{Ft().f[14]++;const e=(Ft().s[35]++,this.props.value.stops.slice(0)),n=(Ft().s[36]++,e[e.length-1]);Ft().s[37]++,typeof n[0]=="object"?(Ft().b[19][0]++,Ft().s[38]++,e.push([{zoom:n[0].zoom+1,value:n[0].value},n[1]])):(Ft().b[19][1]++,Ft().s[39]++,e.push([n[0]+1,n[1]]));const i=(Ft().s[40]++,{...this.props.value,stops:e});Ft().s[41]++,this.props.onChange(this.props.fieldName,i)}));Kn(this,"deleteExpression",(Ft().s[42]++,()=>{Ft().f[15]++;const{fieldSpec:e,fieldName:n}=(Ft().s[43]++,this.props);Ft().s[44]++,this.props.onChange(n,e.default),Ft().s[45]++,this.setState({dataType:"value"})}));Kn(this,"deleteStop",(Ft().s[46]++,e=>{Ft().f[16]++;const n=(Ft().s[47]++,this.props.value.stops.slice(0));Ft().s[48]++,n.splice(e,1);let i=(Ft().s[49]++,{...this.props.value,stops:n});Ft().s[50]++,n.length===1?(Ft().b[20][0]++,Ft().s[51]++,i=n[0][1]):Ft().b[20][1]++,Ft().s[52]++,this.props.onChange(this.props.fieldName,i)}));Kn(this,"makeZoomFunction",(Ft().s[53]++,()=>{Ft().f[17]++;const{value:e}=(Ft().s[54]++,this.props);let n;Ft().s[55]++,typeof e=="object"?(Ft().b[21][0]++,Ft().s[56]++,e.stops?(Ft().b[22][0]++,Ft().s[57]++,n={base:e.base,stops:e.stops.map(i=>(Ft().f[18]++,Ft().s[58]++,[i[0].zoom,(Ft().b[23][0]++,i[1]||(Ft().b[23][1]++,rf(this.props.fieldSpec)))]))}):(Ft().b[22][1]++,Ft().s[59]++,n={base:e.base,stops:[[6,rf(this.props.fieldSpec)],[10,rf(this.props.fieldSpec)]]})):(Ft().b[21][1]++,Ft().s[60]++,n={stops:[[6,(Ft().b[24][0]++,e||(Ft().b[24][1]++,rf(this.props.fieldSpec)))],[10,(Ft().b[25][0]++,e||(Ft().b[25][1]++,rf(this.props.fieldSpec)))]]}),Ft().s[61]++,this.props.onChange(this.props.fieldName,n)}));Kn(this,"undoExpression",(Ft().s[62]++,()=>{Ft().f[19]++;const{value:e,fieldName:n}=(Ft().s[63]++,this.props);Ft().s[64]++,HP(e)?(Ft().b[26][0]++,Ft().s[65]++,this.props.onChange(n,{type:"identity",property:e[1]}),Ft().s[66]++,this.setState({dataType:"value"})):(Ft().b[26][1]++,Ft().s[67]++,VP(e)?(Ft().b[27][0]++,Ft().s[68]++,this.props.onChange(n,e[1]),Ft().s[69]++,this.setState({dataType:"value"})):Ft().b[27][1]++)}));Kn(this,"canUndo",(Ft().s[70]++,()=>{Ft().f[20]++;const{value:e,fieldSpec:n}=(Ft().s[71]++,this.props);return Ft().s[72]++,Ft().b[28][0]++,HP(e)||(Ft().b[28][1]++,VP(e))||(Ft().b[28][2]++,qO(e))||(Ft().b[28][3]++,Array.isArray(e)&&(Ft().b[28][4]++,n.type==="array"))}));Kn(this,"makeExpression",(Ft().s[73]++,()=>{Ft().f[21]++;const{value:e,fieldSpec:n}=(Ft().s[74]++,this.props);let i;Ft().s[75]++,Ft().b[30][0]++,typeof e=="object"&&(Ft().b[30][1]++,"stops"in e)?(Ft().b[29][0]++,Ft().s[76]++,i=Tq.convertFunction(e,n)):(Ft().b[29][1]++,Ft().s[77]++,Kj(e)?(Ft().b[31][0]++,Ft().s[78]++,i=["get",e.property]):(Ft().b[31][1]++,Ft().s[79]++,i=["literal",(Ft().b[32][0]++,e||(Ft().b[32][1]++,this.props.fieldSpec.default))])),Ft().s[80]++,this.props.onChange(this.props.fieldName,i)}));Kn(this,"makeDataFunction",(Ft().s[81]++,()=>{Ft().f[22]++;const e=(Ft().s[82]++,this.getFieldFunctionType(this.props.fieldSpec)),n=(Ft().s[83]++,e==="categorical"?(Ft().b[33][0]++,""):(Ft().b[33][1]++,0)),{value:i}=(Ft().s[84]++,this.props);let o;Ft().s[85]++,typeof i=="object"?(Ft().b[34][0]++,Ft().s[86]++,i.stops?(Ft().b[35][0]++,Ft().s[87]++,o={property:"",type:e,base:i.base,stops:i.stops.map(s=>(Ft().f[23]++,Ft().s[88]++,[{zoom:s[0],value:n},(Ft().b[36][0]++,s[1]||(Ft().b[36][1]++,rf(this.props.fieldSpec)))]))}):(Ft().b[35][1]++,Ft().s[89]++,o={property:"",type:e,base:i.base,stops:[[{zoom:6,value:n},rf(this.props.fieldSpec)],[{zoom:10,value:n},rf(this.props.fieldSpec)]]})):(Ft().b[34][1]++,Ft().s[90]++,o={property:"",type:e,base:i.base,stops:[[{zoom:6,value:n},(Ft().b[37][0]++,this.props.value||(Ft().b[37][1]++,rf(this.props.fieldSpec)))],[{zoom:10,value:n},(Ft().b[38][0]++,this.props.value||(Ft().b[38][1]++,rf(this.props.fieldSpec)))]]}),Ft().s[91]++,this.props.onChange(this.props.fieldName,o)}));Kn(this,"onMarkEditing",(Ft().s[92]++,()=>{Ft().f[24]++,Ft().s[93]++,this.setState({isEditing:!0})}));Kn(this,"onUnmarkEditing",(Ft().s[94]++,()=>{Ft().f[25]++,Ft().s[95]++,this.setState({isEditing:!1})}));Ft().s[25]++,this.state={dataType:ZP(e.value,e.fieldSpec),isEditing:!1}}static getDerivedStateFromProps(e,n){return Ft().f[12]++,Ft().s[26]++,n.isEditing?(Ft().b[16][0]++,Ft().s[27]++,{}):(Ft().b[16][1]++,Ft().s[28]++,{isEditing:!1,dataType:ZP(e.value,e.fieldSpec)})}getFieldFunctionType(e){return Ft().f[13]++,Ft().s[29]++,e.expression.interpolated?(Ft().b[17][0]++,Ft().s[30]++,"exponential"):(Ft().b[17][1]++,Ft().s[31]++,e.type==="number"?(Ft().b[18][0]++,Ft().s[32]++,"interval"):(Ft().b[18][1]++,Ft().s[33]++,"categorical"))}render(){Ft().f[26]++;const{dataType:e}=(Ft().s[96]++,this.state),n=(Ft().s[97]++,this.props.fieldSpec.default===this.props.value?(Ft().b[39][0]++,"maputnik-default-property"):(Ft().b[39][1]++,"maputnik-modified-property"));let i;return Ft().s[98]++,e==="expression"?(Ft().b[40][0]++,Ft().s[99]++,i=ue.jsx(NU,{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})):(Ft().b[40][1]++,Ft().s[100]++,e==="zoom_function"?(Ft().b[41][0]++,Ft().s[101]++,i=ue.jsx(Que,{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})):(Ft().b[41][1]++,Ft().s[102]++,e==="data_function"?(Ft().b[42][0]++,Ft().s[103]++,i=ue.jsx(Wue,{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})):(Ft().b[42][1]++,Ft().s[104]++,i=ue.jsx(Ij,{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})))),Ft().s[105]++,ue.jsx("div",{className:n,"data-wd-key":"spec-field-container:"+this.props.fieldName,children:i})}}function Ao(){var r="/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",t="411d3be261f729b266d6cb26884b34616b925c83",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ao=function(){return s},s}Ao();const Zue=(Ao().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);function Xue(r,t,e){Ao().f[0]++;const n=(Ao().s[1]++,Rj(r,t,e)),i=(Ao().s[2]++,r[n+"_"+t]),o=(Ao().s[3]++,i[e]);return Ao().s[4]++,Zue.indexOf(e)>=0?(Ao().b[0][0]++,Ao().s[5]++,{...o,values:r.$root.sprite.values}):(Ao().b[0][1]++,Ao().s[6]++,e==="text-font"?(Ao().b[1][0]++,Ao().s[7]++,{...o,values:r.$root.glyphs.values}):(Ao().b[1][1]++,Ao().s[8]++,o))}function Rj(r,t,e){Ao().f[1]++;const n=(Ao().s[9]++,Ao().b[2][0]++,r["paint_"+t]||(Ao().b[2][1]++,{}));return Ao().s[10]++,e in n?(Ao().b[3][0]++,Ao().s[11]++,"paint"):(Ao().b[3][1]++,Ao().s[12]++,"layout")}class Jue extends Zn.Component{constructor(){super(...arguments);Kn(this,"onPropertyChange",(Ao().s[13]++,(e,n)=>{Ao().f[2]++;const i=(Ao().s[14]++,Rj(this.props.spec,this.props.layer.type,e));Ao().s[15]++,this.props.onChange(i,e,n)}))}render(){Ao().f[3]++;const{errors:e}=(Ao().s[16]++,this.props),n=(Ao().s[17]++,this.props.groupFields.map(i=>{Ao().f[4]++;const o=(Ao().s[18]++,Xue(this.props.spec,this.props.layer.type,i)),s=(Ao().s[19]++,Ao().b[4][0]++,this.props.layer.paint||(Ao().b[4][1]++,{})),a=(Ao().s[20]++,Ao().b[5][0]++,this.props.layer.layout||(Ao().b[5][1]++,{})),f=(Ao().s[21]++,i in s?(Ao().b[6][0]++,s[i]):(Ao().b[6][1]++,a[i])),g=(Ao().s[22]++,i in s?(Ao().b[7][0]++,"paint"):(Ao().b[7][1]++,"layout"));return Ao().s[23]++,ue.jsx(Hue,{errors:e,onChange:this.onPropertyChange,fieldName:i,value:f,fieldType:g,fieldSpec:o},i)}));return Ao().s[24]++,ue.jsx("div",{className:"maputnik-property-group",children:n})}}var EM,XP;function eAe(){return XP||(XP=1,EM=function(r){var t={};function e(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return r[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=r,e.c=t,e.d=function(n,i,o){e.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:o})},e.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,i){if(1&i&&(n=e(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var s in n)e.d(o,s,(function(a){return n[a]}).bind(null,s));return o},e.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(i,"a",i),i},e.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},e.p="",e(e.s=2)}([function(r,t){r.exports=qf()},function(r,t){r.exports=Ts()},function(r,t,e){e.r(t);var n=e(1),i=e(0),o=function(){return(o=Object.assign||function(P){for(var U,j=1,q=arguments.length;j<q;j++)for(var W in U=arguments[j])Object.prototype.hasOwnProperty.call(U,W)&&(P[W]=U[W]);return P}).apply(this,arguments)},s=function(P,U){var j={};for(var q in P)Object.prototype.hasOwnProperty.call(P,q)&&U.indexOf(q)<0&&(j[q]=P[q]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function"){var W=0;for(q=Object.getOwnPropertySymbols(P);W<q.length;W++)U.indexOf(q[W])<0&&Object.prototype.propertyIsEnumerable.call(P,q[W])&&(j[q[W]]=P[q[W]])}return j},a=0,f=n.forwardRef(function(P,U){var j=P.title,q=j===void 0?null:j,W=P.description,ee=W===void 0?null:W,J=P.size,$=J===void 0?null:J,X=P.color,G=X===void 0?"currentColor":X,ae=P.horizontal,ge=ae===void 0?null:ae,he=P.vertical,Ie=he===void 0?null:he,re=P.rotate,oe=re===void 0?null:re,Se=P.spin,ye=Se===void 0?null:Se,nt=P.style,Ne=nt===void 0?{}:nt,je=P.children,et=s(P,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);a++;var Ue,ke=ye!==null&&ye,We=n.Children.map(je,function(jt){var Rt=jt;ke!==!0&&(ke=(ye===null?Rt.props.spin:ye)===!0);var Ke=Rt.props.size;typeof $=="number"&&typeof Rt.props.size=="number"&&(Ke=Rt.props.size/$);var we={size:Ke,color:G===null?Rt.props.color:G,horizontal:ge===null?Rt.props.horizontal:ge,vertical:Ie===null?Rt.props.vertical:Ie,rotate:oe===null?Rt.props.rotate:oe,spin:ye===null?Rt.props.spin:ye,inStack:!0};return n.cloneElement(Rt,we)});$!==null&&(Ne.width=typeof $=="string"?$:1.5*$+"rem");var vt,Pt="stack_labelledby_"+a,ut="stack_describedby_"+a;if(q)Ue=ee?Pt+" "+ut:Pt;else if(vt="presentation",ee)throw new Error("title attribute required when description is set");return n.createElement("svg",o({ref:U,viewBox:"0 0 24 24",style:Ne,role:vt,"aria-labelledby":Ue},et),q&&n.createElement("title",{id:Pt},q),ee&&n.createElement("desc",{id:ut},ee),ke&&n.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),We)});f.displayName="Stack",f.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},f.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var g=f;e.d(t,"Icon",function(){return B}),e.d(t,"Stack",function(){return g});var b=function(){return(b=Object.assign||function(P){for(var U,j=1,q=arguments.length;j<q;j++)for(var W in U=arguments[j])Object.prototype.hasOwnProperty.call(U,W)&&(P[W]=U[W]);return P}).apply(this,arguments)},I=function(P,U){var j={};for(var q in P)Object.prototype.hasOwnProperty.call(P,q)&&U.indexOf(q)<0&&(j[q]=P[q]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function"){var W=0;for(q=Object.getOwnPropertySymbols(P);W<q.length;W++)U.indexOf(q[W])<0&&Object.prototype.propertyIsEnumerable.call(P,q[W])&&(j[q[W]]=P[q[W]])}return j},S=0,B=n.forwardRef(function(P,U){var j=P.path,q=P.id,W=q===void 0?++S:q,ee=P.title,J=ee===void 0?null:ee,$=P.description,X=$===void 0?null:$,G=P.size,ae=G===void 0?null:G,ge=P.color,he=ge===void 0?"currentColor":ge,Ie=P.horizontal,re=Ie!==void 0&&Ie,oe=P.vertical,Se=oe!==void 0&&oe,ye=P.rotate,nt=ye===void 0?0:ye,Ne=P.spin,je=Ne!==void 0&&Ne,et=P.style,Ue=et===void 0?{}:et,ke=P.inStack,We=ke!==void 0&&ke,vt=I(P,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),Pt={},ut=[];ae!==null&&(We?ut.push("scale("+ae+")"):(Ue.width=typeof ae=="string"?ae:1.5*ae+"rem",Ue.height=Ue.width)),re&&ut.push("scaleX(-1)"),Se&&ut.push("scaleY(-1)"),nt!==0&&ut.push("rotate("+nt+"deg)"),he!==null&&(Pt.fill=he);var jt=n.createElement("path",b({d:j,style:Pt},We?vt:{})),Rt=jt;ut.length>0&&(Ue.transform=ut.join(" "),Ue.transformOrigin="center",We&&(Rt=n.createElement("g",{style:Ue},jt,n.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var Ke,we=Rt,Fe=je===!0||typeof je!="number"?2:je,tt=!We&&(re||Se);if(Fe<0&&(tt=!tt),je&&(we=n.createElement("g",{style:{animation:"spin"+(tt?"-inverse":"")+" linear "+Math.abs(Fe)+"s infinite",transformOrigin:"center"}},Rt,!(re||Se||nt!==0)&&n.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),We)return we;var mt,bt="icon_labelledby_"+W,Lt="icon_describedby_"+W;if(J)Ke=X?bt+" "+Lt:bt;else if(mt="presentation",X)throw new Error("title attribute required when description is set");return n.createElement("svg",b({ref:U,viewBox:"0 0 24 24",style:Ue,role:mt,"aria-labelledby":Ke},vt),J&&n.createElement("title",{id:bt},J),X&&n.createElement("desc",{id:Lt},X),!We&&je&&(tt?n.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):n.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),we)});B.displayName="Icon",B.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},B.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=B}])),EM}var tAe=eAe();const JP=us(tAe);function p1(){var r="/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",t="2f1dde9b3c8e927b8e8868bcb310eb3d6a65eb08",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return p1=function(){return s},s}p1();class nAe extends Zn.Component{render(){return p1().f[0]++,p1().s[0]++,ue.jsxs(KU,{uuid:this.props.id,children:[ue.jsx(LU,{className:"maputnik-layer-editor-group","data-wd-key":"layer-editor-group:"+this.props["data-wd-key"],onClick:t=>(p1().f[1]++,p1().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:ue.jsxs(Cae,{className:"maputnik-layer-editor-group__button",children:[ue.jsx("span",{style:{flexGrow:1},children:this.props.title}),ue.jsx(JP,{path:zae,size:1,className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--up"}),ue.jsx(JP,{path:jae,size:1,className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--down"})]})}),ue.jsx(Mae,{children:this.props.children})]})}}function k1(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",t="32f7af2e1a9dc4f673c1fba818006229f9fd6490",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return k1=function(){return s},s}k1();class rAe extends Zn.Component{render(){k1().f[0]++;const t=(k1().s[0]++,this.props.t);return k1().s[1]++,ue.jsx(ps,{label:t("Min Zoom"),fieldSpec:Jo.layer.minzoom,error:this.props.error,"data-wd-key":"min-zoom",children:ue.jsx(Tp,{allowRange:!0,value:this.props.value,onChange:this.props.onChange,min:Jo.layer.minzoom.minimum,max:Jo.layer.minzoom.maximum,default:Jo.layer.minzoom.minimum,"data-wd-key":"min-zoom.input"})})}}const iAe=(k1().s[2]++,qa()(rAe));function T1(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",t="f706dc673f9397f2919007f4b702470461bf0f7c",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return T1=function(){return s},s}T1();class oAe extends Zn.Component{render(){T1().f[0]++;const t=(T1().s[0]++,this.props.t);return T1().s[1]++,ue.jsx(ps,{label:t("Max Zoom"),fieldSpec:Jo.layer.maxzoom,error:this.props.error,"data-wd-key":"max-zoom",children:ue.jsx(Tp,{allowRange:!0,value:this.props.value,onChange:this.props.onChange,min:Jo.layer.maxzoom.minimum,max:Jo.layer.maxzoom.maximum,default:Jo.layer.maxzoom.maximum,"data-wd-key":"max-zoom.input"})})}}const aAe=(T1().s[2]++,qa()(oAe));function Y0(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",t="875d9bef6002e38aa0b5bf03af99ab4fc2308047",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Y0=function(){return s},s}Y0();class sAe extends Zn.Component{render(){Y0().f[0]++;const t=(Y0().s[0]++,this.props.t),e=(Y0().s[1]++,{doc:t("Comments for the current layer. This is non-standard and not in the spec.")});return Y0().s[2]++,ue.jsx(ps,{label:t("Comments"),fieldSpec:e,"data-wd-key":"layer-comment",error:this.props.error,children:ue.jsx(ff,{multi:!0,value:this.props.value,onChange:this.props.onChange,default:t("Comment..."),"data-wd-key":"layer-comment.input"})})}}const lAe=(Y0().s[3]++,qa()(sAe)),uAe={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"]}]},AAe={groups:[{title:"Paint properties",type:"properties",fields:["background-color","background-pattern","background-opacity"]}]},cAe={groups:[{title:"Paint properties",type:"properties",fields:["fill-opacity","fill-color","fill-antialias","fill-outline-color","fill-pattern","fill-translate","fill-translate-anchor"]}]},dAe={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"]}]},hAe={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"]}]},fAe={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"]}]},pAe={groups:[{title:"Paint properties",type:"properties",fields:["hillshade-illumination-direction","hillshade-illumination-anchor","hillshade-exaggeration","hillshade-shadow-color","hillshade-highlight-color","hillshade-accent-color"]}]},mAe={groups:[{title:"Paint properties",type:"properties",fields:["heatmap-radius","heatmap-weight","heatmap-intensity","heatmap-opacity"]}]},gAe={groups:[]},lC={line:uAe,background:AAe,fill:cAe,"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:dAe,symbol:hAe,raster:fAe,hillshade:pAe,heatmap:mAe,invalid:gAe};function m1(){var r="/home/runner/work/maputnik/maputnik/src/libs/format.ts",t="c45fbfac66e994b59070a295e5a7f219cd5d66ac",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return m1=function(){return s},s}m1();function Dj(r){return m1().f[0]++,m1().s[0]++,r===""?(m1().b[0][0]++,"[empty_string]"):(m1().b[0][1]++,`'${r}'`)}function kn(){var r="/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",t="555ef41c8141fe537bdb43523a4ef7ec4c287394",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return kn=function(){return s},s}kn();function Lj(r,t){return kn().f[0]++,kn().s[0]++,lC[r]?(kn().b[0][0]++,{...lC[r],groups:lC[r].groups.map(e=>(kn().f[1]++,kn().s[1]++,{...e,id:e.title.replace(/ /g,"_"),title:t(e.title)}))}):(kn().b[0][1]++,lC.invalid)}function eK(r,t){kn().f[2]++;const e=(kn().s[2]++,{id:"layer",title:t("Layer"),type:"layer"}),n=(kn().s[3]++,{id:"filter",title:t("Filter"),type:"filter"}),i=(kn().s[4]++,{id:"jsoneditor",title:t("JSON Editor"),type:"jsoneditor"});return kn().s[5]++,[e,n].concat(Lj(r,t).groups).concat([i])}class SE extends Zn.Component{constructor(t){kn().f[6]++,kn().s[8]++,super(t);const e=(kn().s[9]++,{});kn().s[10]++,eK(this.props.layer.type,t.t).forEach(n=>{kn().f[7]++,kn().s[11]++,e[n.title]=!0}),kn().s[12]++,this.state={editorGroups:e}}static getDerivedStateFromProps(t,e){kn().f[8]++;const n=(kn().s[13]++,{...e.editorGroups});return kn().s[14]++,Lj(t.layer.type,t.t).groups.forEach(i=>{kn().f[9]++,kn().s[15]++,i.title in n?kn().b[1][1]++:(kn().b[1][0]++,kn().s[16]++,n[i.title]=!0)}),kn().s[17]++,{editorGroups:n}}getChildContext(){return kn().f[10]++,kn().s[18]++,{reactIconBase:{size:14,color:"#8e8e8e"}}}changeProperty(t,e,n){kn().f[11]++,kn().s[19]++,this.props.onLayerChanged(this.props.layerIndex,Doe(this.props.layer,t,e,n))}onGroupToggle(t,e){kn().f[12]++;const n=(kn().s[20]++,{...this.state.editorGroups,[t]:e});kn().s[21]++,this.setState({editorGroups:n})}renderGroupType(t,e){kn().f[13]++;let n=(kn().s[22]++,"");kn().s[23]++,this.props.layer.metadata?(kn().b[2][0]++,kn().s[24]++,n=this.props.layer.metadata["maputnik:comment"]):kn().b[2][1]++;const{errors:i,layerIndex:o}=(kn().s[25]++,this.props),s=(kn().s[26]++,{});kn().s[27]++,i.forEach(g=>{kn().f[14]++,kn().s[28]++,kn().b[4][0]++,g.parsed&&(kn().b[4][1]++,g.parsed.type==="layer")&&(kn().b[4][2]++,g.parsed.data.index==o)?(kn().b[3][0]++,kn().s[29]++,s[g.parsed.data.key]={message:g.parsed.data.message}):kn().b[3][1]++});let a;const f=(kn().s[30]++,this.props.layer);switch(kn().s[31]++,Object.prototype.hasOwnProperty.call(this.props.sources,f.source)?(kn().b[5][0]++,kn().s[32]++,a=this.props.sources[f.source].layers):kn().b[5][1]++,kn().s[33]++,t){case"layer":return kn().b[6][0]++,kn().s[34]++,ue.jsxs("div",{children:[ue.jsx(CU,{value:this.props.layer.id,wdKey:"layer-editor.layer-id",error:s.id,onChange:g=>(kn().f[15]++,kn().s[35]++,this.props.onLayerIdChange(this.props.layerIndex,this.props.layer.id,g))}),ue.jsx(_U,{disabled:!0,error:s.type,value:this.props.layer.type,onChange:g=>(kn().f[16]++,kn().s[36]++,this.props.onLayerChanged(this.props.layerIndex,Roe(this.props.layer,g)))}),(kn().b[7][0]++,this.props.layer.type!=="background"&&(kn().b[7][1]++,ue.jsx(xU,{error:s.source,sourceIds:Object.keys(this.props.sources),value:this.props.layer.source,onChange:g=>(kn().f[17]++,kn().s[37]++,this.changeProperty(null,"source",g))}))),(kn().b[8][0]++,["background","raster","hillshade","heatmap"].indexOf(this.props.layer.type)<0&&(kn().b[8][1]++,ue.jsx(MU,{error:s["source-layer"],sourceLayerIds:a,value:this.props.layer["source-layer"],onChange:g=>(kn().f[18]++,kn().s[38]++,this.changeProperty(null,"source-layer",g))}))),ue.jsx(iAe,{error:s.minzoom,value:this.props.layer.minzoom,onChange:g=>(kn().f[19]++,kn().s[39]++,this.changeProperty(null,"minzoom",g))}),ue.jsx(aAe,{error:s.maxzoom,value:this.props.layer.maxzoom,onChange:g=>(kn().f[20]++,kn().s[40]++,this.changeProperty(null,"maxzoom",g))}),ue.jsx(lAe,{error:s.comment,value:n,onChange:g=>(kn().f[21]++,kn().s[41]++,this.changeProperty("metadata","maputnik:comment",g==""?(kn().b[9][0]++,void 0):(kn().b[9][1]++,g)))})]});case"filter":return kn().b[6][1]++,kn().s[42]++,ue.jsx("div",{children:ue.jsx("div",{className:"maputnik-filter-editor-wrapper",children:ue.jsx(ese,{errors:s,filter:this.props.layer.filter,properties:this.props.vectorLayers[this.props.layer["source-layer"]],onChange:g=>(kn().f[22]++,kn().s[43]++,this.changeProperty(null,"filter",g))})})});case"properties":return kn().b[6][2]++,kn().s[44]++,ue.jsx(Jue,{errors:s,layer:this.props.layer,groupFields:e,spec:this.props.spec,onChange:this.changeProperty.bind(this)});case"jsoneditor":return kn().b[6][3]++,kn().s[45]++,ue.jsx(bO,{layer:this.props.layer,onChange:g=>{kn().f[23]++,kn().s[46]++,this.props.onLayerChanged(this.props.layerIndex,g)}});default:return kn().b[6][4]++,kn().s[47]++,ue.jsx(ue.Fragment,{})}}moveLayer(t){kn().f[24]++,kn().s[48]++,this.props.onMoveLayer({oldIndex:this.props.layerIndex,newIndex:this.props.layerIndex+t})}render(){kn().f[25]++;const t=(kn().s[49]++,this.props.t),e=(kn().s[50]++,[]),n=(kn().s[51]++,this.props.layer.type),i=(kn().s[52]++,eK(n,t).filter(f=>(kn().f[26]++,kn().s[53]++,kn().b[10][0]++,!(n==="background"&&(kn().b[10][1]++,f.type==="source")))).map(f=>{kn().f[27]++;const g=(kn().s[54]++,f.id);return kn().s[55]++,e.push(g),kn().s[56]++,ue.jsx(nAe,{"data-wd-key":f.title,id:g,title:f.title,isActive:this.state.editorGroups[f.title],onActiveToggle:this.onGroupToggle.bind(this,f.title),children:this.renderGroupType(f.type,f.fields)},g)})),o=(kn().s[57]++,kn().b[11][0]++,this.props.layer.layout||(kn().b[11][1]++,{})),s=(kn().s[58]++,{delete:{text:t("Delete"),handler:()=>(kn().f[28]++,kn().s[59]++,this.props.onLayerDestroy(this.props.layerIndex))},duplicate:{text:t("Duplicate"),handler:()=>(kn().f[29]++,kn().s[60]++,this.props.onLayerCopy(this.props.layerIndex))},hide:{text:o.visibility==="none"?(kn().b[12][0]++,t("Show")):(kn().b[12][1]++,t("Hide")),handler:()=>(kn().f[30]++,kn().s[61]++,this.props.onLayerVisibilityToggle(this.props.layerIndex))},moveLayerUp:{text:t("Move layer up"),disabled:this.props.isFirstLayer,handler:()=>(kn().f[31]++,kn().s[62]++,this.moveLayer(-1))},moveLayerDown:{text:t("Move layer down"),disabled:this.props.isLastLayer,handler:()=>(kn().f[32]++,kn().s[63]++,this.moveLayer(1))}});function a(f,g){kn().f[33]++,kn().s[64]++,g.stopPropagation(),kn().s[65]++,s[f].handler()}return kn().s[66]++,ue.jsxs("section",{className:"maputnik-layer-editor",role:"main","aria-label":t("Layer editor"),children:[ue.jsx("header",{children:ue.jsxs("div",{className:"layer-header",children:[ue.jsx("h2",{className:"layer-header__title",children:t("Layer: {{layerId}}",{layerId:Dj(this.props.layer.id)})}),ue.jsx("div",{className:"layer-header__info",children:ue.jsxs(nC.Wrapper,{className:"more-menu",onSelection:a,closeOnSelection:!1,children:[ue.jsx(nC.Button,{id:"skip-target-layer-editor","data-wd-key":"skip-target-layer-editor",className:"more-menu__button",title:"Layer options",children:ue.jsx(TY,{className:"more-menu__button__svg"})}),ue.jsx(nC.Menu,{children:ue.jsx("ul",{className:"more-menu__menu",children:Object.keys(s).map(f=>{kn().f[34]++;const g=(kn().s[67]++,s[f]);return kn().s[68]++,ue.jsx("li",{children:ue.jsx(nC.MenuItem,{value:f,className:"more-menu__menu__item",children:g.text})},f)})})})]})})]})}),ue.jsx(lae,{allowMultipleExpanded:!0,allowZeroExpanded:!0,preExpanded:e,children:i})]})}}Kn(SE,"defaultProps",(kn().s[6]++,{onLayerChanged:()=>{kn().f[3]++},onLayerIdChange:()=>{kn().f[4]++},onLayerDestroyed:()=>{kn().f[5]++}})),Kn(SE,"childContextTypes",(kn().s[7]++,{reactIconBase:mi.object}));const yAe=(kn().s[69]++,qa()(SE));var tK=function(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return r.concat(o||Array.prototype.slice.call(t))},vAe=function(){function r(t,e,n){this.name=t,this.version=e,this.os=n,this.type="browser"}return r}(),_Ae=function(){function r(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return r}(),CAe=function(){function r(t,e,n,i){this.name=t,this.version=e,this.os=n,this.bot=i,this.type="bot-device"}return r}(),bAe=function(){function r(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return r}(),xAe=function(){function r(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return r}(),wAe=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,MAe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,nK=3,SAe=[["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",wAe]],rK=[["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 EAe(r){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new xAe:typeof navigator<"u"?BAe(navigator.userAgent):kAe()}function OAe(r){return r!==""&&SAe.reduce(function(t,e){var n=e[0],i=e[1];if(t)return t;var o=i.exec(r);return!!o&&[n,o]},!1)}function BAe(r){var t=OAe(r);if(!t)return null;var e=t[0],n=t[1];if(e==="searchbot")return new bAe;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<nK&&(i=tK(tK([],i,!0),TAe(nK-i.length),!0)):i=[];var o=i.join("."),s=IAe(r),a=MAe.exec(r);return a&&a[1]?new CAe(e,o,s,a[1]):new vAe(e,o,s)}function IAe(r){for(var t=0,e=rK.length;t<e;t++){var n=rK[t],i=n[0],o=n[1],s=o.exec(r);if(s)return i}return null}function kAe(){var r=typeof process<"u"&&process.version;return r?new _Ae(process.version.slice(1)):null}function TAe(r){for(var t=[],e=0;e<r;e++)t.push("0");return t}const PAe="maputnik",KAe="2.1.1",RAe="A MapLibre GL visual style editor",DAe="module",LAe="''",FAe={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"},UAe={type:"git",url:"https://github.com/maplibre/maputnik"},jAe="Lukas Martinelli",zAe="MIT",NAe="https://github.com/maplibre/maputnik#readme",GAe={"@mapbox/mapbox-gl-rtl-text":"^0.3.0","@maplibre/maplibre-gl-geocoder":"^1.7.1","@maplibre/maplibre-gl-inspect":"^1.7.1","@maplibre/maplibre-gl-style-spec":"^23.1.0","@mdi/js":"^7.4.47","@mdi/react":"^1.6.1","array-move":"^4.0.0",buffer:"^6.0.3",classnames:"^2.5.1",codemirror:"^5.65.2",color:"^4.2.3","detect-browser":"^5.3.0",events:"^3.3.0","file-saver":"^2.0.5",i18next:"^23.12.2","i18next-browser-languagedetector":"^8.0.2","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":"^5.0.1","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",slugify:"^1.6.6","string-hash":"^1.1.3",url:"^0.11.3"},WAe={esversion:6},QAe={extends:"stylelint-config-recommended-scss",rules:{"no-descending-specificity":null,"media-feature-name-no-unknown":[!0,{ignoreMediaFeatureNames:["prefers-reduced-motion"]}]}},qAe={"@cypress/code-coverage":"^3.13.10","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-replace":"^5.0.5","@shellygo/cypress-test-utils":"^4.1.11","@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","@types/wicg-file-system-access":"^2023.10.5","@typescript-eslint/eslint-plugin":"^7.3.1","@typescript-eslint/parser":"^7.3.1","@vitejs/plugin-react":"^4.2.1",cors:"^2.8.5",cypress:"^14.0.0","cypress-plugin-tab":"^1.0.5",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",sass:"^1.72.0",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:"^6.0.11","vite-plugin-istanbul":"^6.0.0"},iK={name:PAe,version:KAe,description:RAe,type:DAe,main:LAe,scripts:FAe,repository:UAe,author:jAe,license:zAe,homepage:NAe,dependencies:GAe,jshintConfig:WAe,stylelint:QAe,devDependencies:qAe},YAe="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 qi(){var r="/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",t="7ffd82d4f3aa9239b1c505abaafac5bdb522b791",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",statementMap:{0:{start:{line:18,column:16},end:{line:18,column:24}},1:{start:{line:19,column:41},end:{line:19,column:89}},2:{start:{line:22,column:4},end:{line:22,column:107}},3:{start:{line:27,column:4},end:{line:37,column:6}},4:{start:{line:42,column:4},end:{line:49,column:6}},5:{start:{line:54,column:4},end:{line:62,column:6}},6:{start:{line:66,column:10},end:{line:74,column:3}},7:{start:{line:76,column:4},end:{line:76,column:34}},8:{start:{line:79,column:4},end:{line:79,column:40}},9:{start:{line:81,column:11},end:{line:88,column:3}},10:{start:{line:82,column:4},end:{line:87,column:5}},11:{start:{line:83,column:6},end:{line:83,column:59}},12:{start:{line:85,column:17},end:{line:85,column:65}},13:{start:{line:86,column:6},end:{line:86,column:17}},14:{start:{line:90,column:14},end:{line:90,column:26}},15:{start:{line:91,column:18},end:{line:127,column:5}},16:{start:{line:128,column:24},end:{line:130,column:6}},17:{start:{line:129,column:6},end:{line:129,column:45}},18:{start:{line:131,column:4},end:{line:249,column:12}},19:{start:{line:142,column:33},end:{line:142,column:58}},20:{start:{line:151,column:33},end:{line:151,column:60}},21:{start:{line:160,column:33},end:{line:160,column:51}},22:{start:{line:212,column:33},end:{line:212,column:69}},23:{start:{line:215,column:38},end:{line:215,column:59}},24:{start:{line:216,column:20},end:{line:216,column:157}},25:{start:{line:218,column:115},end:{line:218,column:148}},26:{start:{line:219,column:20},end:{line:219,column:133}},27:{start:{line:235,column:33},end:{line:235,column:74}},28:{start:{line:238,column:18},end:{line:238,column:94}},29:{start:{line:252,column:19},end:{line:252,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:21,column:2},end:{line:21,column:3}},loc:{start:{line:21,column:11},end:{line:23,column:3}},line:21},1:{name:"(anonymous_1)",decl:{start:{line:26,column:2},end:{line:26,column:3}},loc:{start:{line:26,column:11},end:{line:38,column:3}},line:26},2:{name:"(anonymous_2)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:11},end:{line:50,column:3}},line:41},3:{name:"(anonymous_3)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:63,column:3}},line:53},4:{name:"(anonymous_4)",decl:{start:{line:75,column:2},end:{line:75,column:3}},loc:{start:{line:75,column:23},end:{line:77,column:3}},line:75},5:{name:"(anonymous_5)",decl:{start:{line:78,column:2},end:{line:78,column:3}},loc:{start:{line:78,column:28},end:{line:80,column:3}},line:78},6:{name:"(anonymous_6)",decl:{start:{line:81,column:11},end:{line:81,column:12}},loc:{start:{line:81,column:23},end:{line:88,column:3}},line:81},7:{name:"(anonymous_7)",decl:{start:{line:89,column:2},end:{line:89,column:3}},loc:{start:{line:89,column:11},end:{line:250,column:3}},line:89},8:{name:"(anonymous_8)",decl:{start:{line:128,column:35},end:{line:128,column:36}},loc:{start:{line:128,column:45},end:{line:130,column:5}},line:128},9:{name:"(anonymous_9)",decl:{start:{line:142,column:25},end:{line:142,column:26}},loc:{start:{line:142,column:33},end:{line:142,column:58}},line:142},10:{name:"(anonymous_10)",decl:{start:{line:151,column:25},end:{line:151,column:26}},loc:{start:{line:151,column:33},end:{line:151,column:60}},line:151},11:{name:"(anonymous_11)",decl:{start:{line:160,column:25},end:{line:160,column:26}},loc:{start:{line:160,column:33},end:{line:160,column:51}},line:160},12:{name:"(anonymous_12)",decl:{start:{line:212,column:26},end:{line:212,column:27}},loc:{start:{line:212,column:33},end:{line:212,column:69}},line:212},13:{name:"(anonymous_13)",decl:{start:{line:215,column:31},end:{line:215,column:32}},loc:{start:{line:215,column:38},end:{line:215,column:59}},line:215},14:{name:"(anonymous_14)",decl:{start:{line:215,column:65},end:{line:215,column:66}},loc:{start:{line:215,column:75},end:{line:217,column:19}},line:215},15:{name:"(anonymous_15)",decl:{start:{line:218,column:108},end:{line:218,column:109}},loc:{start:{line:218,column:115},end:{line:218,column:148}},line:218},16:{name:"(anonymous_16)",decl:{start:{line:218,column:154},end:{line:218,column:155}},loc:{start:{line:218,column:164},end:{line:220,column:19}},line:218},17:{name:"(anonymous_17)",decl:{start:{line:235,column:26},end:{line:235,column:27}},loc:{start:{line:235,column:33},end:{line:235,column:74}},line:235},18:{name:"(anonymous_18)",decl:{start:{line:237,column:65},end:{line:237,column:66}},loc:{start:{line:237,column:83},end:{line:239,column:17}},line:237}},branchMap:{0:{loc:{start:{line:82,column:4},end:{line:87,column:5}},type:"if",locations:[{start:{line:82,column:4},end:{line:87,column:5}},{start:{line:84,column:11},end:{line:87,column:5}}],line:82}},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:"AA+BW,cAyLG,YAzLH;AA/BX,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,cAAa;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,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,UAAO;AAAA,UACR,oBAAC,YAAU,YAAE,MAAM,GAAE;AAAA,WACvB;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,YAAU;AAAA,cAAE,MAAM;AAAA,YACjB;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,YAAS;AAAA;AAAA,YACR;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:"7ffd82d4f3aa9239b1c505abaafac5bdb522b791"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return qi=function(){return s},s}qi();const $Ae=(qi().s[0]++,EAe()),uC=(qi().s[1]++,["chrome","firefox"].indexOf($Ae.name)>-1);class k0 extends Zn.Component{render(){return qi().f[0]++,qi().s[2]++,ue.jsx("span",{className:"maputnik-icon-text",children:this.props.children})}}class VAe extends Zn.Component{render(){return qi().f[1]++,qi().s[3]++,ue.jsx("a",{className:Ip("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 oK extends Zn.Component{render(){return qi().f[2]++,qi().s[4]++,ue.jsx("div",{className:"maputnik-toolbar-select","data-wd-key":this.props.wdKey,children:this.props.children})}}class AC extends Zn.Component{render(){return qi().f[3]++,qi().s[5]++,ue.jsx("button",{className:"maputnik-toolbar-action","data-wd-key":this.props.wdKey,onClick:this.props.onClick,children:this.props.children})}}class HAe extends Zn.Component{constructor(){super(...arguments);Kn(this,"state",(qi().s[6]++,{isOpen:{settings:!1,sources:!1,open:!1,add:!1,export:!1}}));Kn(this,"onSkip",(qi().s[9]++,e=>{if(qi().f[6]++,qi().s[10]++,e==="map")qi().b[0][0]++,qi().s[11]++,document.querySelector(".maplibregl-canvas").focus();else{qi().b[0][1]++;const n=(qi().s[12]++,document.querySelector("#skip-target-"+e));qi().s[13]++,n.focus()}}))}handleSelection(e){qi().f[4]++,qi().s[7]++,this.props.onSetMapState(e)}handleLanguageChange(e){qi().f[5]++,qi().s[8]++,this.props.i18n.changeLanguage(e)}render(){qi().f[7]++;const e=(qi().s[14]++,this.props.t),n=(qi().s[15]++,[{id:"map",group:"general",title:e("Map")},{id:"inspect",group:"general",title:e("Inspect"),disabled:this.props.renderer==="ol"},{id:"filter-deuteranopia",group:"color-accessibility",title:e("Deuteranopia filter"),disabled:!uC},{id:"filter-protanopia",group:"color-accessibility",title:e("Protanopia filter"),disabled:!uC},{id:"filter-tritanopia",group:"color-accessibility",title:e("Tritanopia filter"),disabled:!uC},{id:"filter-achromatopsia",group:"color-accessibility",title:e("Achromatopsia filter"),disabled:!uC}]),i=(qi().s[16]++,n.find(o=>(qi().f[8]++,qi().s[17]++,o.id===this.props.mapState)));return qi().s[18]++,ue.jsx("nav",{className:"maputnik-toolbar",children:ue.jsxs("div",{className:"maputnik-toolbar__inner",children:[ue.jsxs("div",{className:"maputnik-toolbar-logo-container",children:[ue.jsx("button",{"data-wd-key":"root:skip:layer-list",className:"maputnik-toolbar-skip",onClick:o=>(qi().f[9]++,qi().s[19]++,this.onSkip("layer-list")),children:e("Layers list")}),ue.jsx("button",{"data-wd-key":"root:skip:layer-editor",className:"maputnik-toolbar-skip",onClick:o=>(qi().f[10]++,qi().s[20]++,this.onSkip("layer-editor")),children:e("Layer editor")}),ue.jsx("button",{"data-wd-key":"root:skip:map-view",className:"maputnik-toolbar-skip",onClick:o=>(qi().f[11]++,qi().s[21]++,this.onSkip("map")),children:e("Map view")}),ue.jsxs("a",{className:"maputnik-toolbar-logo",target:"blank",rel:"noreferrer noopener",href:"https://github.com/maplibre/maputnik",children:[ue.jsx("img",{src:YAe,alt:e("Maputnik on GitHub")}),ue.jsxs("h1",{children:[ue.jsx("span",{className:"maputnik-toolbar-name",children:iK.name}),ue.jsxs("span",{className:"maputnik-toolbar-version",children:["v",iK.version]})]})]})]}),ue.jsxs("div",{className:"maputnik-toolbar__actions",role:"navigation","aria-label":"Toolbar",children:[ue.jsxs(AC,{wdKey:"nav:open",onClick:this.props.onToggleModal.bind(this,"open"),children:[ue.jsx(vY,{}),ue.jsx(k0,{children:e("Open")})]}),ue.jsxs(AC,{wdKey:"nav:export",onClick:this.props.onToggleModal.bind(this,"export"),children:[ue.jsx(OS,{}),ue.jsx(k0,{children:e("Save")})]}),ue.jsxs(AC,{wdKey:"nav:sources",onClick:this.props.onToggleModal.bind(this,"sources"),children:[ue.jsx(EY,{}),ue.jsx(k0,{children:e("Data Sources")})]}),ue.jsxs(AC,{wdKey:"nav:settings",onClick:this.props.onToggleModal.bind(this,"settings"),children:[ue.jsx(_Y,{}),ue.jsx(k0,{children:e("Style Settings")})]}),ue.jsxs(oK,{wdKey:"nav:inspect",children:[ue.jsx(fY,{}),ue.jsxs(k0,{children:[e("View"),ue.jsxs("select",{className:"maputnik-select","data-wd-key":"maputnik-select",onChange:o=>(qi().f[12]++,qi().s[22]++,this.handleSelection(o.target.value)),value:i==null?void 0:i.id,children:[n.filter(o=>(qi().f[13]++,qi().s[23]++,o.group==="general")).map(o=>(qi().f[14]++,qi().s[24]++,ue.jsx("option",{value:o.id,disabled:o.disabled,"data-wd-key":o.id,children:o.title},o.id))),ue.jsx("optgroup",{label:e("Color accessibility"),children:n.filter(o=>(qi().f[15]++,qi().s[25]++,o.group==="color-accessibility")).map(o=>(qi().f[16]++,qi().s[26]++,ue.jsx("option",{value:o.id,disabled:o.disabled,children:o.title},o.id)))})]})]})]}),ue.jsxs(oK,{wdKey:"nav:language",children:[ue.jsx(yY,{}),ue.jsxs(k0,{children:["Language",ue.jsx("select",{className:"maputnik-select","data-wd-key":"maputnik-lang-select",onChange:o=>(qi().f[17]++,qi().s[27]++,this.handleLanguageChange(o.target.value)),value:this.props.i18n.language,children:Object.entries(hR).map(([o,s])=>(qi().f[18]++,qi().s[28]++,ue.jsx("option",{value:o,children:s},o)))})]})]}),ue.jsxs(VAe,{href:"https://github.com/maplibre/maputnik/wiki",children:[ue.jsx(pY,{}),ue.jsx(k0,{children:e("Help")})]})]})]})})}}const ZAe=(qi().s[29]++,qa()(HAe));function Bb(){var r="/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",t="d17a642b15310eb6111b086bd920c67ec86a8271",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Bb=function(){return s},s}Bb();class XAe extends Zn.Component{render(){return Bb().f[0]++,Bb().s[0]++,ue.jsx("div",{className:"maputnik-scroll-container",children:this.props.children})}}function zf(){var r="/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",t="1ee946cae22aef585acbff88e7256312e8bd0812",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return zf=function(){return s},s}zf();class Fj extends Zn.Component{getChildContext(){return zf().f[0]++,zf().s[1]++,{reactIconBase:{size:14}}}render(){return zf().f[1]++,zf().s[2]++,document.body.dir=this.props.i18n.dir(),zf().s[3]++,ue.jsxs("div",{className:"maputnik-layout",children:[this.props.toolbar,ue.jsxs("div",{className:"maputnik-layout-main",children:[ue.jsx("div",{className:"maputnik-layout-list",children:this.props.layerList}),ue.jsx("div",{className:"maputnik-layout-drawer",children:ue.jsx(XAe,{children:this.props.layerEditor})}),this.props.map]}),(zf().b[0][0]++,this.props.bottom&&(zf().b[0][1]++,ue.jsx("div",{className:"maputnik-layout-bottom",children:this.props.bottom}))),this.props.modals]})}}Kn(Fj,"childContextTypes",(zf().s[0]++,{reactIconBase:mi.object}));const JAe=(zf().s[4]++,qa()(Fj));function tl(){var r="/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",t="79207020c1a6a62db4f3db3338a49c0819045455",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return tl=function(){return s},s}tl();class Uj extends Zn.Component{render(){var o,s;tl().f[1]++;const{t,selectedLayerIndex:e}=(tl().s[1]++,this.props),n=(tl().s[2]++,(o=this.props.errors)==null?void 0:o.map((a,f)=>{var b;tl().f[2]++;let g;if(tl().s[3]++,tl().b[1][0]++,a.parsed&&(tl().b[1][1]++,a.parsed.type==="layer")){tl().b[0][0]++;const{parsed:I}=(tl().s[4]++,a),S=(tl().s[5]++,(b=this.props.mapStyle)==null?void 0:b.layers[I.data.index].id);tl().s[6]++,g=ue.jsxs(ue.Fragment,{children:[ue.jsxs(Jm,{t,children:["Layer ",ue.jsx("span",{children:Dj(S)}),": ",I.data.message]}),(tl().b[2][0]++,e!==I.data.index&&(tl().b[2][1]++,ue.jsxs(ue.Fragment,{children:[" — ",ue.jsx("button",{className:"maputnik-message-panel__switch-button",onClick:()=>(tl().f[3]++,tl().s[7]++,this.props.onLayerSelect(I.data.index)),children:t("switch to layer")})]})))]})}else tl().b[0][1]++,tl().s[8]++,g=a.message;return tl().s[9]++,ue.jsx("p",{className:"maputnik-message-panel-error",children:g},"error-"+f)})),i=(tl().s[10]++,(s=this.props.infos)==null?void 0:s.map((a,f)=>(tl().f[4]++,tl().s[11]++,ue.jsx("p",{children:a},"info-"+f))));return tl().s[12]++,ue.jsxs("div",{className:"maputnik-message-panel",children:[n,i]})}}Kn(Uj,"defaultProps",(tl().s[0]++,{onLayerSelect:()=>{tl().f[0]++}}));const ece=(tl().s[13]++,qa()(Uj));function Ib(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",t="a416dfabb7eaa48bd0505cf98cb9c66326bca3ec",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ib=function(){return s},s}Ib();class kb extends Zn.Component{render(){return Ib().f[0]++,Ib().s[0]++,ue.jsx(Ov,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(Sj,{...this.props})})}}function Tb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",t="4931f85d3ebf1a60a85ac9883e78e028b7a388d8",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Tb=function(){return s},s}Tb();class Gf extends Zn.Component{render(){return Tb().f[0]++,Tb().s[0]++,ue.jsx(ps,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(Tp,{...this.props})})}}function Pb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",t="37d7b9547efb8875177dbe7a186e7965cd9eb1c0",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Pb=function(){return s},s}Pb();class _p extends Zn.Component{render(){return Pb().f[0]++,Pb().s[0]++,ue.jsx(ps,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(ff,{...this.props})})}}function Kb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",t="a176a83ddcea7ca7f45b0bf957355a9e0c40a3af",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Kb=function(){return s},s}Kb();class Bv extends Zn.Component{render(){return Kb().f[0]++,Kb().s[0]++,ue.jsx(ps,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(QO,{...this.props})})}}function Rb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",t="ed4136288b91381a6bd6755cdb2ea1dcf45e2f6b",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Rb=function(){return s},s}Rb();class z2 extends Zn.Component{render(){return Rb().f[0]++,Rb().s[0]++,ue.jsx(ps,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(cg,{...this.props})})}}function Db(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",t="5745e67ee75c0f352c022256ef8bf31e8fa7367f",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Db=function(){return s},s}Db();class tce extends Zn.Component{render(){return Db().f[0]++,Db().s[0]++,ue.jsx(Ov,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(WO,{...this.props})})}}function Lb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",t="4d9e98bd5e7819496a7ef6b66981b81e318fe1bf",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Lb=function(){return s},s}Lb();class nce extends Zn.Component{render(){return Lb().f[0]++,Lb().s[0]++,ue.jsx(ps,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:ue.jsx(Mj,{...this.props})})}}function Iv(){var r="/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",t="3f2b222219042b3cb4a75b927d846ca17e6201aa",e=globalThis,n="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",statementMap:{0:{start:{line:1,column:13},end:{line:26,column:2}},1:{start:{line:1,column:21},end:{line:26,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:26,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,MAChD,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,4BAA4B;AAAA,MAC1B,OAAO,EAAE,4BAA4B;AAAA,MACrC,KAAK,EAAE,iDAAiD;AAAA,MACxD,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,qBAAqB;AAAA,MACnB,OAAO,EAAE,qBAAqB;AAAA,MAC9B,KAAK,EAAE,0BAA0B;AAAA,MACjC,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,gBAAgB;AAAA,MACd,OAAO,EAAE,gBAAgB;AAAA,MACzB,KAAK,EAAE,sDAAsD;AAAA,IAC/D;AAAA,EACF;AACF;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3f2b222219042b3cb4a75b927d846ca17e6201aa"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Iv=function(){return s},s}Iv();Iv().s[0]++;const jj=r=>(Iv().f[0]++,Iv().s[1]++,{maputnik:{maptiler_access_token:{label:r("MapTiler Access Token"),doc:r("Public access token for MapTiler Cloud."),docUrl:"https://docs.maptiler.com/cloud/api/authentication-key/",docUrlLinkText:r("Learn More")},thunderforest_access_token:{label:r("Thunderforest Access Token"),doc:r("Public access token for Thunderforest services."),docUrl:"https://www.thunderforest.com/docs/apikeys/",docUrlLinkText:r("Learn More")},stadia_access_token:{label:r("Stadia Maps API Key"),doc:r("API key for Stadia Maps."),docUrl:"https://docs.stadiamaps.com/authentication/",docUrlLinkText:r("Learn More")},style_renderer:{label:r("Style Renderer"),doc:r("Choose the default Maputnik renderer for this style.")}}});function ji(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalSettings.tsx",t="2bfcb2bc337b915a29f70f26bbf03f5047260e49",e=globalThis,n="__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:295,column:6}},27:{start:{line:298,column:22},end:{line:298,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:296,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:160,column:21},end:{line:160,column:42}},type:"binary-expr",locations:[{start:{line:160,column:21},end:{line:160,column:36}},{start:{line:160,column:40},end:{line:160,column:42}}],line:160},9:{loc:{start:{line:289,column:21},end:{line:289,column:62}},type:"binary-expr",locations:[{start:{line:289,column:21},end:{line:289,column:50}},{start:{line:289,column:54},end:{line:289,column:62}}],line:289}},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,IAAI,SAAS,oBAAoB;AAAA,cACxC,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,8BAA8B;AAAA,cAC9C,UAAU,yBAAyB,KAAK,MAAM,8BAA8B;AAAA;AAAA,UAC9E;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:"2bfcb2bc337b915a29f70f26bbf03f5047260e49"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ji=function(){return s},s}ji();class rce extends Zn.Component{changeTransitionProperty(t,e){ji().f[0]++;const n=(ji().s[0]++,{...this.props.mapStyle.transition});ji().s[1]++,e===void 0?(ji().b[0][0]++,ji().s[2]++,delete n[t]):(ji().b[0][1]++,ji().s[3]++,n[t]=e),ji().s[4]++,this.props.onStyleChanged({...this.props.mapStyle,transition:n})}changeLightProperty(t,e){ji().f[1]++;const n=(ji().s[5]++,{...this.props.mapStyle.light});ji().s[6]++,e===void 0?(ji().b[1][0]++,ji().s[7]++,delete n[t]):(ji().b[1][1]++,ji().s[8]++,n[t]=e),ji().s[9]++,this.props.onStyleChanged({...this.props.mapStyle,light:n})}changeTerrainProperty(t,e){ji().f[2]++;const n=(ji().s[10]++,{...this.props.mapStyle.terrain});ji().s[11]++,e===void 0?(ji().b[2][0]++,ji().s[12]++,delete n[t]):(ji().b[2][1]++,ji().s[13]++,n[t]=e),ji().s[14]++,this.props.onStyleChanged({...this.props.mapStyle,terrain:n})}changeStyleProperty(t,e){ji().f[3]++;const n=(ji().s[15]++,{...this.props.mapStyle});ji().s[16]++,e===void 0?(ji().b[3][0]++,ji().s[17]++,delete n[t]):(ji().b[3][1]++,ji().s[18]++,n[t]=e),ji().s[19]++,this.props.onStyleChanged(n)}render(){ji().f[4]++;const t=(ji().s[20]++,ji().b[4][0]++,this.props.mapStyle.metadata||(ji().b[4][1]++,{})),{t:e,onChangeMetadataProperty:n,mapStyle:i}=(ji().s[21]++,this.props),o=(ji().s[22]++,jj(e)),s=(ji().s[23]++,ji().b[5][0]++,this.props.mapStyle.light||(ji().b[5][1]++,{})),a=(ji().s[24]++,ji().b[6][0]++,this.props.mapStyle.transition||(ji().b[6][1]++,{})),f=(ji().s[25]++,ji().b[7][0]++,this.props.mapStyle.terrain||(ji().b[7][1]++,{}));return ji().s[26]++,ue.jsx(A0,{"data-wd-key":"modal:settings",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Style Settings"),children:ue.jsxs("div",{className:"modal:settings",children:[ue.jsx(_p,{label:e("Name"),fieldSpec:Jo.$root.name,"data-wd-key":"modal:settings.name",value:this.props.mapStyle.name,onChange:this.changeStyleProperty.bind(this,"name")}),ue.jsx(_p,{label:e("Owner"),fieldSpec:{doc:e("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")}),ue.jsx(Bv,{fieldSpec:Jo.$root.sprite,label:e("Sprite URL"),"data-wd-key":"modal:settings.sprite",value:this.props.mapStyle.sprite,onChange:this.changeStyleProperty.bind(this,"sprite")}),ue.jsx(Bv,{label:e("Glyphs URL"),fieldSpec:Jo.$root.glyphs,"data-wd-key":"modal:settings.glyphs",value:this.props.mapStyle.glyphs,onChange:this.changeStyleProperty.bind(this,"glyphs")}),ue.jsx(_p,{label:o.maputnik.maptiler_access_token.label,fieldSpec:o.maputnik.maptiler_access_token,"data-wd-key":"modal:settings.maputnik:openmaptiles_access_token",value:t["maputnik:openmaptiles_access_token"],onChange:n.bind(this,"maputnik:openmaptiles_access_token")}),ue.jsx(_p,{label:o.maputnik.thunderforest_access_token.label,fieldSpec:o.maputnik.thunderforest_access_token,"data-wd-key":"modal:settings.maputnik:thunderforest_access_token",value:t["maputnik:thunderforest_access_token"],onChange:n.bind(this,"maputnik:thunderforest_access_token")}),ue.jsx(_p,{label:o.maputnik.stadia_access_token.label,fieldSpec:o.maputnik.stadia_access_token,"data-wd-key":"modal:settings.maputnik:stadia_access_token",value:t["maputnik:stadia_access_token"],onChange:n.bind(this,"maputnik:stadia_access_token")}),ue.jsx(kb,{label:e("Center"),fieldSpec:Jo.$root.center,length:2,type:"number",value:(ji().b[8][0]++,i.center||(ji().b[8][1]++,[])),default:[0,0],onChange:this.changeStyleProperty.bind(this,"center")}),ue.jsx(Gf,{label:e("Zoom"),fieldSpec:Jo.$root.zoom,value:i.zoom,default:0,onChange:this.changeStyleProperty.bind(this,"zoom")}),ue.jsx(Gf,{label:e("Bearing"),fieldSpec:Jo.$root.bearing,value:i.bearing,default:Jo.$root.bearing.default,onChange:this.changeStyleProperty.bind(this,"bearing")}),ue.jsx(Gf,{label:e("Pitch"),fieldSpec:Jo.$root.pitch,value:i.pitch,default:Jo.$root.pitch.default,onChange:this.changeStyleProperty.bind(this,"pitch")}),ue.jsx(tce,{label:e("Light anchor"),fieldSpec:Jo.light.anchor,name:"light-anchor",value:s.anchor,options:Object.keys(Jo.light.anchor.values),default:Jo.light.anchor.default,onChange:this.changeLightProperty.bind(this,"anchor")}),ue.jsx(nce,{label:e("Light color"),fieldSpec:Jo.light.color,value:s.color,default:Jo.light.color.default,onChange:this.changeLightProperty.bind(this,"color")}),ue.jsx(Gf,{label:e("Light intensity"),fieldSpec:Jo.light.intensity,value:s.intensity,default:Jo.light.intensity.default,onChange:this.changeLightProperty.bind(this,"intensity")}),ue.jsx(kb,{label:e("Light position"),fieldSpec:Jo.light.position,type:"number",length:Jo.light.position.length,value:s.position,default:Jo.light.position.default,onChange:this.changeLightProperty.bind(this,"position")}),ue.jsx(_p,{label:e("Terrain source"),fieldSpec:Jo.terrain.source,"data-wd-key":"modal:settings.maputnik:terrain_source",value:f.source,onChange:this.changeTerrainProperty.bind(this,"source")}),ue.jsx(Gf,{label:e("Terrain exaggeration"),fieldSpec:Jo.terrain.exaggeration,value:f.exaggeration,default:Jo.terrain.exaggeration.default,onChange:this.changeTerrainProperty.bind(this,"exaggeration")}),ue.jsx(Gf,{label:e("Transition delay"),fieldSpec:Jo.transition.delay,value:a.delay,default:Jo.transition.delay.default,onChange:this.changeTransitionProperty.bind(this,"delay")}),ue.jsx(Gf,{label:e("Transition duration"),fieldSpec:Jo.transition.duration,value:a.duration,default:Jo.transition.duration.default,onChange:this.changeTransitionProperty.bind(this,"duration")}),ue.jsx(z2,{label:o.maputnik.style_renderer.label,fieldSpec:o.maputnik.style_renderer,"data-wd-key":"modal:settings.maputnik:renderer",options:[["mlgljs","MapLibreGL JS"],["ol",e("Open Layers (experimental)")]],value:(ji().b[9][0]++,t["maputnik:renderer"]||(ji().b[9][1]++,"mlgljs")),onChange:n.bind(this,"maputnik:renderer")})]})})}}const ice=(ji().s[27]++,qa()(rce));var SC={exports:{}},oce=SC.exports,aK;function ace(){return aK||(aK=1,function(r,t){(function(e,n,i){r.exports=i(),r.exports.default=i()})("slugify",oce,function(){var e=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","lj":"lj","Nj":"NJ","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"}`),n=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,s){if(typeof o!="string")throw new Error("slugify: string argument expected");s=typeof s=="string"?{replacement:s}:s||{};var a=n[s.locale]||{},f=s.replacement===void 0?"-":s.replacement,g=s.trim===void 0?!0:s.trim,b=o.normalize().split("").reduce(function(I,S){var B=a[S];return B===void 0&&(B=e[S]),B===void 0&&(B=S),B===f&&(B=" "),I+B.replace(s.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return s.strict&&(b=b.replace(/[^A-Za-z0-9\s]/g,"")),g&&(b=b.trim()),b=b.replace(/\s+/g,f),s.lower&&(b=b.toLowerCase()),b}return i.extend=function(o){Object.assign(e,o)},i})}(SC)),SC.exports}var sce=ace();const lce=us(sce);var EC={exports:{}},uce=EC.exports,sK;function Ace(){return sK||(sK=1,function(r,t){(function(e,n){n()})(uce,function(){function e(g,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(g.type)?new Blob(["\uFEFF",g],{type:g.type}):g}function n(g,b,I){var S=new XMLHttpRequest;S.open("GET",g),S.responseType="blob",S.onload=function(){f(S.response,b,I)},S.onerror=function(){console.error("could not download file")},S.send()}function i(g){var b=new XMLHttpRequest;b.open("HEAD",g,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function o(g){try{g.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),g.dispatchEvent(b)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof window=="object"&&window.global===window?window:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(g,b,I){var S=s.URL||s.webkitURL,B=document.createElement("a");b=b||g.name||"download",B.download=b,B.rel="noopener",typeof g=="string"?(B.href=g,B.origin===location.origin?o(B):i(B.href)?n(g,b,I):o(B,B.target="_blank")):(B.href=S.createObjectURL(g),setTimeout(function(){S.revokeObjectURL(B.href)},4e4),setTimeout(function(){o(B)},0))}:"msSaveOrOpenBlob"in navigator?function(g,b,I){if(b=b||g.name||"download",typeof g!="string")navigator.msSaveOrOpenBlob(e(g,I),b);else if(i(g))n(g,b,I);else{var S=document.createElement("a");S.href=g,S.target="_blank",setTimeout(function(){o(S)})}}:function(g,b,I,S){if(S=S||open("","_blank"),S&&(S.document.title=S.document.body.innerText="downloading..."),typeof g=="string")return n(g,b,I);var B=g.type==="application/octet-stream",P=/constructor/i.test(s.HTMLElement)||s.safari,U=/CriOS\/[\d]+/.test(navigator.userAgent);if((U||B&&P||a)&&typeof FileReader<"u"){var j=new FileReader;j.onloadend=function(){var ee=j.result;ee=U?ee:ee.replace(/^data:[^;]*;/,"data:attachment/file;"),S?S.location.href=ee:location=ee,S=null},j.readAsDataURL(g)}else{var q=s.URL||s.webkitURL,W=q.createObjectURL(g);S?S.location=W:location.href=W,S=null,setTimeout(function(){q.revokeObjectURL(W)},4e4)}});s.saveAs=f.saveAs=f,r.exports=f})}(EC)),EC.exports}var lK=Ace();const cce="5.0.1",dce="get_your_own_OpIi9ZULNHzrESv6T2vL",hce="b71f7f0ba4064f5eb9e903859a9cf5c6",zj={openmaptiles:dce,thunderforest:hce};function er(){var r="/home/runner/work/maputnik/maputnik/src/libs/style.ts",t="c162664fcb147ac7caff0efb860cd8a0c7d435d1",e=globalThis,n="__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:19},end:{line:47,column:42}},19:{start:{line:48,column:20},end:{line:48,column:67}},20:{start:{line:49,column:2},end:{line:51,column:3}},21:{start:{line:50,column:4},end:{line:50,column:37}},22:{start:{line:52,column:2},end:{line:52,column:21}},23:{start:{line:55,column:17},end:{line:55,column:45}},24:{start:{line:56,column:2},end:{line:56,column:31}},25:{start:{line:56,column:15},end:{line:56,column:31}},26:{start:{line:57,column:2},end:{line:57,column:57}},27:{start:{line:57,column:41},end:{line:57,column:57}},28:{start:{line:58,column:23},end:{line:58,column:33}},29:{start:{line:59,column:2},end:{line:63,column:3}},30:{start:{line:60,column:4},end:{line:60,column:37}},31:{start:{line:61,column:9},end:{line:63,column:3}},32:{start:{line:62,column:4},end:{line:62,column:30}},33:{start:{line:64,column:22},end:{line:64,column:68}},34:{start:{line:65,column:2},end:{line:67,column:3}},35:{start:{line:66,column:4},end:{line:66,column:20}},36:{start:{line:69,column:2},end:{line:73,column:3}},37:{start:{line:70,column:4},end:{line:70,column:55}},38:{start:{line:72,column:4},end:{line:72,column:57}},39:{start:{line:74,column:25},end:{line:80,column:3}},40:{start:{line:81,column:23},end:{line:84,column:3}},41:{start:{line:85,column:2},end:{line:85,column:22}},42:{start:{line:88,column:21},end:{line:88,column:29}},43:{start:{line:89,column:2},end:{line:91,column:5}},44:{start:{line:90,column:4},end:{line:90,column:76}},45:{start:{line:92,column:2},end:{line:100,column:3}},46:{start:{line:93,column:27},end:{line:93,column:73}},47:{start:{line:94,column:4},end:{line:99,column:5}},48:{start:{line:95,column:6},end:{line:98,column:8}},49:{start:{line:101,column:2},end:{line:101,column:22}},50:{start:{line:104,column:26},end:{line:106,column:3}},51:{start:{line:107,column:2},end:{line:107,column:63}},52:{start:{line:108,column:2},end:{line:108,column:64}},53:{start:{line:109,column:2},end:{line:109,column:57}},54:{start:{line:110,column:2},end:{line:113,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:53,column:1}},line:46},8:{name:"replaceSourceAccessToken",decl:{start:{line:54,column:9},end:{line:54,column:33}},loc:{start:{line:54,column:67},end:{line:86,column:1}},line:54},9:{name:"replaceAccessTokens",decl:{start:{line:87,column:9},end:{line:87,column:28}},loc:{start:{line:87,column:50},end:{line:102,column:1}},line:87},10:{name:"(anonymous_10)",decl:{start:{line:89,column:40},end:{line:89,column:41}},loc:{start:{line:89,column:56},end:{line:91,column:3}},line:89},11:{name:"stripAccessTokens",decl:{start:{line:103,column:9},end:{line:103,column:26}},loc:{start:{line:103,column:37},end:{line:114,column:1}},line:103}},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:19},end:{line:47,column:42}},type:"binary-expr",locations:[{start:{line:47,column:19},end:{line:47,column:36}},{start:{line:47,column:40},end:{line:47,column:42}}],line:47},4:{loc:{start:{line:49,column:2},end:{line:51,column:3}},type:"if",locations:[{start:{line:49,column:2},end:{line:51,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:49},5:{loc:{start:{line:49,column:6},end:{line:49,column:40}},type:"binary-expr",locations:[{start:{line:49,column:6},end:{line:49,column:24}},{start:{line:49,column:28},end:{line:49,column:40}}],line:49},6:{loc:{start:{line:54,column:56},end:{line:54,column:65}},type:"default-arg",locations:[{start:{line:54,column:63},end:{line:54,column:65}}],line:54},7:{loc:{start:{line:56,column:2},end:{line:56,column:31}},type:"if",locations:[{start:{line:56,column:2},end:{line:56,column:31}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},8:{loc:{start:{line:57,column:2},end:{line:57,column:57}},type:"if",locations:[{start:{line:57,column:2},end:{line:57,column:57}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57},9:{loc:{start:{line:57,column:6},end:{line:57,column:39}},type:"binary-expr",locations:[{start:{line:57,column:6},end:{line:57,column:24}},{start:{line:57,column:28},end:{line:57,column:39}}],line:57},10:{loc:{start:{line:59,column:2},end:{line:63,column:3}},type:"if",locations:[{start:{line:59,column:2},end:{line:63,column:3}},{start:{line:61,column:9},end:{line:63,column:3}}],line:59},11:{loc:{start:{line:59,column:6},end:{line:59,column:89}},type:"binary-expr",locations:[{start:{line:59,column:6},end:{line:59,column:46}},{start:{line:59,column:50},end:{line:59,column:89}}],line:59},12:{loc:{start:{line:61,column:9},end:{line:63,column:3}},type:"if",locations:[{start:{line:61,column:9},end:{line:63,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:61},13:{loc:{start:{line:61,column:13},end:{line:61,column:70}},type:"binary-expr",locations:[{start:{line:61,column:13},end:{line:61,column:28}},{start:{line:61,column:32},end:{line:61,column:70}}],line:61},14:{loc:{start:{line:65,column:2},end:{line:67,column:3}},type:"if",locations:[{start:{line:65,column:2},end:{line:67,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},15:{loc:{start:{line:69,column:2},end:{line:73,column:3}},type:"if",locations:[{start:{line:69,column:2},end:{line:73,column:3}},{start:{line:71,column:9},end:{line:73,column:3}}],line:69},16:{loc:{start:{line:87,column:39},end:{line:87,column:48}},type:"default-arg",locations:[{start:{line:87,column:46},end:{line:87,column:48}}],line:87},17:{loc:{start:{line:92,column:2},end:{line:100,column:3}},type:"if",locations:[{start:{line:92,column:2},end:{line:100,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:92},18:{loc:{start:{line:92,column:6},end:{line:92,column:114}},type:"binary-expr",locations:[{start:{line:92,column:6},end:{line:92,column:21}},{start:{line:92,column:26},end:{line:92,column:69}},{start:{line:92,column:73},end:{line:92,column:113}}],line:92},19:{loc:{start:{line:94,column:4},end:{line:99,column:5}},type:"if",locations:[{start:{line:94,column:4},end:{line:99,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:94}},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},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],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],17:[0,0],18:[0,0,0],19:[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,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,OAAQ,QAAO;AACnB,MAAG,EAAE,SAAS,WAAW,CAAC,OAAO,IAAK,QAAO;AAE7C,MAAI,iBAAiB;AACrB,MAAG,eAAe,6BAA6B,eAAe,0BAA0B;AACtF,qBAAiB;AAAA,EACnB,WACU,SAAS,UAAW,OAAO,KAAK,MAAM,mBAAmB,GAAG;AAGpE,qBAAiB;AAAA,EACnB;AAEA,QAAM,cAAc,eAAe,gBAAgB,UAAU,IAAI;AAEjE,MAAG,CAAC,aAAa;AAEf,WAAO;AAAA,EACT;AAEA,MAAI;AACJ,MAAI,kBAAkB,UAAU;AAI9B,gBAAY,GAAG,OAAO,GAAG,YAAY,WAAW;AAAA,EAClD,OAAO;AACL,gBAAY,OAAO,IAAI,QAAQ,SAAS,WAAW;AAAA,EACrD;AAEA,QAAM,iBAAiB;AAAA,IACrB,GAAG,SAAS;AAAA,IACZ,CAAC,UAAU,GAAG;AAAA,MACZ,GAAG;AAAA,MACH,KAAK;AAAA,IACP;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,gBAAgB,qCAAqC;AAC5D,SAAO,gBAAgB,8BAA8B;AACrD,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:"c162664fcb147ac7caff0efb860cd8a0c7d435d1"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return er=function(){return s},s}er();const fce=(er().s[0]++,Gj({version:8,sources:{},layers:[]}));function Nj(){return er().f[0]++,er().s[1]++,Math.random().toString(36).substring(2,9)}function pce(r){return er().f[1]++,er().s[2]++,er().b[1][0]++,!("id"in r)||(er().b[1][1]++,!r.id)?(er().b[0][0]++,er().s[3]++,r.id=Nj(),er().s[4]++,r):(er().b[0][1]++,er().s[5]++,r)}function mce(r){er().f[2]++;const t=(er().s[6]++,r.layers.map(e=>{er().f[3]++;const n=(er().s[7]++,{...e});return er().s[8]++,delete n.interactive,er().s[9]++,n}));return er().s[10]++,{...r,layers:t}}function gce(r){return er().f[4]++,er().s[11]++,{...r,layers:bW(r.layers)}}function Gj(r){return er().f[5]++,er().s[12]++,mce(gce(pce(r)))}function yce(r,t){er().f[6]++,er().s[13]++;for(let e=(er().s[14]++,0);e<r.length;e++){if(er().s[15]++,r[e].id===t)return er().b[2][0]++,er().s[16]++,e;er().b[2][1]++}return er().s[17]++,null}function YO(r,t,e){er().f[7]++;const n=(er().s[18]++,er().b[3][0]++,t.metadata||(er().b[3][1]++,{}));let i=(er().s[19]++,n[`maputnik:${r}_access_token`]);return er().s[20]++,er().b[5][0]++,e.allowFallback&&(er().b[5][1]++,!i)?(er().b[4][0]++,er().s[21]++,i=zj[r]):er().b[4][1]++,er().s[22]++,i}function vce(r,t,e=(er().b[6][0]++,{})){var g;er().f[8]++;const n=(er().s[23]++,r.sources[t]);if(er().s[24]++,n)er().b[7][1]++;else return er().b[7][0]++,er().s[25]++,r;if(er().s[26]++,er().b[9][0]++,!("url"in n)||(er().b[9][1]++,!n.url))return er().b[8][0]++,er().s[27]++,r;er().b[8][1]++;let i=(er().s[28]++,t);er().s[29]++,er().b[11][0]++,t==="thunderforest_transport"||(er().b[11][1]++,t==="thunderforest_outdoors")?(er().b[10][0]++,er().s[30]++,i="thunderforest"):(er().b[10][1]++,er().s[31]++,er().b[13][0]++,"url"in n&&(er().b[13][1]++,(g=n.url)==null?void 0:g.match(/\.stadiamaps\.com/))?(er().b[12][0]++,er().s[32]++,i="stadia"):er().b[12][1]++);const o=(er().s[33]++,YO(i,r,e));if(er().s[34]++,o)er().b[14][1]++;else return er().b[14][0]++,er().s[35]++,r;let s;er().s[36]++,i=="stadia"?(er().b[15][0]++,er().s[37]++,s=`${n.url}?api_key=${o}`):(er().b[15][1]++,er().s[38]++,s=n.url.replace("{key}",o));const a=(er().s[39]++,{...r.sources,[t]:{...n,url:s}}),f=(er().s[40]++,{...r,sources:a});return er().s[41]++,f}function _ce(r,t=(er().b[16][0]++,{})){er().f[9]++;let e=(er().s[42]++,r);if(er().s[43]++,Object.keys(r.sources).forEach(n=>{er().f[10]++,er().s[44]++,e=vce(e,n,t)}),er().s[45]++,er().b[18][0]++,r.glyphs&&(er().b[18][1]++,r.glyphs.match(/\.tilehosting\.com/)||(er().b[18][2]++,r.glyphs.match(/\.maptiler\.com/)))){er().b[17][0]++;const n=(er().s[46]++,YO("openmaptiles",r,t));er().s[47]++,n?(er().b[19][0]++,er().s[48]++,e={...e,glyphs:r.glyphs.replace("{key}",n)}):er().b[19][1]++}else er().b[17][1]++;return er().s[49]++,e}function Cce(r){er().f[11]++;const t=(er().s[50]++,{...r.metadata});return er().s[51]++,delete t["maputnik:openmaptiles_access_token"],er().s[52]++,delete t["maputnik:thunderforest_access_token"],er().s[53]++,delete t["maputnik:stadia_access_token"],er().s[54]++,{...r,metadata:t}}const oc={ensureStyleValidity:Gj,emptyStyle:fce,indexOfLayer:yce,generateId:Nj,getAccessToken:YO,replaceAccessTokens:_ce,stripAccessTokens:Cce};function Qr(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalExport.tsx",t="66cf81ab709608eec5a644a6a17a019c5afe48ce",e=globalThis,n="__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:15,column:36},end:{line:15,column:83}},2:{start:{line:18,column:4},end:{line:22,column:6}},3:{start:{line:25,column:4},end:{line:33,column:5}},4:{start:{line:26,column:6},end:{line:30,column:9}},5:{start:{line:32,column:6},end:{line:32,column:36}},6:{start:{line:36,column:23},end:{line:36,column:44}},7:{start:{line:37,column:22},end:{line:37,column:69}},8:{start:{line:38,column:17},end:{line:62,column:1}},9:{start:{line:63,column:17},end:{line:63,column:70}},10:{start:{line:64,column:23},end:{line:64,column:40}},11:{start:{line:65,column:4},end:{line:65,column:39}},12:{start:{line:68,column:23},end:{line:68,column:44}},13:{start:{line:69,column:4},end:{line:74,column:5}},14:{start:{line:70,column:19},end:{line:70,column:85}},15:{start:{line:71,column:25},end:{line:71,column:42}},16:{start:{line:72,column:6},end:{line:72,column:41}},17:{start:{line:73,column:6},end:{line:73,column:13}},18:{start:{line:75,column:21},end:{line:75,column:42}},19:{start:{line:76,column:4},end:{line:80,column:5}},20:{start:{line:77,column:6},end:{line:77,column:49}},21:{start:{line:78,column:6},end:{line:78,column:45}},22:{start:{line:79,column:6},end:{line:79,column:37}},23:{start:{line:79,column:30},end:{line:79,column:37}},24:{start:{line:81,column:21},end:{line:81,column:54}},25:{start:{line:82,column:4},end:{line:82,column:37}},26:{start:{line:83,column:4},end:{line:83,column:27}},27:{start:{line:84,column:4},end:{line:84,column:30}},28:{start:{line:87,column:23},end:{line:87,column:44}},29:{start:{line:88,column:23},end:{line:88,column:52}},30:{start:{line:89,column:4},end:{line:89,column:43}},31:{start:{line:90,column:4},end:{line:90,column:35}},32:{start:{line:90,column:28},end:{line:90,column:35}},33:{start:{line:91,column:21},end:{line:91,column:54}},34:{start:{line:92,column:4},end:{line:92,column:37}},35:{start:{line:93,column:4},end:{line:93,column:27}},36:{start:{line:94,column:4},end:{line:94,column:30}},37:{start:{line:97,column:23},end:{line:105,column:5}},38:{start:{line:106,column:23},end:{line:106,column:66}},39:{start:{line:107,column:4},end:{line:107,column:43}},40:{start:{line:108,column:4},end:{line:108,column:22}},41:{start:{line:111,column:25},end:{line:117,column:5}},42:{start:{line:118,column:4},end:{line:118,column:44}},43:{start:{line:121,column:14},end:{line:121,column:26}},44:{start:{line:122,column:16},end:{line:122,column:38}},45:{start:{line:123,column:4},end:{line:179,column:6}},46:{start:{line:182,column:20},end:{line:182,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:17,column:2},end:{line:17,column:3}},loc:{start:{line:17,column:19},end:{line:23,column:3}},line:17},1:{name:"(anonymous_1)",decl:{start:{line:24,column:2},end:{line:24,column:3}},loc:{start:{line:24,column:15},end:{line:34,column:3}},line:24},2:{name:"(anonymous_2)",decl:{start:{line:35,column:2},end:{line:35,column:3}},loc:{start:{line:35,column:15},end:{line:66,column:3}},line:35},3:{name:"(anonymous_3)",decl:{start:{line:67,column:2},end:{line:67,column:3}},loc:{start:{line:67,column:20},end:{line:85,column:3}},line:67},4:{name:"(anonymous_4)",decl:{start:{line:86,column:2},end:{line:86,column:3}},loc:{start:{line:86,column:22},end:{line:95,column:3}},line:86},5:{name:"(anonymous_5)",decl:{start:{line:96,column:2},end:{line:96,column:3}},loc:{start:{line:96,column:27},end:{line:109,column:3}},line:96},6:{name:"(anonymous_6)",decl:{start:{line:110,column:2},end:{line:110,column:3}},loc:{start:{line:110,column:42},end:{line:119,column:3}},line:110},7:{name:"(anonymous_7)",decl:{start:{line:120,column:2},end:{line:120,column:3}},loc:{start:{line:120,column:11},end:{line:180,column:3}},line:120}},branchMap:{0:{loc:{start:{line:25,column:4},end:{line:33,column:5}},type:"if",locations:[{start:{line:25,column:4},end:{line:33,column:5}},{start:{line:31,column:11},end:{line:33,column:5}}],line:25},1:{loc:{start:{line:37,column:22},end:{line:37,column:69}},type:"binary-expr",locations:[{start:{line:37,column:22},end:{line:37,column:46}},{start:{line:37,column:50},end:{line:37,column:69}}],line:37},2:{loc:{start:{line:69,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:69,column:4},end:{line:74,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:69},3:{loc:{start:{line:76,column:4},end:{line:80,column:5}},type:"if",locations:[{start:{line:76,column:4},end:{line:80,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:76},4:{loc:{start:{line:79,column:6},end:{line:79,column:37}},type:"if",locations:[{start:{line:79,column:6},end:{line:79,column:37}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:79},5:{loc:{start:{line:90,column:4},end:{line:90,column:35}},type:"if",locations:[{start:{line:90,column:4},end:{line:90,column:35}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:90},6:{loc:{start:{line:140,column:24},end:{line:140,column:58}},type:"binary-expr",locations:[{start:{line:140,column:24},end:{line:140,column:52}},{start:{line:140,column:56},end:{line:140,column:58}}],line:140},7:{loc:{start:{line:149,column:24},end:{line:149,column:58}},type:"binary-expr",locations:[{start:{line:149,column:24},end:{line:149,column:52}},{start:{line:149,column:56},end:{line:149,column:58}}],line:149},8:{loc:{start:{line:158,column:24},end:{line:158,column:58}},type:"binary-expr",locations:[{start:{line:158,column:24},end:{line:158,column:52}},{start:{line:158,column:56},end:{line:158,column:58}}],line:158},9:{loc:{start:{line:168,column:12},end:{line:171,column:16}},type:"binary-expr",locations:[{start:{line:168,column:12},end:{line:168,column:39}},{start:{line:168,column:59},end:{line:171,column:16}}],line:168}},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},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/ModalExport.tsx"],names:[],mappings:"AAoKQ,cAKA,YALA;AApKR,OAAO,WAAW;AAClB,OAAO,aAAa;AACpB,SAAQ,cAAa;AACrB,SAAQ,eAAc;AACtB,SAAQ,cAAa;AAErB,SAAQ,OAAO,cAAa;AAC5B,SAAyB,uBAAsB;AAE/C,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,yBAAyB;AAGhC,MAAM,sBAAsB;AAC5B,MAAM,8BAA8B,OAAO,OAAO,uBAAuB;AAazE,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAE1E,iBAAiB;AACf,WAAO;AAAA,MACL,MAAM;AAAA,QACJ,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,MAC/C;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAa;AACX,QAAI,KAAK,MAAM,SAAS,MAAM;AAC5B,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,aAAa;AACX,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,MAAM,YAAY;AAChB,UAAM,aAAa,KAAK,eAAe;AAIvC,QAAI,CAAC,6BAA6B;AAChC,YAAM,OAAO,IAAI,KAAK,CAAC,UAAU,GAAG,EAAC,MAAM,iCAAgC,CAAC;AAC5E,YAAM,aAAa,KAAK,WAAW;AACnC,aAAO,MAAM,aAAa,OAAO;AACjC;AAAA,IACF;AAEA,QAAI,aAAa,KAAK,MAAM;AAC5B,QAAI,cAAc,MAAM;AACtB,mBAAa,MAAM,KAAK,iBAAiB;AACzC,WAAK,MAAM,gBAAgB,UAAU;AACrC,UAAI,cAAc,KAAM;AAAA,IAC1B;AAEA,UAAM,WAAW,MAAM,WAAW,eAAe;AACjD,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM;AACrB,SAAK,MAAM,aAAa;AAAA,EAC1B;AAAA,EAEA,MAAM,cAAc;AAClB,UAAM,aAAa,KAAK,eAAe;AAEvC,UAAM,aAAa,MAAM,KAAK,iBAAiB;AAC/C,SAAK,MAAM,gBAAgB,UAAU;AACrC,QAAI,cAAc,KAAM;AAExB,UAAM,WAAW,MAAM,WAAW,eAAe;AACjD,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM;AACrB,SAAK,MAAM,aAAa;AAAA,EAC1B;AAAA,EAEA,MAAM,mBAAyD;AAC7D,UAAM,aAAoC;AAAA,MACxC,OAAO;AAAA,QACL;AAAA,UACE,aAAa;AAAA,UACb,QAAQ,EAAC,oBAAoB,CAAC,OAAO,EAAC;AAAA,QACxC;AAAA,MACF;AAAA,MACA,eAAe,KAAK,WAAW;AAAA,IACjC;AAEA,UAAM,aAAa,MAAM,OAAO,mBAAmB,UAAU;AAC7D,SAAK,MAAM,gBAAgB,UAAU;AACrC,WAAO;AAAA,EACT;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,YAAY;AAAA,QACrB,WAAU;AAAA,QAGV,+BAAC,aAAQ,WAAU,0BACjB;AAAA,8BAAC,QAAI,YAAE,YAAY,GAAE;AAAA,UACrB,oBAAC,OACE,YAAE,uCAAuC,GAC5C;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,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,oBAAoB;AAAA,gBACxC,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,8BAA8B;AAAA,gBACjF,UAAU,KAAK,uBAAuB,KAAK,MAAM,8BAA8B;AAAA;AAAA,YACjF;AAAA,aACF;AAAA,UAEA,qBAAC,SAAI,WAAU,iCACb;AAAA,iCAAC,eAAY,SAAS,KAAK,UAAU,KAAK,IAAI,GAC5C;AAAA,kCAAC,UAAM;AAAA,cACN,EAAE,MAAM;AAAA,eACX;AAAA,YACC,+BACC,qBAAC,eAAY,SAAS,KAAK,YAAY,KAAK,IAAI,GAC9C;AAAA,kCAAC,UAAM;AAAA,cACN,EAAE,SAAS;AAAA,eACd;AAAA,YAGF,qBAAC,eAAY,SAAS,KAAK,WAAW,KAAK,IAAI,GAC7C;AAAA,kCAAC,SAAK;AAAA,cACL,EAAE,aAAa;AAAA,eAClB;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IAEF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"66cf81ab709608eec5a644a6a17a019c5afe48ce"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Qr=function(){return s},s}Qr();const uK=(Qr().s[0]++,cce),AK=(Qr().s[1]++,typeof window.showSaveFilePicker=="function");class bce extends Zn.Component{tokenizedStyle(){return Qr().f[0]++,Qr().s[2]++,wD(oc.stripAccessTokens(oc.replaceAccessTokens(this.props.mapStyle)))}exportName(){return Qr().f[1]++,Qr().s[3]++,this.props.mapStyle.name?(Qr().b[0][0]++,Qr().s[4]++,lce(this.props.mapStyle.name,{replacement:"_",remove:/[*\-+~.()'"!:]/g,lower:!0})):(Qr().b[0][1]++,Qr().s[5]++,this.props.mapStyle.id)}createHtml(){Qr().f[2]++;const t=(Qr().s[6]++,this.tokenizedStyle()),e=(Qr().s[7]++,Qr().b[1][0]++,this.props.mapStyle.name||(Qr().b[1][1]++,this.props.t("Map"))),n=(Qr().s[8]++,`<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>${e}</title>
|
||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
||
<script src="https://unpkg.com/maplibre-gl@${uK}/dist/maplibre-gl.js"><\/script>
|
||
<link href="https://unpkg.com/maplibre-gl@${uK}/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: ${t},
|
||
});
|
||
map.addControl(new maplibregl.NavigationControl());
|
||
<\/script>
|
||
</body>
|
||
</html>
|
||
`),i=(Qr().s[9]++,new Blob([n],{type:"text/html;charset=utf-8"})),o=(Qr().s[10]++,this.exportName());Qr().s[11]++,lK.saveAs(i,o+".html")}async saveStyle(){Qr().f[3]++;const t=(Qr().s[12]++,this.tokenizedStyle());if(Qr().s[13]++,AK)Qr().b[2][1]++;else{Qr().b[2][0]++;const i=(Qr().s[14]++,new Blob([t],{type:"application/json;charset=utf-8"})),o=(Qr().s[15]++,this.exportName());Qr().s[16]++,lK.saveAs(i,o+".json"),Qr().s[17]++;return}let e=(Qr().s[18]++,this.props.fileHandle);if(Qr().s[19]++,e==null)if(Qr().b[3][0]++,Qr().s[20]++,e=await this.createFileHandle(),Qr().s[21]++,this.props.onSetFileHandle(e),Qr().s[22]++,e==null){Qr().b[4][0]++,Qr().s[23]++;return}else Qr().b[4][1]++;else Qr().b[3][1]++;const n=(Qr().s[24]++,await e.createWritable());Qr().s[25]++,await n.write(t),Qr().s[26]++,await n.close(),Qr().s[27]++,this.props.onOpenToggle()}async saveStyleAs(){Qr().f[4]++;const t=(Qr().s[28]++,this.tokenizedStyle()),e=(Qr().s[29]++,await this.createFileHandle());if(Qr().s[30]++,this.props.onSetFileHandle(e),Qr().s[31]++,e==null){Qr().b[5][0]++,Qr().s[32]++;return}else Qr().b[5][1]++;const n=(Qr().s[33]++,await e.createWritable());Qr().s[34]++,await n.write(t),Qr().s[35]++,await n.close(),Qr().s[36]++,this.props.onOpenToggle()}async createFileHandle(){Qr().f[5]++;const t=(Qr().s[37]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],suggestedName:this.exportName()}),e=(Qr().s[38]++,await window.showSaveFilePicker(t));return Qr().s[39]++,this.props.onSetFileHandle(e),Qr().s[40]++,e}changeMetadataProperty(t,e){Qr().f[6]++;const n=(Qr().s[41]++,{...this.props.mapStyle,metadata:{...this.props.mapStyle.metadata,[t]:e}});Qr().s[42]++,this.props.onStyleChanged(n)}render(){Qr().f[7]++;const t=(Qr().s[43]++,this.props.t),e=(Qr().s[44]++,jj(t));return Qr().s[45]++,ue.jsx(A0,{"data-wd-key":"modal:export",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Save Style"),className:"maputnik-export-modal",children:ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:t("Save Style")}),ue.jsx("p",{children:t("Save the JSON style to your computer.")}),ue.jsxs("div",{children:[ue.jsx(_p,{label:e.maputnik.maptiler_access_token.label,fieldSpec:e.maputnik.maptiler_access_token,value:(Qr().b[6][0]++,this.props.mapStyle.metadata||(Qr().b[6][1]++,{}))["maputnik:openmaptiles_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:openmaptiles_access_token")}),ue.jsx(_p,{label:e.maputnik.thunderforest_access_token.label,fieldSpec:e.maputnik.thunderforest_access_token,value:(Qr().b[7][0]++,this.props.mapStyle.metadata||(Qr().b[7][1]++,{}))["maputnik:thunderforest_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:thunderforest_access_token")}),ue.jsx(_p,{label:e.maputnik.stadia_access_token.label,fieldSpec:e.maputnik.stadia_access_token,value:(Qr().b[8][0]++,this.props.mapStyle.metadata||(Qr().b[8][1]++,{}))["maputnik:stadia_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:stadia_access_token")})]}),ue.jsxs("div",{className:"maputnik-modal-export-buttons",children:[ue.jsxs(Ws,{onClick:this.saveStyle.bind(this),children:[ue.jsx(OS,{}),t("Save")]}),(Qr().b[9][0]++,AK&&(Qr().b[9][1]++,ue.jsxs(Ws,{onClick:this.saveStyleAs.bind(this),children:[ue.jsx(OS,{}),t("Save as")]}))),ue.jsxs(Ws,{onClick:this.createHtml.bind(this),children:[ue.jsx(OY,{}),t("Create HTML")]})]})]})})}}const xce=(Qr().s[46]++,qa()(bce));function Fb(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",t="950dd35e62562a3439b74678b95f406e749c6958",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Fb=function(){return s},s}Fb();class Wj extends Zn.Component{render(){return Fb().f[0]++,Fb().s[0]++,ue.jsx(Ov,{label:this.props.label,children:ue.jsx(Oj,{...this.props})})}}function Ub(){var r="/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",t="a27c35e986d22656fa80c276efb67df518853ac2",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ub=function(){return s},s}Ub();class wce extends Zn.Component{render(){return Ub().f[0]++,Ub().s[0]++,ue.jsx(ps,{label:this.props.label,children:ue.jsx(GO,{...this.props})})}}function Hn(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalSourcesTypeEditor.tsx",t="d4e14fa2f16e0b2ba5d431eb89d4dbe2e079b40d",e=globalThis,n="__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:99,column:9}},8:{start:{line:66,column:32},end:{line:69,column:12}},9:{start:{line:80,column:33},end:{line:83,column:12}},10:{start:{line:92,column:33},end:{line:95,column:12}},11:{start:{line:102,column:27},end:{line:107,column:1}},12:{start:{line:102,column:34},end:{line:107,column:1}},13:{start:{line:110,column:14},end:{line:110,column:26}},14:{start:{line:111,column:24},end:{line:118,column:5}},15:{start:{line:112,column:26},end:{line:112,column:64}},16:{start:{line:113,column:6},end:{line:113,column:29}},17:{start:{line:114,column:6},end:{line:117,column:9}},18:{start:{line:119,column:4},end:{line:146,column:9}},19:{start:{line:126,column:29},end:{line:129,column:12}},20:{start:{line:133,column:8},end:{line:144,column:10}},21:{start:{line:141,column:31},end:{line:141,column:52}},22:{start:{line:151,column:14},end:{line:151,column:26}},23:{start:{line:152,column:24},end:{line:159,column:5}},24:{start:{line:153,column:26},end:{line:153,column:64}},25:{start:{line:154,column:6},end:{line:154,column:29}},26:{start:{line:155,column:6},end:{line:158,column:9}},27:{start:{line:160,column:23},end:{line:165,column:5}},28:{start:{line:161,column:6},end:{line:164,column:9}},29:{start:{line:166,column:4},end:{line:192,column:9}},30:{start:{line:179,column:8},end:{line:190,column:10}},31:{start:{line:187,column:31},end:{line:187,column:52}},32:{start:{line:197,column:14},end:{line:197,column:26}},33:{start:{line:198,column:4},end:{line:209,column:6}},34:{start:{line:204,column:28},end:{line:207,column:10}},35:{start:{line:214,column:14},end:{line:214,column:26}},36:{start:{line:215,column:4},end:{line:247,column:9}},37:{start:{line:227,column:12},end:{line:230,column:15}},38:{start:{line:240,column:12},end:{line:243,column:15}},39:{start:{line:252,column:14},end:{line:252,column:26}},40:{start:{line:253,column:24},end:{line:259,column:5}},41:{start:{line:260,column:4},end:{line:322,column:5}},42:{start:{line:262,column:8},end:{line:262,column:79}},43:{start:{line:264,column:8},end:{line:264,column:85}},44:{start:{line:266,column:8},end:{line:266,column:77}},45:{start:{line:268,column:8},end:{line:268,column:76}},46:{start:{line:270,column:8},end:{line:270,column:77}},47:{start:{line:272,column:8},end:{line:284,column:13}},48:{start:{line:277,column:36},end:{line:280,column:14}},49:{start:{line:286,column:8},end:{line:286,column:77}},50:{start:{line:288,column:8},end:{line:315,column:13}},51:{start:{line:294,column:38},end:{line:297,column:16}},52:{start:{line:308,column:38},end:{line:311,column:16}},53:{start:{line:317,column:8},end:{line:317,column:74}},54:{start:{line:319,column:8},end:{line:319,column:74}},55:{start:{line:321,column:8},end:{line:321,column:20}},56:{start:{line:325,column:31},end:{line:325,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:100,column:3}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:66,column:20},end:{line:66,column:21}},loc:{start:{line:66,column:32},end:{line:69,column:12}},line:66},6:{name:"(anonymous_6)",decl:{start:{line:80,column:20},end:{line:80,column:21}},loc:{start:{line:80,column:33},end:{line:83,column:12}},line:80},7:{name:"(anonymous_7)",decl:{start:{line:92,column:20},end:{line:92,column:21}},loc:{start:{line:92,column:33},end:{line:95,column:12}},line:92},8:{name:"(anonymous_8)",decl:{start:{line:102,column:27},end:{line:102,column:28}},loc:{start:{line:102,column:34},end:{line:107,column:1}},line:102},9:{name:"(anonymous_9)",decl:{start:{line:109,column:2},end:{line:109,column:3}},loc:{start:{line:109,column:11},end:{line:147,column:3}},line:109},10:{name:"(anonymous_10)",decl:{start:{line:111,column:24},end:{line:111,column:25}},loc:{start:{line:111,column:38},end:{line:118,column:5}},line:111},11:{name:"(anonymous_11)",decl:{start:{line:126,column:20},end:{line:126,column:21}},loc:{start:{line:126,column:29},end:{line:129,column:12}},line:126},12:{name:"(anonymous_12)",decl:{start:{line:132,column:32},end:{line:132,column:33}},loc:{start:{line:132,column:57},end:{line:145,column:7}},line:132},13:{name:"(anonymous_13)",decl:{start:{line:141,column:22},end:{line:141,column:23}},loc:{start:{line:141,column:31},end:{line:141,column:52}},line:141},14:{name:"(anonymous_14)",decl:{start:{line:150,column:2},end:{line:150,column:3}},loc:{start:{line:150,column:11},end:{line:193,column:3}},line:150},15:{name:"(anonymous_15)",decl:{start:{line:152,column:24},end:{line:152,column:25}},loc:{start:{line:152,column:38},end:{line:159,column:5}},line:152},16:{name:"(anonymous_16)",decl:{start:{line:160,column:23},end:{line:160,column:24}},loc:{start:{line:160,column:33},end:{line:165,column:5}},line:160},17:{name:"(anonymous_17)",decl:{start:{line:178,column:32},end:{line:178,column:33}},loc:{start:{line:178,column:57},end:{line:191,column:7}},line:178},18:{name:"(anonymous_18)",decl:{start:{line:187,column:22},end:{line:187,column:23}},loc:{start:{line:187,column:31},end:{line:187,column:52}},line:187},19:{name:"(anonymous_19)",decl:{start:{line:196,column:2},end:{line:196,column:3}},loc:{start:{line:196,column:11},end:{line:210,column:3}},line:196},20:{name:"(anonymous_20)",decl:{start:{line:204,column:18},end:{line:204,column:19}},loc:{start:{line:204,column:28},end:{line:207,column:10}},line:204},21:{name:"(anonymous_21)",decl:{start:{line:213,column:2},end:{line:213,column:3}},loc:{start:{line:213,column:11},end:{line:248,column:3}},line:213},22:{name:"(anonymous_22)",decl:{start:{line:226,column:20},end:{line:226,column:21}},loc:{start:{line:226,column:30},end:{line:231,column:11}},line:226},23:{name:"(anonymous_23)",decl:{start:{line:239,column:20},end:{line:239,column:21}},loc:{start:{line:239,column:33},end:{line:244,column:11}},line:239},24:{name:"(anonymous_24)",decl:{start:{line:251,column:2},end:{line:251,column:3}},loc:{start:{line:251,column:11},end:{line:323,column:3}},line:251},25:{name:"(anonymous_25)",decl:{start:{line:277,column:22},end:{line:277,column:23}},loc:{start:{line:277,column:36},end:{line:280,column:14}},line:277},26:{name:"(anonymous_26)",decl:{start:{line:294,column:24},end:{line:294,column:25}},loc:{start:{line:294,column:38},end:{line:297,column:16}},line:294},27:{name:"(anonymous_27)",decl:{start:{line:308,column:24},end:{line:308,column:25}},loc:{start:{line:308,column:38},end:{line:311,column:16}},line:308}},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:79,column:17},end:{line:79,column:47}},type:"binary-expr",locations:[{start:{line:79,column:17},end:{line:79,column:42}},{start:{line:79,column:46},end:{line:79,column:47}}],line:79},2:{loc:{start:{line:91,column:17},end:{line:91,column:48}},type:"binary-expr",locations:[{start:{line:91,column:17},end:{line:91,column:42}},{start:{line:91,column:46},end:{line:91,column:48}}],line:91},3:{loc:{start:{line:260,column:4},end:{line:322,column:5}},type:"switch",locations:[{start:{line:261,column:6},end:{line:262,column:79}},{start:{line:263,column:6},end:{line:264,column:85}},{start:{line:265,column:6},end:{line:266,column:77}},{start:{line:267,column:6},end:{line:268,column:76}},{start:{line:269,column:6},end:{line:270,column:77}},{start:{line:271,column:6},end:{line:284,column:13}},{start:{line:285,column:6},end:{line:286,column:77}},{start:{line:287,column:6},end:{line:315,column:13}},{start:{line:316,column:6},end:{line:317,column:74}},{start:{line:318,column:6},end:{line:319,column:74}},{start:{line:320,column:6},end:{line:321,column:20}}],line:260},4:{loc:{start:{line:281,column:19},end:{line:281,column:86}},type:"binary-expr",locations:[{start:{line:281,column:19},end:{line:281,column:45}},{start:{line:281,column:49},end:{line:281,column:86}}],line:281},5:{loc:{start:{line:298,column:21},end:{line:298,column:92}},type:"binary-expr",locations:[{start:{line:298,column:21},end:{line:298,column:47}},{start:{line:298,column:51},end:{line:298,column:92}}],line:298},6:{loc:{start:{line:312,column:21},end:{line:312,column:92}},type:"binary-expr",locations:[{start:{line:312,column:21},end:{line:312,column:47}},{start:{line:312,column:51},end:{line:312,column:92}}],line:312}},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},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},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],5:[0,0],6:[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;AAaA,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,aAAa;AAAA,UACtB,WAAW,OAAO,cAAc;AAAA,UAChC,SAAS;AAAA,YACP,CAAC,OAAO,mCAAmC;AAAA,YAC3C,CAAC,OAAO,yBAAyB;AAAA,UACnC;AAAA,UACA,UAAU,YAAU,KAAK,MAAM,SAAS;AAAA,YACtC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA,UACD,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,eAAY;AAAA;AAAA,MACd;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,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;AAAe,eAAO,oBAAC,uBAAqB,GAAG,aAAa;AAAA,MACjE,KAAK;AAAmB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MACtE,KAAK;AAAe,eAAO,oBAAC,uBAAqB,GAAG,aAClD;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,WAAW;AAAA,YACpB,WAAW,OAAO,cAAc;AAAA,YAChC,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,cACxC,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,YACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,cAAc,SAAS;AAAA,YACnE,eAAY;AAAA;AAAA,QACd,GACF;AAAA,MACA,KAAK;AAAuB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MAC1E,KAAK;AAAsB,eAAO,qBAAC,uBAAqB,GAAG,aACzD;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,WAAW;AAAA,cACpB,WAAW,OAAO,kBAAkB;AAAA,cACpC,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,gBACxC,GAAG,KAAK,MAAM;AAAA,gBACd;AAAA,cACF,CAAC;AAAA,cACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,kBAAkB,SAAS;AAAA,cACvE,eAAY;AAAA;AAAA,UACd;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,UAAU;AAAA,cACnB,WAAW,OAAO,kBAAkB;AAAA,cACpC,SAAS,OAAO,KAAK,OAAO,kBAAkB,SAAS,MAAM;AAAA,cAC7D,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,gBACxC,GAAG,KAAK,MAAM;AAAA,gBACd;AAAA,cACF,CAAC;AAAA,cACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,kBAAkB,SAAS;AAAA;AAAA,UACzE;AAAA,WACF;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:"d4e14fa2f16e0b2ba5d431eb89d4dbe2e079b40d"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Hn=function(){return s},s}Hn();class OM extends Zn.Component{render(){Hn().f[0]++;const t=(Hn().s[0]++,this.props.t);return Hn().s[1]++,ue.jsxs("div",{children:[ue.jsx(Bv,{label:t("TileJSON URL"),fieldSpec:Qa.source_vector.url,value:this.props.source.url,onChange:e=>(Hn().f[1]++,Hn().s[2]++,this.props.onChange({...this.props.source,url:e}))}),this.props.children]})}}class BM extends Zn.Component{changeTileUrls(t){Hn().f[2]++,Hn().s[3]++,this.props.onChange({...this.props.source,tiles:t})}renderTileUrls(){Hn().f[3]++;const t=(Hn().s[4]++,Hn().b[0][0]++,this.props.source.tiles||(Hn().b[0][1]++,[]));return Hn().s[5]++,ue.jsx(Wj,{label:this.props.t("Tile URL"),fieldSpec:Qa.source_vector.tiles,type:"url",value:t,onChange:this.changeTileUrls.bind(this)})}render(){Hn().f[4]++;const t=(Hn().s[6]++,this.props.t);return Hn().s[7]++,ue.jsxs("div",{children:[this.renderTileUrls(),ue.jsx(z2,{label:t("Scheme Type"),fieldSpec:Qa.source_vector.scheme,options:[["xyz","xyz (Slippy map tilenames scheme)"],["tms","tms (OSGeo spec scheme)"]],onChange:e=>(Hn().f[5]++,Hn().s[8]++,this.props.onChange({...this.props.source,scheme:e})),value:this.props.source.scheme,"data-wd-key":"modal:sources.add.scheme_type"}),ue.jsx(Gf,{label:t("Min Zoom"),fieldSpec:Qa.source_vector.minzoom,value:(Hn().b[1][0]++,this.props.source.minzoom||(Hn().b[1][1]++,0)),onChange:e=>(Hn().f[6]++,Hn().s[9]++,this.props.onChange({...this.props.source,minzoom:e}))}),ue.jsx(Gf,{label:t("Max Zoom"),fieldSpec:Qa.source_vector.maxzoom,value:(Hn().b[2][0]++,this.props.source.maxzoom||(Hn().b[2][1]++,22)),onChange:e=>(Hn().f[7]++,Hn().s[10]++,this.props.onChange({...this.props.source,maxzoom:e}))}),this.props.children]})}}Hn().s[11]++;const Qj=r=>(Hn().f[8]++,Hn().s[12]++,[{label:r("Coord top left"),key:"top left"},{label:r("Coord top right"),key:"top right"},{label:r("Coord bottom right"),key:"bottom right"},{label:r("Coord bottom left"),key:"bottom left"}]);class Mce extends Zn.Component{render(){Hn().f[9]++;const t=(Hn().s[13]++,this.props.t);Hn().s[14]++;const e=(n,i)=>{Hn().f[10]++;const o=(Hn().s[15]++,this.props.source.coordinates.slice(0));Hn().s[16]++,o[n]=i,Hn().s[17]++,this.props.onChange({...this.props.source,coordinates:o})};return Hn().s[18]++,ue.jsxs("div",{children:[ue.jsx(Bv,{label:t("Image URL"),fieldSpec:Qa.source_image.url,value:this.props.source.url,onChange:n=>(Hn().f[11]++,Hn().s[19]++,this.props.onChange({...this.props.source,url:n}))}),Qj(t).map(({label:n,key:i},o)=>(Hn().f[12]++,Hn().s[20]++,ue.jsx(kb,{label:n,length:2,type:"number",value:this.props.source.coordinates[o],default:[0,0],onChange:s=>(Hn().f[13]++,Hn().s[21]++,e(o,s))},i)))]})}}class Sce extends Zn.Component{render(){Hn().f[14]++;const t=(Hn().s[22]++,this.props.t);Hn().s[23]++;const e=(i,o)=>{Hn().f[15]++;const s=(Hn().s[24]++,this.props.source.coordinates.slice(0));Hn().s[25]++,s[i]=o,Hn().s[26]++,this.props.onChange({...this.props.source,coordinates:s})};Hn().s[27]++;const n=i=>{Hn().f[16]++,Hn().s[28]++,this.props.onChange({...this.props.source,urls:i})};return Hn().s[29]++,ue.jsxs("div",{children:[ue.jsx(Wj,{label:t("Video URL"),fieldSpec:Qa.source_video.urls,type:"string",value:this.props.source.urls,default:[],onChange:n}),Qj(t).map(({label:i,key:o},s)=>(Hn().f[17]++,Hn().s[30]++,ue.jsx(kb,{label:i,length:2,type:"number",value:this.props.source.coordinates[s],default:[0,0],onChange:a=>(Hn().f[18]++,Hn().s[31]++,e(s,a))},o)))]})}}class Ece extends Zn.Component{render(){Hn().f[19]++;const t=(Hn().s[32]++,this.props.t);return Hn().s[33]++,ue.jsx(Bv,{label:t("GeoJSON URL"),fieldSpec:Qa.source_geojson.data,value:this.props.source.data,onChange:e=>(Hn().f[20]++,Hn().s[34]++,this.props.onChange({...this.props.source,data:e}))})}}class Oce extends Zn.Component{render(){Hn().f[21]++;const t=(Hn().s[35]++,this.props.t);return Hn().s[36]++,ue.jsxs("div",{children:[ue.jsx(ps,{label:t("GeoJSON"),fieldSpec:Qa.source_geojson.data,children:ue.jsx(bO,{layer:this.props.source.data,maxHeight:200,mode:{name:"javascript",json:!0},lint:!0,onChange:e=>{Hn().f[22]++,Hn().s[37]++,this.props.onChange({...this.props.source,data:e})}})}),ue.jsx(wce,{label:t("Cluster"),value:this.props.source.cluster,onChange:e=>{Hn().f[23]++,Hn().s[38]++,this.props.onChange({...this.props.source,cluster:e})}})]})}}class Bce extends Zn.Component{render(){Hn().f[24]++;const t=(Hn().s[39]++,this.props.t),e=(Hn().s[40]++,{source:this.props.source,onChange:this.props.onChange,t:this.props.t,i18n:this.props.i18n,tReady:this.props.tReady});switch(Hn().s[41]++,this.props.mode){case"geojson_url":return Hn().b[3][0]++,Hn().s[42]++,ue.jsx(Ece,{...e});case"geojson_json":return Hn().b[3][1]++,Hn().s[43]++,ue.jsx(Oce,{...e});case"tilejson_vector":return Hn().b[3][2]++,Hn().s[44]++,ue.jsx(OM,{...e});case"tile_vector":return Hn().b[3][3]++,Hn().s[45]++,ue.jsx(BM,{...e});case"tilejson_raster":return Hn().b[3][4]++,Hn().s[46]++,ue.jsx(OM,{...e});case"tile_raster":return Hn().b[3][5]++,Hn().s[47]++,ue.jsx(BM,{...e,children:ue.jsx(Gf,{label:t("Tile Size"),fieldSpec:Qa.source_raster.tileSize,onChange:n=>(Hn().f[25]++,Hn().s[48]++,this.props.onChange({...this.props.source,tileSize:n})),value:(Hn().b[4][0]++,this.props.source.tileSize||(Hn().b[4][1]++,Qa.source_raster.tileSize.default)),"data-wd-key":"modal:sources.add.tile_size"})});case"tilejson_raster-dem":return Hn().b[3][6]++,Hn().s[49]++,ue.jsx(OM,{...e});case"tilexyz_raster-dem":return Hn().b[3][7]++,Hn().s[50]++,ue.jsxs(BM,{...e,children:[ue.jsx(Gf,{label:t("Tile Size"),fieldSpec:Qa.source_raster_dem.tileSize,onChange:n=>(Hn().f[26]++,Hn().s[51]++,this.props.onChange({...this.props.source,tileSize:n})),value:(Hn().b[5][0]++,this.props.source.tileSize||(Hn().b[5][1]++,Qa.source_raster_dem.tileSize.default)),"data-wd-key":"modal:sources.add.tile_size"}),ue.jsx(z2,{label:t("Encoding"),fieldSpec:Qa.source_raster_dem.encoding,options:Object.keys(Qa.source_raster_dem.encoding.values),onChange:n=>(Hn().f[27]++,Hn().s[52]++,this.props.onChange({...this.props.source,encoding:n})),value:(Hn().b[6][0]++,this.props.source.encoding||(Hn().b[6][1]++,Qa.source_raster_dem.encoding.default))})]});case"image":return Hn().b[3][8]++,Hn().s[53]++,ue.jsx(Mce,{...e});case"video":return Hn().b[3][9]++,Hn().s[54]++,ue.jsx(Sce,{...e});default:return Hn().b[3][10]++,Hn().s[55]++,null}}}const qj=(Hn().s[56]++,qa()(Bce));function Wf(){var r="/home/runner/work/maputnik/maputnik/src/libs/source.ts",t="315b9927ffd3b5bf51669bb9e53779783a451930",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Wf=function(){return s},s}Wf();function Ice(r,t){Wf().f[0]++;const e=(Wf().s[0]++,{...r.sources});return Wf().s[1]++,delete e[t],Wf().s[2]++,{...r,sources:e}}function cK(r,t,e){return Wf().f[1]++,Wf().s[3]++,Yj(r,t,e)}function Yj(r,t,e){Wf().f[2]++;const n=(Wf().s[4]++,{...r.sources,[t]:e});return Wf().s[5]++,{...r,sources:n}}const kce={type:"vector",url:"https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key={key}",title:"OpenMapTiles v3"},Tce={type:"vector",url:"https://tile.thunderforest.com/thunderforest.transport-v2.json?apikey={key}",title:"Thunderforest Transport v2"},Pce={type:"vector",url:"https://tile.thunderforest.com/thunderforest.outdoors-v2.json?apikey={key}",title:"Thunderforest Outdoors v2"},Kce={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"},dK={openmaptiles:kce,thunderforest_transport:Tce,thunderforest_outdoors:Pce,open_zoomstack:Kce};function fn(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalSources.tsx",t="0667caa48c4612ae19edc85c8f2029433e2c75ea",e=globalThis,n="__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:40,column:3}},3:{start:{line:38,column:4},end:{line:38,column:43}},4:{start:{line:38,column:22},end:{line:38,column:43}},5:{start:{line:39,column:4},end:{line:39,column:29}},6:{start:{line:41,column:2},end:{line:44,column:3}},7:{start:{line:42,column:4},end:{line:42,column:50}},8:{start:{line:42,column:22},end:{line:42,column:50}},9:{start:{line:43,column:4},end:{line:43,column:33}},10:{start:{line:45,column:2},end:{line:48,column:3}},11:{start:{line:46,column:4},end:{line:46,column:43}},12:{start:{line:46,column:22},end:{line:46,column:43}},13:{start:{line:47,column:4},end:{line:47,column:29}},14:{start:{line:49,column:2},end:{line:55,column:3}},15:{start:{line:50,column:4},end:{line:54,column:5}},16:{start:{line:51,column:6},end:{line:51,column:27}},17:{start:{line:53,column:6},end:{line:53,column:28}},18:{start:{line:56,column:2},end:{line:58,column:3}},19:{start:{line:57,column:4},end:{line:57,column:19}},20:{start:{line:59,column:2},end:{line:61,column:3}},21:{start:{line:60,column:4},end:{line:60,column:19}},22:{start:{line:62,column:2},end:{line:62,column:14}},23:{start:{line:66,column:14},end:{line:66,column:26}},24:{start:{line:67,column:4},end:{line:93,column:9}},25:{start:{line:79,column:27},end:{line:79,column:67}},26:{start:{line:98,column:4},end:{line:98,column:17}},27:{start:{line:99,column:4},end:{line:103,column:6}},28:{start:{line:106,column:19},end:{line:106,column:50}},29:{start:{line:107,column:25},end:{line:107,column:40}},30:{start:{line:108,column:4},end:{line:186,column:5}},31:{start:{line:110,column:8},end:{line:113,column:10}},32:{start:{line:115,column:8},end:{line:119,column:10}},33:{start:{line:121,column:8},end:{line:124,column:10}},34:{start:{line:126,column:8},end:{line:132,column:10}},35:{start:{line:134,column:8},end:{line:137,column:10}},36:{start:{line:139,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:159,column:10}},39:{start:{line:161,column:8},end:{line:170,column:10}},40:{start:{line:172,column:8},end:{line:183,column:10}},41:{start:{line:185,column:8},end:{line:185,column:18}},42:{start:{line:188,column:10},end:{line:191,column:3}},43:{start:{line:189,column:33},end:{line:189,column:43}},44:{start:{line:190,column:4},end:{line:190,column:39}},45:{start:{line:192,column:19},end:{line:194,column:3}},46:{start:{line:193,column:4},end:{line:193,column:30}},47:{start:{line:196,column:14},end:{line:196,column:26}},48:{start:{line:197,column:32},end:{line:199,column:5}},49:{start:{line:200,column:4},end:{line:250,column:9}},50:{start:{line:207,column:27},end:{line:207,column:57}},51:{start:{line:228,column:30},end:{line:228,column:87}},52:{start:{line:255,column:27},end:{line:255,column:40}},53:{start:{line:256,column:4},end:{line:256,column:35}},54:{start:{line:257,column:4},end:{line:257,column:26}},55:{start:{line:260,column:28},end:{line:260,column:38}},56:{start:{line:261,column:22},end:{line:261,column:77}},57:{start:{line:262,column:26},end:{line:275,column:6}},58:{start:{line:263,column:21},end:{line:263,column:47}},59:{start:{line:264,column:6},end:{line:274,column:8}},60:{start:{line:269,column:29},end:{line:269,column:93}},61:{start:{line:270,column:26},end:{line:270,column:85}},62:{start:{line:276,column:27},end:{line:288,column:6}},63:{start:{line:276,column:75},end:{line:276,column:106}},64:{start:{line:277,column:21},end:{line:277,column:44}},65:{start:{line:278,column:6},end:{line:287,column:8}},66:{start:{line:284,column:26},end:{line:284,column:107}},67:{start:{line:289,column:4},end:{line:319,column:6}},68:{start:{line:312,column:45},end:{line:312,column:109}},69:{start:{line:322,column:21},end:{line:322,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:63,column:1}},line:36},3:{name:"(anonymous_3)",decl:{start:{line:65,column:2},end:{line:65,column:3}},loc:{start:{line:65,column:11},end:{line:94,column:3}},line:65},4:{name:"(anonymous_4)",decl:{start:{line:79,column:21},end:{line:79,column:22}},loc:{start:{line:79,column:27},end:{line:79,column:67}},line:79},5:{name:"(anonymous_5)",decl:{start:{line:97,column:2},end:{line:97,column:3}},loc:{start:{line:97,column:21},end:{line:104,column:3}},line:97},6:{name:"(anonymous_6)",decl:{start:{line:105,column:2},end:{line:105,column:3}},loc:{start:{line:105,column:22},end:{line:187,column:3}},line:105},7:{name:"(anonymous_7)",decl:{start:{line:188,column:10},end:{line:188,column:11}},loc:{start:{line:188,column:16},end:{line:191,column:3}},line:188},8:{name:"(anonymous_8)",decl:{start:{line:192,column:19},end:{line:192,column:20}},loc:{start:{line:192,column:31},end:{line:194,column:3}},line:192},9:{name:"(anonymous_9)",decl:{start:{line:195,column:2},end:{line:195,column:3}},loc:{start:{line:195,column:11},end:{line:251,column:3}},line:195},10:{name:"(anonymous_10)",decl:{start:{line:207,column:20},end:{line:207,column:21}},loc:{start:{line:207,column:27},end:{line:207,column:57}},line:207},11:{name:"(anonymous_11)",decl:{start:{line:228,column:20},end:{line:228,column:21}},loc:{start:{line:228,column:30},end:{line:228,column:87}},line:228},12:{name:"(anonymous_12)",decl:{start:{line:254,column:2},end:{line:254,column:3}},loc:{start:{line:254,column:21},end:{line:258,column:3}},line:254},13:{name:"(anonymous_13)",decl:{start:{line:259,column:2},end:{line:259,column:3}},loc:{start:{line:259,column:11},end:{line:320,column:3}},line:259},14:{name:"(anonymous_14)",decl:{start:{line:262,column:60},end:{line:262,column:61}},loc:{start:{line:262,column:74},end:{line:275,column:5}},line:262},15:{name:"(anonymous_15)",decl:{start:{line:269,column:20},end:{line:269,column:21}},loc:{start:{line:269,column:29},end:{line:269,column:93}},line:269},16:{name:"(anonymous_16)",decl:{start:{line:270,column:20},end:{line:270,column:21}},loc:{start:{line:270,column:26},end:{line:270,column:85}},line:270},17:{name:"(anonymous_17)",decl:{start:{line:276,column:61},end:{line:276,column:62}},loc:{start:{line:276,column:75},end:{line:276,column:106}},line:276},18:{name:"(anonymous_18)",decl:{start:{line:276,column:112},end:{line:276,column:113}},loc:{start:{line:276,column:126},end:{line:288,column:5}},line:276},19:{name:"(anonymous_19)",decl:{start:{line:284,column:20},end:{line:284,column:21}},loc:{start:{line:284,column:26},end:{line:284,column:107}},line:284},20:{name:"(anonymous_20)",decl:{start:{line:312,column:23},end:{line:312,column:24}},loc:{start:{line:312,column:45},end:{line:312,column:109}},line:312}},branchMap:{0:{loc:{start:{line:37,column:2},end:{line:40,column:3}},type:"if",locations:[{start:{line:37,column:2},end:{line:40,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:38,column:43}},type:"if",locations:[{start:{line:38,column:4},end:{line:38,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},2:{loc:{start:{line:41,column:2},end:{line:44,column:3}},type:"if",locations:[{start:{line:41,column:2},end:{line:44,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},3:{loc:{start:{line:42,column:4},end:{line:42,column:50}},type:"if",locations:[{start:{line:42,column:4},end:{line:42,column:50}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},4:{loc:{start:{line:45,column:2},end:{line:48,column:3}},type:"if",locations:[{start:{line:45,column:2},end:{line:48,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},5:{loc:{start:{line:46,column:4},end:{line:46,column:43}},type:"if",locations:[{start:{line:46,column:4},end:{line:46,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:46},6:{loc:{start:{line:49,column:2},end:{line:55,column:3}},type:"if",locations:[{start:{line:49,column:2},end:{line:55,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:49},7:{loc:{start:{line:50,column:4},end:{line:54,column:5}},type:"if",locations:[{start:{line:50,column:4},end:{line:54,column:5}},{start:{line:52,column:11},end:{line:54,column:5}}],line:50},8:{loc:{start:{line:56,column:2},end:{line:58,column:3}},type:"if",locations:[{start:{line:56,column:2},end:{line:58,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},9:{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},10:{loc:{start:{line:106,column:19},end:{line:106,column:50}},type:"binary-expr",locations:[{start:{line:106,column:19},end:{line:106,column:44}},{start:{line:106,column:48},end:{line:106,column:50}}],line:106},11:{loc:{start:{line:106,column:20},end:{line:106,column:36}},type:"binary-expr",locations:[{start:{line:106,column:20},end:{line:106,column:30}},{start:{line:106,column:34},end:{line:106,column:36}}],line:106},12:{loc:{start:{line:108,column:4},end:{line:186,column:5}},type:"switch",locations:[{start:{line:109,column:6},end:{line:113,column:10}},{start:{line:114,column:6},end:{line:119,column:10}},{start:{line:120,column:6},end:{line:124,column:10}},{start:{line:125,column:6},end:{line:132,column:10}},{start:{line:133,column:6},end:{line:137,column:10}},{start:{line:138,column:6},end:{line:146,column:10}},{start:{line:147,column:6},end:{line:151,column:10}},{start:{line:152,column:6},end:{line:159,column:10}},{start:{line:160,column:6},end:{line:170,column:10}},{start:{line:171,column:6},end:{line:183,column:10}},{start:{line:184,column:6},end:{line:185,column:18}}],line:108},13:{loc:{start:{line:117,column:19},end:{line:117,column:42}},type:"binary-expr",locations:[{start:{line:117,column:19},end:{line:117,column:33}},{start:{line:117,column:37},end:{line:117,column:42}}],line:117},14:{loc:{start:{line:123,column:15},end:{line:123,column:72}},type:"binary-expr",locations:[{start:{line:123,column:15},end:{line:123,column:25}},{start:{line:123,column:29},end:{line:123,column:72}}],line:123},15:{loc:{start:{line:128,column:17},end:{line:128,column:80}},type:"binary-expr",locations:[{start:{line:128,column:17},end:{line:128,column:29}},{start:{line:128,column:33},end:{line:128,column:80}}],line:128},16:{loc:{start:{line:129,column:19},end:{line:129,column:38}},type:"binary-expr",locations:[{start:{line:129,column:19},end:{line:129,column:33}},{start:{line:129,column:37},end:{line:129,column:38}}],line:129},17:{loc:{start:{line:130,column:19},end:{line:130,column:39}},type:"binary-expr",locations:[{start:{line:130,column:19},end:{line:130,column:33}},{start:{line:130,column:37},end:{line:130,column:39}}],line:130},18:{loc:{start:{line:131,column:18},end:{line:131,column:40}},type:"binary-expr",locations:[{start:{line:131,column:18},end:{line:131,column:31}},{start:{line:131,column:35},end:{line:131,column:40}}],line:131},19:{loc:{start:{line:136,column:15},end:{line:136,column:72}},type:"binary-expr",locations:[{start:{line:136,column:15},end:{line:136,column:25}},{start:{line:136,column:29},end:{line:136,column:72}}],line:136},20:{loc:{start:{line:141,column:17},end:{line:141,column:80}},type:"binary-expr",locations:[{start:{line:141,column:17},end:{line:141,column:29}},{start:{line:141,column:33},end:{line:141,column:80}}],line:141},21:{loc:{start:{line:142,column:19},end:{line:142,column:38}},type:"binary-expr",locations:[{start:{line:142,column:19},end:{line:142,column:33}},{start:{line:142,column:37},end:{line:142,column:38}}],line:142},22:{loc:{start:{line:143,column:19},end:{line:143,column:39}},type:"binary-expr",locations:[{start:{line:143,column:19},end:{line:143,column:33}},{start:{line:143,column:37},end:{line:143,column:39}}],line:143},23:{loc:{start:{line:144,column:18},end:{line:144,column:40}},type:"binary-expr",locations:[{start:{line:144,column:18},end:{line:144,column:31}},{start:{line:144,column:35},end:{line:144,column:40}}],line:144},24:{loc:{start:{line:145,column:20},end:{line:145,column:42}},type:"binary-expr",locations:[{start:{line:145,column:20},end:{line:145,column:35}},{start:{line:145,column:39},end:{line:145,column:42}}],line:145},25:{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},26:{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},27:{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},28:{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},29:{loc:{start:{line:158,column:20},end:{line:158,column:42}},type:"binary-expr",locations:[{start:{line:158,column:20},end:{line:158,column:35}},{start:{line:158,column:39},end:{line:158,column:42}}],line:158}},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],26:[0,0],27:[0,0],28:[0,0],29:[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,MAAO,QAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,cAAc;AAC/B,QAAG,OAAO,MAAO,QAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,UAAU;AAC3B,QAAG,OAAO,MAAO,QAAO;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;AAAe,eAAO;AAAA,UACzB,MAAM;AAAA,UACN,OAAQ,OAAqC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACpG,SAAU,OAAqC,WAAW;AAAA,UAC1D,SAAU,OAAqC,WAAW;AAAA,UAC1D,QAAS,OAAqC,UAAU;AAAA,QAC1D;AAAA,MACA,KAAK;AAAmB,eAAO;AAAA,UAC7B,MAAM;AAAA,UACN,KAAM,OAAqC,OAAO,GAAG,QAAQ;AAAA,QAC/D;AAAA,MACA,KAAK;AAAe,eAAO;AAAA,UACzB,MAAM;AAAA,UACN,OAAQ,OAAqC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACpG,SAAU,OAAqC,WAAW;AAAA,UAC1D,SAAU,OAAqC,WAAW;AAAA,UAC1D,QAAS,OAAqC,UAAU;AAAA,UACxD,UAAW,OAAqC,YAAY;AAAA,QAC9D;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,UAC7D,UAAW,OAAwC,YAAY;AAAA,QACjE;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,UACrD,eAAY;AAAA;AAAA,MACd;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,eAAe,EAAE,oBAAoB,CAAC;AAAA,YACvC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AAAA,YAC9C,CAAC,eAAe,EAAE,oBAAoB,CAAC;AAAA,YACvC,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,UAClB,eAAY;AAAA;AAAA,MACd;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,UACd,eAAY;AAAA,UAEX,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:"0667caa48c4612ae19edc85c8f2029433e2c75ea"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return fn=function(){return s},s}fn();class Rce extends Zn.Component{render(){return fn().f[0]++,fn().s[0]++,ue.jsx("div",{className:"maputnik-public-source",children:ue.jsxs(Ws,{className:"maputnik-public-source-select",onClick:()=>(fn().f[1]++,fn().s[1]++,this.props.onSelect(this.props.id)),children:[ue.jsxs("div",{className:"maputnik-public-source-info",children:[ue.jsx("p",{className:"maputnik-public-source-name",children:this.props.title}),ue.jsxs("p",{className:"maputnik-public-source-id",children:["#",this.props.id]})]}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx(OD,{})]})})}}function Dce(r){return fn().f[2]++,fn().s[2]++,r.type==="raster"?(fn().b[0][0]++,fn().s[3]++,r.tiles?(fn().b[1][0]++,fn().s[4]++,"tile_raster"):(fn().b[1][1]++,fn().s[5]++,"tilejson_raster")):(fn().b[0][1]++,fn().s[6]++,r.type==="raster-dem"?(fn().b[2][0]++,fn().s[7]++,r.tiles?(fn().b[3][0]++,fn().s[8]++,"tilexyz_raster-dem"):(fn().b[3][1]++,fn().s[9]++,"tilejson_raster-dem")):(fn().b[2][1]++,fn().s[10]++,r.type==="vector"?(fn().b[4][0]++,fn().s[11]++,r.tiles?(fn().b[5][0]++,fn().s[12]++,"tile_vector"):(fn().b[5][1]++,fn().s[13]++,"tilejson_vector")):(fn().b[4][1]++,fn().s[14]++,r.type==="geojson"?(fn().b[6][0]++,fn().s[15]++,typeof r.data=="string"?(fn().b[7][0]++,fn().s[16]++,"geojson_url"):(fn().b[7][1]++,fn().s[17]++,"geojson_json")):(fn().b[6][1]++,fn().s[18]++,r.type==="image"?(fn().b[8][0]++,fn().s[19]++,"image"):(fn().b[8][1]++,fn().s[20]++,r.type==="video"?(fn().b[9][0]++,fn().s[21]++,"video"):(fn().b[9][1]++,fn().s[22]++,null))))))}class Lce extends Zn.Component{render(){fn().f[3]++;const t=(fn().s[23]++,this.props.t);return fn().s[24]++,ue.jsxs("div",{className:"maputnik-active-source-type-editor",children:[ue.jsxs("div",{className:"maputnik-active-source-type-editor-header",children:[ue.jsxs("span",{className:"maputnik-active-source-type-editor-header-id",children:["#",this.props.sourceId]}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx(Ws,{"aria-label":t("Remove '{{sourceId}}' source",{sourceId:this.props.sourceId}),className:"maputnik-active-source-type-editor-header-delete",onClick:()=>(fn().f[4]++,fn().s[25]++,this.props.onDelete(this.props.sourceId)),style:{backgroundColor:"transparent"},children:ue.jsx(Y1,{})})]}),ue.jsx("div",{className:"maputnik-active-source-type-editor-content",children:ue.jsx(qj,{onChange:this.props.onChange,mode:Dce(this.props.source),source:this.props.source})})]})}}class Fce extends Zn.Component{constructor(e){fn().f[5]++,fn().s[26]++;super(e);Kn(this,"onAdd",(fn().s[42]++,()=>{fn().f[7]++;const{source:e,sourceId:n}=(fn().s[43]++,this.state);fn().s[44]++,this.props.onAdd(n,e)}));Kn(this,"onChangeSource",(fn().s[45]++,e=>{fn().f[8]++,fn().s[46]++,this.setState({source:e})}));fn().s[27]++,this.state={mode:"tilejson_vector",sourceId:oc.generateId(),source:this.defaultSource("tilejson_vector")}}defaultSource(e){fn().f[6]++;const n=(fn().s[28]++,fn().b[10][0]++,(fn().b[11][0]++,this.state||(fn().b[11][1]++,{})).source||(fn().b[10][1]++,{})),{protocol:i}=(fn().s[29]++,window.location);switch(fn().s[30]++,e){case"geojson_url":return fn().b[12][0]++,fn().s[31]++,{type:"geojson",data:`${i}//localhost:3000/geojson.json`};case"geojson_json":return fn().b[12][1]++,fn().s[32]++,{type:"geojson",cluster:(fn().b[13][0]++,n.cluster||(fn().b[13][1]++,!1)),data:""};case"tilejson_vector":return fn().b[12][2]++,fn().s[33]++,{type:"vector",url:(fn().b[14][0]++,n.url||(fn().b[14][1]++,`${i}//localhost:3000/tilejson.json`))};case"tile_vector":return fn().b[12][3]++,fn().s[34]++,{type:"vector",tiles:(fn().b[15][0]++,n.tiles||(fn().b[15][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.pbf`])),minzoom:(fn().b[16][0]++,n.minzoom||(fn().b[16][1]++,0)),maxzoom:(fn().b[17][0]++,n.maxzoom||(fn().b[17][1]++,14)),scheme:(fn().b[18][0]++,n.scheme||(fn().b[18][1]++,"xyz"))};case"tilejson_raster":return fn().b[12][4]++,fn().s[35]++,{type:"raster",url:(fn().b[19][0]++,n.url||(fn().b[19][1]++,`${i}//localhost:3000/tilejson.json`))};case"tile_raster":return fn().b[12][5]++,fn().s[36]++,{type:"raster",tiles:(fn().b[20][0]++,n.tiles||(fn().b[20][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.png`])),minzoom:(fn().b[21][0]++,n.minzoom||(fn().b[21][1]++,0)),maxzoom:(fn().b[22][0]++,n.maxzoom||(fn().b[22][1]++,14)),scheme:(fn().b[23][0]++,n.scheme||(fn().b[23][1]++,"xyz")),tileSize:(fn().b[24][0]++,n.tileSize||(fn().b[24][1]++,512))};case"tilejson_raster-dem":return fn().b[12][6]++,fn().s[37]++,{type:"raster-dem",url:(fn().b[25][0]++,n.url||(fn().b[25][1]++,`${i}//localhost:3000/tilejson.json`))};case"tilexyz_raster-dem":return fn().b[12][7]++,fn().s[38]++,{type:"raster-dem",tiles:(fn().b[26][0]++,n.tiles||(fn().b[26][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.png`])),minzoom:(fn().b[27][0]++,n.minzoom||(fn().b[27][1]++,0)),maxzoom:(fn().b[28][0]++,n.maxzoom||(fn().b[28][1]++,14)),tileSize:(fn().b[29][0]++,n.tileSize||(fn().b[29][1]++,512))};case"image":return fn().b[12][8]++,fn().s[39]++,{type:"image",url:`${i}//localhost:3000/image.png`,coordinates:[[0,0],[0,0],[0,0],[0,0]]};case"video":return fn().b[12][9]++,fn().s[40]++,{type:"video",urls:[`${i}//localhost:3000/movie.mp4`],coordinates:[[0,0],[0,0],[0,0],[0,0]]};default:return fn().b[12][10]++,fn().s[41]++,{}}}render(){fn().f[9]++;const e=(fn().s[47]++,this.props.t),n=(fn().s[48]++,{doc:Jo.source_vector.type.doc});return fn().s[49]++,ue.jsxs("div",{className:"maputnik-add-source",children:[ue.jsx(_p,{label:e("Source ID"),fieldSpec:{doc:e("Unique ID that identifies the source and is used in the layer to reference the source.")},value:this.state.sourceId,onChange:i=>(fn().f[10]++,fn().s[50]++,this.setState({sourceId:i})),"data-wd-key":"modal:sources.add.source_id"}),ue.jsx(z2,{label:e("Source Type"),fieldSpec:n,options:[["geojson_json",e("GeoJSON (JSON)")],["geojson_url",e("GeoJSON (URL)")],["tilejson_vector",e("Vector (TileJSON URL)")],["tile_vector",e("Vector (Tile URLs)")],["tilejson_raster",e("Raster (TileJSON URL)")],["tile_raster",e("Raster (Tile URLs)")],["tilejson_raster-dem",e("Raster DEM (TileJSON URL)")],["tilexyz_raster-dem",e("Raster DEM (XYZ URLs)")],["image",e("Image")],["video",e("Video")]],onChange:i=>(fn().f[11]++,fn().s[51]++,this.setState({mode:i,source:this.defaultSource(i)})),value:this.state.mode,"data-wd-key":"modal:sources.add.source_type"}),ue.jsx(qj,{onChange:this.onChangeSource,mode:this.state.mode,source:this.state.source}),ue.jsx(Ws,{className:"maputnik-add-source-button",onClick:this.onAdd,"data-wd-key":"modal:sources.add.add_source",children:e("Add Source")})]})}}class Uce extends Zn.Component{stripTitle(t){fn().f[12]++;const e=(fn().s[52]++,{...t});return fn().s[53]++,delete e.title,fn().s[54]++,e}render(){fn().f[13]++;const{t,mapStyle:e}=(fn().s[55]++,this.props),n=(fn().s[56]++,{t,i18n:this.props.i18n,tReady:this.props.tReady}),i=(fn().s[57]++,Object.keys(e.sources).map(s=>{fn().f[14]++;const a=(fn().s[58]++,e.sources[s]);return fn().s[59]++,ue.jsx(Lce,{sourceId:s,source:a,onChange:f=>(fn().f[15]++,fn().s[60]++,this.props.onStyleChanged(Yj(e,s,f))),onDelete:()=>(fn().f[16]++,fn().s[61]++,this.props.onStyleChanged(Ice(e,s))),...n},s)})),o=(fn().s[62]++,Object.keys(dK).filter(s=>(fn().f[17]++,fn().s[63]++,!(s in e.sources))).map(s=>{fn().f[18]++;const a=(fn().s[64]++,dK[s]);return fn().s[65]++,ue.jsx(Rce,{id:s,type:a.type,title:a.title,onSelect:()=>(fn().f[19]++,fn().s[66]++,this.props.onStyleChanged(cK(e,s,this.stripTitle(a))))},s)}));return fn().s[67]++,ue.jsxs(A0,{"data-wd-key":"modal:sources",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Sources"),children:[ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:t("Active Sources")}),i]}),ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:t("Choose Public Source")}),ue.jsx("p",{children:t("Add one of the publicly available sources to your style.")}),ue.jsx("div",{className:"maputnik-public-sources",style:{maxWidth:500},children:o})]}),ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:t("Add New Source")}),ue.jsx("p",{children:t("Add a new source to your style. You can only choose the source type and id at creation time!")}),ue.jsx(Fce,{onAdd:(s,a)=>(fn().f[20]++,fn().s[68]++,this.props.onStyleChanged(cK(e,s,a))),...n})]})]})}}const jce=(fn().s[69]++,qa()(Uce));var cC={},hK;function zce(){if(hK)return cC;hK=1,Object.defineProperty(cC,"__esModule",{value:!0});var r=Object.assign||function(P){for(var U=1;U<arguments.length;U++){var j=arguments[U];for(var q in j)Object.prototype.hasOwnProperty.call(j,q)&&(P[q]=j[q])}return P},t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},e=function(){function P(U,j){for(var q=0;q<j.length;q++){var W=j[q];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(U,W.key,W)}}return function(U,j,q){return j&&P(U.prototype,j),q&&P(U,q),U}}(),n=Ts(),i=f(n),o=Tv(),s=a(o);function a(P){return P&&P.__esModule?P:{default:P}}function f(P){if(P&&P.__esModule)return P;var U={};if(P!=null)for(var j in P)Object.prototype.hasOwnProperty.call(P,j)&&(U[j]=P[j]);return U.default=P,U}function g(P,U){var j={};for(var q in P)U.indexOf(q)>=0||Object.prototype.hasOwnProperty.call(P,q)&&(j[q]=P[q]);return j}function b(P,U){if(!(P instanceof U))throw new TypeError("Cannot call a class as a function")}function I(P,U){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:P}function S(P,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);P.prototype=Object.create(U&&U.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(P,U):P.__proto__=U)}var B=function(P){S(U,P);function U(j){b(this,U);var q=I(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,j));q.handleChange=function(ee){var J=Array.prototype.slice.call(ee.target.files),$=(q.props.as||"url").toLowerCase();Promise.all(J.map(function(X){return new Promise(function(G,ae){var ge=new FileReader;switch(ge.onload=function(he){G([he,X])},$){case"binary":{ge.readAsBinaryString(X);break}case"buffer":{ge.readAsArrayBuffer(X);break}case"text":{ge.readAsText(X);break}case"url":{ge.readAsDataURL(X);break}}})})).then(function(X){q.props.onChange(ee,X)})},q.triggerInput=function(){var ee=s.default.findDOMNode(q._reactFileReaderInput);ee&&ee.click()};var W=(typeof window>"u"?"undefined":t(window))==="object"?window:{};return(!W.File||!W.FileReader||!W.FileList||!W.Blob)&&console.warn("[react-file-reader-input] Some file APIs detected as not supported. File reader functionality may not fully work."),q}return e(U,[{key:"render",value:function(){var q=this,W=this.props;W.as;var ee=W.children,J=W.style,$=g(W,["as","children","style"]),X=ee?{position:"absolute",top:"-9999px"}:{};return i.createElement("div",{className:"_react-file-reader-input",onClick:this.triggerInput,style:J},i.createElement("input",r({},$,{type:"file",ref:function(ae){q._reactFileReaderInput=ae},onChange:this.handleChange,onClick:function(){q._reactFileReaderInput.value=null},style:X})),ee)}}]),U}(i.Component);return cC.default=B,cC}var Nce=zce();const Gce=us(Nce);function oh(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx",t="8092b056f21d597f3cd7d476fbebca118ff97879",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return oh=function(){return s},s}oh();class Wce extends Zn.Component{underlayOnClick(t){oh().f[0]++,oh().s[0]++,t.stopPropagation()}render(){oh().f[1]++;const t=(oh().s[1]++,this.props.t);return oh().s[2]++,ue.jsxs(A0,{"data-wd-key":"modal:loading",isOpen:this.props.isOpen,underlayClickExits:!1,underlayProps:{onClick:e=>(oh().f[2]++,oh().s[3]++,underlayProps(e))},title:this.props.title,onOpenToggle:()=>(oh().f[3]++,oh().s[4]++,this.props.onCancel()),children:[ue.jsx("p",{children:this.props.message}),ue.jsx("p",{className:"maputnik-dialog__buttons",children:ue.jsx(Ws,{onClick:e=>(oh().f[4]++,oh().s[5]++,this.props.onCancel(e)),children:t("Cancel")})})]})}}const Qce=(oh().s[6]++,qa()(Wce)),$j=[{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:"americana",title:"Americana",url:"https://americanamap.org/style.json",thumbnail:"https://github.com/maplibre/maputnik/assets/649392/23fa75ad-63e6-43f5-8837-03cdb0428bac"},{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:"osm-openmaptiles",title:"OSM OpenMapTiles",url:"https://api.maptiler.com/maps/openstreetmap/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL",thumbnail:"https://openmaptiles.org/img/styles/openmaptiles.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:"protomaps-light",title:"Protomaps Light",url:"https://api.protomaps.com/styles/v4/light/en.json?key=d828297496b11844",thumbnail:"https://github.com/user-attachments/assets/911f9765-4a7d-4736-9ec0-f2d4c90ae587"},{id:"stadia-outdoors",title:"Stadia Outdoors",url:"https://tiles.stadiamaps.com/styles/outdoors.json",thumbnail:"https://tiles.stadiamaps.com/static/outdoors.png?size=480x320¢er=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 Jn(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalOpen.tsx",t="29ff9eb08a4518c25ccd9ea0089ac05d05f682b1",e=globalThis,n="__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:54,column:31}},6:{start:{line:54,column:11},end:{line:54,column:31}},7:{start:{line:55,column:4},end:{line:61,column:5}},8:{start:{line:56,column:6},end:{line:56,column:39}},9:{start:{line:57,column:6},end:{line:60,column:9}},10:{start:{line:63,column:18},end:{line:100,column:3}},11:{start:{line:64,column:4},end:{line:64,column:22}},12:{start:{line:65,column:19},end:{line:65,column:24}},13:{start:{line:66,column:4},end:{line:91,column:7}},14:{start:{line:70,column:6},end:{line:70,column:29}},15:{start:{line:72,column:6},end:{line:74,column:7}},16:{start:{line:73,column:8},end:{line:73,column:15}},17:{start:{line:75,column:6},end:{line:78,column:9}},18:{start:{line:79,column:23},end:{line:79,column:54}},19:{start:{line:80,column:6},end:{line:80,column:48}},20:{start:{line:81,column:6},end:{line:81,column:39}},21:{start:{line:82,column:6},end:{line:82,column:26}},22:{start:{line:84,column:6},end:{line:88,column:9}},23:{start:{line:89,column:6},end:{line:89,column:25}},24:{start:{line:90,column:6},end:{line:90,column:61}},25:{start:{line:92,column:4},end:{line:99,column:7}},26:{start:{line:95,column:10},end:{line:95,column:26}},27:{start:{line:101,column:16},end:{line:104,column:3}},28:{start:{line:102,column:4},end:{line:102,column:23}},29:{start:{line:103,column:4},end:{line:103,column:44}},30:{start:{line:105,column:15},end:{line:132,column:3}},31:{start:{line:106,column:4},end:{line:106,column:22}},32:{start:{line:107,column:23},end:{line:115,column:5}},33:{start:{line:116,column:25},end:{line:116,column:68}},34:{start:{line:117,column:17},end:{line:117,column:43}},35:{start:{line:118,column:20},end:{line:118,column:37}},36:{start:{line:120,column:4},end:{line:127,column:5}},37:{start:{line:121,column:6},end:{line:121,column:37}},38:{start:{line:123,column:6},end:{line:125,column:9}},39:{start:{line:126,column:6},end:{line:126,column:13}},40:{start:{line:128,column:4},end:{line:128,column:51}},41:{start:{line:129,column:4},end:{line:129,column:49}},42:{start:{line:130,column:4},end:{line:130,column:24}},43:{start:{line:131,column:4},end:{line:131,column:16}},44:{start:{line:135,column:18},end:{line:155,column:3}},45:{start:{line:136,column:21},end:{line:136,column:29}},46:{start:{line:137,column:19},end:{line:137,column:35}},47:{start:{line:138,column:4},end:{line:138,column:22}},48:{start:{line:139,column:4},end:{line:139,column:37}},49:{start:{line:140,column:4},end:{line:153,column:6}},50:{start:{line:142,column:6},end:{line:149,column:7}},51:{start:{line:143,column:8},end:{line:143,column:48}},52:{start:{line:145,column:8},end:{line:147,column:11}},53:{start:{line:148,column:8},end:{line:148,column:15}},54:{start:{line:150,column:6},end:{line:150,column:53}},55:{start:{line:151,column:6},end:{line:151,column:39}},56:{start:{line:152,column:6},end:{line:152,column:26}},57:{start:{line:154,column:4},end:{line:154,column:50}},58:{start:{line:154,column:28},end:{line:154,column:49}},59:{start:{line:157,column:4},end:{line:159,column:7}},60:{start:{line:160,column:4},end:{line:160,column:22}},61:{start:{line:161,column:4},end:{line:161,column:30}},62:{start:{line:163,column:16},end:{line:167,column:3}},63:{start:{line:164,column:4},end:{line:166,column:7}},64:{start:{line:169,column:14},end:{line:169,column:26}},65:{start:{line:170,column:25},end:{line:181,column:6}},66:{start:{line:171,column:6},end:{line:180,column:8}},67:{start:{line:183,column:4},end:{line:188,column:5}},68:{start:{line:184,column:6},end:{line:187,column:11}},69:{start:{line:186,column:61},end:{line:186,column:78}},70:{start:{line:189,column:4},end:{line:267,column:9}},71:{start:{line:195,column:30},end:{line:195,column:49}},72:{start:{line:263,column:27},end:{line:263,column:56}},73:{start:{line:270,column:18},end:{line:270,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:62,column:3}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:63,column:18},end:{line:63,column:19}},loc:{start:{line:63,column:32},end:{line:100,column:3}},line:63},6:{name:"(anonymous_6)",decl:{start:{line:69,column:12},end:{line:69,column:13}},loc:{start:{line:69,column:31},end:{line:71,column:5}},line:69},7:{name:"(anonymous_7)",decl:{start:{line:71,column:12},end:{line:71,column:13}},loc:{start:{line:71,column:22},end:{line:83,column:5}},line:71},8:{name:"(anonymous_8)",decl:{start:{line:83,column:13},end:{line:83,column:14}},loc:{start:{line:83,column:22},end:{line:91,column:5}},line:83},9:{name:"(anonymous_9)",decl:{start:{line:94,column:15},end:{line:94,column:16}},loc:{start:{line:94,column:26},end:{line:96,column:9}},line:94},10:{name:"(anonymous_10)",decl:{start:{line:101,column:16},end:{line:101,column:17}},loc:{start:{line:101,column:23},end:{line:104,column:3}},line:101},11:{name:"(anonymous_11)",decl:{start:{line:105,column:15},end:{line:105,column:16}},loc:{start:{line:105,column:27},end:{line:132,column:3}},line:105},12:{name:"(anonymous_12)",decl:{start:{line:135,column:18},end:{line:135,column:19}},loc:{start:{line:135,column:38},end:{line:155,column:3}},line:135},13:{name:"(anonymous_13)",decl:{start:{line:140,column:20},end:{line:140,column:21}},loc:{start:{line:140,column:27},end:{line:153,column:5}},line:140},14:{name:"(anonymous_14)",decl:{start:{line:154,column:21},end:{line:154,column:22}},loc:{start:{line:154,column:28},end:{line:154,column:49}},line:154},15:{name:"(anonymous_15)",decl:{start:{line:156,column:2},end:{line:156,column:3}},loc:{start:{line:156,column:17},end:{line:162,column:3}},line:156},16:{name:"(anonymous_16)",decl:{start:{line:163,column:16},end:{line:163,column:17}},loc:{start:{line:163,column:25},end:{line:167,column:3}},line:163},17:{name:"(anonymous_17)",decl:{start:{line:168,column:2},end:{line:168,column:3}},loc:{start:{line:168,column:11},end:{line:268,column:3}},line:168},18:{name:"(anonymous_18)",decl:{start:{line:170,column:42},end:{line:170,column:43}},loc:{start:{line:170,column:54},end:{line:181,column:5}},line:170},19:{name:"(anonymous_19)",decl:{start:{line:186,column:55},end:{line:186,column:56}},loc:{start:{line:186,column:61},end:{line:186,column:78}},line:186},20:{name:"(anonymous_20)",decl:{start:{line:195,column:24},end:{line:195,column:25}},loc:{start:{line:195,column:30},end:{line:195,column:49}},line:195},21:{name:"(anonymous_21)",decl:{start:{line:263,column:20},end:{line:263,column:21}},loc:{start:{line:263,column:27},end:{line:263,column:56}},line:263}},branchMap:{0:{loc:{start:{line:54,column:4},end:{line:54,column:31}},type:"if",locations:[{start:{line:54,column:4},end:{line:54,column:31}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:54},1:{loc:{start:{line:55,column:4},end:{line:61,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:61,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},2:{loc:{start:{line:72,column:6},end:{line:74,column:7}},type:"if",locations:[{start:{line:72,column:6},end:{line:74,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:72},3:{loc:{start:{line:183,column:4},end:{line:188,column:5}},type:"if",locations:[{start:{line:183,column:4},end:{line:188,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:183},4:{loc:{start:{line:202,column:53},end:{line:217,column:21}},type:"cond-expr",locations:[{start:{line:202,column:119},end:{line:213,column:15}},{start:{line:213,column:34},end:{line:217,column:21}}],line:202}},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,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]},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;AAgBA,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,EAAG,GAAE,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,aAAa,YAAY;AACvB,SAAK,WAAW;AAEhB,UAAM,aAAoC;AAAA,MACxC,OAAO;AAAA,QACL;AAAA,UACE,aAAa;AAAA,UACb,QAAQ,EAAE,oBAAoB,CAAC,OAAO,EAAE;AAAA,QAC1C;AAAA,MACF;AAAA,MACA,UAAU;AAAA,IACZ;AAEA,UAAM,CAAC,UAAU,IAAI,MAAM,OAAO,mBAAmB,UAAU;AAC/D,UAAM,OAAO,MAAM,WAAW,QAAQ;AACtC,UAAM,UAAU,MAAM,KAAK,KAAK;AAEhC,QAAI;AACJ,QAAI;AACF,iBAAW,KAAK,MAAM,OAAO;AAAA,IAC/B,SAAS,KAAK;AACZ,WAAK,SAAS;AAAA,QACZ,OAAQ,IAAc,SAAS;AAAA,MACjC,CAAC;AACD;AAAA,IACF;AACA,eAAW,MAAM,oBAAoB,QAAQ;AAE7C,SAAK,MAAM,YAAY,UAAU,UAAU;AAC3C,SAAK,aAAa;AAClB,WAAO;AAAA,EACT;AAAA;AAAA;AAAA,EAIA,gBAAgB,OAAO,GAAQ,UAAoB;AACjD,UAAM,CAAC,EAAE,IAAI,IAAI,MAAM,CAAC;AACxB,UAAM,SAAS,IAAI,WAAW;AAC9B,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,kBAAkB,GAAE;AAAA,cAC3B,oBAAC,OAAG,YAAE,6CAA6C,GAAE;AAAA,cACrD,oBAAC,SACE,iBAAO,OAAO,uBAAuB,aACpC;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,KAAK;AAAA,kBAAY;AAAA,wCAAC,gBAAY;AAAA,oBAAE;AAAA,oBAAE,EAAE,YAAY;AAAA;AAAA;AAAA,cAC3D,IAEA,oBAAC,mBAAgB,UAAU,KAAK,eAAe,UAAU,IAAI,cAAY,EAAE,YAAY,GACrF,+BAAC,eAAY,WAAU,0BAAyB;AAAA,oCAAC,gBAAa;AAAA,gBAAE;AAAA,gBAAE,EAAE,YAAY;AAAA,iBAAE,GACpF,GAEJ;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:"29ff9eb08a4518c25ccd9ea0089ac05d05f682b1"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Jn=function(){return s},s}Jn();class qce extends Zn.Component{render(){return Jn().f[0]++,Jn().s[0]++,ue.jsx("div",{className:"maputnik-public-style",children:ue.jsxs(Ws,{className:"maputnik-public-style-button","aria-label":this.props.title,onClick:()=>(Jn().f[1]++,Jn().s[1]++,this.props.onSelect(this.props.url)),children:[ue.jsxs("div",{className:"maputnik-public-style-header",children:[ue.jsx("div",{children:this.props.title}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx(OD,{})]}),ue.jsx("div",{className:"maputnik-public-style-thumbnail",style:{backgroundImage:`url(${this.props.thumbnailUrl})`}})]})})}}class Yce extends Zn.Component{constructor(e){Jn().f[2]++,Jn().s[2]++;super(e);Kn(this,"onStyleSelect",(Jn().s[10]++,e=>{Jn().f[5]++,Jn().s[11]++,this.clearError();let n=(Jn().s[12]++,!1);Jn().s[13]++,fetch(e,{mode:"cors",credentials:"same-origin"}).then(function(i){return Jn().f[6]++,Jn().s[14]++,i.json()}).then(i=>{if(Jn().f[7]++,Jn().s[15]++,n){Jn().b[2][0]++,Jn().s[16]++;return}else Jn().b[2][1]++;Jn().s[17]++,this.setState({activeRequest:null,activeRequestUrl:null});const o=(Jn().s[18]++,oc.ensureStyleValidity(i));Jn().s[19]++,console.log("Loaded style ",o.id),Jn().s[20]++,this.props.onStyleOpen(o),Jn().s[21]++,this.onOpenToggle()}).catch(i=>{Jn().f[8]++,Jn().s[22]++,this.setState({error:`Failed to load: '${e}'`,activeRequest:null,activeRequestUrl:null}),Jn().s[23]++,console.error(i),Jn().s[24]++,console.warn("Could not open the style URL",e)}),Jn().s[25]++,this.setState({activeRequest:{abort:function(){Jn().f[9]++,Jn().s[26]++,n=!0}},activeRequestUrl:e})}));Kn(this,"onSubmitUrl",(Jn().s[27]++,e=>{Jn().f[10]++,Jn().s[28]++,e.preventDefault(),Jn().s[29]++,this.onStyleSelect(this.state.styleUrl)}));Kn(this,"onOpenFile",(Jn().s[30]++,async()=>{Jn().f[11]++,Jn().s[31]++,this.clearError();const e=(Jn().s[32]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],multiple:!1}),[n]=(Jn().s[33]++,await window.showOpenFilePicker(e)),i=(Jn().s[34]++,await n.getFile()),o=(Jn().s[35]++,await i.text());let s;Jn().s[36]++;try{Jn().s[37]++,s=JSON.parse(o)}catch(a){Jn().s[38]++,this.setState({error:a.toString()}),Jn().s[39]++;return}return Jn().s[40]++,s=oc.ensureStyleValidity(s),Jn().s[41]++,this.props.onStyleOpen(s,n),Jn().s[42]++,this.onOpenToggle(),Jn().s[43]++,i}));Kn(this,"onFileChanged",(Jn().s[44]++,async(e,n)=>{Jn().f[12]++;const[,i]=(Jn().s[45]++,n[0]),o=(Jn().s[46]++,new FileReader);Jn().s[47]++,this.clearError(),Jn().s[48]++,o.readAsText(i,"UTF-8"),Jn().s[49]++,o.onload=s=>{var f;Jn().f[13]++;let a;Jn().s[50]++;try{Jn().s[51]++,a=JSON.parse((f=s.target)==null?void 0:f.result)}catch(g){Jn().s[52]++,this.setState({error:g.toString()}),Jn().s[53]++;return}Jn().s[54]++,a=oc.ensureStyleValidity(a),Jn().s[55]++,this.props.onStyleOpen(a),Jn().s[56]++,this.onOpenToggle()},Jn().s[57]++,o.onerror=s=>(Jn().f[14]++,Jn().s[58]++,console.log(s.target))}));Kn(this,"onChangeUrl",(Jn().s[62]++,e=>{Jn().f[16]++,Jn().s[63]++,this.setState({styleUrl:e})}));Jn().s[3]++,this.state={styleUrl:""}}clearError(){Jn().f[3]++,Jn().s[4]++,this.setState({error:null})}onCancelActiveRequest(e){Jn().f[4]++,Jn().s[5]++,e?(Jn().b[0][0]++,Jn().s[6]++,e.stopPropagation()):Jn().b[0][1]++,Jn().s[7]++,this.state.activeRequest?(Jn().b[1][0]++,Jn().s[8]++,this.state.activeRequest.abort(),Jn().s[9]++,this.setState({activeRequest:null,activeRequestUrl:null})):Jn().b[1][1]++}onOpenToggle(){Jn().f[15]++,Jn().s[59]++,this.setState({styleUrl:""}),Jn().s[60]++,this.clearError(),Jn().s[61]++,this.props.onOpenToggle()}render(){Jn().f[17]++;const e=(Jn().s[64]++,this.props.t),n=(Jn().s[65]++,$j.map(o=>(Jn().f[18]++,Jn().s[66]++,ue.jsx(qce,{url:o.url,title:o.title,thumbnailUrl:o.thumbnail,onSelect:this.onStyleSelect},o.id))));let i;return Jn().s[67]++,this.state.error?(Jn().b[3][0]++,Jn().s[68]++,i=ue.jsxs("div",{className:"maputnik-modal-error",children:[this.state.error,ue.jsx("a",{href:"#",onClick:()=>(Jn().f[19]++,Jn().s[69]++,this.clearError()),className:"maputnik-modal-error-close",children:"×"})]})):Jn().b[3][1]++,Jn().s[70]++,ue.jsxs("div",{children:[ue.jsxs(A0,{"data-wd-key":"modal:open",isOpen:this.props.isOpen,onOpenToggle:()=>(Jn().f[20]++,Jn().s[71]++,this.onOpenToggle()),title:e("Open Style"),children:[i,ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:e("Open local Style")}),ue.jsx("p",{children:e("Open a local JSON style from your computer.")}),ue.jsx("div",{children:typeof window.showOpenFilePicker=="function"?(Jn().b[4][0]++,ue.jsxs(Ws,{className:"maputnik-big-button",onClick:this.onOpenFile,children:[ue.jsx(wI,{})," ",e("Open Style")]})):(Jn().b[4][1]++,ue.jsx(Gce,{onChange:this.onFileChanged,tabIndex:-1,"aria-label":e("Open Style"),children:ue.jsxs(Ws,{className:"maputnik-upload-button",children:[ue.jsx(wI,{})," ",e("Open Style")]})}))})]}),ue.jsx("section",{className:"maputnik-modal-section",children:ue.jsxs("form",{onSubmit:this.onSubmitUrl,children:[ue.jsx("h1",{children:e("Load from URL")}),ue.jsx("p",{children:ue.jsxs(Jm,{t:e,children:["Load from a URL. Note that the URL must have ",ue.jsx("a",{href:"https://enable-cors.org",target:"_blank",rel:"noopener noreferrer",children:"CORS enabled"}),"."]})}),ue.jsx(QO,{"aria-label":e("Style URL"),"data-wd-key":"modal:open.url.input",type:"text",className:"maputnik-input",default:e("Enter URL..."),value:this.state.styleUrl,onInput:this.onChangeUrl,onChange:this.onChangeUrl}),ue.jsx("div",{children:ue.jsx(Ws,{"data-wd-key":"modal:open.url.button",type:"submit",className:"maputnik-big-button",disabled:this.state.styleUrl.length<1,children:"Load from URL"})})]})}),ue.jsxs("section",{className:"maputnik-modal-section maputnik-modal-section--shrink",children:[ue.jsx("h1",{children:e("Gallery Styles")}),ue.jsx("p",{children:e("Open one of the publicly available styles to start from.")}),ue.jsx("div",{className:"maputnik-style-gallery-container",children:n})]})]}),ue.jsx(Qce,{isOpen:!!this.state.activeRequest,title:e("Loading style"),onCancel:o=>(Jn().f[21]++,Jn().s[72]++,this.onCancelActiveRequest(o)),message:e("Loading: {{requestUrl}}",{requestUrl:this.state.activeRequestUrl})})]})}}const $ce=(Jn().s[73]++,qa()(Yce));function af(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx",t="2fa0c1760625a188da3b2788fa0924b96bb7f3e1",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return af=function(){return s},s}af();class Vce extends Zn.Component{render(){af().f[0]++;const t=(af().s[0]++,this.props.t),e=(af().s[1]++,[{key:ue.jsx("kbd",{children:"?"}),text:t("Shortcuts menu")},{key:ue.jsx("kbd",{children:"o"}),text:t("Open modal")},{key:ue.jsx("kbd",{children:"e"}),text:t("Export modal")},{key:ue.jsx("kbd",{children:"d"}),text:t("Data Sources modal")},{key:ue.jsx("kbd",{children:"s"}),text:t("Style Settings modal")},{key:ue.jsx("kbd",{children:"i"}),text:t("Toggle inspect")},{key:ue.jsx("kbd",{children:"m"}),text:t("Focus map")},{key:ue.jsx("kbd",{children:"!"}),text:t("Debug modal")}]),n=(af().s[2]++,[{key:ue.jsx("kbd",{children:"+"}),text:t("Increase the zoom level by 1.")},{key:ue.jsxs(ue.Fragment,{children:[ue.jsx("kbd",{children:"Shift"})," + ",ue.jsx("kbd",{children:"+"})]}),text:t("Increase the zoom level by 2.")},{key:ue.jsx("kbd",{children:"-"}),text:t("Decrease the zoom level by 1.")},{key:ue.jsxs(ue.Fragment,{children:[ue.jsx("kbd",{children:"Shift"})," + ",ue.jsx("kbd",{children:"-"})]}),text:t("Decrease the zoom level by 2.")},{key:ue.jsx("kbd",{children:"Up"}),text:t("Pan up by 100 pixels.")},{key:ue.jsx("kbd",{children:"Down"}),text:t("Pan down by 100 pixels.")},{key:ue.jsx("kbd",{children:"Left"}),text:t("Pan left by 100 pixels.")},{key:ue.jsx("kbd",{children:"Right"}),text:t("Pan right by 100 pixels.")},{key:ue.jsxs(ue.Fragment,{children:[ue.jsx("kbd",{children:"Shift"})," + ",ue.jsx("kbd",{children:"Right"})]}),text:t("Increase the rotation by 15 degrees.")},{key:ue.jsxs(ue.Fragment,{children:[ue.jsx("kbd",{children:"Shift"})," + ",ue.jsx("kbd",{children:"Left"})]}),text:t("Decrease the rotation by 15 degrees.")},{key:ue.jsxs(ue.Fragment,{children:[ue.jsx("kbd",{children:"Shift"})," + ",ue.jsx("kbd",{children:"Up"})]}),text:t("Increase the pitch by 10 degrees.")},{key:ue.jsxs(ue.Fragment,{children:[ue.jsx("kbd",{children:"Shift"})," + ",ue.jsx("kbd",{children:"Down"})]}),text:t("Decrease the pitch by 10 degrees.")}]);return af().s[3]++,ue.jsx(A0,{"data-wd-key":"modal:shortcuts",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Shortcuts"),children:ue.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[ue.jsx("p",{children:ue.jsxs(Jm,{t,children:["Press ",ue.jsx("code",{children:"ESC"})," to lose focus of any active elements, then press one of:"]})}),ue.jsx("dl",{children:e.map((i,o)=>(af().f[1]++,af().s[4]++,ue.jsxs("div",{className:"maputnik-modal-shortcuts__shortcut",children:[ue.jsx("dt",{children:i.key},"dt"+o),ue.jsx("dd",{children:i.text},"dd"+o)]},o)))}),ue.jsx("p",{children:t("If the Map is in focused you can use the following shortcuts")}),ue.jsx("ul",{children:n.map((i,o)=>(af().f[2]++,af().s[5]++,ue.jsxs("li",{children:[ue.jsx("span",{children:i.key})," ",i.text]},o)))})]})})}}const Hce=(af().s[6]++,qa()(Vce));function $u(){var r="/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx",t="a1d210f2dd55b03f0e8aae655258e8184b2d45b3",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return $u=function(){return s},s}$u();class Zce extends Zn.Component{render(){$u().f[0]++;const{t,mapView:e}=($u().s[0]++,this.props),n=($u().s[1]++,Math.round(e.zoom)+1),i=($u().s[2]++,+e.center.lng.toFixed(5)),o=($u().s[3]++,+e.center.lat.toFixed(5));return $u().s[4]++,ue.jsxs(A0,{"data-wd-key":"modal:debug",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Debug"),children:[ue.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[ue.jsx("h1",{children:t("Options")}),($u().b[0][0]++,this.props.renderer==="mlgljs"&&($u().b[0][1]++,ue.jsx("ul",{children:Object.entries(this.props.maplibreGlDebugOptions).map(([s,a])=>($u().f[1]++,$u().s[5]++,ue.jsx("li",{children:ue.jsxs("label",{children:[ue.jsx("input",{type:"checkbox",checked:a,onChange:f=>($u().f[2]++,$u().s[6]++,this.props.onChangeMaplibreGlDebug(s,f.target.checked))})," ",s]})},s)))}))),($u().b[1][0]++,this.props.renderer==="ol"&&($u().b[1][1]++,ue.jsx("ul",{children:Object.entries(this.props.openlayersDebugOptions).map(([s,a])=>($u().f[3]++,$u().s[7]++,ue.jsx("li",{children:ue.jsxs("label",{children:[ue.jsx("input",{type:"checkbox",checked:a,onChange:f=>($u().f[4]++,$u().s[8]++,this.props.onChangeOpenlayersDebug(s,f.target.checked))})," ",s]})},s)))})))]}),ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:"Links"}),ue.jsx("p",{children:ue.jsxs(Jm,{t,children:[ue.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:`https://www.openstreetmap.org/#map=${n}/${o}/${i}`,children:"Open in OSM"})," — Opens the current view on openstreetmap.org"]})})]})]})}}const Xce=($u().s[9]++,qa()(Zce));var T0={},Gy={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var Jce=Gy.exports,fK;function ede(){return fK||(fK=1,function(r,t){(function(e){var n=t&&!t.nodeType&&t,i=!r.nodeType&&r,o=typeof window=="object"&&window;(o.global===o||o.window===o||o.self===o)&&(e=o);var s,a=2147483647,f=36,g=1,b=26,I=38,S=700,B=72,P=128,U="-",j=/^xn--/,q=/[^\x20-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,ee={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},J=f-g,$=Math.floor,X=String.fromCharCode,G;function ae(Ue){throw new RangeError(ee[Ue])}function ge(Ue,ke){for(var We=Ue.length,vt=[];We--;)vt[We]=ke(Ue[We]);return vt}function he(Ue,ke){var We=Ue.split("@"),vt="";We.length>1&&(vt=We[0]+"@",Ue=We[1]),Ue=Ue.replace(W,".");var Pt=Ue.split("."),ut=ge(Pt,ke).join(".");return vt+ut}function Ie(Ue){for(var ke=[],We=0,vt=Ue.length,Pt,ut;We<vt;)Pt=Ue.charCodeAt(We++),Pt>=55296&&Pt<=56319&&We<vt?(ut=Ue.charCodeAt(We++),(ut&64512)==56320?ke.push(((Pt&1023)<<10)+(ut&1023)+65536):(ke.push(Pt),We--)):ke.push(Pt);return ke}function re(Ue){return ge(Ue,function(ke){var We="";return ke>65535&&(ke-=65536,We+=X(ke>>>10&1023|55296),ke=56320|ke&1023),We+=X(ke),We}).join("")}function oe(Ue){return Ue-48<10?Ue-22:Ue-65<26?Ue-65:Ue-97<26?Ue-97:f}function Se(Ue,ke){return Ue+22+75*(Ue<26)-((ke!=0)<<5)}function ye(Ue,ke,We){var vt=0;for(Ue=We?$(Ue/S):Ue>>1,Ue+=$(Ue/ke);Ue>J*b>>1;vt+=f)Ue=$(Ue/J);return $(vt+(J+1)*Ue/(Ue+I))}function nt(Ue){var ke=[],We=Ue.length,vt,Pt=0,ut=P,jt=B,Rt,Ke,we,Fe,tt,mt,bt,Lt,Vt;for(Rt=Ue.lastIndexOf(U),Rt<0&&(Rt=0),Ke=0;Ke<Rt;++Ke)Ue.charCodeAt(Ke)>=128&&ae("not-basic"),ke.push(Ue.charCodeAt(Ke));for(we=Rt>0?Rt+1:0;we<We;){for(Fe=Pt,tt=1,mt=f;we>=We&&ae("invalid-input"),bt=oe(Ue.charCodeAt(we++)),(bt>=f||bt>$((a-Pt)/tt))&&ae("overflow"),Pt+=bt*tt,Lt=mt<=jt?g:mt>=jt+b?b:mt-jt,!(bt<Lt);mt+=f)Vt=f-Lt,tt>$(a/Vt)&&ae("overflow"),tt*=Vt;vt=ke.length+1,jt=ye(Pt-Fe,vt,Fe==0),$(Pt/vt)>a-ut&&ae("overflow"),ut+=$(Pt/vt),Pt%=vt,ke.splice(Pt++,0,ut)}return re(ke)}function Ne(Ue){var ke,We,vt,Pt,ut,jt,Rt,Ke,we,Fe,tt,mt=[],bt,Lt,Vt,rn;for(Ue=Ie(Ue),bt=Ue.length,ke=P,We=0,ut=B,jt=0;jt<bt;++jt)tt=Ue[jt],tt<128&&mt.push(X(tt));for(vt=Pt=mt.length,Pt&&mt.push(U);vt<bt;){for(Rt=a,jt=0;jt<bt;++jt)tt=Ue[jt],tt>=ke&&tt<Rt&&(Rt=tt);for(Lt=vt+1,Rt-ke>$((a-We)/Lt)&&ae("overflow"),We+=(Rt-ke)*Lt,ke=Rt,jt=0;jt<bt;++jt)if(tt=Ue[jt],tt<ke&&++We>a&&ae("overflow"),tt==ke){for(Ke=We,we=f;Fe=we<=ut?g:we>=ut+b?b:we-ut,!(Ke<Fe);we+=f)rn=Ke-Fe,Vt=f-Fe,mt.push(X(Se(Fe+rn%Vt,0))),Ke=$(rn/Vt);mt.push(X(Se(Ke,0))),ut=ye(We,Lt,vt==Pt),We=0,++vt}++We,++ke}return mt.join("")}function je(Ue){return he(Ue,function(ke){return j.test(ke)?nt(ke.slice(4).toLowerCase()):ke})}function et(Ue){return he(Ue,function(ke){return q.test(ke)?"xn--"+Ne(ke):ke})}if(s={version:"1.4.1",ucs2:{decode:Ie,encode:re},decode:nt,encode:Ne,toASCII:et,toUnicode:je},n&&i)if(r.exports==n)i.exports=s;else for(G in s)s.hasOwnProperty(G)&&(n[G]=s[G]);else e.punycode=s})(Jce)}(Gy,Gy.exports)),Gy.exports}var IM,pK;function tde(){return pK||(pK=1,IM=Error),IM}var kM,mK;function nde(){return mK||(mK=1,kM=EvalError),kM}var TM,gK;function rde(){return gK||(gK=1,TM=RangeError),TM}var PM,yK;function ide(){return yK||(yK=1,PM=ReferenceError),PM}var KM,vK;function Vj(){return vK||(vK=1,KM=SyntaxError),KM}var RM,_K;function n_(){return _K||(_K=1,RM=TypeError),RM}var DM,CK;function ode(){return CK||(CK=1,DM=URIError),DM}var LM,bK;function ade(){return bK||(bK=1,LM=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,e);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),LM}var FM,xK;function sde(){if(xK)return FM;xK=1;var r=typeof Symbol<"u"&&Symbol,t=ade();return FM=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},FM}var UM,wK;function lde(){if(wK)return UM;wK=1;var r={__proto__:null,foo:{}},t=Object;return UM=function(){return{__proto__:r}.foo===r.foo&&!(r instanceof t)},UM}var jM,MK;function ude(){if(MK)return jM;MK=1;var r="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,n="[object Function]",i=function(f,g){for(var b=[],I=0;I<f.length;I+=1)b[I]=f[I];for(var S=0;S<g.length;S+=1)b[S+f.length]=g[S];return b},o=function(f,g){for(var b=[],I=g,S=0;I<f.length;I+=1,S+=1)b[S]=f[I];return b},s=function(a,f){for(var g="",b=0;b<a.length;b+=1)g+=a[b],b+1<a.length&&(g+=f);return g};return jM=function(f){var g=this;if(typeof g!="function"||t.apply(g)!==n)throw new TypeError(r+g);for(var b=o(arguments,1),I,S=function(){if(this instanceof I){var q=g.apply(this,i(b,arguments));return Object(q)===q?q:this}return g.apply(f,i(b,arguments))},B=e(0,g.length-b.length),P=[],U=0;U<B;U++)P[U]="$"+U;if(I=Function("binder","return function ("+s(P,",")+"){ return binder.apply(this,arguments); }")(S),g.prototype){var j=function(){};j.prototype=g.prototype,I.prototype=new j,j.prototype=null}return I},jM}var zM,SK;function $O(){if(SK)return zM;SK=1;var r=ude();return zM=Function.prototype.bind||r,zM}var NM,EK;function Ade(){if(EK)return NM;EK=1;var r=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=$O();return NM=e.call(r,t),NM}var GM,OK;function ty(){if(OK)return GM;OK=1;var r,t=tde(),e=nde(),n=rde(),i=ide(),o=Vj(),s=n_(),a=ode(),f=Function,g=function(Ne){try{return f('"use strict"; return ('+Ne+").constructor;")()}catch{}},b=Object.getOwnPropertyDescriptor;if(b)try{b({},"")}catch{b=null}var I=function(){throw new s},S=b?function(){try{return arguments.callee,I}catch{try{return b(arguments,"callee").get}catch{return I}}}():I,B=sde()(),P=lde()(),U=Object.getPrototypeOf||(P?function(Ne){return Ne.__proto__}:null),j={},q=typeof Uint8Array>"u"||!U?r:U(Uint8Array),W={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":B&&U?U([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":e,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":B&&U?U(U([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!B||!U?r:U(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":n,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!B||!U?r:U(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":B&&U?U(""[Symbol.iterator]()):r,"%Symbol%":B?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":S,"%TypedArray%":q,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(U)try{null.error}catch(Ne){var ee=U(U(Ne));W["%Error.prototype%"]=ee}var J=function Ne(je){var et;if(je==="%AsyncFunction%")et=g("async function () {}");else if(je==="%GeneratorFunction%")et=g("function* () {}");else if(je==="%AsyncGeneratorFunction%")et=g("async function* () {}");else if(je==="%AsyncGenerator%"){var Ue=Ne("%AsyncGeneratorFunction%");Ue&&(et=Ue.prototype)}else if(je==="%AsyncIteratorPrototype%"){var ke=Ne("%AsyncGenerator%");ke&&U&&(et=U(ke.prototype))}return W[je]=et,et},$={__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"]},X=$O(),G=Ade(),ae=X.call(Function.call,Array.prototype.concat),ge=X.call(Function.apply,Array.prototype.splice),he=X.call(Function.call,String.prototype.replace),Ie=X.call(Function.call,String.prototype.slice),re=X.call(Function.call,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Se=/\\(\\)?/g,ye=function(je){var et=Ie(je,0,1),Ue=Ie(je,-1);if(et==="%"&&Ue!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(Ue==="%"&&et!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var ke=[];return he(je,oe,function(We,vt,Pt,ut){ke[ke.length]=Pt?he(ut,Se,"$1"):vt||We}),ke},nt=function(je,et){var Ue=je,ke;if(G($,Ue)&&(ke=$[Ue],Ue="%"+ke[0]+"%"),G(W,Ue)){var We=W[Ue];if(We===j&&(We=J(Ue)),typeof We>"u"&&!et)throw new s("intrinsic "+je+" exists, but is not available. Please file an issue!");return{alias:ke,name:Ue,value:We}}throw new o("intrinsic "+je+" does not exist!")};return GM=function(je,et){if(typeof je!="string"||je.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof et!="boolean")throw new s('"allowMissing" argument must be a boolean');if(re(/^%?[^%]*%?$/,je)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ue=ye(je),ke=Ue.length>0?Ue[0]:"",We=nt("%"+ke+"%",et),vt=We.name,Pt=We.value,ut=!1,jt=We.alias;jt&&(ke=jt[0],ge(Ue,ae([0,1],jt)));for(var Rt=1,Ke=!0;Rt<Ue.length;Rt+=1){var we=Ue[Rt],Fe=Ie(we,0,1),tt=Ie(we,-1);if((Fe==='"'||Fe==="'"||Fe==="`"||tt==='"'||tt==="'"||tt==="`")&&Fe!==tt)throw new o("property names with quotes must have matching quotes");if((we==="constructor"||!Ke)&&(ut=!0),ke+="."+we,vt="%"+ke+"%",G(W,vt))Pt=W[vt];else if(Pt!=null){if(!(we in Pt)){if(!et)throw new s("base intrinsic for "+je+" exists, but the property is not available.");return}if(b&&Rt+1>=Ue.length){var mt=b(Pt,we);Ke=!!mt,Ke&&"get"in mt&&!("originalValue"in mt.get)?Pt=mt.get:Pt=Pt[we]}else Ke=G(Pt,we),Pt=Pt[we];Ke&&!ut&&(W[vt]=Pt)}}return Pt},GM}var WM={exports:{}},QM,BK;function VO(){if(BK)return QM;BK=1;var r=ty(),t=r("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return QM=t,QM}var qM,IK;function Hj(){if(IK)return qM;IK=1;var r=ty(),t=r("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return qM=t,qM}var YM,kK;function cde(){if(kK)return YM;kK=1;var r=VO(),t=Vj(),e=n_(),n=Hj();return YM=function(o,s,a){if(!o||typeof o!="object"&&typeof o!="function")throw new e("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="symbol")throw new e("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new e("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new e("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new e("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new e("`loose`, if provided, must be a boolean");var f=arguments.length>3?arguments[3]:null,g=arguments.length>4?arguments[4]:null,b=arguments.length>5?arguments[5]:null,I=arguments.length>6?arguments[6]:!1,S=!!n&&n(o,s);if(r)r(o,s,{configurable:b===null&&S?S.configurable:!b,enumerable:f===null&&S?S.enumerable:!f,value:a,writable:g===null&&S?S.writable:!g});else if(I||!f&&!g&&!b)o[s]=a;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},YM}var $M,TK;function dde(){if(TK)return $M;TK=1;var r=VO(),t=function(){return!!r};return t.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},$M=t,$M}var VM,PK;function hde(){if(PK)return VM;PK=1;var r=ty(),t=cde(),e=dde()(),n=Hj(),i=n_(),o=r("%Math.floor%");return VM=function(a,f){if(typeof a!="function")throw new i("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||o(f)!==f)throw new i("`length` must be a positive 32-bit integer");var g=arguments.length>2&&!!arguments[2],b=!0,I=!0;if("length"in a&&n){var S=n(a,"length");S&&!S.configurable&&(b=!1),S&&!S.writable&&(I=!1)}return(b||I||!g)&&(e?t(a,"length",f,!0,!0):t(a,"length",f)),a},VM}var KK;function fde(){return KK||(KK=1,function(r){var t=$O(),e=ty(),n=hde(),i=n_(),o=e("%Function.prototype.apply%"),s=e("%Function.prototype.call%"),a=e("%Reflect.apply%",!0)||t.call(s,o),f=VO(),g=e("%Math.max%");r.exports=function(S){if(typeof S!="function")throw new i("a function is required");var B=a(t,s,arguments);return n(B,1+g(0,S.length-(arguments.length-1)),!0)};var b=function(){return a(t,o,arguments)};f?f(r.exports,"apply",{value:b}):r.exports.apply=b}(WM)),WM.exports}var HM,RK;function pde(){if(RK)return HM;RK=1;var r=ty(),t=fde(),e=t(r("String.prototype.indexOf"));return HM=function(i,o){var s=r(i,!!o);return typeof s=="function"&&e(i,".prototype.")>-1?t(s):s},HM}const mde={},gde=Object.freeze(Object.defineProperty({__proto__:null,default:mde},Symbol.toStringTag,{value:"Module"})),yde=BE(gde);var ZM,DK;function vde(){if(DK)return ZM;DK=1;var r=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,e=r&&t&&typeof t.get=="function"?t.get:null,n=r&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=i&&o&&typeof o.get=="function"?o.get:null,a=i&&Set.prototype.forEach,f=typeof WeakMap=="function"&&WeakMap.prototype,g=f?WeakMap.prototype.has:null,b=typeof WeakSet=="function"&&WeakSet.prototype,I=b?WeakSet.prototype.has:null,S=typeof WeakRef=="function"&&WeakRef.prototype,B=S?WeakRef.prototype.deref:null,P=Boolean.prototype.valueOf,U=Object.prototype.toString,j=Function.prototype.toString,q=String.prototype.match,W=String.prototype.slice,ee=String.prototype.replace,J=String.prototype.toUpperCase,$=String.prototype.toLowerCase,X=RegExp.prototype.test,G=Array.prototype.concat,ae=Array.prototype.join,ge=Array.prototype.slice,he=Math.floor,Ie=typeof BigInt=="function"?BigInt.prototype.valueOf:null,re=Object.getOwnPropertySymbols,oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Se=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ye=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Se||!0)?Symbol.toStringTag:null,nt=Object.prototype.propertyIsEnumerable,Ne=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(it){return it.__proto__}:null);function je(it,Ut){if(it===1/0||it===-1/0||it!==it||it&&it>-1e3&&it<1e3||X.call(/e/,Ut))return Ut;var qe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof it=="number"){var fe=it<0?-he(-it):he(it);if(fe!==it){var xe=String(fe),p=W.call(Ut,xe.length+1);return ee.call(xe,qe,"$&_")+"."+ee.call(ee.call(p,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ee.call(Ut,qe,"$&_")}var et=yde,Ue=et.custom,ke=tt(Ue)?Ue:null;ZM=function it(Ut,qe,fe,xe){var p=qe||{};if(Lt(p,"quoteStyle")&&p.quoteStyle!=="single"&&p.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Lt(p,"maxStringLength")&&(typeof p.maxStringLength=="number"?p.maxStringLength<0&&p.maxStringLength!==1/0:p.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Qe=Lt(p,"customInspect")?p.customInspect:!0;if(typeof Qe!="boolean"&&Qe!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Lt(p,"indent")&&p.indent!==null&&p.indent!==" "&&!(parseInt(p.indent,10)===p.indent&&p.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Lt(p,"numericSeparator")&&typeof p.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var pt=p.numericSeparator;if(typeof Ut>"u")return"undefined";if(Ut===null)return"null";if(typeof Ut=="boolean")return Ut?"true":"false";if(typeof Ut=="string")return Jr(Ut,p);if(typeof Ut=="number"){if(Ut===0)return 1/0/Ut>0?"0":"-0";var ft=String(Ut);return pt?je(Ut,ft):ft}if(typeof Ut=="bigint"){var Et=String(Ut)+"n";return pt?je(Ut,Et):Et}var Ct=typeof p.depth>"u"?5:p.depth;if(typeof fe>"u"&&(fe=0),fe>=Ct&&Ct>0&&typeof Ut=="object")return Pt(Ut)?"[Array]":"[Object]";var nn=Je(p,fe);if(typeof xe>"u")xe=[];else if(Sn(xe,Ut)>=0)return"[Circular]";function Yt(Xr,ii,mo){if(ii&&(xe=ge.call(xe),xe.push(ii)),mo){var Mi={depth:p.depth};return Lt(p,"quoteStyle")&&(Mi.quoteStyle=p.quoteStyle),it(Xr,Mi,fe+1,xe)}return it(Xr,p,fe+1,xe)}if(typeof Ut=="function"&&!jt(Ut)){var Gt=rn(Ut),wt=Xt(Ut,Yt);return"[Function"+(Gt?": "+Gt:" (anonymous)")+"]"+(wt.length>0?" { "+ae.call(wt,", ")+" }":"")}if(tt(Ut)){var Tn=Se?ee.call(String(Ut),/^(Symbol\(.*\))_[^)]*$/,"$1"):oe.call(Ut);return typeof Ut=="object"&&!Se?hi(Tn):Tn}if(_r(Ut)){for(var En="<"+$.call(String(Ut.nodeName)),sr=Ut.attributes||[],Pr=0;Pr<sr.length;Pr++)En+=" "+sr[Pr].name+"="+We(vt(sr[Pr].value),"double",p);return En+=">",Ut.childNodes&&Ut.childNodes.length&&(En+="..."),En+="</"+$.call(String(Ut.nodeName))+">",En}if(Pt(Ut)){if(Ut.length===0)return"[]";var an=Xt(Ut,Yt);return nn&&!pe(an)?"["+kt(an,nn)+"]":"[ "+ae.call(an,", ")+" ]"}if(Rt(Ut)){var Wn=Xt(Ut,Yt);return!("cause"in Error.prototype)&&"cause"in Ut&&!nt.call(Ut,"cause")?"{ ["+String(Ut)+"] "+ae.call(G.call("[cause]: "+Yt(Ut.cause),Wn),", ")+" }":Wn.length===0?"["+String(Ut)+"]":"{ ["+String(Ut)+"] "+ae.call(Wn,", ")+" }"}if(typeof Ut=="object"&&Qe){if(ke&&typeof Ut[ke]=="function"&&et)return et(Ut,{depth:Ct-fe});if(Qe!=="symbol"&&typeof Ut.inspect=="function")return Ut.inspect()}if(Ar(Ut)){var ir=[];return n&&n.call(Ut,function(Xr,ii){ir.push(Yt(ii,Ut,!0)+" => "+Yt(Xr,Ut))}),de("Map",e.call(Ut),ir,nn)}if(Cr(Ut)){var zr=[];return a&&a.call(Ut,function(Xr){zr.push(Yt(Xr,Ut))}),de("Set",s.call(Ut),zr,nn)}if(Bn(Ut))return Ye("WeakMap");if(br(Ut))return Ye("WeakSet");if(ar(Ut))return Ye("WeakRef");if(we(Ut))return hi(Yt(Number(Ut)));if(mt(Ut))return hi(Yt(Ie.call(Ut)));if(Fe(Ut))return hi(P.call(Ut));if(Ke(Ut))return hi(Yt(String(Ut)));if(typeof window<"u"&&Ut===window)return"{ [object Window] }";if(Ut===window)return"{ [object globalThis] }";if(!ut(Ut)&&!jt(Ut)){var fr=Xt(Ut,Yt),hr=Ne?Ne(Ut)===Object.prototype:Ut instanceof Object||Ut.constructor===Object,zn=Ut instanceof Object?"":"null prototype",Pi=!hr&&ye&&Object(Ut)===Ut&&ye in Ut?W.call(Vt(Ut),8,-1):zn?"Object":"",po=hr||typeof Ut.constructor!="function"?"":Ut.constructor.name?Ut.constructor.name+" ":"",ri=po+(Pi||zn?"["+ae.call(G.call([],Pi||[],zn||[]),": ")+"] ":"");return fr.length===0?ri+"{}":nn?ri+"{"+kt(fr,nn)+"}":ri+"{ "+ae.call(fr,", ")+" }"}return String(Ut)};function We(it,Ut,qe){var fe=(qe.quoteStyle||Ut)==="double"?'"':"'";return fe+it+fe}function vt(it){return ee.call(String(it),/"/g,""")}function Pt(it){return Vt(it)==="[object Array]"&&(!ye||!(typeof it=="object"&&ye in it))}function ut(it){return Vt(it)==="[object Date]"&&(!ye||!(typeof it=="object"&&ye in it))}function jt(it){return Vt(it)==="[object RegExp]"&&(!ye||!(typeof it=="object"&&ye in it))}function Rt(it){return Vt(it)==="[object Error]"&&(!ye||!(typeof it=="object"&&ye in it))}function Ke(it){return Vt(it)==="[object String]"&&(!ye||!(typeof it=="object"&&ye in it))}function we(it){return Vt(it)==="[object Number]"&&(!ye||!(typeof it=="object"&&ye in it))}function Fe(it){return Vt(it)==="[object Boolean]"&&(!ye||!(typeof it=="object"&&ye in it))}function tt(it){if(Se)return it&&typeof it=="object"&&it instanceof Symbol;if(typeof it=="symbol")return!0;if(!it||typeof it!="object"||!oe)return!1;try{return oe.call(it),!0}catch{}return!1}function mt(it){if(!it||typeof it!="object"||!Ie)return!1;try{return Ie.call(it),!0}catch{}return!1}var bt=Object.prototype.hasOwnProperty||function(it){return it in this};function Lt(it,Ut){return bt.call(it,Ut)}function Vt(it){return U.call(it)}function rn(it){if(it.name)return it.name;var Ut=q.call(j.call(it),/^function\s*([\w$]+)/);return Ut?Ut[1]:null}function Sn(it,Ut){if(it.indexOf)return it.indexOf(Ut);for(var qe=0,fe=it.length;qe<fe;qe++)if(it[qe]===Ut)return qe;return-1}function Ar(it){if(!e||!it||typeof it!="object")return!1;try{e.call(it);try{s.call(it)}catch{return!0}return it instanceof Map}catch{}return!1}function Bn(it){if(!g||!it||typeof it!="object")return!1;try{g.call(it,g);try{I.call(it,I)}catch{return!0}return it instanceof WeakMap}catch{}return!1}function ar(it){if(!B||!it||typeof it!="object")return!1;try{return B.call(it),!0}catch{}return!1}function Cr(it){if(!s||!it||typeof it!="object")return!1;try{s.call(it);try{e.call(it)}catch{return!0}return it instanceof Set}catch{}return!1}function br(it){if(!I||!it||typeof it!="object")return!1;try{I.call(it,I);try{g.call(it,g)}catch{return!0}return it instanceof WeakSet}catch{}return!1}function _r(it){return!it||typeof it!="object"?!1:typeof HTMLElement<"u"&&it instanceof HTMLElement?!0:typeof it.nodeName=="string"&&typeof it.getAttribute=="function"}function Jr(it,Ut){if(it.length>Ut.maxStringLength){var qe=it.length-Ut.maxStringLength,fe="... "+qe+" more character"+(qe>1?"s":"");return Jr(W.call(it,0,Ut.maxStringLength),Ut)+fe}var xe=ee.call(ee.call(it,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wr);return We(xe,"single",Ut)}function wr(it){var Ut=it.charCodeAt(0),qe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ut];return qe?"\\"+qe:"\\x"+(Ut<16?"0":"")+J.call(Ut.toString(16))}function hi(it){return"Object("+it+")"}function Ye(it){return it+" { ? }"}function de(it,Ut,qe,fe){var xe=fe?kt(qe,fe):ae.call(qe,", ");return it+" ("+Ut+") {"+xe+"}"}function pe(it){for(var Ut=0;Ut<it.length;Ut++)if(Sn(it[Ut],`
|
||
`)>=0)return!1;return!0}function Je(it,Ut){var qe;if(it.indent===" ")qe=" ";else if(typeof it.indent=="number"&&it.indent>0)qe=ae.call(Array(it.indent+1)," ");else return null;return{base:qe,prev:ae.call(Array(Ut+1),qe)}}function kt(it,Ut){if(it.length===0)return"";var qe=`
|
||
`+Ut.prev+Ut.base;return qe+ae.call(it,","+qe)+`
|
||
`+Ut.prev}function Xt(it,Ut){var qe=Pt(it),fe=[];if(qe){fe.length=it.length;for(var xe=0;xe<it.length;xe++)fe[xe]=Lt(it,xe)?Ut(it[xe],it):""}var p=typeof re=="function"?re(it):[],Qe;if(Se){Qe={};for(var pt=0;pt<p.length;pt++)Qe["$"+p[pt]]=p[pt]}for(var ft in it)Lt(it,ft)&&(qe&&String(Number(ft))===ft&&ft<it.length||Se&&Qe["$"+ft]instanceof Symbol||(X.call(/[^\w$]/,ft)?fe.push(Ut(ft,it)+": "+Ut(it[ft],it)):fe.push(ft+": "+Ut(it[ft],it))));if(typeof re=="function")for(var Et=0;Et<p.length;Et++)nt.call(it,p[Et])&&fe.push("["+Ut(p[Et])+"]: "+Ut(it[p[Et]],it));return fe}return ZM}var XM,LK;function _de(){if(LK)return XM;LK=1;var r=ty(),t=pde(),e=vde(),n=n_(),i=r("%WeakMap%",!0),o=r("%Map%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),f=t("WeakMap.prototype.has",!0),g=t("Map.prototype.get",!0),b=t("Map.prototype.set",!0),I=t("Map.prototype.has",!0),S=function(j,q){for(var W=j,ee;(ee=W.next)!==null;W=ee)if(ee.key===q)return W.next=ee.next,ee.next=j.next,j.next=ee,ee},B=function(j,q){var W=S(j,q);return W&&W.value},P=function(j,q,W){var ee=S(j,q);ee?ee.value=W:j.next={key:q,next:j.next,value:W}},U=function(j,q){return!!S(j,q)};return XM=function(){var q,W,ee,J={assert:function($){if(!J.has($))throw new n("Side channel does not contain "+e($))},get:function($){if(i&&$&&(typeof $=="object"||typeof $=="function")){if(q)return s(q,$)}else if(o){if(W)return g(W,$)}else if(ee)return B(ee,$)},has:function($){if(i&&$&&(typeof $=="object"||typeof $=="function")){if(q)return f(q,$)}else if(o){if(W)return I(W,$)}else if(ee)return U(ee,$);return!1},set:function($,X){i&&$&&(typeof $=="object"||typeof $=="function")?(q||(q=new i),a(q,$,X)):o?(W||(W=new o),b(W,$,X)):(ee||(ee={key:{},next:null}),P(ee,$,X))}};return J},XM}var JM,FK;function HO(){if(FK)return JM;FK=1;var r=String.prototype.replace,t=/%20/g,e={RFC1738:"RFC1738",RFC3986:"RFC3986"};return JM={default:e.RFC3986,formatters:{RFC1738:function(n){return r.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:e.RFC1738,RFC3986:e.RFC3986},JM}var eS,UK;function Zj(){if(UK)return eS;UK=1;var r=HO(),t=Object.prototype.hasOwnProperty,e=Array.isArray,n=function(){for(var j=[],q=0;q<256;++q)j.push("%"+((q<16?"0":"")+q.toString(16)).toUpperCase());return j}(),i=function(q){for(;q.length>1;){var W=q.pop(),ee=W.obj[W.prop];if(e(ee)){for(var J=[],$=0;$<ee.length;++$)typeof ee[$]<"u"&&J.push(ee[$]);W.obj[W.prop]=J}}},o=function(q,W){for(var ee=W&&W.plainObjects?{__proto__:null}:{},J=0;J<q.length;++J)typeof q[J]<"u"&&(ee[J]=q[J]);return ee},s=function j(q,W,ee){if(!W)return q;if(typeof W!="object"&&typeof W!="function"){if(e(q))q.push(W);else if(q&&typeof q=="object")(ee&&(ee.plainObjects||ee.allowPrototypes)||!t.call(Object.prototype,W))&&(q[W]=!0);else return[q,W];return q}if(!q||typeof q!="object")return[q].concat(W);var J=q;return e(q)&&!e(W)&&(J=o(q,ee)),e(q)&&e(W)?(W.forEach(function($,X){if(t.call(q,X)){var G=q[X];G&&typeof G=="object"&&$&&typeof $=="object"?q[X]=j(G,$,ee):q.push($)}else q[X]=$}),q):Object.keys(W).reduce(function($,X){var G=W[X];return t.call($,X)?$[X]=j($[X],G,ee):$[X]=G,$},J)},a=function(q,W){return Object.keys(W).reduce(function(ee,J){return ee[J]=W[J],ee},q)},f=function(j,q,W){var ee=j.replace(/\+/g," ");if(W==="iso-8859-1")return ee.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(ee)}catch{return ee}},g=1024,b=function(q,W,ee,J,$){if(q.length===0)return q;var X=q;if(typeof q=="symbol"?X=Symbol.prototype.toString.call(q):typeof q!="string"&&(X=String(q)),ee==="iso-8859-1")return escape(X).replace(/%u[0-9a-f]{4}/gi,function(oe){return"%26%23"+parseInt(oe.slice(2),16)+"%3B"});for(var G="",ae=0;ae<X.length;ae+=g){for(var ge=X.length>=g?X.slice(ae,ae+g):X,he=[],Ie=0;Ie<ge.length;++Ie){var re=ge.charCodeAt(Ie);if(re===45||re===46||re===95||re===126||re>=48&&re<=57||re>=65&&re<=90||re>=97&&re<=122||$===r.RFC1738&&(re===40||re===41)){he[he.length]=ge.charAt(Ie);continue}if(re<128){he[he.length]=n[re];continue}if(re<2048){he[he.length]=n[192|re>>6]+n[128|re&63];continue}if(re<55296||re>=57344){he[he.length]=n[224|re>>12]+n[128|re>>6&63]+n[128|re&63];continue}Ie+=1,re=65536+((re&1023)<<10|ge.charCodeAt(Ie)&1023),he[he.length]=n[240|re>>18]+n[128|re>>12&63]+n[128|re>>6&63]+n[128|re&63]}G+=he.join("")}return G},I=function(q){for(var W=[{obj:{o:q},prop:"o"}],ee=[],J=0;J<W.length;++J)for(var $=W[J],X=$.obj[$.prop],G=Object.keys(X),ae=0;ae<G.length;++ae){var ge=G[ae],he=X[ge];typeof he=="object"&&he!==null&&ee.indexOf(he)===-1&&(W.push({obj:X,prop:ge}),ee.push(he))}return i(W),q},S=function(q){return Object.prototype.toString.call(q)==="[object RegExp]"},B=function(q){return!q||typeof q!="object"?!1:!!(q.constructor&&q.constructor.isBuffer&&q.constructor.isBuffer(q))},P=function(q,W){return[].concat(q,W)},U=function(q,W){if(e(q)){for(var ee=[],J=0;J<q.length;J+=1)ee.push(W(q[J]));return ee}return W(q)};return eS={arrayToObject:o,assign:a,combine:P,compact:I,decode:f,encode:b,isBuffer:B,isRegExp:S,maybeMap:U,merge:s},eS}var tS,jK;function Cde(){if(jK)return tS;jK=1;var r=_de(),t=Zj(),e=HO(),n=Object.prototype.hasOwnProperty,i={brackets:function(j){return j+"[]"},comma:"comma",indices:function(j,q){return j+"["+q+"]"},repeat:function(j){return j}},o=Array.isArray,s=Array.prototype.push,a=function(U,j){s.apply(U,o(j)?j:[j])},f=Date.prototype.toISOString,g=e.default,b={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:g,formatter:e.formatters[g],indices:!1,serializeDate:function(j){return f.call(j)},skipNulls:!1,strictNullHandling:!1},I=function(j){return typeof j=="string"||typeof j=="number"||typeof j=="boolean"||typeof j=="symbol"||typeof j=="bigint"},S={},B=function U(j,q,W,ee,J,$,X,G,ae,ge,he,Ie,re,oe,Se,ye,nt,Ne){for(var je=j,et=Ne,Ue=0,ke=!1;(et=et.get(S))!==void 0&&!ke;){var We=et.get(j);if(Ue+=1,typeof We<"u"){if(We===Ue)throw new RangeError("Cyclic object value");ke=!0}typeof et.get(S)>"u"&&(Ue=0)}if(typeof ge=="function"?je=ge(q,je):je instanceof Date?je=re(je):W==="comma"&&o(je)&&(je=t.maybeMap(je,function(Vt){return Vt instanceof Date?re(Vt):Vt})),je===null){if($)return ae&&!ye?ae(q,b.encoder,nt,"key",oe):q;je=""}if(I(je)||t.isBuffer(je)){if(ae){var vt=ye?q:ae(q,b.encoder,nt,"key",oe);return[Se(vt)+"="+Se(ae(je,b.encoder,nt,"value",oe))]}return[Se(q)+"="+Se(String(je))]}var Pt=[];if(typeof je>"u")return Pt;var ut;if(W==="comma"&&o(je))ye&&ae&&(je=t.maybeMap(je,ae)),ut=[{value:je.length>0?je.join(",")||null:void 0}];else if(o(ge))ut=ge;else{var jt=Object.keys(je);ut=he?jt.sort(he):jt}var Rt=G?String(q).replace(/\./g,"%2E"):String(q),Ke=ee&&o(je)&&je.length===1?Rt+"[]":Rt;if(J&&o(je)&&je.length===0)return Ke+"[]";for(var we=0;we<ut.length;++we){var Fe=ut[we],tt=typeof Fe=="object"&&Fe&&typeof Fe.value<"u"?Fe.value:je[Fe];if(!(X&&tt===null)){var mt=Ie&&G?String(Fe).replace(/\./g,"%2E"):String(Fe),bt=o(je)?typeof W=="function"?W(Ke,mt):Ke:Ke+(Ie?"."+mt:"["+mt+"]");Ne.set(j,Ue);var Lt=r();Lt.set(S,Ne),a(Pt,U(tt,bt,W,ee,J,$,X,G,W==="comma"&&ye&&o(je)?null:ae,ge,he,Ie,re,oe,Se,ye,nt,Lt))}}return Pt},P=function(j){if(!j)return b;if(typeof j.allowEmptyArrays<"u"&&typeof j.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof j.encodeDotInKeys<"u"&&typeof j.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(j.encoder!==null&&typeof j.encoder<"u"&&typeof j.encoder!="function")throw new TypeError("Encoder has to be a function.");var q=j.charset||b.charset;if(typeof j.charset<"u"&&j.charset!=="utf-8"&&j.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var W=e.default;if(typeof j.format<"u"){if(!n.call(e.formatters,j.format))throw new TypeError("Unknown format option provided.");W=j.format}var ee=e.formatters[W],J=b.filter;(typeof j.filter=="function"||o(j.filter))&&(J=j.filter);var $;if(j.arrayFormat in i?$=j.arrayFormat:"indices"in j?$=j.indices?"indices":"repeat":$=b.arrayFormat,"commaRoundTrip"in j&&typeof j.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var X=typeof j.allowDots>"u"?j.encodeDotInKeys===!0?!0:b.allowDots:!!j.allowDots;return{addQueryPrefix:typeof j.addQueryPrefix=="boolean"?j.addQueryPrefix:b.addQueryPrefix,allowDots:X,allowEmptyArrays:typeof j.allowEmptyArrays=="boolean"?!!j.allowEmptyArrays:b.allowEmptyArrays,arrayFormat:$,charset:q,charsetSentinel:typeof j.charsetSentinel=="boolean"?j.charsetSentinel:b.charsetSentinel,commaRoundTrip:!!j.commaRoundTrip,delimiter:typeof j.delimiter>"u"?b.delimiter:j.delimiter,encode:typeof j.encode=="boolean"?j.encode:b.encode,encodeDotInKeys:typeof j.encodeDotInKeys=="boolean"?j.encodeDotInKeys:b.encodeDotInKeys,encoder:typeof j.encoder=="function"?j.encoder:b.encoder,encodeValuesOnly:typeof j.encodeValuesOnly=="boolean"?j.encodeValuesOnly:b.encodeValuesOnly,filter:J,format:W,formatter:ee,serializeDate:typeof j.serializeDate=="function"?j.serializeDate:b.serializeDate,skipNulls:typeof j.skipNulls=="boolean"?j.skipNulls:b.skipNulls,sort:typeof j.sort=="function"?j.sort:null,strictNullHandling:typeof j.strictNullHandling=="boolean"?j.strictNullHandling:b.strictNullHandling}};return tS=function(U,j){var q=U,W=P(j),ee,J;typeof W.filter=="function"?(J=W.filter,q=J("",q)):o(W.filter)&&(J=W.filter,ee=J);var $=[];if(typeof q!="object"||q===null)return"";var X=i[W.arrayFormat],G=X==="comma"&&W.commaRoundTrip;ee||(ee=Object.keys(q)),W.sort&&ee.sort(W.sort);for(var ae=r(),ge=0;ge<ee.length;++ge){var he=ee[ge],Ie=q[he];W.skipNulls&&Ie===null||a($,B(Ie,he,X,G,W.allowEmptyArrays,W.strictNullHandling,W.skipNulls,W.encodeDotInKeys,W.encode?W.encoder:null,W.filter,W.sort,W.allowDots,W.serializeDate,W.format,W.formatter,W.encodeValuesOnly,W.charset,ae))}var re=$.join(W.delimiter),oe=W.addQueryPrefix===!0?"?":"";return W.charsetSentinel&&(W.charset==="iso-8859-1"?oe+="utf8=%26%2310003%3B&":oe+="utf8=%E2%9C%93&"),re.length>0?oe+re:""},tS}var nS,zK;function bde(){if(zK)return nS;zK=1;var r=Zj(),t=Object.prototype.hasOwnProperty,e=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},i=function(S){return S.replace(/&#(\d+);/g,function(B,P){return String.fromCharCode(parseInt(P,10))})},o=function(S,B){return S&&typeof S=="string"&&B.comma&&S.indexOf(",")>-1?S.split(","):S},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",f=function(B,P){var U={__proto__:null},j=P.ignoreQueryPrefix?B.replace(/^\?/,""):B;j=j.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var q=P.parameterLimit===1/0?void 0:P.parameterLimit,W=j.split(P.delimiter,q),ee=-1,J,$=P.charset;if(P.charsetSentinel)for(J=0;J<W.length;++J)W[J].indexOf("utf8=")===0&&(W[J]===a?$="utf-8":W[J]===s&&($="iso-8859-1"),ee=J,J=W.length);for(J=0;J<W.length;++J)if(J!==ee){var X=W[J],G=X.indexOf("]="),ae=G===-1?X.indexOf("="):G+1,ge,he;ae===-1?(ge=P.decoder(X,n.decoder,$,"key"),he=P.strictNullHandling?null:""):(ge=P.decoder(X.slice(0,ae),n.decoder,$,"key"),he=r.maybeMap(o(X.slice(ae+1),P),function(re){return P.decoder(re,n.decoder,$,"value")})),he&&P.interpretNumericEntities&&$==="iso-8859-1"&&(he=i(String(he))),X.indexOf("[]=")>-1&&(he=e(he)?[he]:he);var Ie=t.call(U,ge);Ie&&P.duplicates==="combine"?U[ge]=r.combine(U[ge],he):(!Ie||P.duplicates==="last")&&(U[ge]=he)}return U},g=function(S,B,P,U){for(var j=U?B:o(B,P),q=S.length-1;q>=0;--q){var W,ee=S[q];if(ee==="[]"&&P.parseArrays)W=P.allowEmptyArrays&&(j===""||P.strictNullHandling&&j===null)?[]:[].concat(j);else{W=P.plainObjects?{__proto__:null}:{};var J=ee.charAt(0)==="["&&ee.charAt(ee.length-1)==="]"?ee.slice(1,-1):ee,$=P.decodeDotInKeys?J.replace(/%2E/g,"."):J,X=parseInt($,10);!P.parseArrays&&$===""?W={0:j}:!isNaN(X)&&ee!==$&&String(X)===$&&X>=0&&P.parseArrays&&X<=P.arrayLimit?(W=[],W[X]=j):$!=="__proto__"&&(W[$]=j)}j=W}return j},b=function(B,P,U,j){if(B){var q=U.allowDots?B.replace(/\.([^.[]+)/g,"[$1]"):B,W=/(\[[^[\]]*])/,ee=/(\[[^[\]]*])/g,J=U.depth>0&&W.exec(q),$=J?q.slice(0,J.index):q,X=[];if($){if(!U.plainObjects&&t.call(Object.prototype,$)&&!U.allowPrototypes)return;X.push($)}for(var G=0;U.depth>0&&(J=ee.exec(q))!==null&&G<U.depth;){if(G+=1,!U.plainObjects&&t.call(Object.prototype,J[1].slice(1,-1))&&!U.allowPrototypes)return;X.push(J[1])}if(J){if(U.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+U.depth+" and strictDepth is true");X.push("["+q.slice(J.index)+"]")}return g(X,P,U,j)}},I=function(B){if(!B)return n;if(typeof B.allowEmptyArrays<"u"&&typeof B.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof B.decodeDotInKeys<"u"&&typeof B.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(B.decoder!==null&&typeof B.decoder<"u"&&typeof B.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof B.charset<"u"&&B.charset!=="utf-8"&&B.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var P=typeof B.charset>"u"?n.charset:B.charset,U=typeof B.duplicates>"u"?n.duplicates:B.duplicates;if(U!=="combine"&&U!=="first"&&U!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var j=typeof B.allowDots>"u"?B.decodeDotInKeys===!0?!0:n.allowDots:!!B.allowDots;return{allowDots:j,allowEmptyArrays:typeof B.allowEmptyArrays=="boolean"?!!B.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof B.allowPrototypes=="boolean"?B.allowPrototypes:n.allowPrototypes,allowSparse:typeof B.allowSparse=="boolean"?B.allowSparse:n.allowSparse,arrayLimit:typeof B.arrayLimit=="number"?B.arrayLimit:n.arrayLimit,charset:P,charsetSentinel:typeof B.charsetSentinel=="boolean"?B.charsetSentinel:n.charsetSentinel,comma:typeof B.comma=="boolean"?B.comma:n.comma,decodeDotInKeys:typeof B.decodeDotInKeys=="boolean"?B.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof B.decoder=="function"?B.decoder:n.decoder,delimiter:typeof B.delimiter=="string"||r.isRegExp(B.delimiter)?B.delimiter:n.delimiter,depth:typeof B.depth=="number"||B.depth===!1?+B.depth:n.depth,duplicates:U,ignoreQueryPrefix:B.ignoreQueryPrefix===!0,interpretNumericEntities:typeof B.interpretNumericEntities=="boolean"?B.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof B.parameterLimit=="number"?B.parameterLimit:n.parameterLimit,parseArrays:B.parseArrays!==!1,plainObjects:typeof B.plainObjects=="boolean"?B.plainObjects:n.plainObjects,strictDepth:typeof B.strictDepth=="boolean"?!!B.strictDepth:n.strictDepth,strictNullHandling:typeof B.strictNullHandling=="boolean"?B.strictNullHandling:n.strictNullHandling}};return nS=function(S,B){var P=I(B);if(S===""||S===null||typeof S>"u")return P.plainObjects?{__proto__:null}:{};for(var U=typeof S=="string"?f(S,P):S,j=P.plainObjects?{__proto__:null}:{},q=Object.keys(U),W=0;W<q.length;++W){var ee=q[W],J=b(ee,U[ee],P,typeof S=="string");j=r.merge(j,J,P)}return P.allowSparse===!0?j:r.compact(j)},nS}var rS,NK;function xde(){if(NK)return rS;NK=1;var r=Cde(),t=bde(),e=HO();return rS={formats:e,parse:t,stringify:r},rS}var GK;function wde(){if(GK)return T0;GK=1;var r=ede();function t(){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 e=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r",`
|
||
`," "],s=["{","}","|","\\","^","`"].concat(o),a=["'"].concat(s),f=["%","/","?",";","#"].concat(a),g=["/","?","#"],b=255,I=/^[+a-z0-9A-Z_-]{0,63}$/,S=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,B={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},U={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=xde();function q($,X,G){if($&&typeof $=="object"&&$ instanceof t)return $;var ae=new t;return ae.parse($,X,G),ae}t.prototype.parse=function($,X,G){if(typeof $!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof $);var ae=$.indexOf("?"),ge=ae!==-1&&ae<$.indexOf("#")?"?":"#",he=$.split(ge),Ie=/\\/g;he[0]=he[0].replace(Ie,"/"),$=he.join(ge);var re=$;if(re=re.trim(),!G&&$.split("#").length===1){var oe=i.exec(re);if(oe)return this.path=re,this.href=re,this.pathname=oe[1],oe[2]?(this.search=oe[2],X?this.query=j.parse(this.search.substr(1)):this.query=this.search.substr(1)):X&&(this.search="",this.query={}),this}var Se=e.exec(re);if(Se){Se=Se[0];var ye=Se.toLowerCase();this.protocol=ye,re=re.substr(Se.length)}if(G||Se||re.match(/^\/\/[^@/]+@[^@/]+/)){var nt=re.substr(0,2)==="//";nt&&!(Se&&P[Se])&&(re=re.substr(2),this.slashes=!0)}if(!P[Se]&&(nt||Se&&!U[Se])){for(var Ne=-1,je=0;je<g.length;je++){var et=re.indexOf(g[je]);et!==-1&&(Ne===-1||et<Ne)&&(Ne=et)}var Ue,ke;Ne===-1?ke=re.lastIndexOf("@"):ke=re.lastIndexOf("@",Ne),ke!==-1&&(Ue=re.slice(0,ke),re=re.slice(ke+1),this.auth=decodeURIComponent(Ue)),Ne=-1;for(var je=0;je<f.length;je++){var et=re.indexOf(f[je]);et!==-1&&(Ne===-1||et<Ne)&&(Ne=et)}Ne===-1&&(Ne=re.length),this.host=re.slice(0,Ne),re=re.slice(Ne),this.parseHost(),this.hostname=this.hostname||"";var We=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!We)for(var vt=this.hostname.split(/\./),je=0,Pt=vt.length;je<Pt;je++){var ut=vt[je];if(ut&&!ut.match(I)){for(var jt="",Rt=0,Ke=ut.length;Rt<Ke;Rt++)ut.charCodeAt(Rt)>127?jt+="x":jt+=ut[Rt];if(!jt.match(I)){var we=vt.slice(0,je),Fe=vt.slice(je+1),tt=ut.match(S);tt&&(we.push(tt[1]),Fe.unshift(tt[2])),Fe.length&&(re="/"+Fe.join(".")+re),this.hostname=we.join(".");break}}}this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),We||(this.hostname=r.toASCII(this.hostname));var mt=this.port?":"+this.port:"",bt=this.hostname||"";this.host=bt+mt,this.href+=this.host,We&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),re[0]!=="/"&&(re="/"+re))}if(!B[ye])for(var je=0,Pt=a.length;je<Pt;je++){var Lt=a[je];if(re.indexOf(Lt)!==-1){var Vt=encodeURIComponent(Lt);Vt===Lt&&(Vt=escape(Lt)),re=re.split(Lt).join(Vt)}}var rn=re.indexOf("#");rn!==-1&&(this.hash=re.substr(rn),re=re.slice(0,rn));var Sn=re.indexOf("?");if(Sn!==-1?(this.search=re.substr(Sn),this.query=re.substr(Sn+1),X&&(this.query=j.parse(this.query)),re=re.slice(0,Sn)):X&&(this.search="",this.query={}),re&&(this.pathname=re),U[ye]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var mt=this.pathname||"",Ar=this.search||"";this.path=mt+Ar}return this.href=this.format(),this};function W($){return typeof $=="string"&&($=q($)),$ instanceof t?$.format():t.prototype.format.call($)}t.prototype.format=function(){var $=this.auth||"";$&&($=encodeURIComponent($),$=$.replace(/%3A/i,":"),$+="@");var X=this.protocol||"",G=this.pathname||"",ae=this.hash||"",ge=!1,he="";this.host?ge=$+this.host:this.hostname&&(ge=$+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ge+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(he=j.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var Ie=this.search||he&&"?"+he||"";return X&&X.substr(-1)!==":"&&(X+=":"),this.slashes||(!X||U[X])&&ge!==!1?(ge="//"+(ge||""),G&&G.charAt(0)!=="/"&&(G="/"+G)):ge||(ge=""),ae&&ae.charAt(0)!=="#"&&(ae="#"+ae),Ie&&Ie.charAt(0)!=="?"&&(Ie="?"+Ie),G=G.replace(/[?#]/g,function(re){return encodeURIComponent(re)}),Ie=Ie.replace("#","%23"),X+ge+G+Ie+ae};function ee($,X){return q($,!1,!0).resolve(X)}t.prototype.resolve=function($){return this.resolveObject(q($,!1,!0)).format()};function J($,X){return $?q($,!1,!0).resolveObject(X):X}return t.prototype.resolveObject=function($){if(typeof $=="string"){var X=new t;X.parse($,!1,!0),$=X}for(var G=new t,ae=Object.keys(this),ge=0;ge<ae.length;ge++){var he=ae[ge];G[he]=this[he]}if(G.hash=$.hash,$.href==="")return G.href=G.format(),G;if($.slashes&&!$.protocol){for(var Ie=Object.keys($),re=0;re<Ie.length;re++){var oe=Ie[re];oe!=="protocol"&&(G[oe]=$[oe])}return U[G.protocol]&&G.hostname&&!G.pathname&&(G.pathname="/",G.path=G.pathname),G.href=G.format(),G}if($.protocol&&$.protocol!==G.protocol){if(!U[$.protocol]){for(var Se=Object.keys($),ye=0;ye<Se.length;ye++){var nt=Se[ye];G[nt]=$[nt]}return G.href=G.format(),G}if(G.protocol=$.protocol,!$.host&&!P[$.protocol]){for(var Pt=($.pathname||"").split("/");Pt.length&&!($.host=Pt.shift()););$.host||($.host=""),$.hostname||($.hostname=""),Pt[0]!==""&&Pt.unshift(""),Pt.length<2&&Pt.unshift(""),G.pathname=Pt.join("/")}else G.pathname=$.pathname;if(G.search=$.search,G.query=$.query,G.host=$.host||"",G.auth=$.auth,G.hostname=$.hostname||$.host,G.port=$.port,G.pathname||G.search){var Ne=G.pathname||"",je=G.search||"";G.path=Ne+je}return G.slashes=G.slashes||$.slashes,G.href=G.format(),G}var et=G.pathname&&G.pathname.charAt(0)==="/",Ue=$.host||$.pathname&&$.pathname.charAt(0)==="/",ke=Ue||et||G.host&&$.pathname,We=ke,vt=G.pathname&&G.pathname.split("/")||[],Pt=$.pathname&&$.pathname.split("/")||[],ut=G.protocol&&!U[G.protocol];if(ut&&(G.hostname="",G.port=null,G.host&&(vt[0]===""?vt[0]=G.host:vt.unshift(G.host)),G.host="",$.protocol&&($.hostname=null,$.port=null,$.host&&(Pt[0]===""?Pt[0]=$.host:Pt.unshift($.host)),$.host=null),ke=ke&&(Pt[0]===""||vt[0]==="")),Ue)G.host=$.host||$.host===""?$.host:G.host,G.hostname=$.hostname||$.hostname===""?$.hostname:G.hostname,G.search=$.search,G.query=$.query,vt=Pt;else if(Pt.length)vt||(vt=[]),vt.pop(),vt=vt.concat(Pt),G.search=$.search,G.query=$.query;else if($.search!=null){if(ut){G.host=vt.shift(),G.hostname=G.host;var jt=G.host&&G.host.indexOf("@")>0?G.host.split("@"):!1;jt&&(G.auth=jt.shift(),G.hostname=jt.shift(),G.host=G.hostname)}return G.search=$.search,G.query=$.query,(G.pathname!==null||G.search!==null)&&(G.path=(G.pathname?G.pathname:"")+(G.search?G.search:"")),G.href=G.format(),G}if(!vt.length)return G.pathname=null,G.search?G.path="/"+G.search:G.path=null,G.href=G.format(),G;for(var Rt=vt.slice(-1)[0],Ke=(G.host||$.host||vt.length>1)&&(Rt==="."||Rt==="..")||Rt==="",we=0,Fe=vt.length;Fe>=0;Fe--)Rt=vt[Fe],Rt==="."?vt.splice(Fe,1):Rt===".."?(vt.splice(Fe,1),we++):we&&(vt.splice(Fe,1),we--);if(!ke&&!We)for(;we--;we)vt.unshift("..");ke&&vt[0]!==""&&(!vt[0]||vt[0].charAt(0)!=="/")&&vt.unshift(""),Ke&&vt.join("/").substr(-1)!=="/"&&vt.push("");var tt=vt[0]===""||vt[0]&&vt[0].charAt(0)==="/";if(ut){G.hostname=tt?"":vt.length?vt.shift():"",G.host=G.hostname;var jt=G.host&&G.host.indexOf("@")>0?G.host.split("@"):!1;jt&&(G.auth=jt.shift(),G.hostname=jt.shift(),G.host=G.hostname)}return ke=ke||G.host&&vt.length,ke&&!tt&&vt.unshift(""),vt.length>0?G.pathname=vt.join("/"):(G.pathname=null,G.path=null),(G.pathname!==null||G.search!==null)&&(G.path=(G.pathname?G.pathname:"")+(G.search?G.search:"")),G.auth=$.auth||G.auth,G.slashes=G.slashes||$.slashes,G.href=G.format(),G},t.prototype.parseHost=function(){var $=this.host,X=n.exec($);X&&(X=X[0],X!==":"&&(this.port=X.substr(1)),$=$.substr(0,$.length-X.length)),$&&(this.hostname=$)},T0.parse=q,T0.resolve=ee,T0.resolveObject=J,T0.format=W,T0.Url=t,T0}var Mde=wde();const WK=us(Mde);function Wa(){var r="/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",t="8eedc6c4f661a6bd38a2227269e9dcc5dcb1f437",e=globalThis,n="__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:16,column:34}},6:{start:{line:16,column:20},end:{line:16,column:34}},7:{start:{line:17,column:17},end:{line:17,column:42}},8:{start:{line:18,column:23},end:{line:18,column:57}},9:{start:{line:19,column:2},end:{line:23,column:3}},10:{start:{line:20,column:4},end:{line:20,column:41}},11:{start:{line:22,column:4},end:{line:22,column:69}},12:{start:{line:24,column:14},end:{line:24,column:35}},13:{start:{line:25,column:2},end:{line:25,column:24}},14:{start:{line:28,column:2},end:{line:28,column:30}},15:{start:{line:28,column:16},end:{line:28,column:30}},16:{start:{line:29,column:14},end:{line:29,column:31}},17:{start:{line:30,column:2},end:{line:30,column:57}},18:{start:{line:30,column:32},end:{line:30,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:26,column:1}},line:15},5:{name:"downloadSpriteMetadata",decl:{start:{line:27,column:16},end:{line:27,column:38}},loc:{start:{line:27,column:52},end:{line:31,column:1}},line:27},6:{name:"(anonymous_6)",decl:{start:{line:30,column:20},end:{line:30,column:21}},loc:{start:{line:30,column:32},end:{line:30,column:55}},line:30}},branchMap:{0:{loc:{start:{line:16,column:2},end:{line:16,column:34}},type:"if",locations:[{start:{line:16,column:2},end:{line:16,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:19,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:23,column:3}},{start:{line:21,column:9},end:{line:23,column:3}}],line:19},2:{loc:{start:{line:28,column:2},end:{line:28,column:30}},type:"if",locations:[{start:{line:28,column:2},end:{line:28,column:30}},{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},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,YAAa,QAAO,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,QAAS,QAAO,GAAG,CAAC,CAAC;AACzB,QAAM,MAAM,UAAU;AACtB,WAAS,KAAK,CAAC,GAAG,YAAU,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC;AACrD;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8eedc6c4f661a6bd38a2227269e9dcc5dcb1f437"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Wa=function(){return s},s}Wa();function Xj(r,t,e){Wa().f[0]++,Wa().s[0]++,fetch(r,{mode:"cors",credentials:"same-origin"}).then(function(n){return Wa().f[1]++,Wa().s[1]++,n.json()}).then(function(n){Wa().f[2]++,Wa().s[2]++,e(n)}).catch(function(){Wa().f[3]++,Wa().s[3]++,console.warn("Can not metadata for "+r),Wa().s[4]++,e(t)})}function Sde(r,t){if(Wa().f[4]++,Wa().s[5]++,r)Wa().b[0][1]++;else return Wa().b[0][0]++,Wa().s[6]++,t([]);const e=(Wa().s[7]++,WK.parse(r)),n=(Wa().s[8]++,"/%7Bfontstack%7D/%7Brange%7D.pbf");Wa().s[9]++,e.pathname===n?(Wa().b[1][0]++,Wa().s[10]++,e.pathname="/fontstacks.json"):(Wa().b[1][1]++,Wa().s[11]++,e.pathname=e.pathname.replace(n,".json"));const i=(Wa().s[12]++,WK.format(e));Wa().s[13]++,Xj(i,[],t)}function Ede(r,t){if(Wa().f[5]++,Wa().s[14]++,r)Wa().b[2][1]++;else return Wa().b[2][0]++,Wa().s[15]++,t([]);const e=(Wa().s[16]++,r+".json");Wa().s[17]++,Xj(e,{},n=>(Wa().f[6]++,Wa().s[18]++,t(Object.keys(n))))}function KA(){var r="/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",t="5d157b2ae65dbd5a5a7dfa0dbf76114e1399ceba",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return KA=function(){return s},s}KA();function Ode(){KA().f[0]++;const r=(KA().s[0]++,new URL(window.location.href));return KA().s[1]++,r.searchParams.get("style")}function Jj(r,t){KA().f[1]++,KA().s[2]++,console.log("Loading style",r),KA().s[3]++,fetch(r,{mode:"cors",credentials:"same-origin"}).then(function(e){return KA().f[2]++,KA().s[4]++,e.json()}).then(function(e){KA().f[3]++,KA().s[5]++,t(oc.ensureStyleValidity(e))}).catch(function(){KA().f[4]++,KA().s[6]++,console.warn("Could not fetch default style",r),KA().s[7]++,t(oc.emptyStyle)})}function QK(){KA().f[5]++;const r=(KA().s[8]++,new URL(window.location.href));KA().s[9]++,r.searchParams.delete("style"),KA().s[10]++,window.history.replaceState({},document.title,r.toString())}function Pd(){var r="/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",t="f92fa2abb31199d99fd3ae02d967dc6702faf862",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Pd=function(){return s},s}Pd();function ez(r,t){Pd().f[0]++;const e=(Pd().s[0]++,EW(r,t));return Pd().s[1]++,e.map(n=>(Pd().f[1]++,Pd().s[2]++,n.command+" "+n.args.join(" ")))}function Bde(r,t){return Pd().f[2]++,Pd().s[3]++,ez(r,t).map(e=>(Pd().f[3]++,Pd().s[4]++,"Undo "+e))}function Ide(r,t){return Pd().f[4]++,Pd().s[5]++,ez(r,t).map(e=>(Pd().f[5]++,Pd().s[6]++,"Redo "+e))}function gi(){var r="/home/runner/work/maputnik/maputnik/src/libs/stylestore.ts",t="d0461aebf8a7391762efd074af8c5c2674087e64",e=globalThis,n="__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:63,column:65}},28:{start:{line:63,column:37},end:{line:63,column:65}},29:{start:{line:64,column:20},end:{line:64,column:67}},30:{start:{line:65,column:22},end:{line:65,column:68}},31:{start:{line:66,column:4},end:{line:66,column:52}},32:{start:{line:66,column:19},end:{line:66,column:52}},33:{start:{line:67,column:4},end:{line:67,column:25}},34:{start:{line:71,column:4},end:{line:71,column:51}},35:{start:{line:72,column:16},end:{line:72,column:37}},36:{start:{line:73,column:4},end:{line:73,column:63}},37:{start:{line:74,column:4},end:{line:74,column:65}},38:{start:{line:75,column:4},end:{line:75,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:68,column:3}},line:62},9:{name:"(anonymous_9)",decl:{start:{line:70,column:2},end:{line:70,column:3}},loc:{start:{line:70,column:17},end:{line:76,column:3}},line:70}},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:63,column:65}},type:"if",locations:[{start:{line:63,column:4},end:{line:63,column:65}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:63},5:{loc:{start:{line:66,column:4},end:{line:66,column:52}},type:"if",locations:[{start:{line:66,column:4},end:{line:66,column:52}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:66}},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,EAAG,QAAO,iBAAiB,EAAE;AAC1D,UAAM,UAAU,OAAO,aAAa,QAAQ,YAAY,MAAM;AAC9D,UAAM,YAAY,OAAO,aAAa,QAAQ,SAAS,OAAO,CAAC;AAE/D,QAAG,UAAW,QAAO,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:"d0461aebf8a7391762efd074af8c5c2674087e64"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return gi=function(){return s},s}gi();const kv=(gi().s[0]++,"maputnik"),tz=(gi().s[1]++,"style"),qK=(gi().s[2]++,{latest:[kv,"latest_style"].join(":"),accessToken:[kv,"access_token"].join(":")}),kde=(gi().s[3]++,$j[0].url);function YK(r){gi().f[0]++,gi().s[4]++,Jj(kde,r)}function Tde(){gi().f[1]++;const r=(gi().s[5]++,[]);gi().s[6]++;for(let t=(gi().s[7]++,0);t<window.localStorage.length;t++){const e=(gi().s[8]++,window.localStorage.key(t));gi().s[9]++,nz(e)?(gi().b[0][0]++,gi().s[10]++,r.push(Pde(e))):gi().b[0][1]++}return gi().s[11]++,r}function nz(r){gi().f[2]++;const t=(gi().s[12]++,r.split(":"));return gi().s[13]++,gi().b[1][0]++,t.length===3&&(gi().b[1][1]++,t[0]===kv)&&(gi().b[1][2]++,t[1]===tz)}function Pde(r){if(gi().f[3]++,gi().s[14]++,nz(r))gi().b[2][1]++;else throw gi().b[2][0]++,gi().s[15]++,"Key is not a valid style key";const t=(gi().s[16]++,r.split(":")),e=(gi().s[17]++,t[2]);return gi().s[18]++,e}function $K(r){return gi().f[4]++,gi().s[19]++,[kv,tz,r].join(":")}class VK{constructor(){Kn(this,"mapStyles");gi().f[5]++,gi().s[20]++,this.mapStyles=Tde()}init(t){gi().f[6]++,gi().s[21]++,t(null)}purge(){gi().f[7]++,gi().s[22]++;for(let t=(gi().s[23]++,0);t<window.localStorage.length;t++){const e=(gi().s[24]++,window.localStorage.key(t));gi().s[25]++,e.startsWith(kv)?(gi().b[3][0]++,gi().s[26]++,window.localStorage.removeItem(e)):gi().b[3][1]++}}latestStyle(t){if(gi().f[8]++,gi().s[27]++,this.mapStyles.length===0)return gi().b[4][0]++,gi().s[28]++,YK(t);gi().b[4][1]++;const e=(gi().s[29]++,window.localStorage.getItem(qK.latest)),n=(gi().s[30]++,window.localStorage.getItem($K(e)));if(gi().s[31]++,n)return gi().b[5][0]++,gi().s[32]++,t(JSON.parse(n));gi().b[5][1]++,gi().s[33]++,YK(t)}save(t){gi().f[9]++,gi().s[34]++,t=oc.ensureStyleValidity(t);const e=(gi().s[35]++,$K(t.id));return gi().s[36]++,window.localStorage.setItem(e,JSON.stringify(t)),gi().s[37]++,window.localStorage.setItem(qK.latest,t.id),gi().s[38]++,t}}/*! *****************************************************************************
|
||
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 EE=function(r,t){return EE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])},EE(r,t)};function rz(r,t){EE(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Kde(r){var t=typeof Symbol=="function"&&r[Symbol.iterator],e=0;return t?t.call(r):{next:function(){return r&&e>=r.length&&(r=void 0),{value:r&&r[e++],done:!r}}}}function Rde(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n=e.call(r),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(s)throw s.error}}return o}function Dde(){for(var r=[],t=0;t<arguments.length;t++)r=r.concat(Rde(arguments[t]));return r}var iz=function(){function r(t,e){this.target=e,this.type=t}return r}(),Lde=function(r){rz(t,r);function t(e,n){var i=r.call(this,"error",n)||this;return i.message=e.message,i.error=e,i}return t}(iz),Fde=function(r){rz(t,r);function t(e,n,i){e===void 0&&(e=1e3),n===void 0&&(n="");var o=r.call(this,"close",i)||this;return o.wasClean=!0,o.code=e,o.reason=n,o}return t}(iz);/*!
|
||
* Reconnecting WebSocket
|
||
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
||
* https://github.com/pladaria/reconnecting-websocket
|
||
* License MIT
|
||
*/var Ude=function(){if(typeof WebSocket<"u")return WebSocket},jde=function(r){return typeof r<"u"&&!!r&&r.CLOSING===2},P0={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},zde=function(){function r(t,e,n){var i=this;n===void 0&&(n={}),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 s=i._options.minUptime,a=s===void 0?P0.minUptime:s;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},a),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(f){return i._ws.send(f)}),i._messageQueue=[],i.onopen&&i.onopen(o),i._listeners.open.forEach(function(f){return i._callEventListener(o,f)})},this._handleMessage=function(o){i._debug("message event"),i.onmessage&&i.onmessage(o),i._listeners.message.forEach(function(s){return i._callEventListener(o,s)})},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(s){return i._callEventListener(o,s)}),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(s){return i._callEventListener(o,s)})},this._url=t,this._protocols=e,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(r,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(r,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(r,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(r,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CONNECTING",{get:function(){return r.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"OPEN",{get:function(){return r.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CLOSING",{get:function(){return r.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CLOSED",{get:function(){return r.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(e,n){return typeof n=="string"?e+=n.length:n instanceof Blob?e+=n.size:e+=n.byteLength,e},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?r.CLOSED:r.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),r.prototype.close=function(t,e){if(t===void 0&&(t=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(t,e)},r.prototype.reconnect=function(t,e){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,e),this._connect())},r.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var e=this._options.maxEnqueuedMessages,n=e===void 0?P0.maxEnqueuedMessages:e;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},r.prototype.addEventListener=function(t,e){this._listeners[t]&&this._listeners[t].push(e)},r.prototype.dispatchEvent=function(t){var e,n,i=this._listeners[t.type];if(i)try{for(var o=Kde(i),s=o.next();!s.done;s=o.next()){var a=s.value;this._callEventListener(t,a)}}catch(f){e={error:f}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0},r.prototype.removeEventListener=function(t,e){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(n){return n!==e}))},r.prototype._debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._options.debug&&console.log.apply(console,Dde(["RWS>"],t))},r.prototype._getNextDelay=function(){var t=this._options,e=t.reconnectionDelayGrowFactor,n=e===void 0?P0.reconnectionDelayGrowFactor:e,i=t.minReconnectionDelay,o=i===void 0?P0.minReconnectionDelay:i,s=t.maxReconnectionDelay,a=s===void 0?P0.maxReconnectionDelay:s,f=0;return this._retryCount>0&&(f=o*Math.pow(n,this._retryCount-1),f>a&&(f=a)),this._debug("next delay",f),f},r.prototype._wait=function(){var t=this;return new Promise(function(e){setTimeout(e,t._getNextDelay())})},r.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var e=t();if(typeof e=="string")return Promise.resolve(e);if(e.then)return e}throw Error("Invalid URL")},r.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var e=this._options,n=e.maxRetries,i=n===void 0?P0.maxRetries:n,o=e.connectionTimeout,s=o===void 0?P0.connectionTimeout:o,a=e.WebSocket,f=a===void 0?Ude():a;if(this._retryCount>=i){this._debug("max retries reached",this._retryCount,">=",i);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!jde(f))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(g){t._closeCalled||(t._debug("connect",{url:g,protocols:t._protocols}),t._ws=t._protocols?new f(g,t._protocols):new f(g),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},s))})}},r.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new Lde(Error("TIMEOUT"),this))},r.prototype._disconnect=function(t,e){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,e),this._handleClose(new Fde(t,e,this))}catch{}}},r.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},r.prototype._callEventListener=function(t,e){"handleEvent"in e?e.handleEvent(t):e(t)},r.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))},r.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))},r.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},r}();function yi(){var r="/home/runner/work/maputnik/maputnik/src/libs/apistore.ts",t="fa2411bec13fe7a0c74835456fb0c60c3fdde9e5",e=globalThis,n="__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:45,column:6}},16:{start:{line:35,column:6},end:{line:35,column:26}},17:{start:{line:35,column:19},end:{line:35,column:26}},18:{start:{line:36,column:6},end:{line:36,column:52}},19:{start:{line:37,column:24},end:{line:37,column:40}},20:{start:{line:38,column:6},end:{line:42,column:7}},21:{start:{line:39,column:8},end:{line:39,column:41}},22:{start:{line:41,column:8},end:{line:41,column:27}},23:{start:{line:43,column:27},end:{line:43,column:65}},24:{start:{line:44,column:6},end:{line:44,column:44}},25:{start:{line:48,column:4},end:{line:58,column:5}},26:{start:{line:49,column:6},end:{line:55,column:9}},27:{start:{line:52,column:8},end:{line:52,column:31}},28:{start:{line:54,column:8},end:{line:54,column:44}},29:{start:{line:57,column:6},end:{line:57,column:92}},30:{start:{line:62,column:22},end:{line:66,column:5}},31:{start:{line:67,column:15},end:{line:67,column:26}},32:{start:{line:68,column:4},end:{line:77,column:7}},33:{start:{line:76,column:6},end:{line:76,column:38}},34:{start:{line:76,column:17},end:{line:76,column:38}},35:{start:{line:78,column:4},end:{line:78,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:46,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:45,column:5}},line:34},8:{name:"(anonymous_8)",decl:{start:{line:47,column:2},end:{line:47,column:3}},loc:{start:{line:47,column:18},end:{line:59,column:3}},line:47},9:{name:"(anonymous_9)",decl:{start:{line:51,column:14},end:{line:51,column:15}},loc:{start:{line:51,column:33},end:{line:53,column:7}},line:51},10:{name:"(anonymous_10)",decl:{start:{line:53,column:14},end:{line:53,column:15}},loc:{start:{line:53,column:29},end:{line:55,column:7}},line:53},11:{name:"(anonymous_11)",decl:{start:{line:61,column:2},end:{line:61,column:3}},loc:{start:{line:61,column:17},end:{line:79,column:3}},line:61},12:{name:"(anonymous_12)",decl:{start:{line:75,column:13},end:{line:75,column:14}},loc:{start:{line:75,column:29},end:{line:77,column:5}},line:75}},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:35,column:26}},type:"if",locations:[{start:{line:35,column:6},end:{line:35,column:26}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},4:{loc:{start:{line:48,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:48,column:4},end:{line:58,column:5}},{start:{line:56,column:11},end:{line:58,column:5}}],line:48},5:{loc:{start:{line:76,column:6},end:{line:76,column:38}},type:"if",locations:[{start:{line:76,column:6},end:{line:76,column:38}},{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,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,KAAM;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,MAAO,SAAQ,MAAM,KAAK;AAAA,IAC/B,CAAC;AACH,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"fa2411bec13fe7a0c74835456fb0c60c3fdde9e5"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return yi=function(){return s},s}yi();class Nde{constructor(t){Kn(this,"localUrl");Kn(this,"websocketUrl");Kn(this,"latestStyleId",(yi().s[0]++,void 0));Kn(this,"onLocalStyleChange");yi().f[0]++,yi().s[1]++,this.onLocalStyleChange=(yi().b[0][0]++,t.onLocalStyleChange||(yi().b[0][1]++,()=>{yi().f[1]++}));const e=(yi().s[2]++,yi().b[1][0]++,t.port||(yi().b[1][1]++,"8000")),n=(yi().s[3]++,yi().b[2][0]++,t.host||(yi().b[2][1]++,"localhost"));yi().s[4]++,this.localUrl=`http://${n}:${e}`,yi().s[5]++,this.websocketUrl=`ws://${n}:${e}/ws`,yi().s[6]++,this.init=this.init.bind(this)}init(t){yi().f[2]++,yi().s[7]++,fetch(this.localUrl+"/styles",{mode:"cors"}).then(e=>(yi().f[3]++,yi().s[8]++,e.json())).then(e=>{yi().f[4]++;const n=(yi().s[9]++,e);yi().s[10]++,this.latestStyleId=n[0],yi().s[11]++,this.notifyLocalChanges(),yi().s[12]++,t(null)}).catch(()=>{yi().f[5]++,yi().s[13]++,t(new Error("Can not connect to style API"))})}notifyLocalChanges(){yi().f[6]++;const t=(yi().s[14]++,new zde(this.websocketUrl));yi().s[15]++,t.onmessage=e=>{if(yi().f[7]++,yi().s[16]++,e.data)yi().b[3][1]++;else{yi().b[3][0]++,yi().s[17]++;return}yi().s[18]++,console.log("Received style update from API");let n=(yi().s[19]++,oc.emptyStyle);yi().s[20]++;try{yi().s[21]++,n=JSON.parse(e.data)}catch(o){yi().s[22]++,console.error(o)}const i=(yi().s[23]++,oc.ensureStyleValidity(n));yi().s[24]++,this.onLocalStyleChange(i)}}latestStyle(t){if(yi().f[8]++,yi().s[25]++,this.latestStyleId)yi().b[4][0]++,yi().s[26]++,fetch(this.localUrl+"/styles/"+this.latestStyleId,{mode:"cors"}).then(function(e){return yi().f[9]++,yi().s[27]++,e.json()}).then(function(e){yi().f[10]++,yi().s[28]++,t(oc.ensureStyleValidity(e))});else throw yi().b[4][1]++,yi().s[29]++,new Error("No latest style available. You need to init the api backend first.")}save(t){yi().f[11]++;const e=(yi().s[30]++,wD(oc.stripAccessTokens(oc.replaceAccessTokens(t)))),n=(yi().s[31]++,t.id);return yi().s[32]++,fetch(this.localUrl+"/styles/"+n,{method:"PUT",mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"},body:e}).catch(function(i){yi().f[12]++,yi().s[33]++,i?(yi().b[5][0]++,yi().s[34]++,console.error(i)):yi().b[5][1]++}),yi().s[35]++,t}}function gl(){var r="/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",t="9277d165d3b1fd7c235a1faab33cf41596d9966e",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return gl=function(){return s},s}gl();class Gde{constructor(t=(gl().b[0][0]++,[])){Kn(this,"revisions");Kn(this,"currentIdx");gl().f[0]++,gl().s[0]++,this.revisions=t,gl().s[1]++,this.currentIdx=t.length-1}get latest(){return gl().f[1]++,gl().s[2]++,this.revisions[this.revisions.length-1]}get current(){return gl().f[2]++,gl().s[3]++,this.revisions[this.currentIdx]}addRevision(t){gl().f[3]++,gl().s[4]++,this.revisions=this.revisions.slice(0,this.currentIdx+1),gl().s[5]++,this.revisions.push(t),gl().s[6]++,this.currentIdx++}undo(){return gl().f[4]++,gl().s[7]++,this.currentIdx>0?(gl().b[1][0]++,gl().s[8]++,this.currentIdx--):gl().b[1][1]++,gl().s[9]++,this.current}redo(){return gl().f[5]++,gl().s[10]++,this.currentIdx<this.revisions.length-1?(gl().b[2][0]++,gl().s[11]++,this.currentIdx++):gl().b[2][1]++,gl().s[12]++,this.current}}var iS,HK;function Wde(){if(HK)return iS;HK=1;var r="Expected a function",t=NaN,e="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,f=typeof window=="object"&&window&&window.Object===Object&&window,g=typeof self=="object"&&self&&self.Object===Object&&self,b=f||g||Function("return this")(),I=Object.prototype,S=I.toString,B=Math.max,P=Math.min,U=function(){return b.Date.now()};function j(X,G,ae){var ge,he,Ie,re,oe,Se,ye=0,nt=!1,Ne=!1,je=!0;if(typeof X!="function")throw new TypeError(r);G=$(G)||0,W(ae)&&(nt=!!ae.leading,Ne="maxWait"in ae,Ie=Ne?B($(ae.maxWait)||0,G):Ie,je="trailing"in ae?!!ae.trailing:je);function et(Ke){var we=ge,Fe=he;return ge=he=void 0,ye=Ke,re=X.apply(Fe,we),re}function Ue(Ke){return ye=Ke,oe=setTimeout(vt,G),nt?et(Ke):re}function ke(Ke){var we=Ke-Se,Fe=Ke-ye,tt=G-we;return Ne?P(tt,Ie-Fe):tt}function We(Ke){var we=Ke-Se,Fe=Ke-ye;return Se===void 0||we>=G||we<0||Ne&&Fe>=Ie}function vt(){var Ke=U();if(We(Ke))return Pt(Ke);oe=setTimeout(vt,ke(Ke))}function Pt(Ke){return oe=void 0,je&&ge?et(Ke):(ge=he=void 0,re)}function ut(){oe!==void 0&&clearTimeout(oe),ye=0,ge=Se=he=oe=void 0}function jt(){return oe===void 0?re:Pt(U())}function Rt(){var Ke=U(),we=We(Ke);if(ge=arguments,he=this,Se=Ke,we){if(oe===void 0)return Ue(Se);if(Ne)return oe=setTimeout(vt,G),et(Se)}return oe===void 0&&(oe=setTimeout(vt,G)),re}return Rt.cancel=ut,Rt.flush=jt,Rt}function q(X,G,ae){var ge=!0,he=!0;if(typeof X!="function")throw new TypeError(r);return W(ae)&&(ge="leading"in ae?!!ae.leading:ge,he="trailing"in ae?!!ae.trailing:he),j(X,G,{leading:ge,maxWait:G,trailing:he})}function W(X){var G=typeof X;return!!X&&(G=="object"||G=="function")}function ee(X){return!!X&&typeof X=="object"}function J(X){return typeof X=="symbol"||ee(X)&&S.call(X)==e}function $(X){if(typeof X=="number")return X;if(J(X))return t;if(W(X)){var G=typeof X.valueOf=="function"?X.valueOf():X;X=W(G)?G+"":G}if(typeof X!="string")return X===0?X:+X;X=X.replace(n,"");var ae=o.test(X);return ae||s.test(X)?a(X.slice(2),ae?2:8):i.test(X)?t:+X}return iS=q,iS}var Qde=Wde();const qde=us(Qde);var Wy={exports:{}};Wy.exports;var ZK;function Yde(){return ZK||(ZK=1,function(r,t){var e=200,n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",f="[object Array]",g="[object AsyncFunction]",b="[object Boolean]",I="[object Date]",S="[object Error]",B="[object Function]",P="[object GeneratorFunction]",U="[object Map]",j="[object Number]",q="[object Null]",W="[object Object]",ee="[object Promise]",J="[object Proxy]",$="[object RegExp]",X="[object Set]",G="[object String]",ae="[object Symbol]",ge="[object Undefined]",he="[object WeakMap]",Ie="[object ArrayBuffer]",re="[object DataView]",oe="[object Float32Array]",Se="[object Float64Array]",ye="[object Int8Array]",nt="[object Int16Array]",Ne="[object Int32Array]",je="[object Uint8Array]",et="[object Uint8ClampedArray]",Ue="[object Uint16Array]",ke="[object Uint32Array]",We=/[\\^$.*+?()[\]{}|]/g,vt=/^\[object .+?Constructor\]$/,Pt=/^(?:0|[1-9]\d*)$/,ut={};ut[oe]=ut[Se]=ut[ye]=ut[nt]=ut[Ne]=ut[je]=ut[et]=ut[Ue]=ut[ke]=!0,ut[a]=ut[f]=ut[Ie]=ut[b]=ut[re]=ut[I]=ut[S]=ut[B]=ut[U]=ut[j]=ut[W]=ut[$]=ut[X]=ut[G]=ut[he]=!1;var jt=typeof window=="object"&&window&&window.Object===Object&&window,Rt=typeof self=="object"&&self&&self.Object===Object&&self,Ke=jt||Rt||Function("return this")(),we=t&&!t.nodeType&&t,Fe=we&&!0&&r&&!r.nodeType&&r,tt=Fe&&Fe.exports===we,mt=tt&&jt.process,bt=function(){try{return mt&&mt.binding&&mt.binding("util")}catch{}}(),Lt=bt&&bt.isTypedArray;function Vt(te,Ee){for(var ot=-1,$t=te==null?0:te.length,Sr=0,Nn=[];++ot<$t;){var si=te[ot];Ee(si,ot,te)&&(Nn[Sr++]=si)}return Nn}function rn(te,Ee){for(var ot=-1,$t=Ee.length,Sr=te.length;++ot<$t;)te[Sr+ot]=Ee[ot];return te}function Sn(te,Ee){for(var ot=-1,$t=te==null?0:te.length;++ot<$t;)if(Ee(te[ot],ot,te))return!0;return!1}function Ar(te,Ee){for(var ot=-1,$t=Array(te);++ot<te;)$t[ot]=Ee(ot);return $t}function Bn(te){return function(Ee){return te(Ee)}}function ar(te,Ee){return te.has(Ee)}function Cr(te,Ee){return te==null?void 0:te[Ee]}function br(te){var Ee=-1,ot=Array(te.size);return te.forEach(function($t,Sr){ot[++Ee]=[Sr,$t]}),ot}function _r(te,Ee){return function(ot){return te(Ee(ot))}}function Jr(te){var Ee=-1,ot=Array(te.size);return te.forEach(function($t){ot[++Ee]=$t}),ot}var wr=Array.prototype,hi=Function.prototype,Ye=Object.prototype,de=Ke["__core-js_shared__"],pe=hi.toString,Je=Ye.hasOwnProperty,kt=function(){var te=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return te?"Symbol(src)_1."+te:""}(),Xt=Ye.toString,it=RegExp("^"+pe.call(Je).replace(We,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=tt?Ke.Buffer:void 0,qe=Ke.Symbol,fe=Ke.Uint8Array,xe=Ye.propertyIsEnumerable,p=wr.splice,Qe=qe?qe.toStringTag:void 0,pt=Object.getOwnPropertySymbols,ft=Ut?Ut.isBuffer:void 0,Et=_r(Object.keys,Object),Ct=Oi(Ke,"DataView"),nn=Oi(Ke,"Map"),Yt=Oi(Ke,"Promise"),Gt=Oi(Ke,"Set"),wt=Oi(Ke,"WeakMap"),Tn=Oi(Object,"create"),En=co(Ct),sr=co(nn),Pr=co(Yt),an=co(Gt),Wn=co(wt),ir=qe?qe.prototype:void 0,zr=ir?ir.valueOf:void 0;function fr(te){var Ee=-1,ot=te==null?0:te.length;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function hr(){this.__data__=Tn?Tn(null):{},this.size=0}function zn(te){var Ee=this.has(te)&&delete this.__data__[te];return this.size-=Ee?1:0,Ee}function Pi(te){var Ee=this.__data__;if(Tn){var ot=Ee[te];return ot===n?void 0:ot}return Je.call(Ee,te)?Ee[te]:void 0}function po(te){var Ee=this.__data__;return Tn?Ee[te]!==void 0:Je.call(Ee,te)}function ri(te,Ee){var ot=this.__data__;return this.size+=this.has(te)?0:1,ot[te]=Tn&&Ee===void 0?n:Ee,this}fr.prototype.clear=hr,fr.prototype.delete=zn,fr.prototype.get=Pi,fr.prototype.has=po,fr.prototype.set=ri;function Xr(te){var Ee=-1,ot=te==null?0:te.length;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function ii(){this.__data__=[],this.size=0}function mo(te){var Ee=this.__data__,ot=Qn(Ee,te);if(ot<0)return!1;var $t=Ee.length-1;return ot==$t?Ee.pop():p.call(Ee,ot,1),--this.size,!0}function Mi(te){var Ee=this.__data__,ot=Qn(Ee,te);return ot<0?void 0:Ee[ot][1]}function ka(te){return Qn(this.__data__,te)>-1}function ns(te,Ee){var ot=this.__data__,$t=Qn(ot,te);return $t<0?(++this.size,ot.push([te,Ee])):ot[$t][1]=Ee,this}Xr.prototype.clear=ii,Xr.prototype.delete=mo,Xr.prototype.get=Mi,Xr.prototype.has=ka,Xr.prototype.set=ns;function wo(te){var Ee=-1,ot=te==null?0:te.length;for(this.clear();++Ee<ot;){var $t=te[Ee];this.set($t[0],$t[1])}}function Ua(){this.size=0,this.__data__={hash:new fr,map:new(nn||Xr),string:new fr}}function Ya(te){var Ee=kr(this,te).delete(te);return this.size-=Ee?1:0,Ee}function Vi(te){return kr(this,te).get(te)}function Rl(te){return kr(this,te).has(te)}function Ps(te,Ee){var ot=kr(this,te),$t=ot.size;return ot.set(te,Ee),this.size+=ot.size==$t?0:1,this}wo.prototype.clear=Ua,wo.prototype.delete=Ya,wo.prototype.get=Vi,wo.prototype.has=Rl,wo.prototype.set=Ps;function ki(te){var Ee=-1,ot=te==null?0:te.length;for(this.__data__=new wo;++Ee<ot;)this.add(te[Ee])}function Mr(te){return this.__data__.set(te,n),this}function ms(te){return this.__data__.has(te)}ki.prototype.add=ki.prototype.push=Mr,ki.prototype.has=ms;function oa(te){var Ee=this.__data__=new Xr(te);this.size=Ee.size}function ba(){this.__data__=new Xr,this.size=0}function Ge(te){var Ee=this.__data__,ot=Ee.delete(te);return this.size=Ee.size,ot}function _t(te){return this.__data__.get(te)}function cn(te){return this.__data__.has(te)}function jn(te,Ee){var ot=this.__data__;if(ot instanceof Xr){var $t=ot.__data__;if(!nn||$t.length<e-1)return $t.push([te,Ee]),this.size=++ot.size,this;ot=this.__data__=new wo($t)}return ot.set(te,Ee),this.size=ot.size,this}oa.prototype.clear=ba,oa.prototype.delete=Ge,oa.prototype.get=_t,oa.prototype.has=cn,oa.prototype.set=jn;function An(te,Ee){var ot=qs(te),$t=!ot&&xa(te),Sr=!ot&&!$t&&Cl(te),Nn=!ot&&!$t&&!Sr&&Vl(te),si=ot||$t||Sr||Nn,fi=si?Ar(te.length,String):[],pr=fi.length;for(var Er in te)Je.call(te,Er)&&!(si&&(Er=="length"||Sr&&(Er=="offset"||Er=="parent")||Nn&&(Er=="buffer"||Er=="byteLength"||Er=="byteOffset")||ja(Er,pr)))&&fi.push(Er);return fi}function Qn(te,Ee){for(var ot=te.length;ot--;)if(pa(te[ot][0],Ee))return ot;return-1}function _i(te,Ee,ot){var $t=Ee(te);return qs(te)?$t:rn($t,ot(te))}function Ki(te){return te==null?te===void 0?ge:q:Qe&&Qe in Object(te)?Qs(te):$a(te)}function Xi(te){return Zr(te)&&Ki(te)==a}function aa(te,Ee,ot,$t,Sr){return te===Ee?!0:te==null||Ee==null||!Zr(te)&&!Zr(Ee)?te!==te&&Ee!==Ee:Mu(te,Ee,ot,$t,aa,Sr)}function Mu(te,Ee,ot,$t,Sr,Nn){var si=qs(te),fi=qs(Ee),pr=si?f:Mo(te),Er=fi?f:Mo(Ee);pr=pr==a?W:pr,Er=Er==a?W:Er;var Ci=pr==W,So=Er==W,Ri=pr==Er;if(Ri&&Cl(te)){if(!Cl(Ee))return!1;si=!0,Ci=!1}if(Ri&&!Ci)return Nn||(Nn=new oa),si||Vl(te)?Ai(te,Ee,ot,$t,Sr,Nn):As(te,Ee,pr,ot,$t,Sr,Nn);if(!(ot&i)){var Nr=Ci&&Je.call(te,"__wrapped__"),eo=So&&Je.call(Ee,"__wrapped__");if(Nr||eo){var to=Nr?te.value():te,la=eo?Ee.value():Ee;return Nn||(Nn=new oa),Sr(to,la,ot,$t,Nn)}}return Ri?(Nn||(Nn=new oa),Ju(te,Ee,ot,$t,Sr,Nn)):!1}function Hr(te){if(!zi(te)||Dl(te))return!1;var Ee=Ji(te)?it:vt;return Ee.test(co(te))}function ci(te){return Zr(te)&&$l(te.length)&&!!ut[Ki(te)]}function rs(te){if(!ea(te))return Et(te);var Ee=[];for(var ot in Object(te))Je.call(te,ot)&&ot!="constructor"&&Ee.push(ot);return Ee}function Ai(te,Ee,ot,$t,Sr,Nn){var si=ot&i,fi=te.length,pr=Ee.length;if(fi!=pr&&!(si&&pr>fi))return!1;var Er=Nn.get(te);if(Er&&Nn.get(Ee))return Er==Ee;var Ci=-1,So=!0,Ri=ot&o?new ki:void 0;for(Nn.set(te,Ee),Nn.set(Ee,te);++Ci<fi;){var Nr=te[Ci],eo=Ee[Ci];if($t)var to=si?$t(eo,Nr,Ci,Ee,te,Nn):$t(Nr,eo,Ci,te,Ee,Nn);if(to!==void 0){if(to)continue;So=!1;break}if(Ri){if(!Sn(Ee,function(la,gs){if(!ar(Ri,gs)&&(Nr===la||Sr(Nr,la,ot,$t,Nn)))return Ri.push(gs)})){So=!1;break}}else if(!(Nr===eo||Sr(Nr,eo,ot,$t,Nn))){So=!1;break}}return Nn.delete(te),Nn.delete(Ee),So}function As(te,Ee,ot,$t,Sr,Nn,si){switch(ot){case re:if(te.byteLength!=Ee.byteLength||te.byteOffset!=Ee.byteOffset)return!1;te=te.buffer,Ee=Ee.buffer;case Ie:return!(te.byteLength!=Ee.byteLength||!Nn(new fe(te),new fe(Ee)));case b:case I:case j:return pa(+te,+Ee);case S:return te.name==Ee.name&&te.message==Ee.message;case $:case G:return te==Ee+"";case U:var fi=br;case X:var pr=$t&i;if(fi||(fi=Jr),te.size!=Ee.size&&!pr)return!1;var Er=si.get(te);if(Er)return Er==Ee;$t|=o,si.set(te,Ee);var Ci=Ai(fi(te),fi(Ee),$t,Sr,Nn,si);return si.delete(te),Ci;case ae:if(zr)return zr.call(te)==zr.call(Ee)}return!1}function Ju(te,Ee,ot,$t,Sr,Nn){var si=ot&i,fi=sa(te),pr=fi.length,Er=sa(Ee),Ci=Er.length;if(pr!=Ci&&!si)return!1;for(var So=pr;So--;){var Ri=fi[So];if(!(si?Ri in Ee:Je.call(Ee,Ri)))return!1}var Nr=Nn.get(te);if(Nr&&Nn.get(Ee))return Nr==Ee;var eo=!0;Nn.set(te,Ee),Nn.set(Ee,te);for(var to=si;++So<pr;){Ri=fi[So];var la=te[Ri],gs=Ee[Ri];if($t)var Ks=si?$t(gs,la,Ri,Ee,te,Nn):$t(la,gs,Ri,te,Ee,Nn);if(!(Ks===void 0?la===gs||Sr(la,gs,ot,$t,Nn):Ks)){eo=!1;break}to||(to=Ri=="constructor")}if(eo&&!to){var su=te.constructor,Va=Ee.constructor;su!=Va&&"constructor"in te&&"constructor"in Ee&&!(typeof su=="function"&&su instanceof su&&typeof Va=="function"&&Va instanceof Va)&&(eo=!1)}return Nn.delete(te),Nn.delete(Ee),eo}function sa(te){return _i(te,Wi,Ta)}function kr(te,Ee){var ot=te.__data__;return au(Ee)?ot[typeof Ee=="string"?"string":"hash"]:ot.map}function Oi(te,Ee){var ot=Cr(te,Ee);return Hr(ot)?ot:void 0}function Qs(te){var Ee=Je.call(te,Qe),ot=te[Qe];try{te[Qe]=void 0;var $t=!0}catch{}var Sr=Xt.call(te);return $t&&(Ee?te[Qe]=ot:delete te[Qe]),Sr}var Ta=pt?function(te){return te==null?[]:(te=Object(te),Vt(pt(te),function(Ee){return xe.call(te,Ee)}))}:lo,Mo=Ki;(Ct&&Mo(new Ct(new ArrayBuffer(1)))!=re||nn&&Mo(new nn)!=U||Yt&&Mo(Yt.resolve())!=ee||Gt&&Mo(new Gt)!=X||wt&&Mo(new wt)!=he)&&(Mo=function(te){var Ee=Ki(te),ot=Ee==W?te.constructor:void 0,$t=ot?co(ot):"";if($t)switch($t){case En:return re;case sr:return U;case Pr:return ee;case an:return X;case Wn:return he}return Ee});function ja(te,Ee){return Ee=Ee??s,!!Ee&&(typeof te=="number"||Pt.test(te))&&te>-1&&te%1==0&&te<Ee}function au(te){var Ee=typeof te;return Ee=="string"||Ee=="number"||Ee=="symbol"||Ee=="boolean"?te!=="__proto__":te===null}function Dl(te){return!!kt&&kt in te}function ea(te){var Ee=te&&te.constructor,ot=typeof Ee=="function"&&Ee.prototype||Ye;return te===ot}function $a(te){return Xt.call(te)}function co(te){if(te!=null){try{return pe.call(te)}catch{}try{return te+""}catch{}}return""}function pa(te,Ee){return te===Ee||te!==te&&Ee!==Ee}var xa=Xi(function(){return arguments}())?Xi:function(te){return Zr(te)&&Je.call(te,"callee")&&!xe.call(te,"callee")},qs=Array.isArray;function Pa(te){return te!=null&&$l(te.length)&&!Ji(te)}var Cl=ft||Di;function eA(te,Ee){return aa(te,Ee)}function Ji(te){if(!zi(te))return!1;var Ee=Ki(te);return Ee==B||Ee==P||Ee==g||Ee==J}function $l(te){return typeof te=="number"&&te>-1&&te%1==0&&te<=s}function zi(te){var Ee=typeof te;return te!=null&&(Ee=="object"||Ee=="function")}function Zr(te){return te!=null&&typeof te=="object"}var Vl=Lt?Bn(Lt):ci;function Wi(te){return Pa(te)?An(te):rs(te)}function lo(){return[]}function Di(){return!1}r.exports=eA}(Wy,Wy.exports)),Wy.exports}var $de=Yde();const OE=us($de);function Ui(){var r="/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",t="77d2098743f5a64765174c6e14fc4dc25f900f6c",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Ui=function(){return s},s}Ui();class Vde{constructor(t=(Ui().b[0][0]++,{})){Kn(this,"onSourcesChange");Kn(this,"onVectorLayersChange");Kn(this,"throttledAnalyzeVectorLayerFields");Kn(this,"_sources");Kn(this,"_vectorLayers");Ui().f[0]++,Ui().s[0]++,this.onSourcesChange=(Ui().b[1][0]++,t.onSourcesChange||(Ui().b[1][1]++,()=>{Ui().f[1]++})),Ui().s[1]++,this.onVectorLayersChange=(Ui().b[2][0]++,t.onVectorLayersChange||(Ui().b[2][1]++,()=>{Ui().f[2]++})),Ui().s[2]++,this._sources={},Ui().s[3]++,this._vectorLayers={},Ui().s[4]++,this.throttledAnalyzeVectorLayerFields=qde(this.analyzeVectorLayerFields,5e3)}analyzeMap(t){Ui().f[3]++;const e=(Ui().s[5]++,{...this._sources});Ui().s[6]++,Object.keys(t.style.sourceCaches).forEach(n=>{Ui().f[4]++,Ui().s[7]++,this._sources[n]=t.style.sourceCaches[n]._source.vectorLayerIds}),Ui().s[8]++,OE(e,this._sources)?Ui().b[3][1]++:(Ui().b[3][0]++,Ui().s[9]++,this.onSourcesChange(this._sources)),Ui().s[10]++,this.throttledAnalyzeVectorLayerFields(t)}analyzeVectorLayerFields(t){Ui().f[5]++;const e=(Ui().s[11]++,{...this._vectorLayers});Ui().s[12]++,Object.keys(this._sources).forEach(n=>{Ui().f[6]++,Ui().s[13]++,(Ui().b[4][0]++,this._sources[n]||(Ui().b[4][1]++,[])).forEach(i=>{Ui().f[7]++;const o=(Ui().s[14]++,Ui().b[5][0]++,this._vectorLayers[i]||(Ui().b[5][1]++,{})),s=(Ui().s[15]++,{sourceLayer:i});Ui().s[16]++,t.querySourceFeatures(n,s).forEach(a=>{Ui().f[8]++,Ui().s[17]++,Object.keys(a.properties).forEach(f=>{Ui().f[9]++;const g=(Ui().s[18]++,Ui().b[6][0]++,o[f]||(Ui().b[6][1]++,{}));Ui().s[19]++,g[a.properties[f]]={},Ui().s[20]++,o[f]=g})}),Ui().s[21]++,this._vectorLayers[i]=o})}),Ui().s[22]++,OE(e,this._vectorLayers)?Ui().b[7][1]++:(Ui().b[7][0]++,Ui().s[23]++,this.onVectorLayersChange(this._vectorLayers))}get sources(){return Ui().f[10]++,Ui().s[24]++,this._sources}get vectorLayers(){return Ui().f[11]++,Ui().s[25]++,this._vectorLayers}}function ts(){var r="/home/runner/work/maputnik/maputnik/src/libs/debug.ts",t="f3fc52390a8e0125df8ac2b3d3c29ba103bd1c39",e=globalThis,n="__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=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return ts=function(){return s},s}ts();const nv=(ts().s[0]++,{});function ZO(){ts().f[0]++;const r=(ts().s[1]++,new URL(window.location.href).searchParams),t=(ts().s[2]++,r.get("debug"));return ts().s[3]++,t?(ts().b[0][0]++,ts().s[4]++,!!t.match(/^(|1|true)$/)):(ts().b[0][1]++,ts().s[5]++,!1)}function oz(){return ts().f[1]++,ts().s[6]++,new Error("Debug not enabled, enable by appending '?debug' to your query string")}function Hde(r,t,e){if(ts().f[2]++,ts().s[7]++,ZO())ts().b[1][1]++;else throw ts().b[1][0]++,ts().s[8]++,oz();ts().s[9]++,nv[r]=(ts().b[2][0]++,nv[r]||(ts().b[2][1]++,{})),ts().s[10]++,nv[r][t]=e}function Zde(r,t){if(ts().f[3]++,ts().s[11]++,ZO())ts().b[3][1]++;else throw ts().b[3][0]++,ts().s[12]++,oz();if(ts().s[13]++,Object.prototype.hasOwnProperty.call(nv,r))return ts().b[4][0]++,ts().s[14]++,nv[r][t];ts().b[4][1]++}const L0=(ts().s[15]++,{enabled:ZO,get:Zde,set:Hde});ts().s[16]++;window.debug=L0;function Me(){var r="/home/runner/work/maputnik/maputnik/src/components/App.tsx",t="b0d5f8ee8537ee2f4707fe123c0c222059f25ad2",e=globalThis,n="__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:210,column:6}},63:{start:{line:211,column:4},end:{line:213,column:7}},64:{start:{line:212,column:35},end:{line:212,column:69}},65:{start:{line:215,column:19},end:{line:233,column:3}},66:{start:{line:216,column:4},end:{line:232,column:5}},67:{start:{line:217,column:6},end:{line:223,column:7}},68:{start:{line:218,column:8},end:{line:218,column:27}},69:{start:{line:219,column:8},end:{line:219,column:22}},70:{start:{line:220,column:13},end:{line:223,column:7}},71:{start:{line:221,column:8},end:{line:221,column:27}},72:{start:{line:222,column:8},end:{line:222,column:22}},73:{start:{line:225,column:6},end:{line:231,column:7}},74:{start:{line:226,column:8},end:{line:226,column:27}},75:{start:{line:227,column:8},end:{line:227,column:22}},76:{start:{line:228,column:13},end:{line:231,column:7}},77:{start:{line:229,column:8},end:{line:229,column:27}},78:{start:{line:230,column:8},end:{line:230,column:22}},79:{start:{line:235,column:4},end:{line:235,column:60}},80:{start:{line:238,column:4},end:{line:238,column:63}},81:{start:{line:241,column:4},end:{line:241,column:40}},82:{start:{line:244,column:21},end:{line:244,column:55}},83:{start:{line:245,column:24},end:{line:245,column:93}},84:{start:{line:246,column:21},end:{line:246,column:110}},85:{start:{line:247,column:4},end:{line:249,column:7}},86:{start:{line:248,column:6},end:{line:248,column:80}},87:{start:{line:252,column:4},end:{line:254,column:7}},88:{start:{line:253,column:6},end:{line:253,column:80}},89:{start:{line:256,column:29},end:{line:270,column:3}},90:{start:{line:257,column:4},end:{line:261,column:5}},91:{start:{line:258,column:6},end:{line:260,column:9}},92:{start:{line:262,column:25},end:{line:268,column:5}},93:{start:{line:269,column:4},end:{line:269,column:38}},94:{start:{line:271,column:19},end:{line:383,column:3}},95:{start:{line:272,column:4},end:{line:277,column:6}},96:{start:{line:278,column:4},end:{line:280,column:5}},97:{start:{line:279,column:6},end:{line:279,column:44}},98:{start:{line:281,column:19},end:{line:281,column:51}},99:{start:{line:282,column:24},end:{line:282,column:26}},100:{start:{line:283,column:4},end:{line:294,column:5}},101:{start:{line:284,column:26},end:{line:284,column:42}},102:{start:{line:285,column:6},end:{line:293,column:9}},103:{start:{line:286,column:8},end:{line:291,column:9}},104:{start:{line:287,column:24},end:{line:289,column:11}},105:{start:{line:290,column:10},end:{line:290,column:34}},106:{start:{line:292,column:8},end:{line:292,column:40}},107:{start:{line:295,column:25},end:{line:346,column:6}},108:{start:{line:296,column:23},end:{line:296,column:109}},109:{start:{line:297,column:6},end:{line:310,column:7}},110:{start:{line:298,column:35},end:{line:298,column:43}},111:{start:{line:299,column:8},end:{line:309,column:10}},112:{start:{line:311,column:33},end:{line:311,column:100}},113:{start:{line:312,column:6},end:{line:325,column:7}},114:{start:{line:313,column:35},end:{line:313,column:53}},115:{start:{line:314,column:8},end:{line:324,column:10}},116:{start:{line:326,column:25},end:{line:326,column:88}},117:{start:{line:327,column:6},end:{line:345,column:7}},118:{start:{line:328,column:52},end:{line:328,column:62}},119:{start:{line:329,column:20},end:{line:329,column:78}},120:{start:{line:330,column:8},end:{line:340,column:10}},121:{start:{line:342,column:8},end:{line:344,column:10}},122:{start:{line:347,column:24},end:{line:347,column:30}},123:{start:{line:348,column:4},end:{line:362,column:5}},124:{start:{line:349,column:6},end:{line:349,column:42}},125:{start:{line:350,column:6},end:{line:361,column:9}},126:{start:{line:351,column:28},end:{line:351,column:33}},127:{start:{line:352,column:8},end:{line:360,column:9}},128:{start:{line:353,column:10},end:{line:359,column:11}},129:{start:{line:354,column:28},end:{line:354,column:49}},130:{start:{line:355,column:30},end:{line:355,column:69}},131:{start:{line:356,column:12},end:{line:356,column:44}},132:{start:{line:358,column:12},end:{line:358,column:30}},133:{start:{line:363,column:4},end:{line:365,column:5}},134:{start:{line:364,column:6},end:{line:364,column:40}},135:{start:{line:366,column:4},end:{line:368,column:5}},136:{start:{line:367,column:6},end:{line:367,column:40}},137:{start:{line:369,column:4},end:{line:371,column:5}},138:{start:{line:370,column:6},end:{line:370,column:47}},139:{start:{line:372,column:4},end:{line:374,column:5}},140:{start:{line:373,column:6},end:{line:373,column:31}},141:{start:{line:375,column:4},end:{line:382,column:7}},142:{start:{line:380,column:6},end:{line:380,column:26}},143:{start:{line:381,column:6},end:{line:381,column:27}},144:{start:{line:384,column:11},end:{line:391,column:3}},145:{start:{line:385,column:24},end:{line:385,column:49}},146:{start:{line:386,column:21},end:{line:386,column:67}},147:{start:{line:387,column:4},end:{line:387,column:61}},148:{start:{line:388,column:4},end:{line:390,column:7}},149:{start:{line:392,column:11},end:{line:399,column:3}},150:{start:{line:393,column:24},end:{line:393,column:49}},151:{start:{line:394,column:21},end:{line:394,column:67}},152:{start:{line:395,column:4},end:{line:395,column:61}},153:{start:{line:396,column:4},end:{line:398,column:7}},154:{start:{line:400,column:16},end:{line:414,column:3}},155:{start:{line:401,column:33},end:{line:401,column:37}},156:{start:{line:402,column:17},end:{line:402,column:43}},157:{start:{line:403,column:4},end:{line:403,column:53}},158:{start:{line:404,column:4},end:{line:404,column:53}},159:{start:{line:405,column:4},end:{line:405,column:38}},160:{start:{line:405,column:31},end:{line:405,column:38}},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:483,column:3}},207:{start:{line:480,column:4},end:{line:480,column:34}},208:{start:{line:481,column:4},end:{line:481,column:47}},209:{start:{line:482,column:4},end:{line:482,column:34}},210:{start:{line:485,column:23},end:{line:485,column:25}},211:{start:{line:486,column:4},end:{line:520,column:5}},212:{start:{line:487,column:6},end:{line:519,column:7}},213:{start:{line:488,column:8},end:{line:491,column:10}},214:{start:{line:492,column:18},end:{line:492,column:25}},215:{start:{line:493,column:8},end:{line:497,column:9}},216:{start:{line:494,column:10},end:{line:494,column:62}},217:{start:{line:496,column:10},end:{line:496,column:63}},218:{start:{line:498,column:8},end:{line:516,column:11}},219:{start:{line:500,column:30},end:{line:500,column:45}},220:{start:{line:501,column:10},end:{line:503,column:11}},221:{start:{line:502,column:12},end:{line:502,column:19}},222:{start:{line:504,column:26},end:{line:506,column:12}},223:{start:{line:507,column:10},end:{line:509,column:11}},224:{start:{line:508,column:12},end:{line:508,column:47}},225:{start:{line:510,column:10},end:{line:510,column:51}},226:{start:{line:511,column:10},end:{line:513,column:13}},227:{start:{line:515,column:10},end:{line:515,column:72}},228:{start:{line:518,column:8},end:{line:518,column:86}},229:{start:{line:521,column:4},end:{line:526,column:5}},230:{start:{line:522,column:6},end:{line:522,column:39}},231:{start:{line:523,column:6},end:{line:525,column:9}},232:{start:{line:529,column:21},end:{line:529,column:55}},233:{start:{line:530,column:4},end:{line:530,column:53}},234:{start:{line:532,column:16},end:{line:536,column:3}},235:{start:{line:533,column:4},end:{line:535,column:7}},236:{start:{line:538,column:40},end:{line:538,column:50}},237:{start:{line:539,column:21},end:{line:550,column:5}},238:{start:{line:542,column:8},end:{line:544,column:11}},239:{start:{line:547,column:8},end:{line:547,column:44}},240:{start:{line:548,column:8},end:{line:548,column:28}},241:{start:{line:551,column:21},end:{line:551,column:40}},242:{start:{line:553,column:4},end:{line:575,column:5}},243:{start:{line:554,column:6},end:{line:562,column:8}},244:{start:{line:564,column:6},end:{line:574,column:8}},245:{start:{line:577,column:4},end:{line:579,column:5}},246:{start:{line:578,column:6},end:{line:578,column:63}},247:{start:{line:580,column:25},end:{line:580,column:27}},248:{start:{line:581,column:4},end:{line:583,column:5}},249:{start:{line:582,column:6},end:{line:582,column:52}},250:{start:{line:584,column:4},end:{line:584,column:160}},251:{start:{line:586,column:18},end:{line:604,column:3}},252:{start:{line:587,column:43},end:{line:587,column:53}},253:{start:{line:588,column:35},end:{line:588,column:45}},254:{start:{line:589,column:16},end:{line:589,column:38}},255:{start:{line:590,column:20},end:{line:590,column:50}},256:{start:{line:591,column:4},end:{line:591,column:70}},257:{start:{line:592,column:23},end:{line:592,column:122}},258:{start:{line:592,column:66},end:{line:592,column:91}},259:{start:{line:592,column:109},end:{line:592,column:121}},260:{start:{line:593,column:4},end:{line:597,column:5}},261:{start:{line:594,column:6},end:{line:594,column:58}},262:{start:{line:596,column:6},end:{line:596,column:39}},263:{start:{line:598,column:4},end:{line:602,column:5}},264:{start:{line:599,column:6},end:{line:599,column:38}},265:{start:{line:600,column:11},end:{line:602,column:5}},266:{start:{line:601,column:6},end:{line:601,column:46}},267:{start:{line:603,column:4},end:{line:603,column:71}},268:{start:{line:605,column:27},end:{line:650,column:3}},269:{start:{line:606,column:16},end:{line:606,column:38}},270:{start:{line:607,column:23},end:{line:607,column:52}},271:{start:{line:608,column:4},end:{line:620,column:5}},272:{start:{line:609,column:21},end:{line:609,column:42}},273:{start:{line:610,column:23},end:{line:610,column:25}},274:{start:{line:611,column:6},end:{line:613,column:9}},275:{start:{line:612,column:8},end:{line:612,column:35}},276:{start:{line:614,column:6},end:{line:619,column:9}},277:{start:{line:621,column:17},end:{line:621,column:45}},278:{start:{line:622,column:4},end:{line:624,column:5}},279:{start:{line:623,column:6},end:{line:623,column:29}},280:{start:{line:625,column:17},end:{line:625,column:46}},281:{start:{line:626,column:4},end:{line:649,column:5}},282:{start:{line:627,column:6},end:{line:648,column:7}},283:{start:{line:628,column:22},end:{line:628,column:37}},284:{start:{line:629,column:46},end:{line:632,column:9}},285:{start:{line:633,column:20},end:{line:633,column:24}},286:{start:{line:634,column:8},end:{line:639,column:9}},287:{start:{line:635,column:33},end:{line:635,column:63}},288:{start:{line:636,column:10},end:{line:638,column:11}},289:{start:{line:637,column:12},end:{line:637,column:26}},290:{start:{line:640,column:8},end:{line:645,column:9}},291:{start:{line:641,column:10},end:{line:644,column:13}},292:{start:{line:647,column:8},end:{line:647,column:26}},293:{start:{line:651,column:18},end:{line:656,column:3}},294:{start:{line:652,column:4},end:{line:655,column:27}},295:{start:{line:658,column:4},end:{line:663,column:27}},296:{start:{line:666,column:4},end:{line:666,column:60}},297:{start:{line:669,column:4},end:{line:669,column:34}},298:{start:{line:671,column:28},end:{line:678,column:3}},299:{start:{line:672,column:4},end:{line:677,column:7}},300:{start:{line:679,column:28},end:{line:686,column:3}},301:{start:{line:680,column:4},end:{line:685,column:7}},302:{start:{line:688,column:19},end:{line:688,column:51}},303:{start:{line:689,column:26},end:{line:689,column:92}},304:{start:{line:690,column:36},end:{line:703,column:5}},305:{start:{line:704,column:38},end:{line:718,column:5}},306:{start:{line:719,column:24},end:{line:738,column:14}},307:{start:{line:739,column:24},end:{line:749,column:14}},308:{start:{line:750,column:35},end:{line:810,column:8}},309:{start:{line:811,column:4},end:{line:821,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:214,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:212,column:28},end:{line:212,column:29}},loc:{start:{line:212,column:35},end:{line:212,column:69}},line:212},18:{name:"(anonymous_18)",decl:{start:{line:215,column:19},end:{line:215,column:20}},loc:{start:{line:215,column:26},end:{line:233,column:3}},line:215},19:{name:"(anonymous_19)",decl:{start:{line:234,column:2},end:{line:234,column:3}},loc:{start:{line:234,column:22},end:{line:236,column:3}},line:234},20:{name:"(anonymous_20)",decl:{start:{line:237,column:2},end:{line:237,column:3}},loc:{start:{line:237,column:25},end:{line:239,column:3}},line:237},21:{name:"(anonymous_21)",decl:{start:{line:240,column:2},end:{line:240,column:3}},loc:{start:{line:240,column:27},end:{line:242,column:3}},line:240},22:{name:"(anonymous_22)",decl:{start:{line:243,column:2},end:{line:243,column:3}},loc:{start:{line:243,column:27},end:{line:250,column:3}},line:243},23:{name:"(anonymous_23)",decl:{start:{line:247,column:37},end:{line:247,column:38}},loc:{start:{line:247,column:48},end:{line:249,column:5}},line:247},24:{name:"(anonymous_24)",decl:{start:{line:251,column:2},end:{line:251,column:3}},loc:{start:{line:251,column:23},end:{line:255,column:3}},line:251},25:{name:"(anonymous_25)",decl:{start:{line:252,column:36},end:{line:252,column:37}},loc:{start:{line:252,column:47},end:{line:254,column:5}},line:252},26:{name:"(anonymous_26)",decl:{start:{line:256,column:29},end:{line:256,column:30}},loc:{start:{line:256,column:50},end:{line:270,column:3}},line:256},27:{name:"(anonymous_27)",decl:{start:{line:271,column:19},end:{line:271,column:20}},loc:{start:{line:271,column:44},end:{line:383,column:3}},line:271},28:{name:"(anonymous_28)",decl:{start:{line:285,column:30},end:{line:285,column:31}},loc:{start:{line:285,column:48},end:{line:293,column:7}},line:285},29:{name:"(anonymous_29)",decl:{start:{line:295,column:56},end:{line:295,column:57}},loc:{start:{line:295,column:67},end:{line:346,column:5}},line:295},30:{name:"(anonymous_30)",decl:{start:{line:350,column:21},end:{line:350,column:22}},loc:{start:{line:350,column:32},end:{line:361,column:7}},line:350},31:{name:"(anonymous_31)",decl:{start:{line:379,column:7},end:{line:379,column:8}},loc:{start:{line:379,column:13},end:{line:382,column:5}},line:379},32:{name:"(anonymous_32)",decl:{start:{line:384,column:11},end:{line:384,column:12}},loc:{start:{line:384,column:17},end:{line:391,column:3}},line:384},33:{name:"(anonymous_33)",decl:{start:{line:392,column:11},end:{line:392,column:12}},loc:{start:{line:392,column:17},end:{line:399,column:3}},line:392},34:{name:"(anonymous_34)",decl:{start:{line:400,column:16},end:{line:400,column:17}},loc:{start:{line:400,column:26},end:{line:414,column:3}},line:400},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:40},end:{line:483,column:3}},line:479},44:{name:"(anonymous_44)",decl:{start:{line:484,column:2},end:{line:484,column:3}},loc:{start:{line:484,column:17},end:{line:527,column:3}},line:484},45:{name:"(anonymous_45)",decl:{start:{line:500,column:16},end:{line:500,column:17}},loc:{start:{line:500,column:30},end:{line:500,column:45}},line:500},46:{name:"(anonymous_46)",decl:{start:{line:500,column:52},end:{line:500,column:53}},loc:{start:{line:500,column:62},end:{line:514,column:9}},line:500},47:{name:"(anonymous_47)",decl:{start:{line:514,column:17},end:{line:514,column:18}},loc:{start:{line:514,column:26},end:{line:516,column:9}},line:514},48:{name:"(anonymous_48)",decl:{start:{line:528,column:2},end:{line:528,column:3}},loc:{start:{line:528,column:17},end:{line:531,column:3}},line:528},49:{name:"(anonymous_49)",decl:{start:{line:532,column:16},end:{line:532,column:17}},loc:{start:{line:532,column:29},end:{line:536,column:3}},line:532},50:{name:"(anonymous_50)",decl:{start:{line:537,column:2},end:{line:537,column:3}},loc:{start:{line:537,column:16},end:{line:585,column:3}},line:537},51:{name:"(anonymous_51)",decl:{start:{line:541,column:27},end:{line:541,column:28}},loc:{start:{line:541,column:42},end:{line:545,column:7}},line:541},52:{name:"(anonymous_52)",decl:{start:{line:546,column:20},end:{line:546,column:21}},loc:{start:{line:546,column:27},end:{line:549,column:7}},line:546},53:{name:"(anonymous_53)",decl:{start:{line:586,column:18},end:{line:586,column:19}},loc:{start:{line:586,column:24},end:{line:604,column:3}},line:586},54:{name:"(anonymous_54)",decl:{start:{line:592,column:50},end:{line:592,column:51}},loc:{start:{line:592,column:66},end:{line:592,column:91}},line:592},55:{name:"(anonymous_55)",decl:{start:{line:592,column:100},end:{line:592,column:101}},loc:{start:{line:592,column:109},end:{line:592,column:121}},line:592},56:{name:"(anonymous_56)",decl:{start:{line:605,column:27},end:{line:605,column:28}},loc:{start:{line:605,column:41},end:{line:650,column:3}},line:605},57:{name:"(anonymous_57)",decl:{start:{line:611,column:21},end:{line:611,column:22}},loc:{start:{line:611,column:36},end:{line:613,column:7}},line:611},58:{name:"(anonymous_58)",decl:{start:{line:651,column:18},end:{line:651,column:19}},loc:{start:{line:651,column:29},end:{line:656,column:3}},line:651},59:{name:"(anonymous_59)",decl:{start:{line:657,column:2},end:{line:657,column:3}},loc:{start:{line:657,column:29},end:{line:664,column:3}},line:657},60:{name:"(anonymous_60)",decl:{start:{line:665,column:2},end:{line:665,column:3}},loc:{start:{line:665,column:25},end:{line:667,column:3}},line:665},61:{name:"(anonymous_61)",decl:{start:{line:668,column:2},end:{line:668,column:3}},loc:{start:{line:668,column:30},end:{line:670,column:3}},line:668},62:{name:"(anonymous_62)",decl:{start:{line:671,column:28},end:{line:671,column:29}},loc:{start:{line:671,column:44},end:{line:678,column:3}},line:671},63:{name:"(anonymous_63)",decl:{start:{line:679,column:28},end:{line:679,column:29}},loc:{start:{line:679,column:44},end:{line:686,column:3}},line:679},64:{name:"(anonymous_64)",decl:{start:{line:687,column:2},end:{line:687,column:3}},loc:{start:{line:687,column:11},end:{line:822,column:3}},line:687}},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:216,column:4},end:{line:232,column:5}},type:"if",locations:[{start:{line:216,column:4},end:{line:232,column:5}},{start:{line:224,column:11},end:{line:232,column:5}}],line:216},19:{loc:{start:{line:217,column:6},end:{line:223,column:7}},type:"if",locations:[{start:{line:217,column:6},end:{line:223,column:7}},{start:{line:220,column:13},end:{line:223,column:7}}],line:217},20:{loc:{start:{line:217,column:10},end:{line:217,column:53}},type:"binary-expr",locations:[{start:{line:217,column:10},end:{line:217,column:19}},{start:{line:217,column:23},end:{line:217,column:33}},{start:{line:217,column:37},end:{line:217,column:53}}],line:217},21:{loc:{start:{line:220,column:13},end:{line:223,column:7}},type:"if",locations:[{start:{line:220,column:13},end:{line:223,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:220},22:{loc:{start:{line:220,column:17},end:{line:220,column:46}},type:"binary-expr",locations:[{start:{line:220,column:17},end:{line:220,column:26}},{start:{line:220,column:30},end:{line:220,column:46}}],line:220},23:{loc:{start:{line:225,column:6},end:{line:231,column:7}},type:"if",locations:[{start:{line:225,column:6},end:{line:231,column:7}},{start:{line:228,column:13},end:{line:231,column:7}}],line:225},24:{loc:{start:{line:225,column:10},end:{line:225,column:39}},type:"binary-expr",locations:[{start:{line:225,column:10},end:{line:225,column:19}},{start:{line:225,column:23},end:{line:225,column:39}}],line:225},25:{loc:{start:{line:228,column:13},end:{line:231,column:7}},type:"if",locations:[{start:{line:228,column:13},end:{line:231,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:228},26:{loc:{start:{line:228,column:17},end:{line:228,column:46}},type:"binary-expr",locations:[{start:{line:228,column:17},end:{line:228,column:26}},{start:{line:228,column:30},end:{line:228,column:46}}],line:228},27:{loc:{start:{line:244,column:21},end:{line:244,column:55}},type:"binary-expr",locations:[{start:{line:244,column:21},end:{line:244,column:49}},{start:{line:244,column:53},end:{line:244,column:55}}],line:244},28:{loc:{start:{line:245,column:24},end:{line:245,column:93}},type:"binary-expr",locations:[{start:{line:245,column:24},end:{line:245,column:70}},{start:{line:245,column:74},end:{line:245,column:93}}],line:245},29:{loc:{start:{line:246,column:21},end:{line:246,column:110}},type:"cond-expr",locations:[{start:{line:246,column:55},end:{line:246,column:96}},{start:{line:246,column:99},end:{line:246,column:110}}],line:246},30:{loc:{start:{line:257,column:4},end:{line:261,column:5}},type:"if",locations:[{start:{line:257,column:4},end:{line:261,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:257},31:{loc:{start:{line:257,column:8},end:{line:257,column:123}},type:"binary-expr",locations:[{start:{line:257,column:8},end:{line:257,column:40}},{start:{line:257,column:44},end:{line:257,column:123}}],line:257},32:{loc:{start:{line:271,column:30},end:{line:271,column:39}},type:"default-arg",locations:[{start:{line:271,column:37},end:{line:271,column:39}}],line:271},33:{loc:{start:{line:278,column:4},end:{line:280,column:5}},type:"if",locations:[{start:{line:278,column:4},end:{line:280,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:278},34:{loc:{start:{line:281,column:19},end:{line:281,column:51}},type:"binary-expr",locations:[{start:{line:281,column:19},end:{line:281,column:45}},{start:{line:281,column:49},end:{line:281,column:51}}],line:281},35:{loc:{start:{line:283,column:4},end:{line:294,column:5}},type:"if",locations:[{start:{line:283,column:4},end:{line:294,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:283},36:{loc:{start:{line:283,column:8},end:{line:283,column:35}},type:"binary-expr",locations:[{start:{line:283,column:8},end:{line:283,column:16}},{start:{line:283,column:20},end:{line:283,column:35}}],line:283},37:{loc:{start:{line:286,column:8},end:{line:291,column:9}},type:"if",locations:[{start:{line:286,column:8},end:{line:291,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:286},38:{loc:{start:{line:286,column:12},end:{line:286,column:56}},type:"binary-expr",locations:[{start:{line:286,column:12},end:{line:286,column:27}},{start:{line:286,column:31},end:{line:286,column:56}}],line:286},39:{loc:{start:{line:297,column:6},end:{line:310,column:7}},type:"if",locations:[{start:{line:297,column:6},end:{line:310,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:297},40:{loc:{start:{line:312,column:6},end:{line:325,column:7}},type:"if",locations:[{start:{line:312,column:6},end:{line:325,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:312},41:{loc:{start:{line:327,column:6},end:{line:345,column:7}},type:"if",locations:[{start:{line:327,column:6},end:{line:345,column:7}},{start:{line:341,column:13},end:{line:345,column:7}}],line:327},42:{loc:{start:{line:329,column:20},end:{line:329,column:78}},type:"cond-expr",locations:[{start:{line:329,column:40},end:{line:329,column:67}},{start:{line:329,column:70},end:{line:329,column:78}}],line:329},43:{loc:{start:{line:329,column:20},end:{line:329,column:37}},type:"binary-expr",locations:[{start:{line:329,column:20},end:{line:329,column:25}},{start:{line:329,column:29},end:{line:329,column:37}}],line:329},44:{loc:{start:{line:348,column:4},end:{line:362,column:5}},type:"if",locations:[{start:{line:348,column:4},end:{line:362,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:348},45:{loc:{start:{line:352,column:8},end:{line:360,column:9}},type:"if",locations:[{start:{line:352,column:8},end:{line:360,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:352},46:{loc:{start:{line:363,column:4},end:{line:365,column:5}},type:"if",locations:[{start:{line:363,column:4},end:{line:365,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:363},47:{loc:{start:{line:366,column:4},end:{line:368,column:5}},type:"if",locations:[{start:{line:366,column:4},end:{line:368,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:366},48:{loc:{start:{line:369,column:4},end:{line:371,column:5}},type:"if",locations:[{start:{line:369,column:4},end:{line:371,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:369},49:{loc:{start:{line:372,column:4},end:{line:374,column:5}},type:"if",locations:[{start:{line:372,column:4},end:{line:374,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:372},50:{loc:{start:{line:405,column:4},end:{line:405,column:38}},type:"if",locations:[{start:{line:405,column:4},end:{line:405,column:38}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:405},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:487,column:6},end:{line:519,column:7}},type:"if",locations:[{start:{line:487,column:6},end:{line:519,column:7}},{start:{line:517,column:13},end:{line:519,column:7}}],line:487},57:{loc:{start:{line:487,column:10},end:{line:487,column:149}},type:"binary-expr",locations:[{start:{line:487,column:10},end:{line:487,column:72}},{start:{line:487,column:76},end:{line:487,column:97}},{start:{line:487,column:101},end:{line:487,column:149}}],line:487},58:{loc:{start:{line:501,column:10},end:{line:503,column:11}},type:"if",locations:[{start:{line:501,column:10},end:{line:503,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:501},59:{loc:{start:{line:518,column:26},end:{line:518,column:85}},type:"binary-expr",locations:[{start:{line:518,column:26},end:{line:518,column:49}},{start:{line:518,column:53},end:{line:518,column:85}}],line:518},60:{loc:{start:{line:521,column:4},end:{line:526,column:5}},type:"if",locations:[{start:{line:521,column:4},end:{line:526,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:521},61:{loc:{start:{line:529,column:21},end:{line:529,column:55}},type:"binary-expr",locations:[{start:{line:529,column:21},end:{line:529,column:49}},{start:{line:529,column:53},end:{line:529,column:55}}],line:529},62:{loc:{start:{line:530,column:11},end:{line:530,column:52}},type:"binary-expr",locations:[{start:{line:530,column:11},end:{line:530,column:40}},{start:{line:530,column:44},end:{line:530,column:52}}],line:530},63:{loc:{start:{line:540,column:16},end:{line:540,column:41}},type:"binary-expr",locations:[{start:{line:540,column:16},end:{line:540,column:29}},{start:{line:540,column:33},end:{line:540,column:41}}],line:540},64:{loc:{start:{line:553,column:4},end:{line:575,column:5}},type:"if",locations:[{start:{line:553,column:4},end:{line:575,column:5}},{start:{line:563,column:11},end:{line:575,column:5}}],line:553},65:{loc:{start:{line:577,column:4},end:{line:579,column:5}},type:"if",locations:[{start:{line:577,column:4},end:{line:579,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:577},66:{loc:{start:{line:581,column:4},end:{line:583,column:5}},type:"if",locations:[{start:{line:581,column:4},end:{line:583,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:581},67:{loc:{start:{line:592,column:66},end:{line:592,column:91}},type:"cond-expr",locations:[{start:{line:592,column:81},end:{line:592,column:84}},{start:{line:592,column:87},end:{line:592,column:91}}],line:592},68:{loc:{start:{line:593,column:4},end:{line:597,column:5}},type:"if",locations:[{start:{line:593,column:4},end:{line:597,column:5}},{start:{line:595,column:11},end:{line:597,column:5}}],line:593},69:{loc:{start:{line:598,column:4},end:{line:602,column:5}},type:"if",locations:[{start:{line:598,column:4},end:{line:602,column:5}},{start:{line:600,column:11},end:{line:602,column:5}}],line:598},70:{loc:{start:{line:600,column:11},end:{line:602,column:5}},type:"if",locations:[{start:{line:600,column:11},end:{line:602,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:600},71:{loc:{start:{line:608,column:4},end:{line:620,column:5}},type:"if",locations:[{start:{line:608,column:4},end:{line:620,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:608},72:{loc:{start:{line:608,column:8},end:{line:608,column:39}},type:"binary-expr",locations:[{start:{line:608,column:8},end:{line:608,column:18}},{start:{line:608,column:22},end:{line:608,column:39}}],line:608},73:{loc:{start:{line:622,column:4},end:{line:624,column:5}},type:"if",locations:[{start:{line:622,column:4},end:{line:624,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:622},74:{loc:{start:{line:622,column:8},end:{line:622,column:27}},type:"binary-expr",locations:[{start:{line:622,column:8},end:{line:622,column:12}},{start:{line:622,column:16},end:{line:622,column:27}}],line:622},75:{loc:{start:{line:626,column:4},end:{line:649,column:5}},type:"if",locations:[{start:{line:626,column:4},end:{line:649,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:626},76:{loc:{start:{line:634,column:8},end:{line:639,column:9}},type:"if",locations:[{start:{line:634,column:8},end:{line:639,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:634},77:{loc:{start:{line:636,column:10},end:{line:638,column:11}},type:"if",locations:[{start:{line:636,column:10},end:{line:638,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:636},78:{loc:{start:{line:640,column:8},end:{line:645,column:9}},type:"if",locations:[{start:{line:640,column:8},end:{line:645,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:640},79:{loc:{start:{line:688,column:19},end:{line:688,column:51}},type:"binary-expr",locations:[{start:{line:688,column:19},end:{line:688,column:45}},{start:{line:688,column:49},end:{line:688,column:51}}],line:688},80:{loc:{start:{line:689,column:26},end:{line:689,column:92}},type:"cond-expr",locations:[{start:{line:689,column:46},end:{line:689,column:83}},{start:{line:689,column:86},end:{line:689,column:92}}],line:689},81:{loc:{start:{line:719,column:24},end:{line:738,column:14}},type:"cond-expr",locations:[{start:{line:719,column:56},end:{line:738,column:5}},{start:{line:738,column:8},end:{line:738,column:14}}],line:719},82:{loc:{start:{line:739,column:24},end:{line:749,column:14}},type:"cond-expr",locations:[{start:{line:739,column:97},end:{line:749,column:5}},{start:{line:749,column:8},end:{line:749,column:14}}],line:739}},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,308:0,309: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,64: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:"AAmtBmB,SAAA,KAgNA,YAhNA;AAltBnB,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;AAyDA,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,MACA,YAAY;AAAA,IACd;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,SAAU;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,UAA6C,eAA4C;AAC/F,SAAA,SAAS,EAAC,WAAsB,CAAC;AAC3B,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,gBAAgB,YAAyC;AAClD,SAAA,SAAS,EAAC,WAAsB,CAAC;AAAA,EACxC;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,UAClD,YAAY,KAAK,MAAM;AAAA,UACvB,iBAAiB,KAAK;AAAA,QAAA;AAAA,MACxB;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,UAChD,YAAY,KAAK,MAAM;AAAA,QAAA;AAAA,MACzB;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:"b0d5f8ee8537ee2f4707fe123c0c222059f25ad2"},o=e[n]||(e[n]={});(!o[r]||o[r].hash!==t)&&(o[r]=i);var s=o[r];return Me=function(){return s},s}Me();Me().s[0]++;window.Buffer=MG.Buffer;function Xde(r,t){Me().f[0]++;const e=(Me().s[1]++,r.match(/\.tilehosting\.com/)),n=(Me().s[2]++,r.match(/\.maptiler\.com/)),i=(Me().s[3]++,r.match(/\.thunderforest\.com/));if(Me().s[4]++,Me().b[1][0]++,e||(Me().b[1][1]++,n)){Me().b[0][0]++;const o=(Me().s[5]++,oc.getAccessToken("openmaptiles",t,{allowFallback:!0}));if(Me().s[6]++,o)return Me().b[2][0]++,Me().s[7]++,r.replace("{key}",o);Me().b[2][1]++}else if(Me().b[0][1]++,Me().s[8]++,i){Me().b[3][0]++;const o=(Me().s[9]++,oc.getAccessToken("thunderforest",t,{allowFallback:!0}));if(Me().s[10]++,o)return Me().b[4][0]++,Me().s[11]++,r.replace("{key}",o);Me().b[4][1]++}else return Me().b[3][1]++,Me().s[12]++,r}function XK(r,t,e){return Me().f[1]++,Me().s[13]++,{...r,$root:{...r.$root,[t]:{...r.$root[t],values:e}}}}class Jde extends Zn.Component{constructor(e){Me().f[2]++,Me().s[14]++;super(e);Kn(this,"revisionStore");Kn(this,"styleStore");Kn(this,"layerWatcher");Kn(this,"handleKeyPress",(Me().s[65]++,e=>{Me().f[18]++,Me().s[66]++,navigator.platform.toUpperCase().indexOf("MAC")>=0?(Me().b[18][0]++,Me().s[67]++,Me().b[20][0]++,e.metaKey&&(Me().b[20][1]++,e.shiftKey)&&(Me().b[20][2]++,e.keyCode===90)?(Me().b[19][0]++,Me().s[68]++,e.preventDefault(),Me().s[69]++,this.onRedo()):(Me().b[19][1]++,Me().s[70]++,Me().b[22][0]++,e.metaKey&&(Me().b[22][1]++,e.keyCode===90)?(Me().b[21][0]++,Me().s[71]++,e.preventDefault(),Me().s[72]++,this.onUndo()):Me().b[21][1]++)):(Me().b[18][1]++,Me().s[73]++,Me().b[24][0]++,e.ctrlKey&&(Me().b[24][1]++,e.keyCode===90)?(Me().b[23][0]++,Me().s[74]++,e.preventDefault(),Me().s[75]++,this.onUndo()):(Me().b[23][1]++,Me().s[76]++,Me().b[26][0]++,e.ctrlKey&&(Me().b[26][1]++,e.keyCode===89)?(Me().b[25][0]++,Me().s[77]++,e.preventDefault(),Me().s[78]++,this.onRedo()):Me().b[25][1]++))}));Kn(this,"onChangeMetadataProperty",(Me().s[89]++,(e,n)=>{Me().f[26]++,Me().s[90]++,Me().b[31][0]++,e==="maputnik:renderer"&&(Me().b[31][1]++,n!==OG(this.state.mapStyle,["metadata","maputnik:renderer"],"mlgljs"))?(Me().b[30][0]++,Me().s[91]++,this.setState({mapState:"map"})):Me().b[30][1]++;const i=(Me().s[92]++,{...this.state.mapStyle,metadata:{...this.state.mapStyle.metadata,[e]:n}});Me().s[93]++,this.onStyleChanged(i)}));Kn(this,"onStyleChanged",(Me().s[94]++,(e,n=(Me().b[32][0]++,{}))=>{Me().f[27]++,Me().s[95]++,n={save:!0,addRevision:!0,initialLoad:!1,...n},Me().s[96]++,n.initialLoad?(Me().b[33][0]++,Me().s[97]++,this.getInitialStateFromUrl(e)):Me().b[33][1]++;const i=(Me().s[98]++,Me().b[34][0]++,pf(e)||(Me().b[34][1]++,[])),o=(Me().s[99]++,[]);if(Me().s[100]++,Me().b[36][0]++,e&&(Me().b[36][1]++,e.layers)){Me().b[35][0]++;const f=(Me().s[101]++,new window.Map);Me().s[102]++,e.layers.forEach((g,b)=>{if(Me().f[28]++,Me().s[103]++,Me().b[38][0]++,g.id===""&&(Me().b[38][1]++,f.has(g.id))){Me().b[37][0]++;const I=(Me().s[104]++,new Error(`layers[${b}]: duplicate layer id [empty_string], previously used`));Me().s[105]++,o.push(I)}else Me().b[37][1]++;Me().s[106]++,f.set(g.id,!0)})}else Me().b[35][1]++;const s=(Me().s[107]++,o.concat(i).map(f=>{Me().f[29]++;const g=(Me().s[108]++,f.message.match(/layers\[(\d+)\]: (duplicate layer id "?(.*)"?, previously used)/));if(Me().s[109]++,g){Me().b[39][0]++;const[,S,B]=(Me().s[110]++,g);return Me().s[111]++,{message:f.message,parsed:{type:"layer",data:{index:parseInt(S,10),key:"id",message:B}}}}else Me().b[39][1]++;const b=(Me().s[112]++,f.message.match(/layers\[(\d+)\]: (source "(?:.*)" not found)/));if(Me().s[113]++,b){Me().b[40][0]++;const[,S,B]=(Me().s[114]++,b);return Me().s[115]++,{message:f.message,parsed:{type:"layer",data:{index:parseInt(S,10),key:"source",message:B}}}}else Me().b[40][1]++;const I=(Me().s[116]++,f.message.match(/layers\[(\d+)\]\.(?:(\S+)\.)?(\S+): (.*)/));if(Me().s[117]++,I){Me().b[41][0]++;const[,S,B,P,U]=(Me().s[118]++,I),j=(Me().s[119]++,Me().b[43][0]++,B&&(Me().b[43][1]++,P)?(Me().b[42][0]++,[B,P].join(".")):(Me().b[42][1]++,P));return Me().s[120]++,{message:f.message,parsed:{type:"layer",data:{index:parseInt(S,10),key:j,message:U}}}}else return Me().b[41][1]++,Me().s[121]++,{message:f.message}}));let a=(Me().s[122]++,void 0);Me().s[123]++,i.length>0?(Me().b[44][0]++,Me().s[124]++,a=TB(e),Me().s[125]++,i.forEach(f=>{Me().f[30]++;const{message:g}=(Me().s[126]++,f);if(Me().s[127]++,g){Me().b[45][0]++,Me().s[128]++;try{const b=(Me().s[129]++,g.split(":")[0]),I=(Me().s[130]++,b.match(/^\S+?\[\d+\]\.[^[]+/)[0]);Me().s[131]++,zb.unset(a,I)}catch(b){Me().s[132]++,console.warn(b)}}else Me().b[45][1]++})):Me().b[44][1]++,Me().s[133]++,e.glyphs!==this.state.mapStyle.glyphs?(Me().b[46][0]++,Me().s[134]++,this.updateFonts(e.glyphs)):Me().b[46][1]++,Me().s[135]++,e.sprite!==this.state.mapStyle.sprite?(Me().b[47][0]++,Me().s[136]++,this.updateIcons(e.sprite)):Me().b[47][1]++,Me().s[137]++,n.addRevision?(Me().b[48][0]++,Me().s[138]++,this.revisionStore.addRevision(e)):Me().b[48][1]++,Me().s[139]++,n.save?(Me().b[49][0]++,Me().s[140]++,this.saveStyle(e)):Me().b[49][1]++,Me().s[141]++,this.setState({mapStyle:e,dirtyMapStyle:a,errors:s},()=>{Me().f[31]++,Me().s[142]++,this.fetchSources(),Me().s[143]++,this.setStateInUrl()})}));Kn(this,"onUndo",(Me().s[144]++,()=>{Me().f[32]++;const e=(Me().s[145]++,this.revisionStore.undo()),n=(Me().s[146]++,Bde(this.state.mapStyle,e));Me().s[147]++,this.onStyleChanged(e,{addRevision:!1}),Me().s[148]++,this.setState({infos:n})}));Kn(this,"onRedo",(Me().s[149]++,()=>{Me().f[33]++;const e=(Me().s[150]++,this.revisionStore.redo()),n=(Me().s[151]++,Ide(this.state.mapStyle,e));Me().s[152]++,this.onStyleChanged(e,{addRevision:!1}),Me().s[153]++,this.setState({infos:n})}));Kn(this,"onMoveLayer",(Me().s[154]++,e=>{Me().f[34]++;let{oldIndex:n,newIndex:i}=(Me().s[155]++,e),o=(Me().s[156]++,this.state.mapStyle.layers);if(Me().s[157]++,n=KB(n,0,o.length-1),Me().s[158]++,i=KB(i,0,o.length-1),Me().s[159]++,n===i){Me().b[50][0]++,Me().s[160]++;return}else Me().b[50][1]++;Me().s[161]++,n===this.state.selectedLayerIndex?(Me().b[51][0]++,Me().s[162]++,this.setState({selectedLayerIndex:i})):Me().b[51][1]++,Me().s[163]++,o=o.slice(0),Me().s[164]++,kG(o,n,i),Me().s[165]++,this.onLayersChange(o)}));Kn(this,"onLayersChange",(Me().s[166]++,e=>{Me().f[35]++;const n=(Me().s[167]++,{...this.state.mapStyle,layers:e});Me().s[168]++,this.onStyleChanged(n)}));Kn(this,"onLayerDestroy",(Me().s[169]++,e=>{Me().f[36]++;const n=(Me().s[170]++,this.state.mapStyle.layers),i=(Me().s[171]++,n.slice(0));Me().s[172]++,i.splice(e,1),Me().s[173]++,this.onLayersChange(i)}));Kn(this,"onLayerCopy",(Me().s[174]++,e=>{Me().f[37]++;const n=(Me().s[175]++,this.state.mapStyle.layers),i=(Me().s[176]++,n.slice(0)),o=(Me().s[177]++,TB(i[e]));Me().s[178]++,o.id=o.id+"-copy",Me().s[179]++,i.splice(e,0,o),Me().s[180]++,this.onLayersChange(i)}));Kn(this,"onLayerVisibilityToggle",(Me().s[181]++,e=>{Me().f[38]++;const n=(Me().s[182]++,this.state.mapStyle.layers),i=(Me().s[183]++,n.slice(0)),o=(Me().s[184]++,{...i[e]}),s=(Me().s[185]++,"layout"in o?(Me().b[52][0]++,{...o.layout}):(Me().b[52][1]++,{}));Me().s[186]++,s.visibility=s.visibility==="none"?(Me().b[53][0]++,"visible"):(Me().b[53][1]++,"none"),Me().s[187]++,o.layout=s,Me().s[188]++,i[e]=o,Me().s[189]++,this.onLayersChange(i)}));Kn(this,"onLayerIdChange",(Me().s[190]++,(e,n,i)=>{Me().f[39]++;const o=(Me().s[191]++,this.state.mapStyle.layers.slice(0));Me().s[192]++,o[e]={...o[e],id:i},Me().s[193]++,this.onLayersChange(o)}));Kn(this,"onLayerChanged",(Me().s[194]++,(e,n)=>{Me().f[40]++;const i=(Me().s[195]++,this.state.mapStyle.layers.slice(0));Me().s[196]++,i[e]=n,Me().s[197]++,this.onLayersChange(i)}));Kn(this,"setMapState",(Me().s[198]++,e=>{Me().f[41]++,Me().s[199]++,this.setState({mapState:e},this.setStateInUrl)}));Kn(this,"setDefaultValues",(Me().s[200]++,e=>{Me().f[42]++;const n=(Me().s[201]++,Me().b[54][0]++,e.metadata||(Me().b[54][1]++,{}));if(Me().s[202]++,n["maputnik:renderer"]===void 0){Me().b[55][0]++;const i=(Me().s[203]++,{...e,metadata:{...e.metadata,"maputnik:renderer":"mlgljs"}});return Me().s[204]++,i}else return Me().b[55][1]++,Me().s[205]++,e}));Kn(this,"openStyle",(Me().s[206]++,(e,n)=>{Me().f[43]++,Me().s[207]++,this.setState({fileHandle:n}),Me().s[208]++,e=this.setDefaultValues(e),Me().s[209]++,this.onStyleChanged(e)}));Kn(this,"onMapChange",(Me().s[234]++,e=>{Me().f[49]++,Me().s[235]++,this.setState({mapView:e})}));Kn(this,"setStateInUrl",(Me().s[251]++,()=>{Me().f[53]++;const{mapState:e,mapStyle:n,isOpen:i}=(Me().s[252]++,this.state),{selectedLayerIndex:o}=(Me().s[253]++,this.state),s=(Me().s[254]++,new URL(location.href)),a=(Me().s[255]++,zB(JSON.stringify(n)));Me().s[256]++,s.searchParams.set("layer",`${a}~${o}`);const f=(Me().s[257]++,Object.entries(i).map(([g,b])=>(Me().f[54]++,Me().s[258]++,b===!0?(Me().b[67][0]++,g):(Me().b[67][1]++,null))).filter(g=>(Me().f[55]++,Me().s[259]++,g!==null)));Me().s[260]++,f.length>0?(Me().b[68][0]++,Me().s[261]++,s.searchParams.set("modal",f.join(","))):(Me().b[68][1]++,Me().s[262]++,s.searchParams.delete("modal")),Me().s[263]++,e==="map"?(Me().b[69][0]++,Me().s[264]++,s.searchParams.delete("view")):(Me().b[69][1]++,Me().s[265]++,e==="inspect"?(Me().b[70][0]++,Me().s[266]++,s.searchParams.set("view","inspect")):Me().b[70][1]++),Me().s[267]++,history.replaceState({selectedLayerIndex:o},"Maputnik",s.href)}));Kn(this,"getInitialStateFromUrl",(Me().s[268]++,e=>{Me().f[56]++;const n=(Me().s[269]++,new URL(location.href)),i=(Me().s[270]++,n.searchParams.get("modal"));if(Me().s[271]++,Me().b[72][0]++,i&&(Me().b[72][1]++,i!=="")){Me().b[71][0]++;const a=(Me().s[272]++,i.split(",")),f=(Me().s[273]++,{});Me().s[274]++,a.forEach(g=>{Me().f[57]++,Me().s[275]++,f[g]=!0}),Me().s[276]++,this.setState({isOpen:{...this.state.isOpen,...f}})}else Me().b[71][1]++;const o=(Me().s[277]++,n.searchParams.get("view"));Me().s[278]++,Me().b[74][0]++,o&&(Me().b[74][1]++,o!=="")?(Me().b[73][0]++,Me().s[279]++,this.setMapState(o)):Me().b[73][1]++;const s=(Me().s[280]++,n.searchParams.get("layer"));if(Me().s[281]++,s){Me().b[75][0]++,Me().s[282]++;try{const a=(Me().s[283]++,s.split("~")),[f,g]=(Me().s[284]++,[a[0],parseInt(a[1],10)]);let b=(Me().s[285]++,!0);if(Me().s[286]++,f!=="-"){Me().b[76][0]++;const I=(Me().s[287]++,zB(JSON.stringify(e)));Me().s[288]++,I!==parseInt(f,10)?(Me().b[77][0]++,Me().s[289]++,b=!1):Me().b[77][1]++}else Me().b[76][1]++;Me().s[290]++,b?(Me().b[78][0]++,Me().s[291]++,this.setState({selectedLayerIndex:g,selectedLayerOriginalId:e.layers[g].id})):Me().b[78][1]++}catch(a){Me().s[292]++,console.warn(a)}}else Me().b[75][1]++}));Kn(this,"onLayerSelect",(Me().s[293]++,e=>{Me().f[58]++,Me().s[294]++,this.setState({selectedLayerIndex:e,selectedLayerOriginalId:this.state.mapStyle.layers[e].id},this.setStateInUrl)}));Kn(this,"onChangeOpenlayersDebug",(Me().s[298]++,(e,n)=>{Me().f[62]++,Me().s[299]++,this.setState({openlayersDebugOptions:{...this.state.openlayersDebugOptions,[e]:n}})}));Kn(this,"onChangeMaplibreGlDebug",(Me().s[300]++,(e,n)=>{Me().f[63]++,Me().s[301]++,this.setState({maplibreGlDebugOptions:{...this.state.maplibreGlDebugOptions,[e]:n}})}));Me().s[15]++,gG(this),Me().s[16]++,this.revisionStore=new Gde;const n=(Me().s[17]++,new URLSearchParams(window.location.search.substring(1)));let i=(Me().s[18]++,n.get("localport"));Me().s[19]++,Me().b[6][0]++,i==null&&(Me().b[6][1]++,window.location.port!=="80")&&(Me().b[6][2]++,window.location.port!=="443")?(Me().b[5][0]++,Me().s[20]++,i=window.location.port):Me().b[5][1]++,Me().s[21]++,this.styleStore=new Nde({onLocalStyleChange:a=>(Me().f[3]++,Me().s[22]++,this.onStyleChanged(a,{save:!1})),port:i,host:n.get("localhost")});const o=(Me().s[23]++,[{key:"?",handler:()=>{Me().f[4]++,Me().s[24]++,this.toggleModal("shortcuts")}},{key:"o",handler:()=>{Me().f[5]++,Me().s[25]++,this.toggleModal("open")}},{key:"e",handler:()=>{Me().f[6]++,Me().s[26]++,this.toggleModal("export")}},{key:"d",handler:()=>{Me().f[7]++,Me().s[27]++,this.toggleModal("sources")}},{key:"s",handler:()=>{Me().f[8]++,Me().s[28]++,this.toggleModal("settings")}},{key:"i",handler:()=>{Me().f[9]++,Me().s[29]++,this.setMapState(this.state.mapState==="map"?(Me().b[7][0]++,"inspect"):(Me().b[7][1]++,"map"))}},{key:"m",handler:()=>{Me().f[10]++,Me().s[30]++,document.querySelector(".maplibregl-canvas").focus()}},{key:"!",handler:()=>{Me().f[11]++,Me().s[31]++,this.toggleModal("debug")}}]);Me().s[32]++,document.body.addEventListener("keyup",a=>{if(Me().f[12]++,Me().s[33]++,a.key==="Escape")Me().b[8][0]++,Me().s[34]++,a.target.blur(),Me().s[35]++,document.body.focus();else if(Me().b[8][1]++,Me().s[36]++,Me().b[10][0]++,this.state.isOpen.shortcuts||(Me().b[10][1]++,document.activeElement===document.body)){Me().b[9][0]++;const f=(Me().s[37]++,o.find(g=>(Me().f[13]++,Me().s[38]++,g.key===a.key)));Me().s[39]++,f?(Me().b[11][0]++,Me().s[40]++,this.setModal("shortcuts",!1),Me().s[41]++,f.handler()):Me().b[11][1]++}else Me().b[9][1]++});const s=(Me().s[42]++,Ode());Me().s[43]++,Me().b[13][0]++,s&&(Me().b[13][1]++,window.confirm("Load style from URL: "+s+" and discard current changes?"))?(Me().b[12][0]++,Me().s[44]++,this.styleStore=new VK,Me().s[45]++,Jj(s,a=>(Me().f[14]++,Me().s[46]++,this.onStyleChanged(a))),Me().s[47]++,QK()):(Me().b[12][1]++,Me().s[48]++,s?(Me().b[14][0]++,Me().s[49]++,QK()):Me().b[14][1]++,Me().s[50]++,this.styleStore.init(a=>{Me().f[15]++,Me().s[51]++,a?(Me().b[15][0]++,Me().s[52]++,console.log("Falling back to local storage for storing styles"),Me().s[53]++,this.styleStore=new VK):Me().b[15][1]++,Me().s[54]++,this.styleStore.latestStyle(f=>(Me().f[16]++,Me().s[55]++,this.onStyleChanged(f,{initialLoad:!0}))),Me().s[56]++,L0.enabled()?(Me().b[16][0]++,Me().s[57]++,L0.set("maputnik","styleStore",this.styleStore),Me().s[58]++,L0.set("maputnik","revisionStore",this.revisionStore)):Me().b[16][1]++})),Me().s[59]++,L0.enabled()?(Me().b[17][0]++,Me().s[60]++,L0.set("maputnik","revisionStore",this.revisionStore),Me().s[61]++,L0.set("maputnik","styleStore",this.styleStore)):Me().b[17][1]++,Me().s[62]++,this.state={errors:[],infos:[],mapStyle:oc.emptyStyle,selectedLayerIndex:0,sources:{},vectorLayers:{},mapState:"map",spec:Qa,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},fileHandle:null},Me().s[63]++,this.layerWatcher=new Vde({onVectorLayersChange:a=>(Me().f[17]++,Me().s[64]++,this.setState({vectorLayers:a}))})}componentDidMount(){Me().f[19]++,Me().s[79]++,window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){Me().f[20]++,Me().s[80]++,window.removeEventListener("keydown",this.handleKeyPress)}saveStyle(e){Me().f[21]++,Me().s[81]++,this.styleStore.save(e)}updateFonts(e){Me().f[22]++;const n=(Me().s[82]++,Me().b[27][0]++,this.state.mapStyle.metadata||(Me().b[27][1]++,{})),i=(Me().s[83]++,Me().b[28][0]++,n["maputnik:openmaptiles_access_token"]||(Me().b[28][1]++,zj.openmaptiles)),o=(Me().s[84]++,typeof e=="string"?(Me().b[29][0]++,e.replace("{key}",i)):(Me().b[29][1]++,e));Me().s[85]++,Sde(o,s=>{Me().f[23]++,Me().s[86]++,this.setState({spec:XK(this.state.spec,"glyphs",s)})})}updateIcons(e){Me().f[24]++,Me().s[87]++,Ede(e,n=>{Me().f[25]++,Me().s[88]++,this.setState({spec:XK(this.state.spec,"sprite",n)})})}fetchSources(){Me().f[44]++;const e=(Me().s[210]++,{});Me().s[211]++;for(const[n,i]of Object.entries(this.state.mapStyle.sources))if(Me().s[212]++,Me().b[57][0]++,!Object.prototype.hasOwnProperty.call(this.state.sources,n)&&(Me().b[57][1]++,i.type==="vector")&&(Me().b[57][2]++,Object.prototype.hasOwnProperty.call(i,"url"))){Me().b[56][0]++,Me().s[213]++,e[n]={type:i.type,layers:[]};let o=(Me().s[214]++,i.url);Me().s[215]++;try{Me().s[216]++,o=Xde(o,this.state.mapStyle)}catch(s){Me().s[217]++,console.warn("Failed to setFetchAccessToken: ",s)}Me().s[218]++,fetch(o,{mode:"cors"}).then(s=>(Me().f[45]++,Me().s[219]++,s.json())).then(s=>{if(Me().f[46]++,Me().s[220]++,Object.prototype.hasOwnProperty.call(s,"vector_layers"))Me().b[58][1]++;else{Me().b[58][0]++,Me().s[221]++;return}const a=(Me().s[222]++,Object.assign({},{[n]:this.state.sources[n]}));Me().s[223]++;for(const f of s.vector_layers)Me().s[224]++,a[n].layers.push(f.id);Me().s[225]++,console.debug("Updating source: "+n),Me().s[226]++,this.setState({sources:a})}).catch(s=>{Me().f[47]++,Me().s[227]++,console.error("Failed to process sources for '%s'",o,s)})}else Me().b[56][1]++,Me().s[228]++,e[n]=(Me().b[59][0]++,this.state.sources[n]||(Me().b[59][1]++,this.state.mapStyle.sources[n]));Me().s[229]++,OE(this.state.sources,e)?Me().b[60][1]++:(Me().b[60][0]++,Me().s[230]++,console.debug("Setting sources"),Me().s[231]++,this.setState({sources:e}))}_getRenderer(){Me().f[48]++;const e=(Me().s[232]++,Me().b[61][0]++,this.state.mapStyle.metadata||(Me().b[61][1]++,{}));return Me().s[233]++,Me().b[62][0]++,e["maputnik:renderer"]||(Me().b[62][1]++,"mlgljs")}mapRenderer(){Me().f[50]++;const{mapStyle:e,dirtyMapStyle:n}=(Me().s[236]++,this.state),i=(Me().s[237]++,{mapStyle:(Me().b[63][0]++,n||(Me().b[63][1]++,e)),replaceAccessTokens:g=>(Me().f[51]++,Me().s[238]++,oc.replaceAccessTokens(g,{allowFallback:!0})),onDataChange:g=>{Me().f[52]++,Me().s[239]++,this.layerWatcher.analyzeMap(g.map),Me().s[240]++,this.fetchSources()}}),o=(Me().s[241]++,this._getRenderer());let s;Me().s[242]++,o==="ol"?(Me().b[64][0]++,Me().s[243]++,s=ue.jsx(xre,{...i,onChange:this.onMapChange,debugToolbox:this.state.openlayersDebugOptions.debugToolbox,onLayerSelect:this.onLayerSelect})):(Me().b[64][1]++,Me().s[244]++,s=ue.jsx(m$,{...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 a;Me().s[245]++,this.state.mapState.match(/^filter-/)?(Me().b[65][0]++,Me().s[246]++,a=this.state.mapState.replace(/^filter-/,"")):Me().b[65][1]++;const f=(Me().s[247]++,{});return Me().s[248]++,a?(Me().b[66][0]++,Me().s[249]++,f.filter=`url('#${a}')`):Me().b[66][1]++,Me().s[250]++,ue.jsx("div",{style:f,className:"maputnik-map__container","data-wd-key":"maplibre:container",children:s})}setModal(e,n){Me().f[59]++,Me().s[295]++,this.setState({isOpen:{...this.state.isOpen,[e]:n}},this.setStateInUrl)}toggleModal(e){Me().f[60]++,Me().s[296]++,this.setModal(e,!this.state.isOpen[e])}onSetFileHandle(e){Me().f[61]++,Me().s[297]++,this.setState({fileHandle:e})}render(){Me().f[64]++;const e=(Me().s[302]++,Me().b[79][0]++,this.state.mapStyle.layers||(Me().b[79][1]++,[])),n=(Me().s[303]++,e.length>0?(Me().b[80][0]++,e[this.state.selectedLayerIndex]):(Me().b[80][1]++,void 0)),i=(Me().s[304]++,ue.jsx(ZAe,{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=(Me().s[305]++,ue.jsx(joe,{onMoveLayer:this.onMoveLayer,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayersChange:this.onLayersChange,onLayerSelect:this.onLayerSelect,selectedLayerIndex:this.state.selectedLayerIndex,layers:e,sources:this.state.sources,errors:this.state.errors})),s=(Me().s[306]++,n?(Me().b[81][0]++,ue.jsx(yAe,{layer:n,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)):(Me().b[81][1]++,void 0)),a=(Me().s[307]++,this.state.errors.length+this.state.infos.length>0?(Me().b[82][0]++,ue.jsx(ece,{currentLayer:n,selectedLayerIndex:this.state.selectedLayerIndex,onLayerSelect:this.onLayerSelect,mapStyle:this.state.mapStyle,errors:this.state.errors,infos:this.state.infos})):(Me().b[82][1]++,void 0)),f=(Me().s[308]++,ue.jsxs("div",{children:[ue.jsx(Xce,{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}),ue.jsx(Hce,{isOpen:this.state.isOpen.shortcuts,onOpenToggle:this.toggleModal.bind(this,"shortcuts")}),ue.jsx(ice,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,onChangeMetadataProperty:this.onChangeMetadataProperty,isOpen:this.state.isOpen.settings,onOpenToggle:this.toggleModal.bind(this,"settings")}),ue.jsx(xce,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.export,onOpenToggle:this.toggleModal.bind(this,"export"),fileHandle:this.state.fileHandle,onSetFileHandle:this.onSetFileHandle}),ue.jsx($ce,{isOpen:this.state.isOpen.open,onStyleOpen:this.openStyle,onOpenToggle:this.toggleModal.bind(this,"open"),fileHandle:this.state.fileHandle}),ue.jsx(jce,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.sources,onOpenToggle:this.toggleModal.bind(this,"sources")})]}));return Me().s[309]++,ue.jsx(JAe,{toolbar:i,layerList:o,layerEditor:s,map:this.mapRenderer(),bottom:a,modals:f})}}const ehe=nN.createRoot(document.querySelector("#app"));ehe.render(ue.jsx(aS.Provider,{value:{className:"react-icons"},children:ue.jsx(Jde,{})}));document.querySelector(".loading").style.display="none";
|
||
//# sourceMappingURL=index-Bd2N1aSW.js.map
|